Re: [PATCH 0/8] gianfar: Add support for hibernation
From: Andy Fleming Date: Tue, 13 Oct 2009 12:22:38 -0500 > No, it was fine (though made unnecessary by other patches). The BD > has a union: > > struct { > u16 status; /* Status Fields */ > u16 length; /* Buffer length */ > }; > u32 lstatus; > > so when you write "lstatus", you need to use the BD_LFLAG() macro, but > when you write "status", you are just setting the status bits. Indeed I missed that, thanks. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 0/8] gianfar: Add support for hibernation
On Oct 13, 2009, at 1:57 AM, David Miller wrote: From: Anton Vorontsov Date: Mon, 12 Oct 2009 20:00:00 +0400 Here are few patches that add support for hibernation for gianfar driver. Technically, we could just do gfar_close() and then gfar_enet_open() sequence to restore gianfar functionality after hibernation, but close/open does so many unneeded things (e.g. BDs buffers freeing and allocation, IRQ freeing and requesting), that I felt it would be much better to cleanup and refactor some code to make the hibernation [and not only hibernation] code a little bit prettier. I applied all of this, it's a really nice patch set. If there are any problems we can deal with it using follow-on fixups. I noticed something, in patch #3 where you remove the spurious wrap bit setting in startup_gfar(). It looks like that was not only spurious but it was doing it wrong too. It's writing garbage into the status word, because it's not using the BD_LFLAG() macro to shift the value up 16 bits. No, it was fine (though made unnecessary by other patches). The BD has a union: struct { u16 status; /* Status Fields */ u16 length; /* Buffer length */ }; u32 lstatus; so when you write "lstatus", you need to use the BD_LFLAG() macro, but when you write "status", you are just setting the status bits. Andy ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 0/8] gianfar: Add support for hibernation
From: Anton Vorontsov Date: Mon, 12 Oct 2009 20:00:00 +0400 > Here are few patches that add support for hibernation for gianfar > driver. > > Technically, we could just do gfar_close() and then gfar_enet_open() > sequence to restore gianfar functionality after hibernation, but > close/open does so many unneeded things (e.g. BDs buffers freeing and > allocation, IRQ freeing and requesting), that I felt it would be much > better to cleanup and refactor some code to make the hibernation [and > not only hibernation] code a little bit prettier. I applied all of this, it's a really nice patch set. If there are any problems we can deal with it using follow-on fixups. I noticed something, in patch #3 where you remove the spurious wrap bit setting in startup_gfar(). It looks like that was not only spurious but it was doing it wrong too. It's writing garbage into the status word, because it's not using the BD_LFLAG() macro to shift the value up 16 bits. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 0/8] gianfar: Add support for hibernation
Hi all, Here are few patches that add support for hibernation for gianfar driver. Technically, we could just do gfar_close() and then gfar_enet_open() sequence to restore gianfar functionality after hibernation, but close/open does so many unneeded things (e.g. BDs buffers freeing and allocation, IRQ freeing and requesting), that I felt it would be much better to cleanup and refactor some code to make the hibernation [and not only hibernation] code a little bit prettier. Patches on the way... Thanks, -- Anton Vorontsov email: cbouatmai...@gmail.com irc://irc.freenode.net/bd2 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev