Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 95819
b: refs/heads/master
c: c3a3b55
h: refs/heads/master
i:
  95817: 135fd10
  95815: 26c80fa
v: v3
  • Loading branch information
Brian King authored and James Bottomley committed Apr 30, 2008
1 parent 84f7325 commit ccfe2cf
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 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: 61d7416a286e840d905c18b1e6b0977c036c8656
refs/heads/master: c3a3b55ae80a0d595445064159c69f8e80911e85
5 changes: 4 additions & 1 deletion trunk/drivers/scsi/ibmvscsi/ibmvscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ static void handle_cmd_rsp(struct srp_event_struct *evt_struct)
}

if (cmnd) {
cmnd->result = rsp->status;
cmnd->result |= rsp->status;
if (((cmnd->result >> 1) & 0x1f) == CHECK_CONDITION)
memcpy(cmnd->sense_buffer,
rsp->data,
Expand Down Expand Up @@ -730,6 +730,7 @@ static int ibmvscsi_queuecommand(struct scsi_cmnd *cmnd,
u16 lun = lun_from_dev(cmnd->device);
u8 out_fmt, in_fmt;

cmnd->result = (DID_OK << 16);
evt_struct = get_event_struct(&hostdata->pool);
if (!evt_struct)
return SCSI_MLQUEUE_HOST_BUSY;
Expand Down Expand Up @@ -1347,6 +1348,8 @@ void ibmvscsi_handle_crq(struct viosrp_crq *crq,

del_timer(&evt_struct->timer);

if (crq->status != VIOSRP_OK && evt_struct->cmnd)
evt_struct->cmnd->result = DID_ERROR << 16;
if (evt_struct->done)
evt_struct->done(evt_struct);
else
Expand Down
9 changes: 9 additions & 0 deletions trunk/drivers/scsi/ibmvscsi/viosrp.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ enum viosrp_crq_formats {
VIOSRP_INLINE_FORMAT = 0x07
};

enum viosrp_crq_status {
VIOSRP_OK = 0x0,
VIOSRP_NONRECOVERABLE_ERR = 0x1,
VIOSRP_VIOLATES_MAX_XFER = 0x2,
VIOSRP_PARTNER_PANIC = 0x3,
VIOSRP_DEVICE_BUSY = 0x8,
VIOSRP_ADAPTER_FAIL = 0x10
};

struct viosrp_crq {
u8 valid; /* used by RPA */
u8 format; /* SCSI vs out-of-band */
Expand Down

0 comments on commit ccfe2cf

Please sign in to comment.