diff options
author | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2016-12-30 09:01:17 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2017-01-10 11:11:17 -0500 |
commit | 989e0aac1a801e9e9580632c9fd448a7aaca596a (patch) | |
tree | 4f1a87c28571a871a39902d7b62304f671a281e0 /drivers/ata | |
parent | 7563f625469e9488fcd23cb64f9a6d61f1758f47 (diff) |
ata: pass queued command to ->sff_data_xfer method
For Atari Falcon PATA support we need to check the current command
in its ->sff_data_xfer method. Update core code and all users
accordingly.
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-sff.c | 29 | ||||
-rw-r--r-- | drivers/ata/pata_at91.c | 6 | ||||
-rw-r--r-- | drivers/ata/pata_bf54x.c | 7 | ||||
-rw-r--r-- | drivers/ata/pata_ep93xx.c | 4 | ||||
-rw-r--r-- | drivers/ata/pata_ixp4xx_cf.c | 4 | ||||
-rw-r--r-- | drivers/ata/pata_legacy.c | 15 | ||||
-rw-r--r-- | drivers/ata/pata_octeon_cf.c | 12 | ||||
-rw-r--r-- | drivers/ata/pata_pcmcia.c | 6 | ||||
-rw-r--r-- | drivers/ata/pata_samsung_cf.c | 4 | ||||
-rw-r--r-- | drivers/ata/sata_rcar.c | 4 |
10 files changed, 48 insertions, 43 deletions
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index 051b6158d1b7..4441b5c5e4fb 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c | |||
@@ -542,7 +542,7 @@ static inline void ata_tf_to_host(struct ata_port *ap, | |||
542 | 542 | ||
543 | /** | 543 | /** |
544 | * ata_sff_data_xfer - Transfer data by PIO | 544 | * ata_sff_data_xfer - Transfer data by PIO |
545 | * @dev: device to target | 545 | * @qc: queued command |
546 | * @buf: data buffer | 546 | * @buf: data buffer |
547 | * @buflen: buffer length | 547 | * @buflen: buffer length |
548 | * @rw: read/write | 548 | * @rw: read/write |
@@ -555,10 +555,10 @@ static inline void ata_tf_to_host(struct ata_port *ap, | |||
555 | * RETURNS: | 555 | * RETURNS: |
556 | * Bytes consumed. | 556 | * Bytes consumed. |
557 | */ | 557 | */ |
558 | unsigned int ata_sff_data_xfer(struct ata_device *dev, unsigned char *buf, | 558 | unsigned int ata_sff_data_xfer(struct ata_queued_cmd *qc, unsigned char *buf, |
559 | unsigned int buflen, int rw) | 559 | unsigned int buflen, int rw) |
560 | { | 560 | { |
561 | struct ata_port *ap = dev->link->ap; | 561 | struct ata_port *ap = qc->dev->link->ap; |
562 | void __iomem *data_addr = ap->ioaddr.data_addr; | 562 | void __iomem *data_addr = ap->ioaddr.data_addr; |
563 | unsigned int words = buflen >> 1; | 563 | unsigned int words = buflen >> 1; |
564 | 564 | ||
@@ -595,7 +595,7 @@ EXPORT_SYMBOL_GPL(ata_sff_data_xfer); | |||
595 | 595 | ||
596 | /** | 596 | /** |
597 | * ata_sff_data_xfer32 - Transfer data by PIO | 597 | * ata_sff_data_xfer32 - Transfer data by PIO |
598 | * @dev: device to target | 598 | * @qc: queued command |
599 | * @buf: data buffer | 599 | * @buf: data buffer |
600 | * @buflen: buffer length | 600 | * @buflen: buffer length |
601 | * @rw: read/write | 601 | * @rw: read/write |
@@ -610,16 +610,17 @@ EXPORT_SYMBOL_GPL(ata_sff_data_xfer); | |||
610 | * Bytes consumed. | 610 | * Bytes consumed. |
611 | */ | 611 | */ |
612 | 612 | ||
613 | unsigned int ata_sff_data_xfer32(struct ata_device *dev, unsigned char *buf, | 613 | unsigned int ata_sff_data_xfer32(struct ata_queued_cmd *qc, unsigned char *buf, |
614 | unsigned int buflen, int rw) | 614 | unsigned int buflen, int rw) |
615 | { | 615 | { |
616 | struct ata_device *dev = qc->dev; | ||
616 | struct ata_port *ap = dev->link->ap; | 617 | struct ata_port *ap = dev->link->ap; |
617 | void __iomem *data_addr = ap->ioaddr.data_addr; | 618 | void __iomem *data_addr = ap->ioaddr.data_addr; |
618 | unsigned int words = buflen >> 2; | 619 | unsigned int words = buflen >> 2; |
619 | int slop = buflen & 3; | 620 | int slop = buflen & 3; |
620 | 621 | ||
621 | if (!(ap->pflags & ATA_PFLAG_PIO32)) | 622 | if (!(ap->pflags & ATA_PFLAG_PIO32)) |
622 | return ata_sff_data_xfer(dev, buf, buflen, rw); | 623 | return ata_sff_data_xfer(qc, buf, buflen, rw); |
623 | 624 | ||
624 | /* Transfer multiple of 4 bytes */ | 625 | /* Transfer multiple of 4 bytes */ |
625 | if (rw == READ) | 626 | if (rw == READ) |
@@ -658,7 +659,7 @@ EXPORT_SYMBOL_GPL(ata_sff_data_xfer32); | |||
658 | 659 | ||
659 | /** | 660 | /** |
660 | * ata_sff_data_xfer_noirq - Transfer data by PIO | 661 | * ata_sff_data_xfer_noirq - Transfer data by PIO |
661 | * @dev: device to target | 662 | * @qc: queued command |
662 | * @buf: data buffer | 663 | * @buf: data buffer |
663 | * @buflen: buffer length | 664 | * @buflen: buffer length |
664 | * @rw: read/write | 665 | * @rw: read/write |
@@ -672,14 +673,14 @@ EXPORT_SYMBOL_GPL(ata_sff_data_xfer32); | |||
672 | * RETURNS: | 673 | * RETURNS: |
673 | * Bytes consumed. | 674 | * Bytes consumed. |
674 | */ | 675 | */ |
675 | unsigned int ata_sff_data_xfer_noirq(struct ata_device *dev, unsigned char *buf, | 676 | unsigned int ata_sff_data_xfer_noirq(struct ata_queued_cmd *qc, unsigned char *buf, |
676 | unsigned int buflen, int rw) | 677 | unsigned int buflen, int rw) |
677 | { | 678 | { |
678 | unsigned long flags; | 679 | unsigned long flags; |
679 | unsigned int consumed; | 680 | unsigned int consumed; |
680 | 681 | ||
681 | local_irq_save(flags); | 682 | local_irq_save(flags); |
682 | consumed = ata_sff_data_xfer32(dev, buf, buflen, rw); | 683 | consumed = ata_sff_data_xfer32(qc, buf, buflen, rw); |
683 | local_irq_restore(flags); | 684 | local_irq_restore(flags); |
684 | 685 | ||
685 | return consumed; | 686 | return consumed; |
@@ -723,14 +724,14 @@ static void ata_pio_sector(struct ata_queued_cmd *qc) | |||
723 | buf = kmap_atomic(page); | 724 | buf = kmap_atomic(page); |
724 | 725 | ||
725 | /* do the actual data transfer */ | 726 | /* do the actual data transfer */ |
726 | ap->ops->sff_data_xfer(qc->dev, buf + offset, qc->sect_size, | 727 | ap->ops->sff_data_xfer(qc, buf + offset, qc->sect_size, |
727 | do_write); | 728 | do_write); |
728 | 729 | ||
729 | kunmap_atomic(buf); | 730 | kunmap_atomic(buf); |
730 | local_irq_restore(flags); | 731 | local_irq_restore(flags); |
731 | } else { | 732 | } else { |
732 | buf = page_address(page); | 733 | buf = page_address(page); |
733 | ap->ops->sff_data_xfer(qc->dev, buf + offset, qc->sect_size, | 734 | ap->ops->sff_data_xfer(qc, buf + offset, qc->sect_size, |
734 | do_write); | 735 | do_write); |
735 | } | 736 | } |
736 | 737 | ||
@@ -791,7 +792,7 @@ static void atapi_send_cdb(struct ata_port *ap, struct ata_queued_cmd *qc) | |||
791 | DPRINTK("send cdb\n"); | 792 | DPRINTK("send cdb\n"); |
792 | WARN_ON_ONCE(qc->dev->cdb_len < 12); | 793 | WARN_ON_ONCE(qc->dev->cdb_len < 12); |
793 | 794 | ||
794 | ap->ops->sff_data_xfer(qc->dev, qc->cdb, qc->dev->cdb_len, 1); | 795 | ap->ops->sff_data_xfer(qc, qc->cdb, qc->dev->cdb_len, 1); |
795 | ata_sff_sync(ap); | 796 | ata_sff_sync(ap); |
796 | /* FIXME: If the CDB is for DMA do we need to do the transition delay | 797 | /* FIXME: If the CDB is for DMA do we need to do the transition delay |
797 | or is bmdma_start guaranteed to do it ? */ | 798 | or is bmdma_start guaranteed to do it ? */ |
@@ -868,14 +869,14 @@ next_sg: | |||
868 | buf = kmap_atomic(page); | 869 | buf = kmap_atomic(page); |
869 | 870 | ||
870 | /* do the actual data transfer */ | 871 | /* do the actual data transfer */ |
871 | consumed = ap->ops->sff_data_xfer(dev, buf + offset, | 872 | consumed = ap->ops->sff_data_xfer(qc, buf + offset, |
872 | count, rw); | 873 | count, rw); |
873 | 874 | ||
874 | kunmap_atomic(buf); | 875 | kunmap_atomic(buf); |
875 | local_irq_restore(flags); | 876 | local_irq_restore(flags); |
876 | } else { | 877 | } else { |
877 | buf = page_address(page); | 878 | buf = page_address(page); |
878 | consumed = ap->ops->sff_data_xfer(dev, buf + offset, | 879 | consumed = ap->ops->sff_data_xfer(qc, buf + offset, |
879 | count, rw); | 880 | count, rw); |
880 | } | 881 | } |
881 | 882 | ||
diff --git a/drivers/ata/pata_at91.c b/drivers/ata/pata_at91.c index 1611e0e8d767..fd5b34f0d007 100644 --- a/drivers/ata/pata_at91.c +++ b/drivers/ata/pata_at91.c | |||
@@ -286,10 +286,10 @@ static void pata_at91_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
286 | set_smc_timing(ap->dev, adev, info, &timing); | 286 | set_smc_timing(ap->dev, adev, info, &timing); |
287 | } | 287 | } |
288 | 288 | ||
289 | static unsigned int pata_at91_data_xfer_noirq(struct ata_device *dev, | 289 | static unsigned int pata_at91_data_xfer_noirq(struct ata_queued_cmd *qc, |
290 | unsigned char *buf, unsigned int buflen, int rw) | 290 | unsigned char *buf, unsigned int buflen, int rw) |
291 | { | 291 | { |
292 | struct at91_ide_info *info = dev->link->ap->host->private_data; | 292 | struct at91_ide_info *info = qc->dev->link->ap->host->private_data; |
293 | unsigned int consumed; | 293 | unsigned int consumed; |
294 | unsigned int mode; | 294 | unsigned int mode; |
295 | unsigned long flags; | 295 | unsigned long flags; |
@@ -301,7 +301,7 @@ static unsigned int pata_at91_data_xfer_noirq(struct ata_device *dev, | |||
301 | regmap_fields_write(fields.mode, info->cs, (mode & ~AT91_SMC_DBW) | | 301 | regmap_fields_write(fields.mode, info->cs, (mode & ~AT91_SMC_DBW) | |
302 | AT91_SMC_DBW_16); | 302 | AT91_SMC_DBW_16); |
303 | 303 | ||
304 | consumed = ata_sff_data_xfer(dev, buf, buflen, rw); | 304 | consumed = ata_sff_data_xfer(qc, buf, buflen, rw); |
305 | 305 | ||
306 | /* restore 8bit mode after data is written */ | 306 | /* restore 8bit mode after data is written */ |
307 | regmap_fields_write(fields.mode, info->cs, (mode & ~AT91_SMC_DBW) | | 307 | regmap_fields_write(fields.mode, info->cs, (mode & ~AT91_SMC_DBW) | |
diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c index ec748d31928d..9c5780a7e1b9 100644 --- a/drivers/ata/pata_bf54x.c +++ b/drivers/ata/pata_bf54x.c | |||
@@ -1143,7 +1143,7 @@ static unsigned char bfin_bmdma_status(struct ata_port *ap) | |||
1143 | 1143 | ||
1144 | /** | 1144 | /** |
1145 | * bfin_data_xfer - Transfer data by PIO | 1145 | * bfin_data_xfer - Transfer data by PIO |
1146 | * @adev: device for this I/O | 1146 | * @qc: queued command |
1147 | * @buf: data buffer | 1147 | * @buf: data buffer |
1148 | * @buflen: buffer length | 1148 | * @buflen: buffer length |
1149 | * @write_data: read/write | 1149 | * @write_data: read/write |
@@ -1151,10 +1151,11 @@ static unsigned char bfin_bmdma_status(struct ata_port *ap) | |||
1151 | * Note: Original code is ata_sff_data_xfer(). | 1151 | * Note: Original code is ata_sff_data_xfer(). |
1152 | */ | 1152 | */ |
1153 | 1153 | ||
1154 | static unsigned int bfin_data_xfer(struct ata_device *dev, unsigned char *buf, | 1154 | static unsigned int bfin_data_xfer(struct ata_queued_cmd *qc, |
1155 | unsigned char *buf, | ||
1155 | unsigned int buflen, int rw) | 1156 | unsigned int buflen, int rw) |
1156 | { | 1157 | { |
1157 | struct ata_port *ap = dev->link->ap; | 1158 | struct ata_port *ap = qc->dev->link->ap; |
1158 | void __iomem *base = (void __iomem *)ap->ioaddr.ctl_addr; | 1159 | void __iomem *base = (void __iomem *)ap->ioaddr.ctl_addr; |
1159 | unsigned int words = buflen >> 1; | 1160 | unsigned int words = buflen >> 1; |
1160 | unsigned short *buf16 = (u16 *)buf; | 1161 | unsigned short *buf16 = (u16 *)buf; |
diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c index bd6b089c67a3..bf1b910c5d69 100644 --- a/drivers/ata/pata_ep93xx.c +++ b/drivers/ata/pata_ep93xx.c | |||
@@ -474,11 +474,11 @@ static void ep93xx_pata_set_devctl(struct ata_port *ap, u8 ctl) | |||
474 | } | 474 | } |
475 | 475 | ||
476 | /* Note: original code is ata_sff_data_xfer */ | 476 | /* Note: original code is ata_sff_data_xfer */ |
477 | static unsigned int ep93xx_pata_data_xfer(struct ata_device *adev, | 477 | static unsigned int ep93xx_pata_data_xfer(struct ata_queued_cmd *qc, |
478 | unsigned char *buf, | 478 | unsigned char *buf, |
479 | unsigned int buflen, int rw) | 479 | unsigned int buflen, int rw) |
480 | { | 480 | { |
481 | struct ata_port *ap = adev->link->ap; | 481 | struct ata_port *ap = qc->dev->link->ap; |
482 | struct ep93xx_pata_data *drv_data = ap->host->private_data; | 482 | struct ep93xx_pata_data *drv_data = ap->host->private_data; |
483 | u16 *data = (u16 *)buf; | 483 | u16 *data = (u16 *)buf; |
484 | unsigned int words = buflen >> 1; | 484 | unsigned int words = buflen >> 1; |
diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c index abda44183512..0b0d93065f5a 100644 --- a/drivers/ata/pata_ixp4xx_cf.c +++ b/drivers/ata/pata_ixp4xx_cf.c | |||
@@ -40,13 +40,13 @@ static int ixp4xx_set_mode(struct ata_link *link, struct ata_device **error) | |||
40 | return 0; | 40 | return 0; |
41 | } | 41 | } |
42 | 42 | ||
43 | static unsigned int ixp4xx_mmio_data_xfer(struct ata_device *dev, | 43 | static unsigned int ixp4xx_mmio_data_xfer(struct ata_queued_cmd *qc, |
44 | unsigned char *buf, unsigned int buflen, int rw) | 44 | unsigned char *buf, unsigned int buflen, int rw) |
45 | { | 45 | { |
46 | unsigned int i; | 46 | unsigned int i; |
47 | unsigned int words = buflen >> 1; | 47 | unsigned int words = buflen >> 1; |
48 | u16 *buf16 = (u16 *) buf; | 48 | u16 *buf16 = (u16 *) buf; |
49 | struct ata_port *ap = dev->link->ap; | 49 | struct ata_port *ap = qc->dev->link->ap; |
50 | void __iomem *mmio = ap->ioaddr.data_addr; | 50 | void __iomem *mmio = ap->ioaddr.data_addr; |
51 | struct ixp4xx_pata_data *data = dev_get_platdata(ap->host->dev); | 51 | struct ixp4xx_pata_data *data = dev_get_platdata(ap->host->dev); |
52 | 52 | ||
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c index bce2a8ca4678..53828b6c3044 100644 --- a/drivers/ata/pata_legacy.c +++ b/drivers/ata/pata_legacy.c | |||
@@ -303,11 +303,12 @@ static void pdc20230_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
303 | 303 | ||
304 | } | 304 | } |
305 | 305 | ||
306 | static unsigned int pdc_data_xfer_vlb(struct ata_device *dev, | 306 | static unsigned int pdc_data_xfer_vlb(struct ata_queued_cmd *qc, |
307 | unsigned char *buf, unsigned int buflen, int rw) | 307 | unsigned char *buf, unsigned int buflen, int rw) |
308 | { | 308 | { |
309 | int slop = buflen & 3; | 309 | struct ata_device *dev = qc->dev; |
310 | struct ata_port *ap = dev->link->ap; | 310 | struct ata_port *ap = dev->link->ap; |
311 | int slop = buflen & 3; | ||
311 | 312 | ||
312 | /* 32bit I/O capable *and* we need to write a whole number of dwords */ | 313 | /* 32bit I/O capable *and* we need to write a whole number of dwords */ |
313 | if (ata_id_has_dword_io(dev->id) && (slop == 0 || slop == 3) | 314 | if (ata_id_has_dword_io(dev->id) && (slop == 0 || slop == 3) |
@@ -340,7 +341,7 @@ static unsigned int pdc_data_xfer_vlb(struct ata_device *dev, | |||
340 | } | 341 | } |
341 | local_irq_restore(flags); | 342 | local_irq_restore(flags); |
342 | } else | 343 | } else |
343 | buflen = ata_sff_data_xfer_noirq(dev, buf, buflen, rw); | 344 | buflen = ata_sff_data_xfer_noirq(qc, buf, buflen, rw); |
344 | 345 | ||
345 | return buflen; | 346 | return buflen; |
346 | } | 347 | } |
@@ -702,9 +703,11 @@ static unsigned int qdi_qc_issue(struct ata_queued_cmd *qc) | |||
702 | return ata_sff_qc_issue(qc); | 703 | return ata_sff_qc_issue(qc); |
703 | } | 704 | } |
704 | 705 | ||
705 | static unsigned int vlb32_data_xfer(struct ata_device *adev, unsigned char *buf, | 706 | static unsigned int vlb32_data_xfer(struct ata_queued_cmd *qc, |
706 | unsigned int buflen, int rw) | 707 | unsigned char *buf, |
708 | unsigned int buflen, int rw) | ||
707 | { | 709 | { |
710 | struct ata_device *adev = qc->dev; | ||
708 | struct ata_port *ap = adev->link->ap; | 711 | struct ata_port *ap = adev->link->ap; |
709 | int slop = buflen & 3; | 712 | int slop = buflen & 3; |
710 | 713 | ||
@@ -727,7 +730,7 @@ static unsigned int vlb32_data_xfer(struct ata_device *adev, unsigned char *buf, | |||
727 | } | 730 | } |
728 | return (buflen + 3) & ~3; | 731 | return (buflen + 3) & ~3; |
729 | } else | 732 | } else |
730 | return ata_sff_data_xfer(adev, buf, buflen, rw); | 733 | return ata_sff_data_xfer(qc, buf, buflen, rw); |
731 | } | 734 | } |
732 | 735 | ||
733 | static int qdi_port(struct platform_device *dev, | 736 | static int qdi_port(struct platform_device *dev, |
diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c index 475a00669427..e94e7ca0e743 100644 --- a/drivers/ata/pata_octeon_cf.c +++ b/drivers/ata/pata_octeon_cf.c | |||
@@ -293,17 +293,17 @@ static void octeon_cf_set_dmamode(struct ata_port *ap, struct ata_device *dev) | |||
293 | /** | 293 | /** |
294 | * Handle an 8 bit I/O request. | 294 | * Handle an 8 bit I/O request. |
295 | * | 295 | * |
296 | * @dev: Device to access | 296 | * @qc: Queued command |
297 | * @buffer: Data buffer | 297 | * @buffer: Data buffer |
298 | * @buflen: Length of the buffer. | 298 | * @buflen: Length of the buffer. |
299 | * @rw: True to write. | 299 | * @rw: True to write. |
300 | */ | 300 | */ |
301 | static unsigned int octeon_cf_data_xfer8(struct ata_device *dev, | 301 | static unsigned int octeon_cf_data_xfer8(struct ata_queued_cmd *qc, |
302 | unsigned char *buffer, | 302 | unsigned char *buffer, |
303 | unsigned int buflen, | 303 | unsigned int buflen, |
304 | int rw) | 304 | int rw) |
305 | { | 305 | { |
306 | struct ata_port *ap = dev->link->ap; | 306 | struct ata_port *ap = qc->dev->link->ap; |
307 | void __iomem *data_addr = ap->ioaddr.data_addr; | 307 | void __iomem *data_addr = ap->ioaddr.data_addr; |
308 | unsigned long words; | 308 | unsigned long words; |
309 | int count; | 309 | int count; |
@@ -332,17 +332,17 @@ static unsigned int octeon_cf_data_xfer8(struct ata_device *dev, | |||
332 | /** | 332 | /** |
333 | * Handle a 16 bit I/O request. | 333 | * Handle a 16 bit I/O request. |
334 | * | 334 | * |
335 | * @dev: Device to access | 335 | * @qc: Queued command |
336 | * @buffer: Data buffer | 336 | * @buffer: Data buffer |
337 | * @buflen: Length of the buffer. | 337 | * @buflen: Length of the buffer. |
338 | * @rw: True to write. | 338 | * @rw: True to write. |
339 | */ | 339 | */ |
340 | static unsigned int octeon_cf_data_xfer16(struct ata_device *dev, | 340 | static unsigned int octeon_cf_data_xfer16(struct ata_queued_cmd *qc, |
341 | unsigned char *buffer, | 341 | unsigned char *buffer, |
342 | unsigned int buflen, | 342 | unsigned int buflen, |
343 | int rw) | 343 | int rw) |
344 | { | 344 | { |
345 | struct ata_port *ap = dev->link->ap; | 345 | struct ata_port *ap = qc->dev->link->ap; |
346 | void __iomem *data_addr = ap->ioaddr.data_addr; | 346 | void __iomem *data_addr = ap->ioaddr.data_addr; |
347 | unsigned long words; | 347 | unsigned long words; |
348 | int count; | 348 | int count; |
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c index bcc4b968c049..a541eacc5e95 100644 --- a/drivers/ata/pata_pcmcia.c +++ b/drivers/ata/pata_pcmcia.c | |||
@@ -90,7 +90,7 @@ static int pcmcia_set_mode_8bit(struct ata_link *link, | |||
90 | 90 | ||
91 | /** | 91 | /** |
92 | * ata_data_xfer_8bit - Transfer data by 8bit PIO | 92 | * ata_data_xfer_8bit - Transfer data by 8bit PIO |
93 | * @dev: device to target | 93 | * @qc: queued command |
94 | * @buf: data buffer | 94 | * @buf: data buffer |
95 | * @buflen: buffer length | 95 | * @buflen: buffer length |
96 | * @rw: read/write | 96 | * @rw: read/write |
@@ -101,10 +101,10 @@ static int pcmcia_set_mode_8bit(struct ata_link *link, | |||
101 | * Inherited from caller. | 101 | * Inherited from caller. |
102 | */ | 102 | */ |
103 | 103 | ||
104 | static unsigned int ata_data_xfer_8bit(struct ata_device *dev, | 104 | static unsigned int ata_data_xfer_8bit(struct ata_queued_cmd *qc, |
105 | unsigned char *buf, unsigned int buflen, int rw) | 105 | unsigned char *buf, unsigned int buflen, int rw) |
106 | { | 106 | { |
107 | struct ata_port *ap = dev->link->ap; | 107 | struct ata_port *ap = qc->dev->link->ap; |
108 | 108 | ||
109 | if (rw == READ) | 109 | if (rw == READ) |
110 | ioread8_rep(ap->ioaddr.data_addr, buf, buflen); | 110 | ioread8_rep(ap->ioaddr.data_addr, buf, buflen); |
diff --git a/drivers/ata/pata_samsung_cf.c b/drivers/ata/pata_samsung_cf.c index f6facd686f94..431c7de30ce6 100644 --- a/drivers/ata/pata_samsung_cf.c +++ b/drivers/ata/pata_samsung_cf.c | |||
@@ -263,10 +263,10 @@ static u8 pata_s3c_check_altstatus(struct ata_port *ap) | |||
263 | /* | 263 | /* |
264 | * pata_s3c_data_xfer - Transfer data by PIO | 264 | * pata_s3c_data_xfer - Transfer data by PIO |
265 | */ | 265 | */ |
266 | static unsigned int pata_s3c_data_xfer(struct ata_device *dev, | 266 | static unsigned int pata_s3c_data_xfer(struct ata_queued_cmd *qc, |
267 | unsigned char *buf, unsigned int buflen, int rw) | 267 | unsigned char *buf, unsigned int buflen, int rw) |
268 | { | 268 | { |
269 | struct ata_port *ap = dev->link->ap; | 269 | struct ata_port *ap = qc->dev->link->ap; |
270 | struct s3c_ide_info *info = ap->host->private_data; | 270 | struct s3c_ide_info *info = ap->host->private_data; |
271 | void __iomem *data_addr = ap->ioaddr.data_addr; | 271 | void __iomem *data_addr = ap->ioaddr.data_addr; |
272 | unsigned int words = buflen >> 1, i; | 272 | unsigned int words = buflen >> 1, i; |
diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c index f72d601e300a..5d38245a7a73 100644 --- a/drivers/ata/sata_rcar.c +++ b/drivers/ata/sata_rcar.c | |||
@@ -447,11 +447,11 @@ static void sata_rcar_exec_command(struct ata_port *ap, | |||
447 | ata_sff_pause(ap); | 447 | ata_sff_pause(ap); |
448 | } | 448 | } |
449 | 449 | ||
450 | static unsigned int sata_rcar_data_xfer(struct ata_device *dev, | 450 | static unsigned int sata_rcar_data_xfer(struct ata_queued_cmd *qc, |
451 | unsigned char *buf, | 451 | unsigned char *buf, |
452 | unsigned int buflen, int rw) | 452 | unsigned int buflen, int rw) |
453 | { | 453 | { |
454 | struct ata_port *ap = dev->link->ap; | 454 | struct ata_port *ap = qc->dev->link->ap; |
455 | void __iomem *data_addr = ap->ioaddr.data_addr; | 455 | void __iomem *data_addr = ap->ioaddr.data_addr; |
456 | unsigned int words = buflen >> 1; | 456 | unsigned int words = buflen >> 1; |
457 | 457 | ||