Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 214753
b: refs/heads/master
c: 5cf42fc
h: refs/heads/master
i:
  214751: 5297b90
v: v3
  • Loading branch information
Jesse Brandeburg authored and David S. Miller committed Sep 23, 2010
1 parent f8b78ad commit 0e3a1de
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7b872a55c40b7e6f5e257c252f96dde911bd7b2f
refs/heads/master: 5cf42fcda0fdddfe7f5ea8629cb7b820bf7e91ab
3 changes: 3 additions & 0 deletions trunk/drivers/net/e1000/e1000.h
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,9 @@ struct e1000_adapter {
int need_ioport;

bool discarding;

struct work_struct fifo_stall_task;
struct work_struct phy_info_task;
};

enum e1000_state_t {
Expand Down
25 changes: 24 additions & 1 deletion trunk/drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,10 @@ static void e1000_clean_rx_ring(struct e1000_adapter *adapter,
struct e1000_rx_ring *rx_ring);
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_watchdog(unsigned long data);
static void e1000_82547_tx_fifo_stall(unsigned long data);
static void e1000_82547_tx_fifo_stall_task(struct work_struct *work);
static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
struct net_device *netdev);
static struct net_device_stats * e1000_get_stats(struct net_device *netdev);
Expand Down Expand Up @@ -1047,7 +1049,9 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
adapter->phy_info_timer.function = e1000_update_phy_info;
adapter->phy_info_timer.data = (unsigned long)adapter;

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

e1000_check_options(adapter);

Expand Down Expand Up @@ -2234,6 +2238,14 @@ static void e1000_set_rx_mode(struct net_device *netdev)
static void e1000_update_phy_info(unsigned long data)
{
struct e1000_adapter *adapter = (struct e1000_adapter *)data;
schedule_work(&adapter->phy_info_task);
}

static void e1000_update_phy_info_task(struct work_struct *work)
{
struct e1000_adapter *adapter = container_of(work,
struct e1000_adapter,
phy_info_task);
struct e1000_hw *hw = &adapter->hw;
e1000_phy_get_info(hw, &adapter->phy_info);
}
Expand All @@ -2242,10 +2254,21 @@ static void e1000_update_phy_info(unsigned long data)
* 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);
}

/**
* e1000_82547_tx_fifo_stall_task - task to complete work
* @work: work struct contained inside adapter struct
**/
static void e1000_82547_tx_fifo_stall_task(struct work_struct *work)
{
struct e1000_adapter *adapter = container_of(work,
struct e1000_adapter,
fifo_stall_task);
struct e1000_hw *hw = &adapter->hw;
struct net_device *netdev = adapter->netdev;
u32 tctl;
Expand Down

0 comments on commit 0e3a1de

Please sign in to comment.