Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Dec 2018 23:30:31 +0000 (UTC)
From:      Scott Long <scottl@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r342660 - head/sys/dev/mps
Message-ID:  <201812312330.wBVNUVx5074486@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: scottl
Date: Mon Dec 31 23:30:31 2018
New Revision: 342660
URL: https://svnweb.freebsd.org/changeset/base/342660

Log:
  Port over the SCSI sense handling fix from mpr(4) in r342528, and fix
  whitespace to match.

Modified:
  head/sys/dev/mps/mps_user.c

Modified: head/sys/dev/mps/mps_user.c
==============================================================================
--- head/sys/dev/mps/mps_user.c	Mon Dec 31 23:27:56 2018	(r342659)
+++ head/sys/dev/mps/mps_user.c	Mon Dec 31 23:30:31 2018	(r342660)
@@ -1043,10 +1043,12 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru
 			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);
 			}
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812312330.wBVNUVx5074486>