You are not logged in.

#1 2010-11-04 17:57:40

punkeroso
Member
From: Rome, Italy
Registered: 2007-01-19
Posts: 104

ata2.00: failed to set xfermode (err_mask=0x4) since 2.6.36

Hi,
I'm getting the above message while booting since updating the kernel to the 2.6.36.
dmesg sais:

ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata2.00: ATAPI: PIONEER DVD-RW  DVR-212D, 1.28, max UDMA/66
ata2.00: qc timeout (cmd 0xef)
ata2.00: failed to set xfermode (err_mask=0x4)
ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata2.00: qc timeout (cmd 0xef)
ata2.00: failed to set xfermode (err_mask=0x4)
ata2: limiting SATA link speed to 1.5 Gbps
ata2.00: limiting speed to UDMA/66:PIO3
ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
ata2.00: qc timeout (cmd 0xef)
ata2.00: failed to set xfermode (err_mask=0x4)
ata2.00: disabled
ata2: hard resetting link
ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
ata2: EH complete

Obviously, the DVD burner is not working.
Can anyone help me?

Regards

Offline

#2 2010-11-04 19:22:45

whaevr
Member
Registered: 2008-03-17
Posts: 182

Re: ata2.00: failed to set xfermode (err_mask=0x4) since 2.6.36

You seem to have the same exact problem as reported here

This problem was fixed with this patch:

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 045a486..2c6aeda 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3392,17 +3392,27 @@ int ata_down_xfermask_limit(struct ata_device *dev, unsigned int sel)

 static int ata_dev_set_mode(struct ata_device *dev)
 {
+    struct ata_port *ap = dev->link->ap;
     struct ata_eh_context *ehc = &dev->link->eh_context;
+    const bool nosetxfer = dev->horkage & ATA_HORKAGE_NOSETXFER;
     const char *dev_err_whine = "";
     int ign_dev_err = 0;
-    unsigned int err_mask;
+    unsigned int err_mask = 0;
     int rc;

     dev->flags &= ~ATA_DFLAG_PIO;
     if (dev->xfer_shift == ATA_SHIFT_PIO)
         dev->flags |= ATA_DFLAG_PIO;

-    err_mask = ata_dev_set_xfermode(dev);
+    if (nosetxfer && ap->flags & ATA_FLAG_SATA && ata_id_is_sata(dev->id))
+        dev_err_whine = " (SET_XFERMODE skipped)";
+    else {
+        if (nosetxfer)
+            ata_dev_printk(dev, KERN_WARNING,
+                       "NOSETXFER but PATA detected - can't "
+                       "skip SETXFER, might malfunction\n");
+        err_mask = ata_dev_set_xfermode(dev);
+    }

     if (err_mask & ~AC_ERR_DEV)
         goto fail;
@@ -4297,6 +4307,12 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
     /* Devices which aren't very happy with higher link speeds */
     { "WD My Book",            NULL,    ATA_HORKAGE_1_5_GBPS, },

+    /*
+     * Devices which choke on SETXFER.  Applies only if both the
+     * device and controller are SATA.
+     */
+    { "PIONEER DVD-RW  DVRTD08",    "1.00",    ATA_HORKAGE_NOSETXFER },
+
     /* End Marker */
     { }
 };
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 3d501db..2b641af 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -385,6 +385,7 @@ enum {
                             not multiple of 16 bytes */
     ATA_HORKAGE_FIRMWARE_WARN = (1 << 12),    /* firmware update warning */
     ATA_HORKAGE_1_5_GBPS    = (1 << 13),    /* force 1.5 Gbps */
+    ATA_HORKAGE_NOSETXFER    = (1 << 14),

      /* DMA mask for user DMA control: User visible values; DO NOT
         renumber */

This patch is already applied to the 2.6.36 kernel though.

/*
+     * Devices which choke on SETXFER.  Applies only if both the
+     * device and controller are SATA.
+     */
+    { "PIONEER DVD-RW  DVRTD08",    "1.00",    ATA_HORKAGE_NOSETXFER },
+

Judging by that part of the patch (look at that its a Pioneer drive also like yours tongue) the fix is only applied to that certain drive sooo adding your drive to the list there should allow it to use "ATA_HORKAGE_NOSETXFER" as well; which fixed the other persons problem.

SO what I'm saying is I made up a patch to add your drive to the above list. You can try it out if you want.

My patch is pretty simple and makes sense to me..

--- linux-2.6.36/drivers/ata/libata-core.c    2010-10-20 16:30:22.000000000 -0400
+++ linux-2.6.36/drivers/ata/libata-core.c.modified    2010-11-04 15:08:35.845000045 -0400
@@ -4258,6 +4258,8 @@
      * device and controller are SATA.
      */
     { "PIONEER DVD-RW  DVRTD08",    "1.00",    ATA_HORKAGE_NOSETXFER },
+    { "PIONEER DVD-RW  DVR-212D",    "1.28",    ATA_HORKAGE_NOSETXFER },
+    
 
     /* End Marker */
     { }

PKGBUILD and patch file uploaded here if you wanna try it out

Offline

#3 2010-11-04 22:02:32

punkeroso
Member
From: Rome, Italy
Registered: 2007-01-19
Posts: 104

Re: ata2.00: failed to set xfermode (err_mask=0x4) since 2.6.36

Thanks a lot whaevr!!
It works flawlessy!
What we have to do to send the patch upstream?
Thanks again

Regards

Offline

#4 2010-11-04 22:18:14

whaevr
Member
Registered: 2008-03-17
Posts: 182

Re: ata2.00: failed to set xfermode (err_mask=0x4) since 2.6.36

Np big_smile glad it worked.

and thats a good question...I've never submitted a patch upstream before. Especially not to the kernel...arch devs help me out here? lol

Offline

#5 2010-11-04 22:44:15

mangus
Member
From: Bologna, Italy
Registered: 2007-04-07
Posts: 289

Re: ata2.00: failed to set xfermode (err_mask=0x4) since 2.6.36

I don't think tpowa the kernel mantainer is lurking here , you can try to open a bug report on flyspray with the patch. Surely he knows
how to handle it upstream if it's necessary...

Offline

#6 2010-11-05 01:15:35

whaevr
Member
Registered: 2008-03-17
Posts: 182

Re: ata2.00: failed to set xfermode (err_mask=0x4) since 2.6.36

Alright well I didnt know..thanks for the info

Opened a bug on flyspray

Last edited by whaevr (2010-11-05 01:15:56)

Offline

#7 2011-05-15 16:19:48

johanbcn
Member
Registered: 2010-01-03
Posts: 20

Re: ata2.00: failed to set xfermode (err_mask=0x4) since 2.6.36

Six months later and the patch still didn't make it upstream. I'm having the same problem with another Pioneer unit (surprise) and commented about it on the flyspray bug opened by whaevr, but got no response so far...

Last edited by johanbcn (2011-05-15 16:35:33)

Offline

Board footer

Powered by FluxBB