From: Nathan Bryant <nbryant@optonline.net>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Pavel Machek <pavel@suse.cz>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Linux SCSI Reflector <linux-scsi@vger.kernel.org>,
Linux Kernel list <linux-kernel@vger.kernel.org>,
Jeff Garzik <jgarzik@pobox.com>
Subject: Re: [PATCH] SCSI midlayer power management
Date: Thu, 12 Aug 2004 16:52:34 -0400 [thread overview]
Message-ID: <411BD892.8050000@optonline.net> (raw)
In-Reply-To: <1092343376.1755.61.camel@mulgrave>
James Bottomley wrote:
> On Thu, 2004-08-12 at 16:37, Pavel Machek wrote:
>
>>Can't you simply reuse bootup code? It will no longer be __init,
>>but it should make suspend/resume functions quite simple.
>
>
> Unfortunately, no that simply.
>
> Bootup is all about allocating these areas and initialising the card.
> Resume will be about initialising the card knowing the existing areas
> (and the data about the existing areas will have to be part of our
> persistent data on suspend).
>
> So, modifying the bootup to do something like
>
> if (in_resume)
> addr = read from suspend image
Maybe not that complex. The "suspend image" has become the running
kernel by the time we receive the resume request, right? So we maybe
just look at the dma base address that we already have in our
card-private data structure. If that's all that's needed the S3-resume
is more likely to just work for disk suspend.
But in general yes you are right you need to separate the bootup code
into "allocate structures" and "program the card for those locations"
sections. Personally I think this approach can ultimately be more
maintainable than saving and restoring registers.
> else
> addr = dma_alloc_coherent(...)
>
> may work.
>
>
>>>to pick three drivers to do this for, that would be aic7xxx, aic79xx and
>>>sym_2?
>>
>>No idea, only SCSI host I owned was some 8-bit isa thing....
>
>
> Well, someone who's interested needs to pick a driver. It's usually
> easier to persuade everyone to add the feature if there's an example to
> copy...
Look at my aic7xxx patch. Maybe a little messy but it works. Eh it kind
of uses a mix of a save/restore registers technique (inherited from
Justin Gibbs' code) and my own "reuse-the-boot-code" approach that I
needed to fill in the gaps in his resume code, which was untested
>
> James
>
>
>
next prev parent reply other threads:[~2004-08-12 20:54 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-10 23:58 [PATCH] SCSI midlayer power management Nathan Bryant
2004-08-11 8:09 ` Pavel Machek
2004-08-11 13:13 ` Nathan Bryant
2004-08-11 13:37 ` James Bottomley
2004-08-11 15:21 ` Alan Cox
2004-08-11 16:28 ` James Bottomley
2004-08-11 16:43 ` Nathan Bryant
2004-08-11 23:36 ` Benjamin Herrenschmidt
2004-08-12 7:45 ` Pavel Machek
2004-08-12 10:38 ` Benjamin Herrenschmidt
2004-08-12 12:48 ` James Bottomley
2004-08-12 13:14 ` Pavel Machek
2004-08-12 16:29 ` James Bottomley
2004-08-12 19:11 ` Pavel Machek
2004-08-12 19:34 ` James Bottomley
2004-08-12 20:26 ` Pavel Machek
2004-08-12 20:31 ` James Bottomley
2004-08-12 20:37 ` Pavel Machek
2004-08-12 20:42 ` James Bottomley
2004-08-12 20:48 ` Pavel Machek
2004-08-12 20:52 ` Nathan Bryant [this message]
2004-08-12 20:40 ` Nathan Bryant
2004-08-12 23:05 ` Benjamin Herrenschmidt
2004-08-12 22:36 ` Nigel Cunningham
2004-08-12 22:43 ` Nigel Cunningham
2004-08-12 23:04 ` Benjamin Herrenschmidt
2004-08-12 13:41 ` Nathan Bryant
2004-08-12 16:45 ` Patrick Mansfield
2004-08-12 23:02 ` Benjamin Herrenschmidt
2004-08-11 20:19 ` Pavel Machek
2004-08-11 20:50 ` Nathan Bryant
2004-08-11 22:16 ` Nigel Cunningham
2004-08-11 22:48 ` Nathan Bryant
2004-08-12 7:43 ` Pavel Machek
2004-08-12 9:39 ` Nigel Cunningham
2004-08-12 13:43 ` Nathan Bryant
-- strict thread matches above, loose matches on Subject: below --
2004-08-16 13:29 James.Smart
2004-08-10 23:56 Nathan Bryant
2004-08-11 9:53 ` Alan Cox
2004-08-11 12:55 ` Nathan Bryant
2004-08-11 13:39 ` James Bottomley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=411BD892.8050000@optonline.net \
--to=nbryant@optonline.net \
--cc=James.Bottomley@SteelEye.com \
--cc=benh@kernel.crashing.org \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=pavel@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox