aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r--drivers/ata/libata-core.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 77138a39eb04..915a55a6cc14 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -870,7 +870,11 @@ static unsigned int ata_id_xfermask(const u16 *id)
870 * the PIO timing number for the maximum. Turn it into 870 * the PIO timing number for the maximum. Turn it into
871 * a mask. 871 * a mask.
872 */ 872 */
873 pio_mask = (2 << (id[ATA_ID_OLD_PIO_MODES] & 0xFF)) - 1 ; 873 u8 mode = id[ATA_ID_OLD_PIO_MODES] & 0xFF;
874 if (mode < 5) /* Valid PIO range */
875 pio_mask = (2 << mode) - 1;
876 else
877 pio_mask = 1;
874 878
875 /* But wait.. there's more. Design your standards by 879 /* But wait.. there's more. Design your standards by
876 * committee and you too can get a free iordy field to 880 * committee and you too can get a free iordy field to
@@ -5953,7 +5957,7 @@ static void __exit ata_exit(void)
5953 destroy_workqueue(ata_aux_wq); 5957 destroy_workqueue(ata_aux_wq);
5954} 5958}
5955 5959
5956module_init(ata_init); 5960subsys_initcall(ata_init);
5957module_exit(ata_exit); 5961module_exit(ata_exit);
5958 5962
5959static unsigned long ratelimit_time; 5963static unsigned long ratelimit_time;
@@ -6118,7 +6122,6 @@ EXPORT_SYMBOL_GPL(ata_std_prereset);
6118EXPORT_SYMBOL_GPL(ata_std_softreset); 6122EXPORT_SYMBOL_GPL(ata_std_softreset);
6119EXPORT_SYMBOL_GPL(sata_std_hardreset); 6123EXPORT_SYMBOL_GPL(sata_std_hardreset);
6120EXPORT_SYMBOL_GPL(ata_std_postreset); 6124EXPORT_SYMBOL_GPL(ata_std_postreset);
6121EXPORT_SYMBOL_GPL(ata_dev_revalidate);
6122EXPORT_SYMBOL_GPL(ata_dev_classify); 6125EXPORT_SYMBOL_GPL(ata_dev_classify);
6123EXPORT_SYMBOL_GPL(ata_dev_pair); 6126EXPORT_SYMBOL_GPL(ata_dev_pair);
6124EXPORT_SYMBOL_GPL(ata_port_disable); 6127EXPORT_SYMBOL_GPL(ata_port_disable);