mirror of
https://git.FreeBSD.org/src.git
synced 2026-06-02 11:24:32 +00:00
Port over the SCSI sense handling fix from mpr(4) in r342528, and fix
whitespace to match.
This commit is contained in:
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=342660
@@ -1043,10 +1043,12 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data)
|
||||
if (((MPI2_SCSI_IO_REPLY *)rpl)->SCSIState &
|
||||
MPI2_SCSI_STATE_AUTOSENSE_VALID) {
|
||||
sense_len =
|
||||
MIN((le32toh(((MPI2_SCSI_IO_REPLY *)rpl)->SenseCount)),
|
||||
sizeof(struct scsi_sense_data));
|
||||
MIN((le32toh(((MPI2_SCSI_IO_REPLY *)rpl)->
|
||||
SenseCount)), sizeof(struct
|
||||
scsi_sense_data));
|
||||
mps_unlock(sc);
|
||||
copyout(cm->cm_sense, cm->cm_req + 64, sense_len);
|
||||
copyout(cm->cm_sense, (PTRIN(data->PtrReply +
|
||||
sizeof(MPI2_SCSI_IO_REPLY))), sense_len);
|
||||
mps_lock(sc);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user