]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/message/fusion/mptsas.c
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[mv-sheeva.git] / drivers / message / fusion / mptsas.c
index 73229ff9cafa0080b38a9cb19a73f2b7486bc830..9d9504298549d147133e107a1d66c1a74440c3eb 100644 (file)
@@ -290,10 +290,11 @@ mptsas_add_fw_event(MPT_ADAPTER *ioc, struct fw_event_work *fw_event,
        spin_lock_irqsave(&ioc->fw_event_lock, flags);
        list_add_tail(&fw_event->list, &ioc->fw_event_list);
        INIT_DELAYED_WORK(&fw_event->work, mptsas_firmware_event_work);
-       devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: add (fw_event=0x%p)\n",
-           ioc->name, __func__, fw_event));
-       queue_delayed_work(ioc->fw_event_q, &fw_event->work,
-           delay);
+       devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: add (fw_event=0x%p)"
+               "on cpuid %d\n", ioc->name, __func__,
+               fw_event, smp_processor_id()));
+       queue_delayed_work_on(smp_processor_id(), ioc->fw_event_q,
+           &fw_event->work, delay);
        spin_unlock_irqrestore(&ioc->fw_event_lock, flags);
 }
 
@@ -305,10 +306,11 @@ mptsas_requeue_fw_event(MPT_ADAPTER *ioc, struct fw_event_work *fw_event,
        unsigned long flags;
        spin_lock_irqsave(&ioc->fw_event_lock, flags);
        devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: reschedule task "
-           "(fw_event=0x%p)\n", ioc->name, __func__, fw_event));
+           "(fw_event=0x%p)on cpuid %d\n", ioc->name, __func__,
+               fw_event, smp_processor_id()));
        fw_event->retries++;
-       queue_delayed_work(ioc->fw_event_q, &fw_event->work,
-           msecs_to_jiffies(delay));
+       queue_delayed_work_on(smp_processor_id(), ioc->fw_event_q,
+           &fw_event->work, msecs_to_jiffies(delay));
        spin_unlock_irqrestore(&ioc->fw_event_lock, flags);
 }
 
@@ -1948,6 +1950,15 @@ static enum blk_eh_timer_return mptsas_eh_timed_out(struct scsi_cmnd *sc)
                goto done;
        }
 
+       /* In case if IOC is in reset from internal context.
+       *  Do not execute EEH for the same IOC. SML should to reset timer.
+       */
+       if (ioc->ioc_reset_in_progress) {
+               dtmprintk(ioc, printk(MYIOC_s_WARN_FMT ": %s: ioc is in reset,"
+                   "SML need to reset the timer (sc=%p)\n",
+                   ioc->name, __func__, sc));
+               rc = BLK_EH_RESET_TIMER;
+       }
        vdevice = sc->device->hostdata;
        if (vdevice && vdevice->vtarget && (vdevice->vtarget->inDMD
                || vdevice->vtarget->deleted)) {
@@ -5147,6 +5158,8 @@ mptsas_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        ioc->TaskCtx = mptsasTaskCtx;
        ioc->InternalCtx = mptsasInternalCtx;
        ioc->schedule_target_reset = &mptsas_schedule_target_reset;
+       ioc->schedule_dead_ioc_flush_running_cmds =
+                               &mptscsih_flush_running_cmds;
        /*  Added sanity check on readiness of the MPT adapter.
         */
        if (ioc->last_state != MPI_IOC_STATE_OPERATIONAL) {