Re: [PATCH] SCSI midlayer power management

From: Pavel Machek (pavel_at_suse.cz)
Date: 08/12/04

  • Next message: Pavel Machek: "Re: [PATCH] SCSI midlayer power management"
    Date:	Thu, 12 Aug 2004 09:43:04 +0200
    To: Nathan Bryant <nbryant@optonline.net>
    
    

    Hi!

    > >I tried it on an OSDL machine and could suspend (suspend 2), but only
    > >resume as far as copying back the original kernel. The problem then
    > >looked to me like it was request ids not matching what the drive was
    > >expecting (but I'm ignorant of scsi, so might be completely wrong
    > >there).
    > >
    > >
    > I saw "no match for command buffer" interrupt storms when I was fixing
    > up aic7xxx for S3. The problem was due to not reprogramming the address
    > of our SCB's on resume. Needed to tell the card the base address for all
    > the DMA structures.
    >
    > Just to speculate about what would be required for swsusp: you probably
    > need to be using a SCSI LLD that properly implements pci suspend/resume,
    > which implies you need to make sure the card's DMA state machine is
    > flushed and idle before suspend completes. I've got a patch that fixes
    > this much up for aic7xxx. And my other midlayer-level patch may also
    > help... What happens during resume is interesting. I think maybe the
    > problem is not what the drive is expecting, but what the card's state
    > engine is expecting when it tries to map commands to command buffers in
    > DMA space. Maybe you need to suspend the LLD from the context of the
    > kernel that is doing the image load, and then resume from the context of
    > the kernel that was just loaded.

    Ideally, suspended driver should have no state at all. Like if I send
    card to suspend with 2.6.8, and when I send it to suspend in 2.6.11,
    it should be in same state.

    > Sounds like this is why Pavel is asking about DMA. So he'll need to
    > manage calling the host adapter's suspend callbacks, not just
    > generic_scsi_suspend. DMA base addresses are likely to change when you
    > load the new kernel image

    sysfs should call host adapter's suspend callbacks... It should work
    today.
                                                                    Pavel

    -- 
    People were complaining that M$ turns users into beta-testers...
    ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
    -
    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

    • [PATCH] [20/48] Suspend2 2.1.9.8 for 2.6.12: 520-version-specific-x86_64.patch
      ... Software Suspend 2.0 is an addition to the Linux Kernel, ... requires no special BIOS or hardware support. ... Ensure enough memory & storage are available. ...
      (Linux-Kernel)
    • Re: [PATCH] SCSI midlayer power management
      ... >resume as far as copying back the original kernel. ... the DMA structures. ... Maybe you need to suspend the LLD from the context of the ... >>looked into how swsusp would see which host adapter owns which drive, ...
      (Linux-Kernel)
    • Re: Patricks Test9 suspend code.
      ... Maybe the documentation isn't up to date anymore, ... The actual save part was slow because DMA was off (I had generic dma on, ... here's a panic I managed to save when one of the suspend ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: APM realy sucks on 2.6.x
      ... >> sometimes when hitting the suspend button. ... >> programming but in this this case which is a real pain I ... >> Kernel 2.4.x proved that the BIOS can be talked into properly ... 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/ ...
      (Linux-Kernel)
    • swsusp: Documentation update
      ... * If you change kernel command line between suspend and resume... ... +I found some kernel threads that don't do it, ... -* systems that initialize video card into vga text mode and where BIOS ...
      (Linux-Kernel)