linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.13] Fix pio_mask values
@ 2005-08-30 19:03 Brett Russ
  2005-09-02  1:53 ` [PATCH 2.6.13] libata: fix pio_mask values (take 2) Brett Russ
  0 siblings, 1 reply; 3+ messages in thread
From: Brett Russ @ 2005-08-30 19:03 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-ide, linux-kernel

ata_get_mode_mask() has PIO modes 3 and 4 as bits 3 and 4 in the pio_mask
since the value read from the drive is shifted left by 3 bits and OR'd with
0x7 (which corresponds to PIO 2-0).  Thus, the drivers below need adjustments
to comply with the way pio_mask is used.  I left the masks in a state which
agrees with the existing comments; perhaps they all should get 0x1f to
indicate driver support for PIO4-0 but that can be done later.

Signed-off-by: Brett Russ <russb@emc.com>


Index: linux-2.6.13/drivers/scsi/ahci.c
===================================================================
--- linux-2.6.13.orig/drivers/scsi/ahci.c
+++ linux-2.6.13/drivers/scsi/ahci.c
@@ -244,7 +244,7 @@ static struct ata_port_info ahci_port_in
 		.host_flags	= ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
 				  ATA_FLAG_SATA_RESET | ATA_FLAG_MMIO |
 				  ATA_FLAG_PIO_DMA,
-		.pio_mask	= 0x03, /* pio3-4 */
+		.pio_mask	= 0x18, /* pio3-4 */
 		.udma_mask	= 0x7f, /* udma0-6 ; FIXME */
 		.port_ops	= &ahci_ops,
 	},
Index: linux-2.6.13/drivers/scsi/sata_uli.c
===================================================================
--- linux-2.6.13.orig/drivers/scsi/sata_uli.c
+++ linux-2.6.13/drivers/scsi/sata_uli.c
@@ -120,7 +120,7 @@ static struct ata_port_info uli_port_inf
 	.sht            = &uli_sht,
 	.host_flags     = ATA_FLAG_SATA | ATA_FLAG_SATA_RESET |
 			  ATA_FLAG_NO_LEGACY,
-	.pio_mask       = 0x03,		//support pio mode 4 (FIXME)
+	.pio_mask       = 0x10,		//support pio mode 4 (FIXME)
 	.udma_mask      = 0x7f,		//support udma mode 6
 	.port_ops       = &uli_ops,
 };

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

* [PATCH 2.6.13] libata: fix pio_mask values (take 2)
  2005-08-30 19:03 [PATCH 2.6.13] Fix pio_mask values Brett Russ
@ 2005-09-02  1:53 ` Brett Russ
  2005-09-07  5:55   ` Jeff Garzik
  0 siblings, 1 reply; 3+ messages in thread
From: Brett Russ @ 2005-09-02  1:53 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-ide, linux-kernel

ata_get_mode_mask() uses bits 3 and 4 in the pio_mask to represent PIO
modes 3 and 4.  The value read from the drive, which reports support
for PIO3 and PIO4 in bits 0 and 1, is shifted left by 3 bits and OR'd
with 0x7 (which then corresponds to PIO 2-0 in libata).  Thus, the
drivers below need adjustments to comply with the way pio_mask is
used.  I changed the masks from the commented values to all support
PIO4-0, since the spec mandates that PIO0-2 are supported and there's
no reason not to support PIO3 IMO.

Signed-off-by: Brett Russ <russb@emc.com>


Index: linux-2.6.13/drivers/scsi/ahci.c
===================================================================
--- linux-2.6.13.orig/drivers/scsi/ahci.c
+++ linux-2.6.13/drivers/scsi/ahci.c
@@ -244,7 +244,7 @@ static struct ata_port_info ahci_port_in
 		.host_flags	= ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
 				  ATA_FLAG_SATA_RESET | ATA_FLAG_MMIO |
 				  ATA_FLAG_PIO_DMA,
-		.pio_mask	= 0x03, /* pio3-4 */
+		.pio_mask	= 0x1f, /* pio4-0 */
 		.udma_mask	= 0x7f, /* udma0-6 ; FIXME */
 		.port_ops	= &ahci_ops,
 	},
Index: linux-2.6.13/drivers/scsi/sata_uli.c
===================================================================
--- linux-2.6.13.orig/drivers/scsi/sata_uli.c
+++ linux-2.6.13/drivers/scsi/sata_uli.c
@@ -120,8 +120,8 @@ static struct ata_port_info uli_port_inf
 	.sht            = &uli_sht,
 	.host_flags     = ATA_FLAG_SATA | ATA_FLAG_SATA_RESET |
 			  ATA_FLAG_NO_LEGACY,
-	.pio_mask       = 0x03,		//support pio mode 4 (FIXME)
-	.udma_mask      = 0x7f,		//support udma mode 6
+	.pio_mask       = 0x1f,		/* pio4-0 */
+	.udma_mask      = 0x7f,		/* udma6-0 */
 	.port_ops       = &uli_ops,
 };
 

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

* Re: [PATCH 2.6.13] libata: fix pio_mask values (take 2)
  2005-09-02  1:53 ` [PATCH 2.6.13] libata: fix pio_mask values (take 2) Brett Russ
@ 2005-09-07  5:55   ` Jeff Garzik
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2005-09-07  5:55 UTC (permalink / raw)
  To: Brett Russ; +Cc: linux-ide, linux-kernel

applied


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

end of thread, other threads:[~2005-09-07  5:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-30 19:03 [PATCH 2.6.13] Fix pio_mask values Brett Russ
2005-09-02  1:53 ` [PATCH 2.6.13] libata: fix pio_mask values (take 2) Brett Russ
2005-09-07  5:55   ` 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).