• T
    sata_nv: use hardreset only for post-boot probing · 7f4774b3
    Tejun Heo 提交于
    When I thought it was finally defeated, it came back with vengeance.
    The failure cases are ever more convoluted.  Now there is a single
    combination which fails boot probing - MCP5x + Intel SSD and there are
    two hotplug failure reports on different flavors where softreset fails
    to bring up the device.
    
    Through the many bug reports after the switch to hardreset, the
    following patterns emerged.
    
    - Softreset during boot always works.
    
    - Hardreset during boot sometimes fails to bring up the link on
      certain comibnations and device signature acquisition is unreliable.
    
    - Hardreset is often necessary after hotplug.
    
    It looks like the old behavior of preferring softreset was somehow
    pretty close to the working reset protocol although it could have lost
    a device during phy error handling by issuing hardreset.
    
    This patch implements nv_hardreset() which kicks in only for post-boot
    (!LOADING) device probing resets.  This should be able to work around
    all known problem cases.  This isn't perfect but given the various
    hardreset quirks on these controllers, I think this is as good as it
    can get.
    
    Tested on mcp5x (swncq), nf3 and ck804 for all both boot, warm and
    hot probing cases.
    
    Kudos to all the bug reporters and their painful hours with these damn
    controllers.  ;-)
    Signed-off-by: NTejun Heo <tj@kernel.org>
    Cc: Robert Hancock <hancockr@shaw.ca>
    Reported-by: NDavid Lang <david@lang.hm>
    Reported-by: NSamo Vodopivec <lament.email.si@gmail.com>
    Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
    7f4774b3
sata_nv.c 69.2 KB