summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorShan Hai <shan.hai@windriver.com>2013-03-18 10:30:43 +0800
committerBen Hutchings <ben@decadent.org.uk>2013-04-25 20:25:31 +0100
commit274c4edc025428ca6a856c201f331abde3794192 (patch)
treebf18aca137d07483b559e8ac4d23ea2e21346df2 /include
parent61d50e126c00f8fd72d803578108236cc81d0dfa (diff)
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: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ata.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 32df2b6ef0e0..5856c9e02192 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -937,7 +937,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;
}