Linux 4.2.7
Greg KH
maintainerI'm announcing the release of the 4.2.7 kernel.
All users of the 4.2 kernel series must upgrade.
The updated 4.2.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.2.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/devicetree/bindings/usb/dwc3.txt | 2 Documentation/filesystems/proc.txt | 5 Makefile | 2 arch/arm/boot/dts/imx27.dtsi | 16 +- arch/arm/boot/dts/omap5-uevm.dts | 66 +++++++-- arch/arm/boot/dts/sama5d4.dtsi | 8 - arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 8 - arch/arm/common/edma.c | 6 arch/arm/include/asm/irq.h | 5 arch/arm/mach-at91/pm_suspend.S | 2 arch/arm/mach-pxa/include/mach/pxa27x.h | 2 arch/arm/mach-pxa/pxa27x.c | 2 arch/arm/mach-tegra/board-paz00.c | 4 arch/arm/mm/dma-mapping.c | 7 + arch/arm64/include/asm/irq.h | 5 arch/arm64/include/asm/ptrace.h | 16 +- arch/arm64/kernel/vmlinux.lds.S | 5 arch/mips/ath79/setup.c | 2 arch/mips/include/asm/cdmm.h | 11 + arch/mips/kvm/emulate.c | 2 arch/mips/kvm/locore.S | 16 +- arch/mips/kvm/mips.c | 5 arch/mips/lantiq/clk.c | 17 ++ arch/s390/kvm/interrupt.c | 7 - arch/s390/kvm/kvm-s390.c | 10 + arch/s390/kvm/sigp.c | 8 - arch/tile/kernel/usb.c | 1 arch/x86/include/asm/i8259.h | 1 arch/x86/include/asm/kvm_emulate.h | 10 + arch/x86/include/uapi/asm/svm.h | 1 arch/x86/kernel/apic/vector.c | 6 arch/x86/kernel/cpu/common.c | 3 arch/x86/kernel/fpu/signal.c | 11 - arch/x86/kernel/fpu/xstate.c | 1 arch/x86/kernel/head_64.S | 8 + arch/x86/kernel/i8259.c | 29 +++- arch/x86/kernel/setup.c | 8 + arch/x86/kernel/verify_cpu.S | 12 + arch/x86/kvm/emulate.c | 35 +++-- arch/x86/kvm/lapic.c | 2 arch/x86/kvm/svm.c | 19 +- arch/x86/kvm/vmx.c | 8 - arch/x86/kvm/x86.c | 14 +- arch/x86/mm/mpx.c | 47 +++++- drivers/bluetooth/ath3k.c | 4 drivers/bluetooth/btusb.c | 2 drivers/clk/bcm/clk-iproc-pll.c | 13 - drivers/clk/versatile/clk-icst.c | 4 drivers/mfd/twl6040.c | 2 drivers/net/bonding/bond_main.c | 1 drivers/net/can/dev.c | 2 drivers/net/can/sja1000/sja1000.c | 3 drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 2 drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 8 + drivers/net/ethernet/freescale/fec_main.c | 10 - drivers/net/ethernet/marvell/mvneta.c | 10 + drivers/net/ethernet/mellanox/mlx4/cmd.c | 2 drivers/net/ethernet/mellanox/mlx4/eq.c | 2 drivers/net/ethernet/sfc/ef10.c | 4 drivers/net/ethernet/sfc/farch.c | 4 drivers/net/ethernet/sfc/net_driver.h | 2 drivers/net/ethernet/sfc/tx.c | 30 ++++ drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 7 - drivers/net/macvtap.c | 2 drivers/net/ppp/pppoe.c | 2 drivers/net/usb/qmi_wwan.c | 4 drivers/net/wireless/ath/ath10k/mac.c | 7 - drivers/net/wireless/iwlwifi/pcie/drv.c | 19 ++ drivers/net/wireless/iwlwifi/pcie/trans.c | 10 - drivers/net/wireless/mwifiex/debugfs.c | 14 +- drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 2 drivers/staging/rtl8712/usb_intf.c | 1 drivers/tty/mips_ejtag_fdc.c | 35 ----- drivers/tty/n_tty.c | 2 drivers/tty/tty_audit.c | 2 drivers/tty/tty_io.c | 4 drivers/tty/tty_ioctl.c | 4 drivers/usb/chipidea/ci_hdrc_imx.c | 131 ++++++++++++++++--- drivers/usb/chipidea/udc.c | 17 ++ drivers/usb/class/usblp.c | 2 drivers/usb/dwc3/core.c | 16 ++ drivers/usb/dwc3/core.h | 22 +++ drivers/usb/dwc3/dwc3-pci.c | 26 +++ drivers/usb/dwc3/gadget.c | 61 ++++++-- drivers/usb/dwc3/platform_data.h | 1 drivers/usb/gadget/udc/atmel_usba_udc.c | 2 drivers/usb/gadget/udc/net2280.c | 2 drivers/usb/host/ehci-orion.c | 3 drivers/usb/host/xhci.c | 10 + drivers/usb/musb/musb_core.c | 10 - drivers/usb/serial/option.c | 11 + drivers/usb/serial/qcserial.c | 94 ++++++++++--- drivers/usb/serial/ti_usb_3410_5052.c | 2 drivers/usb/serial/ti_usb_3410_5052.h | 4 drivers/xen/events/events_base.c | 5 fs/proc/array.c | 16 ++ fs/proc/base.c | 9 - include/linux/kvm_host.h | 11 + include/linux/tty.h | 6 include/net/inet_common.h | 3 include/net/ip_fib.h | 2 net/bluetooth/hidp/core.c | 14 ++ net/bluetooth/mgmt.c | 12 + net/core/dst.c | 2 net/ipv4/fib_frontend.c | 13 + net/ipv4/fib_semantics.c | 18 ++ net/ipv4/fib_trie.c | 2 net/ipv4/gre_offload.c | 3 net/ipv4/ipmr.c | 6 net/ipv4/sysctl_net_ipv4.c | 4 net/ipv4/tcp_output.c | 2 net/ipv6/addrconf.c | 1 net/ipv6/sit.c | 26 --- net/irda/irlmp.c | 2 net/mac80211/mlme.c | 21 ++- net/mac80211/trace.h | 10 - net/mac80211/util.c | 7 + net/netlink/af_netlink.c | 4 net/nfc/nci/hci.c | 90 +++++++++---- net/packet/af_packet.c | 80 +++++++---- net/rds/connection.c | 6 net/rds/tcp_recv.c | 11 + net/tipc/msg.c | 12 + net/tipc/udp_media.c | 5 net/wireless/nl80211.c | 12 - sound/usb/midi.c | 46 ++++++ sound/usb/quirks-table.h | 11 + sound/usb/quirks.c | 2 sound/usb/usbaudio.h | 1 129 files changed, 1165 insertions(+), 399 deletions(-)
Alban Bedel (1):
MIPS: ath79: Fix the DDR control initialization on ar71xx and ar934x
Aleksander Morgado (1):
USB: serial: option: add support for Novatel MiFi USB620L
Alexander Duyck (1):
fib_trie: leaf_walk_rcu should not compute key if key is less than pn->key
Andrei Otcheretianski (1):
mac80211: Fix local deauth while associating
Andrew Cooper (1):
x86/cpu: Fix SMAP check in PVOPS environments
Ani Sinha (1):
ipmr: fix possible race resulting from improper usage of IP_INC_STATS_BH() in preemptible context.
Arik Nemtsov (1):
mac80211: allow null chandef in tracing
Arnd Bergmann (2):
ARM: pxa: remove incorrect __init annotation on pxa27x_set_pwrmode staging/lustre: use jiffies for lp_last_query times
Ben McCauley (1):
usb: dwc3: gadget: let us set lower max_speed
Bjørn Mork (3):
qmi_wwan: add Sierra Wireless MC74xx/EM74xx
USB: qcserial: Fix support for HP lt4112 LTE/HSPA+ Gobi 4G Modem
USB: option: add XS Stick W100-2 from 4G Systems
Boris Ostrovsky (1):
xen/events: Always allocate legacy interrupts on PV guests
Borislav Petkov (1):
x86/cpu: Call verify_cpu() after having entered long mode too
Carol L Soto (1):
net/mlx4: Copy/set only sizeof struct mlx4_eqe bytes
Chen-Yu Tsai (1):
ARM: dts: sun6i: hummingbird: Fix VDD-CPU and VDD-GPU regulator names
Christophe Ricard (3):
NFC: nci: Fix incorrect data chaining when sending data
NFC: nci: Fix improper management of HCI return code
NFC: nci: extract pipe value using NCI_HCP_MSG_GET_PIPE
Clemens Ladisch (3):
ALSA: usb-audio: add packet size quirk for the Medeli DD305
ALSA: usb-audio: prevent CH345 multiport output SysEx corruption
ALSA: usb-audio: work around CH345 input SysEx corruption
Dan Carpenter (2):
irda: precedence bug in irlmp_seq_hb_idx()
mwifiex: fix mwifiex_rdeeprom_read()
Dave Hansen (3):
x86/fpu: Fix 32-bit signal frame handling
x86/mpx: Do proper get_user() when running 32-bit binaries on 64-bit kernels x86/mpx: Fix 32-bit address space calculation
David Herrmann (2):
netlink: fix locking around NETLINK_LIST_MEMBERSHIPS
Bluetooth: hidp: fix device disconnect on idle timeout
David Hildenbrand (5):
KVM: s390: SCA must not cross page boundaries
KVM: Provide function for VCPU lookup by id
KVM: s390: fix wrong lookup of VCPUs by array index
KVM: s390: avoid memory overwrites on emergency signal injection
KVM: s390: enable SIMD only when no VCPUs were created
David Woodhouse (1):
USB: ti_usb_3410_5052: Add Honeywell HGI80 ID
Dmitry Osipenko (1):
ARM: tegra: paz00: use con_id's to refer GPIO's in gpiod_lookup table
Dmitry Tunin (2):
Bluetooth: ath3k: Add new AR3012 0930:021c id
Bluetooth: ath3k: Add support of AR3012 0cf3:817b device
Douglas Gilbert (1):
usb: gadget: atmel_usba_udc: Expose correct device speed
Emmanuel Grumbach (1):
iwlwifi: pcie: fix (again) prepare card flow
Eric Dumazet (4):
ipv6: gre: support SIT encapsulation
sit: fix sit0 percpu double allocations
net: avoid NULL deref in inet_ctl_sock_destroy()
net: fix a race in dst_release()
Eric Northup (1):
KVM: x86: work around infinite loop in microcode when #AC is delivered
Fabio Estevam (1):
net: fec: Remove unneeded use of IS_ERR_VALUE() macro
Francesco Ruggeri (1):
packet: race condition in packet_bind
Greg Kroah-Hartman (1):
Linux 4.2.7
Guillaume Nault (1):
ppp: fix pppoe_dev deletion condition in pppoe_release()
Hauke Mehrtens (1):
MIPS: lantiq: add clk_round_rate()
Holger Busse (1):
ARM: at91/dt: corrections to i2c1 declaration to sama5d4
Huaitong Han (1):
x86/fpu: Fix get_xsave_addr() behavior under virtualization
Ingo Molnar (1):
fs/proc, core/debug: Don't expose absolute kernel addresses via wchan
James Hogan (5):
MIPS: CDMM: Add builtin_mips_cdmm_driver() macro
MIPS: KVM: Fix ASID restoration logic
MIPS: KVM: Fix CACHE immediate offset sign extension
MIPS: KVM: Uninit VCPU in vcpu_create error path
ttyFDC: Fix build problems due to use of module_{init,exit}
[email protected] (1):
mac80211: fix divide by zero when NOA update
Jason Wang (1):
macvtap: unbreak receiving of gro skb with frag list
Jay Vosburgh (1):
bonding: fix panic on non-ARPHRD_ETHER enslave failure
Jiri Slaby (1):
usblp: do not set TASK_INTERRUPTIBLE before lock
Johan Hedberg (1):
Bluetooth: Fix removing connection parameters when unpairing
Johannes Berg (1):
mac80211: fix driver RSSI event calculations
John Youn (6):
usb: dwc3: pci: Add the Synopsys HAPS AXI Product ID
usb: dwc3: pci: Add the PCI Product ID for Synopsys USB 3.1
usb: dwc3: Support Synopsys USB 3.1 IP
usb: dwc3: pci: Add platform data for Synopsys HAPS
usb: dwc3: Add dis_enblslpm_quirk
usb: dwc3: pci: Set enblslpm quirk for Synopsys platforms
Jon Paul Maloy (2):
tipc: allow non-linear first fragment buffer
tipc: linearize arriving NAME_DISTR and LINK_PROTO buffers
Jonas Gorski (1):
usb: ehci-orion: fix probe for !GENERIC_PHY
Julian Anastasov (2):
ipv4: fix to not remove local route on link down
ipv4: update RTNH_F_LINKDOWN flag on UP event
Jurgen Kramer (1):
ALSA: usb: Add native DSD support for Aune X1S
Krzysztof Mazur (1):
x86/setup: Fix low identity map for >= 2GB kernel range
Larry Finger (1):
staging: rtl8712: Add device ID for Sitecom WLA2100
Laszlo Ersek (1):
KVM: x86: obey KVM_X86_QUIRK_CD_NW_CLEARED in kvm_set_cr0()
Lendacky, Thomas (2):
amd-xgbe: Use wmb before updating current descriptor count
amd-xgbe: Fix race between access of desc and desc index
Li Jun (1):
usb: chipidea: otg: gadget module load and unload support
Linus Walleij (1):
clk: versatile-icst: fix memory leak
Maciej S. Szmigiero (1):
net: fec: normalize return value of pm_runtime_get_sync() in MDIO write
Marcin Wojtas (1):
net: mvneta: fix error path for building skb
Marek Szyprowski (2):
ARM: 8426/1: dma-mapping: add missing range check in dma_mmap()
ARM: 8427/1: dma-mapping: add support for offset parameter in dma_mmap()
Marek Vasut (1):
can: Use correct type in sizeof() in nla_put()
Mark Rutland (1):
arm64: page-align sections for DEBUG_RODATA
Martin Habets (1):
sfc: push partner queue for skb->xmit_more
Maxime Ripard (1):
net: mvneta: Fix CPU_MAP registers initialisation
Mian Yousaf Kaukab (1):
usb: gadget: net2280: restore ep_cfg after defect7374 workaround
Mirza Krak (1):
can: sja1000: clear interrupts on start
Ola Olsson (1):
nl80211: Fix potential memory leak from parse_acl_data
Oren Givon (1):
iwlwifi: Add new PCI IDs for the 8260 series
Paolo Bonzini (3):
kvm: x86: zero EFER on INIT
KVM: x86: allow RSM from 64-bit mode
x86/setup: Extend low identity map to cover whole kernel range
Patrick Doyle (1):
ARM: at91: pm: at91_pm_suspend_in_sram() must be 8-byte aligned
Peter Chen (2):
ARM: dts: imx27.dtsi: change the clock information for usb
usb: chipidea: imx: refine clock operations to adapt for all platforms
Peter Hurley (2):
tty: audit: Fix audit source
tty: Fix tty_send_xchar() lock order inversion
Peter Ujfalusi (1):
ARM: common: edma: Fix channel parameter for irq callbacks
Petr Štetiar (1):
USB: qcserial: Add support for Quectel EC20 Mini PCIe module
Phil Reid (1):
stmmac: Correctly report PTP capabilities.
Radim Krčmář (3):
kvm: x86: set KVM_REQ_EVENT when updating IRR
KVM: x86: add read_phys to x86_emulate_ops
KVM: x86: handle SMBASE as physical address in RSM
Rajkumar Manoharan (1):
ath10k: fix invalid NSS for 4x4 devices
Rajmohan Mani (1):
xhci: Workaround to get Intel xHCI reset working more reliably
Renato Westphal (1):
tcp: remove improper preemption check in tcp_xmit_probe_skb()
Robin Murphy (1):
arm64: Fix compat register mappings
Sabrina Dubroca (1):
ipv6: clean up dev_snmp6 proc entry when we fail to initialize inet6_dev
Sasha Levin (1):
RDS: verify the underlying transport exists before creating a connection
Simran Rai (1):
clk: iproc: Fix PLL output frequency calculation
Sowmini Varadhan (1):
RDS-TCP: Recover correctly from pskb_pull()/pksb_trim() failure in rds_tcp_data_recv
Sudip Mukherjee (1):
tile: fix build failure
Tony Lindgren (2):
ARM: dts: Fix WLAN regression on omap5-uevm
mfd: twl6040: Fix deferred probe handling for clk32k
Uwe Kleine-König (1):
usb: musb: core: fix order of arguments to ulpi write callback
Ville Syrjälä (1):
Revert "usb: dwc3: gadget: drop unnecessary loop when cleaning up TRBs"
Vitaly Kuznetsov (1):
x86/irq: Probe for PIC presence before allocating descs for legacy IRQs
Vivek Natarajan (1):
ath10k: use station's current operating mode from assoc request
WANG Cong (1):
ipv4: disable BH when changing ip local port range
Greg KH
maintainerDocumentation/devicetree/bindings/usb/dwc3.txt +2 -0
@@ -35,6 +35,8 @@ Optional properties: LTSSM during USB3 Compliance mode. - snps,dis_u3_susphy_quirk: when set core will disable USB3 suspend phy. - snps,dis_u2_susphy_quirk: when set core will disable USB2 suspend phy. + - snps,dis_enblslpm_quirk: when set clears the enblslpm in GUSB2PHYCFG, + disabling the suspend signal to the PHY. - snps,is-utmi-l1-suspend: true when DWC3 asserts output signal utmi_l1_suspend_n, false when asserts utmi_sleep_n - snps,hird-threshold: HIRD threshold
Documentation/filesystems/proc.txt +3 -2
@@ -140,7 +140,8 @@ Table 1-1: Process specific entries in /proc stat Process status statm Process memory status information status Process status in human readable form - wchan If CONFIG_KALLSYMS is set, a pre-decoded wchan + wchan Present with CONFIG_KALLSYMS=y: it shows the kernel function + symbol the task is blocked in - or "0" if not blocked. pagemap Page table stack Report full stack trace, enable via CONFIG_STACKTRACE smaps a extension based on maps, showing the memory consumption of
@@ -310,7 +311,7 @@ Table 1-4: Contents of the stat files (as of 2.6.30-rc7) blocked bitmap of blocked signals sigign bitmap of ignored signals sigcatch bitmap of caught signals - wchan address where process went to sleep + 0 (place holder, used to be the wchan address, use /proc/PID/wchan instead) 0 (place holder) 0 (place holder) exit_signal signal to send to parent thread on exit
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 2 -SUBLEVEL = 6 +SUBLEVEL = 7 EXTRAVERSION = NAME = Hurr durr I'ma sheep
arch/arm/boot/dts/imx27.dtsi +12 -4
@@ -477,7 +477,10 @@ compatible = "fsl,imx27-usb"; reg = <0x10024000 0x200>; interrupts = <56>; - clocks = <&clks IMX27_CLK_USB_IPG_GATE>; + clocks = <&clks IMX27_CLK_USB_IPG_GATE>, + <&clks IMX27_CLK_USB_AHB_GATE>, + <&clks IMX27_CLK_USB_DIV>; + clock-names = "ipg", "ahb", "per"; fsl,usbmisc = <&usbmisc 0>; status = "disabled"; };
@@ -486,7 +489,10 @@ compatible = "fsl,imx27-usb"; reg = <0x10024200 0x200>; interrupts = <54>; - clocks = <&clks IMX27_CLK_USB_IPG_GATE>; + clocks = <&clks IMX27_CLK_USB_IPG_GATE>, + <&clks IMX27_CLK_USB_AHB_GATE>, + <&clks IMX27_CLK_USB_DIV>; + clock-names = "ipg", "ahb", "per"; fsl,usbmisc = <&usbmisc 1>; dr_mode = "host"; status = "disabled";
@@ -496,7 +502,10 @@ compatible = "fsl,imx27-usb"; reg = <0x10024400 0x200>; interrupts = <55>; - clocks = <&clks IMX27_CLK_USB_IPG_GATE>; + clocks = <&clks IMX27_CLK_USB_IPG_GATE>, + <&clks IMX27_CLK_USB_AHB_GATE>, + <&clks IMX27_CLK_USB_DIV>; + clock-names = "ipg", "ahb", "per"; fsl,usbmisc = <&usbmisc 2>; dr_mode = "host"; status = "disabled";
@@ -506,7 +515,6 @@ #index-cells = <1>; compatible = "fsl,imx27-usbmisc"; reg = <0x10024600 0x200>; - clocks = <&clks IMX27_CLK_USB_AHB_GATE>; }; sahara2: sahara@10025000 {
arch/arm/boot/dts/omap5-uevm.dts +55 -11
98 lines not on this page · raw message
arch/arm/boot/dts/sama5d4.dtsi +4 -4
@@ -939,11 +939,11 @@ reg = <0xf8018000 0x4000>; interrupts = <33 IRQ_TYPE_LEVEL_HIGH 6>; dmas = <&dma1 - (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)) - AT91_XDMAC_DT_PERID(4)>, + (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) + | AT91_XDMAC_DT_PERID(4))>, <&dma1 - (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)) - AT91_XDMAC_DT_PERID(5)>; + (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) + | AT91_XDMAC_DT_PERID(5))>; dma-names = "tx", "rx"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c1>;
arch/arm/boot/dts/sun6i-a31-hummingbird.dts +4 -4
@@ -184,18 +184,18 @@ regulator-name = "vcc-3v0"; }; - vdd_cpu: dcdc2 { + vdd_gpu: dcdc2 { regulator-always-on; regulator-min-microvolt = <700000>; regulator-max-microvolt = <1320000>; - regulator-name = "vdd-cpu"; + regulator-name = "vdd-gpu"; }; - vdd_gpu: dcdc3 { + vdd_cpu: dcdc3 { regulator-always-on; regulator-min-microvolt = <700000>; regulator-max-microvolt = <1320000>; - regulator-name = "vdd-gpu"; + regulator-name = "vdd-cpu"; }; vdd_sys_dll: dcdc4 {
arch/arm/common/edma.c +4 -2
@@ -406,7 +406,8 @@ static irqreturn_t dma_irq_handler(int irq, void *data) BIT(slot));if (edma_cc[ctlr]->intr_data[channel].callback) edma_cc[ctlr]->intr_data[channel].callback ( - channel,EDMA_DMA_COMPLETE , +EDMA_CTLR_CHAN (ctlr, channel), +EDMA_DMA_COMPLETE , edma_cc[ctlr]->intr_data[channel].data); } }while (sh_ipr);
@@ -460,7 +461,8 @@ static irqreturn_t dma_ccerr_handler(int irq, void *data)if (edma_cc[ctlr]->intr_data[k]. callback) { edma_cc[ctlr]->intr_data[k]. -callback (k, +callback ( +EDMA_CTLR_CHAN (ctlr, k),EDMA_DMA_CC_ERROR , edma_cc[ctlr]->intr_data [k].data);
arch/arm/include/asm/irq.h +5 -0
@@ -35,6 +35,11 @@ extern void (*handle_arch_irq)(struct pt_regs *);extern void set_handle_irq (void (*handle_irq)(struct pt_regs *));#endif +static inline int nr_legacy_irqs (void ) +{ +return NR_IRQS_LEGACY ; +} +#endif #endif
arch/arm/mach-at91/pm_suspend.S +2 -0
@@ -80,6 +80,8 @@ tmp2 .req r5 * @r2: base address of second SDRAM Controller or 0 if not present * @r3: pm information */ +/* at91_pm_suspend_in_sram must be 8-byte aligned per the requirements of fncpy() */ + .align 3 ENTRY(at91_pm_suspend_in_sram) /* Save registers on stack */ stmfd sp!, {r4 - r12, lr}
arch/arm/mach-pxa/include/mach/pxa27x.h +1 -1
@@ -19,7 +19,7 @@#define ARB_CORE_PARK (1<<24)/* Be parked with core when idle */ #define ARB_LOCK_FLAG (1<<23)/* Only Locking masters gain access to the bus */ -extern int __init pxa27x_set_pwrmode (unsigned int mode); +extern int pxa27x_set_pwrmode (unsigned int mode);extern void pxa27x_cpu_pm_enter (suspend_state_t state);#endif /* __MACH_PXA27x_H */
arch/arm/mach-pxa/pxa27x.c +1 -1
@@ -84,7 +84,7 @@ EXPORT_SYMBOL_GPL(pxa27x_configure_ac97reset);*/ static unsigned int pwrmode =PWRMODE_SLEEP ; -int __init pxa27x_set_pwrmode (unsigned int mode) +int pxa27x_set_pwrmode (unsigned int mode) {switch (mode) {case PWRMODE_SLEEP :
arch/arm/mach-tegra/board-paz00.c +2 -2
@@ -39,8 +39,8 @@ static struct platform_device wifi_rfkill_device = {static struct gpiod_lookup_table wifi_gpio_lookup = { .dev_id ="rfkill_gpio" , .table = { -GPIO_LOOKUP_IDX ("tegra-gpio" ,25 ,NULL ,0 ,0 ), -GPIO_LOOKUP_IDX ("tegra-gpio" ,85 ,NULL ,1 ,0 ), +GPIO_LOOKUP ("tegra-gpio" ,25 ,"reset" ,0 ), +GPIO_LOOKUP ("tegra-gpio" ,85 ,"shutdown" ,0 ), { }, }, };
arch/arm/mm/dma-mapping.c +7 -0
@@ -1413,12 +1413,19 @@ static int arm_iommu_mmap_attrs(struct device *dev, struct vm_area_struct *vma,unsigned long uaddr = vma->vm_start;unsigned long usize = vma->vm_end - vma->vm_start;struct page **pages =__iommu_get_pages (cpu_addr, attrs); +unsigned long nr_pages =PAGE_ALIGN (size) >>PAGE_SHIFT ; +unsigned long off = vma->vm_pgoff; vma->vm_page_prot =__get_dma_pgprot (attrs, vma->vm_page_prot);if (!pages)return -ENXIO ; +if (off >= nr_pages || (usize >>PAGE_SHIFT ) > nr_pages - off) +return -ENXIO ; + + pages += off; + do { int ret = vm_insert_page(vma, uaddr, *pages++); if (ret) {
arch/arm64/include/asm/irq.h +5 -0
@@ -21,4 +21,9 @@ static inline void acpi_irq_init(void) }#define acpi_irq_init acpi_irq_init +static inline int nr_legacy_irqs (void ) +{ +return 0 ; +} +#endif
arch/arm64/include/asm/ptrace.h +8 -8
@@ -83,14 +83,14 @@#define compat_sp regs[13]#define compat_lr regs[14]#define compat_sp_hyp regs[15] -#define compat_sp_irq regs[16] -#define compat_lr_irq regs[17] -#define compat_sp_svc regs[18] -#define compat_lr_svc regs[19] -#define compat_sp_abt regs[20] -#define compat_lr_abt regs[21] -#define compat_sp_und regs[22] -#define compat_lr_und regs[23] +#define compat_lr_irq regs[16] +#define compat_sp_irq regs[17] +#define compat_lr_svc regs[18] +#define compat_sp_svc regs[19] +#define compat_lr_abt regs[20] +#define compat_sp_abt regs[21] +#define compat_lr_und regs[22] +#define compat_sp_und regs[23]#define compat_r8_fiq regs[24]#define compat_r9_fiq regs[25]#define compat_r10_fiq regs[26]
arch/arm64/kernel/vmlinux.lds.S +4 -1
@@ -60,9 +60,12 @@ PECOFF_FILE_ALIGNMENT = 0x200; #define PECOFF_EDATA_PADDING #endif -#ifdef CONFIG_DEBUG_ALIGN_RODATA +#if defined(CONFIG_DEBUG_ALIGN_RODATA) #define ALIGN_DEBUG_RO . = ALIGN(1<<SECTION_SHIFT); #define ALIGN_DEBUG_RO_MIN(min) ALIGN_DEBUG_RO +#elif defined(CONFIG_DEBUG_RODATA) +#define ALIGN_DEBUG_RO . = ALIGN(1<<PAGE_SHIFT); +#define ALIGN_DEBUG_RO_MIN(min) ALIGN_DEBUG_RO #else #define ALIGN_DEBUG_RO #define ALIGN_DEBUG_RO_MIN(min) . = ALIGN(min);
arch/mips/ath79/setup.c +1 -1
@@ -216,9 +216,9 @@ void __init plat_mem_setup(void) AR71XX_RESET_SIZE); ath79_pll_base =ioremap_nocache (AR71XX_PLL_BASE ,AR71XX_PLL_SIZE ); +ath79_detect_sys_type ();ath79_ddr_ctrl_init (); -ath79_detect_sys_type ();if (mips_machtype !=ATH79_MACH_GENERIC_OF )detect_memory_region (0 ,ATH79_MEM_SIZE_MIN ,ATH79_MEM_SIZE_MAX );
arch/mips/include/asm/cdmm.h +11 -0
@@ -84,6 +84,17 @@ void mips_cdmm_driver_unregister(struct mips_cdmm_driver *);module_driver (__mips_cdmm_driver, mips_cdmm_driver_register, \ mips_cdmm_driver_unregister) +/* +* builtin_mips_cdmm_driver() - Helper macro for drivers that don't do anything +* special in init and have no exit. This eliminates some boilerplate. Each +* driver may only use this macro once, and calling it replaces device_initcall +* (or in some cases, the legacy __initcall). This is meant to be a direct +* parallel of module_mips_cdmm_driver() above but without the __exit stuff that +* is not used for builtin cases. + */ +#define builtin_mips_cdmm_driver (__mips_cdmm_driver) \ + builtin_driver(__mips_cdmm_driver, mips_cdmm_driver_register) +/* drivers/tty/mips_ejtag_fdc.c */ #ifdef CONFIG_MIPS_EJTAG_FDC_EARLYCON
arch/mips/kvm/emulate.c +1 -1
@@ -1581,7 +1581,7 @@ enum emulation_result kvm_mips_emulate_cache(uint32_t inst, uint32_t *opc, base = (inst >>21 ) &0x1f ; op_inst = (inst >>16 ) &0x1f ; - offset = inst &0xffff ; + offset = (int16_t )inst; cache = (inst >>16 ) &0x3 ; op = (inst >>18 ) &0x7 ;
arch/mips/kvm/locore.S +10 -6
@@ -165,9 +165,11 @@ FEXPORT(__kvm_mips_vcpu_run) FEXPORT(__kvm_mips_load_asid) /* Set the ASID for the Guest Kernel */ - INT_SLL t0, t0, 1 /* with kseg0 @ 0x40000000, kernel */ - /* addresses shift to 0x80000000 */ - bltz t0, 1f /* If kernel */ + PTR_L t0, VCPU_COP0(k1) + LONG_L t0, COP0_STATUS(t0) + andi t0, KSU_USER | ST0_ERL | ST0_EXL + xori t0, KSU_USER + bnez t0, 1f /* If kernel */ INT_ADDIU t1, k1, VCPU_GUEST_KERNEL_ASID /* (BD) */ INT_ADDIU t1, k1, VCPU_GUEST_USER_ASID /* else user */ 1:
@@ -482,9 +484,11 @@ __kvm_mips_return_to_guest: mtc0 t0, CP0_EPC /* Set the ASID for the Guest Kernel */ - INT_SLL t0, t0, 1 /* with kseg0 @ 0x40000000, kernel */ - /* addresses shift to 0x80000000 */ - bltz t0, 1f /* If kernel */ + PTR_L t0, VCPU_COP0(k1) + LONG_L t0, COP0_STATUS(t0) + andi t0, KSU_USER | ST0_ERL | ST0_EXL + xori t0, KSU_USER + bnez t0, 1f /* If kernel */ INT_ADDIU t1, k1, VCPU_GUEST_KERNEL_ASID /* (BD) */ INT_ADDIU t1, k1, VCPU_GUEST_USER_ASID /* else user */ 1:
arch/mips/kvm/mips.c +4 -1
@@ -278,7 +278,7 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id)if (!gebase) { err = -ENOMEM ; - goto out_free_cpu; + goto out_uninit_cpu; }kvm_debug ("Allocated %d bytes for KVM Exception Handlers @ %p\n" ,ALIGN (size,PAGE_SIZE ), gebase);
@@ -342,6 +342,9 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id) out_free_gebase:kfree (gebase); +out_uninit_cpu: +kvm_vcpu_uninit (vcpu); + out_free_cpu:kfree (vcpu);
arch/mips/lantiq/clk.c +17 -0
@@ -99,6 +99,23 @@ int clk_set_rate(struct clk *clk, unsigned long rate) }EXPORT_SYMBOL (clk_set_rate); +long clk_round_rate (struct clk *clk,unsigned long rate) +{ +if (unlikely (!clk_good (clk))) +return 0 ; +if (clk->rates && *clk->rates) { +unsigned long *r = clk->rates; + +while (*r && (*r != rate)) + r++; +if (!*r) { +return clk->rate; + } + } +return rate; +} +EXPORT_SYMBOL (clk_round_rate); +int clk_enable (struct clk *clk) {if (unlikely (!clk_good (clk)))
arch/s390/kvm/interrupt.c +5 -2
@@ -1051,8 +1051,7 @@ static int __inject_extcall(struct kvm_vcpu *vcpu, struct kvm_s390_irq *irq) src_id, 0, 2);/* sending vcpu invalid */ -if (src_id >=KVM_MAX_VCPUS || -kvm_get_vcpu (vcpu->kvm, src_id) ==NULL ) +if (kvm_get_vcpu_by_id (vcpu->kvm, src_id) ==NULL )return -EINVAL ;if (sclp.has_sigpif)
@@ -1131,6 +1130,10 @@ static int __inject_sigp_emergency(struct kvm_vcpu *vcpu,trace_kvm_s390_inject_vcpu (vcpu->vcpu_id,KVM_S390_INT_EMERGENCY , irq->u.emerg.code,0 ,2 ); +/* sending vcpu invalid */ +if (kvm_get_vcpu_by_id (vcpu->kvm, irq->u.emerg.code) ==NULL ) +return -EINVAL ; +set_bit (irq->u.emerg.code, li->sigp_emerg_pending);set_bit (IRQ_PEND_EXT_EMERGENCY , &li->pending_irqs);atomic_set_mask (CPUSTAT_EXT_INT , li->cpuflags);
arch/s390/kvm/kvm-s390.c +8 -2
@@ -289,12 +289,16 @@ static int kvm_vm_ioctl_enable_cap(struct kvm *kvm, struct kvm_enable_cap *cap) r =0 ;break ;case KVM_CAP_S390_VECTOR_REGISTERS : -if (MACHINE_HAS_VX ) { +mutex_lock (&kvm->lock); +if (atomic_read (&kvm->online_vcpus)) { + r = -EBUSY ; + }else if (MACHINE_HAS_VX ) {set_kvm_facility (kvm->arch.model.fac->mask,129 );set_kvm_facility (kvm->arch.model.fac->list,129 ); r =0 ; }else r = -EINVAL ; +mutex_unlock (&kvm->lock);break ;case KVM_CAP_S390_USER_STSI : kvm->arch.user_stsi =1 ;
@@ -1037,7 +1041,9 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)if (!kvm->arch.sca) goto out_err;spin_lock (&kvm_lock); - sca_offset = (sca_offset +16 ) &0x7f0 ; + sca_offset +=16 ; +if (sca_offset +sizeof (struct sca_block ) >PAGE_SIZE ) + sca_offset =0 ; kvm->arch.sca = (struct sca_block *) ((char *) kvm->arch.sca + sca_offset);spin_unlock (&kvm_lock);
arch/s390/kvm/sigp.c +2 -6
@@ -294,12 +294,8 @@ static int handle_sigp_dst(struct kvm_vcpu *vcpu, u8 order_code, u16 cpu_addr, u32 parameter, u64 *status_reg) { int rc; -struct kvm_vcpu *dst_vcpu; +struct kvm_vcpu *dst_vcpu =kvm_get_vcpu_by_id (vcpu->kvm, cpu_addr); -if (cpu_addr >=KVM_MAX_VCPUS ) -return SIGP_CC_NOT_OPERATIONAL ; - - dst_vcpu =kvm_get_vcpu (vcpu->kvm, cpu_addr);if (!dst_vcpu)return SIGP_CC_NOT_OPERATIONAL ;
@@ -481,7 +477,7 @@ int kvm_s390_handle_sigp_pei(struct kvm_vcpu *vcpu)trace_kvm_s390_handle_sigp_pei (vcpu, order_code, cpu_addr);if (order_code ==SIGP_EXTERNAL_CALL ) { - dest_vcpu =kvm_get_vcpu (vcpu->kvm, cpu_addr); + dest_vcpu =kvm_get_vcpu_by_id (vcpu->kvm, cpu_addr);BUG_ON (dest_vcpu ==NULL );kvm_s390_vcpu_wakeup (dest_vcpu);
arch/tile/kernel/usb.c +1 -0
@@ -22,6 +22,7 @@#include <linux/platform_device.h> #include <linux/usb/tilegx.h> #include <linux/init.h> +#include <linux/module.h> #include <linux/types.h> static u64 ehci_dmamask =DMA_BIT_MASK (32 );
arch/x86/include/asm/i8259.h +1 -0
@@ -60,6 +60,7 @@ struct legacy_pic {void (*mask_all)(void );void (*restore_mask)(void );void (*init)(int auto_eoi); +int (*probe)(void );int (*irq_pending)(unsigned int irq);void (*make_irq)(unsigned int irq); };
arch/x86/include/asm/kvm_emulate.h +10 -0
@@ -112,6 +112,16 @@ struct x86_emulate_ops { struct x86_exception *fault);/* +* read_phys: Read bytes of standard (non-emulated/special) memory. +* Used for descriptor reading. +* @addr: [IN ] Physical address from which to read. +* @val: [OUT] Value read from memory. +* @bytes: [IN ] Number of bytes to read from memory. +*/ +int (*read_phys)(struct x86_emulate_ctxt *ctxt,unsigned long addr, +void *val,unsigned int bytes); + +/* * write_std: Write bytes of standard (non-emulated/special) memory. * Used for descriptor writing. * @addr: [IN ] Linear address to which to write.
arch/x86/include/uapi/asm/svm.h +1 -0
@@ -100,6 +100,7 @@ { SVM_EXIT_EXCP_BASE + UD_VECTOR, "UD excp" }, \ { SVM_EXIT_EXCP_BASE + PF_VECTOR, "PF excp" }, \ { SVM_EXIT_EXCP_BASE + NM_VECTOR, "NM excp" }, \ + { SVM_EXIT_EXCP_BASE + AC_VECTOR, "AC excp" }, \ { SVM_EXIT_EXCP_BASE + MC_VECTOR, "MC excp" }, \ { SVM_EXIT_INTR, "interrupt" }, \ { SVM_EXIT_NMI, "nmi" }, \
arch/x86/kernel/apic/vector.c +5 -1
@@ -360,7 +360,11 @@ int __init arch_probe_nr_irqs(void)if (nr < nr_irqs) nr_irqs = nr; -return nr_legacy_irqs (); +/* +* We don't know if PIC is present at this point so we need to do +* probe() to get the right number of legacy IRQs. +*/ +return legacy_pic->probe (); }#ifdef CONFIG_X86_IO_APIC
arch/x86/kernel/cpu/common.c +1 -2
@@ -272,10 +272,9 @@ __setup("nosmap", setup_disable_smap); static __always_inline void setup_smap(struct cpuinfo_x86 *c) { -unsigned long eflags; +unsigned long eflags =native_save_fl ();/* This should have been cleared long ago */ -raw_local_save_flags (eflags);BUG_ON (eflags &X86_EFLAGS_AC );if (cpu_has (c,X86_FEATURE_SMAP )) {
arch/x86/kernel/fpu/signal.c +5 -6
@@ -385,20 +385,19 @@ fpu__alloc_mathframe(unsigned long sp, int ia32_frame,*/ void fpu__init_prepare_fx_sw_frame (void ) { -int fsave_header_size =sizeof (struct fregs_state );int size = xstate_size +FP_XSTATE_MAGIC2_SIZE ; -if (config_enabled (CONFIG_X86_32 )) - size += fsave_header_size; - fx_sw_reserved.magic1 =FP_XSTATE_MAGIC1 ; fx_sw_reserved.extended_size = size; fx_sw_reserved.xfeatures = xfeatures_mask; fx_sw_reserved.xstate_size = xstate_size; -if (config_enabled (CONFIG_IA32_EMULATION )) { +if (config_enabled (CONFIG_IA32_EMULATION ) || +config_enabled (CONFIG_X86_32 )) { +int fsave_header_size =sizeof (struct fregs_state ); + fx_sw_reserved_ia32 = fx_sw_reserved; - fx_sw_reserved_ia32.extended_size += fsave_header_size; + fx_sw_reserved_ia32.extended_size = size + fsave_header_size; } }
arch/x86/kernel/fpu/xstate.c +0 -1
@@ -402,7 +402,6 @@ void *get_xsave_addr(struct xregs_state *xsave, int xstate_feature)if (!boot_cpu_has (X86_FEATURE_XSAVE ))return NULL ; - xsave = ¤t->thread.fpu.state.xsave;/* * We should not ever be requesting features that we * have not enabled. Remember that pcntxt_mask is
arch/x86/kernel/head_64.S +8 -0
@@ -65,6 +65,9 @@ startup_64: * tables and then reload them. */ + /* Sanitize CPU configuration */ + call verify_cpu + /* * Compute the delta between the address I am compiled to run at and the * address I am actually running at.
@@ -174,6 +177,9 @@ ENTRY(secondary_startup_64) * after the boot processor executes this code. */ + /* Sanitize CPU configuration */ + call verify_cpu + movq $(init_level4_pgt - __START_KERNEL_map), %rax 1:
@@ -288,6 +294,8 @@ ENTRY(secondary_startup_64) pushq %rax # target address in negative space lretq +#include "verify_cpu.S" + #ifdef CONFIG_HOTPLUG_CPU /* * Boot CPU0 entry point. It's called from play_dead(). Everything has been set
arch/x86/kernel/i8259.c +21 -8
@@ -295,16 +295,11 @@ static void unmask_8259A(void)raw_spin_unlock_irqrestore (&i8259A_lock, flags); } -static void init_8259A (int auto_eoi) +static int probe_8259A (void ) {unsigned long flags;unsigned char probe_val = ~(1 <<PIC_CASCADE_IR );unsigned char new_val; - - i8259A_auto_eoi = auto_eoi; - -raw_spin_lock_irqsave (&i8259A_lock, flags); -/* * Check to see if we have a PIC. * Mask all except the cascade and read
@@ -312,16 +307,28 @@ static void init_8259A(int auto_eoi)* have a PIC, we will read 0xff as opposed to the * value we wrote. */ +raw_spin_lock_irqsave (&i8259A_lock, flags); +outb (0xff ,PIC_SLAVE_IMR );/* mask all of 8259A-2 */ outb (probe_val,PIC_MASTER_IMR ); new_val =inb (PIC_MASTER_IMR );if (new_val != probe_val) {printk (KERN_INFO "Using NULL legacy PIC\n" ); legacy_pic = &null_legacy_pic; -raw_spin_unlock_irqrestore (&i8259A_lock, flags); -return ; } +raw_spin_unlock_irqrestore (&i8259A_lock, flags); +return nr_legacy_irqs (); +} + +static void init_8259A (int auto_eoi) +{ +unsigned long flags; + + i8259A_auto_eoi = auto_eoi; + +raw_spin_lock_irqsave (&i8259A_lock, flags); +outb (0xff ,PIC_MASTER_IMR );/* mask all of 8259A-1 */ /*
@@ -379,6 +386,10 @@ static int legacy_pic_irq_pending_noop(unsigned int irq) {return 0 ; } +static int legacy_pic_probe (void ) +{ +return 0 ; +}struct legacy_pic null_legacy_pic = { .nr_legacy_irqs =0 ,
@@ -388,6 +399,7 @@ struct legacy_pic null_legacy_pic = { .mask_all = legacy_pic_noop, .restore_mask = legacy_pic_noop, .init = legacy_pic_int_noop, + .probe = legacy_pic_probe, .irq_pending = legacy_pic_irq_pending_noop, .make_irq = legacy_pic_uint_noop, };
@@ -400,6 +412,7 @@ struct legacy_pic default_legacy_pic = { .mask_all = mask_8259A, .restore_mask = unmask_8259A, .init = init_8259A, + .probe = probe_8259A, .irq_pending = i8259A_irq_pending, .make_irq = make_8259A_irq, };
arch/x86/kernel/setup.c +8 -0
@@ -1198,6 +1198,14 @@ void __init setup_arch(char **cmdline_p)clone_pgd_range (initial_page_table +KERNEL_PGD_BOUNDARY , swapper_pg_dir +KERNEL_PGD_BOUNDARY ,KERNEL_PGD_PTRS ); + +/* +* sync back low identity map too. It is used for example +* in the 32-bit EFI stub. +*/ +clone_pgd_range (initial_page_table, + swapper_pg_dir +KERNEL_PGD_BOUNDARY , +min (KERNEL_PGD_PTRS ,KERNEL_PGD_BOUNDARY ));#endif tboot_probe ();
arch/x86/kernel/verify_cpu.S +7 -5
@@ -34,10 +34,11 @@ #include <asm/msr-index.h> verify_cpu: - pushfl # Save caller passed flags - pushl $0 # Kill any dangerous flags - popfl + pushf # Save caller passed flags + push $0 # Kill any dangerous flags + popf +#ifndef __x86_64__ pushfl # standard way to check for cpuid popl %eax movl %eax,%ebx
@@ -48,6 +49,7 @@ verify_cpu: popl %eax cmpl %eax,%ebx jz verify_cpu_no_longmode # cpu has no cpuid +#endif movl $0x0,%eax # See if cpuid 1 is implemented cpuid
@@ -130,10 +132,10 @@ verify_cpu_sse_test: jmp verify_cpu_sse_test # try again verify_cpu_no_longmode: - popfl # Restore caller passed flags + popf # Restore caller passed flags movl $1,%eax ret verify_cpu_sse_ok: - popfl # Restore caller passed flags + popf # Restore caller passed flags xorl %eax, %eax ret
arch/x86/kvm/emulate.c +27 -8
@@ -2272,8 +2272,8 @@ static int emulator_has_longmode(struct x86_emulate_ctxt *ctxt)#define GET_SMSTATE (type, smbase, offset) \ ({ \ type __val; \ - int r = ctxt->ops->read_std(ctxt, smbase + offset, &__val, \ - sizeof(__val), NULL); \ + int r = ctxt->ops->read_phys(ctxt, smbase + offset, &__val, \ + sizeof(__val)); \ if (r != X86EMUL_CONTINUE) \ return X86EMUL_UNHANDLEABLE; \ __val; \
@@ -2484,17 +2484,36 @@ static int em_rsm(struct x86_emulate_ctxt *ctxt)/* * Get back to real mode, to prepare a safe state in which to load -* CR0/CR3/CR4/EFER. Also this will ensure that addresses passed -* to read_std/write_std are not virtual. -* -* CR4.PCIDE must be zero, because it is a 64-bit mode only feature. +* CR0/CR3/CR4/EFER. It's all a bit more complicated if the vCPU +* supports long mode. */ + cr4 = ctxt->ops->get_cr (ctxt,4 ); +if (emulator_has_longmode (ctxt)) { +struct desc_struct cs_desc; + +/* Zero CR4.PCIDE before CR0.PG. */ +if (cr4 &X86_CR4_PCIDE ) { + ctxt->ops->set_cr (ctxt,4 , cr4 & ~X86_CR4_PCIDE ); + cr4 &= ~X86_CR4_PCIDE ; + } + +/* A 32-bit code segment is required to clear EFER.LMA. */ +memset (&cs_desc,0 ,sizeof (cs_desc)); + cs_desc.type =0xb ; + cs_desc.s = cs_desc.g = cs_desc.p =1 ; + ctxt->ops->set_segment (ctxt,0 , &cs_desc,0 ,VCPU_SREG_CS ); + } + +/* For the 64-bit case, this will clear EFER.LMA. */ cr0 = ctxt->ops->get_cr (ctxt,0 );if (cr0 &X86_CR0_PE ) ctxt->ops->set_cr (ctxt,0 , cr0 & ~(X86_CR0_PG |X86_CR0_PE )); - cr4 = ctxt->ops->get_cr (ctxt,4 ); + +/* Now clear CR4.PAE (which must be done before clearing EFER.LME). */ if (cr4 &X86_CR4_PAE ) ctxt->ops->set_cr (ctxt,4 , cr4 & ~X86_CR4_PAE ); + +/* And finally go back to 32-bit mode. */ efer =0 ; ctxt->ops->set_msr (ctxt,MSR_EFER , efer);
@@ -4455,7 +4474,7 @@ static const struct opcode twobyte_table[256] = {F (DstMem | SrcReg | Src2CL | ModRM, em_shld),N ,N ,/* 0xA8 - 0xAF */ I (Stack | Src2GS, em_push_sreg),I (Stack | Src2GS, em_pop_sreg), -II (No64 | EmulateOnUD | ImplicitOps, em_rsm, rsm), +II (EmulateOnUD | ImplicitOps, em_rsm, rsm),F (DstMem | SrcReg | ModRM | BitOp | Lock | PageTable, em_bts),F (DstMem | SrcReg | Src2ImmByte | ModRM, em_shrd), F(DstMem | SrcReg | Src2CL | ModRM, em_shrd),
arch/x86/kvm/lapic.c +2 -0
@@ -348,6 +348,8 @@ void kvm_apic_update_irr(struct kvm_vcpu *vcpu, u32 *pir)struct kvm_lapic *apic = vcpu->arch.apic;__kvm_apic_update_irr (pir, apic->regs); + +kvm_make_request (KVM_REQ_EVENT , vcpu); }EXPORT_SYMBOL_GPL (kvm_apic_update_irr);
arch/x86/kvm/svm.c +13 -6
@@ -1085,7 +1085,7 @@ static u64 svm_compute_tsc_offset(struct kvm_vcpu *vcpu, u64 target_tsc)return target_tsc - tsc; } -static void init_vmcb (struct vcpu_svm *svm,bool init_event) +static void init_vmcb (struct vcpu_svm *svm) {struct vmcb_control_area *control = &svm->vmcb->control;struct vmcb_save_area *save = &svm->vmcb->save;
@@ -1106,6 +1106,7 @@ static void init_vmcb(struct vcpu_svm *svm, bool init_event)set_exception_intercept (svm,PF_VECTOR );set_exception_intercept (svm,UD_VECTOR );set_exception_intercept (svm,MC_VECTOR ); +set_exception_intercept (svm,AC_VECTOR );set_intercept (svm,INTERCEPT_INTR );set_intercept (svm,INTERCEPT_NMI );
@@ -1156,8 +1157,7 @@ static void init_vmcb(struct vcpu_svm *svm, bool init_event)init_sys_seg (&save->ldtr,SEG_TYPE_LDT );init_sys_seg (&save->tr,SEG_TYPE_BUSY_TSS16 ); -if (!init_event) -svm_set_efer (&svm->vcpu,0 ); +svm_set_efer (&svm->vcpu,0 ); save->dr6 =0xffff0ff0 ;kvm_set_rflags (&svm->vcpu,2 ); save->rip =0x0000fff0 ;
@@ -1211,7 +1211,7 @@ static void svm_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event)if (kvm_vcpu_is_reset_bsp (&svm->vcpu)) svm->vcpu.arch.apic_base |=MSR_IA32_APICBASE_BSP ; } -init_vmcb (svm, init_event); +init_vmcb (svm);kvm_cpuid (vcpu, &eax, &dummy, &dummy, &dummy);kvm_register_write (vcpu,VCPU_REGS_RDX , eax);
@@ -1267,7 +1267,7 @@ static struct kvm_vcpu *svm_create_vcpu(struct kvm *kvm, unsigned int id)clear_page (svm->vmcb); svm->vmcb_pa =page_to_pfn (page) <<PAGE_SHIFT ; svm->asid_generation =0 ; -init_vmcb (svm, false); +init_vmcb (svm);svm_init_osvw (&svm->vcpu);
@@ -1795,6 +1795,12 @@ static int ud_interception(struct vcpu_svm *svm)return 1 ; } +static int ac_interception (struct vcpu_svm *svm) +{ +kvm_queue_exception_e (&svm->vcpu,AC_VECTOR ,0 ); +return 1 ; +} +static void svm_fpu_activate (struct kvm_vcpu *vcpu) {struct vcpu_svm *svm =to_svm (vcpu);
@@ -1889,7 +1895,7 @@ static int shutdown_interception(struct vcpu_svm *svm)* so reinitialize it. */ clear_page (svm->vmcb); -init_vmcb (svm, false); +init_vmcb (svm); kvm_run->exit_reason =KVM_EXIT_SHUTDOWN ;return 0 ;
@@ -3369,6 +3375,7 @@ static int (*const svm_exit_handlers[])(struct vcpu_svm *svm) = { [SVM_EXIT_EXCP_BASE + PF_VECTOR] = pf_interception, [SVM_EXIT_EXCP_BASE + NM_VECTOR] = nm_interception, [SVM_EXIT_EXCP_BASE + MC_VECTOR] = mc_interception, + [SVM_EXIT_EXCP_BASE + AC_VECTOR] = ac_interception, [SVM_EXIT_INTR] = intr_interception, [SVM_EXIT_NMI] = nmi_interception, [SVM_EXIT_SMI] = nop_on_interception,
arch/x86/kvm/vmx.c +5 -3
@@ -1567,7 +1567,7 @@ static void update_exception_bitmap(struct kvm_vcpu *vcpu)u32 eb; eb = (1u <<PF_VECTOR ) | (1u <<UD_VECTOR ) | (1u <<MC_VECTOR ) | - (1u <<NM_VECTOR ) | (1u <<DB_VECTOR ); + (1u <<NM_VECTOR ) | (1u <<DB_VECTOR ) | (1u <<AC_VECTOR );if ((vcpu->guest_debug & (KVM_GUESTDBG_ENABLE |KVM_GUESTDBG_USE_SW_BP )) == (KVM_GUESTDBG_ENABLE |KVM_GUESTDBG_USE_SW_BP ))
@@ -4780,8 +4780,7 @@ static void vmx_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event)vmx_set_cr0 (vcpu, cr0);/* enter rmode */ vmx->vcpu.arch.cr0 = cr0;vmx_set_cr4 (vcpu,0 ); -if (!init_event) -vmx_set_efer (vcpu,0 ); +vmx_set_efer (vcpu,0 );vmx_fpu_activate (vcpu);update_exception_bitmap (vcpu);
@@ -5118,6 +5117,9 @@ static int handle_exception(struct kvm_vcpu *vcpu)return handle_rmode_exception (vcpu, ex_no, error_code);switch (ex_no) { +case AC_VECTOR : +kvm_queue_exception_e (vcpu,AC_VECTOR , error_code); +return 1 ;case DB_VECTOR : dr6 =vmcs_readl (EXIT_QUALIFICATION ); if (!(vcpu->guest_debug &
arch/x86/kvm/x86.c +13 -1
@@ -621,7 +621,9 @@ int kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)if ((cr0 ^ old_cr0) & update_bits)kvm_mmu_reset_context (vcpu); -if ((cr0 ^ old_cr0) &X86_CR0_CD ) +if (((cr0 ^ old_cr0) &X86_CR0_CD ) && +kvm_arch_has_noncoherent_dma (vcpu->kvm) && + !kvm_check_has_quirk (vcpu->kvm,KVM_X86_QUIRK_CD_NW_CLEARED ))kvm_zap_gfn_range (vcpu->kvm,0 , ~0ULL );return 0 ;
@@ -4260,6 +4262,15 @@ static int kvm_read_guest_virt_system(struct x86_emulate_ctxt *ctxt,return kvm_read_guest_virt_helper (addr, val, bytes, vcpu,0 , exception); } +static int kvm_read_guest_phys_system (struct x86_emulate_ctxt *ctxt, +unsigned long addr,void *val,unsigned int bytes) +{ +struct kvm_vcpu *vcpu =emul_to_vcpu (ctxt); +int r =kvm_vcpu_read_guest (vcpu, addr, val, bytes); + +return r <0 ?X86EMUL_IO_NEEDED :X86EMUL_CONTINUE ; +} + int kvm_write_guest_virt_system(struct x86_emulate_ctxt *ctxt, gva_t addr, void *val, unsigned int bytes,
@@ -4995,6 +5006,7 @@ static const struct x86_emulate_ops emulate_ops = { .write_gpr = emulator_write_gpr, .read_std = kvm_read_guest_virt_system, .write_std = kvm_write_guest_virt_system, + .read_phys = kvm_read_guest_phys_system, .fetch = kvm_fetch_guest_virt, .read_emulated = emulator_read_emulated, .write_emulated = emulator_write_emulated,
arch/x86/mm/mpx.c +41 -6
65 lines not on this page · raw message
drivers/bluetooth/ath3k.c +4 -0
@@ -93,6 +93,7 @@ static const struct usb_device_id ath3k_table[] = { { USB_DEVICE(0x04CA, 0x300f) }, { USB_DEVICE(0x04CA, 0x3010) }, { USB_DEVICE(0x0930, 0x0219) }, + { USB_DEVICE(0x0930, 0x021c) }, { USB_DEVICE(0x0930, 0x0220) }, { USB_DEVICE(0x0930, 0x0227) }, { USB_DEVICE(0x0b05, 0x17d0) },
@@ -104,6 +105,7 @@ static const struct usb_device_id ath3k_table[] = { { USB_DEVICE(0x0CF3, 0x311F) }, { USB_DEVICE(0x0cf3, 0x3121) }, { USB_DEVICE(0x0CF3, 0x817a) }, + { USB_DEVICE(0x0CF3, 0x817b) }, { USB_DEVICE(0x0cf3, 0xe003) }, { USB_DEVICE(0x0CF3, 0xE004) }, { USB_DEVICE(0x0CF3, 0xE005) },
@@ -153,6 +155,7 @@ static const struct usb_device_id ath3k_blist_tbl[] = { { USB_DEVICE(0x04ca, 0x300f), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x3010), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, + { USB_DEVICE(0x0930, 0x021c), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0220), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0227), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0b05, 0x17d0), .driver_info = BTUSB_ATH3012 },
@@ -164,6 +167,7 @@ static const struct usb_device_id ath3k_blist_tbl[] = { { USB_DEVICE(0x0cf3, 0x311F), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0cf3, 0x3121), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0CF3, 0x817a), .driver_info = BTUSB_ATH3012 }, + { USB_DEVICE(0x0CF3, 0x817b), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0cf3, 0xe005), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0cf3, 0xe006), .driver_info = BTUSB_ATH3012 },
drivers/bluetooth/btusb.c +2 -0
@@ -192,6 +192,7 @@ static const struct usb_device_id blacklist_table[] = { { USB_DEVICE(0x04ca, 0x300f), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x3010), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, + { USB_DEVICE(0x0930, 0x021c), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0220), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0930, 0x0227), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0b05, 0x17d0), .driver_info = BTUSB_ATH3012 },
@@ -203,6 +204,7 @@ static const struct usb_device_id blacklist_table[] = { { USB_DEVICE(0x0cf3, 0x311f), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0cf3, 0x3121), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0cf3, 0x817a), .driver_info = BTUSB_ATH3012 }, + { USB_DEVICE(0x0cf3, 0x817b), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0cf3, 0xe003), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0cf3, 0xe005), .driver_info = BTUSB_ATH3012 },
drivers/clk/bcm/clk-iproc-pll.c +5 -8
@@ -345,8 +345,8 @@ static unsigned long iproc_pll_recalc_rate(struct clk_hw *hw,struct iproc_pll *pll = clk->pll;const struct iproc_pll_ctrl *ctrl = pll->ctrl;u32 val; -u64 ndiv; -unsigned int ndiv_int, ndiv_frac, pdiv; +u64 ndiv, ndiv_int, ndiv_frac; +unsigned int pdiv;if (parent_rate ==0 )return 0 ;
@@ -366,22 +366,19 @@ static unsigned long iproc_pll_recalc_rate(struct clk_hw *hw, val =readl (pll->pll_base + ctrl->ndiv_int.offset); ndiv_int = (val >> ctrl->ndiv_int.shift) &bit_mask (ctrl->ndiv_int.width); - ndiv = (u64 )ndiv_int << ctrl->ndiv_int.shift; + ndiv = ndiv_int <<20 ;if (ctrl->flags &IPROC_CLK_PLL_HAS_NDIV_FRAC ) { val =readl (pll->pll_base + ctrl->ndiv_frac.offset); ndiv_frac = (val >> ctrl->ndiv_frac.shift) &bit_mask (ctrl->ndiv_frac.width); - -if (ndiv_frac !=0 ) - ndiv = ((u64 )ndiv_int << ctrl->ndiv_int.shift) | - ndiv_frac; + ndiv += ndiv_frac; } val =readl (pll->pll_base + ctrl->pdiv.offset); pdiv = (val >> ctrl->pdiv.shift) &bit_mask (ctrl->pdiv.width); - clk->rate = (ndiv * parent_rate) >> ctrl->ndiv_int.shift; + clk->rate = (ndiv * parent_rate) >>20 ;if (pdiv ==0 ) clk->rate *=2 ;
drivers/clk/versatile/clk-icst.c +3 -1
@@ -156,8 +156,10 @@ struct clk *icst_clk_register(struct device *dev, icst->lockreg = base + desc->lock_offset; clk =clk_register (dev, &icst->hw); -if (IS_ERR (clk)) +if (IS_ERR (clk)) { +kfree (pclone);kfree (icst); + }return clk; }
drivers/mfd/twl6040.c +2 -0
@@ -647,6 +647,8 @@ static int twl6040_probe(struct i2c_client *client, twl6040->clk32k =devm_clk_get (&client->dev,"clk32k" );if (IS_ERR (twl6040->clk32k)) { +if (PTR_ERR (twl6040->clk32k) == -EPROBE_DEFER ) +return -EPROBE_DEFER ;dev_info (&client->dev,"clk32k is not handled\n" ); twl6040->clk32k =NULL ; }
drivers/net/bonding/bond_main.c +1 -0
@@ -1751,6 +1751,7 @@ err_undo_flags: slave_dev->dev_addr))eth_hw_addr_random (bond_dev);if (bond_dev->type !=ARPHRD_ETHER ) { +dev_close (bond_dev);ether_setup (bond_dev); bond_dev->flags |=IFF_MASTER ; bond_dev->priv_flags &= ~IFF_TX_SKB_SHARING ;
drivers/net/can/dev.c +1 -1
@@ -915,7 +915,7 @@ static int can_fill_info(struct sk_buff *skb, const struct net_device *dev)nla_put (skb,IFLA_CAN_BITTIMING_CONST , sizeof(*priv->bittiming_const), priv->bittiming_const)) || -nla_put (skb,IFLA_CAN_CLOCK ,sizeof (cm), &priv->clock) || +nla_put (skb,IFLA_CAN_CLOCK ,sizeof (priv->clock), &priv->clock) ||nla_put_u32 (skb,IFLA_CAN_STATE , state) ||nla_put (skb,IFLA_CAN_CTRLMODE ,sizeof (cm), &cm) || nla_put_u32(skb, IFLA_CAN_RESTART_MS, priv->restart_ms) ||
drivers/net/can/sja1000/sja1000.c +3 -0
@@ -218,6 +218,9 @@ static void sja1000_start(struct net_device *dev) priv->write_reg (priv,SJA1000_RXERR ,0x0 ); priv->read_reg (priv,SJA1000_ECC ); +/* clear interrupt flags */ + priv->read_reg (priv,SJA1000_IR ); +/* leave reset mode */ set_normal_mode (dev); }
drivers/net/ethernet/amd/xgbe/xgbe-dev.c +1 -1
@@ -1595,7 +1595,7 @@ static void xgbe_dev_xmit(struct xgbe_channel *channel) packet->rdesc_count, 1);/* Make sure ownership is written to the descriptor */ -dma_wmb (); +smp_wmb (); ring->cur = cur_index +1 ; if (!packet->skb->xmit_more ||
drivers/net/ethernet/amd/xgbe/xgbe-drv.c +7 -1
@@ -1807,6 +1807,7 @@ static int xgbe_tx_poll(struct xgbe_channel *channel)struct netdev_queue *txq;int processed =0 ;unsigned int tx_packets =0 , tx_bytes =0 ; +unsigned int cur;DBGPR ("-->xgbe_tx_poll\n" );
@@ -1814,10 +1815,15 @@ static int xgbe_tx_poll(struct xgbe_channel *channel)if (!ring)return 0 ; + cur = ring->cur; + +/* Be sure we get ring->cur before accessing descriptor data */ +smp_rmb (); + txq =netdev_get_tx_queue (netdev, channel->queue_index);while ((processed <XGBE_TX_DESC_MAX_PROC ) && - (ring->dirty != ring->cur)) { + (ring->dirty != cur)) { rdata =XGBE_GET_DESC_DATA (ring, ring->dirty); rdesc = rdata->rdesc;
drivers/net/ethernet/freescale/fec_main.c +6 -4
@@ -1775,7 +1775,7 @@ static int fec_enet_mdio_read(struct mii_bus *bus, int mii_id, int regnum)int ret =0 ; ret =pm_runtime_get_sync (dev); -if (IS_ERR_VALUE (ret)) +if (ret <0 )return ret; fep->mii_timeout =0 ;
@@ -1811,11 +1811,13 @@ static int fec_enet_mdio_write(struct mii_bus *bus, int mii_id, int regnum,struct fec_enet_private *fep = bus->priv;struct device *dev = &fep->pdev->dev;unsigned long time_left; -int ret =0 ; +int ret; ret =pm_runtime_get_sync (dev); -if (IS_ERR_VALUE (ret)) +if (ret <0 )return ret; +else + ret =0 ; fep->mii_timeout =0 ;reinit_completion (&fep->mdio_done);
@@ -2866,7 +2868,7 @@ fec_enet_open(struct net_device *ndev)int ret; ret =pm_runtime_get_sync (&fep->pdev->dev); -if (IS_ERR_VALUE (ret)) +if (ret <0 )return ret;pinctrl_pm_select_default_state (&fep->pdev->dev);
drivers/net/ethernet/marvell/mvneta.c +7 -3
@@ -949,7 +949,7 @@ static void mvneta_defaults_set(struct mvneta_port *pp)/* Set CPU queue access map - all CPUs have access to all RX * queues and to all TX queues */ -for (cpu =0 ; cpu <CONFIG_NR_CPUS ; cpu++) +for_each_present_cpu (cpu)mvreg_write (pp,MVNETA_CPU_MAP (cpu), (MVNETA_CPU_RXQ_ACCESS_ALL_MASK |MVNETA_CPU_TXQ_ACCESS_ALL_MASK ));
@@ -1533,12 +1533,16 @@ static int mvneta_rx(struct mvneta_port *pp, int rx_todo, } skb =build_skb (data, pp->frag_size >PAGE_SIZE ?0 : pp->frag_size); -if (!skb) - goto err_drop_frame; +/* After refill old buffer has to be unmapped regardless +* the skb is successfully built or not. +*/ dma_unmap_single (dev->dev.parent, phys_addr,MVNETA_RX_BUF_SIZE (pp->pkt_size),DMA_FROM_DEVICE ); +if (!skb) + goto err_drop_frame; + rcvd_pkts++; rcvd_bytes += rx_bytes;
drivers/net/ethernet/mellanox/mlx4/cmd.c +1 -1
@@ -2398,7 +2398,7 @@ int mlx4_multi_func_init(struct mlx4_dev *dev) } } -memset (&priv->mfunc.master.cmd_eqe,0 , dev->caps.eqe_size); +memset (&priv->mfunc.master.cmd_eqe,0 ,sizeof (struct mlx4_eqe )); priv->mfunc.master.cmd_eqe.type =MLX4_EVENT_TYPE_CMD ;INIT_WORK (&priv->mfunc.master.comm_work, mlx4_master_comm_channel);
drivers/net/ethernet/mellanox/mlx4/eq.c +1 -1
@@ -196,7 +196,7 @@ static void slave_event(struct mlx4_dev *dev, u8 slave, struct mlx4_eqe *eqe)return ; } -memcpy (s_eqe, eqe, dev->caps.eqe_size -1 ); +memcpy (s_eqe, eqe,sizeof (struct mlx4_eqe ) -1 ); s_eqe->slave_id = slave;/* ensure all information is written before setting the ownersip bit */ dma_wmb ();
drivers/net/ethernet/sfc/ef10.c +3 -1
@@ -1809,7 +1809,9 @@ static void efx_ef10_tx_write(struct efx_tx_queue *tx_queue)unsigned int write_ptr;efx_qword_t *txd; -BUG_ON (tx_queue->write_count == tx_queue->insert_count); + tx_queue->xmit_more_available = false; +if (unlikely (tx_queue->write_count == tx_queue->insert_count)) +return ; do { write_ptr = tx_queue->write_count & tx_queue->ptr_mask;
drivers/net/ethernet/sfc/farch.c +3 -1
@@ -321,7 +321,9 @@ void efx_farch_tx_write(struct efx_tx_queue *tx_queue)unsigned write_ptr;unsigned old_write_count = tx_queue->write_count; -BUG_ON (tx_queue->write_count == tx_queue->insert_count); + tx_queue->xmit_more_available = false; +if (unlikely (tx_queue->write_count == tx_queue->insert_count)) +return ; do { write_ptr = tx_queue->write_count & tx_queue->ptr_mask;
drivers/net/ethernet/sfc/net_driver.h +2 -0
@@ -219,6 +219,7 @@ struct efx_tx_buffer {* @tso_packets: Number of packets via the TSO xmit path * @pushes: Number of times the TX push feature has been used * @pio_packets: Number of times the TX PIO feature has been used +* @xmit_more_available: Are any packets waiting to be pushed to the NIC * @empty_read_count: If the completion path has seen the queue as empty * and the transmission path has not yet checked this, the value of * @read_count bitwise-added to %EFX_EMPTY_COUNT_VALID; otherwise 0.
@@ -253,6 +254,7 @@ struct efx_tx_queue {unsigned int tso_packets;unsigned int pushes;unsigned int pio_packets; +bool xmit_more_available;/* Statistics to supplement MAC stats */ unsigned long tx_packets;
drivers/net/ethernet/sfc/tx.c +28 -2
@@ -431,8 +431,20 @@ finish_packet:efx_tx_maybe_stop_queue (tx_queue);/* Pass off to hardware */ -if (!skb->xmit_more ||netif_xmit_stopped (tx_queue->core_txq)) +if (!skb->xmit_more ||netif_xmit_stopped (tx_queue->core_txq)) { +struct efx_tx_queue *txq2 =efx_tx_queue_partner (tx_queue); + +/* There could be packets left on the partner queue if those +* SKBs had skb->xmit_more set. If we do not push those they +* could be left for a long time and cause a netdev watchdog. +*/ +if (txq2->xmit_more_available) +efx_nic_push_buffers (txq2); +efx_nic_push_buffers (tx_queue); + }else { + tx_queue->xmit_more_available = skb->xmit_more; + } tx_queue->tx_packets++;
@@ -722,6 +734,7 @@ void efx_init_tx_queue(struct efx_tx_queue *tx_queue) tx_queue->read_count =0 ; tx_queue->old_read_count =0 ; tx_queue->empty_read_count =0 |EFX_EMPTY_COUNT_VALID ; + tx_queue->xmit_more_available = false;/* Set up TX descriptor ring */ efx_nic_init_tx (tx_queue);
@@ -747,6 +760,7 @@ void efx_fini_tx_queue(struct efx_tx_queue *tx_queue) ++tx_queue->read_count; } + tx_queue->xmit_more_available = false;netdev_tx_reset_queue (tx_queue->core_txq); }
@@ -1302,8 +1316,20 @@ static int efx_enqueue_skb_tso(struct efx_tx_queue *tx_queue,efx_tx_maybe_stop_queue (tx_queue);/* Pass off to hardware */ -if (!skb->xmit_more ||netif_xmit_stopped (tx_queue->core_txq)) +if (!skb->xmit_more ||netif_xmit_stopped (tx_queue->core_txq)) { +struct efx_tx_queue *txq2 =efx_tx_queue_partner (tx_queue); + +/* There could be packets left on the partner queue if those +* SKBs had skb->xmit_more set. If we do not push those they +* could be left for a long time and cause a netdev watchdog. +*/ +if (txq2->xmit_more_available) +efx_nic_push_buffers (txq2); +efx_nic_push_buffers (tx_queue); + }else { + tx_queue->xmit_more_available = skb->xmit_more; + } tx_queue->tso_bursts++;return NETDEV_TX_OK ;
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +5 -2
@@ -721,10 +721,13 @@ static int stmmac_get_ts_info(struct net_device *dev, {struct stmmac_priv *priv =netdev_priv (dev); -if ((priv->hwts_tx_en) && (priv->hwts_rx_en)) { +if ((priv->dma_cap.time_stamp || priv->dma_cap.atime_stamp)) { - info->so_timestamping =SOF_TIMESTAMPING_TX_HARDWARE | + info->so_timestamping =SOF_TIMESTAMPING_TX_SOFTWARE | +SOF_TIMESTAMPING_TX_HARDWARE | +SOF_TIMESTAMPING_RX_SOFTWARE |SOF_TIMESTAMPING_RX_HARDWARE | +SOF_TIMESTAMPING_SOFTWARE |SOF_TIMESTAMPING_RAW_HARDWARE ;if (priv->ptp_clock)
drivers/net/macvtap.c +1 -1
@@ -137,7 +137,7 @@ static const struct proto_ops macvtap_socket_ops;#define TUN_OFFLOADS (NETIF_F_HW_CSUM | NETIF_F_TSO_ECN | NETIF_F_TSO | \ NETIF_F_TSO6 | NETIF_F_UFO)#define RX_OFFLOADS (NETIF_F_GRO | NETIF_F_LRO) -#define TAP_FEATURES (NETIF_F_GSO | NETIF_F_SG) +#define TAP_FEATURES (NETIF_F_GSO | NETIF_F_SG | NETIF_F_FRAGLIST)static struct macvlan_dev *macvtap_get_vlan_rcu (const struct net_device *dev) {
drivers/net/ppp/pppoe.c +1 -1
@@ -589,7 +589,7 @@ static int pppoe_release(struct socket *sock) po =pppox_sk (sk); -if (sk->sk_state & (PPPOX_CONNECTED |PPPOX_BOUND |PPPOX_ZOMBIE )) { +if (po->pppoe_dev) {dev_put (po->pppoe_dev); po->pppoe_dev =NULL ; }
drivers/net/usb/qmi_wwan.c +4 -0
@@ -765,6 +765,10 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x1199, 0x9056, 8)}, /* Sierra Wireless Modem */ {QMI_FIXED_INTF(0x1199, 0x9057, 8)}, {QMI_FIXED_INTF(0x1199, 0x9061, 8)}, /* Sierra Wireless Modem */ + {QMI_FIXED_INTF(0x1199, 0x9070, 8)}, /* Sierra Wireless MC74xx/EM74xx */ + {QMI_FIXED_INTF(0x1199, 0x9070, 10)}, /* Sierra Wireless MC74xx/EM74xx */ + {QMI_FIXED_INTF(0x1199, 0x9071, 8)}, /* Sierra Wireless MC74xx/EM74xx */ + {QMI_FIXED_INTF(0x1199, 0x9071, 10)}, /* Sierra Wireless MC74xx/EM74xx */ {QMI_FIXED_INTF(0x1bbb, 0x011e, 4)}, /* Telekom Speedstick LTE II (Alcatel One Touch L100V LTE) */ {QMI_FIXED_INTF(0x1bbb, 0x0203, 2)}, /* Alcatel L800MA */ {QMI_FIXED_INTF(0x2357, 0x0201, 4)}, /* TP-LINK HSUPA Modem MA180 */
drivers/net/wireless/ath/ath10k/mac.c +4 -3
@@ -2070,7 +2070,8 @@ static void ath10k_peer_assoc_h_ht(struct ath10k *ar,enum ieee80211_band band;const u8 *ht_mcs_mask;const u16 *vht_mcs_mask; -int i, n, max_nss; +int i, n; +u8 max_nss;u32 stbc;lockdep_assert_held (&ar->conf_mutex);
@@ -2155,7 +2156,7 @@ static void ath10k_peer_assoc_h_ht(struct ath10k *ar, arg->peer_ht_rates.rates[i] = i; }else { arg->peer_ht_rates.num_rates = n; - arg->peer_num_spatial_streams = max_nss; + arg->peer_num_spatial_streams =min (sta->rx_nss, max_nss); } ath10k_dbg(ar, ATH10K_DBG_MAC, "mac ht peer %pM mcs cnt %d nss %d\n",
@@ -4021,7 +4022,7 @@ static int ath10k_config(struct ieee80211_hw *hw, u32 changed)static u32 get_nss_from_chainmask (u16 chain_mask) { -if ((chain_mask &0x15 ) ==0x15 ) +if ((chain_mask &0xf ) ==0xf )return 4 ;else if ((chain_mask &0x7 ) ==0x7 )return 3 ;
drivers/net/wireless/iwlwifi/pcie/drv.c +18 -1
@@ -423,14 +423,21 @@ static const struct pci_device_id iwl_hw_card_ids[] = {/* 8000 Series */ {IWL_PCI_DEVICE(0x24F3, 0x0010, iwl8260_2ac_cfg)}, {IWL_PCI_DEVICE(0x24F3, 0x1010, iwl8260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x24F3, 0x0130, iwl8260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x24F3, 0x1130, iwl8260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x24F3, 0x0132, iwl8260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x24F3, 0x1132, iwl8260_2ac_cfg)}, {IWL_PCI_DEVICE(0x24F3, 0x0110, iwl8260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x24F3, 0x01F0, iwl8260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x24F3, 0x0012, iwl8260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x24F3, 0x1012, iwl8260_2ac_cfg)}, {IWL_PCI_DEVICE(0x24F3, 0x1110, iwl8260_2ac_cfg)}, {IWL_PCI_DEVICE(0x24F3, 0x0050, iwl8260_2ac_cfg)}, {IWL_PCI_DEVICE(0x24F3, 0x0250, iwl8260_2ac_cfg)}, {IWL_PCI_DEVICE(0x24F3, 0x1050, iwl8260_2ac_cfg)}, {IWL_PCI_DEVICE(0x24F3, 0x0150, iwl8260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x24F3, 0x1150, iwl8260_2ac_cfg)}, {IWL_PCI_DEVICE(0x24F4, 0x0030, iwl8260_2ac_cfg)}, - {IWL_PCI_DEVICE(0x24F4, 0x1130, iwl8260_2ac_cfg)}, {IWL_PCI_DEVICE(0x24F4, 0x1030, iwl8260_2ac_cfg)}, {IWL_PCI_DEVICE(0x24F3, 0xC010, iwl8260_2ac_cfg)}, {IWL_PCI_DEVICE(0x24F3, 0xC110, iwl8260_2ac_cfg)},
@@ -438,18 +445,28 @@ static const struct pci_device_id iwl_hw_card_ids[] = { {IWL_PCI_DEVICE(0x24F3, 0xC050, iwl8260_2ac_cfg)}, {IWL_PCI_DEVICE(0x24F3, 0xD050, iwl8260_2ac_cfg)}, {IWL_PCI_DEVICE(0x24F3, 0x8010, iwl8260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x24F3, 0x8110, iwl8260_2ac_cfg)}, {IWL_PCI_DEVICE(0x24F3, 0x9010, iwl8260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x24F3, 0x9110, iwl8260_2ac_cfg)}, {IWL_PCI_DEVICE(0x24F4, 0x8030, iwl8260_2ac_cfg)}, {IWL_PCI_DEVICE(0x24F4, 0x9030, iwl8260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x24F3, 0x8130, iwl8260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x24F3, 0x9130, iwl8260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x24F3, 0x8132, iwl8260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x24F3, 0x9132, iwl8260_2ac_cfg)}, {IWL_PCI_DEVICE(0x24F3, 0x8050, iwl8260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x24F3, 0x8150, iwl8260_2ac_cfg)}, {IWL_PCI_DEVICE(0x24F3, 0x9050, iwl8260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x24F3, 0x9150, iwl8260_2ac_cfg)}, {IWL_PCI_DEVICE(0x24F3, 0x0004, iwl8260_2n_cfg)}, + {IWL_PCI_DEVICE(0x24F3, 0x0044, iwl8260_2n_cfg)}, {IWL_PCI_DEVICE(0x24F5, 0x0010, iwl4165_2ac_cfg)}, {IWL_PCI_DEVICE(0x24F6, 0x0030, iwl4165_2ac_cfg)}, {IWL_PCI_DEVICE(0x24F3, 0x0810, iwl8260_2ac_cfg)}, {IWL_PCI_DEVICE(0x24F3, 0x0910, iwl8260_2ac_cfg)}, {IWL_PCI_DEVICE(0x24F3, 0x0850, iwl8260_2ac_cfg)}, {IWL_PCI_DEVICE(0x24F3, 0x0950, iwl8260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x24F3, 0x0930, iwl8260_2ac_cfg)}, #endif /* CONFIG_IWLMVM */ {0}
drivers/net/wireless/iwlwifi/pcie/trans.c +2 -8
@@ -592,10 +592,8 @@ static int iwl_pcie_prepare_card_hw(struct iwl_trans *trans) do { ret = iwl_pcie_set_hw_ready(trans); - if (ret >= 0) { - ret = 0; - goto out; - } + if (ret >= 0) + return 0; usleep_range(200, 1000); t += 200;
@@ -605,10 +603,6 @@ static int iwl_pcie_prepare_card_hw(struct iwl_trans *trans)IWL_ERR (trans,"Couldn't prepare the card\n" ); -out: -iwl_clear_bit (trans,CSR_DBG_LINK_PWR_MGMT_REG , -CSR_RESET_LINK_PWR_MGMT_DISABLED ); -return ret; }
drivers/net/wireless/mwifiex/debugfs.c +7 -7
@@ -731,7 +731,7 @@ mwifiex_rdeeprom_read(struct file *file, char __user *ubuf, (struct mwifiex_private *) file->private_data;unsigned long addr =get_zeroed_page (GFP_KERNEL );char *buf = (char *) addr; -int pos =0 , ret =0 , i; +int pos, ret, i;u8 value[MAX_EEPROM_DATA ];if (!buf)
@@ -739,7 +739,7 @@ mwifiex_rdeeprom_read(struct file *file, char __user *ubuf,if (saved_offset ==-1 ) {/* No command has been given */ - pos +=snprintf (buf,PAGE_SIZE ,"0" ); + pos =snprintf (buf,PAGE_SIZE ,"0" ); goto done; }
@@ -748,17 +748,17 @@ mwifiex_rdeeprom_read(struct file *file, char __user *ubuf, (u16) saved_bytes, value);if (ret) { ret = -EINVAL ; - goto done; + goto out_free; } - pos +=snprintf (buf,PAGE_SIZE ,"%d %d " , saved_offset, saved_bytes); + pos =snprintf (buf,PAGE_SIZE ,"%d %d " , saved_offset, saved_bytes);for (i =0 ; i < saved_bytes; i++) - pos +=snprintf (buf +strlen (buf),PAGE_SIZE ,"%d " , value[i]); - - ret =simple_read_from_buffer (ubuf, count, ppos, buf, pos); + pos +=scnprintf (buf + pos,PAGE_SIZE - pos,"%d " , value[i]); done: + ret =simple_read_from_buffer (ubuf, count, ppos, buf, pos); +out_free:free_page (addr);return ret; }
drivers/staging/lustre/include/linux/lnet/lib-lnet.h +1 -1
@@ -680,7 +680,7 @@ void lnet_debug_peer(lnet_nid_t nid);static inline void lnet_peer_set_alive (lnet_peer_t *lp) { - lp->lp_last_alive = lp->lp_last_query =get_seconds (); + lp->lp_last_alive = lp->lp_last_query = jiffies;if (!lp->lp_alive)lnet_notify_locked (lp,0 ,1 , lp->lp_last_alive); }
drivers/staging/rtl8712/usb_intf.c +1 -0
@@ -144,6 +144,7 @@ static struct usb_device_id rtl871x_usb_id_tbl[] = { {USB_DEVICE(0x0DF6, 0x0058)}, {USB_DEVICE(0x0DF6, 0x0049)}, {USB_DEVICE(0x0DF6, 0x004C)}, + {USB_DEVICE(0x0DF6, 0x006C)}, {USB_DEVICE(0x0DF6, 0x0064)},/* Skyworth */ {USB_DEVICE(0x14b2, 0x3300)},
drivers/tty/mips_ejtag_fdc.c +1 -34
@@ -1045,38 +1045,6 @@ err_destroy_ports:return ret; } -static int mips_ejtag_fdc_tty_remove (struct mips_cdmm_device *dev) -{ -struct mips_ejtag_fdc_tty *priv =mips_cdmm_get_drvdata (dev); -struct mips_ejtag_fdc_tty_port *dport; -int nport; -unsigned int cfg; - -if (priv->irq >=0 ) { -raw_spin_lock_irq (&priv->lock); - cfg =mips_ejtag_fdc_read (priv,REG_FDCFG ); -/* Disable interrupts */ - cfg &= ~(REG_FDCFG_TXINTTHRES |REG_FDCFG_RXINTTHRES ); - cfg |=REG_FDCFG_TXINTTHRES_DISABLED ; - cfg |=REG_FDCFG_RXINTTHRES_DISABLED ; -mips_ejtag_fdc_write (priv,REG_FDCFG , cfg); -raw_spin_unlock_irq (&priv->lock); - }else { - priv->removing = true; -del_timer_sync (&priv->poll_timer); - } -kthread_stop (priv->thread); -if (dev->cpu ==0 ) - mips_ejtag_fdc_con.tty_drv =NULL ; -tty_unregister_driver (priv->driver); -for (nport =0 ; nport <NUM_TTY_CHANNELS ; nport++) { - dport = &priv->ports[nport]; -tty_port_destroy (&dport->port); - } -put_tty_driver (priv->driver); -return 0 ; -} -static int mips_ejtag_fdc_tty_cpu_down (struct mips_cdmm_device *dev) {struct mips_ejtag_fdc_tty *priv =mips_cdmm_get_drvdata (dev);
@@ -1149,12 +1117,11 @@ static struct mips_cdmm_driver mips_ejtag_fdc_tty_driver = { .name = "mips_ejtag_fdc", }, .probe = mips_ejtag_fdc_tty_probe, - .remove = mips_ejtag_fdc_tty_remove, .cpu_down = mips_ejtag_fdc_tty_cpu_down, .cpu_up = mips_ejtag_fdc_tty_cpu_up, .id_table = mips_ejtag_fdc_tty_ids, }; -module_mips_cdmm_driver (mips_ejtag_fdc_tty_driver); +builtin_mips_cdmm_driver (mips_ejtag_fdc_tty_driver);static int __init mips_ejtag_fdc_init_console (void ) {
drivers/tty/n_tty.c +1 -1
@@ -169,7 +169,7 @@ static inline int tty_copy_to_user(struct tty_struct *tty, {struct n_tty_data *ldata = tty->disc_data; -tty_audit_add_data (tty, to, n, ldata->icanon); +tty_audit_add_data (tty, from, n, ldata->icanon);return copy_to_user (to, from, n); }
drivers/tty/tty_audit.c +1 -1
@@ -265,7 +265,7 @@ static struct tty_audit_buf *tty_audit_buf_get(struct tty_struct *tty,* * Audit @data of @size from @tty, if necessary. */ -void tty_audit_add_data (struct tty_struct *tty,unsigned char *data, +void tty_audit_add_data (struct tty_struct *tty,const void *data,size_t size,unsigned icanon) {struct tty_audit_buf *buf;
drivers/tty/tty_io.c +4 -0
@@ -1279,18 +1279,22 @@ int tty_send_xchar(struct tty_struct *tty, char ch)int was_stopped = tty->stopped;if (tty->ops->send_xchar) { +down_read (&tty->termios_rwsem); tty->ops->send_xchar (tty, ch); +up_read (&tty->termios_rwsem);return 0 ; }if (tty_write_lock (tty,0 ) <0 )return -ERESTARTSYS ; +down_read (&tty->termios_rwsem);if (was_stopped)start_tty (tty); tty->ops->write (tty, &ch,1 );if (was_stopped)stop_tty (tty); +up_read (&tty->termios_rwsem);tty_write_unlock (tty);return 0 ; }
drivers/tty/tty_ioctl.c +0 -4
@@ -1142,16 +1142,12 @@ int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file,spin_unlock_irq (&tty->flow_lock);break ;case TCIOFF : -down_read (&tty->termios_rwsem);if (STOP_CHAR (tty) != __DISABLED_CHAR) retval =tty_send_xchar (tty,STOP_CHAR (tty)); -up_read (&tty->termios_rwsem);break ;case TCION : -down_read (&tty->termios_rwsem);if (START_CHAR (tty) != __DISABLED_CHAR) retval =tty_send_xchar (tty,START_CHAR (tty)); -up_read (&tty->termios_rwsem);break ;default :return -EINVAL ;
drivers/usb/chipidea/ci_hdrc_imx.c +113 -18
191 lines not on this page · raw message
drivers/usb/chipidea/udc.c +17 -0
@@ -1730,6 +1730,22 @@ static int ci_udc_start(struct usb_gadget *gadget,return retval; } +static void ci_udc_stop_for_otg_fsm (struct ci_hdrc *ci) +{ +if (!ci_otg_is_fsm_mode (ci)) +return ; + +mutex_lock (&ci->fsm.lock); +if (ci->fsm.otg->state ==OTG_STATE_A_PERIPHERAL ) { + ci->fsm.a_bidl_adis_tmout =1 ; +ci_hdrc_otg_fsm_start (ci); + }else if (ci->fsm.otg->state ==OTG_STATE_B_PERIPHERAL ) { + ci->fsm.protocol =PROTO_UNDEF ; + ci->fsm.otg->state =OTG_STATE_UNDEFINED ; + } +mutex_unlock (&ci->fsm.lock); +} +/** * ci_udc_stop: unregister a gadget driver */
@@ -1754,6 +1770,7 @@ static int ci_udc_stop(struct usb_gadget *gadget) ci->driver =NULL ;spin_unlock_irqrestore (&ci->lock, flags); +ci_udc_stop_for_otg_fsm (ci);return 0 ; }
drivers/usb/class/usblp.c +1 -1
@@ -873,11 +873,11 @@ static int usblp_wwait(struct usblp *usblp, int nonblock)add_wait_queue (&usblp->wwait, &waita);for (;;) { -set_current_state (TASK_INTERRUPTIBLE );if (mutex_lock_interruptible (&usblp->mut)) { rc = -EINTR ;break ; } +set_current_state (TASK_INTERRUPTIBLE ); rc =usblp_wtest (usblp, nonblock);mutex_unlock (&usblp->mut);if (rc <=0 )
drivers/usb/dwc3/core.c +14 -2
@@ -490,6 +490,9 @@ static int dwc3_phy_setup(struct dwc3 *dwc)if (dwc->dis_u2_susphy_quirk) reg &= ~DWC3_GUSB2PHYCFG_SUSPHY ; +if (dwc->dis_enblslpm_quirk) + reg &= ~DWC3_GUSB2PHYCFG_ENBLSLPM ; +dwc3_writel (dwc->regs,DWC3_GUSB2PHYCFG (0 ), reg);return 0 ;
@@ -509,12 +512,18 @@ static int dwc3_core_init(struct dwc3 *dwc) reg =dwc3_readl (dwc->regs,DWC3_GSNPSID );/* This should read as U3 followed by revision number */ -if ((reg &DWC3_GSNPSID_MASK ) !=0x55330000 ) { +if ((reg &DWC3_GSNPSID_MASK ) ==0x55330000 ) { +/* Detected DWC_usb3 IP */ + dwc->revision = reg; + }else if ((reg &DWC3_GSNPSID_MASK ) ==0x33310000 ) { +/* Detected DWC_usb31 IP */ + dwc->revision =dwc3_readl (dwc->regs,DWC3_VER_NUMBER ); + dwc->revision |=DWC3_REVISION_IS_DWC31 ; + }else {dev_err (dwc->dev,"this is not a DesignWare USB3 DRD Core\n" ); ret = -ENODEV ; goto err0; } - dwc->revision = reg;/* * Write Linux Version Code to our GUID register so it's easy to figure
@@ -881,6 +890,8 @@ static int dwc3_probe(struct platform_device *pdev) "snps,dis_u3_susphy_quirk"); dwc->dis_u2_susphy_quirk =of_property_read_bool (node,"snps,dis_u2_susphy_quirk" ); + dwc->dis_enblslpm_quirk =device_property_read_bool (dev, +"snps,dis_enblslpm_quirk" ); dwc->tx_de_emphasis_quirk =of_property_read_bool (node,"snps,tx_de_emphasis_quirk" );
@@ -911,6 +922,7 @@ static int dwc3_probe(struct platform_device *pdev) dwc->rx_detect_poll_quirk = pdata->rx_detect_poll_quirk; dwc->dis_u3_susphy_quirk = pdata->dis_u3_susphy_quirk; dwc->dis_u2_susphy_quirk = pdata->dis_u2_susphy_quirk; + dwc->dis_enblslpm_quirk = pdata->dis_enblslpm_quirk; dwc->tx_de_emphasis_quirk = pdata->tx_de_emphasis_quirk;if (pdata->tx_de_emphasis)
drivers/usb/dwc3/core.h +22 -0
@@ -108,6 +108,9 @@#define DWC3_GPRTBIMAP_FS0 0xc188#define DWC3_GPRTBIMAP_FS1 0xc18c +#define DWC3_VER_NUMBER 0xc1a0 +#define DWC3_VER_TYPE 0xc1a4 +#define DWC3_GUSB2PHYCFG (n) (0xc200 + (n * 0x04))#define DWC3_GUSB2I2CCTL (n) (0xc240 + (n * 0x04))
@@ -175,6 +178,7 @@#define DWC3_GUSB2PHYCFG_PHYSOFTRST (1 << 31)#define DWC3_GUSB2PHYCFG_SUSPHY (1 << 6)#define DWC3_GUSB2PHYCFG_ULPI_UTMI (1 << 4) +#define DWC3_GUSB2PHYCFG_ENBLSLPM (1 << 8)/* Global USB2 PHY Vendor Control Register */ #define DWC3_GUSB2PHYACC_NEWREGREQ (1 << 25)
@@ -712,6 +716,8 @@ struct dwc3_scratchpad_array {* @rx_detect_poll_quirk: set if we enable rx_detect to polling lfps quirk * @dis_u3_susphy_quirk: set if we disable usb3 suspend phy * @dis_u2_susphy_quirk: set if we disable usb2 suspend phy +* @dis_enblslpm_quirk: set if we clear enblslpm in GUSB2PHYCFG, +* disabling the suspend signal to the PHY. * @tx_de_emphasis_quirk: set if we enable Tx de-emphasis quirk * @tx_de_emphasis: Tx de-emphasis value * 0 - -6dB de-emphasis
@@ -766,6 +772,14 @@ struct dwc3 {u32 num_event_buffers;u32 u1u2;u32 maximum_speed; + +/* +* All 3.1 IP version constants are greater than the 3.0 IP +* version constants. This works for most version checks in +* dwc3. However, in the future, this may not apply as +* features may be developed on newer versions of the 3.0 IP +* that are not in the 3.1 IP. +*/ u32 revision;#define DWC3_REVISION_173A 0x5533173a
@@ -788,6 +802,13 @@ struct dwc3 {#define DWC3_REVISION_270A 0x5533270a#define DWC3_REVISION_280A 0x5533280a +/* +* NOTICE: we're using bit 31 as a "is usb 3.1" flag. This is really +* just so dwc31 revisions are always larger than dwc3. +*/ +#define DWC3_REVISION_IS_DWC31 0x80000000 +#define DWC3_USB31_REVISION_110A (0x3131302a | DWC3_REVISION_IS_USB31) +enum dwc3_ep0_next ep0_next_event;enum dwc3_ep0_state ep0state;enum dwc3_link_state link_state;
@@ -841,6 +862,7 @@ struct dwc3 { unsigned rx_detect_poll_quirk:1; unsigned dis_u3_susphy_quirk:1; unsigned dis_u2_susphy_quirk:1; + unsigned dis_enblslpm_quirk:1; unsigned tx_de_emphasis_quirk:1; unsigned tx_de_emphasis:2;
drivers/usb/dwc3/dwc3-pci.c +26 -0
@@ -27,6 +27,8 @@#include "platform_data.h" #define PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3 0xabcd +#define PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3_AXI 0xabce +#define PCI_DEVICE_ID_SYNOPSYS_HAPSUSB31 0xabcf#define PCI_DEVICE_ID_INTEL_BYT 0x0f37#define PCI_DEVICE_ID_INTEL_MRFLD 0x119e#define PCI_DEVICE_ID_INTEL_BSW 0x22B7
@@ -100,6 +102,22 @@ static int dwc3_pci_quirks(struct pci_dev *pdev) } } +if (pdev->vendor ==PCI_VENDOR_ID_SYNOPSYS && + (pdev->device ==PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3 || + pdev->device ==PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3_AXI || + pdev->device ==PCI_DEVICE_ID_SYNOPSYS_HAPSUSB31 )) { + +struct dwc3_platform_data pdata; + +memset (&pdata,0 ,sizeof (pdata)); + pdata.usb3_lpm_capable = true; + pdata.has_lpm_erratum = true; + pdata.dis_enblslpm_quirk = true; + +return platform_device_add_data (pci_get_drvdata (pdev), &pdata, +sizeof (pdata)); + } +return 0 ; }
@@ -172,6 +190,14 @@ static const struct pci_device_id dwc3_pci_id_table[] = {PCI_DEVICE (PCI_VENDOR_ID_SYNOPSYS ,PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3 ), }, + { +PCI_DEVICE (PCI_VENDOR_ID_SYNOPSYS , +PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3_AXI ), + }, + { +PCI_DEVICE (PCI_VENDOR_ID_SYNOPSYS , +PCI_DEVICE_ID_SYNOPSYS_HAPSUSB31 ), + }, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BSW), }, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BYT), }, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_MRFLD), },
drivers/usb/dwc3/gadget.c +44 -17
83 lines not on this page · raw message
drivers/usb/dwc3/platform_data.h +1 -0
@@ -42,6 +42,7 @@ struct dwc3_platform_data { unsigned rx_detect_poll_quirk:1; unsigned dis_u3_susphy_quirk:1; unsigned dis_u2_susphy_quirk:1; + unsigned dis_enblslpm_quirk:1; unsigned tx_de_emphasis_quirk:1; unsigned tx_de_emphasis:2;
drivers/usb/gadget/udc/atmel_usba_udc.c +1 -1
@@ -1634,7 +1634,7 @@ static irqreturn_t usba_udc_irq(int irq, void *devid)spin_lock (&udc->lock); int_enb =usba_int_enb_get (udc); - status =usba_readl (udc,INT_STA ) & int_enb; + status =usba_readl (udc,INT_STA ) & (int_enb |USBA_HIGH_SPEED );DBG (DBG_INT ,"irq, status=%#08x\n" , status);if (status &USBA_DET_SUSPEND ) {
drivers/usb/gadget/udc/net2280.c +1 -1
@@ -1846,7 +1846,7 @@ static void defect7374_disable_data_eps(struct net2280 *dev)for (i =1 ; i <5 ; i++) { ep = &dev->ep[i]; -writel (0 , &ep->cfg->ep_cfg); +writel (i, &ep->cfg->ep_cfg); }/* CSROUT, CSRIN, PCIOUT, PCIIN, STATIN, RCIN */
drivers/usb/host/ehci-orion.c +2 -1
@@ -224,7 +224,8 @@ static int ehci_orion_drv_probe(struct platform_device *pdev) priv->phy =devm_phy_optional_get (&pdev->dev,"usb" );if (IS_ERR (priv->phy)) { err =PTR_ERR (priv->phy); - goto err_phy_get; +if (err != -ENOSYS ) + goto err_phy_get; }else { err =phy_init (priv->phy);if (err)
drivers/usb/host/xhci.c +10 -0
@@ -175,6 +175,16 @@ int xhci_reset(struct xhci_hcd *xhci) command |=CMD_RESET ;writel (command, &xhci->op_regs->command); +/* Existing Intel xHCI controllers require a delay of 1 mS, +* after setting the CMD_RESET bit, and before accessing any +* HC registers. This allows the HC to complete the +* reset operation and be ready for HC register access. +* Without this delay, the subsequent HC register access, +* may result in a system hang very rarely. +*/ +if (xhci->quirks &XHCI_INTEL_HOST ) +udelay (1000 ); + ret =xhci_handshake (&xhci->op_regs->command,CMD_RESET ,0 ,10 *1000 *1000 );if (ret)
drivers/usb/musb/musb_core.c +5 -5
@@ -132,7 +132,7 @@ static inline struct musb *dev_to_musb(struct device *dev)/*-------------------------------------------------------------------------*/ #ifndef CONFIG_BLACKFIN -static int musb_ulpi_read (struct usb_phy *phy,u32 offset) +static int musb_ulpi_read (struct usb_phy *phy,u32 reg) {void __iomem *addr = phy->io_priv;int i =0 ;
@@ -151,7 +151,7 @@ static int musb_ulpi_read(struct usb_phy *phy, u32 offset)* ULPICarKitControlDisableUTMI after clearing POWER_SUSPENDM. */ -musb_writeb (addr,MUSB_ULPI_REG_ADDR , (u8 )offset); +musb_writeb (addr,MUSB_ULPI_REG_ADDR , (u8 )reg);musb_writeb (addr,MUSB_ULPI_REG_CONTROL ,MUSB_ULPI_REG_REQ |MUSB_ULPI_RDN_WR );
@@ -176,7 +176,7 @@ out:return ret; } -static int musb_ulpi_write (struct usb_phy *phy,u32 offset,u32 data) +static int musb_ulpi_write (struct usb_phy *phy,u32 val,u32 reg) {void __iomem *addr = phy->io_priv;int i =0 ;
@@ -191,8 +191,8 @@ static int musb_ulpi_write(struct usb_phy *phy, u32 offset, u32 data) power &= ~MUSB_POWER_SUSPENDM ;musb_writeb (addr,MUSB_POWER , power); -musb_writeb (addr,MUSB_ULPI_REG_ADDR , (u8 )offset); -musb_writeb (addr,MUSB_ULPI_REG_DATA , (u8 )data); +musb_writeb (addr,MUSB_ULPI_REG_ADDR , (u8 )reg); +musb_writeb (addr,MUSB_ULPI_REG_DATA , (u8 )val);musb_writeb (addr,MUSB_ULPI_REG_CONTROL ,MUSB_ULPI_REG_REQ ); while (!(musb_readb(addr, MUSB_ULPI_REG_CONTROL)
drivers/usb/serial/option.c +11 -0
@@ -162,6 +162,7 @@ static void option_instat_callback(struct urb *urb);#define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_HIGHSPEED 0x9001#define NOVATELWIRELESS_PRODUCT_E362 0x9010#define NOVATELWIRELESS_PRODUCT_E371 0x9011 +#define NOVATELWIRELESS_PRODUCT_U620L 0x9022#define NOVATELWIRELESS_PRODUCT_G2 0xA010#define NOVATELWIRELESS_PRODUCT_MC551 0xB001
@@ -357,6 +358,7 @@ static void option_instat_callback(struct urb *urb);/* This is the 4G XS Stick W14 a.k.a. Mobilcom Debitel Surf-Stick * * It seems to contain a Qualcomm QSC6240/6290 chipset */ #define FOUR_G_SYSTEMS_PRODUCT_W14 0x9603 +#define FOUR_G_SYSTEMS_PRODUCT_W100 0x9b01/* iBall 3.5G connect wireless modem */ #define IBALL_3_5G_CONNECT 0x9605
@@ -522,6 +524,11 @@ static const struct option_blacklist_info four_g_w14_blacklist = { .sendsetup = BIT(0) | BIT(1), }; +static const struct option_blacklist_info four_g_w100_blacklist = { + .sendsetup =BIT (1 ) |BIT (2 ), + .reserved =BIT (3 ), +}; +static const struct option_blacklist_info alcatel_x200_blacklist = { .sendsetup =BIT (0 ) |BIT (1 ), .reserved =BIT (4 ),
@@ -1060,6 +1067,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC551, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_E362, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_E371, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U620L, 0xff, 0x00, 0x00) }, { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01) }, { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01A) },
@@ -1653,6 +1661,9 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14), .driver_info = (kernel_ulong_t)&four_g_w14_blacklist }, + { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W100), + .driver_info = (kernel_ulong_t)&four_g_w100_blacklist + }, { USB_DEVICE_INTERFACE_CLASS(LONGCHEER_VENDOR_ID, SPEEDUP_PRODUCT_SU9800, 0xff) }, { USB_DEVICE(LONGCHEER_VENDOR_ID, ZOOM_PRODUCT_4597) }, { USB_DEVICE(LONGCHEER_VENDOR_ID, IBALL_3_5G_CONNECT) },
drivers/usb/serial/qcserial.c +74 -20
127 lines not on this page · raw message
drivers/usb/serial/ti_usb_3410_5052.c +2 -0
@@ -159,6 +159,7 @@ static const struct usb_device_id ti_id_table_3410[] = { { USB_DEVICE(ABBOTT_VENDOR_ID, ABBOTT_STEREO_PLUG_ID) }, { USB_DEVICE(ABBOTT_VENDOR_ID, ABBOTT_STRIP_PORT_ID) }, { USB_DEVICE(TI_VENDOR_ID, FRI2_PRODUCT_ID) }, + { USB_DEVICE(HONEYWELL_VENDOR_ID, HONEYWELL_HGI80_PRODUCT_ID) }, { } /* terminator */ };
@@ -191,6 +192,7 @@ static const struct usb_device_id ti_id_table_combined[] = { { USB_DEVICE(ABBOTT_VENDOR_ID, ABBOTT_PRODUCT_ID) }, { USB_DEVICE(ABBOTT_VENDOR_ID, ABBOTT_STRIP_PORT_ID) }, { USB_DEVICE(TI_VENDOR_ID, FRI2_PRODUCT_ID) }, + { USB_DEVICE(HONEYWELL_VENDOR_ID, HONEYWELL_HGI80_PRODUCT_ID) }, { } /* terminator */ };
drivers/usb/serial/ti_usb_3410_5052.h +4 -0
@@ -56,6 +56,10 @@#define ABBOTT_PRODUCT_ID ABBOTT_STEREO_PLUG_ID#define ABBOTT_STRIP_PORT_ID 0x3420 +/* Honeywell vendor and product IDs */ +#define HONEYWELL_VENDOR_ID 0x10ac +#define HONEYWELL_HGI80_PRODUCT_ID 0x0102/* Honeywell HGI80 */ +/* Commands */ #define TI_GET_VERSION 0x01#define TI_GET_PORT_STATUS 0x02
drivers/xen/events/events_base.c +3 -2
@@ -39,6 +39,7 @@#include <asm/irq.h> #include <asm/idle.h> #include <asm/io_apic.h> +#include <asm/i8259.h> #include <asm/xen/pci.h> #include <xen/page.h> #endif
@@ -420,7 +421,7 @@ static int __must_check xen_allocate_irq_gsi(unsigned gsi)return xen_allocate_irq_dynamic ();/* Legacy IRQ descriptors are already allocated by the arch. */ -if (gsi <NR_IRQS_LEGACY ) +if (gsi <nr_legacy_irqs ()) irq = gsi;else irq =irq_alloc_desc_at (gsi,-1 );
@@ -446,7 +447,7 @@ static void xen_free_irq(unsigned irq)kfree (info);/* Legacy IRQ descriptors are managed by the arch. */ -if (irq <NR_IRQS_LEGACY ) +if (irq <nr_legacy_irqs ())return ;irq_free_desc (irq);
fs/proc/array.c +14 -2
@@ -372,7 +372,7 @@ int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,static int do_task_stat (struct seq_file *m,struct pid_namespace *ns,struct pid *pid,struct task_struct *task,int whole) { -unsigned long vsize, eip, esp, wchan = ~0UL ; +unsigned long vsize, eip, esp, wchan =0 ;int priority, nice;int tty_pgrp =-1 , tty_nr =0 ;sigset_t sigign, sigcatch;
@@ -504,7 +504,19 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,seq_put_decimal_ull (m,' ' , task->blocked.sig[0 ] &0x7fffffffUL );seq_put_decimal_ull (m,' ' , sigign.sig[0 ] &0x7fffffffUL );seq_put_decimal_ull (m,' ' , sigcatch.sig[0 ] &0x7fffffffUL ); -seq_put_decimal_ull (m,' ' , wchan); + +/* +* We used to output the absolute kernel address, but that's an +* information leak - so instead we show a 0/1 flag here, to signal +* to user-space whether there's a wchan field in /proc/PID/wchan. +* +* This works with older implementations of procps as well. +*/ +if (wchan) +seq_puts (m," 1" ); +else +seq_puts (m," 0" ); +seq_put_decimal_ull (m,' ' ,0 );seq_put_decimal_ull (m,' ' ,0 );seq_put_decimal_ll (m,' ' , task->exit_signal);
fs/proc/base.c +3 -6
@@ -430,13 +430,10 @@ static int proc_pid_wchan(struct seq_file *m, struct pid_namespace *ns, wchan =get_wchan (task); -if (lookup_symbol_name (wchan, symname) <0 ) { -if (!ptrace_may_access (task,PTRACE_MODE_READ )) -return 0 ; -seq_printf (m,"%lu" , wchan); - }else { +if (wchan &&ptrace_may_access (task,PTRACE_MODE_READ ) && !lookup_symbol_name (wchan, symname))seq_printf (m,"%s" , symname); - } +else +seq_putc (m,'0' );return 0 ; }
include/linux/kvm_host.h +11 -0
@@ -436,6 +436,17 @@ static inline struct kvm_vcpu *kvm_get_vcpu(struct kvm *kvm, int i) (vcpup =kvm_get_vcpu (kvm, idx)) !=NULL ; \ idx++) +static inline struct kvm_vcpu *kvm_get_vcpu_by_id (struct kvm *kvm,int id) +{ +struct kvm_vcpu *vcpu; +int i; + +kvm_for_each_vcpu (i, vcpu, kvm) +if (vcpu->vcpu_id == id) +return vcpu; +return NULL ; +} +#define kvm_for_each_memslot (memslot, slots) \ for (memslot = &slots->memslots[0]; \ memslot < slots->memslots + KVM_MEM_SLOTS_NUM && memslot->npages;\
include/linux/tty.h +3 -3
@@ -605,7 +605,7 @@ extern void n_tty_inherit_ops(struct tty_ldisc_ops *ops);/* tty_audit.c */ #ifdef CONFIG_AUDIT -extern void tty_audit_add_data (struct tty_struct *tty,unsigned char *data, +extern void tty_audit_add_data (struct tty_struct *tty,const void *data,size_t size,unsigned icanon);extern void tty_audit_exit (void );extern void tty_audit_fork (struct signal_struct *sig);
@@ -613,8 +613,8 @@ extern void tty_audit_tiocsti(struct tty_struct *tty, char ch);extern void tty_audit_push (struct tty_struct *tty);extern int tty_audit_push_current (void );#else -static inline void tty_audit_add_data (struct tty_struct *tty, -unsigned char *data,size_t size,unsigned icanon) +static inline void tty_audit_add_data (struct tty_struct *tty,const void *data, +size_t size,unsigned icanon) { }static inline void tty_audit_tiocsti (struct tty_struct *tty,char ch)
include/net/inet_common.h +2 -1
@@ -41,7 +41,8 @@ int inet_recv_error(struct sock *sk, struct msghdr *msg, int len,static inline void inet_ctl_sock_destroy (struct sock *sk) { -sock_release (sk->sk_socket); +if (sk) +sock_release (sk->sk_socket); }#endif
include/net/ip_fib.h +1 -1
@@ -306,7 +306,7 @@ void fib_flush_external(struct net *net);/* Exported by fib_semantics.c */ int ip_fib_check_default (__be32 gw,struct net_device *dev); -int fib_sync_down_dev (struct net_device *dev,unsigned long event); +int fib_sync_down_dev (struct net_device *dev,unsigned long event,bool force);int fib_sync_down_addr (struct net *net,__be32 local);int fib_sync_up (struct net_device *dev,unsigned int nh_flags);void fib_select_multipath (struct fib_result *res);
net/bluetooth/hidp/core.c +14 -0
@@ -401,6 +401,20 @@ static void hidp_idle_timeout(unsigned long arg) {struct hidp_session *session = (struct hidp_session *) arg; +/* The HIDP user-space API only contains calls to add and remove +* devices. There is no way to forward events of any kind. Therefore, +* we have to forcefully disconnect a device on idle-timeouts. This is +* unfortunate and weird API design, but it is spec-compliant and +* required for backwards-compatibility. Hence, on idle-timeout, we +* signal driver-detach events, so poll() will be woken up with an +* error-condition on both sockets. +*/ + + session->intr_sock->sk->sk_err =EUNATCH ; + session->ctrl_sock->sk->sk_err =EUNATCH ; +wake_up_interruptible (sk_sleep (session->intr_sock->sk)); +wake_up_interruptible (sk_sleep (session->ctrl_sock->sk)); +hidp_session_terminate (session); }
net/bluetooth/mgmt.c +7 -5
@@ -3090,6 +3090,11 @@ static int unpair_device(struct sock *sk, struct hci_dev *hdev, void *data, }else {u8 addr_type; +if (cp->addr.type ==BDADDR_LE_PUBLIC ) + addr_type =ADDR_LE_DEV_PUBLIC ; +else + addr_type =ADDR_LE_DEV_RANDOM ; + conn =hci_conn_hash_lookup_ba (hdev,LE_LINK , &cp->addr.bdaddr);if (conn) {
@@ -3105,13 +3110,10 @@ static int unpair_device(struct sock *sk, struct hci_dev *hdev, void *data,*/ if (!cp->disconnect) conn =NULL ; + }else { +hci_conn_params_del (hdev, &cp->addr.bdaddr, addr_type); } -if (cp->addr.type ==BDADDR_LE_PUBLIC ) - addr_type =ADDR_LE_DEV_PUBLIC ; -else - addr_type =ADDR_LE_DEV_RANDOM ; -hci_remove_irk (hdev, &cp->addr.bdaddr, addr_type); err =hci_remove_ltk (hdev, &cp->addr.bdaddr, addr_type);
net/core/dst.c +1 -1
@@ -287,7 +287,7 @@ void dst_release(struct dst_entry *dst)if (unlikely (newrefcnt <0 ))net_warn_ratelimited ("%s: dst:%p refcnt:%d\n" , __func__, dst, newrefcnt); -if (unlikely (dst->flags &DST_NOCACHE ) && !newrefcnt) +if (!newrefcnt &&unlikely (dst->flags &DST_NOCACHE ))call_rcu (&dst->rcu_head, dst_destroy_rcu); } }
net/ipv4/fib_frontend.c +7 -6
@@ -1063,9 +1063,10 @@ static void nl_fib_lookup_exit(struct net *net) net->ipv4.fibnl =NULL ; } -static void fib_disable_ip (struct net_device *dev,unsigned long event) +static void fib_disable_ip (struct net_device *dev,unsigned long event, +bool force) { -if (fib_sync_down_dev (dev, event)) +if (fib_sync_down_dev (dev, event, force))fib_flush (dev_net (dev));rt_cache_flush (dev_net (dev));arp_ifdown (dev);
@@ -1093,7 +1094,7 @@ static int fib_inetaddr_event(struct notifier_block *this, unsigned long event,/* Last address was deleted from this interface. * Disable IP. */ -fib_disable_ip (dev, event); +fib_disable_ip (dev, event, true); }else {rt_cache_flush (dev_net (dev)); }
@@ -1110,7 +1111,7 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vounsigned int flags;if (event ==NETDEV_UNREGISTER ) { -fib_disable_ip (dev, event); +fib_disable_ip (dev, event, true);rt_flush_dev (dev);return NOTIFY_DONE ; }
@@ -1131,14 +1132,14 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vort_cache_flush (net);break ;case NETDEV_DOWN : -fib_disable_ip (dev, event); +fib_disable_ip (dev, event, false);break ;case NETDEV_CHANGE : flags =dev_get_flags (dev);if (flags & (IFF_RUNNING |IFF_LOWER_UP ))fib_sync_up (dev,RTNH_F_LINKDOWN );else -fib_sync_down_dev (dev, event); +fib_sync_down_dev (dev, event, false);/* fall through */ case NETDEV_CHANGEMTU :rt_cache_flush (net);
net/ipv4/fib_semantics.c +15 -3
@@ -1132,7 +1132,13 @@ int fib_sync_down_addr(struct net *net, __be32 local)return ret; } -int fib_sync_down_dev (struct net_device *dev,unsigned long event) +/* Event force Flags Description +* NETDEV_CHANGE 0 LINKDOWN Carrier OFF, not for scope host +* NETDEV_DOWN 0 LINKDOWN|DEAD Link down, not for scope host +* NETDEV_DOWN 1 LINKDOWN|DEAD Last address removed +* NETDEV_UNREGISTER 1 LINKDOWN|DEAD Device removed +*/ +int fib_sync_down_dev (struct net_device *dev,unsigned long event,bool force) {int ret =0 ;int scope =RT_SCOPE_NOWHERE ;
@@ -1141,8 +1147,7 @@ int fib_sync_down_dev(struct net_device *dev, unsigned long event)struct hlist_head *head = &fib_info_devhash[hash];struct fib_nh *nh; -if (event ==NETDEV_UNREGISTER || - event ==NETDEV_DOWN ) +if (force) scope =-1 ;hlist_for_each_entry (nh, head, nh_hash) {
@@ -1291,6 +1296,13 @@ int fib_sync_up(struct net_device *dev, unsigned int nh_flags)if (!(dev->flags &IFF_UP ))return 0 ; +if (nh_flags &RTNH_F_DEAD ) { +unsigned int flags =dev_get_flags (dev); + +if (flags & (IFF_RUNNING |IFF_LOWER_UP )) + nh_flags |=RTNH_F_LINKDOWN ; + } + prev_fi =NULL ; hash =fib_devindex_hashfn (dev->ifindex); head = &fib_info_devhash[hash];
net/ipv4/fib_trie.c +1 -1
@@ -1561,7 +1561,7 @@ static struct key_vector *leaf_walk_rcu(struct key_vector **tn, t_key key) do { /* record parent and next child index */ pn = n; - cindex = key ? get_index(key, pn) : 0; + cindex = (key > pn->key) ? get_index(key, pn) : 0; if (cindex >> pn->bits) break;
net/ipv4/gre_offload.c +2 -1
@@ -36,7 +36,8 @@ static struct sk_buff *gre_gso_segment(struct sk_buff *skb,SKB_GSO_TCP_ECN |SKB_GSO_GRE |SKB_GSO_GRE_CSUM | - SKB_GSO_IPIP))) +SKB_GSO_IPIP | + SKB_GSO_SIT))) goto out;if (!skb->encapsulation)
net/ipv4/ipmr.c +3 -3
@@ -1683,8 +1683,8 @@ static inline int ipmr_forward_finish(struct sock *sk, struct sk_buff *skb) {struct ip_options *opt = &(IPCB (skb)->opt); -IP_INC_STATS_BH (dev_net (skb_dst (skb)->dev),IPSTATS_MIB_OUTFORWDATAGRAMS ); -IP_ADD_STATS_BH (dev_net (skb_dst (skb)->dev),IPSTATS_MIB_OUTOCTETS , skb->len); +IP_INC_STATS (dev_net (skb_dst (skb)->dev),IPSTATS_MIB_OUTFORWDATAGRAMS ); +IP_ADD_STATS (dev_net (skb_dst (skb)->dev),IPSTATS_MIB_OUTOCTETS , skb->len);if (unlikely (opt->optlen))ip_forward_options (skb);
@@ -1746,7 +1746,7 @@ static void ipmr_queue_xmit(struct net *net, struct mr_table *mrt,* to blackhole. */ -IP_INC_STATS_BH (dev_net (dev),IPSTATS_MIB_FRAGFAILS ); +IP_INC_STATS (dev_net (dev),IPSTATS_MIB_FRAGFAILS );ip_rt_put (rt); goto out_free; }
net/ipv4/sysctl_net_ipv4.c +2 -2
@@ -47,14 +47,14 @@ static void set_local_port_range(struct net *net, int range[2]) {bool same_parity = !((range[0 ] ^ range[1 ]) &1 ); -write_seqlock (&net->ipv4.ip_local_ports.lock); +write_seqlock_bh (&net->ipv4.ip_local_ports.lock);if (same_parity && !net->ipv4.ip_local_ports.warned) { net->ipv4.ip_local_ports.warned = true;pr_err_ratelimited ("ip_local_port_range: prefer different parity for start/end values.\n" ); } net->ipv4.ip_local_ports.range[0 ] = range[0 ]; net->ipv4.ip_local_ports.range[1 ] = range[1 ]; -write_sequnlock (&net->ipv4.ip_local_ports.lock); +write_sequnlock_bh (&net->ipv4.ip_local_ports.lock); }/* Validate changes from /proc interface. */
net/ipv4/tcp_output.c +1 -1
@@ -3406,7 +3406,7 @@ static int tcp_xmit_probe_skb(struct sock *sk, int urgent, int mib)*/ tcp_init_nondata_skb (skb, tp->snd_una - !urgent,TCPHDR_ACK );skb_mstamp_get (&skb->skb_mstamp); -NET_INC_STATS_BH (sock_net (sk), mib); +NET_INC_STATS (sock_net (sk), mib);return tcp_transmit_skb (sk, skb,0 ,GFP_ATOMIC ); }
net/ipv6/addrconf.c +1 -0
@@ -411,6 +411,7 @@ static struct inet6_dev *ipv6_add_dev(struct net_device *dev)if (err) {ipv6_mc_destroy_dev (ndev);del_timer (&ndev->regen_timer); +snmp6_unregister_dev (ndev); goto err_release; }/* protected by rtnl_lock */
net/ipv6/sit.c +4 -22
@@ -1394,34 +1394,20 @@ static int ipip6_tunnel_init(struct net_device *dev)return 0 ; } -static int __net_init ipip6_fb_tunnel_init (struct net_device *dev) +static void __net_init ipip6_fb_tunnel_init (struct net_device *dev) {struct ip_tunnel *tunnel =netdev_priv (dev);struct iphdr *iph = &tunnel->parms.iph;struct net *net =dev_net (dev);struct sit_net *sitn =net_generic (net, sit_net_id); - tunnel->dev = dev; - tunnel->net =dev_net (dev); - iph->version =4 ; iph->protocol =IPPROTO_IPV6 ; iph->ihl =5 ; iph->ttl =64 ; - dev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats); -if (!dev->tstats) -return -ENOMEM ; - - tunnel->dst_cache = alloc_percpu(struct ip_tunnel_dst); -if (!tunnel->dst_cache) { -free_percpu (dev->tstats); -return -ENOMEM ; - } -dev_hold (dev);rcu_assign_pointer (sitn->tunnels_wc[0 ], tunnel); -return 0 ; }static int ipip6_validate (struct nlattr *tb[],struct nlattr *data[])
@@ -1831,23 +1817,19 @@ static int __net_init sit_init_net(struct net *net)*/ sitn->fb_tunnel_dev->features |=NETIF_F_NETNS_LOCAL ; - err =ipip6_fb_tunnel_init (sitn->fb_tunnel_dev); -if (err) - goto err_dev_free; - -ipip6_tunnel_clone_6rd (sitn->fb_tunnel_dev, sitn); err =register_netdev (sitn->fb_tunnel_dev);if (err) goto err_reg_dev; +ipip6_tunnel_clone_6rd (sitn->fb_tunnel_dev, sitn); +ipip6_fb_tunnel_init (sitn->fb_tunnel_dev); + t =netdev_priv (sitn->fb_tunnel_dev);strcpy (t->parms.name, sitn->fb_tunnel_dev->name);return 0 ; err_reg_dev: -dev_put (sitn->fb_tunnel_dev); -err_dev_free:ipip6_dev_free (sitn->fb_tunnel_dev); err_alloc_dev:return err;
net/irda/irlmp.c +1 -1
@@ -1839,7 +1839,7 @@ static void *irlmp_seq_hb_idx(struct irlmp_iter_state *iter, loff_t *off)for (element =hashbin_get_first (iter->hashbin); element !=NULL ; element =hashbin_get_next (iter->hashbin)) { -if (!off || *off-- ==0 ) { +if (!off || (*off)-- ==0 ) {/* NB: hashbin left locked */ return element; }
net/mac80211/mlme.c +20 -1
@@ -3378,7 +3378,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,if (ifmgd->rssi_min_thold != ifmgd->rssi_max_thold && ifmgd->count_beacon_signal >=IEEE80211_SIGNAL_AVE_MIN_COUNT ) { -int sig = ifmgd->ave_beacon_signal; +int sig = ifmgd->ave_beacon_signal /16 ;int last_sig = ifmgd->last_ave_beacon_signal;struct ieee80211_event event = { .type =RSSI_EVENT ,
@@ -4999,6 +4999,25 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,return 0 ; } +if (ifmgd->assoc_data && +ether_addr_equal (ifmgd->assoc_data->bss->bssid, req->bssid)) { +sdata_info (sdata, +"aborting association with %pM by local choice (Reason: %u=%s)\n" , + req->bssid, req->reason_code, +ieee80211_get_reason_code_string (req->reason_code)); + +drv_mgd_prepare_tx (sdata->local, sdata); +ieee80211_send_deauth_disassoc (sdata, req->bssid, +IEEE80211_STYPE_DEAUTH , + req->reason_code, tx, + frame_buf); +ieee80211_destroy_assoc_data (sdata, false); +ieee80211_report_disconnect (sdata, frame_buf, +sizeof (frame_buf), true, + req->reason_code); +return 0 ; + } +if (ifmgd->associated &ðer_addr_equal (ifmgd->associated->bssid, req->bssid)) { sdata_info(sdata,
net/mac80211/trace.h +5 -5
@@ -33,11 +33,11 @@ __field(u32, chan_width) \ __field(u32, center_freq1) \ __field(u32, center_freq2) -#define CHANDEF_ASSIGN (c) \ - __entry->control_freq = (c)->chan ? (c)->chan->center_freq : 0; \ - __entry->chan_width = (c)->width; \ - __entry->center_freq1 = (c)->center_freq1; \ - __entry->center_freq2 = (c)->center_freq2; +#define CHANDEF_ASSIGN (c) \ + __entry->control_freq = (c) ? ((c)->chan ? (c)->chan->center_freq : 0) : 0; \ + __entry->chan_width = (c) ? (c)->width : 0; \ + __entry->center_freq1 = (c) ? (c)->center_freq1 : 0; \ + __entry->center_freq2 = (c) ? (c)->center_freq2 : 0;#define CHANDEF_PR_FMT " control:%d MHz width:%d center: %d/%d MHz"#define CHANDEF_PR_ARG __entry->control_freq, __entry->chan_width, \ __entry->center_freq1, __entry->center_freq2
net/mac80211/util.c +7 -0
@@ -2984,6 +2984,13 @@ ieee80211_extend_noa_desc(struct ieee80211_noa_data *data, u32 tsf, int i)if (end >0 )return false; +/* One shot NOA */ +if (data->count[i] ==1 ) +return false; + +if (data->desc[i].interval ==0 ) +return false; +/* End time is in the past, check for repetitions */ skip =DIV_ROUND_UP (-end, data->desc[i].interval);if (data->count[i] <255 ) {
net/netlink/af_netlink.c +2 -2
@@ -2346,7 +2346,7 @@ static int netlink_getsockopt(struct socket *sock, int level, int optname,int pos, idx, shift; err =0 ; -netlink_table_grab (); +netlink_lock_table ();for (pos =0 ; pos *8 < nlk->ngroups; pos +=sizeof (u32)) {if (len - pos <sizeof (u32))break ;
@@ -2361,7 +2361,7 @@ static int netlink_getsockopt(struct socket *sock, int level, int optname, }if (put_user (ALIGN (nlk->ngroups /8 ,sizeof (u32)), optlen)) err = -EFAULT ; -netlink_table_ungrab (); +netlink_unlock_table ();break ; }default :
net/nfc/nci/hci.c +64 -26
193 lines not on this page · raw message
net/packet/af_packet.c +49 -31
80 lines not on this page · raw message
sound/usb/midi.c +46 -0
46 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.