Skip to content

Commit a13511d

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Handle errors mid-stream of an all dump, from Alexey Kodanev. 2) Fix build of openvswitch with certain combinations of netfilter options, from Arnd Bergmann. 3) Fix interactions between GSO and BQL, from Eric Dumazet. 4) Don't put a '/' in RTL8201F's sysfs file name, from Holger Hoffstätte. 5) S390 qeth driver fixes from Julian Wiedmann. 6) Allow ipv6 link local addresses for netconsole when both source and destination are link local, from Matwey V. Kornilov. 7) Fix the BPF program address seen in /proc/kallsyms, from Song Liu. 8) Initialize mutex before use in dsa microchip driver, from Tristram Ha. 9) Out-of-bounds access in hns3, from Yunsheng Lin. 10) Various netfilter fixes from Stefano Brivio, Jozsef Kadlecsik, Jiri Slaby, Florian Westphal, Eric Westbrook, Andrey Ryabinin, and Pablo Neira Ayuso. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (50 commits) net: alx: make alx_drv_name static net: bpfilter: fix iptables failure if bpfilter_umh is disabled sock_diag: fix autoloading of the raw_diag module net: core: netpoll: Enable netconsole IPv6 link local address ipv6: properly check return value in inet6_dump_all() rtnetlink: restore handling of dumpit return value in rtnl_dump_all() net/ipv6: Move anycast init/cleanup functions out of CONFIG_PROC_FS bonding/802.3ad: fix link_failure_count tracking net: phy: realtek: fix RTL8201F sysfs name sctp: define SCTP_SS_DEFAULT for Stream schedulers sctp: fix strchange_flags name for Stream Change Event mlxsw: spectrum: Fix IP2ME CPU policer configuration openvswitch: fix linking without CONFIG_NF_CONNTRACK_LABELS qed: fix link config error handling net: hns3: Fix for out-of-bounds access when setting pfc back pressure net/mlx4_en: use __netdev_tx_sent_queue() net: do not abort bulk send on BQL status net: bql: add __netdev_tx_sent_queue() s390/qeth: report 25Gbit link speed s390/qeth: sanitize ARP requests ...
2 parents 163c8d5 + a422757 commit a13511d

Some content is hidden

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

60 files changed

+653
-563
lines changed

