Linux 5.4.89
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.4.89 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 4 arch/powerpc/kernel/vmlinux.lds.S | 2 arch/x86/kernel/cpu/mtrr/generic.c | 6 - arch/x86/kvm/mmu.h | 2 arch/x86/mm/pgtable.c | 2 crypto/asymmetric_keys/asym_tpm.c | 2 crypto/ecdh.c | 3 drivers/atm/idt77252.c | 2 drivers/base/core.c | 2 drivers/bluetooth/hci_h5.c | 8 - drivers/dma-buf/dma-buf.c | 21 +++ drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 4 drivers/ide/ide-atapi.c | 1 drivers/ide/ide-io.c | 5 drivers/net/dsa/lantiq_gswip.c | 27 +--- drivers/net/ethernet/broadcom/bcmsysport.c | 1 drivers/net/ethernet/ethoc.c | 3 drivers/net/ethernet/freescale/ucc_geth.c | 3 drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 4 drivers/net/ethernet/ibm/ibmvnic.c | 3 drivers/net/ethernet/intel/i40e/i40e.h | 3 drivers/net/ethernet/intel/i40e/i40e_main.c | 10 + drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 4 drivers/net/ethernet/intel/iavf/iavf_main.c | 4 drivers/net/ethernet/marvell/mvneta.c | 2 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 13 +- drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c | 38 ++++++ drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.h | 2 drivers/net/ethernet/pensando/ionic/ionic_txrx.c | 2 drivers/net/ethernet/qlogic/qede/qede_fp.c | 5 drivers/net/ethernet/realtek/r8169_main.c | 6 - drivers/net/ethernet/ti/cpts.c | 2 drivers/net/tun.c | 2 drivers/net/usb/cdc_ncm.c | 3 drivers/net/usb/qmi_wwan.c | 1 drivers/net/virtio_net.c | 12 +- drivers/net/wan/hdlc_ppp.c | 7 + drivers/scsi/scsi_transport_spi.c | 27 +++- drivers/scsi/ufs/ufshcd-pci.c | 34 +++++- drivers/scsi/ufs/ufshcd.c | 2 drivers/staging/mt7621-dma/mtk-hsdma.c | 4 drivers/target/target_core_xcopy.c | 119 ++++++++++++--------- drivers/target/target_core_xcopy.h | 1 drivers/usb/chipidea/ci_hdrc_imx.c | 6 - drivers/usb/class/cdc-acm.c | 4 drivers/usb/class/cdc-wdm.c | 16 ++ drivers/usb/class/usblp.c | 21 +++ drivers/usb/dwc3/core.h | 1 drivers/usb/dwc3/ulpi.c | 2 drivers/usb/gadget/Kconfig | 2 drivers/usb/gadget/composite.c | 10 + drivers/usb/gadget/configfs.c | 19 ++- drivers/usb/gadget/function/f_printer.c | 1 drivers/usb/gadget/function/f_uac2.c | 69 +++++++++--- drivers/usb/gadget/function/u_ether.c | 9 - drivers/usb/gadget/legacy/acm_ms.c | 4 drivers/usb/host/xhci.c | 24 ++-- drivers/usb/misc/yurex.c | 3 drivers/usb/serial/iuu_phoenix.c | 20 ++- drivers/usb/serial/keyspan_pda.c | 2 drivers/usb/serial/option.c | 3 drivers/usb/storage/unusual_uas.h | 7 + drivers/usb/usbip/vhci_hcd.c | 2 drivers/vhost/net.c | 6 - drivers/video/fbdev/hyperv_fb.c | 6 - fs/btrfs/send.c | 49 +++++--- fs/proc/generic.c | 55 ++++++--- fs/proc/internal.h | 7 + fs/proc/proc_net.c | 16 -- include/linux/proc_fs.h | 8 + include/net/red.h | 4 kernel/workqueue.c | 13 +- lib/genalloc.c | 25 ++-- net/core/net-sysfs.c | 65 +++++++++-- net/ipv4/fib_frontend.c | 2 net/ipv4/gre_demux.c | 2 net/ipv4/netfilter/arp_tables.c | 2 net/ipv4/netfilter/ip_tables.c | 2 net/ipv6/netfilter/ip6_tables.c | 2 net/ncsi/ncsi-rsp.c | 2 net/netfilter/ipset/ip_set_hash_gen.h | 20 --- net/netfilter/nft_dynset.c | 6 - net/netfilter/xt_RATEEST.c | 3 net/sched/sch_choke.c | 2 net/sched/sch_gred.c | 2 net/sched/sch_red.c | 2 net/sched/sch_sfq.c | 2 net/sched/sch_taprio.c | 2 scripts/depmod.sh | 2 sound/pci/hda/hda_intel.c | 2 sound/pci/hda/patch_conexant.c | 1 sound/pci/hda/patch_realtek.c | 9 + sound/pci/hda/patch_via.c | 13 ++ sound/usb/midi.c | 4 virt/kvm/kvm_main.c | 3 95 files changed, 658 insertions(+), 314 deletions(-)
Adrian Hunter (1):
scsi: ufs-pci: Ensure UFS device is in PowerDown mode for suspend-to-disk ->poweroff()
Alexey Dobriyan (2):
proc: change ->nlink under proc_subdir_lock
proc: fix lookup in /proc/net subdirectories after setns(2)
Antoine Tenart (4):
net-sysfs: take the rtnl lock when storing xps_cpus
net-sysfs: take the rtnl lock when accessing xps_cpus_map and num_tc
net-sysfs: take the rtnl lock when storing xps_rxqs
net-sysfs: take the rtnl lock when accessing xps_rxqs_map and num_tc
Ard Biesheuvel (1):
crypto: ecdh - avoid buffer overflow in ecdh_set_secret()
Arnd Bergmann (1):
usb: gadget: select CONFIG_CRC32
Bard Liao (1):
Revert "device property: Keep secondary firmware node secondary by type"
Bart Van Assche (2):
scsi: ide: Do not set the RQF_PREEMPT flag for sense requests
scsi: scsi_transport_spi: Set RQF_PM for domain validation commands
Bean Huo (1):
scsi: ufs: Fix wrong print message in dev_err()
Bjørn Mork (2):
net: usb: qmi_wwan: add Quectel EM160R-GL
USB: serial: option: add Quectel EM160R-GL
Chandana Kishori Chiluveru (1):
usb: gadget: configfs: Preserve function ordering after bind failure
Charan Teja Reddy (1):
dmabuf: fix use-after-free of dmabuf's file->f_inode
Christophe JAILLET (1):
staging: mt7621-dma: Fix a resource leak in an error handling path
Cong Wang (1):
erspan: fix version 1 check in gre_parse_header()
Dan Carpenter (1):
atm: idt77252: call pci_disable_device() on error path
Dan Williams (1):
x86/mm: Fix leak of pmd ptlock
Daniel Palmer (1):
USB: serial: option: add LongSung M5710 module support
David Disseldorp (1):
scsi: target: Fix XCOPY NAA identifier lookup
Davide Caratti (1):
net/sched: sch_taprio: ensure to reset/destroy all child qdiscs
Dexuan Cui (1):
video: hyperv_fb: Fix the mmap() regression for v5.4.y and older
Dinghao Liu (2):
net: ethernet: mvneta: Fix error handling in mvneta_probe
net: ethernet: Fix memleak in ethoc_probe
Dominique Martinet (1):
kbuild: don't hardcode depmod path
Eddie Hung (1):
usb: gadget: configfs: Fix use-after-free issue with udc_name
Filipe Manana (1):
btrfs: send: fix wrong file path when there is an inode with a pending rmdir
Florian Fainelli (1):
net: systemport: set dev->max_mtu to UMAC_MAX_MTU_SIZE
Florian Westphal (1):
netfilter: xt_RATEEST: reject non-null terminated string from userspace
Greg Kroah-Hartman (2):
crypto: asym_tpm: correct zero out potential secrets Linux 5.4.89
Grygorii Strashko (1):
net: ethernet: ti: cpts: fix ethtool output when no ptp_clock registered
Guillaume Nault (1):
ipv4: Ignore ECN bits for fib lookups in fib_compute_spec_dst()
Hans de Goede (1):
Bluetooth: revert: hci_h5: close serdev device and free hu in h5_close
Heiner Kallweit (1):
r8169: work around power-saving bug on some chip versions
Huang Shijie (1):
lib/genalloc: fix the overflow when size is too big
Jakub Kicinski (1):
iavf: fix double-release of rtnl_lock
Jeff Dike (1):
virtio_net: Fix recursive call to cpus_read_lock()
Jerome Brunet (1):
usb: gadget: f_uac2: reset wMaxPacketSize
Johan Hovold (4):
USB: serial: iuu_phoenix: fix DMA from stack
USB: yurex: fix control-URB timeout handling
USB: usblp: fix DMA to stack
USB: serial: keyspan_pda: remove unused variable
John Wang (1):
net/ncsi: Use real net-device for response handler
Kai-Heng Feng (1):
ALSA: hda/realtek: Enable mute and micmute LED on HP EliteBook 850 G7
Kailang Yang (1):
ALSA: hda/realtek - Fix speaker volume control on Lenovo C940
Lai Jiangshan (1):
kvm: check tlbs_dirty directly
Lijun Pan (1):
ibmvnic: continue fatal error reset after passive init
Linus Torvalds (1):
depmod: handle the case of /sbin/depmod without /sbin in PATH
Manish Chopra (1):
qede: fix offload for IPIP tunnel packets
Manish Narani (1):
usb: gadget: u_ether: Fix MTU size mismatch with RX packet size
Martin Blumenstingl (2):
net: dsa: lantiq_gswip: Enable GSWIP_MII_CFG_EN also for internal PHYs
net: dsa: lantiq_gswip: Fix GSWIP_MII_CFG(p) register access
Matthew Auld (1):
drm/i915: clear the gpu reloc batch
Michael Grzeschik (1):
USB: xhci: fix U1/U2 handling for hardware with XHCI_INTEL_HOST quirk set
Nathan Chancellor (1):
powerpc: Handle .text.{hot,unlikely}.* in linker script
Pablo Neira Ayuso (1):
netfilter: nft_dynset: report EOPNOTSUPP on missing set feature
Paolo Bonzini (1):
KVM: x86: fix shift out of bounds reported by UBSAN
PeiSen Hou (1):
ALSA: hda/realtek: Add two "Intel Reference board" SSID in the ALC256.
Randy Dunlap (2):
net: sched: prevent invalid Scell_log shift count
usb: usbip: vhci_hcd: protect shift size
Rasmus Villemoes (2):
ethernet: ucc_geth: fix use-after-free in ucc_geth_remove()
ethernet: ucc_geth: set dev->max_mtu to 1518
Roland Dreier (1):
CDC-NCM: remove "connected" log message
Sean Young (1):
USB: cdc-acm: blacklist another IR Droid device
Serge Semin (1):
usb: dwc3: ulpi: Use VStsDone to detect PHY regs access completion
Shannon Nelson (1):
ionic: account for vlan tag len in rx buffer len
Sriharsha Allenki (1):
usb: gadget: Fix spinlock lockup on usb_function_deactivate
Stefan Chulski (4):
net: mvpp2: Add TCAM entry to drop flow control pause frames
net: mvpp2: prs: fix PPPoE with ipv6 packet parse
net: mvpp2: Fix GoP port 3 Networking Complex Control configurations
net: mvpp2: fix pkt coalescing int-threshold configuration
Subash Abhinov Kasiviswanathan (1):
netfilter: x_tables: Update remaining dereference to RCU
Sylwester Dziedziuch (1):
i40e: Fix Error I40E_AQ_RC_EINVAL when removing VFs
Takashi Iwai (2):
ALSA: usb-audio: Fix UBSAN warnings for MIDI jacks
ALSA: hda/via: Fix runtime PM for Clevo W35xSS
Tetsuo Handa (1):
USB: cdc-wdm: Fix use after free in service_outstanding_interrupt().
Thinh Nguyen (1):
usb: uas: Add PNY USB Portable SSD to unusual_uas
Vasily Averin (1):
netfilter: ipset: fix shift-out-of-bounds in htable_bits()
Xie He (1):
net: hdlc_ppp: Fix issues when mod_timer is called while timer is running
Yang Yingliang (1):
USB: gadget: legacy: fix return error code in acm_ms_bind()
Ying-Tsun Huang (1):
x86/mtrr: Correct the range check before performing MTRR type lookups
Yu Kuai (1):
usb: chipidea: ci_hdrc_imx: add missing put_device() call in usbmisc_get_init_data()
Yunfeng Ye (1):
workqueue: Kick a worker based on the actual activation of delayed works
Yunjian Wang (3):
tun: fix return value when the number of iovs exceeds MAX_SKB_FRAGS
net: hns: fix return value check in __lb_other_process()
vhost_net: fix ubuf refcount incorrectly when sendmsg fails
Zqiang (1):
usb: gadget: function: printer: Fix a memory leak for interface descriptor
bo liu (1):
ALSA: hda/conexant: add a new hda codec CX11970
taehyun.cho (1):
usb: gadget: enable super speed plus
Greg Kroah-Hartman
maintainerMakefile +2 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 88 +SUBLEVEL = 89 EXTRAVERSION = NAME = Kleptomaniac Octopus
@@ -436,7 +436,7 @@ LEX = flex YACC = bison AWK = awk INSTALLKERNEL := installkernel -DEPMOD = /sbin/depmod +DEPMOD = depmod PERL = perl PYTHON = python PYTHON3 = python3
arch/powerpc/kernel/vmlinux.lds.S +1 -1
@@ -98,7 +98,7 @@ SECTIONS ALIGN_FUNCTION(); #endif /* careful! __ftr_alt_* sections need to be close to .text */ - *(.text.hot TEXT_MAIN .text.fixup .text.unlikely .fixup __ftr_alt_* .ref.text); + *(.text.hot .text.hot.* TEXT_MAIN .text.fixup .text.unlikely .text.unlikely.* .fixup __ftr_alt_* .ref.text); #ifdef CONFIG_PPC64 *(.tramp.ftrace.text); #endif
arch/x86/kernel/cpu/mtrr/generic.c +3 -3
@@ -167,9 +167,6 @@ static u8 mtrr_type_lookup_variable(u64 start, u64 end, u64 *partial_end, *repeat =0 ; *uniform =1 ; -/* Make end inclusive instead of exclusive */ - end--; - prev_match =MTRR_TYPE_INVALID ;for (i =0 ; i < num_var_ranges; ++i) {unsigned short start_state, end_state, inclusive;
@@ -261,6 +258,9 @@ u8 mtrr_type_lookup(u64 start, u64 end, u8 *uniform)int repeat;u64 partial_end; +/* Make end inclusive instead of exclusive */ + end--; +if (!mtrr_state_set)return MTRR_TYPE_INVALID ;
arch/x86/kvm/mmu.h +1 -1
@@ -48,7 +48,7 @@ static inline u64 rsvd_bits(int s, int e)if (e < s)return 0 ; -return ((1ULL << (e - s +1 )) -1 ) << s; +return ((2ULL << (e - s)) -1 ) << s; }void kvm_mmu_set_mmio_spte_mask (u64 mmio_mask,u64 mmio_value,u64 access_mask);
arch/x86/mm/pgtable.c +2 -0
@@ -826,6 +826,8 @@ int pud_free_pmd_page(pud_t *pud, unsigned long addr) }free_page ((unsigned long )pmd_sv); + +pgtable_pmd_page_dtor (virt_to_page (pmd));free_page ((unsigned long )pmd);return 1 ;
crypto/asymmetric_keys/asym_tpm.c +1 -1
@@ -370,7 +370,7 @@ static uint32_t derive_pub_key(const void *pub_key, uint32_t len, uint8_t *buf)memcpy (cur, e,sizeof (e)); cur +=sizeof (e);/* Zero parameters to satisfy set_pub_key ABI. */ -memset (cur,0 ,SETKEY_PARAMS_SIZE ); +memzero_explicit (cur,SETKEY_PARAMS_SIZE );return cur - buf; }
crypto/ecdh.c +2 -1
@@ -39,7 +39,8 @@ static int ecdh_set_secret(struct crypto_kpp *tfm, const void *buf,struct ecdh params;unsigned int ndigits; -if (crypto_ecdh_decode_key (buf, len, ¶ms) <0 ) +if (crypto_ecdh_decode_key (buf, len, ¶ms) <0 || + params.key_size >sizeof (ctx->private_key))return -EINVAL ; ndigits =ecdh_supported_curve (params.curve_id);
drivers/atm/idt77252.c +1 -1
@@ -3606,7 +3606,7 @@ static int idt77252_init_one(struct pci_dev *pcidev,if ((err =dma_set_mask_and_coherent (&pcidev->dev,DMA_BIT_MASK (32 )))) {printk ("idt77252: can't enable DMA for PCI device at %s\n" ,pci_name (pcidev)); -return err; + goto err_out_disable_pdev; } card =kzalloc (sizeof (struct idt77252_dev ),GFP_KERNEL );
drivers/base/core.c +1 -1
@@ -3414,7 +3414,7 @@ void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode)if (fwnode_is_primary (fn)) { dev->fwnode = fn->secondary;if (!(parent && fn == parent->fwnode)) - fn->secondary =ERR_PTR (-ENODEV ); + fn->secondary =NULL ; }else { dev->fwnode =NULL ; }
drivers/bluetooth/hci_h5.c +2 -6
@@ -250,12 +250,8 @@ static int h5_close(struct hci_uart *hu)if (h5->vnd && h5->vnd->close) h5->vnd->close (h5); -if (hu->serdev) -serdev_device_close (hu->serdev); - -kfree_skb (h5->rx_skb); -kfree (h5); - h5 =NULL ; +if (!hu->serdev) +kfree (h5);return 0 ; }
drivers/dma-buf/dma-buf.c +17 -4
@@ -76,10 +76,6 @@ static void dma_buf_release(struct dentry *dentry) dmabuf->ops->release (dmabuf); -mutex_lock (&db_list.lock); -list_del (&dmabuf->list_node); -mutex_unlock (&db_list.lock); -if (dmabuf->resv == (struct dma_resv *)&dmabuf[1 ])dma_resv_fini (dmabuf->resv);
@@ -88,6 +84,22 @@ static void dma_buf_release(struct dentry *dentry)kfree (dmabuf); } +static int dma_buf_file_release (struct inode *inode,struct file *file) +{ +struct dma_buf *dmabuf; + +if (!is_dma_buf_file (file)) +return -EINVAL ; + + dmabuf = file->private_data; + +mutex_lock (&db_list.lock); +list_del (&dmabuf->list_node); +mutex_unlock (&db_list.lock); + +return 0 ; +} +static const struct dentry_operations dma_buf_dentry_ops = { .d_dname = dmabuffs_dname, .d_release = dma_buf_release,
@@ -413,6 +425,7 @@ static void dma_buf_show_fdinfo(struct seq_file *m, struct file *file) }static const struct file_operations dma_buf_fops = { + .release = dma_buf_file_release, .mmap = dma_buf_mmap_internal, .llseek = dma_buf_llseek, .poll = dma_buf_poll,
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +3 -1
@@ -936,7 +936,7 @@ static void reloc_gpu_flush(struct reloc_cache *cache)GEM_BUG_ON (cache->rq_size >= obj->base.size /sizeof (u32)); cache->rq_cmd[cache->rq_size] =MI_BATCH_BUFFER_END ; -__i915_gem_object_flush_map (obj,0 ,sizeof (u32) * (cache->rq_size +1 )); +i915_gem_object_flush_map (obj);i915_gem_object_unpin_map (obj);intel_gt_chipset_flush (cache->rq->engine->gt);
@@ -1163,6 +1163,8 @@ static int __reloc_gpu_alloc(struct i915_execbuffer *eb, goto out_pool; } +memset32 (cmd,0 , pool->obj->base.size /sizeof (u32)); + batch =i915_vma_instance (pool->obj, vma->vm,NULL );if (IS_ERR (batch)) { err =PTR_ERR (batch);
drivers/ide/ide-atapi.c +0 -1
@@ -223,7 +223,6 @@ void ide_prep_sense(ide_drive_t *drive, struct request *rq) sense_rq->rq_disk = rq->rq_disk; sense_rq->cmd_flags =REQ_OP_DRV_IN ;ide_req (sense_rq)->type =ATA_PRIV_SENSE ; - sense_rq->rq_flags |=RQF_PREEMPT ; req->cmd[0 ] =GPCMD_REQUEST_SENSE ; req->cmd[4 ] = cmd_len;
drivers/ide/ide-io.c +0 -5
@@ -512,11 +512,6 @@ blk_status_t ide_issue_rq(ide_drive_t *drive, struct request *rq,* above to return us whatever is in the queue. Since we call * ide_do_request() ourselves, we end up taking requests while * the queue is blocked... -* -* We let requests forced at head of queue with ide-preempt -* though. I hope that doesn't happen too much, hopefully not -* unless the subdriver triggers such a thing in its own PM -* state machine. */ if ((drive->dev_flags & IDE_DFLAG_BLOCKED) && ata_pm_request(rq) == 0 &&
drivers/net/dsa/lantiq_gswip.c +7 -20
@@ -92,9 +92,7 @@ GSWIP_MDIO_PHY_FDUP_MASK)/* GSWIP MII Registers */ -#define GSWIP_MII_CFG0 0x00 -#define GSWIP_MII_CFG1 0x02 -#define GSWIP_MII_CFG5 0x04 +#define GSWIP_MII_CFGp (p) (0x2 * (p))#define GSWIP_MII_CFG_EN BIT(14)#define GSWIP_MII_CFG_LDCLKDIS BIT(12)#define GSWIP_MII_CFG_MODE_MIIP 0x0
@@ -392,17 +390,9 @@ static void gswip_mii_mask(struct gswip_priv *priv, u32 clear, u32 set,static void gswip_mii_mask_cfg (struct gswip_priv *priv,u32 clear,u32 set,int port) { -switch (port) { -case 0 : -gswip_mii_mask (priv, clear, set,GSWIP_MII_CFG0 ); -break ; -case 1 : -gswip_mii_mask (priv, clear, set,GSWIP_MII_CFG1 ); -break ; -case 5 : -gswip_mii_mask (priv, clear, set,GSWIP_MII_CFG5 ); -break ; - } +/* There's no MII_CFG register for the CPU port */ +if (!dsa_is_cpu_port (priv->ds, port)) +gswip_mii_mask (priv, clear, set,GSWIP_MII_CFGp (port)); } static void gswip_mii_mask_pcdu(struct gswip_priv *priv, u32 clear, u32 set,
@@ -806,9 +796,8 @@ static int gswip_setup(struct dsa_switch *ds)gswip_mdio_mask (priv,0xff ,0x09 ,GSWIP_MDIO_MDC_CFG1 );/* Disable the xMII link */ -gswip_mii_mask_cfg (priv,GSWIP_MII_CFG_EN ,0 ,0 ); -gswip_mii_mask_cfg (priv,GSWIP_MII_CFG_EN ,0 ,1 ); -gswip_mii_mask_cfg (priv,GSWIP_MII_CFG_EN ,0 ,5 ); +for (i =0 ; i < priv->hw_info->max_ports; i++) +gswip_mii_mask_cfg (priv,GSWIP_MII_CFG_EN ,0 , i);/* enable special tag insertion on cpu port */ gswip_switch_mask(priv, 0, GSWIP_FDMA_PCTRL_STEN,
@@ -1522,9 +1511,7 @@ static void gswip_phylink_mac_link_up(struct dsa_switch *ds, int port, {struct gswip_priv *priv = ds->priv; -/* Enable the xMII interface only for the external PHY */ -if (interface !=PHY_INTERFACE_MODE_INTERNAL ) -gswip_mii_mask_cfg (priv,0 ,GSWIP_MII_CFG_EN , port); +gswip_mii_mask_cfg (priv,0 ,GSWIP_MII_CFG_EN , port); } static void gswip_get_strings(struct dsa_switch *ds, int port, u32 stringset,
drivers/net/ethernet/broadcom/bcmsysport.c +1 -0
@@ -2520,6 +2520,7 @@ static int bcm_sysport_probe(struct platform_device *pdev)NETIF_F_IP_CSUM |NETIF_F_IPV6_CSUM ; dev->hw_features |= dev->features; dev->vlan_features |= dev->features; + dev->max_mtu =UMAC_MAX_MTU_SIZE ;/* Request the WOL interrupt and advertise suspend if available */ priv->wol_irq_disabled =1 ;
drivers/net/ethernet/ethoc.c +2 -1
@@ -1207,7 +1207,7 @@ static int ethoc_probe(struct platform_device *pdev) ret =mdiobus_register (priv->mdio);if (ret) {dev_err (&netdev->dev,"failed to register MDIO bus\n" ); - goto free2; + goto free3; } ret =ethoc_mdio_probe (netdev);
@@ -1239,6 +1239,7 @@ static int ethoc_probe(struct platform_device *pdev)netif_napi_del (&priv->napi); error:mdiobus_unregister (priv->mdio); +free3:mdiobus_free (priv->mdio); free2:clk_disable_unprepare (priv->clk);
drivers/net/ethernet/freescale/ucc_geth.c +2 -1
@@ -3890,6 +3890,7 @@ static int ucc_geth_probe(struct platform_device* ofdev)INIT_WORK (&ugeth->timeout_work, ucc_geth_timeout_work);netif_napi_add (dev, &ugeth->napi, ucc_geth_poll,64 ); dev->mtu =1500 ; + dev->max_mtu =1518 ; ugeth->msg_enable =netif_msg_init (debug.msg_enable,UGETH_MSG_DEFAULT ); ugeth->phy_interface = phy_interface;
@@ -3935,12 +3936,12 @@ static int ucc_geth_remove(struct platform_device* ofdev)struct device_node *np = ofdev->dev.of_node;unregister_netdev (dev); -free_netdev (dev);ucc_geth_memclean (ugeth);if (of_phy_is_fixed_link (np))of_phy_deregister_fixed_link (np);of_node_put (ugeth->ug_info->tbi_node);of_node_put (ugeth->ug_info->phy_node); +free_netdev (dev);return 0 ; }
drivers/net/ethernet/hisilicon/hns/hns_ethtool.c +4 -0
@@ -415,6 +415,10 @@ static void __lb_other_process(struct hns_nic_ring_data *ring_data,/* for mutl buffer*/ new_skb =skb_copy (skb,GFP_ATOMIC );dev_kfree_skb_any (skb); +if (!new_skb) { +netdev_err (ndev,"skb alloc failed\n" ); +return ; + } skb = new_skb; check_ok =0 ;
drivers/net/ethernet/ibm/ibmvnic.c +1 -2
@@ -2152,8 +2152,7 @@ static void __ibmvnic_reset(struct work_struct *work) rc =do_hard_reset (adapter, rwi, reset_state);rtnl_unlock (); } - }else if (!(rwi->reset_reason ==VNIC_RESET_FATAL && - adapter->from_passive_init)) { + }else { rc =do_reset (adapter, rwi, reset_state); }kfree (rwi);
drivers/net/ethernet/intel/i40e/i40e.h +3 -0
@@ -129,6 +129,7 @@ enum i40e_state_t { __I40E_RESET_INTR_RECEIVED, __I40E_REINIT_REQUESTED, __I40E_PF_RESET_REQUESTED, + __I40E_PF_RESET_AND_REBUILD_REQUESTED, __I40E_CORE_RESET_REQUESTED, __I40E_GLOBAL_RESET_REQUESTED, __I40E_EMP_RESET_INTR_RECEIVED,
@@ -156,6 +157,8 @@ enum i40e_state_t { };#define I40E_PF_RESET_FLAG BIT_ULL(__I40E_PF_RESET_REQUESTED) +#define I40E_PF_RESET_AND_REBUILD_FLAG \ + BIT_ULL(__I40E_PF_RESET_AND_REBUILD_REQUESTED)/* VSI state flags */ enum i40e_vsi_state_t {
drivers/net/ethernet/intel/i40e/i40e_main.c +10 -0
@@ -44,6 +44,8 @@ static int i40e_setup_misc_vector(struct i40e_pf *pf);static void i40e_determine_queue_usage (struct i40e_pf *pf);static int i40e_setup_pf_filter_control (struct i40e_pf *pf);static void i40e_prep_for_reset (struct i40e_pf *pf,bool lock_acquired); +static void i40e_reset_and_rebuild (struct i40e_pf *pf,bool reinit, +bool lock_acquired);static int i40e_reset (struct i40e_pf *pf);static void i40e_rebuild (struct i40e_pf *pf,bool reinit,bool lock_acquired);static int i40e_setup_misc_vector_for_recovery_mode (struct i40e_pf *pf);
@@ -8484,6 +8486,14 @@ void i40e_do_reset(struct i40e_pf *pf, u32 reset_flags, bool lock_acquired) "FW LLDP is disabled\n" : "FW LLDP is enabled\n"); + }else if (reset_flags &I40E_PF_RESET_AND_REBUILD_FLAG ) { +/* Request a PF Reset +* +* Resets PF and reinitializes PFs VSI. +*/ +i40e_prep_for_reset (pf, lock_acquired); +i40e_reset_and_rebuild (pf, true, lock_acquired); + }else if (reset_flags &BIT_ULL (__I40E_REINIT_REQUESTED)) {int v;
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +2 -2
@@ -1704,7 +1704,7 @@ int i40e_pci_sriov_configure(struct pci_dev *pdev, int num_vfs)if (num_vfs) {if (!(pf->flags &I40E_FLAG_VEB_MODE_ENABLED )) { pf->flags |=I40E_FLAG_VEB_MODE_ENABLED ; -i40e_do_reset_safe (pf,I40E_PF_RESET_FLAG ); +i40e_do_reset_safe (pf,I40E_PF_RESET_AND_REBUILD_FLAG ); } ret =i40e_pci_sriov_enable (pdev, num_vfs); goto sriov_configure_out;
@@ -1713,7 +1713,7 @@ int i40e_pci_sriov_configure(struct pci_dev *pdev, int num_vfs)if (!pci_vfs_assigned (pf->pdev)) {i40e_free_vfs (pf); pf->flags &= ~I40E_FLAG_VEB_MODE_ENABLED ; -i40e_do_reset_safe (pf,I40E_PF_RESET_FLAG ); +i40e_do_reset_safe (pf,I40E_PF_RESET_AND_REBUILD_FLAG ); }else {dev_warn (&pdev->dev,"Unable to free VFs because some are assigned to VMs.\n" ); ret = -EINVAL ;
drivers/net/ethernet/intel/iavf/iavf_main.c +1 -3
@@ -1844,11 +1844,9 @@ static int iavf_init_get_resources(struct iavf_adapter *adapter)netif_tx_stop_all_queues (netdev);if (CLIENT_ALLOWED (adapter)) { err =iavf_lan_add_device (adapter); -if (err) { -rtnl_unlock (); +if (err)dev_info (&pdev->dev,"Failed to add VF to client API service list: %d\n" , err); - } }dev_info (&pdev->dev,"MAC address: %pM\n" , adapter->hw.mac.addr);if (netdev->features &NETIF_F_GRO )
drivers/net/ethernet/marvell/mvneta.c +1 -1
@@ -4694,7 +4694,7 @@ static int mvneta_probe(struct platform_device *pdev) err =mvneta_port_power_up (pp, pp->phy_interface);if (err <0 ) {dev_err (&pdev->dev,"can't power up port\n" ); -return err; + goto err_netdev; }/* Armada3700 network controller does not support per-cpu
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +7 -6
@@ -1129,7 +1129,7 @@ static void mvpp22_gop_init_rgmii(struct mvpp2_port *port)regmap_read (priv->sysctrl_base,GENCONF_CTRL0 , &val);if (port->gop_id ==2 ) - val |=GENCONF_CTRL0_PORT0_RGMII |GENCONF_CTRL0_PORT1_RGMII ; + val |=GENCONF_CTRL0_PORT0_RGMII ;else if (port->gop_id ==3 ) val |=GENCONF_CTRL0_PORT1_RGMII_MII ;regmap_write (priv->sysctrl_base,GENCONF_CTRL0 , val);
@@ -2161,17 +2161,18 @@ static void mvpp2_rx_pkts_coal_set(struct mvpp2_port *port,static void mvpp2_tx_pkts_coal_set (struct mvpp2_port *port,struct mvpp2_tx_queue *txq) { -unsigned int thread =mvpp2_cpu_to_thread (port->priv,get_cpu ()); +unsigned int thread;u32 val;if (txq->done_pkts_coal >MVPP2_TXQ_THRESH_MASK ) txq->done_pkts_coal =MVPP2_TXQ_THRESH_MASK ; val = (txq->done_pkts_coal <<MVPP2_TXQ_THRESH_OFFSET ); -mvpp2_thread_write (port->priv, thread,MVPP2_TXQ_NUM_REG , txq->id); -mvpp2_thread_write (port->priv, thread,MVPP2_TXQ_THRESH_REG , val); - -put_cpu (); +/* PKT-coalescing registers are per-queue + per-thread */ +for (thread =0 ; thread <MVPP2_MAX_THREADS ; thread++) { +mvpp2_thread_write (port->priv, thread,MVPP2_TXQ_NUM_REG , txq->id); +mvpp2_thread_write (port->priv, thread,MVPP2_TXQ_THRESH_REG , val); + } }static u32 mvpp2_usec_to_cycles (u32 usec,unsigned long clk_hz)
drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c +36 -2
@@ -405,6 +405,38 @@ static int mvpp2_prs_tcam_first_free(struct mvpp2 *priv, unsigned char start,return -EINVAL ; } +/* Drop flow control pause frames */ +static void mvpp2_prs_drop_fc (struct mvpp2 *priv) +{ +unsigned char da[ETH_ALEN ] = {0x01 ,0x80 ,0xC2 ,0x00 ,0x00 ,0x01 }; +struct mvpp2_prs_entry pe; +unsigned int len; + +memset (&pe,0 ,sizeof (pe)); + +/* For all ports - drop flow control frames */ + pe.index =MVPP2_PE_FC_DROP ; +mvpp2_prs_tcam_lu_set (&pe,MVPP2_PRS_LU_MAC ); + +/* Set match on DA */ + len =ETH_ALEN ; +while (len--) +mvpp2_prs_tcam_data_byte_set (&pe, len, da[len],0xff ); + +mvpp2_prs_sram_ri_update (&pe,MVPP2_PRS_RI_DROP_MASK , +MVPP2_PRS_RI_DROP_MASK ); + +mvpp2_prs_sram_bits_set (&pe,MVPP2_PRS_SRAM_LU_GEN_BIT ,1 ); +mvpp2_prs_sram_next_lu_set (&pe,MVPP2_PRS_LU_FLOWS ); + +/* Mask all ports */ +mvpp2_prs_tcam_port_map_set (&pe,MVPP2_PRS_PORT_MASK ); + +/* Update shadow table and hw entry */ +mvpp2_prs_shadow_set (priv, pe.index,MVPP2_PRS_LU_MAC ); +mvpp2_prs_hw_write (priv, &pe); +} +/* Enable/disable dropping all mac da's */ static void mvpp2_prs_mac_drop_all_set (struct mvpp2 *priv,int port,bool add) {
@@ -1162,6 +1194,7 @@ static void mvpp2_prs_mac_init(struct mvpp2 *priv)mvpp2_prs_hw_write (priv, &pe);/* Create dummy entries for drop all and promiscuous modes */ +mvpp2_prs_drop_fc (priv);mvpp2_prs_mac_drop_all_set (priv,0 , false);mvpp2_prs_mac_promisc_set (priv,0 ,MVPP2_PRS_L2_UNI_CAST , false);mvpp2_prs_mac_promisc_set (priv,0 ,MVPP2_PRS_L2_MULTI_CAST , false);
@@ -1647,8 +1680,9 @@ static int mvpp2_prs_pppoe_init(struct mvpp2 *priv)mvpp2_prs_sram_next_lu_set (&pe,MVPP2_PRS_LU_IP6 );mvpp2_prs_sram_ri_update (&pe,MVPP2_PRS_RI_L3_IP6 ,MVPP2_PRS_RI_L3_PROTO_MASK ); -/* Skip eth_type + 4 bytes of IPv6 header */ -mvpp2_prs_sram_shift_set (&pe,MVPP2_ETH_TYPE_LEN +4 , +/* Jump to DIP of IPV6 header */ +mvpp2_prs_sram_shift_set (&pe,MVPP2_ETH_TYPE_LEN +8 + +MVPP2_MAX_L3_ADDR_SIZE ,MVPP2_PRS_SRAM_OP_SEL_SHIFT_ADD );/* Set L3 offset */ mvpp2_prs_sram_offset_set(&pe, MVPP2_PRS_SRAM_UDF_TYPE_L3,
drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.h +1 -1
@@ -129,7 +129,7 @@#define MVPP2_PE_VID_EDSA_FLTR_DEFAULT (MVPP2_PRS_TCAM_SRAM_SIZE - 7)#define MVPP2_PE_VLAN_DBL (MVPP2_PRS_TCAM_SRAM_SIZE - 6)#define MVPP2_PE_VLAN_NONE (MVPP2_PRS_TCAM_SRAM_SIZE - 5) -/* reserved */ +#define MVPP2_PE_FC_DROP (MVPP2_PRS_TCAM_SRAM_SIZE - 4)#define MVPP2_PE_MAC_MC_PROMISCUOUS (MVPP2_PRS_TCAM_SRAM_SIZE - 3)#define MVPP2_PE_MAC_UC_PROMISCUOUS (MVPP2_PRS_TCAM_SRAM_SIZE - 2)#define MVPP2_PE_MAC_NON_PROMISCUOUS (MVPP2_PRS_TCAM_SRAM_SIZE - 1)
drivers/net/ethernet/pensando/ionic/ionic_txrx.c +1 -1
@@ -257,7 +257,7 @@ void ionic_rx_fill(struct ionic_queue *q)unsigned int len;unsigned int i; - len = netdev->mtu +ETH_HLEN ; + len = netdev->mtu +ETH_HLEN +VLAN_HLEN ;for (i =ionic_q_space_avail (q); i; i--) { skb =ionic_rx_skb_alloc (q, len, &dma_addr);
drivers/net/ethernet/qlogic/qede/qede_fp.c +5 -0
@@ -1737,6 +1737,11 @@ netdev_features_t qede_features_check(struct sk_buff *skb, ntohs(udp_hdr(skb)->dest) != gnv_port))return features & ~(NETIF_F_CSUM_MASK |NETIF_F_GSO_MASK ); + }else if (l4_proto ==IPPROTO_IPIP ) { +/* IPIP tunnels are unknown to the device or at least unsupported natively, +* offloads for them can't be done trivially, so disable them for such skb. +*/ +return features & ~(NETIF_F_CSUM_MASK |NETIF_F_GSO_MASK ); } }
drivers/net/ethernet/realtek/r8169_main.c +4 -2
@@ -3958,7 +3958,8 @@ static void rtl_pll_power_down(struct rtl8169_private *tp) }switch (tp->mac_version) { - case RTL_GIGA_MAC_VER_25 ... RTL_GIGA_MAC_VER_33: + case RTL_GIGA_MAC_VER_25 ... RTL_GIGA_MAC_VER_26: + case RTL_GIGA_MAC_VER_32 ... RTL_GIGA_MAC_VER_33:case RTL_GIGA_MAC_VER_37 :case RTL_GIGA_MAC_VER_39 :case RTL_GIGA_MAC_VER_43 :
@@ -3987,7 +3988,8 @@ static void rtl_pll_power_down(struct rtl8169_private *tp)static void rtl_pll_power_up (struct rtl8169_private *tp) {switch (tp->mac_version) { - case RTL_GIGA_MAC_VER_25 ... RTL_GIGA_MAC_VER_33: + case RTL_GIGA_MAC_VER_25 ... RTL_GIGA_MAC_VER_26: + case RTL_GIGA_MAC_VER_32 ... RTL_GIGA_MAC_VER_33:case RTL_GIGA_MAC_VER_37 :case RTL_GIGA_MAC_VER_39 :case RTL_GIGA_MAC_VER_43 :
drivers/net/ethernet/ti/cpts.c +2 -0
@@ -485,6 +485,7 @@ void cpts_unregister(struct cpts *cpts)ptp_clock_unregister (cpts->clock); cpts->clock =NULL ; + cpts->phc_index =-1 ;cpts_write32 (cpts,0 , int_enable);cpts_write32 (cpts,0 , control);
@@ -667,6 +668,7 @@ struct cpts *cpts_create(struct device *dev, void __iomem *regs, cpts->cc.read = cpts_systim_read; cpts->cc.mask =CLOCKSOURCE_MASK (32 ); cpts->info = cpts_info; + cpts->phc_index =-1 ;cpts_calc_mult_shift (cpts);/* save cc.mult original value as it can be modified
drivers/net/tun.c +1 -1
@@ -1469,7 +1469,7 @@ static struct sk_buff *tun_napi_alloc_frags(struct tun_file *tfile,int i;if (it->nr_segs >MAX_SKB_FRAGS +1 ) -return ERR_PTR (-ENOMEM ); +return ERR_PTR (-EMSGSIZE );local_bh_disable (); skb =napi_get_frags (&tfile->napi);
drivers/net/usb/cdc_ncm.c +0 -3
@@ -1625,9 +1625,6 @@ static void cdc_ncm_status(struct usbnet *dev, struct urb *urb)* USB_CDC_NOTIFY_NETWORK_CONNECTION notification shall be * sent by device after USB_CDC_NOTIFY_SPEED_CHANGE. */ -netif_info (dev, link, dev->net, -"network connection: %sconnected\n" , - !!event->wValue ?"" :"dis" );usbnet_link_change (dev, !!event->wValue,0 );break ;
drivers/net/usb/qmi_wwan.c +1 -0
@@ -1058,6 +1058,7 @@ static const struct usb_device_id products[] = { {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0125)}, /* Quectel EC25, EC20 R2.0 Mini PCIe */ {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0306)}, /* Quectel EP06/EG06/EM06 */ {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0512)}, /* Quectel EG12/EM12 */ + {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0620)}, /* Quectel EM160R-GL */ {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0800)}, /* Quectel RM500Q-GL *//* 3. Combined interface devices matching on interface number */
drivers/net/virtio_net.c +7 -5
@@ -2072,14 +2072,16 @@ static int virtnet_set_channels(struct net_device *dev,get_online_cpus (); err =_virtnet_set_queues (vi, queue_pairs); -if (!err) { -netif_set_real_num_tx_queues (dev, queue_pairs); -netif_set_real_num_rx_queues (dev, queue_pairs); - -virtnet_set_affinity (vi); +if (err) { +put_online_cpus (); + goto err; } +virtnet_set_affinity (vi);put_online_cpus (); +netif_set_real_num_tx_queues (dev, queue_pairs); +netif_set_real_num_rx_queues (dev, queue_pairs); + err:return err; }
drivers/net/wan/hdlc_ppp.c +7 -0
@@ -569,6 +569,13 @@ static void ppp_timer(struct timer_list *t)unsigned long flags;spin_lock_irqsave (&ppp->lock, flags); +/* mod_timer could be called after we entered this function but +* before we got the lock. +*/ +if (timer_pending (&proto->timer)) { +spin_unlock_irqrestore (&ppp->lock, flags); +return ; + }switch (proto->state) {case STOPPING :case REQ_SENT :
drivers/scsi/scsi_transport_spi.c +19 -8
@@ -117,12 +117,16 @@ static int spi_execute(struct scsi_device *sdev, const void *cmd, sshdr = &sshdr_tmp;for (i =0 ; i <DV_RETRIES ; i++) { +/* +* The purpose of the RQF_PM flag below is to bypass the +* SDEV_QUIESCE state. +*/ result =scsi_execute (sdev, cmd, dir, buffer, bufflen, sense, sshdr,DV_TIMEOUT ,/* retries */ 1 ,REQ_FAILFAST_DEV |REQ_FAILFAST_TRANSPORT |REQ_FAILFAST_DRIVER , -0 ,NULL ); +RQF_PM ,NULL );if (driver_byte (result) !=DRIVER_SENSE || sshdr->sense_key !=UNIT_ATTENTION )break ;
@@ -1005,23 +1009,26 @@ spi_dv_device(struct scsi_device *sdev)*/ lock_system_sleep (); +if (scsi_autopm_get_device (sdev)) + goto unlock_system_sleep; +if (unlikely (spi_dv_in_progress (starget))) - goto unlock; + goto put_autopm;if (unlikely (scsi_device_get (sdev))) - goto unlock; + goto put_autopm;spi_dv_in_progress (starget) =1 ; buffer =kzalloc (len,GFP_KERNEL );if (unlikely (!buffer)) - goto out_put; + goto put_sdev;/* We need to verify that the actual device will quiesce; the * later target quiesce is just a nice to have */ if (unlikely (scsi_device_quiesce (sdev))) - goto out_free; + goto free_buffer;scsi_target_quiesce (starget);
@@ -1041,12 +1048,16 @@ spi_dv_device(struct scsi_device *sdev)spi_initial_dv (starget) =1 ; - out_free: +free_buffer:kfree (buffer); - out_put: + +put_sdev:spi_dv_in_progress (starget) =0 ;scsi_device_put (sdev); -unlock: +put_autopm: +scsi_autopm_put_device (sdev); + +unlock_system_sleep:unlock_system_sleep (); }EXPORT_SYMBOL (spi_dv_device);
drivers/scsi/ufs/ufshcd-pci.c +32 -2
@@ -96,6 +96,30 @@ static int ufshcd_pci_resume(struct device *dev) {return ufshcd_system_resume (dev_get_drvdata (dev)); } + +/** +* ufshcd_pci_poweroff - suspend-to-disk poweroff function +* @dev: pointer to PCI device handle +* +* Returns 0 if successful +* Returns non-zero otherwise +*/ +static int ufshcd_pci_poweroff (struct device *dev) +{ +struct ufs_hba *hba =dev_get_drvdata (dev); +int spm_lvl = hba->spm_lvl; +int ret; + +/* +* For poweroff we need to set the UFS device to PowerDown mode. +* Force spm_lvl to ensure that. +*/ + hba->spm_lvl =5 ; + ret =ufshcd_system_suspend (hba); + hba->spm_lvl = spm_lvl; +return ret; +} +#endif /* !CONFIG_PM_SLEEP */ #ifdef CONFIG_PM
@@ -190,8 +214,14 @@ ufshcd_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) }static const struct dev_pm_ops ufshcd_pci_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(ufshcd_pci_suspend, - ufshcd_pci_resume) +#ifdef CONFIG_PM_SLEEP + .suspend = ufshcd_pci_suspend, + .resume = ufshcd_pci_resume, + .freeze = ufshcd_pci_suspend, + .thaw = ufshcd_pci_resume, + .poweroff = ufshcd_pci_poweroff, + .restore = ufshcd_pci_resume, +#endifSET_RUNTIME_PM_OPS (ufshcd_pci_runtime_suspend, ufshcd_pci_runtime_resume, ufshcd_pci_runtime_idle)
drivers/scsi/ufs/ufshcd.c +1 -1
@@ -3593,7 +3593,7 @@ static int ufshcd_dme_enable(struct ufs_hba *hba) ret =ufshcd_send_uic_cmd (hba, &uic_cmd);if (ret)dev_err (hba->dev, -"dme-reset: error code %d\n" , ret); +"dme-enable: error code %d\n" , ret);return ret; }
drivers/staging/mt7621-dma/mtk-hsdma.c +3 -1
@@ -714,7 +714,7 @@ static int mtk_hsdma_probe(struct platform_device *pdev) ret =dma_async_device_register (dd);if (ret) {dev_err (&pdev->dev,"failed to register dma device\n" ); -return ret; + goto err_uninit_hsdma; } ret = of_dma_controller_register(pdev->dev.of_node,
@@ -730,6 +730,8 @@ static int mtk_hsdma_probe(struct platform_device *pdev) err_unregister:dma_async_device_unregister (dd); +err_uninit_hsdma: +mtk_hsdma_uninit (hsdma);return ret; }
drivers/target/target_core_xcopy.c +70 -49
160 lines not on this page · raw message
drivers/target/target_core_xcopy.h +1 -0
@@ -29,6 +29,7 @@ struct xcopy_op {struct se_device *dst_dev;unsigned char dst_tid_wwn[XCOPY_NAA_IEEE_REGEX_LEN ];unsigned char local_dev_wwn[XCOPY_NAA_IEEE_REGEX_LEN ]; +struct percpu_ref *remote_lun_ref;sector_t src_lba;sector_t dst_lba;
drivers/usb/chipidea/ci_hdrc_imx.c +5 -1
@@ -139,9 +139,13 @@ static struct imx_usbmisc_data *usbmisc_get_init_data(struct device *dev) misc_pdev =of_find_device_by_node (args.np);of_node_put (args.np); -if (!misc_pdev || !platform_get_drvdata (misc_pdev)) +if (!misc_pdev)return ERR_PTR (-EPROBE_DEFER ); +if (!platform_get_drvdata (misc_pdev)) { +put_device (&misc_pdev->dev); +return ERR_PTR (-EPROBE_DEFER ); + } data->dev = &misc_pdev->dev;/*
drivers/usb/class/cdc-acm.c +4 -0
@@ -1907,6 +1907,10 @@ static const struct usb_device_id acm_ids[] = { { USB_DEVICE(0x04d8, 0x0083), /* Bootloader mode */ .driver_info = IGNORE_DEVICE, }, + + { USB_DEVICE(0x04d8, 0xf58b), + .driver_info = IGNORE_DEVICE, + }, #endif /*Samsung phone in firmware update mode */
drivers/usb/class/cdc-wdm.c +13 -3
@@ -465,13 +465,23 @@ static int service_outstanding_interrupt(struct wdm_device *desc)if (!desc->resp_count || !--desc->resp_count) goto out; +if (test_bit (WDM_DISCONNECTING , &desc->flags)) { + rv = -ENODEV ; + goto out; + } +if (test_bit (WDM_RESETTING , &desc->flags)) { + rv = -EIO ; + goto out; + } +set_bit (WDM_RESPONDING , &desc->flags);spin_unlock_irq (&desc->iuspin); rv =usb_submit_urb (desc->response,GFP_KERNEL );spin_lock_irq (&desc->iuspin);if (rv) { -dev_err (&desc->intf->dev, -"usb_submit_urb failed with result %d\n" , rv); +if (!test_bit (WDM_DISCONNECTING , &desc->flags)) +dev_err (&desc->intf->dev, +"usb_submit_urb failed with result %d\n" , rv);/* make sure the next notification trigger a submit */ clear_bit (WDM_RESPONDING , &desc->flags);
@@ -1026,9 +1036,9 @@ static void wdm_disconnect(struct usb_interface *intf)wake_up_all (&desc->wait);mutex_lock (&desc->rlock);mutex_lock (&desc->wlock); -kill_urbs (desc);cancel_work_sync (&desc->rxwork);cancel_work_sync (&desc->service_outs_intr); +kill_urbs (desc);mutex_unlock (&desc->wlock);mutex_unlock (&desc->rlock);
drivers/usb/class/usblp.c +19 -2
@@ -274,8 +274,25 @@ static int usblp_ctrl_msg(struct usblp *usblp, int request, int type, int dir, i#define usblp_reset (usblp)\ usblp_ctrl_msg(usblp, USBLP_REQ_RESET, USB_TYPE_CLASS, USB_DIR_OUT, USB_RECIP_OTHER, 0, NULL, 0) -#define usblp_hp_channel_change_request (usblp, channel, buffer) \ - usblp_ctrl_msg(usblp, USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST, USB_TYPE_VENDOR, USB_DIR_IN, USB_RECIP_INTERFACE, channel, buffer, 1) +static int usblp_hp_channel_change_request (struct usblp *usblp,int channel,u8 *new_channel) +{ +u8 *buf; +int ret; + + buf =kzalloc (1 ,GFP_KERNEL ); +if (!buf) +return -ENOMEM ; + + ret =usblp_ctrl_msg (usblp,USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST , +USB_TYPE_VENDOR ,USB_DIR_IN ,USB_RECIP_INTERFACE , + channel, buf,1 ); +if (ret ==0 ) + *new_channel = buf[0 ]; + +kfree (buf); + +return ret; +}/* * See the description for usblp_select_alts() below for the usage
drivers/usb/dwc3/core.h +1 -0
@@ -283,6 +283,7 @@/* Global USB2 PHY Vendor Control Register */ #define DWC3_GUSB2PHYACC_NEWREGREQ BIT(25) +#define DWC3_GUSB2PHYACC_DONE BIT(24)#define DWC3_GUSB2PHYACC_BUSY BIT(23)#define DWC3_GUSB2PHYACC_WRITE BIT(22)#define DWC3_GUSB2PHYACC_ADDR (n) (n << 16)
drivers/usb/dwc3/ulpi.c +1 -1
@@ -24,7 +24,7 @@ static int dwc3_ulpi_busyloop(struct dwc3 *dwc)while (count--) { reg =dwc3_readl (dwc->regs,DWC3_GUSB2PHYACC (0 )); -if (!(reg &DWC3_GUSB2PHYACC_BUSY )) +if (reg &DWC3_GUSB2PHYACC_DONE )return 0 ;cpu_relax (); }
drivers/usb/gadget/Kconfig +2 -0
@@ -265,6 +265,7 @@ config USB_CONFIGFS_NCM depends on NET select USB_U_ETHER select USB_F_NCM + select CRC32 help NCM is an advanced protocol for Ethernet encapsulation, allows grouping of several ethernet frames into one USB transfer and
@@ -314,6 +315,7 @@ config USB_CONFIGFS_EEM depends on NET select USB_U_ETHER select USB_F_EEM + select CRC32 help CDC EEM is a newer USB standard that is somewhat simpler than CDC ECM and therefore can be supported by more hardware. Technically ECM and
drivers/usb/gadget/composite.c +8 -2
@@ -392,8 +392,11 @@ int usb_function_deactivate(struct usb_function *function)spin_lock_irqsave (&cdev->lock, flags); -if (cdev->deactivations ==0 ) +if (cdev->deactivations ==0 ) { +spin_unlock_irqrestore (&cdev->lock, flags); status =usb_gadget_deactivate (cdev->gadget); +spin_lock_irqsave (&cdev->lock, flags); + }if (status ==0 ) cdev->deactivations++;
@@ -424,8 +427,11 @@ int usb_function_activate(struct usb_function *function) status = -EINVAL ; else { cdev->deactivations--; -if (cdev->deactivations ==0 ) +if (cdev->deactivations ==0 ) { +spin_unlock_irqrestore (&cdev->lock, flags); status =usb_gadget_activate (cdev->gadget); +spin_lock_irqsave (&cdev->lock, flags); + } }spin_unlock_irqrestore (&cdev->lock, flags);
drivers/usb/gadget/configfs.c +13 -6
@@ -233,9 +233,16 @@ static ssize_t gadget_dev_desc_bcdUSB_store(struct config_item *item,static ssize_t gadget_dev_desc_UDC_show (struct config_item *item,char *page) { -char *udc_name =to_gadget_info (item)->composite.gadget_driver.udc_name; +struct gadget_info *gi =to_gadget_info (item); +char *udc_name; +int ret; + +mutex_lock (&gi->lock); + udc_name = gi->composite.gadget_driver.udc_name; + ret =sprintf (page,"%s\n" , udc_name ?:"" ); +mutex_unlock (&gi->lock); -return sprintf (page,"%s\n" , udc_name ?:"" ); +return ret; }static int unregister_gadget (struct gadget_info *gi)
@@ -1217,9 +1224,9 @@ static void purge_configs_funcs(struct gadget_info *gi) cfg = container_of(c, struct config_usb_cfg, c); -list_for_each_entry_safe (f, tmp, &c->functions, list) { +list_for_each_entry_safe_reverse (f, tmp, &c->functions, list) { -list_move_tail (&f->list, &cfg->func_list); +list_move (&f->list, &cfg->func_list);if (f->unbind) { dev_dbg(&gi->cdev.gadget->dev, "unbind function '%s'/%p\n",
@@ -1505,7 +1512,7 @@ static const struct usb_gadget_driver configfs_driver_template = { .suspend = configfs_composite_suspend, .resume = configfs_composite_resume, - .max_speed = USB_SPEED_SUPER, + .max_speed = USB_SPEED_SUPER_PLUS, .driver = { .owner = THIS_MODULE, .name = "configfs-gadget",
@@ -1545,7 +1552,7 @@ static struct config_group *gadgets_make( gi->composite.unbind = configfs_do_nothing; gi->composite.suspend =NULL ; gi->composite.resume =NULL ; - gi->composite.max_speed =USB_SPEED_SUPER ; + gi->composite.max_speed =USB_SPEED_SUPER_PLUS ;spin_lock_init (&gi->spinlock);mutex_init (&gi->lock);
drivers/usb/gadget/function/f_printer.c +1 -0
@@ -1126,6 +1126,7 @@ static int printer_func_bind(struct usb_configuration *c,printer_req_free (dev->in_ep, req); } +usb_free_all_descriptors (f);return ret; }
drivers/usb/gadget/function/f_uac2.c +55 -14
115 lines not on this page · raw message
drivers/usb/gadget/function/u_ether.c +5 -4
@@ -45,9 +45,10 @@#define UETH__VERSION "29-May-2008"/* Experiments show that both Linux and Windows hosts allow up to 16k -* frame sizes. Set the max size to 15k+52 to prevent allocating 32k +* frame sizes. Set the max MTU size to 15k+52 to prevent allocating 32k * blocks and still have efficient handling. */ -#define GETHER_MAX_ETH_FRAME_LEN 15412 +#define GETHER_MAX_MTU_SIZE 15412 +#define GETHER_MAX_ETH_FRAME_LEN (GETHER_MAX_MTU_SIZE + ETH_HLEN)struct eth_dev {/* lock is held while accessing port_usb
@@ -786,7 +787,7 @@ struct eth_dev *gether_setup_name(struct usb_gadget *g,/* MTU range: 14 - 15412 */ net->min_mtu =ETH_HLEN ; - net->max_mtu =GETHER_MAX_ETH_FRAME_LEN ; + net->max_mtu =GETHER_MAX_MTU_SIZE ; dev->gadget = g;SET_NETDEV_DEV (net, &g->dev);
@@ -848,7 +849,7 @@ struct net_device *gether_setup_name_default(const char *netname)/* MTU range: 14 - 15412 */ net->min_mtu =ETH_HLEN ; - net->max_mtu =GETHER_MAX_ETH_FRAME_LEN ; + net->max_mtu =GETHER_MAX_MTU_SIZE ;return net; }
drivers/usb/gadget/legacy/acm_ms.c +3 -1
@@ -203,8 +203,10 @@ static int acm_ms_bind(struct usb_composite_dev *cdev)struct usb_descriptor_header *usb_desc; usb_desc =usb_otg_descriptor_alloc (gadget); -if (!usb_desc) +if (!usb_desc) { + status = -ENOMEM ; goto fail_string_ids; + }usb_otg_descriptor_init (gadget, usb_desc); otg_desc[0 ] = usb_desc; otg_desc[1 ] =NULL ;
drivers/usb/host/xhci.c +12 -12
@@ -4642,19 +4642,19 @@ static u16 xhci_calculate_u1_timeout(struct xhci_hcd *xhci, {unsigned long long timeout_ns; +if (xhci->quirks &XHCI_INTEL_HOST ) + timeout_ns =xhci_calculate_intel_u1_timeout (udev, desc); +else + timeout_ns = udev->u1_params.sel; +/* Prevent U1 if service interval is shorter than U1 exit latency */ if (usb_endpoint_xfer_int (desc) ||usb_endpoint_xfer_isoc (desc)) { -if (xhci_service_interval_to_ns (desc) <= udev->u1_params.mel) { +if (xhci_service_interval_to_ns (desc) <= timeout_ns) {dev_dbg (&udev->dev,"Disable U1, ESIT shorter than exit latency\n" );return USB3_LPM_DISABLED ; } } -if (xhci->quirks &XHCI_INTEL_HOST ) - timeout_ns =xhci_calculate_intel_u1_timeout (udev, desc); -else - timeout_ns = udev->u1_params.sel; -/* The U1 timeout is encoded in 1us intervals. * Don't return a timeout of zero, because that's USB3_LPM_DISABLED. */
@@ -4706,19 +4706,19 @@ static u16 xhci_calculate_u2_timeout(struct xhci_hcd *xhci, {unsigned long long timeout_ns; +if (xhci->quirks &XHCI_INTEL_HOST ) + timeout_ns =xhci_calculate_intel_u2_timeout (udev, desc); +else + timeout_ns = udev->u2_params.sel; +/* Prevent U2 if service interval is shorter than U2 exit latency */ if (usb_endpoint_xfer_int (desc) ||usb_endpoint_xfer_isoc (desc)) { -if (xhci_service_interval_to_ns (desc) <= udev->u2_params.mel) { +if (xhci_service_interval_to_ns (desc) <= timeout_ns) {dev_dbg (&udev->dev,"Disable U2, ESIT shorter than exit latency\n" );return USB3_LPM_DISABLED ; } } -if (xhci->quirks &XHCI_INTEL_HOST ) - timeout_ns =xhci_calculate_intel_u2_timeout (udev, desc); -else - timeout_ns = udev->u2_params.sel; -/* The U2 timeout is encoded in 256us intervals */ timeout_ns =DIV_ROUND_UP_ULL (timeout_ns,256 *1000 );/* If the necessary timeout value is bigger than what we can set in the
drivers/usb/misc/yurex.c +3 -0
@@ -497,6 +497,9 @@ static ssize_t yurex_write(struct file *file, const char __user *user_buffer, timeout =schedule_timeout (YUREX_WRITE_TIMEOUT );finish_wait (&dev->waitq, &wait); +/* make sure URB is idle after timeout or (spurious) CMD_ACK */ +usb_kill_urb (dev->cntl_urb); +mutex_unlock (&dev->io_mutex);if (retval <0 ) {
drivers/usb/serial/iuu_phoenix.c +15 -5
@@ -536,23 +536,29 @@ static int iuu_uart_flush(struct usb_serial_port *port)struct device *dev = &port->dev;int i;int status; -u8 rxcmd =IUU_UART_RX ; +u8 *rxcmd;struct iuu_private *priv =usb_get_serial_port_data (port);if (iuu_led (port,0xF000 ,0 ,0 ,0xFF ) <0 )return -EIO ; + rxcmd =kmalloc (1 ,GFP_KERNEL ); +if (!rxcmd) +return -ENOMEM ; + + rxcmd[0 ] =IUU_UART_RX ; +for (i =0 ; i <2 ; i++) { - status =bulk_immediate (port, &rxcmd,1 ); + status =bulk_immediate (port, rxcmd,1 );if (status !=IUU_OPERATION_OK ) {dev_dbg (dev,"%s - uart_flush_write error\n" , __func__); -return status; + goto out_free; } status =read_immediate (port, &priv->len,1 );if (status !=IUU_OPERATION_OK ) {dev_dbg (dev,"%s - uart_flush_read error\n" , __func__); -return status; + goto out_free; }if (priv->len >0 ) {
@@ -560,12 +566,16 @@ static int iuu_uart_flush(struct usb_serial_port *port) status =read_immediate (port, priv->buf, priv->len);if (status !=IUU_OPERATION_OK ) {dev_dbg (dev,"%s - uart_flush_read error\n" , __func__); -return status; + goto out_free; } } }dev_dbg (dev,"%s - uart_flush_read OK!\n" , __func__);iuu_led (port,0 ,0xF000 ,0 ,0xFF ); + +out_free: +kfree (rxcmd); +return status; }
drivers/usb/serial/keyspan_pda.c +0 -2
@@ -555,10 +555,8 @@ static int keyspan_pda_write(struct tty_struct *tty,static void keyspan_pda_write_bulk_callback (struct urb *urb) {struct usb_serial_port *port = urb->context; -struct keyspan_pda_private *priv;set_bit (0 , &port->write_urbs_free); - priv =usb_get_serial_port_data (port);/* queue up a wakeup at scheduler time */ usb_serial_port_softint (port);
drivers/usb/serial/option.c +3 -0
@@ -1117,6 +1117,8 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0xff, 0xff), .driver_info = RSVD(1) | RSVD(2) | RSVD(3) | RSVD(4) | NUMEP2 }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0, 0) }, + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, 0x0620, 0xff, 0xff, 0x30) }, /* EM160R-GL */ + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, 0x0620, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0xff, 0x30) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0xff, 0x10),
@@ -2057,6 +2059,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0105, 0xff), /* Fibocom NL678 series */ .driver_info = RSVD(6) }, { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a0, 0xff) }, /* Fibocom NL668-AM/NL652-EU (laptop MBIM) */ + { USB_DEVICE_INTERFACE_CLASS(0x2df3, 0x9d03, 0xff) }, /* LongSung M5710 */ { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1404, 0xff) }, /* GosunCn GM500 RNDIS */ { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1405, 0xff) }, /* GosunCn GM500 MBIM */ { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1406, 0xff) }, /* GosunCn GM500 ECM/NCM */
drivers/usb/storage/unusual_uas.h +7 -0
@@ -90,6 +90,13 @@ UNUSUAL_DEV(0x152d, 0x0578, 0x0000, 0x9999, USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BROKEN_FUA), +/* Reported-by: Thinh Nguyen <[email protected]> */ +UNUSUAL_DEV (0x154b ,0xf00b ,0x0000 ,0x9999 , +"PNY" , +"Pro Elite SSD" , +USB_SC_DEVICE ,USB_PR_DEVICE ,NULL , +US_FL_NO_ATA_1X ), +/* Reported-by: Thinh Nguyen <[email protected]> */ UNUSUAL_DEV(0x154b, 0xf00d, 0x0000, 0x9999, "PNY",
drivers/usb/usbip/vhci_hcd.c +2 -0
@@ -396,6 +396,8 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,default :usbip_dbg_vhci_rh (" ClearPortFeature: default %x\n" , wValue); +if (wValue >=32 ) + goto error; vhci_hcd->port_status[rhport] &= ~(1 << wValue);break ; }
drivers/vhost/net.c +3 -3
@@ -860,6 +860,7 @@ static void handle_tx_zerocopy(struct vhost_net *net, struct socket *sock)size_t len, total_len =0 ;int err;struct vhost_net_ubuf_ref *uninitialized_var (ubufs ); +struct ubuf_info *ubuf;bool zcopy_used;int sent_pkts =0 ;
@@ -892,9 +893,7 @@ static void handle_tx_zerocopy(struct vhost_net *net, struct socket *sock)/* use msg_control to pass vhost zerocopy ubuf info to skb */ if (zcopy_used) { -struct ubuf_info *ubuf; ubuf = nvq->ubuf_info + nvq->upend_idx; - vq->heads[nvq->upend_idx].id =cpu_to_vhost32 (vq, head); vq->heads[nvq->upend_idx].len =VHOST_DMA_IN_PROGRESS ; ubuf->callback = vhost_zerocopy_callback;
@@ -924,7 +923,8 @@ static void handle_tx_zerocopy(struct vhost_net *net, struct socket *sock) err = sock->ops->sendmsg (sock, &msg, len);if (unlikely (err <0 )) {if (zcopy_used) { -vhost_net_ubuf_put (ubufs); +if (vq->heads[ubuf->desc].len ==VHOST_DMA_IN_PROGRESS ) +vhost_net_ubuf_put (ubufs); nvq->upend_idx = ((unsigned )nvq->upend_idx -1 ) %UIO_MAXIOV ; }
drivers/video/fbdev/hyperv_fb.c +2 -4
@@ -704,11 +704,9 @@ static int hvfb_getmem(struct hv_device *hdev, struct fb_info *info) }/* -* Map the VRAM cacheable for performance. This is also required for -* VM Connect to display properly for ARM64 Linux VM, as the host also -* maps the VRAM cacheable. +* Map the VRAM cacheable for performance. */ - fb_virt =ioremap_cache (par->mem->start, screen_fb_size); + fb_virt =ioremap_wc (par->mem->start, screen_fb_size);if (!fb_virt) goto err2;
fs/btrfs/send.c +31 -18
166 lines not on this page · raw message
fs/proc/generic.c +37 -18
118 lines not on this page · raw message
fs/proc/internal.h +7 -0
@@ -299,3 +299,10 @@ extern unsigned long task_statm(struct mm_struct *, unsigned long *, unsigned long *, unsigned long *, unsigned long *);extern void task_mem (struct seq_file *,struct mm_struct *); + +extern const struct dentry_operations proc_net_dentry_ops; +static inline void pde_force_lookup (struct proc_dir_entry *pde) +{ +/* /proc/net/ entries can be changed under us by setns(CLONE_NEWNET) */ + pde->proc_dops = &proc_net_dentry_ops; +}
fs/proc/proc_net.c +0 -16
@@ -39,22 +39,6 @@ static struct net *get_proc_net(const struct inode *inode)return maybe_get_net (PDE_NET (PDE (inode))); } -static int proc_net_d_revalidate (struct dentry *dentry,unsigned int flags) -{ -return 0 ; -} - -static const struct dentry_operations proc_net_dentry_ops = { - .d_revalidate = proc_net_d_revalidate, - .d_delete = always_delete_dentry, -}; - -static void pde_force_lookup (struct proc_dir_entry *pde) -{ -/* /proc/net/ entries can be changed under us by setns(CLONE_NEWNET) */ - pde->proc_dops = &proc_net_dentry_ops; -} -static int seq_open_net (struct inode *inode,struct file *file) {unsigned int state_size =PDE (inode)->state_size;
include/linux/proc_fs.h +7 -1
@@ -21,6 +21,7 @@ extern void proc_flush_task(struct task_struct *);extern struct proc_dir_entry *proc_symlink (const char *,struct proc_dir_entry *,const char *); +struct proc_dir_entry *_proc_mkdir (const char *,umode_t ,struct proc_dir_entry *,void *,bool );extern struct proc_dir_entry *proc_mkdir (const char *,struct proc_dir_entry *);extern struct proc_dir_entry *proc_mkdir_data (const char *,umode_t ,struct proc_dir_entry *,void *);
@@ -99,6 +100,11 @@ static inline struct proc_dir_entry *proc_symlink(const char *name,static inline struct proc_dir_entry *proc_mkdir (const char *name,struct proc_dir_entry *parent) {return NULL ;}static inline struct proc_dir_entry *proc_create_mount_point (const char *name) {return NULL ; } +static inline struct proc_dir_entry *_proc_mkdir (const char *name,umode_t mode, +struct proc_dir_entry *parent,void *data,bool force_lookup) +{ +return NULL ; +}static inline struct proc_dir_entry *proc_mkdir_data (const char *name,umode_t mode,struct proc_dir_entry *parent,void *data) {return NULL ; } static inline struct proc_dir_entry *proc_mkdir_mode(const char *name,
@@ -136,7 +142,7 @@ struct net;static inline struct proc_dir_entry *proc_net_mkdir (struct net *net,const char *name,struct proc_dir_entry *parent) { -return proc_mkdir_data (name,0 , parent, net); +return _proc_mkdir (name,0 , parent, net, true); }struct ns_common ;
include/net/red.h +3 -1
@@ -168,12 +168,14 @@ static inline void red_set_vars(struct red_vars *v) v->qcount =-1 ; } -static inline bool red_check_params (u32 qth_min,u32 qth_max,u8 Wlog) +static inline bool red_check_params (u32 qth_min,u32 qth_max,u8 Wlog,u8 Scell_log) {if (fls (qth_min) + Wlog >32 )return false;if (fls (qth_max) + Wlog >32 )return false; +if (Scell_log >=32 ) +return false;if (qth_max < qth_min)return false;return true;
kernel/workqueue.c +10 -3
@@ -3718,17 +3718,24 @@ static void pwq_adjust_max_active(struct pool_workqueue *pwq)* is updated and visible. */ if (!freezable || !workqueue_freezing) { +bool kick = false; + pwq->max_active = wq->saved_max_active;while (!list_empty (&pwq->delayed_works) && - pwq->nr_active < pwq->max_active) + pwq->nr_active < pwq->max_active) {pwq_activate_first_delayed (pwq); + kick = true; + }/* * Need to kick a worker after thawed or an unbound wq's -* max_active is bumped. It's a slow path. Do it always. +* max_active is bumped. In realtime scenarios, always kicking a +* worker will cause interference on the isolated cpu cores, so +* let's kick iff work items were activated. */ -wake_up_worker (pwq->pool); +if (kick) +wake_up_worker (pwq->pool); }else { pwq->max_active =0 ; }
lib/genalloc.c +13 -12
@@ -81,14 +81,14 @@ static int clear_bits_ll(unsigned long *addr, unsigned long mask_to_clear)* users set the same bit, one user will return remain bits, otherwise * return 0. */ -static int bitmap_set_ll (unsigned long *map,int start,int nr) +static int bitmap_set_ll (unsigned long *map,unsigned long start,unsigned long nr) {unsigned long *p = map +BIT_WORD (start); -const int size = start + nr; +const unsigned long size = start + nr;int bits_to_set =BITS_PER_LONG - (start %BITS_PER_LONG );unsigned long mask_to_set =BITMAP_FIRST_WORD_MASK (start); -while (nr - bits_to_set >=0 ) { +while (nr >= bits_to_set) {if (set_bits_ll (p, mask_to_set))return nr; nr -= bits_to_set;
@@ -116,14 +116,15 @@ static int bitmap_set_ll(unsigned long *map, int start, int nr)* users clear the same bit, one user will return remain bits, * otherwise return 0. */ -static int bitmap_clear_ll (unsigned long *map,int start,int nr) +static unsigned long +bitmap_clear_ll (unsigned long *map,unsigned long start,unsigned long nr) {unsigned long *p = map +BIT_WORD (start); -const int size = start + nr; +const unsigned long size = start + nr;int bits_to_clear =BITS_PER_LONG - (start %BITS_PER_LONG );unsigned long mask_to_clear =BITMAP_FIRST_WORD_MASK (start); -while (nr - bits_to_clear >=0 ) { +while (nr >= bits_to_clear) {if (clear_bits_ll (p, mask_to_clear))return nr; nr -= bits_to_clear;
@@ -183,8 +184,8 @@ int gen_pool_add_owner(struct gen_pool *pool, unsigned long virt, phys_addr_t ph size_t size, int nid, void *owner) { struct gen_pool_chunk *chunk; -int nbits = size >> pool->min_alloc_order; -int nbytes =sizeof (struct gen_pool_chunk ) + +unsigned long nbits = size >> pool->min_alloc_order; +unsigned long nbytes =sizeof (struct gen_pool_chunk ) +BITS_TO_LONGS (nbits) *sizeof (long ); chunk =vzalloc_node (nbytes, nid);
@@ -242,7 +243,7 @@ void gen_pool_destroy(struct gen_pool *pool)struct list_head *_chunk, *_next_chunk;struct gen_pool_chunk *chunk;int order = pool->min_alloc_order; -int bit, end_bit; +unsigned long bit, end_bit;list_for_each_safe (_chunk, _next_chunk, &pool->chunks) { chunk = list_entry(_chunk, struct gen_pool_chunk, next_chunk);
@@ -278,7 +279,7 @@ unsigned long gen_pool_alloc_algo_owner(struct gen_pool *pool, size_t size,struct gen_pool_chunk *chunk;unsigned long addr =0 ;int order = pool->min_alloc_order; -int nbits, start_bit, end_bit, remain; +unsigned long nbits, start_bit, end_bit, remain;#ifndef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG BUG_ON (in_nmi ());
@@ -487,7 +488,7 @@ void gen_pool_free_owner(struct gen_pool *pool, unsigned long addr, size_t size, {struct gen_pool_chunk *chunk;int order = pool->min_alloc_order; -int start_bit, nbits, remain; +unsigned long start_bit, nbits, remain;#ifndef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG BUG_ON (in_nmi ());
@@ -754,7 +755,7 @@ unsigned long gen_pool_best_fit(unsigned long *map, unsigned long size, index =bitmap_find_next_zero_area (map, size, start, nr,0 );while (index < size) { -int next_bit =find_next_bit (map, size, index + nr); +unsigned long next_bit =find_next_bit (map, size, index + nr);if ((next_bit - index) < len) { len = next_bit - index; start_bit = index;
net/core/net-sysfs.c +53 -12
141 lines not on this page · raw message
net/ipv4/fib_frontend.c +1 -1
@@ -302,7 +302,7 @@ __be32 fib_compute_spec_dst(struct sk_buff *skb) .flowi4_iif = LOOPBACK_IFINDEX, .flowi4_oif = l3mdev_master_ifindex_rcu(dev), .daddr = ip_hdr(skb)->saddr, - .flowi4_tos = RT_TOS(ip_hdr(skb)->tos), + .flowi4_tos = ip_hdr(skb)->tos & IPTOS_RT_MASK, .flowi4_scope = scope, .flowi4_mark = vmark ? skb->mark : 0, };
net/ipv4/gre_demux.c +1 -1
@@ -128,7 +128,7 @@ int gre_parse_header(struct sk_buff *skb, struct tnl_ptk_info *tpi,* to 0 and sets the configured key in the * inner erspan header field */ -if (greh->protocol ==htons (ETH_P_ERSPAN ) || +if ((greh->protocol ==htons (ETH_P_ERSPAN ) && hdr_len !=4 ) || greh->protocol ==htons (ETH_P_ERSPAN2 )) {struct erspan_base_hdr *ershdr;
net/ipv4/netfilter/arp_tables.c +1 -1
@@ -1406,7 +1406,7 @@ static int compat_get_entries(struct net *net,xt_compat_lock (NFPROTO_ARP ); t =xt_find_table_lock (net,NFPROTO_ARP , get.name);if (!IS_ERR (t)) { -const struct xt_table_info *private = t->private; +const struct xt_table_info *private =xt_table_get_private_protected (t);struct xt_table_info info; ret =compat_table_info (private, &info);
net/ipv4/netfilter/ip_tables.c +1 -1
@@ -1616,7 +1616,7 @@ compat_get_entries(struct net *net, struct compat_ipt_get_entries __user *uptr,xt_compat_lock (AF_INET ); t =xt_find_table_lock (net,AF_INET , get.name);if (!IS_ERR (t)) { -const struct xt_table_info *private = t->private; +const struct xt_table_info *private =xt_table_get_private_protected (t);struct xt_table_info info; ret =compat_table_info (private, &info);if (!ret && get.size == info.size)
net/ipv6/netfilter/ip6_tables.c +1 -1
@@ -1625,7 +1625,7 @@ compat_get_entries(struct net *net, struct compat_ip6t_get_entries __user *uptr,xt_compat_lock (AF_INET6 ); t =xt_find_table_lock (net,AF_INET6 , get.name);if (!IS_ERR (t)) { -const struct xt_table_info *private = t->private; +const struct xt_table_info *private =xt_table_get_private_protected (t);struct xt_table_info info; ret =compat_table_info (private, &info);if (!ret && get.size == info.size)
net/ncsi/ncsi-rsp.c +1 -1
@@ -1114,7 +1114,7 @@ int ncsi_rcv_rsp(struct sk_buff *skb, struct net_device *dev,int payload, i, ret;/* Find the NCSI device */ - nd =ncsi_find_dev (dev); + nd =ncsi_find_dev (orig_dev); ndp = nd ?TO_NCSI_DEV_PRIV (nd) :NULL ;if (!ndp)return -ENODEV ;
net/netfilter/ipset/ip_set_hash_gen.h +5 -15
@@ -143,20 +143,6 @@ htable_size(u8 hbits)return hsize *sizeof (struct hbucket *) +sizeof (struct htable ); } -/* Compute htable_bits from the user input parameter hashsize */ -static u8 -htable_bits (u32 hashsize) -{ -/* Assume that hashsize == 2^htable_bits */ -u8 bits =fls (hashsize -1 ); - -if (jhash_size (bits) != hashsize) -/* Round up to the first 2^n value */ - bits =fls (hashsize); - -return bits; -} -#ifdef IP_SET_HASH_WITH_NETS #if IPSET_NET_COUNT >1 #define __CIDR (cidr, i) (cidr[i])
@@ -1520,7 +1506,11 @@ IPSET_TOKEN(HTYPE, _create)(struct net *net, struct ip_set *set,if (!h)return -ENOMEM ; - hbits =htable_bits (hashsize); +/* Compute htable_bits from the user input parameter hashsize. +* Assume that hashsize == 2^htable_bits, +* otherwise round up to the first 2^n value. +*/ + hbits =fls (hashsize -1 ); hsize =htable_size (hbits);if (hsize ==0 ) {kfree (h);
net/netfilter/nft_dynset.c +3 -3
@@ -146,7 +146,7 @@ static int nft_dynset_init(const struct nft_ctx *ctx,u32 flags =ntohl (nla_get_be32 (tb[NFTA_DYNSET_FLAGS ]));if (flags & ~NFT_DYNSET_F_INV ) -return -EINVAL ; +return -EOPNOTSUPP ;if (flags &NFT_DYNSET_F_INV ) priv->invert = true; }
@@ -179,7 +179,7 @@ static int nft_dynset_init(const struct nft_ctx *ctx, timeout =0 ;if (tb[NFTA_DYNSET_TIMEOUT ] !=NULL ) {if (!(set->flags &NFT_SET_TIMEOUT )) -return -EINVAL ; +return -EOPNOTSUPP ; err =nf_msecs_to_jiffies64 (tb[NFTA_DYNSET_TIMEOUT ], &timeout);if (err)
@@ -193,7 +193,7 @@ static int nft_dynset_init(const struct nft_ctx *ctx,if (tb[NFTA_DYNSET_SREG_DATA ] !=NULL ) {if (!(set->flags &NFT_SET_MAP )) -return -EINVAL ; +return -EOPNOTSUPP ;if (set->dtype ==NFT_DATA_VERDICT )return -EOPNOTSUPP ;
net/netfilter/xt_RATEEST.c +3 -0
@@ -115,6 +115,9 @@ static int xt_rateest_tg_checkentry(const struct xt_tgchk_param *par) } cfg;int ret; +if (strnlen (info->name,sizeof (est->name)) >=sizeof (est->name)) +return -ENAMETOOLONG ; +net_get_random_once (&jhash_rnd,sizeof (jhash_rnd));mutex_lock (&xn->hash_lock);
net/sched/sch_choke.c +1 -1
@@ -368,7 +368,7 @@ static int choke_change(struct Qdisc *sch, struct nlattr *opt, ctl =nla_data (tb[TCA_CHOKE_PARMS ]); -if (!red_check_params (ctl->qth_min, ctl->qth_max, ctl->Wlog)) +if (!red_check_params (ctl->qth_min, ctl->qth_max, ctl->Wlog, ctl->Scell_log))return -EINVAL ;if (ctl->limit >CHOKE_MAX_QUEUE )
net/sched/sch_gred.c +1 -1
@@ -480,7 +480,7 @@ static inline int gred_change_vq(struct Qdisc *sch, int dp,struct gred_sched *table =qdisc_priv (sch);struct gred_sched_data *q = table->tab[dp]; -if (!red_check_params (ctl->qth_min, ctl->qth_max, ctl->Wlog)) { +if (!red_check_params (ctl->qth_min, ctl->qth_max, ctl->Wlog, ctl->Scell_log)) {NL_SET_ERR_MSG_MOD (extack,"invalid RED parameters" );return -EINVAL ; }
net/sched/sch_red.c +1 -1
@@ -213,7 +213,7 @@ static int red_change(struct Qdisc *sch, struct nlattr *opt, max_P = tb[TCA_RED_MAX_P ] ?nla_get_u32 (tb[TCA_RED_MAX_P ]) :0 ; ctl =nla_data (tb[TCA_RED_PARMS ]); -if (!red_check_params (ctl->qth_min, ctl->qth_max, ctl->Wlog)) +if (!red_check_params (ctl->qth_min, ctl->qth_max, ctl->Wlog, ctl->Scell_log))return -EINVAL ;if (ctl->limit >0 ) {
net/sched/sch_sfq.c +1 -1
@@ -647,7 +647,7 @@ static int sfq_change(struct Qdisc *sch, struct nlattr *opt) }if (ctl_v1 && !red_check_params (ctl_v1->qth_min, ctl_v1->qth_max, - ctl_v1->Wlog)) + ctl_v1->Wlog, ctl_v1->Scell_log))return -EINVAL ;if (ctl_v1 && ctl_v1->qth_min) { p =kmalloc (sizeof (*p),GFP_KERNEL );
net/sched/sch_taprio.c +1 -1
@@ -1626,7 +1626,7 @@ static void taprio_destroy(struct Qdisc *sch)taprio_disable_offload (dev, q,NULL );if (q->qdiscs) { -for (i =0 ; i < dev->num_tx_queues && q->qdiscs[i]; i++) +for (i =0 ; i < dev->num_tx_queues; i++)qdisc_put (q->qdiscs[i]);kfree (q->qdiscs);
scripts/depmod.sh +2 -0
@@ -15,6 +15,8 @@ if ! test -r System.map ; then exit 0 fi +# legacy behavior: "depmod" in /sbin, no /sbin in PATH +PATH="$PATH:/sbin" if [ -z $(command -v $DEPMOD) ]; then echo "Warning: 'make modules_install' requires $DEPMOD. Please install it." >&2 echo "This is probably in the kmod package." >&2
sound/pci/hda/hda_intel.c +0 -2
@@ -2186,8 +2186,6 @@ static struct snd_pci_quirk power_save_blacklist[] = {SND_PCI_QUIRK (0x1849 ,0x7662 ,"Asrock H81M-HDS" ,0 ),/* https://bugzilla.redhat.com/show_bug.cgi?id=1525104 */ SND_PCI_QUIRK (0x1043 ,0x8733 ,"Asus Prime X370-Pro" ,0 ), -/* https://bugzilla.redhat.com/show_bug.cgi?id=1581607 */ -SND_PCI_QUIRK (0x1558 ,0x3501 ,"Clevo W35xSS_370SS" ,0 ),/* https://bugzilla.redhat.com/show_bug.cgi?id=1525104 */ SND_PCI_QUIRK(0x1558, 0x6504, "Clevo W65_67SB", 0),/* https://bugzilla.redhat.com/show_bug.cgi?id=1525104 */
sound/pci/hda/patch_conexant.c +1 -0
@@ -1075,6 +1075,7 @@ static int patch_conexant_auto(struct hda_codec *codec)static const struct hda_device_id snd_hda_id_conexant[] = {HDA_CODEC_ENTRY (0x14f11f86 ,"CX8070" , patch_conexant_auto),HDA_CODEC_ENTRY (0x14f12008 ,"CX8200" , patch_conexant_auto), +HDA_CODEC_ENTRY (0x14f120d0 ,"CX11970" , patch_conexant_auto),HDA_CODEC_ENTRY (0x14f15045 ,"CX20549 (Venice)" , patch_conexant_auto),HDA_CODEC_ENTRY (0x14f15047 ,"CX20551 (Waikiki)" , patch_conexant_auto),HDA_CODEC_ENTRY (0x14f15051 ,"CX20561 (Hermosa)" , patch_conexant_auto),
sound/pci/hda/patch_realtek.c +9 -0
@@ -6236,6 +6236,7 @@ enum {ALC221_FIXUP_HP_FRONT_MIC ,ALC292_FIXUP_TPT460 ,ALC298_FIXUP_SPK_VOLUME , +ALC298_FIXUP_LENOVO_SPK_VOLUME ,ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER ,ALC269_FIXUP_ATIV_BOOK_8 , ALC221_FIXUP_HP_MIC_NO_PRESENCE,
@@ -7062,6 +7063,10 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id = ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE, }, + [ALC298_FIXUP_LENOVO_SPK_VOLUME] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc298_fixup_speaker_volume, + }, [ALC295_FIXUP_DISABLE_DAC3] = { .type = HDA_FIXUP_FUNC, .v.func = alc295_fixup_disable_dac3,
@@ -7875,6 +7880,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x103c ,0x8497 ,"HP Envy x360" ,ALC269_FIXUP_HP_MUTE_LED_MIC3 ),SND_PCI_QUIRK (0x103c ,0x84e7 ,"HP Pavilion 15" ,ALC269_FIXUP_HP_MUTE_LED_MIC3 ),SND_PCI_QUIRK (0x103c ,0x869d ,"HP" ,ALC236_FIXUP_HP_MUTE_LED ), +SND_PCI_QUIRK (0x103c ,0x8724 ,"HP EliteBook 850 G7" ,ALC285_FIXUP_HP_GPIO_LED ),SND_PCI_QUIRK (0x103c ,0x8729 ,"HP" ,ALC285_FIXUP_HP_GPIO_LED ),SND_PCI_QUIRK (0x103c ,0x8736 ,"HP" ,ALC285_FIXUP_HP_GPIO_AMP_INIT ), SND_PCI_QUIRK(0x103c, 0x8760, "HP", ALC285_FIXUP_HP_MUTE_LED),
@@ -7935,6 +7941,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x10cf ,0x1845 ,"Lifebook U904" ,ALC269_FIXUP_LIFEBOOK_EXTMIC ),SND_PCI_QUIRK (0x10ec ,0x10f2 ,"Intel Reference board" ,ALC700_FIXUP_INTEL_REFERENCE ),SND_PCI_QUIRK (0x10ec ,0x1230 ,"Intel Reference board" ,ALC295_FIXUP_CHROME_BOOK ), +SND_PCI_QUIRK (0x10ec ,0x1252 ,"Intel Reference board" ,ALC295_FIXUP_CHROME_BOOK ), +SND_PCI_QUIRK (0x10ec ,0x1254 ,"Intel Reference board" ,ALC295_FIXUP_CHROME_BOOK ),SND_PCI_QUIRK (0x10f7 ,0x8338 ,"Panasonic CF-SZ6" ,ALC269_FIXUP_HEADSET_MODE ),SND_PCI_QUIRK (0x144d ,0xc109 ,"Samsung Ativ book 9 (NP900X3G)" ,ALC269_FIXUP_INV_DMIC ), SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET),
@@ -8040,6 +8048,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x17aa ,0x3151 ,"ThinkCentre Station" ,ALC283_FIXUP_HEADSET_MIC ),SND_PCI_QUIRK (0x17aa ,0x3176 ,"ThinkCentre Station" ,ALC283_FIXUP_HEADSET_MIC ),SND_PCI_QUIRK (0x17aa ,0x3178 ,"ThinkCentre Station" ,ALC283_FIXUP_HEADSET_MIC ), +SND_PCI_QUIRK (0x17aa ,0x3818 ,"Lenovo C940" ,ALC298_FIXUP_LENOVO_SPK_VOLUME ),SND_PCI_QUIRK (0x17aa ,0x3902 ,"Lenovo E50-80" ,ALC269_FIXUP_DMIC_THINKPAD_ACPI ),SND_PCI_QUIRK (0x17aa ,0x3977 ,"IdeaPad S210" ,ALC283_FIXUP_INT_MIC ), SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
sound/pci/hda/patch_via.c +13 -0
@@ -1002,6 +1002,7 @@ static const struct hda_verb vt1802_init_verbs[] = {enum {VIA_FIXUP_INTMIC_BOOST ,VIA_FIXUP_ASUS_G75 , +VIA_FIXUP_POWER_SAVE , }; static void via_fixup_intmic_boost(struct hda_codec *codec,
@@ -1011,6 +1012,13 @@ static void via_fixup_intmic_boost(struct hda_codec *codec,override_mic_boost (codec,0x30 ,0 ,2 ,40 ); } +static void via_fixup_power_save (struct hda_codec *codec, +const struct hda_fixup *fix,int action) +{ +if (action ==HDA_FIXUP_ACT_PRE_PROBE ) + codec->power_save_node =0 ; +} +static const struct hda_fixup via_fixups[] = { [VIA_FIXUP_INTMIC_BOOST ] = { .type =HDA_FIXUP_FUNC ,
@@ -1025,11 +1033,16 @@ static const struct hda_fixup via_fixups[] = { { } } }, + [VIA_FIXUP_POWER_SAVE] = { + .type = HDA_FIXUP_FUNC, + .v.func = via_fixup_power_save, + }, };static const struct snd_pci_quirk vt2002p_fixups[] = {SND_PCI_QUIRK (0x1043 ,0x1487 ,"Asus G75" ,VIA_FIXUP_ASUS_G75 ),SND_PCI_QUIRK (0x1043 ,0x8532 ,"Asus X202E" ,VIA_FIXUP_INTMIC_BOOST ), +SND_PCI_QUIRK (0x1558 ,0x3501 ,"Clevo W35xSS_370SS" ,VIA_FIXUP_POWER_SAVE ), {} };
sound/usb/midi.c +4 -0
@@ -1889,6 +1889,8 @@ static int snd_usbmidi_get_ms_info(struct snd_usb_midi *umidi, ms_ep =find_usb_ms_endpoint_descriptor (hostep);if (!ms_ep)continue ; +if (ms_ep->bNumEmbMIDIJack >0x10 ) +continue ;if (usb_endpoint_dir_out (ep)) {if (endpoints[epidx].out_ep) {if (++epidx >=MIDI_MAX_ENDPOINTS ) {
@@ -2141,6 +2143,8 @@ static int snd_usbmidi_detect_roland(struct snd_usb_midi *umidi, cs_desc[1] == USB_DT_CS_INTERFACE && cs_desc[2] == 0xf1 && cs_desc[3] == 0x02) { +if (cs_desc[4 ] >0x10 || cs_desc[5 ] >0x10 ) +continue ; endpoint->in_cables = (1 << cs_desc[4 ]) -1 ; endpoint->out_cables = (1 << cs_desc[5 ]) -1 ;return snd_usbmidi_detect_endpoints (umidi, endpoint,1 );
virt/kvm/kvm_main.c +1 -2
@@ -428,9 +428,8 @@ static int kvm_mmu_notifier_invalidate_range_start(struct mmu_notifier *mn, kvm->mmu_notifier_count++; need_tlb_flush =kvm_unmap_hva_range (kvm, range->start, range->end, range->flags); - need_tlb_flush |= kvm->tlbs_dirty;/* we've to flush the tlb before the pages can be freed */ -if (need_tlb_flush) +if (need_tlb_flush || kvm->tlbs_dirty)kvm_flush_remote_tlbs (kvm);spin_unlock (&kvm->mmu_lock);