From: Matthew Wilcox <matthew@wil.cx>
To: Andre Hedrick <andre@linux-ide.org>
Cc: Jeff Garzik <jeff@garzik.org>,
linux-scsi@vger.kernel.org, Seokmann.Ju@lsil.com,
Andrew Morton <akpm@osdl.org>,
James Bottomley <James.Bottomley@SteelEye.com>,
Christoph Hellwig <hch@infradead.org>,
Atul Mukker <Atul.Mukker@lsil.com>
Subject: Re: [RFC] Megaraid update, submission
Date: Tue, 16 May 2006 13:44:17 -0600 [thread overview]
Message-ID: <20060516194417.GA1604@parisc-linux.org> (raw)
In-Reply-To: <Pine.LNX.4.10.10605161112140.3589-200000@master.linux-ide.org>
On Tue, May 16, 2006 at 11:13:14AM -0700, Andre Hedrick wrote:
> /**
> + * megaraid_pci_master_abort
> + * @dev : pci device structure
> + *
> + * Tests for PCI Master Abort on the host adapter and clears state
> + * Returns state of error with inverted logic test to give proper
> + * state of the pci statuts bit describing master_abort.
> + */
> +static int megaraid_pci_master_abort(struct pci_dev* dev)
> +{
> + u16 status, error_bits;
> +
> + pci_read_config_word(dev, PCI_STATUS, &status);
> + error_bits = (status & PCI_STATUS_REC_MASTER_ABORT);
> + if (error_bits)
> + pci_write_config_word(dev, PCI_STATUS, error_bits);
> + pci_read_config_word(dev, PCI_STATUS, &status);
> + error_bits = (status & PCI_STATUS_REC_MASTER_ABORT);
> + return (!error_bits) ? 0 : 1;
A little clunky still. How about:
u16 status;
pci_read_config_word(dev, PCI_STATUS, &status);
if (!(status & PCI_STATUS_REC_MASTER_ABORT))
return 0;
pci_write_config_word(dev, PCI_STATUS, PCI_STATUS_REC_MASTER_ABORT);
pci_read_config_word(dev, PCI_STATUS, &status);
return (status & PCI_STATUS_REC_MASTER_ABORT) ? 1 : 0;
> @@ -2519,14 +2547,13 @@
> list_for_each_entry_safe(scb, tmp, &adapter->completed_list, list) {
>
> if (scb->scp == scp) { // Found command
> -
> - list_del_init(&scb->list); // from completed list
> -
> con_log(CL_ANN, (KERN_WARNING
> "megaraid: %ld:%d[%d:%d], abort from completed list\n",
> scp->serial_number, scb->sno,
> scb->dev_channel, scb->dev_target));
>
> + list_del_init(&scb->list); // from completed list
> +
> scp->result = (DID_ABORT << 16);
> scp->scsi_done(scp);
>
Not quite sure why this change makes any difference
> @@ -2549,8 +2576,6 @@
>
> if (scb->scp == scp) { // Found command
>
> - list_del_init(&scb->list); // from pending list
> -
> ASSERT(!(scb->state & SCB_ISSUED));
>
> con_log(CL_ANN, (KERN_WARNING
> @@ -2558,6 +2583,8 @@
> scp->serial_number, scb->dev_channel,
> scb->dev_target));
>
> + list_del_init(&scb->list); // from pending list
> +
> scp->result = (DID_ABORT << 16);
> scp->scsi_done(scp);
ditto
next prev parent reply other threads:[~2006-05-16 19:44 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-04 18:48 megaraid_mbox: garbage in file Vasily Averin
2006-05-04 22:59 ` James Bottomley
2006-05-05 5:37 ` Vasily Averin
2006-05-05 9:21 ` Vasily Averin
2006-05-16 17:44 ` [RFC] Megaraid update, submission Andre Hedrick
2006-05-16 18:07 ` Jeff Garzik
2006-05-16 18:13 ` Andre Hedrick
2006-05-16 19:44 ` Matthew Wilcox [this message]
2006-05-16 20:24 ` Andre Hedrick
2006-05-05 15:59 ` megaraid_mbox: garbage in file James Bottomley
2006-05-05 18:17 ` Vasily Averin
2006-05-05 20:05 ` James Bottomley
2006-05-05 23:43 ` Vasily Averin
2006-05-05 23:43 ` Vasily Averin
-- strict thread matches above, loose matches on Subject: below --
2006-05-16 19:03 [RFC] Megaraid update, submission Ju, Seokmann
2006-05-16 20:47 ` Andre Hedrick
2006-05-16 21:08 Ju, Seokmann
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=20060516194417.GA1604@parisc-linux.org \
--to=matthew@wil.cx \
--cc=Atul.Mukker@lsil.com \
--cc=James.Bottomley@SteelEye.com \
--cc=Seokmann.Ju@lsil.com \
--cc=akpm@osdl.org \
--cc=andre@linux-ide.org \
--cc=hch@infradead.org \
--cc=jeff@garzik.org \
--cc=linux-scsi@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.