diff options
| -rw-r--r-- | drivers/ata/pata_pcmcia.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c index ceba93b7754e..3e7f6a9da28b 100644 --- a/drivers/ata/pata_pcmcia.c +++ b/drivers/ata/pata_pcmcia.c | |||
| @@ -102,10 +102,10 @@ static int pcmcia_set_mode_8bit(struct ata_link *link, | |||
| 102 | 102 | ||
| 103 | /** | 103 | /** |
| 104 | * ata_data_xfer_8bit - Transfer data by 8bit PIO | 104 | * ata_data_xfer_8bit - Transfer data by 8bit PIO |
| 105 | * @adev: device to target | 105 | * @dev: device to target |
| 106 | * @buf: data buffer | 106 | * @buf: data buffer |
| 107 | * @buflen: buffer length | 107 | * @buflen: buffer length |
| 108 | * @write_data: read/write | 108 | * @rw: read/write |
| 109 | * | 109 | * |
| 110 | * Transfer data from/to the device data register by 8 bit PIO. | 110 | * Transfer data from/to the device data register by 8 bit PIO. |
| 111 | * | 111 | * |
| @@ -113,14 +113,17 @@ static int pcmcia_set_mode_8bit(struct ata_link *link, | |||
| 113 | * Inherited from caller. | 113 | * Inherited from caller. |
| 114 | */ | 114 | */ |
| 115 | 115 | ||
| 116 | static void ata_data_xfer_8bit(struct ata_device *adev, unsigned char *buf, | 116 | static unsigned int ata_data_xfer_8bit(struct ata_device *dev, |
| 117 | unsigned int buflen, int write_data) | 117 | unsigned char *buf, unsigned int buflen, int rw) |
| 118 | { | 118 | { |
| 119 | struct ata_port *ap = adev->link->ap; | 119 | struct ata_port *ap = dev->link->ap; |
| 120 | if (write_data) | 120 | |
| 121 | iowrite8_rep(ap->ioaddr.data_addr, buf, buflen); | 121 | if (rw == READ) |
| 122 | else | ||
| 123 | ioread8_rep(ap->ioaddr.data_addr, buf, buflen); | 122 | ioread8_rep(ap->ioaddr.data_addr, buf, buflen); |
| 123 | else | ||
| 124 | iowrite8_rep(ap->ioaddr.data_addr, buf, buflen); | ||
| 125 | |||
| 126 | return buflen; | ||
| 124 | } | 127 | } |
| 125 | 128 | ||
| 126 | 129 | ||
