Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19112
b: refs/heads/master
c: 1d12d98
h: refs/heads/master
v: v3
  • Loading branch information
Guennadi Liakhovetski authored and James Bottomley committed Jan 26, 2006
1 parent 3f17165 commit d345e80
Show file tree
Hide file tree
Showing 2 changed files with 6 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: 2b541f8f77fd339e4c5c5cbe8549b52445012704
refs/heads/master: 1d12d98d284665c37b75b9538916b5fbb8fcde37
6 changes: 5 additions & 1 deletion trunk/drivers/scsi/dc395x.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ struct ScsiReqBlk {
* total_xfer_length in xferred. These values are restored in
* pci_unmap_srb_sense. This is the only place xferred is used.
*/
unsigned char *virt_addr_req; /* Saved virtual address of the request buffer */
u32 xferred; /* Saved copy of total_xfer_length */

u16 state;
Expand Down Expand Up @@ -2017,7 +2018,7 @@ static void sg_update_list(struct ScsiReqBlk *srb, u32 left)
sg_verify_length(srb);

/* we need the corresponding virtual address */
if (!segment) {
if (!segment || (srb->flag & AUTO_REQSENSE)) {
srb->virt_addr += xferred;
return;
}
Expand Down Expand Up @@ -3318,6 +3319,7 @@ static void pci_unmap_srb_sense(struct AdapterCtlBlk *acb,
srb->segment_x[DC395x_MAX_SG_LISTENTRY - 1].address;
srb->segment_x[0].length =
srb->segment_x[DC395x_MAX_SG_LISTENTRY - 1].length;
srb->virt_addr = srb->virt_addr_req;
}


Expand Down Expand Up @@ -3711,6 +3713,8 @@ static void request_sense(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb,
srb->xferred = srb->total_xfer_length;
/* srb->segment_x : a one entry of S/G list table */
srb->total_xfer_length = sizeof(cmd->sense_buffer);
srb->virt_addr_req = srb->virt_addr;
srb->virt_addr = cmd->sense_buffer;
srb->segment_x[0].length = sizeof(cmd->sense_buffer);
/* Map sense buffer */
srb->segment_x[0].address =
Expand Down

0 comments on commit d345e80

Please sign in to comment.