Skip to contentSkip to conversation

Failed to set xfermode on LITE-ON LTR-40125S

DISCUSSION John Williams 3 participants 4 messages Jan 25, 2007 – Jan 26, 2007 libata

lore
Share & tools
lore
#0 lore raw

Hello,

I just tried the libata support for PATA in kernel 2.6.20-rc5 and I got this:

scsi1 : pata_sis
ata2.00: ATAPI, max UDMA/66
ata2.01: ATAPI, max UDMA/33
ata2.00: configured for UDMA/33
ata2.01: qc timeout (cmd 0xef)
ata2.01: failed to set xfermode (err_mask=0x4) ata2.01: limiting speed to UDMA/25
ata2: failed to recover some devices, retrying in 5 secs ata2.00: configured for UDMA/33
ata2.01: qc timeout (cmd 0xef)
ata2.01: failed to set xfermode (err_mask=0x4) ata2.01: limiting speed to PIO0
ata2: failed to recover some devices, retrying in 5 secs ata2.00: configured for UDMA/33
ata2.01: qc timeout (cmd 0xef)
ata2.01: failed to set xfermode (err_mask=0x4) ata2.01: disabled
ata2: failed to recover some devices, retrying in 5 secs ata2.00: failed to set xfermode (err_mask=0x40) ata2.00: limiting speed to UDMA/25
ata2: failed to recover some devices, retrying in 5 secs ata2.00: configured for UDMA/25

The offending device is a LITE-ON LTR-40125S CDRW attached to SIS 513 IDE (rev d0)

I found a patch here:
http://readlist.com/lists/vger.kernel.org/linux-kernel/45/228948.html
which cures the problem for me. Is this the recommended patch for this problem? If not, I would be happy to test alternative solutions.

Thanks,
John Williams

#1 lore raw
Quoted 28 lines · John Williams

Hello,

I just tried the libata support for PATA in kernel 2.6.20-rc5 and I got this:

scsi1 : pata_sis
ata2.00: ATAPI, max UDMA/66
ata2.01: ATAPI, max UDMA/33
ata2.00: configured for UDMA/33
ata2.01: qc timeout (cmd 0xef)
ata2.01: failed to set xfermode (err_mask=0x4) ata2.01: limiting speed to UDMA/25
ata2: failed to recover some devices, retrying in 5 secs ata2.00: configured for UDMA/33
ata2.01: qc timeout (cmd 0xef)
ata2.01: failed to set xfermode (err_mask=0x4) ata2.01: limiting speed to PIO0
ata2: failed to recover some devices, retrying in 5 secs ata2.00: configured for UDMA/33
ata2.01: qc timeout (cmd 0xef)
ata2.01: failed to set xfermode (err_mask=0x4) ata2.01: disabled
ata2: failed to recover some devices, retrying in 5 secs ata2.00: failed to set xfermode (err_mask=0x40) ata2.00: limiting speed to UDMA/25
ata2: failed to recover some devices, retrying in 5 secs ata2.00: configured for UDMA/25

Quoted 8 lines

The offending device is a LITE-ON LTR-40125S CDRW attached to SIS 513 IDE (rev d0)

I found a patch here:
http://readlist.com/lists/vger.kernel.org/linux-kernel/45/228948.html
which cures the problem for me. Is this the recommended patch for this problem? If not, I would be happy to test alternative solutions.

Tejun fixed the problem by ATA_FLAG_SETXFER_POLLING for pata_via. Maybe the same fix works for pata_sis.

Could you please try the attached patch, thanks.
--
albert

