diff options
author | Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> | 2013-08-23 16:00:09 +0530 |
---|---|---|
committer | Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> | 2013-08-23 16:00:09 +0530 |
commit | 9545b3dc96bf235007692ba9a14c90082c747852 (patch) | |
tree | d9562730ecb9677215af680946d380a701dadae0 /slof/fs/usb | |
parent | 7eca6a5e56f468a58e1ef1feb8bd8705b6273e9d (diff) | |
download | SLOF-9545b3dc96bf235007692ba9a14c90082c747852.zip SLOF-9545b3dc96bf235007692ba9a14c90082c747852.tar.gz SLOF-9545b3dc96bf235007692ba9a14c90082c747852.tar.bz2 |
usb-storage: Fix cbwflags field
SCSI layer represents DIR as TRUE or FALSE, and for SLOF TRUE is -1
and FALSE is 0, convert that to proper direction when building the
CBW
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Diffstat (limited to 'slof/fs/usb')
-rw-r--r-- | slof/fs/usb/dev-storage.fs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/slof/fs/usb/dev-storage.fs b/slof/fs/usb/dev-storage.fs index bacf41c..f014114 100644 --- a/slof/fs/usb/dev-storage.fs +++ b/slof/fs/usb/dev-storage.fs @@ -145,6 +145,12 @@ CONSTANT cbw-length cbw-addr cbw-length erase ( tag xfer-len dir lun cmd-len ) cbw-addr cbw>cblen c! ( tag xfer-len dir lun ) cbw-addr cbw>lun c! ( tag xfer-len dir ) + \ dir is true or false + \ bmCBWFlags + \ BIT 7 Direction + \ 0 - OUT + \ 1 - IN + IF 80 ELSE 0 THEN cbw-addr cbw>flags c! ( tag xfer-len ) cbw-addr cbw>len l!-le ( tag ) cbw-addr cbw>tag l!-le ( ) |