linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ata_if_xfermask() word 51 fix
@ 2007-01-29 12:28 Lennert Buytenhek
  2007-01-29 13:16 ` Alan
  2007-01-30 14:15 ` Jeff Garzik
  0 siblings, 2 replies; 3+ messages in thread
From: Lennert Buytenhek @ 2007-01-29 12:28 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-ide

If word 53 bit 1 isn't set, the maximum PIO mode is indicated by
the upper 8 bits of word 51, not the lower 8 bits.  Fixes PIO mode
detection on old Compact Flash cards.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>

Index: linux-2.6.19/drivers/ata/libata-core.c
===================================================================
--- linux-2.6.19.orig/drivers/ata/libata-core.c
+++ linux-2.6.19/drivers/ata/libata-core.c
@@ -1037,7 +1048,7 @@ static unsigned int ata_id_xfermask(cons
 		 * the PIO timing number for the maximum. Turn it into
 		 * a mask.
 		 */
-		u8 mode = id[ATA_ID_OLD_PIO_MODES] & 0xFF;
+		u8 mode = (id[ATA_ID_OLD_PIO_MODES] >> 8) & 0xFF;
 		if (mode < 5)	/* Valid PIO range */
                 	pio_mask = (2 << mode) - 1;
 		else

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ata_if_xfermask() word 51 fix
  2007-01-29 12:28 [PATCH] ata_if_xfermask() word 51 fix Lennert Buytenhek
@ 2007-01-29 13:16 ` Alan
  2007-01-30 14:15 ` Jeff Garzik
  1 sibling, 0 replies; 3+ messages in thread
From: Alan @ 2007-01-29 13:16 UTC (permalink / raw)
  To: Lennert Buytenhek; +Cc: Jeff Garzik, linux-ide

On Mon, 29 Jan 2007 13:28:47 +0100
Lennert Buytenhek <buytenh@wantstofly.org> wrote:

> If word 53 bit 1 isn't set, the maximum PIO mode is indicated by
> the upper 8 bits of word 51, not the lower 8 bits.  Fixes PIO mode
> detection on old Compact Flash cards.
> 
> Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>

Acked-by: Alan Cox <alan@redhat.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ata_if_xfermask() word 51 fix
  2007-01-29 12:28 [PATCH] ata_if_xfermask() word 51 fix Lennert Buytenhek
  2007-01-29 13:16 ` Alan
@ 2007-01-30 14:15 ` Jeff Garzik
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2007-01-30 14:15 UTC (permalink / raw)
  To: Lennert Buytenhek; +Cc: linux-ide

Lennert Buytenhek wrote:
> If word 53 bit 1 isn't set, the maximum PIO mode is indicated by
> the upper 8 bits of word 51, not the lower 8 bits.  Fixes PIO mode
> detection on old Compact Flash cards.
> 
> Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>

applied



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-01-30 14:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-29 12:28 [PATCH] ata_if_xfermask() word 51 fix Lennert Buytenhek
2007-01-29 13:16 ` Alan
2007-01-30 14:15 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).