Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5b1d8cd authored by David S. Miller's avatar David S. Miller
Browse files
parents 5d6bcdfe ebe42d16
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -214,9 +214,6 @@ struct e1000_rx_ring {
/* board specific private data structure */
/* board specific private data structure */


struct e1000_adapter {
struct e1000_adapter {
	struct timer_list tx_fifo_stall_timer;
	struct timer_list watchdog_timer;
	struct timer_list phy_info_timer;
	unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
	unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
	u16 mng_vlan_id;
	u16 mng_vlan_id;
	u32 bd_number;
	u32 bd_number;
@@ -237,7 +234,6 @@ struct e1000_adapter {
	u16 tx_itr;
	u16 tx_itr;
	u16 rx_itr;
	u16 rx_itr;


	struct work_struct reset_task;
	u8 fc_autoneg;
	u8 fc_autoneg;


	/* TX */
	/* TX */
@@ -310,8 +306,12 @@ struct e1000_adapter {


	bool discarding;
	bool discarding;


	struct work_struct fifo_stall_task;
	struct work_struct reset_task;
	struct work_struct phy_info_task;
	struct delayed_work watchdog_task;
	struct delayed_work fifo_stall_task;
	struct delayed_work phy_info_task;

	struct mutex mutex;
};
};


enum e1000_state_t {
enum e1000_state_t {
+11 −11
Original line number Original line Diff line number Diff line
@@ -5385,7 +5385,7 @@ static s32 e1000_config_dsp_after_link_change(struct e1000_hw *hw, bool link_up)
			if (ret_val)
			if (ret_val)
				return ret_val;
				return ret_val;


			mdelay(20);
			msleep(20);


			ret_val = e1000_write_phy_reg(hw, 0x0000,
			ret_val = e1000_write_phy_reg(hw, 0x0000,
						      IGP01E1000_IEEE_FORCE_GIGA);
						      IGP01E1000_IEEE_FORCE_GIGA);
@@ -5413,7 +5413,7 @@ static s32 e1000_config_dsp_after_link_change(struct e1000_hw *hw, bool link_up)
			if (ret_val)
			if (ret_val)
				return ret_val;
				return ret_val;


			mdelay(20);
			msleep(20);


			/* Now enable the transmitter */
			/* Now enable the transmitter */
			ret_val =
			ret_val =
@@ -5440,7 +5440,7 @@ static s32 e1000_config_dsp_after_link_change(struct e1000_hw *hw, bool link_up)
			if (ret_val)
			if (ret_val)
				return ret_val;
				return ret_val;


			mdelay(20);
			msleep(20);


			ret_val = e1000_write_phy_reg(hw, 0x0000,
			ret_val = e1000_write_phy_reg(hw, 0x0000,
						      IGP01E1000_IEEE_FORCE_GIGA);
						      IGP01E1000_IEEE_FORCE_GIGA);
@@ -5457,7 +5457,7 @@ static s32 e1000_config_dsp_after_link_change(struct e1000_hw *hw, bool link_up)
			if (ret_val)
			if (ret_val)
				return ret_val;
				return ret_val;


			mdelay(20);
			msleep(20);


			/* Now enable the transmitter */
			/* Now enable the transmitter */
			ret_val =
			ret_val =
@@ -5750,26 +5750,26 @@ static s32 e1000_polarity_reversal_workaround(struct e1000_hw *hw)


		if ((mii_status_reg & ~MII_SR_LINK_STATUS) == 0)
		if ((mii_status_reg & ~MII_SR_LINK_STATUS) == 0)
			break;
			break;
		mdelay(100);
		msleep(100);
	}
	}


	/* Recommended delay time after link has been lost */
	/* Recommended delay time after link has been lost */
	mdelay(1000);
	msleep(1000);


	/* Now we will re-enable th transmitter on the PHY */
	/* Now we will re-enable th transmitter on the PHY */


	ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_PAGE_SELECT, 0x0019);
	ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_PAGE_SELECT, 0x0019);
	if (ret_val)
	if (ret_val)
		return ret_val;
		return ret_val;
	mdelay(50);
	msleep(50);
	ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xFFF0);
	ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xFFF0);
	if (ret_val)
	if (ret_val)
		return ret_val;
		return ret_val;
	mdelay(50);
	msleep(50);
	ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xFF00);
	ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xFF00);
	if (ret_val)
	if (ret_val)
		return ret_val;
		return ret_val;
	mdelay(50);
	msleep(50);
	ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0x0000);
	ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0x0000);
	if (ret_val)
	if (ret_val)
		return ret_val;
		return ret_val;
