1. 03 Jul, 2008 38 commits
  2. 02 Jul, 2008 2 commits
    • Alex Chiang's avatar
      PCI: acpiphp: cleanup notify handler on all root bridges · a13307ce
      Alex Chiang authored
      During the development of the physical PCI slot patch series, Gary Hade
      kept on reporting strange oopses due to interactions between pci_slot
      and acpiphp.
      
      	http://lkml.org/lkml/2007/11/28/319
      
      find_root_bridges() unconditionally installs
      handle_hotplug_event_bridge() as an ACPI_SYSTEM_NOTIFY handler for all
      root bridges.
      
      However, during module cleanup, remove_bridge() will only remove the
      notify handler iff the root bridge had a hot-pluggable slot directly
      underneath. That is:
      
      	root bridge -> hotplug slot
      
      But, if the topology looks like either of the following:
      
      	root bridge -> non-hotplug slot
      	root bridge -> p2p bridge -> hotplug slot
      
      Then we currently do not remove the notify handler from that root
      bridge.
      
      This can cause a kernel oops if we modprobe acpiphp later and it gets
      loaded somewhere else in memory. If the root bridge then receives a
      hotplug event, it will then attempt to call a stale, non-existent notify
      handler and we blow up.
      
      Much thanks goes to Gary Hade for his persistent debugging efforts.
      Signed-off-by: default avatarAlex Chiang <achiang@hp.com>
      Signed-off-by: default avatarGary Hade <garyhade@us.ibm.com>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      a13307ce
    • Benjamin Li's avatar
      PCI: Limit VPD read/write lengths for Broadcom 5706, 5708, 5709 rev. · 99cb233d
      Benjamin Li authored
      For Broadcom 5706, 5708, 5709 rev. A nics, any read beyond the
      VPD end tag will hang the device.  This problem was initially
      observed when a vpd entry was created in sysfs
      ('/sys/bus/pci/devices/<id>/vpd').   A read to this sysfs entry
      will dump 32k of data.  Reading a full 32k will cause an access
      beyond the VPD end tag causing the device to hang.  Once the device
      is hung, the bnx2 driver will not be able to reset the device.
      We believe that it is legal to read beyond the end tag and
      therefore the solution is to limit the read/write length.
      
      A majority of this patch is from Matthew Wilcox who gave code for
      reworking the PCI vpd size information.  A PCI quirk added for the
      Broadcom NIC's to limit the read/write's.
      Signed-off-by: default avatarBenjamin Li <benli@broadcom.com>
      Signed-off-by: default avatarMatthew Wilcox <willy@linux.intel.com>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      99cb233d