aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_vsc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/sata_vsc.c')
-rw-r--r--drivers/ata/sata_vsc.c44
1 files changed, 8 insertions, 36 deletions
diff --git a/drivers/ata/sata_vsc.c b/drivers/ata/sata_vsc.c
index 95ae3ed24a9d..f3d635c0a2e9 100644
--- a/drivers/ata/sata_vsc.c
+++ b/drivers/ata/sata_vsc.c
@@ -200,7 +200,7 @@ static void vsc_sata_tf_read(struct ata_port *ap, struct ata_taskfile *tf)
200 struct ata_ioports *ioaddr = &ap->ioaddr; 200 struct ata_ioports *ioaddr = &ap->ioaddr;
201 u16 nsect, lbal, lbam, lbah, feature; 201 u16 nsect, lbal, lbam, lbah, feature;
202 202
203 tf->command = ata_check_status(ap); 203 tf->command = ata_sff_check_status(ap);
204 tf->device = readw(ioaddr->device_addr); 204 tf->device = readw(ioaddr->device_addr);
205 feature = readw(ioaddr->error_addr); 205 feature = readw(ioaddr->error_addr);
206 nsect = readw(ioaddr->nsect_addr); 206 nsect = readw(ioaddr->nsect_addr);
@@ -243,7 +243,7 @@ static void vsc_port_intr(u8 port_status, struct ata_port *ap)
243 243
244 qc = ata_qc_from_tag(ap, ap->link.active_tag); 244 qc = ata_qc_from_tag(ap, ap->link.active_tag);
245 if (qc && likely(!(qc->tf.flags & ATA_TFLAG_POLLING))) 245 if (qc && likely(!(qc->tf.flags & ATA_TFLAG_POLLING)))
246 handled = ata_host_intr(ap, qc); 246 handled = ata_sff_host_intr(ap, qc);
247 247
248 /* We received an interrupt during a polled command, 248 /* We received an interrupt during a polled command,
249 * or some other spurious condition. Interrupt reporting 249 * or some other spurious condition. Interrupt reporting
@@ -251,7 +251,7 @@ static void vsc_port_intr(u8 port_status, struct ata_port *ap)
251 * simply clear the interrupt 251 * simply clear the interrupt
252 */ 252 */
253 if (unlikely(!handled)) 253 if (unlikely(!handled))
254 ata_chk_status(ap); 254 ap->ops->sff_check_status(ap);
255} 255}
256 256
257/* 257/*
@@ -300,46 +300,18 @@ out:
300 300
301 301
302static struct scsi_host_template vsc_sata_sht = { 302static struct scsi_host_template vsc_sata_sht = {
303 .module = THIS_MODULE, 303 ATA_BMDMA_SHT(DRV_NAME),
304 .name = DRV_NAME,
305 .ioctl = ata_scsi_ioctl,
306 .queuecommand = ata_scsi_queuecmd,
307 .can_queue = ATA_DEF_QUEUE,
308 .this_id = ATA_SHT_THIS_ID,
309 .sg_tablesize = LIBATA_MAX_PRD,
310 .cmd_per_lun = ATA_SHT_CMD_PER_LUN,
311 .emulated = ATA_SHT_EMULATED,
312 .use_clustering = ATA_SHT_USE_CLUSTERING,
313 .proc_name = DRV_NAME,
314 .dma_boundary = ATA_DMA_BOUNDARY,
315 .slave_configure = ata_scsi_slave_config,
316 .slave_destroy = ata_scsi_slave_destroy,
317 .bios_param = ata_std_bios_param,
318}; 304};
319 305
320 306
321static const struct ata_port_operations vsc_sata_ops = { 307static struct ata_port_operations vsc_sata_ops = {
322 .tf_load = vsc_sata_tf_load, 308 .inherits = &ata_bmdma_port_ops,
323 .tf_read = vsc_sata_tf_read, 309 .sff_tf_load = vsc_sata_tf_load,
324 .exec_command = ata_exec_command, 310 .sff_tf_read = vsc_sata_tf_read,
325 .check_status = ata_check_status,
326 .dev_select = ata_std_dev_select,
327 .bmdma_setup = ata_bmdma_setup,
328 .bmdma_start = ata_bmdma_start,
329 .bmdma_stop = ata_bmdma_stop,
330 .bmdma_status = ata_bmdma_status,
331 .qc_prep = ata_qc_prep,
332 .qc_issue = ata_qc_issue_prot,
333 .data_xfer = ata_data_xfer,
334 .freeze = vsc_freeze, 311 .freeze = vsc_freeze,
335 .thaw = vsc_thaw, 312 .thaw = vsc_thaw,
336 .error_handler = ata_bmdma_error_handler,
337 .post_internal_cmd = ata_bmdma_post_internal_cmd,
338 .irq_clear = ata_bmdma_irq_clear,
339 .irq_on = ata_irq_on,
340 .scr_read = vsc_sata_scr_read, 313 .scr_read = vsc_sata_scr_read,
341 .scr_write = vsc_sata_scr_write, 314 .scr_write = vsc_sata_scr_write,
342 .port_start = ata_port_start,
343}; 315};
344 316
345static void __devinit vsc_sata_setup_port(struct ata_ioports *port, 317static void __devinit vsc_sata_setup_port(struct ata_ioports *port,