]> git.baikalelectronics.ru Git - kernel.git/commit
libata: fix ata_scsi_change_queue_depth()
authorTejun Heo <htejun@gmail.com>
Tue, 20 Feb 2007 14:31:22 +0000 (23:31 +0900)
committerJeff Garzik <jeff@garzik.org>
Wed, 21 Feb 2007 09:58:19 +0000 (04:58 -0500)
commit86e7496349f2cc93cfcc340a6f8411d95983209e
treecfb23ec2831ad4f10c87f6362573db9eb6a33cbd
parentae2751c32f0ad0880254cb5e8ffc1da5e92dcdd0
libata: fix ata_scsi_change_queue_depth()

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: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-scsi.c