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 updates from David Miller:
"Here is a pile of bug fixes that accumulated while I was in Europe"
1) In fixing kernel leaks to userspace during copying of socket
addresses, we broke a case that used to work, namely the user
providing a buffer larger than the in-kernel generic socket address
structure. This broke Ruby amongst other things. Fix from Dan
Carpenter.
2) Fix regression added by byte queue limit support in 8139cp driver,
from Yang Yingliang.
3) The addition of MSG_SENDPAGE_NOTLAST buggered up a few sendpage
implementations, they should just treat it the same as MSG_MORE.
Fix from Richard Weinberger and Shawn Landden.
4) Handle icmpv4 errors received on ipv6 SIT tunnels correctly, from
Oussama Ghorbel. In particular we should send an ICMPv6 unreachable
in such situations.
5) Fix some regressions in the recent genetlink fixes, in particular
get the pmcraid driver to use the new safer interfaces correctly.
From Johannes Berg.
6) macvtap was converted to use a per-cpu set of statistics, but some
code was still bumping tx_dropped elsewhere. From Jason Wang.
7) Fix build failure of xen-netback due to missing include on some
architectures, from Andy Whitecroft.
8) macvtap double counts received packets in statistics, fix from Vlad
Yasevich.
9) Fix various cases of using *_STATS_BH() when *_STATS() is more
appropriate. From Eric Dumazet and Hannes Frederic Sowa.
10) Pktgen ipsec mode doesn't update the ipv4 header length and checksum
properly after encapsulation. Fix from Fan Du.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (61 commits)
net/mlx4_en: Remove selftest TX queues empty condition
{pktgen, xfrm} Update IPv4 header total len and checksum after tranformation
virtio_net: make all RX paths handle erors consistently
virtio_net: fix error handling for mergeable buffers
virtio_net: Fixed a trivial typo (fitler --> filter)
netem: fix gemodel loss generator
netem: fix loss 4 state model
netem: missing break in ge loss generator
net/hsr: Support iproute print_opt ('ip -details ...')
net/hsr: Very small fix of comment style.
MAINTAINERS: Added net/hsr/ maintainer
ipv6: fix possible seqlock deadlock in ip6_finish_output2
ixgbe: Make ixgbe_identify_qsfp_module_generic static
ixgbe: turn NETIF_F_HW_L2FW_DOFFLOAD off by default
ixgbe: ixgbe_fwd_ring_down needs to be static
e1000: fix possible reset_task running after adapter down
e1000: fix lockdep warning in e1000_reset_task
e1000: prevent oops when adapter is being closed and reset simultaneously
igb: Fixed Wake On LAN support
inet: fix possible seqlock deadlocks
...
This commit is contained in:
@@ -4049,6 +4049,12 @@ W: http://www.pharscape.org
|
||||
S: Maintained
|
||||
F: drivers/net/usb/hso.c
|
||||
|
||||
HSR NETWORK PROTOCOL
|
||||
M: Arvid Brodin <arvid.brodin@alten.se>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: net/hsr/
|
||||
|
||||
HTCPEN TOUCHSCREEN DRIVER
|
||||
M: Pau Oliva Fora <pof@eslack.org>
|
||||
L: linux-input@vger.kernel.org
|
||||
|
||||
@@ -114,6 +114,9 @@ static ssize_t hash_sendpage(struct socket *sock, struct page *page,
|
||||
struct hash_ctx *ctx = ask->private;
|
||||
int err;
|
||||
|
||||
if (flags & MSG_SENDPAGE_NOTLAST)
|
||||
flags |= MSG_MORE;
|
||||
|
||||
lock_sock(sk);
|
||||
sg_init_table(ctx->sgl.sg, 1);
|
||||
sg_set_page(ctx->sgl.sg, page, size, offset);
|
||||
|
||||
@@ -378,6 +378,9 @@ static ssize_t skcipher_sendpage(struct socket *sock, struct page *page,
|
||||
struct skcipher_sg_list *sgl;
|
||||
int err = -EINVAL;
|
||||
|
||||
if (flags & MSG_SENDPAGE_NOTLAST)
|
||||
flags |= MSG_MORE;
|
||||
|
||||
lock_sock(sk);
|
||||
if (!ctx->more && ctx->used)
|
||||
goto unlock;
|
||||
|
||||
@@ -4110,7 +4110,7 @@ static int bond_check_params(struct bond_params *params)
|
||||
if (!miimon) {
|
||||
pr_warning("Warning: miimon must be specified, otherwise bonding will not detect link failure, speed and duplex which are essential for 802.3ad operation\n");
|
||||
pr_warning("Forcing miimon to 100msec\n");
|
||||
miimon = 100;
|
||||
miimon = BOND_DEFAULT_MIIMON;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4147,7 +4147,7 @@ static int bond_check_params(struct bond_params *params)
|
||||
if (!miimon) {
|
||||
pr_warning("Warning: miimon must be specified, otherwise bonding will not detect link failure and link speed which are essential for TLB/ALB load balancing\n");
|
||||
pr_warning("Forcing miimon to 100msec\n");
|
||||
miimon = 100;
|
||||
miimon = BOND_DEFAULT_MIIMON;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,10 +45,15 @@ int bond_option_mode_set(struct bonding *bond, int mode)
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
if (BOND_MODE_IS_LB(mode) && bond->params.arp_interval) {
|
||||
pr_err("%s: %s mode is incompatible with arp monitoring.\n",
|
||||
bond->dev->name, bond_mode_tbl[mode].modename);
|
||||
return -EINVAL;
|
||||
if (BOND_NO_USES_ARP(mode) && bond->params.arp_interval) {
|
||||
pr_info("%s: %s mode is incompatible with arp monitoring, start mii monitoring\n",
|
||||
bond->dev->name, bond_mode_tbl[mode].modename);
|
||||
/* disable arp monitoring */
|
||||
bond->params.arp_interval = 0;
|
||||
/* set miimon to default value */
|
||||
bond->params.miimon = BOND_DEFAULT_MIIMON;
|
||||
pr_info("%s: Setting MII monitoring interval to %d.\n",
|
||||
bond->dev->name, bond->params.miimon);
|
||||
}
|
||||
|
||||
/* don't cache arp_validate between modes */
|
||||
|
||||
@@ -523,9 +523,7 @@ static ssize_t bonding_store_arp_interval(struct device *d,
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
if (bond->params.mode == BOND_MODE_ALB ||
|
||||
bond->params.mode == BOND_MODE_TLB ||
|
||||
bond->params.mode == BOND_MODE_8023AD) {
|
||||
if (BOND_NO_USES_ARP(bond->params.mode)) {
|
||||
pr_info("%s: ARP monitoring cannot be used with ALB/TLB/802.3ad. Only MII monitoring is supported on %s.\n",
|
||||
bond->dev->name, bond->dev->name);
|
||||
ret = -EINVAL;
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
|
||||
#define BOND_MAX_ARP_TARGETS 16
|
||||
|
||||
#define BOND_DEFAULT_MIIMON 100
|
||||
|
||||
#define IS_UP(dev) \
|
||||
((((dev)->flags & IFF_UP) == IFF_UP) && \
|
||||
netif_running(dev) && \
|
||||
@@ -55,6 +57,11 @@
|
||||
((mode) == BOND_MODE_TLB) || \
|
||||
((mode) == BOND_MODE_ALB))
|
||||
|
||||
#define BOND_NO_USES_ARP(mode) \
|
||||
(((mode) == BOND_MODE_8023AD) || \
|
||||
((mode) == BOND_MODE_TLB) || \
|
||||
((mode) == BOND_MODE_ALB))
|
||||
|
||||
#define TX_QUEUE_OVERRIDE(mode) \
|
||||
(((mode) == BOND_MODE_ACTIVEBACKUP) || \
|
||||
((mode) == BOND_MODE_ROUNDROBIN))
|
||||
|
||||
@@ -712,22 +712,31 @@ static int c_can_set_mode(struct net_device *dev, enum can_mode mode)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int c_can_get_berr_counter(const struct net_device *dev,
|
||||
struct can_berr_counter *bec)
|
||||
static int __c_can_get_berr_counter(const struct net_device *dev,
|
||||
struct can_berr_counter *bec)
|
||||
{
|
||||
unsigned int reg_err_counter;
|
||||
struct c_can_priv *priv = netdev_priv(dev);
|
||||
|
||||
c_can_pm_runtime_get_sync(priv);
|
||||
|
||||
reg_err_counter = priv->read_reg(priv, C_CAN_ERR_CNT_REG);
|
||||
bec->rxerr = (reg_err_counter & ERR_CNT_REC_MASK) >>
|
||||
ERR_CNT_REC_SHIFT;
|
||||
bec->txerr = reg_err_counter & ERR_CNT_TEC_MASK;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int c_can_get_berr_counter(const struct net_device *dev,
|
||||
struct can_berr_counter *bec)
|
||||
{
|
||||
struct c_can_priv *priv = netdev_priv(dev);
|
||||
int err;
|
||||
|
||||
c_can_pm_runtime_get_sync(priv);
|
||||
err = __c_can_get_berr_counter(dev, bec);
|
||||
c_can_pm_runtime_put_sync(priv);
|
||||
|
||||
return 0;
|
||||
return err;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -754,6 +763,7 @@ static void c_can_do_tx(struct net_device *dev)
|
||||
if (!(val & (1 << (msg_obj_no - 1)))) {
|
||||
can_get_echo_skb(dev,
|
||||
msg_obj_no - C_CAN_MSG_OBJ_TX_FIRST);
|
||||
c_can_object_get(dev, 0, msg_obj_no, IF_COMM_ALL);
|
||||
stats->tx_bytes += priv->read_reg(priv,
|
||||
C_CAN_IFACE(MSGCTRL_REG, 0))
|
||||
& IF_MCONT_DLC_MASK;
|
||||
@@ -872,7 +882,7 @@ static int c_can_handle_state_change(struct net_device *dev,
|
||||
if (unlikely(!skb))
|
||||
return 0;
|
||||
|
||||
c_can_get_berr_counter(dev, &bec);
|
||||
__c_can_get_berr_counter(dev, &bec);
|
||||
reg_err_counter = priv->read_reg(priv, C_CAN_ERR_CNT_REG);
|
||||
rx_err_passive = (reg_err_counter & ERR_CNT_RP_MASK) >>
|
||||
ERR_CNT_RP_SHIFT;
|
||||
|
||||
@@ -1020,13 +1020,13 @@ static int flexcan_probe(struct platform_device *pdev)
|
||||
dev_err(&pdev->dev, "no ipg clock defined\n");
|
||||
return PTR_ERR(clk_ipg);
|
||||
}
|
||||
clock_freq = clk_get_rate(clk_ipg);
|
||||
|
||||
clk_per = devm_clk_get(&pdev->dev, "per");
|
||||
if (IS_ERR(clk_per)) {
|
||||
dev_err(&pdev->dev, "no per clock defined\n");
|
||||
return PTR_ERR(clk_per);
|
||||
}
|
||||
clock_freq = clk_get_rate(clk_per);
|
||||
}
|
||||
|
||||
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
|
||||
@@ -494,20 +494,20 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id)
|
||||
uint8_t isrc, status;
|
||||
int n = 0;
|
||||
|
||||
/* Shared interrupts and IRQ off? */
|
||||
if (priv->read_reg(priv, SJA1000_IER) == IRQ_OFF)
|
||||
return IRQ_NONE;
|
||||
|
||||
if (priv->pre_irq)
|
||||
priv->pre_irq(priv);
|
||||
|
||||
/* Shared interrupts and IRQ off? */
|
||||
if (priv->read_reg(priv, SJA1000_IER) == IRQ_OFF)
|
||||
goto out;
|
||||
|
||||
while ((isrc = priv->read_reg(priv, SJA1000_IR)) &&
|
||||
(n < SJA1000_MAX_IRQ)) {
|
||||
n++;
|
||||
|
||||
status = priv->read_reg(priv, SJA1000_SR);
|
||||
/* check for absent controller due to hw unplug */
|
||||
if (status == 0xFF && sja1000_is_absent(priv))
|
||||
return IRQ_NONE;
|
||||
goto out;
|
||||
|
||||
if (isrc & IRQ_WUI)
|
||||
netdev_warn(dev, "wakeup interrupt\n");
|
||||
@@ -535,7 +535,7 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id)
|
||||
status = priv->read_reg(priv, SJA1000_SR);
|
||||
/* check for absent controller */
|
||||
if (status == 0xFF && sja1000_is_absent(priv))
|
||||
return IRQ_NONE;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
if (isrc & (IRQ_DOI | IRQ_EI | IRQ_BEI | IRQ_EPI | IRQ_ALI)) {
|
||||
@@ -543,8 +543,9 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id)
|
||||
if (sja1000_err(dev, isrc, status))
|
||||
break;
|
||||
}
|
||||
n++;
|
||||
}
|
||||
|
||||
out:
|
||||
if (priv->post_irq)
|
||||
priv->post_irq(priv);
|
||||
|
||||
|
||||
@@ -10629,10 +10629,8 @@ static void tg3_sd_scan_scratchpad(struct tg3 *tp, struct tg3_ocir *ocir)
|
||||
static ssize_t tg3_show_temp(struct device *dev,
|
||||
struct device_attribute *devattr, char *buf)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(dev);
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
struct tg3 *tp = netdev_priv(netdev);
|
||||
struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
|
||||
struct tg3 *tp = dev_get_drvdata(dev);
|
||||
u32 temperature;
|
||||
|
||||
spin_lock_bh(&tp->lock);
|
||||
@@ -10650,29 +10648,25 @@ static SENSOR_DEVICE_ATTR(temp1_crit, S_IRUGO, tg3_show_temp, NULL,
|
||||
static SENSOR_DEVICE_ATTR(temp1_max, S_IRUGO, tg3_show_temp, NULL,
|
||||
TG3_TEMP_MAX_OFFSET);
|
||||
|
||||
static struct attribute *tg3_attributes[] = {
|
||||
static struct attribute *tg3_attrs[] = {
|
||||
&sensor_dev_attr_temp1_input.dev_attr.attr,
|
||||
&sensor_dev_attr_temp1_crit.dev_attr.attr,
|
||||
&sensor_dev_attr_temp1_max.dev_attr.attr,
|
||||
NULL
|
||||
};
|
||||
|
||||
static const struct attribute_group tg3_group = {
|
||||
.attrs = tg3_attributes,
|
||||
};
|
||||
ATTRIBUTE_GROUPS(tg3);
|
||||
|
||||
static void tg3_hwmon_close(struct tg3 *tp)
|
||||
{
|
||||
if (tp->hwmon_dev) {
|
||||
hwmon_device_unregister(tp->hwmon_dev);
|
||||
tp->hwmon_dev = NULL;
|
||||
sysfs_remove_group(&tp->pdev->dev.kobj, &tg3_group);
|
||||
}
|
||||
}
|
||||
|
||||
static void tg3_hwmon_open(struct tg3 *tp)
|
||||
{
|
||||
int i, err;
|
||||
int i;
|
||||
u32 size = 0;
|
||||
struct pci_dev *pdev = tp->pdev;
|
||||
struct tg3_ocir ocirs[TG3_SD_NUM_RECS];
|
||||
@@ -10690,18 +10684,11 @@ static void tg3_hwmon_open(struct tg3 *tp)
|
||||
if (!size)
|
||||
return;
|
||||
|
||||
/* Register hwmon sysfs hooks */
|
||||
err = sysfs_create_group(&pdev->dev.kobj, &tg3_group);
|
||||
if (err) {
|
||||
dev_err(&pdev->dev, "Cannot create sysfs group, aborting\n");
|
||||
return;
|
||||
}
|
||||
|
||||
tp->hwmon_dev = hwmon_device_register(&pdev->dev);
|
||||
tp->hwmon_dev = hwmon_device_register_with_groups(&pdev->dev, "tg3",
|
||||
tp, tg3_groups);
|
||||
if (IS_ERR(tp->hwmon_dev)) {
|
||||
tp->hwmon_dev = NULL;
|
||||
dev_err(&pdev->dev, "Cannot register hwmon device, aborting\n");
|
||||
sysfs_remove_group(&pdev->dev.kobj, &tg3_group);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -503,6 +503,7 @@ struct be_adapter {
|
||||
};
|
||||
|
||||
#define be_physfn(adapter) (!adapter->virtfn)
|
||||
#define be_virtfn(adapter) (adapter->virtfn)
|
||||
#define sriov_enabled(adapter) (adapter->num_vfs > 0)
|
||||
#define sriov_want(adapter) (be_physfn(adapter) && \
|
||||
(num_vfs || pci_num_vf(adapter->pdev)))
|
||||
|
||||
@@ -1032,6 +1032,13 @@ int be_cmd_cq_create(struct be_adapter *adapter, struct be_queue_info *cq,
|
||||
} else {
|
||||
req->hdr.version = 2;
|
||||
req->page_size = 1; /* 1 for 4K */
|
||||
|
||||
/* coalesce-wm field in this cmd is not relevant to Lancer.
|
||||
* Lancer uses COMMON_MODIFY_CQ to set this field
|
||||
*/
|
||||
if (!lancer_chip(adapter))
|
||||
AMAP_SET_BITS(struct amap_cq_context_v2, coalescwm,
|
||||
ctxt, coalesce_wm);
|
||||
AMAP_SET_BITS(struct amap_cq_context_v2, nodelay, ctxt,
|
||||
no_delay);
|
||||
AMAP_SET_BITS(struct amap_cq_context_v2, count, ctxt,
|
||||
|
||||
@@ -2658,8 +2658,8 @@ static int be_close(struct net_device *netdev)
|
||||
|
||||
be_roce_dev_close(adapter);
|
||||
|
||||
for_all_evt_queues(adapter, eqo, i) {
|
||||
if (adapter->flags & BE_FLAGS_NAPI_ENABLED) {
|
||||
if (adapter->flags & BE_FLAGS_NAPI_ENABLED) {
|
||||
for_all_evt_queues(adapter, eqo, i) {
|
||||
napi_disable(&eqo->napi);
|
||||
be_disable_busy_poll(eqo);
|
||||
}
|
||||
@@ -3253,12 +3253,10 @@ static int be_mac_setup(struct be_adapter *adapter)
|
||||
memcpy(mac, adapter->netdev->dev_addr, ETH_ALEN);
|
||||
}
|
||||
|
||||
/* On BE3 VFs this cmd may fail due to lack of privilege.
|
||||
* Ignore the failure as in this case pmac_id is fetched
|
||||
* in the IFACE_CREATE cmd.
|
||||
*/
|
||||
be_cmd_pmac_add(adapter, mac, adapter->if_handle,
|
||||
&adapter->pmac_id[0], 0);
|
||||
/* For BE3-R VFs, the PF programs the initial MAC address */
|
||||
if (!(BEx_chip(adapter) && be_virtfn(adapter)))
|
||||
be_cmd_pmac_add(adapter, mac, adapter->if_handle,
|
||||
&adapter->pmac_id[0], 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -4599,6 +4597,7 @@ static int be_suspend(struct pci_dev *pdev, pm_message_t state)
|
||||
if (adapter->wol)
|
||||
be_setup_wol(adapter, true);
|
||||
|
||||
be_intr_set(adapter, false);
|
||||
cancel_delayed_work_sync(&adapter->func_recovery_work);
|
||||
|
||||
netif_device_detach(netdev);
|
||||
@@ -4634,6 +4633,7 @@ static int be_resume(struct pci_dev *pdev)
|
||||
if (status)
|
||||
return status;
|
||||
|
||||
be_intr_set(adapter, true);
|
||||
/* tell fw we're ready to fire cmds */
|
||||
status = be_cmd_fw_init(adapter);
|
||||
if (status)
|
||||
|
||||
@@ -83,6 +83,11 @@ struct e1000_adapter;
|
||||
|
||||
#define E1000_MAX_INTR 10
|
||||
|
||||
/*
|
||||
* Count for polling __E1000_RESET condition every 10-20msec.
|
||||
*/
|
||||
#define E1000_CHECK_RESET_COUNT 50
|
||||
|
||||
/* TX/RX descriptor defines */
|
||||
#define E1000_DEFAULT_TXD 256
|
||||
#define E1000_MAX_TXD 256
|
||||
@@ -312,8 +317,6 @@ struct e1000_adapter {
|
||||
struct delayed_work watchdog_task;
|
||||
struct delayed_work fifo_stall_task;
|
||||
struct delayed_work phy_info_task;
|
||||
|
||||
struct mutex mutex;
|
||||
};
|
||||
|
||||
enum e1000_state_t {
|
||||
|
||||
@@ -494,13 +494,20 @@ static void e1000_down_and_stop(struct e1000_adapter *adapter)
|
||||
{
|
||||
set_bit(__E1000_DOWN, &adapter->flags);
|
||||
|
||||
cancel_delayed_work_sync(&adapter->watchdog_task);
|
||||
|
||||
/*
|
||||
* Since the watchdog task can reschedule other tasks, we should cancel
|
||||
* it first, otherwise we can run into the situation when a work is
|
||||
* still running after the adapter has been turned down.
|
||||
*/
|
||||
|
||||
cancel_delayed_work_sync(&adapter->phy_info_task);
|
||||
cancel_delayed_work_sync(&adapter->fifo_stall_task);
|
||||
|
||||
/* Only kill reset task if adapter is not resetting */
|
||||
if (!test_bit(__E1000_RESETTING, &adapter->flags))
|
||||
cancel_work_sync(&adapter->reset_task);
|
||||
|
||||
cancel_delayed_work_sync(&adapter->watchdog_task);
|
||||
cancel_delayed_work_sync(&adapter->phy_info_task);
|
||||
cancel_delayed_work_sync(&adapter->fifo_stall_task);
|
||||
}
|
||||
|
||||
void e1000_down(struct e1000_adapter *adapter)
|
||||
@@ -544,21 +551,8 @@ void e1000_down(struct e1000_adapter *adapter)
|
||||
e1000_clean_all_rx_rings(adapter);
|
||||
}
|
||||
|
||||
static void e1000_reinit_safe(struct e1000_adapter *adapter)
|
||||
{
|
||||
while (test_and_set_bit(__E1000_RESETTING, &adapter->flags))
|
||||
msleep(1);
|
||||
mutex_lock(&adapter->mutex);
|
||||
e1000_down(adapter);
|
||||
e1000_up(adapter);
|
||||
mutex_unlock(&adapter->mutex);
|
||||
clear_bit(__E1000_RESETTING, &adapter->flags);
|
||||
}
|
||||
|
||||
void e1000_reinit_locked(struct e1000_adapter *adapter)
|
||||
{
|
||||
/* if rtnl_lock is not held the call path is bogus */
|
||||
ASSERT_RTNL();
|
||||
WARN_ON(in_interrupt());
|
||||
while (test_and_set_bit(__E1000_RESETTING, &adapter->flags))
|
||||
msleep(1);
|
||||
@@ -1316,7 +1310,6 @@ static int e1000_sw_init(struct e1000_adapter *adapter)
|
||||
e1000_irq_disable(adapter);
|
||||
|
||||
spin_lock_init(&adapter->stats_lock);
|
||||
mutex_init(&adapter->mutex);
|
||||
|
||||
set_bit(__E1000_DOWN, &adapter->flags);
|
||||
|
||||
@@ -1440,6 +1433,10 @@ static int e1000_close(struct net_device *netdev)
|
||||
{
|
||||
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||
struct e1000_hw *hw = &adapter->hw;
|
||||
int count = E1000_CHECK_RESET_COUNT;
|
||||
|
||||
while (test_bit(__E1000_RESETTING, &adapter->flags) && count--)
|
||||
usleep_range(10000, 20000);
|
||||
|
||||
WARN_ON(test_bit(__E1000_RESETTING, &adapter->flags));
|
||||
e1000_down(adapter);
|
||||
@@ -2325,11 +2322,8 @@ static void e1000_update_phy_info_task(struct work_struct *work)
|
||||
struct e1000_adapter *adapter = container_of(work,
|
||||
struct e1000_adapter,
|
||||
phy_info_task.work);
|
||||
if (test_bit(__E1000_DOWN, &adapter->flags))
|
||||
return;
|
||||
mutex_lock(&adapter->mutex);
|
||||
|
||||
e1000_phy_get_info(&adapter->hw, &adapter->phy_info);
|
||||
mutex_unlock(&adapter->mutex);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2345,9 +2339,6 @@ static void e1000_82547_tx_fifo_stall_task(struct work_struct *work)
|
||||
struct net_device *netdev = adapter->netdev;
|
||||
u32 tctl;
|
||||
|
||||
if (test_bit(__E1000_DOWN, &adapter->flags))
|
||||
return;
|
||||
mutex_lock(&adapter->mutex);
|
||||
if (atomic_read(&adapter->tx_fifo_stall)) {
|
||||
if ((er32(TDT) == er32(TDH)) &&
|
||||
(er32(TDFT) == er32(TDFH)) &&
|
||||
@@ -2368,7 +2359,6 @@ static void e1000_82547_tx_fifo_stall_task(struct work_struct *work)
|
||||
schedule_delayed_work(&adapter->fifo_stall_task, 1);
|
||||
}
|
||||
}
|
||||
mutex_unlock(&adapter->mutex);
|
||||
}
|
||||
|
||||
bool e1000_has_link(struct e1000_adapter *adapter)
|
||||
@@ -2422,10 +2412,6 @@ static void e1000_watchdog(struct work_struct *work)
|
||||
struct e1000_tx_ring *txdr = adapter->tx_ring;
|
||||
u32 link, tctl;
|
||||
|
||||
if (test_bit(__E1000_DOWN, &adapter->flags))
|
||||
return;
|
||||
|
||||
mutex_lock(&adapter->mutex);
|
||||
link = e1000_has_link(adapter);
|
||||
if ((netif_carrier_ok(netdev)) && link)
|
||||
goto link_up;
|
||||
@@ -2516,7 +2502,7 @@ link_up:
|
||||
adapter->tx_timeout_count++;
|
||||
schedule_work(&adapter->reset_task);
|
||||
/* exit immediately since reset is imminent */
|
||||
goto unlock;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2544,9 +2530,6 @@ link_up:
|
||||
/* Reschedule the task */
|
||||
if (!test_bit(__E1000_DOWN, &adapter->flags))
|
||||
schedule_delayed_work(&adapter->watchdog_task, 2 * HZ);
|
||||
|
||||
unlock:
|
||||
mutex_unlock(&adapter->mutex);
|
||||
}
|
||||
|
||||
enum latency_range {
|
||||
@@ -3495,10 +3478,8 @@ static void e1000_reset_task(struct work_struct *work)
|
||||
struct e1000_adapter *adapter =
|
||||
container_of(work, struct e1000_adapter, reset_task);
|
||||
|
||||
if (test_bit(__E1000_DOWN, &adapter->flags))
|
||||
return;
|
||||
e_err(drv, "Reset adapter\n");
|
||||
e1000_reinit_safe(adapter);
|
||||
e1000_reinit_locked(adapter);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4963,6 +4944,11 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool *enable_wake)
|
||||
netif_device_detach(netdev);
|
||||
|
||||
if (netif_running(netdev)) {
|
||||
int count = E1000_CHECK_RESET_COUNT;
|
||||
|
||||
while (test_bit(__E1000_RESETTING, &adapter->flags) && count--)
|
||||
usleep_range(10000, 20000);
|
||||
|
||||
WARN_ON(test_bit(__E1000_RESETTING, &adapter->flags));
|
||||
e1000_down(adapter);
|
||||
}
|
||||
|
||||
@@ -2062,14 +2062,15 @@ static void igb_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
|
||||
{
|
||||
struct igb_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
wol->supported = WAKE_UCAST | WAKE_MCAST |
|
||||
WAKE_BCAST | WAKE_MAGIC |
|
||||
WAKE_PHY;
|
||||
wol->wolopts = 0;
|
||||
|
||||
if (!(adapter->flags & IGB_FLAG_WOL_SUPPORTED))
|
||||
return;
|
||||
|
||||
wol->supported = WAKE_UCAST | WAKE_MCAST |
|
||||
WAKE_BCAST | WAKE_MAGIC |
|
||||
WAKE_PHY;
|
||||
|
||||
/* apply any specific unsupported masks here */
|
||||
switch (adapter->hw.device_id) {
|
||||
default:
|
||||
|
||||
@@ -4251,8 +4251,8 @@ static void ixgbe_disable_fwd_ring(struct ixgbe_fwd_adapter *vadapter,
|
||||
rx_ring->l2_accel_priv = NULL;
|
||||
}
|
||||
|
||||
int ixgbe_fwd_ring_down(struct net_device *vdev,
|
||||
struct ixgbe_fwd_adapter *accel)
|
||||
static int ixgbe_fwd_ring_down(struct net_device *vdev,
|
||||
struct ixgbe_fwd_adapter *accel)
|
||||
{
|
||||
struct ixgbe_adapter *adapter = accel->real_adapter;
|
||||
unsigned int rxbase = accel->rx_base_queue;
|
||||
@@ -7986,10 +7986,9 @@ skip_sriov:
|
||||
NETIF_F_TSO |
|
||||
NETIF_F_TSO6 |
|
||||
NETIF_F_RXHASH |
|
||||
NETIF_F_RXCSUM |
|
||||
NETIF_F_HW_L2FW_DOFFLOAD;
|
||||
NETIF_F_RXCSUM;
|
||||
|
||||
netdev->hw_features = netdev->features;
|
||||
netdev->hw_features = netdev->features | NETIF_F_HW_L2FW_DOFFLOAD;
|
||||
|
||||
switch (adapter->hw.mac.type) {
|
||||
case ixgbe_mac_82599EB:
|
||||
|
||||
@@ -46,6 +46,7 @@ static bool ixgbe_get_i2c_data(u32 *i2cctl);
|
||||
static void ixgbe_i2c_bus_clear(struct ixgbe_hw *hw);
|
||||
static enum ixgbe_phy_type ixgbe_get_phy_type_from_id(u32 phy_id);
|
||||
static s32 ixgbe_get_phy_id(struct ixgbe_hw *hw);
|
||||
static s32 ixgbe_identify_qsfp_module_generic(struct ixgbe_hw *hw);
|
||||
|
||||
/**
|
||||
* ixgbe_identify_phy_generic - Get physical layer module
|
||||
@@ -1164,7 +1165,7 @@ err_read_i2c_eeprom:
|
||||
*
|
||||
* Searches for and identifies the QSFP module and assigns appropriate PHY type
|
||||
**/
|
||||
s32 ixgbe_identify_qsfp_module_generic(struct ixgbe_hw *hw)
|
||||
static s32 ixgbe_identify_qsfp_module_generic(struct ixgbe_hw *hw)
|
||||
{
|
||||
struct ixgbe_adapter *adapter = hw->back;
|
||||
s32 status = IXGBE_ERR_PHY_ADDR_INVALID;
|
||||
|
||||
@@ -145,7 +145,6 @@ s32 ixgbe_get_phy_firmware_version_generic(struct ixgbe_hw *hw,
|
||||
s32 ixgbe_reset_phy_nl(struct ixgbe_hw *hw);
|
||||
s32 ixgbe_identify_module_generic(struct ixgbe_hw *hw);
|
||||
s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw);
|
||||
s32 ixgbe_identify_qsfp_module_generic(struct ixgbe_hw *hw);
|
||||
s32 ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw,
|
||||
u16 *list_offset,
|
||||
u16 *data_offset);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user