Linux 4.14.88
Greg KH
maintainerI'm announcing the release of the 4.14.88 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.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/probes/kprobes/opt-arm.c | 2 drivers/dma/cppi41.c | 16 drivers/dma/dw/core.c | 6 drivers/gpio/gpio-mockup.c | 6 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 35 + drivers/hid/hid-ids.h | 4 drivers/hid/hid-input.c | 3 drivers/hid/hid-multitouch.c | 6 drivers/hv/channel_mgmt.c | 185 ++++++---- drivers/hv/connection.c | 24 + drivers/hv/hyperv_vmbus.h | 7 drivers/iommu/amd_iommu_init.c | 3 drivers/iommu/intel-iommu.c | 2 drivers/iommu/intel-svm.c | 2 drivers/iommu/ipmmu-vmsa.c | 3 drivers/media/platform/omap3isp/isp.c | 3 drivers/mtd/nand/qcom_nandc.c | 32 - drivers/mtd/spi-nor/cadence-quadspi.c | 19 - drivers/net/can/rcar/rcar_can.c | 5 drivers/net/ethernet/amd/sunlance.c | 4 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 7 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c | 1 drivers/net/ethernet/faraday/ftmac100.c | 7 drivers/net/ethernet/ibm/ibmvnic.c | 4 drivers/net/ethernet/mellanox/mlx4/alloc.c | 2 drivers/net/ethernet/mellanox/mlx4/mlx4.h | 4 drivers/net/ethernet/mellanox/mlx4/mr.c | 1 drivers/net/ethernet/qlogic/qed/qed_dev.c | 29 + drivers/net/ethernet/qlogic/qed/qed_int.c | 2 drivers/net/ethernet/qlogic/qed/qed_main.c | 2 drivers/net/team/team.c | 2 drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c | 3 drivers/net/wireless/mac80211_hwsim.c | 8 drivers/nvdimm/nd-core.h | 2 drivers/nvdimm/pfn_devs.c | 64 ++- drivers/nvdimm/region_devs.c | 41 ++ drivers/s390/virtio/virtio_ccw.c | 17 drivers/staging/lustre/lnet/lnet/config.c | 3 drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c | 4 drivers/staging/rtl8712/mlme_linux.c | 2 drivers/staging/rtl8712/rtl871x_mlme.c | 2 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 drivers/tty/serial/8250/8250_mtk.c | 16 drivers/tty/serial/kgdboc.c | 4 drivers/tty/tty_port.c | 3 drivers/usb/core/hub.c | 2 drivers/usb/core/quirks.c | 4 drivers/usb/core/usb.c | 6 drivers/usb/gadget/function/f_fs.c | 26 - drivers/usb/host/hwa-hc.c | 2 drivers/usb/host/xhci-pci.c | 4 drivers/usb/host/xhci.c | 42 ++ drivers/usb/host/xhci.h | 3 drivers/usb/misc/appledisplay.c | 1 drivers/vhost/vsock.c | 57 +-- fs/cifs/dir.c | 2 fs/f2fs/data.c | 3 fs/f2fs/inode.c | 18 fs/nfs/flexfilelayout/flexfilelayout.c | 21 - fs/nfs/flexfilelayout/flexfilelayout.h | 4 fs/nfs/flexfilelayout/flexfilelayoutdev.c | 19 + include/linux/hyperv.h | 7 include/linux/usb.h | 4 include/sound/pcm_params.h | 4 lib/swiotlb.c | 20 - lib/test_firmware.c | 1 mm/page_alloc.c | 10 net/batman-adv/bat_v_elp.c | 6 net/batman-adv/fragmentation.c | 2 net/mac80211/iface.c | 2 net/mac80211/rx.c | 1 net/mac80211/status.c | 2 net/mac80211/tx.c | 4 net/sunrpc/auth_gss/auth_gss.c | 4 sound/core/pcm_native.c | 14 sound/pci/hda/hda_intel.c | 4 sound/pci/hda/patch_realtek.c | 9 sound/usb/card.c | 5 80 files changed, 639 insertions(+), 277 deletions(-)
Alex Deucher (1):
drm/amdgpu/gmc8: update MC firmware for polaris
Alexander Theissen (1):
usb: appledisplay: Add 27" Apple Cinema Display
Andy Shevchenko (1):
dmaengine: dw: Fix FIFO size for Intel Merrifield
Aya Levin (1):
net/mlx4: Fix UBSAN warning of signed integer overflow
Bartosz Golaszewski (1):
gpio: mockup: fix indicated direction
Ben Greear (1):
mac80211: Clear beacon_int in ieee80211_do_stop
Benson Leung (1):
HID: input: Ignore battery reported by Symbol DS4308
Bin Liu (1):
dmaengine: cppi41: delete channel from pending list when stop channel
Chanho Min (1):
ALSA: pcm: Fix starvation on down_write_nonblock()
Chanho Park (1):
tty: do not set TTY_IO_ERROR flag if console port
Chao Yu (1):
f2fs: fix to do sanity check with block address in main area v2
Chuck Lever (1):
SUNRPC: Fix leak of krb5p encode pages
Colin Ian King (1):
test_firmware: fix error return getting clobbered
Dan Williams (1):
libnvdimm, pfn: Pad pfn namespaces relative to other regions
Denis Bolotin (4):
qed: Fix PTT leak in qed_drain()
qed: Fix reading wrong value in loop condition
qed: Fix bitmap_weight() check
qed: Fix QM getters to always return a valid pq
Dexuan Cui (1):
Drivers: hv: vmbus: Offload the handling of channels to two workqueues
Emmanuel Grumbach (1):
mac80211: ignore NullFunc frames in the duplicate detection
Fabrizio Castro (1):
can: rcar_can: Fix erroneous registration
Felix Fietkau (2):
mac80211: ignore tx status for PS stations in ieee80211_tx_status_ext
mac80211: fix reordering of buffered broadcast packets
Filippo Sironi (1):
amd/iommu: Fix Guest Virtual APIC Log Tail Address Register
Geert Uytterhoeven (1):
iommu/ipmmu-vmsa: Fix crash on early domain free
Greg Kroah-Hartman (3):
Staging: lustre: remove two build warnings
staging: atomisp: remove "fun" strncpy warning Linux 4.14.88
Halil Pasic (2):
virtio/s390: avoid race on vcdev->config
virtio/s390: fix race in ccw_io_helper()
Hangbin Liu (1):
team: no need to do team_notify_peers or team_mcast_rejoin when disabling port
Harry Pan (1):
usb: quirk: add no-LPM quirk on SanDisk Ultra Flair device
Hui Peng (1):
ALSA: usb-audio: Fix UAF decrement if card has no live interfaces in card.c
Jack Morgenstein (1):
net/mlx4_core: Zero out lkey field in SW2HW_MPT fw command
Junwei Zhang (1):
drm/amdgpu: update mc firmware image for polaris12 variants
Kai-Heng Feng (2):
HID: multitouch: Add pointstick support for Cirque Touchpad
ALSA: hda: Add support for AMD Stoney Ridge
Kees Cook (2):
ARM: 8806/1: kprobes: Fix false positive with FORTIFY_SOURCE
swiotlb: clean up reporting
Lu Baolu (1):
iommu/vt-d: Fix NULL pointer dereference in prq_event_thread()
Macpaul Lin (1):
kgdboc: fix KASAN global-out-of-bounds bug in param_set_kgdboc_var()
Mathias Nyman (1):
xhci: Prevent U1/U2 link pm states if exit latency is too long
Mathias Payer (1):
USB: check usb_get_extra_descriptor for proper size
Olof Johansson (1):
mtd: rawnand: qcom: Namespace prefix some commands
Pan Bian (1):
iommu/vt-d: Use memunmap to free memremap
Paulo Alcantara (1):
cifs: Fix separator when building path from dentry
Peter Shih (1):
tty: serial: 8250_mtk: always resume the device in probe.
Rafał Miłecki (1):
brcmutil: really fix decoding channel info for 160 MHz bandwidth
Sakari Ailus (1):
media: omap3isp: Unregister media device as first
Sandeep Singh (1):
xhci: workaround CSS timeout on AMD SNPS 3.0 xHC
Shen Jing (1):
Revert "usb: gadget: ffs: Fix BUG when userland exits with submitted AIO transfers"
Stefan Hajnoczi (1):
vhost/vsock: fix use-after-free in network stack callers
Sudarsana Reddy Kalluru (1):
bnx2x: Assign unique DMAE channel number for FW DMAE transactions.
Sven Eckelmann (2):
batman-adv: Use explicit tvlv padding for ELP packets
batman-adv: Expand merged fragment buffer for full packet
Takashi Iwai (3):
ALSA: pcm: Call snd_pcm_unlink() conditionally at closing
ALSA: pcm: Fix interval evaluation with openmin/max
ALSA: hda/realtek - Fix speaker output regression on Thinkpad T570
Tariq Toukan (1):
net/mlx4_core: Fix uninitialized variable compilation warning
Tetsuo Handa (1):
mm: don't warn about allocations which stall for too long
Thomas Falcon (1):
ibmvnic: Fix RX queue buffer cleanup
Thor Thayer (1):
mtd: spi-nor: Fix Cadence QSPI page fault kernel panic
Tigran Mkrtchyan (1):
flexfiles: use per-mirror specified stateid for IO
Vasyl Vavrychuk (1):
mac80211_hwsim: Timer should be initialized before device registered
Vincent Chen (1):
net: faraday: ftmac100: remove netif_running(netdev) check before disabling interrupts
Yangtao Li (1):
net: amd: add missing of_node_put()
Young Xiao (2):
staging: rtl8712: Fix possible buffer overrun
Revert commit ef9209b642f "staging: rtl8723bs: Fix indenting errors and an off-by-one mistake in core/rtw_mlme_ext.c"
Greg KH
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 87 +SUBLEVEL = 88 EXTRAVERSION = NAME = Petit Gorille
arch/arm/probes/kprobes/opt-arm.c +1 -1
@@ -247,7 +247,7 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op, struct kprobe *or }/* Copy arch-dep-instance from template. */ -memcpy (code, &optprobe_template_entry, +memcpy (code, (unsigned char *)optprobe_template_entry,TMPL_END_IDX *sizeof (kprobe_opcode_t));/* Adjust buffer according to instruction. */
drivers/dma/cppi41.c +15 -1
@@ -723,8 +723,22 @@ static int cppi41_stop_chan(struct dma_chan *chan) desc_phys =lower_32_bits (c->desc_phys); desc_num = (desc_phys - cdd->descs_phys) /sizeof (struct cppi41_desc ); -if (!cdd->chan_busy[desc_num]) +if (!cdd->chan_busy[desc_num]) { +struct cppi41_channel *cc, *_ct; + +/* +* channels might still be in the pendling list if +* cppi41_dma_issue_pending() is called after +* cppi41_runtime_suspend() is called +*/ +list_for_each_entry_safe (cc, _ct, &cdd->pending, node) { +if (cc != c) +continue ; +list_del (&cc->node); +break ; + }return 0 ; + } ret =cppi41_tear_down_chan (c);if (ret)
drivers/dma/dw/core.c +3 -3
@@ -1064,12 +1064,12 @@ static void dwc_issue_pending(struct dma_chan *chan)/* * Program FIFO size of channels. * -* By default full FIFO (1024 bytes) is assigned to channel 0. Here we +* By default full FIFO (512 bytes) is assigned to channel 0. Here we * slice FIFO on equal parts between channels. */ static void idma32_fifo_partition (struct dw_dma *dw) { -u64 value =IDMA32C_FP_PSIZE_CH0 (128 ) |IDMA32C_FP_PSIZE_CH1 (128 ) | +u64 value =IDMA32C_FP_PSIZE_CH0 (64 ) |IDMA32C_FP_PSIZE_CH1 (64 ) |IDMA32C_FP_UPDATE ;u64 fifo_partition =0 ;
@@ -1082,7 +1082,7 @@ static void idma32_fifo_partition(struct dw_dma *dw)/* Fill FIFO_PARTITION high bits (Channels 2..3, 6..7) */ fifo_partition |= value <<32 ; -/* Program FIFO Partition registers - 128 bytes for each channel */ +/* Program FIFO Partition registers - 64 bytes per channel */ idma32_writeq (dw,FIFO_PARTITION1 , fifo_partition);idma32_writeq (dw,FIFO_PARTITION0 , fifo_partition); }
drivers/gpio/gpio-mockup.c +3 -3
@@ -35,8 +35,8 @@#define GPIO_MOCKUP_MAX_RANGES (GPIO_MOCKUP_MAX_GC * 2)enum { -GPIO_MOCKUP_DIR_OUT =0 , -GPIO_MOCKUP_DIR_IN =1 , +GPIO_MOCKUP_DIR_IN =0 , +GPIO_MOCKUP_DIR_OUT =1 , };/*
@@ -112,7 +112,7 @@ static int gpio_mockup_get_direction(struct gpio_chip *gc, unsigned int offset) {struct gpio_mockup_chip *chip =gpiochip_get_data (gc); -return chip->lines[offset].dir; +return !chip->lines[offset].dir; } static int gpio_mockup_name_lines(struct device *dev,
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +32 -3
@@ -52,6 +52,9 @@ MODULE_FIRMWARE("amdgpu/tonga_mc.bin");MODULE_FIRMWARE ("amdgpu/polaris11_mc.bin" );MODULE_FIRMWARE ("amdgpu/polaris10_mc.bin" );MODULE_FIRMWARE ("amdgpu/polaris12_mc.bin" ); +MODULE_FIRMWARE ("amdgpu/polaris11_k_mc.bin" ); +MODULE_FIRMWARE ("amdgpu/polaris10_k_mc.bin" ); +MODULE_FIRMWARE ("amdgpu/polaris12_k_mc.bin" );static const u32 golden_settings_tonga_a11[] = {
@@ -219,13 +222,39 @@ static int gmc_v8_0_init_microcode(struct amdgpu_device *adev) chip_name ="tonga" ;break ;case CHIP_POLARIS11 : - chip_name ="polaris11" ; +if (((adev->pdev->device ==0x67ef ) && + ((adev->pdev->revision ==0xe0 ) || + (adev->pdev->revision ==0xe5 ))) || + ((adev->pdev->device ==0x67ff ) && + ((adev->pdev->revision ==0xcf ) || + (adev->pdev->revision ==0xef ) || + (adev->pdev->revision ==0xff )))) + chip_name ="polaris11_k" ; +else if ((adev->pdev->device ==0x67ef ) && + (adev->pdev->revision ==0xe2 )) + chip_name ="polaris11_k" ; +else + chip_name ="polaris11" ;break ;case CHIP_POLARIS10 : - chip_name ="polaris10" ; +if ((adev->pdev->device ==0x67df ) && + ((adev->pdev->revision ==0xe1 ) || + (adev->pdev->revision ==0xf7 ))) + chip_name ="polaris10_k" ; +else + chip_name ="polaris10" ;break ;case CHIP_POLARIS12 : - chip_name ="polaris12" ; +if (((adev->pdev->device ==0x6987 ) && + ((adev->pdev->revision ==0xc0 ) || + (adev->pdev->revision ==0xc3 ))) || + ((adev->pdev->device ==0x6981 ) && + ((adev->pdev->revision ==0x00 ) || + (adev->pdev->revision ==0x01 ) || + (adev->pdev->revision ==0x10 )))) + chip_name ="polaris12_k" ; +else + chip_name ="polaris12" ;break ;case CHIP_FIJI :case CHIP_CARRIZO :
drivers/hid/hid-ids.h +4 -0
@@ -266,6 +266,9 @@#define USB_VENDOR_ID_CIDC 0x1677 +#define I2C_VENDOR_ID_CIRQUE 0x0488 +#define I2C_PRODUCT_ID_CIRQUE_121F 0x121F +#define USB_VENDOR_ID_CJTOUCH 0x24b8#define USB_DEVICE_ID_CJTOUCH_MULTI_TOUCH_0020 0x0020#define USB_DEVICE_ID_CJTOUCH_MULTI_TOUCH_0040 0x0040
@@ -1001,6 +1004,7 @@#define USB_VENDOR_ID_SYMBOL 0x05e0#define USB_DEVICE_ID_SYMBOL_SCANNER_1 0x0800#define USB_DEVICE_ID_SYMBOL_SCANNER_2 0x1300 +#define USB_DEVICE_ID_SYMBOL_SCANNER_3 0x1200#define USB_VENDOR_ID_SYNAPTICS 0x06cb#define USB_DEVICE_ID_SYNAPTICS_TP 0x0001
drivers/hid/hid-input.c +3 -0
@@ -325,6 +325,9 @@ static const struct hid_device_id hid_battery_quirks[] = { {HID_BLUETOOTH_DEVICE (USB_VENDOR_ID_ELECOM ,USB_DEVICE_ID_ELECOM_BM084 ), HID_BATTERY_QUIRK_IGNORE }, + { HID_USB_DEVICE(USB_VENDOR_ID_SYMBOL, +USB_DEVICE_ID_SYMBOL_SCANNER_3 ), + HID_BATTERY_QUIRK_IGNORE }, {} };
drivers/hid/hid-multitouch.c +6 -0
@@ -1474,6 +1474,12 @@ static const struct hid_device_id mt_devices[] = { MT_USB_DEVICE(USB_VENDOR_ID_CHUNGHWAT, USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH) }, +/* Cirque devices */ + { .driver_data = MT_CLS_WIN_8_DUAL, +HID_DEVICE (BUS_I2C ,HID_GROUP_MULTITOUCH_WIN_8 , +I2C_VENDOR_ID_CIRQUE , + I2C_PRODUCT_ID_CIRQUE_121F) }, + /* CJTouch panels */ { .driver_data = MT_CLS_NSMU, MT_USB_DEVICE(USB_VENDOR_ID_CJTOUCH,
drivers/hv/channel_mgmt.c +125 -60
246 lines not on this page · raw message
drivers/hv/connection.c +21 -3
@@ -161,6 +161,20 @@ int vmbus_connect(void) goto cleanup; } + vmbus_connection.handle_primary_chan_wq = +create_workqueue ("hv_pri_chan" ); +if (!vmbus_connection.handle_primary_chan_wq) { + ret = -ENOMEM ; + goto cleanup; + } + + vmbus_connection.handle_sub_chan_wq = +create_workqueue ("hv_sub_chan" ); +if (!vmbus_connection.handle_sub_chan_wq) { + ret = -ENOMEM ; + goto cleanup; + } +INIT_LIST_HEAD (&vmbus_connection.chn_msg_list);spin_lock_init (&vmbus_connection.channelmsg_lock);
@@ -251,10 +265,14 @@ void vmbus_disconnect(void)*/ vmbus_initiate_unload (false); -if (vmbus_connection.work_queue) { -drain_workqueue (vmbus_connection.work_queue); +if (vmbus_connection.handle_sub_chan_wq) +destroy_workqueue (vmbus_connection.handle_sub_chan_wq); + +if (vmbus_connection.handle_primary_chan_wq) +destroy_workqueue (vmbus_connection.handle_primary_chan_wq); + +if (vmbus_connection.work_queue)destroy_workqueue (vmbus_connection.work_queue); - }if (vmbus_connection.int_page) {free_pages ((unsigned long )vmbus_connection.int_page,0 );
drivers/hv/hyperv_vmbus.h +7 -0
@@ -327,7 +327,14 @@ struct vmbus_connection {struct list_head chn_list;struct mutex channel_mutex; +/* +* An offer message is handled first on the work_queue, and then +* is further handled on handle_primary_chan_wq or +* handle_sub_chan_wq. +*/ struct workqueue_struct *work_queue; +struct workqueue_struct *handle_primary_chan_wq; +struct workqueue_struct *handle_sub_chan_wq; };
drivers/iommu/amd_iommu_init.c +2 -1
@@ -796,7 +796,8 @@ static int iommu_init_ga_log(struct amd_iommu *iommu) entry =iommu_virt_to_phys (iommu->ga_log) |GA_LOG_SIZE_512 ;memcpy_toio (iommu->mmio_base +MMIO_GA_LOG_BASE_OFFSET , &entry,sizeof (entry)); - entry = (iommu_virt_to_phys (iommu->ga_log) &0xFFFFFFFFFFFFFULL ) & ~7ULL ; + entry = (iommu_virt_to_phys (iommu->ga_log_tail) & + (BIT_ULL (52 )-1 )) & ~7ULL ;memcpy_toio (iommu->mmio_base +MMIO_GA_LOG_TAIL_OFFSET , &entry,sizeof (entry));writel (0x00 , iommu->mmio_base +MMIO_GA_HEAD_OFFSET );
drivers/iommu/intel-iommu.c +1 -1
@@ -3086,7 +3086,7 @@ static int copy_context_table(struct intel_iommu *iommu, }if (old_ce) -iounmap (old_ce); +memunmap (old_ce); ret =0 ;if (devfn <0x80 )
drivers/iommu/intel-svm.c +1 -1
@@ -589,7 +589,7 @@ static irqreturn_t prq_event_thread(int irq, void *d)pr_err ("%s: Page request without PASID: %08llx %08llx\n" , iommu->name, ((unsigned long long *)req)[0 ], ((unsigned long long *)req)[1 ]); - goto bad_req; + goto no_pasid; }if (!svm || svm->pasid != req->pasid) {
drivers/iommu/ipmmu-vmsa.c +3 -0
@@ -424,6 +424,9 @@ static int ipmmu_domain_init_context(struct ipmmu_vmsa_domain *domain)static void ipmmu_domain_destroy_context (struct ipmmu_vmsa_domain *domain) { +if (!domain->mmu) +return ; +/* * Disable the context. Flush the TLB as required when modifying the * context registers.
drivers/media/platform/omap3isp/isp.c +2 -1
@@ -1592,6 +1592,8 @@ static void isp_pm_complete(struct device *dev)static void isp_unregister_entities (struct isp_device *isp) { +media_device_unregister (&isp->media_dev); +omap3isp_csi2_unregister_entities (&isp->isp_csi2a);omap3isp_ccp2_unregister_entities (&isp->isp_ccp2);omap3isp_ccdc_unregister_entities (&isp->isp_ccdc);
@@ -1602,7 +1604,6 @@ static void isp_unregister_entities(struct isp_device *isp)omap3isp_stat_unregister_entities (&isp->isp_hist);v4l2_device_unregister (&isp->v4l2_dev); -media_device_unregister (&isp->media_dev);media_device_cleanup (&isp->media_dev); }
drivers/mtd/nand/qcom_nandc.c +16 -16
@@ -149,15 +149,15 @@#define NAND_VERSION_MINOR_SHIFT 16/* NAND OP_CMDs */ -#define PAGE_READ 0x2 -#define PAGE_READ_WITH_ECC 0x3 -#define PAGE_READ_WITH_ECC_SPARE 0x4 -#define PROGRAM_PAGE 0x6 -#define PAGE_PROGRAM_WITH_ECC 0x7 -#define PROGRAM_PAGE_SPARE 0x9 -#define BLOCK_ERASE 0xa -#define FETCH_ID 0xb -#define RESET_DEVICE 0xd +#define OP_PAGE_READ 0x2 +#define OP_PAGE_READ_WITH_ECC 0x3 +#define OP_PAGE_READ_WITH_ECC_SPARE 0x4 +#define OP_PROGRAM_PAGE 0x6 +#define OP_PAGE_PROGRAM_WITH_ECC 0x7 +#define OP_PROGRAM_PAGE_SPARE 0x9 +#define OP_BLOCK_ERASE 0xa +#define OP_FETCH_ID 0xb +#define OP_RESET_DEVICE 0xd/* Default Value for NAND_DEV_CMD_VLD */ #define NAND_DEV_CMD_VLD_VAL (READ_START_VLD | WRITE_START_VLD | \
@@ -629,11 +629,11 @@ static void update_rw_regs(struct qcom_nand_host *host, int num_cw, bool read)if (read) {if (host->use_ecc) - cmd =PAGE_READ_WITH_ECC |PAGE_ACC |LAST_PAGE ; + cmd =OP_PAGE_READ_WITH_ECC |PAGE_ACC |LAST_PAGE ;else - cmd =PAGE_READ |PAGE_ACC |LAST_PAGE ; + cmd =OP_PAGE_READ |PAGE_ACC |LAST_PAGE ; }else { - cmd =PROGRAM_PAGE |PAGE_ACC |LAST_PAGE ; + cmd =OP_PROGRAM_PAGE |PAGE_ACC |LAST_PAGE ; }if (host->use_ecc) {
@@ -1030,7 +1030,7 @@ static int nandc_param(struct qcom_nand_host *host)* in use. we configure the controller to perform a raw read of 512 * bytes to read onfi params */ -nandc_set_reg (nandc,NAND_FLASH_CMD ,PAGE_READ |PAGE_ACC |LAST_PAGE ); +nandc_set_reg (nandc,NAND_FLASH_CMD ,OP_PAGE_READ |PAGE_ACC |LAST_PAGE );nandc_set_reg (nandc,NAND_ADDR0 ,0 );nandc_set_reg (nandc,NAND_ADDR1 ,0 ); nandc_set_reg(nandc, NAND_DEV0_CFG0, 0 << CW_PER_PAGE
@@ -1084,7 +1084,7 @@ static int erase_block(struct qcom_nand_host *host, int page_addr)struct qcom_nand_controller *nandc =get_qcom_nand_controller (chip);nandc_set_reg (nandc,NAND_FLASH_CMD , -BLOCK_ERASE |PAGE_ACC |LAST_PAGE ); +OP_BLOCK_ERASE |PAGE_ACC |LAST_PAGE );nandc_set_reg (nandc,NAND_ADDR0 , page_addr);nandc_set_reg (nandc,NAND_ADDR1 ,0 ); nandc_set_reg(nandc, NAND_DEV0_CFG0,
@@ -1115,7 +1115,7 @@ static int read_id(struct qcom_nand_host *host, int column)if (column ==-1 )return 0 ; -nandc_set_reg (nandc,NAND_FLASH_CMD ,FETCH_ID ); +nandc_set_reg (nandc,NAND_FLASH_CMD ,OP_FETCH_ID );nandc_set_reg (nandc,NAND_ADDR0 , column);nandc_set_reg (nandc,NAND_ADDR1 ,0 ); nandc_set_reg(nandc, NAND_FLASH_CHIP_SELECT,
@@ -1136,7 +1136,7 @@ static int reset(struct qcom_nand_host *host)struct nand_chip *chip = &host->chip;struct qcom_nand_controller *nandc =get_qcom_nand_controller (chip); -nandc_set_reg (nandc,NAND_FLASH_CMD ,RESET_DEVICE ); +nandc_set_reg (nandc,NAND_FLASH_CMD ,OP_RESET_DEVICE );nandc_set_reg (nandc,NAND_EXEC_CMD ,1 );write_reg_dma (nandc,NAND_FLASH_CMD ,1 ,NAND_BAM_NEXT_SGL );
drivers/mtd/spi-nor/cadence-quadspi.c +16 -3
@@ -625,9 +625,23 @@ static int cqspi_indirect_write_execute(struct spi_nor *nor, reg_base + CQSPI_REG_INDIRECTWR);while (remaining >0 ) { +size_t write_words, mod_bytes; + write_bytes = remaining > page_size ? page_size : remaining; -iowrite32_rep (cqspi->ahb_base, txbuf, -DIV_ROUND_UP (write_bytes,4 )); + write_words = write_bytes /4 ; + mod_bytes = write_bytes %4 ; +/* Write 4 bytes at a time then single bytes. */ +if (write_words) { +iowrite32_rep (cqspi->ahb_base, txbuf, write_words); + txbuf += (write_words *4 ); + } +if (mod_bytes) { +unsigned int temp =0xFFFFFFFF ; + +memcpy (&temp, txbuf, mod_bytes); +iowrite32 (temp, cqspi->ahb_base); + txbuf += mod_bytes; + } ret =wait_for_completion_timeout (&cqspi->transfer_complete, msecs_to_jiffies
@@ -638,7 +652,6 @@ static int cqspi_indirect_write_execute(struct spi_nor *nor, goto failwr; } - txbuf += write_bytes; remaining -= write_bytes;if (remaining >0 )
drivers/net/can/rcar/rcar_can.c +4 -1
@@ -24,6 +24,9 @@#define RCAR_CAN_DRV_NAME "rcar_can" +#define RCAR_SUPPORTED_CLOCKS (BIT(CLKR_CLKP1) | BIT(CLKR_CLKP2) | \ + BIT(CLKR_CLKEXT)) +/* Mailbox configuration: * mailbox 60 - 63 - Rx FIFO mailboxes * mailbox 56 - 59 - Tx FIFO mailboxes
@@ -789,7 +792,7 @@ static int rcar_can_probe(struct platform_device *pdev) goto fail_clk; } -if (clock_select >=ARRAY_SIZE (clock_names)) { +if (!(BIT (clock_select) &RCAR_SUPPORTED_CLOCKS )) { err = -EINVAL ;dev_err (&pdev->dev,"invalid CAN clock selected\n" ); goto fail_clk;
drivers/net/ethernet/amd/sunlance.c +3 -1
@@ -1418,7 +1418,7 @@ static int sparc_lance_probe_one(struct platform_device *op, prop =of_get_property (nd,"tpe-link-test?" ,NULL );if (!prop) - goto no_link_test; + goto node_put;if (strcmp (prop,"true" )) { printk(KERN_NOTICE "SunLance: warning: overriding option "
@@ -1427,6 +1427,8 @@ static int sparc_lance_probe_one(struct platform_device *op, "to [email protected]\n");auxio_set_lte (AUXIO_LTE_ON ); } +node_put: +of_node_put (nd); no_link_test: lp->auto_select =1 ; lp->tpe =0 ;
drivers/net/ethernet/broadcom/bnx2x/bnx2x.h +7 -0
@@ -2187,6 +2187,13 @@ void bnx2x_igu_clear_sb_gen(struct bnx2x *bp, u8 func, u8 idu_sb_id,#define PMF_DMAE_C (bp) (BP_PORT(bp) * MAX_DMAE_C_PER_PORT + \ E1HVN_MAX) +/* Following is the DMAE channel number allocation for the clients. +* MFW: OCBB/OCSD implementations use DMAE channels 14/15 respectively. +* Driver: 0-3 and 8-11 (for PF dmae operations) +* 4 and 12 (for stats requests) +*/ +#define BNX2X_FW_DMAE_C 13/* Channel for FW DMAE operations */ +/* PCIE link and speed */ #define PCICFG_LINK_WIDTH 0x1f00000#define PCICFG_LINK_WIDTH_SHIFT 20
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c +1 -0
@@ -6149,6 +6149,7 @@ static inline int bnx2x_func_send_start(struct bnx2x *bp, rdata->sd_vlan_tag =cpu_to_le16 (start_params->sd_vlan_tag); rdata->path_id =BP_PATH (bp); rdata->network_cos_mode = start_params->network_cos_mode; + rdata->dmae_cmd_id =BNX2X_FW_DMAE_C ; rdata->vxlan_dst_port =cpu_to_le16 (start_params->vxlan_dst_port); rdata->geneve_dst_port =cpu_to_le16 (start_params->geneve_dst_port);
drivers/net/ethernet/faraday/ftmac100.c +3 -4
@@ -870,11 +870,10 @@ static irqreturn_t ftmac100_interrupt(int irq, void *dev_id)struct net_device *netdev = dev_id;struct ftmac100 *priv =netdev_priv (netdev); -if (likely (netif_running (netdev))) { -/* Disable interrupts for polling */ -ftmac100_disable_all_int (priv); +/* Disable interrupts for polling */ +ftmac100_disable_all_int (priv); +if (likely (netif_running (netdev)))napi_schedule (&priv->napi); - }return IRQ_HANDLED ; }
drivers/net/ethernet/ibm/ibmvnic.c +2 -2
@@ -457,8 +457,8 @@ static void release_rx_pools(struct ibmvnic_adapter *adapter)for (j =0 ; j < rx_pool->size; j++) {if (rx_pool->rx_buff[j].skb) { -dev_kfree_skb_any (rx_pool->rx_buff[i].skb); - rx_pool->rx_buff[i].skb =NULL ; +dev_kfree_skb_any (rx_pool->rx_buff[j].skb); + rx_pool->rx_buff[j].skb =NULL ; } }
drivers/net/ethernet/mellanox/mlx4/alloc.c +1 -1
@@ -337,7 +337,7 @@ void mlx4_zone_allocator_destroy(struct mlx4_zone_allocator *zone_alloc)static u32 __mlx4_alloc_from_zone (struct mlx4_zone_entry *zone,int count,int align,u32 skip_mask,u32 *puid) { -u32 uid; +u32 uid =0 ;u32 res;struct mlx4_zone_allocator *zone_alloc = zone->allocator;struct mlx4_zone_entry *curr_node;
drivers/net/ethernet/mellanox/mlx4/mlx4.h +2 -2
@@ -541,8 +541,8 @@ struct slave_list {struct resource_allocator {spinlock_t alloc_lock;/* protect quotas */ union { -int res_reserved; -int res_port_rsvd[MLX4_MAX_PORTS ]; +unsigned int res_reserved; +unsigned int res_port_rsvd[MLX4_MAX_PORTS ]; };union {int res_free;
drivers/net/ethernet/mellanox/mlx4/mr.c +1 -0
@@ -363,6 +363,7 @@ int mlx4_mr_hw_write_mpt(struct mlx4_dev *dev, struct mlx4_mr *mmr, container_of((void *)mpt_entry, struct mlx4_cmd_mailbox, buf); + (*mpt_entry)->lkey =0 ; err =mlx4_SW2HW_MPT (dev, mailbox, key); }
drivers/net/ethernet/qlogic/qed/qed_dev.c +24 -5
@@ -440,8 +440,16 @@ static u16 *qed_init_qm_get_idx_from_flags(struct qed_hwfn *p_hwfn,struct qed_qm_info *qm_info = &p_hwfn->qm_info;/* Can't have multiple flags set here */ -if (bitmap_weight ((unsigned long *)&pq_flags,sizeof (pq_flags)) >1 ) +if (bitmap_weight ((unsigned long *)&pq_flags, +sizeof (pq_flags) *BITS_PER_BYTE ) >1 ) { +DP_ERR (p_hwfn,"requested multiple pq flags 0x%x\n" , pq_flags); goto err; + } + +if (!(qed_get_pq_flags (p_hwfn) & pq_flags)) { +DP_ERR (p_hwfn,"pq flag 0x%x is not set\n" , pq_flags); + goto err; + }switch (pq_flags) {case PQ_FLAGS_RLS :
@@ -465,8 +473,7 @@ static u16 *qed_init_qm_get_idx_from_flags(struct qed_hwfn *p_hwfn, } err: -DP_ERR (p_hwfn,"BAD pq flags %d\n" , pq_flags); -return NULL ; +return &qm_info->start_pq; }/* save pq index in qm info */
@@ -490,20 +497,32 @@ u16 qed_get_cm_pq_idx_mcos(struct qed_hwfn *p_hwfn, u8 tc) {u8 max_tc =qed_init_qm_get_num_tcs (p_hwfn); +if (max_tc ==0 ) { +DP_ERR (p_hwfn,"pq with flag 0x%lx do not exist\n" , +PQ_FLAGS_MCOS ); +return p_hwfn->qm_info.start_pq; + } +if (tc > max_tc)DP_ERR (p_hwfn,"tc %d must be smaller than %d\n" , tc, max_tc); -return qed_get_cm_pq_idx (p_hwfn,PQ_FLAGS_MCOS ) + tc; +return qed_get_cm_pq_idx (p_hwfn,PQ_FLAGS_MCOS ) + (tc % max_tc); }u16 qed_get_cm_pq_idx_vf (struct qed_hwfn *p_hwfn,u16 vf) {u16 max_vf =qed_init_qm_get_num_vfs (p_hwfn); +if (max_vf ==0 ) { +DP_ERR (p_hwfn,"pq with flag 0x%lx do not exist\n" , +PQ_FLAGS_VFS ); +return p_hwfn->qm_info.start_pq; + } +if (vf > max_vf)DP_ERR (p_hwfn,"vf %d must be smaller than %d\n" , vf, max_vf); -return qed_get_cm_pq_idx (p_hwfn,PQ_FLAGS_VFS ) + vf; +return qed_get_cm_pq_idx (p_hwfn,PQ_FLAGS_VFS ) + (vf % max_vf); }u16 qed_get_cm_pq_idx_rl (struct qed_hwfn *p_hwfn,u8 rl)
drivers/net/ethernet/qlogic/qed/qed_int.c +2 -0
@@ -992,6 +992,8 @@ static int qed_int_attentions(struct qed_hwfn *p_hwfn)*/ do { index = p_sb_attn->sb_index; +/* finish reading index before the loop condition */ +dma_rmb (); attn_bits =le32_to_cpu (p_sb_attn->atten_bits); attn_acks =le32_to_cpu (p_sb_attn->atten_ack); }while (index != p_sb_attn->sb_index);
drivers/net/ethernet/qlogic/qed/qed_main.c +1 -1
@@ -1561,9 +1561,9 @@ static int qed_drain(struct qed_dev *cdev)return -EBUSY ; } rc =qed_mcp_drain (hwfn, ptt); +qed_ptt_release (hwfn, ptt);if (rc)return rc; -qed_ptt_release (hwfn, ptt); }return 0 ;
drivers/net/team/team.c +0 -2
@@ -989,8 +989,6 @@ static void team_port_disable(struct team *team, team->en_port_count--;team_queue_override_port_del (team, port);team_adjust_ops (team); -team_notify_peers (team); -team_mcast_rejoin (team);team_lower_state_changed (port); }
drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c +3 -0
@@ -193,6 +193,9 @@ static void brcmu_d11ac_decchspec(struct brcmu_chan *ch) }break ;case BRCMU_CHSPEC_D11AC_BW_160 : + ch->bw =BRCMU_CHAN_BW_160 ; + ch->sb =brcmu_maskget16 (ch->chspec,BRCMU_CHSPEC_D11AC_SB_MASK , +BRCMU_CHSPEC_D11AC_SB_SHIFT );switch (ch->sb) {case BRCMU_CHAN_SB_LLL : ch->control_ch_num -=CH_70MHZ_APART ;
drivers/net/wireless/mac80211_hwsim.c +4 -4
@@ -2698,6 +2698,10 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,wiphy_ext_feature_set (hw->wiphy,NL80211_EXT_FEATURE_CQM_RSSI_LIST ); +tasklet_hrtimer_init (&data->beacon_timer, + mac80211_hwsim_beacon, +CLOCK_MONOTONIC ,HRTIMER_MODE_ABS ); + err =ieee80211_register_hw (hw);if (err <0 ) { printk(KERN_DEBUG "mac80211_hwsim: ieee80211_register_hw failed (%d)\n",
@@ -2722,10 +2726,6 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, data->debugfs, data, &hwsim_simulate_radar); -tasklet_hrtimer_init (&data->beacon_timer, - mac80211_hwsim_beacon, -CLOCK_MONOTONIC ,HRTIMER_MODE_ABS ); -spin_lock_bh (&hwsim_radio_lock);list_add_tail (&data->list, &hwsim_radios);spin_unlock_bh (&hwsim_radio_lock);
drivers/nvdimm/nd-core.h +2 -0
@@ -105,6 +105,8 @@ resource_size_t nd_pmem_available_dpa(struct nd_region *nd_region, struct nd_mapping *nd_mapping, resource_size_t *overlap);resource_size_t nd_blk_available_dpa (struct nd_region *nd_region);resource_size_t nd_region_available_dpa (struct nd_region *nd_region); +int nd_region_conflict (struct nd_region *nd_region,resource_size_t start, +resource_size_t size);resource_size_t nvdimm_allocated_dpa (struct nvdimm_drvdata *ndd,struct nd_label_id *label_id);int alias_dpa_busy (struct device *dev,void *data);
drivers/nvdimm/pfn_devs.c +37 -27
88 lines not on this page · raw message
drivers/nvdimm/region_devs.c +41 -0
47 lines not on this page · raw message
drivers/s390/virtio/virtio_ccw.c +14 -3
@@ -59,6 +59,7 @@ struct virtio_ccw_device {unsigned int revision;/* Transport revision */ wait_queue_head_t wait_q;spinlock_t lock; +struct mutex io_lock;/* Serializes I/O requests */ struct list_head virtqueues;unsigned long indicators;unsigned long indicators2;
@@ -299,6 +300,7 @@ static int ccw_io_helper(struct virtio_ccw_device *vcdev,unsigned long flags;int flag = intparm &VIRTIO_CCW_INTPARM_MASK ; +mutex_lock (&vcdev->io_lock); do { spin_lock_irqsave(get_ccwdev_lock(vcdev->cdev), flags); ret = ccw_device_start(vcdev->cdev, ccw, intparm, 0, 0);
@@ -311,7 +313,9 @@ static int ccw_io_helper(struct virtio_ccw_device *vcdev,cpu_relax (); }while (ret == -EBUSY );wait_event (vcdev->wait_q,doing_io (vcdev, flag) ==0 ); -return ret ? ret : vcdev->err; + ret = ret ? ret : vcdev->err; +mutex_unlock (&vcdev->io_lock); +return ret; } static void virtio_ccw_drop_indicator(struct virtio_ccw_device *vcdev,
@@ -831,6 +835,7 @@ static void virtio_ccw_get_config(struct virtio_device *vdev,int ret;struct ccw1 *ccw;void *config_area; +unsigned long flags; ccw =kzalloc (sizeof (*ccw),GFP_DMA |GFP_KERNEL );if (!ccw)
@@ -849,11 +854,13 @@ static void virtio_ccw_get_config(struct virtio_device *vdev,if (ret) goto out_free; +spin_lock_irqsave (&vcdev->lock, flags);memcpy (vcdev->config, config_area, offset + len); -if (buf) -memcpy (buf, &vcdev->config[offset], len);if (vcdev->config_ready < offset + len) vcdev->config_ready = offset + len; +spin_unlock_irqrestore (&vcdev->lock, flags); +if (buf) +memcpy (buf, config_area + offset, len); out_free:kfree (config_area);
@@ -867,6 +874,7 @@ static void virtio_ccw_set_config(struct virtio_device *vdev,struct virtio_ccw_device *vcdev =to_vc_device (vdev);struct ccw1 *ccw;void *config_area; +unsigned long flags; ccw =kzalloc (sizeof (*ccw),GFP_DMA |GFP_KERNEL );if (!ccw)
@@ -879,9 +887,11 @@ static void virtio_ccw_set_config(struct virtio_device *vdev,/* Make sure we don't overwrite fields. */ if (vcdev->config_ready < offset)virtio_ccw_get_config (vdev,0 ,NULL , offset); +spin_lock_irqsave (&vcdev->lock, flags);memcpy (&vcdev->config[offset], buf, len);/* Write the config area to the host. */ memcpy (config_area, vcdev->config,sizeof (vcdev->config)); +spin_unlock_irqrestore (&vcdev->lock, flags); ccw->cmd_code =CCW_CMD_WRITE_CONF ; ccw->flags =0 ; ccw->count = offset + len;
@@ -1250,6 +1260,7 @@ static int virtio_ccw_online(struct ccw_device *cdev)init_waitqueue_head (&vcdev->wait_q);INIT_LIST_HEAD (&vcdev->virtqueues);spin_lock_init (&vcdev->lock); +mutex_init (&vcdev->io_lock);spin_lock_irqsave (get_ccwdev_lock (cdev), flags);dev_set_drvdata (&cdev->dev, vcdev);
drivers/staging/lustre/lnet/lnet/config.c +1 -2
@@ -354,8 +354,7 @@ lnet_parse_networks(struct list_head *nilist, char *networks)CERROR ("Can't allocate net interface name\n" ); goto failed; } -strncpy (ni->ni_interfaces[niface], iface, -strlen (iface)); +strcpy (ni->ni_interfaces[niface], iface); niface++; iface = comma; }while (iface);
drivers/staging/lustre/lustre/lmv/lmv_obd.c +1 -1
@@ -645,7 +645,7 @@ static int lmv_fid2path(struct obd_export *exp, int len, void *karg,memmove (ptr +strlen (gf->gf_path) +1 , ptr,strlen (ori_gf->gf_path)); -strncpy (ptr, gf->gf_path,strlen (gf->gf_path)); +strcpy (ptr, gf->gf_path); ptr +=strlen (gf->gf_path); *ptr ='/' ; }
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c +1 -3
@@ -2860,9 +2860,7 @@ ia_css_debug_pipe_graph_dump_stage(if (l <=ENABLE_LINE_MAX_LENGTH ) {/* It fits on one line, copy string and init */ /* other helper strings with empty string */ -strcpy_s (enable_info, -sizeof (enable_info), - ei); +strscpy (enable_info, ei,sizeof (enable_info)); }else {/* Too big for one line, find last comma */ p =ENABLE_LINE_MAX_LENGTH ;
drivers/staging/rtl8712/mlme_linux.c +1 -1
@@ -158,7 +158,7 @@ void r8712_report_sec_ie(struct _adapter *adapter, u8 authmode, u8 *sec_ie) p = buff; p +=sprintf (p,"ASSOCINFO(ReqIEs=" ); len = sec_ie[1 ] +2 ; - len = (len <IW_CUSTOM_MAX ) ? len :IW_CUSTOM_MAX -1 ; + len = (len <IW_CUSTOM_MAX ) ? len :IW_CUSTOM_MAX ;for (i =0 ; i < len; i++) p +=sprintf (p,"%02x" , sec_ie[i]); p +=sprintf (p,")" );
drivers/staging/rtl8712/rtl871x_mlme.c +1 -1
@@ -1361,7 +1361,7 @@ sint r8712_restruct_sec_ie(struct _adapter *adapter, u8 *in_ie, u8 *out_ie, uint in_len) {u8 authmode =0 , match; -u8 sec_ie[255 ], uncst_oui[4 ], bkup_ie[255 ]; +u8 sec_ie[IW_CUSTOM_MAX ], uncst_oui[4 ], bkup_ie[255 ];u8 wpa_oui[4 ] = {0x0 ,0x50 ,0xf2 ,0x01 };uint ielength, cnt, remove_cnt;int iEntry;
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +1 -1
@@ -1574,7 +1574,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)if (pstat->aid >0 ) {DBG_871X (" old AID %d\n" , pstat->aid); }else { -for (pstat->aid =1 ; pstat->aid <NUM_STA ; pstat->aid++) +for (pstat->aid =1 ; pstat->aid <=NUM_STA ; pstat->aid++)if (pstapriv->sta_aid[pstat->aid -1 ] ==NULL )break ;
drivers/tty/serial/8250/8250_mtk.c +7 -9
@@ -222,17 +222,17 @@ static int mtk8250_probe(struct platform_device *pdev)platform_set_drvdata (pdev, data); -pm_runtime_enable (&pdev->dev); -if (!pm_runtime_enabled (&pdev->dev)) { - err =mtk8250_runtime_resume (&pdev->dev); -if (err) -return err; - } + err =mtk8250_runtime_resume (&pdev->dev); +if (err) +return err; data->line =serial8250_register_8250_port (&uart);if (data->line <0 )return data->line; +pm_runtime_set_active (&pdev->dev); +pm_runtime_enable (&pdev->dev); +return 0 ; }
@@ -243,13 +243,11 @@ static int mtk8250_remove(struct platform_device *pdev)pm_runtime_get_sync (&pdev->dev);serial8250_unregister_port (data->line); +mtk8250_runtime_suspend (&pdev->dev);pm_runtime_disable (&pdev->dev);pm_runtime_put_noidle (&pdev->dev); -if (!pm_runtime_status_suspended (&pdev->dev)) -mtk8250_runtime_suspend (&pdev->dev); -return 0 ; }
drivers/tty/serial/kgdboc.c +2 -2
@@ -232,7 +232,7 @@ static void kgdboc_put_char(u8 chr)static int param_set_kgdboc_var (const char *kmessage,struct kernel_param *kp) { -int len =strlen (kmessage); +size_t len =strlen (kmessage);if (len >=MAX_CONFIG_LEN ) {printk (KERN_ERR "kgdboc: config string too long\n" );
@@ -254,7 +254,7 @@ static int param_set_kgdboc_var(const char *kmessage, struct kernel_param *kp)strcpy (config, kmessage);/* Chop out \n char as a result of echo */ -if (config[len -1 ] =='\n' ) +if (len && config[len -1 ] =='\n' ) config[len -1 ] ='\0' ;if (configured ==1 )
drivers/tty/tty_port.c +2 -1
@@ -639,7 +639,8 @@ void tty_port_close(struct tty_port *port, struct tty_struct *tty,if (tty_port_close_start (port, tty, filp) ==0 )return ;tty_port_shutdown (port, tty); -set_bit (TTY_IO_ERROR , &tty->flags); +if (!port->console) +set_bit (TTY_IO_ERROR , &tty->flags);tty_port_close_end (port, tty);tty_port_tty_set (port,NULL ); }
drivers/usb/core/hub.c +1 -1
@@ -2231,7 +2231,7 @@ static int usb_enumerate_device_otg(struct usb_device *udev)/* descriptor may appear anywhere in config */ err =__usb_get_extra_descriptor (udev->rawdescriptors[0 ],le16_to_cpu (udev->config[0 ].desc.wTotalLength), -USB_DT_OTG , (void **) &desc); +USB_DT_OTG , (void **) &desc,sizeof (*desc));if (err || !(desc->bmAttributes &USB_OTG_HNP ))return 0 ;
drivers/usb/core/quirks.c +4 -0
@@ -188,6 +188,10 @@ static const struct usb_device_id usb_quirk_list[] = {/* Midiman M-Audio Keystation 88es */ { USB_DEVICE(0x0763, 0x0192), .driver_info = USB_QUIRK_RESET_RESUME }, + /* SanDisk Ultra Fit and Ultra Flair */ + { USB_DEVICE(0x0781, 0x5583), .driver_info = USB_QUIRK_NO_LPM }, + { USB_DEVICE(0x0781, 0x5591), .driver_info = USB_QUIRK_NO_LPM }, + /* M-Systems Flash Disk Pioneers */ { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME },
drivers/usb/core/usb.c +3 -3
@@ -833,14 +833,14 @@ EXPORT_SYMBOL_GPL(usb_get_current_frame_number);*/ int __usb_get_extra_descriptor (char *buffer,unsigned size, -unsigned char type,void **ptr) +unsigned char type,void **ptr,size_t minsize) {struct usb_descriptor_header *header;while (size >=sizeof (struct usb_descriptor_header )) { header = (struct usb_descriptor_header *)buffer; -if (header->bLength <2 ) { +if (header->bLength <2 || header->bLength > size) { printk(KERN_ERR "%s: bogus descriptor, type %d length %d\n", usbcore_name,
@@ -849,7 +849,7 @@ int __usb_get_extra_descriptor(char *buffer, unsigned size,return -1 ; } -if (header->bDescriptorType == type) { +if (header->bDescriptorType == type && header->bLength >= minsize) { *ptr = header;return 0 ; }
drivers/usb/gadget/function/f_fs.c +8 -18
@@ -219,7 +219,6 @@ struct ffs_io_data {struct mm_struct *mm;struct work_struct work; -struct work_struct cancellation_work;struct usb_ep *ep;struct usb_request *req;
@@ -1074,31 +1073,22 @@ ffs_epfile_open(struct inode *inode, struct file *file)return 0 ; } -static void ffs_aio_cancel_worker (struct work_struct *work) -{ - struct ffs_io_data *io_data = container_of(work, struct ffs_io_data, - cancellation_work); - -ENTER (); - -usb_ep_dequeue (io_data->ep, io_data->req); -} -static int ffs_aio_cancel (struct kiocb *kiocb) {struct ffs_io_data *io_data = kiocb->private; -struct ffs_data *ffs = io_data->ffs; +struct ffs_epfile *epfile = kiocb->ki_filp->private_data;int value;ENTER (); -if (likely (io_data && io_data->ep && io_data->req)) { -INIT_WORK (&io_data->cancellation_work, ffs_aio_cancel_worker); -queue_work (ffs->io_completion_wq, &io_data->cancellation_work); - value = -EINPROGRESS ; - }else { +spin_lock_irq (&epfile->ffs->eps_lock); + +if (likely (io_data && io_data->ep && io_data->req)) + value =usb_ep_dequeue (io_data->ep, io_data->req); +else value = -EINVAL ; - } + +spin_unlock_irq (&epfile->ffs->eps_lock);return value; }
drivers/usb/host/hwa-hc.c +1 -1
@@ -654,7 +654,7 @@ static int hwahc_security_create(struct hwahc *hwahc) top = itr + itr_size; result =__usb_get_extra_descriptor (usb_dev->rawdescriptors[index],le16_to_cpu (usb_dev->actconfig->desc.wTotalLength), -USB_DT_SECURITY , (void **) &secd); +USB_DT_SECURITY , (void **) &secd,sizeof (*secd));if (result ==-1 ) {dev_warn (dev,"BUG? WUSB host has no security descriptors\n" );return 0 ;
drivers/usb/host/xhci-pci.c +4 -0
@@ -144,6 +144,10 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) pdev->device == 0x43bb)) xhci->quirks |=XHCI_SUSPEND_DELAY ; +if (pdev->vendor ==PCI_VENDOR_ID_AMD && + (pdev->device ==0x15e0 || pdev->device ==0x15e1 )) + xhci->quirks |=XHCI_SNPS_BROKEN_SUSPEND ; +if (pdev->vendor ==PCI_VENDOR_ID_AMD ) xhci->quirks |=XHCI_TRUST_TX_LENGTH ;
drivers/usb/host/xhci.c +38 -4
74 lines not on this page · raw message
drivers/usb/host/xhci.h +3 -0
@@ -1839,6 +1839,7 @@ struct xhci_hcd {#define XHCI_SUSPEND_DELAY BIT_ULL(30)#define XHCI_INTEL_USB_ROLE_SW BIT_ULL(31)#define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34) +#define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35)unsigned int num_active_eps;unsigned int limit_active_eps;
@@ -1870,6 +1871,8 @@ struct xhci_hcd {/* platform-specific data -- must come last */ unsigned long priv[0 ]__aligned(sizeof(s64)) ; +/* Broken Suspend flag for SNPS Suspend resume issue */ +u8 broken_suspend; };/* Platform specific overrides to generic XHCI hc_driver ops */
drivers/usb/misc/appledisplay.c +1 -0
@@ -64,6 +64,7 @@ static const struct usb_device_id appledisplay_table[] = { { APPLEDISPLAY_DEVICE(0x921c) }, { APPLEDISPLAY_DEVICE(0x921d) }, { APPLEDISPLAY_DEVICE(0x9222) }, + { APPLEDISPLAY_DEVICE(0x9226) }, { APPLEDISPLAY_DEVICE(0x9236) },/* Terminating entry */
drivers/vhost/vsock.c +33 -24
146 lines not on this page · raw message
fs/cifs/dir.c +1 -1
@@ -174,7 +174,7 @@ build_path_from_dentry_optional_prefix(struct dentry *direntry, bool prefix)cifs_dbg (FYI ,"using cifs_sb prepath <%s>\n" , cifs_sb->prepath);memcpy (full_path+dfsplen+1 , cifs_sb->prepath, pplen-1 ); - full_path[dfsplen] ='\\' ; + full_path[dfsplen] = dirsep;for (i =0 ; i < pplen-1 ; i++)if (full_path[dfsplen+1 +i] =='/' ) full_path[dfsplen+1 +i] =CIFS_DIR_SEP (cifs_sb);
fs/f2fs/data.c +3 -0
@@ -468,6 +468,9 @@ static struct bio *f2fs_grab_read_bio(struct inode *inode, block_t blkaddr,struct fscrypt_ctx *ctx =NULL ;struct bio *bio; +if (!f2fs_is_valid_blkaddr (sbi, blkaddr,DATA_GENERIC )) +return ERR_PTR (-EFAULT ); +if (f2fs_encrypted_file (inode)) { ctx =fscrypt_get_ctx (inode,GFP_NOFS );if (IS_ERR (ctx))
fs/f2fs/inode.c +13 -5
@@ -62,14 +62,16 @@ static void __get_inode_rdev(struct inode *inode, struct f2fs_inode *ri) } } -static bool __written_first_block (struct f2fs_sb_info *sbi, +static int __written_first_block (struct f2fs_sb_info *sbi,struct f2fs_inode *ri) {block_t addr =le32_to_cpu (ri->i_addr[offset_in_addr (ri)]); -if (is_valid_data_blkaddr (sbi, addr)) -return true; -return false; +if (!__is_valid_data_blkaddr (addr)) +return 1 ; +if (!f2fs_is_valid_blkaddr (sbi, addr,DATA_GENERIC )) +return -EFAULT ; +return 0 ; }static void __set_inode_rdev (struct inode *inode,struct f2fs_inode *ri)
@@ -253,6 +255,7 @@ static int do_read_inode(struct inode *inode)struct page *node_page;struct f2fs_inode *ri;projid_t i_projid; +int err;/* Check if ino is within scope */ if (check_nid_range (sbi, inode->i_ino))
@@ -307,7 +310,12 @@ static int do_read_inode(struct inode *inode)/* get rdev by using inline_info */ __get_inode_rdev (inode, ri); -if (__written_first_block (sbi, ri)) + err =__written_first_block (sbi, ri); +if (err <0 ) { +f2fs_put_page (node_page,1 ); +return err; + } +if (!err)set_inode_flag (inode,FI_FIRST_BLOCK_WRITTEN );if (!need_inode_block_update (sbi, inode->i_ino))
fs/nfs/flexfilelayout/flexfilelayout.c +9 -12
@@ -1365,12 +1365,7 @@ static void ff_layout_read_prepare_v4(struct rpc_task *task, void *data) task))return ; -if (ff_layout_read_prepare_common (task, hdr)) -return ; - -if (nfs4_set_rw_stateid (&hdr->args.stateid, hdr->args.context, - hdr->args.lock_context,FMODE_READ ) == -EIO ) -rpc_exit (task, -EIO );/* lost lock, terminate I/O */ +ff_layout_read_prepare_common (task, hdr); }static void ff_layout_read_call_done (struct rpc_task *task,void *data)
@@ -1539,12 +1534,7 @@ static void ff_layout_write_prepare_v4(struct rpc_task *task, void *data) task))return ; -if (ff_layout_write_prepare_common (task, hdr)) -return ; - -if (nfs4_set_rw_stateid (&hdr->args.stateid, hdr->args.context, - hdr->args.lock_context,FMODE_WRITE ) == -EIO ) -rpc_exit (task, -EIO );/* lost lock, terminate I/O */ +ff_layout_write_prepare_common (task, hdr); }static void ff_layout_write_call_done (struct rpc_task *task,void *data)
@@ -1734,6 +1724,10 @@ ff_layout_read_pagelist(struct nfs_pgio_header *hdr) fh =nfs4_ff_layout_select_ds_fh (lseg, idx);if (fh) hdr->args.fh = fh; + +if (!nfs4_ff_layout_select_ds_stateid (lseg, idx, &hdr->args.stateid)) + goto out_failed; +/* * Note that if we ever decide to split across DSes, * then we may need to handle dense-like offsets.
@@ -1796,6 +1790,9 @@ ff_layout_write_pagelist(struct nfs_pgio_header *hdr, int sync)if (fh) hdr->args.fh = fh; +if (!nfs4_ff_layout_select_ds_stateid (lseg, idx, &hdr->args.stateid)) + goto out_failed; +/* * Note that if we ever decide to split across DSes, * then we may need to handle dense-like offsets.
fs/nfs/flexfilelayout/flexfilelayout.h +4 -0
@@ -214,6 +214,10 @@ unsigned int ff_layout_fetch_ds_ioerr(struct pnfs_layout_hdr *lo, unsigned int maxnum);struct nfs_fh *nfs4_ff_layout_select_ds_fh (struct pnfs_layout_segment *lseg,u32 mirror_idx); +int +nfs4_ff_layout_select_ds_stateid (struct pnfs_layout_segment *lseg, +u32 mirror_idx, +nfs4_stateid *stateid);struct nfs4_pnfs_ds * nfs4_ff_layout_prepare_ds(struct pnfs_layout_segment *lseg, u32 ds_idx,
fs/nfs/flexfilelayout/flexfilelayoutdev.c +19 -0
@@ -369,6 +369,25 @@ nfs4_ff_layout_select_ds_fh(struct pnfs_layout_segment *lseg, u32 mirror_idx)return fh; } +int +nfs4_ff_layout_select_ds_stateid (struct pnfs_layout_segment *lseg, +u32 mirror_idx, +nfs4_stateid *stateid) +{ +struct nfs4_ff_layout_mirror *mirror =FF_LAYOUT_COMP (lseg, mirror_idx); + +if (!ff_layout_mirror_valid (lseg, mirror, false)) { +pr_err_ratelimited ("NFS: %s: No data server for mirror offset index %d\n" , + __func__, mirror_idx); + goto out; + } + +nfs4_stateid_copy (stateid, &mirror->stateid); +return 1 ; +out: +return 0 ; +} +/** * nfs4_ff_layout_prepare_ds - prepare a DS connection for an RPC call * @lseg: the layout segment we're operating on
include/linux/hyperv.h +7 -0
@@ -869,6 +869,13 @@ struct vmbus_channel {bool probe_done; +/* +* We must offload the handling of the primary/sub channels +* from the single-threaded vmbus_connection.work_queue to +* two different workqueue, otherwise we can block +* vmbus_connection.work_queue and hang: see vmbus_process_offer(). +*/ +struct work_struct add_channel_work; };static inline bool is_hvsock_channel (const struct vmbus_channel *c)
include/linux/usb.h +2 -2
@@ -407,11 +407,11 @@ struct usb_host_bos { };int __usb_get_extra_descriptor (char *buffer,unsigned size, -unsigned char type,void **ptr); +unsigned char type,void **ptr,size_t min);#define usb_get_extra_descriptor (ifpoint, type, ptr) \ __usb_get_extra_descriptor((ifpoint)->extra, \ (ifpoint)->extralen, \ - type, (void **)ptr) + type, (void **)ptr, sizeof(**(ptr)))/* ----------------------------------------------------------------------- */
include/sound/pcm_params.h +3 -1
@@ -247,11 +247,13 @@ static inline int snd_interval_empty(const struct snd_interval *i)static inline int snd_interval_single (const struct snd_interval *i) {return (i->min == i->max || - (i->min +1 == i->max && i->openmax)); + (i->min +1 == i->max && (i->openmin || i->openmax))); }static inline int snd_interval_value (const struct snd_interval *i) { +if (i->openmin && !i->openmax) +return i->max;return i->min; }
lib/swiotlb.c +9 -11
@@ -17,6 +17,8 @@* 08/12/11 beckyb Add highmem support */ +#define pr_fmt (fmt) "software IO TLB: " fmt +#include <linux/cache.h> #include <linux/dma-mapping.h> #include <linux/mm.h>
@@ -177,20 +179,16 @@ static bool no_iotlb_memory;void swiotlb_print_info (void ) {unsigned long bytes = io_tlb_nslabs <<IO_TLB_SHIFT ; -unsigned char *vstart, *vend;if (no_iotlb_memory) { -pr_warn ("software IO TLB: No low mem\n" ); +pr_warn ("No low mem\n" );return ; } - vstart =phys_to_virt (io_tlb_start); - vend =phys_to_virt (io_tlb_end); - -printk (KERN_INFO "software IO TLB [mem %#010llx-%#010llx] (%luMB) mapped at [%p-%p]\n" , +pr_info ("mapped [mem %#010llx-%#010llx] (%luMB)\n" , (unsigned long long )io_tlb_start, (unsigned long long )io_tlb_end, - bytes >>20 , vstart, vend -1 ); + bytes >>20 ); }/*
@@ -290,7 +288,7 @@ swiotlb_init(int verbose)if (io_tlb_start)memblock_free_early (io_tlb_start,PAGE_ALIGN (io_tlb_nslabs <<IO_TLB_SHIFT )); -pr_warn ("Cannot allocate SWIOTLB buffer" ); +pr_warn ("Cannot allocate buffer" ); no_iotlb_memory = true; }
@@ -332,8 +330,8 @@ swiotlb_late_init_with_default_size(size_t default_size)return -ENOMEM ; }if (order !=get_order (bytes)) { -printk (KERN_WARNING "Warning: only able to allocate %ld MB " -"for software IO TLB\n" , (PAGE_SIZE << order) >>20 ); +pr_warn ("only able to allocate %ld MB\n" , + (PAGE_SIZE << order) >>20 ); io_tlb_nslabs =SLABS_PER_PAGE << order; } rc =swiotlb_late_init_with_tbl (vstart, io_tlb_nslabs);
@@ -770,7 +768,7 @@ swiotlb_alloc_coherent(struct device *hwdev, size_t size, err_warn:if (warn &&printk_ratelimit ()) { -pr_warn ("swiotlb: coherent allocation failed for device %s size=%zu\n" , +pr_warn ("coherent allocation failed for device %s size=%zu\n" ,dev_name (hwdev), size);dump_stack (); }
lib/test_firmware.c +1 -0
@@ -838,6 +838,7 @@ static ssize_t read_firmware_show(struct device *dev,if (req->fw->size >PAGE_SIZE ) {pr_err ("Testing interface must use PAGE_SIZE firmware for now\n" ); rc = -EINVAL ; + goto out; }memcpy (buf, req->fw->data, req->fw->size);
mm/page_alloc.c +0 -10
@@ -3862,8 +3862,6 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,enum compact_result compact_result;int compaction_retries;int no_progress_loops; -unsigned long alloc_start = jiffies; -unsigned int stall_timeout =10 *HZ ;unsigned int cpuset_mems_cookie;int reserve_flags;
@@ -3983,14 +3981,6 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,if (!can_direct_reclaim) goto nopage; -/* Make sure we know about allocations which stall for too long */ -if (time_after (jiffies, alloc_start + stall_timeout)) { -warn_alloc (gfp_mask & ~__GFP_NOWARN, ac->nodemask, -"page allocation stalls for %ums, order:%u" , -jiffies_to_msecs (jiffies-alloc_start), order); - stall_timeout +=10 *HZ ; - } -/* Avoid recursion of direct reclaim */ if (current->flags &PF_MEMALLOC ) goto nopage;
net/batman-adv/bat_v_elp.c +4 -2
@@ -338,19 +338,21 @@ static void batadv_v_elp_periodic_work(struct work_struct *work)*/ int batadv_v_elp_iface_enable (struct batadv_hard_iface *hard_iface) { +static const size_t tvlv_padding =sizeof (__be32);struct batadv_elp_packet *elp_packet;unsigned char *elp_buff;u32 random_seqno;size_t size;int res = -ENOMEM ; - size =ETH_HLEN +NET_IP_ALIGN +BATADV_ELP_HLEN ; + size =ETH_HLEN +NET_IP_ALIGN +BATADV_ELP_HLEN + tvlv_padding; hard_iface->bat_v.elp_skb =dev_alloc_skb (size);if (!hard_iface->bat_v.elp_skb) goto out;skb_reserve (hard_iface->bat_v.elp_skb,ETH_HLEN +NET_IP_ALIGN ); - elp_buff =skb_put_zero (hard_iface->bat_v.elp_skb,BATADV_ELP_HLEN ); + elp_buff =skb_put_zero (hard_iface->bat_v.elp_skb, +BATADV_ELP_HLEN + tvlv_padding); elp_packet = (struct batadv_elp_packet *)elp_buff; elp_packet->packet_type =BATADV_ELP ;
net/batman-adv/fragmentation.c +1 -1
@@ -274,7 +274,7 @@ batadv_frag_merge_packets(struct hlist_head *chain)kfree (entry); packet = (struct batadv_frag_packet *)skb_out->data; - size =ntohs (packet->total_size); + size =ntohs (packet->total_size) + hdr_size;/* Make room for the rest of the fragments. */ if (pskb_expand_head (skb_out,0 , size - skb_out->len,GFP_ATOMIC ) <0 ) {
net/mac80211/iface.c +2 -0
@@ -1032,6 +1032,8 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,if (local->open_count ==0 )ieee80211_clear_tx_pending (local); + sdata->vif.bss_conf.beacon_int =0 ; +/* * If the interface goes down while suspended, presumably because * the device was unplugged and that happens before our resume,
net/mac80211/rx.c +1 -0
@@ -1254,6 +1254,7 @@ ieee80211_rx_h_check_dup(struct ieee80211_rx_data *rx)return RX_CONTINUE ;if (ieee80211_is_ctl (hdr->frame_control) || +ieee80211_is_nullfunc (hdr->frame_control) ||ieee80211_is_qos_nullfunc (hdr->frame_control) ||is_multicast_ether_addr (hdr->addr1))return RX_CONTINUE ;
net/mac80211/status.c +2 -0
@@ -953,6 +953,8 @@ void ieee80211_tx_status_ext(struct ieee80211_hw *hw,/* Track when last TDLS packet was ACKed */ if (test_sta_flag (sta,WLAN_STA_TDLS_PEER_AUTH )) sta->status_stats.last_tdls_pkt_time = jiffies; + }else if (test_sta_flag (sta,WLAN_STA_PS_STA )) { +return ; }else {ieee80211_lost_packet (sta, info); }
net/mac80211/tx.c +2 -2
@@ -435,8 +435,8 @@ ieee80211_tx_h_multicast_ps_buf(struct ieee80211_tx_data *tx)if (ieee80211_hw_check (&tx->local->hw,QUEUE_CONTROL )) info->hw_queue = tx->sdata->vif.cab_queue; -/* no stations in PS mode */ -if (!atomic_read (&ps->num_sta_ps)) +/* no stations in PS mode and no buffered packets */ +if (!atomic_read (&ps->num_sta_ps) &&skb_queue_empty (&ps->bc_buf))return TX_CONTINUE ; info->flags |=IEEE80211_TX_CTL_SEND_AFTER_DTIM ;
net/sunrpc/auth_gss/auth_gss.c +4 -0
@@ -1736,6 +1736,7 @@ priv_release_snd_buf(struct rpc_rqst *rqstp)for (i=0 ; i < rqstp->rq_enc_pages_num; i++)__free_page (rqstp->rq_enc_pages[i]);kfree (rqstp->rq_enc_pages); + rqstp->rq_release_snd_buf =NULL ; } static int
@@ -1744,6 +1745,9 @@ alloc_enc_pages(struct rpc_rqst *rqstp)struct xdr_buf *snd_buf = &rqstp->rq_snd_buf;int first, last, i; +if (rqstp->rq_release_snd_buf) + rqstp->rq_release_snd_buf (rqstp); +if (snd_buf->page_len ==0 ) { rqstp->rq_enc_pages_num =0 ;return 0 ;
sound/core/pcm_native.c +8 -6
@@ -36,6 +36,7 @@#include <sound/timer.h> #include <sound/minors.h> #include <linux/uio.h> +#include <linux/delay.h> #include "pcm_local.h"
@@ -91,12 +92,12 @@ static DECLARE_RWSEM(snd_pcm_link_rwsem);* and this may lead to a deadlock when the code path takes read sem * twice (e.g. one in snd_pcm_action_nonatomic() and another in * snd_pcm_stream_lock()). As a (suboptimal) workaround, let writer to -* spin until it gets the lock. +* sleep until all the readers are completed without blocking by writer. */ -static inline void down_write_nonblock (struct rw_semaphore *lock) +static inline void down_write_nonfifo (struct rw_semaphore *lock) {while (!down_write_trylock (lock)) -cond_resched (); +msleep (1 ); }/**
@@ -1935,7 +1936,7 @@ static int snd_pcm_link(struct snd_pcm_substream *substream, int fd) res = -ENOMEM ; goto _nolock; } -down_write_nonblock (&snd_pcm_link_rwsem); +down_write_nonfifo (&snd_pcm_link_rwsem);write_lock_irq (&snd_pcm_link_rwlock); if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN || substream->runtime->status->state != substream1->runtime->status->state ||
@@ -1982,7 +1983,7 @@ static int snd_pcm_unlink(struct snd_pcm_substream *substream)struct snd_pcm_substream *s;int res =0 ; -down_write_nonblock (&snd_pcm_link_rwsem); +down_write_nonfifo (&snd_pcm_link_rwsem);write_lock_irq (&snd_pcm_link_rwlock);if (!snd_pcm_stream_linked (substream)) { res = -EALREADY ;
@@ -2337,7 +2338,8 @@ int snd_pcm_hw_constraints_complete(struct snd_pcm_substream *substream)static void pcm_release_private (struct snd_pcm_substream *substream) { -snd_pcm_unlink (substream); +if (snd_pcm_stream_linked (substream)) +snd_pcm_unlink (substream); }void snd_pcm_release_substream (struct snd_pcm_substream *substream)
sound/pci/hda/hda_intel.c +4 -0
@@ -2513,6 +2513,10 @@ static const struct pci_device_id azx_ids[] = {/* AMD Hudson */ { PCI_DEVICE(0x1022, 0x780d), .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_SB }, + /* AMD Stoney */ + { PCI_DEVICE(0x1022, 0x157a), + .driver_data =AZX_DRIVER_GENERIC |AZX_DCAPS_PRESET_ATI_SB | + AZX_DCAPS_PM_RUNTIME }, /* AMD Raven */ { PCI_DEVICE(0x1022, 0x15e3), .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_SB |
sound/pci/hda/patch_realtek.c +9 -0
@@ -4863,9 +4863,18 @@ static void alc_fixup_tpt470_dock(struct hda_codec *codec, { 0x19, 0x21a11010 }, /* dock mic */ { } }; +/* Assure the speaker pin to be coupled with DAC NID 0x03; otherwise +* the speaker output becomes too low by some reason on Thinkpads with +* ALC298 codec +*/ +static hda_nid_t preferred_pairs[] = { +0x14 ,0x03 ,0x17 ,0x02 ,0x21 ,0x02 , +0 + };struct alc_spec *spec = codec->spec;if (action ==HDA_FIXUP_ACT_PRE_PROBE ) { + spec->gen.preferred_dacs = preferred_pairs; spec->parse_flags =HDA_PINCFG_NO_HP_FIXUP ;snd_hda_apply_pincfgs (codec, pincfgs); }else if (action ==HDA_FIXUP_ACT_INIT ) {
sound/usb/card.c +4 -1
@@ -644,9 +644,12 @@ static int usb_audio_probe(struct usb_interface *intf, __error:if (chip) { +/* chip->active is inside the chip->card object, +* decrement before memory is possibly returned. +*/ +atomic_dec (&chip->active);if (!chip->num_interfaces)snd_card_free (chip->card); -atomic_dec (&chip->active); }mutex_unlock (®ister_mutex);return err;