drivers/ata/pata_sis.c renamed from drivers/ata/pata_sis.c~ +7 -7
@@ -718,7 +718,7 @@ static const struct ata_port_operations 
 
 static struct ata_port_info sis_info = {
 	.sht		= &sis_sht,
-	.flags		= ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+	.flags		= ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST | ATA_FLAG_SETXFER_POLLING,
 	.pio_mask	= 0x1f,	/* pio0-4 */
 	.mwdma_mask	= 0x07,
 	.udma_mask	= 0,
@@ -726,7 +726,7 @@ static struct ata_port_info sis_info = {
 };
 static struct ata_port_info sis_info33 = {
 	.sht		= &sis_sht,
-	.flags		= ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+	.flags		= ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST | ATA_FLAG_SETXFER_POLLING,
 	.pio_mask	= 0x1f,	/* pio0-4 */
 	.mwdma_mask	= 0x07,
 	.udma_mask	= ATA_UDMA2,	/* UDMA 33 */
@@ -734,35 +734,35 @@ static struct ata_port_info sis_info33 =
 };
 static struct ata_port_info sis_info66 = {
 	.sht		= &sis_sht,
-	.flags		= ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+	.flags		= ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST | ATA_FLAG_SETXFER_POLLING,
 	.pio_mask	= 0x1f,	/* pio0-4 */
 	.udma_mask	= ATA_UDMA4,	/* UDMA 66 */
 	.port_ops	= &sis_66_ops,
 };
 static struct ata_port_info sis_info100 = {
 	.sht		= &sis_sht,
-	.flags		= ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+	.flags		= ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST | ATA_FLAG_SETXFER_POLLING,
 	.pio_mask	= 0x1f,	/* pio0-4 */
 	.udma_mask	= ATA_UDMA5,
 	.port_ops	= &sis_100_ops,
 };
 static struct ata_port_info sis_info100_early = {
 	.sht		= &sis_sht,
-	.flags		= ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+	.flags		= ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST | ATA_FLAG_SETXFER_POLLING,
 	.udma_mask	= ATA_UDMA5,
 	.pio_mask	= 0x1f,	/* pio0-4 */
 	.port_ops	= &sis_66_ops,
 };
 static struct ata_port_info sis_info133 = {
 	.sht		= &sis_sht,
-	.flags		= ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+	.flags		= ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST | ATA_FLAG_SETXFER_POLLING,
 	.pio_mask	= 0x1f,	/* pio0-4 */
 	.udma_mask	= ATA_UDMA6,
 	.port_ops	= &sis_133_ops,
 };
 static struct ata_port_info sis_info133_early = {
 	.sht		= &sis_sht,
-	.flags		= ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+	.flags		= ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST | ATA_FLAG_SETXFER_POLLING,
 	.pio_mask	= 0x1f,	/* pio0-4 */
 	.udma_mask	= ATA_UDMA6,
 	.port_ops	= &sis_133_early_ops,
#2 lore raw
Quoted 14 lines · On Fri, 26 Jan 2007 11:50:11 +0800 Albert Lee <[email protected]> wrote:
Quoted 5 lines · John Williams

Hello,

I just tried the libata support for PATA in kernel 2.6.20-rc5 and I got this:

Quoted 7 lines

scsi1 : pata_sis
ata2.00: ATAPI, max UDMA/66
ata2.01: ATAPI, max UDMA/33
ata2.00: configured for UDMA/33 ata2.01: qc timeout (cmd 0xef)
ata2.01: failed to set xfermode (err_mask=0x4)
...

Quoted 6 lines

Tejun fixed the problem by ATA_FLAG_SETXFER_POLLING for pata_via. Maybe the same fix works for pata_sis.

Could you please try the attached patch, thanks.
--
albert

Yes, that fixed it.
Thanks,
John

#3 lore raw
In reply to Albert Lee
Quoted 4 lines

Tejun fixed the problem by ATA_FLAG_SETXFER_POLLING for pata_via. Maybe the same fix works for pata_sis.

Could you please try the attached patch, thanks.

I wonder what is really going on here. drivers/ide has some slightly different handling and notes about problems with some drives. The polling SETXFER is I fear just hiding the real issue which we've seen on the VIA, SiS and also with a weird timing fix on the sl8c205

Alan