Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
515dc63
workqueue: Kick a worker based on the actual activation of delayed works
yeyunfeng-dev Nov 19, 2020
5f9c3d6
scsi: ufs: Fix wrong print message in dev_err()
beanhuo Dec 7, 2020
4ae3573
scsi: ufs-pci: Ensure UFS device is in PowerDown mode for suspend-to-…
ahunter6 Dec 7, 2020
eb3e975
scsi: ide: Do not set the RQF_PREEMPT flag for sense requests
bvanassche Dec 9, 2020
19e0cf8
scsi: scsi_transport_spi: Set RQF_PM for domain validation commands
bvanassche Dec 9, 2020
663a0bc
lib/genalloc: fix the overflow when size is too big
Dec 29, 2020
59b10c8
depmod: handle the case of /sbin/depmod without /sbin in PATH
torvalds Dec 28, 2020
d2942e9
proc: change ->nlink under proc_subdir_lock
Dec 5, 2019
9ea03f6
proc: fix lookup in /proc/net subdirectories after setns(2)
Dec 16, 2020
6aba31a
i40e: Fix Error I40E_AQ_RC_EINVAL when removing VFs
sylwesterdziedziuch Oct 22, 2020
a5a6dc4
iavf: fix double-release of rtnl_lock
kuba-moo Dec 3, 2020
73445f2
net: mvpp2: Add TCAM entry to drop flow control pause frames
stefanchulski Dec 17, 2020
8dd98d5
net: mvpp2: prs: fix PPPoE with ipv6 packet parse
stefanchulski Dec 17, 2020
af99cae
net: systemport: set dev->max_mtu to UMAC_MAX_MTU_SIZE
ffainelli Dec 18, 2020
c2ca14c
ethernet: ucc_geth: fix use-after-free in ucc_geth_remove()
Dec 18, 2020
2a006b4
ethernet: ucc_geth: set dev->max_mtu to 1518
Dec 18, 2020
8548c96
atm: idt77252: call pci_disable_device() on error path
Dec 19, 2020
3d16088
net: mvpp2: Fix GoP port 3 Networking Complex Control configurations
stefanchulski Dec 20, 2020
6d003fe
ibmvnic: continue fatal error reset after passive init
Dec 19, 2020
8009f6b
net: ethernet: mvneta: Fix error handling in mvneta_probe
dinghaoliu Dec 20, 2020
5404192
qede: fix offload for IPIP tunnel packets
manishc88 Dec 21, 2020
dffef99
virtio_net: Fix recursive call to cpus_read_lock()
jdike Dec 23, 2020
56dc790
net/ncsi: Use real net-device for response handler
Dec 23, 2020
e43ec45
net: ethernet: Fix memleak in ethoc_probe
dinghaoliu Dec 23, 2020
fb14db9
net-sysfs: take the rtnl lock when storing xps_cpus
atenart Dec 23, 2020
67ed54a
net-sysfs: take the rtnl lock when accessing xps_cpus_map and num_tc
atenart Dec 23, 2020
1f6b04a
net-sysfs: take the rtnl lock when storing xps_rxqs
atenart Dec 23, 2020
8602c20
net-sysfs: take the rtnl lock when accessing xps_rxqs_map and num_tc
atenart Dec 23, 2020
c076e11
net: ethernet: ti: cpts: fix ethtool output when no ptp_clock registered
grygoriyS Dec 24, 2020
443a710
tun: fix return value when the number of iovs exceeds MAX_SKB_FRAGS
wyjwang Dec 25, 2020
a018c07
net: mvpp2: fix pkt coalescing int-threshold configuration
stefanchulski Dec 23, 2020
b16f883
ipv4: Ignore ECN bits for fib lookups in fib_compute_spec_dst()
Dec 24, 2020
e40b5fc
net: sched: prevent invalid Scell_log shift count
rddunlap Dec 25, 2020
606f541
net: hns: fix return value check in __lb_other_process()
wyjwang Dec 26, 2020
2b8aa89
erspan: fix version 1 check in gre_parse_header()
Dec 26, 2020
106ca9c
net: hdlc_ppp: Fix issues when mod_timer is called while timer is run…
Dec 28, 2020
07f26fc
r8169: work around power-saving bug on some chip versions
hkallweit Dec 30, 2020
c088301
net: dsa: lantiq_gswip: Enable GSWIP_MII_CFG_EN also for internal PHYs
xdarklight Jan 3, 2021
171a2bc
net: dsa: lantiq_gswip: Fix GSWIP_MII_CFG(p) register access
xdarklight Jan 3, 2021
12ab7b6
CDC-NCM: remove "connected" log message
rolandd Dec 24, 2020
8f64957
net: usb: qmi_wwan: add Quectel EM160R-GL
bmork Dec 30, 2020
5c6eb88
vhost_net: fix ubuf refcount incorrectly when sendmsg fails
wyjwang Dec 29, 2020
c41ea30
ionic: account for vlan tag len in rx buffer len
emusln Dec 18, 2020
3f2a289
net/sched: sch_taprio: ensure to reset/destroy all child qdiscs
dcaratti Dec 17, 2020
3417067
kbuild: don't hardcode depmod path
martinetd Dec 1, 2020
84d4887
Bluetooth: revert: hci_h5: close serdev device and free hu in h5_close
jwrdegoede Nov 22, 2020
9e60056
video: hyperv_fb: Fix the mmap() regression for v5.4.y and older
dcui Jan 9, 2021
ff7397a
crypto: ecdh - avoid buffer overflow in ecdh_set_secret()
ardbiesheuvel Jan 2, 2021
867c10a
crypto: asym_tpm: correct zero out potential secrets
gregkh Dec 4, 2020
c511f27
powerpc: Handle .text.{hot,unlikely}.* in linker script
nathanchance Jan 4, 2021
70cf59b
staging: mt7621-dma: Fix a resource leak in an error handling path
tititiou36 Dec 13, 2020
eeae1d9
usb: gadget: enable super speed plus
cth2996 Jan 6, 2021
5445502
USB: cdc-acm: blacklist another IR Droid device
seanyoung Dec 27, 2020
5b8e1be
USB: cdc-wdm: Fix use after free in service_outstanding_interrupt().
Dec 19, 2020
a37a066
usb: dwc3: ulpi: Use VStsDone to detect PHY regs access completion
fancer Dec 10, 2020
ea472d8
usb: chipidea: ci_hdrc_imx: add missing put_device() call in usbmisc_…
YuKuai-huawei Nov 17, 2020
f7cc27e
USB: xhci: fix U1/U2 handling for hardware with XHCI_INTEL_HOST quirk…
mgrzeschik Dec 15, 2020
a7b81d0
usb: usbip: vhci_hcd: protect shift size
rddunlap Dec 29, 2020
8a051ea
usb: uas: Add PNY USB Portable SSD to unusual_uas
Jan 5, 2021
ac48b1d
USB: serial: iuu_phoenix: fix DMA from stack
jhovold Jan 4, 2021
1a59feb
USB: serial: option: add LongSung M5710 module support
fifteenhex Dec 27, 2020
175f7a5
USB: serial: option: add Quectel EM160R-GL
bmork Dec 30, 2020
41f15da
USB: yurex: fix control-URB timeout handling
jhovold Dec 14, 2020
5c263f1
USB: usblp: fix DMA to stack
jhovold Jan 4, 2021
77a804d
ALSA: usb-audio: Fix UBSAN warnings for MIDI jacks
tiwai Dec 23, 2020
7ac84fa
usb: gadget: select CONFIG_CRC32
arndb Jan 3, 2021
692ab07
usb: gadget: f_uac2: reset wMaxPacketSize
jbrun3t Dec 21, 2020
b89a5f3
usb: gadget: function: printer: Fix a memory leak for interface descr…
Zqiang1211 Dec 10, 2020
7f875ea
usb: gadget: u_ether: Fix MTU size mismatch with RX packet size
mnarani Nov 17, 2020
ce507b5
USB: gadget: legacy: fix return error code in acm_ms_bind()
Nov 17, 2020
b2bd36f
usb: gadget: Fix spinlock lockup on usb_function_deactivate
Dec 2, 2020
2768282
usb: gadget: configfs: Preserve function ordering after bind failure
Dec 29, 2020
bcffe2d
usb: gadget: configfs: Fix use-after-free issue with udc_name
Dec 29, 2020
d3e5db4
USB: serial: keyspan_pda: remove unused variable
jhovold Jan 8, 2021
10dcb79
x86/mm: Fix leak of pmd ptlock
djbw Dec 3, 2020
a5c7a45
kvm: check tlbs_dirty directly
Dec 17, 2020
1219444
ALSA: hda/via: Fix runtime PM for Clevo W35xSS
tiwai Jan 4, 2021
30fd977
ALSA: hda/conexant: add a new hda codec CX11970
Dec 29, 2020
d63a96f
ALSA: hda/realtek - Fix speaker volume control on Lenovo C940
KailangYang Oct 23, 2020
02e5969
ALSA: hda/realtek: Enable mute and micmute LED on HP EliteBook 850 G7
khfeng Dec 30, 2020
0cb0b87
ALSA: hda/realtek: Add two "Intel Reference board" SSID in the ALC256.
Dec 31, 2020
64d06c7
btrfs: send: fix wrong file path when there is an inode with a pendin…
fdmanana Dec 10, 2020
284be2b
Revert "device property: Keep secondary firmware node secondary by type"
bardliao Jan 5, 2021
ef8133b
dmabuf: fix use-after-free of dmabuf's file->f_inode
Jan 5, 2021
828f2a2
drm/i915: clear the gpu reloc batch
matt-auld Dec 24, 2020
e0281bb
netfilter: x_tables: Update remaining dereference to RCU
Dec 17, 2020
1dd6a79
netfilter: ipset: fix shift-out-of-bounds in htable_bits()
vaverin Dec 17, 2020
5e401ea
netfilter: xt_RATEEST: reject non-null terminated string from userspace
Dec 22, 2020
a798b36
netfilter: nft_dynset: report EOPNOTSUPP on missing set feature
ummakynes Dec 27, 2020
a9d49da
x86/mtrr: Correct the range check before performing MTRR type lookups
zzgodgundam Dec 15, 2020
7795afa
KVM: x86: fix shift out of bounds reported by UBSAN
bonzini Dec 22, 2020
485e217
scsi: target: Fix XCOPY NAA identifier lookup
ddiss Nov 3, 2020
a829146
Linux 5.4.89
gregkh Jan 12, 2021
761cab5
Merge tag 'v5.4.89' into 5.4-2.2.x-imx
zandrey Jan 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 4
SUBLEVEL = 88
SUBLEVEL = 89
EXTRAVERSION =
NAME = Kleptomaniac Octopus

