1
0
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:
Scott Long
2018-12-31 23:30:31 +00:00
parent e94a449387
commit 808a5e94da
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=342660
+5 -3
View File
@@ -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);
}
}