Skip to content

Commit e76d21c

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Fix off by one wrt. indexing when dumping /proc/net/route entries, from Alexander Duyck. 2) Fix lockdep splats in iwlwifi, from Johannes Berg. 3) Cure panic when inserting certain netfilter rules when NFT_SET_HASH is disabled, from Liping Zhang. 4) Memory leak when nft_expr_clone() fails, also from Liping Zhang. 5) Disable UFO when path will apply IPSEC tranformations, from Jakub Sitnicki. 6) Don't bogusly double cwnd in dctcp module, from Florian Westphal. 7) skb_checksum_help() should never actually use the value "0" for the resulting checksum, that has a special meaning, use CSUM_MANGLED_0 instead. From Eric Dumazet. 8) Per-tx/rx queue statistic strings are wrong in qed driver, fix from Yuval MIntz. 9) Fix SCTP reference counting of associations and transports in sctp_diag. From Xin Long. 10) When we hit ip6tunnel_xmit() we could have come from an ipv4 path in a previous layer or similar, so explicitly clear the ipv6 control block in the skb. From Eli Cooper. 11) Fix bogus sleeping inside of inet_wait_for_connect(), from WANG Cong. 12) Correct deivce ID of T6 adapter in cxgb4 driver, from Hariprasad Shenai. 13) Fix potential access past the end of the skb page frag array in tcp_sendmsg(). From Eric Dumazet. 14) 'skb' can legitimately be NULL in inet{,6}_exact_dif_match(). Fix from David Ahern. 15) Don't return an error in tcp_sendmsg() if we wronte any bytes successfully, from Eric Dumazet. 16) Extraneous unlocks in netlink_diag_dump(), we removed the locking but forgot to purge these unlock calls. From Eric Dumazet. 17) Fix memory leak in error path of __genl_register_family(). We leak the attrbuf, from WANG Cong. 18) cgroupstats netlink policy table is mis-sized, from WANG Cong. 19) Several XDP bug fixes in mlx5, from Saeed Mahameed. 20) Fix several device refcount leaks in network drivers, from Johan Hovold. 21) icmp6_send() should use skb dst device not skb->dev to determine L3 routing domain. From David Ahern. 22) ip_vs_genl_family sets maxattr incorrectly, from WANG Cong. 23) We leak new macvlan port in some cases of maclan_common_netlink() errors. Fix from Gao Feng. 24) Similar to the icmp6_send() fix, icmp_route_lookup() should determine L3 routing domain using skb_dst(skb)->dev not skb->dev. Also from David Ahern. 25) Several fixes for route offloading and FIB notification handling in mlxsw driver, from Jiri Pirko. 26) Properly cap __skb_flow_dissect()'s return value, from Eric Dumazet. 27) Fix long standing regression in ipv4 redirect handling, wrt. validating the new neighbour's reachability. From Stephen Suryaputra Lin. 28) If sk_filter() trims the packet excessively, handle it reasonably in tcp input instead of exploding. From Eric Dumazet. 29) Fix handling of napi hash state when copying channels in sfc driver, from Bert Kenward. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (121 commits) mlxsw: spectrum_router: Flush FIB tables during fini net: stmmac: Fix lack of link transition for fixed PHYs sctp: change sk state only when it has assocs in sctp_shutdown bnx2: Wait for in-flight DMA to complete at probe stage Revert "bnx2: Reset device during driver initialization" ps3_gelic: fix spelling mistake in debug message net: ethernet: ixp4xx_eth: fix spelling mistake in debug message ibmvnic: Fix size of debugfs name buffer ibmvnic: Unmap ibmvnic_statistics structure sfc: clear napi_hash state when copying channels mlxsw: spectrum_router: Correctly dump neighbour activity mlxsw: spectrum: Fix refcount bug on span entries bnxt_en: Fix VF virtual link state. bnxt_en: Fix ring arithmetic in bnxt_setup_tc(). Revert "include/uapi/linux/atm_zatm.h: include linux/time.h" tcp: take care of truncations done by sk_filter() ipv4: use new_gw for redirect neigh lookup r8152: Fix error path in open function net: bpqether.h: remove if_ether.h guard net: __skb_flow_dissect() must cap its return value ...
2 parents d4b9532 + ac571de commit e76d21c

