Linux 4.4.42
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 41 +SUBLEVEL = 42 EXTRAVERSION = NAME = Blurry Fish Butt
arch/arm/boot/dts/r8a7794.dtsi +1 -1
@@ -1023,7 +1023,7 @@ mstp7_clks: mstp7_clks@e615014c { compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-clocks"; reg = <0 0xe615014c 0 4>, <0 0xe61501c4 0 4>; - clocks = <&mp_clk>, <&mp_clk>, + clocks = <&mp_clk>, <&hp_clk>, <&zs_clk>, <&p_clk>, <&p_clk>, <&zs_clk>, <&zs_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>; #clock-cells = <1>;
arch/arm/crypto/aes-ce-glue.c +5 -0
@@ -87,8 +87,13 @@ static int ce_aes_expandkey(struct crypto_aes_ctx *ctx, const u8 *in_key,u32 *rki = ctx->key_enc + (i * kwords);u32 *rko = rki + kwords; +#ifndef CONFIG_CPU_BIG_ENDIAN rko[0 ] =ror32 (ce_aes_sub (rki[kwords -1 ]),8 ); rko[0 ] = rko[0 ] ^ rki[0 ] ^ rcon[i]; +#else + rko[0 ] =rol32 (ce_aes_sub (rki[kwords -1 ]),8 ); + rko[0 ] = rko[0 ] ^ rki[0 ] ^ (rcon[i] <<24 ); +#endif rko[1 ] = rko[0 ] ^ rki[1 ]; rko[2 ] = rko[1 ] ^ rki[2 ]; rko[3 ] = rko[2 ] ^ rki[3 ];
arch/arm/mach-davinci/da850.c +11 -1
@@ -298,6 +298,16 @@ static struct clk emac_clk = { .gpsc = 1, }; +/* +* In order to avoid adding the emac_clk to the clock lookup table twice (and +* screwing up the linked list in the process) create a separate clock for +* mdio inheriting the rate from emac_clk. +*/ +static struct clk mdio_clk = { + .name ="mdio" , + .parent = &emac_clk, +}; +static struct clk mcasp_clk = { .name ="mcasp" , .parent = &pll0_sysclk2,
@@ -462,7 +472,7 @@ static struct clk_lookup da850_clks[] = {CLK (NULL ,"arm" , &arm_clk),CLK (NULL ,"rmii" , &rmii_clk),CLK ("davinci_emac.1" ,NULL , &emac_clk), -CLK ("davinci_mdio.0" ,"fck" , &emac_clk), +CLK ("davinci_mdio.0" ,"fck" , &mdio_clk),CLK ("davinci-mcasp.0" ,NULL , &mcasp_clk),CLK ("da8xx_lcdc.0" ,"fck" , &lcdc_clk), CLK("da830-mmc.0", NULL, &mmcsd0_clk),
arch/arm64/crypto/aes-ce-ccm-core.S +27 -26
166 lines not on this page · raw message
arch/arm64/crypto/aes-ce-cipher.c +15 -10
@@ -47,24 +47,24 @@ static void aes_cipher_encrypt(struct crypto_tfm *tfm, u8 dst[], u8 const src[])kernel_neon_begin_partial (4 ); __asm__(" ld1 {v0.16b}, %[in] ;" -" ld1 {v1.2d}, [%[key]], #16 ;" +" ld1 {v1.16b}, [%[key]], #16 ;" " cmp %w[rounds], #10 ;" " bmi 0f ;" " bne 3f ;" " mov v3.16b, v1.16b ;" " b 2f ;" "0: mov v2.16b, v1.16b ;" -" ld1 {v3.2d}, [%[key]], #16 ;" +" ld1 {v3.16b}, [%[key]], #16 ;" "1: aese v0.16b, v2.16b ;" " aesmc v0.16b, v0.16b ;" -"2: ld1 {v1.2d}, [%[key]], #16 ;" +"2: ld1 {v1.16b}, [%[key]], #16 ;" " aese v0.16b, v3.16b ;" " aesmc v0.16b, v0.16b ;" -"3: ld1 {v2.2d}, [%[key]], #16 ;" +"3: ld1 {v2.16b}, [%[key]], #16 ;" " subs %w[rounds], %w[rounds], #3 ;" " aese v0.16b, v1.16b ;" " aesmc v0.16b, v0.16b ;" -" ld1 {v3.2d}, [%[key]], #16 ;" +" ld1 {v3.16b}, [%[key]], #16 ;" " bpl 1b ;" " aese v0.16b, v2.16b ;" " eor v0.16b, v0.16b, v3.16b ;"
@@ -92,24 +92,24 @@ static void aes_cipher_decrypt(struct crypto_tfm *tfm, u8 dst[], u8 const src[])kernel_neon_begin_partial (4 ); __asm__(" ld1 {v0.16b}, %[in] ;" -" ld1 {v1.2d}, [%[key]], #16 ;" +" ld1 {v1.16b}, [%[key]], #16 ;" " cmp %w[rounds], #10 ;" " bmi 0f ;" " bne 3f ;" " mov v3.16b, v1.16b ;" " b 2f ;" "0: mov v2.16b, v1.16b ;" -" ld1 {v3.2d}, [%[key]], #16 ;" +" ld1 {v3.16b}, [%[key]], #16 ;" "1: aesd v0.16b, v2.16b ;" " aesimc v0.16b, v0.16b ;" -"2: ld1 {v1.2d}, [%[key]], #16 ;" +"2: ld1 {v1.16b}, [%[key]], #16 ;" " aesd v0.16b, v3.16b ;" " aesimc v0.16b, v0.16b ;" -"3: ld1 {v2.2d}, [%[key]], #16 ;" +"3: ld1 {v2.16b}, [%[key]], #16 ;" " subs %w[rounds], %w[rounds], #3 ;" " aesd v0.16b, v1.16b ;" " aesimc v0.16b, v0.16b ;" -" ld1 {v3.2d}, [%[key]], #16 ;" +" ld1 {v3.16b}, [%[key]], #16 ;" " bpl 1b ;" " aesd v0.16b, v2.16b ;" " eor v0.16b, v0.16b, v3.16b ;"
@@ -173,7 +173,12 @@ int ce_aes_expandkey(struct crypto_aes_ctx *ctx, const u8 *in_key,u32 *rki = ctx->key_enc + (i * kwords);u32 *rko = rki + kwords; +#ifndef CONFIG_CPU_BIG_ENDIAN rko[0 ] =ror32 (aes_sub (rki[kwords -1 ]),8 ) ^ rcon[i] ^ rki[0 ]; +#else + rko[0 ] =rol32 (aes_sub (rki[kwords -1 ]),8 ) ^ (rcon[i] <<24 ) ^ + rki[0 ]; +#endif rko[1 ] = rko[0 ] ^ rki[1 ]; rko[2 ] = rko[1 ] ^ rki[2 ]; rko[3 ] = rko[2 ] ^ rki[3 ];
arch/arm64/crypto/aes-ce.S +1 -0
@@ -10,6 +10,7 @@ */ #include <linux/linkage.h> +#include <asm/assembler.h> #define AES_ENTRY(func) ENTRY(ce_ ## func) #define AES_ENDPROC(func) ENDPROC(ce_ ## func)
arch/arm64/crypto/aes-modes.S +2 -1
@@ -386,7 +386,8 @@ AES_ENDPROC(aes_ctr_encrypt) .endm .Lxts_mul_x: - .word 1, 0, 0x87, 0 +CPU_LE( .quad 1, 0x87 ) +CPU_BE( .quad 0x87, 1 ) AES_ENTRY(aes_xts_encrypt) FRAME_PUSH
arch/arm64/crypto/aes-neon.S +15 -10
@@ -9,6 +9,7 @@ */ #include <linux/linkage.h> +#include <asm/assembler.h> #define AES_ENTRY(func) ENTRY(neon_ ## func) #define AES_ENDPROC(func) ENDPROC(neon_ ## func)
@@ -83,13 +84,13 @@ .endm .macro do_block, enc, in, rounds, rk, rkp, i - ld1 {v15.16b}, [\rk] + ld1 {v15.4s}, [\rk] add \rkp, \rk, #16 mov \i, \rounds 1111: eor \in\().16b, \in\().16b, v15.16b /* ^round key */ tbl \in\().16b, {\in\().16b}, v13.16b /* ShiftRows */ sub_bytes \in - ld1 {v15.16b}, [\rkp], #16 + ld1 {v15.4s}, [\rkp], #16 subs \i, \i, #1 beq 2222f .if \enc == 1
@@ -229,7 +230,7 @@ .endm .macro do_block_2x, enc, in0, in1 rounds, rk, rkp, i - ld1 {v15.16b}, [\rk] + ld1 {v15.4s}, [\rk] add \rkp, \rk, #16 mov \i, \rounds 1111: eor \in0\().16b, \in0\().16b, v15.16b /* ^round key */
@@ -237,7 +238,7 @@ sub_bytes_2x \in0, \in1 tbl \in0\().16b, {\in0\().16b}, v13.16b /* ShiftRows */ tbl \in1\().16b, {\in1\().16b}, v13.16b /* ShiftRows */ - ld1 {v15.16b}, [\rkp], #16 + ld1 {v15.4s}, [\rkp], #16 subs \i, \i, #1 beq 2222f .if \enc == 1
@@ -254,7 +255,7 @@ .endm .macro do_block_4x, enc, in0, in1, in2, in3, rounds, rk, rkp, i - ld1 {v15.16b}, [\rk] + ld1 {v15.4s}, [\rk] add \rkp, \rk, #16 mov \i, \rounds 1111: eor \in0\().16b, \in0\().16b, v15.16b /* ^round key */
@@ -266,7 +267,7 @@ tbl \in1\().16b, {\in1\().16b}, v13.16b /* ShiftRows */ tbl \in2\().16b, {\in2\().16b}, v13.16b /* ShiftRows */ tbl \in3\().16b, {\in3\().16b}, v13.16b /* ShiftRows */ - ld1 {v15.16b}, [\rkp], #16 + ld1 {v15.4s}, [\rkp], #16 subs \i, \i, #1 beq 2222f .if \enc == 1
@@ -306,12 +307,16 @@ .text .align 4 .LForward_ShiftRows: - .byte 0x0, 0x5, 0xa, 0xf, 0x4, 0x9, 0xe, 0x3 - .byte 0x8, 0xd, 0x2, 0x7, 0xc, 0x1, 0x6, 0xb +CPU_LE( .byte 0x0, 0x5, 0xa, 0xf, 0x4, 0x9, 0xe, 0x3 ) +CPU_LE( .byte 0x8, 0xd, 0x2, 0x7, 0xc, 0x1, 0x6, 0xb ) +CPU_BE( .byte 0xb, 0x6, 0x1, 0xc, 0x7, 0x2, 0xd, 0x8 ) +CPU_BE( .byte 0x3, 0xe, 0x9, 0x4, 0xf, 0xa, 0x5, 0x0 ) .LReverse_ShiftRows: - .byte 0x0, 0xd, 0xa, 0x7, 0x4, 0x1, 0xe, 0xb - .byte 0x8, 0x5, 0x2, 0xf, 0xc, 0x9, 0x6, 0x3 +CPU_LE( .byte 0x0, 0xd, 0xa, 0x7, 0x4, 0x1, 0xe, 0xb ) +CPU_LE( .byte 0x8, 0x5, 0x2, 0xf, 0xc, 0x9, 0x6, 0x3 ) +CPU_BE( .byte 0x3, 0x6, 0x9, 0xc, 0xf, 0x2, 0x5, 0x8 ) +CPU_BE( .byte 0xb, 0xe, 0x1, 0x4, 0x7, 0xa, 0xd, 0x0 ) .LForward_Sbox: .byte 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5
arch/arm64/crypto/ghash-ce-core.S +3 -3
@@ -29,8 +29,8 @@ * struct ghash_key const *k, const char *head) */ ENTRY(pmull_ghash_update) - ld1 {SHASH.16b}, [x3] - ld1 {XL.16b}, [x1] + ld1 {SHASH.2d}, [x3] + ld1 {XL.2d}, [x1] movi MASK.16b, #0xe1 ext SHASH2.16b, SHASH.16b, SHASH.16b, #8 shl MASK.2d, MASK.2d, #57
@@ -74,6 +74,6 @@ CPU_LE( rev64 T1.16b, T1.16b ) cbnz w0, 0b - st1 {XL.16b}, [x1] + st1 {XL.2d}, [x1] ret ENDPROC(pmull_ghash_update)
arch/arm64/crypto/sha1-ce-core.S +2 -2
@@ -78,7 +78,7 @@ ENTRY(sha1_ce_transform) ld1r {k3.4s}, [x6] /* load state */ - ldr dga, [x0] + ld1 {dgav.4s}, [x0] ldr dgb, [x0, #16] /* load sha1_ce_state::finalize */
@@ -144,7 +144,7 @@ CPU_LE( rev32 v11.16b, v11.16b ) b 1b /* store new state */ -3: str dga, [x0] +3: st1 {dgav.4s}, [x0] str dgb, [x0, #16] ret ENDPROC(sha1_ce_transform)
arch/arm64/crypto/sha2-ce-core.S +2 -2
@@ -85,7 +85,7 @@ ENTRY(sha2_ce_transform) ld1 {v12.4s-v15.4s}, [x8] /* load state */ - ldp dga, dgb, [x0] + ld1 {dgav.4s, dgbv.4s}, [x0] /* load sha256_ce_state::finalize */ ldr w4, [x0, #:lo12:sha256_ce_offsetof_finalize]
@@ -148,6 +148,6 @@ CPU_LE( rev32 v19.16b, v19.16b ) b 1b /* store new state */ -3: stp dga, dgb, [x0] +3: st1 {dgav.4s, dgbv.4s}, [x0] ret ENDPROC(sha2_ce_transform)
arch/cris/boot/rescue/Makefile +8 -0
@@ -10,6 +10,9 @@ asflags-y += $(LINUXINCLUDE) ccflags-y += -O2 $(LINUXINCLUDE) + +ifdef CONFIG_ETRAX_AXISFLASHMAP + arch-$(CONFIG_ETRAX_ARCH_V10) = v10 arch-$(CONFIG_ETRAX_ARCH_V32) = v32
@@ -28,6 +31,11 @@ $(obj)/rescue.bin: $(obj)/rescue.o FORCE $(call if_changed,objcopy) cp -p $(obj)/rescue.bin $(objtree) +else +$(obj)/rescue.bin: + +endif + $(obj)/testrescue.bin: $(obj)/testrescue.o $(OBJCOPY) $(OBJCOPYFLAGS) $(obj)/testrescue.o tr.bin # Pad it to 784 bytes
arch/mips/kvm/mips.c +2 -2
@@ -324,8 +324,8 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id)#endif /* Invalidate the icache for these ranges */ -local_flush_icache_range ((unsigned long )gebase, - (unsigned long )gebase +ALIGN (size,PAGE_SIZE )); +flush_icache_range ((unsigned long )gebase, + (unsigned long )gebase +ALIGN (size,PAGE_SIZE ));/* * Allocate comm page for guest kernel, a TLB will be reserved for
arch/s390/crypto/prng.c +4 -2
@@ -565,8 +565,10 @@ static ssize_t prng_tdes_read(struct file *file, char __user *ubuf, prng_data->prngws.byte_counter += n; prng_data->prngws.reseed_counter += n; -if (copy_to_user (ubuf, prng_data->buf, chunk)) -return -EFAULT ; +if (copy_to_user (ubuf, prng_data->buf, chunk)) { + ret = -EFAULT ; +break ; + } nbytes -= chunk; ret += chunk;
arch/x86/kvm/x86.c +7 -2
@@ -2949,6 +2949,8 @@ static void kvm_vcpu_ioctl_x86_get_vcpu_events(struct kvm_vcpu *vcpu,memset (&events->reserved,0 ,sizeof (events->reserved)); } +static void kvm_set_hflags (struct kvm_vcpu *vcpu,unsigned emul_flags); +static int kvm_vcpu_ioctl_x86_set_vcpu_events (struct kvm_vcpu *vcpu,struct kvm_vcpu_events *events) {
@@ -2981,10 +2983,13 @@ static int kvm_vcpu_ioctl_x86_set_vcpu_events(struct kvm_vcpu *vcpu, vcpu->arch.apic->sipi_vector = events->sipi_vector;if (events->flags &KVM_VCPUEVENT_VALID_SMM ) { +u32 hflags = vcpu->arch.hflags;if (events->smi.smm) - vcpu->arch.hflags |=HF_SMM_MASK ; + hflags |=HF_SMM_MASK ;else - vcpu->arch.hflags &= ~HF_SMM_MASK ; + hflags &= ~HF_SMM_MASK ; +kvm_set_hflags (vcpu, hflags); + vcpu->arch.smi_pending = events->smi.pending;if (events->smi.smm_inside_nmi) vcpu->arch.hflags |=HF_SMM_INSIDE_NMI_MASK ;
drivers/base/power/power.h +18 -1
@@ -20,14 +20,22 @@ static inline void pm_runtime_early_init(struct device *dev)extern void pm_runtime_init (struct device *dev);extern void pm_runtime_remove (struct device *dev); +#define WAKE_IRQ_DEDICATED_ALLOCATED BIT(0) +#define WAKE_IRQ_DEDICATED_MANAGED BIT(1) +#define WAKE_IRQ_DEDICATED_MASK (WAKE_IRQ_DEDICATED_ALLOCATED | \ + WAKE_IRQ_DEDICATED_MANAGED) +struct wake_irq {struct device *dev; +unsigned int status;int irq; -bool dedicated_irq:1 ; };extern void dev_pm_arm_wake_irq (struct wake_irq *wirq);extern void dev_pm_disarm_wake_irq (struct wake_irq *wirq); +extern void dev_pm_enable_wake_irq_check (struct device *dev, +bool can_change_status); +extern void dev_pm_disable_wake_irq_check (struct device *dev);#ifdef CONFIG_PM_SLEEP
@@ -102,6 +110,15 @@ static inline void dev_pm_disarm_wake_irq(struct wake_irq *wirq) { } +static inline void dev_pm_enable_wake_irq_check (struct device *dev, +bool can_change_status) +{ +} + +static inline void dev_pm_disable_wake_irq_check (struct device *dev) +{ +} +#endif #ifdef CONFIG_PM_SLEEP
drivers/base/power/runtime.c +4 -4
@@ -515,7 +515,7 @@ static int rpm_suspend(struct device *dev, int rpmflags) callback =RPM_GET_CALLBACK (dev, runtime_suspend); -dev_pm_enable_wake_irq (dev); +dev_pm_enable_wake_irq_check (dev, true); retval =rpm_callback (callback, dev);if (retval) goto fail;
@@ -554,7 +554,7 @@ static int rpm_suspend(struct device *dev, int rpmflags)return retval; fail: -dev_pm_disable_wake_irq (dev); +dev_pm_disable_wake_irq_check (dev);__update_runtime_status (dev,RPM_ACTIVE ); dev->power.deferred_resume = false;wake_up_all (&dev->power.wait_queue);
@@ -737,12 +737,12 @@ static int rpm_resume(struct device *dev, int rpmflags) callback =RPM_GET_CALLBACK (dev, runtime_resume); -dev_pm_disable_wake_irq (dev); +dev_pm_disable_wake_irq_check (dev); retval =rpm_callback (callback, dev);if (retval) {__update_runtime_status (dev,RPM_SUSPENDED );pm_runtime_cancel_pending (dev); -dev_pm_enable_wake_irq (dev); +dev_pm_enable_wake_irq_check (dev, false); }else { no_callback:__update_runtime_status (dev,RPM_ACTIVE );
drivers/base/power/wakeirq.c +66 -10
123 lines not on this page · raw message
drivers/clk/clk-wm831x.c +1 -1
@@ -247,7 +247,7 @@ static int wm831x_clkout_is_prepared(struct clk_hw *hw)if (ret <0 ) {dev_err (wm831x->dev,"Unable to read CLOCK_CONTROL_1: %d\n" , ret); -return true; +return false; }return (ret &WM831X_CLKOUT_ENA ) !=0 ;
drivers/clk/imx/clk-imx31.c +1 -3
@@ -157,10 +157,8 @@ static void __init _mx31_clocks_init(unsigned long fref) } } -int __init mx31_clocks_init (void ) +int __init mx31_clocks_init (unsigned long fref) { -u32 fref =26000000 ;/* default */ -_mx31_clocks_init (fref);clk_register_clkdev (clk[gpt_gate],"per" ,"imx-gpt.0" );
drivers/gpu/drm/radeon/radeon_cursor.c +3 -3
@@ -146,6 +146,9 @@ static int radeon_cursor_move_locked(struct drm_crtc *crtc, int x, int y)int xorigin =0 , yorigin =0 ;int w = radeon_crtc->cursor_width; + radeon_crtc->cursor_x = x; + radeon_crtc->cursor_y = y; +if (ASIC_IS_AVIVO (rdev)) {/* avivo cursor are offset into the total surface */ x += crtc->x;
@@ -240,9 +243,6 @@ static int radeon_cursor_move_locked(struct drm_crtc *crtc, int x, int y) yorigin * 256); } - radeon_crtc->cursor_x = x; - radeon_crtc->cursor_y = y; -if (radeon_crtc->cursor_out_of_bounds) { radeon_crtc->cursor_out_of_bounds = false;if (radeon_crtc->cursor_bo)
drivers/hwmon/amc6821.c +2 -2
@@ -188,8 +188,8 @@ static struct amc6821_data *amc6821_update_device(struct device *dev) !data->valid) {for (i =0 ; i <TEMP_IDX_LEN ; i++) - data->temp[i] =i2c_smbus_read_byte_data (client, - temp_reg[i]); + data->temp[i] = (int8_t )i2c_smbus_read_byte_data ( + client, temp_reg[i]); data->stat1 =i2c_smbus_read_byte_data (client,AMC6821_REG_STAT1 );
drivers/hwmon/ds620.c +1 -1
@@ -166,7 +166,7 @@ static ssize_t set_temp(struct device *dev, struct device_attribute *da,if (res)return res; - val = (val *10 /625 ) *8 ; + val = (clamp_val (val,-128000 ,128000 ) *10 /625 ) *8 ;mutex_lock (&data->update_lock); data->temp[attr->index] = val;
drivers/hwmon/g762.c +7 -4
@@ -193,14 +193,17 @@ static inline unsigned int rpm_from_cnt(u8 cnt, u32 clk_freq, u16 p,* Convert fan RPM value from sysfs into count value for fan controller * register (FAN_SET_CNT). */ -static inline unsigned char cnt_from_rpm (u32 rpm,u32 clk_freq,u16 p, +static inline unsigned char cnt_from_rpm (unsigned long rpm,u32 clk_freq,u16 p,u8 clk_div,u8 gear_mult) { -if (!rpm)/* to stop the fan, set cnt to 255 */ +unsigned long f1 = clk_freq *30 * gear_mult; +unsigned long f2 = p * clk_div; + +if (!rpm)/* to stop the fan, set cnt to 255 */ return 0xff ; -return clamp_val (((clk_freq *30 * gear_mult) / (rpm * p * clk_div)), -0 ,255 ); + rpm =clamp_val (rpm, f1 / (255 * f2),ULONG_MAX / f2); +return DIV_ROUND_CLOSEST (f1, rpm * f2); }/* helper to grab and cache data, at most one time per second */
drivers/hwmon/nct7802.c +5 -3
@@ -259,13 +259,15 @@ static int nct7802_read_fan_min(struct nct7802_data *data, u8 reg_fan_low, ret =0 ; else if (ret) ret =DIV_ROUND_CLOSEST (1350000U , ret); + else + ret =1350000U ; abort:mutex_unlock (&data->access_lock);return ret; }static int nct7802_write_fan_min (struct nct7802_data *data,u8 reg_fan_low, -u8 reg_fan_high,unsigned int limit) +u8 reg_fan_high,unsigned long limit) {int err;
@@ -326,8 +328,8 @@ static int nct7802_write_voltage(struct nct7802_data *data, int nr, int index,int shift =8 -REG_VOLTAGE_LIMIT_MSB_SHIFT [index -1 ][nr];int err; + voltage =clamp_val (voltage,0 ,0x3ff * nct7802_vmul[nr]); voltage =DIV_ROUND_CLOSEST (voltage, nct7802_vmul[nr]); - voltage =clamp_val (voltage,0 ,0x3ff );mutex_lock (&data->access_lock); err = regmap_write(data->regmap,
@@ -402,7 +404,7 @@ static ssize_t store_temp(struct device *dev, struct device_attribute *attr,if (err <0 )return err; - val =clamp_val (DIV_ROUND_CLOSEST (val,1000 ),-128 ,127 ); + val =DIV_ROUND_CLOSEST (clamp_val (val,-128000 ,127000 ),1000 ); err =regmap_write (data->regmap, nr, val &0xff );return err ? : count;
drivers/hwmon/scpi-hwmon.c +1 -0
@@ -272,6 +272,7 @@ static const struct of_device_id scpi_of_match[] = { {.compatible = "arm,scpi-sensors"}, {}, }; +MODULE_DEVICE_TABLE (of, scpi_of_match);static struct platform_driver scpi_hwmon_platdrv = { .driver = {
drivers/iommu/amd_iommu.c +1 -1
@@ -926,7 +926,7 @@ again: next_tail = (tail +sizeof (*cmd)) %CMD_BUFFER_SIZE ; left = (head - next_tail) %CMD_BUFFER_SIZE ; -if (left <=2 ) { +if (left <=0x20 ) {struct iommu_cmd sync_cmd;volatile u64 sem =0 ;int ret;
drivers/iommu/amd_iommu_v2.c +3 -1
@@ -809,8 +809,10 @@ int amd_iommu_init_device(struct pci_dev *pdev, int pasids) goto out_free_domain; group =iommu_group_get (&pdev->dev); -if (!group) +if (!group) { + ret = -EINVAL ; goto out_free_domain; + } ret =iommu_attach_group (dev_state->domain, group);if (ret !=0 )
drivers/iommu/intel-iommu.c +41 -1
60 lines not on this page · raw message
drivers/irqchip/irq-bcm7038-l1.c +26 -0
@@ -216,6 +216,31 @@ static int bcm7038_l1_set_affinity(struct irq_data *d,return 0 ; } +static void bcm7038_l1_cpu_offline (struct irq_data *d) +{ +struct cpumask *mask =irq_data_get_affinity_mask (d); +int cpu =smp_processor_id (); +cpumask_t new_affinity; + +/* This CPU was not on the affinity mask */ +if (!cpumask_test_cpu (cpu, mask)) +return ; + +if (cpumask_weight (mask) >1 ) { +/* +* Multiple CPU affinity, remove this CPU from the affinity +* mask +*/ +cpumask_copy (&new_affinity, mask); +cpumask_clear_cpu (cpu, &new_affinity); + }else { +/* Only CPU, put on the lowest online CPU */ +cpumask_clear (&new_affinity); +cpumask_set_cpu (cpumask_first (cpu_online_mask), &new_affinity); + } +irq_set_affinity_locked (d, &new_affinity, false); +} +static int __init bcm7038_l1_init_one (struct device_node *dn,unsigned int idx,struct bcm7038_l1_chip *intc)
@@ -267,6 +292,7 @@ static struct irq_chip bcm7038_l1_irq_chip = { .irq_mask = bcm7038_l1_mask, .irq_unmask = bcm7038_l1_unmask, .irq_set_affinity = bcm7038_l1_set_affinity, + .irq_cpu_offline = bcm7038_l1_cpu_offline, }; static int bcm7038_l1_map(struct irq_domain *d, unsigned int virq,
drivers/md/md.c +1 -1
@@ -6771,7 +6771,7 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode,/* need to ensure recovery thread has run */ wait_event_interruptible_timeout (mddev->sb_wait, !test_bit (MD_RECOVERY_NEEDED , - &mddev->flags), + &mddev->recovery),msecs_to_jiffies (5000 ));if (cmd ==STOP_ARRAY || cmd ==STOP_ARRAY_RO ) {/* Need to flush page cache, and ensure no-one else opens
drivers/media/pci/cx23885/cx23885-dvb.c +4 -2
@@ -2168,11 +2168,12 @@ static int dvb_register(struct cx23885_tsport *port) } port->i2c_client_tuner = client_tuner;break ; -case CX23885_BOARD_HAUPPAUGE_HVR5525 : -switch (port->nr) { +case CX23885_BOARD_HAUPPAUGE_HVR5525 : {struct m88rs6000t_config m88rs6000t_config;struct a8293_platform_data a8293_pdata = {}; +switch (port->nr) { +/* port b - satellite */ case 1 :/* attach frontend */
@@ -2267,6 +2268,7 @@ static int dvb_register(struct cx23885_tsport *port)break ; }break ; + }default : printk(KERN_INFO "%s: The frontend of your DVB/ATSC card " " isn't supported yet\n",
drivers/misc/mei/bus.c +1 -1
@@ -399,7 +399,7 @@ bool mei_cldev_enabled(struct mei_cl_device *cldev)EXPORT_SYMBOL_GPL (mei_cldev_enabled);/** -* mei_cldev_enable_device - enable me client device +* mei_cldev_enable - enable me client device * create connection with me client * * @cldev: me client device
drivers/mmc/card/mmc_test.c +1 -1
@@ -791,7 +791,7 @@ static int mmc_test_nonblock_transfer(struct mmc_test_card *test,struct mmc_async_req *cur_areq = &test_areq[0 ].areq;struct mmc_async_req *other_areq = &test_areq[1 ].areq;int i; -int ret; +int ret =RESULT_OK ; test_areq[0 ].test = test; test_areq[1 ].test = test;
drivers/net/ethernet/neterion/vxge/vxge-main.c +12 -19
@@ -2223,8 +2223,6 @@ static irqreturn_t vxge_isr_napi(int irq, void *dev_id)return IRQ_NONE ; } -#ifdef CONFIG_PCI_MSI -static irqreturn_t vxge_tx_msix_handle (int irq,void *dev_id) {struct vxge_fifo *fifo = (struct vxge_fifo *)dev_id;
@@ -2442,16 +2440,13 @@ static void vxge_rem_msix_isr(struct vxgedev *vdev)if (vdev->config.intr_type ==MSI_X )pci_disable_msix (vdev->pdev); } -#endif static void vxge_rem_isr (struct vxgedev *vdev) { -#ifdef CONFIG_PCI_MSI -if (vdev->config.intr_type ==MSI_X ) { +if (IS_ENABLED (CONFIG_PCI_MSI ) && + vdev->config.intr_type ==MSI_X ) {vxge_rem_msix_isr (vdev); - } else -#endif -if (vdev->config.intr_type ==INTA ) { + }else if (vdev->config.intr_type ==INTA ) {synchronize_irq (vdev->pdev->irq);free_irq (vdev->pdev->irq, vdev); }
@@ -2460,11 +2455,10 @@ static void vxge_rem_isr(struct vxgedev *vdev)static int vxge_add_isr (struct vxgedev *vdev) {int ret =0 ; -#ifdef CONFIG_PCI_MSI int vp_idx =0 , intr_idx =0 , intr_cnt =0 , msix_idx =0 , irq_req =0 ;int pci_fun =PCI_FUNC (vdev->pdev->devfn); -if (vdev->config.intr_type ==MSI_X ) +if (IS_ENABLED (CONFIG_PCI_MSI ) && vdev->config.intr_type ==MSI_X ) ret =vxge_enable_msix (vdev);if (ret) {
@@ -2475,7 +2469,7 @@ static int vxge_add_isr(struct vxgedev *vdev) vdev->config.intr_type =INTA ; } -if (vdev->config.intr_type ==MSI_X ) { +if (IS_ENABLED (CONFIG_PCI_MSI ) && vdev->config.intr_type ==MSI_X ) {for (intr_idx =0 ; intr_idx < (vdev->no_of_vpath *VXGE_HW_VPATH_MSIX_ACTIVE ); intr_idx++) {
@@ -2576,9 +2570,8 @@ static int vxge_add_isr(struct vxgedev *vdev) vdev->vxge_entries[intr_cnt].in_use =1 ; vdev->vxge_entries[intr_cnt].arg = &vdev->vpaths[0 ]; } -INTA_MODE: -#endif +INTA_MODE:if (vdev->config.intr_type ==INTA ) {snprintf (vdev->desc[0 ],VXGE_INTR_STRLEN ,"%s:vxge:INTA" , vdev->ndev->name);
@@ -3889,12 +3882,12 @@ static void vxge_device_config_init(struct vxge_hw_device_config *device_config,if (max_mac_vpath >VXGE_MAX_MAC_ADDR_COUNT ) max_mac_vpath =VXGE_MAX_MAC_ADDR_COUNT ; -#ifndef CONFIG_PCI_MSI -vxge_debug_init (VXGE_ERR , -"%s: This Kernel does not support " -"MSI-X. Defaulting to INTA" ,VXGE_DRIVER_NAME ); - *intr_type =INTA ; -#endif +if (!IS_ENABLED (CONFIG_PCI_MSI )) { +vxge_debug_init (VXGE_ERR , +"%s: This Kernel does not support " +"MSI-X. Defaulting to INTA" ,VXGE_DRIVER_NAME ); + *intr_type =INTA ; + }/* Configure whether MSI-X or IRQL. */ switch (*intr_type) {
drivers/net/ethernet/ti/cpmac.c +3 -2
@@ -549,7 +549,8 @@ fatal_error:static int cpmac_start_xmit (struct sk_buff *skb,struct net_device *dev) { -int queue, len; +int queue; +unsigned int len;struct cpmac_desc *desc;struct cpmac_priv *priv =netdev_priv (dev);
@@ -559,7 +560,7 @@ static int cpmac_start_xmit(struct sk_buff *skb, struct net_device *dev)if (unlikely (skb_padto (skb,ETH_ZLEN )))return NETDEV_TX_OK ; - len =max (skb->len,ETH_ZLEN ); + len = max_t(unsigned int, skb->len, ETH_ZLEN); queue =skb_get_queue_mapping (skb);netif_stop_subqueue (dev, queue);
drivers/net/wireless/ath/ath10k/spectral.c +1 -1
@@ -338,7 +338,7 @@ static ssize_t write_file_spec_scan_ctl(struct file *file, }else { res = -EINVAL ; } - }else if (strncmp ("background" , buf,9 ) ==0 ) { + }else if (strncmp ("background" , buf,10 ) ==0 ) { res =ath10k_spectral_scan_config (ar,SPECTRAL_BACKGROUND ); }else if (strncmp ("manual" , buf,6 ) ==0 ) { res =ath10k_spectral_scan_config (ar,SPECTRAL_MANUAL );
drivers/pci/hotplug/rpadlpar_core.c +9 -1
@@ -258,8 +258,13 @@ static int dlpar_add_phb(char *drc_name, struct device_node *dn)static int dlpar_add_vio_slot (char *drc_name,struct device_node *dn) { -if (vio_find_node (dn)) +struct vio_dev *vio_dev; + + vio_dev =vio_find_node (dn); +if (vio_dev) { +put_device (&vio_dev->dev);return -EINVAL ; + }if (!vio_register_device_node (dn)) { printk(KERN_ERR
@@ -335,6 +340,9 @@ static int dlpar_remove_vio_slot(char *drc_name, struct device_node *dn)return -EINVAL ;vio_unregister_device (vio_dev); + +put_device (&vio_dev->dev); +return 0 ; }
drivers/scsi/mvsas/mv_94xx.c +1 -1
@@ -621,7 +621,7 @@ static void mvs_94xx_command_active(struct mvs_info *mvi, u32 slot_idx) {u32 tmp; tmp =mvs_cr32 (mvi,MVS_COMMAND_ACTIVE +(slot_idx >>3 )); -if (tmp &&1 << (slot_idx %32 )) { +if (tmp &1 << (slot_idx %32 )) {mv_printk ("command active %08X, slot [%x].\n" , tmp, slot_idx);mvs_cw32 (mvi,MVS_COMMAND_ACTIVE + (slot_idx >>3 ),1 << (slot_idx %32 ));
drivers/staging/comedi/drivers/dt282x.c +33 -32
81 lines not on this page · raw message
drivers/staging/iio/adc/ad7606_core.c +1 -1
@@ -189,7 +189,7 @@ static ssize_t ad7606_store_oversampling_ratio(struct device *dev,mutex_lock (&indio_dev->mlock);gpio_set_value (st->pdata->gpio_os0, (ret >>0 ) &1 );gpio_set_value (st->pdata->gpio_os1, (ret >>1 ) &1 ); -gpio_set_value (st->pdata->gpio_os1, (ret >>2 ) &1 ); +gpio_set_value (st->pdata->gpio_os2, (ret >>2 ) &1 ); st->oversampling = lval;mutex_unlock (&indio_dev->mlock);
drivers/target/iscsi/iscsi_target_tpg.c +0 -1
@@ -260,7 +260,6 @@ err_out:iscsi_release_param_list (tpg->param_list); tpg->param_list =NULL ; } -kfree (tpg);return -ENOMEM ; }
drivers/usb/core/config.c +10 -0
@@ -205,6 +205,16 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum,if (ifp->desc.bNumEndpoints >= num_ep) goto skip_to_next_endpoint_or_interface_descriptor; +/* Check for duplicate endpoint addresses */ +for (i =0 ; i < ifp->desc.bNumEndpoints; ++i) { +if (ifp->endpoint[i].desc.bEndpointAddress == + d->bEndpointAddress) { +dev_warn (ddev,"config %d interface %d altsetting %d has a duplicate endpoint with address 0x%X, skipping\n" , + cfgno, inum, asnum, d->bEndpointAddress); + goto skip_to_next_endpoint_or_interface_descriptor; + } + } + endpoint = &ifp->endpoint[ifp->desc.bNumEndpoints]; ++ifp->desc.bNumEndpoints;
drivers/usb/core/hub.c +29 -30
77 lines not on this page · raw message
drivers/usb/dwc3/core.h +1 -3
@@ -42,9 +42,7 @@#define DWC3_XHCI_RESOURCES_NUM 2#define DWC3_SCRATCHBUF_SIZE 4096/* each buffer is assumed to be 4KiB */ -#define DWC3_EVENT_SIZE 4/* bytes */ -#define DWC3_EVENT_MAX_NUM 64/* 2 events/endpoint */ -#define DWC3_EVENT_BUFFERS_SIZE (DWC3_EVENT_SIZE * DWC3_EVENT_MAX_NUM) +#define DWC3_EVENT_BUFFERS_SIZE 4096#define DWC3_EVENT_TYPE_MASK 0xfe#define DWC3_EVENT_TYPE_DEV 0
drivers/usb/dwc3/dwc3-pci.c +2 -0
@@ -37,6 +37,7 @@#define PCI_DEVICE_ID_INTEL_BXT 0x0aaa#define PCI_DEVICE_ID_INTEL_APL 0x5aaa#define PCI_DEVICE_ID_INTEL_KBP 0xa2b0 +#define PCI_DEVICE_ID_INTEL_GLK 0x31aastatic const struct acpi_gpio_params reset_gpios = {0 ,0 , false };static const struct acpi_gpio_params cs_gpios = {1 ,0 , false };
@@ -216,6 +217,7 @@ static const struct pci_device_id dwc3_pci_id_table[] = { { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BXT), }, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_APL), }, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_KBP), }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_GLK), }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_NL_USB), }, { } /* Terminating Entry */ };
drivers/usb/dwc3/ep0.c +29 -21
123 lines not on this page · raw message
drivers/usb/dwc3/gadget.c +4 -4
@@ -259,11 +259,11 @@ void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req,if (req->request.status == -EINPROGRESS ) req->request.status = status; -if (dwc->ep0_bounced && dep->number ==0 ) +if (dwc->ep0_bounced && dep->number <=1 ) dwc->ep0_bounced = false; -else -usb_gadget_unmap_request (&dwc->gadget, &req->request, - req->direction); + +usb_gadget_unmap_request (&dwc->gadget, &req->request, + req->direction); dev_dbg(dwc->dev, "request %p from %s completed %d/%d ===> %d\n", req, dep->name, req->request.actual,
drivers/usb/gadget/composite.c +9 -5
@@ -152,7 +152,7 @@ ep_found:if (g->speed ==USB_SPEED_HIGH && (usb_endpoint_xfer_isoc (_ep->desc) ||usb_endpoint_xfer_int (_ep->desc))) - _ep->mult =usb_endpoint_maxp (_ep->desc) &0x7ff ; + _ep->mult = ((usb_endpoint_maxp (_ep->desc) &0x1800 ) >>11 ) +1 ;if (!want_comp_desc)return 0 ;
@@ -1601,9 +1601,7 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) value =min (w_length, (u16 )1 );break ; -/* function drivers must handle get/set altsetting; if there's -* no get() method, we know only altsetting zero works. -*/ +/* function drivers must handle get/set altsetting */ case USB_REQ_SET_INTERFACE :if (ctrl->bRequestType !=USB_RECIP_INTERFACE ) goto unknown;
@@ -1612,7 +1610,13 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) f = cdev->config->interface[intf];if (!f)break ; -if (w_value && !f->set_alt) + +/* +* If there's no get_alt() method, we know only altsetting zero +* works. There is no need to check if set_alt() is not NULL +* as we check this in usb_add_function(). +*/ +if (w_value && !f->get_alt)break ; value = f->set_alt (f, w_index, w_value);if (value ==USB_GADGET_DELAYED_STATUS ) {
drivers/usb/gadget/legacy/inode.c +12 -5
@@ -1125,7 +1125,7 @@ ep0_write (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)/* data and/or status stage for control request */ }else if (dev->state ==STATE_DEV_SETUP ) { -/* IN DATA+STATUS caller makes len <= wLength */ + len =min_t (size_t, len, dev->setup_wLength);if (dev->setup_in) { retval =setup_req (dev->gadget->ep0, dev->req, len);if (retval ==0 ) {
@@ -1755,10 +1755,12 @@ static struct usb_gadget_driver probe_driver = {* such as configuration notifications. */ -static int is_valid_config (struct usb_config_descriptor *config) +static int is_valid_config (struct usb_config_descriptor *config, +unsigned int total) {return config->bDescriptorType ==USB_DT_CONFIG && config->bLength ==USB_DT_CONFIG_SIZE + && total >=USB_DT_CONFIG_SIZE && config->bConfigurationValue !=0 && (config->bmAttributes &USB_CONFIG_ATT_ONE ) !=0 && (config->bmAttributes &USB_CONFIG_ATT_WAKEUP ) ==0 ;
@@ -1783,7 +1785,8 @@ dev_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr) }spin_unlock_irq (&dev->lock); -if (len < (USB_DT_CONFIG_SIZE +USB_DT_DEVICE_SIZE +4 )) +if ((len < (USB_DT_CONFIG_SIZE +USB_DT_DEVICE_SIZE +4 )) || + (len >PAGE_SIZE *4 ))return -EINVAL ;/* we might need to change message format someday */
@@ -1807,7 +1810,8 @@ dev_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)/* full or low speed config */ dev->config = (void *) kbuf; total =le16_to_cpu (dev->config->wTotalLength); -if (!is_valid_config (dev->config) || total >= length) +if (!is_valid_config (dev->config, total) || + total > length -USB_DT_DEVICE_SIZE ) goto fail; kbuf += total; length -= total;
@@ -1816,10 +1820,13 @@ dev_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)if (kbuf [1 ] ==USB_DT_CONFIG ) { dev->hs_config = (void *) kbuf; total =le16_to_cpu (dev->hs_config->wTotalLength); -if (!is_valid_config (dev->hs_config) || total >= length) +if (!is_valid_config (dev->hs_config, total) || + total > length -USB_DT_DEVICE_SIZE ) goto fail; kbuf += total; length -= total; + }else { + dev->hs_config =NULL ; }/* could support multiple configs, using another encoding! */
drivers/usb/gadget/udc/dummy_hcd.c +3 -3
@@ -330,7 +330,7 @@ static void nuke(struct dummy *dum, struct dummy_ep *ep)/* caller must hold lock */ static void stop_activity (struct dummy *dum) { -struct dummy_ep *ep; +int i;/* prevent any more requests */ dum->address =0 ;
@@ -338,8 +338,8 @@ static void stop_activity(struct dummy *dum)/* The timer is left running so that outstanding URBs can fail */ /* nuke any pending requests first, so driver i/o is quiesced */ -list_for_each_entry (ep, &dum->gadget.ep_list, ep.ep_list) -nuke (dum, ep); +for (i =0 ; i <DUMMY_ENDPOINTS ; ++i) +nuke (dum, &dum->ep[i]);/* driver now does any non-usb quiescing necessary */ }
drivers/usb/host/xhci-hub.c +37 -0
@@ -1346,6 +1346,35 @@ int xhci_bus_suspend(struct usb_hcd *hcd)return 0 ; } +/* +* Workaround for missing Cold Attach Status (CAS) if device re-plugged in S3. +* warm reset a USB3 device stuck in polling or compliance mode after resume. +* See Intel 100/c230 series PCH specification update Doc #332692-006 Errata #8 +*/ +static bool xhci_port_missing_cas_quirk (int port_index, +__le32 __iomem **port_array) +{ +u32 portsc; + + portsc =readl (port_array[port_index]); + +/* if any of these are set we are not stuck */ +if (portsc & (PORT_CONNECT |PORT_CAS )) +return false; + +if (((portsc &PORT_PLS_MASK ) !=XDEV_POLLING ) && + ((portsc &PORT_PLS_MASK ) !=XDEV_COMP_MODE )) +return false; + +/* clear wakeup/change bits, and do a warm port reset */ + portsc &= ~(PORT_RWC_BITS |PORT_CEC |PORT_WAKE_BITS ); + portsc |=PORT_WR ; +writel (portsc, port_array[port_index]); +/* flush write */ +readl (port_array[port_index]); +return true; +} +int xhci_bus_resume (struct usb_hcd *hcd) {struct xhci_hcd *xhci =hcd_to_xhci (hcd);
@@ -1383,6 +1412,14 @@ int xhci_bus_resume(struct usb_hcd *hcd)u32 temp; temp =readl (port_array[port_index]); + +/* warm reset CAS limited ports stuck in polling/compliance */ +if ((xhci->quirks &XHCI_MISSING_CAS ) && + (hcd->speed >=HCD_USB3 ) && +xhci_port_missing_cas_quirk (port_index, port_array)) { +xhci_dbg (xhci,"reset stuck port %d\n" , port_index); +continue ; + }if (DEV_SUPERSPEED_ANY (temp)) temp &= ~(PORT_RWC_BITS |PORT_CEC |PORT_WAKE_BITS );else
drivers/usb/host/xhci-mem.c +42 -8
86 lines not on this page · raw message
drivers/usb/host/xhci-pci.c +8 -1
@@ -51,6 +51,7 @@#define PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_XHCI 0x9d2f#define PCI_DEVICE_ID_INTEL_BROXTON_M_XHCI 0x0aa8#define PCI_DEVICE_ID_INTEL_BROXTON_B_XHCI 0x1aa8 +#define PCI_DEVICE_ID_INTEL_APL_XHCI 0x5aa8static const char hcd_name[] ="xhci_hcd" ;
@@ -165,9 +166,15 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) pdev->device ==PCI_DEVICE_ID_INTEL_SUNRISEPOINT_H_XHCI || pdev->device ==PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI || pdev->device ==PCI_DEVICE_ID_INTEL_BROXTON_M_XHCI || - pdev->device == PCI_DEVICE_ID_INTEL_BROXTON_B_XHCI)) { + pdev->device ==PCI_DEVICE_ID_INTEL_BROXTON_B_XHCI || + pdev->device == PCI_DEVICE_ID_INTEL_APL_XHCI)) { xhci->quirks |= XHCI_PME_STUCK_QUIRK; } +if (pdev->vendor ==PCI_VENDOR_ID_INTEL && + (pdev->device ==PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI || + pdev->device ==PCI_DEVICE_ID_INTEL_APL_XHCI )) + xhci->quirks |=XHCI_MISSING_CAS ; +if (pdev->vendor ==PCI_VENDOR_ID_ETRON && pdev->device ==PCI_DEVICE_ID_EJ168 ) { xhci->quirks |=XHCI_RESET_ON_RESUME ;
drivers/usb/host/xhci-ring.c +126 -93
304 lines not on this page · raw message
drivers/usb/host/xhci.c +3 -1
@@ -3808,8 +3808,10 @@ static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev,mutex_lock (&xhci->mutex); -if (xhci->xhc_state)/* dying, removing or halted */ +if (xhci->xhc_state) {/* dying, removing or halted */ + ret = -ESHUTDOWN ; goto out; + }if (!udev->slot_id) { xhci_dbg_trace(xhci, trace_xhci_dbg_address,
drivers/usb/host/xhci.h +6 -2
@@ -312,6 +312,8 @@ struct xhci_op_regs {#define XDEV_U2 (0x2 << 5)#define XDEV_U3 (0x3 << 5)#define XDEV_INACTIVE (0x6 << 5) +#define XDEV_POLLING (0x7 << 5) +#define XDEV_COMP_MODE (0xa << 5)#define XDEV_RESUME (0xf << 5)/* true: port has power (see HCC_PPC) */ #define PORT_POWER (1 << 9)
@@ -1550,7 +1552,8 @@ struct xhci_hcd {#define CMD_RING_STATE_STOPPED (1 << 2)struct list_head cmd_list;unsigned int cmd_ring_reserved_trbs; -struct timer_list cmd_timer; +struct delayed_work cmd_timer; +struct completion cmd_ring_stop_completion;struct xhci_command *current_cmd;struct xhci_ring *event_ring;struct xhci_erst erst;
@@ -1631,6 +1634,7 @@ struct xhci_hcd {/* For controllers with a broken beyond repair streams implementation */ #define XHCI_BROKEN_STREAMS (1 << 19)#define XHCI_PME_STUCK_QUIRK (1 << 20) +#define XHCI_MISSING_CAS (1 << 24)unsigned int num_active_eps;unsigned int limit_active_eps;/* There are two roothubs to keep track of bus suspend info for */
@@ -1912,7 +1916,7 @@ void xhci_queue_config_ep_quirk(struct xhci_hcd *xhci, unsigned int slot_id, unsigned int ep_index, struct xhci_dequeue_state *deq_state);void xhci_stop_endpoint_command_watchdog (unsigned long arg); -void xhci_handle_command_timeout (unsigned long data); +void xhci_handle_command_timeout (struct work_struct *work);void xhci_ring_ep_doorbell (struct xhci_hcd *xhci,unsigned int slot_id,unsigned int ep_index,unsigned int stream_id);
drivers/usb/musb/blackfin.c +1 -0
@@ -469,6 +469,7 @@ static const struct musb_platform_ops bfin_ops = { .init = bfin_musb_init, .exit = bfin_musb_exit, + .fifo_offset = bfin_fifo_offset, .readb = bfin_readb, .writeb = bfin_writeb, .readw = bfin_readw,
drivers/usb/musb/musb_core.h +7 -0
@@ -214,6 +214,7 @@ struct musb_platform_ops { dma_addr_t *dma_addr, u32 *len);void (*pre_root_reset_end)(struct musb *musb);void (*post_root_reset_end)(struct musb *musb); +void (*clear_ep_rxintr)(struct musb *musb,int epnum); };/*
@@ -612,4 +613,10 @@ static inline void musb_platform_post_root_reset_end(struct musb *musb) musb->ops->post_root_reset_end(musb); } +static inline void musb_platform_clear_ep_rxintr (struct musb *musb,int epnum) +{ +if (musb->ops->clear_ep_rxintr) + musb->ops->clear_ep_rxintr (musb, epnum); +} +#endif /* __MUSB_CORE_H__ */
drivers/usb/musb/musb_dsps.c +12 -0
@@ -301,6 +301,17 @@ static void otg_timer(unsigned long _musb)spin_unlock_irqrestore (&musb->lock, flags); } +void dsps_musb_clear_ep_rxintr (struct musb *musb,int epnum) +{ +u32 epintr; +struct dsps_glue *glue =dev_get_drvdata (musb->controller->parent); +const struct dsps_musb_wrapper *wrp = glue->wrp; + +/* musb->lock might already been held */ + epintr = (1 << epnum) << wrp->rxep_shift; +musb_writel (musb->ctrl_base, wrp->epintr_status, epintr); +} +static irqreturn_t dsps_interrupt (int irq,void *hci) {struct musb *musb = hci;
@@ -647,6 +658,7 @@ static struct musb_platform_ops dsps_ops = { .try_idle = dsps_musb_try_idle, .set_mode = dsps_musb_set_mode, .recover = dsps_musb_recover, + .clear_ep_rxintr = dsps_musb_clear_ep_rxintr, };static u64 musb_dmamask =DMA_BIT_MASK (32 );
drivers/usb/musb/musb_host.c +4 -6
@@ -2390,12 +2390,11 @@ static int musb_cleanup_urb(struct urb *urb, struct musb_qh *qh)int is_in =usb_pipein (urb->pipe);int status =0 ;u16 csr; +struct dma_channel *dma =NULL ;musb_ep_select (regs, hw_end);if (is_dma_capable ()) { -struct dma_channel *dma; - dma = is_in ? ep->rx_channel : ep->tx_channel;if (dma) { status = ep->musb->dma_controller->channel_abort (dma);
@@ -2412,10 +2411,9 @@ static int musb_cleanup_urb(struct urb *urb, struct musb_qh *qh)/* giveback saves bulk toggle */ csr =musb_h_flush_rxfifo (ep,0 ); -/* REVISIT we still get an irq; should likely clear the -* endpoint's irq status here to avoid bogus irqs. -* clearing that status is platform-specific... -*/ +/* clear the endpoint's irq status here to avoid bogus irqs */ +if (is_dma_capable () && dma) +musb_platform_clear_ep_rxintr (musb, ep->epnum); }else if (ep->epnum) {musb_h_tx_flush_fifo (ep); csr =musb_readw (epio,MUSB_TXCSR );
drivers/usb/musb/musbhsdma.h +1 -1
@@ -157,5 +157,5 @@ struct musb_dma_controller {void __iomem *base;u8 channel_count;u8 used_channels; -u8 irq; +int irq; };
drivers/usb/phy/phy-am335x-control.c +2 -0
@@ -126,10 +126,12 @@ struct phy_control *am335x_get_phy_control(struct device *dev)return NULL ; dev =bus_find_device (&platform_bus_type,NULL , node, match); +of_node_put (node);if (!dev)return NULL ; ctrl_usb =dev_get_drvdata (dev); +put_device (dev);if (!ctrl_usb)return NULL ;return &ctrl_usb->phy_ctrl;
drivers/usb/serial/cyberjack.c +10 -0
@@ -50,6 +50,7 @@#define CYBERJACK_PRODUCT_ID 0x0100/* Function prototypes */ +static int cyberjack_attach (struct usb_serial *serial);static int cyberjack_port_probe (struct usb_serial_port *port);static int cyberjack_port_remove (struct usb_serial_port *port); static int cyberjack_open(struct tty_struct *tty,
@@ -77,6 +78,7 @@ static struct usb_serial_driver cyberjack_device = { .description = "Reiner SCT Cyberjack USB card reader", .id_table = id_table, .num_ports = 1, + .attach = cyberjack_attach, .port_probe = cyberjack_port_probe, .port_remove = cyberjack_port_remove, .open = cyberjack_open,
@@ -100,6 +102,14 @@ struct cyberjack_private {short wrsent;/* Data already sent */ }; +static int cyberjack_attach (struct usb_serial *serial) +{ +if (serial->num_bulk_out < serial->num_ports) +return -ENODEV ; + +return 0 ; +} +static int cyberjack_port_probe (struct usb_serial_port *port) {struct cyberjack_private *priv;
drivers/usb/serial/garmin_gps.c +1 -0
@@ -1044,6 +1044,7 @@ static int garmin_write_bulk(struct usb_serial_port *port,"%s - usb_submit_urb(write bulk) failed with status = %d\n" , __func__, status); count = status; +kfree (buffer); }/* we are done with this urb, so let the host driver
drivers/usb/serial/io_edgeport.c +5 -0
@@ -2761,6 +2761,11 @@ static int edge_startup(struct usb_serial *serial)EDGE_COMPATIBILITY_MASK1 , EDGE_COMPATIBILITY_MASK2 }; +if (serial->num_bulk_in <1 || serial->num_interrupt_in <1 ) { +dev_err (&serial->interface->dev,"missing endpoints\n" ); +return -ENODEV ; + } + dev = serial->dev;/* create our private serial structure */
drivers/usb/serial/io_ti.c +17 -5
@@ -1499,8 +1499,7 @@ static int do_boot_mode(struct edgeport_serial *serial,dev_dbg (dev,"%s - Download successful -- Device rebooting...\n" , __func__); -/* return an error on purpose */ -return -ENODEV ; +return 1 ; } stayinbootmode:
@@ -1508,7 +1507,7 @@ stayinbootmode:dev_dbg (dev,"%s - STAYING IN BOOT MODE\n" , __func__); serial->product_info.TiMode =TI_MODE_BOOT ; -return 0 ; +return 1 ; }static int ti_do_config (struct edgeport_port *port,int feature,int on)
@@ -2549,6 +2548,13 @@ static int edge_startup(struct usb_serial *serial)int status;u16 product_id; +/* Make sure we have the required endpoints when in download mode. */ +if (serial->interface->cur_altsetting->desc.bNumEndpoints >1 ) { +if (serial->num_bulk_in < serial->num_ports || + serial->num_bulk_out < serial->num_ports) +return -ENODEV ; + } +/* create our private serial structure */ edge_serial =kzalloc (sizeof (struct edgeport_serial ),GFP_KERNEL );if (!edge_serial)
@@ -2556,14 +2562,18 @@ static int edge_startup(struct usb_serial *serial)mutex_init (&edge_serial->es_lock); edge_serial->serial = serial; +INIT_DELAYED_WORK (&edge_serial->heartbeat_work, edge_heartbeat_work);usb_set_serial_data (serial, edge_serial); status =download_fw (edge_serial); -if (status) { +if (status <0 ) {kfree (edge_serial);return status; } +if (status >0 ) +return 1 ;/* bind but do not register any ports */ + product_id =le16_to_cpu ( edge_serial->serial->dev->descriptor.idProduct);
@@ -2575,7 +2585,6 @@ static int edge_startup(struct usb_serial *serial) } } -INIT_DELAYED_WORK (&edge_serial->heartbeat_work, edge_heartbeat_work);edge_heartbeat_schedule (edge_serial);return 0 ;
@@ -2583,6 +2592,9 @@ static int edge_startup(struct usb_serial *serial)static void edge_disconnect (struct usb_serial *serial) { +struct edgeport_serial *edge_serial =usb_get_serial_data (serial); + +cancel_delayed_work_sync (&edge_serial->heartbeat_work); }static void edge_release (struct usb_serial *serial)
drivers/usb/serial/iuu_phoenix.c +11 -0
@@ -68,6 +68,16 @@ struct iuu_private {u32 clk; }; +static int iuu_attach (struct usb_serial *serial) +{ +unsigned char num_ports = serial->num_ports; + +if (serial->num_bulk_in < num_ports || serial->num_bulk_out < num_ports) +return -ENODEV ; + +return 0 ; +} +static int iuu_port_probe (struct usb_serial_port *port) {struct iuu_private *priv;
@@ -1196,6 +1206,7 @@ static struct usb_serial_driver iuu_device = { .tiocmset = iuu_tiocmset, .set_termios = iuu_set_termios, .init_termios = iuu_init_termios, + .attach = iuu_attach, .port_probe = iuu_port_probe, .port_remove = iuu_port_remove, };
drivers/usb/serial/keyspan_pda.c +14 -0
@@ -699,6 +699,19 @@ MODULE_FIRMWARE("keyspan_pda/keyspan_pda.fw");MODULE_FIRMWARE ("keyspan_pda/xircom_pgs.fw" );#endif +static int keyspan_pda_attach (struct usb_serial *serial) +{ +unsigned char num_ports = serial->num_ports; + +if (serial->num_bulk_out < num_ports || + serial->num_interrupt_in < num_ports) { +dev_err (&serial->interface->dev,"missing endpoints\n" ); +return -ENODEV ; + } + +return 0 ; +} +static int keyspan_pda_port_probe (struct usb_serial_port *port) {
@@ -776,6 +789,7 @@ static struct usb_serial_driver keyspan_pda_device = { .break_ctl = keyspan_pda_break_ctl, .tiocmget = keyspan_pda_tiocmget, .tiocmset = keyspan_pda_tiocmset, + .attach = keyspan_pda_attach, .port_probe = keyspan_pda_port_probe, .port_remove = keyspan_pda_port_remove, };
drivers/usb/serial/kl5kusb105.c +2 -0
@@ -311,6 +311,7 @@ static int klsi_105_open(struct tty_struct *tty, struct usb_serial_port *port)if (rc <0 ) {dev_err (&port->dev,"Enabling read failed (error = %d)\n" , rc); retval = rc; + goto err_generic_close; }else dev_dbg (&port->dev,"%s - enabled reading\n" , __func__);
@@ -337,6 +338,7 @@ err_disable_read:0 ,/* index */ NULL ,0 , KLSI_TIMEOUT); +err_generic_close:usb_serial_generic_close (port); err_free_cfg:kfree (cfg);
drivers/usb/serial/kobil_sct.c +12 -0
@@ -51,6 +51,7 @@/* Function prototypes */ +static int kobil_attach (struct usb_serial *serial);static int kobil_port_probe (struct usb_serial_port *probe);static int kobil_port_remove (struct usb_serial_port *probe);static int kobil_open (struct tty_struct *tty,struct usb_serial_port *port);
@@ -86,6 +87,7 @@ static struct usb_serial_driver kobil_device = { .description = "KOBIL USB smart card terminal", .id_table = id_table, .num_ports = 1, + .attach = kobil_attach, .port_probe = kobil_port_probe, .port_remove = kobil_port_remove, .ioctl = kobil_ioctl,
@@ -113,6 +115,16 @@ struct kobil_private { }; +static int kobil_attach (struct usb_serial *serial) +{ +if (serial->num_interrupt_out < serial->num_ports) { +dev_err (&serial->interface->dev,"missing interrupt-out endpoint\n" ); +return -ENODEV ; + } + +return 0 ; +} +static int kobil_port_probe (struct usb_serial_port *port) {struct usb_serial *serial = port->serial;
drivers/usb/serial/mos7720.c +21 -30
105 lines not on this page · raw message
drivers/usb/serial/mos7840.c +12 -0
@@ -2116,6 +2116,17 @@ static int mos7840_calc_num_ports(struct usb_serial *serial)return mos7840_num_ports; } +static int mos7840_attach (struct usb_serial *serial) +{ +if (serial->num_bulk_in < serial->num_ports || + serial->num_bulk_out < serial->num_ports) { +dev_err (&serial->interface->dev,"missing endpoints\n" ); +return -ENODEV ; + } + +return 0 ; +} +static int mos7840_port_probe (struct usb_serial_port *port) {struct usb_serial *serial = port->serial;
@@ -2391,6 +2402,7 @@ static struct usb_serial_driver moschip7840_4port_device = { .tiocmset = mos7840_tiocmset, .tiocmiwait = usb_serial_generic_tiocmiwait, .get_icount = usb_serial_generic_get_icount, + .attach = mos7840_attach, .port_probe = mos7840_port_probe, .port_remove = mos7840_port_remove, .read_bulk_callback = mos7840_bulk_in_callback,
drivers/usb/serial/omninet.c +13 -0
@@ -38,6 +38,7 @@ static int omninet_write(struct tty_struct *tty, struct usb_serial_port *port, const unsigned char *buf, int count);static int omninet_write_room (struct tty_struct *tty);static void omninet_disconnect (struct usb_serial *serial); +static int omninet_attach (struct usb_serial *serial);static int omninet_port_probe (struct usb_serial_port *port);static int omninet_port_remove (struct usb_serial_port *port);
@@ -56,6 +57,7 @@ static struct usb_serial_driver zyxel_omninet_device = { .description = "ZyXEL - omni.net lcd plus usb", .id_table = id_table, .num_ports = 1, + .attach = omninet_attach, .port_probe = omninet_port_probe, .port_remove = omninet_port_remove, .open = omninet_open,
@@ -104,6 +106,17 @@ struct omninet_data {__u8 od_outseq;/* Sequence number for bulk_out URBs */ }; +static int omninet_attach (struct usb_serial *serial) +{ +/* The second bulk-out endpoint is used for writing. */ +if (serial->num_bulk_out <2 ) { +dev_err (&serial->interface->dev,"missing endpoints\n" ); +return -ENODEV ; + } + +return 0 ; +} +static int omninet_port_probe (struct usb_serial_port *port) {struct omninet_data *od;
drivers/usb/serial/oti6858.c +16 -0
@@ -134,6 +134,7 @@ static int oti6858_chars_in_buffer(struct tty_struct *tty);static int oti6858_tiocmget (struct tty_struct *tty);static int oti6858_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear); +static int oti6858_attach (struct usb_serial *serial);static int oti6858_port_probe (struct usb_serial_port *port);static int oti6858_port_remove (struct usb_serial_port *port);
@@ -158,6 +159,7 @@ static struct usb_serial_driver oti6858_device = { .write_bulk_callback = oti6858_write_bulk_callback, .write_room = oti6858_write_room, .chars_in_buffer = oti6858_chars_in_buffer, + .attach = oti6858_attach, .port_probe = oti6858_port_probe, .port_remove = oti6858_port_remove, };
@@ -324,6 +326,20 @@ static void send_data(struct work_struct *work)usb_serial_port_softint (port); } +static int oti6858_attach (struct usb_serial *serial) +{ +unsigned char num_ports = serial->num_ports; + +if (serial->num_bulk_in < num_ports || + serial->num_bulk_out < num_ports || + serial->num_interrupt_in < num_ports) { +dev_err (&serial->interface->dev,"missing endpoints\n" ); +return -ENODEV ; + } + +return 0 ; +} +static int oti6858_port_probe (struct usb_serial_port *port) {struct oti6858_private *priv;
drivers/usb/serial/pl2303.c +8 -0
@@ -220,9 +220,17 @@ static int pl2303_probe(struct usb_serial *serial,static int pl2303_startup (struct usb_serial *serial) {struct pl2303_serial_private *spriv; +unsigned char num_ports = serial->num_ports;enum pl2303_type type =TYPE_01 ;unsigned char *buf; +if (serial->num_bulk_in < num_ports || + serial->num_bulk_out < num_ports || + serial->num_interrupt_in < num_ports) { +dev_err (&serial->interface->dev,"missing endpoints\n" ); +return -ENODEV ; + } + spriv =kzalloc (sizeof (*spriv),GFP_KERNEL );if (!spriv)return -ENOMEM ;
drivers/usb/serial/quatech2.c +0 -4
@@ -408,16 +408,12 @@ static void qt2_close(struct usb_serial_port *port) {struct usb_serial *serial;struct qt2_port_private *port_priv; -unsigned long flags;int i; serial = port->serial; port_priv =usb_get_serial_port_data (port); -spin_lock_irqsave (&port_priv->urb_lock, flags);usb_kill_urb (port_priv->write_urb); - port_priv->urb_in_use = false; -spin_unlock_irqrestore (&port_priv->urb_lock, flags);/* flush the port transmit buffer */ i = usb_control_msg(serial->dev,
drivers/usb/serial/spcp8x5.c +14 -0
@@ -154,6 +154,19 @@ static int spcp8x5_probe(struct usb_serial *serial,return 0 ; } +static int spcp8x5_attach (struct usb_serial *serial) +{ +unsigned char num_ports = serial->num_ports; + +if (serial->num_bulk_in < num_ports || + serial->num_bulk_out < num_ports) { +dev_err (&serial->interface->dev,"missing endpoints\n" ); +return -ENODEV ; + } + +return 0 ; +} +static int spcp8x5_port_probe (struct usb_serial_port *port) {const struct usb_device_id *id =usb_get_serial_data (port->serial);
@@ -477,6 +490,7 @@ static struct usb_serial_driver spcp8x5_device = { .tiocmget = spcp8x5_tiocmget, .tiocmset = spcp8x5_tiocmset, .probe = spcp8x5_probe, + .attach = spcp8x5_attach, .port_probe = spcp8x5_port_probe, .port_remove = spcp8x5_port_remove, };
drivers/usb/serial/ti_usb_3410_5052.c +7 -0
@@ -339,6 +339,13 @@ static int ti_startup(struct usb_serial *serial) goto free_tdev; } +if (serial->num_bulk_in < serial->num_ports || + serial->num_bulk_out < serial->num_ports) { +dev_err (&serial->interface->dev,"missing endpoints\n" ); + status = -ENODEV ; + goto free_tdev; + } +return 0 ; free_tdev:
drivers/usb/storage/unusual_devs.h +7 -0
@@ -2135,6 +2135,13 @@ UNUSUAL_DEV( 0x22b8, 0x3010, 0x0001, 0x0001, USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY | US_FL_IGNORE_RESIDUE ), +/* Reported-by George Cherian <[email protected]> */ +UNUSUAL_DEV (0x152d ,0x9561 ,0x0000 ,0x9999 , +"JMicron" , +"JMS56x" , +USB_SC_DEVICE ,USB_PR_DEVICE ,NULL , + US_FL_NO_REPORT_OPCODES), +/* * Patch by Constantin Baranov <[email protected]> * Report by Andreas Koenecke.
include/linux/capability.h +0 -2
@@ -40,8 +40,6 @@ struct inode;struct dentry ;struct user_namespace ; -struct user_namespace *current_user_ns (void ); -extern const kernel_cap_t __cap_empty_set;extern const kernel_cap_t __cap_init_eff_set;
include/linux/cred.h +4 -1
@@ -377,7 +377,10 @@ extern struct user_namespace init_user_ns;#ifdef CONFIG_USER_NS #define current_user_ns () (current_cred_xxx(user_ns))#else -#define current_user_ns () (&init_user_ns) +static inline struct user_namespace *current_user_ns (void ) +{ +return &init_user_ns; +}#endif
kernel/cpu.c +5 -4
@@ -223,10 +223,6 @@ static int cpu_notify(unsigned long val, void *v)return __cpu_notify (val, v,-1 ,NULL ); } -static void cpu_notify_nofail (unsigned long val,void *v) -{ -BUG_ON (cpu_notify (val, v)); -}EXPORT_SYMBOL (register_cpu_notifier);EXPORT_SYMBOL (__register_cpu_notifier);
@@ -245,6 +241,11 @@ void __unregister_cpu_notifier(struct notifier_block *nb)EXPORT_SYMBOL (__unregister_cpu_notifier);#ifdef CONFIG_HOTPLUG_CPU +static void cpu_notify_nofail (unsigned long val,void *v) +{ +BUG_ON (cpu_notify (val, v)); +} +/** * clear_tasks_mm_cpumask - Safely clear tasks' mm_cpumask for a CPU * @cpu: a CPU id
kernel/time/tick-broadcast.c +3 -0
@@ -871,6 +871,9 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc) {int cpu =smp_processor_id (); +if (!bc) +return ; +/* Set it up only once ! */ if (bc->event_handler != tick_handle_oneshot_broadcast) {int was_periodic =clockevent_state_periodic (bc);
net/mac80211/tx.c +2 -1
@@ -2699,7 +2699,7 @@ static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata,int extra_head = fast_tx->hdr_len - (ETH_HLEN -2 );int hw_headroom = sdata->local->hw.extra_tx_headroom;struct ethhdr eth; -struct ieee80211_tx_info *info =IEEE80211_SKB_CB (skb); +struct ieee80211_tx_info *info;struct ieee80211_hdr *hdr = (void *)fast_tx->hdr;struct ieee80211_tx_data tx;ieee80211_tx_result r;
@@ -2761,6 +2761,7 @@ static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata,memcpy (skb->data + fast_tx->da_offs, eth.h_dest,ETH_ALEN );memcpy (skb->data + fast_tx->sa_offs, eth.h_source,ETH_ALEN ); + info =IEEE80211_SKB_CB (skb);memset (info,0 ,sizeof (*info)); info->band = fast_tx->band; info->control.vif = &sdata->vif;
sound/pci/hda/patch_realtek.c +2 -0
@@ -2230,6 +2230,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {SND_PCI_QUIRK (0x1043 ,0x1971 ,"Asus W2JC" ,ALC882_FIXUP_ASUS_W2JC ),SND_PCI_QUIRK (0x1043 ,0x835f ,"Asus Eee 1601" ,ALC888_FIXUP_EEE1601 ),SND_PCI_QUIRK (0x1043 ,0x84bc ,"ASUS ET2700" ,ALC887_FIXUP_ASUS_BASS ), +SND_PCI_QUIRK (0x1043 ,0x8691 ,"ASUS ROG Ranger VIII" ,ALC882_FIXUP_GPIO3 ),SND_PCI_QUIRK (0x104d ,0x9047 ,"Sony Vaio TT" ,ALC889_FIXUP_VAIO_TT ),SND_PCI_QUIRK (0x104d ,0x905a ,"Sony Vaio Z" ,ALC882_FIXUP_NO_PRIMARY_HP ), SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP),
@@ -6892,6 +6893,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {SND_PCI_QUIRK (0x1043 ,0x15a7 ,"ASUS UX51VZH" ,ALC662_FIXUP_BASS_16 ),SND_PCI_QUIRK (0x1043 ,0x177d ,"ASUS N551" , ALC668_FIXUP_ASUS_Nx51),SND_PCI_QUIRK (0x1043 ,0x17bd ,"ASUS N751" , ALC668_FIXUP_ASUS_Nx51), +SND_PCI_QUIRK (0x1043 ,0x1963 ,"ASUS X71SL" ,ALC662_FIXUP_ASUS_MODE8 ),SND_PCI_QUIRK (0x1043 ,0x1b73 ,"ASUS N55SF" ,ALC662_FIXUP_BASS_16 ),SND_PCI_QUIRK (0x1043 ,0x1bf3 ,"ASUS N76VZ" ,ALC662_FIXUP_BASS_MODE4_CHMAP ), SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT),
sound/soc/samsung/i2s.c +3 -2
@@ -1027,12 +1027,13 @@ static int samsung_i2s_dai_probe(struct snd_soc_dai *dai)static int samsung_i2s_dai_remove (struct snd_soc_dai *dai) {struct i2s_dai *i2s =snd_soc_dai_get_drvdata (dai); +unsigned long flags;if (!is_secondary (i2s)) {if (i2s->quirks &QUIRK_NEED_RSTCLR ) { -spin_lock (i2s->lock); +spin_lock_irqsave (i2s->lock, flags);writel (0 , i2s->addr +I2SCON ); -spin_unlock (i2s->lock); +spin_unlock_irqrestore (i2s->lock, flags); } }
sound/usb/card.c +0 -1
@@ -202,7 +202,6 @@ static int snd_usb_create_stream(struct snd_usb_audio *chip, int ctrlif, int intif (!snd_usb_parse_audio_interface (chip, interface)) {usb_set_interface (dev, interface,0 );/* reset the current interface */ usb_driver_claim_interface (&usb_audio_driver, iface, (void *)-1L ); -return -EINVAL ; }return 0 ;
sound/usb/endpoint.c +7 -10
@@ -538,6 +538,11 @@ static int wait_clear_urbs(struct snd_usb_endpoint *ep) alive, ep->ep_num);clear_bit (EP_FLAG_STOPPING , &ep->flags); + ep->data_subs =NULL ; + ep->sync_slave =NULL ; + ep->retire_data_urb =NULL ; + ep->prepare_data_urb =NULL ; +return 0 ; }
@@ -902,9 +907,7 @@ int snd_usb_endpoint_set_params(struct snd_usb_endpoint *ep,/** * snd_usb_endpoint_start: start an snd_usb_endpoint * -* @ep: the endpoint to start -* @can_sleep: flag indicating whether the operation is executed in -* non-atomic context +* @ep: the endpoint to start * * A call to this function will increment the use count of the endpoint. * In case it is not already running, the URBs for this endpoint will be
@@ -914,7 +917,7 @@ int snd_usb_endpoint_set_params(struct snd_usb_endpoint *ep,* * Returns an error if the URB submission failed, 0 in all other cases. */ -int snd_usb_endpoint_start (struct snd_usb_endpoint *ep,bool can_sleep) +int snd_usb_endpoint_start (struct snd_usb_endpoint *ep) {int err;unsigned int i;
@@ -928,8 +931,6 @@ int snd_usb_endpoint_start(struct snd_usb_endpoint *ep, bool can_sleep)/* just to be sure */ deactivate_urbs (ep, false); -if (can_sleep) -wait_clear_urbs (ep); ep->active_mask =0 ; ep->unlink_mask =0 ;
@@ -1010,10 +1011,6 @@ void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep)if (--ep->use_count ==0 ) {deactivate_urbs (ep, false); - ep->data_subs =NULL ; - ep->sync_slave =NULL ; - ep->retire_data_urb =NULL ; - ep->prepare_data_urb =NULL ;set_bit (EP_FLAG_STOPPING , &ep->flags); } }
sound/usb/endpoint.h +1 -1
@@ -18,7 +18,7 @@ int snd_usb_endpoint_set_params(struct snd_usb_endpoint *ep,struct audioformat *fmt, struct snd_usb_endpoint *sync_ep); -int snd_usb_endpoint_start (struct snd_usb_endpoint *ep,bool can_sleep); +int snd_usb_endpoint_start (struct snd_usb_endpoint *ep);void snd_usb_endpoint_stop (struct snd_usb_endpoint *ep);void snd_usb_endpoint_sync_pending_stop (struct snd_usb_endpoint *ep);int snd_usb_endpoint_activate (struct snd_usb_endpoint *ep);
sound/usb/pcm.c +5 -5
@@ -218,7 +218,7 @@ int snd_usb_init_pitch(struct snd_usb_audio *chip, int iface, } } -static int start_endpoints (struct snd_usb_substream *subs,bool can_sleep) +static int start_endpoints (struct snd_usb_substream *subs) {int err;
@@ -231,7 +231,7 @@ static int start_endpoints(struct snd_usb_substream *subs, bool can_sleep)dev_dbg (&subs->dev->dev,"Starting data EP @%p\n" , ep); ep->data_subs = subs; - err =snd_usb_endpoint_start (ep, can_sleep); + err =snd_usb_endpoint_start (ep);if (err <0 ) {clear_bit (SUBSTREAM_FLAG_DATA_EP_STARTED , &subs->flags);return err;
@@ -260,7 +260,7 @@ static int start_endpoints(struct snd_usb_substream *subs, bool can_sleep)dev_dbg (&subs->dev->dev,"Starting sync EP @%p\n" , ep); ep->sync_slave = subs->data_endpoint; - err =snd_usb_endpoint_start (ep, can_sleep); + err =snd_usb_endpoint_start (ep);if (err <0 ) {clear_bit (SUBSTREAM_FLAG_SYNC_EP_STARTED , &subs->flags);return err;
@@ -839,7 +839,7 @@ static int snd_usb_pcm_prepare(struct snd_pcm_substream *substream)/* for playback, submit the URBs now; otherwise, the first hwptr_done * updates for all URBs would happen at the same time when starting */ if (subs->direction ==SNDRV_PCM_STREAM_PLAYBACK ) - ret =start_endpoints (subs, true); + ret =start_endpoints (subs); unlock:snd_usb_unlock_shutdown (subs->stream->chip);
@@ -1655,7 +1655,7 @@ static int snd_usb_substream_capture_trigger(struct snd_pcm_substream *substreamswitch (cmd) {case SNDRV_PCM_TRIGGER_START : - err =start_endpoints (subs, false); + err =start_endpoints (subs);if (err <0 )return err;
Greg KH
maintainerI'm announcing the release of the 4.4.42 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/boot/dts/r8a7794.dtsi | 2 arch/arm/crypto/aes-ce-glue.c | 5 arch/arm/mach-davinci/da850.c | 12 + arch/arm64/crypto/aes-ce-ccm-core.S | 53 +++--- arch/arm64/crypto/aes-ce-cipher.c | 25 +- arch/arm64/crypto/aes-ce.S | 1 arch/arm64/crypto/aes-modes.S | 3 arch/arm64/crypto/aes-neon.S | 25 +- arch/arm64/crypto/ghash-ce-core.S | 6 arch/arm64/crypto/sha1-ce-core.S | 4 arch/arm64/crypto/sha2-ce-core.S | 4 arch/cris/boot/rescue/Makefile | 8 arch/mips/kvm/mips.c | 4 arch/s390/crypto/prng.c | 6 arch/x86/kvm/x86.c | 9 - drivers/base/power/power.h | 19 ++ drivers/base/power/runtime.c | 8 drivers/base/power/wakeirq.c | 76 +++++++- drivers/clk/clk-wm831x.c | 2 drivers/clk/imx/clk-imx31.c | 4 drivers/gpu/drm/radeon/radeon_cursor.c | 6 drivers/hwmon/amc6821.c | 4 drivers/hwmon/ds620.c | 2 drivers/hwmon/g762.c | 11 - drivers/hwmon/nct7802.c | 8 drivers/hwmon/scpi-hwmon.c | 1 drivers/iommu/amd_iommu.c | 2 drivers/iommu/amd_iommu_v2.c | 4 drivers/iommu/intel-iommu.c | 42 ++++ drivers/irqchip/irq-bcm7038-l1.c | 26 ++ drivers/md/md.c | 2 drivers/media/pci/cx23885/cx23885-dvb.c | 6 drivers/misc/mei/bus.c | 2 drivers/mmc/card/mmc_test.c | 2 drivers/net/ethernet/neterion/vxge/vxge-main.c | 31 +-- drivers/net/ethernet/ti/cpmac.c | 5 drivers/net/wireless/ath/ath10k/spectral.c | 2 drivers/pci/hotplug/rpadlpar_core.c | 10 + drivers/scsi/mvsas/mv_94xx.c | 2 drivers/staging/comedi/drivers/dt282x.c | 65 +++---- drivers/staging/iio/adc/ad7606_core.c | 2 drivers/target/iscsi/iscsi_target_tpg.c | 1 drivers/usb/core/config.c | 10 + drivers/usb/core/hub.c | 59 +++--- drivers/usb/dwc3/core.h | 4 drivers/usb/dwc3/dwc3-pci.c | 2 drivers/usb/dwc3/ep0.c | 50 +++-- drivers/usb/dwc3/gadget.c | 8 drivers/usb/gadget/composite.c | 14 + drivers/usb/gadget/legacy/inode.c | 17 + drivers/usb/gadget/udc/dummy_hcd.c | 6 drivers/usb/host/xhci-hub.c | 37 ++++ drivers/usb/host/xhci-mem.c | 50 ++++- drivers/usb/host/xhci-pci.c | 9 - drivers/usb/host/xhci-ring.c | 219 ++++++++++++++----------- drivers/usb/host/xhci.c | 4 drivers/usb/host/xhci.h | 8 drivers/usb/musb/blackfin.c | 1 drivers/usb/musb/musb_core.h | 7 drivers/usb/musb/musb_dsps.c | 12 + drivers/usb/musb/musb_host.c | 10 - drivers/usb/musb/musbhsdma.h | 2 drivers/usb/phy/phy-am335x-control.c | 2 drivers/usb/serial/cyberjack.c | 10 + drivers/usb/serial/garmin_gps.c | 1 drivers/usb/serial/io_edgeport.c | 5 drivers/usb/serial/io_ti.c | 22 +- drivers/usb/serial/iuu_phoenix.c | 11 + drivers/usb/serial/keyspan_pda.c | 14 + drivers/usb/serial/kl5kusb105.c | 2 drivers/usb/serial/kobil_sct.c | 12 + drivers/usb/serial/mos7720.c | 51 ++--- drivers/usb/serial/mos7840.c | 12 + drivers/usb/serial/omninet.c | 13 + drivers/usb/serial/oti6858.c | 16 + drivers/usb/serial/pl2303.c | 8 drivers/usb/serial/quatech2.c | 4 drivers/usb/serial/spcp8x5.c | 14 + drivers/usb/serial/ti_usb_3410_5052.c | 7 drivers/usb/storage/unusual_devs.h | 7 include/linux/capability.h | 2 include/linux/cred.h | 5 kernel/cpu.c | 9 - kernel/time/tick-broadcast.c | 3 net/mac80211/tx.c | 3 sound/pci/hda/patch_realtek.c | 2 sound/soc/samsung/i2s.c | 5 sound/usb/card.c | 1 sound/usb/endpoint.c | 17 - sound/usb/endpoint.h | 2 sound/usb/pcm.c | 10 - 92 files changed, 903 insertions(+), 410 deletions(-)
Alan Stern (5):
USB: gadgetfs: fix unbounded memory allocation bug
USB: gadgetfs: fix use-after-free bug
USB: gadgetfs: fix checks of wTotalLength in config descriptors
USB: fix problems with duplicate endpoint addresses
USB: dummy-hcd: fix bug in stop_activity (handle ep0)
Alexander Usyskin (1):
mei: bus: fix mei_cldev_enable KDoc
Ard Biesheuvel (8):
crypto: arm64/sha2-ce - fix for big endian
crypto: arm64/ghash-ce - fix for big endian
crypto: arm/aes-ce - fix for big endian
crypto: arm64/aes-ccm-ce: fix for big endian
crypto: arm64/aes-neon - fix for big endian
crypto: arm64/sha1-ce - fix for big endian
crypto: arm64/aes-xts-ce: fix for big endian
crypto: arm64/aes-ce - fix for big endian
Arnd Bergmann (4):
stable-fixup: hotplug: fix unused function warning
scsi: mvsas: fix command_active typo cred/userns: define current_user_ns() as a function
net: vxge: avoid unused function warnings
Baolin Wang (1):
usb: host: xhci: Fix possible wild pointer when handling abort command
Bartosz Golaszewski (1):
ARM: davinci: da850: don't add emac clock to lookup table twice
Bin Liu (2):
usb: musb: core: add clear_ep_rxintr() to musb_platform_ops
usb: musb: dsps: implement clear_ep_rxintr() callback
Charles Keepax (1):
ASoC: samsung: i2s: Fixup last IRQ unsafe spin lock call
Dan Carpenter (5):
usb: xhci-mem: use passed in GFP flags instead of GFP_KERNEL iommu/amd: Missing error code in amd_iommu_init_device() target/iscsi: Fix double free in lio_target_tiqn_addtpg()
mmc: mmc_test: Uninitialized return value s390/crypto: unlock on error in prng_tdes_read()
Eva Rachel Retuya (1):
staging: iio: ad7606: fix improper setting of oversampling pins
Felipe Balbi (5):
usb: dwc3: core: avoid Overflow events
usb: dwc3: gadget: always unmap EP0 requests
usb: dwc3: ep0: add dwc3_ep0_prepare_one_trb()
usb: dwc3: ep0: explicitly call dwc3_ep0_prepare_one_trb()
usb: gadget: composite: always set ep->mult to a sensible value
Florian Fainelli (1):
irqchip/bcm7038-l1: Implement irq_cpu_offline() callback
Geert Uytterhoeven (2):
usb: hub: Move hub_port_disable() to fix warning if PM is disabled
ARM: dts: r8a7794: Correct hsusb parent clock
Greg Kroah-Hartman (3):
usb: gadgetfs: restrict upper bound on device configuration size
Revert "usb: gadget: composite: always set ep->mult to a sensible value"
Linux 4.4.42Guenter Roeck (4):
cris: Only build flash rescue image if CONFIG_ETRAX_AXISFLASHMAP is selected
hwmon: (ds620) Fix overflows seen when writing temperature limits
hwmon: (nct7802) Fix overflows seen when writing into limit attributes
hwmon: (g762) Fix overflows and crash seen when writing limit attributes
H Hartley Sweeten (1):
staging: comedi: dt282x: tidy up register bit defines
Heikki Krogerus (1):
usb: dwc3: pci: add Intel Gemini Lake PCI ID
Huang Rui (1):
iommu/amd: Fix the left value check of cmd buffer
Ioan-Adrian Ratiu (1):
ALSA: usb-audio: Fix irq/process data synchronization
Jacob Pan (1):
iommu/vt-d: Fix pasid table size encoding
James Hogan (1):
KVM: MIPS: Flush KVM entry code from icache globally
Jared Bents (1):
hwmon: (amc6821) sign extension temperature
Javier Martinez Canillas (1):
hwmon: (scpi) Fix module autoload
Johan Hovold (23):
USB: serial: omninet: fix NULL-derefs at open and disconnect
USB: serial: quatech2: fix sleep-while-atomic in close
USB: serial: pl2303: fix NULL-deref at open
USB: serial: keyspan_pda: verify endpoints at probe
USB: serial: spcp8x5: fix NULL-deref at open
USB: serial: io_ti: fix NULL-deref at open
USB: serial: io_ti: fix another NULL-deref at open
USB: serial: io_ti: fix I/O after disconnect
USB: serial: iuu_phoenix: fix NULL-deref at open
USB: serial: garmin_gps: fix memory leak on failed URB submit
USB: serial: ti_usb_3410_5052: fix NULL-deref at open
USB: serial: io_edgeport: fix NULL-deref at open
USB: serial: oti6858: fix NULL-deref at open
USB: serial: cyberjack: fix NULL-deref at open
USB: serial: kobil_sct: fix NULL-deref in write
USB: serial: mos7840: fix NULL-deref at open
USB: serial: mos7720: fix NULL-deref at open
USB: serial: mos7720: fix use-after-free on probe errors
USB: serial: mos7720: fix parport use-after-free on probe errors
USB: serial: mos7720: fix parallel probe
USB: phy: am335x-control: fix device and of_node leaks
USB: serial: io_ti: bind to interface after fw download powerpc/pci/rpadlpar: Fix device reference leaks
Johannes Berg (1):
mac80211: initialize fast-xmit 'info' later
Jérémy Lefaure (1):
usb: musb: blackfin: add bfin_fifo_offset in bfin_ops
Krzysztof Opasiak (1):
usb: gadget: composite: Test get_alt() presence instead of set_alt()
Lu Baolu (3):
usb: xhci: fix possible wild pointer
usb: xhci: fix return value of xhci_setup_device()
usb: xhci: hold lock over xhci_abort_cmd_ring()
Mathias Nyman (3):
xhci: workaround for hosts missing CAS bit
xhci: free xhci virtual devices with leaf nodes first
xhci: Handle command completion and timeout race
Mauro Carvalho Chehab (1):
cx23885-dvb: move initialization of a8293_pdata
Michel Dänzer (1):
drm/radeon: Always store CRTC relative radeon_crtc->cursor_x/y values
Nicolas Iooss (1):
ath10k: use the right length of "background"
OGAWA Hirofumi (2):
xhci: Use delayed_work instead of timer for command timeout
xhci: Fix race related to abort operation
Oliver Neukum (1):
usb: storage: unusual_uas: Add JMicron JMS56x to unusual device
Pan Bian (2):
USB: serial: kl5kusb105: abort on open exception path
clk: clk-wm831x: fix a logic error
Paul Burton (1):
net: ti: cpmac: Fix compiler warning due to type confusion
Shaohua Li (1):
md: MD_RECOVERY_NEEDED is set for mddev->recovery
Takashi Iwai (3):
ALSA: hda - Fix up GPIO for ASUS ROG Ranger
ALSA: hda - Apply asus-mode8 fixup to ASUS X71SL
ALSA: usb-audio: Fix bogus error return in snd_usb_create_stream()
Thomas Gleixner (1):
tick/broadcast: Prevent NULL pointer dereference
Tony Lindgren (2):
usb: musb: Fix trying to free already-free IRQ 4
PM / wakeirq: Fix dedicated wakeirq for drivers not using autosuspend
Vladimir Zapolskiy (1):
clk: imx31: fix rewritten input argument of mx31_clocks_init()
Wan Ahmad Zainie (1):
usb: xhci: apply XHCI_PME_STUCK_QUIRK to Intel Apollo Lake
Xiao Guangrong (1):
KVM: x86: reset MMU on KVM_SET_VCPU_EVENTS
Xunlei Pang (1):
iommu/vt-d: Flush old iommu caches for kdump when the device gets context mapped