diff options
-rw-r--r-- | drivers/ata/pata_legacy.c | 11 | ||||
-rw-r--r-- | drivers/ata/pata_qdi.c | 4 | ||||
-rw-r--r-- | include/linux/libata.h | 1 |
3 files changed, 13 insertions, 3 deletions
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c index 4223e10de6a0..98c1fee4b305 100644 --- a/drivers/ata/pata_legacy.c +++ b/drivers/ata/pata_legacy.c | |||
@@ -89,9 +89,10 @@ static int probe_all; /* Set to check all ISA port ranges */ | |||
89 | static int ht6560a; /* HT 6560A on primary 1, secondary 2, both 3 */ | 89 | static int ht6560a; /* HT 6560A on primary 1, secondary 2, both 3 */ |
90 | static int ht6560b; /* HT 6560A on primary 1, secondary 2, both 3 */ | 90 | static int ht6560b; /* HT 6560A on primary 1, secondary 2, both 3 */ |
91 | static int opti82c611a; /* Opti82c611A on primary 1, secondary 2, both 3 */ | 91 | static int opti82c611a; /* Opti82c611A on primary 1, secondary 2, both 3 */ |
92 | static int opti82c46x; /* Opti 82c465MV present (pri/sec autodetect) */ | 92 | static int opti82c46x; /* Opti 82c465MV present (pri/sec autodetect) */ |
93 | static int autospeed; /* Chip present which snoops speed changes */ | 93 | static int autospeed; /* Chip present which snoops speed changes */ |
94 | static int pio_mask = 0x1F; /* PIO range for autospeed devices */ | 94 | static int pio_mask = 0x1F; /* PIO range for autospeed devices */ |
95 | static int iordy_mask = 0xFFFFFFFF; /* Use iordy if available */ | ||
95 | 96 | ||
96 | /** | 97 | /** |
97 | * legacy_set_mode - mode setting | 98 | * legacy_set_mode - mode setting |
@@ -113,6 +114,7 @@ static int legacy_set_mode(struct ata_port *ap, struct ata_device **unused) | |||
113 | for (i = 0; i < ATA_MAX_DEVICES; i++) { | 114 | for (i = 0; i < ATA_MAX_DEVICES; i++) { |
114 | struct ata_device *dev = &ap->device[i]; | 115 | struct ata_device *dev = &ap->device[i]; |
115 | if (ata_dev_enabled(dev)) { | 116 | if (ata_dev_enabled(dev)) { |
117 | ata_dev_printk(dev, KERN_INFO, "configured for PIO\n"); | ||
116 | dev->pio_mode = XFER_PIO_0; | 118 | dev->pio_mode = XFER_PIO_0; |
117 | dev->xfer_mode = XFER_PIO_0; | 119 | dev->xfer_mode = XFER_PIO_0; |
118 | dev->xfer_shift = ATA_SHIFT_PIO; | 120 | dev->xfer_shift = ATA_SHIFT_PIO; |
@@ -695,6 +697,7 @@ static __init int legacy_init_one(int port, unsigned long io, unsigned long ctrl | |||
695 | void __iomem *io_addr, *ctrl_addr; | 697 | void __iomem *io_addr, *ctrl_addr; |
696 | int pio_modes = pio_mask; | 698 | int pio_modes = pio_mask; |
697 | u32 mask = (1 << port); | 699 | u32 mask = (1 << port); |
700 | u32 iordy = (iordy_mask & mask) ? 0: ATA_FLAG_NO_IORDY; | ||
698 | int ret; | 701 | int ret; |
699 | 702 | ||
700 | pdev = platform_device_register_simple(DRV_NAME, nr_legacy_host, NULL, 0); | 703 | pdev = platform_device_register_simple(DRV_NAME, nr_legacy_host, NULL, 0); |
@@ -715,6 +718,7 @@ static __init int legacy_init_one(int port, unsigned long io, unsigned long ctrl | |||
715 | if (ht6560a & mask) { | 718 | if (ht6560a & mask) { |
716 | ops = &ht6560a_port_ops; | 719 | ops = &ht6560a_port_ops; |
717 | pio_modes = 0x07; | 720 | pio_modes = 0x07; |
721 | iordy = ATA_FLAG_NO_IORDY; | ||
718 | } | 722 | } |
719 | if (ht6560b & mask) { | 723 | if (ht6560b & mask) { |
720 | ops = &ht6560b_port_ops; | 724 | ops = &ht6560b_port_ops; |
@@ -750,6 +754,7 @@ static __init int legacy_init_one(int port, unsigned long io, unsigned long ctrl | |||
750 | printk(KERN_INFO "PDC20230-C/20630 VLB ATA controller detected.\n"); | 754 | printk(KERN_INFO "PDC20230-C/20630 VLB ATA controller detected.\n"); |
751 | pio_modes = 0x07; | 755 | pio_modes = 0x07; |
752 | ops = &pdc20230_port_ops; | 756 | ops = &pdc20230_port_ops; |
757 | iordy = ATA_FLAG_NO_IORDY; | ||
753 | udelay(100); | 758 | udelay(100); |
754 | inb(0x1F5); | 759 | inb(0x1F5); |
755 | } else { | 760 | } else { |
@@ -767,6 +772,7 @@ static __init int legacy_init_one(int port, unsigned long io, unsigned long ctrl | |||
767 | /* Chip does mode setting by command snooping */ | 772 | /* Chip does mode setting by command snooping */ |
768 | if (ops == &legacy_port_ops && (autospeed & mask)) | 773 | if (ops == &legacy_port_ops && (autospeed & mask)) |
769 | ops = &simple_port_ops; | 774 | ops = &simple_port_ops; |
775 | |||
770 | memset(&ae, 0, sizeof(struct ata_probe_ent)); | 776 | memset(&ae, 0, sizeof(struct ata_probe_ent)); |
771 | INIT_LIST_HEAD(&ae.node); | 777 | INIT_LIST_HEAD(&ae.node); |
772 | ae.dev = &pdev->dev; | 778 | ae.dev = &pdev->dev; |
@@ -776,7 +782,7 @@ static __init int legacy_init_one(int port, unsigned long io, unsigned long ctrl | |||
776 | ae.pio_mask = pio_modes; | 782 | ae.pio_mask = pio_modes; |
777 | ae.irq = irq; | 783 | ae.irq = irq; |
778 | ae.irq_flags = 0; | 784 | ae.irq_flags = 0; |
779 | ae.port_flags = ATA_FLAG_SLAVE_POSS|ATA_FLAG_SRST; | 785 | ae.port_flags = ATA_FLAG_SLAVE_POSS|ATA_FLAG_SRST|iordy; |
780 | ae.port[0].cmd_addr = io_addr; | 786 | ae.port[0].cmd_addr = io_addr; |
781 | ae.port[0].altstatus_addr = ctrl_addr; | 787 | ae.port[0].altstatus_addr = ctrl_addr; |
782 | ae.port[0].ctl_addr = ctrl_addr; | 788 | ae.port[0].ctl_addr = ctrl_addr; |
@@ -945,6 +951,7 @@ module_param(ht6560b, int, 0); | |||
945 | module_param(opti82c611a, int, 0); | 951 | module_param(opti82c611a, int, 0); |
946 | module_param(opti82c46x, int, 0); | 952 | module_param(opti82c46x, int, 0); |
947 | module_param(pio_mask, int, 0); | 953 | module_param(pio_mask, int, 0); |
954 | module_param(iordy_mask, int, 0); | ||
948 | 955 | ||
949 | module_init(legacy_init); | 956 | module_init(legacy_init); |
950 | module_exit(legacy_exit); | 957 | module_exit(legacy_exit); |
diff --git a/drivers/ata/pata_qdi.c b/drivers/ata/pata_qdi.c index 1b3b4ed8eb19..4362141976ad 100644 --- a/drivers/ata/pata_qdi.c +++ b/drivers/ata/pata_qdi.c | |||
@@ -264,16 +264,18 @@ static __init int qdi_init_one(unsigned long port, int type, unsigned long io, i | |||
264 | if (type == 6580) { | 264 | if (type == 6580) { |
265 | ae.port_ops = &qdi6580_port_ops; | 265 | ae.port_ops = &qdi6580_port_ops; |
266 | ae.pio_mask = 0x1F; | 266 | ae.pio_mask = 0x1F; |
267 | ae.port_flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST; | ||
267 | } else { | 268 | } else { |
268 | ae.port_ops = &qdi6500_port_ops; | 269 | ae.port_ops = &qdi6500_port_ops; |
269 | ae.pio_mask = 0x07; /* Actually PIO3 !IORDY is possible */ | 270 | ae.pio_mask = 0x07; /* Actually PIO3 !IORDY is possible */ |
271 | ae.port_flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST | | ||
272 | ATA_FLAG_NO_IORDY; | ||
270 | } | 273 | } |
271 | 274 | ||
272 | ae.sht = &qdi_sht; | 275 | ae.sht = &qdi_sht; |
273 | ae.n_ports = 1; | 276 | ae.n_ports = 1; |
274 | ae.irq = irq; | 277 | ae.irq = irq; |
275 | ae.irq_flags = 0; | 278 | ae.irq_flags = 0; |
276 | ae.port_flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST; | ||
277 | ae.port[0].cmd_addr = io_addr; | 279 | ae.port[0].cmd_addr = io_addr; |
278 | ae.port[0].altstatus_addr = ctl_addr; | 280 | ae.port[0].altstatus_addr = ctl_addr; |
279 | ae.port[0].ctl_addr = ctl_addr; | 281 | ae.port[0].ctl_addr = ctl_addr; |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 596e0c18887d..b870b20df43c 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -172,6 +172,7 @@ enum { | |||
172 | ATA_FLAG_DEBUGMSG = (1 << 13), | 172 | ATA_FLAG_DEBUGMSG = (1 << 13), |
173 | ATA_FLAG_SETXFER_POLLING= (1 << 14), /* use polling for SETXFER */ | 173 | ATA_FLAG_SETXFER_POLLING= (1 << 14), /* use polling for SETXFER */ |
174 | ATA_FLAG_IGN_SIMPLEX = (1 << 15), /* ignore SIMPLEX */ | 174 | ATA_FLAG_IGN_SIMPLEX = (1 << 15), /* ignore SIMPLEX */ |
175 | ATA_FLAG_NO_IORDY = (1 << 16), /* controller lacks iordy */ | ||
175 | 176 | ||
176 | /* The following flag belongs to ap->pflags but is kept in | 177 | /* The following flag belongs to ap->pflags but is kept in |
177 | * ap->flags because it's referenced in many LLDs and will be | 178 | * ap->flags because it's referenced in many LLDs and will be |