File tree

120 files changed

+1358
-465
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+1358
-465
lines changed

Documentation/networking/dsa/dsa.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,14 @@ Note that DSA does not currently create network interfaces for the "cpu" and
6767
Switch tagging protocols
6868
------------------------
6969

70-
DSA currently supports 4 different tagging protocols, and a tag-less mode as
70+
DSA currently supports 5 different tagging protocols, and a tag-less mode as
7171
well. The different protocols are implemented in:
7272

7373
net/dsa/tag_trailer.c: Marvell's 4 trailer tag mode (legacy)
7474
net/dsa/tag_dsa.c: Marvell's original DSA tag
7575
net/dsa/tag_edsa.c: Marvell's enhanced DSA tag
7676
net/dsa/tag_brcm.c: Broadcom's 4 bytes tag
77+
net/dsa/tag_qca.c: Qualcomm's 2 bytes tag
7778

7879
The exact format of the tag protocol is vendor specific, but in general, they
7980
all contain something which:

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8057,6 +8057,7 @@ F: drivers/infiniband/hw/mlx4/
80578057
F: include/linux/mlx4/
80588058

80598059
MELLANOX MLX5 core VPI driver
8060+
M: Saeed Mahameed <[email protected]>
80608061
M: Matan Barak <[email protected]>
80618062
M: Leon Romanovsky <[email protected]>
80628063

drivers/net/can/sja1000/plx_pci.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ struct plx_pci_card {
142142
#define CTI_PCI_VENDOR_ID 0x12c4
143143
#define CTI_PCI_DEVICE_ID_CRG001 0x0900
144144

145+
#define MOXA_PCI_VENDOR_ID 0x1393
146+
#define MOXA_PCI_DEVICE_ID 0x0100
147+
145148
static void plx_pci_reset_common(struct pci_dev *pdev);
146149
static void plx9056_pci_reset_common(struct pci_dev *pdev);
147150
static void plx_pci_reset_marathon_pci(struct pci_dev *pdev);
@@ -258,6 +261,14 @@ static struct plx_pci_card_info plx_pci_card_info_elcus = {
258261
/* based on PLX9030 */
259262
};
260263

264+
static struct plx_pci_card_info plx_pci_card_info_moxa = {
265+
"MOXA", 2,
266+
PLX_PCI_CAN_CLOCK, PLX_PCI_OCR, PLX_PCI_CDR,
267+
{0, 0x00, 0x00}, { {0, 0x00, 0x80}, {1, 0x00, 0x80} },
268+
&plx_pci_reset_common
269+
/* based on PLX9052 */
270+
};
271+
261272
static const struct pci_device_id plx_pci_tbl[] = {
262273
{
263274
/* Adlink PCI-7841/cPCI-7841 */
@@ -357,6 +368,13 @@ static const struct pci_device_id plx_pci_tbl[] = {
357368
0, 0,
358369
(kernel_ulong_t)&plx_pci_card_info_elcus
359370
},
371+
{
372+
/* moxa */
373+
MOXA_PCI_VENDOR_ID, MOXA_PCI_DEVICE_ID,
374+
PCI_ANY_ID, PCI_ANY_ID,
375+
0, 0,
376+
(kernel_ulong_t)&plx_pci_card_info_moxa
377+
},
360378
{ 0,}
361379
};
362380
MODULE_DEVICE_TABLE(pci, plx_pci_tbl);

drivers/net/ethernet/apm/xgene/xgene_enet_hw.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -204,17 +204,6 @@ static u32 xgene_enet_ring_len(struct xgene_enet_desc_ring *ring)
204204
return num_msgs;
205205
}
206206

207-
static void xgene_enet_setup_coalescing(struct xgene_enet_desc_ring *ring)
208-
{
209-
u32 data = 0x7777;
210-
211-
xgene_enet_ring_wr32(ring, CSR_PBM_COAL, 0x8e);
212-
xgene_enet_ring_wr32(ring, CSR_PBM_CTICK1, data);
213-
xgene_enet_ring_wr32(ring, CSR_PBM_CTICK2, data << 16);
214-
xgene_enet_ring_wr32(ring, CSR_THRESHOLD0_SET1, 0x40);
215-
xgene_enet_ring_wr32(ring, CSR_THRESHOLD1_SET1, 0x80);
216-
}
217-
218207
void xgene_enet_parse_error(struct xgene_enet_desc_ring *ring,
219208
struct xgene_enet_pdata *pdata,
220209
enum xgene_enet_err_code status)
@@ -929,5 +918,4 @@ struct xgene_ring_ops xgene_ring1_ops = {
929918
.clear = xgene_enet_clear_ring,
930919
.wr_cmd = xgene_enet_wr_cmd,
931920
.len = xgene_enet_ring_len,
932-
.coalesce = xgene_enet_setup_coalescing,
933921
};

drivers/net/ethernet/apm/xgene/xgene_enet_hw.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@ enum xgene_enet_rm {
5555
#define PREFETCH_BUF_EN BIT(21)
5656
#define CSR_RING_ID_BUF 0x000c
5757
#define CSR_PBM_COAL 0x0014
58+
#define CSR_PBM_CTICK0 0x0018
5859
#define CSR_PBM_CTICK1 0x001c
5960
#define CSR_PBM_CTICK2 0x0020
61+
#define CSR_PBM_CTICK3 0x0024
6062
#define CSR_THRESHOLD0_SET1 0x0030
6163
#define CSR_THRESHOLD1_SET1 0x0034
6264
#define CSR_RING_NE_INT_MODE 0x017c

drivers/net/ethernet/apm/xgene/xgene_enet_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,8 @@ static int xgene_enet_create_desc_rings(struct net_device *ndev)
11881188
tx_ring->dst_ring_num = xgene_enet_dst_ring_num(cp_ring);
11891189
}
11901190

1191-
pdata->ring_ops->coalesce(pdata->tx_ring[0]);
1191+
if (pdata->ring_ops->coalesce)
1192+
pdata->ring_ops->coalesce(pdata->tx_ring[0]);
11921193
pdata->tx_qcnt_hi = pdata->tx_ring[0]->slots - 128;
11931194

11941195
return 0;

drivers/net/ethernet/apm/xgene/xgene_enet_ring2.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static void xgene_enet_ring_init(struct xgene_enet_desc_ring *ring)
3030
ring_cfg[0] |= SET_VAL(X2_INTLINE, ring->id & RING_BUFNUM_MASK);
3131
ring_cfg[3] |= SET_BIT(X2_DEQINTEN);
3232
}
33-
ring_cfg[0] |= SET_VAL(X2_CFGCRID, 1);
33+
ring_cfg[0] |= SET_VAL(X2_CFGCRID, 2);
3434

