]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mpt2sas: Fix the race between broadcast asyn event and scsi command completion
authorKashyap, Desai <kashyap.desai@lsi.com>
Wed, 5 Jan 2011 12:24:32 +0000 (17:54 +0530)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 17 Feb 2011 23:14:00 +0000 (15:14 -0800)
commiteedb86c397aa721ed72b6df0ee7263199d5cd683
treea1d7872b9fc10bea5e37d3a3032b254139a38648
parent6093ad9cb8c50534132f63a5c70ed846e16e4511
mpt2sas: Fix the race between broadcast asyn event and scsi command completion

commit ec07a053597bdab51cbd23619f9f9f392712508a upstream.

False timeout after hard resets, there were two issues which leads
to timeout.
(1) Panic because of invalid memory access in the broadcast asyn
event processing routine due to a race between accessing the scsi command
pointer from broadcast asyn event processing thread and completing
the same scsi command from the interrupt context.
(2)  Broadcast asyn event notifcations are not handled due to events
ignored while the broadcast asyn event is activity being processed
from the event process kernel thread.

In addition, changed the ABRT_TASK_SET to ABORT_TASK in the
broadcast async event processing routine.   This is less disruptive to other
request that generate Broadcast Asyn Primitives besides target
reset. e.g clear reservations, microcode download,and mode select.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/scsi/mpt2sas/mpt2sas_scsih.c