Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188347
b: refs/heads/master
c: 95aa060
h: refs/heads/master
i:
  188345: 3bb874f
  188343: 205695b
v: v3
  • Loading branch information
Krishna Gudipati authored and James Bottomley committed Mar 7, 2010
1 parent 6914d1d commit 1b7c86d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 25e2934c26f5efaea156c9fda4457d01a8bb44e1
refs/heads/master: 95aa060decd2472d319c3f12b0b1b699a5f35058
14 changes: 12 additions & 2 deletions trunk/drivers/scsi/bfa/bfad_im.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ bfa_cb_ioim_done(void *drv, struct bfad_ioim_s *dio,
struct bfad_s *bfad = drv;
struct bfad_itnim_data_s *itnim_data;
struct bfad_itnim_s *itnim;
u8 host_status = DID_OK;

switch (io_status) {
case BFI_IOIM_STS_OK:
bfa_trc(bfad, scsi_status);
cmnd->result = ScsiResult(DID_OK, scsi_status);
scsi_set_resid(cmnd, 0);

if (sns_len > 0) {
Expand All @@ -56,8 +56,18 @@ bfa_cb_ioim_done(void *drv, struct bfad_ioim_s *dio,
sns_len = SCSI_SENSE_BUFFERSIZE;
memcpy(cmnd->sense_buffer, sns_info, sns_len);
}
if (residue > 0)
if (residue > 0) {
bfa_trc(bfad, residue);
scsi_set_resid(cmnd, residue);
if (!sns_len && (scsi_status == SAM_STAT_GOOD) &&
(scsi_bufflen(cmnd) - residue) <
cmnd->underflow) {
bfa_trc(bfad, 0);
host_status = DID_ERROR;
}
}
cmnd->result = ScsiResult(host_status, scsi_status);

break;

case BFI_IOIM_STS_ABORTED:
Expand Down

0 comments on commit 1b7c86d

Please sign in to comment.