@@ -5794,7 +5794,7 @@ static s32 e1000_polarity_reversal_workaround(struct e1000_hw *hw)


		if (mii_status_reg & MII_SR_LINK_STATUS)
		if (mii_status_reg & MII_SR_LINK_STATUS)
			break;
			break;
		mdelay(100);
		msleep(100);
	}
	}
	return E1000_SUCCESS;
	return E1000_SUCCESS;
}
}
@@ -5825,6 +5825,6 @@ static s32 e1000_get_auto_rd_done(struct e1000_hw *hw)
static s32 e1000_get_phy_cfg_done(struct e1000_hw *hw)
static s32 e1000_get_phy_cfg_done(struct e1000_hw *hw)
{
{
	e_dbg("e1000_get_phy_cfg_done");
	e_dbg("e1000_get_phy_cfg_done");
	mdelay(10);
	msleep(10);
	return E1000_SUCCESS;
	return E1000_SUCCESS;
}
}
+81 −88
Original line number Original line Diff line number Diff line
@@ -131,10 +131,8 @@ static void e1000_clean_tx_ring(struct e1000_adapter *adapter,
static void e1000_clean_rx_ring(struct e1000_adapter *adapter,
static void e1000_clean_rx_ring(struct e1000_adapter *adapter,
                                struct e1000_rx_ring *rx_ring);
                                struct e1000_rx_ring *rx_ring);
static void e1000_set_rx_mode(struct net_device *netdev);
static void e1000_set_rx_mode(struct net_device *netdev);
static void e1000_update_phy_info(unsigned long data);
static void e1000_update_phy_info_task(struct work_struct *work);
static void e1000_update_phy_info_task(struct work_struct *work);
static void e1000_watchdog(unsigned long data);
static void e1000_watchdog(struct work_struct *work);
static void e1000_82547_tx_fifo_stall(unsigned long data);
static void e1000_82547_tx_fifo_stall_task(struct work_struct *work);
static void e1000_82547_tx_fifo_stall_task(struct work_struct *work);
static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
				    struct net_device *netdev);
				    struct net_device *netdev);
@@ -487,12 +485,21 @@ static void e1000_power_down_phy(struct e1000_adapter *adapter)
		e1000_read_phy_reg(hw, PHY_CTRL, &mii_reg);
		e1000_read_phy_reg(hw, PHY_CTRL, &mii_reg);
		mii_reg |= MII_CR_POWER_DOWN;
		mii_reg |= MII_CR_POWER_DOWN;
		e1000_write_phy_reg(hw, PHY_CTRL, mii_reg);
		e1000_write_phy_reg(hw, PHY_CTRL, mii_reg);
		mdelay(1);
		msleep(1);
	}
	}
out:
out:
	return;
	return;
}
}


