diff options
| author | David S. Miller <davem@davemloft.net> | 2011-12-02 13:49:21 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2011-12-02 13:49:21 -0500 |
| commit | b3613118eb30a589d971e4eccbbb2a1314f5dfd4 (patch) | |
| tree | 868c1ee59e1b5c19a4f2e43716400d0001a994e5 /drivers/usb/storage | |
| parent | 7505afe28c16a8d386624930a018d0052c75d687 (diff) | |
| parent | 5983fe2b29df5885880d7fa3b91aca306c7564ef (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/usb/storage')
| -rw-r--r-- | drivers/usb/storage/ene_ub6250.c | 3 | ||||
| -rw-r--r-- | drivers/usb/storage/protocol.c | 7 |
2 files changed, 4 insertions, 6 deletions
diff --git a/drivers/usb/storage/ene_ub6250.c b/drivers/usb/storage/ene_ub6250.c index 4dca3ef0668c..9fbe742343c6 100644 --- a/drivers/usb/storage/ene_ub6250.c +++ b/drivers/usb/storage/ene_ub6250.c @@ -1762,10 +1762,9 @@ static int ms_scsi_write(struct us_data *us, struct scsi_cmnd *srb) result = ene_send_scsi_cmd(us, FDIR_WRITE, scsi_sglist(srb), 1); } else { void *buf; - int offset; + int offset = 0; u16 PhyBlockAddr; u8 PageNum; - u32 result; u16 len, oldphy, newphy; buf = kmalloc(blenByte, GFP_KERNEL); diff --git a/drivers/usb/storage/protocol.c b/drivers/usb/storage/protocol.c index 93c1a4d86f51..82dd834709c7 100644 --- a/drivers/usb/storage/protocol.c +++ b/drivers/usb/storage/protocol.c @@ -59,7 +59,9 @@ 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 @@ -67,9 +69,6 @@ void usb_stor_pad12_command(struct scsi_cmnd *srb, struct us_data *us) 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); } |