3535
addr >>= 8;
3636
ring_cfg[2] |= QCOHERENT | SET_VAL(RINGADDRL, addr);
@@ -192,13 +192,15 @@ static u32 xgene_enet_ring_len(struct xgene_enet_desc_ring *ring)
192192

193193
static void xgene_enet_setup_coalescing(struct xgene_enet_desc_ring *ring)
194194
{
195-
u32 data = 0x7777;
195+
u32 data = 0x77777777;
196196

197197
xgene_enet_ring_wr32(ring, CSR_PBM_COAL, 0x8e);
198+
xgene_enet_ring_wr32(ring, CSR_PBM_CTICK0, data);
198199
xgene_enet_ring_wr32(ring, CSR_PBM_CTICK1, data);
199-
xgene_enet_ring_wr32(ring, CSR_PBM_CTICK2, data << 16);
200-
xgene_enet_ring_wr32(ring, CSR_THRESHOLD0_SET1, 0x40);
201-
xgene_enet_ring_wr32(ring, CSR_THRESHOLD1_SET1, 0x80);
200+
xgene_enet_ring_wr32(ring, CSR_PBM_CTICK2, data);
201+
xgene_enet_ring_wr32(ring, CSR_PBM_CTICK3, data);
202+
xgene_enet_ring_wr32(ring, CSR_THRESHOLD0_SET1, 0x08);
203+
xgene_enet_ring_wr32(ring, CSR_THRESHOLD1_SET1, 0x10);
202204
}
203205