static void e1000_down_and_stop(struct e1000_adapter *adapter)
{
	set_bit(__E1000_DOWN, &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)
void e1000_down(struct e1000_adapter *adapter)
{
{
	struct e1000_hw *hw = &adapter->hw;
	struct e1000_hw *hw = &adapter->hw;
@@ -522,13 +529,9 @@ void e1000_down(struct e1000_adapter *adapter)
	/*
	/*
	 * Setting DOWN must be after irq_disable to prevent
	 * Setting DOWN must be after irq_disable to prevent
	 * a screaming interrupt.  Setting DOWN also prevents
	 * a screaming interrupt.  Setting DOWN also prevents
	 * timers and tasks from rescheduling.
	 * tasks from rescheduling.
	 */
	 */
	set_bit(__E1000_DOWN, &adapter->flags);
	e1000_down_and_stop(adapter);

	del_timer_sync(&adapter->tx_fifo_stall_timer);
	del_timer_sync(&adapter->watchdog_timer);
	del_timer_sync(&adapter->phy_info_timer);


	adapter->link_speed = 0;
	adapter->link_speed = 0;
	adapter->link_duplex = 0;
	adapter->link_duplex = 0;
@@ -543,10 +546,10 @@ static void e1000_reinit_safe(struct e1000_adapter *adapter)
{
{
	while (test_and_set_bit(__E1000_RESETTING, &adapter->flags))
	while (test_and_set_bit(__E1000_RESETTING, &adapter->flags))
		msleep(1);
		msleep(1);
	rtnl_lock();
	mutex_lock(&adapter->mutex);
	e1000_down(adapter);
	e1000_down(adapter);
	e1000_up(adapter);
	e1000_up(adapter);
	rtnl_unlock();
	mutex_unlock(&adapter->mutex);
	clear_bit(__E1000_RESETTING, &adapter->flags);
	clear_bit(__E1000_RESETTING, &adapter->flags);
}
}


@@ -1120,21 +1123,12 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
	if (!is_valid_ether_addr(netdev->perm_addr))
	if (!is_valid_ether_addr(netdev->perm_addr))
		e_err(probe, "Invalid MAC Address\n");
		e_err(probe, "Invalid MAC Address\n");


	init_timer(&adapter->tx_fifo_stall_timer);
	adapter->tx_fifo_stall_timer.function = e1000_82547_tx_fifo_stall;
	adapter->tx_fifo_stall_timer.data = (unsigned long)adapter;

	init_timer(&adapter->watchdog_timer);
	adapter->watchdog_timer.function = e1000_watchdog;
	adapter->watchdog_timer.data = (unsigned long) adapter;


	init_timer(&adapter->phy_info_timer);
	INIT_DELAYED_WORK(&adapter->watchdog_task, e1000_watchdog);
	adapter->phy_info_timer.function = e1000_update_phy_info;
	INIT_DELAYED_WORK(&adapter->fifo_stall_task,
	adapter->phy_info_timer.data = (unsigned long)adapter;
			  e1000_82547_tx_fifo_stall_task);

	INIT_DELAYED_WORK(&adapter->phy_info_task, e1000_update_phy_info_task);
	INIT_WORK(&adapter->fifo_stall_task, e1000_82547_tx_fifo_stall_task);
	INIT_WORK(&adapter->reset_task, e1000_reset_task);
	INIT_WORK(&adapter->reset_task, e1000_reset_task);
	INIT_WORK(&adapter->phy_info_task, e1000_update_phy_info_task);


	e1000_check_options(adapter);
	e1000_check_options(adapter);


@@ -1279,13 +1273,7 @@ static void __devexit e1000_remove(struct pci_dev *pdev)
	struct e1000_adapter *adapter = netdev_priv(netdev);
	struct e1000_adapter *adapter = netdev_priv(netdev);
	struct e1000_hw *hw = &adapter->hw;
	struct e1000_hw *hw = &adapter->hw;


	set_bit(__E1000_DOWN, &adapter->flags);
	e1000_down_and_stop(adapter);
	del_timer_sync(&adapter->tx_fifo_stall_timer);
	del_timer_sync(&adapter->watchdog_timer);
	del_timer_sync(&adapter->phy_info_timer);

	cancel_work_sync(&adapter->reset_task);

	e1000_release_manageability(adapter);
	e1000_release_manageability(adapter);


	unregister_netdev(netdev);
	unregister_netdev(netdev);
@@ -1329,6 +1317,7 @@ static int __devinit e1000_sw_init(struct e1000_adapter *adapter)
	e1000_irq_disable(adapter);
	e1000_irq_disable(adapter);


	spin_lock_init(&adapter->stats_lock);
	spin_lock_init(&adapter->stats_lock);
	mutex_init(&adapter->mutex);


	set_bit(__E1000_DOWN, &adapter->flags);
	set_bit(__E1000_DOWN, &adapter->flags);


@@ -1369,7 +1358,7 @@ static int __devinit e1000_alloc_queues(struct e1000_adapter *adapter)
 * The open entry point is called when a network interface is made
 * The open entry point is called when a network interface is made
 * active by the system (IFF_UP).  At this point all resources needed
 * active by the system (IFF_UP).  At this point all resources needed
 * for transmit and receive operations are allocated, the interrupt
 * for transmit and receive operations are allocated, the interrupt
 * handler is registered with the OS, the watchdog timer is started,
 * handler is registered with the OS, the watchdog task is started,
 * and the stack is notified that the interface is ready.
 * and the stack is notified that the interface is ready.
 **/
 **/


@@ -2331,35 +2320,23 @@ static void e1000_set_rx_mode(struct net_device *netdev)
	kfree(mcarray);
	kfree(mcarray);
}
}


/* Need to wait a few seconds after link up to get diagnostic information from
/**
 * the phy */
 * e1000_update_phy_info_task - get phy info

 * @work: work struct contained inside adapter struct
static void e1000_update_phy_info(unsigned long data)
 *
{
 * Need to wait a few seconds after link up to get diagnostic information from
	struct e1000_adapter *adapter = (struct e1000_adapter *)data;
 * the phy
	schedule_work(&adapter->phy_info_task);
 */
}

static void e1000_update_phy_info_task(struct work_struct *work)
static void e1000_update_phy_info_task(struct work_struct *work)
{
{
	struct e1000_adapter *adapter = container_of(work,
	struct e1000_adapter *adapter = container_of(work,
						     struct e1000_adapter,
						     struct e1000_adapter,
	                                             phy_info_task);
						     phy_info_task.work);
	struct e1000_hw *hw = &adapter->hw;
	if (test_bit(__E1000_DOWN, &adapter->flags))

		return;
	rtnl_lock();
	mutex_lock(&adapter->mutex);
	e1000_phy_get_info(hw, &adapter->phy_info);
	e1000_phy_get_info(&adapter->hw, &adapter->phy_info);
	rtnl_unlock();
	mutex_unlock(&adapter->mutex);
}

/**
 * e1000_82547_tx_fifo_stall - Timer Call-back
 * @data: pointer to adapter cast into an unsigned long
 **/
static void e1000_82547_tx_fifo_stall(unsigned long data)
{
	struct e1000_adapter *adapter = (struct e1000_adapter *)data;
	schedule_work(&adapter->fifo_stall_task);
}
}


/**
/**
@@ -2370,12 +2347,14 @@ static void e1000_82547_tx_fifo_stall_task(struct work_struct *work)
{
{
	struct e1000_adapter *adapter = container_of(work,
	struct e1000_adapter *adapter = container_of(work,
						     struct e1000_adapter,
						     struct e1000_adapter,
	                                             fifo_stall_task);
						     fifo_stall_task.work);
	struct e1000_hw *hw = &adapter->hw;
	struct e1000_hw *hw = &adapter->hw;
	struct net_device *netdev = adapter->netdev;
	struct net_device *netdev = adapter->netdev;
	u32 tctl;
	u32 tctl;


	rtnl_lock();
	if (test_bit(__E1000_DOWN, &adapter->flags))
		return;
	mutex_lock(&adapter->mutex);
	if (atomic_read(&adapter->tx_fifo_stall)) {
	if (atomic_read(&adapter->tx_fifo_stall)) {
		if ((er32(TDT) == er32(TDH)) &&
		if ((er32(TDT) == er32(TDH)) &&
		   (er32(TDFT) == er32(TDFH)) &&
		   (er32(TDFT) == er32(TDFH)) &&
@@ -2393,10 +2372,10 @@ static void e1000_82547_tx_fifo_stall_task(struct work_struct *work)
			atomic_set(&adapter->tx_fifo_stall, 0);
			atomic_set(&adapter->tx_fifo_stall, 0);
			netif_wake_queue(netdev);
			netif_wake_queue(netdev);
		} else if (!test_bit(__E1000_DOWN, &adapter->flags)) {
		} else if (!test_bit(__E1000_DOWN, &adapter->flags)) {
			mod_timer(&adapter->tx_fifo_stall_timer, jiffies + 1);
			schedule_delayed_work(&adapter->fifo_stall_task, 1);
		}
		}
	}
	}
	rtnl_unlock();
	mutex_unlock(&adapter->mutex);
}
}


bool e1000_has_link(struct e1000_adapter *adapter)
bool e1000_has_link(struct e1000_adapter *adapter)
@@ -2437,17 +2416,23 @@ bool e1000_has_link(struct e1000_adapter *adapter)
}
}


/**
/**
 * e1000_watchdog - Timer Call-back
 * e1000_watchdog - work function
 * @data: pointer to adapter cast into an unsigned long
 * @work: work struct contained inside adapter struct
 **/
 **/
static void e1000_watchdog(unsigned long data)
static void e1000_watchdog(struct work_struct *work)
{
{
	struct e1000_adapter *adapter = (struct e1000_adapter *)data;
	struct e1000_adapter *adapter = container_of(work,
						     struct e1000_adapter,
						     watchdog_task.work);
	struct e1000_hw *hw = &adapter->hw;
	struct e1000_hw *hw = &adapter->hw;
	struct net_device *netdev = adapter->netdev;
	struct net_device *netdev = adapter->netdev;
	struct e1000_tx_ring *txdr = adapter->tx_ring;
	struct e1000_tx_ring *txdr = adapter->tx_ring;
	u32 link, tctl;
	u32 link, tctl;


	if (test_bit(__E1000_DOWN, &adapter->flags))
		return;

	mutex_lock(&adapter->mutex);
	link = e1000_has_link(adapter);
	link = e1000_has_link(adapter);
	if ((netif_carrier_ok(netdev)) && link)
	if ((netif_carrier_ok(netdev)) && link)
		goto link_up;
		goto link_up;
@@ -2493,8 +2478,8 @@ static void e1000_watchdog(unsigned long data)


			netif_carrier_on(netdev);
			netif_carrier_on(netdev);
			if (!test_bit(__E1000_DOWN, &adapter->flags))
			if (!test_bit(__E1000_DOWN, &adapter->flags))
				mod_timer(&adapter->phy_info_timer,
				schedule_delayed_work(&adapter->phy_info_task,
				          round_jiffies(jiffies + 2 * HZ));
						      2 * HZ);
			adapter->smartspeed = 0;
			adapter->smartspeed = 0;
		}
		}
	} else {
	} else {
@@ -2506,8 +2491,8 @@ static void e1000_watchdog(unsigned long data)
			netif_carrier_off(netdev);
			netif_carrier_off(netdev);


			if (!test_bit(__E1000_DOWN, &adapter->flags))
			if (!test_bit(__E1000_DOWN, &adapter->flags))
				mod_timer(&adapter->phy_info_timer,
				schedule_delayed_work(&adapter->phy_info_task,
				          round_jiffies(jiffies + 2 * HZ));
						      2 * HZ);
		}
		}


		e1000_smartspeed(adapter);
		e1000_smartspeed(adapter);
