[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 <eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
Eric Moore 2009-04-21 15:43:33 -06:00 committed by James Bottomley
parent 99bb214b1b
commit 6f92a7a0af

View file

@ -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;