Date: Thu, 11 Jun 2020 14:49:38 +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-11@freebsd.org Subject: svn commit: r362058 - stable/11/sys/dev/mps Message-ID: <202006111449.05BEncQc025665@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Thu Jun 11 14:49:38 2020 New Revision: 362058 URL: https://svnweb.freebsd.org/changeset/base/362058 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/11/sys/dev/mps/mps_user.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mps/mps_user.c ============================================================================== --- stable/11/sys/dev/mps/mps_user.c Thu Jun 11 14:48:20 2020 (r362057) +++ stable/11/sys/dev/mps/mps_user.c Thu Jun 11 14:49:38 2020 (r362058) @@ -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?202006111449.05BEncQc025665>