From: Jeff Garzik <jgarzik@pobox.com>
To: Mark Haverkamp <markh@osdl.org>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
James Bottomley <James.Bottomley@steeleye.com>,
Mark Salyzyn <mark_salyzyn@adaptec.com>
Subject: Re: [PATCH 1/3] 2.6.0 aacraid driver update
Date: Mon, 06 Oct 2003 17:55:36 -0400 [thread overview]
Message-ID: <3F81E4D8.20904@pobox.com> (raw)
In-Reply-To: <1065475266.17021.75.camel@markh1.pdx.osdl.net>
Mark Haverkamp wrote:
> +static void aac_io_done(Scsi_Cmnd * scsicmd)
> +{
> + unsigned long cpu_flags;
> + struct Scsi_Host *host = scsicmd->device->host;
> + spin_lock_irqsave(host->host_lock, cpu_flags);
> + scsicmd->scsi_done(scsicmd);
> + spin_unlock_irqrestore(host->host_lock, cpu_flags);
> +}
Do you really need the host lock to end an IO?
> +static void __aac_io_done(Scsi_Cmnd * scsicmd)
> +{
> + scsicmd->scsi_done(scsicmd);
> +}
This stuff should be in scsi_lib.c or a header in include/scsi, don't
you think?
> @@ -523,9 +632,27 @@
> dev->pae_support = (paemode!=0);
> }
> if(dev->pae_support != 0) {
> - printk(KERN_INFO"%s%d: 64 Bit PAE enabled\n", dev->name, dev->id);
> - pci_set_dma_mask(dev->pdev, (dma_addr_t)0xFFFFFFFFFFFFFFFFULL);
> + if (pci_set_dma_mask(dev->pdev,
> + (dma_addr_t)0xFFFFFFFFFFFFFFFFULL)) {
you may (and should) remove the cast.
> + printk(KERN_INFO"%s%d: DMA mask set failed, 64 Bit PAE disabled\n",
> + dev->name, dev->id);
> + dev->pae_support = 0;
> + } else {
> + printk(KERN_INFO"%s%d: 64 Bit PAE enabled\n",
> + dev->name, dev->id);
"64-bit DAC mode" may be a little bit more precise.
PAE is processor, and x86-specific at that. DAC is PCI bus.
> + } else {
> + /*
> + * Reset if Quirk 31 was used, since data
> + * transfers are ok.
> + */
> + if (pci_set_dma_mask(dev->pdev, (dma_addr_t)0xFFFFFFFFULL)) {
> + printk(KERN_INFO"aacraid: Can't reset DMA mask.\n");
remove the cast
> @@ -559,7 +686,7 @@
> scsicmd->use_sg,
> scsi_to_pci_dma_dir(scsicmd->sc_data_direction));
> else if(scsicmd->request_bufflen)
> - pci_unmap_single(dev->pdev, (dma_addr_t)(ulong)scsicmd->SCp.ptr,
> + pci_unmap_single(dev->pdev, (dma_addr_t)(unsigned long)scsicmd->SCp.ptr,
> scsicmd->request_bufflen,
> scsi_to_pci_dma_dir(scsicmd->sc_data_direction));
> readreply = (struct aac_read_reply *)fib_data(fibptr);
do you really need all that casting? :)
> @@ -603,7 +734,7 @@
> scsicmd->use_sg,
> scsi_to_pci_dma_dir(scsicmd->sc_data_direction));
> else if(scsicmd->request_bufflen)
> - pci_unmap_single(dev->pdev, (dma_addr_t)(ulong)scsicmd->SCp.ptr,
> + pci_unmap_single(dev->pdev, (dma_addr_t)(unsigned long)scsicmd->SCp.ptr,
> scsicmd->request_bufflen,
> scsi_to_pci_dma_dir(scsicmd->sc_data_direction));
>
likewise
> @@ -1235,7 +1511,7 @@
> scsicmd->use_sg,
> scsi_to_pci_dma_dir(scsicmd->sc_data_direction));
> else if(scsicmd->request_bufflen)
> - pci_unmap_single(dev->pdev, (ulong)scsicmd->SCp.ptr, scsicmd->request_bufflen,
> + pci_unmap_single(dev->pdev, (unsigned long)scsicmd->SCp.ptr, scsicmd->request_bufflen,
> scsi_to_pci_dma_dir(scsicmd->sc_data_direction));
>
ah-hah, you choose another casting style, differing from the above
examples I pointed out...
next prev parent reply other threads:[~2003-10-06 21:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-06 21:21 [PATCH 1/3] 2.6.0 aacraid driver update Mark Haverkamp
2003-10-06 21:55 ` Jeff Garzik [this message]
2003-10-06 22:09 ` Mark Haverkamp
2003-10-06 22:24 ` Jeff Garzik
2003-10-07 21:18 ` Mark Haverkamp
2003-10-07 21:39 ` Matthew Wilcox
2003-10-07 21:50 ` Mark Haverkamp
2003-10-07 21:39 ` Jeff Garzik
2003-10-08 17:43 ` Mark Haverkamp
-- strict thread matches above, loose matches on Subject: below --
2003-10-08 13:11 Salyzyn, Mark
2003-10-08 13:55 ` Matthew Wilcox
2003-10-08 14:23 ` Mark Haverkamp
2003-10-08 14:26 Salyzyn, Mark
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=3F81E4D8.20904@pobox.com \
--to=jgarzik@pobox.com \
--cc=James.Bottomley@steeleye.com \
--cc=linux-scsi@vger.kernel.org \
--cc=mark_salyzyn@adaptec.com \
--cc=markh@osdl.org \
/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