@@ -2536,8 +2521,8 @@ static void e1000_watchdog(unsigned long data)
			 * (Do the reset outside of interrupt context). */
			 * (Do the reset outside of interrupt context). */
			adapter->tx_timeout_count++;
			adapter->tx_timeout_count++;
			schedule_work(&adapter->reset_task);
			schedule_work(&adapter->reset_task);
			/* return immediately since reset is imminent */
			/* exit immediately since reset is imminent */
			return;
			goto unlock;
		}
		}
	}
	}


@@ -2563,10 +2548,12 @@ static void e1000_watchdog(unsigned long data)
	/* Force detection of hung controller every watchdog period */
	/* Force detection of hung controller every watchdog period */
	adapter->detect_tx_hung = true;
	adapter->detect_tx_hung = true;


	/* Reset the timer */
	/* Reschedule the task */
	if (!test_bit(__E1000_DOWN, &adapter->flags))
	if (!test_bit(__E1000_DOWN, &adapter->flags))
		mod_timer(&adapter->watchdog_timer,
		schedule_delayed_work(&adapter->watchdog_task, 2 * HZ);
		          round_jiffies(jiffies + 2 * HZ));

unlock:
	mutex_unlock(&adapter->mutex);
}
}


enum latency_range {
enum latency_range {
@@ -3206,15 +3193,13 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
	if (unlikely(e1000_maybe_stop_tx(netdev, tx_ring, count + 2)))
	if (unlikely(e1000_maybe_stop_tx(netdev, tx_ring, count + 2)))
		return NETDEV_TX_BUSY;
		return NETDEV_TX_BUSY;


