Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63153
b: refs/heads/master
c: cb84d6e
h: refs/heads/master
i:
  63151: 2aa3688
v: v3
  • Loading branch information
Greg Ungerer authored and Linus Torvalds committed Jul 30, 2007
1 parent 7dfae7a commit 270b5ad
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 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: f0d3464f5cd1002ad5c1f1116cc84a8815c41476
refs/heads/master: cb84d6e7ad10bd679df1787a1fc9624432a73317
17 changes: 11 additions & 6 deletions trunk/drivers/net/fec.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ struct fec_enet_private {
/* Hardware registers of the FEC device */
volatile fec_t *hwp;

struct net_device *netdev;

/* The saved address of a sent-in-place packet/buffer, for skfree(). */
unsigned char *tx_bounce[TX_RING_SIZE];
struct sk_buff* tx_skbuff[TX_RING_SIZE];
Expand Down Expand Up @@ -1939,9 +1941,10 @@ static void mii_display_status(struct net_device *dev)
printk(".\n");
}

static void mii_display_config(struct net_device *dev)
static void mii_display_config(struct work_struct *work)
{
struct fec_enet_private *fep = netdev_priv(dev);
struct fec_enet_private *fep = container_of(work, struct fec_enet_private, phy_task);
struct net_device *dev = fep->netdev;
uint status = fep->phy_status;

/*
Expand Down Expand Up @@ -1975,9 +1978,10 @@ static void mii_display_config(struct net_device *dev)
fep->sequence_done = 1;
}

static void mii_relink(struct net_device *dev)
static void mii_relink(struct work_struct *work)
{
struct fec_enet_private *fep = netdev_priv(dev);
struct fec_enet_private *fep = container_of(work, struct fec_enet_private, phy_task);
struct net_device *dev = fep->netdev;
int duplex;

/*
Expand Down Expand Up @@ -2021,7 +2025,7 @@ static void mii_queue_relink(uint mii_reg, struct net_device *dev)
return;

fep->mii_phy_task_queued = 1;
INIT_WORK(&fep->phy_task, (void*)mii_relink, dev);
INIT_WORK(&fep->phy_task, mii_relink);
schedule_work(&fep->phy_task);
}

Expand All @@ -2034,7 +2038,7 @@ static void mii_queue_config(uint mii_reg, struct net_device *dev)
return;

fep->mii_phy_task_queued = 1;
INIT_WORK(&fep->phy_task, (void*)mii_display_config, dev);
INIT_WORK(&fep->phy_task, mii_display_config);
schedule_work(&fep->phy_task);
}

Expand Down Expand Up @@ -2329,6 +2333,7 @@ int __init fec_enet_init(struct net_device *dev)

fep->index = index;
fep->hwp = fecp;
fep->netdev = dev;

/* Whack a reset. We should wait for this.
*/
Expand Down

0 comments on commit 270b5ad

Please sign in to comment.