git: ahci - Improve port-multiplier detection

Matthew Dillon dillon at crater.dragonflybsd.org
Wed Dec 21 11:23:27 PST 2016


commit 46d04d11e6cf87e3615b3bf97f11d489b53b7ed1
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Wed Dec 21 11:14:17 2016 -0800

    ahci - Improve port-multiplier detection
    
    * Improve port-multiplier detaction by adding workarounds for
      poorly-implemented AHCI and PM chipsets.  Now detects the popular
      Rosewill 4-bay enclosure, which uses chipid 0x575f197b.
    
      Increase device detect timeout from 3/10 second to 2 seconds.  This
      enclosure stupidly takes extra time on the first COMRESET after a cold
      power-on to detect, I'm guessing because it is testing both its USB and
      its eSATA port.
    
      This port multiplier sometimes returns ready before its software has
      completely initialized, causing PM register READs to succeed, but
      return data values of 0.  If we get a data value of 0 for the REV register
      we sleep a little and try once more.
    
    * Marvell AHCI chip does not immediately latch the signature on the
      second FIS during a software reset.  Give it 500ms to do so.
    
      Ignore a BSY condition between the first and second FIS during a software
      reset probe of the PM.

Summary of changes:
 sys/dev/disk/ahci/ahci.c    | 45 +++++++++++++++++++++++------
 sys/dev/disk/ahci/ahci_pm.c | 69 +++++++++++++++++++++++++++++++++------------
 sys/dev/disk/ahci/pmreg.h   |  4 ++-
 3 files changed, 90 insertions(+), 28 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/46d04d11e6cf87e3615b3bf97f11d489b53b7ed1


-- 
DragonFly BSD source repository



More information about the Commits mailing list