[lkml]   [2006]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: pci_restore_state
    On Sun, 04 Jun 2006 06:13:30 -0400
    Ryan Lortie <> wrote:

    > Currently pci_restore_state() (drivers/pci/pci.c) restores the PCI state
    > by copying in the saved PCI configuration space, a dword at a time,
    > starting from 0 up to 15.
    > This causes a crash when my Macbook resumes from sleep (specifically,
    > when restoring the configuration space of the PCI bridge).
    > Reading the PCI specification, the register at dword 1 (ie: bytes 4-7)
    > is split half and half between status and command words. The command
    > word effectively controls the way which the PCI device interacts with
    > the system. If it is 0, the device is logically disconnected from the
    > bus (PCI Local Bus Specification Revision 2.2, 6.2.2 "Device
    > Control").
    > When a device first powers up, the command register value is normally
    > zero (and is zero in my specific case).
    > The problem with the way that the PCI state is currently restored is
    > that the write to the command register logically reconnects the device
    > to the bus before the rest of the configuration space has been filled
    > in.
    > My Macbook crashes on resume.
    > If I reverse the for loop to start from 15 and count down to 0, then the
    > majority of the configuration space is filled in _before_ the command
    > word is modified. No crash.

    We have a patch pending which will do that.

    The present plan will be to get this into 2.6.18.
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2006-06-04 12:30    [W:0.021 / U:33.728 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site