The UAS protocol does not encode the transfer direction. It should be learned from the cdb. This patch temporary stores the direction in a reserved field until I figure out how to obtain this information from target Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> --- drivers/usb/storage/uas.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 1d10d5b..680bea9 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers/usb/storage/uas.c @@ -337,6 +337,11 @@ static struct urb *uas_alloc_cmd_urb(struct uas_dev_info *devinfo, gfp_t gfp, iu->tag = cpu_to_be16(stream_id); iu->prio_attr = UAS_SIMPLE_TAG; iu->len = len; + + /* XXX */ + iu->rsvd5 = cmnd->sc_data_direction; + /* XXX */ + int_to_scsilun(sdev->lun, &iu->lun); memcpy(iu->cdb, cmnd->cmnd, cmnd->cmd_len); -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html