···15101510D: Cobalt Networks (x86) support15111511D: This-and-That1512151215131513+N: Mark M. Hoffman15141514+E: mhoffman@lightlink.com15151515+D: asb100, lm93 and smsc47b397 hardware monitoring drivers15161516+D: hwmon subsystem core15171517+D: hwmon subsystem maintainer15181518+D: i2c-sis96x and i2c-stub SMBus drivers15191519+S: USA15201520+15131521N: Dirk Hohndel15141522E: hohndel@suse.de15151523D: The XFree86[tm] Project
+1-5
Documentation/devicetree/bindings/mfd/ab8500.txt
···1313 4 = active high level-sensitive1414 8 = active low level-sensitive15151616-Optional parent device properties:1717-- reg : contains the PRCMU mailbox address for the AB8500 i2c port1818-1916The AB8500 consists of a large and varied group of sub-devices:20172118Device IRQ Names Supply Names Description···8386 - stericsson,amic2-bias-vamic1 : Analoge Mic wishes to use a non-standard Vamic8487 - stericsson,earpeice-cmv : Earpeice voltage (only: 950 | 1100 | 1270 | 1580)85888686-ab8500@5 {8989+ab8500 {8790 compatible = "stericsson,ab8500";8888- reg = <5>; /* mailbox 5 is i2c */8991 interrupts = <0 40 0x4>;9092 interrupt-controller;9193 #interrupt-cells = <2>;
···1111 - "nvidia,tegra20-uart"1212 - "nxp,lpc3220-uart"1313 - "ibm,qpace-nwp-serial"1414+ - "altr,16550-FIFO32"1515+ - "altr,16550-FIFO64"1616+ - "altr,16550-FIFO128"1417 - "serial" if the port type is unknown.1518- reg : offset and length of the register set for the device.1619- interrupts : should contain uart interrupt.
+1-1
Documentation/hwmon/lm75
···2323 Datasheet: Publicly available at the Maxim website2424 http://www.maxim-ic.com/2525 * Microchip (TelCom) TCN752626- Prefix: 'lm75'2626+ Prefix: 'tcn75'2727 Addresses scanned: none2828 Datasheet: Publicly available at the Microchip website2929 http://www.microchip.com/
+7
Documentation/networking/ipvs-sysctl.txt
···1515 enabled and the variable is automatically set to 2, otherwise1616 the strategy is disabled and the variable is set to 1.17171818+backup_only - BOOLEAN1919+ 0 - disabled (default)2020+ not 0 - enabled2121+2222+ If set, disable the director function while the server is2323+ in backup mode to avoid packet loops for DR/TUN methods.2424+1825conntrack - BOOLEAN1926 0 - disabled (default)2027 not 0 - enabled
+27-15
MAINTAINERS
···13381338F: drivers/platform/x86/asus*.c13391339F: drivers/platform/x86/eeepc*.c1340134013411341-ASUS ASB100 HARDWARE MONITOR DRIVER13421342-M: "Mark M. Hoffman" <mhoffman@lightlink.com>13431343-L: lm-sensors@lm-sensors.org13441344-S: Maintained13451345-F: drivers/hwmon/asb100.c13461346-13471341ASYNCHRONOUS TRANSFERS/TRANSFORMS (IOAT) API13481342M: Dan Williams <djbw@fb.com>13491343W: http://sourceforge.net/projects/xscaleiop···38453851F: Documentation/i2c/busses/i2c-ismt3846385238473853I2C/SMBUS STUB DRIVER38483848-M: "Mark M. Hoffman" <mhoffman@lightlink.com>38543854+M: Jean Delvare <khali@linux-fr.org>38493855L: linux-i2c@vger.kernel.org38503856S: Maintained38513857F: drivers/i2c/i2c-stub.c···39984004M: Stanislaw Gruszka <stf_xl@wp.pl>39994005S: Maintained40004006F: drivers/usb/atm/ueagle-atm.c40074007+40084008+INA209 HARDWARE MONITOR DRIVER40094009+M: Guenter Roeck <linux@roeck-us.net>40104010+L: lm-sensors@lm-sensors.org40114011+S: Maintained40124012+F: Documentation/hwmon/ina20940134013+F: Documentation/devicetree/bindings/i2c/ina209.txt40144014+F: drivers/hwmon/ina209.c40154015+40164016+INA2XX HARDWARE MONITOR DRIVER40174017+M: Guenter Roeck <linux@roeck-us.net>40184018+L: lm-sensors@lm-sensors.org40194019+S: Maintained40204020+F: Documentation/hwmon/ina2xx40214021+F: drivers/hwmon/ina2xx.c40224022+F: include/linux/platform_data/ina2xx.h4001402340024024INDUSTRY PACK SUBSYSTEM (IPACK)40034025M: Samuel Iglesias Gonsalvez <siglesias@igalia.com>···51075097S: Maintained51085098F: Documentation/hwmon/max665051095099F: drivers/hwmon/max6650.c51005100+51015101+MAX6697 HARDWARE MONITOR DRIVER51025102+M: Guenter Roeck <linux@roeck-us.net>51035103+L: lm-sensors@lm-sensors.org51045104+S: Maintained51055105+F: Documentation/hwmon/max669751065106+F: Documentation/devicetree/bindings/i2c/max6697.txt51075107+F: drivers/hwmon/max6697.c51085108+F: include/linux/platform_data/max6697.h5110510951115110MAXIRADIO FM RADIO RECEIVER DRIVER51125111M: Hans Verkuil <hverkuil@xs4all.nl>···71927173S: Maintained71937174F: drivers/net/ethernet/sis/sis900.*7194717571957195-SIS 96X I2C/SMBUS DRIVER71967196-M: "Mark M. Hoffman" <mhoffman@lightlink.com>71977197-L: linux-i2c@vger.kernel.org71987198-S: Maintained71997199-F: Documentation/i2c/busses/i2c-sis96x72007200-F: drivers/i2c/busses/i2c-sis96x.c72017201-72027176SIS FRAMEBUFFER DRIVER72037177M: Thomas Winischhofer <thomas@winischhofer.net>72047178W: http://www.winischhofer.net/linuxsisvga.shtml···72697257F: drivers/hwmon/sch5627.c7270725872717259SMSC47B397 HARDWARE MONITOR DRIVER72727272-M: "Mark M. Hoffman" <mhoffman@lightlink.com>72607260+M: Jean Delvare <khali@linux-fr.org>72737261L: lm-sensors@lm-sensors.org72747262S: Maintained72757263F: Documentation/hwmon/smsc47b397
···319319 select ARCH_WANT_COMPAT_IPC_PARSE_VERSION320320 bool321321322322-config HAVE_VIRT_TO_BUS323323- bool324324- help325325- An architecture should select this if it implements the326326- deprecated interface virt_to_bus(). All new architectures327327- should probably not select this.328328-329322config HAVE_ARCH_SECCOMP_FILTER330323 bool331324 help
···4949 select HAVE_REGS_AND_STACK_ACCESS_API5050 select HAVE_SYSCALL_TRACEPOINTS5151 select HAVE_UID165252- select HAVE_VIRT_TO_BUS5352 select KTIME_SCALAR5453 select PERF_USE_VMALLOC5554 select RTC_LIB···555556config ARCH_DOVE556557 bool "Marvell Dove"557558 select ARCH_REQUIRE_GPIOLIB558558- select COMMON_CLK_DOVE559559 select CPU_V7560560 select GENERIC_CLOCKEVENTS561561 select MIGHT_HAVE_PCI···742744 select NEED_MACH_IO_H743745 select NEED_MACH_MEMORY_H744746 select NO_IOPORT747747+ select VIRT_TO_BUS745748 help746749 On the Acorn Risc-PC, Linux can support the internal IDE disk and747750 CD-ROM interface, serial and parallel port, and the floppy drive.···878879 select ISA_DMA879880 select NEED_MACH_MEMORY_H880881 select PCI882882+ select VIRT_TO_BUS881883 select ZONE_DMA882884 help883885 Support for the StrongARM based Digital DNARD machine, also known···10061006 bool1007100710081008config ARCH_MULTI_V610091009- bool "ARMv6 based platforms (ARM11, Scorpion, ...)"10091009+ bool "ARMv6 based platforms (ARM11)"10101010 select ARCH_MULTI_V6_V710111011 select CPU_V61012101210131013config ARCH_MULTI_V710141014- bool "ARMv7 based platforms (Cortex-A, PJ4, Krait)"10141014+ bool "ARMv7 based platforms (Cortex-A, PJ4, Scorpion, Krait)"10151015 default y10161016 select ARCH_MULTI_V6_V710171017 select ARCH_VEXPRESS···14621462 bool14631463 select ISA_DMA_API1464146414651465-config ARCH_NO_VIRT_TO_BUS14661466- def_bool y14671467- depends on !ARCH_RPC && !ARCH_NETWINDER && !ARCH_SHARK14681468-14691465# Select ISA DMA interface14701466config ISA_DMA_API14711467 bool···16531657 accounting to be spread across the timer interval, preventing a16541658 "thundering herd" at every timer tick.1655165916601660+# The GPIO number here must be sorted by descending number. In case of16611661+# a multiplatform kernel, we just want the highest value required by the16621662+# selected platforms.16561663config ARCH_NR_GPIO16571664 int16581665 default 1024 if ARCH_SHMOBILE || ARCH_TEGRA16591659- default 355 if ARCH_U850016601660- default 264 if MACH_H470016611666 default 512 if SOC_OMAP516671667+ default 355 if ARCH_U850016621668 default 288 if ARCH_VT8500 || ARCH_SUNXI16691669+ default 264 if MACH_H470016631670 default 016641671 help16651672 Maximum number of GPIOs in the system.···1886188718871888config XEN18881889 bool "Xen guest support on ARM (EXPERIMENTAL)"18891889- depends on ARM && OF18901890+ depends on ARM && AEABI && OF18901891 depends on CPU_V7 && !CPU_V618921892+ depends on !GENERIC_ATOMIC6418911893 help18921894 Say Y if you want to run Linux in a Virtual Machine on Xen on ARM.18931895
···6464 status = "okay";6565 /* No CD or WP GPIOs */6666 };6767+6868+ usb@d0050000 {6969+ status = "okay";7070+ };7171+7272+ usb@d0051000 {7373+ status = "okay";7474+ };6775 };6876};
···126126CONFIG_INPUT_TWL4030_PWRBUTTON=y127127CONFIG_VT_HW_CONSOLE_BINDING=y128128# CONFIG_LEGACY_PTYS is not set129129+CONFIG_SERIAL_8250=y130130+CONFIG_SERIAL_8250_CONSOLE=y129131CONFIG_SERIAL_8250_NR_UARTS=32130132CONFIG_SERIAL_8250_EXTENDED=y131133CONFIG_SERIAL_8250_MANY_PORTS=y
+4-21
arch/arm/include/asm/xen/events.h
···22#define _ASM_ARM_XEN_EVENTS_H3344#include <asm/ptrace.h>55+#include <asm/atomic.h>5667enum ipi_vector {78 XEN_PLACEHOLDER_VECTOR,···1615 return raw_irqs_disabled_flags(regs->ARM_cpsr);1716}18171919-/*2020- * We cannot use xchg because it does not support 8-byte2121- * values. However it is safe to use {ldr,dtd}exd directly because all2222- * platforms which Xen can run on support those instructions.2323- */2424-static inline xen_ulong_t xchg_xen_ulong(xen_ulong_t *ptr, xen_ulong_t val)2525-{2626- xen_ulong_t oldval;2727- unsigned int tmp;2828-2929- wmb();3030- asm volatile("@ xchg_xen_ulong\n"3131- "1: ldrexd %0, %H0, [%3]\n"3232- " strexd %1, %2, %H2, [%3]\n"3333- " teq %1, #0\n"3434- " bne 1b"3535- : "=&r" (oldval), "=&r" (tmp)3636- : "r" (val), "r" (ptr)3737- : "memory", "cc");3838- return oldval;3939-}1818+#define xchg_xen_ulong(ptr, val) atomic64_xchg(container_of((ptr), \1919+ atomic64_t, \2020+ counter), (val))40214122#endif /* _ASM_ARM_XEN_EVENTS_H */
···14141515 .text1616 .align 51717- .word 01818-1919-1: subs r2, r2, #4 @ 1 do we have enough2020- blt 5f @ 1 bytes to align with?2121- cmp r3, #2 @ 12222- strltb r1, [ip], #1 @ 12323- strleb r1, [ip], #1 @ 12424- strb r1, [ip], #1 @ 12525- add r2, r2, r3 @ 1 (r2 = r2 - (4 - r3))2626-/*2727- * The pointer is now aligned and the length is adjusted. Try doing the2828- * memset again.2929- */30173118ENTRY(memset)3232-/*3333- * Preserve the contents of r0 for the return value.3434- */3535- mov ip, r03636- ands r3, ip, #3 @ 1 unaligned?3737- bne 1b @ 11919+ ands r3, r0, #3 @ 1 unaligned?2020+ mov ip, r0 @ preserve r0 as return value2121+ bne 6f @ 13822/*3923 * we know that the pointer in ip is aligned to a word boundary.4024 */4141- orr r1, r1, r1, lsl #82525+1: orr r1, r1, r1, lsl #84226 orr r1, r1, r1, lsl #164327 mov r3, r14428 cmp r2, #16···111127 tst r2, #1112128 strneb r1, [ip], #1113129 mov pc, lr130130+131131+6: subs r2, r2, #4 @ 1 do we have enough132132+ blt 5b @ 1 bytes to align with?133133+ cmp r3, #2 @ 1134134+ strltb r1, [ip], #1 @ 1135135+ strleb r1, [ip], #1 @ 1136136+ strb r1, [ip], #1 @ 1137137+ add r2, r2, r3 @ 1 (r2 = r2 - (4 - r3))138138+ b 1b114139ENDPROC(memset)
+1
arch/arm/mach-at91/board-foxg20.c
···176176 /* If you choose to use a pin other than PB16 it needs to be 3.3V */177177 .pin = AT91_PIN_PB16,178178 .is_open_drain = 1,179179+ .ext_pullup_enable_pin = -EINVAL,179180};180181181182static struct platform_device w1_device = {
···92929393void at91_irq_suspend(void)9494{9595- int i = 0, bit;9595+ int bit = -1;96969797 if (has_aic5()) {9898 /* disable enabled irqs */9999- while ((bit = find_next_bit(backups, n_irqs, i)) < n_irqs) {9999+ while ((bit = find_next_bit(backups, n_irqs, bit + 1)) < n_irqs) {100100 at91_aic_write(AT91_AIC5_SSR,101101 bit & AT91_AIC5_INTSEL_MSK);102102 at91_aic_write(AT91_AIC5_IDCR, 1);103103- i = bit;104103 }105104 /* enable wakeup irqs */106106- i = 0;107107- while ((bit = find_next_bit(wakeups, n_irqs, i)) < n_irqs) {105105+ bit = -1;106106+ while ((bit = find_next_bit(wakeups, n_irqs, bit + 1)) < n_irqs) {108107 at91_aic_write(AT91_AIC5_SSR,109108 bit & AT91_AIC5_INTSEL_MSK);110109 at91_aic_write(AT91_AIC5_IECR, 1);111111- i = bit;112110 }113111 } else {114112 at91_aic_write(AT91_AIC_IDCR, *backups);···116118117119void at91_irq_resume(void)118120{119119- int i = 0, bit;121121+ int bit = -1;120122121123 if (has_aic5()) {122124 /* disable wakeup irqs */123123- while ((bit = find_next_bit(wakeups, n_irqs, i)) < n_irqs) {125125+ while ((bit = find_next_bit(wakeups, n_irqs, bit + 1)) < n_irqs) {124126 at91_aic_write(AT91_AIC5_SSR,125127 bit & AT91_AIC5_INTSEL_MSK);126128 at91_aic_write(AT91_AIC5_IDCR, 1);127127- i = bit;128129 }129130 /* enable irqs disabled for suspend */130130- i = 0;131131- while ((bit = find_next_bit(backups, n_irqs, i)) < n_irqs) {131131+ bit = -1;132132+ while ((bit = find_next_bit(backups, n_irqs, bit + 1)) < n_irqs) {132133 at91_aic_write(AT91_AIC5_SSR,133134 bit & AT91_AIC5_INTSEL_MSK);134135 at91_aic_write(AT91_AIC5_IECR, 1);135135- i = bit;136136 }137137 } else {138138 at91_aic_write(AT91_AIC_IDCR, *wakeups);
+8-2
arch/arm/mach-at91/pm.c
···201201202202static int at91_pm_enter(suspend_state_t state)203203{204204- at91_gpio_suspend();204204+ if (of_have_populated_dt())205205+ at91_pinctrl_gpio_suspend();206206+ else207207+ at91_gpio_suspend();205208 at91_irq_suspend();206209207210 pr_debug("AT91: PM - wake mask %08x, pm state %d\n",···289286error:290287 target_state = PM_SUSPEND_ON;291288 at91_irq_resume();292292- at91_gpio_resume();289289+ if (of_have_populated_dt())290290+ at91_pinctrl_gpio_resume();291291+ else292292+ at91_gpio_resume();293293 return 0;294294}295295
+3
arch/arm/mach-davinci/dma.c
···743743 */744744int edma_alloc_slot(unsigned ctlr, int slot)745745{746746+ if (!edma_cc[ctlr])747747+ return -EINVAL;748748+746749 if (slot >= 0)747750 slot = EDMA_CHAN_SLOT(slot);748751
+1
arch/arm/mach-footbridge/Kconfig
···6767 select ISA6868 select ISA_DMA6969 select PCI7070+ select VIRT_TO_BUS7071 help7172 Say Y here if you intend to run this kernel on the Rebel.COM7273 NetWinder. Information about this machine can be found at:
+1
arch/arm/mach-imx/clk-imx35.c
···264264 clk_prepare_enable(clk[gpio3_gate]);265265 clk_prepare_enable(clk[iim_gate]);266266 clk_prepare_enable(clk[emi_gate]);267267+ clk_prepare_enable(clk[max_gate]);267268268269 /*269270 * SCC is needed to boot via mmc after a watchdog reset. The clock code
···26262727#ifdef CONFIG_PM2828/*2929- * The following code is located into the .data section. This is to3030- * allow phys_l2x0_saved_regs to be accessed with a relative load3131- * as we are running on physical address here.2929+ * The following code must assume it is running from physical address3030+ * where absolute virtual addresses to the data section have to be3131+ * turned into relative ones.3232 */3333- .data3434- .align35333634#ifdef CONFIG_CACHE_L2X03735 .macro pl310_resume3838- ldr r2, phys_l2x0_saved_regs3636+ adr r0, l2x0_saved_regs_offset3737+ ldr r2, [r0]3838+ add r2, r2, r03939 ldr r0, [r2, #L2X0_R_PHY_BASE] @ get physical base of l2x04040 ldr r1, [r2, #L2X0_R_AUX_CTRL] @ get aux_ctrl value4141 str r1, [r0, #L2X0_AUX_CTRL] @ restore aux_ctrl···4343 str r1, [r0, #L2X0_CTRL] @ re-enable L24444 .endm45454646- .globl phys_l2x0_saved_regs4747-phys_l2x0_saved_regs:4848- .long 04646+l2x0_saved_regs_offset:4747+ .word l2x0_saved_regs - .4848+4949#else5050 .macro pl310_resume5151 .endm
···2222#include "common.h"2323#include "hardware.h"24242525-extern unsigned long phys_l2x0_saved_regs;2626-2725static int imx6q_suspend_finish(unsigned long val)2826{2927 cpu_do_idle();···55575658void __init imx6q_pm_init(void)5759{5858- /*5959- * The l2x0 core code provides an infrastucture to save and restore6060- * l2x0 registers across suspend/resume cycle. But because imx6q6161- * retains L2 content during suspend and needs to resume L2 before6262- * MMU is enabled, it can only utilize register saving support and6363- * have to take care of restoring on its own. So we save physical6464- * address of the data structure used by l2x0 core to save registers,6565- * and later restore the necessary ones in imx6q resume entry.6666- */6767-#ifdef CONFIG_CACHE_L2X06868- phys_l2x0_saved_regs = __pa(&l2x0_saved_regs);6969-#endif7070-7160 suspend_set_ops(&imx6q_pm_ops);7261}
···11221122 /* TODO: remove, see function definition */11231123 gpmc_convert_ps_to_ns(gpmc_t);1124112411251125- /* Now the GPMC is initialised, unreserve the chip-selects */11261126- gpmc_cs_map = 0;11271127-11281125 return 0;11291126}11301127···1379138213801383 if (IS_ERR_VALUE(gpmc_setup_irq()))13811384 dev_warn(gpmc_dev, "gpmc_setup_irq failed\n");13851385+13861386+ /* Now the GPMC is initialised, unreserve the chip-selects */13871387+ gpmc_cs_map = 0;1382138813831389 rc = gpmc_probe_dt(pdev);13841390 if (rc < 0) {
+5-4
arch/arm/mach-omap2/mux.c
···211211 return -EINVAL;212212 }213213214214- pr_err("%s: Could not find signal %s\n", __func__, muxname);215215-216214 return -ENODEV;217215}218216···231233232234 return mux_mode;233235 }236236+237237+ pr_err("%s: Could not find signal %s\n", __func__, muxname);234238235239 return -ENODEV;236240}···739739 list_for_each_entry(e, &partition->muxmodes, node) {740740 struct omap_mux *m = &e->mux;741741742742- (void)debugfs_create_file(m->muxnames[0], S_IWUSR, mux_dbg_dir,743743- m, &omap_mux_dbg_signal_fops);742742+ (void)debugfs_create_file(m->muxnames[0], S_IWUSR | S_IRUGO,743743+ mux_dbg_dir, m,744744+ &omap_mux_dbg_signal_fops);744745 }745746}746747
···576576 /* x = ((*(frame + k)) & 0xf) << 2; */577577 ctx->seen |= SEEN_X | SEEN_DATA | SEEN_CALL;578578 /* the interpreter should deal with the negative K */579579- if (k < 0)579579+ if ((int)k < 0)580580 return -1;581581 /* offset in r1: we might have to take the slow path */582582 emit_mov_i(r_off, k, ctx);
+5-2
arch/arm/plat-orion/addr-map.c
···157157 u32 size = readl(ddr_window_cpu_base + DDR_SIZE_CS_OFF(i));158158159159 /*160160- * Chip select enabled?160160+ * We only take care of entries for which the chip161161+ * select is enabled, and that don't have high base162162+ * address bits set (devices can only access the first163163+ * 32 bits of the memory).161164 */162162- if (size & 1) {165165+ if ((size & 1) && !(base & 0xF)) {163166 struct mbus_dram_window *w;164167165168 w = &orion_mbus_dram_info.cs[cs++];
···66 bool77 default y8899-config DEBUG_ERRORS1010- bool "Verbose kernel error messages"1111- depends on DEBUG_KERNEL1212- help1313- This option controls verbose debugging information which can be1414- printed when the kernel detects an internal error. This debugging1515- information is useful to kernel hackers when tracking down problems,1616- but mostly meaningless to other people. It's safe to say Y unless1717- you are concerned with the code size or don't want to see these1818- messages.1919-209config DEBUG_STACK_USAGE2110 bool "Enable stack utilization instrumentation"2211 depends on DEBUG_KERNEL
-1
arch/arm64/configs/defconfig
···8282CONFIG_DEBUG_INFO=y8383# CONFIG_FTRACE is not set8484CONFIG_ATOMIC64_SELFTEST=y8585-CONFIG_DEBUG_ERRORS=y
···6363 long long st_size;6464 unsigned long st_blksize;65656666-#if defined(__BIG_ENDIAN)6666+#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN)6767 unsigned long __pad4; /* future possible st_blocks high bits */6868 unsigned long st_blocks; /* Number 512-byte blocks allocated. */6969-#elif defined(__LITTLE_ENDIAN)6969+#elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)7070 unsigned long st_blocks; /* Number 512-byte blocks allocated. */7171 unsigned long __pad4; /* future possible st_blocks high bits */7272#else
···310310config SOM5282EM311311 bool "EMAC.Inc SOM5282EM board support"312312 depends on M528x313313- select EMAC_INC314313 help315314 Support for the EMAC.Inc SOM5282EM module.316315
···188188 }189189 }190190191191-#if !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)191191+#if defined(CONFIG_MMU) && !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)192192 /* insert pointer tables allocated so far into the tablelist */193193 init_pointer_table((unsigned long)kernel_pg_dir);194194 for (i = 0; i < PTRS_PER_PGD; i++) {
+1-1
arch/m68k/platform/coldfire/m528x.c
···6969 u8 port;70707171 /* make sure PUAPAR is set for UART0 and UART1 */7272- port = readb(MCF5282_GPIO_PUAPAR);7272+ port = readb(MCFGPIO_PUAPAR);7373 port |= 0x03 | (0x03 << 2);7474 writeb(port, MCFGPIO_PUAPAR);7575}
···343343/*344344 * VSID allocation (256MB segment)345345 *346346- * We first generate a 38-bit "proto-VSID". For kernel addresses this347347- * is equal to the ESID | 1 << 37, for user addresses it is:348348- * (context << USER_ESID_BITS) | (esid & ((1U << USER_ESID_BITS) - 1)346346+ * We first generate a 37-bit "proto-VSID". Proto-VSIDs are generated347347+ * from mmu context id and effective segment id of the address.349348 *350350- * This splits the proto-VSID into the below range351351- * 0 - (2^(CONTEXT_BITS + USER_ESID_BITS) - 1) : User proto-VSID range352352- * 2^(CONTEXT_BITS + USER_ESID_BITS) - 2^(VSID_BITS) : Kernel proto-VSID range353353- *354354- * We also have CONTEXT_BITS + USER_ESID_BITS = VSID_BITS - 1355355- * That is, we assign half of the space to user processes and half356356- * to the kernel.349349+ * For user processes max context id is limited to ((1ul << 19) - 5)350350+ * for kernel space, we use the top 4 context ids to map address as below351351+ * NOTE: each context only support 64TB now.352352+ * 0x7fffc - [ 0xc000000000000000 - 0xc0003fffffffffff ]353353+ * 0x7fffd - [ 0xd000000000000000 - 0xd0003fffffffffff ]354354+ * 0x7fffe - [ 0xe000000000000000 - 0xe0003fffffffffff ]355355+ * 0x7ffff - [ 0xf000000000000000 - 0xf0003fffffffffff ]357356 *358357 * The proto-VSIDs are then scrambled into real VSIDs with the359358 * multiplicative hash:···362363 * VSID_MULTIPLIER is prime, so in particular it is363364 * co-prime to VSID_MODULUS, making this a 1:1 scrambling function.364365 * Because the modulus is 2^n-1 we can compute it efficiently without365365- * a divide or extra multiply (see below).366366+ * a divide or extra multiply (see below). The scramble function gives367367+ * robust scattering in the hash table (at least based on some initial368368+ * results).366369 *367367- * This scheme has several advantages over older methods:370370+ * We also consider VSID 0 special. We use VSID 0 for slb entries mapping371371+ * bad address. This enables us to consolidate bad address handling in372372+ * hash_page.368373 *369369- * - We have VSIDs allocated for every kernel address370370- * (i.e. everything above 0xC000000000000000), except the very top371371- * segment, which simplifies several things.372372- *373373- * - We allow for USER_ESID_BITS significant bits of ESID and374374- * CONTEXT_BITS bits of context for user addresses.375375- * i.e. 64T (46 bits) of address space for up to half a million contexts.376376- *377377- * - The scramble function gives robust scattering in the hash378378- * table (at least based on some initial results). The previous379379- * method was more susceptible to pathological cases giving excessive380380- * hash collisions.374374+ * We also need to avoid the last segment of the last context, because that375375+ * would give a protovsid of 0x1fffffffff. That will result in a VSID 0376376+ * because of the modulo operation in vsid scramble. But the vmemmap377377+ * (which is what uses region 0xf) will never be close to 64TB in size378378+ * (it's 56 bytes per page of system memory).381379 */380380+381381+#define CONTEXT_BITS 19382382+#define ESID_BITS 18383383+#define ESID_BITS_1T 6384384+385385+/*386386+ * 256MB segment387387+ * The proto-VSID space has 2^(CONTEX_BITS + ESID_BITS) - 1 segments388388+ * available for user + kernel mapping. The top 4 contexts are used for389389+ * kernel mapping. Each segment contains 2^28 bytes. Each390390+ * context maps 2^46 bytes (64TB) so we can support 2^19-1 contexts391391+ * (19 == 37 + 28 - 46).392392+ */393393+#define MAX_USER_CONTEXT ((ASM_CONST(1) << CONTEXT_BITS) - 5)382394383395/*384396 * This should be computed such that protovosid * vsid_mulitplier385397 * doesn't overflow 64 bits. It should also be co-prime to vsid_modulus386398 */387399#define VSID_MULTIPLIER_256M ASM_CONST(12538073) /* 24-bit prime */388388-#define VSID_BITS_256M 38400400+#define VSID_BITS_256M (CONTEXT_BITS + ESID_BITS)389401#define VSID_MODULUS_256M ((1UL<<VSID_BITS_256M)-1)390402391403#define VSID_MULTIPLIER_1T ASM_CONST(12538073) /* 24-bit prime */392392-#define VSID_BITS_1T 26404404+#define VSID_BITS_1T (CONTEXT_BITS + ESID_BITS_1T)393405#define VSID_MODULUS_1T ((1UL<<VSID_BITS_1T)-1)394406395395-#define CONTEXT_BITS 19396396-#define USER_ESID_BITS 18397397-#define USER_ESID_BITS_1T 6398407399399-#define USER_VSID_RANGE (1UL << (USER_ESID_BITS + SID_SHIFT))408408+#define USER_VSID_RANGE (1UL << (ESID_BITS + SID_SHIFT))400409401410/*402411 * This macro generates asm code to compute the VSID scramble···428421 srdi rx,rt,VSID_BITS_##size; \429422 clrldi rt,rt,(64-VSID_BITS_##size); \430423 add rt,rt,rx; /* add high and low bits */ \431431- /* Now, r3 == VSID (mod 2^36-1), and lies between 0 and \424424+ /* NOTE: explanation based on VSID_BITS_##size = 36 \425425+ * Now, r3 == VSID (mod 2^36-1), and lies between 0 and \432426 * 2^36-1+2^28-1. That in particular means that if r3 >= \433427 * 2^36-1, then r3+1 has the 2^36 bit set. So, if r3+1 has \434428 * the bit clear, r3 already has the answer we want, if it \···521513 })522514#endif /* 1 */523515524524-/*525525- * This is only valid for addresses >= PAGE_OFFSET526526- * The proto-VSID space is divided into two class527527- * User: 0 to 2^(CONTEXT_BITS + USER_ESID_BITS) -1528528- * kernel: 2^(CONTEXT_BITS + USER_ESID_BITS) to 2^(VSID_BITS) - 1529529- *530530- * With KERNEL_START at 0xc000000000000000, the proto vsid for531531- * the kernel ends up with 0xc00000000 (36 bits). With 64TB532532- * support we need to have kernel proto-VSID in the533533- * [2^37 to 2^38 - 1] range due to the increased USER_ESID_BITS.534534- */535535-static inline unsigned long get_kernel_vsid(unsigned long ea, int ssize)536536-{537537- unsigned long proto_vsid;538538- /*539539- * We need to make sure proto_vsid for the kernel is540540- * >= 2^(CONTEXT_BITS + USER_ESID_BITS[_1T])541541- */542542- if (ssize == MMU_SEGSIZE_256M) {543543- proto_vsid = ea >> SID_SHIFT;544544- proto_vsid |= (1UL << (CONTEXT_BITS + USER_ESID_BITS));545545- return vsid_scramble(proto_vsid, 256M);546546- }547547- proto_vsid = ea >> SID_SHIFT_1T;548548- proto_vsid |= (1UL << (CONTEXT_BITS + USER_ESID_BITS_1T));549549- return vsid_scramble(proto_vsid, 1T);550550-}551551-552516/* Returns the segment size indicator for a user address */553517static inline int user_segment_size(unsigned long addr)554518{···530550 return MMU_SEGSIZE_256M;531551}532552533533-/* This is only valid for user addresses (which are below 2^44) */534553static inline unsigned long get_vsid(unsigned long context, unsigned long ea,535554 int ssize)536555{556556+ /*557557+ * Bad address. We return VSID 0 for that558558+ */559559+ if ((ea & ~REGION_MASK) >= PGTABLE_RANGE)560560+ return 0;561561+537562 if (ssize == MMU_SEGSIZE_256M)538538- return vsid_scramble((context << USER_ESID_BITS)563563+ return vsid_scramble((context << ESID_BITS)539564 | (ea >> SID_SHIFT), 256M);540540- return vsid_scramble((context << USER_ESID_BITS_1T)565565+ return vsid_scramble((context << ESID_BITS_1T)541566 | (ea >> SID_SHIFT_1T), 1T);542567}543568569569+/*570570+ * This is only valid for addresses >= PAGE_OFFSET571571+ *572572+ * For kernel space, we use the top 4 context ids to map address as below573573+ * 0x7fffc - [ 0xc000000000000000 - 0xc0003fffffffffff ]574574+ * 0x7fffd - [ 0xd000000000000000 - 0xd0003fffffffffff ]575575+ * 0x7fffe - [ 0xe000000000000000 - 0xe0003fffffffffff ]576576+ * 0x7ffff - [ 0xf000000000000000 - 0xf0003fffffffffff ]577577+ */578578+static inline unsigned long get_kernel_vsid(unsigned long ea, int ssize)579579+{580580+ unsigned long context;581581+582582+ /*583583+ * kernel take the top 4 context from the available range584584+ */585585+ context = (MAX_USER_CONTEXT) + ((ea >> 60) - 0xc) + 1;586586+ return get_vsid(context, ea, ssize);587587+}544588#endif /* __ASSEMBLY__ */545589546590#endif /* _ASM_POWERPC_MMU_HASH64_H_ */
···14521452_GLOBAL(do_stab_bolted)14531453 stw r9,PACA_EXSLB+EX_CCR(r13) /* save CR in exc. frame */14541454 std r11,PACA_EXSLB+EX_SRR0(r13) /* save SRR0 in exc. frame */14551455+ mfspr r11,SPRN_DAR /* ea */1455145614571457+ /*14581458+ * check for bad kernel/user address14591459+ * (ea & ~REGION_MASK) >= PGTABLE_RANGE14601460+ */14611461+ rldicr. r9,r11,4,(63 - 46 - 4)14621462+ li r9,0 /* VSID = 0 for bad address */14631463+ bne- 0f14641464+14651465+ /*14661466+ * Calculate VSID:14671467+ * This is the kernel vsid, we take the top for context from14681468+ * the range. context = (MAX_USER_CONTEXT) + ((ea >> 60) - 0xc) + 114691469+ * Here we know that (ea >> 60) == 0xc14701470+ */14711471+ lis r9,(MAX_USER_CONTEXT + 1)@ha14721472+ addi r9,r9,(MAX_USER_CONTEXT + 1)@l14731473+14741474+ srdi r10,r11,SID_SHIFT14751475+ rldimi r10,r9,ESID_BITS,0 /* proto vsid */14761476+ ASM_VSID_SCRAMBLE(r10, r9, 256M)14771477+ rldic r9,r10,12,16 /* r9 = vsid << 12 */14781478+14791479+0:14561480 /* Hash to the primary group */14571481 ld r10,PACASTABVIRT(r13)14581458- mfspr r11,SPRN_DAR14591459- srdi r11,r11,2814821482+ srdi r11,r11,SID_SHIFT14601483 rldimi r10,r11,7,52 /* r10 = first ste of the group */14611461-14621462- /* Calculate VSID */14631463- /* This is a kernel address, so protovsid = ESID | 1 << 37 */14641464- li r9,0x114651465- rldimi r11,r9,(CONTEXT_BITS + USER_ESID_BITS),014661466- ASM_VSID_SCRAMBLE(r11, r9, 256M)14671467- rldic r9,r11,12,16 /* r9 = vsid << 12 */1468148414691485 /* Search the primary group for a free entry */147014861: ld r11,0(r10) /* Test valid bit of the current ste */
+7-7
arch/powerpc/kernel/prom_init.c
···28322832{28332833}28342834#else28352835-static void __reloc_toc(void *tocstart, unsigned long offset,28362836- unsigned long nr_entries)28352835+static void __reloc_toc(unsigned long offset, unsigned long nr_entries)28372836{28382837 unsigned long i;28392839- unsigned long *toc_entry = (unsigned long *)tocstart;28382838+ unsigned long *toc_entry;28392839+28402840+ /* Get the start of the TOC by using r2 directly. */28412841+ asm volatile("addi %0,2,-0x8000" : "=b" (toc_entry));2840284228412843 for (i = 0; i < nr_entries; i++) {28422844 *toc_entry = *toc_entry + offset;···28522850 unsigned long nr_entries =28532851 (__prom_init_toc_end - __prom_init_toc_start) / sizeof(long);2854285228552855- /* Need to add offset to get at __prom_init_toc_start */28562856- __reloc_toc(__prom_init_toc_start + offset, offset, nr_entries);28532853+ __reloc_toc(offset, nr_entries);2857285428582855 mb();28592856}···2865286428662865 mb();2867286628682868- /* __prom_init_toc_start has been relocated, no need to add offset */28692869- __reloc_toc(__prom_init_toc_start, -offset, nr_entries);28672867+ __reloc_toc(-offset, nr_entries);28702868}28712869#endif28722870#endif
···6969 return IRQ_HANDLED;7070};71717272-static int __devinit gpio_halt_probe(struct platform_device *pdev)7272+static int gpio_halt_probe(struct platform_device *pdev)7373{7474 enum of_gpio_flags flags;7575 struct device_node *node = pdev->dev.of_node;···128128 return 0;129129}130130131131-static int __devexit gpio_halt_remove(struct platform_device *pdev)131131+static int gpio_halt_remove(struct platform_device *pdev)132132{133133 if (halt_node) {134134 int gpio = of_get_gpio(halt_node, 0);···165165 .of_match_table = gpio_halt_match,166166 },167167 .probe = gpio_halt_probe,168168- .remove = __devexit_p(gpio_halt_remove),168168+ .remove = gpio_halt_remove,169169};170170171171module_platform_driver(gpio_halt_driver);
+2-4
arch/powerpc/platforms/Kconfig.cputype
···124124 select PPC_HAVE_PMU_SUPPORT125125126126config POWER3127127- bool128127 depends on PPC64 && PPC_BOOK3S129129- default y if !POWER4_ONLY128128+ def_bool y130129131130config POWER4132131 depends on PPC64 && PPC_BOOK3S···144145 but somewhat slower on other machines. This option only changes145146 the scheduling of instructions, not the selection of instructions146147 itself, so the resulting kernel will keep running on all other147147- machines. When building a kernel that is supposed to run only148148- on Cell, you should also select the POWER4_ONLY option.148148+ machines.149149150150# this is temp to handle compat with arch=ppc151151config 8xx
···74747575static inline void __tlb_flush_mm(struct mm_struct * mm)7676{7777- if (unlikely(cpumask_empty(mm_cpumask(mm))))7878- return;7977 /*8078 * If the machine has IDTE we prefer to do a per mm flush8179 * on all cpus instead of doing a local flush if the mm
···8484 default "arch/sparc/configs/sparc32_defconfig" if SPARC328585 default "arch/sparc/configs/sparc64_defconfig" if SPARC6486868787-# CONFIG_BITS can be used at source level to get 32/64 bits8888-config BITS8989- int9090- default 32 if SPARC329191- default 64 if SPARC649292-9387config IOMMU_HELPER9488 bool9589 default y if SPARC64···191197192198config GENERIC_HWEIGHT193199 bool194194- default y if !ULTRA_HAS_POPULATION_COUNT200200+ default y195201196202config GENERIC_CALIBRATE_DELAY197203 bool
···465465 return result;466466}467467468468-static int acpi_processor_get_performance_info(struct acpi_processor *pr)468468+int acpi_processor_get_performance_info(struct acpi_processor *pr)469469{470470 int result = 0;471471 acpi_status status = AE_OK;···509509#endif510510 return result;511511}512512-512512+EXPORT_SYMBOL_GPL(acpi_processor_get_performance_info);513513int acpi_processor_notify_smm(struct module *calling_module)514514{515515 acpi_status status;
+1-1
drivers/amba/tegra-ahb.c
···158158EXPORT_SYMBOL(tegra_ahb_enable_smmu);159159#endif160160161161-#ifdef CONFIG_PM_SLEEP161161+#ifdef CONFIG_PM162162static int tegra_ahb_suspend(struct device *dev)163163{164164 int i;
···9292{9393 int err;94949595+ if (vq) {9696+ /* We only support one device for now */9797+ return -EBUSY;9898+ }9599 /* We expect a single virtqueue. */96100 vq = virtio_find_single_vq(vdev, random_recv_done, "input");9797- if (IS_ERR(vq))9898- return PTR_ERR(vq);101101+ if (IS_ERR(vq)) {102102+ err = PTR_ERR(vq);103103+ vq = NULL;104104+ return err;105105+ }99106100107 err = hwrng_register(&virtio_hwrng);101108 if (err) {102109 vdev->config->del_vqs(vdev);110110+ vq = NULL;103111 return err;104112 }105113···120112 busy = false;121113 hwrng_unregister(&virtio_hwrng);122114 vdev->config->del_vqs(vdev);115115+ vq = NULL;123116}124117125118static int virtrng_probe(struct virtio_device *vdev)
+1-1
drivers/clk/clk-vt8500.c
···157157 divisor = parent_rate / rate;158158159159 /* If prate / rate would be decimal, incr the divisor */160160- if (rate * divisor < *prate)160160+ if (rate * divisor < parent_rate)161161 divisor++;162162163163 if (divisor == cdev->div_mask + 1)
-1
drivers/clk/tegra/clk-tegra20.c
···12921292 TEGRA_CLK_DUPLICATE(usbd, "tegra-ehci.0", NULL),12931293 TEGRA_CLK_DUPLICATE(usbd, "tegra-otg", NULL),12941294 TEGRA_CLK_DUPLICATE(cclk, NULL, "cpu"),12951295- TEGRA_CLK_DUPLICATE(twd, "smp_twd", NULL),12961295 TEGRA_CLK_DUPLICATE(clk_max, NULL, NULL), /* Must be the last entry */12971296};12981297
-1
drivers/clk/tegra/clk-tegra30.c
···19311931 TEGRA_CLK_DUPLICATE(cml1, "tegra_sata_cml", NULL),19321932 TEGRA_CLK_DUPLICATE(cml0, "tegra_pcie", "cml"),19331933 TEGRA_CLK_DUPLICATE(pciex, "tegra_pcie", "pciex"),19341934- TEGRA_CLK_DUPLICATE(twd, "smp_twd", NULL),19351934 TEGRA_CLK_DUPLICATE(vcp, "nvavp", "vcp"),19361935 TEGRA_CLK_DUPLICATE(clk_max, NULL, NULL), /* MUST be the last entry */19371936};
+7
drivers/gpio/gpio-mvebu.c
···4242#include <linux/io.h>4343#include <linux/of_irq.h>4444#include <linux/of_device.h>4545+#include <linux/clk.h>4546#include <linux/pinctrl/consumer.h>46474748/*···497496 struct resource *res;498497 struct irq_chip_generic *gc;499498 struct irq_chip_type *ct;499499+ struct clk *clk;500500 unsigned int ngpios;501501 int soc_variant;502502 int i, cpu, id;···530528 dev_err(&pdev->dev, "Couldn't get OF id\n");531529 return id;532530 }531531+532532+ clk = devm_clk_get(&pdev->dev, NULL);533533+ /* Not all SoCs require a clock.*/534534+ if (!IS_ERR(clk))535535+ clk_prepare_enable(clk);533536534537 mvchip->soc_variant = soc_variant;535538 mvchip->chip.label = dev_name(&pdev->dev);
···116116{117117 struct nouveau_abi16_ntfy *ntfy, *temp;118118119119+ /* wait for all activity to stop before releasing notify object, which120120+ * may be still in use */121121+ if (chan->chan && chan->ntfy)122122+ nouveau_channel_idle(chan->chan);123123+119124 /* cleanup notifier state */120125 list_for_each_entry_safe(ntfy, temp, &chan->notifiers, head) {121126 nouveau_abi16_ntfy_fini(chan, ntfy);
+2-2
drivers/gpu/drm/nouveau/nouveau_bo.c
···801801 stride = 16 * 4;802802 height = amount / stride;803803804804- if (new_mem->mem_type == TTM_PL_VRAM &&804804+ if (old_mem->mem_type == TTM_PL_VRAM &&805805 nouveau_bo_tile_layout(nvbo)) {806806 ret = RING_SPACE(chan, 8);807807 if (ret)···823823 BEGIN_NV04(chan, NvSubCopy, 0x0200, 1);824824 OUT_RING (chan, 1);825825 }826826- if (old_mem->mem_type == TTM_PL_VRAM &&826826+ if (new_mem->mem_type == TTM_PL_VRAM &&827827 nouveau_bo_tile_layout(nvbo)) {828828 ret = RING_SPACE(chan, 8);829829 if (ret)
···2525 which contains this code, we don't worry about the wasted space.2626*/27272828-#include <linux/hwmon.h>2828+#include <linux/kernel.h>29293030/* straight from the datasheet */3131#define LM75_TEMP_MIN (-55000)
+8-6
drivers/hwmon/pmbus/ltc2978.c
···5959struct ltc2978_data {6060 enum chips id;6161 int vin_min, vin_max;6262- int temp_min, temp_max;6262+ int temp_min, temp_max[2];6363 int vout_min[8], vout_max[8];6464 int iout_max[2];6565 int temp2_max;···113113 ret = pmbus_read_word_data(client, page,114114 LTC2978_MFR_TEMPERATURE_PEAK);115115 if (ret >= 0) {116116- if (lin11_to_val(ret) > lin11_to_val(data->temp_max))117117- data->temp_max = ret;118118- ret = data->temp_max;116116+ if (lin11_to_val(ret)117117+ > lin11_to_val(data->temp_max[page]))118118+ data->temp_max[page] = ret;119119+ ret = data->temp_max[page];119120 }120121 break;121122 case PMBUS_VIRT_RESET_VOUT_HISTORY:···267266 break;268267 case PMBUS_VIRT_RESET_TEMP_HISTORY:269268 data->temp_min = 0x7bff;270270- data->temp_max = 0x7c00;269269+ data->temp_max[page] = 0x7c00;271270 ret = ltc2978_clear_peaks(client, page, data->id);272271 break;273272 default:···324323 data->vin_min = 0x7bff;325324 data->vin_max = 0x7c00;326325 data->temp_min = 0x7bff;327327- data->temp_max = 0x7c00;326326+ for (i = 0; i < ARRAY_SIZE(data->temp_max); i++)327327+ data->temp_max[i] = 0x7c00;328328 data->temp2_max = 0x7c00;329329330330 switch (data->id) {
···4455menuconfig I2C66 tristate "I2C support"77- depends on !S39087 select RT_MUTEXES98 ---help---109 I2C (pronounce: I-squared-C) is a slow serial bus protocol used in···75767677config I2C_SMBUS7778 tristate "SMBus-specific protocols" if !I2C_HELPER_AUTO7979+ depends on GENERIC_HARDIRQS7880 help7981 Say Y here if you want support for SMBus extensions to the I2C8082 specification. At the moment, the only supported extension is
+4-2
drivers/i2c/busses/Kconfig
···114114115115config I2C_ISCH116116 tristate "Intel SCH SMBus 1.0"117117- depends on PCI117117+ depends on PCI && GENERIC_HARDIRQS118118 select LPC_SCH119119 help120120 Say Y here if you want to use SMBus controller on the Intel SCH···543543544544config I2C_OCORES545545 tristate "OpenCores I2C Controller"546546+ depends on GENERIC_HARDIRQS546547 help547548 If you say yes to this option, support will be included for the548549 OpenCores I2C controller. For details see···778777779778config I2C_PARPORT780779 tristate "Parallel port adapter"781781- depends on PARPORT780780+ depends on PARPORT && GENERIC_HARDIRQS782781 select I2C_ALGOBIT783782 select I2C_SMBUS784783 help···803802804803config I2C_PARPORT_LIGHT805804 tristate "Parallel port adapter (light)"805805+ depends on GENERIC_HARDIRQS806806 select I2C_ALGOBIT807807 select I2C_SMBUS808808 help
+4-5
drivers/iio/common/st_sensors/st_sensors_core.c
···6262int st_sensors_set_odr(struct iio_dev *indio_dev, unsigned int odr)6363{6464 int err;6565- struct st_sensor_odr_avl odr_out;6565+ struct st_sensor_odr_avl odr_out = {0, 0};6666 struct st_sensor_data *sdata = iio_priv(indio_dev);67676868 err = st_sensors_match_odr(sdata->sensor, odr, &odr_out);···114114115115static int st_sensors_set_fullscale(struct iio_dev *indio_dev, unsigned int fs)116116{117117- int err, i;117117+ int err, i = 0;118118 struct st_sensor_data *sdata = iio_priv(indio_dev);119119120120 err = st_sensors_match_fs(sdata->sensor, fs, &i);···139139140140int st_sensors_set_enable(struct iio_dev *indio_dev, bool enable)141141{142142- bool found;143142 u8 tmp_value;144143 int err = -EINVAL;145145- struct st_sensor_odr_avl odr_out;144144+ bool found = false;145145+ struct st_sensor_odr_avl odr_out = {0, 0};146146 struct st_sensor_data *sdata = iio_priv(indio_dev);147147148148 if (enable) {149149- found = false;150149 tmp_value = sdata->sensor->pw.value_on;151150 if ((sdata->sensor->odr.addr == sdata->sensor->pw.addr) &&152151 (sdata->sensor->odr.mask == sdata->sensor->pw.mask)) {
···158158#define GET_TIME(x) rdtscl(x)159159#define DELTA(x,y) ((y)-(x))160160#define TIME_NAME "TSC"161161-#elif defined(__alpha__)161161+#elif defined(__alpha__) || defined(CONFIG_MN10300) || defined(CONFIG_ARM) || defined(CONFIG_TILE)162162#define GET_TIME(x) do { x = get_cycles(); } while (0)163163#define DELTA(x,y) ((y)-(x))164164-#define TIME_NAME "PCC"165165-#elif defined(CONFIG_MN10300) || defined(CONFIG_TILE)166166-#define GET_TIME(x) do { x = get_cycles(); } while (0)167167-#define DELTA(x, y) ((x) - (y))168168-#define TIME_NAME "TSC"164164+#define TIME_NAME "get_cycles"169165#else170166#define FAKE_TIME171167static unsigned long analog_faketime = 0;
+1-1
drivers/irqchip/irq-gic.c
···648648649649 /* Convert our logical CPU mask into a physical one. */650650 for_each_cpu(cpu, mask)651651- map |= 1 << cpu_logical_map(cpu);651651+ map |= gic_cpu_map[cpu];652652653653 /*654654 * Ensure that stores to Normal memory are visible to the
+4-2
drivers/isdn/hisax/Kconfig
···237237238238config HISAX_NETJET239239 bool "NETjet card"240240- depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))240240+ depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))241241+ depends on VIRT_TO_BUS241242 help242243 This enables HiSax support for the NetJet from Traverse243244 Technologies.···249248250249config HISAX_NETJET_U251250 bool "NETspider U card"252252- depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))251251+ depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))252252+ depends on VIRT_TO_BUS253253 help254254 This enables HiSax support for the Netspider U interface ISDN card255255 from Traverse Technologies.
+1
drivers/mfd/Kconfig
···858858config AB8500_CORE859859 bool "ST-Ericsson AB8500 Mixed Signal Power Management chip"860860 depends on GENERIC_HARDIRQS && ABX500_CORE && MFD_DB8500_PRCMU861861+ select POWER_SUPPLY861862 select MFD_CORE862863 select IRQ_DOMAIN863864 help
+13-4
drivers/mfd/ab8500-gpadc.c
···594594static int ab8500_gpadc_runtime_resume(struct device *dev)595595{596596 struct ab8500_gpadc *gpadc = dev_get_drvdata(dev);597597+ int ret;597598598598- regulator_enable(gpadc->regu);599599- return 0;599599+ ret = regulator_enable(gpadc->regu);600600+ if (ret)601601+ dev_err(dev, "Failed to enable vtvout LDO: %d\n", ret);602602+ return ret;600603}601604602605static int ab8500_gpadc_runtime_idle(struct device *dev)···646643 }647644648645 /* VTVout LDO used to power up ab8500-GPADC */649649- gpadc->regu = regulator_get(&pdev->dev, "vddadc");646646+ gpadc->regu = devm_regulator_get(&pdev->dev, "vddadc");650647 if (IS_ERR(gpadc->regu)) {651648 ret = PTR_ERR(gpadc->regu);652649 dev_err(gpadc->dev, "failed to get vtvout LDO\n");···655652656653 platform_set_drvdata(pdev, gpadc);657654658658- regulator_enable(gpadc->regu);655655+ ret = regulator_enable(gpadc->regu);656656+ if (ret) {657657+ dev_err(gpadc->dev, "Failed to enable vtvout LDO: %d\n", ret);658658+ goto fail_enable;659659+ }659660660661 pm_runtime_set_autosuspend_delay(gpadc->dev, GPADC_AUDOSUSPEND_DELAY);661662 pm_runtime_use_autosuspend(gpadc->dev);···670663 list_add_tail(&gpadc->node, &ab8500_gpadc_list);671664 dev_dbg(gpadc->dev, "probe success\n");672665 return 0;666666+667667+fail_enable:673668fail_irq:674669 free_irq(gpadc->irq, gpadc);675670fail:
···118118 * Disable the resource.119119 * The function returns with error or the content of the register120120 */121121-int twl4030_audio_disable_resource(unsigned id)121121+int twl4030_audio_disable_resource(enum twl4030_audio_res id)122122{123123 struct twl4030_audio *audio = platform_get_drvdata(twl4030_audio_dev);124124 int val;
···1746174617471747 bond_compute_features(bond);1748174817491749+ bond_update_speed_duplex(new_slave);17501750+17491751 read_lock(&bond->lock);1750175217511753 new_slave->last_arp_rx = jiffies -···17991797 pr_debug("Initial state of slave_dev is BOND_LINK_%s\n",18001798 new_slave->link == BOND_LINK_DOWN ? "DOWN" :18011799 (new_slave->link == BOND_LINK_UP ? "UP" : "BACK"));18021802-18031803- bond_update_speed_duplex(new_slave);1804180018051801 if (USES_PRIMARY(bond->params.mode) && bond->params.primary[0]) {18061802 /* if there is a primary slave, remember it */···23732373 /* prevent it from being the active one */23742374 bond_set_backup_slave(slave);23752375 }23762376-23772377- bond_update_speed_duplex(slave);2378237623792377 pr_info("%s: link status definitely up for interface %s, %u Mbps %s duplex.\n",23802378 bond->dev->name, slave->dev->name,
···42714271 tp->link_config.active_speed = tp->link_config.speed;42724272 tp->link_config.active_duplex = tp->link_config.duplex;4273427342744274+ if (tg3_asic_rev(tp) == ASIC_REV_5714) {42754275+ /* With autoneg disabled, 5715 only links up when the42764276+ * advertisement register has the configured speed42774277+ * enabled.42784278+ */42794279+ tg3_writephy(tp, MII_ADVERTISE, ADVERTISE_ALL);42804280+ }42814281+42744282 bmcr = 0;42754283 switch (tp->link_config.speed) {42764284 default:
+1
drivers/net/ethernet/dec/tulip/Kconfig
···108108config DE4X5109109 tristate "Generic DECchip & DIGITAL EtherWORKS PCI/EISA"110110 depends on (PCI || EISA)111111+ depends on VIRT_TO_BUS || ALPHA || PPC || SPARC111112 select CRC32112113 ---help---113114 This is support for the DIGITAL series of PCI/EISA Ethernet cards.
+19-14
drivers/net/ethernet/freescale/fec.c
···931931 goto spin_unlock;932932 }933933934934- /* Duplex link change */935934 if (phy_dev->link) {936936- if (fep->full_duplex != phy_dev->duplex) {937937- fec_restart(ndev, phy_dev->duplex);938938- /* prevent unnecessary second fec_restart() below */935935+ if (!fep->link) {939936 fep->link = phy_dev->link;940937 status_change = 1;941938 }942942- }943939944944- /* Link on or off change */945945- if (phy_dev->link != fep->link) {946946- fep->link = phy_dev->link;947947- if (phy_dev->link)940940+ if (fep->full_duplex != phy_dev->duplex)941941+ status_change = 1;942942+943943+ if (phy_dev->speed != fep->speed) {944944+ fep->speed = phy_dev->speed;945945+ status_change = 1;946946+ }947947+948948+ /* if any of the above changed restart the FEC */949949+ if (status_change)948950 fec_restart(ndev, phy_dev->duplex);949949- else951951+ } else {952952+ if (fep->link) {950953 fec_stop(ndev);951951- status_change = 1;954954+ status_change = 1;955955+ }952956 }953957954958spin_unlock:···13291325static void fec_enet_free_buffers(struct net_device *ndev)13301326{13311327 struct fec_enet_private *fep = netdev_priv(ndev);13321332- int i;13281328+ unsigned int i;13331329 struct sk_buff *skb;13341330 struct bufdesc *bdp;13351331···13531349static int fec_enet_alloc_buffers(struct net_device *ndev)13541350{13551351 struct fec_enet_private *fep = netdev_priv(ndev);13561356- int i;13521352+ unsigned int i;13571353 struct sk_buff *skb;13581354 struct bufdesc *bdp;13591355···14381434 struct fec_enet_private *fep = netdev_priv(ndev);1439143514401436 /* Don't know what to do yet. */14371437+ napi_disable(&fep->napi);14411438 fep->opened = 0;14421439 netif_stop_queue(ndev);14431440 fec_stop(ndev);···15951590 struct fec_enet_private *fep = netdev_priv(ndev);15961591 struct bufdesc *cbd_base;15971592 struct bufdesc *bdp;15981598- int i;15931593+ unsigned int i;1599159416001595 /* Allocate memory for buffer descriptors. */16011596 cbd_base = dma_alloc_coherent(NULL, PAGE_SIZE, &fep->bd_dma,
+1
drivers/net/ethernet/freescale/fec.h
···240240 phy_interface_t phy_interface;241241 int link;242242 int full_duplex;243243+ int speed;243244 struct completion mdio_done;244245 int irq[FEC_IRQ_NUM];245246 int bufdesc_ex;
+2-1
drivers/net/ethernet/nxp/lpc_eth.c
···14701470 }14711471 platform_set_drvdata(pdev, ndev);1472147214731473- if (lpc_mii_init(pldat) != 0)14731473+ ret = lpc_mii_init(pldat);14741474+ if (ret)14741475 goto err_out_unregister_netdev;1475147614761477 netdev_info(ndev, "LPC mac at 0x%08x irq %d\n",
+10
drivers/net/ethernet/renesas/sh_eth.c
···22152215/* MDIO bus release function */22162216static int sh_mdio_release(struct net_device *ndev)22172217{22182218+ struct sh_eth_private *mdp = netdev_priv(ndev);22182219 struct mii_bus *bus = dev_get_drvdata(&ndev->dev);2219222022202221 /* unregister mdio bus */···2229222822302229 /* free bitbang info */22312230 free_mdio_bitbang(bus);22312231+22322232+ /* free bitbang memory */22332233+ kfree(mdp->bitbang);2232223422332235 return 0;22342236}···22612257 bitbang->ctrl.ops = &bb_ops;2262225822632259 /* MII controller setting */22602260+ mdp->bitbang = bitbang;22642261 mdp->mii_bus = alloc_mdio_bitbang(&bitbang->ctrl);22652262 if (!mdp->mii_bus) {22662263 ret = -ENOMEM;···24412436 }24422437 mdp->tsu_addr = ioremap(rtsu->start,24432438 resource_size(rtsu));24392439+ if (mdp->tsu_addr == NULL) {24402440+ ret = -ENOMEM;24412441+ dev_err(&pdev->dev, "TSU ioremap failed.\n");24422442+ goto out_release;24432443+ }24442444 mdp->port = devno % 2;24452445 ndev->features = NETIF_F_HW_VLAN_FILTER;24462446 }
···376376 return false;377377378378 tx_queue->empty_read_count = 0;379379- return ((empty_read_count ^ write_count) & ~EFX_EMPTY_COUNT_VALID) == 0;379379+ return ((empty_read_count ^ write_count) & ~EFX_EMPTY_COUNT_VALID) == 0380380+ && tx_queue->write_count - write_count == 1;380381}381382382383/* For each entry inserted into the software descriptor ring, create a
+1-1
drivers/net/ethernet/ti/cpsw.c
···10061006 /* If there is no more tx desc left free then we need to10071007 * tell the kernel to stop sending us tx frames.10081008 */10091009- if (unlikely(cpdma_check_free_tx_desc(priv->txch)))10091009+ if (unlikely(!cpdma_check_free_tx_desc(priv->txch)))10101010 netif_stop_queue(ndev);1011101110121012 return NETDEV_TX_OK;
+1-1
drivers/net/ethernet/ti/davinci_emac.c
···11021102 /* If there is no more tx desc left free then we need to11031103 * tell the kernel to stop sending us tx frames.11041104 */11051105- if (unlikely(cpdma_check_free_tx_desc(priv->txchan)))11051105+ if (unlikely(!cpdma_check_free_tx_desc(priv->txchan)))11061106 netif_stop_queue(ndev);1107110711081108 return NETDEV_TX_OK;
···268268 select CRC16269269 select CRC32270270 help271271- This option adds support for SMSC LAN95XX based USB 2.0271271+ This option adds support for SMSC LAN75XX based USB 2.0272272 Gigabit Ethernet adapters.273273274274config USB_NET_SMSC95XX
+1-10
drivers/net/usb/cdc_mbim.c
···6868 struct cdc_ncm_ctx *ctx;6969 struct usb_driver *subdriver = ERR_PTR(-ENODEV);7070 int ret = -ENODEV;7171- u8 data_altsetting = CDC_NCM_DATA_ALTSETTING_NCM;7171+ u8 data_altsetting = cdc_ncm_select_altsetting(dev, intf);7272 struct cdc_mbim_state *info = (void *)&dev->data;7373-7474- /* see if interface supports MBIM alternate setting */7575- if (intf->num_altsetting == 2) {7676- if (!cdc_ncm_comm_intf_is_mbim(intf->cur_altsetting))7777- usb_set_interface(dev->udev,7878- intf->cur_altsetting->desc.bInterfaceNumber,7979- CDC_NCM_COMM_ALTSETTING_MBIM);8080- data_altsetting = CDC_NCM_DATA_ALTSETTING_MBIM;8181- }82738374 /* Probably NCM, defer for cdc_ncm_bind */8475 if (!cdc_ncm_comm_intf_is_mbim(intf->cur_altsetting))
+32-17
drivers/net/usb/cdc_ncm.c
···55555656#define DRIVER_VERSION "14-Mar-2012"57575858+#if IS_ENABLED(CONFIG_USB_NET_CDC_MBIM)5959+static bool prefer_mbim = true;6060+#else6161+static bool prefer_mbim;6262+#endif6363+module_param(prefer_mbim, bool, S_IRUGO | S_IWUSR);6464+MODULE_PARM_DESC(prefer_mbim, "Prefer MBIM setting on dual NCM/MBIM functions");6565+5866static void cdc_ncm_txpath_bh(unsigned long param);5967static void cdc_ncm_tx_timeout_start(struct cdc_ncm_ctx *ctx);6068static enum hrtimer_restart cdc_ncm_tx_timer_cb(struct hrtimer *hr_timer);···558550}559551EXPORT_SYMBOL_GPL(cdc_ncm_unbind);560552561561-static int cdc_ncm_bind(struct usbnet *dev, struct usb_interface *intf)553553+/* Select the MBIM altsetting iff it is preferred and available,554554+ * returning the number of the corresponding data interface altsetting555555+ */556556+u8 cdc_ncm_select_altsetting(struct usbnet *dev, struct usb_interface *intf)562557{563563- int ret;558558+ struct usb_host_interface *alt;564559565560 /* The MBIM spec defines a NCM compatible default altsetting,566561 * which we may have matched:···579568 * endpoint descriptors, shall be constructed according to580569 * the rules given in section 6 (USB Device Model) of this581570 * specification."582582- *583583- * Do not bind to such interfaces, allowing cdc_mbim to handle584584- * them585571 */586586-#if IS_ENABLED(CONFIG_USB_NET_CDC_MBIM)587587- if ((intf->num_altsetting == 2) &&588588- !usb_set_interface(dev->udev,589589- intf->cur_altsetting->desc.bInterfaceNumber,590590- CDC_NCM_COMM_ALTSETTING_MBIM)) {591591- if (cdc_ncm_comm_intf_is_mbim(intf->cur_altsetting))592592- return -ENODEV;593593- else594594- usb_set_interface(dev->udev,595595- intf->cur_altsetting->desc.bInterfaceNumber,596596- CDC_NCM_COMM_ALTSETTING_NCM);572572+ if (prefer_mbim && intf->num_altsetting == 2) {573573+ alt = usb_altnum_to_altsetting(intf, CDC_NCM_COMM_ALTSETTING_MBIM);574574+ if (alt && cdc_ncm_comm_intf_is_mbim(alt) &&575575+ !usb_set_interface(dev->udev,576576+ intf->cur_altsetting->desc.bInterfaceNumber,577577+ CDC_NCM_COMM_ALTSETTING_MBIM))578578+ return CDC_NCM_DATA_ALTSETTING_MBIM;597579 }598598-#endif580580+ return CDC_NCM_DATA_ALTSETTING_NCM;581581+}582582+EXPORT_SYMBOL_GPL(cdc_ncm_select_altsetting);583583+584584+static int cdc_ncm_bind(struct usbnet *dev, struct usb_interface *intf)585585+{586586+ int ret;587587+588588+ /* MBIM backwards compatible function? */589589+ cdc_ncm_select_altsetting(dev, intf);590590+ if (cdc_ncm_comm_intf_is_mbim(intf->cur_altsetting))591591+ return -ENODEV;599592600593 /* NCM data altsetting is always 1 */601594 ret = cdc_ncm_bind_common(dev, intf, 1);
+16-33
drivers/net/usb/qmi_wwan.c
···139139140140 BUILD_BUG_ON((sizeof(((struct usbnet *)0)->data) < sizeof(struct qmi_wwan_state)));141141142142- /* control and data is shared? */143143- if (intf->cur_altsetting->desc.bNumEndpoints == 3) {144144- info->control = intf;145145- info->data = intf;146146- goto shared;147147- }148148-149149- /* else require a single interrupt status endpoint on control intf */150150- if (intf->cur_altsetting->desc.bNumEndpoints != 1)151151- goto err;142142+ /* set up initial state */143143+ info->control = intf;144144+ info->data = intf;152145153146 /* and a number of CDC descriptors */154147 while (len > 3) {···200207 buf += h->bLength;201208 }202209203203- /* did we find all the required ones? */204204- if (!(found & (1 << USB_CDC_HEADER_TYPE)) ||205205- !(found & (1 << USB_CDC_UNION_TYPE))) {206206- dev_err(&intf->dev, "CDC functional descriptors missing\n");207207- goto err;208208- }209209-210210- /* verify CDC Union */211211- if (desc->bInterfaceNumber != cdc_union->bMasterInterface0) {212212- dev_err(&intf->dev, "bogus CDC Union: master=%u\n", cdc_union->bMasterInterface0);213213- goto err;214214- }215215-216216- /* need to save these for unbind */217217- info->control = intf;218218- info->data = usb_ifnum_to_if(dev->udev, cdc_union->bSlaveInterface0);219219- if (!info->data) {220220- dev_err(&intf->dev, "bogus CDC Union: slave=%u\n", cdc_union->bSlaveInterface0);221221- goto err;210210+ /* Use separate control and data interfaces if we found a CDC Union */211211+ if (cdc_union) {212212+ info->data = usb_ifnum_to_if(dev->udev, cdc_union->bSlaveInterface0);213213+ if (desc->bInterfaceNumber != cdc_union->bMasterInterface0 || !info->data) {214214+ dev_err(&intf->dev, "bogus CDC Union: master=%u, slave=%u\n",215215+ cdc_union->bMasterInterface0, cdc_union->bSlaveInterface0);216216+ goto err;217217+ }222218 }223219224220 /* errors aren't fatal - we can live with the dynamic address */···217235 }218236219237 /* claim data interface and set it up */220220- status = usb_driver_claim_interface(driver, info->data, dev);221221- if (status < 0)222222- goto err;238238+ if (info->control != info->data) {239239+ status = usb_driver_claim_interface(driver, info->data, dev);240240+ if (status < 0)241241+ goto err;242242+ }223243224224-shared:225244 status = qmi_wwan_register_subdriver(dev);226245 if (status < 0 && info->control != info->data) {227246 usb_set_intfdata(info->data, NULL);
+3-4
drivers/net/wireless/mwifiex/join.c
···11171117 adhoc_join->bss_descriptor.bssid,11181118 adhoc_join->bss_descriptor.ssid);1119111911201120- for (i = 0; bss_desc->supported_rates[i] &&11211121- i < MWIFIEX_SUPPORTED_RATES;11221122- i++)11231123- ;11201120+ for (i = 0; i < MWIFIEX_SUPPORTED_RATES &&11211121+ bss_desc->supported_rates[i]; i++)11221122+ ;11241123 rates_size = i;1125112411261125 /* Copy Data Rates from the Rates recorded in scan response */
+2-2
drivers/net/wireless/rt2x00/Kconfig
···55555656config RT2800PCI5757 tristate "Ralink rt27xx/rt28xx/rt30xx (PCI/PCIe/PCMCIA) support"5858- depends on PCI || RALINK_RT288X || RALINK_RT305X5858+ depends on PCI || SOC_RT288X || SOC_RT305X5959 select RT2800_LIB6060 select RT2X00_LIB_PCI if PCI6161- select RT2X00_LIB_SOC if RALINK_RT288X || RALINK_RT305X6161+ select RT2X00_LIB_SOC if SOC_RT288X || SOC_RT305X6262 select RT2X00_LIB_FIRMWARE6363 select RT2X00_LIB_CRYPTO6464 select CRC_CCITT
···100100 return min((size_t)(image - rom), size);101101}102102103103+static loff_t pci_find_rom(struct pci_dev *pdev, size_t *size)104104+{105105+ struct resource *res = &pdev->resource[PCI_ROM_RESOURCE];106106+ loff_t start;107107+108108+ /* assign the ROM an address if it doesn't have one */109109+ if (res->parent == NULL && pci_assign_resource(pdev, PCI_ROM_RESOURCE))110110+ return 0;111111+ start = pci_resource_start(pdev, PCI_ROM_RESOURCE);112112+ *size = pci_resource_len(pdev, PCI_ROM_RESOURCE);113113+114114+ if (*size == 0)115115+ return 0;116116+117117+ /* Enable ROM space decodes */118118+ if (pci_enable_rom(pdev))119119+ return 0;120120+121121+ return start;122122+}123123+103124/**104125 * pci_map_rom - map a PCI ROM to kernel space105126 * @pdev: pointer to pci device struct···135114void __iomem *pci_map_rom(struct pci_dev *pdev, size_t *size)136115{137116 struct resource *res = &pdev->resource[PCI_ROM_RESOURCE];138138- loff_t start;117117+ loff_t start = 0;139118 void __iomem *rom;140119141141- /*142142- * Some devices may provide ROMs via a source other than the BAR143143- */144144- if (pdev->rom && pdev->romlen) {145145- *size = pdev->romlen;146146- return phys_to_virt(pdev->rom);147120 /*148121 * IORESOURCE_ROM_SHADOW set on x86, x86_64 and IA64 supports legacy149122 * memory map if the VGA enable bit of the Bridge Control register is150123 * set for embedded VGA.151124 */152152- } else if (res->flags & IORESOURCE_ROM_SHADOW) {125125+ if (res->flags & IORESOURCE_ROM_SHADOW) {153126 /* primary video rom always starts here */154127 start = (loff_t)0xC0000;155128 *size = 0x20000; /* cover C000:0 through E000:0 */···154139 return (void __iomem *)(unsigned long)155140 pci_resource_start(pdev, PCI_ROM_RESOURCE);156141 } else {157157- /* assign the ROM an address if it doesn't have one */158158- if (res->parent == NULL &&159159- pci_assign_resource(pdev,PCI_ROM_RESOURCE))160160- return NULL;161161- start = pci_resource_start(pdev, PCI_ROM_RESOURCE);162162- *size = pci_resource_len(pdev, PCI_ROM_RESOURCE);163163- if (*size == 0)164164- return NULL;165165-166166- /* Enable ROM space decodes */167167- if (pci_enable_rom(pdev))168168- return NULL;142142+ start = pci_find_rom(pdev, size);169143 }170144 }145145+146146+ /*147147+ * Some devices may provide ROMs via a source other than the BAR148148+ */149149+ if (!start && pdev->rom && pdev->romlen) {150150+ *size = pdev->romlen;151151+ return phys_to_virt(pdev->rom);152152+ }153153+154154+ if (!start)155155+ return NULL;171156172157 rom = ioremap(start, *size);173158 if (!rom) {
+60-1
drivers/pinctrl/pinctrl-at91.c
···12771277}1278127812791279#ifdef CONFIG_PM12801280+12811281+static u32 wakeups[MAX_GPIO_BANKS];12821282+static u32 backups[MAX_GPIO_BANKS];12831283+12801284static int gpio_irq_set_wake(struct irq_data *d, unsigned state)12811285{12821286 struct at91_gpio_chip *at91_gpio = irq_data_get_irq_chip_data(d);12831287 unsigned bank = at91_gpio->pioc_idx;12881288+ unsigned mask = 1 << d->hwirq;1284128912851290 if (unlikely(bank >= MAX_GPIO_BANKS))12861291 return -EINVAL;12921292+12931293+ if (state)12941294+ wakeups[bank] |= mask;12951295+ else12961296+ wakeups[bank] &= ~mask;1287129712881298 irq_set_irq_wake(at91_gpio->pioc_virq, state);1289129912901300 return 0;12911301}13021302+13031303+void at91_pinctrl_gpio_suspend(void)13041304+{13051305+ int i;13061306+13071307+ for (i = 0; i < gpio_banks; i++) {13081308+ void __iomem *pio;13091309+13101310+ if (!gpio_chips[i])13111311+ continue;13121312+13131313+ pio = gpio_chips[i]->regbase;13141314+13151315+ backups[i] = __raw_readl(pio + PIO_IMR);13161316+ __raw_writel(backups[i], pio + PIO_IDR);13171317+ __raw_writel(wakeups[i], pio + PIO_IER);13181318+13191319+ if (!wakeups[i]) {13201320+ clk_unprepare(gpio_chips[i]->clock);13211321+ clk_disable(gpio_chips[i]->clock);13221322+ } else {13231323+ printk(KERN_DEBUG "GPIO-%c may wake for %08x\n",13241324+ 'A'+i, wakeups[i]);13251325+ }13261326+ }13271327+}13281328+13291329+void at91_pinctrl_gpio_resume(void)13301330+{13311331+ int i;13321332+13331333+ for (i = 0; i < gpio_banks; i++) {13341334+ void __iomem *pio;13351335+13361336+ if (!gpio_chips[i])13371337+ continue;13381338+13391339+ pio = gpio_chips[i]->regbase;13401340+13411341+ if (!wakeups[i]) {13421342+ if (clk_prepare(gpio_chips[i]->clock) == 0)13431343+ clk_enable(gpio_chips[i]->clock);13441344+ }13451345+13461346+ __raw_writel(wakeups[i], pio + PIO_IDR);13471347+ __raw_writel(backups[i], pio + PIO_IER);13481348+ }13491349+}13501350+12921351#else12931352#define gpio_irq_set_wake NULL12941294-#endif13531353+#endif /* CONFIG_PM */1295135412961355static struct irq_chip gpio_irqchip = {12971356 .name = "GPIO",
+24-4
drivers/rtc/rtc-mv.c
···1414#include <linux/platform_device.h>1515#include <linux/of.h>1616#include <linux/delay.h>1717+#include <linux/clk.h>1718#include <linux/gfp.h>1819#include <linux/module.h>1920···4241 struct rtc_device *rtc;4342 void __iomem *ioaddr;4443 int irq;4444+ struct clk *clk;4545};46464747static int mv_rtc_set_time(struct device *dev, struct rtc_time *tm)···223221 struct rtc_plat_data *pdata;224222 resource_size_t size;225223 u32 rtc_time;224224+ int ret = 0;226225227226 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);228227 if (!res)···242239 if (!pdata->ioaddr)243240 return -ENOMEM;244241242242+ pdata->clk = devm_clk_get(&pdev->dev, NULL);243243+ /* Not all SoCs require a clock.*/244244+ if (!IS_ERR(pdata->clk))245245+ clk_prepare_enable(pdata->clk);246246+245247 /* make sure the 24 hours mode is enabled */246248 rtc_time = readl(pdata->ioaddr + RTC_TIME_REG_OFFS);247249 if (rtc_time & RTC_HOURS_12H_MODE) {248250 dev_err(&pdev->dev, "24 Hours mode not supported.\n");249249- return -EINVAL;251251+ ret = -EINVAL;252252+ goto out;250253 }251254252255 /* make sure it is actually functional */···261252 rtc_time = readl(pdata->ioaddr + RTC_TIME_REG_OFFS);262253 if (rtc_time == 0x01000000) {263254 dev_err(&pdev->dev, "internal RTC not ticking\n");264264- return -ENODEV;255255+ ret = -ENODEV;256256+ goto out;265257 }266258 }267259···278268 } else279269 pdata->rtc = rtc_device_register(pdev->name, &pdev->dev,280270 &mv_rtc_ops, THIS_MODULE);281281- if (IS_ERR(pdata->rtc))282282- return PTR_ERR(pdata->rtc);271271+ if (IS_ERR(pdata->rtc)) {272272+ ret = PTR_ERR(pdata->rtc);273273+ goto out;274274+ }283275284276 if (pdata->irq >= 0) {285277 writel(0, pdata->ioaddr + RTC_ALARM_INTERRUPT_MASK_REG_OFFS);···294282 }295283296284 return 0;285285+out:286286+ if (!IS_ERR(pdata->clk))287287+ clk_disable_unprepare(pdata->clk);288288+289289+ return ret;297290}298291299292static int __exit mv_rtc_remove(struct platform_device *pdev)···309292 device_init_wakeup(&pdev->dev, 0);310293311294 rtc_device_unregister(pdata->rtc);295295+ if (!IS_ERR(pdata->clk))296296+ clk_disable_unprepare(pdata->clk);297297+312298 return 0;313299}314300
+62-7
drivers/s390/block/scm_blk.c
···135135 .release = scm_release,136136};137137138138+static bool scm_permit_request(struct scm_blk_dev *bdev, struct request *req)139139+{140140+ return rq_data_dir(req) != WRITE || bdev->state != SCM_WR_PROHIBIT;141141+}142142+138143static void scm_request_prepare(struct scm_request *scmrq)139144{140145 struct scm_blk_dev *bdev = scmrq->bdev;···200195201196 scm_release_cluster(scmrq);202197 blk_requeue_request(bdev->rq, scmrq->request);198198+ atomic_dec(&bdev->queued_reqs);203199 scm_request_done(scmrq);204200 scm_ensure_queue_restart(bdev);205201}206202207203void scm_request_finish(struct scm_request *scmrq)208204{205205+ struct scm_blk_dev *bdev = scmrq->bdev;206206+209207 scm_release_cluster(scmrq);210208 blk_end_request_all(scmrq->request, scmrq->error);209209+ atomic_dec(&bdev->queued_reqs);211210 scm_request_done(scmrq);212211}213212···227218 if (req->cmd_type != REQ_TYPE_FS)228219 continue;229220221221+ if (!scm_permit_request(bdev, req)) {222222+ scm_ensure_queue_restart(bdev);223223+ return;224224+ }230225 scmrq = scm_request_fetch();231226 if (!scmrq) {232227 SCM_LOG(5, "no request");···244231 return;245232 }246233 if (scm_need_cluster_request(scmrq)) {234234+ atomic_inc(&bdev->queued_reqs);247235 blk_start_request(req);248236 scm_initiate_cluster_request(scmrq);249237 return;250238 }251239 scm_request_prepare(scmrq);240240+ atomic_inc(&bdev->queued_reqs);252241 blk_start_request(req);253242254243 ret = scm_start_aob(scmrq->aob);···259244 scm_request_requeue(scmrq);260245 return;261246 }262262- atomic_inc(&bdev->queued_reqs);263247 }264248}265249···294280 tasklet_hi_schedule(&bdev->tasklet);295281}296282283283+static void scm_blk_handle_error(struct scm_request *scmrq)284284+{285285+ struct scm_blk_dev *bdev = scmrq->bdev;286286+ unsigned long flags;287287+288288+ if (scmrq->error != -EIO)289289+ goto restart;290290+291291+ /* For -EIO the response block is valid. */292292+ switch (scmrq->aob->response.eqc) {293293+ case EQC_WR_PROHIBIT:294294+ spin_lock_irqsave(&bdev->lock, flags);295295+ if (bdev->state != SCM_WR_PROHIBIT)296296+ pr_info("%lu: Write access to the SCM increment is suspended\n",297297+ (unsigned long) bdev->scmdev->address);298298+ bdev->state = SCM_WR_PROHIBIT;299299+ spin_unlock_irqrestore(&bdev->lock, flags);300300+ goto requeue;301301+ default:302302+ break;303303+ }304304+305305+restart:306306+ if (!scm_start_aob(scmrq->aob))307307+ return;308308+309309+requeue:310310+ spin_lock_irqsave(&bdev->rq_lock, flags);311311+ scm_request_requeue(scmrq);312312+ spin_unlock_irqrestore(&bdev->rq_lock, flags);313313+}314314+297315static void scm_blk_tasklet(struct scm_blk_dev *bdev)298316{299317 struct scm_request *scmrq;···339293 spin_unlock_irqrestore(&bdev->lock, flags);340294341295 if (scmrq->error && scmrq->retries-- > 0) {342342- if (scm_start_aob(scmrq->aob)) {343343- spin_lock_irqsave(&bdev->rq_lock, flags);344344- scm_request_requeue(scmrq);345345- spin_unlock_irqrestore(&bdev->rq_lock, flags);346346- }296296+ scm_blk_handle_error(scmrq);297297+347298 /* Request restarted or requeued, handle next. */348299 spin_lock_irqsave(&bdev->lock, flags);349300 continue;···353310 }354311355312 scm_request_finish(scmrq);356356- atomic_dec(&bdev->queued_reqs);357313 spin_lock_irqsave(&bdev->lock, flags);358314 }359315 spin_unlock_irqrestore(&bdev->lock, flags);···374332 }375333376334 bdev->scmdev = scmdev;335335+ bdev->state = SCM_OPER;377336 spin_lock_init(&bdev->rq_lock);378337 spin_lock_init(&bdev->lock);379338 INIT_LIST_HEAD(&bdev->finished_requests);···437394 del_gendisk(bdev->gendisk);438395 blk_cleanup_queue(bdev->gendisk->queue);439396 put_disk(bdev->gendisk);397397+}398398+399399+void scm_blk_set_available(struct scm_blk_dev *bdev)400400+{401401+ unsigned long flags;402402+403403+ spin_lock_irqsave(&bdev->lock, flags);404404+ if (bdev->state == SCM_WR_PROHIBIT)405405+ pr_info("%lu: Write access to the SCM increment is restored\n",406406+ (unsigned long) bdev->scmdev->address);407407+ bdev->state = SCM_OPER;408408+ spin_unlock_irqrestore(&bdev->lock, flags);440409}441410442411static int __init scm_blk_init(void)
···1313#include <asm/eadm.h>1414#include "scm_blk.h"15151616-static void notify(struct scm_device *scmdev)1616+static void scm_notify(struct scm_device *scmdev, enum scm_event event)1717{1818- pr_info("%lu: The capabilities of the SCM increment changed\n",1919- (unsigned long) scmdev->address);2020- SCM_LOG(2, "State changed");2121- SCM_LOG_STATE(2, scmdev);1818+ struct scm_blk_dev *bdev = dev_get_drvdata(&scmdev->dev);1919+2020+ switch (event) {2121+ case SCM_CHANGE:2222+ pr_info("%lu: The capabilities of the SCM increment changed\n",2323+ (unsigned long) scmdev->address);2424+ SCM_LOG(2, "State changed");2525+ SCM_LOG_STATE(2, scmdev);2626+ break;2727+ case SCM_AVAIL:2828+ SCM_LOG(2, "Increment available");2929+ SCM_LOG_STATE(2, scmdev);3030+ scm_blk_set_available(bdev);3131+ break;3232+ }2233}23342435static int scm_probe(struct scm_device *scmdev)···7564 .name = "scm_block",7665 .owner = THIS_MODULE,7766 },7878- .notify = notify,6767+ .notify = scm_notify,7968 .probe = scm_probe,8069 .remove = scm_remove,8170 .handler = scm_blk_irq,
+2
drivers/s390/char/sclp_cmd.c
···627627 struct read_storage_sccb *sccb;628628 int i, id, assigned, rc;629629630630+ if (OLDMEM_BASE) /* No standby memory in kdump mode */631631+ return 0;630632 if (!early_read_info_sccb_valid)631633 return 0;632634 if ((sclp_facilities & 0xe00000000000ULL) != 0xe00000000000ULL)
+17
drivers/s390/cio/chsc.c
···433433 " failed (rc=%d).\n", ret);434434}435435436436+static void chsc_process_sei_scm_avail(struct chsc_sei_nt0_area *sei_area)437437+{438438+ int ret;439439+440440+ CIO_CRW_EVENT(4, "chsc: scm available information\n");441441+ if (sei_area->rs != 7)442442+ return;443443+444444+ ret = scm_process_availability_information();445445+ if (ret)446446+ CIO_CRW_EVENT(0, "chsc: process availability information"447447+ " failed (rc=%d).\n", ret);448448+}449449+436450static void chsc_process_sei_nt2(struct chsc_sei_nt2_area *sei_area)437451{438452 switch (sei_area->cc) {···481467 break;482468 case 12: /* scm change notification */483469 chsc_process_sei_scm_change(sei_area);470470+ break;471471+ case 14: /* scm available notification */472472+ chsc_process_sei_scm_avail(sei_area);484473 break;485474 default: /* other stuff */486475 CIO_CRW_EVENT(2, "chsc: sei nt0 unhandled cc=%d\n",
···669669 if (device->flags & DEVICE_FLAGS_OPENED)670670 device_close(device->dev);671671672672- usb_put_dev(interface_to_usbdev(intf));673673-674672 return 0;675673}676674···678680679681 if (!device || !device->dev)680682 return -ENODEV;681681-682682- usb_get_dev(interface_to_usbdev(intf));683683684684 if (!(device->flags & DEVICE_FLAGS_OPENED))685685 device_open(device->dev);
+10-15
drivers/staging/zcache/ramster/tcp.c
···300300301301static int r2net_prep_nsw(struct r2net_node *nn, struct r2net_status_wait *nsw)302302{303303- int ret = 0;303303+ int ret;304304305305- do {306306- if (!idr_pre_get(&nn->nn_status_idr, GFP_ATOMIC)) {307307- ret = -EAGAIN;308308- break;309309- }310310- spin_lock(&nn->nn_lock);311311- ret = idr_get_new(&nn->nn_status_idr, nsw, &nsw->ns_id);312312- if (ret == 0)313313- list_add_tail(&nsw->ns_node_item,314314- &nn->nn_status_list);315315- spin_unlock(&nn->nn_lock);316316- } while (ret == -EAGAIN);305305+ spin_lock(&nn->nn_lock);306306+ ret = idr_alloc(&nn->nn_status_idr, nsw, 0, 0, GFP_ATOMIC);307307+ if (ret >= 0) {308308+ nsw->ns_id = ret;309309+ list_add_tail(&nsw->ns_node_item, &nn->nn_status_list);310310+ }311311+ spin_unlock(&nn->nn_lock);317312318318- if (ret == 0) {313313+ if (ret >= 0) {319314 init_waitqueue_head(&nsw->ns_wq);320315 nsw->ns_sys_status = R2NET_ERR_NONE;321316 nsw->ns_status = 0;317317+ return 0;322318 }323323-324319 return ret;325320}326321
+51-1
drivers/tty/serial/8250/8250.c
···301301 },302302 [PORT_8250_CIR] = {303303 .name = "CIR port"304304- }304304+ },305305+ [PORT_ALTR_16550_F32] = {306306+ .name = "Altera 16550 FIFO32",307307+ .fifo_size = 32,308308+ .tx_loadsz = 32,309309+ .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,310310+ .flags = UART_CAP_FIFO | UART_CAP_AFE,311311+ },312312+ [PORT_ALTR_16550_F64] = {313313+ .name = "Altera 16550 FIFO64",314314+ .fifo_size = 64,315315+ .tx_loadsz = 64,316316+ .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,317317+ .flags = UART_CAP_FIFO | UART_CAP_AFE,318318+ },319319+ [PORT_ALTR_16550_F128] = {320320+ .name = "Altera 16550 FIFO128",321321+ .fifo_size = 128,322322+ .tx_loadsz = 128,323323+ .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,324324+ .flags = UART_CAP_FIFO | UART_CAP_AFE,325325+ },305326};306327307328/* Uart divisor latch read */···34173396MODULE_PARM_DESC(probe_rsa, "Probe I/O ports for RSA");34183397#endif34193398MODULE_ALIAS_CHARDEV_MAJOR(TTY_MAJOR);33993399+34003400+#ifndef MODULE34013401+/* This module was renamed to 8250_core in 3.7. Keep the old "8250" name34023402+ * working as well for the module options so we don't break people. We34033403+ * need to keep the names identical and the convenient macros will happily34043404+ * refuse to let us do that by failing the build with redefinition errors34053405+ * of global variables. So we stick them inside a dummy function to avoid34063406+ * those conflicts. The options still get parsed, and the redefined34073407+ * MODULE_PARAM_PREFIX lets us keep the "8250." syntax alive.34083408+ *34093409+ * This is hacky. I'm sorry.34103410+ */34113411+static void __used s8250_options(void)34123412+{34133413+#undef MODULE_PARAM_PREFIX34143414+#define MODULE_PARAM_PREFIX "8250."34153415+34163416+ module_param_cb(share_irqs, ¶m_ops_uint, &share_irqs, 0644);34173417+ module_param_cb(nr_uarts, ¶m_ops_uint, &nr_uarts, 0644);34183418+ module_param_cb(skip_txen_test, ¶m_ops_uint, &skip_txen_test, 0644);34193419+#ifdef CONFIG_SERIAL_8250_RSA34203420+ __module_param_call(MODULE_PARAM_PREFIX, probe_rsa,34213421+ ¶m_array_ops, .arr = &__param_arr_probe_rsa,34223422+ 0444, -1);34233423+#endif34243424+}34253425+#else34263426+MODULE_ALIAS("8250");34273427+#endif
···429429{430430 struct uart_8250_port uart;431431 int ret, line, flags = dev_id->driver_data;432432+ struct resource *res = NULL;432433433434 if (flags & UNKNOWN_DEV) {434435 ret = serial_pnp_guess_board(dev);···440439 memset(&uart, 0, sizeof(uart));441440 if (pnp_irq_valid(dev, 0))442441 uart.port.irq = pnp_irq(dev, 0);443443- if ((flags & CIR_PORT) && pnp_port_valid(dev, 2)) {444444- uart.port.iobase = pnp_port_start(dev, 2);445445- uart.port.iotype = UPIO_PORT;446446- } else if (pnp_port_valid(dev, 0)) {447447- uart.port.iobase = pnp_port_start(dev, 0);442442+ if ((flags & CIR_PORT) && pnp_port_valid(dev, 2))443443+ res = pnp_get_resource(dev, IORESOURCE_IO, 2);444444+ else if (pnp_port_valid(dev, 0))445445+ res = pnp_get_resource(dev, IORESOURCE_IO, 0);446446+ if (pnp_resource_enabled(res)) {447447+ uart.port.iobase = res->start;448448 uart.port.iotype = UPIO_PORT;449449 } else if (pnp_mem_valid(dev, 0)) {450450 uart.port.mapbase = pnp_mem_start(dev, 0);
+2-2
drivers/tty/serial/Kconfig
···211211config SERIAL_SAMSUNG_UARTS_4212212 bool213213 depends on PLAT_SAMSUNG214214- default y if !(CPU_S3C2410 || SERIAL_S3C2412 || CPU_S3C2440 || CPU_S3C2442)214214+ default y if !(CPU_S3C2410 || CPU_S3C2412 || CPU_S3C2440 || CPU_S3C2442)215215 help216216 Internal node for the common case of 4 Samsung compatible UARTs217217218218config SERIAL_SAMSUNG_UARTS219219 int220220 depends on PLAT_SAMSUNG221221- default 6 if ARCH_S5P6450221221+ default 6 if CPU_S5P6450222222 default 4 if SERIAL_SAMSUNG_UARTS_4 || CPU_S3C2416223223 default 3224224 help
+4-4
drivers/tty/serial/bcm63xx_uart.c
···235235 */236236static void bcm_uart_do_rx(struct uart_port *port)237237{238238- struct tty_port *port = &port->state->port;238238+ struct tty_port *tty_port = &port->state->port;239239 unsigned int max_count;240240241241 /* limit number of char read in interrupt, should not be···260260 bcm_uart_writel(port, val, UART_CTL_REG);261261262262 port->icount.overrun++;263263- tty_insert_flip_char(port, 0, TTY_OVERRUN);263263+ tty_insert_flip_char(tty_port, 0, TTY_OVERRUN);264264 }265265266266 if (!(iestat & UART_IR_STAT(UART_IR_RXNOTEMPTY)))···299299300300301301 if ((cstat & port->ignore_status_mask) == 0)302302- tty_insert_flip_char(port, c, flag);302302+ tty_insert_flip_char(tty_port, c, flag);303303304304 } while (--max_count);305305306306- tty_flip_buffer_push(port);306306+ tty_flip_buffer_push(tty_port);307307}308308309309/*
···17571757/**17581758 * usb_composite_probe() - register a composite driver17591759 * @driver: the driver to register17601760- * @bind: the callback used to allocate resources that are shared across the17611761- * whole device, such as string IDs, and add its configurations using17621762- * @usb_add_config(). This may fail by returning a negative errno17631763- * value; it should return zero on successful initialization.17601760+ *17641761 * Context: single threaded during gadget setup17651762 *17661763 * This function is used to register drivers using the composite driver
···240240 snd = &card->playback;241241 snd->filp = filp_open(fn_play, O_WRONLY, 0);242242 if (IS_ERR(snd->filp)) {243243+ int ret = PTR_ERR(snd->filp);244244+243245 ERROR(card, "No such PCM playback device: %s\n", fn_play);244246 snd->filp = NULL;247247+ return ret;245248 }246249 pcm_file = snd->filp->private_data;247250 snd->substream = pcm_file->substream;
+2-4
drivers/usb/host/ehci-hcd.c
···748748 /* guard against (alleged) silicon errata */749749 if (cmd & CMD_IAAD)750750 ehci_dbg(ehci, "IAA with IAAD still set?\n");751751- if (ehci->async_iaa) {751751+ if (ehci->async_iaa)752752 COUNT(ehci->stats.iaa);753753- end_unlink_async(ehci);754754- } else755755- ehci_dbg(ehci, "IAA with nothing unlinked?\n");753753+ end_unlink_async(ehci);756754 }757755758756 /* remote wakeup [4.3.1] */
+27-9
drivers/usb/host/ehci-q.c
···135135 * qtd is updated in qh_completions(). Update the QH136136 * overlay here.137137 */138138- if (cpu_to_hc32(ehci, qtd->qtd_dma) == qh->hw->hw_current) {138138+ if (qh->hw->hw_token & ACTIVE_BIT(ehci)) {139139 qh->hw->hw_qtd_next = qtd->hw_next;140140 qtd = NULL;141141 }···449449 else if (last_status == -EINPROGRESS && !urb->unlinked)450450 continue;451451452452- /* qh unlinked; token in overlay may be most current */453453- if (state == QH_STATE_IDLE454454- && cpu_to_hc32(ehci, qtd->qtd_dma)455455- == hw->hw_current) {452452+ /*453453+ * If this was the active qtd when the qh was unlinked454454+ * and the overlay's token is active, then the overlay455455+ * hasn't been written back to the qtd yet so use its456456+ * token instead of the qtd's. After the qtd is457457+ * processed and removed, the overlay won't be valid458458+ * any more.459459+ */460460+ if (state == QH_STATE_IDLE &&461461+ qh->qtd_list.next == &qtd->qtd_list &&462462+ (hw->hw_token & ACTIVE_BIT(ehci))) {456463 token = hc32_to_cpu(ehci, hw->hw_token);464464+ hw->hw_token &= ~ACTIVE_BIT(ehci);457465458466 /* An unlink may leave an incomplete459467 * async transaction in the TT buffer.···11781170 struct ehci_qh *prev;1179117111801172 /* Add to the end of the list of QHs waiting for the next IAAD */11811181- qh->qh_state = QH_STATE_UNLINK;11731173+ qh->qh_state = QH_STATE_UNLINK_WAIT;11821174 if (ehci->async_unlink)11831175 ehci->async_unlink_last->unlink_next = qh;11841176 else···1221121312221214 /* Do only the first waiting QH (nVidia bug?) */12231215 qh = ehci->async_unlink;12241224- ehci->async_iaa = qh;12251225- ehci->async_unlink = qh->unlink_next;12261226- qh->unlink_next = NULL;12161216+12171217+ /*12181218+ * Intel (?) bug: The HC can write back the overlay region12191219+ * even after the IAA interrupt occurs. In self-defense,12201220+ * always go through two IAA cycles for each QH.12211221+ */12221222+ if (qh->qh_state == QH_STATE_UNLINK_WAIT) {12231223+ qh->qh_state = QH_STATE_UNLINK;12241224+ } else {12251225+ ehci->async_iaa = qh;12261226+ ehci->async_unlink = qh->unlink_next;12271227+ qh->unlink_next = NULL;12281228+ }1227122912281230 /* Make sure the unlinks are all visible to the hardware */12291231 wmb();
-5
drivers/usb/musb/Kconfig
···77config USB_MUSB_HDRC88 tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)'99 depends on USB && USB_GADGET1010- select NOP_USB_XCEIV if (ARCH_DAVINCI || MACH_OMAP3EVM || BLACKFIN)1111- select NOP_USB_XCEIV if (SOC_TI81XX || SOC_AM33XX)1212- select TWL4030_USB if MACH_OMAP_3430SDP1313- select TWL6030_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA1414- select OMAP_CONTROL_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA1510 select USB_OTG_UTILS1611 help1712 Say Y here if your system has a dual role high speed USB
-6
drivers/usb/musb/musb_core.c
···1624162416251625/*-------------------------------------------------------------------------*/1626162616271627-#ifdef CONFIG_SYSFS16281628-16291627static ssize_t16301628musb_mode_show(struct device *dev, struct device_attribute *attr, char *buf)16311629{···17391741static const struct attribute_group musb_attr_group = {17401742 .attrs = musb_attributes,17411743};17421742-17431743-#endif /* sysfs */1744174417451745/* Only used to provide driver mode change events */17461746static void musb_irq_work(struct work_struct *data)···19641968 if (status < 0)19651969 goto fail4;1966197019671967-#ifdef CONFIG_SYSFS19681971 status = sysfs_create_group(&musb->controller->kobj, &musb_attr_group);19691972 if (status)19701973 goto fail5;19711971-#endif1972197419731975 pm_runtime_put(musb->controller);19741976
+8-4
drivers/usb/musb/omap2430.c
···5151};5252#define glue_to_musb(g) platform_get_drvdata(g->musb)53535454-struct omap2430_glue *_glue;5454+static struct omap2430_glue *_glue;55555656static struct timer_list musb_idle_timer;5757···237237{238238 struct omap2430_glue *glue = _glue;239239240240- if (glue && glue_to_musb(glue)) {241241- glue->status = status;242242- } else {240240+ if (!glue) {241241+ pr_err("%s: musb core is not yet initialized\n", __func__);242242+ return;243243+ }244244+ glue->status = status;245245+246246+ if (!glue_to_musb(glue)) {243247 pr_err("%s: musb core is not yet ready\n", __func__);244248 return;245249 }
+7-3
drivers/usb/otg/otg.c
···130130 spin_lock_irqsave(&phy_lock, flags);131131132132 phy = __usb_find_phy(&phy_list, type);133133- if (IS_ERR(phy)) {133133+ if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) {134134 pr_err("unable to find transceiver of type %s\n",135135 usb_phy_type_string(type));136136 goto err0;···228228 spin_lock_irqsave(&phy_lock, flags);229229230230 phy = __usb_find_phy_dev(dev, &phy_bind_list, index);231231- if (IS_ERR(phy)) {231231+ if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) {232232 pr_err("unable to find transceiver\n");233233 goto err0;234234 }···301301 */302302void usb_put_phy(struct usb_phy *x)303303{304304- if (x)304304+ if (x) {305305+ struct module *owner = x->dev->driver->owner;306306+305307 put_device(x->dev);308308+ module_put(owner);309309+ }306310}307311EXPORT_SYMBOL(usb_put_phy);308312
+9-15
drivers/usb/phy/omap-control-usb.c
···219219220220 res = platform_get_resource_byname(pdev, IORESOURCE_MEM,221221 "control_dev_conf");222222- control_usb->dev_conf = devm_request_and_ioremap(&pdev->dev, res);223223- if (!control_usb->dev_conf) {224224- dev_err(&pdev->dev, "Failed to obtain io memory\n");225225- return -EADDRNOTAVAIL;226226- }222222+ control_usb->dev_conf = devm_ioremap_resource(&pdev->dev, res);223223+ if (IS_ERR(control_usb->dev_conf))224224+ return PTR_ERR(control_usb->dev_conf);227225228226 if (control_usb->type == OMAP_CTRL_DEV_TYPE1) {229227 res = platform_get_resource_byname(pdev, IORESOURCE_MEM,230228 "otghs_control");231231- control_usb->otghs_control = devm_request_and_ioremap(229229+ control_usb->otghs_control = devm_ioremap_resource(232230 &pdev->dev, res);233233- if (!control_usb->otghs_control) {234234- dev_err(&pdev->dev, "Failed to obtain io memory\n");235235- return -EADDRNOTAVAIL;236236- }231231+ if (IS_ERR(control_usb->otghs_control))232232+ return PTR_ERR(control_usb->otghs_control);237233 }238234239235 if (control_usb->type == OMAP_CTRL_DEV_TYPE2) {240236 res = platform_get_resource_byname(pdev, IORESOURCE_MEM,241237 "phy_power_usb");242242- control_usb->phy_power = devm_request_and_ioremap(238238+ control_usb->phy_power = devm_ioremap_resource(243239 &pdev->dev, res);244244- if (!control_usb->phy_power) {245245- dev_dbg(&pdev->dev, "Failed to obtain io memory\n");246246- return -EADDRNOTAVAIL;247247- }240240+ if (IS_ERR(control_usb->phy_power))241241+ return PTR_ERR(control_usb->phy_power);248242249243 control_usb->sys_clk = devm_clk_get(control_usb->dev,250244 "sys_clkin");
+3-5
drivers/usb/phy/omap-usb3.c
···212212 }213213214214 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pll_ctrl");215215- phy->pll_ctrl_base = devm_request_and_ioremap(&pdev->dev, res);216216- if (!phy->pll_ctrl_base) {217217- dev_err(&pdev->dev, "ioremap of pll_ctrl failed\n");218218- return -ENOMEM;219219- }215215+ phy->pll_ctrl_base = devm_ioremap_resource(&pdev->dev, res);216216+ if (IS_ERR(phy->pll_ctrl_base))217217+ return PTR_ERR(phy->pll_ctrl_base);220218221219 phy->dev = &pdev->dev;222220
···9292 return 0;9393}94949595-/* This places the HUAWEI usb dongles in multi-port mode */9696-static int usb_stor_huawei_feature_init(struct us_data *us)9595+/* This places the HUAWEI E220 devices in multi-port mode */9696+int usb_stor_huawei_e220_init(struct us_data *us)9797{9898 int result;9999···103103 0x01, 0x0, NULL, 0x0, 1000);104104 US_DEBUGP("Huawei mode set result is %d\n", result);105105 return 0;106106-}107107-108108-/*109109- * It will send a scsi switch command called rewind' to huawei dongle.110110- * When the dongle receives this command at the first time,111111- * it will reboot immediately. After rebooted, it will ignore this command.112112- * So it is unnecessary to read its response.113113- */114114-static int usb_stor_huawei_scsi_init(struct us_data *us)115115-{116116- int result = 0;117117- int act_len = 0;118118- struct bulk_cb_wrap *bcbw = (struct bulk_cb_wrap *) us->iobuf;119119- char rewind_cmd[] = {0x11, 0x06, 0x20, 0x00, 0x00, 0x01, 0x01, 0x00,120120- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};121121-122122- bcbw->Signature = cpu_to_le32(US_BULK_CB_SIGN);123123- bcbw->Tag = 0;124124- bcbw->DataTransferLength = 0;125125- bcbw->Flags = bcbw->Lun = 0;126126- bcbw->Length = sizeof(rewind_cmd);127127- memset(bcbw->CDB, 0, sizeof(bcbw->CDB));128128- memcpy(bcbw->CDB, rewind_cmd, sizeof(rewind_cmd));129129-130130- result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, bcbw,131131- US_BULK_CB_WRAP_LEN, &act_len);132132- US_DEBUGP("transfer actual length=%d, result=%d\n", act_len, result);133133- return result;134134-}135135-136136-/*137137- * It tries to find the supported Huawei USB dongles.138138- * In Huawei, they assign the following product IDs139139- * for all of their mobile broadband dongles,140140- * including the new dongles in the future.141141- * So if the product ID is not included in this list,142142- * it means it is not Huawei's mobile broadband dongles.143143- */144144-static int usb_stor_huawei_dongles_pid(struct us_data *us)145145-{146146- struct usb_interface_descriptor *idesc;147147- int idProduct;148148-149149- idesc = &us->pusb_intf->cur_altsetting->desc;150150- idProduct = le16_to_cpu(us->pusb_dev->descriptor.idProduct);151151- /* The first port is CDROM,152152- * means the dongle in the single port mode,153153- * and a switch command is required to be sent. */154154- if (idesc && idesc->bInterfaceNumber == 0) {155155- if ((idProduct == 0x1001)156156- || (idProduct == 0x1003)157157- || (idProduct == 0x1004)158158- || (idProduct >= 0x1401 && idProduct <= 0x1500)159159- || (idProduct >= 0x1505 && idProduct <= 0x1600)160160- || (idProduct >= 0x1c02 && idProduct <= 0x2202)) {161161- return 1;162162- }163163- }164164- return 0;165165-}166166-167167-int usb_stor_huawei_init(struct us_data *us)168168-{169169- int result = 0;170170-171171- if (usb_stor_huawei_dongles_pid(us)) {172172- if (le16_to_cpu(us->pusb_dev->descriptor.idProduct) >= 0x1446)173173- result = usb_stor_huawei_scsi_init(us);174174- else175175- result = usb_stor_huawei_feature_init(us);176176- }177177- return result;178106}
+2-2
drivers/usb/storage/initializers.h
···4646 * flash reader */4747int usb_stor_ucr61s2b_init(struct us_data *us);48484949-/* This places the HUAWEI usb dongles in multi-port mode */5050-int usb_stor_huawei_init(struct us_data *us);4949+/* This places the HUAWEI E220 devices in multi-port mode */5050+int usb_stor_huawei_e220_init(struct us_data *us);
···1525152515261526 if ((qg->lim_flags & BTRFS_QGROUP_LIMIT_MAX_RFER) &&15271527 qg->reserved + qg->rfer + num_bytes >15281528- qg->max_rfer)15281528+ qg->max_rfer) {15291529 ret = -EDQUOT;15301530+ goto out;15311531+ }1530153215311533 if ((qg->lim_flags & BTRFS_QGROUP_LIMIT_MAX_EXCL) &&15321534 qg->reserved + qg->excl + num_bytes >15331533- qg->max_excl)15351535+ qg->max_excl) {15341536 ret = -EDQUOT;15371537+ goto out;15381538+ }1535153915361540 list_for_each_entry(glist, &qg->groups, next_group) {15371541 ulist_add(ulist, glist->group->qgroupid,15381542 (uintptr_t)glist->group, GFP_ATOMIC);15391543 }15401544 }15411541- if (ret)15421542- goto out;1543154515441546 /*15451547 * no limits exceeded, now record the reservation into all qgroups
+5-6
fs/btrfs/transaction.c
···625625626626 btrfs_trans_release_metadata(trans, root);627627 trans->block_rsv = NULL;628628- /*629629- * the same root has to be passed to start_transaction and630630- * end_transaction. Subvolume quota depends on this.631631- */632632- WARN_ON(trans->root != root);633628634629 if (trans->qgroup_reserved) {635635- btrfs_qgroup_free(root, trans->qgroup_reserved);630630+ /*631631+ * the same root has to be passed here between start_transaction632632+ * and end_transaction. Subvolume quota depends on this.633633+ */634634+ btrfs_qgroup_free(trans->root, trans->qgroup_reserved);636635 trans->qgroup_reserved = 0;637636 }638637
+6
fs/btrfs/volumes.c
···684684 __btrfs_close_devices(fs_devices);685685 free_fs_devices(fs_devices);686686 }687687+ /*688688+ * Wait for rcu kworkers under __btrfs_close_devices689689+ * to finish all blkdev_puts so device is really690690+ * free when umount is done.691691+ */692692+ rcu_barrier();687693 return ret;688694}689695
···558558 }559559 *ret_pointer = iov;560560561561+ ret = -EFAULT;562562+ if (!access_ok(VERIFY_READ, uvector, nr_segs*sizeof(*uvector)))563563+ goto out;564564+561565 /*562566 * Single unix specification:563567 * We should -EINVAL if an element length is not >= 0 and fitting an···10841080 if (!file->f_op)10851081 goto out;1086108210871087- ret = -EFAULT;10881088- if (!access_ok(VERIFY_READ, uvector, nr_segs*sizeof(*uvector)))10891089- goto out;10901090-10911091- tot_len = compat_rw_copy_check_uvector(type, uvector, nr_segs,10831083+ ret = compat_rw_copy_check_uvector(type, uvector, nr_segs,10921084 UIO_FASTIOV, iovstack, &iov);10931093- if (tot_len == 0) {10941094- ret = 0;10851085+ if (ret <= 0)10951086 goto out;10961096- }1097108710881088+ tot_len = ret;10981089 ret = rw_verify_area(type, file, pos, tot_len);10991090 if (ret < 0)11001091 goto out;
-1
fs/ext2/ialloc.c
···118118 * as writing the quota to disk may need the lock as well.119119 */120120 /* Quota is already initialized in iput() */121121- ext2_xattr_delete_inode(inode);122121 dquot_free_inode(inode);123122 dquot_drop(inode);124123
+2
fs/ext2/inode.c
···3434#include "ext2.h"3535#include "acl.h"3636#include "xip.h"3737+#include "xattr.h"37383839static int __ext2_write_inode(struct inode *inode, int do_sync);3940···8988 inode->i_size = 0;9089 if (inode->i_blocks)9190 ext2_truncate_blocks(inode, 0);9191+ ext2_xattr_delete_inode(inode);9292 }93939494 invalidate_inode_buffers(inode);
+2-2
fs/ext3/super.c
···353353 return bdev;354354355355fail:356356- ext3_msg(sb, "error: failed to open journal device %s: %ld",356356+ ext3_msg(sb, KERN_ERR, "error: failed to open journal device %s: %ld",357357 __bdevname(dev, b), PTR_ERR(bdev));358358359359 return NULL;···887887 /*todo: use simple_strtoll with >32bit ext3 */888888 sb_block = simple_strtoul(options, &options, 0);889889 if (*options && *options != ',') {890890- ext3_msg(sb, "error: invalid sb specification: %s",890890+ ext3_msg(sb, KERN_ERR, "error: invalid sb specification: %s",891891 (char *) *data);892892 return 1;893893 }
···258258 .fs_flags = FS_REQUIRES_DEV,259259};260260MODULE_ALIAS_FS("vxfs"); /* makes mount -t vxfs autoload the module */261261+MODULE_ALIAS("vxfs");261262262263static int __init263264vxfs_init(void)
···335335 .fs_flags = FS_RENAME_DOES_D_MOVE|FS_BINARY_MOUNTDATA,336336};337337MODULE_ALIAS_FS("nfs4");338338+MODULE_ALIAS("nfs4");338339EXPORT_SYMBOL_GPL(nfs4_fs_type);339340340341static int __init register_nfs4_fs(void)
+2-34
fs/nfsd/nfs4state.c
···230230 __nfs4_file_put_access(fp, oflag);231231}232232233233-static inline int get_new_stid(struct nfs4_stid *stid)234234-{235235- static int min_stateid = 0;236236- struct idr *stateids = &stid->sc_client->cl_stateids;237237- int new_stid;238238- int error;239239-240240- error = idr_get_new_above(stateids, stid, min_stateid, &new_stid);241241- /*242242- * Note: the necessary preallocation was done in243243- * nfs4_alloc_stateid(). The idr code caps the number of244244- * preallocations that can exist at a time, but the state lock245245- * prevents anyone from using ours before we get here:246246- */247247- WARN_ON_ONCE(error);248248- /*249249- * It shouldn't be a problem to reuse an opaque stateid value.250250- * I don't think it is for 4.1. But with 4.0 I worry that, for251251- * example, a stray write retransmission could be accepted by252252- * the server when it should have been rejected. Therefore,253253- * adopt a trick from the sctp code to attempt to maximize the254254- * amount of time until an id is reused, by ensuring they always255255- * "increase" (mod INT_MAX):256256- */257257-258258- min_stateid = new_stid+1;259259- if (min_stateid == INT_MAX)260260- min_stateid = 0;261261- return new_stid;262262-}263263-264233static struct nfs4_stid *nfs4_alloc_stid(struct nfs4_client *cl, struct265234kmem_cache *slab)266235{···242273 if (!stid)243274 return NULL;244275245245- if (!idr_pre_get(stateids, GFP_KERNEL))246246- goto out_free;247247- if (idr_get_new_above(stateids, stid, min_stateid, &new_id))276276+ new_id = idr_alloc(stateids, stid, min_stateid, 0, GFP_KERNEL);277277+ if (new_id < 0)248278 goto out_free;249279 stid->sc_client = cl;250280 stid->sc_type = 0;
+3
fs/pipe.c
···863863{864864 int ret = -ENOENT;865865866866+ if (!(filp->f_mode & (FMODE_READ|FMODE_WRITE)))867867+ return -EINVAL;868868+866869 mutex_lock(&inode->i_mutex);867870868871 if (inode->i_pipe) {
+4-1
fs/quota/dquot.c
···14391439 * did a write before quota was turned on14401440 */14411441 rsv = inode_get_rsv_space(inode);14421442- if (unlikely(rsv))14421442+ if (unlikely(rsv)) {14431443+ spin_lock(&dq_data_lock);14431444 dquot_resv_space(inode->i_dquot[cnt], rsv);14451445+ spin_unlock(&dq_data_lock);14461446+ }14441447 }14451448 }14461449out_err:
···13341334 int size;13351335 int i;1336133613371337+ /*13381338+ * Make sure we capture only current IO errors rather than stale errors13391339+ * left over from previous use of the buffer (e.g. failed readahead).13401340+ */13411341+ bp->b_error = 0;13421342+13371343 if (bp->b_flags & XBF_WRITE) {13381344 if (bp->b_flags & XBF_SYNCIO)13391345 rw = WRITE_SYNC;
+2-2
fs/xfs/xfs_iomap.c
···325325 * rather than falling short due to things like stripe unit/width alignment of326326 * real extents.327327 */328328-STATIC int328328+STATIC xfs_fsblock_t329329xfs_iomap_eof_prealloc_initial_size(330330 struct xfs_mount *mp,331331 struct xfs_inode *ip,···413413 * have a large file on a small filesystem and the above414414 * lowspace thresholds are smaller than MAXEXTLEN.415415 */416416- while (alloc_blocks >= freesp)416416+ while (alloc_blocks && alloc_blocks >= freesp)417417 alloc_blocks >>= 4;418418 }419419
+3
include/acpi/processor.h
···235235 if a _PPC object exists, rmmod is disallowed then */236236int acpi_processor_notify_smm(struct module *calling_module);237237238238+/* parsing the _P* objects. */239239+extern int acpi_processor_get_performance_info(struct acpi_processor *pr);240240+238241/* for communication between multiple parts of the processor kernel module */239242DECLARE_PER_CPU(struct acpi_processor *, processors);240243extern struct acpi_processor_errata errata;
-6
include/asm-generic/atomic.h
···136136#define atomic_xchg(ptr, v) (xchg(&(ptr)->counter, (v)))137137#define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new)))138138139139-#define cmpxchg_local(ptr, o, n) \140140- ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\141141- (unsigned long)(n), sizeof(*(ptr))))142142-143143-#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))144144-145139static inline int __atomic_add_unless(atomic_t *v, int a, int u)146140{147141 int c, old;
+10
include/asm-generic/cmpxchg.h
···9292 */9393#include <asm-generic/cmpxchg-local.h>94949595+#ifndef cmpxchg_local9696+#define cmpxchg_local(ptr, o, n) \9797+ ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\9898+ (unsigned long)(n), sizeof(*(ptr))))9999+#endif100100+101101+#ifndef cmpxchg64_local102102+#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))103103+#endif104104+95105#define cmpxchg(ptr, o, n) cmpxchg_local((ptr), (o), (n))96106#define cmpxchg64(ptr, o, n) cmpxchg64_local((ptr), (o), (n))97107
+51-17
include/linux/idr.h
···7373 */74747575void *idr_find_slowpath(struct idr *idp, int id);7676-int idr_pre_get(struct idr *idp, gfp_t gfp_mask);7777-int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id);7876void idr_preload(gfp_t gfp_mask);7977int idr_alloc(struct idr *idp, void *ptr, int start, int end, gfp_t gfp_mask);8078int idr_for_each(struct idr *idp,···979998100/**99101 * idr_find - return pointer for given id100100- * @idp: idr handle102102+ * @idr: idr handle101103 * @id: lookup key102104 *103105 * Return the pointer given the id it has been registered with. A %NULL···118120}119121120122/**121121- * idr_get_new - allocate new idr entry122122- * @idp: idr handle123123- * @ptr: pointer you want associated with the id124124- * @id: pointer to the allocated handle125125- *126126- * Simple wrapper around idr_get_new_above() w/ @starting_id of zero.127127- */128128-static inline int idr_get_new(struct idr *idp, void *ptr, int *id)129129-{130130- return idr_get_new_above(idp, ptr, 0, id);131131-}132132-133133-/**134123 * idr_for_each_entry - iterate over an idr's elements of a given type135124 * @idp: idr handle136125 * @entry: the type * to use as cursor···128143 entry != NULL; \129144 ++id, entry = (typeof(entry))idr_get_next((idp), &(id)))130145131131-void __idr_remove_all(struct idr *idp); /* don't use */146146+/*147147+ * Don't use the following functions. These exist only to suppress148148+ * deprecated warnings on EXPORT_SYMBOL()s.149149+ */150150+int __idr_pre_get(struct idr *idp, gfp_t gfp_mask);151151+int __idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id);152152+void __idr_remove_all(struct idr *idp);153153+154154+/**155155+ * idr_pre_get - reserve resources for idr allocation156156+ * @idp: idr handle157157+ * @gfp_mask: memory allocation flags158158+ *159159+ * Part of old alloc interface. This is going away. Use160160+ * idr_preload[_end]() and idr_alloc() instead.161161+ */162162+static inline int __deprecated idr_pre_get(struct idr *idp, gfp_t gfp_mask)163163+{164164+ return __idr_pre_get(idp, gfp_mask);165165+}166166+167167+/**168168+ * idr_get_new_above - allocate new idr entry above or equal to a start id169169+ * @idp: idr handle170170+ * @ptr: pointer you want associated with the id171171+ * @starting_id: id to start search at172172+ * @id: pointer to the allocated handle173173+ *174174+ * Part of old alloc interface. This is going away. Use175175+ * idr_preload[_end]() and idr_alloc() instead.176176+ */177177+static inline int __deprecated idr_get_new_above(struct idr *idp, void *ptr,178178+ int starting_id, int *id)179179+{180180+ return __idr_get_new_above(idp, ptr, starting_id, id);181181+}182182+183183+/**184184+ * idr_get_new - allocate new idr entry185185+ * @idp: idr handle186186+ * @ptr: pointer you want associated with the id187187+ * @id: pointer to the allocated handle188188+ *189189+ * Part of old alloc interface. This is going away. Use190190+ * idr_preload[_end]() and idr_alloc() instead.191191+ */192192+static inline int __deprecated idr_get_new(struct idr *idp, void *ptr, int *id)193193+{194194+ return __idr_get_new_above(idp, ptr, 0, id);195195+}132196133197/**134198 * idr_remove_all - remove all ids from the given idr tree
···667667 pos = n)668668669669#define hlist_entry_safe(ptr, type, member) \670670- (ptr) ? hlist_entry(ptr, type, member) : NULL670670+ ({ typeof(ptr) ____ptr = (ptr); \671671+ ____ptr ? hlist_entry(____ptr, type, member) : NULL; \672672+ })671673672674/**673675 * hlist_for_each_entry - iterate over list of given type
+1
include/linux/mfd/palmas.h
···221221};222222223223struct palmas_platform_data {224224+ int irq_flags;224225 int gpio_base;225226226227 /* bit value to be loaded to the POWER_CTRL register */
···187187 * This happens with the Renesas AG-AND chips, possibly others.188188 */189189#define BBT_AUTO_REFRESH 0x00000080190190+/*191191+ * Chip requires ready check on read (for auto-incremented sequential read).192192+ * True only for small page devices; large page devices do not support193193+ * autoincrement.194194+ */195195+#define NAND_NEED_READRDY 0x00000100196196+190197/* Chip does not allow subpage writes */191198#define NAND_NO_SUBPAGE_WRITE 0x00000200192199
···6060 * @name: For diagnostics, identifies the function.6161 * @strings: tables of strings, keyed by identifiers assigned during bind()6262 * and by language IDs provided in control requests6363- * @descriptors: Table of full (or low) speed descriptors, using interface and6363+ * @fs_descriptors: Table of full (or low) speed descriptors, using interface and6464 * string identifiers assigned during @bind(). If this pointer is null,6565 * the function will not be available at full speed (or at low speed).6666 * @hs_descriptors: Table of high speed descriptors, using interface and···290290 * after function notifications291291 * @resume: Notifies configuration when the host restarts USB traffic,292292 * before function notifications293293+ * @gadget_driver: Gadget driver controlling this driver293294 *294295 * Devices default to reporting self powered operation. Devices which rely295296 * on bus powered operation should report this in their @bind method.
···976976 int sysctl_sync_retries;977977 int sysctl_nat_icmp_send;978978 int sysctl_pmtu_disc;979979+ int sysctl_backup_only;979980980981 /* ip_vs_lblc */981982 int sysctl_lblc_expiration;···10681067 return ipvs->sysctl_pmtu_disc;10691068}1070106910701070+static inline int sysctl_backup_only(struct netns_ipvs *ipvs)10711071+{10721072+ return ipvs->sync_state & IP_VS_STATE_BACKUP &&10731073+ ipvs->sysctl_backup_only;10741074+}10751075+10711076#else1072107710731078static inline int sysctl_sync_threshold(struct netns_ipvs *ipvs)···11191112static inline int sysctl_pmtu_disc(struct netns_ipvs *ipvs)11201113{11211114 return 1;11151115+}11161116+11171117+static inline int sysctl_backup_only(struct netns_ipvs *ipvs)11181118+{11191119+ return 0;11221120}1123112111241122#endif
+4-2
include/uapi/linux/acct.h
···107107#define ACORE 0x08 /* ... dumped core */108108#define AXSIG 0x10 /* ... was killed by a signal */109109110110-#ifdef __BIG_ENDIAN110110+#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN)111111#define ACCT_BYTEORDER 0x80 /* accounting file is big endian */112112-#else112112+#elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)113113#define ACCT_BYTEORDER 0x00 /* accounting file is little endian */114114+#else115115+#error unspecified endianness114116#endif115117116118#ifndef __KERNEL__
+2-2
include/uapi/linux/aio_abi.h
···6262 __s64 res2; /* secondary result */6363};64646565-#if defined(__LITTLE_ENDIAN)6565+#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)6666#define PADDED(x,y) x, y6767-#elif defined(__BIG_ENDIAN)6767+#elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN)6868#define PADDED(x,y) y, x6969#else7070#error edit for your odd byteorder.
+4-2
include/uapi/linux/raid/md_p.h
···145145 __u32 failed_disks; /* 4 Number of failed disks */146146 __u32 spare_disks; /* 5 Number of spare disks */147147 __u32 sb_csum; /* 6 checksum of the whole superblock */148148-#ifdef __BIG_ENDIAN148148+#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN)149149 __u32 events_hi; /* 7 high-order of superblock update count */150150 __u32 events_lo; /* 8 low-order of superblock update count */151151 __u32 cp_events_hi; /* 9 high-order of checkpoint update count */152152 __u32 cp_events_lo; /* 10 low-order of checkpoint update count */153153-#else153153+#elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)154154 __u32 events_lo; /* 7 low-order of superblock update count */155155 __u32 events_hi; /* 8 high-order of superblock update count */156156 __u32 cp_events_lo; /* 9 low-order of checkpoint update count */157157 __u32 cp_events_hi; /* 10 high-order of checkpoint update count */158158+#else159159+#error unspecified endianness158160#endif159161 __u32 recovery_cp; /* 11 recovery checkpoint sector count */160162 /* There are only valid for minor_version > 90 */
+4-1
include/uapi/linux/serial_core.h
···5151#define PORT_8250_CIR 23 /* CIR infrared port, has its own driver */5252#define PORT_XR17V35X 24 /* Exar XR17V35x UARTs */5353#define PORT_BRCM_TRUMANAGE 255454-#define PORT_MAX_8250 25 /* max port ID */5454+#define PORT_ALTR_16550_F32 26 /* Altera 16550 UART with 32 FIFOs */5555+#define PORT_ALTR_16550_F64 27 /* Altera 16550 UART with 64 FIFOs */5656+#define PORT_ALTR_16550_F128 28 /* Altera 16550 UART with 128 FIFOs */5757+#define PORT_MAX_8250 28 /* max port ID */55585659/*5760 * ARM specific type numbers. These are not currently guaranteed
···11411141 if ((clone_flags & (CLONE_NEWNS|CLONE_FS)) == (CLONE_NEWNS|CLONE_FS))11421142 return ERR_PTR(-EINVAL);1143114311441144+ if ((clone_flags & (CLONE_NEWUSER|CLONE_FS)) == (CLONE_NEWUSER|CLONE_FS))11451145+ return ERR_PTR(-EINVAL);11461146+11441147 /*11451148 * Thread groups must share signals as well, and detached threads11461149 * can only be started up within the thread group.···18101807 * If unsharing a user namespace must also unshare the thread.18111808 */18121809 if (unshare_flags & CLONE_NEWUSER)18131813- unshare_flags |= CLONE_THREAD;18101810+ unshare_flags |= CLONE_THREAD | CLONE_FS;18141811 /*18151812 * If unsharing a pid namespace must also unshare the thread.18161813 */
+23-23
kernel/futex.c
···223223 * @rw: mapping needs to be read/write (values: VERIFY_READ,224224 * VERIFY_WRITE)225225 *226226- * Returns a negative error code or 0226226+ * Return: a negative error code or 0227227+ *227228 * The key words are stored in *key on success.228229 *229230 * For shared mappings, it's (page->index, file_inode(vma->vm_file),···706705 * be "current" except in the case of requeue pi.707706 * @set_waiters: force setting the FUTEX_WAITERS bit (1) or not (0)708707 *709709- * Returns:710710- * 0 - ready to wait711711- * 1 - acquired the lock708708+ * Return:709709+ * 0 - ready to wait;710710+ * 1 - acquired the lock;712711 * <0 - error713712 *714713 * The hb->lock and futex_key refs shall be held by the caller.···11921191 * then direct futex_lock_pi_atomic() to force setting the FUTEX_WAITERS bit.11931192 * hb1 and hb2 must be held by the caller.11941193 *11951195- * Returns:11961196- * 0 - failed to acquire the lock atomicly11971197- * 1 - acquired the lock11941194+ * Return:11951195+ * 0 - failed to acquire the lock atomically;11961196+ * 1 - acquired the lock;11981197 * <0 - error11991198 */12001199static int futex_proxy_trylock_atomic(u32 __user *pifutex,···12551254 * Requeue waiters on uaddr1 to uaddr2. In the requeue_pi case, try to acquire12561255 * uaddr2 atomically on behalf of the top waiter.12571256 *12581258- * Returns:12591259- * >=0 - on success, the number of tasks requeued or woken12571257+ * Return:12581258+ * >=0 - on success, the number of tasks requeued or woken;12601259 * <0 - on error12611260 */12621261static int futex_requeue(u32 __user *uaddr1, unsigned int flags,···15371536 * The q->lock_ptr must not be held by the caller. A call to unqueue_me() must15381537 * be paired with exactly one earlier call to queue_me().15391538 *15401540- * Returns:15411541- * 1 - if the futex_q was still queued (and we removed unqueued it)15391539+ * Return:15401540+ * 1 - if the futex_q was still queued (and we removed unqueued it);15421541 * 0 - if the futex_q was already removed by the waking thread15431542 */15441543static int unqueue_me(struct futex_q *q)···17081707 * the pi_state owner as well as handle race conditions that may allow us to17091708 * acquire the lock. Must be called with the hb lock held.17101709 *17111711- * Returns:17121712- * 1 - success, lock taken17131713- * 0 - success, lock not taken17101710+ * Return:17111711+ * 1 - success, lock taken;17121712+ * 0 - success, lock not taken;17141713 * <0 - on error (-EFAULT)17151714 */17161715static int fixup_owner(u32 __user *uaddr, struct futex_q *q, int locked)···18251824 * Return with the hb lock held and a q.key reference on success, and unlocked18261825 * with no q.key reference on failure.18271826 *18281828- * Returns:18291829- * 0 - uaddr contains val and hb has been locked18271827+ * Return:18281828+ * 0 - uaddr contains val and hb has been locked;18301829 * <1 - -EFAULT or -EWOULDBLOCK (uaddr does not contain val) and hb is unlocked18311830 */18321831static int futex_wait_setup(u32 __user *uaddr, u32 val, unsigned int flags,···22042203 * the wakeup and return the appropriate error code to the caller. Must be22052204 * called with the hb lock held.22062205 *22072207- * Returns22082208- * 0 - no early wakeup detected22092209- * <0 - -ETIMEDOUT or -ERESTARTNOINTR22062206+ * Return:22072207+ * 0 = no early wakeup detected;22082208+ * <0 = -ETIMEDOUT or -ERESTARTNOINTR22102209 */22112210static inline22122211int handle_early_requeue_pi_wakeup(struct futex_hash_bucket *hb,···22482247 * @val: the expected value of uaddr22492248 * @abs_time: absolute timeout22502249 * @bitset: 32 bit wakeup bitset set by userspace, defaults to all22512251- * @clockrt: whether to use CLOCK_REALTIME (1) or CLOCK_MONOTONIC (0)22522250 * @uaddr2: the pi futex we will take prior to returning to user-space22532251 *22542252 * The caller will wait on uaddr and will be requeued by futex_requeue() to···22582258 * there was a need to.22592259 *22602260 * We call schedule in futex_wait_queue_me() when we enqueue and return there22612261- * via the following:22612261+ * via the following--22622262 * 1) wakeup on uaddr2 after an atomic lock acquisition by futex_requeue()22632263 * 2) wakeup on uaddr2 after a requeue22642264 * 3) signal···22762276 *22772277 * If 4 or 7, we cleanup and return with -ETIMEDOUT.22782278 *22792279- * Returns:22802280- * 0 - On success22792279+ * Return:22802280+ * 0 - On success;22812281 * <0 - On error22822282 */22832283static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags,
+4-1
kernel/signal.c
···485485 if (force_default || ka->sa.sa_handler != SIG_IGN)486486 ka->sa.sa_handler = SIG_DFL;487487 ka->sa.sa_flags = 0;488488+#ifdef __ARCH_HAS_SA_RESTORER489489+ ka->sa.sa_restorer = NULL;490490+#endif488491 sigemptyset(&ka->sa.sa_mask);489492 ka++;490493 }···26852682/**26862683 * sys_rt_sigpending - examine a pending signal that has been raised26872684 * while blocked26882688- * @set: stores pending signals26852685+ * @uset: stores pending signals26892686 * @sigsetsize: size of sigset_t type or larger26902687 */26912688SYSCALL_DEFINE2(rt_sigpending, sigset_t __user *, uset, size_t, sigsetsize)
+4
kernel/user_namespace.c
···2121#include <linux/uaccess.h>2222#include <linux/ctype.h>2323#include <linux/projid.h>2424+#include <linux/fs_struct.h>24252526static struct kmem_cache *user_ns_cachep __read_mostly;2627···836835837836 /* Threaded processes may not enter a different user namespace */838837 if (atomic_read(¤t->mm->mm_users) > 1)838838+ return -EINVAL;839839+840840+ if (current->fs->users != 1)839841 return -EINVAL;840842841843 if (!ns_capable(user_ns, CAP_SYS_ADMIN))
+29-22
kernel/workqueue.c
···457457 int ret;458458459459 mutex_lock(&worker_pool_idr_mutex);460460- idr_pre_get(&worker_pool_idr, GFP_KERNEL);461461- ret = idr_get_new(&worker_pool_idr, pool, &pool->id);460460+ ret = idr_alloc(&worker_pool_idr, pool, 0, 0, GFP_KERNEL);461461+ if (ret >= 0)462462+ pool->id = ret;462463 mutex_unlock(&worker_pool_idr_mutex);463464464464- return ret;465465+ return ret < 0 ? ret : 0;465466}466467467468/*···3447344634483447 spin_unlock_irq(&pool->lock);34493448 mutex_unlock(&pool->assoc_mutex);34503450- }3451344934523452- /*34533453- * Call schedule() so that we cross rq->lock and thus can guarantee34543454- * sched callbacks see the %WORKER_UNBOUND flag. This is necessary34553455- * as scheduler callbacks may be invoked from other cpus.34563456- */34573457- schedule();34503450+ /*34513451+ * Call schedule() so that we cross rq->lock and thus can34523452+ * guarantee sched callbacks see the %WORKER_UNBOUND flag.34533453+ * This is necessary as scheduler callbacks may be invoked34543454+ * from other cpus.34553455+ */34563456+ schedule();3458345734593459- /*34603460- * Sched callbacks are disabled now. Zap nr_running. After this,34613461- * nr_running stays zero and need_more_worker() and keep_working()34623462- * are always true as long as the worklist is not empty. Pools on34633463- * @cpu now behave as unbound (in terms of concurrency management)34643464- * pools which are served by workers tied to the CPU.34653465- *34663466- * On return from this function, the current worker would trigger34673467- * unbound chain execution of pending work items if other workers34683468- * didn't already.34693469- */34703470- for_each_std_worker_pool(pool, cpu)34583458+ /*34593459+ * Sched callbacks are disabled now. Zap nr_running.34603460+ * After this, nr_running stays zero and need_more_worker()34613461+ * and keep_working() are always true as long as the34623462+ * worklist is not empty. This pool now behaves as an34633463+ * unbound (in terms of concurrency management) pool which34643464+ * are served by workers tied to the pool.34653465+ */34713466 atomic_set(&pool->nr_running, 0);34673467+34683468+ /*34693469+ * With concurrency management just turned off, a busy34703470+ * worker blocking could lead to lengthy stalls. Kick off34713471+ * unbound chain execution of currently pending work items.34723472+ */34733473+ spin_lock_irq(&pool->lock);34743474+ wake_up_worker(pool);34753475+ spin_unlock_irq(&pool->lock);34763476+ }34723477}3473347834743479/*
+30-50
lib/idr.c
···106106 if (layer_idr)107107 return get_from_free_list(layer_idr);108108109109- /* try to allocate directly from kmem_cache */110110- new = kmem_cache_zalloc(idr_layer_cache, gfp_mask);109109+ /*110110+ * Try to allocate directly from kmem_cache. We want to try this111111+ * before preload buffer; otherwise, non-preloading idr_alloc()112112+ * users will end up taking advantage of preloading ones. As the113113+ * following is allowed to fail for preloaded cases, suppress114114+ * warning this time.115115+ */116116+ new = kmem_cache_zalloc(idr_layer_cache, gfp_mask | __GFP_NOWARN);111117 if (new)112118 return new;113119···121115 * Try to fetch one from the per-cpu preload buffer if in process122116 * context. See idr_preload() for details.123117 */124124- if (in_interrupt())125125- return NULL;126126-127127- preempt_disable();128128- new = __this_cpu_read(idr_preload_head);129129- if (new) {130130- __this_cpu_write(idr_preload_head, new->ary[0]);131131- __this_cpu_dec(idr_preload_cnt);132132- new->ary[0] = NULL;118118+ if (!in_interrupt()) {119119+ preempt_disable();120120+ new = __this_cpu_read(idr_preload_head);121121+ if (new) {122122+ __this_cpu_write(idr_preload_head, new->ary[0]);123123+ __this_cpu_dec(idr_preload_cnt);124124+ new->ary[0] = NULL;125125+ }126126+ preempt_enable();127127+ if (new)128128+ return new;133129 }134134- preempt_enable();135135- return new;130130+131131+ /*132132+ * Both failed. Try kmem_cache again w/o adding __GFP_NOWARN so133133+ * that memory allocation failure warning is printed as intended.134134+ */135135+ return kmem_cache_zalloc(idr_layer_cache, gfp_mask);136136}137137138138static void idr_layer_rcu_free(struct rcu_head *head)···196184 }197185}198186199199-/**200200- * idr_pre_get - reserve resources for idr allocation201201- * @idp: idr handle202202- * @gfp_mask: memory allocation flags203203- *204204- * This function should be called prior to calling the idr_get_new* functions.205205- * It preallocates enough memory to satisfy the worst possible allocation. The206206- * caller should pass in GFP_KERNEL if possible. This of course requires that207207- * no spinning locks be held.208208- *209209- * If the system is REALLY out of memory this function returns %0,210210- * otherwise %1.211211- */212212-int idr_pre_get(struct idr *idp, gfp_t gfp_mask)187187+int __idr_pre_get(struct idr *idp, gfp_t gfp_mask)213188{214189 while (idp->id_free_cnt < MAX_IDR_FREE) {215190 struct idr_layer *new;···207208 }208209 return 1;209210}210210-EXPORT_SYMBOL(idr_pre_get);211211+EXPORT_SYMBOL(__idr_pre_get);211212212213/**213214 * sub_alloc - try to allocate an id without growing the tree depth214215 * @idp: idr handle215216 * @starting_id: id to start search at216216- * @id: pointer to the allocated handle217217 * @pa: idr_layer[MAX_IDR_LEVEL] used as backtrack buffer218218 * @gfp_mask: allocation mask for idr_layer_alloc()219219 * @layer_idr: optional idr passed to idr_layer_alloc()···374376 idr_mark_full(pa, id);375377}376378377377-/**378378- * idr_get_new_above - allocate new idr entry above or equal to a start id379379- * @idp: idr handle380380- * @ptr: pointer you want associated with the id381381- * @starting_id: id to start search at382382- * @id: pointer to the allocated handle383383- *384384- * This is the allocate id function. It should be called with any385385- * required locks.386386- *387387- * If allocation from IDR's private freelist fails, idr_get_new_above() will388388- * return %-EAGAIN. The caller should retry the idr_pre_get() call to refill389389- * IDR's preallocation and then retry the idr_get_new_above() call.390390- *391391- * If the idr is full idr_get_new_above() will return %-ENOSPC.392392- *393393- * @id returns a value in the range @starting_id ... %0x7fffffff394394- */395395-int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id)379379+int __idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id)396380{397381 struct idr_layer *pa[MAX_IDR_LEVEL + 1];398382 int rv;···387407 *id = rv;388408 return 0;389409}390390-EXPORT_SYMBOL(idr_get_new_above);410410+EXPORT_SYMBOL(__idr_get_new_above);391411392412/**393413 * idr_preload - preload for idr_alloc()···888908int ida_pre_get(struct ida *ida, gfp_t gfp_mask)889909{890910 /* allocate idr_layers */891891- if (!idr_pre_get(&ida->idr, gfp_mask))911911+ if (!__idr_pre_get(&ida->idr, gfp_mask))892912 return 0;893913894914 /* allocate free_bitmap */
+1-1
lib/xz/Kconfig
···15151616config XZ_DEC_POWERPC1717 bool "PowerPC BCJ filter decoder"1818- default y if POWERPC1818+ default y if PPC1919 select XZ_DEC_BCJ20202121config XZ_DEC_IA64
+6-2
mm/Kconfig
···286286 default "1"287287288288config VIRT_TO_BUS289289- def_bool y290290- depends on HAVE_VIRT_TO_BUS289289+ bool290290+ help291291+ An architecture should select this if it implements the292292+ deprecated interface virt_to_bus(). All new architectures293293+ should probably not select this.294294+291295292296config MMU_NOTIFIER293297 bool
+3-2
mm/fremap.c
···129129 struct vm_area_struct *vma;130130 int err = -EINVAL;131131 int has_write_lock = 0;132132- vm_flags_t vm_flags;132132+ vm_flags_t vm_flags = 0;133133134134 if (prot)135135 return err;···254254 */255255256256out:257257- vm_flags = vma->vm_flags;257257+ if (vma)258258+ vm_flags = vma->vm_flags;258259 if (likely(!has_write_lock))259260 up_read(&mm->mmap_sem);260261 else
+1-1
mm/memory_hotplug.c
···18011801 int retry = 1;1802180218031803 start_pfn = PFN_DOWN(start);18041804- end_pfn = start_pfn + PFN_DOWN(size);18041804+ end_pfn = PFN_UP(start + size - 1);1805180518061806 /*18071807 * When CONFIG_MEMCG is on, one memory block may be used by other
-8
mm/process_vm_access.c
···429429 if (flags != 0)430430 return -EINVAL;431431432432- if (!access_ok(VERIFY_READ, lvec, liovcnt * sizeof(*lvec)))433433- goto out;434434-435435- if (!access_ok(VERIFY_READ, rvec, riovcnt * sizeof(*rvec)))436436- goto out;437437-438432 if (vm_write)439433 rc = compat_rw_copy_check_uvector(WRITE, lvec, liovcnt,440434 UIO_FASTIOV, iovstack_l,···453459 kfree(iov_r);454460 if (iov_l != iovstack_l)455461 kfree(iov_l);456456-457457-out:458462 return rc;459463}460464
···292292 hash = ipqhashfn(iph->id, iph->saddr, iph->daddr, iph->protocol);293293294294 q = inet_frag_find(&net->ipv4.frags, &ip4_frags, &arg, hash);295295- if (q == NULL)296296- goto out_nomem;297297-295295+ if (IS_ERR_OR_NULL(q)) {296296+ inet_frag_maybe_warn_overflow(q, pr_fmt());297297+ return NULL;298298+ }298299 return container_of(q, struct ipq, q);299299-300300-out_nomem:301301- LIMIT_NETDEBUG(KERN_ERR pr_fmt("ip_frag_create: no memory left !\n"));302302- return NULL;303300}304301305302/* Is the fragment too far ahead to be part of ipq? */
···15221522 }15231523 for (i++; i < CONF_NAMESERVERS_MAX; i++)15241524 if (ic_nameservers[i] != NONE)15251525- pr_cont(", nameserver%u=%pI4\n", i, &ic_nameservers[i]);15251525+ pr_cont(", nameserver%u=%pI4", i, &ic_nameservers[i]);15261526+ pr_cont("\n");15261527#endif /* !SILENT */1527152815281529 return 0;
-13
net/ipv4/netfilter/Kconfig
···36363737 If unsure, say Y.38383939-config IP_NF_QUEUE4040- tristate "IP Userspace queueing via NETLINK (OBSOLETE)"4141- depends on NETFILTER_ADVANCED4242- help4343- Netfilter has the ability to queue packets to user space: the4444- netlink device can be used to access them using this driver.4545-4646- This option enables the old IPv4-only "ip_queue" implementation4747- which has been obsoleted by the new "nfnetlink_queue" code (see4848- CONFIG_NETFILTER_NETLINK_QUEUE).4949-5050- To compile it as a module, choose M here. If unsure, say N.5151-5239config IP_NF_IPTABLES5340 tristate "IP tables support (required for filtering/masq/NAT)"5441 default m if NETFILTER_ADVANCED=n
+1-1
net/ipv4/tcp.c
···766766 * Make sure that we have exactly size bytes767767 * available to the caller, no more, no less.768768 */769769- skb->avail_size = size;769769+ skb->reserved_tailroom = skb->end - skb->tail - size;770770 return skb;771771 }772772 __kfree_skb(skb);
+7-7
net/ipv4/tcp_ipv4.c
···274274 struct inet_sock *inet = inet_sk(sk);275275 u32 mtu = tcp_sk(sk)->mtu_info;276276277277- /* We are not interested in TCP_LISTEN and open_requests (SYN-ACKs278278- * send out by Linux are always <576bytes so they should go through279279- * unfragmented).280280- */281281- if (sk->sk_state == TCP_LISTEN)282282- return;283283-284277 dst = inet_csk_update_pmtu(sk, mtu);285278 if (!dst)286279 return;···401408 goto out;402409403410 if (code == ICMP_FRAG_NEEDED) { /* PMTU discovery (RFC1191) */411411+ /* We are not interested in TCP_LISTEN and open_requests412412+ * (SYN-ACKs send out by Linux are always <576bytes so413413+ * they should go through unfragmented).414414+ */415415+ if (sk->sk_state == TCP_LISTEN)416416+ goto out;417417+404418 tp->mtu_info = info;405419 if (!sock_owned_by_user(sk)) {406420 tcp_v4_mtu_reduced(sk);
···389389 }390390391391 if (type == ICMPV6_PKT_TOOBIG) {392392+ /* We are not interested in TCP_LISTEN and open_requests393393+ * (SYN-ACKs send out by Linux are always <576bytes so394394+ * they should go through unfragmented).395395+ */396396+ if (sk->sk_state == TCP_LISTEN)397397+ goto out;398398+392399 tp->mtu_info = ntohl(info);393400 if (!sock_owned_by_user(sk))394401 tcp_v6_mtu_reduced(sk);
···25832583 NULL, NULL, NULL);2584258425852585 /* Check if the we got some results */25862586- if (!self->cachedaddr)25872587- return -EAGAIN; /* Didn't find any devices */25862586+ if (!self->cachedaddr) {25872587+ err = -EAGAIN; /* Didn't find any devices */25882588+ goto out;25892589+ }25882590 daddr = self->cachedaddr;25892591 /* Cleanup */25902592 self->cachedaddr = 0;
+103-107
net/l2tp/l2tp_core.c
···114114115115static void l2tp_session_set_header_len(struct l2tp_session *session, int version);116116static void l2tp_tunnel_free(struct l2tp_tunnel *tunnel);117117-static void l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel);118117119118static inline struct l2tp_net *l2tp_pernet(struct net *net)120119{···191192 } else {192193 /* Socket is owned by kernelspace */193194 sk = tunnel->sock;195195+ sock_hold(sk);194196 }195197196198out:···210210 }211211 sock_put(sk);212212 }213213+ sock_put(sk);213214}214215EXPORT_SYMBOL_GPL(l2tp_tunnel_sock_put);215216···374373 struct sk_buff *skbp;375374 struct sk_buff *tmp;376375 u32 ns = L2TP_SKB_CB(skb)->ns;377377- struct l2tp_stats *sstats;378376379377 spin_lock_bh(&session->reorder_q.lock);380380- sstats = &session->stats;381378 skb_queue_walk_safe(&session->reorder_q, skbp, tmp) {382379 if (L2TP_SKB_CB(skbp)->ns > ns) {383380 __skb_queue_before(&session->reorder_q, skbp, skb);···383384 "%s: pkt %hu, inserted before %hu, reorder_q len=%d\n",384385 session->name, ns, L2TP_SKB_CB(skbp)->ns,385386 skb_queue_len(&session->reorder_q));386386- u64_stats_update_begin(&sstats->syncp);387387- sstats->rx_oos_packets++;388388- u64_stats_update_end(&sstats->syncp);387387+ atomic_long_inc(&session->stats.rx_oos_packets);389388 goto out;390389 }391390 }···400403{401404 struct l2tp_tunnel *tunnel = session->tunnel;402405 int length = L2TP_SKB_CB(skb)->length;403403- struct l2tp_stats *tstats, *sstats;404406405407 /* We're about to requeue the skb, so return resources406408 * to its current owner (a socket receive buffer).407409 */408410 skb_orphan(skb);409411410410- tstats = &tunnel->stats;411411- u64_stats_update_begin(&tstats->syncp);412412- sstats = &session->stats;413413- u64_stats_update_begin(&sstats->syncp);414414- tstats->rx_packets++;415415- tstats->rx_bytes += length;416416- sstats->rx_packets++;417417- sstats->rx_bytes += length;418418- u64_stats_update_end(&tstats->syncp);419419- u64_stats_update_end(&sstats->syncp);412412+ atomic_long_inc(&tunnel->stats.rx_packets);413413+ atomic_long_add(length, &tunnel->stats.rx_bytes);414414+ atomic_long_inc(&session->stats.rx_packets);415415+ atomic_long_add(length, &session->stats.rx_bytes);420416421417 if (L2TP_SKB_CB(skb)->has_seq) {422418 /* Bump our Nr */···440450{441451 struct sk_buff *skb;442452 struct sk_buff *tmp;443443- struct l2tp_stats *sstats;444453445454 /* If the pkt at the head of the queue has the nr that we446455 * expect to send up next, dequeue it and any other···447458 */448459start:449460 spin_lock_bh(&session->reorder_q.lock);450450- sstats = &session->stats;451461 skb_queue_walk_safe(&session->reorder_q, skb, tmp) {452462 if (time_after(jiffies, L2TP_SKB_CB(skb)->expires)) {453453- u64_stats_update_begin(&sstats->syncp);454454- sstats->rx_seq_discards++;455455- sstats->rx_errors++;456456- u64_stats_update_end(&sstats->syncp);463463+ atomic_long_inc(&session->stats.rx_seq_discards);464464+ atomic_long_inc(&session->stats.rx_errors);457465 l2tp_dbg(session, L2TP_MSG_SEQ,458466 "%s: oos pkt %u len %d discarded (too old), waiting for %u, reorder_q_len=%d\n",459467 session->name, L2TP_SKB_CB(skb)->ns,···609623 struct l2tp_tunnel *tunnel = session->tunnel;610624 int offset;611625 u32 ns, nr;612612- struct l2tp_stats *sstats = &session->stats;613626614627 /* The ref count is increased since we now hold a pointer to615628 * the session. Take care to decrement the refcnt when exiting···625640 "%s: cookie mismatch (%u/%u). Discarding.\n",626641 tunnel->name, tunnel->tunnel_id,627642 session->session_id);628628- u64_stats_update_begin(&sstats->syncp);629629- sstats->rx_cookie_discards++;630630- u64_stats_update_end(&sstats->syncp);643643+ atomic_long_inc(&session->stats.rx_cookie_discards);631644 goto discard;632645 }633646 ptr += session->peer_cookie_len;···694711 l2tp_warn(session, L2TP_MSG_SEQ,695712 "%s: recv data has no seq numbers when required. Discarding.\n",696713 session->name);697697- u64_stats_update_begin(&sstats->syncp);698698- sstats->rx_seq_discards++;699699- u64_stats_update_end(&sstats->syncp);714714+ atomic_long_inc(&session->stats.rx_seq_discards);700715 goto discard;701716 }702717···713732 l2tp_warn(session, L2TP_MSG_SEQ,714733 "%s: recv data has no seq numbers when required. Discarding.\n",715734 session->name);716716- u64_stats_update_begin(&sstats->syncp);717717- sstats->rx_seq_discards++;718718- u64_stats_update_end(&sstats->syncp);735735+ atomic_long_inc(&session->stats.rx_seq_discards);719736 goto discard;720737 }721738 }···767788 * packets768789 */769790 if (L2TP_SKB_CB(skb)->ns != session->nr) {770770- u64_stats_update_begin(&sstats->syncp);771771- sstats->rx_seq_discards++;772772- u64_stats_update_end(&sstats->syncp);791791+ atomic_long_inc(&session->stats.rx_seq_discards);773792 l2tp_dbg(session, L2TP_MSG_SEQ,774793 "%s: oos pkt %u len %d discarded, waiting for %u, reorder_q_len=%d\n",775794 session->name, L2TP_SKB_CB(skb)->ns,···793816 return;794817795818discard:796796- u64_stats_update_begin(&sstats->syncp);797797- sstats->rx_errors++;798798- u64_stats_update_end(&sstats->syncp);819819+ atomic_long_inc(&session->stats.rx_errors);799820 kfree_skb(skb);800821801822 if (session->deref)···802827 l2tp_session_dec_refcount(session);803828}804829EXPORT_SYMBOL(l2tp_recv_common);830830+831831+/* Drop skbs from the session's reorder_q832832+ */833833+int l2tp_session_queue_purge(struct l2tp_session *session)834834+{835835+ struct sk_buff *skb = NULL;836836+ BUG_ON(!session);837837+ BUG_ON(session->magic != L2TP_SESSION_MAGIC);838838+ while ((skb = skb_dequeue(&session->reorder_q))) {839839+ atomic_long_inc(&session->stats.rx_errors);840840+ kfree_skb(skb);841841+ if (session->deref)842842+ (*session->deref)(session);843843+ }844844+ return 0;845845+}846846+EXPORT_SYMBOL_GPL(l2tp_session_queue_purge);805847806848/* Internal UDP receive frame. Do the real work of receiving an L2TP data frame807849 * here. The skb is not on a list when we get here.···835843 u32 tunnel_id, session_id;836844 u16 version;837845 int length;838838- struct l2tp_stats *tstats;839846840847 if (tunnel->sock && l2tp_verify_udp_checksum(tunnel->sock, skb))841848 goto discard_bad_csum;···923932discard_bad_csum:924933 LIMIT_NETDEBUG("%s: UDP: bad checksum\n", tunnel->name);925934 UDP_INC_STATS_USER(tunnel->l2tp_net, UDP_MIB_INERRORS, 0);926926- tstats = &tunnel->stats;927927- u64_stats_update_begin(&tstats->syncp);928928- tstats->rx_errors++;929929- u64_stats_update_end(&tstats->syncp);935935+ atomic_long_inc(&tunnel->stats.rx_errors);930936 kfree_skb(skb);931937932938 return 0;···10501062 struct l2tp_tunnel *tunnel = session->tunnel;10511063 unsigned int len = skb->len;10521064 int error;10531053- struct l2tp_stats *tstats, *sstats;1054106510551066 /* Debug */10561067 if (session->send_seq)···10781091 error = ip_queue_xmit(skb, fl);1079109210801093 /* Update stats */10811081- tstats = &tunnel->stats;10821082- u64_stats_update_begin(&tstats->syncp);10831083- sstats = &session->stats;10841084- u64_stats_update_begin(&sstats->syncp);10851094 if (error >= 0) {10861086- tstats->tx_packets++;10871087- tstats->tx_bytes += len;10881088- sstats->tx_packets++;10891089- sstats->tx_bytes += len;10951095+ atomic_long_inc(&tunnel->stats.tx_packets);10961096+ atomic_long_add(len, &tunnel->stats.tx_bytes);10971097+ atomic_long_inc(&session->stats.tx_packets);10981098+ atomic_long_add(len, &session->stats.tx_bytes);10901099 } else {10911091- tstats->tx_errors++;10921092- sstats->tx_errors++;11001100+ atomic_long_inc(&tunnel->stats.tx_errors);11011101+ atomic_long_inc(&session->stats.tx_errors);10931102 }10941094- u64_stats_update_end(&tstats->syncp);10951095- u64_stats_update_end(&sstats->syncp);1096110310971104 return 0;10981105}···12631282 /* No longer an encapsulation socket. See net/ipv4/udp.c */12641283 (udp_sk(sk))->encap_type = 0;12651284 (udp_sk(sk))->encap_rcv = NULL;12851285+ (udp_sk(sk))->encap_destroy = NULL;12661286 break;12671287 case L2TP_ENCAPTYPE_IP:12681288 break;···1293131112941312/* When the tunnel is closed, all the attached sessions need to go too.12951313 */12961296-static void l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel)13141314+void l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel)12971315{12981316 int hash;12991317 struct hlist_node *walk;···1316133413171335 hlist_del_init(&session->hlist);1318133613191319- /* Since we should hold the sock lock while13201320- * doing any unbinding, we need to release the13211321- * lock we're holding before taking that lock.13221322- * Hold a reference to the sock so it doesn't13231323- * disappear as we're jumping between locks.13241324- */13251337 if (session->ref != NULL)13261338 (*session->ref)(session);1327133913281340 write_unlock_bh(&tunnel->hlist_lock);1329134113301330- if (tunnel->version != L2TP_HDR_VER_2) {13311331- struct l2tp_net *pn = l2tp_pernet(tunnel->l2tp_net);13321332-13331333- spin_lock_bh(&pn->l2tp_session_hlist_lock);13341334- hlist_del_init_rcu(&session->global_hlist);13351335- spin_unlock_bh(&pn->l2tp_session_hlist_lock);13361336- synchronize_rcu();13371337- }13421342+ __l2tp_session_unhash(session);13431343+ l2tp_session_queue_purge(session);1338134413391345 if (session->session_close != NULL)13401346 (*session->session_close)(session);1341134713421348 if (session->deref != NULL)13431349 (*session->deref)(session);13501350+13511351+ l2tp_session_dec_refcount(session);1344135213451353 write_lock_bh(&tunnel->hlist_lock);13461354···13431371 }13441372 }13451373 write_unlock_bh(&tunnel->hlist_lock);13741374+}13751375+EXPORT_SYMBOL_GPL(l2tp_tunnel_closeall);13761376+13771377+/* Tunnel socket destroy hook for UDP encapsulation */13781378+static void l2tp_udp_encap_destroy(struct sock *sk)13791379+{13801380+ struct l2tp_tunnel *tunnel = l2tp_sock_to_tunnel(sk);13811381+ if (tunnel) {13821382+ l2tp_tunnel_closeall(tunnel);13831383+ sock_put(sk);13841384+ }13461385}1347138613481387/* Really kill the tunnel.···13801397 return;1381139813821399 sock = sk->sk_socket;13831383- BUG_ON(!sock);1384140013851385- /* If the tunnel socket was created directly by the kernel, use the13861386- * sk_* API to release the socket now. Otherwise go through the13871387- * inet_* layer to shut the socket down, and let userspace close it.14011401+ /* If the tunnel socket was created by userspace, then go through the14021402+ * inet layer to shut the socket down, and let userspace close it.14031403+ * Otherwise, if we created the socket directly within the kernel, use14041404+ * the sk API to release it here.13881405 * In either case the tunnel resources are freed in the socket13891406 * destructor when the tunnel socket goes away.13901407 */13911391- if (sock->file == NULL) {13921392- kernel_sock_shutdown(sock, SHUT_RDWR);13931393- sk_release_kernel(sk);14081408+ if (tunnel->fd >= 0) {14091409+ if (sock)14101410+ inet_shutdown(sock, 2);13941411 } else {13951395- inet_shutdown(sock, 2);14121412+ if (sock)14131413+ kernel_sock_shutdown(sock, SHUT_RDWR);14141414+ sk_release_kernel(sk);13961415 }1397141613981417 l2tp_tunnel_sock_put(sk);···16531668 /* Mark socket as an encapsulation socket. See net/ipv4/udp.c */16541669 udp_sk(sk)->encap_type = UDP_ENCAP_L2TPINUDP;16551670 udp_sk(sk)->encap_rcv = l2tp_udp_encap_recv;16711671+ udp_sk(sk)->encap_destroy = l2tp_udp_encap_destroy;16561672#if IS_ENABLED(CONFIG_IPV6)16571673 if (sk->sk_family == PF_INET6)16581674 udpv6_encap_enable();···17091723 */17101724int l2tp_tunnel_delete(struct l2tp_tunnel *tunnel)17111725{17261726+ l2tp_tunnel_closeall(tunnel);17121727 return (false == queue_work(l2tp_wq, &tunnel->del_work));17131728}17141729EXPORT_SYMBOL_GPL(l2tp_tunnel_delete);···17181731 */17191732void l2tp_session_free(struct l2tp_session *session)17201733{17211721- struct l2tp_tunnel *tunnel;17341734+ struct l2tp_tunnel *tunnel = session->tunnel;1722173517231736 BUG_ON(atomic_read(&session->ref_count) != 0);1724173717251725- tunnel = session->tunnel;17261726- if (tunnel != NULL) {17381738+ if (tunnel) {17271739 BUG_ON(tunnel->magic != L2TP_TUNNEL_MAGIC);17281728-17291729- /* Delete the session from the hash */17301730- write_lock_bh(&tunnel->hlist_lock);17311731- hlist_del_init(&session->hlist);17321732- write_unlock_bh(&tunnel->hlist_lock);17331733-17341734- /* Unlink from the global hash if not L2TPv2 */17351735- if (tunnel->version != L2TP_HDR_VER_2) {17361736- struct l2tp_net *pn = l2tp_pernet(tunnel->l2tp_net);17371737-17381738- spin_lock_bh(&pn->l2tp_session_hlist_lock);17391739- hlist_del_init_rcu(&session->global_hlist);17401740- spin_unlock_bh(&pn->l2tp_session_hlist_lock);17411741- synchronize_rcu();17421742- }17431743-17441740 if (session->session_id != 0)17451741 atomic_dec(&l2tp_session_count);17461746-17471742 sock_put(tunnel->sock);17481748-17491749- /* This will delete the tunnel context if this17501750- * is the last session on the tunnel.17511751- */17521743 session->tunnel = NULL;17531744 l2tp_tunnel_dec_refcount(tunnel);17541745 }···17371772}17381773EXPORT_SYMBOL_GPL(l2tp_session_free);1739177417751775+/* Remove an l2tp session from l2tp_core's hash lists.17761776+ * Provides a tidyup interface for pseudowire code which can't just route all17771777+ * shutdown via. l2tp_session_delete and a pseudowire-specific session_close17781778+ * callback.17791779+ */17801780+void __l2tp_session_unhash(struct l2tp_session *session)17811781+{17821782+ struct l2tp_tunnel *tunnel = session->tunnel;17831783+17841784+ /* Remove the session from core hashes */17851785+ if (tunnel) {17861786+ /* Remove from the per-tunnel hash */17871787+ write_lock_bh(&tunnel->hlist_lock);17881788+ hlist_del_init(&session->hlist);17891789+ write_unlock_bh(&tunnel->hlist_lock);17901790+17911791+ /* For L2TPv3 we have a per-net hash: remove from there, too */17921792+ if (tunnel->version != L2TP_HDR_VER_2) {17931793+ struct l2tp_net *pn = l2tp_pernet(tunnel->l2tp_net);17941794+ spin_lock_bh(&pn->l2tp_session_hlist_lock);17951795+ hlist_del_init_rcu(&session->global_hlist);17961796+ spin_unlock_bh(&pn->l2tp_session_hlist_lock);17971797+ synchronize_rcu();17981798+ }17991799+ }18001800+}18011801+EXPORT_SYMBOL_GPL(__l2tp_session_unhash);18021802+17401803/* This function is used by the netlink SESSION_DELETE command and by17411804 pseudowire modules.17421805 */17431806int l2tp_session_delete(struct l2tp_session *session)17441807{18081808+ if (session->ref)18091809+ (*session->ref)(session);18101810+ __l2tp_session_unhash(session);18111811+ l2tp_session_queue_purge(session);17451812 if (session->session_close != NULL)17461813 (*session->session_close)(session);17471747-18141814+ if (session->deref)18151815+ (*session->ref)(session);17481816 l2tp_session_dec_refcount(session);17491749-17501817 return 0;17511818}17521819EXPORT_SYMBOL_GPL(l2tp_session_delete);17531753-1754182017551821/* We come here whenever a session's send_seq, cookie_len or17561822 * l2specific_len parameters are set.
···43434444 /* Make our own copy of the packet. Otherwise we will mangle the4545 * packet for anyone who came before us (e.g. tcpdump via AF_PACKET).4646- * (No one comes after us, since we tell handle_bridge() that we took4747- * the packet.) */4646+ */4847 skb = skb_share_check(skb, GFP_ATOMIC);4948 if (unlikely(!skb))5049 return;
+1-2
net/openvswitch/vport.c
···325325 * @skb: skb that was received326326 *327327 * Must be called with rcu_read_lock. The packet cannot be shared and328328- * skb->data should point to the Ethernet header. The caller must have already329329- * called compute_ip_summed() to initialize the checksumming fields.328328+ * skb->data should point to the Ethernet header.330329 */331330void ovs_vport_receive(struct vport *vport, struct sk_buff *skb)332331{
+1-1
net/sctp/associola.c
···10791079 transports) {1080108010811081 if (transport == active)10821082- break;10821082+ continue;10831083 list_for_each_entry(chunk, &transport->transmitted,10841084 transmitted_list) {10851085 if (key == chunk->subh.data_hdr->tsn) {
+1-1
net/sctp/sm_statefuns.c
···20822082 }2083208320842084 /* Delete the tempory new association. */20852085- sctp_add_cmd_sf(commands, SCTP_CMD_NEW_ASOC, SCTP_ASOC(new_asoc));20852085+ sctp_add_cmd_sf(commands, SCTP_CMD_SET_ASOC, SCTP_ASOC(new_asoc));20862086 sctp_add_cmd_sf(commands, SCTP_CMD_DELETE_TCB, SCTP_NULL());2087208720882088 /* Restore association pointer to provide SCTP command interpeter
+8-4
net/sunrpc/auth_gss/svcauth_gss.c
···447447 else {448448 int N, i;449449450450+ /*451451+ * NOTE: we skip uid_valid()/gid_valid() checks here:452452+ * instead, * -1 id's are later mapped to the453453+ * (export-specific) anonymous id by nfsd_setuser.454454+ *455455+ * (But supplementary gid's get no such special456456+ * treatment so are checked for validity here.)457457+ */450458 /* uid */451459 rsci.cred.cr_uid = make_kuid(&init_user_ns, id);452452- if (!uid_valid(rsci.cred.cr_uid))453453- goto out;454460455461 /* gid */456462 if (get_int(&mesg, &id))457463 goto out;458464 rsci.cred.cr_gid = make_kgid(&init_user_ns, id);459459- if (!gid_valid(rsci.cred.cr_gid))460460- goto out;461465462466 /* number of additional gid's */463467 if (get_int(&mesg, &N))
···545545 case MIDI_PGM_CHANGE:546546 if (seq_mode == SEQ_2)547547 {548548+ if (chn > 15)549549+ break;550550+548551 synth_devs[dev]->chn_info[chn].pgm_num = p1;549552 if ((int) dev >= num_synths)550553 synth_devs[dev]->set_instr(dev, chn, p1);···599596 case MIDI_PITCH_BEND:600597 if (seq_mode == SEQ_2)601598 {599599+ if (chn > 15)600600+ break;601601+602602 synth_devs[dev]->chn_info[chn].bender_value = w14;603603604604 if ((int) dev < num_synths)
···815815 return 0;816816}817817818818+/* check whether a built-in speaker is included in parsed pins */819819+static bool has_builtin_speaker(struct hda_codec *codec)820820+{821821+ struct sigmatel_spec *spec = codec->spec;822822+ hda_nid_t *nid_pin;823823+ int nids, i;824824+825825+ if (spec->gen.autocfg.line_out_type == AUTO_PIN_SPEAKER_OUT) {826826+ nid_pin = spec->gen.autocfg.line_out_pins;827827+ nids = spec->gen.autocfg.line_outs;828828+ } else {829829+ nid_pin = spec->gen.autocfg.speaker_pins;830830+ nids = spec->gen.autocfg.speaker_outs;831831+ }832832+833833+ for (i = 0; i < nids; i++) {834834+ unsigned int def_conf = snd_hda_codec_get_pincfg(codec, nid_pin[i]);835835+ if (snd_hda_get_input_pin_attr(def_conf) == INPUT_PIN_ATTR_INT)836836+ return true;837837+ }838838+ return false;839839+}840840+818841/*819842 * PC beep controls820843 */···39123889 stac_free(codec);39133890 return err;39143891 }38923892+38933893+ /* Don't GPIO-mute speakers if there are no internal speakers, because38943894+ * the GPIO might be necessary for Headphone38953895+ */38963896+ if (spec->eapd_switch && !has_builtin_speaker(codec))38973897+ spec->eapd_switch = 0;3915389839163899 codec->proc_widget_hook = stac92hd7x_proc_hook;39173900
+15
sound/usb/card.c
···244244 usb_ifnum_to_if(dev, ctrlif)->intf_assoc;245245246246 if (!assoc) {247247+ /*248248+ * Firmware writers cannot count to three. So to find249249+ * the IAD on the NuForce UDH-100, also check the next250250+ * interface.251251+ */252252+ struct usb_interface *iface =253253+ usb_ifnum_to_if(dev, ctrlif + 1);254254+ if (iface &&255255+ iface->intf_assoc &&256256+ iface->intf_assoc->bFunctionClass == USB_CLASS_AUDIO &&257257+ iface->intf_assoc->bFunctionProtocol == UAC_VERSION_2)258258+ assoc = iface->intf_assoc;259259+ }260260+261261+ if (!assoc) {247262 snd_printk(KERN_ERR "Audio class v2 interfaces need an interface association\n");248263 return -EINVAL;249264 }
+1-1
tools/usb/ffs-test.c
···3838#include <unistd.h>3939#include <tools/le_byteshift.h>40404141-#include "../../include/linux/usb/functionfs.h"4141+#include "../../include/uapi/linux/usb/functionfs.h"424243434444/******************** Little Endian Handling ********************************/