diff options
Diffstat (limited to 'drivers/ata/pata_qdi.c')
-rw-r--r-- | drivers/ata/pata_qdi.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/ata/pata_qdi.c b/drivers/ata/pata_qdi.c index 1998c19e8743..7d4c696c4cb6 100644 --- a/drivers/ata/pata_qdi.c +++ b/drivers/ata/pata_qdi.c | |||
@@ -126,7 +126,7 @@ static unsigned int qdi_qc_issue_prot(struct ata_queued_cmd *qc) | |||
126 | 126 | ||
127 | static void qdi_data_xfer(struct ata_device *adev, unsigned char *buf, unsigned int buflen, int write_data) | 127 | static void qdi_data_xfer(struct ata_device *adev, unsigned char *buf, unsigned int buflen, int write_data) |
128 | { | 128 | { |
129 | struct ata_port *ap = adev->ap; | 129 | struct ata_port *ap = adev->link->ap; |
130 | int slop = buflen & 3; | 130 | int slop = buflen & 3; |
131 | 131 | ||
132 | if (ata_id_has_dword_io(adev->id)) { | 132 | if (ata_id_has_dword_io(adev->id)) { |
@@ -170,7 +170,6 @@ static struct scsi_host_template qdi_sht = { | |||
170 | }; | 170 | }; |
171 | 171 | ||
172 | static struct ata_port_operations qdi6500_port_ops = { | 172 | static struct ata_port_operations qdi6500_port_ops = { |
173 | .port_disable = ata_port_disable, | ||
174 | .set_piomode = qdi6500_set_piomode, | 173 | .set_piomode = qdi6500_set_piomode, |
175 | 174 | ||
176 | .tf_load = ata_tf_load, | 175 | .tf_load = ata_tf_load, |
@@ -192,13 +191,11 @@ static struct ata_port_operations qdi6500_port_ops = { | |||
192 | 191 | ||
193 | .irq_clear = ata_bmdma_irq_clear, | 192 | .irq_clear = ata_bmdma_irq_clear, |
194 | .irq_on = ata_irq_on, | 193 | .irq_on = ata_irq_on, |
195 | .irq_ack = ata_irq_ack, | ||
196 | 194 | ||
197 | .port_start = ata_port_start, | 195 | .port_start = ata_sff_port_start, |
198 | }; | 196 | }; |
199 | 197 | ||
200 | static struct ata_port_operations qdi6580_port_ops = { | 198 | static struct ata_port_operations qdi6580_port_ops = { |
201 | .port_disable = ata_port_disable, | ||
202 | .set_piomode = qdi6580_set_piomode, | 199 | .set_piomode = qdi6580_set_piomode, |
203 | 200 | ||
204 | .tf_load = ata_tf_load, | 201 | .tf_load = ata_tf_load, |
@@ -220,9 +217,8 @@ static struct ata_port_operations qdi6580_port_ops = { | |||
220 | 217 | ||
221 | .irq_clear = ata_bmdma_irq_clear, | 218 | .irq_clear = ata_bmdma_irq_clear, |
222 | .irq_on = ata_irq_on, | 219 | .irq_on = ata_irq_on, |
223 | .irq_ack = ata_irq_ack, | ||
224 | 220 | ||
225 | .port_start = ata_port_start, | 221 | .port_start = ata_sff_port_start, |
226 | }; | 222 | }; |
227 | 223 | ||
228 | /** | 224 | /** |
@@ -238,6 +234,7 @@ static struct ata_port_operations qdi6580_port_ops = { | |||
238 | 234 | ||
239 | static __init int qdi_init_one(unsigned long port, int type, unsigned long io, int irq, int fast) | 235 | static __init int qdi_init_one(unsigned long port, int type, unsigned long io, int irq, int fast) |
240 | { | 236 | { |
237 | unsigned long ctl = io + 0x206; | ||
241 | struct platform_device *pdev; | 238 | struct platform_device *pdev; |
242 | struct ata_host *host; | 239 | struct ata_host *host; |
243 | struct ata_port *ap; | 240 | struct ata_port *ap; |
@@ -254,7 +251,7 @@ static __init int qdi_init_one(unsigned long port, int type, unsigned long io, i | |||
254 | 251 | ||
255 | ret = -ENOMEM; | 252 | ret = -ENOMEM; |
256 | io_addr = devm_ioport_map(&pdev->dev, io, 8); | 253 | io_addr = devm_ioport_map(&pdev->dev, io, 8); |
257 | ctl_addr = devm_ioport_map(&pdev->dev, io + 0x206, 1); | 254 | ctl_addr = devm_ioport_map(&pdev->dev, ctl, 1); |
258 | if (!io_addr || !ctl_addr) | 255 | if (!io_addr || !ctl_addr) |
259 | goto fail; | 256 | goto fail; |
260 | 257 | ||
@@ -279,6 +276,8 @@ static __init int qdi_init_one(unsigned long port, int type, unsigned long io, i | |||
279 | ap->ioaddr.ctl_addr = ctl_addr; | 276 | ap->ioaddr.ctl_addr = ctl_addr; |
280 | ata_std_ports(&ap->ioaddr); | 277 | ata_std_ports(&ap->ioaddr); |
281 | 278 | ||
279 | ata_port_desc(ap, "cmd %lx ctl %lx", io, ctl); | ||
280 | |||
282 | /* | 281 | /* |
283 | * Hook in a private data structure per channel | 282 | * Hook in a private data structure per channel |
284 | */ | 283 | */ |