Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77088
b: refs/heads/master
c: 2d4b63e
h: refs/heads/master
v: v3
  • Loading branch information
James Bottomley authored and James Bottomley committed Jan 12, 2008
1 parent d9c6ab6 commit ea10bca
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b98e66fa0b687149dc3b26179096dc542c7d5001
refs/heads/master: 2d4b63e1505b317d4253cee3f2970792ec6d41cb
19 changes: 19 additions & 0 deletions trunk/drivers/scsi/libsas/sas_expander.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@ static int smp_execute_task(struct domain_device *dev, void *req, int req_size,
task->task_status.stat == SAM_GOOD) {
res = 0;
break;
} if (task->task_status.resp == SAS_TASK_COMPLETE &&
task->task_status.stat == SAS_DATA_UNDERRUN) {
/* no error, but return the number of bytes of
* underrun */
res = task->task_status.residual;
break;
} if (task->task_status.resp == SAS_TASK_COMPLETE &&
task->task_status.stat == SAS_DATA_OVERRUN) {
res = -EMSGSIZE;
break;
} else {
SAS_DPRINTK("%s: task to dev %016llx response: 0x%x "
"status 0x%x\n", __FUNCTION__,
Expand Down Expand Up @@ -1924,6 +1934,15 @@ int sas_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,

ret = smp_execute_task(dev, bio_data(req->bio), req->data_len,
bio_data(rsp->bio), rsp->data_len);
if (ret > 0) {
/* positive number is the untransferred residual */
rsp->data_len = ret;
req->data_len = 0;
ret = 0;
} else if (ret == 0) {
rsp->data_len = 0;
req->data_len = 0;
}

return ret;
}

0 comments on commit ea10bca

Please sign in to comment.