Commit 6f92a7a0 authored by Eric Moore's avatar Eric Moore Committed by James Bottomley

[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: default avatarEric Moore <eric.moore@lsi.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 99bb214b
...@@ -119,7 +119,7 @@ struct sense_info { ...@@ -119,7 +119,7 @@ struct sense_info {
*/ */
struct fw_event_work { struct fw_event_work {
struct list_head list; struct list_head list;
struct delayed_work work; struct work_struct work;
struct MPT2SAS_ADAPTER *ioc; struct MPT2SAS_ADAPTER *ioc;
u8 VF_ID; u8 VF_ID;
u8 host_reset_handling; u8 host_reset_handling;
...@@ -2007,8 +2007,8 @@ _scsih_fw_event_add(struct MPT2SAS_ADAPTER *ioc, struct fw_event_work *fw_event) ...@@ -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); spin_lock_irqsave(&ioc->fw_event_lock, flags);
list_add_tail(&fw_event->list, &ioc->fw_event_list); list_add_tail(&fw_event->list, &ioc->fw_event_list);
INIT_DELAYED_WORK(&fw_event->work, _firmware_event_work); INIT_WORK(&fw_event->work, _firmware_event_work);
queue_delayed_work(ioc->firmware_event_thread, &fw_event->work, 1); queue_work(ioc->firmware_event_thread, &fw_event->work);
spin_unlock_irqrestore(&ioc->fw_event_lock, flags); spin_unlock_irqrestore(&ioc->fw_event_lock, flags);
} }
...@@ -2052,7 +2052,7 @@ _scsih_fw_event_requeue(struct MPT2SAS_ADAPTER *ioc, struct fw_event_work ...@@ -2052,7 +2052,7 @@ _scsih_fw_event_requeue(struct MPT2SAS_ADAPTER *ioc, struct fw_event_work
return; return;
spin_lock_irqsave(&ioc->fw_event_lock, flags); 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); spin_unlock_irqrestore(&ioc->fw_event_lock, flags);
} }
...@@ -4961,7 +4961,7 @@ static void ...@@ -4961,7 +4961,7 @@ static void
_firmware_event_work(struct work_struct *work) _firmware_event_work(struct work_struct *work)
{ {
struct fw_event_work *fw_event = container_of(work, struct fw_event_work *fw_event = container_of(work,
struct fw_event_work, work.work); struct fw_event_work, work);
unsigned long flags; unsigned long flags;
struct MPT2SAS_ADAPTER *ioc = fw_event->ioc; struct MPT2SAS_ADAPTER *ioc = fw_event->ioc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment