lkml.org 
[lkml]   [2009]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] PCI: use fixed-up device class when configuring device
    Date
    The device class may be changed after the early fixup. Need to
    re-read the class value from pci_dev when configuring the device.
    Otherwise some devices such as JMicron SATA controller won't work.

    Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
    Signed-off-by: Yu Zhao <yu.zhao@intel.com>
    ---
    drivers/pci/probe.c | 2 ++
    1 files changed, 2 insertions(+), 0 deletions(-)

    diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
    index e3c3e08..f1ae247 100644
    --- a/drivers/pci/probe.c
    +++ b/drivers/pci/probe.c
    @@ -745,6 +745,8 @@ int pci_setup_device(struct pci_dev *dev)

    /* Early fixups, before probing the BARs */
    pci_fixup_device(pci_fixup_early, dev);
    + /* device class may be changed after fixup */
    + class = dev->class >> 8;

    switch (dev->hdr_type) { /* header type */
    case PCI_HEADER_TYPE_NORMAL: /* standard header */
    --
    1.6.1


    \
     
     \ /
      Last update: 2009-05-27 18:29    [W:0.019 / U:0.488 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site