From: Jeff Garzik <jgarzik@pobox.com>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH 2/4] pata_cmd64x: use interrupt status from MRDMODE register
Date: Tue, 13 Mar 2012 16:44:50 -0400 [thread overview]
Message-ID: <4F5FB1C2.1010001@pobox.com> (raw)
In-Reply-To: <201203112225.30144.sshtylyov@ru.mvista.com>
On 03/11/2012 03:25 PM, Sergei Shtylyov wrote:
> @@ -306,7 +336,7 @@ static void cmd64x_fixup(struct pci_dev
>
> static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
> {
> - static const struct ata_port_info cmd_info[6] = {
> + static const struct ata_port_info cmd_info[7] = {
> { /* CMD 643 - no UDMA */
> .flags = ATA_FLAG_SLAVE_POSS,
> .pio_mask = ATA_PIO4,
[...]
> @@ -372,16 +408,19 @@ static int cmd64x_init_one(struct pci_de
> switch (pdev->revision) {
> /* UDMA works since rev 5 */
> default:
> - ppi[0] =&cmd_info[2];
> - ppi[1] =&cmd_info[2];
> + ppi[0] =&cmd_info[3];
> + ppi[1] =&cmd_info[3];
> break;
> + /* Interrupts in MRDMODE since rev 3 */
> case 3:
> case 4:
> + ppi[0] =&cmd_info[2];
> + ppi[1] =&cmd_info[2];
> break;
> /* Rev 1 with other problems? */
> case 1:
> - ppi[0] =&cmd_info[3];
> - ppi[1] =&cmd_info[3];
> + ppi[0] =&cmd_info[4];
> + ppi[1] =&cmd_info[4];
> /* FALL THRU */
> /* Early revs have no CNTRL_CH0 */
> case 2:
> @@ -429,8 +468,8 @@ static int cmd64x_reinit_one(struct pci_
> static const struct pci_device_id cmd64x[] = {
> { PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_643), 0 },
> { PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_646), 1 },
> - { PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_648), 4 },
> - { PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_649), 5 },
> + { PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_648), 5 },
> + { PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_649), 6 },
Would be nice to move to replace those hardcoded numbers with something
more resilient to change (named constants).
Jeff
prev parent reply other threads:[~2012-03-13 20:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-11 19:25 [PATCH 2/4] pata_cmd64x: use interrupt status from MRDMODE register Sergei Shtylyov
2012-03-13 20:44 ` Jeff Garzik [this message]
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=4F5FB1C2.1010001@pobox.com \
--to=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=sshtylyov@ru.mvista.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 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.