diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-08-07 17:38:08 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-08-07 17:38:08 -0700 |
| commit | 98eebe071f4248c493288c6cff9644d727b877d6 (patch) | |
| tree | 7fd334824692739541a7ed4af103a72ebab5c2f1 /usb | |
| parent | d418d1311f152accae0f6282994664adb1f82b17 (diff) | |
| download | patches-98eebe071f4248c493288c6cff9644d727b877d6.tar.gz | |
more staging and other patches
Diffstat (limited to 'usb')
4 files changed, 156 insertions, 0 deletions
diff --git a/usb/usb-gadget-audio-driver-seg-fault-fix.patch b/usb/usb-gadget-audio-driver-seg-fault-fix.patch new file mode 100644 index 00000000000000..7daea4aa28b29d --- /dev/null +++ b/usb/usb-gadget-audio-driver-seg-fault-fix.patch @@ -0,0 +1,47 @@ +From robin_callender@hotmail.com Fri Aug 7 16:58:23 2009 +From: Robin Callender <robin_callender@hotmail.com> +Date: Sun, 02 Aug 2009 11:38:58 -0700 +Subject: USB: gadget: audio driver seg-fault fix +To: linux-usb <linux-usb@vger.kernel.org> +Message-ID: <BLU0-SMTP381C57E876EC4E964935AA920E0@phx.gbl> + + +The included patch can be applied to the new usb gadget audio driver. + +It addresses a seg-fault in uncovered in g_audio.ko. +The fault occurs in the function u_audio.c::gaudio_open_end_dev() when +device /dev/snd/pcmC0D0c (FILE_PCM_CAPTURE) is not present. + +I suspect there may be similar problems with device /dev/snd/pcmC0D0p +(FILE_PCM_PLAYBACK) handling also. I leave that for the developer(s), +as I was unsure as to the side-effects of not calling +playback_default_hw_params() in the initialization phase. + +Signed-off-by: Robin Callender <robin_callender@hotmail.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + + +--- + drivers/usb/gadget/u_audio.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +--- a/drivers/usb/gadget/u_audio.c ++++ b/drivers/usb/gadget/u_audio.c +@@ -253,11 +253,13 @@ static int gaudio_open_snd_dev(struct ga + snd->filp = filp_open(fn_cap, O_RDONLY, 0); + if (IS_ERR(snd->filp)) { + ERROR(card, "No such PCM capture device: %s\n", fn_cap); +- snd->filp = NULL; ++ snd->substream = NULL; ++ snd->card = NULL; ++ } else { ++ pcm_file = snd->filp->private_data; ++ snd->substream = pcm_file->substream; ++ snd->card = card; + } +- pcm_file = snd->filp->private_data; +- snd->substream = pcm_file->substream; +- snd->card = card; + + return 0; + } diff --git a/usb/usb-gadget-read-buffer-overflow.patch b/usb/usb-gadget-read-buffer-overflow.patch new file mode 100644 index 00000000000000..d2bc6d6136b452 --- /dev/null +++ b/usb/usb-gadget-read-buffer-overflow.patch @@ -0,0 +1,33 @@ +From akpm@linux-foundation.org Fri Aug 7 16:57:48 2009 +From: Roel Kluin <roel.kluin@gmail.com> +Date: Thu, 06 Aug 2009 16:09:51 -0700 +Subject: USB: gadget: Read buffer overflow +To: greg@kroah.com +Cc: linux-usb@vger.kernel.org, akpm@linux-foundation.org, roel.kluin@gmail.com, david-b@pacbell.net +Message-ID: <200908062309.n76N9q3C012318@imap1.linux-foundation.org> + + +From: Roel Kluin <roel.kluin@gmail.com> + +Check whether index is within bounds before testing the element. + +Signed-off-by: Roel Kluin <roel.kluin@gmail.com> +Cc: David Brownell <david-b@pacbell.net> +Signed-off-by: Andrew Morton <akpm@linux-foundation.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +--- + + drivers/usb/gadget/composite.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/gadget/composite.c ++++ b/drivers/usb/gadget/composite.c +@@ -602,7 +602,7 @@ static int get_string(struct usb_composi + } + } + +- for (len = 0; s->wData[len] && len <= 126; len++) ++ for (len = 0; len <= 126 && s->wData[len]; len++) + continue; + if (!len) + return -EINVAL; diff --git a/usb/usb-isp1362-fix-pulldown-register-defines-and-conf-logic.patch b/usb/usb-isp1362-fix-pulldown-register-defines-and-conf-logic.patch new file mode 100644 index 00000000000000..33e861c86f62fc --- /dev/null +++ b/usb/usb-isp1362-fix-pulldown-register-defines-and-conf-logic.patch @@ -0,0 +1,43 @@ +From ken@bitsko.slc.ut.us Fri Aug 7 17:02:02 2009 +From: Ken MacLeod <ken@bitsko.slc.ut.us> +Date: Thu, 06 Aug 2009 14:18:27 -0500 +Subject: USB: isp1362: fix pulldown register defines and conf logic +To: vapier@gentoo.org, uclinux-dist-devel@blackfin.uclinux.org, ken@bitsko.slc.ut.us, linux-usb@vger.kernel.org +Message-ID: <m3hbwkoinw.fsf@bitsko.slc.ut.us> + + +HCHWCFG_PULLDOWN_DS2 and HCHWCFG_PULLDOWN_DS1 were swapped. Incorrect +operator precedence in isp1362_hc_start() hid part of the problem. +This fixes a problem where Port 1 in Host mode fails to see disconnects. + +Signed-Off-By: Ken MacLeod <ken@bitsko.slc.ut.us> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +--- + drivers/usb/host/isp1362-hcd.c | 2 +- + drivers/usb/host/isp1362.h | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/usb/host/isp1362.h ++++ b/drivers/usb/host/isp1362.h +@@ -161,8 +161,8 @@ ISP1362_REG(HCRHPORT2, 0x16, REG_WIDTH_3 + ISP1362_REG(HCHWCFG, 0x20, REG_WIDTH_16, REG_ACCESS_RW); + #define HCHWCFG_DISABLE_SUSPEND (1 << 15) + #define HCHWCFG_GLOBAL_PWRDOWN (1 << 14) +-#define HCHWCFG_PULLDOWN_DS1 (1 << 13) +-#define HCHWCFG_PULLDOWN_DS2 (1 << 12) ++#define HCHWCFG_PULLDOWN_DS2 (1 << 13) ++#define HCHWCFG_PULLDOWN_DS1 (1 << 12) + #define HCHWCFG_CLKNOTSTOP (1 << 11) + #define HCHWCFG_ANALOG_OC (1 << 10) + #define HCHWCFG_ONEINT (1 << 9) +--- a/drivers/usb/host/isp1362-hcd.c ++++ b/drivers/usb/host/isp1362-hcd.c +@@ -2563,7 +2563,7 @@ static int isp1362_hc_start(struct usb_h + hwcfg = HCHWCFG_INT_ENABLE | HCHWCFG_DBWIDTH(1); + if (board->sel15Kres) + hwcfg |= HCHWCFG_PULLDOWN_DS2 | +- (MAX_ROOT_PORTS > 1) ? HCHWCFG_PULLDOWN_DS1 : 0; ++ ((MAX_ROOT_PORTS > 1) ? HCHWCFG_PULLDOWN_DS1 : 0); + if (board->clknotstop) + hwcfg |= HCHWCFG_CLKNOTSTOP; + if (board->oc_enable) diff --git a/usb/usb-usb-storage-fails-to-attach-to-huawei-datacard-cdrom-device.patch b/usb/usb-usb-storage-fails-to-attach-to-huawei-datacard-cdrom-device.patch new file mode 100644 index 00000000000000..d070c61ab111be --- /dev/null +++ b/usb/usb-usb-storage-fails-to-attach-to-huawei-datacard-cdrom-device.patch @@ -0,0 +1,33 @@ +From huananhu@huawei.com Fri Aug 7 16:56:38 2009 +From: fangxiaozhi 00110321 <huananhu@huawei.com> +Date: Fri, 07 Aug 2009 12:30:35 +0800 +Subject: USB: usb-storage fails to attach to Huawei Datacard cdrom device +To: linux-usb@vger.kernel.org +Cc: linux-kernel@vger.kernel.org, zihan@huawei.com, greg@kroah.com +Message-ID: <fa3ec44c288d2.288d2fa3ec44c@huawei.com> +Content-Disposition: inline + + +From: fangxiaozhi <huananhu@huawei.com> + +In this patch, we always make the return value of function +usb_stor_huawei_e220_init to be zero. Then it will not prevent usb-storage +driver from attaching to the CDROM device of Huawei Datacard. + +Signed-off-by: fangxiaozhi <huananhu@huawei.com> +Cc: stable <stable@kernel.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/storage/initializers.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/storage/initializers.c ++++ b/drivers/usb/storage/initializers.c +@@ -102,5 +102,5 @@ int usb_stor_huawei_e220_init(struct us_ + USB_TYPE_STANDARD | USB_RECIP_DEVICE, + 0x01, 0x0, NULL, 0x0, 1000); + US_DEBUGP("Huawei mode set result is %d\n", result); +- return (result ? 0 : -ENODEV); ++ return 0; + } |
