diff options
Diffstat (limited to 'drivers/ata/pata_legacy.c')
-rw-r--r-- | drivers/ata/pata_legacy.c | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c index edffc25d2d3f..7bed8d806381 100644 --- a/drivers/ata/pata_legacy.c +++ b/drivers/ata/pata_legacy.c | |||
@@ -96,7 +96,7 @@ static int iordy_mask = 0xFFFFFFFF; /* Use iordy if available */ | |||
96 | 96 | ||
97 | /** | 97 | /** |
98 | * legacy_set_mode - mode setting | 98 | * legacy_set_mode - mode setting |
99 | * @ap: IDE interface | 99 | * @link: IDE link |
100 | * @unused: Device that failed when error is returned | 100 | * @unused: Device that failed when error is returned |
101 | * | 101 | * |
102 | * Use a non standard set_mode function. We don't want to be tuned. | 102 | * Use a non standard set_mode function. We don't want to be tuned. |
@@ -107,12 +107,11 @@ static int iordy_mask = 0xFFFFFFFF; /* Use iordy if available */ | |||
107 | * expand on this as per hdparm in the base kernel. | 107 | * expand on this as per hdparm in the base kernel. |
108 | */ | 108 | */ |
109 | 109 | ||
110 | static int legacy_set_mode(struct ata_port *ap, struct ata_device **unused) | 110 | static int legacy_set_mode(struct ata_link *link, struct ata_device **unused) |
111 | { | 111 | { |
112 | int i; | 112 | struct ata_device *dev; |
113 | 113 | ||
114 | for (i = 0; i < ATA_MAX_DEVICES; i++) { | 114 | ata_link_for_each_dev(dev, link) { |
115 | struct ata_device *dev = &ap->device[i]; | ||
116 | if (ata_dev_enabled(dev)) { | 115 | if (ata_dev_enabled(dev)) { |
117 | ata_dev_printk(dev, KERN_INFO, "configured for PIO\n"); | 116 | ata_dev_printk(dev, KERN_INFO, "configured for PIO\n"); |
118 | dev->pio_mode = XFER_PIO_0; | 117 | dev->pio_mode = XFER_PIO_0; |
@@ -151,7 +150,6 @@ static struct scsi_host_template legacy_sht = { | |||
151 | */ | 150 | */ |
152 | 151 | ||
153 | static struct ata_port_operations simple_port_ops = { | 152 | static struct ata_port_operations simple_port_ops = { |
154 | .port_disable = ata_port_disable, | ||
155 | .tf_load = ata_tf_load, | 153 | .tf_load = ata_tf_load, |
156 | .tf_read = ata_tf_read, | 154 | .tf_read = ata_tf_read, |
157 | .check_status = ata_check_status, | 155 | .check_status = ata_check_status, |
@@ -172,7 +170,6 @@ static struct ata_port_operations simple_port_ops = { | |||
172 | .irq_handler = ata_interrupt, | 170 | .irq_handler = ata_interrupt, |
173 | .irq_clear = ata_bmdma_irq_clear, | 171 | .irq_clear = ata_bmdma_irq_clear, |
174 | .irq_on = ata_irq_on, | 172 | .irq_on = ata_irq_on, |
175 | .irq_ack = ata_irq_ack, | ||
176 | 173 | ||
177 | .port_start = ata_port_start, | 174 | .port_start = ata_port_start, |
178 | }; | 175 | }; |
@@ -180,7 +177,6 @@ static struct ata_port_operations simple_port_ops = { | |||
180 | static struct ata_port_operations legacy_port_ops = { | 177 | static struct ata_port_operations legacy_port_ops = { |
181 | .set_mode = legacy_set_mode, | 178 | .set_mode = legacy_set_mode, |
182 | 179 | ||
183 | .port_disable = ata_port_disable, | ||
184 | .tf_load = ata_tf_load, | 180 | .tf_load = ata_tf_load, |
185 | .tf_read = ata_tf_read, | 181 | .tf_read = ata_tf_read, |
186 | .check_status = ata_check_status, | 182 | .check_status = ata_check_status, |
@@ -201,7 +197,6 @@ static struct ata_port_operations legacy_port_ops = { | |||
201 | .irq_handler = ata_interrupt, | 197 | .irq_handler = ata_interrupt, |
202 | .irq_clear = ata_bmdma_irq_clear, | 198 | .irq_clear = ata_bmdma_irq_clear, |
203 | .irq_on = ata_irq_on, | 199 | .irq_on = ata_irq_on, |
204 | .irq_ack = ata_irq_ack, | ||
205 | 200 | ||
206 | .port_start = ata_port_start, | 201 | .port_start = ata_port_start, |
207 | }; | 202 | }; |
@@ -256,7 +251,7 @@ static void pdc20230_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
256 | 251 | ||
257 | static void pdc_data_xfer_vlb(struct ata_device *adev, unsigned char *buf, unsigned int buflen, int write_data) | 252 | static void pdc_data_xfer_vlb(struct ata_device *adev, unsigned char *buf, unsigned int buflen, int write_data) |
258 | { | 253 | { |
259 | struct ata_port *ap = adev->ap; | 254 | struct ata_port *ap = adev->link->ap; |
260 | int slop = buflen & 3; | 255 | int slop = buflen & 3; |
261 | unsigned long flags; | 256 | unsigned long flags; |
262 | 257 | ||
@@ -296,7 +291,6 @@ static void pdc_data_xfer_vlb(struct ata_device *adev, unsigned char *buf, unsig | |||
296 | static struct ata_port_operations pdc20230_port_ops = { | 291 | static struct ata_port_operations pdc20230_port_ops = { |
297 | .set_piomode = pdc20230_set_piomode, | 292 | .set_piomode = pdc20230_set_piomode, |
298 | 293 | ||
299 | .port_disable = ata_port_disable, | ||
300 | .tf_load = ata_tf_load, | 294 | .tf_load = ata_tf_load, |
301 | .tf_read = ata_tf_read, | 295 | .tf_read = ata_tf_read, |
302 | .check_status = ata_check_status, | 296 | .check_status = ata_check_status, |
@@ -317,7 +311,6 @@ static struct ata_port_operations pdc20230_port_ops = { | |||
317 | .irq_handler = ata_interrupt, | 311 | .irq_handler = ata_interrupt, |
318 | .irq_clear = ata_bmdma_irq_clear, | 312 | .irq_clear = ata_bmdma_irq_clear, |
319 | .irq_on = ata_irq_on, | 313 | .irq_on = ata_irq_on, |
320 | .irq_ack = ata_irq_ack, | ||
321 | 314 | ||
322 | .port_start = ata_port_start, | 315 | .port_start = ata_port_start, |
323 | }; | 316 | }; |
@@ -352,7 +345,6 @@ static void ht6560a_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
352 | static struct ata_port_operations ht6560a_port_ops = { | 345 | static struct ata_port_operations ht6560a_port_ops = { |
353 | .set_piomode = ht6560a_set_piomode, | 346 | .set_piomode = ht6560a_set_piomode, |
354 | 347 | ||
355 | .port_disable = ata_port_disable, | ||
356 | .tf_load = ata_tf_load, | 348 | .tf_load = ata_tf_load, |
357 | .tf_read = ata_tf_read, | 349 | .tf_read = ata_tf_read, |
358 | .check_status = ata_check_status, | 350 | .check_status = ata_check_status, |
@@ -373,7 +365,6 @@ static struct ata_port_operations ht6560a_port_ops = { | |||
373 | .irq_handler = ata_interrupt, | 365 | .irq_handler = ata_interrupt, |
374 | .irq_clear = ata_bmdma_irq_clear, | 366 | .irq_clear = ata_bmdma_irq_clear, |
375 | .irq_on = ata_irq_on, | 367 | .irq_on = ata_irq_on, |
376 | .irq_ack = ata_irq_ack, | ||
377 | 368 | ||
378 | .port_start = ata_port_start, | 369 | .port_start = ata_port_start, |
379 | }; | 370 | }; |
@@ -419,7 +410,6 @@ static void ht6560b_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
419 | static struct ata_port_operations ht6560b_port_ops = { | 410 | static struct ata_port_operations ht6560b_port_ops = { |
420 | .set_piomode = ht6560b_set_piomode, | 411 | .set_piomode = ht6560b_set_piomode, |
421 | 412 | ||
422 | .port_disable = ata_port_disable, | ||
423 | .tf_load = ata_tf_load, | 413 | .tf_load = ata_tf_load, |
424 | .tf_read = ata_tf_read, | 414 | .tf_read = ata_tf_read, |
425 | .check_status = ata_check_status, | 415 | .check_status = ata_check_status, |
@@ -440,7 +430,6 @@ static struct ata_port_operations ht6560b_port_ops = { | |||
440 | .irq_handler = ata_interrupt, | 430 | .irq_handler = ata_interrupt, |
441 | .irq_clear = ata_bmdma_irq_clear, | 431 | .irq_clear = ata_bmdma_irq_clear, |
442 | .irq_on = ata_irq_on, | 432 | .irq_on = ata_irq_on, |
443 | .irq_ack = ata_irq_ack, | ||
444 | 433 | ||
445 | .port_start = ata_port_start, | 434 | .port_start = ata_port_start, |
446 | }; | 435 | }; |
@@ -541,7 +530,6 @@ static void opti82c611a_set_piomode(struct ata_port *ap, struct ata_device *adev | |||
541 | static struct ata_port_operations opti82c611a_port_ops = { | 530 | static struct ata_port_operations opti82c611a_port_ops = { |
542 | .set_piomode = opti82c611a_set_piomode, | 531 | .set_piomode = opti82c611a_set_piomode, |
543 | 532 | ||
544 | .port_disable = ata_port_disable, | ||
545 | .tf_load = ata_tf_load, | 533 | .tf_load = ata_tf_load, |
546 | .tf_read = ata_tf_read, | 534 | .tf_read = ata_tf_read, |
547 | .check_status = ata_check_status, | 535 | .check_status = ata_check_status, |
@@ -562,7 +550,6 @@ static struct ata_port_operations opti82c611a_port_ops = { | |||
562 | .irq_handler = ata_interrupt, | 550 | .irq_handler = ata_interrupt, |
563 | .irq_clear = ata_bmdma_irq_clear, | 551 | .irq_clear = ata_bmdma_irq_clear, |
564 | .irq_on = ata_irq_on, | 552 | .irq_on = ata_irq_on, |
565 | .irq_ack = ata_irq_ack, | ||
566 | 553 | ||
567 | .port_start = ata_port_start, | 554 | .port_start = ata_port_start, |
568 | }; | 555 | }; |
@@ -675,7 +662,6 @@ static unsigned int opti82c46x_qc_issue_prot(struct ata_queued_cmd *qc) | |||
675 | static struct ata_port_operations opti82c46x_port_ops = { | 662 | static struct ata_port_operations opti82c46x_port_ops = { |
676 | .set_piomode = opti82c46x_set_piomode, | 663 | .set_piomode = opti82c46x_set_piomode, |
677 | 664 | ||
678 | .port_disable = ata_port_disable, | ||
679 | .tf_load = ata_tf_load, | 665 | .tf_load = ata_tf_load, |
680 | .tf_read = ata_tf_read, | 666 | .tf_read = ata_tf_read, |
681 | .check_status = ata_check_status, | 667 | .check_status = ata_check_status, |
@@ -696,7 +682,6 @@ static struct ata_port_operations opti82c46x_port_ops = { | |||
696 | .irq_handler = ata_interrupt, | 682 | .irq_handler = ata_interrupt, |
697 | .irq_clear = ata_bmdma_irq_clear, | 683 | .irq_clear = ata_bmdma_irq_clear, |
698 | .irq_on = ata_irq_on, | 684 | .irq_on = ata_irq_on, |
699 | .irq_ack = ata_irq_ack, | ||
700 | 685 | ||
701 | .port_start = ata_port_start, | 686 | .port_start = ata_port_start, |
702 | }; | 687 | }; |
@@ -814,6 +799,8 @@ static __init int legacy_init_one(int port, unsigned long io, unsigned long ctrl | |||
814 | ata_std_ports(&ap->ioaddr); | 799 | ata_std_ports(&ap->ioaddr); |
815 | ap->private_data = ld; | 800 | ap->private_data = ld; |
816 | 801 | ||
802 | ata_port_desc(ap, "cmd 0x%lx ctl 0x%lx", io, ctrl); | ||
803 | |||
817 | ret = ata_host_activate(host, irq, ata_interrupt, 0, &legacy_sht); | 804 | ret = ata_host_activate(host, irq, ata_interrupt, 0, &legacy_sht); |
818 | if (ret) | 805 | if (ret) |
819 | goto fail; | 806 | goto fail; |