1. 28 Apr, 2014 1 commit
    • Bodo Stroesser's avatar
      ipmi: Fix a race restarting the timer · b0608b0d
      Bodo Stroesser authored
      commit 48e8ac29
      
       upstream.
      
      With recent changes it is possible for the timer handler to detect an
      idle interface and not start the timer, but the thread to start an
      operation at the same time.  The thread will not start the timer in that
      instance, resulting in the timer not running.
      
      Instead, move all timer operations under the lock and start the timer in
      the thread if it detect non-idle and the timer is not already running.
      Moving under locks allows the last timeout to be set in both the thread
      and the timer.  'Timer is not running' means that the timer is not
      pending and smi_timeout() is not running.  So we need a flag to detect
      this correctly.
      
      Also fix a few other timeout bugs: setting the last timeout when the
      interrupt has to be disabled and the timer started, and setting the last
      timeout in check_start_timer_thread possibly racing with the timer
      Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
      Signed-off-by: Bodo Stroesser <bst...
      b0608b0d
  2. 16 May, 2013 1 commit
  3. 09 Apr, 2013 1 commit
    • Al Viro's avatar
      procfs: new helper - PDE_DATA(inode) · d9dda78b
      Al Viro authored
      
      The only part of proc_dir_entry the code outside of fs/proc
      really cares about is PDE(inode)->data.  Provide a helper
      for that; static inline for now, eventually will be moved
      to fs/proc, along with the knowledge of struct proc_dir_entry
      layout.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      d9dda78b
  4. 28 Feb, 2013 2 commits
  5. 03 Jan, 2013 1 commit
    • Greg Kroah-Hartman's avatar
      Drivers: char: remove __dev* attributes. · bcd2982a
      Greg Kroah-Hartman authored
      
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      __devinitconst, and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Matt Mackall <mpm@selenic.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bcd2982a
  6. 21 Nov, 2012 3 commits
    • Bill Pemberton's avatar
      char: remove use of __devexit · 39af33fc
      Bill Pemberton authored
      
      CONFIG_HOTPLUG is going away as an option so __devexit is no
      longer needed.
      Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Olof Johansson <olof@lixom.net>
      Cc: Mattia Dongili <malattia@linux.it>
      Cc: Kent Yoder <key@linux.vnet.ibm.com>
      Cc: Rajiv Andrade <mail@srajiv.net>
      Cc: Marcel Selhorst <tpmdd@selhorst.net>
      Cc: Sirrix AG <tpmdd@sirrix.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: openipmi-developer@lists.sourceforge.net
      Cc: platform-driver-x86@vger.kernel.org
      Cc: tpmdd-devel@lists.sourceforge.net
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      39af33fc
    • Bill Pemberton's avatar
      char: remove use of __devinitdata · 0bbed20e
      Bill Pemberton authored
      
      CONFIG_HOTPLUG is going away as an option so __devinitdata is no
      longer needed.
      Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Kent Yoder <key@linux.vnet.ibm.com>
      Cc: Rajiv Andrade <mail@srajiv.net>
      Cc: Marcel Selhorst <tpmdd@selhorst.net>
      Cc: Sirrix AG <tpmdd@sirrix.com>
      Cc: openipmi-developer@lists.sourceforge.net
      Cc: tpmdd-devel@lists.sourceforge.net
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0bbed20e
    • Bill Pemberton's avatar
      char: remove use of __devinit · 2223cbec
      Bill Pemberton authored
      
      CONFIG_HOTPLUG is going away as an option so __devinit is no longer
      needed.
      Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
      Cc: Geoff Levand <geoff@infradead.org>
      Cc: Mattia Dongili <malattia@linux.it>
      Cc: Amit Shah <amit.shah@redhat.com>
      Cc: openipmi-developer@lists.sourceforge.net
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: cbe-oss-dev@lists.ozlabs.org
      Cc: platform-driver-x86@vger.kernel.org
      Cc: virtualization@lists.linux-foundation.org
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2223cbec
  7. 19 Nov, 2012 1 commit
  8. 17 Oct, 2012 1 commit
  9. 10 Jul, 2012 1 commit
  10. 29 Mar, 2012 3 commits
  11. 28 Mar, 2012 1 commit
  12. 12 Jan, 2012 1 commit
  13. 27 May, 2011 1 commit
  14. 18 May, 2011 1 commit
    • Grant Likely's avatar
      drivercore: revert addition of of_match to struct device · b1608d69
      Grant Likely authored
      Commit b826291c
      
      , "drivercore/dt: add a match table pointer to struct
      device" added an of_match pointer to struct device to cache the
      of_match_table entry discovered at driver match time.  This was unsafe
      because matching is not an atomic operation with probing a driver.  If
      two or more drivers are attempted to be matched to a driver at the
      same time, then the cached matching entry pointer could get
      overwritten.
      
      This patch reverts the of_match cache pointer and reworks all users to
      call of_match_device() directly instead.
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      b1608d69
  15. 31 Mar, 2011 1 commit
  16. 24 Mar, 2011 1 commit
  17. 10 Mar, 2011 1 commit
  18. 28 Feb, 2011 1 commit
  19. 11 Feb, 2011 1 commit
  20. 12 Jan, 2011 1 commit
  21. 04 Jan, 2011 1 commit
  22. 03 Jan, 2011 1 commit
  23. 14 Dec, 2010 1 commit
    • Zhao Yakui's avatar
      IPMI: Add one interface to get more info of low-level IPMI device · 16f4232c
      Zhao Yakui authored
      
      The IPMI smi_watcher will be used to catch the IPMI interface as they
      come or go.  In order to communicate with the correct IPMI device, it
      should be confirmed whether it is what we wanted especially on the
      system with multiple IPMI devices. But the new_smi callback function
      of smi_watcher provides very limited info(only the interface number
      and dev pointer) and there is no detailed info about the low level
      interface. For example: which mechansim registers the IPMI
      interface(ACPI, PCI, DMI and so on).
      
      This is to add one interface that can get more info of low-level IPMI
      device. For example: the ACPI device handle will be returned for the
      pnp_acpi IPMI device.
      Signed-off-by: default avatarZhao Yakui <yakui.zhao@intel.com>
      Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      16f4232c
  24. 28 Oct, 2010 1 commit
  25. 26 Oct, 2010 1 commit
    • Eric Dumazet's avatar
      ipmi: proper spinlock initialization · de5e2ddf
      Eric Dumazet authored
      
      Unloading ipmi module can trigger following error.  (if
      CONFIG_DEBUG_SPINLOCK=y)
      
      [ 9633.779590] BUG: spinlock bad magic on CPU#1, rmmod/7170
      [ 9633.779606]  lock: f41f5414, .magic: 00000000, .owner:
      <none>/-1, .owner_cpu: 0
      [ 9633.779626] Pid: 7170, comm: rmmod Not tainted
      2.6.36-rc7-11474-gb71eb1e-dirty #328
      [ 9633.779644] Call Trace:
      [ 9633.779657]  [<c13921cc>] ? printk+0x18/0x1c
      [ 9633.779672]  [<c11a1f33>] spin_bug+0xa3/0xf0
      [ 9633.779685]  [<c11a1ffd>] do_raw_spin_lock+0x7d/0x160
      [ 9633.779702]  [<c1131537>] ? release_sysfs_dirent+0x47/0xb0
      [ 9633.779718]  [<c1131b78>] ? sysfs_addrm_finish+0xa8/0xd0
      [ 9633.779734]  [<c1394bac>] _raw_spin_lock_irqsave+0xc/0x20
      [ 9633.779752]  [<f99d93da>] cleanup_one_si+0x6a/0x200 [ipmi_si]
      [ 9633.779768]  [<c11305b2>] ? sysfs_hash_and_remove+0x72/0x80
      [ 9633.779786]  [<f99dcf26>] ipmi_pnp_remove+0xd/0xf [ipmi_si]
      [ 9633.779802]  [<c11f622b>] pnp_device_remove+0x1b/0x40
      
      Fix this by initializing spinlocks in a smi_info_alloc() helper function,
      right after memory allocation and clearing.
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Acked-by: default avatarDavid Miller <davem@davemloft.net>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Acked-by: default avatarCorey Minyard <cminyard@mvista.com>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      de5e2ddf
  26. 18 Oct, 2010 1 commit
  27. 23 Sep, 2010 2 commits
    • Yinghai Lu's avatar
      ipmi: fix hardcoded ipmi device exit path warning · 561f8182
      Yinghai Lu authored
      
      When modprobe.conf has
      options ipmi_si type="kcs" ports=0xCA2 regspacings="4"
      
      ipmi_si can be loaded properly, but when try to unload it get:
      
      Sep 20 15:00:27 xx abrt: Kerneloops: Reported 1 kernel oopses to Abrt
      Sep 20 15:00:27 xx abrtd: Directory 'kerneloops-1285020027-1' creation detected
      Sep 20 15:00:27 xx abrtd: New crash /var/spool/abrt/kerneloops-1285020027-1, processing
      Sep 20 15:01:09 xx kernel: ------------[ cut here ]------------
      Sep 20 15:01:09 xx kernel: WARNING: at drivers/base/driver.c:262 driver_unregister+0x8a/0xa0()
      Sep 20 15:01:09 xx kernel: Hardware name: Sun Fire x4800
      Sep 20 15:01:09 xx kernel: Unexpected driver unregister!
      Sep 20 15:01:09 xx kernel: Modules linked in: ipmi_si(-) ipmi_msghandler ip6table_filter ip6_tables ebtable_nat ebtables ipt_MASQUERADE iptable_nat nf_nat bridge stp llc autofs4 sunrpc cpufreq_ondemand acpi_cpufreq freq_table mperf xt_physdev be2iscsi iscsi_boot_sysfs bnx2i cnic uio cxgb3i iw_cxgb3 cxgb3 mdio ib_iser rdma_cm ib_cm iw_cm ib_sa ib_mad ib_core ib_addr ipv6 iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi dm_mirror dm_region_hash dm_log dm_mod vhost_net macvtap macvlan tun kvm_intel kvm uinput sg ses enclosure ahci libahci pcspkr i2c_i801 i2c_core iTCO_wdt iTCO_vendor_support igb dca i7core_edac edac_core ext3 jbd mbcache sd_mod crc_t10dif megaraid_sas [last unloaded: ipmi_devintf]
      Sep 20 15:01:09 xx kernel: Pid: 10625, comm: modprobe Tainted: G        W   2.6.36-rc5-tip+ #6
      Sep 20 15:01:09 xx kernel: Call Trace:
      Sep 20 15:01:09 xx kernel: [<ffffffff810600df>] warn_slowpath_common+0x7f/0xc0
      Sep 20 15:01:09 xx kernel: [<ffffffff810601d6>] warn_slowpath_fmt+0x46/0x50
      Sep 20 15:01:09 xx kernel: [<ffffffff812ff60a>] driver_unregister+0x8a/0xa0
      Sep 20 15:01:09 xx kernel: [<ffffffff812ae112>] pnp_unregister_driver+0x12/0x20
      Sep 20 15:01:09 xx kernel: [<ffffffffa01d0327>] cleanup_ipmi_si+0x3c/0xa7 [ipmi_si]
      Sep 20 15:01:09 xx kernel: [<ffffffff81099a60>] sys_delete_module+0x1a0/0x270
      Sep 20 15:01:09 xx kernel: [<ffffffff814b7070>] ? do_page_fault+0x150/0x320
      Sep 20 15:01:09 xx kernel: [<ffffffff8100b072>] system_call_fastpath+0x16/0x1b
      Sep 20 15:01:09 xx kernel: ---[ end trace 0d1967161adcee0d ]---
      
      We need to check if ipmi_pnp_driver is loaded before we try to unload it.
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Cc: Corey Minyard <minyard@acm.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      561f8182
    • Yinghai Lu's avatar
      ipmi: fix acpi probe print · a9e31765
      Yinghai Lu authored
      After d9e1b6c4
      
       ("ipmi: fix ACPI detection with regspacing") we get
      
      [   11.026326] ipmi_si: probing via ACPI
      [   11.030019] ipmi_si 00:09: (null) regsize 1 spacing 1 irq 0
      [   11.035594] ipmi_si: Adding ACPI-specified kcs state machine
      
      on an old system with only one range for ipmi kcs range.
      
      Try to fix it by adding another res pointer.
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a9e31765
  28. 11 Aug, 2010 3 commits
  29. 10 Aug, 2010 1 commit
    • Yinghai Lu's avatar
      ipmi: fix ACPI detection with regspacing · d9e1b6c4
      Yinghai Lu authored
      After the commit that changed ipmi_si detecting sequence from SMBIOS/ACPI
      to ACPI/SMBIOS,
      
      | commit 754d4531
      
      
      | Author: Matthew Garrett <mjg@redhat.com>
      | Date:   Wed May 26 14:43:47 2010 -0700
      |
      |    ipmi: change device discovery order
      |
      |    The ipmi spec provides an ordering for si discovery.  Change the driver to
      |    match, with the exception of preferring smbios to SPMI as HPs (at least)
      |    contain accurate information in the former but not the latter.
      
      ipmi_si can not be initialized.
      
      [  138.799739] calling  init_ipmi_devintf+0x0/0x109 @ 1
      [  138.805050] ipmi device interface
      [  138.818131] initcall init_ipmi_devintf+0x0/0x109 returned 0 after 12797 usecs
      [  138.822998] calling  init_ipmi_si+0x0/0xa90 @ 1
      [  138.840276] IPMI System Interface driver.
      [  138.846137] ipmi_si: probing via ACPI
      [  138.849225] ipmi_si 00:09: [io  0x0ca2] regsize 1 spacing 1 irq 0
      [  138.864438] ipmi_si: Adding ACPI-specified kcs state machine
      [  138.870893] ipmi_si: probing via SMBIOS
      [  138.880945] ipmi_si: Adding SMBIOS-specified kcs state machineipmi_si: duplicate interface
      [  138.896511] ipmi_si: probing via SPMI
      [  138.899861] ipmi_si: Adding SPMI-specified kcs state machineipmi_si: duplicate interface
      [  138.917095] ipmi_si: Trying ACPI-specified kcs state machine at i/o address 0xca2, slave address 0x0, irq 0
      [  138.928658] ipmi_si: Interface detection failed
      [  138.953411] initcall init_ipmi_si+0x0/0xa90 returned 0 after 110847 usecs
      
      in smbios has
      DMI/SMBIOS
      Handle 0x00C5, DMI type 38, 18 bytes
      IPMI Device Information
              Interface Type: KCS (Keyboard Control Style)
              Specification Version: 2.0
              I2C Slave Address: 0x00
              NV Storage Device: Not Present
              Base Address: 0x0000000000000CA2 (I/O)
              Register Spacing: 32-bit Boundaries
      in DSDT has
                          Device (BMC)
                          {
      
                              Name (_HID, EisaId ("IPI0001"))
                              Method (_STA, 0, NotSerialized)
                              {
                                  If (LEqual (OSN, Zero))
                                  {
                                      Return (Zero)
                                  }
      
                                  Return (0x0F)
                              }
      
                              Name (_STR, Unicode ("IPMI_KCS"))
                              Name (_UID, Zero)
                              Name (_CRS, ResourceTemplate ()
                              {
                                  IO (Decode16,
                                      0x0CA2,             // Range Minimum
                                      0x0CA2,             // Range Maximum
                                      0x00,               // Alignment
                                      0x01,               // Length
                                      )
                                  IO (Decode16,
                                      0x0CA6,             // Range Minimum
                                      0x0CA6,             // Range Maximum
                                      0x00,               // Alignment
                                      0x01,               // Length
                                      )
                              })
                              Method (_IFT, 0, NotSerialized)
                              {
                                  Return (One)
                              }
      
                              Method (_SRV, 0, NotSerialized)
                              {
                                  Return (0x0200)
                              }
                          }
      
      so the reg spacing should be 4 instead of 1.
      
      Try to calculate regspacing for this kind of system.
      
      Observed on a Sun Fire X4800.  Other OSes work and pass certification.
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
      Acked-by: default avatarMatthew Garrett <mjg@redhat.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Myron Stowe <myron.stowe@hp.com>
      Cc: Corey Minyard <minyard@acm.org>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d9e1b6c4
  30. 06 Aug, 2010 1 commit
  31. 29 Jun, 2010 2 commits