freebsd-skq/sys/dev/mps
Kenneth D. Merry ec99409e7e Fix mps(4) driver breakage that came in in change 253550 that
manifested itself in out of chain frame conditions.

When the driver ran out of chain frames, the request in question
would get completed early, and go through mpssas_scsiio_complete().

In mpssas_scsiio_complete(), the negation of the CAM status values
(CAM_STATUS_MASK | CAM_SIM_QUEUED) was ORed in instead of being
ANDed in.  This resulted in a bogus CAM CCB status value.  This
didn't show up in the non-error case, because the status was reset
to something valid (e.g. CAM_REQ_CMP) later on in the function.

But in the error case, such as when the driver ran out of chain
frames, the CAM_REQUEUE_REQ status was ORed in to the bogus status
value.  This led to the CAM transport layer repeatedly releasing
the SIM queue, because it though that the CAM_RELEASE_SIMQ flag had
been set.  The symptom was messages like this on the console when
INVARIANTS were enabled:

xpt_release_simq: requested 1 > present 0
xpt_release_simq: requested 1 > present 0
xpt_release_simq: requested 1 > present 0

mps_sas.c:	In mpssas_scsiio_complete(), use &= to take status
		bits out.  |= adds them in.

		In the error case in mpssas_scsiio_complete(), set
		the status to CAM_REQUEUE_REQ, don't OR it in.

MFC after:	3 days
Sponsored by:	Spectra Logic
2013-08-21 21:30:56 +00:00
..
mpi Bring in LSI's latest mps(4) 6Gb SAS and WarpDrive driver, version 2012-06-28 03:48:54 +00:00
mps_config.c Merge in phase 14+ -> 16 mps driver fixes from LSI: 2013-07-22 18:41:53 +00:00
mps_ioctl.h Bring in LSI's latest mps(4) 6Gb SAS and WarpDrive driver, version 2012-06-28 03:48:54 +00:00
mps_mapping.c Merge in phase 14+ -> 16 mps driver fixes from LSI: 2013-07-22 18:41:53 +00:00
mps_mapping.h Bring in LSI's latest mps(4) 6Gb SAS and WarpDrive driver, version 2012-06-28 03:48:54 +00:00
mps_pci.c Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCI 2013-08-12 23:30:01 +00:00
mps_sas_lsi.c Sometimes a device misbehaves so badly that it disrupts the entire system. 2013-08-09 01:09:02 +00:00
mps_sas.c Fix mps(4) driver breakage that came in in change 253550 that 2013-08-21 21:30:56 +00:00
mps_sas.h Sometimes a device misbehaves so badly that it disrupts the entire system. 2013-08-09 01:09:02 +00:00
mps_table.c Overhaul error, information, and debug logging. 2013-07-19 00:12:41 +00:00
mps_table.h
mps_user.c Merge in phase 14+ -> 16 mps driver fixes from LSI: 2013-07-22 18:41:53 +00:00
mps.c Rate limit the 'out of chain frame' messages to once per 60 seconds. 2013-08-09 01:10:33 +00:00
mpsvar.h Rate limit the 'out of chain frame' messages to once per 60 seconds. 2013-08-09 01:10:33 +00:00