]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/sata_vsc.c
[PATCH] SCSI: make scsi_implement_eh() generic API for SCSI transports
[linux-2.6-omap-h63xx.git] / drivers / scsi / sata_vsc.c
index 9701a806539da8bc056e6ea5a59dfd907c1ce7d0..0372be7ff1c924fc5b66a17aa8ab073325c72b34 100644 (file)
@@ -221,20 +221,27 @@ static irqreturn_t vsc_sata_interrupt (int irq, void *dev_instance,
 
                        ap = host_set->ports[i];
 
-                       if (ap && !(ap->flags &
-                                   (ATA_FLAG_PORT_DISABLED|ATA_FLAG_NOINTR))) {
+                       if (is_vsc_sata_int_err(i, int_status)) {
+                               u32 err_status;
+                               printk(KERN_DEBUG "%s: ignoring interrupt(s)\n", __FUNCTION__);
+                               err_status = ap ? vsc_sata_scr_read(ap, SCR_ERROR) : 0;
+                               vsc_sata_scr_write(ap, SCR_ERROR, err_status);
+                               handled++;
+                       }
+
+                       if (ap && !(ap->flags & ATA_FLAG_DISABLED)) {
                                struct ata_queued_cmd *qc;
 
                                qc = ata_qc_from_tag(ap, ap->active_tag);
-                               if (qc && (!(qc->tf.ctl & ATA_NIEN))) {
+                               if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING)))
                                        handled += ata_host_intr(ap, qc);
-                               else if (is_vsc_sata_int_err(i, int_status)) {
+                               else if (is_vsc_sata_int_err(i, int_status)) {
                                        /*
-                                        * On some chips (i.e. Intel 31244), an error 
+                                        * On some chips (i.e. Intel 31244), an error
                                         * interrupt will sneak in at initialization
                                         * time (phy state changes).  Clearing the SCR
                                         * error register is not required, but it prevents
-                                        * the phy state change interrupts from recurring 
+                                        * the phy state change interrupts from recurring
                                         * later.
                                         */
                                        u32 err_status;
@@ -263,7 +270,6 @@ static struct scsi_host_template vsc_sata_sht = {
        .name                   = DRV_NAME,
        .ioctl                  = ata_scsi_ioctl,
        .queuecommand           = ata_scsi_queuecmd,
-       .eh_strategy_handler    = ata_scsi_error,
        .can_queue              = ATA_DEF_QUEUE,
        .this_id                = ATA_SHT_THIS_ID,
        .sg_tablesize           = LIBATA_MAX_PRD,