[PATCH] powerpc: ibmveth: Harden driver initilisation for kexec

Michael Ellerman michael at ellerman.id.au
Fri Mar 3 13:11:56 EST 2006


On Fri, 3 Mar 2006 12:04, Jeff Garzik wrote:
> Santiago Leon wrote:
> > From: Michael Ellerman <michael at ellerman.id.au>
> >
> > After a kexec the veth driver will fail when trying to register with the
> > Hypervisor because the previous kernel has not unregistered.
> >
> > So if the registration fails, we unregister and then try again.
> >
> > Signed-off-by: Michael Ellerman <michael at ellerman.id.au>
> > Acked-by: Anton Blanchard <anton at samba.org>
> > Signed-off-by: Santiago Leon <santil at us.ibm.com>
> > ---
> >
> >  drivers/net/ibmveth.c |   32 ++++++++++++++++++++++++++------
> >  1 files changed, 26 insertions(+), 6 deletions(-)
> >
> > Looks good to me, and has been around for a couple of months.
>
> This seems completely bonkers to me:
>
> 	are resources available?
> 	if no
> 		free resources
> 		try again

I'm not sure I follow, are you suggesting we do the h_free_logical_lan() 
unconditionally, followed by h_register_logical_lan() ??

If that's what you mean, I didn't do it that way because it would effect the 
normal code path. This patch only modifies the behaviour if we fail to 
register the adapter. I'm much more comfortable changing the failure case 
than the default.

cheers

-- 
Michael Ellerman
IBM OzLabs

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20060303/b9cd998a/attachment.pgp 


More information about the Linuxppc64-dev mailing list