Skip to content

Commit

Permalink
libata: Use integer return value for atapi_command_packet_set
Browse files Browse the repository at this point in the history
The function returns type of ATAPI drives so it should return integer value.
The commit 4dce8ba (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
f8d8e57(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>
  • Loading branch information
Shan Hai authored and Jeff Garzik committed Apr 3, 2013
1 parent da241ef commit d8668fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/ata.h
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ static inline int atapi_cdb_len(const u16 *dev_id)
}
}

static inline bool atapi_command_packet_set(const u16 *dev_id)
static inline int atapi_command_packet_set(const u16 *dev_id)
{
return (dev_id[ATA_ID_CONFIG] >> 8) & 0x1f;
}
Expand Down

0 comments on commit d8668fc

Please sign in to comment.