• Damien Le Moal's avatar
    libata: Fix ATA request sense · 4b70d598
    Damien Le Moal authored
    commit 2dae9955 upstream.
    
    For an ATA device supporting the sense data reporting feature set, a
    failed command will trigger the execution of ata_eh_request_sense if
    the result task file of the failed command has the ATA_SENSE bit set
    (sense data available bit). ata_eh_request_sense executes the REQUEST
    SENSE DATA EXT command to retrieve the sense data of the failed
    command. On success of REQUEST SENSE DATA EXT, the ATA_SENSE bit will
    NOT be set (the command succeeded) but ata_eh_request_sense
    nevertheless tests the availability of sense data by testing that bit
    presence in the result tf of the REQUEST SENSE DATA EXT command.  This
    leads us to falsely assume that request sense data failed and to the
    warning message:
    
    atax.xx: request sense failed stat 50 emask 0
    
    Upon success of REQUEST SENSE DATA EXT, set the ATA_SENSE bit in the
    result task file command so that sense data can be returned by
    ata_eh_request_sense.
    Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    4b70d598
libata-core.c 185 KB