You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:
"Mostly small bits scattered all over the place, which is usually how
things go this late in the -rc series.
1) Proper driver init device resets in bnx2, from Baoquan He.
2) Fix accounting overflow in __tcp_retransmit_skb(),
sk_forward_alloc, and ip_idents_reserve, from Eric Dumazet.
3) Fix crash in bna driver ethtool stats handling, from Ivan Vecera.
4) Missing check of skb_linearize() return value in mac80211, from
Johannes Berg.
5) Endianness fix in nf_table_trace dumps, from Liping Zhang.
6) SSN comparison fix in SCTP, from Marcelo Ricardo Leitner.
7) Update DSA and b44 MAINTAINERS entries.
8) Make input path of vti6 driver work again, from Nicolas Dichtel.
9) Off-by-one in mlx4, from Sebastian Ott.
10) Fix fallback route lookup handling in ipv6, from Vincent Bernat.
11) Fix stack corruption on probe in qed driver, from Yuval Mintz.
12) PHY init fixes in r8152 from Hayes Wang.
13) Missing SKB free in irda_accept error path, from Phil Turnbull"
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (61 commits)
tcp: properly account Fast Open SYN-ACK retrans
tcp: fix under-accounting retransmit SNMP counters
MAINTAINERS: Update b44 maintainer.
net: get rid of an signed integer overflow in ip_idents_reserve()
net/mlx4_core: Fix to clean devlink resources
net: can: ifi: Configure transmitter delay
vti6: fix input path
ipmr, ip6mr: return lastuse relative to now
r8152: disable ALDPS and EEE before setting PHY
r8152: remove r8153_enable_eee
r8152: move PHY settings to hw_phy_cfg
r8152: move enabling PHY
r8152: move some functions
cxgb4/cxgb4vf: Allocate more queues for 25G and 100G adapter
qed: Fix stack corruption on probe
MAINTAINERS: Add an entry for the core network DSA code
net: ipv6: fallback to full lookup if table lookup is unsuitable
net/mlx5: E-Switch, Handle mode change failures
net/mlx5: E-Switch, Fix error flow in the SRIOV e-switch init code
net/mlx5: Fix flow counter bulk command out mailbox allocation
...
This commit is contained in:
+10
-1
@@ -2501,7 +2501,7 @@ S: Supported
|
||||
F: kernel/bpf/
|
||||
|
||||
BROADCOM B44 10/100 ETHERNET DRIVER
|
||||
M: Gary Zambrano <zambrano@broadcom.com>
|
||||
M: Michael Chan <michael.chan@broadcom.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/net/ethernet/broadcom/b44.*
|
||||
@@ -8161,6 +8161,15 @@ S: Maintained
|
||||
W: https://fedorahosted.org/dropwatch/
|
||||
F: net/core/drop_monitor.c
|
||||
|
||||
NETWORKING [DSA]
|
||||
M: Andrew Lunn <andrew@lunn.ch>
|
||||
M: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
|
||||
M: Florian Fainelli <f.fainelli@gmail.com>
|
||||
S: Maintained
|
||||
F: net/dsa/
|
||||
F: include/net/dsa.h
|
||||
F: drivers/net/dsa/
|
||||
|
||||
NETWORKING [GENERAL]
|
||||
M: "David S. Miller" <davem@davemloft.net>
|
||||
L: netdev@vger.kernel.org
|
||||
|
||||
@@ -1268,11 +1268,10 @@ static int __maybe_unused flexcan_suspend(struct device *device)
|
||||
struct flexcan_priv *priv = netdev_priv(dev);
|
||||
int err;
|
||||
|
||||
err = flexcan_chip_disable(priv);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (netif_running(dev)) {
|
||||
err = flexcan_chip_disable(priv);
|
||||
if (err)
|
||||
return err;
|
||||
netif_stop_queue(dev);
|
||||
netif_device_detach(dev);
|
||||
}
|
||||
@@ -1285,13 +1284,17 @@ static int __maybe_unused flexcan_resume(struct device *device)
|
||||
{
|
||||
struct net_device *dev = dev_get_drvdata(device);
|
||||
struct flexcan_priv *priv = netdev_priv(dev);
|
||||
int err;
|
||||
|
||||
priv->can.state = CAN_STATE_ERROR_ACTIVE;
|
||||
if (netif_running(dev)) {
|
||||
netif_device_attach(dev);
|
||||
netif_start_queue(dev);
|
||||
err = flexcan_chip_enable(priv);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
return flexcan_chip_enable(priv);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(flexcan_pm_ops, flexcan_suspend, flexcan_resume);
|
||||
|
||||
@@ -81,6 +81,10 @@
|
||||
#define IFI_CANFD_TIME_SET_TIMEA_4_12_6_6 BIT(15)
|
||||
|
||||
#define IFI_CANFD_TDELAY 0x1c
|
||||
#define IFI_CANFD_TDELAY_DEFAULT 0xb
|
||||
#define IFI_CANFD_TDELAY_MASK 0x3fff
|
||||
#define IFI_CANFD_TDELAY_ABS BIT(14)
|
||||
#define IFI_CANFD_TDELAY_EN BIT(15)
|
||||
|
||||
#define IFI_CANFD_ERROR 0x20
|
||||
#define IFI_CANFD_ERROR_TX_OFFSET 0
|
||||
@@ -641,7 +645,7 @@ static void ifi_canfd_set_bittiming(struct net_device *ndev)
|
||||
struct ifi_canfd_priv *priv = netdev_priv(ndev);
|
||||
const struct can_bittiming *bt = &priv->can.bittiming;
|
||||
const struct can_bittiming *dbt = &priv->can.data_bittiming;
|
||||
u16 brp, sjw, tseg1, tseg2;
|
||||
u16 brp, sjw, tseg1, tseg2, tdc;
|
||||
|
||||
/* Configure bit timing */
|
||||
brp = bt->brp - 2;
|
||||
@@ -664,6 +668,11 @@ static void ifi_canfd_set_bittiming(struct net_device *ndev)
|
||||
(brp << IFI_CANFD_TIME_PRESCALE_OFF) |
|
||||
(sjw << IFI_CANFD_TIME_SJW_OFF_7_9_8_8),
|
||||
priv->base + IFI_CANFD_FTIME);
|
||||
|
||||
/* Configure transmitter delay */
|
||||
tdc = (dbt->brp * (dbt->phase_seg1 + 1)) & IFI_CANFD_TDELAY_MASK;
|
||||
writel(IFI_CANFD_TDELAY_EN | IFI_CANFD_TDELAY_ABS | tdc,
|
||||
priv->base + IFI_CANFD_TDELAY);
|
||||
}
|
||||
|
||||
static void ifi_canfd_set_filter(struct net_device *ndev, const u32 id,
|
||||
|
||||
@@ -6356,10 +6356,6 @@ bnx2_open(struct net_device *dev)
|
||||
struct bnx2 *bp = netdev_priv(dev);
|
||||
int rc;
|
||||
|
||||
rc = bnx2_request_firmware(bp);
|
||||
if (rc < 0)
|
||||
goto out;
|
||||
|
||||
netif_carrier_off(dev);
|
||||
|
||||
bnx2_disable_int(bp);
|
||||
@@ -6428,7 +6424,6 @@ open_err:
|
||||
bnx2_free_irq(bp);
|
||||
bnx2_free_mem(bp);
|
||||
bnx2_del_napi(bp);
|
||||
bnx2_release_firmware(bp);
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -8575,6 +8570,12 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
|
||||
pci_set_drvdata(pdev, dev);
|
||||
|
||||
rc = bnx2_request_firmware(bp);
|
||||
if (rc < 0)
|
||||
goto error;
|
||||
|
||||
|
||||
bnx2_reset_chip(bp, BNX2_DRV_MSG_CODE_RESET);
|
||||
memcpy(dev->dev_addr, bp->mac_addr, ETH_ALEN);
|
||||
|
||||
dev->hw_features = NETIF_F_IP_CSUM | NETIF_F_SG |
|
||||
@@ -8607,6 +8608,7 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
return 0;
|
||||
|
||||
error:
|
||||
bnx2_release_firmware(bp);
|
||||
pci_iounmap(pdev, bp->regview);
|
||||
pci_release_regions(pdev);
|
||||
pci_disable_device(pdev);
|
||||
|
||||
@@ -31,15 +31,10 @@
|
||||
#define BNAD_NUM_TXF_COUNTERS 12
|
||||
#define BNAD_NUM_RXF_COUNTERS 10
|
||||
#define BNAD_NUM_CQ_COUNTERS (3 + 5)
|
||||
#define BNAD_NUM_RXQ_COUNTERS 6
|
||||
#define BNAD_NUM_RXQ_COUNTERS 7
|
||||
#define BNAD_NUM_TXQ_COUNTERS 5
|
||||
|
||||
#define BNAD_ETHTOOL_STATS_NUM \
|
||||
(sizeof(struct rtnl_link_stats64) / sizeof(u64) + \
|
||||
sizeof(struct bnad_drv_stats) / sizeof(u64) + \
|
||||
offsetof(struct bfi_enet_stats, rxf_stats[0]) / sizeof(u64))
|
||||
|
||||
static const char *bnad_net_stats_strings[BNAD_ETHTOOL_STATS_NUM] = {
|
||||
static const char *bnad_net_stats_strings[] = {
|
||||
"rx_packets",
|
||||
"tx_packets",
|
||||
"rx_bytes",
|
||||
@@ -50,22 +45,10 @@ static const char *bnad_net_stats_strings[BNAD_ETHTOOL_STATS_NUM] = {
|
||||
"tx_dropped",
|
||||
"multicast",
|
||||
"collisions",
|
||||
|
||||
"rx_length_errors",
|
||||
"rx_over_errors",
|
||||
"rx_crc_errors",
|
||||
"rx_frame_errors",
|
||||
"rx_fifo_errors",
|
||||
"rx_missed_errors",
|
||||
|
||||
"tx_aborted_errors",
|
||||
"tx_carrier_errors",
|
||||
"tx_fifo_errors",
|
||||
"tx_heartbeat_errors",
|
||||
"tx_window_errors",
|
||||
|
||||
"rx_compressed",
|
||||
"tx_compressed",
|
||||
|
||||
"netif_queue_stop",
|
||||
"netif_queue_wakeup",
|
||||
@@ -254,6 +237,8 @@ static const char *bnad_net_stats_strings[BNAD_ETHTOOL_STATS_NUM] = {
|
||||
"fc_tx_fid_parity_errors",
|
||||
};
|
||||
|
||||
#define BNAD_ETHTOOL_STATS_NUM ARRAY_SIZE(bnad_net_stats_strings)
|
||||
|
||||
static int
|
||||
bnad_get_settings(struct net_device *netdev, struct ethtool_cmd *cmd)
|
||||
{
|
||||
@@ -658,6 +643,8 @@ bnad_get_strings(struct net_device *netdev, u32 stringset, u8 *string)
|
||||
string += ETH_GSTRING_LEN;
|
||||
sprintf(string, "rxq%d_allocbuf_failed", q_num);
|
||||
string += ETH_GSTRING_LEN;
|
||||
sprintf(string, "rxq%d_mapbuf_failed", q_num);
|
||||
string += ETH_GSTRING_LEN;
|
||||
sprintf(string, "rxq%d_producer_index", q_num);
|
||||
string += ETH_GSTRING_LEN;
|
||||
sprintf(string, "rxq%d_consumer_index", q_num);
|
||||
@@ -678,6 +665,9 @@ bnad_get_strings(struct net_device *netdev, u32 stringset, u8 *string)
|
||||
sprintf(string, "rxq%d_allocbuf_failed",
|
||||
q_num);
|
||||
string += ETH_GSTRING_LEN;
|
||||
sprintf(string, "rxq%d_mapbuf_failed",
|
||||
q_num);
|
||||
string += ETH_GSTRING_LEN;
|
||||
sprintf(string, "rxq%d_producer_index",
|
||||
q_num);
|
||||
string += ETH_GSTRING_LEN;
|
||||
@@ -854,9 +844,9 @@ bnad_get_ethtool_stats(struct net_device *netdev, struct ethtool_stats *stats,
|
||||
u64 *buf)
|
||||
{
|
||||
struct bnad *bnad = netdev_priv(netdev);
|
||||
int i, j, bi;
|
||||
int i, j, bi = 0;
|
||||
unsigned long flags;
|
||||
struct rtnl_link_stats64 *net_stats64;
|
||||
struct rtnl_link_stats64 net_stats64;
|
||||
u64 *stats64;
|
||||
u32 bmap;
|
||||
|
||||
@@ -871,14 +861,25 @@ bnad_get_ethtool_stats(struct net_device *netdev, struct ethtool_stats *stats,
|
||||
* under the same lock
|
||||
*/
|
||||
spin_lock_irqsave(&bnad->bna_lock, flags);
|
||||
bi = 0;
|
||||
memset(buf, 0, stats->n_stats * sizeof(u64));
|
||||
|
||||
net_stats64 = (struct rtnl_link_stats64 *)buf;
|
||||
bnad_netdev_qstats_fill(bnad, net_stats64);
|
||||
bnad_netdev_hwstats_fill(bnad, net_stats64);
|
||||
memset(&net_stats64, 0, sizeof(net_stats64));
|
||||
bnad_netdev_qstats_fill(bnad, &net_stats64);
|
||||
bnad_netdev_hwstats_fill(bnad, &net_stats64);
|
||||
|
||||
bi = sizeof(*net_stats64) / sizeof(u64);
|
||||
buf[bi++] = net_stats64.rx_packets;
|
||||
buf[bi++] = net_stats64.tx_packets;
|
||||
buf[bi++] = net_stats64.rx_bytes;
|
||||
buf[bi++] = net_stats64.tx_bytes;
|
||||
buf[bi++] = net_stats64.rx_errors;
|
||||
buf[bi++] = net_stats64.tx_errors;
|
||||
buf[bi++] = net_stats64.rx_dropped;
|
||||
buf[bi++] = net_stats64.tx_dropped;
|
||||
buf[bi++] = net_stats64.multicast;
|
||||
buf[bi++] = net_stats64.collisions;
|
||||
buf[bi++] = net_stats64.rx_length_errors;
|
||||
buf[bi++] = net_stats64.rx_crc_errors;
|
||||
buf[bi++] = net_stats64.rx_frame_errors;
|
||||
buf[bi++] = net_stats64.tx_fifo_errors;
|
||||
|
||||
/* Get netif_queue_stopped from stack */
|
||||
bnad->stats.drv_stats.netif_queue_stopped = netif_queue_stopped(netdev);
|
||||
|
||||
@@ -419,8 +419,8 @@ struct link_config {
|
||||
unsigned short supported; /* link capabilities */
|
||||
unsigned short advertising; /* advertised capabilities */
|
||||
unsigned short lp_advertising; /* peer advertised capabilities */
|
||||
unsigned short requested_speed; /* speed user has requested */
|
||||
unsigned short speed; /* actual link speed */
|
||||
unsigned int requested_speed; /* speed user has requested */
|
||||
unsigned int speed; /* actual link speed */
|
||||
unsigned char requested_fc; /* flow control user has requested */
|
||||
unsigned char fc; /* actual link flow control */
|
||||
unsigned char autoneg; /* autonegotiating? */
|
||||
|
||||
@@ -4305,10 +4305,17 @@ static const struct pci_error_handlers cxgb4_eeh = {
|
||||
.resume = eeh_resume,
|
||||
};
|
||||
|
||||
/* Return true if the Link Configuration supports "High Speeds" (those greater
|
||||
* than 1Gb/s).
|
||||
*/
|
||||
static inline bool is_x_10g_port(const struct link_config *lc)
|
||||
{
|
||||
return (lc->supported & FW_PORT_CAP_SPEED_10G) != 0 ||
|
||||
(lc->supported & FW_PORT_CAP_SPEED_40G) != 0;
|
||||
unsigned int speeds, high_speeds;
|
||||
|
||||
speeds = FW_PORT_CAP_SPEED_V(FW_PORT_CAP_SPEED_G(lc->supported));
|
||||
high_speeds = speeds & ~(FW_PORT_CAP_SPEED_100M | FW_PORT_CAP_SPEED_1G);
|
||||
|
||||
return high_speeds != 0;
|
||||
}
|
||||
|
||||
static inline void init_rspq(struct adapter *adap, struct sge_rspq *q,
|
||||
@@ -4756,8 +4763,12 @@ static void print_port_info(const struct net_device *dev)
|
||||
bufp += sprintf(bufp, "1000/");
|
||||
if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_10G)
|
||||
bufp += sprintf(bufp, "10G/");
|
||||
if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_25G)
|
||||
bufp += sprintf(bufp, "25G/");
|
||||
if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_40G)
|
||||
bufp += sprintf(bufp, "40G/");
|
||||
if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_100G)
|
||||
bufp += sprintf(bufp, "100G/");
|
||||
if (bufp != buf)
|
||||
--bufp;
|
||||
sprintf(bufp, "BASE-%s", t4_get_port_type_description(pi->port_type));
|
||||
|
||||
@@ -3627,7 +3627,8 @@ void t4_ulprx_read_la(struct adapter *adap, u32 *la_buf)
|
||||
}
|
||||
|
||||
#define ADVERT_MASK (FW_PORT_CAP_SPEED_100M | FW_PORT_CAP_SPEED_1G |\
|
||||
FW_PORT_CAP_SPEED_10G | FW_PORT_CAP_SPEED_40G | \
|
||||
FW_PORT_CAP_SPEED_10G | FW_PORT_CAP_SPEED_25G | \
|
||||
FW_PORT_CAP_SPEED_40G | FW_PORT_CAP_SPEED_100G | \
|
||||
FW_PORT_CAP_ANEG)
|
||||
|
||||
/**
|
||||
@@ -7196,8 +7197,12 @@ void t4_handle_get_port_info(struct port_info *pi, const __be64 *rpl)
|
||||
speed = 1000;
|
||||
else if (stat & FW_PORT_CMD_LSPEED_V(FW_PORT_CAP_SPEED_10G))
|
||||
speed = 10000;
|
||||
else if (stat & FW_PORT_CMD_LSPEED_V(FW_PORT_CAP_SPEED_25G))
|
||||
speed = 25000;
|
||||
else if (stat & FW_PORT_CMD_LSPEED_V(FW_PORT_CAP_SPEED_40G))
|
||||
speed = 40000;
|
||||
else if (stat & FW_PORT_CMD_LSPEED_V(FW_PORT_CAP_SPEED_100G))
|
||||
speed = 100000;
|
||||
|
||||
lc = &pi->link_cfg;
|
||||
|
||||
|
||||
@@ -2265,6 +2265,12 @@ enum fw_port_cap {
|
||||
FW_PORT_CAP_802_3_ASM_DIR = 0x8000,
|
||||
};
|
||||
|
||||
#define FW_PORT_CAP_SPEED_S 0
|
||||
#define FW_PORT_CAP_SPEED_M 0x3f
|
||||
#define FW_PORT_CAP_SPEED_V(x) ((x) << FW_PORT_CAP_SPEED_S)
|
||||
#define FW_PORT_CAP_SPEED_G(x) \
|
||||
(((x) >> FW_PORT_CAP_SPEED_S) & FW_PORT_CAP_SPEED_M)
|
||||
|
||||
enum fw_port_mdi {
|
||||
FW_PORT_CAP_MDI_UNCHANGED,
|
||||
FW_PORT_CAP_MDI_AUTO,
|
||||
|
||||
@@ -108,8 +108,8 @@ struct link_config {
|
||||
unsigned int supported; /* link capabilities */
|
||||
unsigned int advertising; /* advertised capabilities */
|
||||
unsigned short lp_advertising; /* peer advertised capabilities */
|
||||
unsigned short requested_speed; /* speed user has requested */
|
||||
unsigned short speed; /* actual link speed */
|
||||
unsigned int requested_speed; /* speed user has requested */
|
||||
unsigned int speed; /* actual link speed */
|
||||
unsigned char requested_fc; /* flow control user has requested */
|
||||
unsigned char fc; /* actual link flow control */
|
||||
unsigned char autoneg; /* autonegotiating? */
|
||||
@@ -271,10 +271,17 @@ static inline bool is_10g_port(const struct link_config *lc)
|
||||
return (lc->supported & FW_PORT_CAP_SPEED_10G) != 0;
|
||||
}
|
||||
|
||||
/* Return true if the Link Configuration supports "High Speeds" (those greater
|
||||
* than 1Gb/s).
|
||||
*/
|
||||
static inline bool is_x_10g_port(const struct link_config *lc)
|
||||
{
|
||||
return (lc->supported & FW_PORT_CAP_SPEED_10G) != 0 ||
|
||||
(lc->supported & FW_PORT_CAP_SPEED_40G) != 0;
|
||||
unsigned int speeds, high_speeds;
|
||||
|
||||
speeds = FW_PORT_CAP_SPEED_V(FW_PORT_CAP_SPEED_G(lc->supported));
|
||||
high_speeds = speeds & ~(FW_PORT_CAP_SPEED_100M | FW_PORT_CAP_SPEED_1G);
|
||||
|
||||
return high_speeds != 0;
|
||||
}
|
||||
|
||||
static inline unsigned int core_ticks_per_usec(const struct adapter *adapter)
|
||||
|
||||
@@ -314,8 +314,9 @@ int t4vf_wr_mbox_core(struct adapter *adapter, const void *cmd, int size,
|
||||
}
|
||||
|
||||
#define ADVERT_MASK (FW_PORT_CAP_SPEED_100M | FW_PORT_CAP_SPEED_1G |\
|
||||
FW_PORT_CAP_SPEED_10G | FW_PORT_CAP_SPEED_40G | \
|
||||
FW_PORT_CAP_SPEED_100G | FW_PORT_CAP_ANEG)
|
||||
FW_PORT_CAP_SPEED_10G | FW_PORT_CAP_SPEED_25G | \
|
||||
FW_PORT_CAP_SPEED_40G | FW_PORT_CAP_SPEED_100G | \
|
||||
FW_PORT_CAP_ANEG)
|
||||
|
||||
/**
|
||||
* init_link_config - initialize a link's SW state
|
||||
@@ -1712,8 +1713,12 @@ int t4vf_handle_fw_rpl(struct adapter *adapter, const __be64 *rpl)
|
||||
speed = 1000;
|
||||
else if (stat & FW_PORT_CMD_LSPEED_V(FW_PORT_CAP_SPEED_10G))
|
||||
speed = 10000;
|
||||
else if (stat & FW_PORT_CMD_LSPEED_V(FW_PORT_CAP_SPEED_25G))
|
||||
speed = 25000;
|
||||
else if (stat & FW_PORT_CMD_LSPEED_V(FW_PORT_CAP_SPEED_40G))
|
||||
speed = 40000;
|
||||
else if (stat & FW_PORT_CMD_LSPEED_V(FW_PORT_CAP_SPEED_100G))
|
||||
speed = 100000;
|
||||
|
||||
/*
|
||||
* Scan all of our "ports" (Virtual Interfaces) looking for
|
||||
|
||||
@@ -977,7 +977,37 @@ static void emac_set_multicast_list(struct net_device *ndev)
|
||||
dev->mcast_pending = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
mutex_lock(&dev->link_lock);
|
||||
__emac_set_multicast_list(dev);
|
||||
mutex_unlock(&dev->link_lock);
|
||||
}
|
||||
|
||||
static int emac_set_mac_address(struct net_device *ndev, void *sa)
|
||||
{
|
||||
struct emac_instance *dev = netdev_priv(ndev);
|
||||
struct sockaddr *addr = sa;
|
||||
struct emac_regs __iomem *p = dev->emacp;
|
||||
|
||||
if (!is_valid_ether_addr(addr->sa_data))
|
||||
return -EADDRNOTAVAIL;
|
||||
|
||||
mutex_lock(&dev->link_lock);
|
||||
|
||||
memcpy(ndev->dev_addr, addr->sa_data, ndev->addr_len);
|
||||
|
||||
emac_rx_disable(dev);
|
||||
emac_tx_disable(dev);
|
||||
out_be32(&p->iahr, (ndev->dev_addr[0] << 8) | ndev->dev_addr[1]);
|
||||
out_be32(&p->ialr, (ndev->dev_addr[2] << 24) |
|
||||
(ndev->dev_addr[3] << 16) | (ndev->dev_addr[4] << 8) |
|
||||
ndev->dev_addr[5]);
|
||||
emac_tx_enable(dev);
|
||||
emac_rx_enable(dev);
|
||||
|
||||
mutex_unlock(&dev->link_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int emac_resize_rx_ring(struct emac_instance *dev, int new_mtu)
|
||||
@@ -2686,7 +2716,7 @@ static const struct net_device_ops emac_netdev_ops = {
|
||||
.ndo_do_ioctl = emac_ioctl,
|
||||
.ndo_tx_timeout = emac_tx_timeout,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
.ndo_set_mac_address = eth_mac_addr,
|
||||
.ndo_set_mac_address = emac_set_mac_address,
|
||||
.ndo_start_xmit = emac_start_xmit,
|
||||
.ndo_change_mtu = eth_change_mtu,
|
||||
};
|
||||
@@ -2699,7 +2729,7 @@ static const struct net_device_ops emac_gige_netdev_ops = {
|
||||
.ndo_do_ioctl = emac_ioctl,
|
||||
.ndo_tx_timeout = emac_tx_timeout,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
.ndo_set_mac_address = eth_mac_addr,
|
||||
.ndo_set_mac_address = emac_set_mac_address,
|
||||
.ndo_start_xmit = emac_start_xmit_sg,
|
||||
.ndo_change_mtu = emac_change_mtu,
|
||||
};
|
||||
|
||||
@@ -1923,6 +1923,7 @@ const struct of_device_id of_mtk_match[] = {
|
||||
{ .compatible = "mediatek,mt7623-eth" },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, of_mtk_match);
|
||||
|
||||
static struct platform_driver mtk_driver = {
|
||||
.probe = mtk_probe,
|
||||
|
||||
@@ -1305,8 +1305,8 @@ int mlx4_init_eq_table(struct mlx4_dev *dev)
|
||||
return 0;
|
||||
|
||||
err_out_unmap:
|
||||
while (i >= 0)
|
||||
mlx4_free_eq(dev, &priv->eq_table.eq[i--]);
|
||||
while (i > 0)
|
||||
mlx4_free_eq(dev, &priv->eq_table.eq[--i]);
|
||||
#ifdef CONFIG_RFS_ACCEL
|
||||
for (i = 1; i <= dev->caps.num_ports; i++) {
|
||||
if (mlx4_priv(dev)->port[i].rmap) {
|
||||
|
||||
@@ -2970,6 +2970,7 @@ static int mlx4_init_port_info(struct mlx4_dev *dev, int port)
|
||||
mlx4_err(dev, "Failed to create mtu file for port %d\n", port);
|
||||
device_remove_file(&info->dev->persist->pdev->dev,
|
||||
&info->port_attr);
|
||||
devlink_port_unregister(&info->devlink_port);
|
||||
info->port = -1;
|
||||
}
|
||||
|
||||
@@ -2984,6 +2985,8 @@ static void mlx4_cleanup_port_info(struct mlx4_port_info *info)
|
||||
device_remove_file(&info->dev->persist->pdev->dev, &info->port_attr);
|
||||
device_remove_file(&info->dev->persist->pdev->dev,
|
||||
&info->port_mtu_attr);
|
||||
devlink_port_unregister(&info->devlink_port);
|
||||
|
||||
#ifdef CONFIG_RFS_ACCEL
|
||||
free_irq_cpu_rmap(info->rmap);
|
||||
info->rmap = NULL;
|
||||
|
||||
@@ -1554,6 +1554,7 @@ int mlx5_eswitch_enable_sriov(struct mlx5_eswitch *esw, int nvfs, int mode)
|
||||
|
||||
abort:
|
||||
esw_enable_vport(esw, 0, UC_ADDR_CHANGE);
|
||||
esw->mode = SRIOV_NONE;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
@@ -446,7 +446,7 @@ out:
|
||||
|
||||
static int esw_offloads_start(struct mlx5_eswitch *esw)
|
||||
{
|
||||
int err, num_vfs = esw->dev->priv.sriov.num_vfs;
|
||||
int err, err1, num_vfs = esw->dev->priv.sriov.num_vfs;
|
||||
|
||||
if (esw->mode != SRIOV_LEGACY) {
|
||||
esw_warn(esw->dev, "Can't set offloads mode, SRIOV legacy not enabled\n");
|
||||
@@ -455,8 +455,12 @@ static int esw_offloads_start(struct mlx5_eswitch *esw)
|
||||
|
||||
mlx5_eswitch_disable_sriov(esw);
|
||||
err = mlx5_eswitch_enable_sriov(esw, num_vfs, SRIOV_OFFLOADS);
|
||||
if (err)
|
||||
esw_warn(esw->dev, "Failed set eswitch to offloads, err %d\n", err);
|
||||
if (err) {
|
||||
esw_warn(esw->dev, "Failed setting eswitch to offloads, err %d\n", err);
|
||||
err1 = mlx5_eswitch_enable_sriov(esw, num_vfs, SRIOV_LEGACY);
|
||||
if (err1)
|
||||
esw_warn(esw->dev, "Failed setting eswitch back to legacy, err %d\n", err);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -508,12 +512,16 @@ create_ft_err:
|
||||
|
||||
static int esw_offloads_stop(struct mlx5_eswitch *esw)
|
||||
{
|
||||
int err, num_vfs = esw->dev->priv.sriov.num_vfs;
|
||||
int err, err1, num_vfs = esw->dev->priv.sriov.num_vfs;
|
||||
|
||||
mlx5_eswitch_disable_sriov(esw);
|
||||
err = mlx5_eswitch_enable_sriov(esw, num_vfs, SRIOV_LEGACY);
|
||||
if (err)
|
||||
esw_warn(esw->dev, "Failed set eswitch legacy mode. err %d\n", err);
|
||||
if (err) {
|
||||
esw_warn(esw->dev, "Failed setting eswitch to legacy, err %d\n", err);
|
||||
err1 = mlx5_eswitch_enable_sriov(esw, num_vfs, SRIOV_OFFLOADS);
|
||||
if (err1)
|
||||
esw_warn(esw->dev, "Failed setting eswitch back to offloads, err %d\n", err);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -425,11 +425,11 @@ struct mlx5_cmd_fc_bulk *
|
||||
mlx5_cmd_fc_bulk_alloc(struct mlx5_core_dev *dev, u16 id, int num)
|
||||
{
|
||||
struct mlx5_cmd_fc_bulk *b;
|
||||
int outlen = sizeof(*b) +
|
||||
int outlen =
|
||||
MLX5_ST_SZ_BYTES(query_flow_counter_out) +
|
||||
MLX5_ST_SZ_BYTES(traffic_counter) * num;
|
||||
|
||||
b = kzalloc(outlen, GFP_KERNEL);
|
||||
b = kzalloc(sizeof(*b) + outlen, GFP_KERNEL);
|
||||
if (!b)
|
||||
return NULL;
|
||||
|
||||
|
||||
@@ -2044,12 +2044,16 @@ static int nfp_net_netdev_open(struct net_device *netdev)
|
||||
|
||||
nn->rx_rings = kcalloc(nn->num_rx_rings, sizeof(*nn->rx_rings),
|
||||
GFP_KERNEL);
|
||||
if (!nn->rx_rings)
|
||||
if (!nn->rx_rings) {
|
||||
err = -ENOMEM;
|
||||
goto err_free_lsc;
|
||||
}
|
||||
nn->tx_rings = kcalloc(nn->num_tx_rings, sizeof(*nn->tx_rings),
|
||||
GFP_KERNEL);
|
||||
if (!nn->tx_rings)
|
||||
if (!nn->tx_rings) {
|
||||
err = -ENOMEM;
|
||||
goto err_free_rx_rings;
|
||||
}
|
||||
|
||||
for (r = 0; r < nn->num_r_vecs; r++) {
|
||||
err = nfp_net_prepare_vector(nn, &nn->r_vecs[r], r);
|
||||
|
||||
@@ -1153,8 +1153,8 @@ qed_mcp_send_drv_version(struct qed_hwfn *p_hwfn,
|
||||
p_drv_version = &union_data.drv_version;
|
||||
p_drv_version->version = p_ver->version;
|
||||
|
||||
for (i = 0; i < MCP_DRV_VER_STR_SIZE - 1; i += 4) {
|
||||
val = cpu_to_be32(p_ver->name[i]);
|
||||
for (i = 0; i < (MCP_DRV_VER_STR_SIZE - 4) / sizeof(u32); i++) {
|
||||
val = cpu_to_be32(*((u32 *)&p_ver->name[i * sizeof(u32)]));
|
||||
*(__be32 *)&p_drv_version->name[i * sizeof(u32)] = val;
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user