linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	alan@lxorguk.ukuu.org.uk,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Alan Stern <stern@rowland.harvard.edu>,
	Felipe Balbi <balbi@ti.com>
Subject: [ 62/71] usb: gadget: dummy: fix enumeration with g_multi
Date: Tue, 15 Jan 2013 14:54:59 -0800	[thread overview]
Message-ID: <20130115225344.870485257@linuxfoundation.org> (raw)
In-Reply-To: <20130115225340.367496998@linuxfoundation.org>

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

commit 1d16638e3b9cc195bac18a8fcbca748f33c1bc24 upstream.

If we do have endpoints named like "ep-a" then bEndpointAddress is
counted internally by the gadget framework.

If we do have endpoints named like "ep-1" then bEndpointAddress is
assigned from the digit after "ep-".

If we do have both, then it is likely that after we used up the
"generic" endpoints we will use the digits and thus assign one
bEndpointAddress to multiple endpoints.

This theory can be proofed by using the completely enabled g_multi.
Without this patch, the mass storage won't enumerate and times out
because it shares endpoints with RNDIS.

This patch also adds fills up the endpoints list so we have in total
endpoints 1 to 15 in + out available while some of them are restricted
to certain types like BULK or ISO. Without this change the nokia gadget
won't load because the system does not provide enough (BULK) endpoints
but it did before ep-a - ep-f were removed.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/gadget/dummy_hcd.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -122,10 +122,7 @@ static const char ep0name [] = "ep0";
 static const char *const ep_name [] = {
 	ep0name,				/* everyone has ep0 */
 
-	/* act like a net2280: high speed, six configurable endpoints */
-	"ep-a", "ep-b", "ep-c", "ep-d", "ep-e", "ep-f",
-
-	/* or like pxa250: fifteen fixed function endpoints */
+	/* act like a pxa250: fifteen fixed function endpoints */
 	"ep1in-bulk", "ep2out-bulk", "ep3in-iso", "ep4out-iso", "ep5in-int",
 	"ep6in-bulk", "ep7out-bulk", "ep8in-iso", "ep9out-iso", "ep10in-int",
 	"ep11in-bulk", "ep12out-bulk", "ep13in-iso", "ep14out-iso",
@@ -133,6 +130,10 @@ static const char *const ep_name [] = {
 
 	/* or like sa1100: two fixed function endpoints */
 	"ep1out-bulk", "ep2in-bulk",
+
+	/* and now some generic EPs so we have enough in multi config */
+	"ep3out", "ep4in", "ep5out", "ep6out", "ep7in", "ep8out", "ep9in",
+	"ep10out", "ep11out", "ep12in", "ep13out", "ep14in", "ep15out",
 };
 #define DUMMY_ENDPOINTS	ARRAY_SIZE(ep_name)
 



  parent reply	other threads:[~2013-01-15 22:57 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-15 22:53 [ 00/71] 3.0.59-stable review Greg Kroah-Hartman
2013-01-15 22:53 ` [ 01/71] powerpc: Fix CONFIG_RELOCATABLE=y CONFIG_CRASH_DUMP=n build Greg Kroah-Hartman
2013-01-15 22:53 ` [ 02/71] powerpc/vdso: Remove redundant locking in update_vsyscall_tz() Greg Kroah-Hartman
2013-01-15 22:54 ` [ 03/71] s390/cio: fix pgid reserved check Greg Kroah-Hartman
2013-01-15 22:54 ` [ 04/71] mm: compaction: fix echo 1 > compact_memory return error issue Greg Kroah-Hartman
2013-01-15 22:54 ` [ 05/71] mm: use aligned zone start for pfn_to_bitidx calculation Greg Kroah-Hartman
2013-01-15 22:54 ` [ 06/71] Revert "ath9k_hw: Update AR9003 high_power tx gain table" Greg Kroah-Hartman
2013-01-15 22:54 ` [ 07/71] ath9k: ar9003: fix OTP register offsets for AR9340 Greg Kroah-Hartman
2013-01-15 22:54 ` [ 08/71] firewire: net: Fix handling of fragmented multicast/broadcast packets Greg Kroah-Hartman
2013-01-15 22:54 ` [ 09/71] SCSI: mvsas: fix undefined bit shift Greg Kroah-Hartman
2013-01-15 22:54 ` [ 10/71] SCSI: qla2xxx: Test and clear FCPORT_UPDATE_NEEDED atomically Greg Kroah-Hartman
2013-01-15 22:54 ` [ 11/71] sata_promise: fix hardreset lockdep error Greg Kroah-Hartman
2013-01-15 22:54 ` [ 12/71] libata: set dma_mode to 0xff in reset Greg Kroah-Hartman
2013-01-15 22:54 ` [ 13/71] libata: fix Null pointer dereference on disk error Greg Kroah-Hartman
2013-01-15 22:54 ` [ 14/71] target/tcm_fc: fix the lockdep warning due to inconsistent lock state Greg Kroah-Hartman
2013-01-15 22:54 ` [ 15/71] mfd: Only unregister platform devices allocated by the mfd core Greg Kroah-Hartman
2013-01-15 22:54 ` [ 16/71] ext4: fix memory leak in ext4_xattr_set_acl()s error path Greg Kroah-Hartman
2013-01-15 22:54 ` [ 17/71] SUNRPC: Ensure that we free the rpc_task after cleanups are done Greg Kroah-Hartman
2013-01-15 22:54 ` [ 18/71] SUNRPC: Ensure we release the socket write lock if the rpc_task exits early Greg Kroah-Hartman
2013-01-17 15:14   ` Herton Ronaldo Krzesinski
2013-01-17 16:03     ` Greg Kroah-Hartman
2013-01-15 22:54 ` [ 19/71] jffs2: hold erase_completion_lock on exit Greg Kroah-Hartman
2013-01-15 22:54 ` [ 20/71] i2400m: add Intel 6150 device IDs Greg Kroah-Hartman
2013-01-15 22:54 ` [ 21/71] drm/i915: make the panel fitter work on pipes B and C on IVB Greg Kroah-Hartman
2013-01-15 22:54 ` [ 22/71] RDMA/nes: Fix for crash when registering zero length MR for CQ Greg Kroah-Hartman
2013-01-15 22:54 ` [ 23/71] RDMA/nes: Fix for terminate timer crash Greg Kroah-Hartman
2013-01-15 22:54 ` [ 24/71] ring-buffer: Fix race between integrity check and readers Greg Kroah-Hartman
2013-01-17 20:02   ` Herton Ronaldo Krzesinski
2013-01-15 22:54 ` [ 25/71] dm ioctl: prevent unsafe change to dm_ioctl data_size Greg Kroah-Hartman
2013-01-15 22:54 ` [ 26/71] staging: vt6656: [BUG] out of bound array reference in RFbSetPower Greg Kroah-Hartman
2013-01-15 22:54 ` [ 27/71] staging: vt6656: 64 bit fixes: use u32 for QWORD definition Greg Kroah-Hartman
2013-01-15 22:54 ` [ 28/71] staging: vt6656: 64 bit fixes : correct all type sizes Greg Kroah-Hartman
2013-01-15 22:54 ` [ 29/71] staging: vt6656: 64 bit fixes: fix long warning messages Greg Kroah-Hartman
2013-01-15 22:54 ` [ 30/71] staging: vt6656: 64bit fixes: key.c/h change unsigned long to u32 Greg Kroah-Hartman
2013-01-15 22:54 ` [ 31/71] staging: vt6656: 64bit fixes: vCommandTimerWait change calculation of timer Greg Kroah-Hartman
2013-01-15 22:54 ` [ 32/71] video: mxsfb: fix crash when unblanking the display Greg Kroah-Hartman
2013-01-15 22:54 ` [ 33/71] ext4: fix extent tree corruption caused by hole punch Greg Kroah-Hartman
2013-01-15 22:54 ` [ 34/71] jbd2: fix assertion failure in jbd2_journal_flush() Greg Kroah-Hartman
2013-01-15 22:54 ` [ 35/71] ext4: do not try to write superblock on ro remount w/o journal Greg Kroah-Hartman
2013-01-15 22:54 ` [ 36/71] ext4: lock i_mutex when truncating orphan inodes Greg Kroah-Hartman
2013-01-17 20:07   ` Herton Ronaldo Krzesinski
2013-01-18  0:46     ` Greg Kroah-Hartman
2013-01-18  3:47       ` Herton Ronaldo Krzesinski
2013-01-18  3:56         ` Theodore Ts'o
2013-01-18 21:27           ` Greg Kroah-Hartman
2013-01-15 22:54 ` [ 37/71] aoe: do not call bdi_init after blk_alloc_queue Greg Kroah-Hartman
2013-01-15 22:54 ` [ 38/71] udf: fix memory leak while allocating blocks during write Greg Kroah-Hartman
2013-01-15 22:54 ` [ 39/71] udf: dont increment lenExtents while writing to a hole Greg Kroah-Hartman
2013-01-15 22:54 ` [ 40/71] thp, memcg: split hugepage for memcg oom on cow Greg Kroah-Hartman
2013-01-15 22:54 ` [ 41/71] x86, amd: Disable way access filter on Piledriver CPUs Greg Kroah-Hartman
2013-01-15 22:54 ` [ 42/71] ACPI : do not use Lid and Sleep button for S5 wakeup Greg Kroah-Hartman
2013-01-15 22:54 ` [ 43/71] rtnetlink: Compute and store minimum ifinfo dump size Greg Kroah-Hartman
2013-01-15 22:54 ` [ 44/71] rtnetlink: Fix problem with buffer allocation Greg Kroah-Hartman
2013-01-15 22:54 ` [ 45/71] rtnetlink: fix rtnl_calcit() and rtnl_dump_ifinfo() Greg Kroah-Hartman
2013-01-15 22:54 ` [ 46/71] epoll: prevent missed events on EPOLL_CTL_MOD Greg Kroah-Hartman
2013-01-15 22:54 ` [ 47/71] ASoC: wm2000: Fix sense of speech clarity enable Greg Kroah-Hartman
2013-01-15 22:54 ` [ 48/71] ALSA: pxa27x: fix ac97 cold reset Greg Kroah-Hartman
2013-01-15 22:54 ` [ 49/71] staging: comedi: prevent auto-unconfig of manually configured devices Greg Kroah-Hartman
2013-01-15 22:54 ` [ 50/71] staging: comedi: comedi_test: fix race when cancelling command Greg Kroah-Hartman
2013-01-15 22:54 ` [ 51/71] staging: r8712u: Add new device ID Greg Kroah-Hartman
2013-01-15 22:54 ` [ 52/71] staging: speakup: avoid out-of-range access in synth_init() Greg Kroah-Hartman
2013-01-15 22:54 ` [ 53/71] staging: speakup: avoid out-of-range access in synth_add() Greg Kroah-Hartman
2013-01-15 22:54 ` [ 54/71] radeon/kms: force rn50 chip to always report connected on analog output Greg Kroah-Hartman
2013-01-15 22:54 ` [ 55/71] mac80211: use del_timer_sync for final sta cleanup timer deletion Greg Kroah-Hartman
2013-01-15 22:54 ` [ 56/71] USB: option: add Nexpring NP10T terminal id Greg Kroah-Hartman
2013-01-15 22:54 ` [ 57/71] USB: option: blacklist network interface on ZTE MF880 Greg Kroah-Hartman
2013-01-15 22:54 ` [ 58/71] USB: option: Add new MEDIATEK PID support Greg Kroah-Hartman
2013-01-15 22:54 ` [ 59/71] USB: option: add Telekom Speedstick LTE II Greg Kroah-Hartman
2013-01-15 22:54 ` [ 60/71] usb: ftdi_sio: Crucible Technologies COMET Caller ID - pid added Greg Kroah-Hartman
2013-01-15 22:54 ` [ 61/71] USB: cdc-acm: Add support for "PSC Scanning, Magellan 800i" Greg Kroah-Hartman
2013-01-15 22:54 ` Greg Kroah-Hartman [this message]
2013-01-15 22:55 ` [ 63/71] USB: Increase reset timeout Greg Kroah-Hartman
2013-01-15 22:55 ` [ 64/71] USB: hub: handle claim of enabled remote wakeup after reset Greg Kroah-Hartman
2013-01-15 22:55 ` [ 65/71] xhci: Handle HS bulk/ctrl endpoints that dont NAK Greg Kroah-Hartman
2013-01-15 22:55 ` [ 66/71] GFS2: Test bufdata with buffer locked and gfs2_log_lock held Greg Kroah-Hartman
2013-01-15 22:55 ` [ 67/71] intel-iommu: Free old page tables before creating superpage Greg Kroah-Hartman
2013-01-15 22:55 ` [ 68/71] KVM: PPC: 44x: fix DCR read/write Greg Kroah-Hartman
2013-01-15 22:55 ` [ 69/71] Revert "drm/i915: no lvds quirk for Zotac ZDBOX SD ID12/ID13" Greg Kroah-Hartman
2013-01-15 22:55 ` [ 70/71] staging: comedi: dont hijack hardware device private data Greg Kroah-Hartman
2013-01-15 22:55 ` [ 71/71] staging: comedi: Kconfig: COMEDI_NI_AT_A2150 should select COMEDI_FC Greg Kroah-Hartman
2013-01-15 23:49 ` [ 00/71] 3.0.59-stable review Peter Senna Tschudin
2013-01-16  0:06   ` Greg Kroah-Hartman
2013-01-16  3:47 ` Shuah Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130115225344.870485257@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=balbi@ti.com \
    --cc=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).