Linux 5.15.123
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.15.123 kernel.
All users of the 5.15 kernel series must upgrade.
The updated 5.15.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.15.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 | 2 arch/mips/include/asm/dec/prom.h | 2 drivers/base/regmap/regmap-i2c.c | 8 drivers/base/regmap/regmap-spi-avmm.c | 2 drivers/base/regmap/regmap.c | 6 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c | 5 drivers/gpu/drm/amd/display/dc/dcn303/dcn303_resource.c | 2 drivers/gpu/drm/drm_client_modeset.c | 6 drivers/gpu/drm/radeon/radeon_cs.c | 3 drivers/net/ethernet/agere/et131x.c | 4 drivers/net/ethernet/alacritech/slicoss.c | 2 drivers/net/ethernet/allwinner/sun4i-emac.c | 2 drivers/net/ethernet/altera/altera_tse_main.c | 2 drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 2 drivers/net/ethernet/arc/emac_main.c | 2 drivers/net/ethernet/atheros/ag71xx.c | 2 drivers/net/ethernet/broadcom/bcm4908_enet.c | 2 drivers/net/ethernet/broadcom/bcmsysport.c | 2 drivers/net/ethernet/broadcom/bgmac-bcma.c | 4 drivers/net/ethernet/broadcom/bgmac-platform.c | 2 drivers/net/ethernet/broadcom/bgmac.c | 2 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c | 2 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 drivers/net/ethernet/brocade/bna/bnad.c | 4 drivers/net/ethernet/cadence/macb_main.c | 2 drivers/net/ethernet/cavium/liquidio/lio_core.c | 2 drivers/net/ethernet/cavium/liquidio/lio_main.c | 2 drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 2 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c | 2 drivers/net/ethernet/cavium/thunder/nicvf_main.c | 3 drivers/net/ethernet/emulex/benet/be_main.c | 2 drivers/net/ethernet/ethoc.c | 4 drivers/net/ethernet/ezchip/nps_enet.c | 4 drivers/net/ethernet/faraday/ftgmac100.c | 4 drivers/net/ethernet/freescale/fec_mpc52xx.c | 2 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 2 drivers/net/ethernet/freescale/gianfar.c | 2 drivers/net/ethernet/freescale/ucc_geth.c | 2 drivers/net/ethernet/google/gve/gve_adminq.c | 2 drivers/net/ethernet/hisilicon/hisi_femac.c | 2 drivers/net/ethernet/hisilicon/hix5hd2_gmac.c | 2 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 drivers/net/ethernet/ibm/ibmveth.c | 2 drivers/net/ethernet/ibm/ibmvnic.c | 5 drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 2 drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 4 drivers/net/ethernet/intel/i40e/i40e_main.c | 4 drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 2 drivers/net/ethernet/intel/iavf/iavf_main.c | 7 drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 4 drivers/net/ethernet/intel/ice/ice_main.c | 4 drivers/net/ethernet/intel/igc/igc_main.c | 4 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 6 drivers/net/ethernet/korina.c | 4 drivers/net/ethernet/lantiq_xrx200.c | 2 drivers/net/ethernet/litex/litex_liteeth.c | 2 drivers/net/ethernet/marvell/mvneta.c | 2 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 4 drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c | 2 drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 2 drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 5 drivers/net/ethernet/marvell/prestera/prestera_main.c | 2 drivers/net/ethernet/marvell/pxa168_eth.c | 2 drivers/net/ethernet/marvell/sky2.c | 2 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 29 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c | 2 drivers/net/ethernet/micrel/ks8851_common.c | 2 drivers/net/ethernet/microchip/enc28j60.c | 4 drivers/net/ethernet/microchip/lan743x_main.c | 4 drivers/net/ethernet/microchip/sparx5/sparx5_netdev.c | 2 drivers/net/ethernet/microsoft/mana/mana_en.c | 2 drivers/net/ethernet/mscc/ocelot_net.c | 2 drivers/net/ethernet/netronome/nfp/abm/main.c | 2 drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 2 drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c | 2 drivers/net/ethernet/ni/nixge.c | 6 drivers/net/ethernet/nxp/lpc_eth.c | 2 drivers/net/ethernet/qlogic/qede/qede_filter.c | 4 drivers/net/ethernet/qlogic/qede/qede_main.c | 2 drivers/net/ethernet/qualcomm/emac/emac.c | 2 drivers/net/ethernet/qualcomm/qca_spi.c | 2 drivers/net/ethernet/qualcomm/qca_uart.c | 2 drivers/net/ethernet/renesas/ravb_main.c | 2 drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c | 2 drivers/net/ethernet/sfc/ef10_sriov.c | 2 drivers/net/ethernet/sfc/efx.c | 2 drivers/net/ethernet/sfc/efx_common.c | 4 drivers/net/ethernet/sfc/falcon/efx.c | 6 drivers/net/ethernet/socionext/netsec.c | 2 drivers/net/ethernet/socionext/sni_ave.c | 2 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 drivers/net/ethernet/ti/cpsw_ale.c | 24 +- drivers/net/ethernet/ti/cpsw_new.c | 4 drivers/net/ethernet/ti/davinci_emac.c | 2 drivers/net/ethernet/ti/netcp_core.c | 4 drivers/net/ethernet/xilinx/xilinx_emaclite.c | 2 drivers/net/phy/phy_device.c | 21 +- drivers/pinctrl/pinctrl-amd.c | 28 +- drivers/spi/spi-bcm63xx.c | 2 drivers/video/fbdev/au1200fb.c | 3 drivers/video/fbdev/imxfb.c | 4 fs/btrfs/block-group.c | 1 fs/btrfs/qgroup.c | 1 fs/ext4/xattr.c | 14 + fs/fuse/dir.c | 2 fs/fuse/ioctl.c | 21 +- fs/jbd2/checkpoint.c | 102 ++-------- fs/jfs/jfs_dmap.c | 3 fs/jfs/jfs_txnmgr.c | 5 fs/jfs/namei.c | 5 fs/quota/dquot.c | 5 fs/udf/unicode.c | 2 include/linux/etherdevice.h | 2 include/linux/of_net.h | 6 include/linux/tcp.h | 2 include/net/tcp.h | 31 ++- kernel/bpf/verifier.c | 11 - kernel/trace/trace_events_hist.c | 3 net/bridge/br_stp_if.c | 3 net/can/bcm.c | 12 - net/core/of_net.c | 25 ++ net/ipv4/esp4.c | 2 net/ipv4/inet_connection_sock.c | 2 net/ipv4/inet_hashtables.c | 17 - net/ipv4/inet_timewait_sock.c | 8 net/ipv4/tcp.c | 53 ++--- net/ipv4/tcp_fastopen.c | 6 net/ipv4/tcp_ipv4.c | 2 net/ipv4/tcp_minisocks.c | 9 net/ipv4/tcp_output.c | 2 net/ipv6/ip6_gre.c | 3 net/ipv6/tcp_ipv6.c | 2 net/llc/llc_input.c | 3 net/netfilter/nf_tables_api.c | 8 net/netfilter/nft_set_pipapo.c | 6 net/sched/cls_bpf.c | 99 ++++----- security/keys/request_key.c | 35 ++- security/keys/trusted-keys/trusted_tpm2.c | 2 sound/pci/emu10k1/emufx.c | 112 ----------- sound/pci/hda/patch_realtek.c | 29 ++ sound/soc/codecs/wcd-mbhc-v2.c | 57 ++++- sound/soc/codecs/wcd934x.c | 12 + sound/soc/codecs/wcd938x.c | 76 ++++++- sound/soc/fsl/fsl_sai.c | 2 sound/soc/fsl/fsl_sai.h | 1 tools/perf/Makefile.config | 4 tools/perf/tests/shell/test_uprobe_from_different_cu.sh | 77 +++++++ tools/testing/selftests/tc-testing/config | 2 tools/testing/selftests/tc-testing/settings | 1 152 files changed, 735 insertions(+), 548 deletions(-)
Arnd Bergmann (1):
nixge: fix mac address error handling again
Christoffer Sandberg (1):
ALSA: hda/realtek: Add quirk for Clevo NS70AU
Daniel Golle (1):
net: ethernet: mtk_eth_soc: handle probe deferral
Ding Hui (2):
iavf: Fix use-after-free in free_netdev
iavf: Fix out-of-bounds when setting channels on remove
Eric Dumazet (11):
tcp: annotate data-races around tcp_rsk(req)->ts_recent
tcp: annotate data-races around tp->tcp_tx_delay
tcp: annotate data-races around tp->keepalive_time
tcp: annotate data-races around tp->keepalive_intvl
tcp: annotate data-races around tp->keepalive_probes
tcp: annotate data-races around icsk->icsk_syn_retries
tcp: annotate data-races around tp->linger2
tcp: annotate data-races around rskq_defer_accept
tcp: annotate data-races around tp->notsent_lowat
tcp: annotate data-races around icsk->icsk_user_timeout
tcp: annotate data-races around fastopenq.max_qlenEric Whitney (1):
ext4: correct inline offset when handling xattrs in inode body
Filipe Manana (2):
btrfs: fix warning when putting transaction with qgroups enabled after abort
btrfs: zoned: fix memory leak after finding block group with super blocks
Florian Kauer (1):
igc: Prevent garbled TX queue with XDP ZEROCOPY
Florian Westphal (2):
netfilter: nf_tables: fix spurious set element insertion failure
netfilter: nft_set_pipapo: fix improper element removal
Geetha sowjanya (1):
octeontx2-pf: Dont allocate BPIDs for LBK interfaces
Georg Müller (1):
perf probe: Add test for regression introduced by switch to die_get_decl_file()
Greg Kroah-Hartman (1):
Linux 5.15.123
Gustavo A. R. Silva (1):
MIPS: dec: prom: Address -Warray-bounds warning
Hersen Wu (1):
Revert "drm/amd/display: edp do not add non-edid timings"
Immad Mir (2):
FS: JFS: Fix null-ptr-deref Read in txBegin
FS: JFS: Check for read-only mounted filesystem in txBegin
Jakub Kicinski (3):
ethernet: use eth_hw_addr_set() instead of ether_addr_copy()
of: net: add a helper for loading netdev->dev_addr
ethernet: use of_get_ethdev_address()
James Clark (1):
perf build: Fix library not found error when using CSLIBS
Jan Kara (2):
quota: Properly disable quotas when add_dquot_ref() fails
udf: Fix uninitialized array access for some pathnames
Jiapeng Chong (1):
security: keys: Modify mismatched function name
Jocelyn Falempe (2):
drm/client: Fix memory leak in drm_client_target_cloned drm/client: Fix memory leak in drm_client_modeset_probe
Johan Hovold (7):
ASoC: codecs: wcd938x: fix missing clsh ctrl error handling
ASoC: codecs: wcd-mbhc-v2: fix resource leaks on component remove
ASoC: codecs: wcd938x: fix resource leaks on component remove
ASoC: codecs: wcd938x: fix missing mbhc init error handling
ASoC: codecs: wcd934x: fix resource leaks on component remove
ASoC: codecs: wcd938x: fix codec initialisation race
ASoC: codecs: wcd938x: fix soundwire initialisation race
Jonas Gorski (1):
spi: bcm63xx: fix max prepend length
Kailang Yang (1):
ALSA: hda/realtek - remove 3k pull low procedure
Kumar Kartikeya Dwivedi (1):
bpf: Fix subprog idx logic in check_max_stack_depth
Kuniyuki Iwashima (3):
bridge: Add extack warning when enabling STP in netns. Revert "tcp: avoid the lookup process failing to get sk in ehash table"
llc: Don't drop packet from non-root netns.
Luka Guzenko (1):
ALSA: hda/realtek: Enable Mute LED on HP Laptop 15s-eq2xxx
Mario Limonciello (1):
pinctrl: amd: Use amd_pinconf_set() for all config options
Mark Brown (2):
regmap: Drop initial version of maximum transfer length fixes
regmap: Account for register length in SMBus I/O limits
Martin Kaiser (1):
fbdev: imxfb: warn about invalid left/right margin
Matthieu Baerts (3):
selftests: tc: set timeout to 15 minutes
selftests: tc: add 'ct' action kconfig dep
selftests: tc: add ConnTrack procfs kconfig
Matus Gajdos (1):
ASoC: fsl_sai: Disable bit clock with transmitter
Miklos Szeredi (2):
fuse: revalidate: don't invalidate if interrupted
fuse: ioctl: translate ENOSYS in outarg
Mohamed Khalfella (1):
tracing/histograms: Return an error if we fail to add histogram to hist_vars list
Nicholas Kazlauskas (1):
drm/amd/display: Keep PHY active for DP displays on DCN31
Oswald Buddenhagen (1):
ALSA: emu10k1: roll up loops in DSP setup code for Audigy
Pablo Neira Ayuso (2):
netfilter: nf_tables: skip bound chain in netns release path
netfilter: nf_tables: skip bound chain on rule flush
Petr Pavlu (1):
keys: Fix linking a duplicate key to a keyring's assoc_array
Tanmay Patil (1):
net: ethernet: ti: cpsw_ale: Fix cpsw_ale_get_field()/cpsw_ale_set_field()
Victor Nogueira (1):
net: sched: cls_bpf: Undo tcf_bind_filter in case of an error
Vladimir Oltean (1):
net: phy: prevent stale pointer dereference in phy_init()
Wang Ming (1):
net: ipv4: Use kfree_sensitive instead of kfree
Ye Bin (1):
quota: fix warning in dqgrab()
Yogesh (1):
fs: jfs: Fix UBSAN: array-index-out-of-bounds in dbAllocDmapLev
Yuanjun Gong (1):
net:ipv6: check return value of pskb_trim()
YueHaibing (1):
can: bcm: Fix UAF in bcm_proc_show()
Zhang Shurong (1):
fbdev: au1200fb: Fix missing IRQ check in au1200fb_drv_probe
Zhang Yi (1):
jbd2: recheck chechpointing non-dirty buffer
Zhikai Zhai (1):
drm/amd/display: Disable MPC split by default on special asic
hackyzh002 (1):
drm/radeon: Fix integer overflow in radeon_cs_parser_init
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 15 -SUBLEVEL = 122 +SUBLEVEL = 123 EXTRAVERSION = NAME = Trick or Treat
arch/mips/include/asm/dec/prom.h +1 -1
@@ -70,7 +70,7 @@ static inline bool prom_is_rex(u32 magic)*/ typedef struct {int pagesize; -unsigned char bitmap[0 ]; +unsigned char bitmap[]; }memmap ;
drivers/base/regmap/regmap-i2c.c +4 -4
@@ -242,8 +242,8 @@ static int regmap_i2c_smbus_i2c_read(void *context, const void *reg,static const struct regmap_bus regmap_i2c_smbus_i2c_block = { .write = regmap_i2c_smbus_i2c_write, .read = regmap_i2c_smbus_i2c_read, - .max_raw_read =I2C_SMBUS_BLOCK_MAX , - .max_raw_write =I2C_SMBUS_BLOCK_MAX , + .max_raw_read =I2C_SMBUS_BLOCK_MAX -1 , + .max_raw_write =I2C_SMBUS_BLOCK_MAX -1 , }; static int regmap_i2c_smbus_i2c_write_reg16(void *context, const void *data,
@@ -299,8 +299,8 @@ static int regmap_i2c_smbus_i2c_read_reg16(void *context, const void *reg,static const struct regmap_bus regmap_i2c_smbus_i2c_block_reg16 = { .write = regmap_i2c_smbus_i2c_write_reg16, .read = regmap_i2c_smbus_i2c_read_reg16, - .max_raw_read =I2C_SMBUS_BLOCK_MAX , - .max_raw_write =I2C_SMBUS_BLOCK_MAX , + .max_raw_read =I2C_SMBUS_BLOCK_MAX -2 , + .max_raw_write =I2C_SMBUS_BLOCK_MAX -2 , }; static const struct regmap_bus *regmap_get_i2c_bus(struct i2c_client *i2c,
drivers/base/regmap/regmap-spi-avmm.c +1 -1
@@ -666,7 +666,7 @@ static const struct regmap_bus regmap_spi_avmm_bus = { .reg_format_endian_default = REGMAP_ENDIAN_NATIVE, .val_format_endian_default = REGMAP_ENDIAN_NATIVE, .max_raw_read = SPI_AVMM_VAL_SIZE * MAX_READ_CNT, - .max_raw_write = SPI_AVMM_REG_SIZE + SPI_AVMM_VAL_SIZE * MAX_WRITE_CNT, + .max_raw_write = SPI_AVMM_VAL_SIZE * MAX_WRITE_CNT, .free_context = spi_avmm_bridge_ctx_free, };
drivers/base/regmap/regmap.c +2 -4
@@ -2041,8 +2041,6 @@ int _regmap_raw_write(struct regmap *map, unsigned int reg,size_t val_count = val_len / val_bytes;size_t chunk_count, chunk_bytes;size_t chunk_regs = val_count; -size_t max_data = map->max_raw_write - map->format.reg_bytes - - map->format.pad_bytes;int ret, i;if (!val_count)
@@ -2050,8 +2048,8 @@ int _regmap_raw_write(struct regmap *map, unsigned int reg,if (map->use_single_write) chunk_regs =1 ; -else if (map->max_raw_write && val_len > max_data) - chunk_regs = max_data / val_bytes; +else if (map->max_raw_write && val_len > map->max_raw_write) + chunk_regs = map->max_raw_write / val_bytes; chunk_count = val_count / chunk_regs; chunk_bytes = chunk_regs * val_bytes;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -7
@@ -8209,13 +8209,7 @@ static int amdgpu_dm_connector_get_modes(struct drm_connector *connector)drm_add_modes_noedid (connector,640 ,480 ); }else {amdgpu_dm_connector_ddc_get_modes (connector, edid); -/* most eDP supports only timings from its edid, -* usually only detailed timings are available -* from eDP edid. timings which are not from edid -* may damage eDP -*/ -if (connector->connector_type != DRM_MODE_CONNECTOR_eDP) -amdgpu_dm_connector_add_common_modes (encoder, connector); +amdgpu_dm_connector_add_common_modes (encoder, connector);amdgpu_dm_connector_add_freesync_modes (connector, edid); }amdgpu_dm_fbc_init (connector);
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c +5 -0
@@ -81,6 +81,11 @@ int dcn31_get_active_display_cnt_wa( stream->signal == SIGNAL_TYPE_DVI_SINGLE_LINK || stream->signal == SIGNAL_TYPE_DVI_DUAL_LINK) tmds_present = true; + +/* Checking stream / link detection ensuring that PHY is active*/ +if (dc_is_dp_signal (stream->signal) && !stream->dpms_off) + display_count++; + }for (i =0 ; i < dc->link_count; i++) {
drivers/gpu/drm/amd/display/dc/dcn303/dcn303_resource.c +1 -1
@@ -193,7 +193,7 @@ static const struct dc_debug_options debug_defaults_drv = { .timing_trace = false, .clock_trace = true, .disable_pplib_clock_request = true, - .pipe_split_policy = MPC_SPLIT_DYNAMIC, + .pipe_split_policy = MPC_SPLIT_AVOID, .force_single_disp_pipe_split = false, .disable_dcc = DCC_ENABLE, .vsr_support = true,
drivers/gpu/drm/drm_client_modeset.c +6 -0
@@ -309,6 +309,9 @@ static bool drm_client_target_cloned(struct drm_device *dev, can_clone = true; dmt_mode =drm_mode_find_dmt (dev,1024 ,768 ,60 , false); +if (!dmt_mode) + goto fail; +for (i =0 ; i < connector_count; i++) {if (!enabled[i])continue ;
@@ -324,11 +327,13 @@ static bool drm_client_target_cloned(struct drm_device *dev,if (!modes[i]) can_clone = false; } +kfree (dmt_mode);if (can_clone) {DRM_DEBUG_KMS ("can clone using 1024x768\n" );return true; } +fail:DRM_INFO ("kms: can't enable cloning when we probably wanted to.\n" );return false; }
@@ -860,6 +865,7 @@ int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width,break ; } +kfree (modeset->mode); modeset->mode =drm_mode_duplicate (dev, mode);drm_connector_get (connector); modeset->connectors[modeset->num_connectors++] = connector;
drivers/gpu/drm/radeon/radeon_cs.c +2 -1
@@ -270,7 +270,8 @@ int radeon_cs_parser_init(struct radeon_cs_parser *p, void *data) {struct drm_radeon_cs *cs = data;uint64_t *chunk_array_ptr; -unsigned size, i; +u64 size; +unsigned i;u32 ring =RADEON_CS_RING_GFX ;s32 priority =0 ;
drivers/net/ethernet/agere/et131x.c +2 -2
@@ -3863,7 +3863,7 @@ static int et131x_change_mtu(struct net_device *netdev, int new_mtu)et131x_init_send (adapter);et131x_hwaddr_init (adapter); -ether_addr_copy (netdev->dev_addr, adapter->addr); +eth_hw_addr_set (netdev, adapter->addr);/* Init the device with the new settings */ et131x_adapter_setup (adapter);
@@ -3966,7 +3966,7 @@ static int et131x_pci_setup(struct pci_dev *pdev,netif_napi_add (netdev, &adapter->napi, et131x_poll,64 ); -ether_addr_copy (netdev->dev_addr, adapter->addr); +eth_hw_addr_set (netdev, adapter->addr); rc = -ENOMEM ;
drivers/net/ethernet/alacritech/slicoss.c +1 -1
@@ -1660,7 +1660,7 @@ static int slic_read_eeprom(struct slic_device *sdev) goto free_eeprom; }/* set mac address */ -ether_addr_copy (sdev->netdev->dev_addr, mac[devfn]); +eth_hw_addr_set (sdev->netdev, mac[devfn]); free_eeprom:dma_free_coherent (&sdev->pdev->dev,SLIC_EEPROM_SIZE , eeprom, paddr);
drivers/net/ethernet/allwinner/sun4i-emac.c +1 -1
@@ -852,7 +852,7 @@ static int emac_probe(struct platform_device *pdev) }/* Read MAC-address from DT */ - ret =of_get_mac_address (np, ndev->dev_addr); + ret =of_get_ethdev_address (np, ndev);if (ret) {/* if the MAC address is invalid get a random one */ eth_hw_addr_random (ndev);
drivers/net/ethernet/altera/altera_tse_main.c +1 -1
@@ -1531,7 +1531,7 @@ static int altera_tse_probe(struct platform_device *pdev) priv->rx_dma_buf_sz =ALTERA_RXDMABUFFER_SIZE ;/* get default MAC address from device tree */ - ret =of_get_mac_address (pdev->dev.of_node, ndev->dev_addr); + ret =of_get_ethdev_address (pdev->dev.of_node, ndev);if (ret)eth_hw_addr_random (ndev);
drivers/net/ethernet/amazon/ena/ena_netdev.c +1 -1
@@ -4119,7 +4119,7 @@ static void ena_set_conf_feat_params(struct ena_adapter *adapter,ether_addr_copy (adapter->mac_addr, netdev->dev_addr); }else {ether_addr_copy (adapter->mac_addr, feat->dev_attr.mac_addr); -ether_addr_copy (netdev->dev_addr, adapter->mac_addr); +eth_hw_addr_set (netdev, adapter->mac_addr); }/* Set offload features */
drivers/net/ethernet/aquantia/atlantic/aq_nic.c +1 -1
@@ -330,7 +330,7 @@ int aq_nic_ndev_register(struct aq_nic_s *self) {static u8 mac_addr_permanent[] =AQ_CFG_MAC_ADDR_PERMANENT ; -ether_addr_copy (self->ndev->dev_addr, mac_addr_permanent); +eth_hw_addr_set (self->ndev, mac_addr_permanent); }#endif
drivers/net/ethernet/arc/emac_main.c +1 -1
@@ -941,7 +941,7 @@ int arc_emac_probe(struct net_device *ndev, int interface) }/* Get MAC address from device tree */ - err =of_get_mac_address (dev->of_node, ndev->dev_addr); + err =of_get_ethdev_address (dev->of_node, ndev);if (err)eth_hw_addr_random (ndev);
drivers/net/ethernet/atheros/ag71xx.c +1 -1
@@ -1964,7 +1964,7 @@ static int ag71xx_probe(struct platform_device *pdev) ag->stop_desc->ctrl =0 ; ag->stop_desc->next = (u32 )ag->stop_desc_dma; - err =of_get_mac_address (np, ndev->dev_addr); + err =of_get_ethdev_address (np, ndev);if (err) {netif_err (ag, probe, ndev,"invalid MAC address, using random address\n" );eth_random_addr (ndev->dev_addr);
drivers/net/ethernet/broadcom/bcm4908_enet.c +1 -1
@@ -719,7 +719,7 @@ static int bcm4908_enet_probe(struct platform_device *pdev)return err;SET_NETDEV_DEV (netdev, &pdev->dev); - err =of_get_mac_address (dev->of_node, netdev->dev_addr); + err =of_get_ethdev_address (dev->of_node, netdev);if (err)eth_hw_addr_random (netdev); netdev->netdev_ops = &bcm4908_enet_netdev_ops;
drivers/net/ethernet/broadcom/bcmsysport.c +1 -1
@@ -2561,7 +2561,7 @@ static int bcm_sysport_probe(struct platform_device *pdev) }/* Initialize netdevice members */ - ret =of_get_mac_address (dn, dev->dev_addr); + ret =of_get_ethdev_address (dn, dev);if (ret) {dev_warn (&pdev->dev,"using random Ethernet MAC\n" );eth_hw_addr_random (dev);
drivers/net/ethernet/broadcom/bgmac-bcma.c +2 -2
@@ -128,7 +128,7 @@ static int bgmac_probe(struct bcma_device *core)bcma_set_drvdata (core, bgmac); - err =of_get_mac_address (bgmac->dev->of_node, bgmac->net_dev->dev_addr); + err =of_get_ethdev_address (bgmac->dev->of_node, bgmac->net_dev);if (err == -EPROBE_DEFER )return err;
@@ -150,7 +150,7 @@ static int bgmac_probe(struct bcma_device *core) err = -ENOTSUPP ; goto err; } -ether_addr_copy (bgmac->net_dev->dev_addr, mac); +eth_hw_addr_set (bgmac->net_dev, mac); }/* On BCM4706 we need common core to access PHY */
drivers/net/ethernet/broadcom/bgmac-platform.c +1 -1
@@ -192,7 +192,7 @@ static int bgmac_probe(struct platform_device *pdev) bgmac->dev = &pdev->dev; bgmac->dma_dev = &pdev->dev; - ret =of_get_mac_address (np, bgmac->net_dev->dev_addr); + ret =of_get_ethdev_address (np, bgmac->net_dev);if (ret == -EPROBE_DEFER )return ret;
drivers/net/ethernet/broadcom/bgmac.c +1 -1
@@ -1241,7 +1241,7 @@ static int bgmac_set_mac_address(struct net_device *net_dev, void *addr)if (ret <0 )return ret; -ether_addr_copy (net_dev->dev_addr, sa->sa_data); +eth_hw_addr_set (net_dev, sa->sa_data);bgmac_write_mac_address (bgmac, net_dev->dev_addr);eth_commit_mac_addr_change (net_dev, addr);
drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c +1 -1
@@ -475,7 +475,7 @@ static void bnxt_vf_rep_netdev_init(struct bnxt *bp, struct bnxt_vf_rep *vf_rep, dev->features |= pf_dev->features;bnxt_vf_rep_eth_addr_gen (bp->pf.mac_addr, vf_rep->vf_idx, dev->perm_addr); -ether_addr_copy (dev->dev_addr, dev->perm_addr); +eth_hw_addr_set (dev, dev->perm_addr);/* Set VF-Rep's max-mtu to the corresponding VF's max-mtu */ if (!bnxt_hwrm_vfr_qcfg (bp, vf_rep, &max_mtu)) dev->max_mtu = max_mtu;
drivers/net/ethernet/broadcom/genet/bcmgenet.c +2 -2
@@ -3610,7 +3610,7 @@ static int bcmgenet_set_mac_addr(struct net_device *dev, void *p)if (netif_running (dev))return -EBUSY ; -ether_addr_copy (dev->dev_addr, addr->sa_data); +eth_hw_addr_set (dev, addr->sa_data);return 0 ; }
@@ -4060,7 +4060,7 @@ static int bcmgenet_probe(struct platform_device *pdev)bcmgenet_power_up (priv,GENET_POWER_PASSIVE );if (pd && !IS_ERR_OR_NULL (pd->mac_address)) -ether_addr_copy (dev->dev_addr, pd->mac_address); +eth_hw_addr_set (dev, pd->mac_address);else if (!device_get_mac_address (&pdev->dev, dev->dev_addr,ETH_ALEN ))if (has_acpi_companion (&pdev->dev))
drivers/net/ethernet/brocade/bna/bnad.c +2 -2
@@ -875,7 +875,7 @@ bnad_set_netdev_perm_addr(struct bnad *bnad)ether_addr_copy (netdev->perm_addr, bnad->perm_addr);if (is_zero_ether_addr (netdev->dev_addr)) -ether_addr_copy (netdev->dev_addr, bnad->perm_addr); +eth_hw_addr_set (netdev, bnad->perm_addr); }/* Control Path Handlers */
@@ -3249,7 +3249,7 @@ bnad_set_mac_address(struct net_device *netdev, void *addr) err =bnad_mac_addr_set_locked (bnad, sa->sa_data);if (!err) -ether_addr_copy (netdev->dev_addr, sa->sa_data); +eth_hw_addr_set (netdev, sa->sa_data);spin_unlock_irqrestore (&bnad->bna_lock, flags);
drivers/net/ethernet/cadence/macb_main.c +1 -1
@@ -4835,7 +4835,7 @@ static int macb_probe(struct platform_device *pdev)if (bp->caps &MACB_CAPS_NEEDS_RSTONUBR ) bp->rx_intr_mask |=MACB_BIT (RXUBR ); - err =of_get_mac_address (np, bp->dev->dev_addr); + err =of_get_ethdev_address (np, bp->dev);if (err == -EPROBE_DEFER ) goto err_out_free_netdev;else if (err)
drivers/net/ethernet/cavium/liquidio/lio_core.c +1 -1
@@ -411,7 +411,7 @@ void octeon_pf_changed_vf_macaddr(struct octeon_device *oct, u8 *mac)if (!ether_addr_equal (netdev->dev_addr, mac)) { macaddr_changed = true; -ether_addr_copy (netdev->dev_addr, mac); +eth_hw_addr_set (netdev, mac);ether_addr_copy (((u8 *)&lio->linfo.hw_addr) +2 , mac);call_netdevice_notifiers (NETDEV_CHANGEADDR , netdev); }
drivers/net/ethernet/cavium/liquidio/lio_main.c +1 -1
@@ -3650,7 +3650,7 @@ static int setup_nic_devices(struct octeon_device *octeon_dev)/* Copy MAC Address to OS network device structure */ -ether_addr_copy (netdev->dev_addr, mac); +eth_hw_addr_set (netdev, mac);/* By default all interfaces on a single Octeon uses the same * tx and rx queues
drivers/net/ethernet/cavium/liquidio/lio_vf_main.c +1 -1
@@ -2148,7 +2148,7 @@ static int setup_nic_devices(struct octeon_device *octeon_dev) mac[j] = *((u8 *)(((u8 *)&lio->linfo.hw_addr) +2 + j));/* Copy MAC Address to OS network device structure */ -ether_addr_copy (netdev->dev_addr, mac); +eth_hw_addr_set (netdev, mac); if (liquidio_setup_io_queues(octeon_dev, i, lio->linfo.num_txpciq,
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c +1 -1
@@ -1501,7 +1501,7 @@ static int octeon_mgmt_probe(struct platform_device *pdev) netdev->min_mtu =64 -OCTEON_MGMT_RX_HEADROOM ; netdev->max_mtu =16383 -OCTEON_MGMT_RX_HEADROOM -VLAN_HLEN ; - result =of_get_mac_address (pdev->dev.of_node, netdev->dev_addr); + result =of_get_ethdev_address (pdev->dev.of_node, netdev);if (result)eth_hw_addr_random (netdev);
drivers/net/ethernet/cavium/thunder/nicvf_main.c +1 -2
@@ -221,8 +221,7 @@ static void nicvf_handle_mbx_intr(struct nicvf *nic) nic->tns_mode = mbx.nic_cfg.tns_mode &0x7F ; nic->node = mbx.nic_cfg.node_id;if (!nic->set_mac_pending) -ether_addr_copy (nic->netdev->dev_addr, - mbx.nic_cfg.mac_addr); +eth_hw_addr_set (nic->netdev, mbx.nic_cfg.mac_addr); nic->sqs_mode = mbx.nic_cfg.sqs_mode; nic->loopback_supported = mbx.nic_cfg.loopback_supported; nic->link_up = false;
drivers/net/ethernet/emulex/benet/be_main.c +1 -1
@@ -369,7 +369,7 @@ static int be_mac_addr_set(struct net_device *netdev, void *p)/* Remember currently programmed MAC */ ether_addr_copy (adapter->dev_mac, addr->sa_data); done: -ether_addr_copy (netdev->dev_addr, addr->sa_data); +eth_hw_addr_set (netdev, addr->sa_data);dev_info (dev,"MAC address changed to %pM\n" , addr->sa_data);return 0 ; err:
drivers/net/ethernet/ethoc.c +2 -2
@@ -1148,10 +1148,10 @@ static int ethoc_probe(struct platform_device *pdev)/* Allow the platform setup code to pass in a MAC address. */ if (pdata) { -ether_addr_copy (netdev->dev_addr, pdata->hwaddr); +eth_hw_addr_set (netdev, pdata->hwaddr); priv->phy_id = pdata->phy_id; }else { -of_get_mac_address (pdev->dev.of_node, netdev->dev_addr); +of_get_ethdev_address (pdev->dev.of_node, netdev); priv->phy_id =-1 ; }
drivers/net/ethernet/ezchip/nps_enet.c +2 -2
@@ -421,7 +421,7 @@ static s32 nps_enet_set_mac_address(struct net_device *ndev, void *p) res =eth_mac_addr (ndev, p);if (!res) { -ether_addr_copy (ndev->dev_addr, addr->sa_data); +eth_hw_addr_set (ndev, addr->sa_data);nps_enet_set_hw_mac_address (ndev); }
@@ -601,7 +601,7 @@ static s32 nps_enet_probe(struct platform_device *pdev)dev_dbg (dev,"Registers base address is 0x%p\n" , priv->regs_base);/* set kernel MAC address to dev */ - err =of_get_mac_address (dev->of_node, ndev->dev_addr); + err =of_get_ethdev_address (dev->of_node, ndev);if (err)eth_hw_addr_random (ndev);
drivers/net/ethernet/faraday/ftgmac100.c +2 -2
@@ -186,7 +186,7 @@ static void ftgmac100_initial_mac(struct ftgmac100 *priv) addr =device_get_mac_address (priv->dev, mac,ETH_ALEN );if (addr) { -ether_addr_copy (priv->netdev->dev_addr, mac); +eth_hw_addr_set (priv->netdev, mac);dev_info (priv->dev,"Read MAC address %pM from device tree\n" , mac);return ;
@@ -203,7 +203,7 @@ static void ftgmac100_initial_mac(struct ftgmac100 *priv) mac[5 ] = l &0xff ;if (is_valid_ether_addr (mac)) { -ether_addr_copy (priv->netdev->dev_addr, mac); +eth_hw_addr_set (priv->netdev, mac);dev_info (priv->dev,"Read MAC address %pM from chip\n" , mac); }else {eth_hw_addr_random (priv->netdev);
drivers/net/ethernet/freescale/fec_mpc52xx.c +1 -1
@@ -890,7 +890,7 @@ static int mpc52xx_fec_probe(struct platform_device *op)* * First try to read MAC address from DT */ - rv =of_get_mac_address (np, ndev->dev_addr); + rv =of_get_ethdev_address (np, ndev);if (rv) {struct mpc52xx_fec __iomem *fec = priv->fec;
drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c +1 -1
@@ -1005,7 +1005,7 @@ static int fs_enet_probe(struct platform_device *ofdev)spin_lock_init (&fep->lock);spin_lock_init (&fep->tx_lock); -of_get_mac_address (ofdev->dev.of_node, ndev->dev_addr); +of_get_ethdev_address (ofdev->dev.of_node, ndev); ret = fep->ops->allocate_bd (ndev);if (ret)
drivers/net/ethernet/freescale/gianfar.c +1 -1
@@ -753,7 +753,7 @@ static int gfar_of_init(struct platform_device *ofdev, struct net_device **pdev)if (stash_len || stash_idx) priv->device_flags |=FSL_GIANFAR_DEV_HAS_BUF_STASHING ; - err =of_get_mac_address (np, dev->dev_addr); + err =of_get_ethdev_address (np, dev);if (err) {eth_hw_addr_random (dev);dev_info (&ofdev->dev,"Using random MAC address: %pM\n" , dev->dev_addr);
drivers/net/ethernet/freescale/ucc_geth.c +1 -1
@@ -3731,7 +3731,7 @@ static int ucc_geth_probe(struct platform_device* ofdev) goto err_free_netdev; } -of_get_mac_address (np, dev->dev_addr); +of_get_ethdev_address (np, dev); ugeth->ug_info = ug_info; ugeth->dev = device;
drivers/net/ethernet/google/gve/gve_adminq.c +1 -1
@@ -733,7 +733,7 @@ int gve_adminq_describe_device(struct gve_priv *priv) } priv->dev->max_mtu = mtu; priv->num_event_counters =be16_to_cpu (descriptor->counters); -ether_addr_copy (priv->dev->dev_addr, descriptor->mac); +eth_hw_addr_set (priv->dev, descriptor->mac); mac = descriptor->mac;dev_info (&priv->pdev->dev,"MAC addr: %pM\n" , mac); priv->tx_pages_per_qpl =be16_to_cpu (descriptor->tx_pages_per_qpl);
drivers/net/ethernet/hisilicon/hisi_femac.c +1 -1
@@ -841,7 +841,7 @@ static int hisi_femac_drv_probe(struct platform_device *pdev) (unsigned long )phy->phy_id, phy_modes(phy->interface)); - ret =of_get_mac_address (node, ndev->dev_addr); + ret =of_get_ethdev_address (node, ndev);if (ret) {eth_hw_addr_random (ndev); dev_warn(dev, "using random MAC address %pM\n",
drivers/net/ethernet/hisilicon/hix5hd2_gmac.c +1 -1
@@ -1219,7 +1219,7 @@ static int hix5hd2_dev_probe(struct platform_device *pdev) goto out_phy_node; } - ret =of_get_mac_address (node, ndev->dev_addr); + ret =of_get_ethdev_address (node, ndev);if (ret) {eth_hw_addr_random (ndev); netdev_warn(ndev, "using random MAC address %pM\n",
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +2 -2
@@ -2251,7 +2251,7 @@ static int hns3_nic_net_set_mac_address(struct net_device *netdev, void *p)return ret; } -ether_addr_copy (netdev->dev_addr, mac_addr->sa_data); +eth_hw_addr_set (netdev, mac_addr->sa_data);return 0 ; }
@@ -4921,7 +4921,7 @@ static int hns3_init_mac_addr(struct net_device *netdev)dev_warn (priv->dev,"using random MAC address %s\n" , format_mac_addr); }else if (!ether_addr_equal (netdev->dev_addr, mac_addr_temp)) { -ether_addr_copy (netdev->dev_addr, mac_addr_temp); +eth_hw_addr_set (netdev, mac_addr_temp);ether_addr_copy (netdev->perm_addr, mac_addr_temp); }else {return 0 ;
drivers/net/ethernet/ibm/ibmveth.c +1 -1
@@ -1620,7 +1620,7 @@ static int ibmveth_set_mac_addr(struct net_device *dev, void *p)return rc; } -ether_addr_copy (dev->dev_addr, addr->sa_data); +eth_hw_addr_set (dev, addr->sa_data);return 0 ; }
drivers/net/ethernet/ibm/ibmvnic.c +2 -3
@@ -4689,8 +4689,7 @@ static int handle_change_mac_rsp(union ibmvnic_crq *crq,/* crq->change_mac_addr.mac_addr is the requested one * crq->change_mac_addr_rsp.mac_addr is the returned valid one. */ -ether_addr_copy (netdev->dev_addr, - &crq->change_mac_addr_rsp.mac_addr[0 ]); +eth_hw_addr_set (netdev, &crq->change_mac_addr_rsp.mac_addr[0 ]);ether_addr_copy (adapter->mac_addr, &crq->change_mac_addr_rsp.mac_addr[0 ]); out:
@@ -5658,7 +5657,7 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id) adapter->login_pending = false;ether_addr_copy (adapter->mac_addr, mac_addr_p); -ether_addr_copy (netdev->dev_addr, adapter->mac_addr); +eth_hw_addr_set (netdev, adapter->mac_addr); netdev->irq = dev->irq; netdev->netdev_ops = &ibmvnic_netdev_ops; netdev->ethtool_ops = &ibmvnic_ethtool_ops;
drivers/net/ethernet/intel/fm10k/fm10k_netdev.c +1 -1
@@ -990,7 +990,7 @@ static int fm10k_set_mac(struct net_device *dev, void *p) }if (!err) { -ether_addr_copy (dev->dev_addr, addr->sa_data); +eth_hw_addr_set (dev, addr->sa_data);ether_addr_copy (hw->mac.addr, addr->sa_data); dev->addr_assign_type &= ~NET_ADDR_RANDOM ; }
drivers/net/ethernet/intel/fm10k/fm10k_pci.c +2 -2
@@ -300,7 +300,7 @@ static int fm10k_handle_reset(struct fm10k_intfc *interface)if (is_valid_ether_addr (hw->mac.perm_addr)) {ether_addr_copy (hw->mac.addr, hw->mac.perm_addr);ether_addr_copy (netdev->perm_addr, hw->mac.perm_addr); -ether_addr_copy (netdev->dev_addr, hw->mac.perm_addr); +eth_hw_addr_set (netdev, hw->mac.perm_addr); netdev->addr_assign_type &= ~NET_ADDR_RANDOM ; }
@@ -2045,7 +2045,7 @@ static int fm10k_sw_init(struct fm10k_intfc *interface, netdev->addr_assign_type |=NET_ADDR_RANDOM ; } -ether_addr_copy (netdev->dev_addr, hw->mac.addr); +eth_hw_addr_set (netdev, hw->mac.addr);ether_addr_copy (netdev->perm_addr, hw->mac.addr);if (!is_valid_ether_addr (netdev->perm_addr)) {
drivers/net/ethernet/intel/i40e/i40e_main.c +2 -2
@@ -1686,7 +1686,7 @@ static int i40e_set_mac(struct net_device *netdev, void *p)*/ spin_lock_bh (&vsi->mac_filter_hash_lock);i40e_del_mac_filter (vsi, netdev->dev_addr); -ether_addr_copy (netdev->dev_addr, addr->sa_data); +eth_hw_addr_set (netdev, addr->sa_data);i40e_add_mac_filter (vsi, netdev->dev_addr);spin_unlock_bh (&vsi->mac_filter_hash_lock);
@@ -13659,7 +13659,7 @@ static int i40e_config_netdev(struct i40e_vsi *vsi)i40e_add_mac_filter (vsi, broadcast);spin_unlock_bh (&vsi->mac_filter_hash_lock); -ether_addr_copy (netdev->dev_addr, mac_addr); +eth_hw_addr_set (netdev, mac_addr);ether_addr_copy (netdev->perm_addr, mac_addr);/* i40iw_net_event() reads 16 bytes from neigh->primary_key */
drivers/net/ethernet/intel/iavf/iavf_ethtool.c +1 -1
@@ -1855,7 +1855,7 @@ static int iavf_set_channels(struct net_device *netdev, }if (i ==IAVF_RESET_WAIT_COMPLETE_COUNT ) { adapter->flags &= ~IAVF_FLAG_REINIT_ITR_NEEDED ; - adapter->num_active_queues = num_req; + adapter->num_req_queues =0 ;return -EOPNOTSUPP ; }
drivers/net/ethernet/intel/iavf/iavf_main.c +2 -5
@@ -1507,19 +1507,16 @@ static int iavf_alloc_q_vectors(struct iavf_adapter *adapter)static void iavf_free_q_vectors (struct iavf_adapter *adapter) {int q_idx, num_q_vectors; -int napi_vectors;if (!adapter->q_vectors)return ; num_q_vectors = adapter->num_msix_vectors -NONQ_VECS ; - napi_vectors = adapter->num_active_queues;for (q_idx =0 ; q_idx < num_q_vectors; q_idx++) {struct iavf_q_vector *q_vector = &adapter->q_vectors[q_idx]; -if (q_idx < napi_vectors) -netif_napi_del (&q_vector->napi); +netif_napi_del (&q_vector->napi); }kfree (adapter->q_vectors); adapter->q_vectors =NULL ;
@@ -1963,7 +1960,7 @@ static void iavf_init_get_resources(struct iavf_adapter *adapter)eth_hw_addr_random (netdev);ether_addr_copy (adapter->hw.mac.addr, netdev->dev_addr); }else { -ether_addr_copy (netdev->dev_addr, adapter->hw.mac.addr); +eth_hw_addr_set (netdev, adapter->hw.mac.addr);ether_addr_copy (netdev->perm_addr, adapter->hw.mac.addr); }
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c +2 -2
@@ -1726,7 +1726,7 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,if (!v_retval)iavf_mac_add_ok (adapter);if (!ether_addr_equal (netdev->dev_addr, adapter->hw.mac.addr)) -ether_addr_copy (netdev->dev_addr, adapter->hw.mac.addr); +eth_hw_addr_set (netdev, adapter->hw.mac.addr);break ;case VIRTCHNL_OP_GET_STATS : { struct iavf_eth_stats *stats =
@@ -1757,7 +1757,7 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,ether_addr_copy (adapter->hw.mac.addr, netdev->dev_addr); }else {/* refresh current mac address if changed */ -ether_addr_copy (netdev->dev_addr, adapter->hw.mac.addr); +eth_hw_addr_set (netdev, adapter->hw.mac.addr);ether_addr_copy (netdev->perm_addr, adapter->hw.mac.addr); }
drivers/net/ethernet/intel/ice/ice_main.c +2 -2
@@ -3183,7 +3183,7 @@ static int ice_cfg_netdev(struct ice_vsi *vsi)if (vsi->type ==ICE_VSI_PF ) {SET_NETDEV_DEV (netdev,ice_pf_to_dev (vsi->back));ether_addr_copy (mac_addr, vsi->port_info->mac.perm_addr); -ether_addr_copy (netdev->dev_addr, mac_addr); +eth_hw_addr_set (netdev, mac_addr);ether_addr_copy (netdev->perm_addr, mac_addr); }
@@ -5225,7 +5225,7 @@ static int ice_set_mac_address(struct net_device *netdev, void *pi)netdev_err (netdev,"can't set MAC %pM. filter update failed\n" , mac);netif_addr_lock_bh (netdev); -ether_addr_copy (netdev->dev_addr, old_mac); +eth_hw_addr_set (netdev, old_mac);netif_addr_unlock_bh (netdev);return err; }
drivers/net/ethernet/intel/igc/igc_main.c +2 -2
@@ -2748,15 +2748,15 @@ static void igc_xdp_xmit_zc(struct igc_ring *ring)struct netdev_queue *nq =txring_txq (ring);union igc_adv_tx_desc *tx_desc =NULL ;int cpu =smp_processor_id (); -u16 ntu = ring->next_to_use;struct xdp_desc xdp_desc; -u16 budget; +u16 budget, ntu;if (!netif_carrier_ok (ring->netdev))return ;__netif_tx_lock (nq, cpu); + ntu = ring->next_to_use; budget =igc_desc_unused (ring);while (xsk_tx_peek_desc (pool, &xdp_desc) && budget--) {
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +3 -3
@@ -2541,7 +2541,7 @@ void ixgbevf_reset(struct ixgbevf_adapter *adapter) }if (is_valid_ether_addr (adapter->hw.mac.addr)) { -ether_addr_copy (netdev->dev_addr, adapter->hw.mac.addr); +eth_hw_addr_set (netdev, adapter->hw.mac.addr);ether_addr_copy (netdev->perm_addr, adapter->hw.mac.addr); }
@@ -3055,7 +3055,7 @@ static int ixgbevf_sw_init(struct ixgbevf_adapter *adapter)else if (is_zero_ether_addr (adapter->hw.mac.addr))dev_info (&pdev->dev,"MAC address not assigned by administrator.\n" ); -ether_addr_copy (netdev->dev_addr, hw->mac.addr); +eth_hw_addr_set (netdev, hw->mac.addr); }if (!is_valid_ether_addr (netdev->dev_addr)) {
@@ -4232,7 +4232,7 @@ static int ixgbevf_set_mac(struct net_device *netdev, void *p)ether_addr_copy (hw->mac.addr, addr->sa_data);ether_addr_copy (hw->mac.perm_addr, addr->sa_data); -ether_addr_copy (netdev->dev_addr, addr->sa_data); +eth_hw_addr_set (netdev, addr->sa_data);return 0 ; }
drivers/net/ethernet/korina.c +2 -2
@@ -1297,8 +1297,8 @@ static int korina_probe(struct platform_device *pdev) lp =netdev_priv (dev);if (mac_addr) -ether_addr_copy (dev->dev_addr, mac_addr); -else if (of_get_mac_address (pdev->dev.of_node, dev->dev_addr) <0 ) +eth_hw_addr_set (dev, mac_addr); +else if (of_get_ethdev_address (pdev->dev.of_node, dev) <0 )eth_hw_addr_random (dev); clk =devm_clk_get_optional (&pdev->dev,"mdioclk" );
drivers/net/ethernet/lantiq_xrx200.c +1 -1
@@ -474,7 +474,7 @@ static int xrx200_probe(struct platform_device *pdev)return PTR_ERR (priv->clk); } - err =of_get_mac_address (np, net_dev->dev_addr); + err =of_get_ethdev_address (np, net_dev);if (err)eth_hw_addr_random (net_dev);
drivers/net/ethernet/litex/litex_liteeth.c +1 -1
@@ -266,7 +266,7 @@ static int liteeth_probe(struct platform_device *pdev) priv->tx_base = buf_base + priv->num_rx_slots * priv->slot_size; priv->tx_slot =0 ; - err =of_get_mac_address (pdev->dev.of_node, netdev->dev_addr); + err =of_get_ethdev_address (pdev->dev.of_node, netdev);if (err)eth_hw_addr_random (netdev);
drivers/net/ethernet/marvell/mvneta.c +1 -1
@@ -5242,7 +5242,7 @@ static int mvneta_probe(struct platform_device *pdev) goto err_free_ports; } - err =of_get_mac_address (dn, dev->dev_addr); + err =of_get_ethdev_address (dn, dev);if (!err) { mac_from ="device tree" ; }else {
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +2 -2
@@ -6087,7 +6087,7 @@ static void mvpp2_port_copy_mac_addr(struct net_device *dev, struct mvpp2 *priv,if (fwnode_get_mac_address (fwnode, fw_mac_addr,ETH_ALEN )) { *mac_from ="firmware node" ; -ether_addr_copy (dev->dev_addr, fw_mac_addr); +eth_hw_addr_set (dev, fw_mac_addr);return ; }
@@ -6095,7 +6095,7 @@ static void mvpp2_port_copy_mac_addr(struct net_device *dev, struct mvpp2 *priv,mvpp21_get_mac_address (port, hw_mac_addr);if (is_valid_ether_addr (hw_mac_addr)) { *mac_from ="hardware" ; -ether_addr_copy (dev->dev_addr, hw_mac_addr); +eth_hw_addr_set (dev, hw_mac_addr);return ; } }
drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c +1 -1
@@ -2333,7 +2333,7 @@ int mvpp2_prs_update_mac_da(struct net_device *dev, const u8 *da)return err;/* Set addr in the device */ -ether_addr_copy (dev->dev_addr, da); +eth_hw_addr_set (dev, da);return 0 ; }
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c +1 -1
@@ -188,7 +188,7 @@ static int otx2_hw_get_mac_addr(struct otx2_nic *pfvf,return PTR_ERR (msghdr); } rsp = (struct nix_get_mac_addr_rsp *)msghdr; -ether_addr_copy (netdev->dev_addr, rsp->mac_addr); +eth_hw_addr_set (netdev, rsp->mac_addr);mutex_unlock (&pfvf->mbox.lock);return 0 ;
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +3 -2
@@ -1430,8 +1430,9 @@ static int otx2_init_hw_resources(struct otx2_nic *pf)if (err) goto err_free_npa_lf; -/* Enable backpressure */ -otx2_nix_config_bp (pf, true); +/* Enable backpressure for CGX mapped PF/VFs */ +if (!is_otx2_lbkvf (pf->pdev)) +otx2_nix_config_bp (pf, true);/* Init Auras and pools used by NIX RQ, for free buffer ptrs */ err =otx2_rq_aura_pool_init (pf);
drivers/net/ethernet/marvell/prestera/prestera_main.c +1 -1
@@ -141,7 +141,7 @@ static int prestera_port_set_mac_address(struct net_device *dev, void *p)if (err)return err; -ether_addr_copy (dev->dev_addr, addr->sa_data); +eth_hw_addr_set (dev, addr->sa_data);return 0 ; }
drivers/net/ethernet/marvell/pxa168_eth.c +1 -1
@@ -1434,7 +1434,7 @@ static int pxa168_eth_probe(struct platform_device *pdev)INIT_WORK (&pep->tx_timeout_task, pxa168_eth_tx_timeout_task); - err =of_get_mac_address (pdev->dev.of_node, dev->dev_addr); + err =of_get_ethdev_address (pdev->dev.of_node, dev);if (err) {/* try reading the mac address, if set by the bootloader */ pxa168_eth_get_mac_address (dev, dev->dev_addr);
drivers/net/ethernet/marvell/sky2.c +1 -1
@@ -4802,7 +4802,7 @@ static struct net_device *sky2_init_netdev(struct sky2_hw *hw, unsigned port,* 1) from device tree data * 2) from internal registers set by bootloader */ - ret =of_get_mac_address (hw->pdev->dev.of_node, dev->dev_addr); + ret =of_get_ethdev_address (hw->pdev->dev.of_node, dev);if (ret)memcpy_fromio (dev->dev_addr, hw->regs +B2_MAC_1 + port *8 ,ETH_ALEN );
drivers/net/ethernet/mediatek/mtk_eth_soc.c +11 -18
@@ -2612,23 +2612,6 @@ static int mtk_hw_deinit(struct mtk_eth *eth)return 0 ; } -static int __init mtk_init (struct net_device *dev) -{ -struct mtk_mac *mac =netdev_priv (dev); -struct mtk_eth *eth = mac->hw; -int ret; - - ret =of_get_mac_address (mac->of_node, dev->dev_addr); -if (ret) { -/* If the mac address is invalid, use random mac address */ -eth_hw_addr_random (dev); -dev_err (eth->dev,"generated random MAC address %pM\n" , - dev->dev_addr); - } - -return 0 ; -} -static void mtk_uninit (struct net_device *dev) {struct mtk_mac *mac =netdev_priv (dev);
@@ -2956,7 +2939,6 @@ static const struct ethtool_ops mtk_ethtool_ops = { };static const struct net_device_ops mtk_netdev_ops = { - .ndo_init = mtk_init, .ndo_uninit = mtk_uninit, .ndo_open = mtk_open, .ndo_stop = mtk_stop,
@@ -3010,6 +2992,17 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) mac->hw = eth; mac->of_node = np; + err =of_get_ethdev_address (mac->of_node, eth->netdev[id]); +if (err == -EPROBE_DEFER ) +return err; + +if (err) { +/* If the mac address is invalid, use random mac address */ +eth_hw_addr_random (eth->netdev[id]); +dev_err (eth->dev,"generated random MAC address %pM\n" , + eth->netdev[id]->dev_addr); + } +memset (mac->hwlro_ip,0 ,sizeof (mac->hwlro_ip)); mac->hwlro_ip_cnt =0 ;
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +1 -1
@@ -3224,7 +3224,7 @@ static int mlx5e_set_mac(struct net_device *netdev, void *addr)return -EADDRNOTAVAIL ;netif_addr_lock_bh (netdev); -ether_addr_copy (netdev->dev_addr, saddr->sa_data); +eth_hw_addr_set (netdev, saddr->sa_data);netif_addr_unlock_bh (netdev);mlx5e_nic_set_rx_mode (priv);
drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c +1 -1
@@ -75,7 +75,7 @@ static void mlxbf_gige_initial_mac(struct mlxbf_gige *priv)u64_to_ether_addr (local_mac, mac);if (is_valid_ether_addr (mac)) { -ether_addr_copy (priv->netdev->dev_addr, mac); +eth_hw_addr_set (priv->netdev, mac); }else {/* Provide a random MAC if for some reason the device has * not been configured with a valid MAC address already.
drivers/net/ethernet/micrel/ks8851_common.c +1 -1
@@ -195,7 +195,7 @@ static void ks8851_init_mac(struct ks8851_net *ks, struct device_node *np)struct net_device *dev = ks->netdev;int ret; - ret =of_get_mac_address (np, dev->dev_addr); + ret =of_get_ethdev_address (np, dev);if (!ret) {ks8851_write_mac_addr (dev);return ;
drivers/net/ethernet/microchip/enc28j60.c +2 -2
@@ -517,7 +517,7 @@ static int enc28j60_set_mac_address(struct net_device *dev, void *addr)if (!is_valid_ether_addr (address->sa_data))return -EADDRNOTAVAIL ; -ether_addr_copy (dev->dev_addr, address->sa_data); +eth_hw_addr_set (dev, address->sa_data);return enc28j60_set_hw_macaddr (dev); }
@@ -1573,7 +1573,7 @@ static int enc28j60_probe(struct spi_device *spi) }if (device_get_mac_address (&spi->dev, macaddr,sizeof (macaddr))) -ether_addr_copy (dev->dev_addr, macaddr); +eth_hw_addr_set (dev, macaddr);else eth_hw_addr_random (dev);enc28j60_set_hw_macaddr (dev);
drivers/net/ethernet/microchip/lan743x_main.c +2 -2
@@ -829,7 +829,7 @@ static int lan743x_mac_init(struct lan743x_adapter *adapter)eth_random_addr (adapter->mac_address); }lan743x_mac_set_address (adapter, adapter->mac_address); -ether_addr_copy (netdev->dev_addr, adapter->mac_address); +eth_hw_addr_set (netdev, adapter->mac_address);return 0 ; }
@@ -2677,7 +2677,7 @@ static int lan743x_netdev_set_mac_address(struct net_device *netdev, ret =eth_prepare_mac_addr_change (netdev, sock_addr);if (ret)return ret; -ether_addr_copy (netdev->dev_addr, sock_addr->sa_data); +eth_hw_addr_set (netdev, sock_addr->sa_data);lan743x_mac_set_address (adapter, sock_addr->sa_data);lan743x_rfe_update_mac_address (adapter);return 0 ;
drivers/net/ethernet/microchip/sparx5/sparx5_netdev.c +1 -1
@@ -172,7 +172,7 @@ static int sparx5_set_mac_address(struct net_device *dev, void *p)sparx5_mact_learn (sparx5,PGID_CPU , addr->sa_data, port->pvid);/* Record the address */ -ether_addr_copy (dev->dev_addr, addr->sa_data); +eth_hw_addr_set (dev, addr->sa_data);return 0 ; }
drivers/net/ethernet/microsoft/mana/mana_en.c +1 -1
@@ -1619,7 +1619,7 @@ static int mana_init_port(struct net_device *ndev)if (apc->num_queues > apc->max_queues) apc->num_queues = apc->max_queues; -ether_addr_copy (ndev->dev_addr, apc->mac_addr); +eth_hw_addr_set (ndev, apc->mac_addr);return 0 ;
drivers/net/ethernet/mscc/ocelot_net.c +1 -1
@@ -606,7 +606,7 @@ static int ocelot_port_set_mac_address(struct net_device *dev, void *p)/* Then forget the previous one. */ ocelot_mact_forget (ocelot, dev->dev_addr, ocelot_port->pvid_vlan.vid); -ether_addr_copy (dev->dev_addr, addr->sa_data); +eth_hw_addr_set (dev, addr->sa_data);return 0 ; }
drivers/net/ethernet/netronome/nfp/abm/main.c +1 -1
@@ -305,7 +305,7 @@ nfp_abm_vnic_set_mac(struct nfp_pf *pf, struct nfp_abm *abm, struct nfp_net *nn,return ; } -ether_addr_copy (nn->dp.netdev->dev_addr, mac_addr); +eth_hw_addr_set (nn->dp.netdev, mac_addr);ether_addr_copy (nn->dp.netdev->perm_addr, mac_addr); }
drivers/net/ethernet/netronome/nfp/nfp_net_main.c +1 -1
@@ -55,7 +55,7 @@ nfp_net_get_mac_addr(struct nfp_pf *pf, struct net_device *netdev,return ; } -ether_addr_copy (netdev->dev_addr, eth_port->mac_addr); +eth_hw_addr_set (netdev, eth_port->mac_addr);ether_addr_copy (netdev->perm_addr, eth_port->mac_addr); }
drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c +1 -1
@@ -58,7 +58,7 @@ static void nfp_netvf_get_mac_addr(struct nfp_net *nn)return ; } -ether_addr_copy (nn->dp.netdev->dev_addr, mac_addr); +eth_hw_addr_set (nn->dp.netdev, mac_addr);ether_addr_copy (nn->dp.netdev->perm_addr, mac_addr); }
drivers/net/ethernet/ni/nixge.c +3 -3
@@ -1211,7 +1211,7 @@ static void *nixge_get_nvmem_address(struct device *dev) cell =nvmem_cell_get (dev,"address" );if (IS_ERR (cell)) -return NULL ; +return cell; mac =nvmem_cell_read (cell, &cell_size);nvmem_cell_put (cell);
@@ -1284,8 +1284,8 @@ static int nixge_probe(struct platform_device *pdev) ndev->max_mtu =NIXGE_JUMBO_MTU ; mac_addr =nixge_get_nvmem_address (&pdev->dev); -if (mac_addr &&is_valid_ether_addr (mac_addr)) { -ether_addr_copy (ndev->dev_addr, mac_addr); +if (!IS_ERR (mac_addr) &&is_valid_ether_addr (mac_addr)) { +eth_hw_addr_set (ndev, mac_addr);kfree (mac_addr); }else {eth_hw_addr_random (ndev);
drivers/net/ethernet/nxp/lpc_eth.c +1 -1
@@ -1349,7 +1349,7 @@ static int lpc_eth_drv_probe(struct platform_device *pdev)__lpc_get_mac (pldat, ndev->dev_addr);if (!is_valid_ether_addr (ndev->dev_addr)) { -of_get_mac_address (np, ndev->dev_addr); +of_get_ethdev_address (np, ndev); }if (!is_valid_ether_addr (ndev->dev_addr))eth_hw_addr_random (ndev);
drivers/net/ethernet/qlogic/qede/qede_filter.c +2 -2
@@ -557,7 +557,7 @@ void qede_force_mac(void *dev, u8 *mac, bool forced)return ; } -ether_addr_copy (edev->ndev->dev_addr, mac); +eth_hw_addr_set (edev->ndev, mac);__qede_unlock (edev); }
@@ -1101,7 +1101,7 @@ int qede_set_mac_addr(struct net_device *ndev, void *p) goto out; } -ether_addr_copy (ndev->dev_addr, addr->sa_data); +eth_hw_addr_set (ndev, addr->sa_data);DP_INFO (edev,"Setting device MAC to %pM\n" , addr->sa_data);if (edev->state !=QEDE_STATE_OPEN ) {
drivers/net/ethernet/qlogic/qede/qede_main.c +1 -1
@@ -843,7 +843,7 @@ static void qede_init_ndev(struct qede_dev *edev) ndev->max_mtu =QEDE_MAX_JUMBO_PACKET_SIZE ;/* Set network device HW mac */ -ether_addr_copy (edev->ndev->dev_addr, edev->dev_info.common.hw_mac); +eth_hw_addr_set (edev->ndev, edev->dev_info.common.hw_mac); ndev->mtu = edev->dev_info.common.mtu; }
drivers/net/ethernet/qualcomm/emac/emac.c +1 -1
@@ -550,7 +550,7 @@ static int emac_probe_resources(struct platform_device *pdev,/* get mac address */ if (device_get_mac_address (&pdev->dev, maddr,ETH_ALEN )) -ether_addr_copy (netdev->dev_addr, maddr); +eth_hw_addr_set (netdev, maddr);else eth_hw_addr_random (netdev);
drivers/net/ethernet/qualcomm/qca_spi.c +1 -1
@@ -967,7 +967,7 @@ qca_spi_probe(struct spi_device *spi)spi_set_drvdata (spi, qcaspi_devs); - ret =of_get_mac_address (spi->dev.of_node, qca->net_dev->dev_addr); + ret =of_get_ethdev_address (spi->dev.of_node, qca->net_dev);if (ret) {eth_hw_addr_random (qca->net_dev); dev_info(&spi->dev, "Using random MAC address: %pM\n",
drivers/net/ethernet/qualcomm/qca_uart.c +1 -1
@@ -347,7 +347,7 @@ static int qca_uart_probe(struct serdev_device *serdev)of_property_read_u32 (serdev->dev.of_node,"current-speed" , &speed); - ret =of_get_mac_address (serdev->dev.of_node, qca->net_dev->dev_addr); + ret =of_get_ethdev_address (serdev->dev.of_node, qca->net_dev);if (ret) {eth_hw_addr_random (qca->net_dev); dev_info(&serdev->dev, "Using random MAC address: %pM\n",
drivers/net/ethernet/renesas/ravb_main.c +1 -1
@@ -114,7 +114,7 @@ static void ravb_read_mac_address(struct device_node *np, {int ret; - ret =of_get_mac_address (np, ndev->dev_addr); + ret =of_get_ethdev_address (np, ndev);if (ret) {u32 mahr =ravb_read (ndev,MAHR );u32 malr =ravb_read (ndev,MALR );
drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c +1 -1
@@ -118,7 +118,7 @@ static int sxgbe_platform_probe(struct platform_device *pdev) }/* Get MAC address if available (DT) */ -of_get_mac_address (node, priv->dev->dev_addr); +of_get_ethdev_address (node, priv->dev);/* Get the TX/RX IRQ numbers */ for (i =0 , chan =1 ; i <SXGBE_TX_QUEUES ; i++) {
drivers/net/ethernet/sfc/ef10_sriov.c +1 -1
@@ -527,7 +527,7 @@ int efx_ef10_sriov_set_vf_mac(struct efx_nic *efx, int vf_i, u8 *mac) goto fail;if (vf->efx) -ether_addr_copy (vf->efx->net_dev->dev_addr, mac); +eth_hw_addr_set (vf->efx->net_dev, mac); }ether_addr_copy (vf->mac, mac);
drivers/net/ethernet/sfc/efx.c +1 -1
@@ -128,7 +128,7 @@ static int efx_probe_port(struct efx_nic *efx)return rc;/* Initialise MAC address to permanent address */ -ether_addr_copy (efx->net_dev->dev_addr, efx->net_dev->perm_addr); +eth_hw_addr_set (efx->net_dev, efx->net_dev->perm_addr);return 0 ; }
drivers/net/ethernet/sfc/efx_common.c +2 -2
@@ -181,11 +181,11 @@ int efx_set_mac_address(struct net_device *net_dev, void *data)/* save old address */ ether_addr_copy (old_addr, net_dev->dev_addr); -ether_addr_copy (net_dev->dev_addr, new_addr); +eth_hw_addr_set (net_dev, new_addr);if (efx->type->set_mac_address) { rc = efx->type->set_mac_address (efx);if (rc) { -ether_addr_copy (net_dev->dev_addr, old_addr); +eth_hw_addr_set (net_dev, old_addr);return rc; } }
drivers/net/ethernet/sfc/falcon/efx.c +3 -3
@@ -1044,7 +1044,7 @@ static int ef4_probe_port(struct ef4_nic *efx)return rc;/* Initialise MAC address to permanent address */ -ether_addr_copy (efx->net_dev->dev_addr, efx->net_dev->perm_addr); +eth_hw_addr_set (efx->net_dev, efx->net_dev->perm_addr);return 0 ; }
@@ -2162,11 +2162,11 @@ static int ef4_set_mac_address(struct net_device *net_dev, void *data)/* save old address */ ether_addr_copy (old_addr, net_dev->dev_addr); -ether_addr_copy (net_dev->dev_addr, new_addr); +eth_hw_addr_set (net_dev, new_addr);if (efx->type->set_mac_address) { rc = efx->type->set_mac_address (efx);if (rc) { -ether_addr_copy (net_dev->dev_addr, old_addr); +eth_hw_addr_set (net_dev, old_addr);return rc; } }
drivers/net/ethernet/socionext/netsec.c +1 -1
@@ -2041,7 +2041,7 @@ static int netsec_probe(struct platform_device *pdev) mac =device_get_mac_address (&pdev->dev, macbuf,sizeof (macbuf));if (mac) -ether_addr_copy (ndev->dev_addr, mac); +eth_hw_addr_set (ndev, mac);if (priv->eeprom_base && (!mac || !is_valid_ether_addr (ndev->dev_addr))) {
drivers/net/ethernet/socionext/sni_ave.c +1 -1
@@ -1601,7 +1601,7 @@ static int ave_probe(struct platform_device *pdev) ndev->max_mtu =AVE_MAX_ETHFRAME - (ETH_HLEN +ETH_FCS_LEN ); - ret =of_get_mac_address (np, ndev->dev_addr); + ret =of_get_ethdev_address (np, ndev);if (ret) {/* if the mac address is invalid, use random mac address */ eth_hw_addr_random (ndev);
drivers/net/ethernet/ti/am65-cpsw-nuss.c +1 -1
@@ -1981,7 +1981,7 @@ am65_cpsw_nuss_init_port_ndev(struct am65_cpsw_common *common, u32 port_idx) ndev_priv->msg_enable =AM65_CPSW_DEBUG ;SET_NETDEV_DEV (port->ndev, dev); -ether_addr_copy (port->ndev->dev_addr, port->slave.mac_addr); +eth_hw_addr_set (port->ndev, port->slave.mac_addr); port->ndev->min_mtu =AM65_CPSW_MIN_PACKET_SIZE ; port->ndev->max_mtu =AM65_CPSW_MAX_PACKET_SIZE ;
drivers/net/ethernet/ti/cpsw_ale.c +19 -5
@@ -104,23 +104,37 @@ struct cpsw_ale_dev_id {static inline int cpsw_ale_get_field (u32 *ale_entry,u32 start,u32 bits) { -int idx; +int idx, idx2; +u32 hi_val =0 ; idx = start /32 ; + idx2 = (start + bits -1 ) /32 ; +/* Check if bits to be fetched exceed a word */ +if (idx != idx2) { + idx2 =2 - idx2;/* flip */ + hi_val = ale_entry[idx2] << ((idx2 *32 ) - start); + } start -= idx *32 ; idx =2 - idx;/* flip */ -return (ale_entry[idx] >> start) &BITMASK (bits); +return (hi_val + (ale_entry[idx] >> start)) &BITMASK (bits); }static inline void cpsw_ale_set_field (u32 *ale_entry,u32 start,u32 bits,u32 value) { -int idx; +int idx, idx2; value &=BITMASK (bits); - idx = start /32 ; + idx = start /32 ; + idx2 = (start + bits -1 ) /32 ; +/* Check if bits to be set exceed a word */ +if (idx != idx2) { + idx2 =2 - idx2;/* flip */ + ale_entry[idx2] &= ~(BITMASK (bits + start - (idx2 *32 ))); + ale_entry[idx2] |= (value >> ((idx2 *32 ) - start)); + } start -= idx *32 ; - idx =2 - idx;/* flip */ + idx =2 - idx;/* flip */ ale_entry[idx] &= ~(BITMASK (bits) << start); ale_entry[idx] |= (value << start); }
drivers/net/ethernet/ti/cpsw_new.c +2 -2
@@ -1000,7 +1000,7 @@ static int cpsw_ndo_set_mac_address(struct net_device *ndev, void *p) flags, vid);ether_addr_copy (priv->mac_addr, addr->sa_data); -ether_addr_copy (ndev->dev_addr, priv->mac_addr); +eth_hw_addr_set (ndev, priv->mac_addr);cpsw_set_slave_mac (&cpsw->slaves[slave_no], priv);pm_runtime_put (cpsw->dev);
@@ -1404,7 +1404,7 @@ static int cpsw_create_ports(struct cpsw_common *cpsw)dev_info (cpsw->dev,"Random MACID = %pM\n" , priv->mac_addr); } -ether_addr_copy (ndev->dev_addr, slave_data->mac_addr); +eth_hw_addr_set (ndev, slave_data->mac_addr);ether_addr_copy (priv->mac_addr, slave_data->mac_addr); cpsw->slaves[i].ndev = ndev;
drivers/net/ethernet/ti/davinci_emac.c +1 -1
@@ -1911,7 +1911,7 @@ static int davinci_emac_probe(struct platform_device *pdev) rc =davinci_emac_try_get_mac (pdev, res_ctrl ?0 :1 , priv->mac_addr);if (!rc) -ether_addr_copy (ndev->dev_addr, priv->mac_addr); +eth_hw_addr_set (ndev, priv->mac_addr);if (!is_valid_ether_addr (priv->mac_addr)) {/* Use random MAC if still none obtained. */
drivers/net/ethernet/ti/netcp_core.c +2 -2
@@ -2028,14 +2028,14 @@ static int netcp_create_interface(struct netcp_device *netcp_device,emac_arch_get_mac_addr (efuse_mac_addr, efuse, efuse_mac);if (is_valid_ether_addr (efuse_mac_addr)) -ether_addr_copy (ndev->dev_addr, efuse_mac_addr); +eth_hw_addr_set (ndev, efuse_mac_addr);else eth_random_addr (ndev->dev_addr);devm_iounmap (dev, efuse);devm_release_mem_region (dev, res.start, size); }else { - ret =of_get_mac_address (node_interface, ndev->dev_addr); + ret =of_get_ethdev_address (node_interface, ndev);if (ret)eth_random_addr (ndev->dev_addr); }
drivers/net/ethernet/xilinx/xilinx_emaclite.c +1 -1
@@ -1151,7 +1151,7 @@ static int xemaclite_of_probe(struct platform_device *ofdev) lp->tx_ping_pong =get_bool (ofdev,"xlnx,tx-ping-pong" ); lp->rx_ping_pong =get_bool (ofdev,"xlnx,rx-ping-pong" ); - rc =of_get_mac_address (ofdev->dev.of_node, ndev->dev_addr); + rc =of_get_ethdev_address (ofdev->dev.of_node, ndev);if (rc) {dev_warn (dev,"No MAC address found, using random\n" );eth_hw_addr_random (ndev);
drivers/net/phy/phy_device.c +14 -7
@@ -3253,23 +3253,30 @@ static int __init phy_init(void) {int rc; +ethtool_set_ethtool_phy_ops (&phy_ethtool_phy_ops); + rc =mdio_bus_init ();if (rc) -return rc; + goto err_ethtool_phy_ops; -ethtool_set_ethtool_phy_ops (&phy_ethtool_phy_ops);features_init (); rc =phy_driver_register (&genphy_c45_driver,THIS_MODULE );if (rc) - goto err_c45; + goto err_mdio_bus; rc =phy_driver_register (&genphy_driver,THIS_MODULE ); -if (rc) { -phy_driver_unregister (&genphy_c45_driver); +if (rc) + goto err_c45; + +return 0 ; + err_c45: -mdio_bus_exit (); - } +phy_driver_unregister (&genphy_c45_driver); +err_mdio_bus: +mdio_bus_exit (); +err_ethtool_phy_ops: +ethtool_set_ethtool_phy_ops (NULL );return rc; }
drivers/pinctrl/pinctrl-amd.c +15 -13
@@ -189,18 +189,6 @@ static int amd_gpio_set_debounce(struct gpio_chip *gc, unsigned offset,return ret; } -static int amd_gpio_set_config (struct gpio_chip *gc,unsigned offset, -unsigned long config) -{ -u32 debounce; - -if (pinconf_to_config_param (config) !=PIN_CONFIG_INPUT_DEBOUNCE ) -return -ENOTSUPP ; - - debounce =pinconf_to_config_argument (config); -return amd_gpio_set_debounce (gc, offset, debounce); -} -#ifdef CONFIG_DEBUG_FS static void amd_gpio_dbg_show (struct seq_file *s,struct gpio_chip *gc) {
@@ -775,7 +763,7 @@ static int amd_pinconf_get(struct pinctrl_dev *pctldev, }static int amd_pinconf_set (struct pinctrl_dev *pctldev,unsigned int pin, -unsigned long *configs,unsigned num_configs) +unsigned long *configs,unsigned int num_configs) {int i;u32 arg;
@@ -865,6 +853,20 @@ static int amd_pinconf_group_set(struct pinctrl_dev *pctldev,return 0 ; } +static int amd_gpio_set_config (struct gpio_chip *gc,unsigned int pin, +unsigned long config) +{ +struct amd_gpio *gpio_dev =gpiochip_get_data (gc); + +if (pinconf_to_config_param (config) ==PIN_CONFIG_INPUT_DEBOUNCE ) { +u32 debounce =pinconf_to_config_argument (config); + +return amd_gpio_set_debounce (gc, pin, debounce); + } + +return amd_pinconf_set (gpio_dev->pctrl, pin, &config,1 ); +} +static const struct pinconf_ops amd_pinconf_ops = { .pin_config_get = amd_pinconf_get, .pin_config_set = amd_pinconf_set,
drivers/spi/spi-bcm63xx.c +1 -1
@@ -126,7 +126,7 @@ enum bcm63xx_regs_spi { SPI_MSG_DATA_SIZE, }; -#define BCM63XX_SPI_MAX_PREPEND 15 +#define BCM63XX_SPI_MAX_PREPEND 7#define BCM63XX_SPI_MAX_CS 8#define BCM63XX_SPI_BUS_NUM 0
drivers/video/fbdev/au1200fb.c +3 -0
@@ -1732,6 +1732,9 @@ static int au1200fb_drv_probe(struct platform_device *dev)/* Now hook interrupt too */ irq =platform_get_irq (dev,0 ); +if (irq <0 ) +return irq; + ret =request_irq (irq, au1200fb_handle_irq,IRQF_SHARED ,"lcd" , (void *)dev);if (ret) {
drivers/video/fbdev/imxfb.c +2 -2
@@ -602,10 +602,10 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *infif (var->hsync_len <1 || var->hsync_len >64 )printk (KERN_ERR "%s: invalid hsync_len %d\n" , info->fix.id, var->hsync_len); -if (var->left_margin >255 ) +if (var->left_margin <3 || var->left_margin >255 )printk (KERN_ERR "%s: invalid left_margin %d\n" , info->fix.id, var->left_margin); -if (var->right_margin >255 ) +if (var->right_margin <1 || var->right_margin >255 )printk (KERN_ERR "%s: invalid right_margin %d\n" , info->fix.id, var->right_margin);if (var->yres <1 || var->yres > ymax_mask)
fs/btrfs/block-group.c +1 -0
@@ -1855,6 +1855,7 @@ static int exclude_super_stripes(struct btrfs_block_group *cache)/* Shouldn't have super stripes in sequential zones */ if (zoned && nr) { +kfree (logical);btrfs_err (fs_info,"zoned: block group %llu must not contain super block" , cache->start);
fs/btrfs/qgroup.c +1 -0
@@ -4342,4 +4342,5 @@ void btrfs_qgroup_destroy_extent_records(struct btrfs_transaction *trans)ulist_free (entry->old_roots);kfree (entry); } + *root =RB_ROOT ; }
fs/ext4/xattr.c +14 -0
@@ -1732,6 +1732,20 @@ static int ext4_xattr_set_entry(struct ext4_xattr_info *i,memmove (here, (void *)here + size, (void *)last - (void *)here +sizeof (__u32));memset (last,0 , size); + +/* +* Update i_inline_off - moved ibody region might contain +* system.data attribute. Handling a failure here won't +* cause other complications for setting an xattr. +*/ +if (!is_block &&ext4_has_inline_data (inode)) { + ret =ext4_find_inline_data_nolock (inode); +if (ret) { +ext4_warning_inode (inode, +"unable to update i_inline_off" ); + goto out; + } + } }else if (s->not_found) {/* Insert new name. */ size_t size =EXT4_XATTR_LEN (name_len);
fs/fuse/dir.c +1 -1
@@ -249,7 +249,7 @@ static int fuse_dentry_revalidate(struct dentry *entry, unsigned int flags)spin_unlock (&fi->lock); }kfree (forget); -if (ret == -ENOMEM ) +if (ret == -ENOMEM || ret == -EINTR ) goto out;if (ret ||fuse_invalid_attr (&outarg.attr) ||fuse_stale_inode (inode, outarg.generation, &outarg.attr))
fs/fuse/ioctl.c +13 -8
@@ -9,14 +9,23 @@#include <linux/compat.h> #include <linux/fileattr.h> -static ssize_t fuse_send_ioctl (struct fuse_mount *fm,struct fuse_args *args) +static ssize_t fuse_send_ioctl (struct fuse_mount *fm,struct fuse_args *args, +struct fuse_ioctl_out *outarg) { -ssize_t ret =fuse_simple_request (fm, args); +ssize_t ret; + + args->out_args[0 ].size =sizeof (*outarg); + args->out_args[0 ].value = outarg; + + ret =fuse_simple_request (fm, args);/* Translate ENOSYS, which shouldn't be returned from fs */ if (ret == -ENOSYS ) ret = -ENOTTY ; +if (ret >=0 && outarg->result == -ENOSYS ) + outarg->result = -ENOTTY ; +return ret; }
@@ -264,13 +273,11 @@ long fuse_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg, } ap.args.out_numargs =2 ; - ap.args.out_args[0 ].size =sizeof (outarg); - ap.args.out_args[0 ].value = &outarg; ap.args.out_args[1 ].size = out_size; ap.args.out_pages = true; ap.args.out_argvar = true; - transferred =fuse_send_ioctl (fm, &ap.args); + transferred =fuse_send_ioctl (fm, &ap.args, &outarg); err = transferred;if (transferred <0 ) goto out;
@@ -399,12 +406,10 @@ static int fuse_priv_ioctl(struct inode *inode, struct fuse_file *ff, args.in_args[1 ].size = inarg.in_size; args.in_args[1 ].value = ptr; args.out_numargs =2 ; - args.out_args[0 ].size =sizeof (outarg); - args.out_args[0 ].value = &outarg; args.out_args[1 ].size = inarg.out_size; args.out_args[1 ].value = ptr; - err =fuse_send_ioctl (fm, &args); + err =fuse_send_ioctl (fm, &args, &outarg);if (!err) {if (outarg.result <0 ) err = outarg.result;
fs/jbd2/checkpoint.c +29 -73
135 lines not on this page · raw message
fs/jfs/jfs_dmap.c +3 -0
@@ -2027,6 +2027,9 @@ dbAllocDmapLev(struct bmap * bmp,if (dbFindLeaf ((dmtree_t *) & dp->tree, l2nb, &leafidx))return -ENOSPC ; +if (leafidx <0 ) +return -EIO ; +/* determine the block number within the file system corresponding * to the leaf at which free space was found. */
fs/jfs/jfs_txnmgr.c +5 -0
@@ -354,6 +354,11 @@ tid_t txBegin(struct super_block *sb, int flag)jfs_info ("txBegin: flag = 0x%x" , flag); log =JFS_SBI (sb)->log; +if (!log) { +jfs_error (sb,"read-only filesystem\n" ); +return 0 ; + } +TXN_LOCK ();INCREMENT (TxStat.txBegin);
fs/jfs/namei.c +5 -0
@@ -799,6 +799,11 @@ static int jfs_link(struct dentry *old_dentry,if (rc) goto out; +if (isReadOnly (ip)) { +jfs_error (ip->i_sb,"read-only filesystem\n" ); +return -EROFS ; + } + tid =txBegin (ip->i_sb,0 );mutex_lock_nested (&JFS_IP (dir)->commit_mutex,COMMIT_MUTEX_PARENT );
fs/quota/dquot.c +3 -2
@@ -555,7 +555,7 @@ static void invalidate_dquots(struct super_block *sb, int type)continue ;/* Wait for dquot users */ if (atomic_read (&dquot->dq_count)) { -dqgrab (dquot); +atomic_inc (&dquot->dq_count);spin_unlock (&dq_list_lock);/* * Once dqput() wakes us up, we know it's time to free
@@ -2413,7 +2413,8 @@ int dquot_load_quota_sb(struct super_block *sb, int type, int format_id, error =add_dquot_ref (sb, type);if (error) -dquot_disable (sb, type, flags); +dquot_disable (sb, type, +DQUOT_USAGE_ENABLED |DQUOT_LIMITS_ENABLED );return error; out_fmt:
fs/udf/unicode.c +1 -1
@@ -247,7 +247,7 @@ static int udf_name_from_CS0(struct super_block *sb, }if (translate) { -if (str_o_len <=2 && str_o[0 ] =='.' && +if (str_o_len >0 && str_o_len <=2 && str_o[0 ] =='.' && (str_o_len ==1 || str_o[1 ] =='.' )) needsCRC =1 ;if (needsCRC) {
include/linux/etherdevice.h +1 -1
@@ -323,7 +323,7 @@ static inline void eth_hw_addr_inherit(struct net_device *dst, struct net_device *src) { dst->addr_assign_type = src->addr_assign_type; -ether_addr_copy (dst->dev_addr, src->dev_addr); +eth_hw_addr_set (dst, src->dev_addr); }/**
include/linux/of_net.h +6 -0
@@ -14,6 +14,7 @@struct net_device ;extern int of_get_phy_mode (struct device_node *np,phy_interface_t *interface);extern int of_get_mac_address (struct device_node *np,u8 *mac); +int of_get_ethdev_address (struct device_node *np,struct net_device *dev);extern struct net_device *of_find_net_device_by_node (struct device_node *np);#else static inline int of_get_phy_mode(struct device_node *np,
@@ -27,6 +28,11 @@ static inline int of_get_mac_address(struct device_node *np, u8 *mac)return -ENODEV ; } +static inline int of_get_ethdev_address (struct device_node *np,struct net_device *dev) +{ +return -ENODEV ; +} +static inline struct net_device *of_find_net_device_by_node (struct device_node *np) {return NULL ;
include/linux/tcp.h +1 -1
@@ -473,7 +473,7 @@ static inline void fastopen_queue_tune(struct sock *sk, int backlog)struct request_sock_queue *queue = &inet_csk (sk)->icsk_accept_queue;int somaxconn =READ_ONCE (sock_net (sk)->core.sysctl_somaxconn); - queue->fastopenq.max_qlen = min_t(unsigned int, backlog, somaxconn); + WRITE_ONCE(queue->fastopenq.max_qlen, min_t(unsigned int, backlog, somaxconn)); } static inline void tcp_move_syn(struct tcp_sock *tp,
include/net/tcp.h +24 -7
@@ -1473,25 +1473,38 @@ void tcp_leave_memory_pressure(struct sock *sk);static inline int keepalive_intvl_when (const struct tcp_sock *tp) {struct net *net =sock_net ((struct sock *)tp); +int val; -return tp->keepalive_intvl ? : -READ_ONCE (net->ipv4.sysctl_tcp_keepalive_intvl); +/* Paired with WRITE_ONCE() in tcp_sock_set_keepintvl() +* and do_tcp_setsockopt(). +*/ + val =READ_ONCE (tp->keepalive_intvl); + +return val ? :READ_ONCE (net->ipv4.sysctl_tcp_keepalive_intvl); }static inline int keepalive_time_when (const struct tcp_sock *tp) {struct net *net =sock_net ((struct sock *)tp); +int val; -return tp->keepalive_time ? : -READ_ONCE (net->ipv4.sysctl_tcp_keepalive_time); +/* Paired with WRITE_ONCE() in tcp_sock_set_keepidle_locked() */ + val =READ_ONCE (tp->keepalive_time); + +return val ? :READ_ONCE (net->ipv4.sysctl_tcp_keepalive_time); }static inline int keepalive_probes (const struct tcp_sock *tp) {struct net *net =sock_net ((struct sock *)tp); +int val; -return tp->keepalive_probes ? : -READ_ONCE (net->ipv4.sysctl_tcp_keepalive_probes); +/* Paired with WRITE_ONCE() in tcp_sock_set_keepcnt() +* and do_tcp_setsockopt(). +*/ + val =READ_ONCE (tp->keepalive_probes); + +return val ? :READ_ONCE (net->ipv4.sysctl_tcp_keepalive_probes); }static inline u32 keepalive_time_elapsed (const struct tcp_sock *tp)
@@ -1999,7 +2012,11 @@ void __tcp_v4_send_check(struct sk_buff *skb, __be32 saddr, __be32 daddr);static inline u32 tcp_notsent_lowat (const struct tcp_sock *tp) {struct net *net =sock_net ((struct sock *)tp); -return tp->notsent_lowat ?:READ_ONCE (net->ipv4.sysctl_tcp_notsent_lowat); +u32 val; + + val =READ_ONCE (tp->notsent_lowat); + +return val ?:READ_ONCE (net->ipv4.sysctl_tcp_notsent_lowat); }bool tcp_stream_memory_free (const struct sock *sk,int wake);
kernel/bpf/verifier.c +6 -5
@@ -3744,7 +3744,7 @@ static int check_max_stack_depth(struct bpf_verifier_env *env) continue_func: subprog_end = subprog[idx +1 ].start;for (; i < subprog_end; i++) { -int next_insn; +int next_insn, sidx;if (!bpf_pseudo_call (insn + i) && !bpf_pseudo_func (insn + i))continue ;
@@ -3754,14 +3754,14 @@ static int check_max_stack_depth(struct bpf_verifier_env *env)/* find the callee */ next_insn = i + insn[i].imm +1 ; - idx =find_subprog (env, next_insn); -if (idx <0 ) { + sidx =find_subprog (env, next_insn); +if (sidx <0 ) {WARN_ONCE (1 ,"verifier bug. No program starts at insn %d\n" , next_insn);return -EFAULT ; } -if (subprog[idx].is_async_cb) { -if (subprog[idx].has_tail_call) { +if (subprog[sidx].is_async_cb) { +if (subprog[sidx].has_tail_call) {verbose (env,"verifier bug. subprog has tail_call and async cb\n" );return -EFAULT ; }
@@ -3770,6 +3770,7 @@ static int check_max_stack_depth(struct bpf_verifier_env *env)continue ; } i = next_insn; + idx = sidx;if (subprog[idx].has_tail_call) tail_call_reachable = true;
kernel/trace/trace_events_hist.c +2 -1
@@ -5949,7 +5949,8 @@ static int event_hist_trigger_func(struct event_command *cmd_ops, goto out_unreg;if (has_hist_vars (hist_data) || hist_data->n_var_refs) { -if (save_hist_vars (hist_data)) + ret =save_hist_vars (hist_data); +if (ret) goto out_unreg; }
net/bridge/br_stp_if.c +3 -0
@@ -201,6 +201,9 @@ int br_stp_set_enabled(struct net_bridge *br, unsigned long val, {ASSERT_RTNL (); +if (!net_eq (dev_net (br->dev), &init_net)) +NL_SET_ERR_MSG_MOD (extack,"STP does not work in non-root netns" ); +if (br_mrp_enabled (br)) {NL_SET_ERR_MSG_MOD (extack,"STP can't be enabled if MRP is already enabled" );
net/can/bcm.c +6 -6
@@ -1521,6 +1521,12 @@ static int bcm_release(struct socket *sock)lock_sock (sk); +#if IS_ENABLED (CONFIG_PROC_FS ) +/* remove procfs entry */ +if (net->can.bcmproc_dir && bo->bcm_proc_read) +remove_proc_entry (bo->procname, net->can.bcmproc_dir); +#endif /* CONFIG_PROC_FS */ +list_for_each_entry_safe (op, next, &bo->tx_ops, list)bcm_remove_op (op);
@@ -1556,12 +1562,6 @@ static int bcm_release(struct socket *sock)list_for_each_entry_safe (op, next, &bo->rx_ops, list)bcm_remove_op (op); -#if IS_ENABLED (CONFIG_PROC_FS ) -/* remove procfs entry */ -if (net->can.bcmproc_dir && bo->bcm_proc_read) -remove_proc_entry (bo->procname, net->can.bcmproc_dir); -#endif /* CONFIG_PROC_FS */ -/* remove device reference */ if (bo->bound) { bo->bound =0 ;
net/core/of_net.c +25 -0
@@ -143,3 +143,28 @@ int of_get_mac_address(struct device_node *np, u8 *addr)return of_get_mac_addr_nvmem (np, addr); }EXPORT_SYMBOL (of_get_mac_address); + +/** +* of_get_ethdev_address() +* @np: Caller's Device Node +* @dev: Pointer to netdevice which address will be updated +* +* Search the device tree for the best MAC address to use. +* If found set @dev->dev_addr to that address. +* +* See documentation of of_get_mac_address() for more information on how +* the best address is determined. +* +* Return: 0 on success and errno in case of error. +*/ +int of_get_ethdev_address (struct device_node *np,struct net_device *dev) +{ +u8 addr[ETH_ALEN ]; +int ret; + + ret =of_get_mac_address (np, addr); +if (!ret) +eth_hw_addr_set (dev, addr); +return ret; +} +EXPORT_SYMBOL (of_get_ethdev_address);
net/ipv4/esp4.c +1 -1
@@ -1133,7 +1133,7 @@ static int esp_init_authenc(struct xfrm_state *x) err =crypto_aead_setkey (aead, key, keylen); free_key: -kfree (key); +kfree_sensitive (key); error:return err;
net/ipv4/inet_connection_sock.c +1 -1
@@ -833,7 +833,7 @@ static void reqsk_timer_handler(struct timer_list *t) icsk =inet_csk (sk_listener); net =sock_net (sk_listener); - max_syn_ack_retries = icsk->icsk_syn_retries ? : + max_syn_ack_retries =READ_ONCE (icsk->icsk_syn_retries) ? :READ_ONCE (net->ipv4.sysctl_tcp_synack_retries);/* Normally all the openreqs are young and become mature * (i.e. converted to established socket) for first timeout.
net/ipv4/inet_hashtables.c +2 -15
@@ -571,20 +571,8 @@ bool inet_ehash_insert(struct sock *sk, struct sock *osk, bool *found_dup_sk)spin_lock (lock);if (osk) {WARN_ON_ONCE (sk->sk_hash != osk->sk_hash); - ret =sk_hashed (osk); -if (ret) { -/* Before deleting the node, we insert a new one to make -* sure that the look-up-sk process would not miss either -* of them and that at least one node would exist in ehash -* table all the time. Otherwise there's a tiny chance -* that lookup process could find nothing in ehash table. -*/ -__sk_nulls_add_node_tail_rcu (sk, list); -sk_nulls_del_node_init_rcu (osk); - } - goto unlock; - } -if (found_dup_sk) { + ret =sk_nulls_del_node_init_rcu (osk); + }else if (found_dup_sk) { *found_dup_sk =inet_ehash_lookup_by_sk (sk, list);if (*found_dup_sk) ret = false;
@@ -593,7 +581,6 @@ bool inet_ehash_insert(struct sock *sk, struct sock *osk, bool *found_dup_sk)if (ret)__sk_nulls_add_node_rcu (sk, list); -unlock:spin_unlock (lock);return ret;
net/ipv4/inet_timewait_sock.c +4 -4
@@ -81,10 +81,10 @@ void inet_twsk_put(struct inet_timewait_sock *tw) }EXPORT_SYMBOL_GPL (inet_twsk_put); -static void inet_twsk_add_node_tail_rcu (struct inet_timewait_sock *tw, -struct hlist_nulls_head *list) +static void inet_twsk_add_node_rcu (struct inet_timewait_sock *tw, +struct hlist_nulls_head *list) { -hlist_nulls_add_tail_rcu (&tw->tw_node, list); +hlist_nulls_add_head_rcu (&tw->tw_node, list); } static void inet_twsk_add_bind_node(struct inet_timewait_sock *tw,
@@ -120,7 +120,7 @@ void inet_twsk_hashdance(struct inet_timewait_sock *tw, struct sock *sk,spin_lock (lock); -inet_twsk_add_node_tail_rcu (tw, &ehead->chain); +inet_twsk_add_node_rcu (tw, &ehead->chain);/* Step 3: Remove SK from hash chain */ if (__sk_nulls_del_node_init_rcu (sk))
net/ipv4/tcp.c +28 -25
163 lines not on this page · raw message
net/ipv4/tcp_fastopen.c +4 -2
@@ -301,6 +301,7 @@ static struct sock *tcp_fastopen_create_child(struct sock *sk,static bool tcp_fastopen_queue_check (struct sock *sk) {struct fastopen_queue *fastopenq; +int max_qlen;/* Make sure the listener has enabled fastopen, and we don't * exceed the max # of pending TFO requests allowed before trying
@@ -313,10 +314,11 @@ static bool tcp_fastopen_queue_check(struct sock *sk)* temporarily vs a server not supporting Fast Open at all. */ fastopenq = &inet_csk (sk)->icsk_accept_queue.fastopenq; -if (fastopenq->max_qlen ==0 ) + max_qlen =READ_ONCE (fastopenq->max_qlen); +if (max_qlen ==0 )return false; -if (fastopenq->qlen >= fastopenq->max_qlen) { +if (fastopenq->qlen >= max_qlen) {struct request_sock *req1;spin_lock (&fastopenq->lock); req1 = fastopenq->rskq_rst_head;
net/ipv4/tcp_ipv4.c +1 -1
@@ -975,7 +975,7 @@ static void tcp_v4_reqsk_send_ack(const struct sock *sk, struct sk_buff *skb,tcp_rsk (req)->rcv_nxt, req->rsk_rcv_wnd >>inet_rsk (req)->rcv_wscale,tcp_time_stamp_raw () +tcp_rsk (req)->ts_off, - req->ts_recent, +READ_ONCE (req->ts_recent),0 ,tcp_md5_do_lookup (sk, l3index, addr,AF_INET ), inet_rsk(req)->no_srccheck ? IP_REPLY_ARG_NOSRCCHECK : 0,
net/ipv4/tcp_minisocks.c +6 -3
@@ -523,7 +523,7 @@ struct sock *tcp_create_openreq_child(const struct sock *sk, newtp->max_window = newtp->snd_wnd;if (newtp->rx_opt.tstamp_ok) { - newtp->rx_opt.ts_recent = req->ts_recent; + newtp->rx_opt.ts_recent =READ_ONCE (req->ts_recent); newtp->rx_opt.ts_recent_stamp =ktime_get_seconds (); newtp->tcp_header_len =sizeof (struct tcphdr ) +TCPOLEN_TSTAMP_ALIGNED ; }else {
@@ -586,7 +586,7 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb,tcp_parse_options (sock_net (sk), skb, &tmp_opt,0 ,NULL );if (tmp_opt.saw_tstamp) { - tmp_opt.ts_recent = req->ts_recent; + tmp_opt.ts_recent =READ_ONCE (req->ts_recent);if (tmp_opt.rcv_tsecr) tmp_opt.rcv_tsecr -=tcp_rsk (req)->ts_off;/* We do not store true stamp, but it is not required,
@@ -726,8 +726,11 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb,/* In sequence, PAWS is OK. */ +/* TODO: We probably should defer ts_recent change once +* we take ownership of @req. +*/ if (tmp_opt.saw_tstamp && !after (TCP_SKB_CB (skb)->seq,tcp_rsk (req)->rcv_nxt)) - req->ts_recent = tmp_opt.rcv_tsval; +WRITE_ONCE (req->ts_recent, tmp_opt.rcv_tsval);if (TCP_SKB_CB (skb)->seq ==tcp_rsk (req)->rcv_isn) {/* Truncate SYN, it is out of window starting
net/ipv4/tcp_output.c +1 -1
@@ -875,7 +875,7 @@ static unsigned int tcp_synack_options(const struct sock *sk,if (likely (ireq->tstamp_ok)) { opts->options |=OPTION_TS ; opts->tsval =tcp_skb_timestamp (skb) +tcp_rsk (req)->ts_off; - opts->tsecr = req->ts_recent; + opts->tsecr =READ_ONCE (req->ts_recent); remaining -=TCPOLEN_TSTAMP_ALIGNED ; }if (likely (ireq->sack_ok)) {
net/ipv6/ip6_gre.c +2 -1
@@ -955,7 +955,8 @@ static netdev_tx_t ip6erspan_tunnel_xmit(struct sk_buff *skb, goto tx_err;if (skb->len > dev->mtu + dev->hard_header_len) { -pskb_trim (skb, dev->mtu + dev->hard_header_len); +if (pskb_trim (skb, dev->mtu + dev->hard_header_len)) + goto tx_err; truncate = true; }
net/ipv6/tcp_ipv6.c +1 -1
@@ -1171,7 +1171,7 @@ static void tcp_v6_reqsk_send_ack(const struct sock *sk, struct sk_buff *skb,tcp_rsk (req)->rcv_nxt, req->rsk_rcv_wnd >>inet_rsk (req)->rcv_wscale,tcp_time_stamp_raw () +tcp_rsk (req)->ts_off, - req->ts_recent, sk->sk_bound_dev_if, +READ_ONCE (req->ts_recent), sk->sk_bound_dev_if,tcp_v6_md5_do_lookup (sk, &ipv6_hdr (skb)->saddr, l3index), ipv6_get_dsfield(ipv6_hdr(skb)), 0, sk->sk_priority); }
net/llc/llc_input.c +0 -3
@@ -163,9 +163,6 @@ int llc_rcv(struct sk_buff *skb, struct net_device *dev,void (*sta_handler)(struct sk_buff *skb);void (*sap_handler)(struct llc_sap *sap,struct sk_buff *skb); -if (!net_eq (dev_net (dev), &init_net)) - goto drop; -/* * When the interface is in promisc. mode, drop all the crap that it * receives, do not try to analyse it.
net/netfilter/nf_tables_api.c +8 -0
@@ -3795,6 +3795,8 @@ static int nf_tables_delrule(struct sk_buff *skb, const struct nfnl_info *info,list_for_each_entry (chain, &table->chains, list) {if (!nft_is_active_next (net, chain))continue ; +if (nft_chain_is_bound (chain)) +continue ; ctx.chain = chain; err =nft_delrule_by_chain (&ctx);
@@ -9908,6 +9910,9 @@ static int nft_verdict_init(const struct nft_ctx *ctx, struct nft_data *data,if (!tb[NFTA_VERDICT_CODE ])return -EINVAL ; + +/* zero padding hole for memcmp */ +memset (data,0 ,sizeof (*data)); data->verdict.code =ntohl (nla_get_be32 (tb[NFTA_VERDICT_CODE ]));switch (data->verdict.code) {
@@ -10189,6 +10194,9 @@ static void __nft_release_table(struct net *net, struct nft_table *table) ctx.family = table->family; ctx.table = table;list_for_each_entry (chain, &table->chains, list) { +if (nft_chain_is_bound (chain)) +continue ; + ctx.chain = chain;list_for_each_entry_safe (rule, nr, &chain->rules, list) {list_del (&rule->list);
net/netfilter/nft_set_pipapo.c +5 -1
@@ -1930,7 +1930,11 @@ static void nft_pipapo_remove(const struct net *net, const struct nft_set *set,int i, start, rules_fx; match_start = data; - match_end = (const u8 *)nft_set_ext_key_end (&e->ext)->data; + +if (nft_set_ext_exists (&e->ext,NFT_SET_EXT_KEY_END )) + match_end = (const u8 *)nft_set_ext_key_end (&e->ext)->data; +else + match_end = data; start = first_rule; rules_fx = rules_f0;
net/sched/cls_bpf.c +47 -52
129 lines not on this page · raw message
security/keys/request_key.c +24 -11
@@ -401,17 +401,21 @@ static int construct_alloc_key(struct keyring_search_context *ctx,set_bit (KEY_FLAG_USER_CONSTRUCT , &key->flags);if (dest_keyring) { - ret =__key_link_lock (dest_keyring, &ctx->index_key); + ret =__key_link_lock (dest_keyring, &key->index_key);if (ret <0 ) goto link_lock_failed; - ret =__key_link_begin (dest_keyring, &ctx->index_key, &edit); -if (ret <0 ) - goto link_prealloc_failed; } -/* attach the key to the destination keyring under lock, but we do need +/* +* Attach the key to the destination keyring under lock, but we do need * to do another check just in case someone beat us to it whilst we -* waited for locks */ +* waited for locks. +* +* The caller might specify a comparison function which looks for keys +* that do not exactly match but are still equivalent from the caller's +* perspective. The __key_link_begin() operation must be done only after +* an actual key is determined. +*/ mutex_lock (&key_construction_mutex);rcu_read_lock ();
@@ -420,12 +424,16 @@ static int construct_alloc_key(struct keyring_search_context *ctx,if (!IS_ERR (key_ref)) goto key_already_present; -if (dest_keyring) +if (dest_keyring) { + ret =__key_link_begin (dest_keyring, &key->index_key, &edit); +if (ret <0 ) + goto link_alloc_failed;__key_link (dest_keyring, key, &edit); + }mutex_unlock (&key_construction_mutex);if (dest_keyring) -__key_link_end (dest_keyring, &ctx->index_key, edit); +__key_link_end (dest_keyring, &key->index_key, edit);mutex_unlock (&user->cons_lock); *_key = key;kleave (" = 0 [%d]" ,key_serial (key));
@@ -438,10 +446,13 @@ static int construct_alloc_key(struct keyring_search_context *ctx,mutex_unlock (&key_construction_mutex); key =key_ref_to_ptr (key_ref);if (dest_keyring) { + ret =__key_link_begin (dest_keyring, &key->index_key, &edit); +if (ret <0 ) + goto link_alloc_failed_unlocked; ret =__key_link_check_live_key (dest_keyring, key);if (ret ==0 )__key_link (dest_keyring, key, &edit); -__key_link_end (dest_keyring, &ctx->index_key, edit); +__key_link_end (dest_keyring, &key->index_key, edit);if (ret <0 ) goto link_check_failed; }
@@ -456,8 +467,10 @@ static int construct_alloc_key(struct keyring_search_context *ctx,kleave (" = %d [linkcheck]" , ret);return ret; -link_prealloc_failed: -__key_link_end (dest_keyring, &ctx->index_key, edit); +link_alloc_failed: +mutex_unlock (&key_construction_mutex); +link_alloc_failed_unlocked: +__key_link_end (dest_keyring, &key->index_key, edit); link_lock_failed:mutex_unlock (&user->cons_lock);key_put (key);
security/keys/trusted-keys/trusted_tpm2.c +1 -1
@@ -186,7 +186,7 @@ int tpm2_key_priv(void *context, size_t hdrlen, }/** -* tpm_buf_append_auth() - append TPMS_AUTH_COMMAND to the buffer. +* tpm2_buf_append_auth() - append TPMS_AUTH_COMMAND to the buffer. * * @buf: an allocated tpm_buf instance * @session_handle: session handle
sound/pci/emu10k1/emufx.c +9 -103
125 lines not on this page · raw message
sound/pci/hda/patch_realtek.c +27 -2
@@ -120,6 +120,7 @@ struct alc_spec { unsigned int ultra_low_power:1; unsigned int has_hs_key:1; unsigned int no_internal_mic_pin:1; + unsigned int en_3kpull_low:1;/* for PLL fix */ hda_nid_t pll_nid;
@@ -3616,6 +3617,7 @@ static void alc256_shutup(struct hda_codec *codec)if (!hp_pin) hp_pin =0x21 ; +alc_update_coefex_idx (codec,0x57 ,0x04 ,0x0007 ,0x1 );/* Low power */ hp_pin_sense =snd_hda_jack_detect (codec, hp_pin);if (hp_pin_sense)
@@ -3632,8 +3634,7 @@ static void alc256_shutup(struct hda_codec *codec)/* If disable 3k pulldown control for alc257, the Mic detection will not work correctly * when booting with headset plugged. So skip setting it for the codec alc257 */ -if (codec->core.vendor_id !=0x10ec0236 && - codec->core.vendor_id !=0x10ec0257 ) +if (spec->en_3kpull_low)alc_update_coef_idx (codec,0x46 ,0 ,3 <<12 );if (!spec->no_shutup_pins)
@@ -4616,6 +4617,21 @@ static void alc236_fixup_hp_mute_led_coefbit(struct hda_codec *codec, } } +static void alc236_fixup_hp_mute_led_coefbit2 (struct hda_codec *codec, +const struct hda_fixup *fix,int action) +{ +struct alc_spec *spec = codec->spec; + +if (action ==HDA_FIXUP_ACT_PRE_PROBE ) { + spec->mute_led_polarity =0 ; + spec->mute_led_coef.idx =0x07 ; + spec->mute_led_coef.mask =1 ; + spec->mute_led_coef.on =1 ; + spec->mute_led_coef.off =0 ; +snd_hda_gen_add_mute_led_cdev (codec, coef_mute_led_set); + } +} +/* turn on/off mic-mute LED per capture hook by coef bit */ static int coef_micmute_led_set (struct led_classdev *led_cdev,enum led_brightness brightness)
@@ -6934,6 +6950,7 @@ enum {ALC285_FIXUP_HP_GPIO_LED ,ALC285_FIXUP_HP_MUTE_LED ,ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED , +ALC236_FIXUP_HP_MUTE_LED_COEFBIT2 ,ALC236_FIXUP_HP_GPIO_LED ,ALC236_FIXUP_HP_MUTE_LED , ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF,
@@ -8307,6 +8324,10 @@ static const struct hda_fixup alc269_fixups[] = { .type = HDA_FIXUP_FUNC, .v.func = alc285_fixup_hp_spectre_x360_mute_led, }, + [ALC236_FIXUP_HP_MUTE_LED_COEFBIT2] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc236_fixup_hp_mute_led_coefbit2, + }, [ALC236_FIXUP_HP_GPIO_LED] = { .type = HDA_FIXUP_FUNC, .v.func = alc236_fixup_hp_gpio_led,
@@ -9067,6 +9088,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x103c ,0x886d ,"HP ZBook Fury 17.3 Inch G8 Mobile Workstation PC" ,ALC285_FIXUP_HP_GPIO_AMP_INIT ),SND_PCI_QUIRK (0x103c ,0x8870 ,"HP ZBook Fury 15.6 Inch G8 Mobile Workstation PC" ,ALC285_FIXUP_HP_GPIO_AMP_INIT ),SND_PCI_QUIRK (0x103c ,0x8873 ,"HP ZBook Studio 15.6 Inch G8 Mobile Workstation PC" ,ALC285_FIXUP_HP_GPIO_AMP_INIT ), +SND_PCI_QUIRK (0x103c ,0x887a ,"HP Laptop 15s-eq2xxx" ,ALC236_FIXUP_HP_MUTE_LED_COEFBIT2 ),SND_PCI_QUIRK (0x103c ,0x888d ,"HP ZBook Power 15.6 inch G8 Mobile Workstation PC" ,ALC236_FIXUP_HP_GPIO_LED ),SND_PCI_QUIRK (0x103c ,0x8895 ,"HP EliteBook 855 G8 Notebook PC" ,ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED ), SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED),
@@ -9206,6 +9228,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x1558 ,0x5157 ,"Clevo W517GU1" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1558 ,0x51a1 ,"Clevo NS50MU" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1558 ,0x51b1 ,"Clevo NS50AU" ,ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x51b3 ,"Clevo NS70AU" ,ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1558 ,0x5630 ,"Clevo NP50RNJS" ,ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1558 ,0x70a1 ,"Clevo NB70T[HJK]" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), SND_PCI_QUIRK(0x1558, 0x70b3, "Clevo NK70SB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
@@ -10146,6 +10169,8 @@ static int patch_alc269(struct hda_codec *codec) spec->shutup = alc256_shutup; spec->init_hook = alc256_init; spec->gen.mixer_nid =0 ;/* ALC256 does not have any loopback mixer path */ +if (codec->bus->pci->vendor ==PCI_VENDOR_ID_AMD ) + spec->en_3kpull_low = true;break ;case 0x10ec0257 : spec->codec_variant =ALC269_TYPE_ALC257 ;
sound/soc/codecs/wcd-mbhc-v2.c +41 -16
118 lines not on this page · raw message
sound/soc/codecs/wcd934x.c +12 -0
@@ -3044,6 +3044,17 @@ static int wcd934x_mbhc_init(struct snd_soc_component *component)return 0 ; } + +static void wcd934x_mbhc_deinit (struct snd_soc_component *component) +{ +struct wcd934x_codec *wcd =snd_soc_component_get_drvdata (component); + +if (!wcd->mbhc) +return ; + +wcd_mbhc_deinit (wcd->mbhc); +} +static int wcd934x_comp_probe (struct snd_soc_component *component) {struct wcd934x_codec *wcd =dev_get_drvdata (component->dev);
@@ -3077,6 +3088,7 @@ static void wcd934x_comp_remove(struct snd_soc_component *comp) {struct wcd934x_codec *wcd =dev_get_drvdata (comp->dev); +wcd934x_mbhc_deinit (comp);wcd_clsh_ctrl_free (wcd->clsh_ctrl); }
sound/soc/codecs/wcd938x.c +69 -7
155 lines not on this page · raw message
sound/soc/fsl/fsl_sai.c +1 -1
@@ -560,7 +560,7 @@ static void fsl_sai_config_disable(struct fsl_sai *sai, int dir)u32 xcsr, count =100 ;regmap_update_bits (sai->regmap,FSL_SAI_xCSR (tx, ofs), -FSL_SAI_CSR_TERE ,0 ); +FSL_SAI_CSR_TERE |FSL_SAI_CSR_BCE ,0 );/* TERE will remain set till the end of current frame */ do {
sound/soc/fsl/fsl_sai.h +1 -0
@@ -87,6 +87,7 @@/* SAI Transmit/Receive Control Register */ #define FSL_SAI_CSR_TERE BIT(31)#define FSL_SAI_CSR_SE BIT(30) +#define FSL_SAI_CSR_BCE BIT(28)#define FSL_SAI_CSR_FR BIT(25)#define FSL_SAI_CSR_SR BIT(24)#define FSL_SAI_CSR_xF_SHIFT 16
tools/perf/Makefile.config +2 -2
@@ -143,9 +143,9 @@ FEATURE_CHECK_LDFLAGS-libcrypto = -lcrypto ifdef CSINCLUDES LIBOPENCSD_CFLAGS := -I$(CSINCLUDES) endif -OPENCSDLIBS := -lopencsd_c_api +OPENCSDLIBS := -lopencsd_c_api -lopencsd ifeq ($(findstring -static,${LDFLAGS}),-static) - OPENCSDLIBS += -lopencsd -lstdc++ + OPENCSDLIBS += -lstdc++ endif ifdef CSLIBS LIBOPENCSD_LDFLAGS := -L$(CSLIBS)
tools/perf/tests/shell/test_uprobe_from_different_cu.sh new file +77 -0
77 lines not on this page · raw message
tools/testing/selftests/tc-testing/config +2 -0
@@ -5,6 +5,8 @@ CONFIG_NF_CONNTRACK=m CONFIG_NF_CONNTRACK_MARK=y CONFIG_NF_CONNTRACK_ZONES=y CONFIG_NF_CONNTRACK_LABELS=y +CONFIG_NF_CONNTRACK_PROCFS=y +CONFIG_NF_FLOW_TABLE=m CONFIG_NF_NAT=m CONFIG_NET_SCHED=y
tools/testing/selftests/tc-testing/settings new file +1 -0
@@ -0,0 +1 @@ +timeout=900