Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
Port over the SCSI sense handling fix from mpr(4) in r342528, and fix
Browse files Browse the repository at this point in the history
whitespace to match.
  • Loading branch information
scottl authored and scottl committed Dec 31, 2018
1 parent 52b7a21 commit 632c359
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sys/dev/mps/mps_user.c
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 632c359

Please sign in to comment.