Skip to content
  • Tejun Heo's avatar
    libata: fix ata_scsi_change_queue_depth() · c3c70c44
    Tejun Heo authored
    
    
    Fix ata_scsi_change_queue_depth() such that...
    
    * NCQ on/off is exactly determined using the same logic as the issue path.
    
    * queue depth is adjusted to 1 if NCQ is not enabled.
    
    * -EINVAL is returned if requested action is ignored due to limitations.
    
    This fixes the bug which allows queue depth to be increased on
    blacklisted NCQ hosts/devices.
    
    Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
    Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
    c3c70c44