Hye,
I use the g_file_storage gadget and I've got problem with this function:
static int received_cbw(struct fsg_dev *fsg, struct fsg_buffhd *bh)
{
...
/* Save the command for later */
fsg->cmnd_size = cbw->Length;
memcpy(fsg->cmnd, cbw->CDB, fsg->cmnd_size);
if (cbw->Flags & USB_BULK_IN_FLAG)
fsg->data_dir = DATA_DIR_TO_HOST;
else
fsg->data_dir = DATA_DIR_FROM_HOST;
fsg->data_size = cbw->DataTransferLength;
if (fsg->data_size == 0)
fsg->data_dir = DATA_DIR_NONE;
sg->lun = cbw->Lun;
fsg->tag = cbw->Tag;
}
since cbw->DataTransferLength and cbw->Tag are both u32
It works better when I use:
fsg->data_size = cpu_to_le32(cbw->DataTransferLength);
...
fsg->tag = cpu_to_le32(cbw->Tag);
Am I rigth?
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel