lkml.org 
[lkml]   [2006]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/7] CCISS: announce cciss%d devices with PCI address/IRQ/DAC info
Bjorn Helgaas wrote:
> 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?
>
> Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
>
> Index: rc6-mm2/drivers/block/cciss.c
> ===================================================================
> --- rc6-mm2.orig/drivers/block/cciss.c 2006-06-14 16:18:20.000000000 -0600
> +++ rc6-mm2/drivers/block/cciss.c 2006-06-14 16:18:29.000000000 -0600
> @@ -3086,11 +3086,8 @@
> 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 @@
>
> /* 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 @@
> 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");

Although this patch is correct, I would consider using dev_printk()
rather than referencing pci_name() in printk() arguments.

Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-15 01:40    [W:2.719 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site