]> git.karo-electronics.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Apr 2013 16:52:05 +0000 (09:52 -0700)
commitc2d2cd83e221156d11cd5f8945630e8509a852a6
treed48592a4be28a65c85cade329f149d058d6ecaaf
parent570d75c0babf5ded1aa40cc751f0a1f8d400e109
libata: Use integer return value for atapi_command_packet_set

commit d8668fcb0b257d9fdcfbe5c172a99b8d85e1cd82 upstream.

The function returns type of ATAPI drives so it should return integer value.
The commit 4dce8ba94c7 (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
f8d8e5799b7(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.

Signed-off-by: Shan Hai <shan.hai@windriver.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/ata.h