Re: [PATCH 07/10] macb: Basic suspend/resume support

From: Haavard Skinnemoen
Date: Thu Mar 13 2008 - 16:28:25 EST


On Thu, 13 Mar 2008 12:18:56 -0800
David Brownell <david-b@xxxxxxxxxxx> wrote:

> On Thursday 13 March 2008, Haavard Skinnemoen wrote:
> > ---
> > drivers/net/macb.c | 37 +++++++++++++++++++++++++++++++++++++
> > 1 files changed, 37 insertions(+), 0 deletions(-)
>
> Shouldn't this look more like the suspend/resume support
> in drivers/net/arm/at91_ether.c ? I don't see calls to
> netif_stop_queue()/netif_start_queue(), among other things.

Could be, although netif_stop_queue()/netif_start_queue() is done by
netif_device_detach() and netif_device_attach() respectively.

We should probably shut things down gracefully as well...not nice to
disable the clock when the MAC is in the middle of transmitting a
frame. Like I said in the introductory mail, this patch is just a quick
hack to prevent the macb from waking the system prematurely.

> The fact that this driver leaves the peripheral clocked
> when it's not open is a minor PM goof; ditto not using
> the PHY irq to track connect/disconnect. But that's just
> general PM stuff, not specific to suspend/resume support.

Right, it's on my todo list.

Haavard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/