[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m18wybqooh.fsf@frodo.ebiederm.org>
Date: Thu, 15 May 2008 13:48:14 -0700
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Alan Stern <stern@...land.harvard.edu>
Cc: "Huang, Ying" <ying.huang@...el.com>, <nigel@...el.suspend2.net>,
Kexec Mailing List <kexec@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
<linux-pm@...ts.linux-foundation.org>,
Vivek Goyal <vgoyal@...hat.com>
Subject: Re: [linux-pm] [PATCH -mm] kexec jump -v9
Alan Stern <stern@...land.harvard.edu> writes:
> On Wed, 14 May 2008, Eric W. Biederman wrote:
>
>> My take on the situation is this. For proper handling we
>> need driver device_detach and device_reattach methods.
>>
>> With the following semantics. The device_detach methods
>> will disable DMA and place the hardware in a sane state
>> from which the device driver can reclaim and reinitialize it,
>> but the hardware will not be touched.
>>
>> device_reattach reattaches the driver to the hardware.
>
> How would these differ from the already-existing remove and probe
> methods?
Honestly I would like for them not to, and they should be
proper factors of the remove and probe methods.
However we have a fundamental gotcha that we need to handle.
Logical abstractions on physical devices.
i.e. How do we handle the case of a filesystem on a block
device, when we remove the block device and then read it.
We have two choices.
1) We go through the pain of teaching the upper layers in the
kernel of how to deal with hotplug and then we are sane
when someone removes a usb stick accidentally before
unmounting it and then reinserts the usb stick.
2) Teach the drivers how to do just the lower have of hotplug/remove.
In which case with the driver still present and presenting it's
upper layer queues we have the driver relinquish it's hardware
and then later check to see if it's hardware is still present
and reinitialize it.
I don't know if anyone has looked at moving this to an upper layer.
Definitely a question worth asking. The simpler we can make this
for driver authors the better. Especially as that will make
the drivers more maintainable long term.
Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists