Subject: Re: [git patches] net driver fixes

From: [email-masked] (Thomas Bogendoerfer)
Date: Tue, 16 Sep 2008 17:21:48 +0200

On Tue, Sep 16, 2008 at 07:48:02AM -0700, Arjan van de Ven wrote:
> not sure; just we need to catch doing pci_disable_device on a
> non-enabled device as a WARN_ON.

the pci_disable_device() is done on an enabled device, so your
new WARN_ON wouldn't trigger.

> and the patch looks quite wrong, the real answer should be to do the
> enable in open() :-)

I thought about the solution, but the pci device is completely setup
and enabled in the init function so disabling it at that point and
enabling it in open() again sounds silly to me. pci_enable_enable/disable
is already done in .init/.remove and .suspend/.resume, so it looked
more obviuos to not let close() do the pci_disable_device().

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea.                                                [ RFC1925, 2.3 ]