[SCSI] qla4xxx: Reduce rom-lock contention during reset recovery.
authorVikas Chaudhary <vikas.chaudhary@qlogic.com>
Mon, 16 Dec 2013 11:49:45 +0000 (06:49 -0500)
committerJames Bottomley <JBottomley@Parallels.com>
Sat, 15 Mar 2014 17:19:14 +0000 (10:19 -0700)
commit4ebbb5cf640c5240cafde732c56fe24a5514bf8d
tree9a588617ff7978c2ded8e777feb85c4cd6d473c5
parent58e2bbe9851668a031afc678433040f6eaea4cb3
[SCSI] qla4xxx: Reduce rom-lock contention during reset recovery.

Issue:
Driver holds rom-lock for too long during reset recovery.

During adapter reset testing, it was found that the driver
holds the rom-lock for too long, because of which other
drivers fail to acquire the rom-lock, leading to reset
failures.
The primary cause is, in the bootstrap code, while
holding the rom-lock, the driver checks if the peg is
halted, causing a 2 second contention.

Fix:
When a reset recovery starts, the driver deduces the cause, and
sets appropriate flags in watchdog & recover_adapter routines.
This flag should be used to determine if bootstrap is invoked
from probe or reset context, reducing the rom-lock footprint of
the drivers.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/qla4xxx/ql4_nx.c