Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7957
b: refs/heads/master
c: 0f64e07
h: refs/heads/master
i:
  7955: 5e5c294
v: v3
  • Loading branch information
Matthew Dharm authored and Greg Kroah-Hartman committed Sep 8, 2005
1 parent 0e010e0 commit b66e508
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 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: 9a57116bc9e36c9accc869f666e1d25c5e2cdcbf
refs/heads/master: 0f64e078139109d1902e5b1274c23cec9a9ad12e
10 changes: 2 additions & 8 deletions trunk/drivers/usb/storage/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,6 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us)
unsigned char old_sc_data_direction;
unsigned char old_cmd_len;
unsigned char old_cmnd[MAX_COMMAND_SIZE];
unsigned long old_serial_number;
int old_resid;

US_DEBUGP("Issuing auto-REQUEST_SENSE\n");
Expand Down Expand Up @@ -648,10 +647,6 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us)
old_sg = srb->use_sg;
srb->use_sg = 0;

/* change the serial number -- toggle the high bit*/
old_serial_number = srb->serial_number;
srb->serial_number ^= 0x80000000;

/* issue the auto-sense command */
old_resid = srb->resid;
srb->resid = 0;
Expand All @@ -662,7 +657,6 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us)
srb->request_buffer = old_request_buffer;
srb->request_bufflen = old_request_bufflen;
srb->use_sg = old_sg;
srb->serial_number = old_serial_number;
srb->sc_data_direction = old_sc_data_direction;
srb->cmd_len = old_cmd_len;
memcpy(srb->cmnd, old_cmnd, MAX_COMMAND_SIZE);
Expand Down Expand Up @@ -985,7 +979,7 @@ int usb_stor_Bulk_transport(struct scsi_cmnd *srb, struct us_data *us)
bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN);
bcb->DataTransferLength = cpu_to_le32(transfer_length);
bcb->Flags = srb->sc_data_direction == DMA_FROM_DEVICE ? 1 << 7 : 0;
bcb->Tag = srb->serial_number;
bcb->Tag = ++us->tag;
bcb->Lun = srb->device->lun;
if (us->flags & US_FL_SCM_MULT_TARG)
bcb->Lun |= srb->device->id << 4;
Expand Down Expand Up @@ -1074,7 +1068,7 @@ int usb_stor_Bulk_transport(struct scsi_cmnd *srb, struct us_data *us)
US_DEBUGP("Bulk Status S 0x%x T 0x%x R %u Stat 0x%x\n",
le32_to_cpu(bcs->Signature), bcs->Tag,
residue, bcs->Status);
if (bcs->Tag != srb->serial_number || bcs->Status > US_BULK_STAT_PHASE) {
if (bcs->Tag != us->tag || bcs->Status > US_BULK_STAT_PHASE) {
US_DEBUGP("Bulk logical error\n");
return USB_STOR_TRANSPORT_ERROR;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/usb/storage/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ struct us_data {

/* SCSI interfaces */
struct scsi_cmnd *srb; /* current srb */
unsigned int tag; /* current dCBWTag */

/* thread information */
int pid; /* control thread */
Expand Down

0 comments on commit b66e508

Please sign in to comment.