	if (unlikely(hw->mac_type == e1000_82547)) {
	if (unlikely((hw->mac_type == e1000_82547) &&
		if (unlikely(e1000_82547_fifo_workaround(adapter, skb))) {
		     (e1000_82547_fifo_workaround(adapter, skb)))) {
		netif_stop_queue(netdev);
		netif_stop_queue(netdev);
		if (!test_bit(__E1000_DOWN, &adapter->flags))
		if (!test_bit(__E1000_DOWN, &adapter->flags))
				mod_timer(&adapter->tx_fifo_stall_timer,
			schedule_delayed_work(&adapter->fifo_stall_task, 1);
				          jiffies + 1);
		return NETDEV_TX_BUSY;
		return NETDEV_TX_BUSY;
	}
	}
	}


	if (vlan_tx_tag_present(skb)) {
	if (vlan_tx_tag_present(skb)) {
		tx_flags |= E1000_TX_FLAGS_VLAN;
		tx_flags |= E1000_TX_FLAGS_VLAN;
@@ -3275,6 +3260,8 @@ static void e1000_reset_task(struct work_struct *work)
	struct e1000_adapter *adapter =
	struct e1000_adapter *adapter =
		container_of(work, struct e1000_adapter, reset_task);
		container_of(work, struct e1000_adapter, reset_task);


	if (test_bit(__E1000_DOWN, &adapter->flags))
		return;
	e1000_reinit_safe(adapter);
	e1000_reinit_safe(adapter);
}
}


@@ -3283,7 +3270,7 @@ static void e1000_reset_task(struct work_struct *work)
 * @netdev: network interface device structure
 * @netdev: network interface device structure
 *
 *
 * Returns the address of the device statistics structure.
 * Returns the address of the device statistics structure.
 * The statistics are actually updated from the timer callback.
 * The statistics are actually updated from the watchdog.
 **/
 **/


static struct net_device_stats *e1000_get_stats(struct net_device *netdev)
static struct net_device_stats *e1000_get_stats(struct net_device *netdev)
@@ -3551,7 +3538,7 @@ static irqreturn_t e1000_intr(int irq, void *data)
		hw->get_link_status = 1;
		hw->get_link_status = 1;
		/* guard against interrupt when we're going down */
		/* guard against interrupt when we're going down */
		if (!test_bit(__E1000_DOWN, &adapter->flags))
		if (!test_bit(__E1000_DOWN, &adapter->flags))
			mod_timer(&adapter->watchdog_timer, jiffies + 1);
			schedule_delayed_work(&adapter->watchdog_task, 1);
	}
	}


	/* disable interrupts, without the synchronize_irq bit */
	/* disable interrupts, without the synchronize_irq bit */
