1. 07 4月, 2009 6 次提交
    • A
      PCI: Fix oops in pci_vpd_truncate · d6141668
      Anton Vorontsov 提交于
      pci_vpd_truncate() should check for dev->vpd->attr, otherwise
      this might happen:
      
      sky2 driver version 1.22
      Unable to handle kernel paging request for data at address 0x0000000c
      Faulting instruction address: 0xc01836fc
      Oops: Kernel access of bad area, sig: 11 [#1]
      [...]
      NIP [c01836fc] pci_vpd_truncate+0x38/0x40
      LR [c029be18] sky2_probe+0x14c/0x518
      Call Trace:
      [ef82bde0] [c029bda4] sky2_probe+0xd8/0x518 (unreliable)
      [ef82be20] [c018a11c] local_pci_probe+0x24/0x34
      [ef82be30] [c018a14c] pci_call_probe+0x20/0x30
      [ef82be50] [c018a330] __pci_device_probe+0x64/0x78
      [ef82be60] [c018a44c] pci_device_probe+0x30/0x58
      [ef82be80] [c01aa270] really_probe+0x78/0x1a0
      [ef82bea0] [c01aa460] __driver_attach+0xa4/0xa8
      [ef82bec0] [c01a96ac] bus_for_each_dev+0x60/0x9c
      [ef82bef0] [c01aa0b4] driver_attach+0x24/0x34
      [ef82bf00] [c01a9e08] bus_add_driver+0x12c/0x1cc
      [ef82bf20] [c01aa87c] driver_register+0x6c/0x110
      [ef82bf30] [c018a770] __pci_register_driver+0x4c/0x9c
      [ef82bf50] [c03782c8] sky2_init_module+0x30/0x40
      [ef82bf60] [c0001dbc] do_one_initcall+0x34/0x1a0
      [ef82bfd0] [c0362240] do_initcalls+0x38/0x58
      
      This happens with CONFIG_SKY2=y, and "ip=on" kernel command line, so
      pci_vpd_truncate() is called before late_initcall(pci_sysfs_init),
      therefore ->attr isn't yet initialized.
      Acked-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      d6141668
    • Y
      PCI: don't corrupt enable_cnt when doing manual resource alignment · 0cdbe30f
      Yuji Shimada 提交于
      This patch fixes breakage of of enable_cnt in quirk_resource_alignment.
      
      Currently, quirk_resource_alignment calls pci_disable_device.
      pci_disable_device decrements enable_cnt, so that enable_cnt becomes -1.
      
      The patch disables memory decoding, writing command register directly.
      So enable_cnt is not broken.
      Signed-off-by: NYuji Shimada <shimada-yxb@necst.nec.co.jp>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      0cdbe30f
    • A
      PCI: annotate pci_rescan_bus as __ref, not __devinit · 5446a6bd
      Alex Chiang 提交于
      pci_rescan_bus was annotated as __devinit, which is wrong,
      because it will never be part of device initialization.
      Howevever, we can't simply drop the annotation, because then we
      get section warnings about calling pci_scan_child_bus (which is
      correctly marked as __devinit).
      
      pci_rescan_bus will only get built when CONFIG_HOTPLUG is set,
      meaning that __devinit is a nop, so we know that pci_scan_child_bus
      has not been freed.
      
      Annotate as __ref to silence modpost.
      Signed-off-by: NAlex Chiang <achiang@hp.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      5446a6bd
    • R
      PCI-IOV: fix missing kernel-doc · 52a8873b
      Randy Dunlap 提交于
      Fix PCI iov kernel-doc warning:
      
      Warning(drivers/pci/iov.c:638): No description found for parameter 'nr_virtfn'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      52a8873b
    • Y
      PCI: Setup disabled bridges even if buses are added · 296ccb08
      Yuji Shimada 提交于
      This patch sets up disabled bridges even if buses have already been
      added.
      
      pci_assign_unassigned_resources is called after buses are added.
      pci_assign_unassigned_resources calls pci_bus_assign_resources.
      pci_bus_assign_resources calls pci_setup_bridge to configure BARs of
      bridges.
      
      Currently pci_setup_bridge returns immediately if the bus have already
      been added. So pci_assign_unassigned_resources can't configure BARs of
      bridges that were added in a disabled state; this patch fixes the issue.
      
      On logical hot-add, we need to prevent the kernel from re-initializing
      bridges that have already been initialized. To achieve this,
      pci_setup_bridge returns immediately if the bridge have already been
      enabled.
      
      We don't need to check whether the specified bus is a root bus or not.
      pci_setup_bridge is not called on a root bus, because a root bus does
      not have a bridge.
      
      The patch adds a new helper function, pci_is_enabled. I made the
      function name similar to pci_is_managed. The codes which use
      enable_cnt directly are changed to use pci_is_enabled.
      Acked-by: NAlex Chiang <achiang@hp.com>
      Signed-off-by: NYuji Shimada <shimada-yxb@necst.nec.co.jp>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      296ccb08
    • Y
      PCI: SR-IOV quirk for Intel 82576 NIC · 7eb93b17
      Yu Zhao 提交于
      If BIOS doesn't allocate resources for the SR-IOV BARs, zero the Flash
      BAR and program the SR-IOV BARs to use the old Flash Memory Space.
      
      Please refer to Intel 82576 Gigabit Ethernet Controller Datasheet
      section 7.9.2.14.2 for details.
      http://download.intel.com/design/network/datashts/82576_Datasheet.pdfSigned-off-by: NYu Zhao <yu.zhao@intel.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      7eb93b17
  2. 31 3月, 2009 9 次提交
  3. 30 3月, 2009 1 次提交
  4. 27 3月, 2009 6 次提交
    • Y
      PCI: don't enable too much HT MSI mapping · de745306
      Yinghai Lu 提交于
      Impact: fix bug
      
      Prakash reported that his c51-mcp51 system ondie sound card doesn't work
      MSI but if he hack out the HT-MSI on mcp51, the MSI will work well with
      sound card.
      
      This patch reworks nv_msi_ht_cap_quirk() and will only avoid enabling
      ht_msi on devices following that root device.
      Reported-by: NPrakash Punnoor <prakash@punnoor.de>
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      de745306
    • Y
      PCI: save and restore PCIe 2.0 registers · 89858517
      Yu Zhao 提交于
      PCIe 2.0 defines several new registers (Device Control 2, Link Control 2,
      and Slot Control 2). Save and retore them in pci_save_pcie_state() and
      pci_restore_pcie_state().
      Signed-off-by: NYu Zhao <yu.zhao@intel.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      89858517
    • S
      PCI: update fakephp for bus_id removal · 7bb2cb3e
      Stephen Rothwell 提交于
      Get rid of a new use of bus_id that snuck in.
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      7bb2cb3e
    • K
      PCI: fix kernel oops on bridge removal · 7ae0567f
      Kenji Kaneshige 提交于
      Fix the following kernel oops problem that happens when removing PCI
      bridge with pciehp loaded. It should also occur with other hotplug
      driver that is implemented as a bridge's driver.
      
      [  459.997257] pciehp 0000:2f:04.0:pcie24: unloading service driver pciehp
      [  459.997495] general protection fault: 0000 [#1] SMP
      [  459.997737] last sysfs file: /sys/devices/pci0000:00/0000:00:04.0/0000:2e:00.0/0000:2f:04.0/remove
      [  459.997964] CPU 4
      [  459.998129] Modules linked in: pciehp ipv6 autofs4 hidp rfcomm l2cap bluetooth sunrpc cpufreq_ondemand acpi_cpufreq dm_mirror dm_region_hash dm_log dm_multipath scsi_dh dm_mod sbs sbshc battery ac parport_pc lp parport mptspi mptscsih mptbase scsi_transport_spi e1000e sg sr_mod cdrom button serio_raw i2c_i801 i2c_core shpchp pcspkr ata_piix libata megaraid_sas sd_mod scsi_mod crc_t10dif ext3 jbd uhci_hcd ohci_hcd ehci_hcd [last unloaded: microcode]
      [  459.998129] Pid: 56, comm: events/4 Not tainted 2.6.29-rc8-kk #1 PRIMERGY
      [  459.998129] RIP: 0010:[<ffffffff803bf047>]  [<ffffffff803bf047>] pci_slot_release+0x37/0x100
      [  459.998129] RSP: 0018:ffff88083b3bf9e0  EFLAGS: 00010246
      [  459.998129] RAX: ffff88083adc5158 RBX: ffff880836c1bc80 RCX: 6b6b6b6b6b6b6b6b
      [  459.998129] RDX: 0000000000000000 RSI: ffffffff803a77f0 RDI: ffff880836c1bc48
      [  459.998129] RBP: ffff88083b3bfa00 R08: 0000000000000002 R09: 0000000000000000
      [  459.998129] R10: 0000000000000000 R11: 0000000000000000 R12: ffff880836c1bc48
      [  459.998129] R13: ffff880836c1bc20 R14: ffff880836c1bc48 R15: ffff880836d1ec38
      [  459.998129] FS:  0000000000000000(0000) GS:ffff88083ccc3770(0000) knlGS:0000000000000000
      [  459.998129] CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
      [  459.998129] CR2: 00007f1562f1d558 CR3: 0000000838090000 CR4: 00000000000006e0
      [  459.998129] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [  459.998129] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      [  459.998129] Process events/4 (pid: 56, threadinfo ffff88083b3be000, task ffff88083b3b3e40)
      [  459.998129] Stack:
      [  459.998129]  ffff880836c1bc80 ffff880836c1bc48 ffffffff80793320 ffff88083b0d0960
      [  459.998129]  ffff88083b3bfa30 ffffffff803a788a ffff880836c1bc80 ffffffff803a77f0
      [  459.998129]  ffff880836c1bc20 ffff880836d1ec38 ffff88083b3bfa50 ffffffff803a8ce7
      [  459.998129] Call Trace:
      [  459.998129]  [<ffffffff803a788a>] kobject_release+0x9a/0x290
      [  459.998129]  [<ffffffff803a77f0>] ? kobject_release+0x0/0x290
      [  459.998129]  [<ffffffff803a8ce7>] kref_put+0x37/0x80
      [  459.998129]  [<ffffffff803a76f7>] kobject_put+0x27/0x60
      [  459.998129]  [<ffffffff803bebcc>] ? pci_destroy_slot+0x3c/0xc0
      [  459.998129]  [<ffffffff803bebd5>] pci_destroy_slot+0x45/0xc0
      [  459.998129]  [<ffffffff803c797d>] pci_hp_deregister+0x13d/0x210
      [  459.998129]  [<ffffffffa031141d>] cleanup_slots+0x2d/0x80 [pciehp]
      [  459.998129]  [<ffffffffa0311735>] pciehp_remove+0x15/0x30 [pciehp]
      [  459.998129]  [<ffffffff803c4c99>] pcie_port_remove_service+0x69/0x90
      [  459.998129]  [<ffffffff80441da9>] __device_release_driver+0x59/0x90
      [  459.998129]  [<ffffffff80441edb>] device_release_driver+0x2b/0x40
      [  459.998129]  [<ffffffff804419d6>] bus_remove_device+0xa6/0x120
      [  459.998129]  [<ffffffff8043e46b>] device_del+0x12b/0x190
      [  459.998129]  [<ffffffff803c4d90>] ? remove_iter+0x0/0x40
      [  459.998129]  [<ffffffff8043e4f6>] device_unregister+0x26/0x70
      [  459.998129]  [<ffffffff803c4dbf>] remove_iter+0x2f/0x40
      [  459.998129]  [<ffffffff8043ddf3>] device_for_each_child+0x33/0x60
      [  459.998129]  [<ffffffff8033ee30>] ? sysfs_schedule_callback_work+0x0/0x50
      [  459.998129]  [<ffffffff803c4d30>] pcie_port_device_remove+0x30/0x80
      [  459.998129]  [<ffffffff803c55a1>] pcie_portdrv_remove+0x11/0x20
      [  459.998129]  [<ffffffff803bfeb2>] pci_device_remove+0x32/0x70
      [  459.998129]  [<ffffffff80441da9>] __device_release_driver+0x59/0x90
      [  459.998129]  [<ffffffff80441edb>] device_release_driver+0x2b/0x40
      [  459.998129]  [<ffffffff804419d6>] bus_remove_device+0xa6/0x120
      [  459.998129]  [<ffffffff8043e46b>] device_del+0x12b/0x190
      [  459.998129]  [<ffffffff8043e4f6>] device_unregister+0x26/0x70
      [  459.998129]  [<ffffffff803ba969>] pci_stop_dev+0x49/0x60
      [  459.998129]  [<ffffffff803baab0>] pci_remove_bus_device+0x40/0xc0
      [  459.998129]  [<ffffffff803c10d9>] remove_callback+0x29/0x40
      [  459.998129]  [<ffffffff8033ee4f>] sysfs_schedule_callback_work+0x1f/0x50
      [  459.998129]  [<ffffffff8025769a>] run_workqueue+0x15a/0x230
      [  459.998129]  [<ffffffff80257648>] ? run_workqueue+0x108/0x230
      [  459.998129]  [<ffffffff8025846f>] worker_thread+0x9f/0x100
      [  459.998129]  [<ffffffff8025bce0>] ? autoremove_wake_function+0x0/0x40
      [  459.998129]  [<ffffffff802583d0>] ? worker_thread+0x0/0x100
      [  459.998129]  [<ffffffff8025b89d>] kthread+0x4d/0x80
      [  459.998129]  [<ffffffff8020d4ba>] child_rip+0xa/0x20
      [  459.998129]  [<ffffffff8020cebc>] ? restore_args+0x0/0x30
      [  459.998129]  [<ffffffff8025b850>] ? kthread+0x0/0x80
      [  459.998129]  [<ffffffff8020d4b0>] ? child_rip+0x0/0x20
      [  459.998129] Code: 56 49 89 fe 41 55 4c 8d 6f d8 41 54 53 74 09 f6 05 b8 05 c7 00 08 75 72 49 8b 45 00 48 8b 48 28 eb 05 66 90 48 89 f1 49 8b 45 00 <48> 8b 31 48 83 c0 28 0f 18 0e 48 39 c1 74 1c 8b 41 38 41 0f b6
      [  459.998129] RIP  [<ffffffff803bf047>] pci_slot_release+0x37/0x100
      [  459.998129]  RSP <ffff88083b3bf9e0>
      [  460.018595] ---[ end trace 5a08d2095374aedc ]---
      
      The pci_remove_bus_device() removes all buses and devices under the
      bridge, and then removes the bridge. So the remove() callback of the
      hotplug drivers implemented as a bridge's driver is executed after the
      struct pci_bus of the bridge's secondary bus is removed. The remove()
      callback of those driver unregisters the slot using pci_destroy_slot(),
      and slot's release callback refers to the the struct pci_bus that was
      already freed. This is the cause of the kernel oops.
      
      This patch solves the problem by stopping bus drivers before removing the
      bridge and its child bus and devices.
      Acked-by: NAlex Chiang <achiang@hp.com>
      Signed-off-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      7ae0567f
    • Y
      PCI: fix conflict between SR-IOV and config space sizing · 853346e4
      Yu Zhao 提交于
      New pci_cfg_space_size() needs invalid pdev->class, put it in the
      right place in the pci_setup_device().
      Signed-off-by: NYu Zhao <yu.zhao@intel.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      853346e4
    • B
      ACPICA: Update FADT flag definitions · 993958fe
      Bob Moore 提交于
      Add new flags in the Boot Architecture flags field. Update comments
      for all FADT flags. Add FADT version when each flag was defined.
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NLin Ming <ming.m.lin@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      993958fe
  5. 26 3月, 2009 2 次提交
  6. 25 3月, 2009 2 次提交
  7. 24 3月, 2009 3 次提交
  8. 21 3月, 2009 11 次提交