Copy back the Sense data at proper location expected by the application
typedef struct mps_pass_thru { uint64_t PtrRequest; uint64_t PtrReply; uint64_t PtrData; uint32_t RequestSize; uint32_t ReplySize; uint32_t DataSize; uint32_t DataDirection; uint64_t PtrDataOut; uint32_t DataOutSize; uint32_t Timeout; } mps_pass_thru_t, * ptrmpssas_pass_thru_t; In the above mps_pass_thru structure; Application expects PrtReply buffer should contain both MPI reply followed by sense data. So, updated driver to copy sense data at PtrReply + sizeof(MPI2 reply) location where application wants the driver to copy back the sense data info. Submitted by: Sreekanth Reddy <sreekanth.reddy@broadcom.com> Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com> Approved by: ken MFC after: 3 days Sponsored by: Broadcom Inc
This commit is contained in:
parent
8736c018d2
commit
23daf8f40b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=342528
@ -1106,7 +1106,8 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data)
|
||||
SenseCount)), sizeof(struct
|
||||
scsi_sense_data));
|
||||
mpr_unlock(sc);
|
||||
copyout(cm->cm_sense, cm->cm_req + 64,
|
||||
copyout(cm->cm_sense,
|
||||
(PTRIN(data->PtrReply + sizeof(MPI2_SCSI_IO_REPLY))),
|
||||
sense_len);
|
||||
mpr_lock(sc);
|
||||
}
|
||||
@ -1140,7 +1141,9 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data)
|
||||
sz = MIN(le32toh(nvme_error_reply->ErrorResponseCount),
|
||||
NVME_ERROR_RESPONSE_SIZE);
|
||||
mpr_unlock(sc);
|
||||
copyout(cm->cm_sense, cm->nvme_error_response, sz);
|
||||
copyout(cm->cm_sense,
|
||||
(PTRIN(data->PtrReply +
|
||||
sizeof(MPI2_SCSI_IO_REPLY))), sz);
|
||||
mpr_lock(sc);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user