From: Jeff Garzik <jeff@garzik.org>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Mike Miller <mike.miller@hp.com>,
iss_storagedev@hp.com, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH 3/7] CCISS: announce cciss%d devices with PCI address/IRQ/DAC info
Date: Wed, 14 Jun 2006 19:37:47 -0400 [thread overview]
Message-ID: <44909DCB.8070300@garzik.org> (raw)
In-Reply-To: <200606141710.12182.bjorn.helgaas@hp.com>
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
next prev parent reply other threads:[~2006-06-14 23:37 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-14 23:07 [PATCH 0/7] CCISS cleanups Bjorn Helgaas
2006-06-14 23:08 ` [PATCH 1/7] CCISS: disable device when returning failure Bjorn Helgaas
2006-06-14 23:36 ` Jeff Garzik
2006-06-15 14:32 ` Miller, Mike (OS Dev)
2006-06-14 23:09 ` [PATCH 2/7] CCISS: request all PCI resources Bjorn Helgaas
2006-06-15 14:35 ` Miller, Mike (OS Dev)
2006-06-14 23:10 ` [PATCH 3/7] CCISS: announce cciss%d devices with PCI address/IRQ/DAC info Bjorn Helgaas
2006-06-14 23:37 ` Jeff Garzik [this message]
2006-06-15 14:37 ` Miller, Mike (OS Dev)
2006-06-14 23:10 ` [PATCH 4/7] CCISS: use ARRAY_SIZE without intermediates Bjorn Helgaas
2006-06-14 23:37 ` Jeff Garzik
2006-06-15 14:38 ` Miller, Mike (OS Dev)
2006-06-14 23:11 ` [PATCH 5/7] CCISS: fix a few spelling errors Bjorn Helgaas
2006-06-15 14:40 ` Miller, Mike (OS Dev)
2006-06-14 23:12 ` [PATCH 6/7] CCISS: remove parens around return values Bjorn Helgaas
2006-06-15 14:42 ` Miller, Mike (OS Dev)
[not found] ` <200606141713.46497.bjorn.helgaas@hp.com>
2006-06-15 4:08 ` [PATCH 7/7] CCISS: run through Lindent Bjorn Helgaas
[not found] ` <c6b285c60606150114h273f5ceue19bcea43937e86c@mail.gmail.com>
2006-06-15 8:35 ` [PATCH 0/7] CCISS cleanups Laura Garcia
2006-06-15 11:50 ` Jeff Garzik
2006-06-15 16:57 ` [PATCH 8/7] CCISS: tidy up product table indentation Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44909DCB.8070300@garzik.org \
--to=jeff@garzik.org \
--cc=akpm@osdl.org \
--cc=bjorn.helgaas@hp.com \
--cc=iss_storagedev@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.miller@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox