AHCI FBS - Software Reset - BUG

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I believe I've run into what appears to be a bug in the Linux kernel AHCI driver, related to operation with port multipliers when FBS enabled.  It has to do with the issuing of Software Resets (SRST) to a PM control port or device ports.  The issue has been observed in 3.1.2 and in 3.2.

-	As per AHCI spec 1.3 section 9.3.9, PxFBS.EN is to be cleared to 0 when sending SRST as part of PM device enumeration.  libahci.c ahci_do_softreset() does not seem to comply with this.  DISABLING FBS DURING SRST IS THE RIGHT FIX FOR THIS PROBLEM, IN MY OPINION.

-	As per AHCI spec 1.3 section 9.3.8, The R-bit in the Command Header is not to be set when PxFBS.EN=1.  The R-bit is in fact set for the first SRST FIS.  libahci.c does not seem to comply with this.  

-	libahci.c does not set PxFBS.DEV with the pmp in ahci_do_softreset()-call to ahci_exec_polled_cmd() does not set PxFBS.DEV.  (This would not matter if the driver cleared PxFBS.EN for SRST.)

-	The problem symptom is that with some controllers the PxTFD and PxCI registers are not updated when the D2H Reg FIS is received for the SRST.  As per AHCI spec 1.3 section 5.3.5.3 (state NDR:Accept) if pBsy[pPmpCur]=0 and pDrq[pPmpCur]=0 the state transition is to P:Idle and PxTFD/PxCI are not updated.  pPmpCur is the pmp in the D2H.  pBsy[] and pDrq[] are controller states set based on PxFBS.DEV at time of command issue.  The Linux AHCI driver goes into EH a number of times before failing and detaching the PM because of this.  

Cheers,
-mat
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux