
On Tuesday, January 18, 2011 11:54:22 pm Reinhard Meyer wrote:
Dear Marcel,
Well,you're supposed to do some basic code reading yourself.
Of course. It's always the idea to post a question after reading for some time. It either means I don't understand the code, the code really doesn't work or I did miss the most important part in the documents. I guess the answer will follow once the issue is solved. To be specific, I work with the u-boot-usb at91-cdc branch code. I'm not sure if that is all working code at this moment but sounded like the best starting point for my USB code.
Not sure that branch is anything up to date....
hmmm. What branch is best to work on for this code ?
req->buf = (u8 *) NetRxPackets[0];
*maybe* "req" itself is not allocated?
Good question. My code that rejects the buffer is this :
static int usba_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags) { struct usba_request *req = container_of(_req, struct usba_request, req); struct usba_ep *ep = container_of(_ep, struct usba_ep, ep); struct usba_udc *udc = ep->udc; int ret;
debug("%s: queue req %p, len %u\n", ep->ep.name, req, _req->length);
if (!_req || !_req->complete || !_req->buf || !list_empty(&req->queue)) {
DBG("invalid request\n"); if(!_req) debug("NO REQUEST\n"); if(!_req->complete) debug("NO REQUEST COMPLETE\n"); if(!_req->buf) debug("NO REQUEST BUF\n"); if(!list_empty(&req->queue)) debug("NO LIST EMPTY\n"); return -EINVAL; }
It just keeps failing with "NO REQUEST BUF". I feel like I'm staring at a typo for days and just don't see it.
regards, Marcel