diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2006-06-25 05:49:03 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-25 10:01:21 -0700 |
commit | 40aabb5815723551e7c92dd08ed3ea82ec000ccd (patch) | |
tree | 7328b19bd64fd761ef6467d37016e558318b8fed | |
parent | 4e570309e80f7c7a532fe0074e74df26ff8ef5d2 (diff) | |
download | blackbird-op-linux-40aabb5815723551e7c92dd08ed3ea82ec000ccd.tar.gz blackbird-op-linux-40aabb5815723551e7c92dd08ed3ea82ec000ccd.zip |
[PATCH] CCISS: announce cciss%d devices with PCI address/IRQ/DAC info
We already print "cciss: using DAC cycles" or similar for every adapter found:
why not just identify the device we're talking about and include other useful
information?
Jeff Garzik <jeff@garzik.org>:
Although this patch is correct, I would consider using dev_printk() rather
than referencing pci_name() in printk() arguments.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/block/cciss.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 45c4c3131c8f..f7c3c53bd0cd 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -3086,11 +3086,8 @@ static int __devinit cciss_init_one(struct pci_dev *pdev, int i; int j; int rc; + int dac; - printk(KERN_DEBUG "cciss: Device 0x%x has been found at" - " bus %d dev %d func %d\n", - pdev->device, pdev->bus->number, PCI_SLOT(pdev->devfn), - PCI_FUNC(pdev->devfn)); i = alloc_cciss_hba(); if(i < 0) return (-1); @@ -3106,11 +3103,11 @@ static int __devinit cciss_init_one(struct pci_dev *pdev, /* configure PCI DMA stuff */ if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) - printk("cciss: using DAC cycles\n"); + dac = 1; else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)) - printk("cciss: not using DAC cycles\n"); + dac = 0; else { - printk("cciss: no suitable DMA available\n"); + printk(KERN_ERR "cciss: no suitable DMA available\n"); goto clean1; } @@ -3141,6 +3138,11 @@ static int __devinit cciss_init_one(struct pci_dev *pdev, hba[i]->intr[SIMPLE_MODE_INT], hba[i]->devname); goto clean2; } + + printk(KERN_INFO "%s: <0x%x> at PCI %s IRQ %d%s using DAC\n", + hba[i]->devname, pdev->device, pci_name(pdev), + hba[i]->intr[SIMPLE_MODE_INT], dac ? "" : " not"); + hba[i]->cmd_pool_bits = kmalloc(((NR_CMDS+BITS_PER_LONG-1)/BITS_PER_LONG)*sizeof(unsigned long), GFP_KERNEL); hba[i]->cmd_pool = (CommandList_struct *)pci_alloc_consistent( hba[i]->pdev, NR_CMDS * sizeof(CommandList_struct), |