diff options
author | marius <marius@FreeBSD.org> | 2011-10-13 20:06:19 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2011-10-13 20:06:19 +0000 |
commit | 03f042f32ea4a1b4d4867c8d56885f1f29f8b5b0 (patch) | |
tree | c06ee1d9af97642c074b8b2f67c22e536ea6a8fb /sys/dev/mfi | |
parent | 9d926ddf66d0bdefacfd2f642dd15d42f3a2194b (diff) | |
download | FreeBSD-src-03f042f32ea4a1b4d4867c8d56885f1f29f8b5b0.zip FreeBSD-src-03f042f32ea4a1b4d4867c8d56885f1f29f8b5b0.tar.gz |
Merge from r225950:
Set the sense residual properly.
Reviewed by: ken
Diffstat (limited to 'sys/dev/mfi')
-rw-r--r-- | sys/dev/mfi/mfi_cam.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/mfi/mfi_cam.c b/sys/dev/mfi/mfi_cam.c index 747b6c0..c49daff 100644 --- a/sys/dev/mfi/mfi_cam.c +++ b/sys/dev/mfi/mfi_cam.c @@ -354,7 +354,13 @@ mfip_done(struct mfi_command *cm) ccbh->status = CAM_SCSI_STATUS_ERROR | CAM_AUTOSNS_VALID; csio->scsi_status = pt->header.scsi_status; - sense_len = min(pt->header.sense_len, sizeof(struct scsi_sense_data)); + if (pt->header.sense_len < csio->sense_len) + csio->sense_resid = csio->sense_len - + pt->header.sense_len; + else + csio->sense_resid = 0; + sense_len = min(pt->header.sense_len, + sizeof(struct scsi_sense_data)); bzero(&csio->sense_data, sizeof(struct scsi_sense_data)); bcopy(&cm->cm_sense->data[0], &csio->sense_data, sense_len); break; |