3.9.6-stable review
Subsystems (35)
Greg Kroah-Hartman
maintainercover 3.9.6-stable review
This is the start of the stable review cycle for the 3.9.6 release. There are 79 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu Jun 13 19:50:17 UTC 2013. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.9.6-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 3.9.6-rc1
Ben Hutchings <[email protected]>
s390: Add pgste to ptep_modify_prot_start()
Zoran Markovic <[email protected]>
timekeeping: Correct run-time detection of persistent_clock.
Konrad Rzeszutek Wilk <[email protected]>
xen/smp: Fixup NOHZ per cpu data when onlining an offline CPU.
Ben Greear <[email protected]>
Fix lockup related to stop_machine being stuck in __do_softirq.
Johan Hovold <[email protected]>
USB: io_ti: fix chars_in_buffer overhead
Johan Hovold <[email protected]>
USB: ftdi_sio: fix chars_in_buffer overhead
Johan Hovold <[email protected]>
USB: ftdi_sio: clean up get_modem_status
Johan Hovold <[email protected]>
USB: serial: add generic wait_until_sent implementation
Johan Hovold <[email protected]>
USB: serial: add wait_until_sent operation
Imre Deak <[email protected]>
drm/i915: force full modeset if the connector is in DPMS OFF mode
Michael Hennerich <[email protected]>
iio: frequency: ad4350: Fix bug / typo in mask
Michael Hennerich <[email protected]>
iio:inkern: Fix typo/bug in convert raw to processed.
Kleber Sacilotto de Souza <[email protected]>
radeon: use max_bus_speed to activate gen2 speeds
Kleber Sacilotto de Souza <[email protected]>
powerpc/pseries: Perform proper max_bus_speed detection
Brian King <[email protected]>
powerpc/pseries: Make 32-bit MSI quirk work on systems lacking firmware support
Brian King <[email protected]>
powerpc/pseries: Force 32 bit MSIs for devices that require it
Brian King <[email protected]>
powerpc: Set default VGA device
Brian King <[email protected]>
pci: Set dev->dev.type in alloc_pci_dev
Patrik Jakobsson <[email protected]>
drm/gma500: Increase max resolution for mode setting
George Cherian <[email protected]>
usb: dwc3: gadget: free trb pool only from epnum 2
Guenter Roeck <[email protected]>
powerpc: Fix build error in stable/3.9
Rafael J. Wysocki <[email protected]>
Revert "ACPI / scan: do not match drivers against objects having scan handlers"
Daniel Vetter <[email protected]>
drm/i915: Fix spurious -EIO/SIGBUS on wedged gpus
Ben Mesman <[email protected]>
drm/i915: no lvds quirk for hp t5740
Egbert Eich <[email protected]>
drm/i915/sdvo: Use &intel_sdvo->ddc instead of intel_sdvo->i2c for DDC.
Huacai Chen <[email protected]>
drm: fix a use-after-free when GPU acceleration disabled
Christopher Harvey <[email protected]>
drm/mgag200: Add missing write to index before accessing data register
Guenter Roeck <[email protected]>
hwmon: (adm1021) Strengthen chip detection for ADM1021, LM84 and MAX1617
Tyler Hicks <[email protected]>
eCryptfs: Check return of filemap_write_and_wait during fsync
Paul Taysom <[email protected]>
ecryptfs: fixed msync to flush data
Jeff Layton <[email protected]>
cifs: fix off-by-one bug in build_unc_path_to_root
Mikulas Patocka <[email protected]>
hpfs: fix warnings when the filesystem fills up
Alex Deucher <[email protected]>
drm/radeon: don't allow audio on DCE6
Adis Hamzić <[email protected]>
radeon: Fix system hang issue when using KMS with older cards
Rabin Vincent <[email protected]>
dmaengine: ste_dma40: fix pm runtime ref counting
Michael Ellerman <[email protected]>
powerpc/perf: Fix deadlock caused by calling printk() in PMU exception
Michael Neuling <[email protected]>
powerpc/hw_breakpoints: Add DABRX cpu feature to fix 32-bit regression
Gavin Shan <[email protected]>
powerpc/eeh: Don't check RTAS token to get PE addr
Will Deacon <[email protected]>
ARM: 7747/1: pcpu: ensure __my_cpu_offset cannot be re-ordered across barrier()
Arnd Bergmann <[email protected]>
ARM: 7743/1: compressed/head.S: work around new binutils warning
Arnd Bergmann <[email protected]>
ARM: 7742/1: topology: export cpu_topology
Andrew Lunn <[email protected]>
ARM: Kirkwood: TS219: Fix crash by double PCIe instantiation
Takashi Iwai <[email protected]>
ALSA: hda - Add keep_eapd_on flag to generic parser
Takashi Iwai <[email protected]>
ALSA: hda - Allow setting automute/automic hooks after parsing
Takashi Iwai <[email protected]>
ALSA: hda/via - Fix wrongly cleared pins after suspend on VT1802
Takashi Iwai <[email protected]>
ALSA: hda/via - Disable broken dynamic power control
lan,Tianyu <[email protected]>
x86 / platform / hp_wmi: Fix bluetooth_rfkill misuse in hp_wmi_rfkill_setup()
Rafael J. Wysocki <[email protected]>
ACPI / PM: Do not execute _PS0 for devices without _PSC during initialization
Aaron Lu <[email protected]>
ACPI / scan: do not match drivers against objects having scan handlers
Ash Willis <[email protected]>
ACPI / video: ignore BIOS initial backlight value for HP Pavilion g6
Alex Hung <[email protected]>
ACPI / video: ignore BIOS initial backlight value for HP m4
Ross Lagerwall <[email protected]>
acpi-cpufreq: set current frequency based on target P-State
Johan Hovold <[email protected]>
USB: mos7720: fix hardware flow control
Johan Hovold <[email protected]>
USB: mos7720: fix message timeouts
Johan Hovold <[email protected]>
USB: mos7720: fix DMA to stack
Johan Hovold <[email protected]>
USB: mos7840: fix DMA to stack
Alan Stern <[email protected]>
USB: revert periodic scheduling bugfix
Johan Hovold <[email protected]>
USB: serial: fix Treo/Kyocera interrrupt-in urb context
Johan Hovold <[email protected]>
USB: whiteheat: fix broken port configuration
Robert Butora <[email protected]>
USB: Serial: cypress_M8: Enable FRWD Dongle hidcom device
Johan Hovold <[email protected]>
USB: zte_ev: fix broken open
Johan Hovold <[email protected]>
USB: zte_ev: fix control-message timeouts
Johan Hovold <[email protected]>
USB: visor: fix initialisation of Treo/Kyocera devices
Johan Hovold <[email protected]>
USB: ark3116: fix control-message timeout
Johan Hovold <[email protected]>
USB: keyspan: fix bogus array index
Johan Hovold <[email protected]>
USB: iuu_phoenix: fix bulk-message timeout
Takashi Iwai <[email protected]>
ALSA: usb-audio - Fix invalid volume resolution on Logitech HD webcam c270
Takashi Iwai <[email protected]>
ALSA: usb-audio - Apply Logitech QuickCam Pro 9000 quirk only to audio iface
Clemens Ladisch <[email protected]>
ALSA: usb-audio: fix Roland/Cakewalk UM-3G support
Virupax Sadashivpetimath <[email protected]>
usb: musb: make use_sg flag URB specific
Matt Fleming <[email protected]>
x86/PCI: Map PCI setup data with ioremap() so it can be in highmem
Sarah Sharp <[email protected]>
xhci: Disable D3cold for buggy TI redrivers.
Vladimir Murzin <[email protected]>
xhci: fix list access before init
Sergio Aguirre <[email protected]>
xhci-mem: init list heads at the beginning of init
Tony Camuso <[email protected]>
xhci - correct comp_mode_recovery_timer on return from hibernate
Peter Chen <[email protected]>
usb: dwc3: pci: PHY should be deleted later than dwc3 core
Dan Williams <[email protected]>
USB: option,zte_ev: move most ZTE CDMA devices to zte_ev
Bjørn Mork <[email protected]>
USB: option: blacklist network interface on Huawei E1820
Richard Weinberger <[email protected]>
USB: serial: Add Option GTM681W to qcserial device table.
-------------
Diffstat:
Makefile | 4 +- arch/arm/boot/compressed/Makefile | 2 +- arch/arm/boot/compressed/head-sa1100.S | 1 + arch/arm/boot/compressed/head-shark.S | 1 + arch/arm/boot/compressed/head.S | 1 + arch/arm/include/asm/percpu.h | 11 +++++- arch/arm/kernel/topology.c | 2 + arch/arm/mach-kirkwood/board-ts219.c | 10 ----- arch/powerpc/include/asm/cputable.h | 17 ++++---- arch/powerpc/include/asm/machdep.h | 3 ++ arch/powerpc/include/asm/pci-bridge.h | 2 + arch/powerpc/kernel/pci-common.c | 21 ++++++++++ arch/powerpc/kernel/process.c | 3 +- arch/powerpc/kernel/traps.c | 2 +- arch/powerpc/perf/core-book3s.c | 2 +- arch/powerpc/platforms/pseries/eeh_pseries.c | 12 +++--- arch/powerpc/platforms/pseries/msi.c | 53 ++++++++++++++++++++++++- arch/powerpc/platforms/pseries/pci.c | 53 +++++++++++++++++++++++++ arch/powerpc/platforms/pseries/pseries.h | 4 ++ arch/powerpc/platforms/pseries/setup.c | 2 + arch/s390/include/asm/pgtable.h | 3 +- arch/x86/pci/common.c | 5 ++- arch/x86/xen/smp.c | 8 ++++ drivers/acpi/device_pm.c | 10 +++-- drivers/acpi/video.c | 16 ++++++++ drivers/cpufreq/acpi-cpufreq.c | 4 +- drivers/dma/ste_dma40.c | 8 ++-- drivers/gpu/drm/drm_irq.c | 6 ++- drivers/gpu/drm/gma500/framebuffer.c | 4 +- drivers/gpu/drm/i915/i915_gem.c | 7 +--- drivers/gpu/drm/i915/intel_display.c | 24 +++++++++++- drivers/gpu/drm/i915/intel_lvds.c | 4 +- drivers/gpu/drm/i915/intel_sdvo.c | 2 +- drivers/gpu/drm/mgag200/mgag200_mode.c | 9 +++-- drivers/gpu/drm/radeon/atombios_encoders.c | 11 ++++-- drivers/gpu/drm/radeon/evergreen.c | 20 +++++----- drivers/gpu/drm/radeon/ni.c | 10 +++-- drivers/gpu/drm/radeon/r100.c | 9 +++-- drivers/gpu/drm/radeon/r300.c | 9 +++-- drivers/gpu/drm/radeon/r420.c | 10 +++-- drivers/gpu/drm/radeon/r520.c | 9 +++-- drivers/gpu/drm/radeon/r600.c | 19 ++++----- drivers/gpu/drm/radeon/rs400.c | 9 +++-- drivers/gpu/drm/radeon/rs600.c | 9 +++-- drivers/gpu/drm/radeon/rs690.c | 9 +++-- drivers/gpu/drm/radeon/rv515.c | 9 +++-- drivers/gpu/drm/radeon/rv770.c | 19 ++++----- drivers/gpu/drm/radeon/si.c | 10 +++-- drivers/hwmon/adm1021.c | 58 ++++++++++++++++++++++++---- drivers/iio/frequency/adf4350.c | 2 +- drivers/iio/inkern.c | 2 +- drivers/pci/probe.c | 2 +- drivers/platform/x86/hp-wmi.c | 2 +- drivers/usb/dwc3/dwc3-pci.c | 2 +- drivers/usb/dwc3/gadget.c | 14 ++++++- drivers/usb/host/ehci-sched.c | 2 +- drivers/usb/host/xhci-mem.c | 10 +++-- drivers/usb/host/xhci-pci.c | 8 ++++ drivers/usb/host/xhci.c | 16 ++++++-- drivers/usb/host/xhci.h | 3 ++ drivers/usb/musb/musb_host.c | 18 ++++----- drivers/usb/musb/musb_host.h | 1 + drivers/usb/serial/ark3116.c | 2 +- drivers/usb/serial/cypress_m8.c | 18 ++++++++- drivers/usb/serial/cypress_m8.h | 4 ++ drivers/usb/serial/ftdi_sio.c | 28 +++++--------- drivers/usb/serial/generic.c | 31 +++++++++++++++ drivers/usb/serial/io_ti.c | 22 +++++++---- drivers/usb/serial/iuu_phoenix.c | 4 +- drivers/usb/serial/keyspan.c | 2 +- drivers/usb/serial/mos7720.c | 25 ++++++++---- drivers/usb/serial/mos7840.c | 35 +++++++++++++---- drivers/usb/serial/option.c | 26 ++----------- drivers/usb/serial/qcserial.c | 1 + drivers/usb/serial/usb-serial.c | 19 +++++++++ drivers/usb/serial/visor.c | 9 +++++ drivers/usb/serial/whiteheat.c | 2 +- drivers/usb/serial/zte_ev.c | 58 +++++++++++++++++----------- fs/cifs/connect.c | 4 +- fs/ecryptfs/file.c | 6 +++ fs/hpfs/file.c | 4 ++ include/linux/usb/serial.h | 4 ++ kernel/softirq.c | 13 +++++-- kernel/time/timekeeping.c | 8 ++++ sound/pci/hda/hda_generic.c | 44 ++++++++++++++++----- sound/pci/hda/hda_generic.h | 1 + sound/pci/hda/patch_via.c | 10 ++++- sound/usb/mixer.c | 1 + sound/usb/quirks-table.h | 14 ++++++- 89 files changed, 739 insertions(+), 274 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/79 USB: serial: Add Option GTM681W to qcserial device table.
3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Richard Weinberger <[email protected]>
commit 8a2f132a01c2dd4c3905fa560f92019761ed72b1 upstream.
The Option GTM681W uses a qualcomm chip and can be served by the qcserial device driver.
--- drivers/usb/serial/qcserial.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/serial/qcserial.c +1 -0
@@ -118,6 +118,7 @@ static const struct usb_device_id id_tab {USB_DEVICE(0x1199, 0x901b)}, /* Sierra Wireless MC7770 */ {USB_DEVICE(0x12D1, 0x14F0)}, /* Sony Gobi 3000 QDL */ {USB_DEVICE(0x12D1, 0x14F1)}, /* Sony Gobi 3000 Composite */ + {USB_DEVICE(0x0AF0, 0x8120)}, /* Option GTM681W *//* non Gobi Qualcomm serial devices */ {USB_DEVICE_INTERFACE_NUMBER(0x0f3d, 0x68a2, 0)}, /* Sierra Wireless MC7700 Device Management */
Greg Kroah-Hartman
maintainerPATCH 2/79 USB: option: blacklist network interface on Huawei E1820
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bjørn Mork <[email protected]>
commit b8a24e6281d37243c06b9497dcbfaa98c1e2ad35 upstream.
The mode used by Windows for the Huawei E1820 will use the same ff/ff/ff class codes for both serial and network functions.
--- drivers/usb/serial/option.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/serial/option.c +2 -0
@@ -593,6 +593,8 @@ static const struct usb_device_id option .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff), .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x14ac, 0xff, 0xff, 0xff), /* Huawei E1820 */ + .driver_info = (kernel_ulong_t) &net_intf1_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0xff, 0xff), .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0xff, 0xff) },
Greg Kroah-Hartman
maintainerPATCH 3/79 USB: option,zte_ev: move most ZTE CDMA devices to zte_ev
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Williams <[email protected]>
commit 73228a0538a70ebc4547bd09dee8971360dc1d87 upstream.
Per some ZTE Linux drivers I found for the AC2716, the following patch moves most ZTE CDMA devices from option to zte_ev. The blacklist stuff that option does is not required with zte_ev, because it doesn't implement any of the send_setup hooks which the blacklist suppressed.
I did not move the 2718 over because I could not find any ZTE Linux drivers for that device, nor even any Windows drivers.
--- drivers/usb/serial/option.c | 24 +----------------------- drivers/usb/serial/zte_ev.c | 24 +++++++++++++++++++++--- 2 files changed, 22 insertions(+), 26 deletions(-)
drivers/usb/serial/option.c +1 -23
@@ -250,13 +250,7 @@ static void option_instat_callback(struc#define ZTE_PRODUCT_MF622 0x0001#define ZTE_PRODUCT_MF628 0x0015#define ZTE_PRODUCT_MF626 0x0031 -#define ZTE_PRODUCT_CDMA_TECH 0xfffe -#define ZTE_PRODUCT_AC8710 0xfff1 -#define ZTE_PRODUCT_AC2726 0xfff5 -#define ZTE_PRODUCT_AC8710T 0xffff#define ZTE_PRODUCT_MC2718 0xffe8 -#define ZTE_PRODUCT_AD3812 0xffeb -#define ZTE_PRODUCT_MC2716 0xffed#define BENQ_VENDOR_ID 0x04a5#define BENQ_PRODUCT_H10 0x4068
@@ -495,18 +489,10 @@ static const struct option_blacklist_inf .reserved = BIT(4), }; -static const struct option_blacklist_info zte_ad3812_z_blacklist = { - .sendsetup =BIT (0 ) |BIT (1 ) |BIT (2 ), -}; -static const struct option_blacklist_info zte_mc2718_z_blacklist = { .sendsetup =BIT (1 ) |BIT (2 ) |BIT (3 ) |BIT (4 ), }; -static const struct option_blacklist_info zte_mc2716_z_blacklist = { - .sendsetup =BIT (1 ) |BIT (2 ) |BIT (3 ), -}; -static const struct option_blacklist_info huawei_cdc12_blacklist = { .reserved =BIT (1 ) |BIT (2 ), };
@@ -799,7 +785,6 @@ static const struct usb_device_id option { USB_DEVICE_INTERFACE_CLASS(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_1012, 0xff) }, { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC650) }, { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) }, - { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6000)}, /* ZTE AC8700 */ { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6280) }, /* BP3-USB & BP3-EXT HSDPA */
@@ -1201,16 +1186,9 @@ static const struct usb_device_id option { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0178, 0xff, 0xff, 0xff), .driver_info = (kernel_ulong_t)&net_intf3_blacklist }, - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710T, 0xff, 0xff, 0xff) }, +/* NOTE: most ZTE CDMA devices should be driven by zte_ev, not option */ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2718, 0xff, 0xff, 0xff), .driver_info = (kernel_ulong_t)&zte_mc2718_z_blacklist }, - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AD3812, 0xff, 0xff, 0xff), - .driver_info = (kernel_ulong_t)&zte_ad3812_z_blacklist }, - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2716, 0xff, 0xff, 0xff), - .driver_info = (kernel_ulong_t)&zte_mc2716_z_blacklist }, { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x01) }, { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x05) }, { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x86, 0x10) },
drivers/usb/serial/zte_ev.c +21 -3
@@ -279,11 +279,29 @@ static void zte_ev_usb_serial_close(stru }static const struct usb_device_id id_table[] = { - {USB_DEVICE (0x19d2 ,0xffff ) },/* AC8700 */ - {USB_DEVICE (0x19d2 ,0xfffe ) }, - {USB_DEVICE (0x19d2 ,0xfffd ) },/* MG880 */ +/* AC8710, AC8710T */ + {USB_DEVICE_AND_INTERFACE_INFO (0x19d2 ,0xffff ,0xff ,0xff ,0xff ) }, +/* AC8700 */ + {USB_DEVICE_AND_INTERFACE_INFO (0x19d2 ,0xfffe ,0xff ,0xff ,0xff ) }, +/* MG880 */ + {USB_DEVICE (0x19d2 ,0xfffd ) }, + {USB_DEVICE (0x19d2 ,0xfffc ) }, + {USB_DEVICE (0x19d2 ,0xfffb ) }, +/* AC2726, AC8710_V3 */ + {USB_DEVICE_AND_INTERFACE_INFO (0x19d2 ,0xfff1 ,0xff ,0xff ,0xff ) }, + {USB_DEVICE (0x19d2 ,0xfff6 ) }, + {USB_DEVICE (0x19d2 ,0xfff7 ) }, + {USB_DEVICE (0x19d2 ,0xfff8 ) }, + {USB_DEVICE (0x19d2 ,0xfff9 ) }, + {USB_DEVICE (0x19d2 ,0xffee ) }, +/* AC2716, MC2716 */ + {USB_DEVICE_AND_INTERFACE_INFO (0x19d2 ,0xffed ,0xff ,0xff ,0xff ) }, +/* AD3812 */ + {USB_DEVICE_AND_INTERFACE_INFO (0x19d2 ,0xffeb ,0xff ,0xff ,0xff ) }, + {USB_DEVICE (0x19d2 ,0xffec ) }, {USB_DEVICE (0x05C6 ,0x3197 ) }, {USB_DEVICE (0x05C6 ,0x6000 ) }, + {USB_DEVICE (0x05C6 ,0x9008 ) }, { }, };MODULE_DEVICE_TABLE (usb, id_table);
Greg Kroah-Hartman
maintainerPATCH 4/79 usb: dwc3: pci: PHY should be deleted later than dwc3 core
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Chen <[email protected]>
commit f28c42c576b293b3a1daaed8ca2775ebc2fe5398 upstream.
If the glue layer is removed first (core layer later), it deletes the phy device first, then the core device. But at core's removal, it still uses PHY's resources, it may cause kernel's oops. It is much like the problem Paul Zimmerman reported at:
http://marc.info/?l=linux-usb&m=136547502011472&w=2.
Besides, it is reasonable the PHY is deleted at last as the controller is the PHY's user.
--- drivers/usb/dwc3/dwc3-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc3/dwc3-pci.c +1 -1
@@ -196,9 +196,9 @@ static void dwc3_pci_remove(struct pci_d {struct dwc3_pci *glue =pci_get_drvdata (pci); +platform_device_unregister (glue->dwc3);platform_device_unregister (glue->usb2_phy);platform_device_unregister (glue->usb3_phy); -platform_device_unregister (glue->dwc3);pci_set_drvdata (pci,NULL );pci_disable_device (pci); }
Greg Kroah-Hartman
maintainerPATCH 5/79 xhci - correct comp_mode_recovery_timer on return from hibernate
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tony Camuso <[email protected]>
commit 77df9e0b799b03e1d5d9c68062709af5f637e834 upstream.
Commit 71c731a2 (usb: host: xhci: Fix Compliance Mode on SN65LVPE502CP Hardware) was a workaround for systems using the SN65LVPE502CP, controller, but it introduced a bug in resume from hibernate.
The fix created a timer, comp_mode_recovery_timer, which is deleted from a timer list when xhci_suspend() is called. However, the hibernate image, including the timer list containing the comp_mode_recovery_timer, had already been saved before the timer was deleted.
Upon resume from hibernate, the list containing the comp_mode_recovery_timer is restored from the image saved to disk, and xhci_resume(), assuming that the timer had been deleted by xhci_suspend(), makes a call to compliance_mode_recoery_timer_init(), which creates a new instance of the comp_mode_recovery_timer and attempts to place it into the same list in which it is already active, thus corrupting the list during the list_add() call.
At this point, a call trace is emitted indicating the list corruption. Soon afterward, the system locks up, the watchdog times out, and the ensuing NMI crashes the system.
The problem did not occur when resuming from suspend. In suspend, the image in RAM remains exactly as it was when xhci_suspend() deleted the comp_mode_recovery_timer, so there is no problem when xhci_resume() creates a new instance of this timer and places it in the still empty list.
This patch avoids the problem by deleting the timer in xhci_resume() when resuming from hibernate. Now xhci_resume() can safely make the call to create a new instance of this timer, whether returning from suspend or hibernate.
Thanks to Alan Stern for his help with understanding the problem.
[Sarah reworked this patch to cover the case where the xHCI restore register operation fails, and (temp & STS_SRE) is true (and we re-init the host, including re-init for the compliance mode), but hibernate is false. The original patch would have caused list corruption in this case.]
This patch should be backported to kernels as old as 3.2, that contain the commit 71c731a296f1b08a3724bd1b514b64f1bda87a23 "usb: host:
xhci: Fix Compliance Mode on SN65LVPE502CP Hardware"
--- drivers/usb/host/xhci.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/usb/host/xhci.c +11 -1
@@ -952,6 +952,7 @@ int xhci_resume(struct xhci_hcd *xhci, bstruct usb_hcd *hcd =xhci_to_hcd (xhci);struct usb_hcd *secondary_hcd;int retval =0 ; +bool comp_timer_running = false;/* Wait a bit if either of the roothubs need to settle from the * transition into bus suspend.
@@ -989,6 +990,13 @@ int xhci_resume(struct xhci_hcd *xhci, b/* If restore operation fails, re-initialize the HC during resume */ if ((temp &STS_SRE ) || hibernated) { + +if ((xhci->quirks &XHCI_COMP_MODE_QUIRK ) && + !(xhci_all_ports_seen_u0 (xhci))) { +del_timer_sync (&xhci->comp_mode_recovery_timer); +xhci_dbg (xhci,"Compliance Mode Recovery Timer deleted!\n" ); + } +/* Let the USB core know _both_ roothubs lost power. */ usb_root_hub_lost_power (xhci->main_hcd->self.root_hub);usb_root_hub_lost_power (xhci->shared_hcd->self.root_hub);
@@ -1031,6 +1039,8 @@ int xhci_resume(struct xhci_hcd *xhci, b retval =xhci_init (hcd->primary_hcd);if (retval)return retval; + comp_timer_running = true; +xhci_dbg (xhci,"Start the primary HCD\n" ); retval =xhci_run (hcd->primary_hcd);if (!retval) {
@@ -1072,7 +1082,7 @@ int xhci_resume(struct xhci_hcd *xhci, b* to suffer the Compliance Mode issue again. It doesn't matter if * ports have entered previously to U0 before system's suspension. */ -if (xhci->quirks &XHCI_COMP_MODE_QUIRK ) +if ((xhci->quirks &XHCI_COMP_MODE_QUIRK ) && !comp_timer_running)compliance_mode_recovery_timer_init (xhci);/* Re-enable port polling. */
Greg Kroah-Hartman
maintainerPATCH 6/79 xhci-mem: init list heads at the beginning of init
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sergio Aguirre <[email protected]>
commit 331de00a64e5027365145bdf51da27b9ce15dfd5 upstream.
It is possible that we fail on xhci_mem_init, just before doing the INIT_LIST_HEAD, and calling xhci_mem_cleanup.
Problem is that, the list_for_each_entry_safe macro, assumes list heads are initialized (not NULL), and dereferences their 'next' pointer, causing a kernel panic if this is not yet initialized.
Let's protect from that by moving inits to the beginning.
This patch should be backported to kernels as old as 3.2, that contain the commit 9574323c39d1f8359a04843075d89c9f32d8b7e6 "xHCI: test USB2 software LPM".
--- drivers/usb/host/xhci-mem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/usb/host/xhci-mem.c +3 -3
@@ -2256,6 +2256,9 @@ int xhci_mem_init(struct xhci_hcd *xhci,u32 page_size, temp;int i; +INIT_LIST_HEAD (&xhci->lpm_failed_devs); +INIT_LIST_HEAD (&xhci->cancel_cmd_list); + page_size =xhci_readl (xhci, &xhci->op_regs->page_size);xhci_dbg (xhci,"Supported page size register = 0x%x\n" , page_size);for (i =0 ; i <16 ; i++) {
@@ -2334,7 +2337,6 @@ int xhci_mem_init(struct xhci_hcd *xhci, xhci->cmd_ring =xhci_ring_alloc (xhci,1 ,1 ,TYPE_COMMAND , flags);if (!xhci->cmd_ring) goto fail; -INIT_LIST_HEAD (&xhci->cancel_cmd_list);xhci_dbg (xhci,"Allocated command ring at %p\n" , xhci->cmd_ring);xhci_dbg (xhci,"First segment DMA is 0x%llx\n" , (unsigned long long )xhci->cmd_ring->first_seg->dma);
@@ -2445,8 +2447,6 @@ int xhci_mem_init(struct xhci_hcd *xhci,if (xhci_setup_port_arrays (xhci, flags)) goto fail; -INIT_LIST_HEAD (&xhci->lpm_failed_devs); -/* Enable USB 3.0 device notifications for function remote wake, which * is necessary for allowing USB 3.0 devices to do remote wakeup from * U3 (device suspend).
Greg Kroah-Hartman
maintainerPATCH 7/79 xhci: fix list access before init
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vladimir Murzin <[email protected]>
commit 88696ae432ce7321540ac53d9caab3de9118b094 upstream.
If for whatever reason we fall into fail path in xhci_mem_init() before bw table gets initialized we may access the uninitialized lists in xhci_mem_cleanup().
Check for bw table before traversing lists in cleanup routine.
This patch should be backported to kernels as old as 3.2, that contain the commit 839c817ce67178ca3c7c7ad534c571bba1e69ebe "xhci: Store information about roothubs and TTs."
--- drivers/usb/host/xhci-mem.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/usb/host/xhci-mem.c +4 -0
@@ -1827,6 +1827,9 @@ void xhci_mem_cleanup(struct xhci_hcd *x }spin_unlock_irqrestore (&xhci->lock, flags); +if (!xhci->rh_bw) + goto no_bw; + num_ports =HCS_MAX_PORTS (xhci->hcs_params1);for (i =0 ; i < num_ports; i++) {struct xhci_interval_bw_table *bwt = &xhci->rh_bw[i].bw_table;
@@ -1845,6 +1848,7 @@ void xhci_mem_cleanup(struct xhci_hcd *x } } +no_bw: xhci->num_usb2_ports =0 ; xhci->num_usb3_ports =0 ; xhci->num_active_eps =0 ;
Greg Kroah-Hartman
maintainerPATCH 8/79 xhci: Disable D3cold for buggy TI redrivers.
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sarah Sharp <[email protected]>
commit c3897aa5386faba77e5bbdf94902a1658d3a5b11 upstream.
Some xHCI hosts contain a "redriver" from TI that silently drops port status connect changes if the port slips into Compliance Mode. If the port slips into compliance mode while the host is in D0, there will not be a port status change event. If the port slips into compliance mode while the host is in D3, the host will not send a PME. This includes when the system is suspended (S3) or hibernated (S4).
If this happens when the system is in S3/S4, there is nothing software can do. Other port status change events that would normally cause the host to wake the system from S3/S4 may also be lost. This includes remote wakeup, disconnects and connects on other ports, and overrcurrent events. A decision was made to _NOT_ disable system suspend/hibernate on these systems, since users are unlikely to enable wakeup from S3/S4 for the xHCI host.
Software can deal with this issue when the system is in S0. A work around was put in to poll the port status registers for Compliance Mode. The xHCI driver will continue to poll the registers while the host is runtime suspended. Unfortunately, that means we can't allow the PCI device to go into D3cold, because power will be removed from the host, and the config space will read as all Fs.
Disable D3cold in the xHCI PCI runtime suspend function.
This patch should be backported to kernels as old as 3.2, that contain the commit 71c731a296f1b08a3724bd1b514b64f1bda87a23 "usb: host:
xhci: Fix Compliance Mode on SN65LVPE502CP Hardware"
--- drivers/usb/host/xhci-pci.c | 8 ++++++++ drivers/usb/host/xhci.c | 4 ++-- drivers/usb/host/xhci.h | 3 +++ 3 files changed, 13 insertions(+), 2 deletions(-)
drivers/usb/host/xhci-pci.c +8 -0
@@ -221,6 +221,14 @@ static void xhci_pci_remove(struct pci_dstatic int xhci_pci_suspend (struct usb_hcd *hcd,bool do_wakeup) {struct xhci_hcd *xhci =hcd_to_xhci (hcd); +struct pci_dev *pdev =to_pci_dev (hcd->self.controller); + +/* +* Systems with the TI redriver that loses port status change events +* need to have the registers polled during D3, so avoid D3cold. +*/ +if (xhci_compliance_mode_recovery_timer_quirk_check ()) + pdev->no_d3cold = true;return xhci_suspend (xhci); }
drivers/usb/host/xhci.c +2 -2
@@ -466,7 +466,7 @@ static void compliance_mode_recovery_tim* Systems: * Vendor: Hewlett-Packard -> System Models: Z420, Z620 and Z820 */ -static bool compliance_mode_recovery_timer_quirk_check (void ) +bool xhci_compliance_mode_recovery_timer_quirk_check (void ) {const char *dmi_product_name, *dmi_sys_vendor;
@@ -517,7 +517,7 @@ int xhci_init(struct usb_hcd *hcd)xhci_dbg (xhci,"Finished xhci_init\n" );/* Initializing Compliance Mode Recovery Data If Needed */ -if (compliance_mode_recovery_timer_quirk_check ()) { +if (xhci_compliance_mode_recovery_timer_quirk_check ()) { xhci->quirks |=XHCI_COMP_MODE_QUIRK ;compliance_mode_recovery_timer_init (xhci); }
drivers/usb/host/xhci.h +3 -0
@@ -1853,4 +1853,7 @@ struct xhci_input_control_ctx *xhci_get_struct xhci_slot_ctx *xhci_get_slot_ctx (struct xhci_hcd *xhci,struct xhci_container_ctx *ctx);struct xhci_ep_ctx *xhci_get_ep_ctx (struct xhci_hcd *xhci,struct xhci_container_ctx *ctx,unsigned int ep_index); +/* xHCI quirks */ +bool xhci_compliance_mode_recovery_timer_quirk_check (void ); +#endif /* __LINUX_XHCI_HCD_H */
Greg Kroah-Hartman
maintainerPATCH 9/79 x86/PCI: Map PCI setup data with ioremap() so it can be in highmem
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matt Fleming <[email protected]>
commit 65694c5aaddfedd9da082e4e150cafc6b3fc8a6a upstream.
f9a37be0f0 ("x86: Use PCI setup data") added support for using PCI ROM images from setup_data. This used phys_to_virt(), which is not valid for highmem addresses, and can cause a crash when booting a 32-bit kernel via the EFI boot stub.
pcibios_add_device() assumes that the physical addresses stored in setup_data are accessible via the direct kernel mapping, and that calling phys_to_virt() is valid. This isn't guaranteed to be true on x86 where the direct mapping range is much smaller than on x86-64.
Calling phys_to_virt() on a highmem address results in the following:
BUG: unable to handle kernel paging request at 39a3c198 IP: [<c262be0f>] pcibios_add_device+0x2f/0x90 ... Call Trace: [<c2370c73>] pci_device_add+0xe3/0x130 [<c274640b>] pci_scan_single_device+0x8b/0xb0 [<c2370d08>] pci_scan_slot+0x48/0x100 [<c2371904>] pci_scan_child_bus+0x24/0xc0 [<c262a7b0>] pci_acpi_scan_root+0x2c0/0x490 [<c23b7203>] acpi_pci_root_add+0x312/0x42f ...
The solution is to use ioremap() instead of phys_to_virt() to map the setup data into the kernel address space.
--- arch/x86/pci/common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/x86/pci/common.c +4 -1
@@ -617,7 +617,9 @@ int pcibios_add_device(struct pci_dev *d pa_data = boot_params.hdr.setup_data;while (pa_data) { - data =phys_to_virt (pa_data); + data =ioremap (pa_data,sizeof (*rom)); +if (!data) +return -ENOMEM ;if (data->type ==SETUP_PCI ) { rom = (struct pci_setup_rom *)data;
@@ -634,6 +636,7 @@ int pcibios_add_device(struct pci_dev *d } } pa_data = data->next; +iounmap (data); }return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 10/79 usb: musb: make use_sg flag URB specific
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Virupax Sadashivpetimath <[email protected]>
commit ed74df12dc3e07a37d99aab60211496e871488a0 upstream.
Since highmem PIO URB handling was introduced in:
8e8a551 usb: musb: host: Handle highmem in PIO mode
when a URB is being handled it may happen that the static use_sg flag was set by a previous URB with buffer in highmem. This leads to error in handling the present URB.
Fix this by making the use_sg flag URB specific.
--- drivers/usb/musb/musb_host.c | 18 ++++++++---------- drivers/usb/musb/musb_host.h | 1 + 2 files changed, 9 insertions(+), 10 deletions(-)
drivers/usb/musb/musb_host.c +8 -10
@@ -1232,7 +1232,6 @@ void musb_host_tx(struct musb *musb, u8void __iomem *mbase = musb->mregs;struct dma_channel *dma;bool transfer_pending = false; -static bool use_sg;musb_ep_select (mbase, epnum); tx_csr =musb_readw (epio,MUSB_TXCSR );
@@ -1463,9 +1462,9 @@ done:* NULL. */ if (!urb->transfer_buffer) - use_sg = true; + qh->use_sg = true; -if (use_sg) { +if (qh->use_sg) {/* sg_miter_start is already done in musb_ep_program */ if (!sg_miter_next (&qh->sg_miter)) {dev_err (musb->controller,"error: sg list empty\n" );
@@ -1484,9 +1483,9 @@ done: qh->segsize = length; -if (use_sg) { +if (qh->use_sg) {if (offset + length >= urb->transfer_buffer_length) - use_sg = false; + qh->use_sg = false; }musb_ep_select (mbase, epnum);
@@ -1552,7 +1551,6 @@ void musb_host_rx(struct musb *musb, u8bool done = false;u32 status;struct dma_channel *dma; -static bool use_sg;unsigned int sg_flags =SG_MITER_ATOMIC |SG_MITER_TO_SG ;musb_ep_select (mbase, epnum);
@@ -1878,12 +1876,12 @@ void musb_host_rx(struct musb *musb, u8* NULL. */ if (!urb->transfer_buffer) { - use_sg = true; + qh->use_sg = true;sg_miter_start (&qh->sg_miter, urb->sg,1 , sg_flags); } -if (use_sg) { +if (qh->use_sg) {if (!sg_miter_next (&qh->sg_miter)) {dev_err (musb->controller,"error: sg list empty\n" );sg_miter_stop (&qh->sg_miter);
@@ -1913,8 +1911,8 @@ finish: urb->actual_length += xfer_len; qh->offset += xfer_len;if (done) { -if (use_sg) - use_sg = false; +if (qh->use_sg) + qh->use_sg = false;if (urb->status == -EINPROGRESS ) urb->status = status;
drivers/usb/musb/musb_host.h +1 -0
@@ -74,6 +74,7 @@ struct musb_qh {u16 frame;/* for periodic schedule */ unsigned iso_idx;/* in urb->iso_frame_desc[] */ struct sg_mapping_iter sg_miter;/* for highmem in PIO mode */ +bool use_sg;/* to track urb using sglist */ };/* map from control or bulk queue head to the first qh on that ring */
Greg Kroah-Hartman
maintainerPATCH 11/79 ALSA: usb-audio: fix Roland/Cakewalk UM-3G support
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Clemens Ladisch <[email protected]>
commit a0c6d309c6df14655f9962f666d1da96318b0b7c upstream.
Commit 927c9423dd5f2d1c0b93d5e694ab84b4a5559713 (ALSA: usb-audio: add Edirol UM-3G support) used a wrong quirk type, which would make the driver refuse to attach with the error message "MIDIStreaming interface descriptor not found".
--- sound/usb/quirks-table.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
sound/usb/quirks-table.h +5 -1
@@ -1714,7 +1714,11 @@ YAMAHA_DEVICE(0x7010, "UB99"), USB_DEVICE_VENDOR_SPEC(0x0582, 0x0108), .driver_info = (unsigned long ) & (const struct snd_usb_audio_quirk ) { .ifnum =0 , - .type =QUIRK_MIDI_STANDARD_INTERFACE + .type =QUIRK_MIDI_FIXED_ENDPOINT , + .data = & (const struct snd_usb_midi_endpoint_info ) { + .out_cables =0x0007 , + .in_cables =0x0007 + } } }, {
Greg Kroah-Hartman
maintainerPATCH 12/79 ALSA: usb-audio - Apply Logitech QuickCam Pro 9000 quirk only to audio iface
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <[email protected]>
commit 8eafc0a161123d90617c9ca2eddfe87b382b1b89 upstream.
... instead of applying to all interfaces.
Reference: http://forums.gentoo.org/viewtopic-p-6886404.html
--- sound/usb/quirks-table.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
sound/usb/quirks-table.h +7 -1
@@ -215,7 +215,13 @@ .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL }, { - USB_DEVICE(0x046d, 0x0990), + .match_flags =USB_DEVICE_ID_MATCH_DEVICE | +USB_DEVICE_ID_MATCH_INT_CLASS | + USB_DEVICE_ID_MATCH_INT_SUBCLASS, + .idVendor = 0x046d, + .idProduct = 0x0990, + .bInterfaceClass = USB_CLASS_AUDIO, + .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL, .driver_info = (unsigned long ) & (const struct snd_usb_audio_quirk ) { .vendor_name ="Logitech, Inc." , .product_name ="QuickCam Pro 9000" ,
Greg Kroah-Hartman
maintainerPATCH 13/79 ALSA: usb-audio - Fix invalid volume resolution on Logitech HD webcam c270
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <[email protected]>
commit 11e7064f35bb87da8f427d1aa4bbd8b7473a3993 upstream.
USB audio driver spews an error message when probing Logitech HD
webcam c270:
ALSA mixer.c:1300 usb_audio: Warning! Unlikely big volume range (=6144), cval->res is probably wrong. ALSA mixer.c:1304 usb_audio: [5] FU [Mic Capture Volume] ch = 1, val = 1536/7680/1
Obviously the device needs a fixed volume resolution (cval->res = 384) like other Logitech devices.
Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=821735
--- sound/usb/mixer.c | 1 + 1 file changed, 1 insertion(+)
sound/usb/mixer.c +1 -0
@@ -886,6 +886,7 @@ static void volume_control_quirks(structcase USB_ID (0x046d ,0x0808 ):case USB_ID (0x046d ,0x0809 ):case USB_ID (0x046d ,0x081d ):/* HD Webcam c510 */ +case USB_ID (0x046d ,0x0825 ):/* HD Webcam c270 */ case USB_ID (0x046d ,0x0991 ):/* Most audio usb devices lie about volume resolution. * Most Logitech webcams have res = 384.
Greg Kroah-Hartman
maintainerPATCH 14/79 USB: iuu_phoenix: fix bulk-message timeout
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 6c13ff68a7ce01da7a51b44241a7aad8eaaedde7 upstream.
The bulk-message timeout is specified in milliseconds and should not depend on HZ.
--- drivers/usb/serial/iuu_phoenix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/serial/iuu_phoenix.c +2 -2
@@ -289,7 +289,7 @@ static int bulk_immediate(struct usb_serusb_bulk_msg (serial->dev,usb_sndbulkpipe (serial->dev, port->bulk_out_endpointAddress), buf, - count, &actual,HZ *1 ); + count, &actual,1000 );if (status !=IUU_OPERATION_OK )dev_dbg (&port->dev,"%s - error = %2x\n" , __func__, status);
@@ -309,7 +309,7 @@ static int read_immediate(struct usb_serusb_bulk_msg (serial->dev,usb_rcvbulkpipe (serial->dev, port->bulk_in_endpointAddress), buf, - count, &actual,HZ *1 ); + count, &actual,1000 );if (status !=IUU_OPERATION_OK )dev_dbg (&port->dev,"%s - error = %2x\n" , __func__, status);
Greg Kroah-Hartman
maintainerPATCH 15/79 USB: keyspan: fix bogus array index
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit a07088098a650267b2eda689538133a324b9523f upstream.
The outcont_endpoints array was indexed using the port minor number (which can be greater than the array size) rather than the device port number.
--- drivers/usb/serial/keyspan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/serial/keyspan.c +1 -1
@@ -1594,7 +1594,7 @@ static int keyspan_usa26_send_setup(stru d_details = s_priv->device_details; device_port = port->number - port->serial->minor; - outcont_urb = d_details->outcont_endpoints[port->number]; + outcont_urb = d_details->outcont_endpoints[device_port]; this_urb = p_priv->outcont_urb;dev_dbg (&port->dev,"%s - endpoint %d\n" , __func__,usb_pipeendpoint (this_urb->pipe));
Greg Kroah-Hartman
maintainerPATCH 16/79 USB: ark3116: fix control-message timeout
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 634371911730a462626071065b64cd6e1fe213e0 upstream.
The control-message timeout is specified in milliseconds and should not depend on HZ.
--- drivers/usb/serial/ark3116.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/serial/ark3116.c +1 -1
@@ -43,7 +43,7 @@#define DRIVER_NAME "ark3116"/* usb timeout of 1 second */ -#define ARK_TIMEOUT (1*HZ) +#define ARK_TIMEOUT 1000static const struct usb_device_id id_table[] = { {USB_DEVICE (0x6547 ,0x0232 ) },
Greg Kroah-Hartman
maintainerPATCH 17/79 USB: visor: fix initialisation of Treo/Kyocera devices
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 420021a395ce38b7ab2cceb52dee4038be7d8fa3 upstream.
Fix regression introduced by commit 214916f2e ("USB: visor: reimplement using generic framework") which broke initialisation of Treo/Kyocera devices that re-mapped bulk-in endpoints.
--- drivers/usb/serial/visor.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/usb/serial/visor.c +8 -0
@@ -566,9 +566,17 @@ static int treo_attach(struct usb_serial*/ #define COPY_PORT (dest, src) \ do { \ + int i; \ + \ + for (i = 0; i < ARRAY_SIZE(src->read_urbs); ++i) { \ + dest->read_urbs[i] = src->read_urbs[i]; \ + dest->read_urbs[i]->context = dest; \ + dest->bulk_in_buffers[i] = src->bulk_in_buffers[i]; \ + } \ dest->read_urb = src->read_urb; \ dest->bulk_in_endpointAddress = src->bulk_in_endpointAddress;\ dest->bulk_in_buffer = src->bulk_in_buffer; \ + dest->bulk_in_size = src->bulk_in_size; \ dest->interrupt_in_urb = src->interrupt_in_urb; \ dest->interrupt_in_endpointAddress = \ src->interrupt_in_endpointAddress;\
Greg Kroah-Hartman
maintainerPATCH 18/79 USB: zte_ev: fix control-message timeouts
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 5cbfa3acdcbf19e1d29cf3479ad8200d2e644e44 upstream.
The control-message timeout is specified in milliseconds and should not depend on HZ.
--- drivers/usb/serial/zte_ev.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)
drivers/usb/serial/zte_ev.c +14 -14
@@ -53,7 +53,7 @@ static int zte_ev_usb_serial_open(struct result =usb_control_msg (udev,usb_sndctrlpipe (udev,0 ),0x22 ,0x21 ,0x0001 ,0x0000 ,NULL , len, -HZ *USB_CTRL_GET_TIMEOUT ); +USB_CTRL_GET_TIMEOUT );dev_dbg (dev,"result = %d\n" , result);/* send 2st cmd and recieve data */
@@ -65,7 +65,7 @@ static int zte_ev_usb_serial_open(struct result =usb_control_msg (udev,usb_rcvctrlpipe (udev,0 ),0x21 ,0xa1 ,0x0000 ,0x0000 , buf, len, -HZ *USB_CTRL_GET_TIMEOUT ); +USB_CTRL_GET_TIMEOUT );debug_data (dev, __func__, len, buf, result);/* send 3 cmd */
@@ -84,7 +84,7 @@ static int zte_ev_usb_serial_open(struct result =usb_control_msg (udev,usb_sndctrlpipe (udev,0 ),0x20 ,0x21 ,0x0000 ,0x0000 , buf, len, -HZ *USB_CTRL_GET_TIMEOUT ); +USB_CTRL_GET_TIMEOUT );debug_data (dev, __func__, len, buf, result);/* send 4 cmd */
@@ -95,7 +95,7 @@ static int zte_ev_usb_serial_open(struct result =usb_control_msg (udev,usb_sndctrlpipe (udev,0 ),0x22 ,0x21 ,0x0003 ,0x0000 ,NULL , len, -HZ *USB_CTRL_GET_TIMEOUT ); +USB_CTRL_GET_TIMEOUT );dev_dbg (dev,"result = %d\n" , result);/* send 5 cmd */
@@ -107,7 +107,7 @@ static int zte_ev_usb_serial_open(struct result =usb_control_msg (udev,usb_rcvctrlpipe (udev,0 ),0x21 ,0xa1 ,0x0000 ,0x0000 , buf, len, -HZ *USB_CTRL_GET_TIMEOUT ); +USB_CTRL_GET_TIMEOUT );debug_data (dev, __func__, len, buf, result);/* send 6 cmd */
@@ -126,7 +126,7 @@ static int zte_ev_usb_serial_open(struct result =usb_control_msg (udev,usb_sndctrlpipe (udev,0 ),0x20 ,0x21 ,0x0000 ,0x0000 , buf, len, -HZ *USB_CTRL_GET_TIMEOUT ); +USB_CTRL_GET_TIMEOUT );debug_data (dev, __func__, len, buf, result);kfree (buf);
@@ -178,7 +178,7 @@ static void zte_ev_usb_serial_close(stru result =usb_control_msg (udev,usb_sndctrlpipe (udev,0 ),0x22 ,0x21 ,0x0002 ,0x0000 ,NULL , len, -HZ *USB_CTRL_GET_TIMEOUT ); +USB_CTRL_GET_TIMEOUT );dev_dbg (dev,"result = %d\n" , result);/* send 2st ctl cmd(CTL 21 22 03 00 00 00 00 00 ) */
@@ -186,7 +186,7 @@ static void zte_ev_usb_serial_close(stru result =usb_control_msg (udev,usb_sndctrlpipe (udev,0 ),0x22 ,0x21 ,0x0003 ,0x0000 ,NULL , len, -HZ *USB_CTRL_GET_TIMEOUT ); +USB_CTRL_GET_TIMEOUT );dev_dbg (dev,"result = %d\n" , result);/* send 3st cmd and recieve data */
@@ -198,7 +198,7 @@ static void zte_ev_usb_serial_close(stru result =usb_control_msg (udev,usb_rcvctrlpipe (udev,0 ),0x21 ,0xa1 ,0x0000 ,0x0000 , buf, len, -HZ *USB_CTRL_GET_TIMEOUT ); +USB_CTRL_GET_TIMEOUT );debug_data (dev, __func__, len, buf, result);/* send 4 cmd */
@@ -217,7 +217,7 @@ static void zte_ev_usb_serial_close(stru result =usb_control_msg (udev,usb_sndctrlpipe (udev,0 ),0x20 ,0x21 ,0x0000 ,0x0000 , buf, len, -HZ *USB_CTRL_GET_TIMEOUT ); +USB_CTRL_GET_TIMEOUT );debug_data (dev, __func__, len, buf, result);/* send 5 cmd */
@@ -228,7 +228,7 @@ static void zte_ev_usb_serial_close(stru result =usb_control_msg (udev,usb_sndctrlpipe (udev,0 ),0x22 ,0x21 ,0x0003 ,0x0000 ,NULL , len, -HZ *USB_CTRL_GET_TIMEOUT ); +USB_CTRL_GET_TIMEOUT );dev_dbg (dev,"result = %d\n" , result);/* send 6 cmd */
@@ -240,7 +240,7 @@ static void zte_ev_usb_serial_close(stru result =usb_control_msg (udev,usb_rcvctrlpipe (udev,0 ),0x21 ,0xa1 ,0x0000 ,0x0000 , buf, len, -HZ *USB_CTRL_GET_TIMEOUT ); +USB_CTRL_GET_TIMEOUT );debug_data (dev, __func__, len, buf, result);/* send 7 cmd */
@@ -259,7 +259,7 @@ static void zte_ev_usb_serial_close(stru result =usb_control_msg (udev,usb_sndctrlpipe (udev,0 ),0x20 ,0x21 ,0x0000 ,0x0000 , buf, len, -HZ *USB_CTRL_GET_TIMEOUT ); +USB_CTRL_GET_TIMEOUT );debug_data (dev, __func__, len, buf, result);/* send 8 cmd */
@@ -270,7 +270,7 @@ static void zte_ev_usb_serial_close(stru result =usb_control_msg (udev,usb_sndctrlpipe (udev,0 ),0x22 ,0x21 ,0x0003 ,0x0000 ,NULL , len, -HZ *USB_CTRL_GET_TIMEOUT ); +USB_CTRL_GET_TIMEOUT );dev_dbg (dev,"result = %d\n" , result);kfree (buf);
Greg Kroah-Hartman
maintainerPATCH 19/79 USB: zte_ev: fix broken open
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit d8a1d0d54d5fdac0347b75e9afd554b3dfaa465f upstream.
Remove bogus port-number check in open and close, which prevented this driver from being used with a minor number different from zero.
--- drivers/usb/serial/zte_ev.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/usb/serial/zte_ev.c +0 -6
@@ -41,9 +41,6 @@ static int zte_ev_usb_serial_open(structint len;unsigned char *buf; -if (port->number !=0 ) -return -ENODEV ; - buf =kmalloc (MAX_SETUP_DATA_SIZE ,GFP_KERNEL );if (!buf)return -ENOMEM ;
@@ -166,9 +163,6 @@ static void zte_ev_usb_serial_close(struint len;unsigned char *buf; -if (port->number !=0 ) -return ; - buf =kmalloc (MAX_SETUP_DATA_SIZE ,GFP_KERNEL );if (!buf)return ;
Greg Kroah-Hartman
maintainerPATCH 20/79 USB: Serial: cypress_M8: Enable FRWD Dongle hidcom device
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Robert Butora <[email protected]>
commit 6529591e3eef65f0f528a81ac169f6e294b947a7 upstream.
The patch adds a new HIDCOM device and does not affect other devices driven by the cypress_M8 module. Changes are:
- add VendorID ProductID to device tables
- skip unstable speed check because FRWD uses 115200bps
- skip reset at probe which is an issue workaround for this particular device.
--- drivers/usb/serial/cypress_m8.c | 18 +++++++++++++++++- drivers/usb/serial/cypress_m8.h | 4 ++++ 2 files changed, 21 insertions(+), 1 deletion(-)
drivers/usb/serial/cypress_m8.c +17 -1
@@ -65,6 +65,7 @@ static const struct usb_device_id id_tabstatic const struct usb_device_id id_table_cyphidcomrs232[] = { {USB_DEVICE (VENDOR_ID_CYPRESS ,PRODUCT_ID_CYPHIDCOM ) }, {USB_DEVICE (VENDOR_ID_POWERCOM ,PRODUCT_ID_UPS ) }, + {USB_DEVICE (VENDOR_ID_FRWD ,PRODUCT_ID_CYPHIDCOM_FRWD ) }, { }/* Terminating entry */ };
@@ -78,6 +79,7 @@ static const struct usb_device_id id_tab { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB_LT20) }, { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) }, { USB_DEVICE(VENDOR_ID_POWERCOM, PRODUCT_ID_UPS) }, + { USB_DEVICE(VENDOR_ID_FRWD, PRODUCT_ID_CYPHIDCOM_FRWD) }, { USB_DEVICE(VENDOR_ID_DAZZLE, PRODUCT_ID_CA42) }, { } /* Terminating entry */ };
@@ -230,6 +232,12 @@ static struct usb_serial_driver * const* Cypress serial helper functions *****************************************************************************/ +/* FRWD Dongle hidcom needs to skip reset and speed checks */ +static inline bool is_frwd (struct usb_device *dev) +{ +return ((le16_to_cpu (dev->descriptor.idVendor) ==VENDOR_ID_FRWD ) && + (le16_to_cpu (dev->descriptor.idProduct) ==PRODUCT_ID_CYPHIDCOM_FRWD )); +}static int analyze_baud_rate (struct usb_serial_port *port,speed_t new_rate) {
@@ -239,6 +247,10 @@ static int analyze_baud_rate(struct usb_if (unstable_bauds)return new_rate; +/* FRWD Dongle uses 115200 bps */ +if (is_frwd (port->serial->dev)) +return new_rate; +/* * The general purpose firmware for the Cypress M8 allows for * a maximum speed of 57600bps (I have no idea whether DeLorme
@@ -449,7 +461,11 @@ static int cypress_generic_port_probe(streturn -ENOMEM ; } -usb_reset_configuration (serial->dev); +/* Skip reset for FRWD device. It is a workaound: +device hangs if it receives SET_CONFIGURE in Configured +state. */ +if (!is_frwd (serial->dev)) +usb_reset_configuration (serial->dev); priv->cmd_ctrl =0 ; priv->line_control =0 ;
drivers/usb/serial/cypress_m8.h +4 -0
@@ -24,6 +24,10 @@#define VENDOR_ID_CYPRESS 0x04b4#define PRODUCT_ID_CYPHIDCOM 0x5500 +/* FRWD Dongle - a GPS sports watch */ +#define VENDOR_ID_FRWD 0x6737 +#define PRODUCT_ID_CYPHIDCOM_FRWD 0x0001 +/* Powercom UPS, chip CY7C63723 */ #define VENDOR_ID_POWERCOM 0x0d9f#define PRODUCT_ID_UPS 0x0002
Greg Kroah-Hartman
maintainerPATCH 21/79 USB: whiteheat: fix broken port configuration
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 9eecf22d2b375b9064a20421c6c307b760b03d46 upstream.
When configuring the port (e.g. set_termios) the port minor number rather than the port number was used in the request (and they only coincide for minor number 0).
--- drivers/usb/serial/whiteheat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/serial/whiteheat.c +1 -1
@@ -649,7 +649,7 @@ static void firm_setup_port(struct tty_sstruct whiteheat_port_settings port_settings;unsigned int cflag = tty->termios.c_cflag; - port_settings.port = port->number +1 ; + port_settings.port = port->number - port->serial->minor +1 ;/* get the byte size */ switch (cflag &CSIZE ) {
Greg Kroah-Hartman
maintainerPATCH 22/79 USB: serial: fix Treo/Kyocera interrrupt-in urb context
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 5f8e2c07d75967ee49a5da1d21ddf5f50d48cda0 upstream.
The first and second interrupt-in urbs are swapped for some Treo/Kyocera devices, but the urb context was never updated with the new port.
--- drivers/usb/serial/visor.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/serial/visor.c +1 -0
@@ -578,6 +578,7 @@ static int treo_attach(struct usb_serial dest->bulk_in_buffer = src->bulk_in_buffer; \ dest->bulk_in_size = src->bulk_in_size; \ dest->interrupt_in_urb = src->interrupt_in_urb; \ + dest->interrupt_in_urb->context = dest; \ dest->interrupt_in_endpointAddress = \ src->interrupt_in_endpointAddress;\ dest->interrupt_in_buffer = src->interrupt_in_buffer; \
Greg Kroah-Hartman
maintainerPATCH 23/79 USB: revert periodic scheduling bugfix
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alan Stern <[email protected]>
commit fdc03438f53a00294ed9939eb3a1f6db6f3d8963 upstream.
This patch reverts commit 3e619d04159be54b3daa0b7036b0ce9e067f4b5d (USB: EHCI: fix bug in scheduling periodic split transfers). The commit was valid -- it fixed a real bug -- but the periodic scheduler in ehci-hcd is in such bad shape (especially the part that handles split transactions) that fixing one bug is very likely to cause another to surface. That's what happened in this case; the result was choppy and noisy playback on certain 24-bit audio devices.
The only real fix will be to rewrite this entire section of code. My next project...
This fixes https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1136110.
Thanks to Tim Richardson for extra testing and feedback, and to Joseph Salisbury and Tyson Tan for tracking down the original source of the problem.
--- drivers/usb/host/ehci-sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/ehci-sched.c +1 -1
@@ -213,7 +213,7 @@ static inline unsigned char tt_start_ufr }static const unsigned char -max_tt_usecs[] = {125 ,125 ,125 ,125 ,125 ,125 ,125 ,25 }; +max_tt_usecs[] = {125 ,125 ,125 ,125 ,125 ,125 ,30 ,0 };/* carryover low/fullspeed bandwidth that crosses uframe boundries */ static inline void carryover_tt_bandwidth (unsigned short tt_usecs[8 ])
Greg Kroah-Hartman
maintainerPATCH 24/79 USB: mos7840: fix DMA to stack
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 15ee89c3347fbf58a4361011eda5ac2731e45126 upstream.
Fix regression introduced by commit 0eafe4de1a ("USB: serial: mos7840:
add support for MCS7810 devices") which used stack-allocated buffers for control messages.
--- drivers/usb/serial/mos7840.c | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-)
drivers/usb/serial/mos7840.c +27 -8
@@ -2255,13 +2255,21 @@ static int mos7840_ioctl(struct tty_strustatic int mos7810_check (struct usb_serial *serial) {int i, pass_count =0 ; +u8 *buf;__u16 data =0 , mcr_data =0 ;__u16 test_pattern =0x55AA ; +int res; + + buf =kmalloc (VENDOR_READ_LENGTH ,GFP_KERNEL ); +if (!buf) +return 0 ;/* failed to identify 7810 */ /* Store MCR setting */ -usb_control_msg (serial->dev,usb_rcvctrlpipe (serial->dev,0 ), + res =usb_control_msg (serial->dev,usb_rcvctrlpipe (serial->dev,0 ),MCS_RDREQ ,MCS_RD_RTYPE ,0x0300 ,MODEM_CONTROL_REGISTER , - &mcr_data,VENDOR_READ_LENGTH ,MOS_WDR_TIMEOUT ); + buf,VENDOR_READ_LENGTH ,MOS_WDR_TIMEOUT ); +if (res ==VENDOR_READ_LENGTH ) + mcr_data = *buf;for (i =0 ; i <16 ; i++) {/* Send the 1-bit test pattern out to MCS7810 test pin */
@@ -2271,9 +2279,12 @@ static int mos7810_check(struct usb_seri MODEM_CONTROL_REGISTER, NULL, 0, MOS_WDR_TIMEOUT);/* Read the test pattern back */ -usb_control_msg (serial->dev,usb_rcvctrlpipe (serial->dev,0 ), -MCS_RDREQ ,MCS_RD_RTYPE ,0 ,GPIO_REGISTER , &data, -VENDOR_READ_LENGTH ,MOS_WDR_TIMEOUT ); + res =usb_control_msg (serial->dev, +usb_rcvctrlpipe (serial->dev,0 ),MCS_RDREQ , +MCS_RD_RTYPE ,0 ,GPIO_REGISTER , buf, +VENDOR_READ_LENGTH ,MOS_WDR_TIMEOUT ); +if (res ==VENDOR_READ_LENGTH ) + data = *buf;/* If this is a MCS7810 device, both test patterns must match */ if (((test_pattern >> i) ^ (~data >>1 )) &0x0001 )
@@ -2287,6 +2298,8 @@ static int mos7810_check(struct usb_seriMCS_WR_RTYPE ,0x0300 | mcr_data,MODEM_CONTROL_REGISTER ,NULL , 0, MOS_WDR_TIMEOUT); +kfree (buf); +if (pass_count ==16 )return 1 ;
@@ -2296,11 +2309,17 @@ static int mos7810_check(struct usb_seristatic int mos7840_calc_num_ports (struct usb_serial *serial) {__u16 data =0x00 ; +u8 *buf;int mos7840_num_ports; -usb_control_msg (serial->dev,usb_rcvctrlpipe (serial->dev,0 ), -MCS_RDREQ ,MCS_RD_RTYPE ,0 ,GPIO_REGISTER , &data, -VENDOR_READ_LENGTH ,MOS_WDR_TIMEOUT ); + buf =kzalloc (VENDOR_READ_LENGTH ,GFP_KERNEL ); +if (buf) { +usb_control_msg (serial->dev,usb_rcvctrlpipe (serial->dev,0 ), +MCS_RDREQ ,MCS_RD_RTYPE ,0 ,GPIO_REGISTER , buf, +VENDOR_READ_LENGTH ,MOS_WDR_TIMEOUT ); + data = *buf; +kfree (buf); + }if (serial->dev->descriptor.idProduct ==MOSCHIP_DEVICE_ID_7810 || serial->dev->descriptor.idProduct ==MOSCHIP_DEVICE_ID_7820 ) {
Greg Kroah-Hartman
maintainerPATCH 25/79 USB: mos7720: fix DMA to stack
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 72ea18a558ed7a63a50bb121ba60d73b5b38ae30 upstream.
The read_mos_reg function is called with stack-allocated buffers, which must not be used for control messages.
--- drivers/usb/serial/mos7720.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)
drivers/usb/serial/mos7720.c +14 -3
@@ -228,11 +228,22 @@ static int read_mos_reg(struct usb_seria__u8 requesttype = (__u8 )0xc0 ;__u16 index =get_reg_index (reg);__u16 value =get_reg_value (reg, serial_portnum); -int status =usb_control_msg (usbdev, pipe, request, requesttype, value, - index, data,1 ,MOS_WDR_TIMEOUT ); -if (status <0 ) +u8 *buf; +int status; + + buf =kmalloc (1 ,GFP_KERNEL ); +if (!buf) +return -ENOMEM ; + + status =usb_control_msg (usbdev, pipe, request, requesttype, value, + index, buf,1 ,MOS_WDR_TIMEOUT ); +if (status ==1 ) + *data = *buf; +else if (status <0 )dev_err (&usbdev->dev,"mos7720: usb_control_msg() failed: %d" , status); +kfree (buf); +return status; }
Greg Kroah-Hartman
maintainerPATCH 26/79 USB: mos7720: fix message timeouts
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 849513a7809175420d353625b6f651d961e99d49 upstream.
The control and bulk-message timeouts are specified in milliseconds and should not depend on HZ.
--- drivers/usb/serial/mos7720.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/usb/serial/mos7720.c +3 -3
@@ -40,7 +40,7 @@#define DRIVER_DESC "Moschip USB Serial Driver"/* default urb timeout */ -#define MOS_WDR_TIMEOUT (HZ * 5) +#define MOS_WDR_TIMEOUT 5000#define MOS_MAX_PORT 0x02#define MOS_WRITE 0x0E
@@ -2003,7 +2003,7 @@ static int mos7720_startup(struct usb_se/* setting configuration feature to one */ usb_control_msg (serial->dev,usb_sndctrlpipe (serial->dev,0 ), - (__u8 )0x03 ,0x00 ,0x01 ,0x00 ,NULL ,0x00 ,5 *HZ ); + (__u8 )0x03 ,0x00 ,0x01 ,0x00 ,NULL ,0x00 ,5000 );/* start the interrupt urb */ ret_val =usb_submit_urb (serial->port[0 ]->interrupt_in_urb,GFP_KERNEL );
@@ -2046,7 +2046,7 @@ static void mos7720_release(struct usb_s/* wait for synchronous usb calls to return */ if (mos_parport->msg_pending)wait_for_completion_timeout (&mos_parport->syncmsg_compl, -MOS_WDR_TIMEOUT ); +msecs_to_jiffies (MOS_WDR_TIMEOUT ));parport_remove_port (mos_parport->pp);usb_set_serial_data (serial,NULL );
Greg Kroah-Hartman
maintainerPATCH 27/79 USB: mos7720: fix hardware flow control
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit a26f009a070e840fadacb91013b2391ba7ab6cc2 upstream.
The register access to enable hardware flow control depends on the device port number and not the port minor number.
--- drivers/usb/serial/mos7720.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/serial/mos7720.c +1 -1
@@ -1644,7 +1644,7 @@ static void change_port_settings(struct mos7720_port->shadowMCR |= (UART_MCR_XONANY );/* To set hardware flow control to the specified * * serial port, in SP1/2_CONTROL_REG */ -if (port->number) +if (port_number)write_mos_reg (serial, dummy,SP_CONTROL_REG ,0x01 );else write_mos_reg (serial, dummy,SP_CONTROL_REG ,0x02 );
Greg Kroah-Hartman
maintainerPATCH 28/79 acpi-cpufreq: set current frequency based on target P-State
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ross Lagerwall <[email protected]>
commit 8673b83bf2f013379453b4779047bf3c6ae387e4 upstream.
Commit 4b31e774 (Always set P-state on initialization) fixed bug #4634 and caused the driver to always set the target P-State at least once since the initial P-State may not be the desired one. Commit 5a1c0228 (cpufreq: Avoid calling cpufreq driver's target() routine if target_freq == policy->cur) caused a regression in this behavior.
This fixes the regression by setting policy->cur based on the CPU's target frequency rather than the CPU's current reported frequency (which may be different). This means that the P-State will be set initially if the CPU's target frequency is different from the governor's target frequency.
This fixes an issue where setting the default governor to performance wouldn't correctly enable turbo mode on all cores.
--- drivers/cpufreq/acpi-cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/cpufreq/acpi-cpufreq.c +2 -2
@@ -347,11 +347,11 @@ static u32 get_cur_val(const struct cpumswitch (per_cpu (acfreq_data,cpumask_first (mask))->cpu_feature) {case SYSTEM_INTEL_MSR_CAPABLE : cmd.type =SYSTEM_INTEL_MSR_CAPABLE ; - cmd.addr.msr.reg =MSR_IA32_PERF_STATUS ; + cmd.addr.msr.reg =MSR_IA32_PERF_CTL ;break ;case SYSTEM_AMD_MSR_CAPABLE : cmd.type =SYSTEM_AMD_MSR_CAPABLE ; - cmd.addr.msr.reg =MSR_AMD_PERF_STATUS ; + cmd.addr.msr.reg =MSR_AMD_PERF_CTL ;break ;case SYSTEM_IO_CAPABLE : cmd.type =SYSTEM_IO_CAPABLE ;
Greg Kroah-Hartman
maintainerPATCH 29/79 ACPI / video: ignore BIOS initial backlight value for HP m4
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Hung <[email protected]>
commit fedbe9bc6fd3e14b1ffbb3dac407777ac4a3650c upstream.
On HP m4 lapops, BIOS reports minimum backlight on boot and causes backlight to dim completely. This ignores the initial backlight values and set to max brightness.
References: https://bugs.launchpad.net/bugs/1184501
--- drivers/acpi/video.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/acpi/video.c +8 -0
@@ -447,6 +447,14 @@ static struct dmi_system_id video_dmi_ta DMI_MATCH(DMI_PRODUCT_NAME, "HP Folio 13 - 2000 Notebook PC"), }, }, + { + .callback = video_ignore_initial_backlight, + .ident = "HP Pavilion m4", + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion m4 Notebook PC"), + }, + }, {} };
Greg Kroah-Hartman
maintainerPATCH 30/79 ACPI / video: ignore BIOS initial backlight value for HP Pavilion g6
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ash Willis <[email protected]>
commit 780a6ec640a3fed671fc2c40e4dd30c03eca3ac3 upstream.
This patch addresses kernel bug 56661. BIOS reports an incorrect backlight value, causing the driver to switch off the backlight completely during startup. This patch ignores the incorrect value from BIOS.
References: https://bugzilla.kernel.org/show_bug.cgi?id=56661
--- drivers/acpi/video.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/acpi/video.c +8 -0
@@ -449,6 +449,14 @@ static struct dmi_system_id video_dmi_ta }, { .callback = video_ignore_initial_backlight, + .ident = "HP Pavilion g6 Notebook PC", + .matches = { +DMI_MATCH (DMI_BOARD_VENDOR ,"Hewlett-Packard" ), + DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion g6 Notebook PC"), + }, + }, + { + .callback = video_ignore_initial_backlight, .ident = "HP Pavilion m4", .matches = { DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
Greg Kroah-Hartman
maintainerPATCH 31/79 ACPI / scan: do not match drivers against objects having scan handlers
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aaron Lu <[email protected]>
commit 9f29ab11ddbfc12db54df5a66dab22b39ad94e8e upstream.
With the introduction of ACPI scan handlers, an ACPI device object with an ACPI scan handler attached to it must not be bound to an ACPI driver any more. Therefore it doesn't make sense to match those ACPI device objects against a newly registered ACPI driver in acpi_bus_match(), so make that function return 0 if the device object passed to it has an ACPI scan handler attached.
This also addresses a regression related to a broken ACPI table in the BIOS, where it has defined a _ROM method under the PCI root bridge object. This causes the video module to treat that object as a display controller device (since only display devices are supposed to have a _ROM method defined according to the ACPI spec). As a result, the ACPI video driver binds to the PCI root bridge object and overwrites the previously assigned driver_data field of it, causing subsequent calls to acpi_get_pci_dev() to fail.
[rjw: Subject and changelog]
References: https://bugzilla.kernel.org/show_bug.cgi?id=58091
--- drivers/acpi/scan.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/acpi/scan.c +4 -0
@@ -553,6 +553,10 @@ static int acpi_bus_match(struct devicestruct acpi_device *acpi_dev =to_acpi_device (dev);struct acpi_driver *acpi_drv =to_acpi_driver (drv); +/* Skip ACPI device objects with scan handlers attached. */ +if (acpi_dev->handler) +return 0 ; +return acpi_dev->flags.match_driver && !acpi_match_device_ids (acpi_dev, acpi_drv->ids); }
Greg Kroah-Hartman
maintainerPATCH 32/79 ACPI / PM: Do not execute _PS0 for devices without _PSC during initialization
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Rafael J. Wysocki" <[email protected]>
commit 7cd8407d53ef5fb0280fcbe34f42311472f90feb upstream.
Commit b378549 (ACPI / PM: Do not power manage devices in unknown initial states) added code to force devices without _PSC, but having _PS0 defined in the ACPI namespace, into ACPI power state D0 by executing _PS0 for them. That turned out to break Toshiba P870-303, however, so revert that code.
References: https://bugzilla.kernel.org/show_bug.cgi?id=58201
--- drivers/acpi/device_pm.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/acpi/device_pm.c +6 -4
@@ -269,11 +269,13 @@ int acpi_bus_init_power(struct acpi_deviif (result)return result; }else if (state ==ACPI_STATE_UNKNOWN ) { -/* No power resources and missing _PSC? Try to force D0. */ +/* +* No power resources and missing _PSC? Cross fingers and make +* it D0 in hope that this is what the BIOS put the device into. +* [We tried to force D0 here by executing _PS0, but that broke +* Toshiba P870-303 in a nasty way.] +*/ state =ACPI_STATE_D0 ; - result =acpi_dev_pm_explicit_set (device, state); -if (result) -return result; } device->power.state = state;return 0 ;
Greg Kroah-Hartman
maintainerPATCH 33/79 x86 / platform / hp_wmi: Fix bluetooth_rfkill misuse in hp_wmi_rfkill_setup()
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: "lan,Tianyu" <[email protected]>
commit af1d486c18bad7820b0ca52b413458914231102c upstream.
HP wmi platform driver fails to initialize GPS and causes poweroff failure in HP Elitebook 6930p.
Call Trace: [<ffffffffa088d25a>] hp_wmi_bios_setup+0x25a/0x3a0 [hp_wmi] [<ffffffff8135978c>] platform_drv_probe+0x3c/0x70 [<ffffffff81356d6a>] ? driver_sysfs_add+0x7a/0xb0 [<ffffffff81357407>] driver_probe_device+0x87/0x3a0 [<ffffffff813577f3>] __driver_attach+0x93/0xa0 [<ffffffff81357760>] ? __device_attach+0x40/0x40 [<ffffffff81355403>] bus_for_each_dev+0x63/0xa0 [<ffffffff81356e8e>] driver_attach+0x1e/0x20 [<ffffffff81356a28>] bus_add_driver+0x1f8/0x2b0 [<ffffffff81357e81>] driver_register+0x71/0x150 [<ffffffff813594e6>] platform_driver_register+0x46/0x50 [<ffffffff813595ab>] platform_driver_probe+0x1b/0xa0 [<ffffffffa088d55e>] hp_wmi_init+0x1be/0x1fb [hp_wmi] [<ffffffffa088d3a0>] ? hp_wmi_bios_setup+0x3a0/0x3a0 [hp_wmi] [<ffffffff8100210a>] do_one_initcall+0x10a/0x160 [<ffffffff810bdac6>] load_module+0x1b46/0x2640 [<ffffffff8128da20>] ? ddebug_proc_write+0xf0/0xf0 [<ffffffff810be662>] sys_init_module+0xa2/0xf0 [<ffffffff814d975d>] system_call_fastpath+0x1a/0x1f Code: 48 ff ff ff 80 7b 24 00 74 d2 41 83 e5 01 45 38 ec 74 c9 48 8d bb a0 03 00 00 e8 ed fb aa e0 5b 41 5c 41 5d 44 89 f0 41 5e 5d c3 <0f> 0b 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 66 66 66 66 RIP [<ffffffffa05c57af>] rfkill_set_hw_state+0x9f/0xb0 [rfkill] RSP <ffff880071523b60>
Check code and find this error is caused by misusing variable bluetooth_rfkill where gps_rfkill should be.
References: https://bugzilla.kernel.org/show_bug.cgi?id=58401
--- drivers/platform/x86/hp-wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/hp-wmi.c +1 -1
@@ -679,7 +679,7 @@ static int hp_wmi_rfkill_setup(struct pl }rfkill_init_sw_state (gps_rfkill,hp_wmi_get_sw_state (HPWMI_GPS )); -rfkill_set_hw_state (bluetooth_rfkill, +rfkill_set_hw_state (gps_rfkill,hp_wmi_get_hw_state (HPWMI_GPS )); err =rfkill_register (gps_rfkill);if (err)
Greg Kroah-Hartman
maintainerPATCH 34/79 ALSA: hda/via - Disable broken dynamic power control
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <[email protected]>
commit 087c2e3b4e062573dbbc8a50b9208992e3768dcf upstream.
Since the transition to the generic parser, the actual routes used there don't match always with the assumed static paths in some set_widgets_power_state callbacks. This results in the wrong power setup in the end. As a temporary workaround, we need to disable the calls together with the non-functional dynamic power control enum.
--- sound/pci/hda/patch_via.c | 5 +++++ 1 file changed, 5 insertions(+)
sound/pci/hda/patch_via.c +5 -0
@@ -231,9 +231,14 @@ static void vt1708_update_hp_work(structstatic void set_widgets_power_state (struct hda_codec *codec) { +#if 0 /* FIXME: the assumed connections don't match always with the +* actual routes by the generic parser, so better to disable +* the control for safety. +*/ struct via_spec *spec = codec->spec;if (spec->set_widgets_power_state) spec->set_widgets_power_state (codec); +#endif } static void update_power_state(struct hda_codec *codec, hda_nid_t nid,
Greg Kroah-Hartman
maintainerPATCH 35/79 ALSA: hda/via - Fix wrongly cleared pins after suspend on VT1802
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <[email protected]>
commit 5a6f294e87974e6ec68d7113553ffd975d83bf15 upstream.
VIA driver has a special suspend handling only for VT1802 to reduce the pop noise. During the transition to the generic parser, the behavior of snd_hda_set_pin_ctl() was also changed to modify the cached values, too. And this caused a regression where the pin is still cleared even after the resume (including the resume from power save), resulting in the silent output.
The fix is simply to replace snd_hda_set_pin_ctl() with the explicit call of snd_hda_codec_write() again.
--- sound/pci/hda/patch_via.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
sound/pci/hda/patch_via.c +3 -1
@@ -483,7 +483,9 @@ static int via_suspend(struct hda_codec/* Fix pop noise on headphones */ int i;for (i =0 ; i < spec->gen.autocfg.hp_outs; i++) -snd_hda_set_pin_ctl (codec, spec->gen.autocfg.hp_pins[i],0 ); +snd_hda_codec_write (codec, spec->gen.autocfg.hp_pins[i], +0 ,AC_VERB_SET_PIN_WIDGET_CONTROL , +0x00 ); }return 0 ;
Greg Kroah-Hartman
maintainerPATCH 36/79 ALSA: hda - Allow setting automute/automic hooks after parsing
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <[email protected]>
commit 77afe0e94884ae40de29cd813a1fb7ddee583591 upstream.
Some codec drivers (VIA codecs and some Realtek fixups) set the automute and automic hooks after calling snd_hda_gen_parse_auto_config(). In the current code, the hook pointers are referred only in snd_hda_gen_parse_auto_config() and passed to snd_hda_jack_detect_enable_callback(), thus changing the hook values won't change the actually called callbacks properly.
This patch fixes this bug by setting the static functions as the primary callback functions for the jack detection, and let them calling the appropriate hooks dynamically.
--- sound/pci/hda/hda_generic.c | 42 +++++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-)
sound/pci/hda/hda_generic.c +33 -9
@@ -3671,6 +3671,36 @@ static void update_automute_all(struct hsnd_hda_gen_mic_autoswitch (codec,NULL ); } +/* call appropriate hooks */ +static void call_hp_automute (struct hda_codec *codec,struct hda_jack_tbl *jack) +{ +struct hda_gen_spec *spec = codec->spec; +if (spec->hp_automute_hook) + spec->hp_automute_hook (codec, jack); +else +snd_hda_gen_hp_automute (codec, jack); +} + +static void call_line_automute (struct hda_codec *codec, +struct hda_jack_tbl *jack) +{ +struct hda_gen_spec *spec = codec->spec; +if (spec->line_automute_hook) + spec->line_automute_hook (codec, jack); +else +snd_hda_gen_line_automute (codec, jack); +} + +static void call_mic_autoswitch (struct hda_codec *codec, +struct hda_jack_tbl *jack) +{ +struct hda_gen_spec *spec = codec->spec; +if (spec->mic_autoswitch_hook) + spec->mic_autoswitch_hook (codec, jack); +else +snd_hda_gen_mic_autoswitch (codec, jack); +} +/* * Auto-Mute mode mixer enum support */
@@ -3805,9 +3835,7 @@ static int check_auto_mute_availability(snd_printdd ("hda-codec: Enable HP auto-muting on NID 0x%x\n" , nid);snd_hda_jack_detect_enable_callback (codec, nid,HDA_GEN_HP_EVENT , - spec->hp_automute_hook ? - spec->hp_automute_hook : - snd_hda_gen_hp_automute); + call_hp_automute); spec->detect_hp =1 ; }
@@ -3820,9 +3848,7 @@ static int check_auto_mute_availability(snd_printdd ("hda-codec: Enable Line-Out auto-muting on NID 0x%x\n" , nid);snd_hda_jack_detect_enable_callback (codec, nid,HDA_GEN_FRONT_EVENT , - spec->line_automute_hook ? - spec->line_automute_hook : - snd_hda_gen_line_automute); + call_line_automute); spec->detect_lo =1 ; } spec->automute_lo_possible = spec->detect_hp;
@@ -3864,9 +3890,7 @@ static bool auto_mic_check_imux(struct hsnd_hda_jack_detect_enable_callback (codec, spec->am_entry[i].pin,HDA_GEN_MIC_EVENT , - spec->mic_autoswitch_hook ? - spec->mic_autoswitch_hook : - snd_hda_gen_mic_autoswitch); + call_mic_autoswitch);return true; }
Greg Kroah-Hartman
maintainerPATCH 37/79 ALSA: hda - Add keep_eapd_on flag to generic parser
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <[email protected]>
commit 05909d5c679cf7c9a8a5bc663677c066a546894f upstream.
VT1802 codec seems to reset EAPD of other pins in the hardware level, and this was another reason of the silent headphone output on some machines. As a workaround, introduce a new flag indicating to keep the EPAD on to the generic parser, and set it in patch_via.c.
--- sound/pci/hda/hda_generic.c | 2 ++ sound/pci/hda/hda_generic.h | 1 + sound/pci/hda/patch_via.c | 1 + 3 files changed, 4 insertions(+)
sound/pci/hda/hda_generic.c +2 -0
@@ -772,6 +772,8 @@ static void set_pin_eapd(struct hda_codereturn ;if (codec->inv_eapd) enable = !enable; +if (spec->keep_eapd_on && !enable) +return ;snd_hda_codec_update_cache (codec, pin,0 ,AC_VERB_SET_EAPD_BTLENABLE , enable ?0x02 :0x00 );
sound/pci/hda/hda_generic.h +1 -0
@@ -205,6 +205,7 @@ struct hda_gen_spec { unsigned int multi_cap_vol:1; /* allow multiple capture xxx volumes */ unsigned int inv_dmic_split:1; /* inverted dmic w/a for conexant */ unsigned int own_eapd_ctl:1; /* set EAPD by own function */ + unsigned int keep_eapd_on:1; /* don't turn off EAPD automatically */ unsigned int vmaster_mute_enum:1; /* add vmaster mute mode enum */ unsigned int indep_hp:1; /* independent HP supported */ unsigned int prefer_hp_amp:1; /* enable HP amp for speaker if any */
sound/pci/hda/patch_via.c +1 -0
@@ -136,6 +136,7 @@ static struct via_spec *via_new_spec(str spec->codec_type =VT1708S ; spec->no_pin_power_ctl =1 ; spec->gen.indep_hp =1 ; + spec->gen.keep_eapd_on =1 ; spec->gen.pcm_playback_hook = via_playback_pcm_hook;return spec; }
Greg Kroah-Hartman
maintainerPATCH 38/79 ARM: Kirkwood: TS219: Fix crash by double PCIe instantiation
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrew Lunn <[email protected]>
commit e89b4058096569c999fa599370162022a5a2b3d2 upstream.
When creating the DT based boards-ts219.c the none DT ts219-setup.c was used as a template. This includes a lateinit() call to initialize the PCIe bus. The code makes use of machine_is_ts219() which is never true on DT, so a FIXME was added and the code left as is. This was unproblematic until b73690c8f8b5d: "ARM: Kirkwood: Support basic hotplug for PCI-E" which changes the way the PCIe bus is initialized. The non-DT ts219-setup.c now crashes during boot. The lateinit() call in the DT boards-ts219.c is being called, machine_is_ts219() is true and so the PCIe is initialized a second time.
This patch removes the useless, and now clearly dangerous, code from boards-ts219.c, making ts219-setup.c work again.
--- arch/arm/mach-kirkwood/board-ts219.c | 10 ---------- 1 file changed, 10 deletions(-)
arch/arm/mach-kirkwood/board-ts219.c +0 -10
@@ -41,13 +41,3 @@ void __init qnap_dt_ts219_init(void) pm_power_off = qnap_tsx1x_power_off; } - -/* FIXME: Will not work with DT. Maybe use MPP40_GPIO? */ -static int __init ts219_pci_init (void ) -{ -if (machine_is_ts219 ()) -kirkwood_pcie_init (KW_PCIE0 ); - -return 0 ; -} -subsys_initcall (ts219_pci_init);
Greg Kroah-Hartman
maintainerPATCH 39/79 ARM: 7742/1: topology: export cpu_topology
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <[email protected]>
commit 92bdd3f5eba299b33c2f4407977d6fa2e2a6a0da upstream.
The cpu_topology symbol is required by any driver using the topology interfaces, which leads to a couple of build errors:
ERROR: "cpu_topology" [drivers/net/ethernet/sfc/sfc.ko] undefined!
ERROR: "cpu_topology" [drivers/cpufreq/arm_big_little.ko] undefined!
ERROR: "cpu_topology" [drivers/block/mtip32xx/mtip32xx.ko] undefined!
The obvious solution is to export this symbol.
--- arch/arm/kernel/topology.c | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/kernel/topology.c +2 -0
@@ -13,6 +13,7 @@#include <linux/cpu.h> #include <linux/cpumask.h> +#include <linux/export.h> #include <linux/init.h> #include <linux/percpu.h> #include <linux/node.h>
@@ -200,6 +201,7 @@ static inline void update_cpu_power(unsi* cpu topology table */ struct cputopo_arm cpu_topology[NR_CPUS ]; +EXPORT_SYMBOL_GPL (cpu_topology);const struct cpumask *cpu_coregroup_mask (int cpu) {
Greg Kroah-Hartman
maintainerPATCH 40/79 ARM: 7743/1: compressed/head.S: work around new binutils warning
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <[email protected]>
commit da94a829305f1c217cfdf6771cb1faca0917e3b9 upstream.
In August 2012, Matthew Gretton-Dann checked a change into binutils labelled "Error on obsolete & warn on deprecated registers", apparently as part of ARMv8 support. Apparently, this was supposed to emit the message "Warning: This coprocessor register access is deprecated in ARMv8" when using certain mcr/mrc instructions and building for ARMv8. Unfortunately, the message that is actually emitted appears to be '(null)', which is less helpful in comparison.
Even more unfortunately, this is biting us on every single kernel build with a new gas, because arch/arm/boot/compressed/head.S and some other files in that directory are built with -march=all since kernel commit 80cec14a8 "[ARM] Add -march=all to assembly file build in arch/arm/boot/compressed" back in v2.6.28.
This patch reverts Russell's nice solution and instead marks the head.S file to be built for armv7-a, which fortunately lets us build all instructions in that file without warnings even on the broken binutils.
Without this patch, building anything results in:
arch/arm/boot/compressed/head.S: Assembler messages:arch/arm/boot/compressed/head.S:565: Warning: (null) arch/arm/boot/compressed/head.S:676: Warning: (null) arch/arm/boot/compressed/head.S:698: Warning: (null) arch/arm/boot/compressed/head.S:722: Warning: (null) arch/arm/boot/compressed/head.S:726: Warning: (null) arch/arm/boot/compressed/head.S:957: Warning: (null) arch/arm/boot/compressed/head.S:996: Warning: (null) arch/arm/boot/compressed/head.S:997: Warning: (null) arch/arm/boot/compressed/head.S:1027: Warning: (null) arch/arm/boot/compressed/head.S:1035: Warning: (null) arch/arm/boot/compressed/head.S:1046: Warning: (null) arch/arm/boot/compressed/head.S:1060: Warning: (null) arch/arm/boot/compressed/head.S:1092: Warning: (null) arch/arm/boot/compressed/head.S:1094: Warning: (null) arch/arm/boot/compressed/head.S:1095: Warning: (null) arch/arm/boot/compressed/head.S:1102: Warning: (null) arch/arm/boot/compressed/head.S:1134: Warning: (null)
--- arch/arm/boot/compressed/Makefile | 2 +- arch/arm/boot/compressed/head-sa1100.S | 1 + arch/arm/boot/compressed/head-shark.S | 1 + arch/arm/boot/compressed/head.S | 1 + 4 files changed, 4 insertions(+), 1 deletion(-)
arch/arm/boot/compressed/Makefile +1 -1
@@ -121,7 +121,7 @@ KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CF endif ccflags-y := -fpic -mno-single-pic-base -fno-builtin -I$(obj) -asflags-y := -Wa,-march=all -DZIMAGE +asflags-y := -DZIMAGE # Supply kernel BSS size to the decompressor via a linker symbol. KBSS_SZ = $(shell $(CROSS_COMPILE)size $(obj)/../../../../vmlinux | \
arch/arm/boot/compressed/head-sa1100.S +1 -0
@@ -11,6 +11,7 @@ #include <asm/mach-types.h> .section ".start", "ax" + .arch armv4 __SA1100_start:
arch/arm/boot/compressed/head-shark.S +1 -0
@@ -18,6 +18,7 @@ .section ".start", "ax" + .arch armv4 b __beginning __ofw_data: .long 0 @ the number of memory blocks
arch/arm/boot/compressed/head.S +1 -0
@@ -11,6 +11,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> + .arch armv7-a /* * Debugging stuff *
Greg Kroah-Hartman
maintainerPATCH 41/79 ARM: 7747/1: pcpu: ensure __my_cpu_offset cannot be re-ordered across barrier()
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Will Deacon <[email protected]>
commit 509eb76ebf9771abc9fe51859382df2571f11447 upstream.
__my_cpu_offset is non-volatile, since we want its value to be cached when we access several per-cpu variables in a row with preemption disabled. This means that we rely on preempt_{en,dis}able to hazard with the operation via the barrier() macro, so that we can't end up migrating CPUs without reloading the per-cpu offset.
Unfortunately, GCC doesn't treat a "memory" clobber on a non-volatile asm block as a side-effect, and will happily re-order it before other memory clobbers (including those in prempt_disable()) and cache the value. This has been observed to break the cmpxchg logic in the slub allocator, leading to livelock in kmem_cache_alloc in mainline kernels.
This patch adds a dummy memory input operand to __my_cpu_offset, forcing it to be ordered with respect to the barrier() macro.
--- arch/arm/include/asm/percpu.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
arch/arm/include/asm/percpu.h +9 -2
@@ -30,8 +30,15 @@ static inline void set_my_cpu_offset(unsstatic inline unsigned long __my_cpu_offset (void ) {unsigned long off; -/* Read TPIDRPRW */ - asm("mrc p15, 0, %0, c13, c0, 4" :"=r" (off) : :"memory" ); + registerunsigned long *sp asm ("sp" ); + +/* +* Read TPIDRPRW. +* We want to allow caching the value, so avoid using volatile and +* instead use a fake stack read to hazard against barrier(). +*/ + asm("mrc p15, 0, %0, c13, c0, 4" :"=r" (off) :"Q" (*sp)); +return off; }#define __my_cpu_offset __my_cpu_offset()
Greg Kroah-Hartman
maintainerPATCH 42/79 powerpc/eeh: Dont check RTAS token to get PE addr
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gavin Shan <[email protected]>
commit b8b3de224f194005ad87ede6fd022fcc2bef3b1a upstream.
RTAS token "ibm,get-config-addr-info" or ibm,get-config-addr-info2" are used to retrieve the PE address according to PCI address, which made up of domain/bus/slot/function. If we don't have those 2 tokens, the domain/bus/slot/function would be used as the address for EEH RTAS operations. Some older f/w might not have those 2 tokens and that blocks the EEH functionality to be initialized. It was introduced by commit e2af155c ("powerpc/eeh: pseries platform EEH initialization").
The patch skips the check on those 2 tokens so we can bring up EEH functionality successfully. And domain/bus/slot/function will be used as address for EEH RTAS operations.
--- arch/powerpc/platforms/pseries/eeh_pseries.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
arch/powerpc/platforms/pseries/eeh_pseries.c +5 -7
@@ -83,7 +83,11 @@ static int pseries_eeh_init(void) ibm_configure_pe =rtas_token ("ibm,configure-pe" ); ibm_configure_bridge =rtas_token ("ibm,configure-bridge" ); -/* necessary sanity check */ +/* +* Necessary sanity check. We needn't check "get-config-addr-info" +* and its variant since the old firmware probably support address +* of domain/bus/slot/function for EEH RTAS operations. +*/ if (ibm_set_eeh_option ==RTAS_UNKNOWN_SERVICE ) {pr_warning ("%s: RTAS service <ibm,set-eeh-option> invalid\n" , __func__);
@@ -102,12 +106,6 @@ static int pseries_eeh_init(void)pr_warning ("%s: RTAS service <ibm,slot-error-detail> invalid\n" , __func__);return -EINVAL ; - }else if (ibm_get_config_addr_info2 ==RTAS_UNKNOWN_SERVICE && - ibm_get_config_addr_info ==RTAS_UNKNOWN_SERVICE ) { -pr_warning ("%s: RTAS service <ibm,get-config-addr-info2> and " -"<ibm,get-config-addr-info> invalid\n" , - __func__); -return -EINVAL ; }else if (ibm_configure_pe ==RTAS_UNKNOWN_SERVICE && ibm_configure_bridge ==RTAS_UNKNOWN_SERVICE ) { pr_warning("%s: RTAS service <ibm,configure-pe> and "
Greg Kroah-Hartman
maintainerPATCH 43/79 powerpc/hw_breakpoints: Add DABRX cpu feature to fix 32-bit regression
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Neuling <[email protected]>
commit 82a9f16adc12f51c3f8ea59a7c3c120241aff836 upstream.
When introducing support for DABRX in 4474ef0, we broke older 32-bit CPUs that don't have that register.
Some CPUs have a DABR but not DABRX. Configuration are:
- No 32bit CPUs have DABRX but some have DABR.
- POWER4+ and below have the DABR but no DABRX.
- 970 and POWER5 and above have DABR and DABRX.
- POWER8 has DAWR, hence no DABRX.
This introduces CPU_FTR_DABRX and sets it on appropriate CPUs. We use the top 64 bits for CPU FTR bits since only 64 bit CPUs have this.
Processors that don't have the DABRX will still work as they will fall back to software filtering these breakpoints via perf_exclude_event().
--- arch/powerpc/include/asm/cputable.h | 17 ++++++++++------- arch/powerpc/kernel/process.c | 3 ++- 2 files changed, 12 insertions(+), 8 deletions(-)
arch/powerpc/include/asm/cputable.h +10 -7
@@ -175,6 +175,7 @@ extern const char *powerpc_base_platform#define CPU_FTR_BCTAR LONG_ASM_CONST(0x0100000000000000)#define CPU_FTR_HAS_PPR LONG_ASM_CONST(0x0200000000000000)#define CPU_FTR_DAWR LONG_ASM_CONST(0x0400000000000000) +#define CPU_FTR_DABRX LONG_ASM_CONST(0x0800000000000000)#ifndef __ASSEMBLY__
@@ -391,19 +392,20 @@ extern const char *powerpc_base_platform CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | CPU_FTR_ARCH_201 | \ CPU_FTR_ALTIVEC_COMP | CPU_FTR_CAN_NAP | CPU_FTR_MMCRA | \ CPU_FTR_CP_USE_DCBTZ | CPU_FTR_STCX_CHECKS_ADDRESS | \ - CPU_FTR_HVMODE) + CPU_FTR_HVMODE | CPU_FTR_DABRX)#define CPU_FTRS_POWER5 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ CPU_FTR_MMCRA | CPU_FTR_SMT | \ CPU_FTR_COHERENT_ICACHE | CPU_FTR_PURR | \ - CPU_FTR_STCX_CHECKS_ADDRESS | CPU_FTR_POPCNTB) + CPU_FTR_STCX_CHECKS_ADDRESS | CPU_FTR_POPCNTB | CPU_FTR_DABRX)#define CPU_FTRS_POWER6 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ CPU_FTR_MMCRA | CPU_FTR_SMT | \ CPU_FTR_COHERENT_ICACHE | \ CPU_FTR_PURR | CPU_FTR_SPURR | CPU_FTR_REAL_LE | \ CPU_FTR_DSCR | CPU_FTR_UNALIGNED_LD_STD | \ - CPU_FTR_STCX_CHECKS_ADDRESS | CPU_FTR_POPCNTB | CPU_FTR_CFAR) + CPU_FTR_STCX_CHECKS_ADDRESS | CPU_FTR_POPCNTB | CPU_FTR_CFAR | \ + CPU_FTR_DABRX)#define CPU_FTRS_POWER7 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | CPU_FTR_ARCH_206 |\ CPU_FTR_MMCRA | CPU_FTR_SMT | \
@@ -412,7 +414,7 @@ extern const char *powerpc_base_platform CPU_FTR_DSCR | CPU_FTR_SAO | CPU_FTR_ASYM_SMT | \ CPU_FTR_STCX_CHECKS_ADDRESS | CPU_FTR_POPCNTB | CPU_FTR_POPCNTD | \ CPU_FTR_ICSWX | CPU_FTR_CFAR | CPU_FTR_HVMODE | \ - CPU_FTR_VMX_COPY | CPU_FTR_HAS_PPR) + CPU_FTR_VMX_COPY | CPU_FTR_HAS_PPR | CPU_FTR_DABRX)#define CPU_FTRS_POWER8 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | CPU_FTR_ARCH_206 |\ CPU_FTR_MMCRA | CPU_FTR_SMT | \
@@ -427,14 +429,15 @@ extern const char *powerpc_base_platform CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ CPU_FTR_PAUSE_ZERO | CPU_FTR_CELL_TB_BUG | CPU_FTR_CP_USE_DCBTZ | \ - CPU_FTR_UNALIGNED_LD_STD) + CPU_FTR_UNALIGNED_LD_STD | CPU_FTR_DABRX)#define CPU_FTRS_PA6T (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_ALTIVEC_COMP | \ - CPU_FTR_PURR | CPU_FTR_REAL_LE) + CPU_FTR_PURR | CPU_FTR_REAL_LE | CPU_FTR_DABRX)#define CPU_FTRS_COMPATIBLE (CPU_FTR_USE_TB | CPU_FTR_PPCAS_ARCH_V2)#define CPU_FTRS_A2 (CPU_FTR_USE_TB | CPU_FTR_SMT | CPU_FTR_DBELL | \ - CPU_FTR_NOEXECUTE | CPU_FTR_NODSISRALIGN | CPU_FTR_ICSWX) + CPU_FTR_NOEXECUTE | CPU_FTR_NODSISRALIGN | \ + CPU_FTR_ICSWX | CPU_FTR_DABRX )#ifdef __powerpc64__#ifdef CONFIG_PPC_BOOK3E
arch/powerpc/kernel/process.c +2 -1
@@ -392,7 +392,8 @@ static inline int __set_dabr(unsigned lostatic inline int __set_dabr (unsigned long dabr,unsigned long dabrx) {mtspr (SPRN_DABR , dabr); -mtspr (SPRN_DABRX , dabrx); +if (cpu_has_feature (CPU_FTR_DABRX )) +mtspr (SPRN_DABRX , dabrx);return 0 ; }#else
Greg Kroah-Hartman
maintainerPATCH 44/79 powerpc/perf: Fix deadlock caused by calling printk() in PMU exception
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Ellerman <[email protected]>
commit 6772faa1ba22eba18d087c2459030a683b65be57 upstream.
In commit bc09c21 "Fix finding overflowed PMC in interrupt" we added a printk() to the PMU exception handler. Unfortunately that is not safe.
The problem is that the PMU exception may run even when interrupts are soft disabled, aka NMI context. We do this so that we can profile parts of the kernel that have interrupts soft-disabled.
But by calling printk() from the exception handler, we can potentially deadlock in the printk code on logbuf_lock, eg:
[c00000038ba575c0] c000000000081928 .vprintk_emit+0xa8/0x540 [c00000038ba576a0] c0000000007bcde8 .printk+0x48/0x58 [c00000038ba57710] c000000000076504 .perf_event_interrupt+0x2d4/0x490 [c00000038ba57810] c00000000001f6f8 .performance_monitor_exception+0x48/0x60 [c00000038ba57880] c0000000000032cc performance_monitor_common+0x14c/0x180 --- Exception: f01 (Performance Monitor) at c0000000007b25d4 ._raw_spin_lock_irq +0x64/0xc0
[c00000038ba57bf0] c00000000007ed90 .devkmsg_read+0xd0/0x5a0 [c00000038ba57d00] c0000000001c2934 .vfs_read+0xc4/0x1e0 [c00000038ba57d90] c0000000001c2cd8 .SyS_read+0x58/0xd0 [c00000038ba57e30] c000000000009d54 syscall_exit+0x0/0x98
--- Exception: c01 (System Call) at 00001fffffbf6f7c
SP (3ffff6d4de10) is in userspace
Fix it by making sure we only call printk() when we are not in NMI context.
--- arch/powerpc/perf/core-book3s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/perf/core-book3s.c +1 -1
@@ -1528,7 +1528,7 @@ static void perf_event_interrupt(struct } } } -if ((!found) &&printk_ratelimit ()) +if (!found && !nmi &&printk_ratelimit ())printk (KERN_WARNING "Can't find PMC that caused IRQ\n" );/*
Greg Kroah-Hartman
maintainerPATCH 45/79 dmaengine: ste_dma40: fix pm runtime ref counting
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rabin Vincent <[email protected]>
commit 9ecb41bd8cf002fd8f3e063db4df81647ddd623c upstream.
The pm runtime reference counting of the driver is broken for the case when there is more than one transfer queued, leading to the device being runtime suspend while active. Fix it.
--- drivers/dma/ste_dma40.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/dma/ste_dma40.c +5 -3
@@ -1566,10 +1566,12 @@ static void dma_tc_handle(struct d40_chareturn ; } -if (d40_queue_start (d40c) ==NULL ) +if (d40_queue_start (d40c) ==NULL ) { d40c->busy = false; -pm_runtime_mark_last_busy (d40c->base->dev); -pm_runtime_put_autosuspend (d40c->base->dev); + +pm_runtime_mark_last_busy (d40c->base->dev); +pm_runtime_put_autosuspend (d40c->base->dev); + }d40_desc_remove (d40d);d40_desc_done (d40c, d40d);
Greg Kroah-Hartman
maintainerPATCH 46/79 radeon: Fix system hang issue when using KMS with older cards
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Adis Hamzić <[email protected]>
commit e49f3959a96dc279860af7e86e6dbcfda50580a5 upstream.
The current radeon driver initialization routines, when using KMS, are written so that the IRQ installation routine is called before initializing the WB buffer and the CP rings. With some ASICs, though, the IRQ routine tries to access the GFX_INDEX ring causing a call to RREG32 with the value of -1 in radeon_fence_read. This, in turn causes the system to completely hang with some cards, requiring a hard reset.
A call stack that can cause such a hang looks like this (using rv515 ASIC for the example here):
* rv515_init (rv515.c)
* radeon_irq_kms_init (radeon_irq_kms.c)
* drm_irq_install (drm_irq.c)
* radeon_driver_irq_preinstall_kms (radeon_irq_kms.c)
* rs600_irq_process (rs600.c)
* radeon_fence_process - due to SW interrupt (radeon_fence.c)
* radeon_fence_read (radeon_fence.c)
* hang due to RREG32(-1)
The patch moves the IRQ installation to the card startup routine, after the ring has been initialized, but before the IRQ has been set. This fixes the issue, but requires a check to see if the IRQ is already installed, as is the case in the system resume codepath.
I have tested the patch on three machines using the rv515, the rv770 and the evergreen ASIC. They worked without issues.
This seems to be a known issue and has been reported on several bug tracking sites by various distributions (see links below). Most of reports recommend booting the system with KMS disabled and then enabling KMS by reloading the radeon module. For some reason, this was indeed a usable workaround, however, UMS is now deprecated and disabled by default.
Bug reports:
https://bugzilla.redhat.com/show_bug.cgi?id=845745
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/561789
https://bbs.archlinux.org/viewtopic.php?id=156964
--- drivers/gpu/drm/radeon/evergreen.c | 10 ++++++---- drivers/gpu/drm/radeon/ni.c | 10 ++++++---- drivers/gpu/drm/radeon/r100.c | 9 ++++++--- drivers/gpu/drm/radeon/r300.c | 9 ++++++--- drivers/gpu/drm/radeon/r420.c | 10 ++++++---- drivers/gpu/drm/radeon/r520.c | 9 ++++++--- drivers/gpu/drm/radeon/r600.c | 10 ++++++---- drivers/gpu/drm/radeon/rs400.c | 9 ++++++--- drivers/gpu/drm/radeon/rs600.c | 9 ++++++--- drivers/gpu/drm/radeon/rs690.c | 9 ++++++--- drivers/gpu/drm/radeon/rv515.c | 9 ++++++--- drivers/gpu/drm/radeon/rv770.c | 10 ++++++---- drivers/gpu/drm/radeon/si.c | 10 ++++++---- 13 files changed, 78 insertions(+), 45 deletions(-)
drivers/gpu/drm/radeon/evergreen.c +6 -4
@@ -3728,6 +3728,12 @@ static int evergreen_startup(struct rade }/* Enable IRQ */ +if (!rdev->irq.installed) { + r =radeon_irq_kms_init (rdev); +if (r) +return r; + } + r =r600_irq_init (rdev);if (r) {DRM_ERROR ("radeon: IH init failed (%d).\n" , r);
@@ -3876,10 +3882,6 @@ int evergreen_init(struct radeon_deviceif (r)return r; - r =radeon_irq_kms_init (rdev); -if (r) -return r; - rdev->ring[RADEON_RING_TYPE_GFX_INDEX ].ring_obj =NULL ;r600_ring_init (rdev, &rdev->ring[RADEON_RING_TYPE_GFX_INDEX ],1024 *1024 );
drivers/gpu/drm/radeon/ni.c +6 -4
@@ -1711,6 +1711,12 @@ static int cayman_startup(struct radeon_ }/* Enable IRQ */ +if (!rdev->irq.installed) { + r =radeon_irq_kms_init (rdev); +if (r) +return r; + } + r =r600_irq_init (rdev);if (r) {DRM_ERROR ("radeon: IH init failed (%d).\n" , r);
@@ -1857,10 +1863,6 @@ int cayman_init(struct radeon_device *rdif (r)return r; - r =radeon_irq_kms_init (rdev); -if (r) -return r; - ring->ring_obj =NULL ;r600_ring_init (rdev, ring,1024 *1024 );
drivers/gpu/drm/radeon/r100.c +6 -3
@@ -3869,6 +3869,12 @@ static int r100_startup(struct radeon_de }/* Enable IRQ */ +if (!rdev->irq.installed) { + r =radeon_irq_kms_init (rdev); +if (r) +return r; + } +r100_irq_set (rdev); rdev->config.r100.hdp_cntl =RREG32 (RADEON_HOST_PATH_CNTL );/* 1M ring buffer */
@@ -4024,9 +4030,6 @@ int r100_init(struct radeon_device *rdev r =radeon_fence_driver_init (rdev);if (r)return r; - r =radeon_irq_kms_init (rdev); -if (r) -return r;/* Memory manager */ r =radeon_bo_init (rdev);if (r)
drivers/gpu/drm/radeon/r300.c +6 -3
@@ -1382,6 +1382,12 @@ static int r300_startup(struct radeon_de }/* Enable IRQ */ +if (!rdev->irq.installed) { + r =radeon_irq_kms_init (rdev); +if (r) +return r; + } +r100_irq_set (rdev); rdev->config.r300.hdp_cntl =RREG32 (RADEON_HOST_PATH_CNTL );/* 1M ring buffer */
@@ -1516,9 +1522,6 @@ int r300_init(struct radeon_device *rdev r =radeon_fence_driver_init (rdev);if (r)return r; - r =radeon_irq_kms_init (rdev); -if (r) -return r;/* Memory manager */ r =radeon_bo_init (rdev);if (r)
drivers/gpu/drm/radeon/r420.c +6 -4
@@ -265,6 +265,12 @@ static int r420_startup(struct radeon_de }/* Enable IRQ */ +if (!rdev->irq.installed) { + r =radeon_irq_kms_init (rdev); +if (r) +return r; + } +r100_irq_set (rdev); rdev->config.r300.hdp_cntl =RREG32 (RADEON_HOST_PATH_CNTL );/* 1M ring buffer */
@@ -411,10 +417,6 @@ int r420_init(struct radeon_device *rdevif (r) {return r; } - r =radeon_irq_kms_init (rdev); -if (r) { -return r; - }/* Memory manager */ r =radeon_bo_init (rdev);if (r) {
drivers/gpu/drm/radeon/r520.c +6 -3
@@ -194,6 +194,12 @@ static int r520_startup(struct radeon_de }/* Enable IRQ */ +if (!rdev->irq.installed) { + r =radeon_irq_kms_init (rdev); +if (r) +return r; + } +rs600_irq_set (rdev); rdev->config.r300.hdp_cntl =RREG32 (RADEON_HOST_PATH_CNTL );/* 1M ring buffer */
@@ -297,9 +303,6 @@ int r520_init(struct radeon_device *rdev r =radeon_fence_driver_init (rdev);if (r)return r; - r =radeon_irq_kms_init (rdev); -if (r) -return r;/* Memory manager */ r =radeon_bo_init (rdev);if (r)
drivers/gpu/drm/radeon/r600.c +6 -4
@@ -2940,6 +2940,12 @@ static int r600_startup(struct radeon_de }/* Enable IRQ */ +if (!rdev->irq.installed) { + r =radeon_irq_kms_init (rdev); +if (r) +return r; + } + r =r600_irq_init (rdev);if (r) {DRM_ERROR ("radeon: IH init failed (%d).\n" , r);
@@ -3094,10 +3100,6 @@ int r600_init(struct radeon_device *rdevif (r)return r; - r =radeon_irq_kms_init (rdev); -if (r) -return r; - rdev->ring[RADEON_RING_TYPE_GFX_INDEX ].ring_obj =NULL ;r600_ring_init (rdev, &rdev->ring[RADEON_RING_TYPE_GFX_INDEX ],1024 *1024 );
drivers/gpu/drm/radeon/rs400.c +6 -3
@@ -417,6 +417,12 @@ static int rs400_startup(struct radeon_d }/* Enable IRQ */ +if (!rdev->irq.installed) { + r =radeon_irq_kms_init (rdev); +if (r) +return r; + } +r100_irq_set (rdev); rdev->config.r300.hdp_cntl =RREG32 (RADEON_HOST_PATH_CNTL );/* 1M ring buffer */
@@ -535,9 +541,6 @@ int rs400_init(struct radeon_device *rde r =radeon_fence_driver_init (rdev);if (r)return r; - r =radeon_irq_kms_init (rdev); -if (r) -return r;/* Memory manager */ r =radeon_bo_init (rdev);if (r)
drivers/gpu/drm/radeon/rs600.c +6 -3
@@ -923,6 +923,12 @@ static int rs600_startup(struct radeon_d }/* Enable IRQ */ +if (!rdev->irq.installed) { + r =radeon_irq_kms_init (rdev); +if (r) +return r; + } +rs600_irq_set (rdev); rdev->config.r300.hdp_cntl =RREG32 (RADEON_HOST_PATH_CNTL );/* 1M ring buffer */
@@ -1047,9 +1053,6 @@ int rs600_init(struct radeon_device *rde r =radeon_fence_driver_init (rdev);if (r)return r; - r =radeon_irq_kms_init (rdev); -if (r) -return r;/* Memory manager */ r =radeon_bo_init (rdev);if (r)
drivers/gpu/drm/radeon/rs690.c +6 -3
@@ -628,6 +628,12 @@ static int rs690_startup(struct radeon_d }/* Enable IRQ */ +if (!rdev->irq.installed) { + r =radeon_irq_kms_init (rdev); +if (r) +return r; + } +rs600_irq_set (rdev); rdev->config.r300.hdp_cntl =RREG32 (RADEON_HOST_PATH_CNTL );/* 1M ring buffer */
@@ -753,9 +759,6 @@ int rs690_init(struct radeon_device *rde r =radeon_fence_driver_init (rdev);if (r)return r; - r =radeon_irq_kms_init (rdev); -if (r) -return r;/* Memory manager */ r =radeon_bo_init (rdev);if (r)
drivers/gpu/drm/radeon/rv515.c +6 -3
@@ -532,6 +532,12 @@ static int rv515_startup(struct radeon_d }/* Enable IRQ */ +if (!rdev->irq.installed) { + r =radeon_irq_kms_init (rdev); +if (r) +return r; + } +rs600_irq_set (rdev); rdev->config.r300.hdp_cntl =RREG32 (RADEON_HOST_PATH_CNTL );/* 1M ring buffer */
@@ -662,9 +668,6 @@ int rv515_init(struct radeon_device *rde r =radeon_fence_driver_init (rdev);if (r)return r; - r =radeon_irq_kms_init (rdev); -if (r) -return r;/* Memory manager */ r =radeon_bo_init (rdev);if (r)
drivers/gpu/drm/radeon/rv770.c +6 -4
@@ -1041,6 +1041,12 @@ static int rv770_startup(struct radeon_d }/* Enable IRQ */ +if (!rdev->irq.installed) { + r =radeon_irq_kms_init (rdev); +if (r) +return r; + } + r =r600_irq_init (rdev);if (r) {DRM_ERROR ("radeon: IH init failed (%d).\n" , r);
@@ -1180,10 +1186,6 @@ int rv770_init(struct radeon_device *rdeif (r)return r; - r =radeon_irq_kms_init (rdev); -if (r) -return r; - rdev->ring[RADEON_RING_TYPE_GFX_INDEX ].ring_obj =NULL ;r600_ring_init (rdev, &rdev->ring[RADEON_RING_TYPE_GFX_INDEX ],1024 *1024 );
drivers/gpu/drm/radeon/si.c +6 -4
@@ -4374,6 +4374,12 @@ static int si_startup(struct radeon_devi }/* Enable IRQ */ +if (!rdev->irq.installed) { + r =radeon_irq_kms_init (rdev); +if (r) +return r; + } + r =si_irq_init (rdev);if (r) {DRM_ERROR ("radeon: IH init failed (%d).\n" , r);
@@ -4534,10 +4540,6 @@ int si_init(struct radeon_device *rdev)if (r)return r; - r =radeon_irq_kms_init (rdev); -if (r) -return r; - ring = &rdev->ring[RADEON_RING_TYPE_GFX_INDEX ]; ring->ring_obj =NULL ;r600_ring_init (rdev, ring,1024 *1024 );
Greg Kroah-Hartman
maintainerPATCH 47/79 drm/radeon: dont allow audio on DCE6
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <[email protected]>
commit 1cbcca302a318499f20a512847c5d6a510c08c35 upstream.
It's not supported yet. Fixes display issues when users force it on.
--- drivers/gpu/drm/radeon/atombios_encoders.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
drivers/gpu/drm/radeon/atombios_encoders.c +8 -3
@@ -667,6 +667,8 @@ atombios_digital_setup(struct drm_encodeint atombios_get_encoder_mode (struct drm_encoder *encoder) { +struct drm_device *dev = encoder->dev; +struct radeon_device *rdev = dev->dev_private;struct radeon_encoder *radeon_encoder =to_radeon_encoder (encoder);struct drm_connector *connector;struct radeon_connector *radeon_connector;
@@ -693,7 +695,8 @@ atombios_get_encoder_mode(struct drm_enccase DRM_MODE_CONNECTOR_DVII :case DRM_MODE_CONNECTOR_HDMIB :/* HDMI-B is basically DL-DVI; analog works fine */ if (drm_detect_hdmi_monitor (radeon_connector->edid) && - radeon_audio) + radeon_audio && + !ASIC_IS_DCE6 (rdev))/* remove once we support DCE6 */ return ATOM_ENCODER_MODE_HDMI ;else if (radeon_connector->use_digital)return ATOM_ENCODER_MODE_DVI ;
@@ -704,7 +707,8 @@ atombios_get_encoder_mode(struct drm_enccase DRM_MODE_CONNECTOR_HDMIA :default :if (drm_detect_hdmi_monitor (radeon_connector->edid) && - radeon_audio) + radeon_audio && + !ASIC_IS_DCE6 (rdev))/* remove once we support DCE6 */ return ATOM_ENCODER_MODE_HDMI ;else return ATOM_ENCODER_MODE_DVI ;
@@ -718,7 +722,8 @@ atombios_get_encoder_mode(struct drm_enc (dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_eDP))return ATOM_ENCODER_MODE_DP ; else if (drm_detect_hdmi_monitor(radeon_connector->edid) && - radeon_audio) + radeon_audio && + !ASIC_IS_DCE6(rdev)) /* remove once we support DCE6 */ return ATOM_ENCODER_MODE_HDMI; else return ATOM_ENCODER_MODE_DVI;
Greg Kroah-Hartman
maintainerPATCH 48/79 hpfs: fix warnings when the filesystem fills up
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikulas Patocka <[email protected]>
commit bbd465df73f0d8ba41b8a0732766a243d0f5b356 upstream.
This patch fixes warnings due to missing lock on write error path.
WARNING: at fs/hpfs/hpfs_fn.h:353 hpfs_truncate+0x75/0x80 [hpfs]()
Hardware name: empty
Pid: 26563, comm: dd Tainted: P O 3.9.4 #12
Call Trace:
hpfs_truncate+0x75/0x80 [hpfs]
hpfs_write_begin+0x84/0x90 [hpfs]
_hpfs_bmap+0x10/0x10 [hpfs]
generic_file_buffered_write+0x121/0x2c0
__generic_file_aio_write+0x1c7/0x3f0
generic_file_aio_write+0x7c/0x100
do_sync_write+0x98/0xd0
hpfs_file_write+0xd/0x50 [hpfs]
vfs_write+0xa2/0x160
sys_write+0x51/0xa0
page_fault+0x22/0x30
system_call_fastpath+0x1a/0x1f--- fs/hpfs/file.c | 4 ++++ 1 file changed, 4 insertions(+)
fs/hpfs/file.c +4 -0
@@ -109,10 +109,14 @@ static void hpfs_write_failed(struct add {struct inode *inode = mapping->host; +hpfs_lock (inode->i_sb); +if (to > inode->i_size) {truncate_pagecache (inode, to, inode->i_size);hpfs_truncate (inode); } + +hpfs_unlock (inode->i_sb); } static int hpfs_write_begin(struct file *file, struct address_space *mapping,
Greg Kroah-Hartman
maintainerPATCH 49/79 cifs: fix off-by-one bug in build_unc_path_to_root
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Layton <[email protected]>
commit 1fc29bacedeabb278080e31bb9c1ecb49f143c3b upstream.
commit 839db3d10a (cifs: fix up handling of prefixpath= option) changed the code such that the vol->prepath no longer contained a leading delimiter and then fixed up the places that accessed that field to account for that change.
One spot in build_unc_path_to_root was missed however. When doing the pointer addition on pos, that patch failed to account for the fact that we had already incremented "pos" by one when adding the length of the prepath. This caused a buffer overrun by one byte.
This patch fixes the problem by correcting the handling of "pos".
--- fs/cifs/connect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/cifs/connect.c +2 -2
@@ -3332,8 +3332,8 @@ build_unc_path_to_root(const struct smb_ pos = full_path + unc_len;if (pplen) { - *pos++ =CIFS_DIR_SEP (cifs_sb); -strncpy (pos, vol->prepath, pplen); + *pos =CIFS_DIR_SEP (cifs_sb); +strncpy (pos +1 , vol->prepath, pplen); pos += pplen; }
Greg Kroah-Hartman
maintainerPATCH 50/79 ecryptfs: fixed msync to flush data
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Paul Taysom <[email protected]>
commit c15cddd900e867c5adfb3c79596479dc5975f743 upstream.
When msync is called on a memory mapped file, that data is not flushed to the disk.
In Linux, msync calls fsync for the file. For ecryptfs, fsync just calls the lower level file system's fsync. Changed the ecryptfs fsync code to call filemap_write_and_wait before calling the lower level fsync.
Addresses the problem described in http://crbug.com/239536
--- fs/ecryptfs/file.c | 1 + 1 file changed, 1 insertion(+)
fs/ecryptfs/file.c +1 -0
@@ -294,6 +294,7 @@ static int ecryptfs_release(struct inodestatic int ecryptfs_fsync (struct file *file,loff_t start,loff_t end,int datasync) { +filemap_write_and_wait (file->f_mapping);return vfs_fsync (ecryptfs_file_to_lower (file), datasync); }
Greg Kroah-Hartman
maintainerPATCH 51/79 eCryptfs: Check return of filemap_write_and_wait during fsync
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tyler Hicks <[email protected]>
commit bc5abcf7e411b889f73ea2a90439071a0f451011 upstream.
Error out of ecryptfs_fsync() if filemap_write_and_wait() fails.
--- fs/ecryptfs/file.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
fs/ecryptfs/file.c +6 -1
@@ -294,7 +294,12 @@ static int ecryptfs_release(struct inodestatic int ecryptfs_fsync (struct file *file,loff_t start,loff_t end,int datasync) { -filemap_write_and_wait (file->f_mapping); +int rc; + + rc =filemap_write_and_wait (file->f_mapping); +if (rc) +return rc; +return vfs_fsync (ecryptfs_file_to_lower (file), datasync); }
Greg Kroah-Hartman
maintainerPATCH 52/79 hwmon: (adm1021) Strengthen chip detection for ADM1021, LM84 and MAX1617
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guenter Roeck <[email protected]>
commit 591bfcfc334a003ba31c0deff03b22e73349939b upstream.
On a system with both MAX1617 and JC42 sensors, JC42 sensors can be misdetected as LM84. Strengthen detection sufficiently enough to avoid this misdetection. Also improve detection for ADM1021.
Modeled after chip detection code in sensors-detect command.
--- drivers/hwmon/adm1021.c | 58 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 50 insertions(+), 8 deletions(-)
drivers/hwmon/adm1021.c +50 -8
@@ -332,26 +332,68 @@ static int adm1021_detect(struct i2c_cli man_id =i2c_smbus_read_byte_data (client,ADM1021_REG_MAN_ID ); dev_id =i2c_smbus_read_byte_data (client,ADM1021_REG_DEV_ID ); +if (man_id <0 || dev_id <0 ) +return -ENODEV ; +if (man_id ==0x4d && dev_id ==0x01 ) type_name ="max1617a" ;else if (man_id ==0x41 ) {if ((dev_id &0xF0 ) ==0x30 ) type_name ="adm1023" ; -else +else if ((dev_id &0xF0 ) ==0x00 ) type_name ="adm1021" ; +else +return -ENODEV ; }else if (man_id ==0x49 ) type_name ="thmc10" ;else if (man_id ==0x23 ) type_name ="gl523sm" ;else if (man_id ==0x54 ) type_name ="mc1066" ; -/* LM84 Mfr ID in a different place, and it has more unused bits */ -else if (conv_rate ==0x00 - && (config &0x7F ) ==0x00 - && (status &0xAB ) ==0x00 ) - type_name ="lm84" ; -else - type_name ="max1617" ; +else { +int lte, rte, lhi, rhi, llo, rlo; + +/* extra checks for LM84 and MAX1617 to avoid misdetections */ + + llo =i2c_smbus_read_byte_data (client,ADM1021_REG_THYST_R (0 )); + rlo =i2c_smbus_read_byte_data (client,ADM1021_REG_THYST_R (1 )); + +/* fail if any of the additional register reads failed */ +if (llo <0 || rlo <0 ) +return -ENODEV ; + + lte =i2c_smbus_read_byte_data (client,ADM1021_REG_TEMP (0 )); + rte =i2c_smbus_read_byte_data (client,ADM1021_REG_TEMP (1 )); + lhi =i2c_smbus_read_byte_data (client,ADM1021_REG_TOS_R (0 )); + rhi =i2c_smbus_read_byte_data (client,ADM1021_REG_TOS_R (1 )); + +/* +* Fail for negative temperatures and negative high limits. +* This check also catches read errors on the tested registers. +*/ +if ((s8 )lte <0 || (s8 )rte <0 || (s8 )lhi <0 || (s8 )rhi <0 ) +return -ENODEV ; + +/* fail if all registers hold the same value */ +if (lte == rte && lte == lhi && lte == rhi && lte == llo + && lte == rlo) +return -ENODEV ; + +/* +* LM84 Mfr ID is in a different place, +* and it has more unused bits. +*/ +if (conv_rate ==0x00 + && (config &0x7F ) ==0x00 + && (status &0xAB ) ==0x00 ) { + type_name ="lm84" ; + }else { +/* fail if low limits are larger than high limits */ +if ((s8 )llo > lhi || (s8 )rlo > rhi) +return -ENODEV ; + type_name ="max1617" ; + } + }pr_debug ("adm1021: Detected chip %s at adapter %d, address 0x%02x.\n" , type_name,i2c_adapter_id (adapter), client->addr);
Greg Kroah-Hartman
maintainerPATCH 53/79 drm/mgag200: Add missing write to index before accessing data register
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christopher Harvey <[email protected]>
commit 91f8f105f2b82b4a38dee2d74760bc39d40ec42c upstream.
This is a bug fix for some versions of g200se cards while doing mode-setting.
--- drivers/gpu/drm/mgag200/mgag200_mode.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/mgag200/mgag200_mode.c +5 -4
@@ -1041,13 +1041,14 @@ static int mga_crtc_mode_set(struct drm_else hi_pri_lvl =5 ; -WREG8 (0x1fde ,0x06 ); -WREG8 (0x1fdf , hi_pri_lvl); +WREG8 (MGAREG_CRTCEXT_INDEX ,0x06 ); +WREG8 (MGAREG_CRTCEXT_DATA , hi_pri_lvl); }else { +WREG8 (MGAREG_CRTCEXT_INDEX ,0x06 );if (mdev->reg_1e24 >=0x01 ) -WREG8 (0x1fdf ,0x03 ); +WREG8 (MGAREG_CRTCEXT_DATA ,0x03 );else -WREG8 (0x1fdf ,0x04 ); +WREG8 (MGAREG_CRTCEXT_DATA ,0x04 ); } }return 0 ;
Greg Kroah-Hartman
maintainerPATCH 54/79 drm: fix a use-after-free when GPU acceleration disabled
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Huacai Chen <[email protected]>
commit b7ea85a4fed37835eec78a7be3039c8dc22b8178 upstream.
When GPU acceleration is disabled, drm_vblank_cleanup() will free the vblank-related data, such as vblank_refcount, vblank_inmodeset, etc. But we found that drm_vblank_post_modeset() may be called after the cleanup, which use vblank_refcount and vblank_inmodeset. And this will cause a kernel panic.
Fix this by return immediately if dev->num_crtcs is zero. This is the same thing that drm_vblank_pre_modeset() does.
Call trace of a drm_vblank_post_modeset() after drm_vblank_cleanup():
[ 62.628906] [<ffffffff804868d0>] drm_vblank_post_modeset+0x34/0xb4 [ 62.628906] [<ffffffff804c7008>] atombios_crtc_dpms+0xb4/0x174 [ 62.628906] [<ffffffff804c70e0>] atombios_crtc_commit+0x18/0x38 [ 62.628906] [<ffffffff8047f038>] drm_crtc_helper_set_mode+0x304/0x3cc [ 62.628906] [<ffffffff8047f92c>] drm_crtc_helper_set_config+0x6d8/0x988 [ 62.628906] [<ffffffff8047dd40>] drm_fb_helper_set_par+0x94/0x104 [ 62.628906] [<ffffffff80439d14>] fbcon_init+0x424/0x57c [ 62.628906] [<ffffffff8046a638>] visual_init+0xb8/0x118 [ 62.628906] [<ffffffff8046b9f8>] take_over_console+0x238/0x384 [ 62.628906] [<ffffffff80436df8>] fbcon_takeover+0x7c/0xdc [ 62.628906] [<ffffffff8024fa20>] notifier_call_chain+0x44/0x94 [ 62.628906] [<ffffffff8024fcbc>] __blocking_notifier_call_chain+0x48/0x68 [ 62.628906] [<ffffffff8042d990>] register_framebuffer+0x228/0x260 [ 62.628906] [<ffffffff8047e010>] drm_fb_helper_single_fb_probe+0x260/0x314 [ 62.628906] [<ffffffff8047e2c4>] drm_fb_helper_initial_config+0x200/0x234 [ 62.628906] [<ffffffff804e5560>] radeon_fbdev_init+0xd4/0xf4 [ 62.628906] [<ffffffff804e0e08>] radeon_modeset_init+0x9bc/0xa18 [ 62.628906] [<ffffffff804bfc14>] radeon_driver_load_kms+0xdc/0x12c [ 62.628906] [<ffffffff8048b548>] drm_get_pci_dev+0x148/0x238 [ 62.628906] [<ffffffff80423564>] local_pci_probe+0x5c/0xd0 [ 62.628906] [<ffffffff80241ac4>] work_for_cpu_fn+0x1c/0x30 [ 62.628906] [<ffffffff802427c8>] process_one_work+0x274/0x3bc [ 62.628906] [<ffffffff80242934>] process_scheduled_works+0x24/0x44 [ 62.628906] [<ffffffff8024515c>] worker_thread+0x31c/0x3f4 [ 62.628906] [<ffffffff802497a8>] kthread+0x88/0x90 [ 62.628906] [<ffffffff80206794>] kernel_thread_helper+0x10/0x18
--- drivers/gpu/drm/drm_irq.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_irq.c +5 -1
@@ -1054,7 +1054,7 @@ EXPORT_SYMBOL(drm_vblank_off);*/ void drm_vblank_pre_modeset (struct drm_device *dev,int crtc) { -/* vblank is not initialized (IRQ not installed ?) */ +/* vblank is not initialized (IRQ not installed ?), or has been freed */ if (!dev->num_crtcs)return ;/*
@@ -1076,6 +1076,10 @@ void drm_vblank_post_modeset(struct drm_ {unsigned long irqflags; +/* vblank is not initialized (IRQ not installed ?), or has been freed */ +if (!dev->num_crtcs) +return ; +if (dev->vblank_inmodeset[crtc]) {spin_lock_irqsave (&dev->vbl_lock, irqflags); dev->vblank_disable_allowed =1 ;
Greg Kroah-Hartman
maintainerPATCH 55/79 drm/i915/sdvo: Use &intel_sdvo->ddc instead of intel_sdvo->i2c for DDC.
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Egbert Eich <[email protected]>
commit 53d3b4d7778daf15900867336c85d3f8dd70600c upstream.
In intel_sdvo_get_lvds_modes() the wrong i2c adapter record is used for DDC. Thus the code will always have to rely on a LVDS panel mode supplied by VBT.
In most cases this succeeds, so this didn't get detected for quite a while.
This regression seems to have been introduced in
commit f899fc64cda8569d0529452aafc0da31c042df2e
Author: Chris Wilson <[email protected]> Date: Tue Jul 20 15:44:45 2010 -0700
drm/i915: use GMBUS to manage i2c links
--- drivers/gpu/drm/i915/intel_sdvo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_sdvo.c +1 -1
@@ -1770,7 +1770,7 @@ static void intel_sdvo_get_lvds_modes(st* Assume that the preferred modes are * arranged in priority order. */ -intel_ddc_get_modes (connector, intel_sdvo->i2c); +intel_ddc_get_modes (connector, &intel_sdvo->ddc);if (list_empty (&connector->probed_modes) == false) goto end;
Greg Kroah-Hartman
maintainerPATCH 56/79 drm/i915: no lvds quirk for hp t5740
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ben Mesman <[email protected]>
commit 45a211d75137b1ac869a8a758a6667f15827a115 upstream.
Last year, a patch was made for the "HP t5740e Thin Client" (see
http://lists.freedesktop.org/archives/dri-devel/2012-May/023245.html).
This device reports an lvds panel, but does not really have one.
The predecessor of this device is the "hp t5740", which also does not have an lvds panel. This patch will add the same quirk for this device.
--- drivers/gpu/drm/i915/intel_lvds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_lvds.c +2 -2
@@ -803,10 +803,10 @@ static const struct dmi_system_id intel_ }, { .callback = intel_no_lvds_dmi_callback, - .ident = "Hewlett-Packard HP t5740e Thin Client", + .ident = "Hewlett-Packard HP t5740", .matches = {DMI_MATCH (DMI_BOARD_VENDOR ,"Hewlett-Packard" ), - DMI_MATCH(DMI_PRODUCT_NAME, "HP t5740e Thin Client"), + DMI_MATCH(DMI_PRODUCT_NAME, " t5740"), }, }, {
Greg Kroah-Hartman
maintainerPATCH 57/79 drm/i915: Fix spurious -EIO/SIGBUS on wedged gpus
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Vetter <[email protected]>
commit 7abb690a0e095717420ba78dcab4309abbbec78a upstream.
Chris Wilson noticed that since
commit 1f83fee08d625f8d0130f9fe5ef7b17c2e022f3c [v3.9]
Author: Daniel Vetter <[email protected]> Date: Thu Nov 15 17:17:22 2012 +0100
drm/i915: clear up wedged transitions
X can again get -EIO when it does not expect it. And even worse score a SIGBUS when accessing gtt mmaps. The established ABI is that we _only_ return an -EIO from execbuf - all other ioctls should just work. And since the reset code moves all bos out of gpu domains and clears out all the last_seqno/ring tracking there really shouldn't be any reason for non-execbuf code to ever touch the hw and see an -EIO.
After some extensive discussions we've noticed that these spurios -EIO are caused by i915_gem_wait_for_error:
http://www.mail-archive.com/[email protected]/msg20540.html
That is easy to fix by returning 0 instead of -EIO, since grabbing the dev->struct_mutex does not yet mean that we actually want to touch the hw. And so there is no reason at all to fail with -EIO.
But that's not the entire since, since often (at least it's easily googleable) dmesg indicates that the reset fails and we declare the gpu wedged. Then, quite a bit later X wakes up with the "Timed out waiting for the gpu reset to complete" DRM_ERROR message in wait_for_errror and brings down the desktop with an -EIO/SIGBUS.
So clearly we're missing a wakeup somewhere, since the gpu reset just doesn't take 10 seconds to complete. And indeed we're do handle the terminally wedged state wrong.
Fix this all up.
--- drivers/gpu/drm/i915/i915_gem.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_gem.c +2 -5
@@ -91,14 +91,11 @@ i915_gem_wait_for_error(struct i915_gpu_ {int ret; -#define EXIT_COND (!i915_reset_in_progress(error)) +#define EXIT_COND (!i915_reset_in_progress(error) || \ + i915_terminally_wedged(error))if (EXIT_COND )return 0 ; -/* GPU is already declared terminally dead, give up. */ -if (i915_terminally_wedged (error)) -return -EIO ; -/* * Only wait 10 seconds for the gpu reset to complete to avoid hanging * userspace. If it takes that long something really bad is going on and
Greg Kroah-Hartman
maintainerPATCH 58/79 Revert "ACPI / scan: do not match drivers against objects having scan handlers"
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Rafael J. Wysocki" <[email protected]>
commit ea7f665612fcc73da6b7698f468cd5fc03a30d47 upstream.
Commit 9f29ab11ddbf ("ACPI / scan: do not match drivers against objects having scan handlers") introduced a boot regression on Tony's ia64 HP rx2600. Tony says:
"It panics with the message:
Kernel panic - not syncing: Unable to find SBA IOMMU: Try a generic or DIG kernel
[...] my problem comes from arch/ia64/hp/common/sba_iommu.c where the code in sba_init() says:
acpi_bus_register_driver(&acpi_sba_ioc_driver);
if (!ioc_list) { but because of this change we never managed to call ioc_init() so ioc_list doesn't get set up, and we die."
Revert it to avoid this breakage and we'll fix the problem it attempted to address later.
--- drivers/acpi/scan.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/acpi/scan.c +0 -4
@@ -553,10 +553,6 @@ static int acpi_bus_match(struct devicestruct acpi_device *acpi_dev =to_acpi_device (dev);struct acpi_driver *acpi_drv =to_acpi_driver (drv); -/* Skip ACPI device objects with scan handlers attached. */ -if (acpi_dev->handler) -return 0 ; -return acpi_dev->flags.match_driver && !acpi_match_device_ids (acpi_dev, acpi_drv->ids); }
Greg Kroah-Hartman
maintainerPATCH 59/79 powerpc: Fix build error in stable/3.9
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guenter Roeck <[email protected]>
Commit e71c42189 (powerpc/tm: Abort on emulation and alignment faults) introduced a powerpc build error in 3.9.5.
--- arch/powerpc/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/traps.c +1 -1
@@ -1151,7 +1151,7 @@ void alignment_exception(struct pt_regslocal_irq_enable ();if (tm_abort_check (regs,TM_CAUSE_ALIGNMENT |TM_CAUSE_PERSISTENT )) - goto bail; +return ;/* we don't implement logging of alignment exceptions */ if (!(current->thread.align_ctl &PR_UNALIGN_SIGBUS ))
Greg Kroah-Hartman
maintainerPATCH 60/79 usb: dwc3: gadget: free trb pool only from epnum 2
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: George Cherian <[email protected]>
commit 5bf8fae33d14cc5c3c53a926f9079f92c8b082b0 upstream.
we never allocate a TRB pool for physical endpoints 0 and 1 so trying to free it (a invalid TRB pool pointer) will lead us in a warning while removing dwc3.ko module.
In order to fix the situation, all we have to do is skip dwc3_free_trb_pool() for physical endpoints 0 and 1 just as we while deleting endpoints from the endpoints list.
--- drivers/usb/dwc3/gadget.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/usb/dwc3/gadget.c +12 -2
@@ -1637,10 +1637,20 @@ static void dwc3_gadget_free_endpoints(sfor (epnum =0 ; epnum <DWC3_ENDPOINTS_NUM ; epnum++) { dep = dwc->eps[epnum]; -dwc3_free_trb_pool (dep); -if (epnum !=0 && epnum !=1 ) +/* +* Physical endpoints 0 and 1 are special; they form the +* bi-directional USB endpoint 0. +* +* For those two physical endpoints, we don't allocate a TRB +* pool nor do we add them the endpoints list. Due to that, we +* shouldn't do these two operations otherwise we would end up +* with all sorts of bugs when removing dwc3.ko. +*/ +if (epnum !=0 && epnum !=1 ) { +dwc3_free_trb_pool (dep);list_del (&dep->endpoint.ep_list); + }kfree (dep); }
Greg Kroah-Hartman
maintainerPATCH 61/79 drm/gma500: Increase max resolution for mode setting
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Patrik Jakobsson <[email protected]>
commit cbbd379aa43890f36da934f5af619d2fb8ec3d87 upstream.
By having a higher max resolution we can now set up a virtual framebuffer that spans several monitors. 4096 should be ok since we're gen 3 or higher and should be enough for most dual head setups.
Bugzilla:
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-modesetting/+bug/1169147
--- drivers/gpu/drm/gma500/framebuffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/gma500/framebuffer.c +2 -2
@@ -772,8 +772,8 @@ void psb_modeset_init(struct drm_devicefor (i =0 ; i < dev_priv->num_pipe; i++)psb_intel_crtc_init (dev, i, mode_dev); - dev->mode_config.max_width =2048 ; - dev->mode_config.max_height =2048 ; + dev->mode_config.max_width =4096 ; + dev->mode_config.max_height =4096 ;psb_setup_outputs (dev);
Greg Kroah-Hartman
maintainerPATCH 62/79 pci: Set dev->dev.type in alloc_pci_dev
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Brian King <[email protected]>
commit 88e7b167a079f090405ab4390b629b5effdab41a upstream.
Set dev->dev.type in alloc_pci_dev so that archs that have their own versions of pci_setup_device get this set properly in order to ensure things like the boot_vga sysfs parameter get created as expected.
--- drivers/pci/probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/probe.c +1 -1
@@ -988,7 +988,6 @@ int pci_setup_device(struct pci_dev *dev dev->sysdata = dev->bus->sysdata; dev->dev.parent = dev->bus->bridge; dev->dev.bus = &pci_bus_type; - dev->dev.type = &pci_dev_type; dev->hdr_type = hdr_type &0x7f ; dev->multifunction = !!(hdr_type &0x80 ); dev->error_state = pci_channel_io_normal;
@@ -1208,6 +1207,7 @@ struct pci_dev *alloc_pci_dev(void)return NULL ;INIT_LIST_HEAD (&dev->bus_list); + dev->dev.type = &pci_dev_type;return dev; }
Greg Kroah-Hartman
maintainerPATCH 63/79 powerpc: Set default VGA device
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Brian King <[email protected]>
commit c2e1d84523ad2a19e5be08c1f01999cc9e82652e upstream.
Add a PCI quirk for VGA devices on Power to set the default VGA device. Ensures a default VGA is always set if a graphics adapter is present, even if firmware did not initialize it. If more than one graphics adapter is present, ensure the one initialized by firmware is set as the default VGA device. This ensures that X autoconfiguration will work.
--- arch/powerpc/kernel/pci-common.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
arch/powerpc/kernel/pci-common.c +13 -0
@@ -30,6 +30,7 @@#include <linux/irq.h> #include <linux/vmalloc.h> #include <linux/slab.h> +#include <linux/vgaarb.h> #include <asm/processor.h> #include <asm/io.h>
@@ -1725,3 +1726,15 @@ static void fixup_hide_host_resource_fsl }DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_MOTOROLA ,PCI_ANY_ID , fixup_hide_host_resource_fsl);DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_FREESCALE ,PCI_ANY_ID , fixup_hide_host_resource_fsl); + +static void fixup_vga (struct pci_dev *pdev) +{ +u16 cmd; + +pci_read_config_word (pdev,PCI_COMMAND , &cmd); +if ((cmd & (PCI_COMMAND_IO |PCI_COMMAND_MEMORY )) || !vga_default_device ()) +vga_set_default_device (pdev); + +} +DECLARE_PCI_FIXUP_CLASS_FINAL (PCI_ANY_ID ,PCI_ANY_ID , +PCI_CLASS_DISPLAY_VGA ,8 , fixup_vga);
Greg Kroah-Hartman
maintainerPATCH 64/79 powerpc/pseries: Force 32 bit MSIs for devices that require it
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Brian King <[email protected]>
commit e61133dda480062d221f09e4fc18f66763f8ecd0 upstream.
The following patch implements a new PAPR change which allows the OS to force the use of 32 bit MSIs, regardless of what the PCI capabilities indicate. This is required for some devices that advertise support for 64 bit MSIs but don't actually support them.
--- arch/powerpc/include/asm/pci-bridge.h | 2 ++ arch/powerpc/platforms/pseries/msi.c | 21 ++++++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-)
arch/powerpc/include/asm/pci-bridge.h +2 -0
@@ -154,6 +154,8 @@ struct pci_dn {int pci_ext_config_space;/* for pci devices */ + int force_32bit_msi:1; +struct pci_dev *pcidev;/* back-pointer to the pci device */ #ifdef CONFIG_EEH struct eeh_dev *edev;/* eeh device */
arch/powerpc/platforms/pseries/msi.c +18 -3
@@ -24,6 +24,7 @@ static int query_token, change_token;#define RTAS_RESET_FN 2#define RTAS_CHANGE_MSI_FN 3#define RTAS_CHANGE_MSIX_FN 4 +#define RTAS_CHANGE_32MSI_FN 5static struct pci_dn *get_pdn (struct pci_dev *pdev) {
@@ -58,7 +59,8 @@ static int rtas_change_msi(struct pci_dn seq_num =1 ; do { - if (func == RTAS_CHANGE_MSI_FN || func == RTAS_CHANGE_MSIX_FN) + if (func == RTAS_CHANGE_MSI_FN || func == RTAS_CHANGE_MSIX_FN || + func == RTAS_CHANGE_32MSI_FN) rc = rtas_call(change_token, 6, 4, rtas_ret, addr, BUID_HI(buid), BUID_LO(buid), func, num_irqs, seq_num);
@@ -426,9 +428,12 @@ static int rtas_setup_msi_irqs(struct pc*/ again:if (type ==PCI_CAP_ID_MSI ) { - rc =rtas_change_msi (pdn,RTAS_CHANGE_MSI_FN , nvec); +if (pdn->force_32bit_msi) + rc =rtas_change_msi (pdn,RTAS_CHANGE_32MSI_FN , nvec); +else + rc =rtas_change_msi (pdn,RTAS_CHANGE_MSI_FN , nvec); -if (rc <0 ) { +if (rc <0 && !pdn->force_32bit_msi) {pr_debug ("rtas_msi: trying the old firmware call.\n" ); rc =rtas_change_msi (pdn,RTAS_CHANGE_FN , nvec); }
@@ -512,3 +517,13 @@ static int rtas_msi_init(void)return 0 ; }arch_initcall (rtas_msi_init); + +static void quirk_radeon (struct pci_dev *dev) +{ +struct pci_dn *pdn =get_pdn (dev); + +if (pdn) + pdn->force_32bit_msi =1 ; +} +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_ATI ,0x68f2 , quirk_radeon); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_ATI ,0xaa68 , quirk_radeon);
Greg Kroah-Hartman
maintainerPATCH 65/79 powerpc/pseries: Make 32-bit MSI quirk work on systems lacking firmware support
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Brian King <[email protected]>
commit f1dd153121dcb872ae6cba8d52bec97519eb7d97 upstream.
Recent commit e61133dda480062d221f09e4fc18f66763f8ecd0 added support for a new firmware feature to force an adapter to use 32 bit MSIs. However, this firmware is not available for all systems. The hack below allows devices needing 32 bit MSIs to work on these systems as well. It is careful to only enable this on Gen2 slots, which should limit this to configurations where this hack is needed and tested to work.
[Small change to factor out the hack into a separate function -- BenH]
--- arch/powerpc/platforms/pseries/msi.c | 40 ++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-)
arch/powerpc/platforms/pseries/msi.c +37 -3
@@ -394,6 +394,23 @@ static int check_msix_entries(struct pcireturn 0 ; } +static void rtas_hack_32bit_msi_gen2 (struct pci_dev *pdev) +{ +u32 addr_hi, addr_lo; + +/* +* We should only get in here for IODA1 configs. This is based on the +* fact that we using RTAS for MSIs, we don't have the 32 bit MSI RTAS +* support, and we are in a PCIe Gen2 slot. +*/ +dev_info (&pdev->dev, +"rtas_msi: No 32 bit MSI firmware support, forcing 32 bit MSI\n" ); +pci_read_config_dword (pdev, pdev->msi_cap +PCI_MSI_ADDRESS_HI , &addr_hi); + addr_lo =0xffff0000 | ((addr_hi >> (48 -32 )) <<4 ); +pci_write_config_dword (pdev, pdev->msi_cap +PCI_MSI_ADDRESS_LO , addr_lo); +pci_write_config_dword (pdev, pdev->msi_cap +PCI_MSI_ADDRESS_HI ,0 ); +} +static int rtas_setup_msi_irqs (struct pci_dev *pdev,int nvec_in,int type) {struct pci_dn *pdn;
@@ -401,6 +418,7 @@ static int rtas_setup_msi_irqs(struct pcstruct msi_desc *entry;struct msi_msg msg;int nvec = nvec_in; +int use_32bit_msi_hack =0 ; pdn =get_pdn (pdev);if (!pdn)
@@ -428,15 +446,31 @@ static int rtas_setup_msi_irqs(struct pc*/ again:if (type ==PCI_CAP_ID_MSI ) { -if (pdn->force_32bit_msi) +if (pdn->force_32bit_msi) { rc =rtas_change_msi (pdn,RTAS_CHANGE_32MSI_FN , nvec); -else +if (rc <0 ) { +/* +* We only want to run the 32 bit MSI hack below if +* the max bus speed is Gen2 speed +*/ +if (pdev->bus->max_bus_speed !=PCIE_SPEED_5_0GT ) +return rc; + + use_32bit_msi_hack =1 ; + } + }else + rc =-1 ; + +if (rc <0 ) rc =rtas_change_msi (pdn,RTAS_CHANGE_MSI_FN , nvec); -if (rc <0 && !pdn->force_32bit_msi) { +if (rc <0 ) {pr_debug ("rtas_msi: trying the old firmware call.\n" ); rc =rtas_change_msi (pdn,RTAS_CHANGE_FN , nvec); } + +if (use_32bit_msi_hack && rc >0 ) +rtas_hack_32bit_msi_gen2 (pdev); }else rc =rtas_change_msi (pdn,RTAS_CHANGE_MSIX_FN , nvec);
Greg Kroah-Hartman
maintainerPATCH 66/79 powerpc/pseries: Perform proper max_bus_speed detection
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kleber Sacilotto de Souza <[email protected]>
commit d82fb31abc46620b7c22758c75707069f2763646 upstream.
On pseries machines the detection for max_bus_speed should be done through an OpenFirmware property. This patch adds a function to perform this detection and a hook to perform dynamic adding of the function only for pseries. This is done by overwriting the weak pcibios_root_bridge_prepare function which is called by pci_create_root_bus().
From: Lucas Kannebley Tavares <[email protected]>
--- arch/powerpc/include/asm/machdep.h | 3 + arch/powerpc/kernel/pci-common.c | 8 ++++ arch/powerpc/platforms/pseries/pci.c | 53 +++++++++++++++++++++++++++++++ arch/powerpc/platforms/pseries/pseries.h | 4 ++ arch/powerpc/platforms/pseries/setup.c | 2 + 5 files changed, 70 insertions(+)
arch/powerpc/include/asm/machdep.h +3 -0
@@ -29,6 +29,7 @@ struct rtc_time;struct file ;struct pci_controller ;struct kimage ; +struct pci_host_bridge ;struct machdep_calls {char *name;
@@ -107,6 +108,8 @@ struct machdep_calls {void (*pcibios_fixup)(void );int (*pci_probe_mode)(struct pci_bus *);void (*pci_irq_fixup)(struct pci_dev *dev); +int (*pcibios_root_bridge_prepare)(struct pci_host_bridge + *bridge);/* To setup PHBs when using automatic OF platform driver for PCI */ int (*pci_setup_phb)(struct pci_controller *host);
arch/powerpc/kernel/pci-common.c +8 -0
@@ -845,6 +845,14 @@ int pci_proc_domain(struct pci_bus *bus)return 1 ; } +int pcibios_root_bridge_prepare (struct pci_host_bridge *bridge) +{ +if (ppc_md.pcibios_root_bridge_prepare) +return ppc_md.pcibios_root_bridge_prepare (bridge); + +return 0 ; +} +/* This header fixup will do the resource fixup for all devices as they are * probed, but not for bridge ranges */
arch/powerpc/platforms/pseries/pci.c +53 -0
56 lines not on this page · raw message
arch/powerpc/platforms/pseries/pseries.h +4 -0
@@ -60,4 +60,8 @@ extern int dlpar_detach_node(struct devi/* Snooze Delay, pseries_idle */ DECLARE_PER_CPU (long, smt_snooze_delay); +/* PCI root bridge prepare function override for pseries */ +struct pci_host_bridge ; +int pseries_root_bridge_prepare (struct pci_host_bridge *bridge); +#endif /* _PSERIES_PSERIES_H */
arch/powerpc/platforms/pseries/setup.c +2 -0
@@ -466,6 +466,8 @@ static void __init pSeries_setup_arch(voelse ppc_md.enable_pmcs = power4_enable_pmcs; + ppc_md.pcibios_root_bridge_prepare = pseries_root_bridge_prepare; +if (firmware_has_feature (FW_FEATURE_SET_MODE )) {long rc;if ((rc =pSeries_enable_reloc_on_exc ()) !=H_SUCCESS ) {
Greg Kroah-Hartman
maintainerPATCH 67/79 radeon: use max_bus_speed to activate gen2 speeds
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kleber Sacilotto de Souza <[email protected]>
commit 7e0e41963740525af702bb23edede8ae9afc4ac0 upstream.
radeon currently uses a drm function to get the speed capabilities for the bus, drm_pcie_get_speed_cap_mask. However, this is a non-standard method of performing this detection and this patch changes it to use the max_bus_speed attribute.
From: Lucas Kannebley Tavares <[email protected]>
--- drivers/gpu/drm/radeon/evergreen.c | 10 +++------- drivers/gpu/drm/radeon/r600.c | 9 ++------- drivers/gpu/drm/radeon/rv770.c | 9 ++------- 3 files changed, 7 insertions(+), 21 deletions(-)
drivers/gpu/drm/radeon/evergreen.c +3 -7
@@ -3946,8 +3946,7 @@ void evergreen_fini(struct radeon_devicevoid evergreen_pcie_gen2_enable (struct radeon_device *rdev) { -u32 link_width_cntl, speed_cntl, mask; -int ret; +u32 link_width_cntl, speed_cntl;if (radeon_pcie_gen2 ==0 )return ;
@@ -3962,11 +3961,8 @@ void evergreen_pcie_gen2_enable(struct rif (ASIC_IS_X2 (rdev))return ; - ret =drm_pcie_get_speed_cap_mask (rdev->ddev, &mask); -if (ret !=0 ) -return ; - -if (!(mask &DRM_PCIE_SPEED_50 )) +if ((rdev->pdev->bus->max_bus_speed !=PCIE_SPEED_5_0GT ) && + (rdev->pdev->bus->max_bus_speed !=PCIE_SPEED_8_0GT ))return ; speed_cntl =RREG32_PCIE_P (PCIE_LC_SPEED_CNTL );
drivers/gpu/drm/radeon/r600.c +2 -7
@@ -4353,8 +4353,6 @@ static void r600_pcie_gen2_enable(struct {u32 link_width_cntl, lanes, speed_cntl, training_cntl, tmp;u16 link_cntl2; -u32 mask; -int ret;if (radeon_pcie_gen2 ==0 )return ;
@@ -4373,11 +4371,8 @@ static void r600_pcie_gen2_enable(structif (rdev->family <=CHIP_R600 )return ; - ret =drm_pcie_get_speed_cap_mask (rdev->ddev, &mask); -if (ret !=0 ) -return ; - -if (!(mask &DRM_PCIE_SPEED_50 )) +if ((rdev->pdev->bus->max_bus_speed !=PCIE_SPEED_5_0GT ) && + (rdev->pdev->bus->max_bus_speed !=PCIE_SPEED_8_0GT ))return ; speed_cntl =RREG32_PCIE_P (PCIE_LC_SPEED_CNTL );
drivers/gpu/drm/radeon/rv770.c +2 -7
@@ -1240,8 +1240,6 @@ static void rv770_pcie_gen2_enable(struc {u32 link_width_cntl, lanes, speed_cntl, tmp;u16 link_cntl2; -u32 mask; -int ret;if (radeon_pcie_gen2 ==0 )return ;
@@ -1256,11 +1254,8 @@ static void rv770_pcie_gen2_enable(strucif (ASIC_IS_X2 (rdev))return ; - ret =drm_pcie_get_speed_cap_mask (rdev->ddev, &mask); -if (ret !=0 ) -return ; - -if (!(mask &DRM_PCIE_SPEED_50 )) +if ((rdev->pdev->bus->max_bus_speed !=PCIE_SPEED_5_0GT ) && + (rdev->pdev->bus->max_bus_speed !=PCIE_SPEED_8_0GT ))return ;DRM_INFO ("enabling PCIE gen 2 link speeds, disable with radeon.pcie_gen2=0\n" );
Greg Kroah-Hartman
maintainerPATCH 68/79 iio:inkern: Fix typo/bug in convert raw to processed.
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Hennerich <[email protected]>
commit 6c5d4c96f979611f0165dc825af9e1cea8dd35b9 upstream.
--- drivers/iio/inkern.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/inkern.c +1 -1
@@ -279,7 +279,7 @@ static int iio_convert_raw_to_processed_s64 raw64 = raw;int ret; - ret =iio_channel_read (chan, &offset,NULL ,IIO_CHAN_INFO_SCALE ); + ret =iio_channel_read (chan, &offset,NULL ,IIO_CHAN_INFO_OFFSET );if (ret ==0 ) raw64 += offset;
Greg Kroah-Hartman
maintainerPATCH 69/79 iio: frequency: ad4350: Fix bug / typo in mask
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Hennerich <[email protected]>
commit 2eb3a81eef0510511a3211bb3da560f446a8c8de upstream.
--- drivers/iio/frequency/adf4350.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/frequency/adf4350.c +1 -1
@@ -212,7 +212,7 @@ static int adf4350_set_freq(struct adf43 (pdata->r2_user_settings & (ADF4350_REG2_PD_POLARITY_POS | ADF4350_REG2_LDP_6ns |ADF4350_REG2_LDF_INT_N |ADF4350_REG2_CHARGE_PUMP_CURR_uA (5000 ) | -ADF4350_REG2_MUXOUT (0x7 ) |ADF4350_REG2_NOISE_MODE (0x9 ))); +ADF4350_REG2_MUXOUT (0x7 ) |ADF4350_REG2_NOISE_MODE (0x3 ))); st->regs[ADF4350_REG3] = pdata->r3_user_settings & (ADF4350_REG3_12BIT_CLKDIV(0xFFF) |
Greg Kroah-Hartman
maintainerPATCH 70/79 drm/i915: force full modeset if the connector is in DPMS OFF mode
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Imre Deak <[email protected]>
commit e3de42b68478a8c95dd27520e9adead2af9477a5 upstream.
Currently the driver's assumed behavior for a modeset with an attached FB is that the corresponding connector will be switched to DPMS ON mode if it happened to be in DPMS OFF (or another power save mode). This wasn't enforced though if only the FB changed, everything else (format, connector etc.) remaining the same. In this case we only set the new FB base and left the connector in the old power save mode.
Fix this by forcing a full modeset whenever there is an attached FB and any affected connector is in a power save mode.
V_2: Run the test for encoders in power save mode outside the the test for fb change: user space may have just disabled the encoders but left everything else in place. Make sure the connector list is not empty before running this test.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61642
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59834
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59339
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64178
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65559
--- drivers/gpu/drm/i915/intel_display.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +22 -2
@@ -7960,6 +7960,21 @@ static void intel_set_config_restore_sta } } +static bool +is_crtc_connector_off (struct drm_crtc *crtc,struct drm_connector *connectors, +int num_connectors) +{ +int i; + +for (i =0 ; i < num_connectors; i++) +if (connectors[i].encoder && + connectors[i].encoder->crtc == crtc && + connectors[i].dpms !=DRM_MODE_DPMS_ON ) +return true; + +return false; +} +static void intel_set_config_compute_mode_changes (struct drm_mode_set *set,struct intel_set_config *config)
@@ -7967,7 +7982,11 @@ intel_set_config_compute_mode_changes(st/* We should be able to check here if the fb has the same properties * and then just flip_or_move it */ -if (set->crtc->fb != set->fb) { +if (set->connectors !=NULL && +is_crtc_connector_off (set->crtc, *set->connectors, + set->num_connectors)) { + config->mode_changed = true; + }else if (set->crtc->fb != set->fb) {/* If we have no fb then treat it as a full mode set */ if (set->crtc->fb ==NULL ) {DRM_DEBUG_KMS ("crtc has no fb, full mode set\n" );
@@ -7979,8 +7998,9 @@ intel_set_config_compute_mode_changes(st }else if (set->fb->bits_per_pixel != set->crtc->fb->bits_per_pixel) { config->mode_changed = true; - }else + }else { config->fb_changed = true; + } }if (set->fb && (set->x != set->crtc->x || set->y != set->crtc->y))
Greg Kroah-Hartman
maintainerPATCH 71/79 USB: serial: add wait_until_sent operation
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 0693196fe7bbb5e6cafd255dfce91ff6d10bc18f upstream.
Add wait_until_sent operation which can be used to wait for hardware buffers to drain.
--- drivers/usb/serial/usb-serial.c | 17 +++++++++++++++++ include/linux/usb/serial.h | 1 + 2 files changed, 18 insertions(+)
drivers/usb/serial/usb-serial.c +17 -0
@@ -379,6 +379,22 @@ static int serial_chars_in_buffer(structreturn count; } +static void serial_wait_until_sent (struct tty_struct *tty,int timeout) +{ +struct usb_serial_port *port = tty->driver_data; +struct usb_serial *serial = port->serial; + +dev_dbg (tty->dev,"%s\n" , __func__); + +if (!port->serial->type->wait_until_sent) +return ; + +mutex_lock (&serial->disc_mutex); +if (!serial->disconnected) + port->serial->type->wait_until_sent (tty, timeout); +mutex_unlock (&serial->disc_mutex); +} +static void serial_throttle (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;
@@ -1204,6 +1220,7 @@ static const struct tty_operations seria .unthrottle = serial_unthrottle, .break_ctl = serial_break, .chars_in_buffer = serial_chars_in_buffer, + .wait_until_sent = serial_wait_until_sent, .tiocmget = serial_tiocmget, .tiocmset = serial_tiocmset, .get_icount = serial_get_icount,
include/linux/usb/serial.h +1 -0
@@ -267,6 +267,7 @@ struct usb_serial_driver { struct usb_serial_port *port, struct ktermios *old);void (*break_ctl)(struct tty_struct *tty,int break_state);int (*chars_in_buffer)(struct tty_struct *tty); +void (*wait_until_sent)(struct tty_struct *tty,long timeout);void (*throttle)(struct tty_struct *tty);void (*unthrottle)(struct tty_struct *tty);int (*tiocmget)(struct tty_struct *tty);
Greg Kroah-Hartman
maintainerPATCH 72/79 USB: serial: add generic wait_until_sent implementation
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit dcf0105039660e951dfea348d317043d17988dfc upstream.
Add generic wait_until_sent implementation which polls for empty hardware buffers using the new port-operation tx_empty.
The generic implementation will be used for all sub-drivers that implement tx_empty but does not define wait_until_sent.
--- drivers/usb/serial/generic.c | 31 +++++++++++++++++++++++++++++++ drivers/usb/serial/usb-serial.c | 2 ++ include/linux/usb/serial.h | 3 +++ 3 files changed, 36 insertions(+)
drivers/usb/serial/generic.c +31 -0
@@ -264,6 +264,37 @@ int usb_serial_generic_chars_in_buffer(s }EXPORT_SYMBOL_GPL (usb_serial_generic_chars_in_buffer); +void usb_serial_generic_wait_until_sent (struct tty_struct *tty,long timeout) +{ +struct usb_serial_port *port = tty->driver_data; +unsigned int bps; +unsigned long period; +unsigned long expire; + + bps =tty_get_baud_rate (tty); +if (!bps) + bps =9600 ;/* B0 */ +/* +* Use a poll-period of roughly the time it takes to send one +* character or at least one jiffy. +*/ + period = max_t(unsigned long, (10 * HZ / bps), 1); + period = min_t(unsigned long, period, timeout); + +dev_dbg (&port->dev,"%s - timeout = %u ms, period = %u ms\n" , + __func__,jiffies_to_msecs (timeout), +jiffies_to_msecs (period)); + expire = jiffies + timeout; +while (!port->serial->type->tx_empty (port)) { +schedule_timeout_interruptible (period); +if (signal_pending (current)) +break ; +if (time_after (jiffies, expire)) +break ; + } +} +EXPORT_SYMBOL_GPL (usb_serial_generic_wait_until_sent); +static int usb_serial_generic_submit_read_urb (struct usb_serial_port *port,int index,gfp_t mem_flags) {
drivers/usb/serial/usb-serial.c +2 -0
@@ -1346,6 +1346,8 @@ static void fixup_generic(struct usb_serset_to_generic_if_null (device, close);set_to_generic_if_null (device, write_room);set_to_generic_if_null (device, chars_in_buffer); +if (device->tx_empty) +set_to_generic_if_null (device, wait_until_sent);set_to_generic_if_null (device, read_bulk_callback);set_to_generic_if_null (device, write_bulk_callback);set_to_generic_if_null (device, disconnect);
include/linux/usb/serial.h +3 -0
@@ -268,6 +268,7 @@ struct usb_serial_driver {void (*break_ctl)(struct tty_struct *tty,int break_state);int (*chars_in_buffer)(struct tty_struct *tty);void (*wait_until_sent)(struct tty_struct *tty,long timeout); +bool (*tx_empty)(struct usb_serial_port *port);void (*throttle)(struct tty_struct *tty);void (*unthrottle)(struct tty_struct *tty);int (*tiocmget)(struct tty_struct *tty);
@@ -326,6 +327,8 @@ extern void usb_serial_generic_close(strextern int usb_serial_generic_resume (struct usb_serial *serial);extern int usb_serial_generic_write_room (struct tty_struct *tty);extern int usb_serial_generic_chars_in_buffer (struct tty_struct *tty); +extern void usb_serial_generic_wait_until_sent (struct tty_struct *tty, +long timeout);extern void usb_serial_generic_read_bulk_callback (struct urb *urb);extern void usb_serial_generic_write_bulk_callback (struct urb *urb);extern void usb_serial_generic_throttle (struct tty_struct *tty);
Greg Kroah-Hartman
maintainerPATCH 73/79 USB: ftdi_sio: clean up get_modem_status
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit c4133648bbce9e6b425a74cc890c8e4df51acaa9 upstream.
Use usb-serial port rather than tty as argument to get_modem_status.
--- drivers/usb/serial/ftdi_sio.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/usb/serial/ftdi_sio.c +4 -5
@@ -932,7 +932,7 @@ static int ftdi_ioctl(struct tty_struct unsigned int cmd, unsigned long arg);static void ftdi_break_ctl (struct tty_struct *tty,int break_state);static int ftdi_chars_in_buffer (struct tty_struct *tty); -static int ftdi_get_modem_status (struct tty_struct *tty, +static int ftdi_get_modem_status (struct usb_serial_port *port,unsigned char status[2 ]);static unsigned short int ftdi_232am_baud_base_to_divisor (int baud,int base);
@@ -2104,7 +2104,7 @@ static int ftdi_chars_in_buffer(struct t goto out;/* Check if hardware buffer is empty. */ - ret =ftdi_get_modem_status (tty, buf); + ret =ftdi_get_modem_status (port, buf);if (ret ==2 ) {if (!(buf[1 ] &FTDI_RS_TEMT )) chars =1 ;
@@ -2304,10 +2304,9 @@ no_c_cflag_changes:* Returns the number of status bytes retrieved (device dependant), or * negative error code. */ -static int ftdi_get_modem_status (struct tty_struct *tty, +static int ftdi_get_modem_status (struct usb_serial_port *port,unsigned char status[2 ]) { -struct usb_serial_port *port = tty->driver_data;struct ftdi_private *priv =usb_get_serial_port_data (port);unsigned char *buf;int len;
@@ -2372,7 +2371,7 @@ static int ftdi_tiocmget(struct tty_struunsigned char buf[2 ];int ret; - ret =ftdi_get_modem_status (tty, buf); + ret =ftdi_get_modem_status (port, buf);if (ret <0 )return ret;
Greg Kroah-Hartman
maintainerPATCH 74/79 USB: ftdi_sio: fix chars_in_buffer overhead
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit a37025b5c702aaf87191cd75fcc42c54454f16f5 upstream.
Use the new generic usb-serial wait_until_sent implementation to wait for hardware buffers to drain.
This removes the need to check the hardware buffers in chars_in_buffer and thus removes the overhead introduced by commit 6f602912 ("usb:
serial: ftdi_sio: Add missing chars_in_buffer function") without breaking tty_wait_until_sent (used by, for example, tcdrain, tcsendbreak and close).
--- drivers/usb/serial/ftdi_sio.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-)
drivers/usb/serial/ftdi_sio.c +5 -14
@@ -931,7 +931,7 @@ static int ftdi_get_icount(struct tty_ststatic int ftdi_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg);static void ftdi_break_ctl (struct tty_struct *tty,int break_state); -static int ftdi_chars_in_buffer (struct tty_struct *tty); +static bool ftdi_tx_empty (struct usb_serial_port *port);static int ftdi_get_modem_status (struct usb_serial_port *port,unsigned char status[2 ]);
@@ -968,7 +968,7 @@ static struct usb_serial_driver ftdi_sio .ioctl = ftdi_ioctl, .set_termios = ftdi_set_termios, .break_ctl = ftdi_break_ctl, - .chars_in_buffer = ftdi_chars_in_buffer, + .tx_empty = ftdi_tx_empty, };static struct usb_serial_driver *const serial_drivers[] = {
@@ -2092,27 +2092,18 @@ static void ftdi_break_ctl(struct tty_st } -static int ftdi_chars_in_buffer (struct tty_struct *tty) +static bool ftdi_tx_empty (struct usb_serial_port *port) { -struct usb_serial_port *port = tty->driver_data; -int chars;unsigned char buf[2 ];int ret; - chars =usb_serial_generic_chars_in_buffer (tty); -if (chars) - goto out; - -/* Check if hardware buffer is empty. */ ret =ftdi_get_modem_status (port, buf);if (ret ==2 ) {if (!(buf[1 ] &FTDI_RS_TEMT )) - chars =1 ; +return false; } -out: -dev_dbg (&port->dev,"%s - %d\n" , __func__, chars); -return chars; +return true; }/* old_termios contains the original termios settings and tty->termios contains
Greg Kroah-Hartman
maintainerPATCH 75/79 USB: io_ti: fix chars_in_buffer overhead
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit b16634adce951a7371be931487034f7365971ed0 upstream.
Use the new generic usb-serial wait_until_sent implementation to wait for hardware buffers to drain.
This removes the need to check the hardware buffers in chars_in_buffer and thus removes the overhead introduced by commit 263e1f9f ("USB:io_ti: query hardware-buffer status in chars_in_buffer") without breaking tty_wait_until_sent (used by, for example, tcdrain, tcsendbreak and close).
--- drivers/usb/serial/io_ti.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-)
drivers/usb/serial/io_ti.c +14 -8
@@ -2033,8 +2033,6 @@ static int edge_chars_in_buffer(struct tstruct edgeport_port *edge_port =usb_get_serial_port_data (port);int chars =0 ;unsigned long flags; -int ret; -if (edge_port ==NULL )return 0 ;
@@ -2042,16 +2040,22 @@ static int edge_chars_in_buffer(struct t chars =kfifo_len (&edge_port->write_fifo);spin_unlock_irqrestore (&edge_port->ep_lock, flags); -if (!chars) { - ret =tx_active (edge_port); -if (ret >0 ) - chars = ret; - } -dev_dbg (&port->dev,"%s - returns %d\n" , __func__, chars);return chars; } +static bool edge_tx_empty (struct usb_serial_port *port) +{ +struct edgeport_port *edge_port =usb_get_serial_port_data (port); +int ret; + + ret =tx_active (edge_port); +if (ret >0 ) +return false; + +return true; +} +static void edge_throttle (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;
@@ -2622,6 +2626,7 @@ static struct usb_serial_driver edgeport .write = edge_write, .write_room = edge_write_room, .chars_in_buffer = edge_chars_in_buffer, + .tx_empty = edge_tx_empty, .break_ctl = edge_break, .read_int_callback = edge_interrupt_callback, .read_bulk_callback = edge_bulk_in_callback,
@@ -2653,6 +2658,7 @@ static struct usb_serial_driver edgeport .write = edge_write, .write_room = edge_write_room, .chars_in_buffer = edge_chars_in_buffer, + .tx_empty = edge_tx_empty, .break_ctl = edge_break, .read_int_callback = edge_interrupt_callback, .read_bulk_callback = edge_bulk_in_callback,
Greg Kroah-Hartman
maintainerPATCH 76/79 Fix lockup related to stop_machine being stuck in __do_softirq.
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ben Greear <[email protected]>
commit 34376a50fb1fa095b9d0636fa41ed2e73125f214 upstream.
The stop machine logic can lock up if all but one of the migration threads make it through the disable-irq step and the one remaining thread gets stuck in __do_softirq. The reason __do_softirq can hang is that it has a bail-out based on jiffies timeout, but in the lockup case, jiffies itself is not incremented.
To work around this, re-add the max_restart counter in __do_irq and stop processing irqs after 10 restarts.
Thanks to Tejun Heo and Rusty Russell and others for helping me track this down.
This was introduced in 3.9 by commit c10d73671ad3 ("softirq: reduce latencies").
It may be worth looking into ath9k to see if it has issues with its irq handler at a later date.
The hang stack traces look something like this:
------------[ cut here ]------------
WARNING: at kernel/watchdog.c:245 watchdog_overflow_callback+0x9c/0xa7()
Watchdog detected hard LOCKUP on cpu 2
Modules linked in: ath9k ath9k_common ath9k_hw ath mac80211 cfg80211 nfsv4 auth_rpcgss nfs fscache nf_nat_ipv4 nf_nat veth 8021q garp stp mrp llc pktgen lockd sunrpc]
Pid: 23, comm: migration/2 Tainted: G C 3.9.4+ #11
Call Trace:
<NMI> warn_slowpath_common+0x85/0x9f
warn_slowpath_fmt+0x46/0x48
watchdog_overflow_callback+0x9c/0xa7
__perf_event_overflow+0x137/0x1cb
perf_event_overflow+0x14/0x16
intel_pmu_handle_irq+0x2dc/0x359
perf_event_nmi_handler+0x19/0x1b
nmi_handle+0x7f/0xc2
do_nmi+0xbc/0x304
end_repeat_nmi+0x1e/0x2e
<<EOE>>
cpu_stopper_thread+0xae/0x162
smpboot_thread_fn+0x258/0x260
kthread+0xc7/0xcf
ret_from_fork+0x7c/0xb0
---[ end trace 4947dfa9b0a4cec3 ]---
BUG: soft lockup - CPU#1 stuck for 22s! [migration/1:17]
Modules linked in: ath9k ath9k_common ath9k_hw ath mac80211 cfg80211 nfsv4 auth_rpcgss nfs fscache nf_nat_ipv4 nf_nat veth 8021q garp stp mrp llc pktgen lockd sunrpc]
irq event stamp: 835637905
hardirqs last enabled at (835637904): __do_softirq+0x9f/0x257
hardirqs last disabled at (835637905): apic_timer_interrupt+0x6d/0x80
softirqs last enabled at (5654720): __do_softirq+0x1ff/0x257
softirqs last disabled at (5654725): irq_exit+0x5f/0xbb
CPU 1
Pid: 17, comm: migration/1 Tainted: G WC 3.9.4+ #11 To be filled by O.E.M. To be filled by O.E.M./To be filled by O.E.M.
RIP: tasklet_hi_action+0xf0/0xf0
Process migration/1
Call Trace:
<IRQ>
__do_softirq+0x117/0x257
irq_exit+0x5f/0xbb
smp_apic_timer_interrupt+0x8a/0x98
apic_timer_interrupt+0x72/0x80
<EOI>
printk+0x4d/0x4f
stop_machine_cpu_stop+0x22c/0x274
cpu_stopper_thread+0xae/0x162
smpboot_thread_fn+0x258/0x260
kthread+0xc7/0xcf
ret_from_fork+0x7c/0xb0--- kernel/softirq.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
kernel/softirq.c +10 -3
@@ -195,8 +195,12 @@ void local_bh_enable_ip(unsigned long ipEXPORT_SYMBOL (local_bh_enable_ip);/* -* We restart softirq processing for at most 2 ms, -* and if need_resched() is not set. +* We restart softirq processing for at most MAX_SOFTIRQ_RESTART times, +* but break the loop if need_resched() is set or after 2 ms. +* The MAX_SOFTIRQ_TIME provides a nice upper bound in most cases, but in +* certain cases, such as stop_machine(), jiffies may cease to +* increment and so we need the MAX_SOFTIRQ_RESTART limit as +* well to make sure we eventually return from this method. * * These limits have been established via experimentation. * The two things to balance is latency against fairness -
@@ -204,6 +208,7 @@ EXPORT_SYMBOL(local_bh_enable_ip);* should not be able to lock up the box. */ #define MAX_SOFTIRQ_TIME msecs_to_jiffies(2) +#define MAX_SOFTIRQ_RESTART 10 asmlinkage void __do_softirq(void) {
@@ -212,6 +217,7 @@ asmlinkage void __do_softirq(void)unsigned long end = jiffies +MAX_SOFTIRQ_TIME ;int cpu;unsigned long old_flags = current->flags; +int max_restart =MAX_SOFTIRQ_RESTART ;/* * Mask out PF_MEMALLOC s current task context is borrowed for the
@@ -265,7 +271,8 @@ restart: pending =local_softirq_pending ();if (pending) { -if (time_before (jiffies, end) && !need_resched ()) +if (time_before (jiffies, end) && !need_resched () && + --max_restart) goto restart;wakeup_softirqd ();
Greg Kroah-Hartman
maintainerPATCH 77/79 xen/smp: Fixup NOHZ per cpu data when onlining an offline CPU.
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konrad Rzeszutek Wilk <[email protected]>
commit 466318a87f28cb3ba0d08a3b7ef1a37ae73d5aa7 upstream.
The xen_play_dead is an undead function. When the vCPU is told to offline it ends up calling xen_play_dead wherin it calls the VCPUOP_down hypercall which offlines the vCPU. However, when the vCPU is onlined back, it resumes execution right after VCPUOP_down hypercall.
That was OK (albeit the API for play_dead assumes that the CPU stays dead and never returns) but with commit 4b0c0f294 (tick: Cleanup NOHZ per cpu data on cpu down) that is no longer safe as said commit resets the ts->inidle which at the start of the cpu_idle loop was set.
The net effect is that we get this warn:
Broke affinity for irq 16
installing Xen timer for CPU 1
cpu 1 spinlock event irq 48
------------[ cut here ]------------ WARNING: at /home/konrad/linux-linus/kernel/time/tick-sched.c:935 tick_nohz_idle_exit+0x195/0x1b0() Modules linked in: dm_multipath dm_mod xen_evtchn iscsi_boot_sysfs CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.10.0-rc3upstream-00068-gdcdbe33 #1 Hardware name: BIOSTAR Group N61PB-M2S/N61PB-M2S, BIOS 6.00 PG 09/03/2009 ffffffff8193b448 ffff880039da5e60 ffffffff816707c8 ffff880039da5ea0 ffffffff8108ce8b ffff880039da4010 ffff88003fa8e500 ffff880039da4010 0000000000000001 ffff880039da4000 ffff880039da4010 ffff880039da5eb0 Call Trace: [<ffffffff816707c8>] dump_stack+0x19/0x1b [<ffffffff8108ce8b>] warn_slowpath_common+0x6b/0xa0 [<ffffffff8108ced5>] warn_slowpath_null+0x15/0x20 [<ffffffff810e4745>] tick_nohz_idle_exit+0x195/0x1b0 [<ffffffff810da755>] cpu_startup_entry+0x205/0x250 [<ffffffff81661070>] cpu_bringup_and_idle+0x13/0x15 ---[ end trace 915c8c486004dda1 ]---
b/c ts_inidle is set to zero. Thomas suggested that we just add a workaround to call tick_nohz_idle_enter before returning from xen_play_dead() - and that is what this patch does and fixes the issue.
We also add the stable part b/c git commit 4b0c0f294 is on the stable tree.
--- arch/x86/xen/smp.c | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/x86/xen/smp.c +8 -0
@@ -17,6 +17,7 @@#include <linux/slab.h> #include <linux/smp.h> #include <linux/irq_work.h> +#include <linux/tick.h> #include <asm/paravirt.h> #include <asm/desc.h>
@@ -436,6 +437,13 @@ static void __cpuinit xen_play_dead(voidplay_dead_common ();HYPERVISOR_vcpu_op (VCPUOP_down,smp_processor_id (),NULL );cpu_bringup (); +/* +* commit 4b0c0f294 (tick: Cleanup NOHZ per cpu data on cpu down) +* clears certain data that the cpu_idle loop (which called us +* and that we return from) expects. The only way to get that +* data back is to call: +*/ + tick_nohz_idle_enter(); }#else /* !CONFIG_HOTPLUG_CPU */
Greg Kroah-Hartman
maintainerPATCH 78/79 timekeeping: Correct run-time detection of persistent_clock.
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zoran Markovic <[email protected]>
commit 0d6bd9953f739dad96d9a0de65383e479ab4e10d upstream.
Since commit 31ade30692dc9680bfc95700d794818fa3f754ac, timekeeping_init() checks for presence of persistent clock by attempting to read a non-zero time value. This is an issue on platforms where persistent_clock (instead is implemented as a free-running counter (instead of an RTC) starting from zero on each boot and running during suspend. Examples are some ARM platforms (e.g. PandaBoard).
An attempt to read such a clock during timekeeping_init() may return zero value and falsely declare persistent clock as missing. Additionally, in the above case suspend times may be accounted twice (once from timekeeping_resume() and once from rtc_resume()), resulting in a gradual drift of system time.
This patch does a run-time correction of the issue by doing the same check during timekeeping_suspend().
A better long-term solution would have to return error when trying to read non-existing clock and zero when trying to read an uninitialized clock, but that would require changing all persistent_clock implementations.
This patch addresses the immediate breakage, for now.
--- kernel/time/timekeeping.c | 8 ++++++++ 1 file changed, 8 insertions(+)
kernel/time/timekeeping.c +8 -0
@@ -826,6 +826,14 @@ static int timekeeping_suspend(void)read_persistent_clock (&timekeeping_suspend_time); +/* +* On some systems the persistent_clock can not be detected at +* timekeeping_init by its return value, so if we see a valid +* value returned, update the persistent_clock_exists flag. +*/ +if (timekeeping_suspend_time.tv_sec || timekeeping_suspend_time.tv_nsec) + persistent_clock_exist = true; +write_seqlock_irqsave (&tk->lock, flags);timekeeping_forward_now (tk); timekeeping_suspended =1 ;
Greg Kroah-Hartman
maintainerPATCH 79/79 s390: Add pgste to ptep_modify_prot_start()
In reply to Greg Kroah-Hartman3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ben Hutchings <[email protected]>
Commit 52f36be0f4e2 's390/pgtable: Fix check for pgste/storage key handling', which was commit b56433cb782d upstream, added a use of pgste to ptep_modify_prot_start(), but this variable does not exist. In mainline, pgste was added by commit d3383632d4e8 's390/mm: add pte invalidation notifier for kvm' and initialised to the return value of pgste_get_lock(ptep). Initialise it similarly here.
Compile-tested only.
--- arch/s390/include/asm/pgtable.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/s390/include/asm/pgtable.h +2 -1
@@ -1063,11 +1063,12 @@ static inline pte_t ptep_modify_prot_staunsigned long address, pte_t *ptep) { + pgste_t pgste;pte_t pte; mm->context.flush_mm =1 ;if (mm_has_pgste (mm)) -pgste_get_lock (ptep); + pgste =pgste_get_lock (ptep); pte = *ptep;if (!mm_exclusive (mm))
Guenter Roeck
maintainerQuoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.9.6 release. There are 79 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 7 lines
Responses should be made by Thu Jun 13 19:50:17 UTC 2013. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.9.6-rc1.gzand the diffstat can be found below.
Hi Greg,
Any chance to make those patches available as git repository somewhere, or at least as downloadable series of patches (eg as a tar file) which could be applied with git am ?
Thanks,
Guenter
Quoted 13 lines · Guenter Roeck
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.9.6 release. There are 79 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 7 lines
Responses should be made by Thu Jun 13 19:50:17 UTC 2013. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.9.6-rc1.gzand the diffstat can be found below.
Quoted 5 lines
Hi Greg,
Any chance to make those patches available as git repository somewhere, or at least as downloadable series of patches (eg as a tar file) which could be applied with git am ?
Is this what you're looking for?
git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git
josh
Guenter Roeck
maintainerQuoted 16 lines · Josh Boyer
Quoted 15 lines · Guenter Roeck
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.9.6 release. There are 79 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 7 lines
Responses should be made by Thu Jun 13 19:50:17 UTC 2013. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.9.6-rc1.gzand the diffstat can be found below.
Hi Greg,
Quoted 8 lines
Quoted 3 lines
Any chance to make those patches available as git repository somewhere, or at least as downloadable series of patches (eg as a tar file) which could be applied with git am ?
Is this what you're looking for?
git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git
Yes, that should work.
Sorry for the noise.
Guenter
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.9.6 release. There are 79 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu Jun 13 19:50:17 UTC 2013. Anything received after that time might be too late.
Quoted 8 lines
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.9.6-rc1.gzand the diffstat can be found below.
thanks,
greg k-h
Patches applied cleanly to 3.0.81, 3.4.48, and 3.9.5
Compiled and booted on the following systems:
Samsung Series 9 900X4C Intel Corei5:
(3.4.49-rc1, and 3.9.6-rc1)
HP ProBook 6475b AMD A10-4600M APU with Radeon(tm) HD Graphics:
(3.0.82-rc1, 3.4.49-rc1, and 3.9.6-rc1)dmesgs for all releases look good. No regressions compared to the previous dmesgs for each of these releases.
Reviewed patches.
Cross-compile testing:
HP Compaq dc7700 SFF desktop: x86-64 Intel Core-i2:
(3.0.82-rc1, 3.4.48-rc1, and 3.9.6-rc1)
Cross-compile tests results:
alpha: defconfig passed on all
arm: defconfig passed on all
arm64: not applicable to 3.0.y, 3.4.y. defconfig passed on 3.9.y
c6x: not applicable to 3.0.y, defconfig passed on 3.4.y and 3.9.y
mips: defconfig passed on all
mipsel: defconfig passed on all
powerpc: wii_defconfig passed on all
sh: defconfig passed on all
sparc: defconfig passed on all
tile: tilegx_defconfig passed on all
-- Shuah
Shuah Khan, Linux Kernel Developer - Open Source Group Samsung Research America (Silicon Valley) [email protected] | (970) 672-0658
Greg Kroah-Hartman
maintainerQuoted 22 lines · Shuah Khan
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.9.6 release. There are 79 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu Jun 13 19:50:17 UTC 2013. Anything received after that time might be too late.
Quoted 8 lines
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.9.6-rc1.gzand the diffstat can be found below.
thanks,
greg k-h
Patches applied cleanly to 3.0.81, 3.4.48, and 3.9.5
Compiled and booted on the following systems:
Quoted 7 lines
Samsung Series 9 900X4C Intel Corei5:
(3.4.49-rc1, and 3.9.6-rc1) HP ProBook 6475b AMD A10-4600M APU with Radeon(tm) HD Graphics: (3.0.82-rc1, 3.4.49-rc1, and 3.9.6-rc1)dmesgs for all releases look good. No regressions compared to the previous dmesgs for each of these releases.
Wonderful, thanks for testing and letting me know.
greg k-h
Re: [ 65/79] powerpc/pseries: Make 32-bit MSI quirk work on systems lacking firmware support
In reply to Greg Kroah-HartmanQuoted 87 lines · Greg Kroah-Hartman
3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Brian King <[email protected]>
commit
f1dd153121dcb872ae6cba8d52bec97519eb7d97upstream.Recent commit
e61133dda480062d221f09e4fc18f66763f8ecd0added support for a new firmware feature to force an adapter to use 32 bit MSIs. However, this firmware is not available for all systems. The hack below allows devices needing 32 bit MSIs to work on these systems as well. It is careful to only enable this on Gen2 slots, which should limit this to configurations where this hack is needed and tested to work.[Small change to factor out the hack into a separate function -- BenH]
Signed-off-by Brian King <[email protected]>Signed-off-by Benjamin Herrenschmidt <[email protected]>Signed-off-by Kleber Sacilotto de Souza <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- arch/powerpc/platforms/pseries/msi.c | 40 ++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-)arch/powerpc/platforms/pseries/msi.c +33
-3@@ -394,6 +394,23 @@ static int check_msix_entries(struct pcireturn 0 ; } +static void rtas_hack_32bit_msi_gen2 (struct pci_dev *pdev) +{ +u32 addr_hi, addr_lo; + +/* +* We should only get in here for IODA1 configs. This is based on the +* fact that we using RTAS for MSIs, we don't have the 32 bit MSI RTAS +* support, and we are in a PCIe Gen2 slot. +*/ +dev_info (&pdev->dev, +"rtas_msi: No 32 bit MSI firmware support, forcing 32 bit MSI\n" ); +pci_read_config_dword (pdev, pdev->msi_cap +PCI_MSI_ADDRESS_HI , &addr_hi); + addr_lo =0xffff0000 | ((addr_hi >> (48 -32 )) <<4 ); +pci_write_config_dword (pdev, pdev->msi_cap +PCI_MSI_ADDRESS_LO , addr_lo); +pci_write_config_dword (pdev, pdev->msi_cap +PCI_MSI_ADDRESS_HI ,0 ); +} +static int rtas_setup_msi_irqs (struct pci_dev *pdev,int nvec_in,int type) {struct pci_dn *pdn;@@ -401,6 +418,7 @@ static int rtas_setup_msi_irqs(struct pcstruct msi_desc *entry;struct msi_msg msg;int nvec = nvec_in; +int use_32bit_msi_hack =0 ; pdn =get_pdn (pdev);if (!pdn)@@ -428,15 +446,31 @@ static int rtas_setup_msi_irqs(struct pc*/ again:if (type ==PCI_CAP_ID_MSI ) { -if (pdn->force_32bit_msi) +if (pdn->force_32bit_msi) { rc =rtas_change_msi (pdn,RTAS_CHANGE_32MSI_FN , nvec); -else +if (rc <0 ) { +/* +* We only want to run the 32 bit MSI hack below if +* the max bus speed is Gen2 speed +*/ +if (pdev->bus->max_bus_speed !=PCIE_SPEED_5_0GT ) +return rc; + + use_32bit_msi_hack =1 ; + } + }else + rc =-1 ; + +if (rc <0 ) rc =rtas_change_msi (pdn,RTAS_CHANGE_MSI_FN , nvec); -if (rc <0 && !pdn->force_32bit_msi) {
arch/powerpc/platforms/pseries/msi.c static int rtas_setup_msi_irqs(struct pc · line 476
Quoted 10 lines
arch/powerpc/platforms/pseries/msi.c +4
-0+if (rc <0 ) {pr_debug ("rtas_msi: trying the old firmware call.\n" ); rc =rtas_change_msi (pdn,RTAS_CHANGE_FN , nvec); } + +if (use_32bit_msi_hack && rc >0 ) +rtas_hack_32bit_msi_gen2 (pdev); }else rc =rtas_change_msi (pdn,RTAS_CHANGE_MSIX_FN , nvec);
Greg,
This change depends on upstream commit e375b561817d9ae098cc4296a729fc88924a0159 to work, since this is when the msi_cap field was added to struct pci_dev. e375b561 was applied on 3.10-rc1 and it seems it is not on the stable tree, so in my request for the stable tree I sent a patch backported to 3.9.y with a modified version of rtas_hack_32bit_msi_gen2(). If e375b561 is not being brought to the stable tree as well, please consider the code I sent to the stable list on June/06, or else it will break the build for ppc.
Thank you,
Signature · 2 lines
Kleber Sacilotto de Souza IBM Linux Technology Center
Guenter Roeck
maintainerQuoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.9.6 release. There are 79 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 7 lines
Responses should be made by Thu Jun 13 19:50:17 UTC 2013. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.9.6-rc1.gzand the diffstat can be found below.
powerpc defconfig and as well as various other powerpc builds fail with:
arch/powerpc/platforms/pseries/msi.c: In function 'rtas_hack_32bit_msi_gen2':arch/powerpc/platforms/pseries/msi.c:408:34: error: 'struct pci_dev' has no member named 'msi_cap' arch/powerpc/platforms/pseries/msi.c:410:35: error: 'struct pci_dev' has no member named 'msi_cap' arch/powerpc/platforms/pseries/msi.c:411:35: error: 'struct pci_dev' has no member named 'msi_cap'
Introduced by commit 7b58b0edaa2 (powerpc/pseries: Make 32-bit MSI quirk work on systems lacking firmware support).
Guenter
Guenter Roeck
maintainerQuoted 15 lines · Guenter Roeck
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.9.6 release. There are 79 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 7 lines
Responses should be made by Thu Jun 13 19:50:17 UTC 2013. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.9.6-rc1.gzand the diffstat can be found below.
powerpc defconfig and as well as various other powerpc builds fail with:
Quoted 8 lines
arch/powerpc/platforms/pseries/msi.c: In function 'rtas_hack_32bit_msi_gen2':arch/powerpc/platforms/pseries/msi.c:408:34: error: 'structpci_dev' has no member named 'msi_cap'arch/powerpc/platforms/pseries/msi.c:410:35: error: 'structpci_dev' has no member named 'msi_cap'arch/powerpc/platforms/pseries/msi.c:411:35: error: 'structpci_dev' has no member named 'msi_cap'Introduced by commit
7b58b0edaa2(powerpc/pseries: Make 32-bit MSI quirk work on systems lacking firmware support).
s/7b58b0edaa2/f1dd153121/
7b58b0edaa2 is from my git branch and won't help much.
Guenter
Quoted 21 lines · Guenter Roeck
Quoted 20 lines · Guenter Roeck
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.9.6 release. There are 79 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 7 lines
Responses should be made by Thu Jun 13 19:50:17 UTC 2013. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.9.6-rc1.gzand the diffstat can be found below.
powerpc defconfig and as well as various other powerpc builds fail with:
arch/powerpc/platforms/pseries/msi.c: In function 'rtas_hack_32bit_msi_gen2':arch/powerpc/platforms/pseries/msi.c:408:34: error: 'structpci_dev' has no member named 'msi_cap'arch/powerpc/platforms/pseries/msi.c:410:35: error: 'structpci_dev' has no member named 'msi_cap'arch/powerpc/platforms/pseries/msi.c:411:35: error: 'structpci_dev' has no member named 'msi_cap'
Quoted 9 lines
Quoted 3 lines
Introduced by commit
7b58b0edaa2(powerpc/pseries: Make 32-bit MSI quirk work on systems lacking firmware support).s/7b58b0edaa2/f1dd153121/
7b58b0edaa2is from my git branch and won't help much.Guenter
Guenter,
The original patch that introduced these changes (commit f1dd153121 - powerpc/pseries: Make 32-bit MSI quirk work on systems lacking firmware support) depends on commit e375b561 (PCI: Cache MSI/MSI-X capability offsets in struct pci_dev), however, the patch I sent to the stable mailing-list were backported to be applied over 3.9.y. I have already sent an email to Greg to let him know that the original patch breaks the ppc build and the backported version should be picked up instead.
Thanks,
Signature · 2 lines
Kleber Sacilotto de Souza IBM Linux Technology Center
Greg Kroah-Hartman
maintainerQuoted 34 lines · Kleber Sacilotto de Souza
Quoted 21 lines · Guenter Roeck
Quoted 20 lines · Guenter Roeck
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.9.6 release. There are 79 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 7 lines
Responses should be made by Thu Jun 13 19:50:17 UTC 2013. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.9.6-rc1.gzand the diffstat can be found below.
powerpc defconfig and as well as various other powerpc builds fail with:
arch/powerpc/platforms/pseries/msi.c: In function 'rtas_hack_32bit_msi_gen2':arch/powerpc/platforms/pseries/msi.c:408:34: error: 'structpci_dev' has no member named 'msi_cap'arch/powerpc/platforms/pseries/msi.c:410:35: error: 'structpci_dev' has no member named 'msi_cap'arch/powerpc/platforms/pseries/msi.c:411:35: error: 'structpci_dev' has no member named 'msi_cap'Quoted 9 lines
Quoted 3 lines
Introduced by commit
7b58b0edaa2(powerpc/pseries: Make 32-bit MSI quirk work on systems lacking firmware support).s/7b58b0edaa2/f1dd153121/
7b58b0edaa2is from my git branch and won't help much.Guenter
Guenter,
Quoted 8 lines
The original patch that introduced these changes (commit
f1dd153121
- powerpc/pseries: Make 32-bit MSI quirk work on systems lacking firmware support) depends on commite375b561(PCI: Cache MSI/MSI-X capability offsets in structpci_dev), however, the patch I sent to the stable mailing-list were backported to be applied over 3.9.y. I have already sent an email to Greg to let him know that the original patch breaks the ppc build and the backported version should be picked up instead.
Ok, I've now picked up the different patch. It's quite different from the upstream version, but I'll trust you here...
Normally I just go off of the git commit id, sorry I missed that you had tweaked this patch so much.
greg k-h
Greg Kroah-Hartman
maintainerQuoted 44 lines · Greg Kroah-Hartman
Quoted 34 lines · Kleber Sacilotto de Souza
Quoted 21 lines · Guenter Roeck
Quoted 20 lines · Guenter Roeck
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.9.6 release. There are 79 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 7 lines
Responses should be made by Thu Jun 13 19:50:17 UTC 2013. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.9.6-rc1.gzand the diffstat can be found below.
powerpc defconfig and as well as various other powerpc builds fail with:
arch/powerpc/platforms/pseries/msi.c: In function 'rtas_hack_32bit_msi_gen2':arch/powerpc/platforms/pseries/msi.c:408:34: error: 'structpci_dev' has no member named 'msi_cap'arch/powerpc/platforms/pseries/msi.c:410:35: error: 'structpci_dev' has no member named 'msi_cap'arch/powerpc/platforms/pseries/msi.c:411:35: error: 'structpci_dev' has no member named 'msi_cap'Quoted 9 lines
Quoted 3 lines
Introduced by commit
7b58b0edaa2(powerpc/pseries: Make 32-bit MSI quirk work on systems lacking firmware support).s/7b58b0edaa2/f1dd153121/
7b58b0edaa2is from my git branch and won't help much.Guenter
Guenter,
Quoted 8 lines
The original patch that introduced these changes (commit
f1dd153121
- powerpc/pseries: Make 32-bit MSI quirk work on systems lacking firmware support) depends on commite375b561(PCI: Cache MSI/MSI-X capability offsets in structpci_dev), however, the patch I sent to the stable mailing-list were backported to be applied over 3.9.y. I have already sent an email to Greg to let him know that the original patch breaks the ppc build and the backported version should be picked up instead.
Quoted 2 lines
Ok, I've now picked up the different patch. It's quite different from the upstream version, but I'll trust you here...
Sorry, was looking at the wrong patch, it's "obviously" a correct change, no worries, sorry for the noise.
greg k-h