From bfb2c965d669045b7629fd577b7834c87c2dfd54 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Thu, 29 Jun 2006 22:27:36 -0700 Subject: USB: Allow compile in g_ether, fix typo Allows compiling g_ether in and fixes a typo with MUSB_HDRC Signed-off-by: Tony Lindgren Cc: David Brownell Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/ether.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/usb/gadget/ether.c') diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index 30299c620d9..fed484da593 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -262,7 +262,7 @@ MODULE_PARM_DESC(host_addr, "Host Ethernet Address"); #define DEV_CONFIG_CDC #endif -#ifdef CONFIG_USB_GADGET_MUSBHDRC +#ifdef CONFIG_USB_GADGET_MUSB_HDRC #define DEV_CONFIG_CDC #endif @@ -2564,7 +2564,7 @@ static struct usb_gadget_driver eth_driver = { .function = (char *) driver_desc, .bind = eth_bind, - .unbind = __exit_p(eth_unbind), + .unbind = eth_unbind, .setup = eth_setup, .disconnect = eth_disconnect, -- cgit v1.2.3 From 55359021b9a75a6d61a49ca8b9a1209793cd55f7 Mon Sep 17 00:00:00 2001 From: Eric Sesterhenn Date: Mon, 21 Aug 2006 15:31:05 -0700 Subject: USB: fix signedness issue in drivers/usb/gadget/ether.c another gcc 4.1 signdness warning: drivers/usb/gadget/ether.c:2028: warning: comparison of unsigned expression < 0 is always false length is assigned the value of usb_ep_queue() which returns an int. Directly after this it is checked for < 0, which can never be true. Making length an int makes the error check work again. Signed-off-by: Eric Sesterhenn Acked-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/ether.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/usb/gadget/ether.c') diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index fed484da593..1cc3c0227d1 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -2014,7 +2014,7 @@ rndis_control_ack_complete (struct usb_ep *ep, struct usb_request *req) static int rndis_control_ack (struct net_device *net) { struct eth_dev *dev = netdev_priv(net); - u32 length; + int length; struct usb_request *resp = dev->stat_req; /* in case RNDIS calls this after disconnect */ -- cgit v1.2.3 From 729ed6d502b45fd3b5c3b21c3ceaa63a8fe7cc43 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Wed, 30 Aug 2006 13:24:56 -0700 Subject: USB: ethernet gadget avoids zlps for musb_hdrc For systems using the Mentor HDRC controllers we get better TX DMA throughput if we can avoid falling back to PIO to write zero length packets ... so tell the driver to avoid ZLPs. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/ether.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/usb/gadget/ether.c') diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index 1cc3c0227d1..366dc0a9e52 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -2230,6 +2230,9 @@ eth_bind (struct usb_gadget *gadget) if (gadget_is_pxa (gadget)) { /* pxa doesn't support altsettings */ cdc = 0; + } else if (gadget_is_musbhdrc(gadget)) { + /* reduce tx dma overhead by avoiding special cases */ + zlp = 0; } else if (gadget_is_sh(gadget)) { /* sh doesn't support multiple interfaces or configs */ cdc = 0; -- cgit v1.2.3