]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.3-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Mar 2012 18:44:42 +0000 (11:44 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Mar 2012 18:44:42 +0000 (11:44 -0700)
added patches:
staging-vme-fix-section-mismatches-in-linux-next-20120314.patch
usb-dwc3-fix-bogus-test-in-dwc3_gadget_start_isoc.patch
usb-dwc3-gadget-don-t-wrap-around-the-trb-poll-on-non-isoc.patch
usb-dwc3-make-dwc3_get_device_id-return-the-id.patch
usb-dwc3-use-proper-function-for-setting-endpoint-name.patch

queue-3.3/series
queue-3.3/staging-vme-fix-section-mismatches-in-linux-next-20120314.patch [new file with mode: 0644]
queue-3.3/usb-dwc3-fix-bogus-test-in-dwc3_gadget_start_isoc.patch [new file with mode: 0644]
queue-3.3/usb-dwc3-gadget-don-t-wrap-around-the-trb-poll-on-non-isoc.patch [new file with mode: 0644]
queue-3.3/usb-dwc3-make-dwc3_get_device_id-return-the-id.patch [new file with mode: 0644]
queue-3.3/usb-dwc3-use-proper-function-for-setting-endpoint-name.patch [new file with mode: 0644]

index 0f6ae6857c021e8a9244c1bf9f6f94790745bea2..23ae6cd0a249729f20ed5844d515e627f12b76ec 100644 (file)
@@ -14,3 +14,8 @@ usb-ftdi_sio-new-pid-lumel-pd12.patch
 powerpc-usb-fix-bug-of-kernel-hang-when-initializing-usb.patch
 staging-r8712u-fix-regression-introduced-by-commit-a5ee652.patch
 staging-r8712u-fix-regression-in-signal-level-after-commit-c6dc001.patch
+usb-dwc3-make-dwc3_get_device_id-return-the-id.patch
+usb-dwc3-gadget-don-t-wrap-around-the-trb-poll-on-non-isoc.patch
+usb-dwc3-fix-bogus-test-in-dwc3_gadget_start_isoc.patch
+usb-dwc3-use-proper-function-for-setting-endpoint-name.patch
+staging-vme-fix-section-mismatches-in-linux-next-20120314.patch
diff --git a/queue-3.3/staging-vme-fix-section-mismatches-in-linux-next-20120314.patch b/queue-3.3/staging-vme-fix-section-mismatches-in-linux-next-20120314.patch
new file mode 100644 (file)
index 0000000..07b59c9
--- /dev/null
@@ -0,0 +1,54 @@
+From bf3a85be67068a0f55804349e6e1dce80008c45c Mon Sep 17 00:00:00 2001
+From: Gerard Snitselaar <dev@snitselaar.org>
+Date: Thu, 15 Mar 2012 01:50:39 -0700
+Subject: staging: vme: fix section mismatches in linux-next 20120314
+
+From: Gerard Snitselaar <dev@snitselaar.org>
+
+commit bf3a85be67068a0f55804349e6e1dce80008c45c upstream.
+
+pio2_gpio_init() annotated with __init, but called by pio2_probe()
+which is annotated __devinit. pio2_gpio_exit() is annotated __exit,
+but is called by pio2_probe() and by pio2_remove() which is annotated
+__devexit.
+
+Signed-off-by: Gerard Snitselaar <dev@snitselaar.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/vme/devices/vme_pio2.h      |    4 ++--
+ drivers/staging/vme/devices/vme_pio2_gpio.c |    4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/staging/vme/devices/vme_pio2.h
++++ b/drivers/staging/vme/devices/vme_pio2.h
+@@ -243,7 +243,7 @@ struct pio2_card {
+ int pio2_cntr_reset(struct pio2_card *);
+ int pio2_gpio_reset(struct pio2_card *);
+-int __init pio2_gpio_init(struct pio2_card *);
+-void __exit pio2_gpio_exit(struct pio2_card *);
++int __devinit pio2_gpio_init(struct pio2_card *);
++void pio2_gpio_exit(struct pio2_card *);
+ #endif /* _VME_PIO2_H_ */
+--- a/drivers/staging/vme/devices/vme_pio2_gpio.c
++++ b/drivers/staging/vme/devices/vme_pio2_gpio.c
+@@ -187,7 +187,7 @@ int pio2_gpio_reset(struct pio2_card *ca
+       return 0;
+ }
+-int __init pio2_gpio_init(struct pio2_card *card)
++int __devinit pio2_gpio_init(struct pio2_card *card)
+ {
+       int retval = 0;
+       char *label;
+@@ -220,7 +220,7 @@ int __init pio2_gpio_init(struct pio2_ca
+       return retval;
+ };
+-void __exit pio2_gpio_exit(struct pio2_card *card)
++void pio2_gpio_exit(struct pio2_card *card)
+ {
+       const char *label = card->gc.label;
diff --git a/queue-3.3/usb-dwc3-fix-bogus-test-in-dwc3_gadget_start_isoc.patch b/queue-3.3/usb-dwc3-fix-bogus-test-in-dwc3_gadget_start_isoc.patch
new file mode 100644 (file)
index 0000000..de07bd1
--- /dev/null
@@ -0,0 +1,52 @@
+From 9bafa56c7cee5c6fa68de5924220abb220c7e229 Mon Sep 17 00:00:00 2001
+From: Paul Zimmerman <Paul.Zimmerman@synopsys.com>
+Date: Fri, 17 Feb 2012 14:10:16 -0800
+Subject: usb: dwc3: fix bogus test in dwc3_gadget_start_isoc
+
+From: Paul Zimmerman <Paul.Zimmerman@synopsys.com>
+
+commit 9bafa56c7cee5c6fa68de5924220abb220c7e229 upstream.
+
+Zero is a valid value for a microframe number. So remove the bogus
+test for non-zero in dwc3_gadget_start_isoc().
+
+Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/dwc3/gadget.c |   16 +++++-----------
+ 1 file changed, 5 insertions(+), 11 deletions(-)
+
+--- a/drivers/usb/dwc3/gadget.c
++++ b/drivers/usb/dwc3/gadget.c
+@@ -1498,7 +1498,7 @@ static void dwc3_endpoint_transfer_compl
+ static void dwc3_gadget_start_isoc(struct dwc3 *dwc,
+               struct dwc3_ep *dep, const struct dwc3_event_depevt *event)
+ {
+-      u32 uf;
++      u32 uf, mask;
+       if (list_empty(&dep->request_list)) {
+               dev_vdbg(dwc->dev, "ISOC ep %s run out for requests.\n",
+@@ -1506,16 +1506,10 @@ static void dwc3_gadget_start_isoc(struc
+               return;
+       }
+-      if (event->parameters) {
+-              u32 mask;
+-
+-              mask = ~(dep->interval - 1);
+-              uf = event->parameters & mask;
+-              /* 4 micro frames in the future */
+-              uf += dep->interval * 4;
+-      } else {
+-              uf = 0;
+-      }
++      mask = ~(dep->interval - 1);
++      uf = event->parameters & mask;
++      /* 4 micro frames in the future */
++      uf += dep->interval * 4;
+       __dwc3_gadget_kick_transfer(dep, uf, 1);
+ }
diff --git a/queue-3.3/usb-dwc3-gadget-don-t-wrap-around-the-trb-poll-on-non-isoc.patch b/queue-3.3/usb-dwc3-gadget-don-t-wrap-around-the-trb-poll-on-non-isoc.patch
new file mode 100644 (file)
index 0000000..b63e06d
--- /dev/null
@@ -0,0 +1,46 @@
+From 8d62cd65d74d0e241b3a152f7347bb66126b705b Mon Sep 17 00:00:00 2001
+From: Paul Zimmerman <paulz@synopsys.com>
+Date: Wed, 15 Feb 2012 13:35:06 +0200
+Subject: usb: dwc3: gadget: don't wrap around the TRB poll on non-ISOC
+
+From: Paul Zimmerman <paulz@synopsys.com>
+
+commit 8d62cd65d74d0e241b3a152f7347bb66126b705b upstream.
+
+If we have a non-ISOC endpoint, we will not have a Link TRB
+pointing to the beginning of the TRB pool. On such endpoints,
+we don't want to let the driver wrap around the TRB pool
+otherwise controller will hang waiting for a valid TRB.
+
+Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/dwc3/gadget.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/drivers/usb/dwc3/gadget.c
++++ b/drivers/usb/dwc3/gadget.c
+@@ -667,6 +667,7 @@ static void dwc3_prepare_trbs(struct dwc
+ {
+       struct dwc3_request     *req, *n;
+       u32                     trbs_left;
++      u32                     max;
+       unsigned int            last_one = 0;
+       BUILD_BUG_ON_NOT_POWER_OF_2(DWC3_TRB_NUM);
+@@ -674,6 +675,13 @@ static void dwc3_prepare_trbs(struct dwc
+       /* the first request must not be queued */
+       trbs_left = (dep->busy_slot - dep->free_slot) & DWC3_TRB_MASK;
++      /* Can't wrap around on a non-isoc EP since there's no link TRB */
++      if (!usb_endpoint_xfer_isoc(dep->desc)) {
++              max = DWC3_TRB_NUM - (dep->free_slot & DWC3_TRB_MASK);
++              if (trbs_left > max)
++                      trbs_left = max;
++      }
++
+       /*
+        * if busy & slot are equal than it is either full or empty. If we are
+        * starting to proceed requests then we are empty. Otherwise we ar
diff --git a/queue-3.3/usb-dwc3-make-dwc3_get_device_id-return-the-id.patch b/queue-3.3/usb-dwc3-make-dwc3_get_device_id-return-the-id.patch
new file mode 100644 (file)
index 0000000..3f15916
--- /dev/null
@@ -0,0 +1,30 @@
+From 075cd14d2a8d35afc39ad28fc7b968275881266b Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Sat, 4 Feb 2012 16:37:14 +0300
+Subject: usb: dwc3: make dwc3_get_device_id() return the id
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit 075cd14d2a8d35afc39ad28fc7b968275881266b upstream.
+
+We always return zero instead of the id we found.
+
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/dwc3/core.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/dwc3/core.c
++++ b/drivers/usb/dwc3/core.c
+@@ -86,7 +86,7 @@ again:
+               id = -ENOMEM;
+       }
+-      return 0;
++      return id;
+ }
+ EXPORT_SYMBOL_GPL(dwc3_get_device_id);
diff --git a/queue-3.3/usb-dwc3-use-proper-function-for-setting-endpoint-name.patch b/queue-3.3/usb-dwc3-use-proper-function-for-setting-endpoint-name.patch
new file mode 100644 (file)
index 0000000..b6704f5
--- /dev/null
@@ -0,0 +1,43 @@
+From 27a78d6a283d6782438f72306746afe4bf44c215 Mon Sep 17 00:00:00 2001
+From: Anton Tikhomirov <av.tikhomirov@samsung.com>
+Date: Thu, 23 Feb 2012 15:38:46 +0900
+Subject: usb: dwc3: use proper function for setting endpoint name
+
+From: Anton Tikhomirov <av.tikhomirov@samsung.com>
+
+commit 27a78d6a283d6782438f72306746afe4bf44c215 upstream.
+
+It's wrong to use the size of array as an argument for strncat.
+Memory corruption is possible. strlcat is exactly what we need here.
+
+Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/dwc3/gadget.c |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/usb/dwc3/gadget.c
++++ b/drivers/usb/dwc3/gadget.c
+@@ -485,16 +485,16 @@ static int dwc3_gadget_ep_enable(struct
+       switch (usb_endpoint_type(desc)) {
+       case USB_ENDPOINT_XFER_CONTROL:
+-              strncat(dep->name, "-control", sizeof(dep->name));
++              strlcat(dep->name, "-control", sizeof(dep->name));
+               break;
+       case USB_ENDPOINT_XFER_ISOC:
+-              strncat(dep->name, "-isoc", sizeof(dep->name));
++              strlcat(dep->name, "-isoc", sizeof(dep->name));
+               break;
+       case USB_ENDPOINT_XFER_BULK:
+-              strncat(dep->name, "-bulk", sizeof(dep->name));
++              strlcat(dep->name, "-bulk", sizeof(dep->name));
+               break;
+       case USB_ENDPOINT_XFER_INT:
+-              strncat(dep->name, "-int", sizeof(dep->name));
++              strlcat(dep->name, "-int", sizeof(dep->name));
+               break;
+       default:
+               dev_err(dwc->dev, "invalid endpoint transfer type\n");