drivers/net/bonding/bond_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3112,13 +3112,13 @@ static int bond_slave_netdev_event(unsigned long event,
31123112
case NETDEV_CHANGE:
31133113
/* For 802.3ad mode only:
31143114
* Getting invalid Speed/Duplex values here will put slave
3115-
* in weird state. So mark it as link-down for the time
3115+
* in weird state. So mark it as link-fail for the time
31163116
* being and let link-monitoring (miimon) set it right when
31173117
* correct speeds/duplex are available.
31183118
*/
31193119
if (bond_update_speed_duplex(slave) &&
31203120
BOND_MODE(bond) == BOND_MODE_8023AD)
3121-
slave->link = BOND_LINK_DOWN;
3121+
slave->link = BOND_LINK_FAIL;
31223122

31233123
if (BOND_MODE(bond) == BOND_MODE_8023AD)
31243124
bond_3ad_adapter_speed_duplex_changed(slave);

drivers/net/dsa/microchip/ksz_common.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,11 +1117,6 @@ static int ksz_switch_init(struct ksz_device *dev)
11171117
{
11181118
int i;
11191119

1120-
mutex_init(&dev->reg_mutex);
1121-
mutex_init(&dev->stats_mutex);
1122-
mutex_init(&dev->alu_mutex);
1123-
mutex_init(&dev->vlan_mutex);
1124-
11251120
dev->ds->ops = &ksz_switch_ops;
11261121

11271122
for (i = 0; i < ARRAY_SIZE(ksz_switch_chips); i++) {
@@ -1206,6 +1201,11 @@ int ksz_switch_register(struct ksz_device *dev)
12061201
if (dev->pdata)
12071202
dev->chip_id = dev->pdata->chip_id;
12081203

1204+
mutex_init(&dev->reg_mutex);
1205+
mutex_init(&dev->stats_mutex);
1206+
mutex_init(&dev->alu_mutex);
1207+
mutex_init(&dev->vlan_mutex);
1208+
12091209
if (ksz_switch_detect(dev))
12101210
return -EINVAL;
12111211

drivers/net/ethernet/atheros/alx/alx.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,5 @@ struct alx_priv {
140140
};
141141

142142
extern const struct ethtool_ops alx_ethtool_ops;
143-
extern const char alx_drv_name[];
144143

145144
#endif

drivers/net/ethernet/atheros/alx/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
#include "hw.h"
5050
#include "reg.h"
5151

52-
const char alx_drv_name[] = "alx";
52+
static const char alx_drv_name[] = "alx";
5353

5454
static void alx_free_txbuf(struct alx_tx_queue *txq, int entry)
5555
{

drivers/net/ethernet/broadcom/bcmsysport.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,9 +1902,6 @@ static void bcm_sysport_netif_start(struct net_device *dev)
19021902
intrl2_1_mask_clear(priv, 0xffffffff);
19031903
else
19041904
intrl2_0_mask_clear(priv, INTRL2_0_TDMA_MBDONE_MASK);
1905-
1906-
/* Last call before we start the real business */
1907-
netif_tx_start_all_queues(dev);
19081905
}
19091906

19101907
static void rbuf_init(struct bcm_sysport_priv *priv)
@@ -2048,6 +2045,8 @@ static int bcm_sysport_open(struct net_device *dev)
20482045

20492046
bcm_sysport_netif_start(dev);
20502047

2048+
netif_tx_start_all_queues(dev);
2049+
20512050
return 0;
20522051

20532052
out_clear_rx_int:
@@ -2071,7 +2070,7 @@ static void bcm_sysport_netif_stop(struct net_device *dev)
20712070
struct bcm_sysport_priv *priv = netdev_priv(dev);
20722071

20732072
/* stop all software from updating hardware */
2074-
netif_tx_stop_all_queues(dev);
2073+
netif_tx_disable(dev);
20752074
napi_disable(&priv->napi);
20762075
cancel_work_sync(&priv->dim.dim.work);
20772076
phy_stop(dev->phydev);
@@ -2658,12 +2657,12 @@ static int __maybe_unused bcm_sysport_suspend(struct device *d)
26582657
if (!netif_running(dev))
26592658
return 0;
26602659

2660+
netif_device_detach(dev);
2661+
26612662
bcm_sysport_netif_stop(dev);
26622663

26632664
phy_suspend(dev->phydev);
26642665

2665-
netif_device_detach(dev);
2666-
26672666
/* Disable UniMAC RX */
26682667
umac_enable_set(priv, CMD_RX_EN, 0);
26692668

@@ -2746,8 +2745,6 @@ static int __maybe_unused bcm_sysport_resume(struct device *d)
27462745
goto out_free_rx_ring;
27472746
}
27482747

2749-
netif_device_attach(dev);
2750-
27512748
/* RX pipe enable */
27522749
topctrl_writel(priv, 0, RX_FLUSH_CNTL);
27532750

@@ -2788,6 +2785,8 @@ static int __maybe_unused bcm_sysport_resume(struct device *d)
27882785

27892786
bcm_sysport_netif_start(dev);
27902787

2788+
netif_device_attach(dev);
2789+
27912790
return 0;
27922791

27932792
out_free_rx_ring:

drivers/net/ethernet/broadcom/genet/bcmgenet.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2855,7 +2855,6 @@ static void bcmgenet_netif_start(struct net_device *dev)
28552855

28562856
umac_enable_set(priv, CMD_TX_EN | CMD_RX_EN, true);
28572857

2858-
netif_tx_start_all_queues(dev);
28592858
bcmgenet_enable_tx_napi(priv);
28602859

28612860
/* Monitor link interrupts now */
@@ -2937,6 +2936,8 @@ static int bcmgenet_open(struct net_device *dev)
29372936

29382937
bcmgenet_netif_start(dev);
29392938

2939+
netif_tx_start_all_queues(dev);
2940+
29402941
return 0;
29412942

29422943
err_irq1:
@@ -2958,7 +2959,7 @@ static void bcmgenet_netif_stop(struct net_device *dev)
29582959
struct bcmgenet_priv *priv = netdev_priv(dev);
29592960

29602961
bcmgenet_disable_tx_napi(priv);
2961-
netif_tx_stop_all_queues(dev);
2962+
netif_tx_disable(dev);
29622963

29632964
/* Disable MAC receive */
29642965
umac_enable_set(priv, CMD_RX_EN, false);
@@ -3620,13 +3621,13 @@ static int bcmgenet_suspend(struct device *d)
36203621
if (!netif_running(dev))
36213622
return 0;
36223623

3624+
netif_device_detach(dev);
3625+
36233626
bcmgenet_netif_stop(dev);
36243627

36253628
if (!device_may_wakeup(d))
36263629
phy_suspend(dev->phydev);
36273630

3628-
netif_device_detach(dev);
3629-
36303631
/* Prepare the device for Wake-on-LAN and switch to the slow clock */
36313632
if (device_may_wakeup(d) && priv->wolopts) {
36323633
ret = bcmgenet_power_down(priv, GENET_POWER_WOL_MAGIC);
@@ -3700,8 +3701,6 @@ static int bcmgenet_resume(struct device *d)
37003701
/* Always enable ring 16 - descriptor ring */
37013702
bcmgenet_enable_dma(priv, dma_ctrl);
37023703

3703-
netif_device_attach(dev);
3704-
37053704
if (!device_may_wakeup(d))
37063705
phy_resume(dev->phydev);
37073706

@@ -3710,6 +3709,8 @@ static int bcmgenet_resume(struct device *d)
37103709

37113710
bcmgenet_netif_start(dev);
37123711

3712+
netif_device_attach(dev);
3713+
37133714
return 0;
37143715

37153716
out_clk_disable:

drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,14 +1168,14 @@ static int hclge_pfc_setup_hw(struct hclge_dev *hdev)
11681168
*/
11691169
static int hclge_bp_setup_hw(struct hclge_dev *hdev, u8 tc)
11701170
{
1171-
struct hclge_vport *vport = hdev->vport;
1172-
u32 i, k, qs_bitmap;
1173-
int ret;
1171+
int i;
11741172

11751173
for (i = 0; i < HCLGE_BP_GRP_NUM; i++) {
1176-
qs_bitmap = 0;
1174+
u32 qs_bitmap = 0;
1175+
int k, ret;
11771176

11781177
for (k = 0; k < hdev->num_alloc_vport; k++) {
1178+
struct hclge_vport *vport = &hdev->vport[k];
11791179
u16 qs_id = vport->qs_offset + tc;
11801180
u8 grp, sub_grp;
11811181

@@ -1185,8 +1185,6 @@ static int hclge_bp_setup_hw(struct hclge_dev *hdev, u8 tc)
11851185
HCLGE_BP_SUB_GRP_ID_S);
11861186
if (i == grp)
11871187
qs_bitmap |= (1 << sub_grp);
1188-
1189-
vport++;
11901188
}
11911189

11921190
ret = hclge_tm_qs_bp_cfg(hdev, tc, i, qs_bitmap);

drivers/net/ethernet/mellanox/mlx4/en_tx.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,6 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
10061006
ring->packets++;
10071007
}
10081008
ring->bytes += tx_info->nr_bytes;
1009-
netdev_tx_sent_queue(ring->tx_queue, tx_info->nr_bytes);
10101009
AVG_PERF_COUNTER(priv->pstats.tx_pktsz_avg, skb->len);
10111010

10121011
if (tx_info->inl)
@@ -1044,7 +1043,10 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
10441043
netif_tx_stop_queue(ring->tx_queue);
10451044
ring->queue_stopped++;
10461045
}
1047-
send_doorbell = !skb->xmit_more || netif_xmit_stopped(ring->tx_queue);
1046+
1047+
send_doorbell = __netdev_tx_sent_queue(ring->tx_queue,
1048+
tx_info->nr_bytes,
1049+
skb->xmit_more);
10481050

10491051
real_size = (real_size / 16) & 0x3f;
10501052

drivers/net/ethernet/mellanox/mlxsw/spectrum.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3568,7 +3568,6 @@ static int mlxsw_sp_cpu_policers_set(struct mlxsw_core *mlxsw_core)
35683568
burst_size = 7;
35693569
break;
35703570
case MLXSW_REG_HTGT_TRAP_GROUP_SP_IP2ME:
3571-
is_bytes = true;
35723571
rate = 4 * 1024;
35733572
burst_size = 4;
35743573
break;

drivers/net/ethernet/qlogic/qed/qed_mcp.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1944,9 +1944,12 @@ int qed_mcp_trans_speed_mask(struct qed_hwfn *p_hwfn,
19441944
struct qed_ptt *p_ptt, u32 *p_speed_mask)
19451945
{
19461946
u32 transceiver_type, transceiver_state;
1947+
int ret;
19471948

1948-
qed_mcp_get_transceiver_data(p_hwfn, p_ptt, &transceiver_state,
1949-
&transceiver_type);
1949+
ret = qed_mcp_get_transceiver_data(p_hwfn, p_ptt, &transceiver_state,
1950+
&transceiver_type);
1951+
if (ret)
1952+
return ret;
19501953

19511954
if (qed_is_transceiver_ready(transceiver_state, transceiver_type) ==
19521955
false)

drivers/net/phy/realtek.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ static struct phy_driver realtek_drvs[] = {
220220
.flags = PHY_HAS_INTERRUPT,
221221
}, {
222222
.phy_id = 0x001cc816,
223-
.name = "RTL8201F 10/100Mbps Ethernet",
223+
.name = "RTL8201F Fast Ethernet",
224224
.phy_id_mask = 0x001fffff,
225225
.features = PHY_BASIC_FEATURES,
226226
.flags = PHY_HAS_INTERRUPT,

drivers/net/usb/smsc95xx.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,6 +1598,8 @@ static int smsc95xx_suspend(struct usb_interface *intf, pm_message_t message)
15981598
return ret;
15991599
}
16001600

1601+
cancel_delayed_work_sync(&pdata->carrier_check);
1602+
16011603
if (pdata->suspend_flags) {
16021604
netdev_warn(dev->net, "error during last resume\n");
16031605
pdata->suspend_flags = 0;
@@ -1840,6 +1842,11 @@ static int smsc95xx_suspend(struct usb_interface *intf, pm_message_t message)
18401842
*/
18411843
if (ret && PMSG_IS_AUTO(message))
18421844
usbnet_resume(intf);
1845+
1846+
if (ret)
1847+
schedule_delayed_work(&pdata->carrier_check,
1848+
CARRIER_CHECK_DELAY);
1849+
18431850
return ret;
18441851
}
18451852

drivers/s390/net/qeth_core.h

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,18 @@ struct qeth_dbf_info {
8787
#define SENSE_RESETTING_EVENT_BYTE 1
8888
#define SENSE_RESETTING_EVENT_FLAG 0x80
8989

90+
static inline u32 qeth_get_device_id(struct ccw_device *cdev)
91+
{
92+
struct ccw_dev_id dev_id;
93+
u32 id;
94+
95+
ccw_device_get_id(cdev, &dev_id);
96+
id = dev_id.devno;
97+
id |= (u32) (dev_id.ssid << 16);
98+
99+
return id;
100+
}
101+
90102
/*
91103
* Common IO related definitions
92104
*/
@@ -97,7 +109,8 @@ struct qeth_dbf_info {
97109
#define CARD_RDEV_ID(card) dev_name(&card->read.ccwdev->dev)
98110
#define CARD_WDEV_ID(card) dev_name(&card->write.ccwdev->dev)
99111
#define CARD_DDEV_ID(card) dev_name(&card->data.ccwdev->dev)
100-
#define CHANNEL_ID(channel) dev_name(&channel->ccwdev->dev)
112+
#define CCW_DEVID(cdev) (qeth_get_device_id(cdev))
113+
#define CARD_DEVID(card) (CCW_DEVID(CARD_RDEV(card)))
101114

102115
/**
103116
* card stuff
@@ -830,6 +843,11 @@ struct qeth_trap_id {
830843
/*some helper functions*/
831844
#define QETH_CARD_IFNAME(card) (((card)->dev)? (card)->dev->name : "")
832845

846+
static inline bool qeth_netdev_is_registered(struct net_device *dev)
847+
{
848+
return dev->netdev_ops != NULL;
849+
}
850+
833851
static inline void qeth_scrub_qdio_buffer(struct qdio_buffer *buf,
834852
unsigned int elements)
835853
{
@@ -973,7 +991,7 @@ int qeth_wait_for_threads(struct qeth_card *, unsigned long);
973991
int qeth_do_run_thread(struct qeth_card *, unsigned long);
974992
void qeth_clear_thread_start_bit(struct qeth_card *, unsigned long);
975993
void qeth_clear_thread_running_bit(struct qeth_card *, unsigned long);
976-
int qeth_core_hardsetup_card(struct qeth_card *);
994+
int qeth_core_hardsetup_card(struct qeth_card *card, bool *carrier_ok);
977995
void qeth_print_status_message(struct qeth_card *);
978996
int qeth_init_qdio_queues(struct qeth_card *);
979997
int qeth_send_ipa_cmd(struct qeth_card *, struct qeth_cmd_buffer *,
@@ -1028,11 +1046,6 @@ int qeth_configure_cq(struct qeth_card *, enum qeth_cq);
10281046
int qeth_hw_trap(struct qeth_card *, enum qeth_diags_trap_action);
10291047
void qeth_trace_features(struct qeth_card *);
10301048
void qeth_close_dev(struct qeth_card *);
1031-
int qeth_send_setassparms(struct qeth_card *, struct qeth_cmd_buffer *, __u16,
1032-
long,
1033-
int (*reply_cb)(struct qeth_card *,
1034-
struct qeth_reply *, unsigned long),
1035-
void *);
10361049
int qeth_setassparms_cb(struct qeth_card *, struct qeth_reply *, unsigned long);
10371050
struct qeth_cmd_buffer *qeth_get_setassparms_cmd(struct qeth_card *,
10381051
enum qeth_ipa_funcs,

0 commit comments

Comments
 (0)