Expand Down Expand Up @@ -436,7 +436,7 @@ LEX = flex
YACC = bison
AWK = awk
INSTALLKERNEL := installkernel
DEPMOD = /sbin/depmod
DEPMOD = depmod
PERL = perl
PYTHON = python
PYTHON3 = python3
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions arch/x86/kernel/cpu/mtrr/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kvm/mmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions arch/x86/mm/pgtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion crypto/asymmetric_keys/asym_tpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion crypto/ecdh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, &params) < 0)
if (crypto_ecdh_decode_key(buf, len, &params) < 0 ||
params.key_size > sizeof(ctx->private_key))
return -EINVAL;

ndigits = ecdh_supported_curve(params.curve_id);
Expand Down
2 changes: 1 addition & 1 deletion drivers/atm/idt77252.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/base/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3456,7 +3456,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;
}
Expand Down
8 changes: 2 additions & 6 deletions drivers/bluetooth/hci_h5.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
21 changes: 17 additions & 4 deletions drivers/dma-buf/dma-buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,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);

Expand All @@ -89,6 +85,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,
Expand Down Expand Up @@ -444,6 +456,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,
Expand Down
4 changes: 3 additions & 1 deletion drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion drivers/ide/ide-atapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 0 additions & 5 deletions drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down
27 changes: 7 additions & 20 deletions drivers/net/dsa/lantiq_gswip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/broadcom/bcmsysport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/ethernet/ethoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/ethernet/freescale/ucc_geth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
4 changes: 4 additions & 0 deletions drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions drivers/net/ethernet/ibm/ibmvnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/ethernet/intel/i40e/i40e.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 {
Expand Down
10 changes: 10 additions & 0 deletions drivers/net/ethernet/intel/i40e/i40e_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
4 changes: 1 addition & 3 deletions drivers/net/ethernet/intel/iavf/iavf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading