Re: [PATCH] SCSI midlayer power management

From: Nathan Bryant (nbryant_at_optonline.net)
Date: 08/12/04

  • Next message: Pavel Machek: "Re: [PATCH] SCSI midlayer power management"
    Date:	Thu, 12 Aug 2004 16:52:34 -0400
    To: James Bottomley <James.Bottomley@SteelEye.com>
    
    

    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
    >
    >
    >

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


  • Next message: Pavel Machek: "Re: [PATCH] SCSI midlayer power management"

    Relevant Pages

    • USB2 PCMCIA card + Mandrake 9.2
      ... and a Newlink PCMCIA USB2 ... When I booted the machine with the USB2 card ... connected, it was also detected first time, and the hard drive worked ... line in the bootup ...
      (comp.os.linux.hardware)
    • Re: Watch out! HP P1100 Driver Hell!
      ... Thanks for the tip on the flash card. ... Besides disabling the ... | I recently installed the new HP Photosmart 1100 driver on one of my PCs ... My | system became EXTREMELY slow, (how about 10-15 min. to bootup!). ...
      (microsoft.public.windowsxp.hardware)
    • Bus errors when using ddi_get8
      ... I'm in the middle of porting a device driver for a PCI card from linux to ... A short while after initialising the card, interrupts start happening to ... I've tested the same card in a linux x86 box, and it works fine, so I'm ...
      (comp.unix.solaris)
    • bootup cant find music
      ... >After the installation and de-installation of a sound ... card (reinstalled ... and some problems with Norton Internest ... >Bootup continues after that, albeit slowly loading NAV ...
      (microsoft.public.windowsxp.help_and_support)
    • Re: SUSE 9.1 and Wireless Internet
      ... > It seems as if the system sees the card on bootup but cannot assign ... nothing wireless works "out of the box" on any Linux ... Finishing the adapter installation/setup can be either very confusing ...
      (alt.os.linux.suse)