204206
struct xgene_ring_ops xgene_ring2_ops = {

drivers/net/ethernet/broadcom/bgmac.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,10 @@ static void bgmac_dma_rx_enable(struct bgmac *bgmac,
307307
u32 ctl;
308308

309309
ctl = bgmac_read(bgmac, ring->mmio_base + BGMAC_DMA_RX_CTL);
310+
311+
/* preserve ONLY bits 16-17 from current hardware value */
312+
ctl &= BGMAC_DMA_RX_ADDREXT_MASK;
313+
310314
if (bgmac->feature_flags & BGMAC_FEAT_RX_MASK_SETUP) {
311315
ctl &= ~BGMAC_DMA_RX_BL_MASK;
312316
ctl |= BGMAC_DMA_RX_BL_128 << BGMAC_DMA_RX_BL_SHIFT;
@@ -317,7 +321,6 @@ static void bgmac_dma_rx_enable(struct bgmac *bgmac,
317321
ctl &= ~BGMAC_DMA_RX_PT_MASK;
318322
ctl |= BGMAC_DMA_RX_PT_1 << BGMAC_DMA_RX_PT_SHIFT;
319323
}
320-
ctl &= BGMAC_DMA_RX_ADDREXT_MASK;
321324
ctl |= BGMAC_DMA_RX_ENABLE;
322325
ctl |= BGMAC_DMA_RX_PARITY_DISABLE;
323326
ctl |= BGMAC_DMA_RX_OVERFLOW_CONT;
@@ -1046,9 +1049,9 @@ static void bgmac_enable(struct bgmac *bgmac)
10461049

10471050
mode = (bgmac_read(bgmac, BGMAC_DEV_STATUS) & BGMAC_DS_MM_MASK) >>
10481051
BGMAC_DS_MM_SHIFT;
1049-
if (!(bgmac->feature_flags & BGMAC_FEAT_CLKCTLST) || mode != 0)
1052+
if (bgmac->feature_flags & BGMAC_FEAT_CLKCTLST || mode != 0)
10501053
bgmac_set(bgmac, BCMA_CLKCTLST, BCMA_CLKCTLST_FORCEHT);
1051-
if (bgmac->feature_flags & BGMAC_FEAT_CLKCTLST && mode == 2)
1054+
if (!(bgmac->feature_flags & BGMAC_FEAT_CLKCTLST) && mode == 2)
10521055
bgmac_cco_ctl_maskset(bgmac, 1, ~0,
10531056
BGMAC_CHIPCTL_1_RXC_DLL_BYPASS);
10541057

drivers/net/ethernet/broadcom/bnx2.c

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
#include <linux/firmware.h>
5050
#include <linux/log2.h>
5151
#include <linux/aer.h>
52+
#include <linux/crash_dump.h>
5253

5354
#if IS_ENABLED(CONFIG_CNIC)
5455
#define BCM_CNIC 1
@@ -4764,15 +4765,16 @@ bnx2_setup_msix_tbl(struct bnx2 *bp)
47644765
BNX2_WR(bp, BNX2_PCI_GRC_WINDOW3_ADDR, BNX2_MSIX_PBA_ADDR);
47654766
}
47664767

4767-
static int
4768-
bnx2_reset_chip(struct bnx2 *bp, u32 reset_code)
4768+
static void
4769+
bnx2_wait_dma_complete(struct bnx2 *bp)
47694770
{
47704771
u32 val;
4771-
int i, rc = 0;
4772-
u8 old_port;
4772+
int i;
47734773

4774-
/* Wait for the current PCI transaction to complete before
4775-
* issuing a reset. */
4774+
/*
4775+
* Wait for the current PCI transaction to complete before
4776+
* issuing a reset.
4777+
*/
47764778
if ((BNX2_CHIP(bp) == BNX2_CHIP_5706) ||
47774779
(BNX2_CHIP(bp) == BNX2_CHIP_5708)) {
47784780
BNX2_WR(bp, BNX2_MISC_ENABLE_CLR_BITS,
@@ -4796,6 +4798,21 @@ bnx2_reset_chip(struct bnx2 *bp, u32 reset_code)
47964798
}
47974799
}
47984800

4801+
return;
4802+
}
4803+
4804+
4805+
static int
4806+
bnx2_reset_chip(struct bnx2 *bp, u32 reset_code)
4807+
{
4808+
u32 val;
4809+
int i, rc = 0;
4810+
u8 old_port;
4811+
4812+
/* Wait for the current PCI transaction to complete before
4813+
* issuing a reset. */
4814+
bnx2_wait_dma_complete(bp);
4815+
47994816
/* Wait for the firmware to tell us it is ok to issue a reset. */
48004817
bnx2_fw_sync(bp, BNX2_DRV_MSG_DATA_WAIT0 | reset_code, 1, 1);
48014818

@@ -6361,6 +6378,10 @@ bnx2_open(struct net_device *dev)
63616378
struct bnx2 *bp = netdev_priv(dev);
63626379
int rc;
63636380

6381+
rc = bnx2_request_firmware(bp);
6382+
if (rc < 0)
6383+
goto out;
6384+
63646385
netif_carrier_off(dev);
63656386

63666387
bnx2_disable_int(bp);
@@ -6429,6 +6450,7 @@ bnx2_open(struct net_device *dev)
64296450
bnx2_free_irq(bp);
64306451
bnx2_free_mem(bp);
64316452
bnx2_del_napi(bp);
6453+
bnx2_release_firmware(bp);
64326454
goto out;
64336455
}
64346456

@@ -8575,12 +8597,15 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
85758597

85768598
pci_set_drvdata(pdev, dev);
85778599

8578-
rc = bnx2_request_firmware(bp);
8579-
if (rc < 0)
8580-
goto error;
8581-
8600+
/*
8601+
* In-flight DMA from 1st kernel could continue going in kdump kernel.
8602+
* New io-page table has been created before bnx2 does reset at open stage.
8603+
* We have to wait for the in-flight DMA to complete to avoid it look up
8604+
* into the newly created io-page table.
8605+
*/
8606+
if (is_kdump_kernel())
8607+
bnx2_wait_dma_complete(bp);
85828608

8583-
bnx2_reset_chip(bp, BNX2_DRV_MSG_CODE_RESET);
85848609
memcpy(dev->dev_addr, bp->mac_addr, ETH_ALEN);
85858610

85868611
dev->hw_features = NETIF_F_IP_CSUM | NETIF_F_SG |
@@ -8613,7 +8638,6 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
86138638
return 0;
86148639

86158640
error:
8616-
bnx2_release_firmware(bp);
86178641
pci_iounmap(pdev, bp->regview);
86188642
pci_release_regions(pdev);
86198643
pci_disable_device(pdev);

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6309,6 +6309,7 @@ static int bnxt_setup_tc(struct net_device *dev, u32 handle, __be16 proto,
63096309
struct tc_to_netdev *ntc)
63106310
{
63116311
struct bnxt *bp = netdev_priv(dev);
6312+
bool sh = false;
63126313
u8 tc;
63136314

63146315
if (ntc->type != TC_SETUP_MQPRIO)
@@ -6325,12 +6326,11 @@ static int bnxt_setup_tc(struct net_device *dev, u32 handle, __be16 proto,
63256326
if (netdev_get_num_tc(dev) == tc)
63266327
return 0;
63276328

6329+
if (bp->flags & BNXT_FLAG_SHARED_RINGS)
6330+
sh = true;
6331+
63286332
if (tc) {
63296333
int max_rx_rings, max_tx_rings, rc;
6330-
bool sh = false;
6331-
6332-
if (bp->flags & BNXT_FLAG_SHARED_RINGS)
6333-
sh = true;
63346334

63356335
rc = bnxt_get_max_rings(bp, &max_rx_rings, &max_tx_rings, sh);
63366336
if (rc || bp->tx_nr_rings_per_tc * tc > max_tx_rings)
@@ -6348,7 +6348,8 @@ static int bnxt_setup_tc(struct net_device *dev, u32 handle, __be16 proto,
63486348
bp->tx_nr_rings = bp->tx_nr_rings_per_tc;
63496349
netdev_reset_tc(dev);
63506350
}
6351-
bp->cp_nr_rings = max_t(int, bp->tx_nr_rings, bp->rx_nr_rings);
6351+
bp->cp_nr_rings = sh ? max_t(int, bp->tx_nr_rings, bp->rx_nr_rings) :
6352+
bp->tx_nr_rings + bp->rx_nr_rings;
63526353
bp->num_stat_ctxs = bp->cp_nr_rings;
63536354

63546355
if (netif_running(bp->dev))

drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -774,8 +774,8 @@ static int bnxt_vf_set_link(struct bnxt *bp, struct bnxt_vf_info *vf)
774774

775775
if (vf->flags & BNXT_VF_LINK_UP) {
776776
/* if physical link is down, force link up on VF */
777-
if (phy_qcfg_resp.link ==
778-
PORT_PHY_QCFG_RESP_LINK_NO_LINK) {
777+
if (phy_qcfg_resp.link !=
778+
PORT_PHY_QCFG_RESP_LINK_LINK) {
779779
phy_qcfg_resp.link =
780780
PORT_PHY_QCFG_RESP_LINK_LINK;
781781
phy_qcfg_resp.link_speed = cpu_to_le16(

drivers/net/ethernet/brocade/bna/bnad.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ bnad_txcmpl_process(struct bnad *bnad, struct bna_tcb *tcb)
177177
return 0;
178178

179179
hw_cons = *(tcb->hw_consumer_index);
180+
rmb();
180181
cons = tcb->consumer_index;
181182
q_depth = tcb->q_depth;
182183

@@ -3094,15 +3095,14 @@ bnad_start_xmit(struct sk_buff *skb, struct net_device *netdev)
30943095
BNA_QE_INDX_INC(prod, q_depth);
30953096
tcb->producer_index = prod;
30963097

3097-
smp_mb();
3098+
wmb();
30983099

30993100
if (unlikely(!test_bit(BNAD_TXQ_TX_STARTED, &tcb->flags)))
31003101
return NETDEV_TX_OK;
31013102

31023103
skb_tx_timestamp(skb);
31033104

31043105
bna_txq_prod_indx_doorbell(tcb);
3105-
smp_mb();
31063106

31073107
return NETDEV_TX_OK;
31083108
}

drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN
178178
CH_PCI_ID_TABLE_FENTRY(0x6005),
179179
CH_PCI_ID_TABLE_FENTRY(0x6006),
180180
CH_PCI_ID_TABLE_FENTRY(0x6007),
181+
CH_PCI_ID_TABLE_FENTRY(0x6008),
181182
CH_PCI_ID_TABLE_FENTRY(0x6009),
182183
CH_PCI_ID_TABLE_FENTRY(0x600d),
183-
CH_PCI_ID_TABLE_FENTRY(0x6010),
184184
CH_PCI_ID_TABLE_FENTRY(0x6011),
185185
CH_PCI_ID_TABLE_FENTRY(0x6014),
186186
CH_PCI_ID_TABLE_FENTRY(0x6015),

drivers/net/ethernet/hisilicon/hns/hnae.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,10 @@ struct hnae_handle *hnae_get_handle(struct device *owner_dev,
332332
return ERR_PTR(-ENODEV);
333333

334334
handle = dev->ops->get_handle(dev, port_id);
335-
if (IS_ERR(handle))
335+
if (IS_ERR(handle)) {
336+
put_device(&dev->cls_dev);
336337
return handle;
338+
}
337339

338340
handle->dev = dev;
339341
handle->owner_dev = owner_dev;
@@ -356,6 +358,8 @@ struct hnae_handle *hnae_get_handle(struct device *owner_dev,
356358
for (j = i - 1; j >= 0; j--)
357359
hnae_fini_queue(handle->qs[j]);
358360

361+
put_device(&dev->cls_dev);
362+
359363
return ERR_PTR(-ENOMEM);
360364
}
361365
EXPORT_SYMBOL(hnae_get_handle);
@@ -377,6 +381,8 @@ void hnae_put_handle(struct hnae_handle *h)
377381
dev->ops->put_handle(h);
378382

379383
module_put(dev->owner);
384+
385+
put_device(&dev->cls_dev);
380386
}
381387
EXPORT_SYMBOL(hnae_put_handle);
382388

drivers/net/ethernet/ibm/ehea/ehea_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2446,6 +2446,8 @@ static int ehea_open(struct net_device *dev)
24462446

24472447
netif_info(port, ifup, dev, "enabling port\n");
24482448

2449+
netif_carrier_off(dev);
2450+
24492451
ret = ehea_up(dev);
24502452
if (!ret) {
24512453
port_napi_enable(port);

0 commit comments

Comments
 (0)