Linux 3.11.4
Greg KH
maintainerI'm announcing the release of the 3.11.4 kernel.
All users of the 3.11 kernel series must upgrade.
The updated 3.11.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.11.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/crypto/aes-armv4.S | 6 +-- arch/x86/kernel/reboot.c | 16 ++++++++ arch/x86/platform/efi/efi.c | 11 +++-- drivers/base/core.c | 14 +++---- drivers/gpu/drm/i915/intel_display.c | 4 ++ drivers/gpu/drm/i915/intel_dp.c | 13 ++++++ drivers/gpu/drm/i915/intel_tv.c | 8 ++++ drivers/gpu/drm/radeon/cik.c | 17 ++++---- drivers/gpu/drm/radeon/r100.c | 8 ++-- drivers/gpu/drm/radeon/r600_hdmi.c | 20 +++++++--- drivers/gpu/drm/radeon/radeon_asic.c | 2 + drivers/gpu/drm/radeon/radeon_cs.c | 2 - drivers/gpu/drm/radeon/radeon_device.c | 15 ++++++- drivers/gpu/drm/radeon/radeon_pm.c | 8 ++-- drivers/gpu/drm/radeon/radeon_ring.c | 8 ++-- drivers/hwmon/applesmc.c | 11 +++++ drivers/md/bcache/bcache.h | 7 +-- drivers/md/bcache/bset.c | 39 ++++++++++++++------ drivers/md/bcache/btree.c | 2 - drivers/md/bcache/journal.c | 33 ++++++++++------- drivers/md/bcache/request.c | 15 ++++--- drivers/md/bcache/sysfs.c | 9 +++- drivers/md/bcache/util.c | 11 +++++ drivers/md/bcache/util.h | 12 ++++-- drivers/md/bcache/writeback.c | 42 ++++++++++----------- drivers/md/dm-mpath.c | 11 +++++ drivers/md/dm-snap-persistent.c | 2 - drivers/md/dm-snap.c | 5 +- drivers/md/dm.c | 11 +++++ drivers/misc/mei/amthif.c | 1 drivers/misc/mei/bus.c | 5 ++ drivers/misc/mei/client.h | 6 +++ drivers/misc/mei/hbm.c | 10 +++-- drivers/misc/mei/init.c | 3 + drivers/misc/mei/main.c | 11 ++--- drivers/misc/mei/mei_dev.h | 6 +-- drivers/net/wireless/cw1200/cw1200_spi.c | 26 +++---------- drivers/net/wireless/cw1200/fwio.c | 2 - drivers/net/wireless/cw1200/hwbus.h | 1 drivers/net/wireless/cw1200/hwio.c | 15 ------- drivers/staging/vt6656/iwctl.c | 3 + drivers/staging/vt6656/main_usb.c | 3 + drivers/tty/serial/pch_uart.c | 5 ++ drivers/tty/serial/serial-tegra.c | 4 +- drivers/tty/tty_ioctl.c | 3 + drivers/usb/core/devio.c | 16 ++++++++ drivers/usb/dwc3/dwc3-pci.c | 4 ++ drivers/usb/gadget/f_fs.c | 60 +++++++++++++------------------ drivers/usb/host/ehci-fsl.c | 12 +----- drivers/usb/host/ehci-pci.c | 2 - drivers/usb/host/ohci-hcd.c | 22 ++++++----- drivers/usb/host/ohci-q.c | 26 +++++++++++-- drivers/usb/host/uhci-pci.c | 2 - drivers/usb/host/uhci-q.c | 12 ++++-- drivers/usb/host/xhci-hub.c | 2 - drivers/usb/host/xhci-pci.c | 2 - drivers/usb/host/xhci-ring.c | 24 +++++++++++- drivers/usb/host/xhci.c | 25 ++---------- drivers/usb/host/xhci.h | 1 fs/bio.c | 4 +- fs/sysv/super.c | 1 include/linux/device-mapper.h | 3 + kernel/Makefile | 2 - kernel/irq/Makefile | 6 ++- kernel/reboot.c | 9 ++++ sound/core/compress_offload.c | 3 + tools/lib/lk/debugfs.c | 1 68 files changed, 444 insertions(+), 263 deletions(-)
Al Viro (1):
USB: Fix breakage in ffs_fs_mount()
Alan Stern (3):
USB: fix PM config symbol in uhci-hcd, ehci-hcd, and xhci-hcd
USB: OHCI: accept very late isochronous URBs
USB: UHCI: accept very late isochronous URBs
Alex Deucher (6):
drm/radeon/cik: fix overflow in vram fetch drm/radeon: avoid UVD corruption on AGP cards using GPU gart drm/radeon: don't set default clocks for SI when DPM is disabled drm/radeon: disable tests/benchmarks if accel is disabled drm/radeon: add missing hdmi callbacks for rv6xx drm/radeon: fix hdmi audio on DCE3.0/3.1 asics
Alex Ivanov (1):
drm/radeon: Make r100_cp_ring_info() and radeon_ring_gfx() safe (v2)
Alexander Usyskin (1):
mei: cancel stall timers in mei_reset
Ard Biesheuvel (1):
ARM: 7837/3: fix Thumb-2 bug in AES assembler code
Ben Hutchings (1):
irq: Always define devm_{request_threaded,free}_irq()
Benson Leung (1):
driver core : Fix use after free of dev->parent in device_shutdown
Chuansheng Liu (1):
kernel/reboot.c: re-enable the function of variable reboot_default
Daniel Vetter (2):
drm/i915/tv: clear adjusted_mode.flags drm/i915: preserve pipe A quirk in i9xx_set_pipeconf
David Cohen (1):
usb: dwc3: add support for Merrifield
Florian Wolter (1):
xhci: Fix race between ep halt and URB cancellation
Gabriel de Perthuis (1):
bcache: Strip endline when writing the label through sysfs
Greg Kroah-Hartman (1):
Linux 3.11.4
Heikki Krogerus (1):
usb: dwc3: pci: add support for BayTrail
Henrik Rydberg (1):
hwmon: (applesmc) Check key count before proceeding
Jani Nikula (1):
drm/i915/dp: increase i2c-over-aux retry interval on AUX DEFER
Johan Hovold (3):
serial: tegra: fix tty-kref leak
serial: pch_uart: fix tty-kref leak in rx-error path
serial: pch_uart: fix tty-kref leak in dma-rx path
Josh Boyer (1):
x86, efi: Don't map Boot Services on i386
Kent Overstreet (9):
block: Fix bio_copy_data()
bcache: Fix a dumb journal discard bug
bcache: Fix for when no journal entries are found
bcache: Fix a writeback performance regression
bcache: Fix a flush/fua performance bug
bcache: Fix a dumb CPU spinning bug in writeback
bcache: Fix a shrinker deadlock
bcache: Fix for handling overlapping extents when reading in a btree node
bcache: Fix flushes in writeback mode
Kurt Garloff (1):
usb/core/devio.c: Don't reject control message to endpoint with wrong direction bit
Liam Girdwood (1):
ALSA: compress: Fix compress device unregister.
Lubomir Rintel (1):
sysv: Add forgotten superblock lock init for v7 fs
Malcolm Priestley (2):
staging: vt6656: [BUG] main_usb.c oops on device_close move flag earlier.
staging: vt6656: [BUG] iwctl_siwencodeext return if device not open
Masoud Sharbiani (1):
x86/reboot: Add quirk to make Dell C6100 use reboot=pci automatically
Mathias Nyman (2):
xhci: Ensure a command structure points to the correct trb on the command ring
xhci: Fix oops happening after address device timeout
Michel Dänzer (2):
drm/radeon/cik: Fix printing of client name on VM protection fault drm/radeon/cik: Fix encoding of number of banks in tiling configuration info
Mike Snitzer (1):
dm mpath: disable WRITE SAME if it fails
Mikulas Patocka (2):
dm snapshot: workaround for a false positive lockdep warning
dm-snapshot: fix performance degradation due to small hash size
Peter Hurley (1):
tty: Fix SIGTTOU not sent with tcflush()
Ramneek Mehresh (1):
fsl/usb: Resolve PHY_CLK_VLD instability issue for ULPI phy
Solomon Peachy (2):
Revert "cw1200: Don't perform SPI transfers in interrupt context"
cw1200: Use a threaded oneshot irq handler for cw1200_spi
Tomas Winkler (2):
mei: make me client counters less error prone
mei: bus: stop wait for read during cl state transition
Vinson Lee (1):
tools lib lk: Uninclude linux/magic.h in debugfs.c
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 11 -SUBLEVEL = 3 +SUBLEVEL = 4 EXTRAVERSION = NAME = Linux for Workgroups
arch/arm/crypto/aes-armv4.S +3 -3
@@ -148,7 +148,7 @@ AES_Te: @ const AES_KEY *key) { .align 5 ENTRY(AES_encrypt) - sub r3,pc,#8 @ AES_encrypt + adr r3,AES_encrypt stmdb sp!,{r1,r4-r12,lr} mov r12,r0 @ inp mov r11,r2
@@ -381,7 +381,7 @@ _armv4_AES_encrypt: .align 5 ENTRY(private_AES_set_encrypt_key) _armv4_AES_set_encrypt_key: - sub r3,pc,#8 @ AES_set_encrypt_key + adr r3,_armv4_AES_set_encrypt_key teq r0,#0 moveq r0,#-1 beq .Labrt
@@ -843,7 +843,7 @@ AES_Td: @ const AES_KEY *key) { .align 5 ENTRY(AES_decrypt) - sub r3,pc,#8 @ AES_decrypt + adr r3,AES_decrypt stmdb sp!,{r1,r4-r12,lr} mov r12,r0 @ inp mov r11,r2
arch/x86/kernel/reboot.c +16 -0
@@ -358,6 +358,22 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Precision M6600"), }, }, + { /* Handle problems with rebooting on the Dell PowerEdge C6100. */ + .callback = set_pci_reboot, + .ident = "Dell PowerEdge C6100", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "C6100"), + }, + }, + {/* Some C6100 machines were shipped with vendor being 'Dell'. */ + .callback = set_pci_reboot, + .ident = "Dell PowerEdge C6100", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell"), + DMI_MATCH(DMI_PRODUCT_NAME, "C6100"), + }, + }, { } };
arch/x86/platform/efi/efi.c +7 -4
@@ -912,10 +912,13 @@ void __init efi_enter_virtual_mode(void)for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) { md = p; -if (!(md->attribute &EFI_MEMORY_RUNTIME ) && - md->type !=EFI_BOOT_SERVICES_CODE && - md->type !=EFI_BOOT_SERVICES_DATA ) -continue ; +if (!(md->attribute &EFI_MEMORY_RUNTIME )) { +#ifdef CONFIG_X86_64 +if (md->type !=EFI_BOOT_SERVICES_CODE && + md->type != EFI_BOOT_SERVICES_DATA) +#endif +continue ; + } size = md->num_pages <<EFI_PAGE_SHIFT ; end = md->phys_addr + size;
drivers/base/core.c +7 -7
@@ -2033,7 +2033,7 @@ EXPORT_SYMBOL_GPL(device_move);*/ void device_shutdown (void ) { -struct device *dev; +struct device *dev, *parent;spin_lock (&devices_kset->list_lock);/*
@@ -2050,7 +2050,7 @@ void device_shutdown(void)* prevent it from being freed because parent's * lock is to be held */ -get_device (dev->parent); + parent =get_device (dev->parent);get_device (dev);/* * Make sure the device is off the kset list, in the
@@ -2060,8 +2060,8 @@ void device_shutdown(void)spin_unlock (&devices_kset->list_lock);/* hold lock to avoid race with probe/release */ -if (dev->parent) -device_lock (dev->parent); +if (parent) +device_lock (parent);device_lock (dev);/* Don't allow any more runtime suspends */
@@ -2079,11 +2079,11 @@ void device_shutdown(void) }device_unlock (dev); -if (dev->parent) -device_unlock (dev->parent); +if (parent) +device_unlock (parent);put_device (dev); -put_device (dev->parent); +put_device (parent);spin_lock (&devices_kset->list_lock); }
drivers/gpu/drm/i915/intel_display.c +4 -0
@@ -4735,6 +4735,10 @@ static void i9xx_set_pipeconf(struct intel_crtc *intel_crtc) pipeconf =0 ; +if (dev_priv->quirks &QUIRK_PIPEA_FORCE && +I915_READ (PIPECONF (intel_crtc->pipe)) &PIPECONF_ENABLE ) + pipeconf |=PIPECONF_ENABLE ; +if (intel_crtc->pipe ==0 &&INTEL_INFO (dev)->gen <4 ) {/* Enable pixel doubling when the dot clock is > 90% of the (display) * core speed.
drivers/gpu/drm/i915/intel_dp.c +12 -1
@@ -567,7 +567,18 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,DRM_DEBUG_KMS ("aux_ch native nack\n" );return -EREMOTEIO ;case AUX_NATIVE_REPLY_DEFER : -udelay (100 ); +/* +* For now, just give more slack to branch devices. We +* could check the DPCD for I2C bit rate capabilities, +* and if available, adjust the interval. We could also +* be more careful with DP-to-Legacy adapters where a +* long legacy cable may force very low I2C bit rates. +*/ +if (intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT ] & +DP_DWN_STRM_PORT_PRESENT ) +usleep_range (500 ,600 ); +else +usleep_range (300 ,400 );continue ;default : DRM_ERROR("aux_ch invalid native reply 0x%02x\n",
drivers/gpu/drm/i915/intel_tv.c +8 -0
@@ -918,6 +918,14 @@ intel_tv_compute_config(struct intel_encoder *encoder,DRM_DEBUG_KMS ("forcing bpc to 8 for TV\n" ); pipe_config->pipe_bpp =8 *3 ; +/* TV has it's own notion of sync and other mode flags, so clear them. */ + pipe_config->adjusted_mode.flags =0 ; + +/* +* FIXME: We don't check whether the input mode is actually what we want +* or whether userspace is doing something stupid. +*/ +return true; }
drivers/gpu/drm/radeon/cik.c +8 -9
@@ -2008,10 +2008,8 @@ static void cik_gpu_init(struct radeon_device *rdev) rdev->config.cik.tile_config |= (3 <<0 );break ; } -if ((mc_arb_ramcfg &NOOFBANK_MASK ) >>NOOFBANK_SHIFT ) - rdev->config.cik.tile_config |=1 <<4 ; -else - rdev->config.cik.tile_config |=0 <<4 ; + rdev->config.cik.tile_config |= + ((mc_arb_ramcfg &NOOFBANK_MASK ) >>NOOFBANK_SHIFT ) <<4 ; rdev->config.cik.tile_config |= ((gb_addr_config &PIPE_INTERLEAVE_SIZE_MASK ) >>PIPE_INTERLEAVE_SIZE_SHIFT ) <<8 ; rdev->config.cik.tile_config |=
@@ -4227,8 +4225,8 @@ static int cik_mc_init(struct radeon_device *rdev) rdev->mc.aper_base =pci_resource_start (rdev->pdev,0 ); rdev->mc.aper_size =pci_resource_len (rdev->pdev,0 );/* size in MB on si */ - rdev->mc.mc_vram_size =RREG32 (CONFIG_MEMSIZE ) *1024 *1024 ; - rdev->mc.real_vram_size =RREG32 (CONFIG_MEMSIZE ) *1024 *1024 ; + rdev->mc.mc_vram_size =RREG32 (CONFIG_MEMSIZE ) *1024ULL *1024ULL ; + rdev->mc.real_vram_size =RREG32 (CONFIG_MEMSIZE ) *1024ULL *1024ULL ; rdev->mc.visible_vram_size = rdev->mc.aper_size;si_vram_gtt_location (rdev, &rdev->mc);radeon_update_bandwidth_info (rdev);
@@ -4506,12 +4504,13 @@ static void cik_vm_decode_fault(struct radeon_device *rdev,u32 mc_id = (status &MEMORY_CLIENT_ID_MASK ) >>MEMORY_CLIENT_ID_SHIFT ;u32 vmid = (status &FAULT_VMID_MASK ) >>FAULT_VMID_SHIFT ;u32 protections = (status &PROTECTIONS_MASK ) >>PROTECTIONS_SHIFT ; -char *block = (char *)&mc_client; +char block[5 ] = { mc_client >>24 , (mc_client >>16 ) &0xff , + (mc_client >>8 ) &0xff , mc_client &0xff ,0 }; -printk ("VM fault (0x%02x, vmid %d) at page %u, %s from %s (%d)\n" , +printk ("VM fault (0x%02x, vmid %d) at page %u, %s from '%s' (0x%08x) (%d)\n" , protections, vmid, addr, (status &MEMORY_CLIENT_RW_MASK ) ?"write" :"read" , - block, mc_id); + block, mc_client, mc_id); }/**
drivers/gpu/drm/radeon/r100.c +5 -3
@@ -2926,9 +2926,11 @@ static int r100_debugfs_cp_ring_info(struct seq_file *m, void *data)seq_printf (m,"CP_RB_RPTR 0x%08x\n" , rdp);seq_printf (m,"%u free dwords in ring\n" , ring->ring_free_dw);seq_printf (m,"%u dwords in ring\n" , count); -for (j =0 ; j <= count; j++) { - i = (rdp + j) & ring->ptr_mask; -seq_printf (m,"r[%04d]=0x%08x\n" , i, ring->ring[i]); +if (ring->ready) { +for (j =0 ; j <= count; j++) { + i = (rdp + j) & ring->ptr_mask; +seq_printf (m,"r[%04d]=0x%08x\n" , i, ring->ring[i]); + } }return 0 ; }
drivers/gpu/drm/radeon/r600_hdmi.c +15 -5
@@ -257,10 +257,7 @@ void r600_audio_set_dto(struct drm_encoder *encoder, u32 clock)* number (coefficient of two integer numbers. DCCG_AUDIO_DTOx_PHASE * is the numerator, DCCG_AUDIO_DTOx_MODULE is the denominator */ -if (ASIC_IS_DCE3 (rdev)) { -/* according to the reg specs, this should DCE3.2 only, but in -* practice it seems to cover DCE3.0 as well. -*/ +if (ASIC_IS_DCE32 (rdev)) {if (dig->dig_encoder ==0 ) { dto_cntl =RREG32 (DCCG_AUDIO_DTO0_CNTL ) & ~DCCG_AUDIO_DTO_WALLCLOCK_RATIO_MASK ; dto_cntl |=DCCG_AUDIO_DTO_WALLCLOCK_RATIO (wallclock_ratio);
@@ -276,8 +273,21 @@ void r600_audio_set_dto(struct drm_encoder *encoder, u32 clock)WREG32 (DCCG_AUDIO_DTO1_MODULE , dto_modulo);WREG32 (DCCG_AUDIO_DTO_SELECT ,1 );/* select DTO1 */ } + }else if (ASIC_IS_DCE3 (rdev)) { +/* according to the reg specs, this should DCE3.2 only, but in +* practice it seems to cover DCE3.0/3.1 as well. +*/ +if (dig->dig_encoder ==0 ) { +WREG32 (DCCG_AUDIO_DTO0_PHASE , base_rate *100 ); +WREG32 (DCCG_AUDIO_DTO0_MODULE , clock *100 ); +WREG32 (DCCG_AUDIO_DTO_SELECT ,0 );/* select DTO0 */ + }else { +WREG32 (DCCG_AUDIO_DTO1_PHASE , base_rate *100 ); +WREG32 (DCCG_AUDIO_DTO1_MODULE , clock *100 ); +WREG32 (DCCG_AUDIO_DTO_SELECT ,1 );/* select DTO1 */ + } }else { -/* according to the reg specs, this should be DCE2.0 and DCE3.0 */ +/* according to the reg specs, this should be DCE2.0 and DCE3.0/3.1 */ WREG32 (AUDIO_DTO ,AUDIO_DTO_PHASE (base_rate /10 ) |AUDIO_DTO_MODULE (clock /10 )); }
drivers/gpu/drm/radeon/radeon_asic.c +2 -0
@@ -926,6 +926,8 @@ static struct radeon_asic r520_asic = { .wait_for_vblank = &avivo_wait_for_vblank, .set_backlight_level = &atombios_set_backlight_level, .get_backlight_level = &atombios_get_backlight_level, + .hdmi_enable = &r600_hdmi_enable, + .hdmi_setmode = &r600_hdmi_setmode, }, .copy = { .blit = &r100_copy_blit,
drivers/gpu/drm/radeon/radeon_cs.c +1 -1
@@ -84,7 +84,7 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)VRAM, also but everything into VRAM on AGP cards to avoid image corruptions */ if (p->ring ==R600_RING_TYPE_UVD_INDEX && - (i ==0 || p->rdev->flags &RADEON_IS_AGP )) { + (i ==0 ||drm_pci_device_is_agp (p->rdev->ddev))) {/* TODO: is this still needed for NI+ ? */ p->relocs[i].lobj.domain =RADEON_GEM_DOMAIN_VRAM ;
drivers/gpu/drm/radeon/radeon_device.c +12 -3
@@ -1297,13 +1297,22 @@ int radeon_device_init(struct radeon_device *rdev,return r; }if ((radeon_testing &1 )) { -radeon_test_moves (rdev); +if (rdev->accel_working) +radeon_test_moves (rdev); +else +DRM_INFO ("radeon: acceleration disabled, skipping move tests\n" ); }if ((radeon_testing &2 )) { -radeon_test_syncing (rdev); +if (rdev->accel_working) +radeon_test_syncing (rdev); +else +DRM_INFO ("radeon: acceleration disabled, skipping sync tests\n" ); }if (radeon_benchmarking) { -radeon_benchmark (rdev, radeon_benchmarking); +if (rdev->accel_working) +radeon_benchmark (rdev, radeon_benchmarking); +else +DRM_INFO ("radeon: acceleration disabled, skipping benchmarks\n" ); }return 0 ; }
drivers/gpu/drm/radeon/radeon_pm.c +4 -4
@@ -919,7 +919,7 @@ static void radeon_pm_resume_old(struct radeon_device *rdev) {/* set up the default clocks if the MC ucode is loaded */ if ((rdev->family >=CHIP_BARTS ) && - (rdev->family <=CHIP_HAINAN ) && + (rdev->family <=CHIP_CAYMAN ) && rdev->mc_fw) {if (rdev->pm.default_vddc) radeon_atom_set_voltage(rdev, rdev->pm.default_vddc,
@@ -963,7 +963,7 @@ static void radeon_pm_resume_dpm(struct radeon_device *rdev)if (ret) {DRM_ERROR ("radeon: dpm resume failed\n" );if ((rdev->family >=CHIP_BARTS ) && - (rdev->family <=CHIP_HAINAN ) && + (rdev->family <=CHIP_CAYMAN ) && rdev->mc_fw) {if (rdev->pm.default_vddc) radeon_atom_set_voltage(rdev, rdev->pm.default_vddc,
@@ -1014,7 +1014,7 @@ static int radeon_pm_init_old(struct radeon_device *rdev)radeon_pm_init_profile (rdev);/* set up the default clocks if the MC ucode is loaded */ if ((rdev->family >=CHIP_BARTS ) && - (rdev->family <=CHIP_HAINAN ) && + (rdev->family <=CHIP_CAYMAN ) && rdev->mc_fw) {if (rdev->pm.default_vddc) radeon_atom_set_voltage(rdev, rdev->pm.default_vddc,
@@ -1099,7 +1099,7 @@ static int radeon_pm_init_dpm(struct radeon_device *rdev)if (ret) { rdev->pm.dpm_enabled = false;if ((rdev->family >=CHIP_BARTS ) && - (rdev->family <=CHIP_HAINAN ) && + (rdev->family <=CHIP_CAYMAN ) && rdev->mc_fw) {if (rdev->pm.default_vddc) radeon_atom_set_voltage(rdev, rdev->pm.default_vddc,
drivers/gpu/drm/radeon/radeon_ring.c +5 -3
@@ -846,9 +846,11 @@ static int radeon_debugfs_ring_info(struct seq_file *m, void *data)* packet that is the root issue */ i = (ring->rptr + ring->ptr_mask +1 -32 ) & ring->ptr_mask; -for (j =0 ; j <= (count +32 ); j++) { -seq_printf (m,"r[%5d]=0x%08x\n" , i, ring->ring[i]); - i = (i +1 ) & ring->ptr_mask; +if (ring->ready) { +for (j =0 ; j <= (count +32 ); j++) { +seq_printf (m,"r[%5d]=0x%08x\n" , i, ring->ring[i]); + i = (i +1 ) & ring->ptr_mask; + } }return 0 ; }
drivers/hwmon/applesmc.c +10 -1
@@ -525,16 +525,25 @@ static int applesmc_init_smcreg_try(void) {struct applesmc_registers *s = &smcreg;bool left_light_sensor, right_light_sensor; +unsigned int count;u8 tmp[1 ];int ret;if (s->init_complete)return 0 ; - ret =read_register_count (&s->key_count); + ret =read_register_count (&count);if (ret)return ret; +if (s->cache && s->key_count != count) { +pr_warn ("key count changed from %d to %d\n" , + s->key_count, count); +kfree (s->cache); + s->cache =NULL ; + } + s->key_count = count; +if (!s->cache) s->cache =kcalloc (s->key_count,sizeof (*s->cache),GFP_KERNEL );if (!s->cache)
drivers/md/bcache/bcache.h +3 -4
@@ -498,7 +498,7 @@ struct cached_dev {*/ atomic_t has_dirty; -struct ratelimit writeback_rate; +struct bch_ratelimit writeback_rate;struct delayed_work writeback_rate_update;/*
@@ -507,10 +507,9 @@ struct cached_dev {*/ sector_t last_read; -/* Number of writeback bios in flight */ -atomic_t in_flight; +/* Limit number of writeback bios in flight */ +struct semaphore in_flight;struct closure_with_timer writeback; -struct closure_waitlist writeback_wait;struct keybuf writeback_keys;
drivers/md/bcache/bset.c +28 -11
@@ -926,28 +926,45 @@ struct bkey *bch_next_recurse_key(struct btree *b, struct bkey *search)/* Mergesort */ +static void sort_key_next (struct btree_iter *iter, +struct btree_iter_set *i) +{ + i->k =bkey_next (i->k); + +if (i->k == i->end) + *i = iter->data[--iter->used]; +} +static void btree_sort_fixup (struct btree_iter *iter) {while (iter->used >1 ) {struct btree_iter_set *top = iter->data, *i = top +1 ; -struct bkey *k;if (iter->used >2 &&btree_iter_cmp (i[0 ], i[1 ])) i++; -for (k = i->k; - k != i->end &&bkey_cmp (top->k, &START_KEY (k)) >0 ; - k =bkey_next (k)) -if (top->k > i->k) -__bch_cut_front (top->k, k); -else if (KEY_SIZE (k)) -bch_cut_back (&START_KEY (k), top->k); - -if (top->k < i->k || k == i->k) +if (bkey_cmp (top->k, &START_KEY (i->k)) <=0 )break ; -heap_sift (iter, i - top, btree_iter_cmp); +if (!KEY_SIZE (i->k)) { +sort_key_next (iter, i); +heap_sift (iter, i - top, btree_iter_cmp); +continue ; + } + +if (top->k > i->k) { +if (bkey_cmp (top->k, i->k) >=0 ) +sort_key_next (iter, i); +else +bch_cut_front (top->k, i->k); + +heap_sift (iter, i - top, btree_iter_cmp); + }else { +/* can't happen because of comparison func */ +BUG_ON (!bkey_cmp (&START_KEY (top->k), &START_KEY (i->k))); +bch_cut_back (&START_KEY (i->k), top->k); + } } }
drivers/md/bcache/btree.c +1 -1
@@ -617,7 +617,7 @@ static int bch_mca_shrink(struct shrinker *shrink, struct shrink_control *sc)return mca_can_free (c) * c->btree_pages;/* Return -1 if we can't do anything right now */ -if (sc->gfp_mask & __GFP_WAIT) +if (sc->gfp_mask & __GFP_IO)mutex_lock (&c->bucket_lock);else if (!mutex_trylock (&c->bucket_lock))return -1 ;
drivers/md/bcache/journal.c +20 -13
@@ -153,7 +153,8 @@ int bch_journal_read(struct cache_set *c, struct list_head *list,bitmap_zero (bitmap,SB_JOURNAL_BUCKETS );pr_debug ("%u journal buckets" , ca->sb.njournal_buckets); -/* Read journal buckets ordered by golden ratio hash to quickly +/* +* Read journal buckets ordered by golden ratio hash to quickly * find a sequence of buckets with valid journal entries */ for (i =0 ; i < ca->sb.njournal_buckets; i++) {
@@ -166,18 +167,20 @@ int bch_journal_read(struct cache_set *c, struct list_head *list, goto bsearch; } -/* If that fails, check all the buckets we haven't checked +/* +* If that fails, check all the buckets we haven't checked * already */ pr_debug ("falling back to linear search" ); -for (l =0 ; l < ca->sb.njournal_buckets; l++) { -if (test_bit (l, bitmap)) -continue ; - +for (l =find_first_zero_bit (bitmap, ca->sb.njournal_buckets); + l < ca->sb.njournal_buckets; + l =find_next_zero_bit (bitmap, ca->sb.njournal_buckets, l +1 ))if (read_bucket (l)) goto bsearch; - } + +if (list_empty (list)) +continue ; bsearch:/* Binary search */ m = r =find_next_bit (bitmap, ca->sb.njournal_buckets, l +1 );
@@ -197,10 +200,12 @@ bsearch: r = m; } -/* Read buckets in reverse order until we stop finding more +/* +* Read buckets in reverse order until we stop finding more * journal entries */ -pr_debug ("finishing up" ); +pr_debug ("finishing up: m %u njournal_buckets %u" , + m, ca->sb.njournal_buckets); l = m;while (1 ) {
@@ -228,9 +233,10 @@ bsearch: } } - c->journal.seq =list_entry (list->prev, - struct journal_replay, - list)->j.seq; +if (!list_empty (list)) + c->journal.seq =list_entry (list->prev, + struct journal_replay, + list)->j.seq;return 0 ;#undef read_bucket
@@ -428,7 +434,7 @@ static void do_journal_discard(struct cache *ca)return ; } -switch (atomic_read (&ja->discard_in_flight) ==DISCARD_IN_FLIGHT ) { +switch (atomic_read (&ja->discard_in_flight)) {case DISCARD_IN_FLIGHT :return ;
@@ -689,6 +695,7 @@ void bch_journal_meta(struct cache_set *c, struct closure *cl)if (cl)BUG_ON (!closure_wait (&w->wait, cl)); +closure_flush (&c->journal.io);__journal_try_write (c, true); } }
drivers/md/bcache/request.c +9 -6
@@ -997,14 +997,17 @@ static void request_write(struct cached_dev *dc, struct search *s) }else {bch_writeback_add (dc); -if (s->op.flush_journal) { +if (bio->bi_rw &REQ_FLUSH ) {/* Also need to send a flush to the backing device */ - s->op.cache_bio =bio_clone_bioset (bio,GFP_NOIO , - dc->disk.bio_split); +struct bio *flush =bio_alloc_bioset (0 ,GFP_NOIO , + dc->disk.bio_split); - bio->bi_size =0 ; - bio->bi_vcnt =0 ; -closure_bio_submit (bio, cl, s->d); + flush->bi_rw =WRITE_FLUSH ; + flush->bi_bdev = bio->bi_bdev; + flush->bi_end_io = request_endio; + flush->bi_private = cl; + +closure_bio_submit (flush, cl, s->d); }else { s->op.cache_bio = bio; }
drivers/md/bcache/sysfs.c +7 -2
@@ -223,8 +223,13 @@ STORE(__cached_dev) }if (attr == &sysfs_label) { -/* note: endlines are preserved */ -memcpy (dc->sb.label, buf,SB_LABEL_SIZE ); +if (size >SB_LABEL_SIZE ) +return -EINVAL ; +memcpy (dc->sb.label, buf, size); +if (size <SB_LABEL_SIZE ) + dc->sb.label[size] ='\0' ; +if (size && dc->sb.label[size -1 ] =='\n' ) + dc->sb.label[size -1 ] ='\0' ;bch_write_bdev_super (dc,NULL );if (dc->disk.c) { memcpy(dc->disk.c->uuids[dc->disk.id].label,
drivers/md/bcache/util.c +10 -1
@@ -190,7 +190,16 @@ void bch_time_stats_update(struct time_stats *stats, uint64_t start_time) stats->last = now ?:1 ; } -unsigned bch_next_delay (struct ratelimit *d,uint64_t done) +/** +* bch_next_delay() - increment @d by the amount of work done, and return how +* long to delay until the next time to do some work. +* +* @d - the struct bch_ratelimit to update +* @done - the amount of work done, in arbitrary units +* +* Returns the amount of time to delay by, in jiffies +*/ +uint64_t bch_next_delay (struct bch_ratelimit *d,uint64_t done) {uint64_t now =local_clock ();
drivers/md/bcache/util.h +9 -3
@@ -450,17 +450,23 @@ read_attribute(name ## _last_ ## frequency_units) (ewma) >> factor; \ }) -struct ratelimit { +struct bch_ratelimit { +/* Next time we want to do some work, in nanoseconds */ uint64_t next; + +/* +* Rate at which we want to do work, in units per nanosecond +* The units here correspond to the units passed to bch_next_delay() +*/ unsigned rate; }; -static inline void ratelimit_reset (struct ratelimit *d) +static inline void bch_ratelimit_reset (struct bch_ratelimit *d) { d->next =local_clock (); } -unsigned bch_next_delay (struct ratelimit *d,uint64_t done); +uint64_t bch_next_delay (struct bch_ratelimit *d,uint64_t done);#define __DIV_SAFE (n, d, zero) \ ({ \
drivers/md/bcache/writeback.c +20 -22
108 lines not on this page · raw message
drivers/md/dm-mpath.c +10 -1
@@ -1284,8 +1284,17 @@ static int do_end_io(struct multipath *m, struct request *clone,if (!error && !clone->errors)return 0 ;/* I/O complete */ -if (error == -EOPNOTSUPP || error == -EREMOTEIO || error == -EILSEQ ) +if (error == -EOPNOTSUPP || error == -EREMOTEIO || error == -EILSEQ ) { +if ((clone->cmd_flags &REQ_WRITE_SAME ) && + !clone->q->limits.max_write_same_sectors) { +struct queue_limits *limits; + +/* device doesn't really support WRITE SAME, disable it */ + limits =dm_get_queue_limits (dm_table_get_md (m->ti->table)); + limits->max_write_same_sectors =0 ; + }return error; + }if (mpio->pgpath)fail_path (mpio->pgpath);
drivers/md/dm-snap-persistent.c +1 -1
@@ -256,7 +256,7 @@ static int chunk_io(struct pstore *ps, void *area, chunk_t chunk, int rw,*/ INIT_WORK_ONSTACK (&req.work, do_metadata);queue_work (ps->metadata_wq, &req.work); -flush_work (&req.work); +flush_workqueue (ps->metadata_wq);return req.result; }
drivers/md/dm-snap.c +2 -3
@@ -725,17 +725,16 @@ static int calc_max_buckets(void)*/ static int init_hash_tables (struct dm_snapshot *s) { -sector_t hash_size, cow_dev_size, origin_dev_size, max_buckets; +sector_t hash_size, cow_dev_size, max_buckets;/* * Calculate based on the size of the original volume or * the COW volume... */ cow_dev_size =get_dev_size (s->cow->bdev); - origin_dev_size =get_dev_size (s->origin->bdev); max_buckets =calc_max_buckets (); - hash_size =min (origin_dev_size, cow_dev_size) >> s->store->chunk_shift; + hash_size = cow_dev_size >> s->store->chunk_shift; hash_size =min (hash_size, max_buckets);if (hash_size <64 )
drivers/md/dm.c +11 -0
@@ -2250,6 +2250,17 @@ struct target_type *dm_get_immutable_target_type(struct mapped_device *md) }/* +* The queue_limits are only valid as long as you have a reference +* count on 'md'. +*/ +struct queue_limits *dm_get_queue_limits (struct mapped_device *md) +{ +BUG_ON (!atomic_read (&md->holders)); +return &md->queue->limits; +} +EXPORT_SYMBOL_GPL (dm_get_queue_limits); + +/* * Fully initialize a request-based queue (->elevator, ->request_fn, etc). */ static int dm_init_request_based_queue (struct mapped_device *md)
drivers/misc/mei/amthif.c +1 -0
@@ -57,6 +57,7 @@ void mei_amthif_reset_params(struct mei_device *dev) dev->iamthif_ioctl = false; dev->iamthif_state =MEI_IAMTHIF_IDLE ; dev->iamthif_timer =0 ; + dev->iamthif_stall_timer =0 ; }/**
drivers/misc/mei/bus.c +4 -1
@@ -295,10 +295,13 @@ int __mei_cl_recv(struct mei_cl *cl, u8 *buf, size_t length)if (cl->reading_state !=MEI_READ_COMPLETE && !waitqueue_active (&cl->rx_wait)) { +mutex_unlock (&dev->device_lock);if (wait_event_interruptible (cl->rx_wait, - (MEI_READ_COMPLETE == cl->reading_state))) { + cl->reading_state ==MEI_READ_COMPLETE || +mei_cl_is_transitioning (cl))) { +if (signal_pending (current))return -EINTR ;return -ERESTARTSYS ;
drivers/misc/mei/client.h +6 -0
@@ -76,6 +76,12 @@ static inline bool mei_cl_cmp_id(const struct mei_cl *cl1, (cl1->host_client_id == cl2->host_client_id) && (cl1->me_client_id == cl2->me_client_id); } +static inline bool mei_cl_is_transitioning (struct mei_cl *cl) +{ +return (MEI_FILE_INITIALIZING == cl->state || +MEI_FILE_DISCONNECTED == cl->state || +MEI_FILE_DISCONNECTING == cl->state); +}int mei_cl_flow_ctrl_creds (struct mei_cl *cl);
drivers/misc/mei/hbm.c +6 -4
@@ -35,11 +35,15 @@ static void mei_hbm_me_cl_allocate(struct mei_device *dev)struct mei_me_client *clients;int b; + dev->me_clients_num =0 ; + dev->me_client_presentation_num =0 ; + dev->me_client_index =0 ; +/* count how many ME clients we have */ for_each_set_bit (b, dev->me_clients_map,MEI_CLIENTS_MAX ) dev->me_clients_num++; -if (dev->me_clients_num <=0 ) +if (dev->me_clients_num ==0 )return ;kfree (dev->me_clients);
@@ -221,7 +225,7 @@ static int mei_hbm_prop_req(struct mei_device *dev)struct hbm_props_request *prop_req;const size_t len =sizeof (struct hbm_props_request );unsigned long next_client_index; -u8 client_num; +unsigned long client_num; client_num = dev->me_client_presentation_num;
@@ -677,8 +681,6 @@ void mei_hbm_dispatch(struct mei_device *dev, struct mei_msg_hdr *hdr)if (dev->dev_state ==MEI_DEV_INIT_CLIENTS && dev->hbm_state ==MEI_HBM_ENUM_CLIENTS ) { dev->init_clients_timer =0 ; - dev->me_client_presentation_num =0 ; - dev->me_client_index =0 ;mei_hbm_me_cl_allocate (dev); dev->hbm_state =MEI_HBM_CLIENT_PROPERTIES ;
drivers/misc/mei/init.c +3 -0
@@ -169,6 +169,9 @@ void mei_reset(struct mei_device *dev, int interrupts_enabled)memset (&dev->wr_ext_msg,0 ,sizeof (dev->wr_ext_msg)); } +/* we're already in reset, cancel the init timer */ + dev->init_clients_timer =0 ; + dev->me_clients_num =0 ; dev->rd_msg_hdr =0 ; dev->wd_pending = false;
drivers/misc/mei/main.c +4 -7
@@ -249,19 +249,16 @@ static ssize_t mei_read(struct file *file, char __user *ubuf,mutex_unlock (&dev->device_lock);if (wait_event_interruptible (cl->rx_wait, - (MEI_READ_COMPLETE == cl->reading_state || -MEI_FILE_INITIALIZING == cl->state || -MEI_FILE_DISCONNECTED == cl->state || -MEI_FILE_DISCONNECTING == cl->state))) { +MEI_READ_COMPLETE == cl->reading_state || +mei_cl_is_transitioning (cl))) { +if (signal_pending (current))return -EINTR ;return -ERESTARTSYS ; }mutex_lock (&dev->device_lock); -if (MEI_FILE_INITIALIZING == cl->state || -MEI_FILE_DISCONNECTED == cl->state || -MEI_FILE_DISCONNECTING == cl->state) { +if (mei_cl_is_transitioning (cl)) { rets = -EBUSY ; goto out; }
drivers/misc/mei/mei_dev.h +3 -3
@@ -396,9 +396,9 @@ struct mei_device {struct mei_me_client *me_clients;/* Note: memory has to be allocated */ DECLARE_BITMAP (me_clients_map,MEI_CLIENTS_MAX );DECLARE_BITMAP (host_clients_map,MEI_CLIENTS_MAX ); -u8 me_clients_num; -u8 me_client_presentation_num; -u8 me_client_index; +unsigned long me_clients_num; +unsigned long me_client_presentation_num; +unsigned long me_client_index;struct mei_cl wd_cl;enum mei_wd_states wd_state;
drivers/net/wireless/cw1200/cw1200_spi.c +7 -19
@@ -42,7 +42,6 @@ struct hwbus_priv {spinlock_t lock;/* Serialize all bus operations */ wait_queue_head_t wq;int claimed; -int irq_disabled; };#define SDIO_TO_SPI_ADDR (addr) ((addr & 0x1f)>>2)
@@ -238,8 +237,6 @@ static irqreturn_t cw1200_spi_irq_handler(int irq, void *dev_id)struct hwbus_priv *self = dev_id;if (self->core) { -disable_irq_nosync (self->func->irq); - self->irq_disabled =1 ;cw1200_irq_handler (self->core);return IRQ_HANDLED ; }else {
@@ -253,9 +250,10 @@ static int cw1200_spi_irq_subscribe(struct hwbus_priv *self)pr_debug ("SW IRQ subscribe\n" ); - ret =request_any_context_irq (self->func->irq, cw1200_spi_irq_handler, -IRQF_TRIGGER_HIGH , -"cw1200_wlan_irq" , self); + ret =request_threaded_irq (self->func->irq,NULL , + cw1200_spi_irq_handler, +IRQF_TRIGGER_HIGH |IRQF_ONESHOT , +"cw1200_wlan_irq" , self);if (WARN_ON (ret <0 )) goto exit;
@@ -273,22 +271,13 @@ exit:static int cw1200_spi_irq_unsubscribe (struct hwbus_priv *self) { +int ret =0 ; +pr_debug ("SW IRQ unsubscribe\n" );disable_irq_wake (self->func->irq);free_irq (self->func->irq, self); -return 0 ; -} - -static int cw1200_spi_irq_enable (struct hwbus_priv *self,int enable) -{ -/* Disables are handled by the interrupt handler */ -if (enable && self->irq_disabled) { -enable_irq (self->func->irq); - self->irq_disabled =0 ; - } - -return 0 ; +return ret; }static int cw1200_spi_off (const struct cw1200_platform_data_spi *pdata)
@@ -368,7 +357,6 @@ static struct hwbus_ops cw1200_spi_hwbus_ops = { .unlock = cw1200_spi_unlock, .align_size = cw1200_spi_align_size, .power_mgmt = cw1200_spi_pm, - .irq_enable = cw1200_spi_irq_enable, };/* Probe Function to be called by SPI stack when device is discovered */
drivers/net/wireless/cw1200/fwio.c +1 -1
@@ -485,7 +485,7 @@ int cw1200_load_firmware(struct cw1200_common *priv)/* Enable interrupt signalling */ priv->hwbus_ops->lock (priv->hwbus_priv); - ret =__cw1200_irq_enable (priv,2 ); + ret =__cw1200_irq_enable (priv,1 ); priv->hwbus_ops->unlock (priv->hwbus_priv);if (ret <0 ) goto unsubscribe;
drivers/net/wireless/cw1200/hwbus.h +0 -1
@@ -28,7 +28,6 @@ struct hwbus_ops {void (*unlock)(struct hwbus_priv *self);size_t (*align_size)(struct hwbus_priv *self,size_t size); int (*power_mgmt)(struct hwbus_priv *self, bool suspend); - int (*irq_enable)(struct hwbus_priv *self, int enable); };#endif /* CW1200_HWBUS_H */
drivers/net/wireless/cw1200/hwio.c +0 -15
@@ -273,21 +273,6 @@ int __cw1200_irq_enable(struct cw1200_common *priv, int enable)u16 val16;int ret; -/* We need to do this hack because the SPI layer can sleep on I/O -and the general path involves I/O to the device in interrupt -context. - -However, the initial enable call needs to go to the hardware. - -We don't worry about shutdown because we do a full reset which -clears the interrupt enabled bits. -*/ -if (priv->hwbus_ops->irq_enable) { - ret = priv->hwbus_ops->irq_enable (priv->hwbus_priv, enable); -if (ret || enable <2 ) -return ret; - } -if (HIF_8601_SILICON == priv->hw_type) { ret =__cw1200_reg_read_32 (priv,ST90TDS_CONFIG_REG_ID , &val32);if (ret <0 ) {
drivers/staging/vt6656/iwctl.c +3 -0
@@ -1634,6 +1634,9 @@ int iwctl_siwencodeext(struct net_device *dev, struct iw_request_info *info,if (pMgmt ==NULL )return -EFAULT ; +if (!(pDevice->flags &DEVICE_FLAGS_OPENED )) +return -ENODEV ; + buf =kzalloc (sizeof (struct viawget_wpa_param ),GFP_KERNEL );if (buf ==NULL )return -ENOMEM ;
drivers/staging/vt6656/main_usb.c +2 -1
@@ -1099,6 +1099,8 @@ static int device_close(struct net_device *dev)memset (pMgmt->abyCurrBSSID,0 ,6 ); pMgmt->eCurrState =WMAC_STATE_IDLE ; + pDevice->flags &= ~DEVICE_FLAGS_OPENED ; +device_free_tx_bufs (pDevice);device_free_rx_bufs (pDevice);device_free_int_bufs (pDevice);
@@ -1110,7 +1112,6 @@ static int device_close(struct net_device *dev)usb_free_urb (pDevice->pInterruptURB);BSSvClearNodeDBTable (pDevice,0 ); - pDevice->flags &=(~DEVICE_FLAGS_OPENED );DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "device_close2 \n" );
drivers/tty/serial/pch_uart.c +4 -1
@@ -658,11 +658,12 @@ static int dma_push_rx(struct eg20t_port *priv, int size)dev_warn (port->dev,"Rx overrun: dropping %u bytes\n" , size - room);if (!room) -return room; + goto out;tty_insert_flip_string (tport,sg_virt (&priv->sg_rx), size); port->icount.rx += room; +out:tty_kref_put (tty);return room;
@@ -1071,6 +1072,8 @@ static void pch_uart_err_ir(struct eg20t_port *priv, unsigned int lsr)if (tty ==NULL ) {for (i =0 ; error_msg[i] !=NULL ; i++)dev_err (&priv->pdev->dev, error_msg[i]); + }else { +tty_kref_put (tty); } }
drivers/tty/serial/serial-tegra.c +3 -1
@@ -726,7 +726,7 @@ static irqreturn_t tegra_uart_isr(int irq, void *data)static void tegra_uart_stop_rx (struct uart_port *u) {struct tegra_uart_port *tup =to_tegra_uport (u); -struct tty_struct *tty =tty_port_tty_get (&tup->uport.state->port); +struct tty_struct *tty;struct tty_port *port = &u->state->port;struct dma_tx_state state;unsigned long ier;
@@ -738,6 +738,8 @@ static void tegra_uart_stop_rx(struct uart_port *u)if (!tup->rx_in_progress)return ; + tty =tty_port_tty_get (&tup->uport.state->port); +tegra_uart_wait_sym_time (tup,1 );/* wait a character interval */ ier = tup->ier_shadow;
drivers/tty/tty_ioctl.c +3 -0
@@ -1201,6 +1201,9 @@ int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file, }return 0 ;case TCFLSH : + retval =tty_check_change (tty); +if (retval) +return retval;return __tty_perform_flush (tty, arg);default :/* Try the mode commands */
drivers/usb/core/devio.c +16 -0
@@ -742,6 +742,22 @@ static int check_ctrlrecip(struct dev_state *ps, unsigned int requesttype,if ((index & ~USB_DIR_IN ) ==0 )return 0 ; ret =findintfep (ps->dev, index); +if (ret <0 ) { +/* +* Some not fully compliant Win apps seem to get +* index wrong and have the endpoint number here +* rather than the endpoint address (with the +* correct direction). Win does let this through, +* so we'll not reject it here but leave it to +* the device to not break KVM. But we warn. +*/ + ret =findintfep (ps->dev, index ^0x80 ); +if (ret >=0 ) +dev_info (&ps->dev->dev, +"%s: process %i (%s) requesting ep %02x but needs %02x\n" , + __func__,task_pid_nr (current), + current->comm, index, index ^0x80 ); + }if (ret >=0 ) ret =checkintf (ps, ret);break ;
drivers/usb/dwc3/dwc3-pci.c +4 -0
@@ -48,6 +48,8 @@/* FIXME define these in <linux/pci_ids.h> */ #define PCI_VENDOR_ID_SYNOPSYS 0x16c3#define PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3 0xabcd +#define PCI_DEVICE_ID_INTEL_BYT 0x0f37 +#define PCI_DEVICE_ID_INTEL_MRFLD 0x119estruct dwc3_pci {struct device *dev;
@@ -207,6 +209,8 @@ static DEFINE_PCI_DEVICE_TABLE(dwc3_pci_id_table) = { PCI_DEVICE(PCI_VENDOR_ID_SYNOPSYS, PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3), }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BYT), }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_MRFLD), }, { }/* Terminating Entry */ };MODULE_DEVICE_TABLE (pci, dwc3_pci_id_table);
drivers/usb/gadget/f_fs.c +26 -34
104 lines not on this page · raw message
drivers/usb/host/ehci-fsl.c +3 -9
@@ -130,7 +130,7 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver, }/* Enable USB controller, 83xx or 8536 */ -if (pdata->have_sysif_regs) +if (pdata->have_sysif_regs && pdata->controller_ver <FSL_USB_VER_1_6 )setbits32 (hcd->regs +FSL_SOC_USB_CTRL ,0x4 );/* Don't need to set host mode here. It will be done by tdi_reset() */
@@ -232,15 +232,9 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd,case FSL_USB2_PHY_ULPI :if (pdata->have_sysif_regs && pdata->controller_ver) {/* controller version 1.6 or above */ +clrbits32 (non_ehci +FSL_SOC_USB_CTRL ,UTMI_PHY_EN );setbits32 (non_ehci +FSL_SOC_USB_CTRL , -ULPI_PHY_CLK_SEL ); -/* -* Due to controller issue of PHY_CLK_VALID in ULPI -* mode, we set USB_CTRL_USB_EN before checking -* PHY_CLK_VALID, otherwise PHY_CLK_VALID doesn't work. -*/ -clrsetbits_be32 (non_ehci +FSL_SOC_USB_CTRL , -UTMI_PHY_EN ,USB_CTRL_USB_EN ); +ULPI_PHY_CLK_SEL |USB_CTRL_USB_EN ); } portsc |=PORT_PTS_ULPI ;break ;
drivers/usb/host/ehci-pci.c +1 -1
@@ -403,7 +403,7 @@ static struct pci_driver ehci_pci_driver = { .remove = usb_hcd_pci_remove, .shutdown = usb_hcd_pci_shutdown, -#ifdef CONFIG_PM_SLEEP +#ifdef CONFIG_PM .driver = { .pm = &usb_hcd_pci_pm_ops },
drivers/usb/host/ohci-hcd.c +12 -10
@@ -216,31 +216,26 @@ static int ohci_urb_enqueue ( frame &= ~(ed->interval -1 ); frame |= ed->branch; urb->start_frame = frame; + ed->last_iso = frame + ed->interval * (size -1 ); } }else if (ed->type ==PIPE_ISOCHRONOUS ) {u16 next =ohci_frame_no (ohci) +1 ;u16 frame = ed->last_iso + ed->interval; +u16 length = ed->interval * (size -1 );/* Behind the scheduling threshold? */ if (unlikely (tick_before (frame, next))) { -/* USB_ISO_ASAP: Round up to the first available slot */ +/* URB_ISO_ASAP: Round up to the first available slot */ if (urb->transfer_flags &URB_ISO_ASAP ) { frame += (next - frame + ed->interval -1 ) & -ed->interval;/* -* Not ASAP: Use the next slot in the stream. If -* the entire URB falls before the threshold, fail. +* Not ASAP: Use the next slot in the stream, +* no matter what. */ }else { -if (tick_before (frame + ed->interval * - (urb->number_of_packets -1 ), next)) { - retval = -EXDEV ; -usb_hcd_unlink_urb_from_ep (hcd, urb); - goto fail; - } -/* * Some OHCI hardware doesn't handle late TDs * correctly. After retiring them it proceeds
@@ -251,9 +246,16 @@ static int ohci_urb_enqueue ( urb_priv->td_cnt =DIV_ROUND_UP ( (u16) (next - frame), ed->interval); +if (urb_priv->td_cnt >= urb_priv->length) { + ++urb_priv->td_cnt;/* Mark it */ +ohci_dbg (ohci,"iso underrun %p (%u+%u < %u)\n" , + urb, frame, length, + next); + } } } urb->start_frame = frame; + ed->last_iso = frame + length; }/* fill the TDs and link them to the ed; and
drivers/usb/host/ohci-q.c +22 -4
@@ -41,9 +41,13 @@ finish_urb(struct ohci_hcd *ohci, struct urb *urb, int status) __releases(ohci->lock) __acquires(ohci->lock) { -struct device *dev =ohci_to_hcd (ohci)->self.controller; +struct device *dev =ohci_to_hcd (ohci)->self.controller; +struct usb_host_endpoint *ep = urb->ep; +struct urb_priv *urb_priv; +// ASSERT (urb->hcpriv != 0); + restart:urb_free_priv (ohci, urb->hcpriv); urb->hcpriv =NULL ;if (likely (status == -EINPROGRESS ))
@@ -80,6 +84,21 @@ __acquires(ohci->lock) ohci->hc_control &= ~(OHCI_CTRL_PLE |OHCI_CTRL_IE );ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); } + +/* +* An isochronous URB that is sumitted too late won't have any TDs +* (marked by the fact that the td_cnt value is larger than the +* actual number of TDs). If the next URB on this endpoint is like +* that, give it back now. +*/ +if (!list_empty (&ep->urb_list)) { + urb = list_first_entry(&ep->urb_list, struct urb, urb_list); + urb_priv = urb->hcpriv; +if (urb_priv->td_cnt > urb_priv->length) { + status =0 ; + goto restart; + } + } }
@@ -546,7 +565,6 @@ td_fill (struct ohci_hcd *ohci, u32 info, td->hwCBP =cpu_to_hc32 (ohci, data &0xFFFFF000 ); *ohci_hwPSWp (ohci, td,0 ) =cpu_to_hc16 (ohci, (data &0x0FFF ) |0xE000 ); - td->ed->last_iso = info &0xffff ; }else { td->hwCBP =cpu_to_hc32 (ohci, data); }
@@ -996,7 +1014,7 @@ rescan_this: urb_priv->td_cnt++;/* if URB is done, clean up */ -if (urb_priv->td_cnt == urb_priv->length) { +if (urb_priv->td_cnt >= urb_priv->length) { modified = completed =1 ;finish_urb (ohci, urb,0 ); }
@@ -1086,7 +1104,7 @@ static void takeback_td(struct ohci_hcd *ohci, struct td *td) urb_priv->td_cnt++;/* If all this urb's TDs are done, call complete() */ -if (urb_priv->td_cnt == urb_priv->length) +if (urb_priv->td_cnt >= urb_priv->length)finish_urb (ohci, urb, status);/* clean schedule: unlink EDs that are no longer busy */
drivers/usb/host/uhci-pci.c +1 -1
@@ -293,7 +293,7 @@ static struct pci_driver uhci_pci_driver = { .remove = usb_hcd_pci_remove, .shutdown = uhci_shutdown, -#ifdef CONFIG_PM_SLEEP +#ifdef CONFIG_PM .driver = { .pm = &usb_hcd_pci_pm_ops },
drivers/usb/host/uhci-q.c +8 -4
@@ -1303,7 +1303,7 @@ static int uhci_submit_isochronous(struct uhci_hcd *uhci, struct urb *urb, }/* Fell behind? */ -if (uhci_frame_before_eq (frame, next)) { +if (!uhci_frame_before_eq (next, frame)) {/* USB_ISO_ASAP: Round up to the first available slot */ if (urb->transfer_flags &URB_ISO_ASAP )
@@ -1311,13 +1311,17 @@ static int uhci_submit_isochronous(struct uhci_hcd *uhci, struct urb *urb, -qh->period;/* -* Not ASAP: Use the next slot in the stream. If -* the entire URB falls before the threshold, fail. +* Not ASAP: Use the next slot in the stream, +* no matter what. */ else if (!uhci_frame_before_eq(next, frame + (urb->number_of_packets - 1) * qh->period)) - return -EXDEV; + dev_dbg(uhci_dev(uhci), "iso underrun %p (%u+%u < %u)\n", + urb, frame, + (urb->number_of_packets -1 ) * + qh->period, + next); } }
drivers/usb/host/xhci-hub.c +1 -1
@@ -286,7 +286,7 @@ static int xhci_stop_device(struct xhci_hcd *xhci, int slot_id, int suspend)if (virt_dev->eps[i].ring && virt_dev->eps[i].ring->dequeue)xhci_queue_stop_endpoint (xhci, slot_id, i, suspend); } - cmd->command_trb = xhci->cmd_ring->enqueue; + cmd->command_trb =xhci_find_next_enqueue (xhci->cmd_ring);list_add_tail (&cmd->cmd_list, &virt_dev->cmd_list);xhci_queue_stop_endpoint (xhci, slot_id,0 , suspend);xhci_ring_cmd_db (xhci);
drivers/usb/host/xhci-pci.c +1 -1
@@ -345,7 +345,7 @@ static struct pci_driver xhci_pci_driver = {/* suspend and resume implemented later */ .shutdown = usb_hcd_pci_shutdown, -#ifdef CONFIG_PM_SLEEP +#ifdef CONFIG_PM .driver = { .pm = &usb_hcd_pci_pm_ops },
drivers/usb/host/xhci-ring.c +22 -2
@@ -122,6 +122,16 @@ static int enqueue_is_link_trb(struct xhci_ring *ring)return TRB_TYPE_LINK_LE32 (link->control); } +union xhci_trb *xhci_find_next_enqueue (struct xhci_ring *ring) +{ +/* Enqueue pointer can be left pointing to the link TRB, +* we must handle that +*/ +if (TRB_TYPE_LINK_LE32 (ring->enqueue->link.control)) +return ring->enq_seg->next->trbs; +return ring->enqueue; +} +/* Updates trb to point to the next TRB in the ring, and updates seg if the next * TRB is in a new segment. This does not skip over link TRBs, and it does not * effect the ring dequeue or enqueue pointers.
@@ -847,8 +857,12 @@ remove_finished_td:/* Otherwise ring the doorbell(s) to restart queued transfers */ ring_doorbell_for_active_rings (xhci, slot_id, ep_index); } - ep->stopped_td =NULL ; - ep->stopped_trb =NULL ; + +/* Clear stopped_td and stopped_trb if endpoint is not halted */ +if (!(ep->ep_state &EP_HALTED )) { + ep->stopped_td =NULL ; + ep->stopped_trb =NULL ; + }/* * Drop the lock and complete the URBs in the cancelled TD list.
@@ -1390,6 +1404,12 @@ static void handle_cmd_completion(struct xhci_hcd *xhci,inc_deq (xhci, xhci->cmd_ring);return ; } +/* There is no command to handle if we get a stop event when the +* command ring is empty, event->cmd_trb points to the next +* unset command +*/ +if (xhci->cmd_ring->dequeue == xhci->cmd_ring->enqueue) +return ; } switch (le32_to_cpu(xhci->cmd_ring->dequeue->generic.field[3])
drivers/usb/host/xhci.c +5 -20
@@ -2635,15 +2635,7 @@ static int xhci_configure_endpoint(struct xhci_hcd *xhci,if (command) { cmd_completion = command->completion; cmd_status = &command->status; - command->command_trb = xhci->cmd_ring->enqueue; - -/* Enqueue pointer can be left pointing to the link TRB, -* we must handle that -*/ -if (TRB_TYPE_LINK_LE32 (command->command_trb->link.control)) - command->command_trb = - xhci->cmd_ring->enq_seg->next->trbs; - + command->command_trb =xhci_find_next_enqueue (xhci->cmd_ring);list_add_tail (&command->cmd_list, &virt_dev->cmd_list); }else { cmd_completion = &virt_dev->cmd_completion;
@@ -2651,7 +2643,7 @@ static int xhci_configure_endpoint(struct xhci_hcd *xhci, }init_completion (cmd_completion); - cmd_trb = xhci->cmd_ring->dequeue; + cmd_trb =xhci_find_next_enqueue (xhci->cmd_ring);if (!ctx_change) ret =xhci_queue_configure_endpoint (xhci, in_ctx->dma, udev->slot_id, must_succeed);
@@ -3468,14 +3460,7 @@ int xhci_discover_or_reset_device(struct usb_hcd *hcd, struct usb_device *udev)/* Attempt to submit the Reset Device command to the command ring */ spin_lock_irqsave (&xhci->lock, flags); - reset_device_cmd->command_trb = xhci->cmd_ring->enqueue; - -/* Enqueue pointer can be left pointing to the link TRB, -* we must handle that -*/ -if (TRB_TYPE_LINK_LE32 (reset_device_cmd->command_trb->link.control)) - reset_device_cmd->command_trb = - xhci->cmd_ring->enq_seg->next->trbs; + reset_device_cmd->command_trb =xhci_find_next_enqueue (xhci->cmd_ring);list_add_tail (&reset_device_cmd->cmd_list, &virt_dev->cmd_list); ret =xhci_queue_reset_device (xhci, slot_id);
@@ -3679,7 +3664,7 @@ int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev)union xhci_trb *cmd_trb;spin_lock_irqsave (&xhci->lock, flags); - cmd_trb = xhci->cmd_ring->dequeue; + cmd_trb =xhci_find_next_enqueue (xhci->cmd_ring); ret =xhci_queue_slot_control (xhci,TRB_ENABLE_SLOT ,0 );if (ret) {spin_unlock_irqrestore (&xhci->lock, flags);
@@ -3811,7 +3796,7 @@ int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev)xhci_dbg_ctx (xhci, virt_dev->in_ctx,2 );spin_lock_irqsave (&xhci->lock, flags); - cmd_trb = xhci->cmd_ring->dequeue; + cmd_trb =xhci_find_next_enqueue (xhci->cmd_ring); ret =xhci_queue_address_device (xhci, virt_dev->in_ctx->dma, udev->slot_id);if (ret) {
drivers/usb/host/xhci.h +1 -0
@@ -1851,6 +1851,7 @@ int xhci_cancel_cmd(struct xhci_hcd *xhci, struct xhci_command *command, union xhci_trb *cmd_trb);void xhci_ring_ep_doorbell (struct xhci_hcd *xhci,unsigned int slot_id,unsigned int ep_index,unsigned int stream_id); +union xhci_trb *xhci_find_next_enqueue (struct xhci_ring *ring);/* xHCI roothub code */ void xhci_set_link_state(struct xhci_hcd *xhci, __le32 __iomem **port_array,
fs/bio.c +2 -2
@@ -917,8 +917,8 @@ void bio_copy_data(struct bio *dst, struct bio *src) src_p =kmap_atomic (src_bv->bv_page); dst_p =kmap_atomic (dst_bv->bv_page); -memcpy (dst_p + dst_bv->bv_offset, - src_p + src_bv->bv_offset, +memcpy (dst_p + dst_offset, + src_p + src_offset, bytes);kunmap_atomic (dst_p);
fs/sysv/super.c +1 -0
@@ -487,6 +487,7 @@ static int v7_fill_super(struct super_block *sb, void *data, int silent) sbi->s_sb = sb; sbi->s_block_base =0 ; sbi->s_type =FSTYPE_V7 ; +mutex_init (&sbi->s_lock); sb->s_fs_info = sbi;sb_set_blocksize (sb,512 );
include/linux/device-mapper.h +2 -1
@@ -405,13 +405,14 @@ int dm_noflush_suspending(struct dm_target *ti);union map_info *dm_get_mapinfo (struct bio *bio);union map_info *dm_get_rq_mapinfo (struct request *rq); +struct queue_limits *dm_get_queue_limits (struct mapped_device *md); +/* * Geometry functions. */ int dm_get_geometry (struct mapped_device *md,struct hd_geometry *geo);int dm_set_geometry (struct mapped_device *md,struct hd_geometry *geo); -/*----------------------------------------------------------------- * Functions for manipulating device-mapper tables. *---------------------------------------------------------------*/
kernel/Makefile +1 -1
@@ -79,7 +79,7 @@ obj-$(CONFIG_KPROBES) += kprobes.o obj-$(CONFIG_KGDB) += debug/ obj-$(CONFIG_DETECT_HUNG_TASK) += hung_task.o obj-$(CONFIG_LOCKUP_DETECTOR) += watchdog.o -obj-$(CONFIG_GENERIC_HARDIRQS) += irq/ +obj-y += irq/ obj-$(CONFIG_SECCOMP) += seccomp.o obj-$(CONFIG_RCU_TORTURE_TEST) += rcutorture.o obj-$(CONFIG_TREE_RCU) += rcutree.o
kernel/irq/Makefile +4 -2
@@ -1,8 +1,10 @@ - -obj-y := irqdesc.o handle.o manage.o spurious.o resend.o chip.o dummychip.o devres.o +obj-y += devres.o +ifdef CONFIG_GENERIC_HARDIRQS +obj-y += irqdesc.o handle.o manage.o spurious.o resend.o chip.o dummychip.o obj-$(CONFIG_GENERIC_IRQ_CHIP) += generic-chip.o obj-$(CONFIG_GENERIC_IRQ_PROBE) += autoprobe.o obj-$(CONFIG_IRQ_DOMAIN) += irqdomain.o obj-$(CONFIG_PROC_FS) += proc.o obj-$(CONFIG_GENERIC_PENDING_IRQ) += migration.o obj-$(CONFIG_PM_SLEEP) += pm.o +endif
kernel/reboot.c +8 -1
@@ -32,7 +32,14 @@ EXPORT_SYMBOL(cad_pid);#endif enum reboot_mode reboot_mode DEFAULT_REBOOT_MODE; -int reboot_default; +/* +* This variable is used privately to keep track of whether or not +* reboot_type is still set to its default value (i.e., reboot= hasn't +* been set on the command line). This is needed so that we can +* suppress DMI scanning for reboot quirks. Without it, it's +* impossible to override a faulty reboot quirk without recompiling. +*/ +int reboot_default =1 ;int reboot_cpu;enum reboot_type reboot_type =BOOT_ACPI ;int reboot_force;
sound/core/compress_offload.c +2 -1
@@ -837,7 +837,8 @@ static int snd_compress_dev_disconnect(struct snd_device *device)struct snd_compr *compr; compr = device->device_data; -snd_unregister_device (compr->direction, compr->card, compr->device); +snd_unregister_device (SNDRV_DEVICE_TYPE_COMPRESS , compr->card, + compr->device);return 0 ; }
tools/lib/lk/debugfs.c +0 -1
@@ -5,7 +5,6 @@#include <stdbool.h> #include <sys/vfs.h> #include <sys/mount.h> -#include <linux/magic.h> #include <linux/kernel.h> #include "debugfs.h"