diff options
Diffstat (limited to 'drivers/usb/storage/protocol.c')
-rw-r--r-- | drivers/usb/storage/protocol.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/storage/protocol.c b/drivers/usb/storage/protocol.c index fc310f75ead..82dd834709c 100644 --- a/drivers/usb/storage/protocol.c +++ b/drivers/usb/storage/protocol.c | |||
@@ -43,6 +43,7 @@ | |||
43 | */ | 43 | */ |
44 | 44 | ||
45 | #include <linux/highmem.h> | 45 | #include <linux/highmem.h> |
46 | #include <linux/export.h> | ||
46 | #include <scsi/scsi.h> | 47 | #include <scsi/scsi.h> |
47 | #include <scsi/scsi_cmnd.h> | 48 | #include <scsi/scsi_cmnd.h> |
48 | 49 | ||
@@ -58,7 +59,9 @@ | |||
58 | 59 | ||
59 | void usb_stor_pad12_command(struct scsi_cmnd *srb, struct us_data *us) | 60 | void usb_stor_pad12_command(struct scsi_cmnd *srb, struct us_data *us) |
60 | { | 61 | { |
61 | /* Pad the SCSI command with zeros out to 12 bytes | 62 | /* |
63 | * Pad the SCSI command with zeros out to 12 bytes. If the | ||
64 | * command already is 12 bytes or longer, leave it alone. | ||
62 | * | 65 | * |
63 | * NOTE: This only works because a scsi_cmnd struct field contains | 66 | * NOTE: This only works because a scsi_cmnd struct field contains |
64 | * a unsigned char cmnd[16], so we know we have storage available | 67 | * a unsigned char cmnd[16], so we know we have storage available |
@@ -66,9 +69,6 @@ void usb_stor_pad12_command(struct scsi_cmnd *srb, struct us_data *us) | |||
66 | for (; srb->cmd_len<12; srb->cmd_len++) | 69 | for (; srb->cmd_len<12; srb->cmd_len++) |
67 | srb->cmnd[srb->cmd_len] = 0; | 70 | srb->cmnd[srb->cmd_len] = 0; |
68 | 71 | ||
69 | /* set command length to 12 bytes */ | ||
70 | srb->cmd_len = 12; | ||
71 | |||
72 | /* send the command to the transport layer */ | 72 | /* send the command to the transport layer */ |
73 | usb_stor_invoke_transport(srb, us); | 73 | usb_stor_invoke_transport(srb, us); |
74 | } | 74 | } |