aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2006-03-13 23:36:52 -0500
committerDmitry Torokhov <dtor_core@ameritech.net>2006-03-13 23:36:52 -0500
commit58a343f22e8ef987b90e34bbef7f1455e3bb5a15 (patch)
treefc811fb570639f2083df6d9191b6a8d7cff65352 /drivers/usb/gadget
parent51c38f9bce274a1e8a90aa457fb433be738f7458 (diff)
parent3759fa9c55923f719ae944a3f8fbb029b36f759d (diff)
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/lh7a40x_udc.c6
-rw-r--r--drivers/usb/gadget/rndis.c11
2 files changed, 11 insertions, 6 deletions
diff --git a/drivers/usb/gadget/lh7a40x_udc.c b/drivers/usb/gadget/lh7a40x_udc.c
index e02fea5a5433..1a362c5e7f3d 100644
--- a/drivers/usb/gadget/lh7a40x_udc.c
+++ b/drivers/usb/gadget/lh7a40x_udc.c
@@ -1062,11 +1062,11 @@ static int lh7a40x_ep_enable(struct usb_ep *_ep,
1062 ep->pio_irqs = 0; 1062 ep->pio_irqs = 0;
1063 ep->ep.maxpacket = le16_to_cpu(desc->wMaxPacketSize); 1063 ep->ep.maxpacket = le16_to_cpu(desc->wMaxPacketSize);
1064 1064
1065 spin_unlock_irqrestore(&ep->dev->lock, flags);
1066
1065 /* Reset halt state (does flush) */ 1067 /* Reset halt state (does flush) */
1066 lh7a40x_set_halt(_ep, 0); 1068 lh7a40x_set_halt(_ep, 0);
1067 1069
1068 spin_unlock_irqrestore(&ep->dev->lock, flags);
1069
1070 DEBUG("%s: enabled %s\n", __FUNCTION__, _ep->name); 1070 DEBUG("%s: enabled %s\n", __FUNCTION__, _ep->name);
1071 return 0; 1071 return 0;
1072} 1072}
@@ -1775,6 +1775,7 @@ static void lh7a40x_ep0_setup(struct lh7a40x_udc *dev, u32 csr)
1775 break; 1775 break;
1776 1776
1777 qep = &dev->ep[ep_num]; 1777 qep = &dev->ep[ep_num];
1778 spin_unlock(&dev->lock);
1778 if (ctrl.bRequest == USB_REQ_SET_FEATURE) { 1779 if (ctrl.bRequest == USB_REQ_SET_FEATURE) {
1779 DEBUG_SETUP("SET_FEATURE (%d)\n", 1780 DEBUG_SETUP("SET_FEATURE (%d)\n",
1780 ep_num); 1781 ep_num);
@@ -1784,6 +1785,7 @@ static void lh7a40x_ep0_setup(struct lh7a40x_udc *dev, u32 csr)
1784 ep_num); 1785 ep_num);
1785 lh7a40x_set_halt(&qep->ep, 0); 1786 lh7a40x_set_halt(&qep->ep, 0);
1786 } 1787 }
1788 spin_lock(&dev->lock);
1787 usb_set_index(0); 1789 usb_set_index(0);
1788 1790
1789 /* Reply with a ZLP on next IN token */ 1791 /* Reply with a ZLP on next IN token */
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c
index 9689efeb364c..6d6eaad73968 100644
--- a/drivers/usb/gadget/rndis.c
+++ b/drivers/usb/gadget/rndis.c
@@ -853,11 +853,14 @@ static int rndis_query_response (int configNr, rndis_query_msg_type *buf)
853 // DEBUG("%s: OID = %08X\n", __FUNCTION__, cpu_to_le32(buf->OID)); 853 // DEBUG("%s: OID = %08X\n", __FUNCTION__, cpu_to_le32(buf->OID));
854 if (!rndis_per_dev_params [configNr].dev) return -ENOTSUPP; 854 if (!rndis_per_dev_params [configNr].dev) return -ENOTSUPP;
855 855
856 /* 856 /*
857 * we need more memory: 857 * we need more memory:
858 * oid_supported_list is the largest answer 858 * gen_ndis_query_resp expects enough space for
859 * rndis_query_cmplt_type followed by data.
860 * oid_supported_list is the largest data reply
859 */ 861 */
860 r = rndis_add_response (configNr, sizeof (oid_supported_list)); 862 r = rndis_add_response (configNr,
863 sizeof (oid_supported_list) + sizeof(rndis_query_cmplt_type));
861 if (!r) 864 if (!r)
862 return -ENOMEM; 865 return -ENOMEM;
863 resp = (rndis_query_cmplt_type *) r->buf; 866 resp = (rndis_query_cmplt_type *) r->buf;