Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275826
b: refs/heads/master
c: 2f640bf
h: refs/heads/master
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Nov 15, 2011
1 parent e40e140 commit 7dd283a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 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: 0d145d7d4a241c321c832a810bb6edad18e2217b
refs/heads/master: 2f640bf4c94324aeaa1b6385c10aab8c5ad1e1cf
7 changes: 3 additions & 4 deletions trunk/drivers/usb/storage/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,16 @@

void usb_stor_pad12_command(struct scsi_cmnd *srb, struct us_data *us)
{
/* Pad the SCSI command with zeros out to 12 bytes
/*
* Pad the SCSI command with zeros out to 12 bytes. If the
* command already is 12 bytes or longer, leave it alone.
*
* NOTE: This only works because a scsi_cmnd struct field contains
* a unsigned char cmnd[16], so we know we have storage available
*/
for (; srb->cmd_len<12; srb->cmd_len++)
srb->cmnd[srb->cmd_len] = 0;

/* set command length to 12 bytes */
srb->cmd_len = 12;

/* send the command to the transport layer */
usb_stor_invoke_transport(srb, us);
}
Expand Down

0 comments on commit 7dd283a

Please sign in to comment.