From: Jeff Garzik <jeff@garzik.org>
To: Edward Shao <laface.tw@gmail.com>
Cc: linux-ide@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: set pio timing in pata_atiixp.c
Date: Fri, 18 Apr 2008 02:30:02 -0400 [thread overview]
Message-ID: <48083FEA.6050305@garzik.org> (raw)
In-Reply-To: <ff05f3d00804172221x232ae8bdx25b4e0f979d245d2@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 760 bytes --]
Edward Shao wrote:
> Hi all,
> I read linux-2.6.25 stable
>
> In function drivers/ata/pata_atiixp.c:atiixp_set_pio_timing()
> I see
> pci_read_config_word(pdev, ATIIXP_IDE_PIO_TIMING, &pio_timing_data);
> pio_mode_data &= ~(0xFF << timing_shift);
> pio_mode_data |= (pio_timings[pio] << timing_shift);
> pci_write_config_word(pdev, ATIIXP_IDE_PIO_TIMING, pio_timing_data);
>
> but I think it should be
>
> pci_read_config_word(pdev, ATIIXP_IDE_PIO_TIMING, &pio_timing_data);
> pio_timing_data &= ~(0xFF << timing_shift);
> pio_timing_data |= (pio_timings[pio] << timing_shift);
> pci_write_config_word(pdev, ATIIXP_IDE_PIO_TIMING, pio_timing_data);
Yes, it certainly appears you noticed a bug...
Presumably the attached patch fixes?
Jeff
[-- Attachment #2: patch.atiixp-fix --]
[-- Type: text/plain, Size: 677 bytes --]
diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c
index 408bdc1..780144f 100644
--- a/drivers/ata/pata_atiixp.c
+++ b/drivers/ata/pata_atiixp.c
@@ -93,8 +93,8 @@ static void atiixp_set_pio_timing(struct ata_port *ap, struct ata_device *adev,
pci_write_config_word(pdev, ATIIXP_IDE_PIO_MODE, pio_mode_data);
pci_read_config_word(pdev, ATIIXP_IDE_PIO_TIMING, &pio_timing_data);
- pio_mode_data &= ~(0xFF << timing_shift);
- pio_mode_data |= (pio_timings[pio] << timing_shift);
+ pio_timing_data &= ~(0xFF << timing_shift);
+ pio_timing_data |= (pio_timings[pio] << timing_shift);
pci_write_config_word(pdev, ATIIXP_IDE_PIO_TIMING, pio_timing_data);
}
prev parent reply other threads:[~2008-04-18 6:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-18 5:21 set pio timing in pata_atiixp.c Edward Shao
2008-04-18 6:30 ` 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=48083FEA.6050305@garzik.org \
--to=jeff@garzik.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=laface.tw@gmail.com \
--cc=linux-ide@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.