aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* IB/uverbs: Fix checking of userspace object ownershipRoland Dreier2007-10-19
| | | | | | | | | | | | | | | Commit 9ead190b ("IB/uverbs: Don't serialize with ib_uverbs_idr_mutex") rewrote how userspace objects are looked up in the uverbs module's idrs, and introduced a severe bug in the process: there is no checking that an operation is being performed by the right process any more. Fix this by adding the missing check of uobj->context in __idr_get_uobj(). Apparently everyone is being very careful to only touch their own objects, because this bug was introduced in June 2006 in 2.6.18, and has gone undetected until now. Cc: stable <stable@kernel.org> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mlx4: Sanity check userspace send queue sizesJack Morgenstein2007-10-18
| | | | | | | | | | | | | Add sanity checks to send queue sizes passed in from userspace. The minimum sq stride value below is taken from the MT25408 PRM (section 11.10, Table 306, log_sq_stride definition). Without this check, userspace can submit arbitrarily large/small values for the number of WQEs and the stride, which can crash the kernel. Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IPoIB: Rewrite "if (!likely(...))" as "if (unlikely(!(...)))"Roland Dreier2007-10-18
| | | | | | | It's too hard to figure out what "!likely(...)" really means, and who knows how compilers interpret the hint. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ehca: Enable large page MRs by defaultJoachim Fenkes2007-10-18
| | | | | Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ehca: Change meaning of hca_cap_mr_pgsizeJoachim Fenkes2007-10-18
| | | | | | | | | | ehca_shca.hca_cap_mr_pgsize now contains all supported page sizes ORed together. This makes some checks easier to code and understand, plus we can return this value verbatim in query_hca(), fixing a problem with SRP (reported by Anton Blanchard -- thanks!). Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ehca: Fix ehca_encode_hwpage_size() and alloc_fmr()Joachim Fenkes2007-10-18
| | | | | | | | Simplify ehca_encode_hwpage_size(), fixing an infinite loop for pgsize == 0 in the process. Fix the bug in alloc_fmr() that triggered the loop. Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ehca: Fix masking error in {,re}reg_phys_mr()Joachim Fenkes2007-10-18
| | | | | Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/ehca: Supply QP token for SRQ base QPsJoachim Fenkes2007-10-18
| | | | | | | | Because hardware reports the SRQ token in RWQEs of SRQ base QPs, supply the base QP token as SRQ token, so we can properly find the SRQ base QP. Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IPoIB: Use round_jiffies() for ah_reap_taskAnton Blanchard2007-10-16
| | | | | | | | Use round_jiffies() to align the 1 second ah_reap_task with other work and potentially save power by sleeping cores for longer. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* RDMA/cma: Fix deadlock destroying listen requestsSean Hefty2007-10-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deadlock condition reported by Kanoj Sarcar <kanoj@netxen.com>. The deadlock occurs when a connection request arrives at the same time that a wildcard listen is being destroyed. A wildcard listen maintains per device listen requests for each RDMA device in the system. The per device listens are automatically added and removed when RDMA devices are inserted or removed from the system. When a wildcard listen is destroyed, rdma_destroy_id() acquires the rdma_cm's device mutex ('lock') to protect against hot-plug events adding or removing per device listens. It then tries to destroy the per device listens by calling ib_destroy_cm_id() or iw_destroy_cm_id(). It does this while holding the device mutex. However, if the underlying iw/ib CM reports a connection request while this is occurring, the rdma_cm callback function will try to acquire the same device mutex. Since we're in a callback, the ib_destroy_cm_id() or iw_destroy_cm_id() calls will block until their callback thread returns, but the callback is blocked waiting for the device mutex. Fix this by re-working how per device listens are destroyed. Use rdma_destroy_id(), which avoids the deadlock, in place of cma_destroy_listen(). Additional synchronization is added to handle device hot-plug events and ensure that the id is not destroyed twice. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* RDMA/cma: Add locking around QP accessesSean Hefty2007-10-16
| | | | | | | | | | | | | | | | | | | | | | If a user allocates a QP on an rdma_cm_id, the rdma_cm will automatically transition the QP through its states (RTR, RTS, error, etc.) While the QP state transitions are occurring, the QP itself must remain valid. Provide locking around the QP pointer to prevent its destruction while accessing the pointer. This fixes an issue reported by Olaf Kirch from Oracle that resulted in a system crash: "An incoming connection arrives and we decide to tear down the nascent connection. The remote ends decides to do the same. We start to shut down the connection, and call rdma_destroy_qp on our cm_id. ... Now apparently a 'connect reject' message comes in from the other host, and cma_ib_handler() is called with an event of IB_CM_REJ_RECEIVED. It calls cma_modify_qp_err, which for some odd reason tries to modify the exact same QP we just destroyed." Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/mthca: Avoid alignment traps when writing doorbellsRoland Dreier2007-10-15
| | | | | | | | | | Architectures such as ia64 see alignment traps when doing a 64-bit read from __be32 doorbell[2] arrays to do doorbell writes in mthca_write64(). Fix this by just passing the two halves of the doorbell value into mthca_write64(). This actually improves the generated code by allowing the compiler to see what's going on better. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* mlx4_core: Kill mlx4_write64_raw()Roland Dreier2007-10-14
| | | | | | It's a leftover from development that's never used in the real driver. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6Linus Torvalds2007-10-14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6: (53 commits) hwmon: (vt8231) fix sparse warning hwmon: (sis5595) fix sparse warning hwmon: (w83627hf) don't assume bank 0 hwmon: (w83627hf) Fix setting fan min right after driver load hwmon: (w83627hf) De-macro sysfs callback functions hwmon: Add new combined driver for FSC chips hwmon: (ibmpex) Release IPMI user if hwmon registration fails hwmon: (dme1737) Add sch311x support hwmon: (dme1737) group functions logically hwmon: (dme1737) cleanups hwmon: IBM power meter driver hwmon: (coretemp) Add support for Celeron 4xx hwmon: (lm87) Disable VID when it should be hwmon: (w83781d) Add individual alarm and beep files hwmon: VRM is not read from registers MAINTAINERS: update hwmon subsystem git trees hwmon: Fix the code examples in documentation hwmon: update sysfs interface document - error handling hwmon: (thmc50) Fix a debug message hwmon: (thmc50) Don't create temp3 if not enabled ...
| * hwmon: (vt8231) fix sparse warningMark M. Hoffman2007-10-14
| | | | | | | | Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * hwmon: (sis5595) fix sparse warningMark M. Hoffman2007-10-14
| | | | | | | | Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * hwmon: (w83627hf) don't assume bank 0Jean Delvare2007-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bank switching code assumes that the bank selector is set to 0 when the driver is loaded. This might not be the case. This is exactly the same bug as was fixed in the w83627ehf driver two months ago: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0956895aa6f8dc6a33210967252fd7787652537d In practice, this bug was causing the sensor thermal types to be improperly reported for my W83627THF the first time I was loading the w83627hf driver. From the driver history, I'd say that it has been broken since September 2005 (when we stopped resetting the chip by default at driver load.) Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * hwmon: (w83627hf) Fix setting fan min right after driver loadJean Delvare2007-10-13
| | | | | | | | | | | | | | | | | | | | We need to read the fan clock dividers at initialization time, otherwise the code in store_fan_min() may use uninitialized values. That's pretty much the same bug and same fix as for the w83627ehf driver last month. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * hwmon: (w83627hf) De-macro sysfs callback functionsJim Cromie2007-10-13
| | | | | | | | | | | | | | | | | | | | This patch to drivers/hwmon/w83627hf converts many sysfs items from DEVICE_ATTRs to SENSOR_DEVICE_ATTRs, and replaces macros which expand to define redundant callbacks, with callbacks which use the SENSOR_DEV.nr to know what to do. Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * hwmon: Add new combined driver for FSC chipsHans de Goede2007-10-11
| | | | | | | | | | | | | | | | | | | | This patch adds a new merged driver for FSC sensor chips, it merges the fscher and fscpos drivers and adds support for the FSC Scylla, Heracles and Heimdall chips. Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * hwmon: (ibmpex) Release IPMI user if hwmon registration failsDarrick J. Wong2007-10-11
| | | | | | | | | | | | | | | | Roel Kluin <12o3l@tiscali.nl> found a minor defect in the init code if hwmon device registration fails. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * hwmon: (dme1737) Add sch311x supportJuerg Haefliger2007-10-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the SMSC SCH3112, SCH3114, and SCH3116 Super-I/O chips. These chips feature identical hardware monitoring capabilites with the expection that some of the fan inputs and pmw outputs don't exist. The hardware monitoring features of the SCH311x chips can only be accessed via the ISA bus. The driver therefore registers as a platform driver, if such a chip is detected. Signed-off-by: Juerg Haefliger <juergh at gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * hwmon: (dme1737) Fix some merge conflictsMark M. Hoffman2007-10-10
| |\ | | | | | | | | | | | | | | | class_dev -> hwmon_dev Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| | * hwmon: (dme1737) group functions logicallyJuerg Haefliger2007-10-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move functions to group them logically. Device and I2C functions go in separate places. No functional changes (really!). Signed-off-by: Juerg Haefliger <juergh at gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| | * hwmon: (dme1737) cleanupsJuerg Haefliger2007-10-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch cleans up and prepares the dme1737 driver for support of the sch311x chips. (Almost) no functional changes. - Replaced whitespaces with tabs. - Removed empty lines. - Added _i2c_ to names of functions that are strictly I2C related. - Added 4 new functions: dme1737_create_files, dme1737_remove_files, dme1737_sio_enter, and dme1737_sio_exit. - Added error messages in case client attach/detach fails. Signed-off-by: Juerg Haefliger <juergh at gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | hwmon: IBM power meter driverDarrick J. Wong2007-10-09
| | | | | | | | | | | | | | | | | | | | | Add a driver to export IBM PowerExecutive power meter sensors. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | hwmon: (coretemp) Add support for Celeron 4xxRudolf Marek2007-10-09
| | | | | | | | | | | | | | | | | | | | | This patch adds support for the Celeron 4xx based on Core 2 core. Signed-off-by: Rudolf Marek <r.marek@assembler.cz> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | hwmon: (lm87) Disable VID when it should beJean Delvare2007-10-09
| | | | | | | | | | | | | | | | | | | | | | | | A stupid bit shifting bug caused the VID value to be always exported even when the hardware is configured for something different. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | hwmon: (w83781d) Add individual alarm and beep filesJean Delvare2007-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The upcoming libsensors 3 needs these individual alarm and beep files. For the W83781D, this is quirky because this chip has a single alarm bit for both temp2 and temp3. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | hwmon: VRM is not read from registersJean Delvare2007-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The VRM value is not read from chip registers, so there's no need to update the device data cache before exporting the VRM value to user-space. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | MAINTAINERS: update hwmon subsystem git treesMark M. Hoffman2007-10-09
| | | | | | | | | | | | Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | hwmon: Fix the code examples in documentationJean Delvare2007-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a bug in the code examples, make them comply with CodingStyle, and indent them for a better redability. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | hwmon: update sysfs interface document - error handlingHans de Goede2007-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here is a patch adding some text to the sysfs interface documentation on how settings written to sysfs attributes should be handled, focussing mainly on error handling. This version incorperates Jean's latest comments. Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | hwmon: (thmc50) Fix a debug messageJean Delvare2007-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | type_name was used before being set. See why I don't like play-it-safe variable initializations: they prevent the compiler from warning you about such mistakes. So fix that as well. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | hwmon: (thmc50) Don't create temp3 if not enabledJean Delvare2007-10-09
| | | | | | | | | | | | | | | | | | Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | hwmon: (lm87) Add individual alarm filesJean Delvare2007-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add individual alarm files to the lm87 driver. The new libsensors needs this. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | hwmon: (lm87) Fix a division by zeroJean Delvare2007-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | Missing parentheses in the definition of FAN_FROM_REG cause a division by zero for a specific register value. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | hwmon: (lm78) Add individual alarm filesJean Delvare2007-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add individual alarm files to the lm78 driver, these are needed by the next version of libsensors. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | hwmon: (lm90) Export temperature offset valuesJean Delvare2007-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we have standard sysfs names to export temperature offset values, add this feature to the lm90 driver. All supported chips except the MAX6657, MAX6658 and MAX6659 support it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | hwmon: Kconfig dependency cleanupsJean Delvare2007-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Drop HWMON from the dependency list of ABITUGURU3 and LM93: this is now handled at menu level. * Make the Abit, Asus and FSC chip drivers depend on X86. These are custom chips which can only be found on their respective manufacturer's systems, and these manufacturers only do x86 hardware AFAIK. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | hwmon: (adm1021) individual alarm filesKrzysztof Helt2007-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the driver to individual alarm files as required by the new lmsensors library. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | hwmon: (adm1021) dynamic sysfs callbacks conversionKrzysztof Helt2007-10-09
| | | | | | | | | | | | | | | | | | | | | | | | This is conversion of the driver to the dynamic sysfs callbacks. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | hwmon: (thmc50) Fix alarms clearingKrzysztof Helt2007-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch make use the interrupt status register instead of the interrupt status mirror register. Reading of the mirror register does not clear alarms. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | hwmon: (it87) Add support for fan4 and fan5Jean Delvare2007-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the IT8716F and IT8718F fan4 and fan5. The late revisions of the IT8712F have these too but support is harder to add and nobody asked for it yet, so I didn't include it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | hwmon: (w83791d) new sysfs beep/alarm methodologyCharles Spirakis2007-10-09
| | | | | | | | | | | | | | | | | | | | | | | | Add new sysfs alarm methodology to w83791d driver Signed-off-by: Charles Spirakis <bezaur@gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | hwmon: (sis5595) re-use s_bridge->revisionAuke Kok2007-10-09
| | | | | | | | | | | | | | | | | | Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | hwmon: (lm93) Use standard names for vid filesJean Delvare2007-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | The lm93 driver doesn't follow the standard naming convention for its vid files. Fix this so that libsensors will pick them. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Hans J. Koch <hjk@linutronix.de> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | hwmon: (lm85) Let the user set the fan min limit to 0Jean Delvare2007-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trying to set the fan min limit to 0 currently writes 0 to the register, which is an invalid value. It's read back as -1 and the alarm flag is raised. Instead we should write 0xffff (maximum value), which reads back as 0 and no alarm flag is raised. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Juerg Haefliger <juergh at gmail.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | hwmon: (lm85) Clean up the handling of additional resolution bitsJean Delvare2007-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way the lm85 driver currently handles the additional resolution bits some chips have for the voltage and temperature measurements is quite complex. This is my attempt to make it simpler. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Juerg Haefliger <juergh at gmail.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
| * | hwmon: (lm85) Add individual alarm filesJean Delvare2007-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The future libsensors needs these individual alarm and fault files. Also delete old and unused alarm defines. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Juerg Haefliger <juergh at gmail.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>