@@ -4729,6 +4716,8 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool *enable_wake)


	netif_device_detach(netdev);
	netif_device_detach(netdev);


	mutex_lock(&adapter->mutex);

	if (netif_running(netdev)) {
	if (netif_running(netdev)) {
		WARN_ON(test_bit(__E1000_RESETTING, &adapter->flags));
		WARN_ON(test_bit(__E1000_RESETTING, &adapter->flags));
		e1000_down(adapter);
		e1000_down(adapter);
@@ -4736,8 +4725,10 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool *enable_wake)


#ifdef CONFIG_PM
#ifdef CONFIG_PM
	retval = pci_save_state(pdev);
	retval = pci_save_state(pdev);
	if (retval)
	if (retval) {
		mutex_unlock(&adapter->mutex);
		return retval;
		return retval;
	}
#endif
#endif


	status = er32(STATUS);
	status = er32(STATUS);
@@ -4792,6 +4783,8 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool *enable_wake)
	if (netif_running(netdev))
	if (netif_running(netdev))
		e1000_free_irq(adapter);
		e1000_free_irq(adapter);


	mutex_unlock(&adapter->mutex);

	pci_disable_device(pdev);
	pci_disable_device(pdev);


	return 0;
	return 0;
+1 −1
Original line number Original line Diff line number Diff line
@@ -1578,7 +1578,7 @@ s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable)
		ret_val = e1e_wphy(hw, PHY_REG(776, 20), data);
		ret_val = e1e_wphy(hw, PHY_REG(776, 20), data);
		if (ret_val)
		if (ret_val)
			goto out;
			goto out;
		ret_val = e1e_wphy(hw, PHY_REG(776, 23), 0xFE00);
		ret_val = e1e_wphy(hw, PHY_REG(776, 23), 0xF100);
		if (ret_val)
		if (ret_val)
			goto out;
			goto out;
		e1e_rphy(hw, HV_PM_CTRL, &data);
		e1e_rphy(hw, HV_PM_CTRL, &data);
