]> git.baikalelectronics.ru Git - kernel.git/commit
libata: Use integer return value for atapi_command_packet_set
authorShan Hai <shan.hai@windriver.com>
Mon, 18 Mar 2013 02:30:43 +0000 (10:30 +0800)
committerJeff Garzik <jgarzik@redhat.com>
Wed, 3 Apr 2013 23:33:40 +0000 (19:33 -0400)
commitb280c1f89c678fe676ca4ac04e7f56c8e41c015e
tree855e29baf8416d41edca4cad42e85e96d574072c
parent8000e3bdb2bb62c243d3e0457e6ad56cc89af3bf
libata: Use integer return value for atapi_command_packet_set

The function returns type of ATAPI drives so it should return integer value.
The commit 8a3a229f4d2 (libata: Use 'bool' return value for ata_id_XXX) since
v2.6.39 changed the type of return value from int to bool, the change would
cause all of the ATAPI class drives to be treated as TYPE_TAPE and the
max_sectors of the drives to be set to 65535 because of the commit
29d8a4e203e(libata: increase 128 KB / cmd limit for ATAPI tape drives), for the
function would return true for all ATAPI class drives and the TYPE_TAPE is
defined as 0x01.

Cc: stable@vger.kernel.org
Signed-off-by: Shan Hai <shan.hai@windriver.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
include/linux/ata.h