>> In file_storage.c, send_status(), if (transport_is_bbb()), I add the >> line >> bh->inreq->buf = bh -> buf, >> >> and in get_next_command(), if (transport_is_bbb()), I add the line >> bh->outreq->context = bh, to make the bh address to be the same. >> >> Is this patch ok? > What patch? You didn't post a patch, just a description of some changes. >> victor >> >> -----Original Message----- >> From: victor [mailto:victor@xxxxxxxxxxx] >> Sent: Wednesday, 31 October, 2012 1:04 PM >> To: 'linux-usb@xxxxxxxxxxxxxxx' >> Subject: Linux USB gadget mass storage >> >> Hi, >> >> I am using Linux USB gadget mass storage. I meet with problem in >> file_storage.c. The bh->outreq->context in get_next_command() is not >> equal to bh. > do_set_interface() sets bh->inreq->buf to bh->buf and > bh->outreq->context to bh. Does anything ever change these values? >Alan Stern Alan, The partial patch is here. In fact I am using file_storage.c in u-boot, the context and buf pointer are mismatch when the value is returned back from irq routine. The file-storage.c is not in u-boot release, so I post my question on linux usb. I am sorry if it is not the right place to post. @@ -2151,19 +2160,16 @@ struct bulk_cs_wrap *csw = bh->buf; /* Store and send the Bulk-only CSW */ - csw->Signature = cpu_to_le32(USB_BULK_CS_SIG); + csw->Signature = cpu_to_le32(US_BULK_CS_SIGN); csw->Tag = fsg->tag; csw->Residue = cpu_to_le32(fsg->residue); csw->Status = status; - bh->inreq->length = USB_BULK_CS_WRAP_LEN; + bh->inreq->length = US_BULK_CS_WRAP_LEN; bh->inreq->zero = 0; - bh->inreq->buf = bh->buf; start_transfer(fsg, fsg->bulk_in, bh->inreq, &bh->inreq_busy, &bh->state); Thanks, victor ================================================================================================ CONFIDENTIALITY NOTE: This e-mail and any attachments may contain confidential information and may be protected by legal privilege. If you are not the intended addressee (or authorized to receive for the addressee). be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please notify us immediately by returning it to the sender and delete this copy from your system. Thank you for your cooperation. KeyASIC Inc. ================================================================================================ -- 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