Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66642
b: refs/heads/master
c: 496a34c
h: refs/heads/master
v: v3
  • Loading branch information
Bryan Wu authored and David S. Miller committed Oct 10, 2007
1 parent f523f8f commit 5453f29
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 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: 73f83182862a2c9113421720997c75ee939902f8
refs/heads/master: 496a34c2249fecc87ee689eede2bb8510c1b37a9
23 changes: 19 additions & 4 deletions trunk/drivers/net/bfin_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ static void bf537mac_poll(struct net_device *dev)
}
#endif /* CONFIG_NET_POLL_CONTROLLER */

static void bf537mac_reset(void)
static void bf537mac_disable(void)
{
unsigned int opmode;

Expand Down Expand Up @@ -730,7 +730,7 @@ static void bf537mac_timeout(struct net_device *dev)
{
pr_debug("%s: %s\n", dev->name, __FUNCTION__);

bf537mac_reset();
bf537mac_disable();

/* reset tx queue */
tx_list_tail = tx_list_head->next;
Expand Down Expand Up @@ -810,7 +810,7 @@ static int bf537mac_open(struct net_device *dev)

bf537mac_setphy(dev);
setup_system_regs(dev);
bf537mac_reset();
bf537mac_disable();
bf537mac_enable(dev);

pr_debug("hardware init finished\n");
Expand Down Expand Up @@ -968,15 +968,30 @@ static int bfin_mac_remove(struct platform_device *pdev)
return 0;
}

static int bfin_mac_suspend(struct platform_device *pdev, pm_message_t state)
#ifdef CONFIG_PM
static int bfin_mac_suspend(struct platform_device *pdev, pm_message_t mesg)
{
struct net_device *net_dev = platform_get_drvdata(pdev);

if (netif_running(net_dev))
bf537mac_close(net_dev);

return 0;
}

static int bfin_mac_resume(struct platform_device *pdev)
{
struct net_device *net_dev = platform_get_drvdata(pdev);

if (netif_running(net_dev))
bf537mac_open(net_dev);

return 0;
}
#else
#define bfin_mac_suspend NULL
#define bfin_mac_resume NULL
#endif /* CONFIG_PM */

static struct platform_driver bfin_mac_driver = {
.probe = bfin_mac_probe,
Expand Down

0 comments on commit 5453f29

Please sign in to comment.