[PATCH -stable] fix USB_STORAGE_CYPRESS_ATACB
From: matthieu castet
Date: Mon Dec 29 2008 - 13:15:38 EST
Hi,
64a87b244b9297667ca80264aab849a36f494884 broke USB_STORAGE_CYPRESS_ATACB
translation.
Could it be applied to kernel-stable ?
Matthieu
64a87b244b9297667ca80264aab849a36f494884 commit change the scsi_eh_prep_cmnd logic by making it clear the ->cmnd buffer.
But the sat to cypress atacb translation supposed the ->cmnd buffer wasn't modified.
This patch makes it set the ->cmnd buffer after scsi_eh_prep_cmnd call.
Signed-off-by: Matthieu CASTET <castet.matthieu@xxxxxxx>
diff --git a/drivers/usb/storage/cypress_atacb.c b/drivers/usb/storage/cypress_atacb.c
index 898e67d..526c9aa 100644
--- a/drivers/usb/storage/cypress_atacb.c
+++ b/drivers/usb/storage/cypress_atacb.c
@@ -143,6 +143,8 @@ void cypress_atacb_passthrough(struct scsi_cmnd *srb, struct us_data *us)
* the read taskfile bit, for not executing atacb command,
* but reading register selected in srb->cmnd[4]
*/
+ srb->cmd_len = 16;
+ memcpy(srb->cmnd, ses.cmnd, srb->cmd_len);
srb->cmnd[2] = 1;
usb_stor_transparent_scsi_command(srb, us);