+2 −0
Original line number Original line Diff line number Diff line
@@ -130,7 +130,9 @@ union e1000_adv_tx_desc {
#define E1000_ADVTXD_MAC_TSTAMP   0x00080000 /* IEEE1588 Timestamp packet */
#define E1000_ADVTXD_MAC_TSTAMP   0x00080000 /* IEEE1588 Timestamp packet */
#define E1000_ADVTXD_DTYP_CTXT    0x00200000 /* Advanced Context Descriptor */
#define E1000_ADVTXD_DTYP_CTXT    0x00200000 /* Advanced Context Descriptor */
#define E1000_ADVTXD_DTYP_DATA    0x00300000 /* Advanced Data Descriptor */
#define E1000_ADVTXD_DTYP_DATA    0x00300000 /* Advanced Data Descriptor */
#define E1000_ADVTXD_DCMD_EOP     0x01000000 /* End of Packet */
#define E1000_ADVTXD_DCMD_IFCS    0x02000000 /* Insert FCS (Ethernet CRC) */
#define E1000_ADVTXD_DCMD_IFCS    0x02000000 /* Insert FCS (Ethernet CRC) */
#define E1000_ADVTXD_DCMD_RS      0x08000000 /* Report Status */
#define E1000_ADVTXD_DCMD_DEXT    0x20000000 /* Descriptor extension (1=Adv) */
#define E1000_ADVTXD_DCMD_DEXT    0x20000000 /* Descriptor extension (1=Adv) */
#define E1000_ADVTXD_DCMD_VLE     0x40000000 /* VLAN pkt enable */
#define E1000_ADVTXD_DCMD_VLE     0x40000000 /* VLAN pkt enable */
#define E1000_ADVTXD_DCMD_TSE     0x80000000 /* TCP Seg enable */
#define E1000_ADVTXD_DCMD_TSE     0x80000000 /* TCP Seg enable */
Loading