From 6f92a7a0aff413cdf42955a187647e3736ebd8f3 Mon Sep 17 00:00:00 2001 From: Eric Moore Date: Tue, 21 Apr 2009 15:43:33 -0600 Subject: [SCSI] mpt2sas: fix hotplug event processing Here's a fix for hotplug events. The useage of queue_delayed_work seems to broke the fifo for processing of firmware events. After several iterations of adding and removing cabling connected to jbods, the devices are not getting added becuase kernel thread is activited out of order. Signed-off-by: Eric Moore Signed-off-by: James Bottomley --- drivers/scsi/mpt2sas/mpt2sas_scsih.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c index 4dffbec79355..e3a7967259e7 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c @@ -119,7 +119,7 @@ struct sense_info { */ struct fw_event_work { struct list_head list; - struct delayed_work work; + struct work_struct work; struct MPT2SAS_ADAPTER *ioc; u8 VF_ID; u8 host_reset_handling; @@ -2007,8 +2007,8 @@ _scsih_fw_event_add(struct MPT2SAS_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, _firmware_event_work); - queue_delayed_work(ioc->firmware_event_thread, &fw_event->work, 1); + INIT_WORK(&fw_event->work, _firmware_event_work); + queue_work(ioc->firmware_event_thread, &fw_event->work); spin_unlock_irqrestore(&ioc->fw_event_lock, flags); } @@ -2052,7 +2052,7 @@ _scsih_fw_event_requeue(struct MPT2SAS_ADAPTER *ioc, struct fw_event_work return; spin_lock_irqsave(&ioc->fw_event_lock, flags); - queue_delayed_work(ioc->firmware_event_thread, &fw_event->work, delay); + queue_work(ioc->firmware_event_thread, &fw_event->work); spin_unlock_irqrestore(&ioc->fw_event_lock, flags); } @@ -4961,7 +4961,7 @@ static void _firmware_event_work(struct work_struct *work) { struct fw_event_work *fw_event = container_of(work, - struct fw_event_work, work.work); + struct fw_event_work, work); unsigned long flags; struct MPT2SAS_ADAPTER *ioc = fw_event->ioc; -- cgit v1.2.3