Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jun 2020 14:48:20 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r362057 - stable/12/sys/dev/mps
Message-ID:  <202006111448.05BEmKUI025555@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Thu Jun 11 14:48:20 2020
New Revision: 362057
URL: https://svnweb.freebsd.org/changeset/base/362057

Log:
  MFC r342660 (by scottl):
  Port over the SCSI sense handling fix from mpr(4) in r342528, and fix
  whitespace to match.
  
  PR:		223813
  Reported and tested by:	farrokhi

Modified:
  stable/12/sys/dev/mps/mps_user.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/mps/mps_user.c
==============================================================================
--- stable/12/sys/dev/mps/mps_user.c	Thu Jun 11 14:31:51 2020	(r362056)
+++ stable/12/sys/dev/mps/mps_user.c	Thu Jun 11 14:48:20 2020	(r362057)
@@ -1036,10 +1036,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?202006111448.05BEmKUI025555>