aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sata_vsc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/sata_vsc.c')
-rw-r--r--drivers/scsi/sata_vsc.c36
1 files changed, 24 insertions, 12 deletions
diff --git a/drivers/scsi/sata_vsc.c b/drivers/scsi/sata_vsc.c
index 8a29ce340b47..6d0c4f18e652 100644
--- a/drivers/scsi/sata_vsc.c
+++ b/drivers/scsi/sata_vsc.c
@@ -221,14 +221,21 @@ static irqreturn_t vsc_sata_interrupt (int irq, void *dev_instance,
221 221
222 ap = host_set->ports[i]; 222 ap = host_set->ports[i];
223 223
224 if (ap && !(ap->flags & 224 if (is_vsc_sata_int_err(i, int_status)) {
225 (ATA_FLAG_PORT_DISABLED|ATA_FLAG_NOINTR))) { 225 u32 err_status;
226 printk(KERN_DEBUG "%s: ignoring interrupt(s)\n", __FUNCTION__);
227 err_status = ap ? vsc_sata_scr_read(ap, SCR_ERROR) : 0;
228 vsc_sata_scr_write(ap, SCR_ERROR, err_status);
229 handled++;
230 }
231
232 if (ap && !(ap->flags & ATA_FLAG_DISABLED)) {
226 struct ata_queued_cmd *qc; 233 struct ata_queued_cmd *qc;
227 234
228 qc = ata_qc_from_tag(ap, ap->active_tag); 235 qc = ata_qc_from_tag(ap, ap->active_tag);
229 if (qc && (!(qc->tf.ctl & ATA_NIEN))) { 236 if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING)))
230 handled += ata_host_intr(ap, qc); 237 handled += ata_host_intr(ap, qc);
231 } else if (is_vsc_sata_int_err(i, int_status)) { 238 else if (is_vsc_sata_int_err(i, int_status)) {
232 /* 239 /*
233 * On some chips (i.e. Intel 31244), an error 240 * On some chips (i.e. Intel 31244), an error
234 * interrupt will sneak in at initialization 241 * interrupt will sneak in at initialization
@@ -272,6 +279,7 @@ static struct scsi_host_template vsc_sata_sht = {
272 .proc_name = DRV_NAME, 279 .proc_name = DRV_NAME,
273 .dma_boundary = ATA_DMA_BOUNDARY, 280 .dma_boundary = ATA_DMA_BOUNDARY,
274 .slave_configure = ata_scsi_slave_config, 281 .slave_configure = ata_scsi_slave_config,
282 .slave_destroy = ata_scsi_slave_destroy,
275 .bios_param = ata_std_bios_param, 283 .bios_param = ata_std_bios_param,
276}; 284};
277 285
@@ -283,14 +291,17 @@ static const struct ata_port_operations vsc_sata_ops = {
283 .exec_command = ata_exec_command, 291 .exec_command = ata_exec_command,
284 .check_status = ata_check_status, 292 .check_status = ata_check_status,
285 .dev_select = ata_std_dev_select, 293 .dev_select = ata_std_dev_select,
286 .phy_reset = sata_phy_reset,
287 .bmdma_setup = ata_bmdma_setup, 294 .bmdma_setup = ata_bmdma_setup,
288 .bmdma_start = ata_bmdma_start, 295 .bmdma_start = ata_bmdma_start,
289 .bmdma_stop = ata_bmdma_stop, 296 .bmdma_stop = ata_bmdma_stop,
290 .bmdma_status = ata_bmdma_status, 297 .bmdma_status = ata_bmdma_status,
291 .qc_prep = ata_qc_prep, 298 .qc_prep = ata_qc_prep,
292 .qc_issue = ata_qc_issue_prot, 299 .qc_issue = ata_qc_issue_prot,
293 .eng_timeout = ata_eng_timeout, 300 .data_xfer = ata_pio_data_xfer,
301 .freeze = ata_bmdma_freeze,
302 .thaw = ata_bmdma_thaw,
303 .error_handler = ata_bmdma_error_handler,
304 .post_internal_cmd = ata_bmdma_post_internal_cmd,
294 .irq_handler = vsc_sata_interrupt, 305 .irq_handler = vsc_sata_interrupt,
295 .irq_clear = ata_bmdma_irq_clear, 306 .irq_clear = ata_bmdma_irq_clear,
296 .scr_read = vsc_sata_scr_read, 307 .scr_read = vsc_sata_scr_read,
@@ -385,7 +396,7 @@ static int __devinit vsc_sata_init_one (struct pci_dev *pdev, const struct pci_d
385 396
386 probe_ent->sht = &vsc_sata_sht; 397 probe_ent->sht = &vsc_sata_sht;
387 probe_ent->host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | 398 probe_ent->host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
388 ATA_FLAG_MMIO | ATA_FLAG_SATA_RESET; 399 ATA_FLAG_MMIO;
389 probe_ent->port_ops = &vsc_sata_ops; 400 probe_ent->port_ops = &vsc_sata_ops;
390 probe_ent->n_ports = 4; 401 probe_ent->n_ports = 4;
391 probe_ent->irq = pdev->irq; 402 probe_ent->irq = pdev->irq;
@@ -433,13 +444,14 @@ err_out:
433 444
434 445
435/* 446/*
436 * 0x1725/0x7174 is the Vitesse VSC-7174 447 * Intel 31244 is supposed to be identical.
437 * 0x8086/0x3200 is the Intel 31244, which is supposed to be identical 448 * Compatibility is untested as of yet.
438 * compatibility is untested as of yet
439 */ 449 */
440static const struct pci_device_id vsc_sata_pci_tbl[] = { 450static const struct pci_device_id vsc_sata_pci_tbl[] = {
441 { 0x1725, 0x7174, PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 }, 451 { PCI_VENDOR_ID_VITESSE, PCI_DEVICE_ID_VITESSE_VSC7174,
442 { 0x8086, 0x3200, PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 }, 452 PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 },
453 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_GD31244,
454 PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 },
443 { } 455 { }
444}; 456};
445 457