lkml.org 
[lkml]   [2000]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] make my life easier ...
On Thu, 26 Oct 2000, Stephen Rothwell wrote:

> However, on the bus this morning, I though about this again and wondered
> that this may not the correct way to do this. What we actually want to
> power manage is the PCI device as a whole not each interface independantly,
> which I would assume is impossible anyway.

Wrong level at this point, IMHO.

> 2.4 provides another power management interface for PCI drivers - the
> suspend and resume elements of the pci_driver struct. These have
> the advantage of the driver being called in the correct order with
> respect to power being removed/resumed to the bus that the device
> is actually hanging off. Unfortunately, the IDE code does not use
> the "new" (quoted from Documentation/pci.txt) pci_register_driver
> interface.
>
> Also, the suspend/resume logic should include code to actually turn
> the device off and on.

If you do this we may end up deregistering the device and unless APM can
remember everything the devices/drives may be lost.

> Where do we go from here?

First we thank Mark Lord for putting to 'C' what I was banging on for a
while.

I thinkered with this with a hotswap ATA-model and have the bases, but I
do not want to fill either driver with boat loads of code that will be
deleted in 2.5 when I rewrite mine. One of the issues to include is
bay-swapping that is critical for the testing. This then falls back upon
the bases of hotswap device and not just disks.

Here is the event path that I think will work.

APM signals ATA/IDE to goto sleep.
IDE then records and buffers the setup of the host and device.
IDE forces device and host to PIO 0 (imortant step, explain later)
IDE issues spindown and sleep task-command.
IDE returns to APM with success/failure.
success, sets request_queue blocker flag (very critical)

APM catches signal and calls for WAKEUP to IDE.
IDE issues soft-device rest to get attention of device. (nukes all settings)
If supported a channel reset of the HOST also. (even better nuking)

while (twiddle thumbs)
IDE issues check-power-1 and check-power-2 task-command, until.
IDE waits for device ready response.
HOST and Device are assumed to be in PIO 0 and this is safe assumption.
IDE recovers settings before APM(sleep) and reprograms HOST and Device.
IDE returns to APM with success/failure.
success, clears request_queue blocker flag (very critical)

Requests are now serviced.

Does this jive with you?

Andre Hedrick
The Linux ATA/IDE guy


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

\
 
 \ /
  Last update: 2005-03-22 12:45    [W:0.067 / U:2.648 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site