Re: [PATCH] ahci.c: fix ati sb600 sata IRQ_TF_ERR

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Conke Hu
Date: Thursday, March 15, 2007 - 5:00 am

On 3/14/07, Tejun Heo <htejun@gmail.com> wrote:

When media is not ready, command TEST_UNIT_READY fails with ahci irq
status == 0x40000001(IRQ_TF_ERROR) and serror == SERR_INTERNEL, then
ahci error handler calls atapi_eh_request_sense() and sets
ATA_QCFLAG_SENSE_VALID. Command REQUEST_SENSE executes successfully
and atapi_qc_complete() sets result = SAM_STAT_CHECK_CONDITION, and
now the whole TEST_UNIT_READY request is done and returns .



Yes, I saw this too :) and I am contacting the hardware engineers to
check if there is any hardware bug.
But, even though this were a hardware bug and could be fixed, we would
still need this patch since many SB600 boards have already come into
the market and those ASICs can never be fixed :(
So, if no errors in this patch, could Jeff please apply it ASAP?



I never see such an ID, and plan to remove 0x4381.
The patch which added the PCI IDs was not sent out by myself. I
checked all SB600 boards, and not found any 0x4381 controller, only
0x4380 instead. In fact, SB600 RAID and Non-RAID share the same PCI
device ID, only with class code different.



I just read your patch. Another difference is that my patch ignores
SERR_INTERNAL only when the command is ATAPI and IRQ_TF_ERR occurs. In
other cases, I think, we'd better not ignore the SERR_INTERNEL. Right?
The following is some detail:
// your patch:
+	if (ap->flags & AHCI_FLAG_IGN_SERR_INTERNAL)
+		serr &= ~SERR_INTERNAL;

// mine:
-       if (irq_stat & PORT_IRQ_TF_ERR)
+       if (irq_stat & PORT_IRQ_TF_ERR) {
               err_mask |= AC_ERR_DEV;
+
+               /* some controllers set INTERNAL ERROR on ATAPI
IRQ_TF_ERROR, ignore it */
+               if ((serror & SERR_INTERNAL) &&
+                    (ap->flags & AHCI_FLAG_TF_ERR_FIX) &&
+                     qc && qc->dev->class == ATA_DEV_ATAPI) {
+                       serror &= ~SERR_INTERNAL;
+               }
+       }

Tejun, you do me a great favor, thank you so much! for your previous
help, too :)

Conke
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] ahci.c: fix ati sb600 sata IRQ_TF_ERR, Conke Hu, (Wed Mar 14, 2:22 am)
Re: [PATCH] ahci.c: fix ati sb600 sata IRQ_TF_ERR, Tejun Heo, (Wed Mar 14, 5:17 am)
Re: [PATCH] ahci.c: fix ati sb600 sata IRQ_TF_ERR, Conke Hu, (Thu Mar 15, 5:00 am)
Re: [PATCH] ahci.c: fix ati sb600 sata IRQ_TF_ERR, Tejun Heo, (Thu Mar 15, 5:14 am)
Re: [PATCH] ahci.c: fix ati sb600 sata IRQ_TF_ERR, Conke Hu, (Tue Mar 27, 2:53 am)
Re: [PATCH] ahci.c: fix ati sb600 sata IRQ_TF_ERR, Andreas John, (Wed Aug 22, 2:02 pm)
Re: [PATCH] ahci.c: fix ati sb600 sata IRQ_TF_ERR, Andreas John, (Wed Aug 22, 3:01 pm)
Re: [PATCH] ahci.c: fix ati sb600 sata IRQ_TF_ERR, Tejun Heo, (Wed Aug 22, 5:44 pm)
Re: [PATCH] ahci.c: fix ati sb600 sata IRQ_TF_ERR, Andreas John, (Thu Aug 23, 4:02 am)
Re: [PATCH] ahci.c: fix ati sb600 sata IRQ_TF_ERR, Tejun Heo, (Fri Aug 24, 7:24 pm)
Re: [PATCH] ahci.c: fix ati sb600 sata IRQ_TF_ERR, Andreas John, (Sun Aug 26, 3:11 am)
Re: [PATCH] ahci.c: fix ati sb600 sata IRQ_TF_ERR, Tejun Heo, (Sun Aug 26, 6:31 pm)