Linux 4.10.7
Greg KH
maintainerI'm announcing the release of the 4.10.7 kernel.
All users of the 4.10 kernel series must upgrade.
The updated 4.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.10.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/boot/dts/sama5d2.dtsi | 2 arch/arm/mach-at91/pm.c | 18 arch/arm64/kernel/kaslr.c | 10 arch/powerpc/kernel/idle_book3s.S | 20 arch/x86/pci/xen.c | 23 block/blk-mq.c | 11 crypto/algif_hash.c | 2 drivers/auxdisplay/img-ascii-lcd.c | 1 drivers/char/hw_random/amd-rng.c | 42 drivers/char/hw_random/geode-rng.c | 50 - drivers/char/ppdev.c | 11 drivers/clk/sunxi-ng/ccu-sun6i-a31.c | 2 drivers/clk/sunxi-ng/ccu_mp.c | 8 drivers/cpufreq/cpufreq.c | 3 drivers/cpuidle/sysfs.c | 12 drivers/crypto/ccp/ccp-dev.c | 5 drivers/crypto/ccp/ccp-dmaengine.c | 1 drivers/dax/dax.c | 15 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 drivers/gpu/drm/amd/amdgpu/si_dpm.c | 10 drivers/gpu/drm/drm_atomic_helper.c | 11 drivers/gpu/drm/drm_fops.c | 2 drivers/hid/hid-sony.c | 2 drivers/hv/channel.c | 13 drivers/hv/channel_mgmt.c | 1 drivers/hwtracing/intel_th/core.c | 4 drivers/iio/adc/ti_am335x_adc.c | 13 drivers/iio/common/hid-sensors/hid-sensor-trigger.c | 6 drivers/iio/magnetometer/ak8974.c | 4 drivers/input/joystick/iforce/iforce-usb.c | 3 drivers/input/misc/cm109.c | 4 drivers/input/misc/ims-pcu.c | 4 drivers/input/misc/yealink.c | 4 drivers/input/mouse/alps.c | 72 + drivers/input/mouse/alps.h | 11 drivers/input/mouse/elan_i2c_core.c | 20 drivers/input/serio/i8042-x86ia64io.h | 7 drivers/input/tablet/hanwang.c | 3 drivers/input/tablet/kbtab.c | 3 drivers/input/touchscreen/sur40.c | 3 drivers/iommu/exynos-iommu.c | 8 drivers/iommu/intel-iommu.c | 2 drivers/media/usb/dvb-usb/dvb-usb-firmware.c | 22 drivers/misc/mei/bus-fixup.c | 14 drivers/misc/mei/init.c | 8 drivers/mmc/core/block.c | 1 drivers/mmc/core/mmc.c | 2 drivers/mmc/host/sdhci-of-arasan.c | 14 drivers/mmc/host/sdhci-of-at91.c | 19 drivers/mmc/host/sdhci-pci-core.c | 4 drivers/mmc/host/sdhci.c | 4 drivers/mmc/host/ushc.c | 3 drivers/net/ethernet/amd/xgbe/xgbe-common.h | 30 drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 20 drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 102 +- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 6 drivers/net/ethernet/broadcom/genet/bcmmii.c | 15 drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 4 drivers/net/ethernet/mellanox/mlx5/core/en.h | 4 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 8 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 4 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 72 + drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 5 drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 6 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 22 drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 drivers/net/ethernet/ti/Kconfig | 2 drivers/net/usb/qmi_wwan.c | 2 drivers/net/vrf.c | 4 drivers/net/wireless/ath/ath10k/hw.c | 2 drivers/net/wireless/marvell/mwifiex/pcie.c | 38 drivers/parport/share.c | 6 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 15 drivers/scsi/sd.c | 17 drivers/usb/class/usbtmc.c | 18 drivers/usb/core/config.c | 10 drivers/usb/core/hub.c | 2 drivers/usb/core/quirks.c | 8 drivers/usb/gadget/function/f_acm.c | 4 drivers/usb/gadget/function/f_uvc.c | 2 drivers/usb/misc/idmouse.c | 3 drivers/usb/misc/lvstest.c | 4 drivers/usb/misc/uss720.c | 5 drivers/usb/musb/musb_cppi41.c | 23 drivers/usb/serial/option.c | 17 drivers/usb/serial/qcserial.c | 2 drivers/usb/wusbcore/wa-hc.c | 3 drivers/uwb/hwa-rc.c | 3 drivers/uwb/i1480/dfu/usb.c | 3 drivers/vfio/vfio.c | 8 drivers/video/console/fbcon.c | 67 - drivers/xen/xen-acpi-processor.c | 34 fs/crypto/crypto.c | 10 fs/crypto/fname.c | 2 fs/crypto/fscrypt_private.h | 4 fs/crypto/keyinfo.c | 52 - fs/ext4/inline.c | 5 fs/ext4/xattr.c | 65 - fs/jbd2/journal.c | 22 fs/jbd2/revoke.c | 1 include/drm/drmP.h | 1 include/linux/ccp.h | 2 include/linux/iio/sw_device.h | 2 include/linux/netdevice.h | 29 include/linux/usb/quirks.h | 6 kernel/audit.c | 639 ++++++++----- kernel/audit.h | 9 kernel/auditsc.c | 6 net/ceph/osdmap.c | 1 net/core/dev.c | 81 + net/core/netclassid_cgroup.c | 32 net/core/sock.c | 16 net/ipv4/fib_frontend.c | 3 net/ipv4/tcp_input.c | 2 net/ipv4/tcp_minisocks.c | 1 net/ipv6/udp.c | 2 net/netlink/genetlink.c | 4 net/openvswitch/flow_netlink.c | 4 net/unix/garbage.c | 17 net/wireless/nl80211.c | 127 +- sound/core/seq/seq_clientmgr.c | 1 sound/core/seq/seq_fifo.c | 3 sound/core/seq/seq_memory.c | 17 sound/core/seq/seq_memory.h | 1 sound/pci/ctxfi/cthw20k1.c | 2 sound/pci/hda/patch_realtek.c | 2 128 files changed, 1470 insertions(+), 845 deletions(-)
Adrian Hunter (3):
mmc: sdhci: Do not disable interrupts while waiting for clock
mmc: sdhci-pci: Do not disable interrupts in sdhci_intel_set_power
mmc: block: Fix is_waiting_last_req set incorrectly
Alex Deucher (1):
drm/amdgpu: reinstate oland workaround for sclk
Alex Williamson (1):
vfio: Rework group release notifier warning
Alexander Potapenko (1):
ipv6: make sure to initialize sockc.tsflags before first use
Alexander Shishkin (1):
intel_th: Don't leak module refcount on failure to activate
Alexander Usyskin (1):
mei: don't wait for os version message reply
Andrey Ulanov (1):
net: unix: properly re-increment inflight counter of GC discarded candidates
Ankur Arora (1):
xen/acpi: upload PM state from init-domain to Xen
Anssi Hannula (1):
mmc: sdhci-of-arasan: fix incorrect timeout clock
Arnd Bergmann (1):
cpsw/netcp: cpts depends on posix_timers
Bin Liu (1):
usb: musb: cppi41: don't check early-TX-interrupt for Isoch transfer
Bjørn Mork (2):
qmi_wwan: add Dell DW5811e
USB: serial: qcserial: add Dell DW5811e
Brian Norris (1):
mwifiex: pcie: don't leak DMA buffers when removing
Chen-Yu Tsai (2):
clk: sunxi-ng: sun6i: Fix enable bit offset for hdmi-ddc module clock
clk: sunxi-ng: mp: Adjust parent rate for pre-dividers
Damien Le Moal (1):
scsi: sd: Check for unaligned partial completion
Dan Streetman (1):
xen: do not re-use pirq number cached in pci device msi msg data
Dan Williams (1):
USB: serial: option: add Quectel UC15, UC20, EC21, and EC25 modems
Daniel Borkmann (1):
socket, bpf: fix sk_filter use after free in sk_clone_lock
Daniel Vetter (1):
drm: reference count event->completion
Dave Jiang (1):
device-dax: fix pmd/pte fault fallback handling
David Ahern (1):
net: vrf: Reset rt6i_idev in local dst after put
Dmitry Torokhov (2):
iio: magnetometer: ak8974: remove incorrect __exit markups
auxdisplay: img-ascii-lcd: add missing sentinel entry in img_ascii_lcd_matches
Doug Berger (1):
net: bcmgenet: remove bcmgenet_internal_phy_setup()
Eric Biggers (3):
ext4: mark inode dirty after converting inline directory
fscrypt: remove broken support for detecting keyring key revocation
jbd2: don't leak memory if setting up journal fails
Eric Dumazet (4):
net: properly release sk_frag.page
ipv4: provide stronger user input validation in nl_fib_input()
tcp: initialize icsk_ack.lrcvtime at session start time
net: solve a NAPI race
Evan Quan (1):
drm/amd/amdgpu: add POLARIS12 PCI ID
Florian Fainelli (1):
net: bcmgenet: Do not suspend PHY if Wake-on-LAN is enabled
Gal Pressman (2):
net/mlx5e: Count GSO packets correctly
net/mlx5e: Count LRO packets correctly
Gary R Hook (1):
crypto: ccp - Assign DMA commands to the channel's CCP
Greg Kroah-Hartman (1):
Linux 4.10.7
Guenter Roeck (2):
usb: hub: Fix crash after failure to read BOS descriptor
mmc: core: Fix access to HS400-ES devices
Hui Wang (1):
ALSA: hda - Adding a group of pin definition to fix headset problem
Ilya Dryomov (1):
libceph: don't set weight to IN when OSD is destroyed
Jiri Slaby (1):
crypto: algif_hash - avoid zero-sized array
Johan Hovold (16):
Input: iforce - validate number of endpoints before using them
Input: ims-pcu - validate number of endpoints before using them
Input: hanwang - validate number of endpoints before using them
Input: yealink - validate number of endpoints before using them
Input: cm109 - validate number of endpoints before using them
Input: kbtab - validate number of endpoints before using them
Input: sur40 - validate number of endpoints before using them
USB: uss720: fix NULL-deref at probe
USB: lvtest: fix NULL-deref at probe
USB: idmouse: fix NULL-deref at probe
USB: wusbcore: fix NULL-deref at probe
USB: usbtmc: add missing endpoint sanity check
USB: usbtmc: fix probe error path
uwb: i1480-dfu: fix NULL-deref at probe
uwb: hwa-rc: fix NULL-deref at probe
mmc: ushc: fix NULL-deref at probe
Johannes Berg (1):
nl80211: fix dumpit error path RTNL deadlocks
K. Y. Srinivasan (2):
Drivers: hv: vmbus: Don't leak channel ids
Drivers: hv: vmbus: Don't leak memory when a channel is rescinded
Kai-Heng Feng (1):
Input: i8042 - add noloop quirk for Dell Embedded Box PC 3000
Koos Vriezen (1):
iommu/vt-d: Fix NULL pointer dereference in device_to_iommu
Kris Murphy (1):
openvswitch: Add missing case OVS_TUNNEL_KEY_ATTR_PAD
Lars-Peter Clausen (1):
iio: sw-device: Fix config group initialization
Lendacky, Thomas (2):
amd-xgbe: Fix jumbo MTU processing on newer hardware
amd-xgbe: Fix the ECC-related bit position definitions
Maor Gottlieb (1):
net/mlx5: Increase number of max QPs in default profile
Marek Szyprowski (2):
iommu/exynos: Block SYSMMU while invalidating FLPD cache iommu/exynos: Workaround FLPD cache flush issues for SYSMMU v5
Masaki Ota (2):
Input: ALPS - fix V8+ protocol handling (73 03 28)
Input: ALPS - fix trackstick button handling on V8 devices
Matjaz Hegedic (1):
Input: elan_i2c - add ASUS EeeBook X205TA special touchpad fw
Michael Engl (1):
iio: adc: ti_am335x_adc: fix fifo overrun recovery
Ming Lei (1):
blk-mq: don't complete un-started request in timeout handler
Neeraj Upadhyay (1):
arm64: kaslr: Fix up the kernel image alignment
Nicholas Piggin (1):
powerpc/64s: Fix idle wakeup potential to clobber registers
Nicolas Ferre (1):
ARM: at91: pm: cpu_idle: switch DDR to power-down mode
Oliver Neukum (1):
ACM gadget: fix endianness in notifications
Or Gerlitz (4):
net/openvswitch: Set the ipv6 source tunnel key address attribute correctly net/mlx5: Add missing entries for set/query rate limit commands net/mlx5e: Change the TC offload rule add/del code path to be per NIC or E-Switch net/mlx5e: Use the proper UAPI values when offloading TC vlan actions
Paul Blakey (1):
net/mlx5e: Avoid supporting udp tunnel port ndo for VF reps
Paul Moore (1):
audit: fix auditd/kernel connection state tracking
Prarit Bhargava (2):
hwrng: amd - Revert managed API changes
hwrng: geode - Revert managed API changes
Roderick Colenbrander (1):
HID: sony: Fix input device leak when connecting a DS4 twice using USB/BT
Roger Quadros (1):
usb: gadget: f_uvc: Fix SuperSpeed companion descriptor's wBytesPerInterval
Roi Dayan (1):
net/mlx5: E-Switch, Don't allow changing inline mode when flows are configured
Romain Izard (2):
mmc: sdhci-of-at91: Support external regulators Revert "ARM: at91/dt: sama5d2: Use new compatible for ohci node"
Ryan Hsu (1):
ath10k: fix incorrect wlan_mac_base in qca6174_regs
Samuel Thibault (1):
usb-core: Add LINEAR_FRAME_INTR_BINTERVAL USB quirk
Song Hongyan (1):
iio: hid-sensor-trigger: Change get poll value function order to avoid sensor properties losing after resume from S3
Stanislaw Gruszka (1):
genetlink: fix counting regression on ctrl_dumpfamily()
Stefan Brüns (1):
dvb-usb-firmware: don't do DMA on stack
Sudip Mukherjee (2):
parport: fix attempt to write duplicate procfiles
ppdev: fix registering same device name
Takashi Iwai (3):
ALSA: seq: Fix racy cell insertions during snd_seq_pool_done()
ALSA: ctxfi: Fix the incorrect check of dma_set_mask() call
fbcon: Fix vc attr at deinit
Tejun Heo (1):
cgroup, net_cls: iterate the fds of only the tasks which are being migrated
Theodore Ts'o (1):
ext4: lock the xattr block before checksuming it
Tomas Winkler (1):
mei: fix deadlock on mei reset
Vaidyanathan Srinivasan (1):
cpuidle: Validate cpu_dev in cpuidle_add_sysfs()
Viresh Kumar (1):
cpufreq: Restore policy min/max limits on CPU online
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 10 -SUBLEVEL = 6 +SUBLEVEL = 7 EXTRAVERSION = NAME = Fearless Coyote
arch/arm/boot/dts/sama5d2.dtsi +1 -1
@@ -266,7 +266,7 @@ }; usb1: ohci@00400000 { - compatible = "atmel,sama5d2-ohci", "usb-ohci"; + compatible = "atmel,at91rm9200-ohci", "usb-ohci"; reg = <0x00400000 0x100000>; interrupts = <41 IRQ_TYPE_LEVEL_HIGH 2>; clocks = <&uhphs_clk>, <&uhphs_clk>, <&uhpck>;
arch/arm/mach-at91/pm.c +17 -1
@@ -289,6 +289,22 @@ static void at91_ddr_standby(void)at91_ramc_write (1 ,AT91_DDRSDRC_LPR , saved_lpr1); } +static void sama5d3_ddr_standby (void ) +{ +u32 lpr0; +u32 saved_lpr0; + + saved_lpr0 =at91_ramc_read (0 ,AT91_DDRSDRC_LPR ); + lpr0 = saved_lpr0 & ~AT91_DDRSDRC_LPCB ; + lpr0 |=AT91_DDRSDRC_LPCB_POWER_DOWN ; + +at91_ramc_write (0 ,AT91_DDRSDRC_LPR , lpr0); + +cpu_do_idle (); + +at91_ramc_write (0 ,AT91_DDRSDRC_LPR , saved_lpr0); +} +/* We manage both DDRAM/SDRAM controllers, we need more than one value to * remember. */
@@ -323,7 +339,7 @@ static const struct of_device_id const ramc_ids[] __initconst = { { .compatible = "atmel,at91rm9200-sdramc", .data = at91rm9200_standby }, { .compatible = "atmel,at91sam9260-sdramc", .data = at91sam9_sdram_standby }, { .compatible = "atmel,at91sam9g45-ddramc", .data = at91_ddr_standby }, - { .compatible = "atmel,sama5d3-ddramc", .data = at91_ddr_standby }, + { .compatible = "atmel,sama5d3-ddramc", .data = sama5d3_ddr_standby }, {/*sentinel*/ } };
arch/arm64/kernel/kaslr.c +7 -3
@@ -131,11 +131,15 @@ u64 __init kaslr_early_init(u64 dt_phys, u64 modulo_offset)/* * The kernel Image should not extend across a 1GB/32MB/512MB alignment * boundary (for 4KB/16KB/64KB granule kernels, respectively). If this -* happens, increase the KASLR offset by the size of the kernel image. +* happens, increase the KASLR offset by the size of the kernel image +* rounded up by SWAPPER_BLOCK_SIZE. */ if ((((u64 )_text + offset + modulo_offset) >>SWAPPER_TABLE_SHIFT ) != - (((u64 )_end + offset + modulo_offset) >>SWAPPER_TABLE_SHIFT )) - offset = (offset + (u64)(_end - _text)) & mask; + (((u64 )_end + offset + modulo_offset) >>SWAPPER_TABLE_SHIFT )) { +u64 kimg_sz = _end - _text; + offset = (offset +round_up (kimg_sz,SWAPPER_BLOCK_SIZE )) + & mask; + }if (IS_ENABLED (CONFIG_KASAN ))/*
arch/powerpc/kernel/idle_book3s.S +17 -3
@@ -439,9 +439,23 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300) _GLOBAL(pnv_wakeup_tb_loss) ld r1,PACAR1(r13) /* - * Before entering any idle state, the NVGPRs are saved in the stack - * and they are restored before switching to the process context. Hence - * until they are restored, they are free to be used. + * Before entering any idle state, the NVGPRs are saved in the stack. + * If there was a state loss, or PACA_NAPSTATELOST was set, then the + * NVGPRs are restored. If we are here, it is likely that state is lost, + * but not guaranteed -- neither ISA207 nor ISA300 tests to reach + * here are the same as the test to restore NVGPRS: + * PACA_THREAD_IDLE_STATE test for ISA207, PSSCR test for ISA300, + * and SRR1 test for restoring NVGPRs. + * + * We are about to clobber NVGPRs now, so set NAPSTATELOST to + * guarantee they will always be restored. This might be tightened + * with careful reading of specs (particularly for ISA300) but this + * is already a slow wakeup path and it's simpler to be safe. + */ + li r0,1 + stb r0,PACA_NAPSTATELOST(r13) + + /* * * Save SRR1 and LR in NVGPRs as they might be clobbered in * opal_call() (called in CHECK_HMI_INTERRUPT). SRR1 is required
arch/x86/pci/xen.c +7 -16
@@ -234,23 +234,14 @@ static int xen_hvm_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)return 1 ;for_each_pci_msi_entry (msidesc, dev) { -__pci_read_msi_msg (msidesc, &msg); - pirq =MSI_ADDR_EXT_DEST_ID (msg.address_hi) | - ((msg.address_lo >>MSI_ADDR_DEST_ID_SHIFT ) &0xff ); -if (msg.data !=XEN_PIRQ_MSI_DATA || -xen_irq_from_pirq (pirq) <0 ) { - pirq =xen_allocate_pirq_msi (dev, msidesc); -if (pirq <0 ) { - irq = -ENODEV ; - goto error; - } -xen_msi_compose_msg (dev, pirq, &msg); -__pci_write_msi_msg (msidesc, &msg); -dev_dbg (&dev->dev,"xen: msi bound to pirq=%d\n" , pirq); - }else { -dev_dbg (&dev->dev, -"xen: msi already bound to pirq=%d\n" , pirq); + pirq =xen_allocate_pirq_msi (dev, msidesc); +if (pirq <0 ) { + irq = -ENODEV ; + goto error; } +xen_msi_compose_msg (dev, pirq, &msg); +__pci_write_msi_msg (msidesc, &msg); +dev_dbg (&dev->dev,"xen: msi bound to pirq=%d\n" , pirq); irq = xen_bind_pirq_msi_to_irq(dev, msidesc, pirq, (type == PCI_CAP_ID_MSI) ? nvec : 1, (type == PCI_CAP_ID_MSIX) ?
block/blk-mq.c +1 -10
@@ -678,17 +678,8 @@ static void blk_mq_check_expired(struct blk_mq_hw_ctx *hctx, {struct blk_mq_timeout_data *data = priv; -if (!test_bit (REQ_ATOM_STARTED , &rq->atomic_flags)) { -/* -* If a request wasn't started before the queue was -* marked dying, kill it here or it'll go unnoticed. -*/ -if (unlikely (blk_queue_dying (rq->q))) { - rq->errors = -EIO ; -blk_mq_end_request (rq, rq->errors); - } +if (!test_bit (REQ_ATOM_STARTED , &rq->atomic_flags))return ; - }if (time_after_eq (jiffies, rq->deadline)) {if (!blk_mark_rq_complete (rq))
crypto/algif_hash.c +1 -1
@@ -245,7 +245,7 @@ static int hash_accept(struct socket *sock, struct socket *newsock, int flags)struct alg_sock *ask =alg_sk (sk);struct hash_ctx *ctx = ask->private;struct ahash_request *req = &ctx->req; -char state[crypto_ahash_statesize (crypto_ahash_reqtfm (req))]; +char state[crypto_ahash_statesize (crypto_ahash_reqtfm (req)) ? :1 ];struct sock *sk2;struct alg_sock *ask2;struct hash_ctx *ctx2;
drivers/auxdisplay/img-ascii-lcd.c +1 -0
@@ -218,6 +218,7 @@ static const struct of_device_id img_ascii_lcd_matches[] = { { .compatible = "img,boston-lcd", .data = &boston_config }, { .compatible = "mti,malta-lcd", .data = &malta_config }, { .compatible = "mti,sead3-lcd", .data = &sead3_config }, + {/* sentinel */ } };/**
drivers/char/hw_random/amd-rng.c +34 -8
73 lines not on this page · raw message
drivers/char/hw_random/geode-rng.c +35 -15
74 lines not on this page · raw message
drivers/char/ppdev.c +9 -2
@@ -84,11 +84,14 @@ struct pp_struct {struct ieee1284_info state;struct ieee1284_info saved_state;long default_inactivity; +int index; };/* should we use PARDEVICE_MAX here? */ static struct device *devices[PARPORT_MAX ]; +static DEFINE_IDA (ida_index); +/* pp_struct.flags bitfields */ #define PP_CLAIMED (1<<0)#define PP_EXCL (1<<1)
@@ -290,7 +293,7 @@ static int register_device(int minor, struct pp_struct *pp)struct pardevice *pdev =NULL ;char *name;struct pardev_cb ppdev_cb; -int rc =0 ; +int rc =0 , index; name =kasprintf (GFP_KERNEL ,CHRDEV "%x" , minor);if (name ==NULL )
@@ -303,20 +306,23 @@ static int register_device(int minor, struct pp_struct *pp) goto err; } + index =ida_simple_get (&ida_index,0 ,0 ,GFP_KERNEL );memset (&ppdev_cb,0 ,sizeof (ppdev_cb)); ppdev_cb.irq_func = pp_irq; ppdev_cb.flags = (pp->flags &PP_EXCL ) ?PARPORT_FLAG_EXCL :0 ; ppdev_cb.private = pp; - pdev =parport_register_dev_model (port, name, &ppdev_cb, minor); + pdev =parport_register_dev_model (port, name, &ppdev_cb, index);parport_put_port (port);if (!pdev) {pr_warn ("%s: failed to register device!\n" , name); rc = -ENXIO ; +ida_simple_remove (&ida_index, index); goto err; } pp->pdev = pdev; + pp->index = index;dev_dbg (&pdev->dev,"registered pardevice\n" ); err:kfree (name);
@@ -755,6 +761,7 @@ static int pp_release(struct inode *inode, struct file *file)if (pp->pdev) {parport_unregister_device (pp->pdev); +ida_simple_remove (&ida_index, pp->index); pp->pdev =NULL ;pr_debug (CHRDEV "%x: unregistered pardevice\n" , minor); }
drivers/clk/sunxi-ng/ccu-sun6i-a31.c +1 -1
@@ -608,7 +608,7 @@ static SUNXI_CCU_M_WITH_MUX_GATE(hdmi_clk, "hdmi", lcd_ch1_parents,0x150 ,0 ,4 ,24 ,2 ,BIT (31 ), CLK_SET_RATE_PARENT); -static SUNXI_CCU_GATE(hdmi_ddc_clk, "hdmi-ddc", "osc24M", 0x150, BIT(31), 0); +static SUNXI_CCU_GATE(hdmi_ddc_clk, "hdmi-ddc", "osc24M", 0x150, BIT(30), 0); static SUNXI_CCU_GATE(ps_clk, "ps", "lcd1-ch1", 0x140, BIT(31), 0);
drivers/clk/sunxi-ng/ccu_mp.c +8 -0
@@ -85,6 +85,10 @@ static unsigned long ccu_mp_recalc_rate(struct clk_hw *hw,unsigned int m, p;u32 reg; +/* Adjust parent_rate according to pre-dividers */ +ccu_mux_helper_adjust_parent_for_prediv (&cmp->common, &cmp->mux, +-1 , &parent_rate); + reg =readl (cmp->common.base + cmp->common.reg); m = reg >> cmp->m.shift;
@@ -114,6 +118,10 @@ static int ccu_mp_set_rate(struct clk_hw *hw, unsigned long rate,unsigned int m, p;u32 reg; +/* Adjust parent_rate according to pre-dividers */ +ccu_mux_helper_adjust_parent_for_prediv (&cmp->common, &cmp->mux, +-1 , &parent_rate); + max_m = cmp->m.max ?:1 << cmp->m.width; max_p = cmp->p.max ?:1 << ((1 << cmp->p.width) -1 );
drivers/cpufreq/cpufreq.c +3 -0
@@ -1190,6 +1190,9 @@ static int cpufreq_online(unsigned int cpu)for_each_cpu (j, policy->related_cpus)per_cpu (cpufreq_cpu_data, j) = policy;write_unlock_irqrestore (&cpufreq_driver_lock, flags); + }else { + policy->min = policy->user_policy.min; + policy->max = policy->user_policy.max; }if (cpufreq_driver->get && !cpufreq_driver->setpolicy) {
drivers/cpuidle/sysfs.c +12 -0
@@ -615,6 +615,18 @@ int cpuidle_add_sysfs(struct cpuidle_device *dev)struct device *cpu_dev =get_cpu_device ((unsigned long )dev->cpu);int error; +/* +* Return if cpu_device is not setup for this CPU. +* +* This could happen if the arch did not set up cpu_device +* since this CPU is not in cpu_present mask and the +* driver did not send a correct CPU mask during registration. +* Without this check we would end up passing bogus +* value for &cpu_dev->kobj in kobject_init_and_add() +*/ +if (!cpu_dev) +return -ENODEV ; + kdev =kzalloc (sizeof (*kdev),GFP_KERNEL );if (!kdev)return -ENOMEM ;
drivers/crypto/ccp/ccp-dev.c +4 -1
@@ -283,11 +283,14 @@ EXPORT_SYMBOL_GPL(ccp_version);*/ int ccp_enqueue_cmd (struct ccp_cmd *cmd) { -struct ccp_device *ccp =ccp_get_device (); +struct ccp_device *ccp;unsigned long flags;unsigned int i;int ret; +/* Some commands might need to be sent to a specific device */ + ccp = cmd->ccp ? cmd->ccp :ccp_get_device (); +if (!ccp)return -ENODEV ;
drivers/crypto/ccp/ccp-dmaengine.c +1 -0
@@ -390,6 +390,7 @@ static struct ccp_dma_desc *ccp_create_desc(struct dma_chan *dma_chan, goto err; ccp_cmd = &cmd->ccp_cmd; + ccp_cmd->ccp = chan->ccp; ccp_pt = &ccp_cmd->u.passthru_nomap; ccp_cmd->flags =CCP_CMD_MAY_BACKLOG ; ccp_cmd->flags |=CCP_CMD_PASSTHRU_NO_DMA_MAP ;
drivers/dax/dax.c +15 -0
@@ -427,6 +427,7 @@ static int __dax_dev_fault(struct dax_dev *dax_dev, struct vm_area_struct *vma,int rc =VM_FAULT_SIGBUS ;phys_addr_t phys;pfn_t pfn; +unsigned int fault_size =PAGE_SIZE ;if (check_vma (dax_dev, vma, __func__))return VM_FAULT_SIGBUS ;
@@ -437,6 +438,9 @@ static int __dax_dev_fault(struct dax_dev *dax_dev, struct vm_area_struct *vma,return VM_FAULT_SIGBUS ; } +if (fault_size != dax_region->align) +return VM_FAULT_SIGBUS ; + phys =pgoff_to_phys (dax_dev, vmf->pgoff,PAGE_SIZE );if (phys ==-1 ) { dev_dbg(dev, "%s: phys_to_pgoff(%#lx) failed\n", __func__,
@@ -482,6 +486,7 @@ static int __dax_dev_pmd_fault(struct dax_dev *dax_dev,phys_addr_t phys;pgoff_t pgoff;pfn_t pfn; +unsigned int fault_size =PMD_SIZE ;if (check_vma (dax_dev, vma, __func__))return VM_FAULT_SIGBUS ;
@@ -498,6 +503,16 @@ static int __dax_dev_pmd_fault(struct dax_dev *dax_dev,return VM_FAULT_SIGBUS ; } +if (fault_size < dax_region->align) +return VM_FAULT_SIGBUS ; +else if (fault_size > dax_region->align) +return VM_FAULT_FALLBACK ; + +/* if we are outside of the VMA */ +if (pmd_addr < vma->vm_start || + (pmd_addr +PMD_SIZE ) > vma->vm_end) +return VM_FAULT_SIGBUS ; + pgoff =linear_page_index (vma, pmd_addr); phys =pgoff_to_phys (dax_dev, pgoff,PMD_SIZE );if (phys ==-1 ) {
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -0
@@ -424,6 +424,7 @@ static const struct pci_device_id pciidlist[] = { {0x1002, 0x6985, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12}, {0x1002, 0x6986, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12}, {0x1002, 0x6987, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12}, + {0x1002, 0x6995, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12}, {0x1002, 0x699F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12}, {0, 0, 0}
drivers/gpu/drm/amd/amdgpu/si_dpm.c +7 -3
@@ -3498,9 +3498,13 @@ static void si_apply_state_adjust_rules(struct amdgpu_device *adev, max_sclk =75000 ; } }else if (adev->asic_type ==CHIP_OLAND ) { -if ((adev->pdev->device ==0x6604 ) && - (adev->pdev->subsystem_vendor ==0x1028 ) && - (adev->pdev->subsystem_device ==0x066F )) { +if ((adev->pdev->revision ==0xC7 ) || + (adev->pdev->revision ==0x80 ) || + (adev->pdev->revision ==0x81 ) || + (adev->pdev->revision ==0x83 ) || + (adev->pdev->revision ==0x87 ) || + (adev->pdev->device ==0x6604 ) || + (adev->pdev->device ==0x6605 )) { max_sclk =75000 ; } }
drivers/gpu/drm/drm_atomic_helper.c +11 -0
@@ -1389,6 +1389,15 @@ static int stall_checks(struct drm_crtc *crtc, bool nonblock)return ret <0 ? ret :0 ; } +void release_crtc_commit (struct completion *completion) +{ +struct drm_crtc_commit *commit =container_of (completion, +typeof (*commit), + flip_done); + +drm_crtc_commit_put (commit); +} +/** * drm_atomic_helper_setup_commit - setup possibly nonblocking commit * @state: new modeset state to be committed
@@ -1481,6 +1490,8 @@ int drm_atomic_helper_setup_commit(struct drm_atomic_state *state, } crtc_state->event->base.completion = &commit->flip_done; + crtc_state->event->base.completion_release = release_crtc_commit; +drm_crtc_commit_get (commit); }return 0 ;
drivers/gpu/drm/drm_fops.c +1 -1
@@ -689,8 +689,8 @@ void drm_send_event_locked(struct drm_device *dev, struct drm_pending_event *e)assert_spin_locked (&dev->event_lock);if (e->completion) { -/* ->completion might disappear as soon as it signalled. */ complete_all (e->completion); + e->completion_release (e->completion); e->completion =NULL ; }
drivers/hid/hid-sony.c +2 -0
@@ -2632,6 +2632,8 @@ static int sony_input_configured(struct hid_device *hdev,sony_leds_remove (sc);if (sc->quirks &SONY_BATTERY_SUPPORT )sony_battery_remove (sc); +if (sc->touchpad) +sony_unregister_touchpad (sc);sony_cancel_work_sync (sc);kfree (sc->output_report_dmabuf);sony_remove_dev_list (sc);
drivers/hv/channel.c +8 -5
@@ -506,12 +506,15 @@ int vmbus_teardown_gpadl(struct vmbus_channel *channel, u32 gpadl_handle)wait_for_completion (&info->waitevent); -if (channel->rescind) { - ret = -ENODEV ; - goto post_msg_err; - } - post_msg_err: +/* +* If the channel has been rescinded; +* we will be awakened by the rescind +* handler; set the error code to zero so we don't leak memory. +*/ +if (channel->rescind) + ret =0 ; +spin_lock_irqsave (&vmbus_connection.channelmsg_lock, flags);list_del (&info->msglistentry);spin_unlock_irqrestore (&vmbus_connection.channelmsg_lock, flags);
drivers/hv/channel_mgmt.c +1 -0
@@ -779,6 +779,7 @@ static void vmbus_onoffer(struct vmbus_channel_message_header *hdr)/* Allocate the channel object and save this offer. */ newchannel =alloc_channel ();if (!newchannel) { +vmbus_release_relid (offer->child_relid);pr_err ("Unable to allocate channel object\n" );return ; }
drivers/hwtracing/intel_th/core.c +3 -1
@@ -221,8 +221,10 @@ static int intel_th_output_activate(struct intel_th_device *thdev)else intel_th_trace_enable (thdev); -if (ret) +if (ret) {pm_runtime_put (&thdev->dev); +module_put (thdrv->driver.owner); + }return ret; }
drivers/iio/adc/ti_am335x_adc.c +12 -1
@@ -169,7 +169,9 @@ static irqreturn_t tiadc_irq_h(int irq, void *private) {struct iio_dev *indio_dev = private;struct tiadc_device *adc_dev =iio_priv (indio_dev); -unsigned int status, config; +unsigned int status, config, adc_fsm; +unsigned short count =0 ; + status =tiadc_readl (adc_dev,REG_IRQSTATUS );/*
@@ -183,6 +185,15 @@ static irqreturn_t tiadc_irq_h(int irq, void *private)tiadc_writel (adc_dev,REG_CTRL , config);tiadc_writel (adc_dev,REG_IRQSTATUS ,IRQENB_FIFO1OVRRUN |IRQENB_FIFO1UNDRFLW |IRQENB_FIFO1THRES ); + +/* wait for idle state. +* ADC needs to finish the current conversion +* before disabling the module +*/ +do { + adc_fsm =tiadc_readl (adc_dev,REG_ADCFSM ); + }while (adc_fsm !=0x10 && count++ <100 ); +tiadc_writel (adc_dev,REG_CTRL , (config |CNTRLREG_TSCSSENB ));return IRQ_HANDLED ; }else if (status &IRQENB_FIFO1THRES ) {
drivers/iio/common/hid-sensors/hid-sensor-trigger.c +3 -3
@@ -51,8 +51,6 @@ static int _hid_sensor_power_state(struct hid_sensor_common *st, bool state) st->report_state.report_id, st->report_state.index, HID_USAGE_SENSOR_PROP_REPORTING_STATE_ALL_EVENTS_ENUM); - - poll_value =hid_sensor_read_poll_value (st); }else {int val;
@@ -89,7 +87,9 @@ static int _hid_sensor_power_state(struct hid_sensor_common *st, bool state)sensor_hub_get_feature (st->hsdev, st->power_state.report_id, st->power_state.index,sizeof (state_val), &state_val); -if (state && poll_value) +if (state) + poll_value =hid_sensor_read_poll_value (st); +if (poll_value >0 )msleep_interruptible (poll_value *2 );return 0 ;
drivers/iio/magnetometer/ak8974.c +2 -2
@@ -767,7 +767,7 @@ static int ak8974_probe(struct i2c_client *i2c,return ret; } -static int __exit ak8974_remove(struct i2c_client *i2c) +static int ak8974_remove (struct i2c_client *i2c) {struct iio_dev *indio_dev =i2c_get_clientdata (i2c);struct ak8974 *ak8974 =iio_priv (indio_dev);
@@ -849,7 +849,7 @@ static struct i2c_driver ak8974_driver = { .of_match_table = of_match_ptr(ak8974_of_match), }, .probe = ak8974_probe, - .remove = __exit_p(ak8974_remove), + .remove = ak8974_remove, .id_table = ak8974_id, };module_i2c_driver (ak8974_driver);
drivers/input/joystick/iforce/iforce-usb.c +3 -0
@@ -141,6 +141,9 @@ static int iforce_usb_probe(struct usb_interface *intf, interface = intf->cur_altsetting; +if (interface->desc.bNumEndpoints <2 ) +return -ENODEV ; + epirq = &interface->endpoint[0 ].desc; epout = &interface->endpoint[1 ].desc;
drivers/input/misc/cm109.c +4 -0
@@ -700,6 +700,10 @@ static int cm109_usb_probe(struct usb_interface *intf,int error = -ENOMEM ; interface = intf->cur_altsetting; + +if (interface->desc.bNumEndpoints <1 ) +return -ENODEV ; + endpoint = &interface->endpoint[0 ].desc;if (!usb_endpoint_is_int_in (endpoint))
drivers/input/misc/ims-pcu.c +4 -0
@@ -1667,6 +1667,10 @@ static int ims_pcu_parse_cdc_data(struct usb_interface *intf, struct ims_pcu *pcreturn -EINVAL ; alt = pcu->ctrl_intf->cur_altsetting; + +if (alt->desc.bNumEndpoints <1 ) +return -ENODEV ; + pcu->ep_ctrl = &alt->endpoint[0 ].desc; pcu->max_ctrl_size =usb_endpoint_maxp (pcu->ep_ctrl);
drivers/input/misc/yealink.c +4 -0
@@ -875,6 +875,10 @@ static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id)int ret, pipe, i; interface = intf->cur_altsetting; + +if (interface->desc.bNumEndpoints <1 ) +return -ENODEV ; + endpoint = &interface->endpoint[0 ].desc;if (!usb_endpoint_is_int_in (endpoint))return -ENODEV ;
drivers/input/mouse/alps.c +52 -20
122 lines not on this page · raw message
drivers/input/mouse/alps.h +11 -0
@@ -54,6 +54,16 @@ enum SS4_PACKET_ID {#define SS4_MASK_NORMAL_BUTTONS 0x07 +#define SS4PLUS_COUNT_PER_ELECTRODE 128 +#define SS4PLUS_NUMSENSOR_XOFFSET 16 +#define SS4PLUS_NUMSENSOR_YOFFSET 5 +#define SS4PLUS_MIN_PITCH_MM 37 + +#define IS_SS4PLUS_DEV (_b) (((_b[0]) == 0x73) && \ + ((_b[1]) == 0x03) && \ + ((_b[2]) == 0x28) \ + ) +#define SS4_IS_IDLE_V2 (_b) (((_b[0]) == 0x18) && \ ((_b[1]) == 0x10) && \ ((_b[2]) == 0x00) && \
@@ -283,6 +293,7 @@ struct alps_data {int addr_command;u16 proto_version;u8 byte0, mask0; +u8 dev_id[3 ];u8 fw_ver[3 ];int flags;int x_max;
drivers/input/mouse/elan_i2c_core.c +11 -9
@@ -218,17 +218,19 @@ static int elan_query_product(struct elan_tp_data *data)static int elan_check_ASUS_special_fw (struct elan_tp_data *data) { -if (data->ic_type !=0x0E ) -return false; - -switch (data->product_id) { - case 0x05 ... 0x07: -case 0x09 : -case 0x13 : +if (data->ic_type ==0x0E ) { +switch (data->product_id) { + case 0x05 ... 0x07: +case 0x09 : +case 0x13 : +return true; + } + }else if (data->ic_type ==0x08 && data->product_id ==0x26 ) { +/* ASUS EeeBook X205TA */ return true; -default : -return false; } + +return false; }static int __elan_initialize (struct elan_tp_data *data)
drivers/input/serio/i8042-x86ia64io.h +7 -0
@@ -120,6 +120,13 @@ static const struct dmi_system_id __initconst i8042_dmi_noloop_table[] = { }, }, { +/* Dell Embedded Box PC 3000 */ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Dell Inc." ), + DMI_MATCH(DMI_PRODUCT_NAME, "Embedded Box PC 3000"), + }, + }, + {/* OQO Model 01 */ .matches = { DMI_MATCH(DMI_SYS_VENDOR, "OQO"),
drivers/input/tablet/hanwang.c +3 -0
@@ -340,6 +340,9 @@ static int hanwang_probe(struct usb_interface *intf, const struct usb_device_idint error;int i; +if (intf->cur_altsetting->desc.bNumEndpoints <1 ) +return -ENODEV ; + hanwang =kzalloc (sizeof (struct hanwang ),GFP_KERNEL ); input_dev =input_allocate_device ();if (!hanwang || !input_dev) {
drivers/input/tablet/kbtab.c +3 -0
@@ -122,6 +122,9 @@ static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *istruct input_dev *input_dev;int error = -ENOMEM ; +if (intf->cur_altsetting->desc.bNumEndpoints <1 ) +return -ENODEV ; + kbtab =kzalloc (sizeof (struct kbtab ),GFP_KERNEL ); input_dev =input_allocate_device ();if (!kbtab || !input_dev)
drivers/input/touchscreen/sur40.c +3 -0
@@ -527,6 +527,9 @@ static int sur40_probe(struct usb_interface *interface,if (iface_desc->desc.bInterfaceClass !=0xFF )return -ENODEV ; +if (iface_desc->desc.bNumEndpoints <5 ) +return -ENODEV ; +/* Use endpoint #4 (0x86). */ endpoint = &iface_desc->endpoint[4 ].desc;if (endpoint->bEndpointAddress !=TOUCH_ENDPOINT )
drivers/iommu/exynos-iommu.c +7 -1
@@ -509,7 +509,13 @@ static void sysmmu_tlb_invalidate_flpdcache(struct sysmmu_drvdata *data,spin_lock_irqsave (&data->lock, flags);if (data->active && data->version >=MAKE_MMU_VER (3 ,3 )) {clk_enable (data->clk_master); -__sysmmu_tlb_invalidate_entry (data, iova,1 ); +if (sysmmu_block (data)) { +if (data->version >=MAKE_MMU_VER (5 ,0 )) +__sysmmu_tlb_invalidate (data); +else +__sysmmu_tlb_invalidate_entry (data, iova,1 ); +sysmmu_unblock (data); + }clk_disable (data->clk_master); }spin_unlock_irqrestore (&data->lock, flags);
drivers/iommu/intel-iommu.c +1 -1
@@ -915,7 +915,7 @@ static struct intel_iommu *device_to_iommu(struct device *dev, u8 *bus, u8 *devf* which we used for the IOMMU lookup. Strictly speaking * we could do this for all PCI devices; we only need to * get the BDF# from the scope table for ACPI matches. */ -if (pdev->is_virtfn) +if (pdev && pdev->is_virtfn) goto got_pdev; *bus = drhd->devices[i].bus;
drivers/media/usb/dvb-usb/dvb-usb-firmware.c +12 -10
@@ -36,16 +36,18 @@ static int usb_cypress_writemem(struct usb_device *udev,u16 addr,u8 *data, u8 leint usb_cypress_load_firmware (struct usb_device *udev,const struct firmware *fw,int type) {struct hexline *hx; -u8 reset; -int ret,pos=0 ; +u8 *buf; +int ret, pos =0 ; +u16 cpu_cs_register = cypress[type].cpu_cs_register; - hx =kmalloc (sizeof (*hx),GFP_KERNEL ); -if (!hx) + buf =kmalloc (sizeof (*hx),GFP_KERNEL ); +if (!buf)return -ENOMEM ; + hx = (struct hexline *)buf;/* stop the CPU */ - reset =1 ; -if ((ret =usb_cypress_writemem (udev,cypress[type].cpu_cs_register,&reset,1 )) !=1 ) + buf[0 ] =1 ; +if (usb_cypress_writemem (udev, cpu_cs_register, buf,1 ) !=1 )err ("could not stop the USB controller CPU." );while ((ret =dvb_usb_get_hexline (fw, hx, &pos)) >0 ) {
@@ -61,21 +63,21 @@ int usb_cypress_load_firmware(struct usb_device *udev, const struct firmware *fw }if (ret <0 ) {err ("firmware download failed at %d with %d" ,pos,ret); -kfree (hx); +kfree (buf);return ret; }if (ret ==0 ) {/* restart the CPU */ - reset =0 ; -if (ret ||usb_cypress_writemem (udev,cypress[type].cpu_cs_register,&reset,1 ) !=1 ) { + buf[0 ] =0 ; +if (usb_cypress_writemem (udev, cpu_cs_register, buf,1 ) !=1 ) {err ("could not restart the USB controller CPU." ); ret = -EINVAL ; } }else ret = -EIO ; -kfree (hx); +kfree (buf);return ret; }
drivers/misc/mei/bus-fixup.c +2 -12
@@ -112,11 +112,9 @@ struct mkhi_msg {static int mei_osver (struct mei_cl_device *cldev) { -int ret;const size_t size =sizeof (struct mkhi_msg_hdr ) +sizeof (struct mkhi_fwcaps ) +sizeof (struct mei_os_ver ); -size_t length =8 ;char buf[size];struct mkhi_msg *req;struct mkhi_fwcaps *fwcaps;
@@ -137,15 +135,7 @@ static int mei_osver(struct mei_cl_device *cldev) os_ver = (struct mei_os_ver *)fwcaps->data; os_ver->os_type =OSTYPE_LINUX ; - ret =__mei_cl_send (cldev->cl, buf, size, mode); -if (ret <0 ) -return ret; - - ret =__mei_cl_recv (cldev->cl, buf, length,0 ); -if (ret <0 ) -return ret; - -return 0 ; +return __mei_cl_send (cldev->cl, buf, size, mode); }static void mei_mkhi_fix (struct mei_cl_device *cldev)
@@ -160,7 +150,7 @@ static void mei_mkhi_fix(struct mei_cl_device *cldev)return ; ret =mei_osver (cldev); -if (ret) +if (ret <0 )dev_err (&cldev->dev,"OS version command failed %d\n" , ret);mei_cldev_disable (cldev);
drivers/misc/mei/init.c +6 -2
@@ -124,8 +124,6 @@ int mei_reset(struct mei_device *dev)mei_clear_interrupts (dev); -mei_synchronize_irq (dev); -/* we're already in reset, cancel the init timer * if the reset was called due the hbm protocol error * we need to call it before hw start
@@ -304,6 +302,9 @@ static void mei_reset_work(struct work_struct *work) container_of(work, struct mei_device, reset_work);int ret; +mei_clear_interrupts (dev); +mei_synchronize_irq (dev); +mutex_lock (&dev->device_lock); ret =mei_reset (dev);
@@ -328,6 +329,9 @@ void mei_stop(struct mei_device *dev)mei_cancel_work (dev); +mei_clear_interrupts (dev); +mei_synchronize_irq (dev); +mutex_lock (&dev->device_lock); dev->dev_state =MEI_DEV_POWER_DOWN ;
drivers/mmc/core/block.c +1 -0
@@ -1791,6 +1791,7 @@ int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) ret =mmc_blk_issue_flush (mq, req); }else { ret =mmc_blk_issue_rw_rq (mq, req); + card->host->context_info.is_waiting_last_req = false; } out:
drivers/mmc/core/mmc.c +1 -1
@@ -1706,7 +1706,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, err =mmc_select_hs400 (card);if (err) goto free_card; - }else { + }else if (!mmc_card_hs400es (card)) {/* Select the desired bus width optionally */ err =mmc_select_bus_width (card);if (err >0 &&mmc_card_hs (card)) {
drivers/mmc/host/sdhci-of-arasan.c +5 -9
@@ -28,13 +28,9 @@#include "sdhci-pltfm.h" #include <linux/of.h> -#define SDHCI_ARASAN_CLK_CTRL_OFFSET 0x2c#define SDHCI_ARASAN_VENDOR_REGISTER 0x78#define VENDOR_ENHANCED_STROBE BIT(0) -#define CLK_CTRL_TIMEOUT_SHIFT 16 -#define CLK_CTRL_TIMEOUT_MASK (0xf << CLK_CTRL_TIMEOUT_SHIFT) -#define CLK_CTRL_TIMEOUT_MIN_EXP 13#define PHY_CLK_TOO_SLOW_HZ 400000
@@ -163,15 +159,15 @@ static int sdhci_arasan_syscon_write(struct sdhci_host *host,static unsigned int sdhci_arasan_get_timeout_clock (struct sdhci_host *host) { -u32 div;unsigned long freq;struct sdhci_pltfm_host *pltfm_host =sdhci_priv (host); - div =readl (host->ioaddr +SDHCI_ARASAN_CLK_CTRL_OFFSET ); - div = (div &CLK_CTRL_TIMEOUT_MASK ) >>CLK_CTRL_TIMEOUT_SHIFT ; +/* SDHCI timeout clock is in kHz */ + freq =DIV_ROUND_UP (clk_get_rate (pltfm_host->clk),1000 ); - freq =clk_get_rate (pltfm_host->clk); - freq /=1 << (CLK_CTRL_TIMEOUT_MIN_EXP + div); +/* or in MHz */ +if (host->caps &SDHCI_TIMEOUT_CLK_UNIT ) + freq =DIV_ROUND_UP (freq,1000 );return freq; }
drivers/mmc/host/sdhci-of-at91.c +19 -0
@@ -85,11 +85,30 @@ static void sdhci_at91_set_clock(struct sdhci_host *host, unsigned int clock)sdhci_writew (host, clk,SDHCI_CLOCK_CONTROL ); } +/* +* In this specific implementation of the SDHCI controller, the power register +* needs to have a valid voltage set even when the power supply is managed by +* an external regulator. +*/ +static void sdhci_at91_set_power (struct sdhci_host *host,unsigned char mode, +unsigned short vdd) +{ +if (!IS_ERR (host->mmc->supply.vmmc)) { +struct mmc_host *mmc = host->mmc; + +spin_unlock_irq (&host->lock); +mmc_regulator_set_ocr (mmc, mmc->supply.vmmc, vdd); +spin_lock_irq (&host->lock); + } +sdhci_set_power_noreg (host, mode, vdd); +} +static const struct sdhci_ops sdhci_at91_sama5d2_ops = { .set_clock = sdhci_at91_set_clock, .set_bus_width = sdhci_set_bus_width, .reset = sdhci_reset, .set_uhs_signaling = sdhci_set_uhs_signaling, + .set_power = sdhci_at91_set_power, };static const struct sdhci_pltfm_data soc_data_sama5d2 = {
drivers/mmc/host/sdhci-pci-core.c +4 -0
@@ -452,6 +452,8 @@ static void sdhci_intel_set_power(struct sdhci_host *host, unsigned char mode,if (mode ==MMC_POWER_OFF )return ; +spin_unlock_irq (&host->lock); +/* * Bus power might not enable after D3 -> D0 transition due to the * present state not yet having propagated. Retry for up to 2ms.
@@ -464,6 +466,8 @@ static void sdhci_intel_set_power(struct sdhci_host *host, unsigned char mode, reg |=SDHCI_POWER_ON ;sdhci_writeb (host, reg,SDHCI_POWER_CONTROL ); } + +spin_lock_irq (&host->lock); }static const struct sdhci_ops sdhci_intel_byt_ops = {
drivers/mmc/host/sdhci.c +3 -1
@@ -1362,7 +1362,9 @@ void sdhci_enable_clk(struct sdhci_host *host, u16 clk)return ; } timeout--; -mdelay (1 ); +spin_unlock_irq (&host->lock); +usleep_range (900 ,1100 ); +spin_lock_irq (&host->lock); } clk |=SDHCI_CLOCK_CARD_EN ;
drivers/mmc/host/ushc.c +3 -0
@@ -426,6 +426,9 @@ static int ushc_probe(struct usb_interface *intf, const struct usb_device_id *idstruct ushc_data *ushc;int ret; +if (intf->cur_altsetting->desc.bNumEndpoints <1 ) +return -ENODEV ; + mmc =mmc_alloc_host (sizeof (struct ushc_data ), &intf->dev);if (mmc ==NULL )return -ENOMEM ;
drivers/net/ethernet/amd/xgbe/xgbe-common.h +16 -14
@@ -984,29 +984,29 @@#define XP_ECC_CNT1_DESC_DED_WIDTH 8#define XP_ECC_CNT1_DESC_SEC_INDEX 0#define XP_ECC_CNT1_DESC_SEC_WIDTH 8 -#define XP_ECC_IER_DESC_DED_INDEX 0 +#define XP_ECC_IER_DESC_DED_INDEX 5#define XP_ECC_IER_DESC_DED_WIDTH 1 -#define XP_ECC_IER_DESC_SEC_INDEX 1 +#define XP_ECC_IER_DESC_SEC_INDEX 4#define XP_ECC_IER_DESC_SEC_WIDTH 1 -#define XP_ECC_IER_RX_DED_INDEX 2 +#define XP_ECC_IER_RX_DED_INDEX 3#define XP_ECC_IER_RX_DED_WIDTH 1 -#define XP_ECC_IER_RX_SEC_INDEX 3 +#define XP_ECC_IER_RX_SEC_INDEX 2#define XP_ECC_IER_RX_SEC_WIDTH 1 -#define XP_ECC_IER_TX_DED_INDEX 4 +#define XP_ECC_IER_TX_DED_INDEX 1#define XP_ECC_IER_TX_DED_WIDTH 1 -#define XP_ECC_IER_TX_SEC_INDEX 5 +#define XP_ECC_IER_TX_SEC_INDEX 0#define XP_ECC_IER_TX_SEC_WIDTH 1 -#define XP_ECC_ISR_DESC_DED_INDEX 0 +#define XP_ECC_ISR_DESC_DED_INDEX 5#define XP_ECC_ISR_DESC_DED_WIDTH 1 -#define XP_ECC_ISR_DESC_SEC_INDEX 1 +#define XP_ECC_ISR_DESC_SEC_INDEX 4#define XP_ECC_ISR_DESC_SEC_WIDTH 1 -#define XP_ECC_ISR_RX_DED_INDEX 2 +#define XP_ECC_ISR_RX_DED_INDEX 3#define XP_ECC_ISR_RX_DED_WIDTH 1 -#define XP_ECC_ISR_RX_SEC_INDEX 3 +#define XP_ECC_ISR_RX_SEC_INDEX 2#define XP_ECC_ISR_RX_SEC_WIDTH 1 -#define XP_ECC_ISR_TX_DED_INDEX 4 +#define XP_ECC_ISR_TX_DED_INDEX 1#define XP_ECC_ISR_TX_DED_WIDTH 1 -#define XP_ECC_ISR_TX_SEC_INDEX 5 +#define XP_ECC_ISR_TX_SEC_INDEX 0#define XP_ECC_ISR_TX_SEC_WIDTH 1#define XP_I2C_MUTEX_BUSY_INDEX 31#define XP_I2C_MUTEX_BUSY_WIDTH 1
@@ -1148,8 +1148,8 @@#define RX_PACKET_ATTRIBUTES_CSUM_DONE_WIDTH 1#define RX_PACKET_ATTRIBUTES_VLAN_CTAG_INDEX 1#define RX_PACKET_ATTRIBUTES_VLAN_CTAG_WIDTH 1 -#define RX_PACKET_ATTRIBUTES_INCOMPLETE_INDEX 2 -#define RX_PACKET_ATTRIBUTES_INCOMPLETE_WIDTH 1 +#define RX_PACKET_ATTRIBUTES_LAST_INDEX 2 +#define RX_PACKET_ATTRIBUTES_LAST_WIDTH 1#define RX_PACKET_ATTRIBUTES_CONTEXT_NEXT_INDEX 3#define RX_PACKET_ATTRIBUTES_CONTEXT_NEXT_WIDTH 1#define RX_PACKET_ATTRIBUTES_CONTEXT_INDEX 4
@@ -1158,6 +1158,8 @@#define RX_PACKET_ATTRIBUTES_RX_TSTAMP_WIDTH 1#define RX_PACKET_ATTRIBUTES_RSS_HASH_INDEX 6#define RX_PACKET_ATTRIBUTES_RSS_HASH_WIDTH 1 +#define RX_PACKET_ATTRIBUTES_FIRST_INDEX 7 +#define RX_PACKET_ATTRIBUTES_FIRST_WIDTH 1#define RX_NORMAL_DESC0_OVT_INDEX 0#define RX_NORMAL_DESC0_OVT_WIDTH 16
drivers/net/ethernet/amd/xgbe/xgbe-dev.c +11 -9
@@ -1896,10 +1896,15 @@ static int xgbe_dev_read(struct xgbe_channel *channel)/* Get the header length */ if (XGMAC_GET_BITS_LE (rdesc->desc3,RX_NORMAL_DESC3 ,FD )) { +XGMAC_SET_BITS (packet->attributes,RX_PACKET_ATTRIBUTES , +FIRST ,1 ); rdata->rx.hdr_len =XGMAC_GET_BITS_LE (rdesc->desc2,RX_NORMAL_DESC2 ,HL );if (rdata->rx.hdr_len) pdata->ext_stats.rx_split_header_packets++; + }else { +XGMAC_SET_BITS (packet->attributes,RX_PACKET_ATTRIBUTES , +FIRST ,0 ); }/* Get the RSS hash */
@@ -1922,19 +1927,16 @@ static int xgbe_dev_read(struct xgbe_channel *channel) } } -/* Get the packet length */ - rdata->rx.len =XGMAC_GET_BITS_LE (rdesc->desc3,RX_NORMAL_DESC3 ,PL ); - -if (!XGMAC_GET_BITS_LE (rdesc->desc3,RX_NORMAL_DESC3 ,LD )) { -/* Not all the data has been transferred for this packet */ -XGMAC_SET_BITS (packet->attributes,RX_PACKET_ATTRIBUTES , -INCOMPLETE ,1 ); +/* Not all the data has been transferred for this packet */ +if (!XGMAC_GET_BITS_LE (rdesc->desc3,RX_NORMAL_DESC3 ,LD ))return 0 ; - }/* This is the last of the data for this packet */ XGMAC_SET_BITS (packet->attributes,RX_PACKET_ATTRIBUTES , -INCOMPLETE ,0 ); +LAST ,1 ); + +/* Get the packet length */ + rdata->rx.len =XGMAC_GET_BITS_LE (rdesc->desc3,RX_NORMAL_DESC3 ,PL );/* Set checksum done indicator as appropriate */ if (netdev->features &NETIF_F_RXCSUM )
drivers/net/ethernet/amd/xgbe/xgbe-drv.c +63 -39
173 lines not on this page · raw message
drivers/net/ethernet/broadcom/genet/bcmgenet.c +4 -2
@@ -3395,7 +3395,8 @@ static int bcmgenet_suspend(struct device *d)bcmgenet_netif_stop (dev); -phy_suspend (priv->phydev); +if (!device_may_wakeup (d)) +phy_suspend (priv->phydev);netif_device_detach (dev);
@@ -3492,7 +3493,8 @@ static int bcmgenet_resume(struct device *d)netif_device_attach (dev); -phy_resume (priv->phydev); +if (!device_may_wakeup (d)) +phy_resume (priv->phydev);if (priv->eee.eee_enabled)bcmgenet_eee_enable_set (dev, true);
drivers/net/ethernet/broadcom/genet/bcmmii.c +0 -15
@@ -220,20 +220,6 @@ void bcmgenet_phy_power_set(struct net_device *dev, bool enable)udelay (60 ); } -static void bcmgenet_internal_phy_setup (struct net_device *dev) -{ -struct bcmgenet_priv *priv =netdev_priv (dev); -u32 reg; - -/* Power up PHY */ -bcmgenet_phy_power_set (dev, true); -/* enable APD */ - reg =bcmgenet_ext_readl (priv,EXT_EXT_PWR_MGMT ); - reg |=EXT_PWR_DN_EN_LD ; -bcmgenet_ext_writel (priv, reg,EXT_EXT_PWR_MGMT ); -bcmgenet_mii_reset (dev); -} -static void bcmgenet_moca_phy_setup (struct bcmgenet_priv *priv) {u32 reg;
@@ -281,7 +267,6 @@ int bcmgenet_mii_config(struct net_device *dev)if (priv->internal_phy) { phy_name ="internal PHY" ; -bcmgenet_internal_phy_setup (dev); }else if (priv->phy_interface ==PHY_INTERFACE_MODE_MOCA ) { phy_name ="MoCA" ;bcmgenet_moca_phy_setup (priv);
drivers/net/ethernet/mellanox/mlx5/core/cmd.c +4 -0
@@ -361,6 +361,8 @@ static int mlx5_internal_err_ret_value(struct mlx5_core_dev *dev, u16 op,case MLX5_CMD_OP_QUERY_VPORT_COUNTER :case MLX5_CMD_OP_ALLOC_Q_COUNTER :case MLX5_CMD_OP_QUERY_Q_COUNTER : +case MLX5_CMD_OP_SET_RATE_LIMIT : +case MLX5_CMD_OP_QUERY_RATE_LIMIT :case MLX5_CMD_OP_ALLOC_PD :case MLX5_CMD_OP_ALLOC_UAR :case MLX5_CMD_OP_CONFIG_INT_MODERATION :
@@ -497,6 +499,8 @@ const char *mlx5_command_str(int command)MLX5_COMMAND_STR_CASE (ALLOC_Q_COUNTER );MLX5_COMMAND_STR_CASE (DEALLOC_Q_COUNTER );MLX5_COMMAND_STR_CASE (QUERY_Q_COUNTER ); +MLX5_COMMAND_STR_CASE (SET_RATE_LIMIT ); +MLX5_COMMAND_STR_CASE (QUERY_RATE_LIMIT );MLX5_COMMAND_STR_CASE (ALLOC_PD );MLX5_COMMAND_STR_CASE (DEALLOC_PD );MLX5_COMMAND_STR_CASE (ALLOC_UAR );
drivers/net/ethernet/mellanox/mlx5/core/en.h +0 -4
@@ -921,10 +921,6 @@ void mlx5e_destroy_netdev(struct mlx5_core_dev *mdev, struct mlx5e_priv *priv);int mlx5e_attach_netdev (struct mlx5_core_dev *mdev,struct net_device *netdev);void mlx5e_detach_netdev (struct mlx5_core_dev *mdev,struct net_device *netdev);u32 mlx5e_choose_lro_timeout (struct mlx5_core_dev *mdev,u32 wanted_timeout); -void mlx5e_add_vxlan_port (struct net_device *netdev, -struct udp_tunnel_info *ti); -void mlx5e_del_vxlan_port (struct net_device *netdev, -struct udp_tunnel_info *ti);int mlx5e_get_offload_stats (int attr_id,const struct net_device *dev,void *sp);
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +4 -4
@@ -3055,8 +3055,8 @@ static int mlx5e_get_vf_stats(struct net_device *dev, vf_stats); } -void mlx5e_add_vxlan_port (struct net_device *netdev, -struct udp_tunnel_info *ti) +static void mlx5e_add_vxlan_port (struct net_device *netdev, +struct udp_tunnel_info *ti) {struct mlx5e_priv *priv =netdev_priv (netdev);
@@ -3069,8 +3069,8 @@ void mlx5e_add_vxlan_port(struct net_device *netdev,mlx5e_vxlan_queue_work (priv, ti->sa_family,be16_to_cpu (ti->port),1 ); } -void mlx5e_del_vxlan_port (struct net_device *netdev, -struct udp_tunnel_info *ti) +static void mlx5e_del_vxlan_port (struct net_device *netdev, +struct udp_tunnel_info *ti) {struct mlx5e_priv *priv =netdev_priv (netdev);
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +0 -2
@@ -394,8 +394,6 @@ static const struct net_device_ops mlx5e_netdev_ops_rep = { .ndo_get_phys_port_name = mlx5e_rep_get_phys_port_name, .ndo_setup_tc = mlx5e_rep_ndo_setup_tc, .ndo_get_stats64 = mlx5e_rep_get_stats, - .ndo_udp_tunnel_add = mlx5e_add_vxlan_port, - .ndo_udp_tunnel_del = mlx5e_del_vxlan_port, .ndo_has_offload_stats = mlx5e_has_offload_stats, .ndo_get_offload_stats = mlx5e_get_offload_stats, };
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +4 -0
@@ -603,6 +603,10 @@ static inline void mlx5e_build_rx_skb(struct mlx5_cqe64 *cqe,if (lro_num_seg >1 ) {mlx5e_lro_update_hdr (skb, cqe, cqe_bcnt);skb_shinfo (skb)->gso_size =DIV_ROUND_UP (cqe_bcnt, lro_num_seg); +/* Subtract one since we already counted this as one +* "regular" packet in mlx5e_complete_rx_cqe() +*/ + rq->stats.packets += lro_num_seg -1 ; rq->stats.lro_packets++; rq->stats.lro_bytes += cqe_bcnt; }
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +50 -22
126 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c +3 -2
@@ -272,15 +272,18 @@ static netdev_tx_t mlx5e_sq_xmit(struct mlx5e_sq *sq, struct sk_buff *skb) sq->stats.tso_bytes += skb->len - ihs; } + sq->stats.packets +=skb_shinfo (skb)->gso_segs; num_bytes = skb->len + (skb_shinfo (skb)->gso_segs -1 ) * ihs; }else { bf = sq->bf_budget && !skb->xmit_more && !skb_shinfo (skb)->nr_frags; ihs =mlx5e_get_inline_hdr_size (sq, skb, bf); + sq->stats.packets++; num_bytes = max_t(unsigned int, skb->len, ETH_ZLEN); } + sq->stats.bytes += num_bytes; wi->num_bytes = num_bytes;if (skb_vlan_tag_present (skb)) {
@@ -377,8 +380,6 @@ static netdev_tx_t mlx5e_sq_xmit(struct mlx5e_sq *sq, struct sk_buff *skb)if (bf) sq->bf_budget--; - sq->stats.packets++; - sq->stats.bytes += num_bytes;return NETDEV_TX_OK ; dma_unmap_wqe_err:
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h +6 -0
@@ -201,6 +201,7 @@ struct mlx5_esw_offload {struct mlx5_eswitch_rep *vport_reps;DECLARE_HASHTABLE (encap_tbl,8 );u8 inline_mode; +u64 num_flows; };struct mlx5_eswitch {
@@ -263,6 +264,11 @@ struct mlx5_flow_handle * mlx5_eswitch_add_offloaded_rule(struct mlx5_eswitch *esw, struct mlx5_flow_spec *spec, struct mlx5_esw_flow_attr *attr); +void +mlx5_eswitch_del_offloaded_rule (struct mlx5_eswitch *esw, +struct mlx5_flow_handle *rule, +struct mlx5_esw_flow_attr *attr); +struct mlx5_flow_handle *mlx5_eswitch_create_vport_rx_rule (struct mlx5_eswitch *esw,int vport,u32 tirn);
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +22 -0
@@ -93,10 +93,27 @@ mlx5_eswitch_add_offloaded_rule(struct mlx5_eswitch *esw, spec, &flow_act, dest, i);if (IS_ERR (rule))mlx5_fc_destroy (esw->dev, counter); +else + esw->offloads.num_flows++;return rule; } +void +mlx5_eswitch_del_offloaded_rule (struct mlx5_eswitch *esw, +struct mlx5_flow_handle *rule, +struct mlx5_esw_flow_attr *attr) +{ +struct mlx5_fc *counter =NULL ; + +if (!IS_ERR (rule)) { + counter =mlx5_flow_rule_counter (rule); +mlx5_del_flow_rules (rule); +mlx5_fc_destroy (esw->dev, counter); + esw->offloads.num_flows--; + } +} +static int esw_set_global_vlan_pop (struct mlx5_eswitch *esw,u8 val) {struct mlx5_eswitch_rep *rep;
@@ -905,6 +922,11 @@ int mlx5_devlink_eswitch_inline_mode_set(struct devlink *devlink, u8 mode) MLX5_CAP_INLINE_MODE_VPORT_CONTEXT)return -EOPNOTSUPP ; +if (esw->offloads.num_flows >0 ) { +esw_warn (dev,"Can't set inline mode when flows are configured\n" ); +return -EOPNOTSUPP ; + } + err =esw_inline_mode_from_devlink (mode, &mlx5_mode);if (err) goto out;
drivers/net/ethernet/mellanox/mlx5/core/main.c +1 -1
@@ -87,7 +87,7 @@ static struct mlx5_profile profile[] = { [2] = { .mask =MLX5_PROF_MASK_QP_SIZE | MLX5_PROF_MASK_MR_CACHE, - .log_max_qp = 17, + .log_max_qp = 18, .mr_cache[0] = { .size = 500, .limit =250
drivers/net/ethernet/ti/Kconfig +1 -1
@@ -76,7 +76,7 @@ config TI_CPSW config TI_CPTS tristate "TI Common Platform Time Sync (CPTS) Support" depends on TI_CPSW || TI_KEYSTONE_NETCP - imply PTP_1588_CLOCK + depends on PTP_1588_CLOCK ---help--- This driver supports the Common Platform Time Sync unit of the CPSW Ethernet Switch and Keystone 2 1g/10g Switch Subsystem.
drivers/net/usb/qmi_wwan.c +2 -0
@@ -924,6 +924,8 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x413c, 0x81a9, 8)}, /* Dell Wireless 5808e Gobi(TM) 4G LTE Mobile Broadband Card */ {QMI_FIXED_INTF(0x413c, 0x81b1, 8)}, /* Dell Wireless 5809e Gobi(TM) 4G LTE Mobile Broadband Card */ {QMI_FIXED_INTF(0x413c, 0x81b3, 8)}, /* Dell Wireless 5809e Gobi(TM) 4G LTE Mobile Broadband Card (rev3) */ + {QMI_FIXED_INTF(0x413c, 0x81b6, 8)}, /* Dell Wireless 5811e */ + {QMI_FIXED_INTF(0x413c, 0x81b6, 10)}, /* Dell Wireless 5811e */ {QMI_FIXED_INTF(0x03f0, 0x4e1d, 8)}, /* HP lt4111 LTE/EV-DO/HSPA+ Gobi 4G Module */ {QMI_FIXED_INTF(0x22de, 0x9061, 3)}, /* WeTelecom WPD-600N */ {QMI_FIXED_INTF(0x1e0e, 0x9001, 5)}, /* SIMCom 7230E */
drivers/net/vrf.c +3 -1
@@ -462,8 +462,10 @@ static void vrf_rt6_release(struct net_device *dev, struct net_vrf *vrf) }if (rt6_local) { -if (rt6_local->rt6i_idev) +if (rt6_local->rt6i_idev) {in6_dev_put (rt6_local->rt6i_idev); + rt6_local->rt6i_idev =NULL ; + } dst = &rt6_local->dst;dev_put (dst->dev);
drivers/net/wireless/ath/ath10k/hw.c +1 -1
@@ -51,7 +51,7 @@ const struct ath10k_hw_regs qca6174_regs = { .rtc_soc_base_address = 0x00000800, .rtc_wmac_base_address = 0x00001000, .soc_core_base_address = 0x0003a000, - .wlan_mac_base_address = 0x00020000, + .wlan_mac_base_address = 0x00010000, .ce_wrapper_base_address = 0x00034000, .ce0_base_address = 0x00034400, .ce1_base_address = 0x00034800,
drivers/net/wireless/marvell/mwifiex/pcie.c +19 -19
@@ -2742,6 +2742,21 @@ static void mwifiex_pcie_device_dump(struct mwifiex_adapter *adapter)schedule_work (&pcie_work); } +static void mwifiex_pcie_free_buffers (struct mwifiex_adapter *adapter) +{ +struct pcie_service_card *card = adapter->card; +const struct mwifiex_pcie_card_reg *reg = card->pcie.reg; + +if (reg->sleep_cookie) +mwifiex_pcie_delete_sleep_cookie_buf (adapter); + +mwifiex_pcie_delete_cmdrsp_buf (adapter); +mwifiex_pcie_delete_evtbd_ring (adapter); +mwifiex_pcie_delete_rxbd_ring (adapter); +mwifiex_pcie_delete_txbd_ring (adapter); + card->cmdrsp_buf =NULL ; +} +/* * This function initializes the PCI-E host memory space, WCB rings, etc. *
@@ -2853,13 +2868,6 @@ static int mwifiex_pcie_init(struct mwifiex_adapter *adapter)/* * This function cleans up the allocated card buffers. -* -* The following are freed by this function - -* - TXBD ring buffers -* - RXBD ring buffers -* - Event BD ring buffers -* - Command response ring buffer -* - Sleep cookie buffer */ static void mwifiex_pcie_cleanup (struct mwifiex_adapter *adapter) {
@@ -2875,6 +2883,8 @@ static void mwifiex_pcie_cleanup(struct mwifiex_adapter *adapter) "Failed to write driver not-ready signature\n"); } +mwifiex_pcie_free_buffers (adapter); +if (pdev) {pci_iounmap (pdev, card->pci_mmap);pci_iounmap (pdev, card->pci_mmap1);
@@ -3115,10 +3125,7 @@ static void mwifiex_pcie_up_dev(struct mwifiex_adapter *adapter)pci_iounmap (pdev, card->pci_mmap1); } -/* This function cleans up the PCI-E host memory space. -* Some code is extracted from mwifiex_unregister_dev() -* -*/ +/* This function cleans up the PCI-E host memory space. */ static void mwifiex_pcie_down_dev (struct mwifiex_adapter *adapter) {struct pcie_service_card *card = adapter->card;
@@ -3130,14 +3137,7 @@ static void mwifiex_pcie_down_dev(struct mwifiex_adapter *adapter) adapter->seq_num =0 ; adapter->tx_buf_size =MWIFIEX_TX_DATA_BUF_SIZE_4K ; -if (reg->sleep_cookie) -mwifiex_pcie_delete_sleep_cookie_buf (adapter); - -mwifiex_pcie_delete_cmdrsp_buf (adapter); -mwifiex_pcie_delete_evtbd_ring (adapter); -mwifiex_pcie_delete_rxbd_ring (adapter); -mwifiex_pcie_delete_txbd_ring (adapter); - card->cmdrsp_buf =NULL ; +mwifiex_pcie_free_buffers (adapter); }static struct mwifiex_if_ops pcie_ops = {
drivers/parport/share.c +4 -2
@@ -939,8 +939,10 @@ parport_register_dev_model(struct parport *port, const char *name,* pardevice fields. -arca */ port->ops->init_state (par_dev, par_dev->state); - port->proc_device = par_dev; -parport_device_proc_register (par_dev); +if (!test_and_set_bit (PARPORT_DEVPROC_REGISTERED , &port->devflags)) { + port->proc_device = par_dev; +parport_device_proc_register (par_dev); + }return par_dev;
drivers/scsi/mpt3sas/mpt3sas_scsih.c +0 -15
@@ -4658,7 +4658,6 @@ _scsih_io_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply)struct MPT3SAS_DEVICE *sas_device_priv_data;u32 response_code =0 ;unsigned long flags; -unsigned int sector_sz; mpi_reply =mpt3sas_base_get_reply_virt_addr (ioc, reply); scmd =_scsih_scsi_lookup_get_clear (ioc, smid);
@@ -4717,20 +4716,6 @@ _scsih_io_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply) } xfer_cnt =le32_to_cpu (mpi_reply->TransferCount); - -/* In case of bogus fw or device, we could end up having -* unaligned partial completion. We can force alignment here, -* then scsi-ml does not need to handle this misbehavior. -*/ - sector_sz = scmd->device->sector_size; -if (unlikely (scmd->request->cmd_type ==REQ_TYPE_FS && sector_sz && - xfer_cnt % sector_sz)) { -sdev_printk (KERN_INFO , scmd->device, -"unaligned partial completion avoided (xfer_cnt=%u, sector_sz=%u)\n" , - xfer_cnt, sector_sz); - xfer_cnt =round_down (xfer_cnt, sector_sz); - } -scsi_set_resid (scmd,scsi_bufflen (scmd) - xfer_cnt);if (ioc_status &MPI2_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE ) log_info =le32_to_cpu (mpi_reply->IOCLogInfo);
drivers/scsi/sd.c +17 -0
@@ -1790,6 +1790,8 @@ static int sd_done(struct scsi_cmnd *SCpnt) {int result = SCpnt->result;unsigned int good_bytes = result ?0 :scsi_bufflen (SCpnt); +unsigned int sector_size = SCpnt->device->sector_size; +unsigned int resid;struct scsi_sense_hdr sshdr;struct scsi_disk *sdkp =scsi_disk (SCpnt->request->rq_disk);struct request *req = SCpnt->request;
@@ -1820,6 +1822,21 @@ static int sd_done(struct scsi_cmnd *SCpnt)scsi_set_resid (SCpnt,blk_rq_bytes (req)); }break ; +default : +/* +* In case of bogus fw or device, we could end up having +* an unaligned partial completion. Check this here and force +* alignment. +*/ + resid =scsi_get_resid (SCpnt); +if (resid & (sector_size -1 )) { +sd_printk (KERN_INFO , sdkp, +"Unaligned partial completion (resid=%u, sector_sz=%u)\n" , + resid, sector_size); + resid =min (scsi_bufflen (SCpnt), +round_up (resid, sector_size)); +scsi_set_resid (SCpnt, resid); + } }if (result) {
drivers/usb/class/usbtmc.c +15 -3
@@ -1381,7 +1381,7 @@ static int usbtmc_probe(struct usb_interface *intf,dev_dbg (&intf->dev,"%s called\n" , __func__); - data =kmalloc (sizeof (*data),GFP_KERNEL ); + data =kzalloc (sizeof (*data),GFP_KERNEL );if (!data)return -ENOMEM ;
@@ -1444,6 +1444,13 @@ static int usbtmc_probe(struct usb_interface *intf,break ; } } + +if (!data->bulk_out || !data->bulk_in) { +dev_err (&intf->dev,"bulk endpoints not found\n" ); + retcode = -ENODEV ; + goto err_put; + } +/* Find int endpoint */ for (n =0 ; n < iface_desc->desc.bNumEndpoints; n++) { endpoint = &iface_desc->endpoint[n].desc;
@@ -1469,8 +1476,10 @@ static int usbtmc_probe(struct usb_interface *intf,if (data->iin_ep_present) {/* allocate int urb */ data->iin_urb =usb_alloc_urb (0 ,GFP_KERNEL ); -if (!data->iin_urb) +if (!data->iin_urb) { + retcode = -ENOMEM ; goto error_register; + }/* Protect interrupt in endpoint data until iin_urb is freed */ kref_get (&data->kref);
@@ -1478,8 +1487,10 @@ static int usbtmc_probe(struct usb_interface *intf,/* allocate buffer for interrupt in */ data->iin_buffer =kmalloc (data->iin_wMaxPacketSize,GFP_KERNEL ); -if (!data->iin_buffer) +if (!data->iin_buffer) { + retcode = -ENOMEM ; goto error_register; + }/* fill interrupt urb */ usb_fill_int_urb(data->iin_urb, data->usb_dev,
@@ -1512,6 +1523,7 @@ static int usbtmc_probe(struct usb_interface *intf,sysfs_remove_group (&intf->dev.kobj, &capability_attr_grp);sysfs_remove_group (&intf->dev.kobj, &data_attr_grp);usbtmc_free_int (data); +err_put:kref_put (&data->kref, usbtmc_delete);return retcode; }
drivers/usb/core/config.c +10 -0
@@ -280,6 +280,16 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum,/* * Adjust bInterval for quirked devices. +*/ +/* +* This quirk fixes bIntervals reported in ms. +*/ +if (to_usb_device (ddev)->quirks & +USB_QUIRK_LINEAR_FRAME_INTR_BINTERVAL ) { + n =clamp (fls (d->bInterval) +3 , i, j); + i = j = n; + } +/* * This quirk fixes bIntervals reported in * linear microframes. */
drivers/usb/core/hub.c +1 -1
@@ -4275,7 +4275,7 @@ static void hub_set_initial_usb2_lpm_policy(struct usb_device *udev)struct usb_hub *hub =usb_hub_to_struct_hub (udev->parent);int connect_type =USB_PORT_CONNECT_TYPE_UNKNOWN ; -if (!udev->usb2_hw_lpm_capable) +if (!udev->usb2_hw_lpm_capable || !udev->bos)return ;if (hub)
drivers/usb/core/quirks.c +8 -0
@@ -170,6 +170,14 @@ static const struct usb_device_id usb_quirk_list[] = {/* M-Systems Flash Disk Pioneers */ { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME }, + /* Baum Vario Ultra */ + { USB_DEVICE(0x0904, 0x6101), .driver_info = + USB_QUIRK_LINEAR_FRAME_INTR_BINTERVAL }, + { USB_DEVICE(0x0904, 0x6102), .driver_info = + USB_QUIRK_LINEAR_FRAME_INTR_BINTERVAL }, + { USB_DEVICE(0x0904, 0x6103), .driver_info = + USB_QUIRK_LINEAR_FRAME_INTR_BINTERVAL }, + /* Keytouch QWERTY Panel keyboard */ { USB_DEVICE(0x0926, 0x3333), .driver_info = USB_QUIRK_CONFIG_INTF_STRINGS },
drivers/usb/gadget/function/f_acm.c +3 -1
@@ -535,13 +535,15 @@ static int acm_notify_serial_state(struct f_acm *acm) {struct usb_composite_dev *cdev = acm->port.func.config->cdev;int status; +__le16 serial_state;spin_lock (&acm->lock);if (acm->notify_req) {dev_dbg (&cdev->gadget->dev,"acm ttyGS%d serial state %04x\n" , acm->port_num, acm->serial_state); + serial_state =cpu_to_le16 (acm->serial_state); status =acm_cdc_notify (acm,USB_CDC_NOTIFY_SERIAL_STATE , -0 , &acm->serial_state,sizeof (acm->serial_state)); +0 , &serial_state,sizeof (acm->serial_state)); }else { acm->pending = true; status =0 ;
drivers/usb/gadget/function/f_uvc.c +1 -1
@@ -625,7 +625,7 @@ uvc_function_bind(struct usb_configuration *c, struct usb_function *f) uvc_ss_streaming_comp.bMaxBurst = opts->streaming_maxburst; uvc_ss_streaming_comp.wBytesPerInterval =cpu_to_le16 (max_packet_size * max_packet_mult * - opts->streaming_maxburst); + (opts->streaming_maxburst +1 ));/* Allocate endpoints. */ ep =usb_ep_autoconfig (cdev->gadget, &uvc_control_ep);
drivers/usb/misc/idmouse.c +3 -0
@@ -346,6 +346,9 @@ static int idmouse_probe(struct usb_interface *interface,if (iface_desc->desc.bInterfaceClass !=0x0A )return -ENODEV ; +if (iface_desc->desc.bNumEndpoints <1 ) +return -ENODEV ; +/* allocate memory for our device state and initialize it */ dev =kzalloc (sizeof (*dev),GFP_KERNEL );if (dev ==NULL )
drivers/usb/misc/lvstest.c +4 -0
@@ -366,6 +366,10 @@ static int lvs_rh_probe(struct usb_interface *intf, hdev =interface_to_usbdev (intf); desc = intf->cur_altsetting; + +if (desc->desc.bNumEndpoints <1 ) +return -ENODEV ; + endpoint = &desc->endpoint[0 ].desc;/* valid only for SS root hub */
drivers/usb/misc/uss720.c +5 -0
@@ -708,6 +708,11 @@ static int uss720_probe(struct usb_interface *intf, interface = intf->cur_altsetting; +if (interface->desc.bNumEndpoints <3 ) { +usb_put_dev (usbdev); +return -ENODEV ; + } +/* * Allocate parport interface */
drivers/usb/musb/musb_cppi41.c +21 -2
@@ -231,8 +231,27 @@ static void cppi41_dma_callback(void *private_data) transferred < cppi41_channel->packet_sz) cppi41_channel->prog_len =0 ; -if (cppi41_channel->is_tx) - empty =musb_is_tx_fifo_empty (hw_ep); +if (cppi41_channel->is_tx) { +u8 type; + +if (is_host_active (musb)) + type = hw_ep->out_qh->type; +else + type = hw_ep->ep_in.type; + +if (type ==USB_ENDPOINT_XFER_ISOC ) +/* +* Don't use the early-TX-interrupt workaround below +* for Isoch transfter. Since Isoch are periodic +* transfer, by the time the next transfer is +* scheduled, the current one should be done already. +* +* This avoids audio playback underrun issue. +*/ + empty = true; +else + empty =musb_is_tx_fifo_empty (hw_ep); + }if (!cppi41_channel->is_tx || empty) {cppi41_trans_done (cppi41_channel);
drivers/usb/serial/option.c +16 -1
@@ -233,6 +233,14 @@ static void option_instat_callback(struct urb *urb);#define BANDRICH_PRODUCT_1012 0x1012#define QUALCOMM_VENDOR_ID 0x05C6 +/* These Quectel products use Qualcomm's vendor ID */ +#define QUECTEL_PRODUCT_UC20 0x9003 +#define QUECTEL_PRODUCT_UC15 0x9090 + +#define QUECTEL_VENDOR_ID 0x2c7c +/* These Quectel products use Quectel's vendor ID */ +#define QUECTEL_PRODUCT_EC21 0x0121 +#define QUECTEL_PRODUCT_EC25 0x0125#define CMOTECH_VENDOR_ID 0x16d8#define CMOTECH_PRODUCT_6001 0x6001
@@ -1161,7 +1169,14 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */ { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */ - { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9003), /* Quectel UC20 */ +/* Quectel products using Qualcomm vendor ID */ + { USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)}, + { USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20), + .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, +/* Quectel products using Quectel vendor ID */ + { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC21), + .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, + { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC25), .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) }, { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) },
drivers/usb/serial/qcserial.c +2 -0
@@ -169,6 +169,8 @@ static const struct usb_device_id id_table[] = { {DEVICE_SWI(0x413c, 0x81a9)}, /* Dell Wireless 5808e Gobi(TM) 4G LTE Mobile Broadband Card */ {DEVICE_SWI(0x413c, 0x81b1)}, /* Dell Wireless 5809e Gobi(TM) 4G LTE Mobile Broadband Card */ {DEVICE_SWI(0x413c, 0x81b3)}, /* Dell Wireless 5809e Gobi(TM) 4G LTE Mobile Broadband Card (rev3) */ + {DEVICE_SWI(0x413c, 0x81b5)}, /* Dell Wireless 5811e QDL */ + {DEVICE_SWI(0x413c, 0x81b6)}, /* Dell Wireless 5811e QDL *//* Huawei devices */ {DEVICE_HWI(0x03f0, 0x581d)}, /* HP lt4112 LTE/HSPA+ Gobi 4G Modem (Huawei me906e) */
drivers/usb/wusbcore/wa-hc.c +3 -0
@@ -39,6 +39,9 @@ int wa_create(struct wahc *wa, struct usb_interface *iface,int result;struct device *dev = &iface->dev; +if (iface->cur_altsetting->desc.bNumEndpoints <3 ) +return -ENODEV ; + result =wa_rpipes_create (wa);if (result <0 ) goto error_rpipes_create;
drivers/uwb/hwa-rc.c +3 -0
@@ -823,6 +823,9 @@ static int hwarc_probe(struct usb_interface *iface,struct hwarc *hwarc;struct device *dev = &iface->dev; +if (iface->cur_altsetting->desc.bNumEndpoints <1 ) +return -ENODEV ; + result = -ENOMEM ; uwb_rc =uwb_rc_alloc ();if (uwb_rc ==NULL ) {
drivers/uwb/i1480/dfu/usb.c +3 -0
@@ -362,6 +362,9 @@ int i1480_usb_probe(struct usb_interface *iface, const struct usb_device_id *id) result); } +if (iface->cur_altsetting->desc.bNumEndpoints <1 ) +return -ENODEV ; + result = -ENOMEM ; i1480_usb =kzalloc (sizeof (*i1480_usb),GFP_KERNEL );if (i1480_usb ==NULL ) {
drivers/vfio/vfio.c +5 -3
@@ -403,6 +403,7 @@ static void vfio_group_release(struct kref *kref)struct iommu_group *iommu_group = group->iommu_group;WARN_ON (!list_empty (&group->device_list)); +WARN_ON (group->notifier.head);list_for_each_entry_safe (unbound, tmp, &group->unbound_list, unbound_next) {
@@ -1573,6 +1574,10 @@ static int vfio_group_fops_open(struct inode *inode, struct file *filep)return -EBUSY ; } +/* Warn if previous user didn't cleanup and re-init to drop them */ +if (WARN_ON (group->notifier.head)) +BLOCKING_INIT_NOTIFIER_HEAD (&group->notifier); + filep->private_data = group;return 0 ;
@@ -1584,9 +1589,6 @@ static int vfio_group_fops_release(struct inode *inode, struct file *filep) filep->private_data =NULL ; -/* Any user didn't unregister? */ -WARN_ON (group->notifier.head); -vfio_group_try_dissolve_container (group);atomic_dec (&group->opened);
drivers/video/console/fbcon.c +40 -27
99 lines not on this page · raw message
drivers/xen/xen-acpi-processor.c +26 -8
@@ -27,10 +27,10 @@#include <linux/init.h> #include <linux/module.h> #include <linux/types.h> +#include <linux/syscore_ops.h> #include <linux/acpi.h> #include <acpi/processor.h> #include <xen/xen.h> -#include <xen/xen-ops.h> #include <xen/interface/platform.h> #include <asm/xen/hypercall.h>
@@ -466,15 +466,33 @@ static int xen_upload_processor_pm_data(void)return rc; } -static int xen_acpi_processor_resume (struct notifier_block *nb, -unsigned long action,void *data) +static void xen_acpi_processor_resume_worker (struct work_struct *dummy) { +int rc; +bitmap_zero (acpi_ids_done, nr_acpi_bits); -return xen_upload_processor_pm_data (); + + rc =xen_upload_processor_pm_data (); +if (rc !=0 ) +pr_info ("ACPI data upload failed, error = %d\n" , rc); +} + +static void xen_acpi_processor_resume (void ) +{ + static DECLARE_WORK(wq, xen_acpi_processor_resume_worker); + +/* +* xen_upload_processor_pm_data() calls non-atomic code. +* However, the context for xen_acpi_processor_resume is syscore +* with only the boot CPU online and in an atomic context. +* +* So defer the upload for some point safer. +*/ +schedule_work (&wq); } -struct notifier_block xen_acpi_processor_resume_nb = { - .notifier_call = xen_acpi_processor_resume, +static struct syscore_ops xap_syscore_ops = { + .resume = xen_acpi_processor_resume, };static int __init xen_acpi_processor_init (void )
@@ -527,7 +545,7 @@ static int __init xen_acpi_processor_init(void)if (rc) goto err_unregister; -xen_resume_notifier_register (&xen_acpi_processor_resume_nb); +register_syscore_ops (&xap_syscore_ops);return 0 ; err_unregister:
@@ -544,7 +562,7 @@ static void __exit xen_acpi_processor_exit(void) {int i; -xen_resume_notifier_unregister (&xen_acpi_processor_resume_nb); +unregister_syscore_ops (&xap_syscore_ops);kfree (acpi_ids_done);kfree (acpi_id_present);kfree (acpi_id_cst_present);
fs/crypto/crypto.c +1 -9
@@ -394,7 +394,6 @@ EXPORT_SYMBOL(fscrypt_zeroout_range);static int fscrypt_d_revalidate (struct dentry *dentry,unsigned int flags) {struct dentry *dir; -struct fscrypt_info *ci;int dir_has_key, cached_with_key;if (flags &LOOKUP_RCU )
@@ -406,18 +405,11 @@ static int fscrypt_d_revalidate(struct dentry *dentry, unsigned int flags)return 0 ; } - ci =d_inode (dir)->i_crypt_info; -if (ci && ci->ci_keyring_key && - (ci->ci_keyring_key->flags & ((1 <<KEY_FLAG_INVALIDATED ) | - (1 <<KEY_FLAG_REVOKED ) | - (1 <<KEY_FLAG_DEAD )))) - ci =NULL ; -/* this should eventually be an flag in d_flags */ spin_lock (&dentry->d_lock); cached_with_key = dentry->d_flags &DCACHE_ENCRYPTED_WITH_KEY ;spin_unlock (&dentry->d_lock); - dir_has_key = (ci !=NULL ); + dir_has_key = (d_inode (dir)->i_crypt_info !=NULL );dput (dir);/*
fs/crypto/fname.c +1 -1
@@ -350,7 +350,7 @@ int fscrypt_setup_filename(struct inode *dir, const struct qstr *iname, fname->disk_name.len = iname->len;return 0 ; } - ret =fscrypt_get_crypt_info (dir); + ret =fscrypt_get_encryption_info (dir);if (ret && ret != -EOPNOTSUPP )return ret;
fs/crypto/fscrypt_private.h +0 -4
@@ -67,7 +67,6 @@ struct fscrypt_info {u8 ci_filename_mode;u8 ci_flags;struct crypto_skcipher *ci_ctfm; -struct key *ci_keyring_key;u8 ci_master_key[FS_KEY_DESCRIPTOR_SIZE ]; };
@@ -87,7 +86,4 @@ struct fscrypt_completion_result {/* crypto.c */ int fscrypt_initialize (unsigned int cop_flags); -/* keyinfo.c */ -extern int fscrypt_get_crypt_info (struct inode *); -#endif /* _FSCRYPT_PRIVATE_H */
fs/crypto/keyinfo.c +9 -43
120 lines not on this page · raw message
fs/ext4/inline.c +2 -3
@@ -1167,10 +1167,9 @@ static int ext4_finish_convert_inline_dir(handle_t *handle,set_buffer_uptodate (dir_block); err =ext4_handle_dirty_dirent_node (handle, inode, dir_block);if (err) - goto out; +return err;set_buffer_verified (dir_block); -out: -return err; +return ext4_mark_inode_dirty (handle, inode); } static int ext4_convert_inline_data_nolock(handle_t *handle,
fs/ext4/xattr.c +31 -34
126 lines not on this page · raw message
fs/jbd2/journal.c +11 -11
@@ -1125,10 +1125,8 @@ static journal_t *journal_init_common(struct block_device *bdev,/* Set up a default-sized revoke table for the new mount. */ err =jbd2_journal_init_revoke (journal,JOURNAL_REVOKE_DEFAULT_HASH ); -if (err) { -kfree (journal); -return NULL ; - } +if (err) + goto err_cleanup;spin_lock_init (&journal->j_history_lock);
@@ -1145,23 +1143,25 @@ static journal_t *journal_init_common(struct block_device *bdev, journal->j_wbufsize = n; journal->j_wbuf =kmalloc_array (n,sizeof (struct buffer_head *),GFP_KERNEL ); -if (!journal->j_wbuf) { -kfree (journal); -return NULL ; - } +if (!journal->j_wbuf) + goto err_cleanup; bh =getblk_unmovable (journal->j_dev, start, journal->j_blocksize);if (!bh) {pr_err ("%s: Cannot get buffer for journal superblock\n" , __func__); -kfree (journal->j_wbuf); -kfree (journal); -return NULL ; + goto err_cleanup; } journal->j_sb_buffer = bh; journal->j_superblock = (journal_superblock_t *)bh->b_data;return journal; + +err_cleanup: +kfree (journal->j_wbuf); +jbd2_journal_destroy_revoke (journal); +kfree (journal); +return NULL ; }/* jbd2_journal_init_dev and jbd2_journal_init_inode:
fs/jbd2/revoke.c +1 -0
@@ -280,6 +280,7 @@ int jbd2_journal_init_revoke(journal_t *journal, int hash_size) fail1:jbd2_journal_destroy_revoke_table (journal->j_revoke_table[0 ]); + journal->j_revoke_table[0 ] =NULL ; fail0:return -ENOMEM ; }
include/drm/drmP.h +1 -0
@@ -360,6 +360,7 @@ struct drm_ioctl_desc {/* Event queued up for userspace to read */ struct drm_pending_event {struct completion *completion; +void (*completion_release)(struct completion *completion);struct drm_event *event;struct dma_fence *fence;struct list_head link;
include/linux/ccp.h +1 -1
@@ -556,7 +556,7 @@ enum ccp_engine {* struct ccp_cmd - CCP operation request * @entry: list element (ccp driver use only) * @work: work element used for callbacks (ccp driver use only) -* @ccp: CCP device to be run on (ccp driver use only) +* @ccp: CCP device to be run on * @ret: operation return code (ccp driver use only) * @flags: cmd processing flags * @engine: CCP operation to perform
include/linux/iio/sw_device.h +1 -1
@@ -62,7 +62,7 @@ void iio_swd_group_init_type_name(struct iio_sw_device *d, const char *name, struct config_item_type *type) { -#ifdef CONFIG_CONFIGFS_FS +#if IS_ENABLED(CONFIG_CONFIGFS_FS) config_group_init_type_name(&d->group, name, type);#endif }
include/linux/netdevice.h +9 -20
@@ -330,6 +330,7 @@ struct napi_struct {enum {NAPI_STATE_SCHED ,/* Poll is scheduled */ +NAPI_STATE_MISSED ,/* reschedule a napi */ NAPI_STATE_DISABLE ,/* Disable pending */ NAPI_STATE_NPSVC ,/* Netpoll - don't dequeue from poll_list */ NAPI_STATE_HASHED ,/* In NAPI hash (busy polling possible) */
@@ -338,12 +339,13 @@ enum { };enum { -NAPIF_STATE_SCHED = (1UL <<NAPI_STATE_SCHED ), -NAPIF_STATE_DISABLE = (1UL <<NAPI_STATE_DISABLE ), -NAPIF_STATE_NPSVC = (1UL <<NAPI_STATE_NPSVC ), -NAPIF_STATE_HASHED = (1UL <<NAPI_STATE_HASHED ), -NAPIF_STATE_NO_BUSY_POLL = (1UL <<NAPI_STATE_NO_BUSY_POLL ), -NAPIF_STATE_IN_BUSY_POLL = (1UL <<NAPI_STATE_IN_BUSY_POLL ), +NAPIF_STATE_SCHED =BIT (NAPI_STATE_SCHED ), +NAPIF_STATE_MISSED =BIT (NAPI_STATE_MISSED ), +NAPIF_STATE_DISABLE =BIT (NAPI_STATE_DISABLE ), +NAPIF_STATE_NPSVC =BIT (NAPI_STATE_NPSVC ), +NAPIF_STATE_HASHED =BIT (NAPI_STATE_HASHED ), +NAPIF_STATE_NO_BUSY_POLL =BIT (NAPI_STATE_NO_BUSY_POLL ), +NAPIF_STATE_IN_BUSY_POLL =BIT (NAPI_STATE_IN_BUSY_POLL ), };enum gro_result {
@@ -413,20 +415,7 @@ static inline bool napi_disable_pending(struct napi_struct *n)return test_bit (NAPI_STATE_DISABLE , &n->state); } -/** -* napi_schedule_prep - check if NAPI can be scheduled -* @n: NAPI context -* -* Test if NAPI routine is already running, and if not mark -* it as running. This is used as a condition variable to -* insure only one NAPI poll instance runs. We also make -* sure there is no pending NAPI disable. -*/ -static inline bool napi_schedule_prep (struct napi_struct *n) -{ -return !napi_disable_pending (n) && - !test_and_set_bit (NAPI_STATE_SCHED , &n->state); -} +bool napi_schedule_prep (struct napi_struct *n);/** * napi_schedule - schedule NAPI poll
include/linux/usb/quirks.h +6 -0
@@ -50,4 +50,10 @@/* device can't handle Link Power Management */ #define USB_QUIRK_NO_LPM BIT(10) +/* +* Device reports its bInterval as linear frames instead of the +* USB 2.0 calculation. +*/ +#define USB_QUIRK_LINEAR_FRAME_INTR_BINTERVAL BIT(11) +#endif /* __LINUX_USB_QUIRKS_H */
kernel/audit.c +394 -245
245 lines not on this page · raw message
net/core/dev.c +74 -7
81 lines not on this page · raw message
net/wireless/nl80211.c +56 -71
127 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.