[PATCH] USB: net2280 short rx status fix
authorDavid Brownell <david-b@pacbell.net>
Sun, 2 Apr 2006 18:18:53 +0000 (10:18 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 14 Apr 2006 18:12:24 +0000 (11:12 -0700)
Some patch broke short-OUT packet handling for net2280, making it report
illegal status values.  This updates the status code so it's correct.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/net2280.c

index 7682c07035bded7412de9f00201c3e5c36cb0b9a..6a4b93ad10828da994dd9322b6d87e5345170680 100644 (file)
@@ -2241,7 +2241,8 @@ static void handle_ep_small (struct net2280_ep *ep)
                        if (likely (req)) {
                                req->td->dmacount = 0;
                                t = readl (&ep->regs->ep_avail);
-                               dma_done (ep, req, count, t);
+                               dma_done (ep, req, count,
+                                       (ep->out_overflow || t) ? -EOVERFLOW : 0);
                        }
 
                        /* also flush to prevent erratum 0106 trouble */