Skip to contentSkip to conversation

pata_sis: add missing UDMA5 timing value in sis_66_set_dmamode()

PATCH Applied Tejun Heo 4 participants 5 messages Sep 21, 2007 – Sep 26, 2007 libata

lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

PATCH 1/1 pata_sis: add missing UDMA5 timing value in sis_66_set_dmamode()

sis_66_set_dmamode() also handles early UDMA100 (SIS630 ET) but is missing udma timing value for UDMA100. According to sis5513, this should be 0x8000. This caused UDMA100 device to fail on pata_sis till it downgrades to UDMA66 while it works fine on sis5513 at UDMA100.

Reported by Adam Blech.

---
 drivers/ata/pata_sis.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/ata/pata_sis.c +2 -1
index da3f720..3b5be77 100644
@@ -376,8 +376,9 @@ static void sis_66_set_dmamode (struct ata_port *ap, struct ata_device *adev)
 	int drive_pci = sis_old_port_base(adev);
 	u16 timing;
 
+	/* MWDMA 0-2 and UDMA 0-5 */
 	const u16 mwdma_bits[] = { 0x008, 0x302, 0x301 };
-	const u16 udma_bits[]  = { 0xF000, 0xD000, 0xB000, 0xA000, 0x9000};
+	const u16 udma_bits[]  = { 0xF000, 0xD000, 0xB000, 0xA000, 0x9000, 0x8000 };
 
 	pci_read_config_word(pdev, drive_pci, &timing);
 
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · On Fri, 21 Sep 2007 16:29:05 +0900 Tejun Heo <[email protected]> wrote:

sis_66_set_dmamode() also handles early UDMA100 (SIS630 ET) but is missing udma timing value for UDMA100. According to sis5513, this should be 0x8000. This caused UDMA100 device to fail on pata_sis till it downgrades to UDMA66 while it works fine on sis5513 at UDMA100.

Reported by Adam Blech.

I was just looking at this as we had a Red Hat bug for it 8)

author
#2 lore raw
Quoted 8 lines · Alan Cox
Quoted 5 lines · On Fri, 21 Sep 2007 16:29:05 +0900 Tejun Heo <[email protected]> wrote:

sis_66_set_dmamode() also handles early UDMA100 (SIS630 ET) but is missing udma timing value for UDMA100. According to sis5513, this should be 0x8000. This caused UDMA100 device to fail on pata_sis till it downgrades to UDMA66 while it works fine on sis5513 at UDMA100.

Quoted 9 lines
Quoted 4 lines

Reported by Adam Blech.

I was just looking at this as we had a Red Hat bug for it 8)

I caught this one from a SUSE bug. I guess distros are useful from time to time. :-)

Signature · 1 line
tejun
#3 lore raw
In reply to Tejun Heo
Quoted 18 lines · Tejun Heo

sis_66_set_dmamode() also handles early UDMA100 (SIS630 ET) but is missing udma timing value for UDMA100. According to sis5513, this should be 0x8000. This caused UDMA100 device to fail on pata_sis till it downgrades to UDMA66 while it works fine on sis5513 at UDMA100.

Reported by Adam Blech.

---
 drivers/ata/pata_sis.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/ata/pata_sis.c +0 -0
index da3f720..3b5be77 100644

drivers/ata/pata_sis.c static void sis_66_set_dmamode (struct ata_port *ap, struct ata_device *adev) · line 384

Quoted 10 lines
drivers/ata/pata_sis.c +2 -1
@@ -376,8 +376,9 @@ static void sis_66_set_dmamode (struct ata_port *ap, struct ata_device *adev)
 	int drive_pci = sis_old_port_base(adev);
 	u16 timing;
 
+	/* MWDMA 0-2 and UDMA 0-5 */
 	const u16 mwdma_bits[] = { 0x008, 0x302, 0x301 };
-	const u16 udma_bits[]  = { 0xF000, 0xD000, 0xB000, 0xA000, 0x9000};
+	const u16 udma_bits[]  = { 0xF000, 0xD000, 0xB000, 0xA000, 0x9000, 0x8000 };
 
 	pci_read_config_word(pdev, drive_pci, &timing);
 

Is this going into 2.6.23?
It's not in 2.6.23-rc8-mm1...

Applied
#4 lore raw
In reply to Tejun Heo
Quoted 5 lines · Tejun Heo

sis_66_set_dmamode() also handles early UDMA100 (SIS630 ET) but is missing udma timing value for UDMA100. According to sis5513, this should be 0x8000. This caused UDMA100 device to fail on pata_sis till it downgrades to UDMA66 while it works fine on sis5513 at UDMA100.

Quoted 7 lines

Reported by Adam Blech.

---
 drivers/ata/pata_sis.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

applied