From d06e320ba711732f97af3346d4e3bd37167e658a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 26 Feb 2013 10:55:10 -0800 Subject: [PATCH] 3.4-stable patches added patches: asoc-wm2200-correct-in2l-and-in3l-digital-mute.patch staging-comedi-disallow-comedi_devconfig-on-non-board-minors.patch staging-vt6656-fix-urb-submitted-while-active-warning.patch --- ...0-correct-in2l-and-in3l-digital-mute.patch | 31 +++++++ queue-3.4/series | 3 + ...comedi_devconfig-on-non-board-minors.patch | 51 +++++++++++ ...x-urb-submitted-while-active-warning.patch | 85 +++++++++++++++++++ 4 files changed, 170 insertions(+) create mode 100644 queue-3.4/asoc-wm2200-correct-in2l-and-in3l-digital-mute.patch create mode 100644 queue-3.4/staging-comedi-disallow-comedi_devconfig-on-non-board-minors.patch create mode 100644 queue-3.4/staging-vt6656-fix-urb-submitted-while-active-warning.patch diff --git a/queue-3.4/asoc-wm2200-correct-in2l-and-in3l-digital-mute.patch b/queue-3.4/asoc-wm2200-correct-in2l-and-in3l-digital-mute.patch new file mode 100644 index 00000000000..78b2e636e41 --- /dev/null +++ b/queue-3.4/asoc-wm2200-correct-in2l-and-in3l-digital-mute.patch @@ -0,0 +1,31 @@ +From 0d2b6422529a26ac4dee06196524ba9da70cf735 Mon Sep 17 00:00:00 2001 +From: Chris Rattray +Date: Fri, 1 Feb 2013 15:51:41 +0000 +Subject: ASoC: wm2200: correct IN2L and IN3L digital mute + +From: Chris Rattray + +commit 0d2b6422529a26ac4dee06196524ba9da70cf735 upstream. + +Signed-off-by: Chris Rattray +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/wm2200.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/sound/soc/codecs/wm2200.c ++++ b/sound/soc/codecs/wm2200.c +@@ -990,9 +990,9 @@ SOC_DOUBLE_R_TLV("IN3 Volume", WM2200_IN + + SOC_DOUBLE_R("IN1 Digital Switch", WM2200_ADC_DIGITAL_VOLUME_1L, + WM2200_ADC_DIGITAL_VOLUME_1R, WM2200_IN1L_MUTE_SHIFT, 1, 1), +-SOC_DOUBLE_R("IN2 Digital Switch", WM2200_ADC_DIGITAL_VOLUME_1L, ++SOC_DOUBLE_R("IN2 Digital Switch", WM2200_ADC_DIGITAL_VOLUME_2L, + WM2200_ADC_DIGITAL_VOLUME_2R, WM2200_IN2L_MUTE_SHIFT, 1, 1), +-SOC_DOUBLE_R("IN3 Digital Switch", WM2200_ADC_DIGITAL_VOLUME_1L, ++SOC_DOUBLE_R("IN3 Digital Switch", WM2200_ADC_DIGITAL_VOLUME_3L, + WM2200_ADC_DIGITAL_VOLUME_3R, WM2200_IN3L_MUTE_SHIFT, 1, 1), + + SOC_DOUBLE_R_TLV("IN1 Digital Volume", WM2200_ADC_DIGITAL_VOLUME_1L, diff --git a/queue-3.4/series b/queue-3.4/series index c3c4f69de58..6154a390170 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -52,3 +52,6 @@ target-fix-divide-by-zero-bug-in-fabric_max_sectors-for-unconfigured-devices.pat intel-iommu-force-writebuffer-flush-quirk-on-gen-4-chipsets.patch drm-i915-disable-shared-panel-fitter-for-pipe.patch drm-i915-set-i9xx-sdvo-clock-limits-according-to-specifications.patch +staging-comedi-disallow-comedi_devconfig-on-non-board-minors.patch +staging-vt6656-fix-urb-submitted-while-active-warning.patch +asoc-wm2200-correct-in2l-and-in3l-digital-mute.patch diff --git a/queue-3.4/staging-comedi-disallow-comedi_devconfig-on-non-board-minors.patch b/queue-3.4/staging-comedi-disallow-comedi_devconfig-on-non-board-minors.patch new file mode 100644 index 00000000000..85539b8fa62 --- /dev/null +++ b/queue-3.4/staging-comedi-disallow-comedi_devconfig-on-non-board-minors.patch @@ -0,0 +1,51 @@ +From 754ab5c0e55dd118273ca2c217c4d95e9fbc8259 Mon Sep 17 00:00:00 2001 +From: Ian Abbott +Date: Mon, 28 Jan 2013 16:14:31 +0000 +Subject: staging: comedi: disallow COMEDI_DEVCONFIG on non-board minors + +From: Ian Abbott + +commit 754ab5c0e55dd118273ca2c217c4d95e9fbc8259 upstream. + +Comedi has two sorts of minor devices: +(a) normal board minor devices in the range 0 to +COMEDI_NUM_BOARD_MINORS-1 inclusive; and +(b) special subdevice minor devices in the range COMEDI_NUM_BOARD_MINORS +upwards that are used to open the same underlying comedi device as the +normal board minor devices, but with non-default read and write +subdevices for asynchronous commands. + +The special subdevice minor devices get created when a board supporting +asynchronous commands is attached to a normal board minor device, and +destroyed when the board is detached from the normal board minor device. +One way to attach or detach a board is by using the COMEDI_DEVCONFIG +ioctl. This should only be used on normal board minors as the special +subdevice minors are too ephemeral. In particular, the change +introduced in commit 7d3135af399e92cf4c9bbc5f86b6c140aab3b88c ("staging: +comedi: prevent auto-unconfig of manually configured devices") breaks +horribly for special subdevice minor devices. + +Since there's no legitimate use for the COMEDI_DEVCONFIG ioctl on a +special subdevice minor device node, disallow it and return -ENOTTY. + +Signed-off-by: Ian Abbott +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/comedi/comedi_fops.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/staging/comedi/comedi_fops.c ++++ b/drivers/staging/comedi/comedi_fops.c +@@ -136,6 +136,11 @@ static long comedi_unlocked_ioctl(struct + /* Device config is special, because it must work on + * an unconfigured device. */ + if (cmd == COMEDI_DEVCONFIG) { ++ if (minor >= COMEDI_NUM_BOARD_MINORS) { ++ /* Device config not appropriate on non-board minors. */ ++ rc = -ENOTTY; ++ goto done; ++ } + rc = do_devconfig_ioctl(dev, + (struct comedi_devconfig __user *)arg); + if (rc == 0) diff --git a/queue-3.4/staging-vt6656-fix-urb-submitted-while-active-warning.patch b/queue-3.4/staging-vt6656-fix-urb-submitted-while-active-warning.patch new file mode 100644 index 00000000000..eab42c98177 --- /dev/null +++ b/queue-3.4/staging-vt6656-fix-urb-submitted-while-active-warning.patch @@ -0,0 +1,85 @@ +From ae5943de8c8c4438cbac5cda599ff0b88c224468 Mon Sep 17 00:00:00 2001 +From: Malcolm Priestley +Date: Wed, 30 Jan 2013 20:07:29 +0000 +Subject: staging: vt6656: Fix URB submitted while active warning. + +From: Malcolm Priestley + +commit ae5943de8c8c4438cbac5cda599ff0b88c224468 upstream. + +This error happens because PIPEnsControlOut and PIPEnsControlIn unlock the +spin lock for delay, letting in another thread. + +The patch moves the current MP_SET_FLAG to before filling +of sUsbCtlRequest for pControlURB and clears it in event of failing. + +Any thread calling either function while fMP_CONTROL_READS or fMP_CONTROL_WRITES +flags set will return STATUS_FAILURE. + +Signed-off-by: Malcolm Priestley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/vt6656/usbpipe.c | 28 ++++++++++++++++++++-------- + 1 file changed, 20 insertions(+), 8 deletions(-) + +--- a/drivers/staging/vt6656/usbpipe.c ++++ b/drivers/staging/vt6656/usbpipe.c +@@ -168,6 +168,11 @@ int PIPEnsControlOut( + if (pDevice->Flags & fMP_CONTROL_WRITES) + return STATUS_FAILURE; + ++ if (pDevice->Flags & fMP_CONTROL_READS) ++ return STATUS_FAILURE; ++ ++ MP_SET_FLAG(pDevice, fMP_CONTROL_WRITES); ++ + pDevice->sUsbCtlRequest.bRequestType = 0x40; + pDevice->sUsbCtlRequest.bRequest = byRequest; + pDevice->sUsbCtlRequest.wValue = cpu_to_le16p(&wValue); +@@ -182,12 +187,13 @@ int PIPEnsControlOut( + + ntStatus = usb_submit_urb(pDevice->pControlURB, GFP_ATOMIC); + if (ntStatus != 0) { +- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"control send request submission failed: %d\n", ntStatus); ++ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO ++ "control send request submission failed: %d\n", ++ ntStatus); ++ MP_CLEAR_FLAG(pDevice, fMP_CONTROL_WRITES); + return STATUS_FAILURE; + } +- else { +- MP_SET_FLAG(pDevice, fMP_CONTROL_WRITES); +- } ++ + spin_unlock_irq(&pDevice->lock); + for (ii = 0; ii <= USB_CTL_WAIT; ii ++) { + +@@ -227,6 +233,11 @@ int PIPEnsControlIn( + if (pDevice->Flags & fMP_CONTROL_READS) + return STATUS_FAILURE; + ++ if (pDevice->Flags & fMP_CONTROL_WRITES) ++ return STATUS_FAILURE; ++ ++ MP_SET_FLAG(pDevice, fMP_CONTROL_READS); ++ + pDevice->sUsbCtlRequest.bRequestType = 0xC0; + pDevice->sUsbCtlRequest.bRequest = byRequest; + pDevice->sUsbCtlRequest.wValue = cpu_to_le16p(&wValue); +@@ -240,10 +251,11 @@ int PIPEnsControlIn( + + ntStatus = usb_submit_urb(pDevice->pControlURB, GFP_ATOMIC); + if (ntStatus != 0) { +- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"control request submission failed: %d\n", ntStatus); +- }else { +- MP_SET_FLAG(pDevice, fMP_CONTROL_READS); +- } ++ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO ++ "control request submission failed: %d\n", ntStatus); ++ MP_CLEAR_FLAG(pDevice, fMP_CONTROL_READS); ++ return STATUS_FAILURE; ++ } + + spin_unlock_irq(&pDevice->lock); + for (ii = 0; ii <= USB_CTL_WAIT; ii ++) { -- 2.47.3