summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'char-misc-3.14-rc1' of ↵Linus Torvalds2014-01-2082-675/+9170
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver patches from Greg KH: "Here's the big char/misc driver patches for 3.14-rc1. Lots of little things, and a new "big" driver, genwqe. Full details are in the shortlog" * tag 'char-misc-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (90 commits) mei: limit the number of consecutive resets mei: revamp mei reset state machine drivers/char: don't use module_init in non-modular ttyprintk.c VMCI: fix error handling path when registering guest driver extcon: gpio: Add power resume support Documentation: HOWTO: Updates on subsystem trees, patchwork, -next (vs. -mm) in ko_KR Documentation: HOWTO: update for 2.6.x -> 3.x versioning in ko_KR Documentation: HOWTO: update stable address in ko_KR Documentation: HOWTO: update LXR web link in ko_KR char: nwbutton: open-code interruptible_sleep_on mei: fix syntax in comments and debug output mei: nfc: mei_nfc_free has to be called under lock mei: use hbm idle state to prevent spurious resets mei: do not run reset flow from the interrupt thread misc: genwqe: fix return value check in genwqe_device_create() GenWQE: Fix warnings for sparc GenWQE: Fix compile problems for Alpha Documentation/misc-devices/mei/mei-amt-version.c: remove unneeded call of mei_deinit() GenWQE: Rework return code for flash-update ioctl sgi-xp: open-code interruptible_sleep_on_timeout ...
| * mei: limit the number of consecutive resetsTomas Winkler2014-01-133-0/+18
| | | | | | | | | | | | | | | | give up reseting after 3 unsuccessful tries Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mei: revamp mei reset state machineTomas Winkler2014-01-136-104/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. MEI_DEV_RESETTING device state spans only hardware reset flow while starting dev state is saved into a local variable for further reference, this let us to reduce big if statements in case we are trying to avoid nested resets 2. During initializations if the reset ended in MEI_DEV_DISABLED device state we bail out with -ENODEV 3. Remove redundant interrupts_enabled parameter as this can be deduced from the starting dev_state 4. mei_reset propagates error code to the caller 5. Add mei_restart function to wrap the pci resume Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * drivers/char: don't use module_init in non-modular ttyprintk.cPaul Gortmaker2014-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TTY_PRINTK option is bool, and hence this code is either present or absent. It will never be modular, so using module_init as an alias for __initcall is rather misleading. Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd have to add module.h to obviously non-modular code, and that would be a worse thing. Note that direct use of __initcall is discouraged, vs. one of the priority categorized subgroups. As __initcall gets mapped onto device_initcall, our use of device_initcall directly in this change means that the runtime impact is zero -- it will remain at level 6 in initcall ordering. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * VMCI: fix error handling path when registering guest driverDmitry Torokhov2014-01-091-4/+6
| | | | | | | | | | | | | | | | | | | | | | When host capabilities check failed or when we were unable to register doorbell bitmap we were forgetting to set error code and were returning 0 which would make upper layers believe that probe was successful. Reported-by: Julia Lawall <julia.lawall@lip6.fr> Acked-by: Andy King <acking@vmware.com> Signed-off-by: Dmitry Torokhov <dtor@vmware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Merge tag 'extcon-next-for-3.14' of ↵Greg Kroah-Hartman2014-01-0811-35/+876
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next Chanwoo writes: Update extcon for v3.14 This patchset add new driver of extcon-max14577.c which detect various external connector and fix minor issue of extcon provider driver(extcon-arizona/palams/ gpio.c). Also, update documentation of previous 'switch' porting guide and extcon git repository url. Detailed description for patchset: - New driver of extcon-max14577.c : Add extcon-max14577.c drvier to support Maxim MUIC(Micro USB Interface Controller) which detect USB/TA/JIG/AUDIO-DOCK and additional accessory according to each resistance when connected external connector. - extcon-arizoan.c driver : Code clean to use define macro instead of hex value : Fix minor issue to reset back to our staring state : Fix race with microphone detection and removal - extcon-palmas.c driver : Fix minor issue and renaming compatible string of Devicetree - extcon-gpio.c driver : Fix bug about ordering initialization of gpio pin on probe() : Send uevent after wakeup from suspend state because some SoC haven't wakeup interrupt on suspend state. - Documentation (Documentation/extcon/porting-android-switch-class) : Fix switch class porting guide - Update extcon git repository url
| | * extcon: gpio: Add power resume supportRongjun Ying2014-01-092-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When system on the suspend state, Some SoC can't get gpio interrupt. After system resume, need send extcon uevent to userspace. Signed-off-by: Rongjun Ying <rongjun.ying@csr.com> Reviewed-by: Barry Song <Baohua.Song@csr.com> Acked-by: Myungjoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| | * extcon: max14577: Add extcon-max14577 driver to support MUIC deviceChanwoo Choi2014-01-073-0/+763
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch supports Maxim MAX14577 MUIC(Micro USB Interface Controller) device by using EXTCON subsystem to handle various external connectors. The max14577 device uses regmap method for i2c communication and supports irq domain. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| | * extcon: fix switch class porting guide (Documentation)MyungJoo Ham2014-01-071-6/+3
| | | | | | | | | | | | | | | | | | | | | - Unfinished sentence finished. - Incorrect description on the compat-mode condition corrected. Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
| | * extcon: arizona: Add support for headphone detection on wm5110 rev DCharles Keepax2014-01-071-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | wm5110 rev D is the first chip to use headphone detection IP 2, specify such and make a small correction as the impedance value is actually read in 0.5 ohm increments now. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| | * extcon: arizona: No need to switch back down HPDET rangesCharles Keepax2014-01-071-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | No point in revisiting ranges the detection will be no more accurate the second time simply report that the resistance is right on the range boundry. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| | * extcon: arizona: Fix race with microphone detection and removalCharles Keepax2014-01-071-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The microphone detection code is run as delayed work to provide additional debounce, it is possible that the jack could have been removed by the time we process the microphone detection. Turn this case into a no op. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| | * extcon: arizona: Fix reset of HPDET after race with removalCharles Keepax2014-01-071-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | We need to make sure we reset back to our starting state, especially making sure that we have disabled poll in the register cache. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| | * extcon: arizona: Add defines for microphone detection levelsCharles Keepax2014-01-072-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Improve readability by creating a define for each microphone detection level. Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| | * extcon: palmas: Handle ID interrupt properly using USB_ID_INT_SRCGeorge Cherian2014-01-071-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always cross check with the ID state and the source of interrupt. Also add a case in which ID Source is ID_GND but LATCH state is set wrongly. This uses the previous Link stat to determine the new state. Signed-off-by: George Cherian <george.cherian@ti.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| | * extcon: palmas: Added a new compatible type *ti,palmas-usb-vid*Kishon Vijay Abraham I2014-01-072-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | The Palmas device contains only a USB VBUS-ID detector, so added a compatible type *ti,palmas-usb-vid*. Didn't remove the existing compatible types for backward compatibility. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| | * MAINTAINERS: Add git repository for extconChanwoo Choi2014-01-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This patch add git repository url for EXTCON subsystem. Following git repository is currently used to maintain EXTCON. - git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon.git Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| | * extcon: gpio: Request gpio pin before modifying its stateGuenter Roeck2014-01-071-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 338de0ca (extcon: gpio: Use gpio driver/chip debounce if supported) introduced a call to gpio_set_debounce() before actually requesting the respective gpio pin from the gpio subsystem. The gpio subsystem expects that a gpio pin was requested before modifying its state. Not doing so results in a warning from gpiolib, and the gpio pin is auto-requested. This in turn causes the subsequent devm_gpio_request_one() to fail. So devm_gpio_request_one() must be called prior to calling gpio_set_debounce(). Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| * | Merge tag 'for_3.14' of ↵Greg Kroah-Hartman2014-01-084-13/+175
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into char-misc-next Kishon writes: Pull request for PHY subsystem contains few fixes in PHY-CORE mostly w.r.t PM and reference counting and also a new PHY driver used by SATA in Marvell SoC.
| | * | Phy: Add a PHY driver for Marvell MVEBU SATA PHY.Andrew Lunn2013-12-243-0/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kirkwood and Dove can turn the SATA phy on and off. Add a PHY driver to control this. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
| | * | phy: phy-core.c: remove unnecessary initialization of local variablesKishon Vijay Abraham I2013-12-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There were a few places where variables are initialized unncessarily. Remove those initializations. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
| | * | phy: phy-core: increment refcounting variables only on 'success'Kishon Vijay Abraham I2013-12-241-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Increment 'init_count' only if the 'init' callback succeeded and decrement 'init_count' only if the 'exit' callback succeded. Increment 'power_count' only if 'power_on' callback succeded and if it failed disable the clocks using phy_pm_runtime_put_sync(). Also decrement 'power_count' only if 'power_off' callback succeded and if it failed do not disable the clocks. Reported-by: George Cherian <george.cherian@ti.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
| | * | phy: core: properly handle failure of pm_runtime_get functionsFelipe Balbi2013-12-241-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case pm_runtime_get*() fails, it still increments pm usage counter, so we *must* make sure to pm_runtime_put() even in those cases. This patch fixes that mistake the same way usbcore treats those possible failures. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
| * | | Merge v3.13-rc6 into char-misc-nextGreg Kroah-Hartman2014-01-08288-1399/+2784
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | We want these fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | Documentation: HOWTO: Updates on subsystem trees, patchwork, -next (vs. -mm) ↵SeongJae Park2014-01-081-71/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in ko_KR The update did not applied on Korean translation although it applied on English documentation. Apply it on Korean translation now. Signed-off-by: SeongJae Park <sj38.park@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | Documentation: HOWTO: update for 2.6.x -> 3.x versioning in ko_KRSeongJae Park2014-01-081-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | English version HOWTO updated the versioning but Korean version didn't. Update it now. Signed-off-by: SeongJae Park <sj38.park@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | Documentation: HOWTO: update stable address in ko_KRSeongJae Park2014-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | English version HOWTO updated the address but Korean version didn't. Update it now. Signed-off-by: SeongJae Park <sj38.park@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | Documentation: HOWTO: update LXR web link in ko_KRSeongJae Park2014-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | English version HOWTO updated the link but Korean version didn't. Update it now. Signed-off-by: SeongJae Park <sj38.park@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | char: nwbutton: open-code interruptible_sleep_onArnd Bergmann2014-01-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The nwbutton driver uses interruptible_sleep_on to wait for buttons getting pressed after we enter the read() function, which is inherently racy and cannot be fixed by using wait_event without changing the driver's user space interface. Instead, this patch just uses an open-coded variant of the same interruptible_sleep_on() call, so the driver behavior doesn't change but we remove the sleep_on family from the kernel. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | mei: fix syntax in comments and debug outputAlexander Usyskin2014-01-088-36/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix syntax errors in comments and debug strings Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | mei: nfc: mei_nfc_free has to be called under lockTomas Winkler2014-01-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nfc_nfc_free unlink clients from the device list and has to be called under mei mutex Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Reviewed-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | mei: use hbm idle state to prevent spurious resetsTomas Winkler2014-01-084-14/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When reset is caused by hbm protocol mismatch or timeout we might end up in an endless reset loop and hbm protocol will never sync Cc: <stable@vger.kernel.org> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | mei: do not run reset flow from the interrupt threadTomas Winkler2014-01-086-138/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a potential deadlock in case of a firmware initiated reset mei_reset has a dialog with the interrupt thread hence it has to be run from an another work item Most of the mei_resets were called from mei_hbm_dispatch which is called in interrupt thread context so this function underwent major revamp. The error code is propagated to the interrupt thread and if needed the reset is scheduled from there. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | misc: genwqe: fix return value check in genwqe_device_create()Wei Yongjun2014-01-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case of error, the function device_create_with_groups() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | GenWQE: Fix warnings for sparcFrank Haverkamp2014-01-081-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dma_addr_t was not used, where it should have been used. Some format strings were not optimal. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | GenWQE: Fix compile problems for AlphaFrank Haverkamp2014-01-082-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The header which contained the declaration for kcalloc() was not inlcuded. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | Documentation/misc-devices/mei/mei-amt-version.c: remove unneeded call of ↵Paul Bolle2014-01-081-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mei_deinit() Building mei-amt-version.o triggers a GCC warning: Documentation/misc-devices/mei/mei-amt-version.c: In function 'main': Documentation/misc-devices/mei/mei-amt-version.c:103:5: warning: 'acmd.fd' is used uninitialized in this function [-Wuninitialized] if (cl->fd != -1) ^ Documentation/misc-devices/mei/mei-amt-version.c:443:21: note: 'acmd.fd' was declared here struct amt_host_if acmd; ^ GCC is correct. See, the call chain that GCC detects must be main() amt_host_if_init() mei_init() mei_deinit() But when we enter mei_deinit() struct amt_host_if acmd is still unitialized. That makes the test for (effectively) amt_host_if->mei_cl->fd bogus. But it turns out that call of mei_deinit() isn't needed at all. All of the members of mei_cl will be set later in mei_init() and none will be used before they are set. So we can simply drop this call of mei_deinit(). Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Cc: Tomas Winkler <tomas.winkler@intel.com> Reported-by: David Howells <dhowells@redhat.com> Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | GenWQE: Rework return code for flash-update ioctlFrank Haverkamp2014-01-081-129/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of remaining bytes of a failing copy_to_user, the flash-update ioctl is returning now -EFAULT. In addtion Dan discovered user triggerable dev_errs(). Those I removed now from card_dev.c too. Some dev_infos() were deleted and some others turned into dev_dbgs(). Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | sgi-xp: open-code interruptible_sleep_on_timeoutArnd Bergmann2014-01-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | interruptible_sleep_on_timeout is deprecated and going away soon. The use in the sgi-xp driver leaves me puzzled, so I'd prefer not to touch it. This patch replaces it with an open-coded prepare_to_wait and finish_wait pair, which should be completely equivalent, so it doesn't fix an existing race, but lets us get away with removing the function so we can not get any new users. In order to remove the typical sleep_on race, one would have to replace the call with wait_event_interruptible_timeout and add a condition to wait for. The fact that there is a one-jiffy timeout suggests that we don't actually expect to get woken up properly and the caller just uses this as a short sleeping function if it doesn't wake up properly. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Cliff Whickman <cpw@sgi.com> Acked-by: Robin Holt <robinmholt@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | GenWQE: Accidently casting to u32 where u64 is requiredFrank Haverkamp2013-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a casting to u32 where u64 would be appropriate. The bad casting made the driver unusable. Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | uio: fix devm_request_irq usageAaro Koskinen2013-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit e6789cd3dfb553077606ccafeb05e0043f072481 (uio: Simplify uio error path by using devres functions) converted uio to use devm_request_irq(). This introduced a change in behaviour since the IRQ is associated with the parent device instead of the created UIO device. The IRQ will remain active after uio_unregister_device() is called, and some drivers will crash because of this. The patch fixes this. Signed-off-by: Aaro Koskinen <aaro.koskinen@nsn.com> Cc: stable <stable@vger.kernel.org> # 3.13 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | GenWQE: Replace dynamic_hex_dump with print_hex_dump_debugFrank Haverkamp2013-12-201-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As requested by Greg, replacing the hexdump function from dynamic_debug.h with one defined in printk.h. I hope I picked the right one. Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | GenWQE: Fix endian issues detected by sparseFrank Haverkamp2013-12-204-59/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fengguang Wu used CF=-D__CHECK_ENDIAN__ to check the GenWQE driver for endian issues. Sparse found a couple of those. Most of them were caused by not correctly handling __be64/32 and __u64/32. Those I was able to fix with appropriate castings. One more serious issue was the ATS entry in struct genwqe_ddcb_cmd. The kernel expected it in big-endian, but the type was defined __u64. I decided that it is better to keep the interface consistent using host endian byte-odering instead of having a mixture. With this change the kernel likes to see host endian byte order for the ATS entry. That would have been an interface change, if someone would have used the driver already. Since this is not the case, I hope it is ok to fix it now. For the genqwe_readq/writeq/readl/writel functions I enforced the casts. It still complains, as far as I can see, about some copy_to/from_user() usages: CHECK char-misc/drivers/misc/genwqe/card_dev.c char-misc/arch/x86/include/asm/uaccess.h:625:18: warning: incorrect type in argument 1 (different modifiers) char-misc/arch/x86/include/asm/uaccess.h:625:18: expected void *<noident> char-misc/arch/x86/include/asm/uaccess.h:625:18: got void const *from char-misc/arch/x86/include/asm/uaccess.h:625:18: warning: incorrect type in argument 1 (different modifiers) char-misc/arch/x86/include/asm/uaccess.h:625:18: expected void *<noident> char-misc/arch/x86/include/asm/uaccess.h:625:18: got void const *from char-misc/arch/x86/include/asm/uaccess.h:625:18: warning: incorrect type in argument 1 (different modifiers) char-misc/arch/x86/include/asm/uaccess.h:625:18: expected void *<noident> char-misc/arch/x86/include/asm/uaccess.h:625:18: got void const *from char-misc/arch/x86/include/asm/uaccess.h:625:18: warning: incorrect type in argument 1 (different modifiers) char-misc/arch/x86/include/asm/uaccess.h:625:18: expected void *<noident> char-misc/arch/x86/include/asm/uaccess.h:625:18: got void const *from CC [M] drivers/misc/genwqe/card_dev.o CHECK char-misc/drivers/misc/genwqe/card_ddcb.c char-misc/arch/x86/include/asm/uaccess.h:625:18: warning: incorrect type in argument 1 (different modifiers) char-misc/arch/x86/include/asm/uaccess.h:625:18: expected void *<noident> char-misc/arch/x86/include/asm/uaccess.h:625:18: got void const *from char-misc/arch/x86/include/asm/uaccess.h:625:18: warning: incorrect type in argument 1 (different modifiers) char-misc/arch/x86/include/asm/uaccess.h:625:18: expected void *<noident> char-misc/arch/x86/include/asm/uaccess.h:625:18: got void const *from CC [M] drivers/misc/genwqe/card_ddcb.o LD [M] drivers/misc/genwqe/genwqe_card.o I appreciate some help from you to figure out what is causig those, and making a proposal how to fix them. I included the missing header file to fix the implicit-function-declaration warning when using dynamic_hex_dump. Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | GenWQE Enable driverFrank Haverkamp2013-12-184-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable possiblity to configure and build this driver. Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Co-authors: Joerg-Stephan Vogt <jsvogt@de.ibm.com>, Michael Jung <MIJUNG@de.ibm.com>, Michael Ruettger <michael@ibmra.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | GenWQE Sysfs interfacesFrank Haverkamp2013-12-182-0/+350
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sysfs interfaces for the GenWQE card. There are attributes to query the version of the bitstream as well as some for the driver. For debugging, please also see the debugfs interfaces of this driver. Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Co-authors: Joerg-Stephan Vogt <jsvogt@de.ibm.com>, Michael Jung <MIJUNG@de.ibm.com>, Michael Ruettger <michael@ibmra.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | GenWQE Debugfs interfacesFrank Haverkamp2013-12-182-0/+591
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Debugfs interfaces for the GenWQE card. Help to debug potential problems. Dump internal chip state for debugging and failure determination. Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Co-authors: Joerg-Stephan Vogt <jsvogt@de.ibm.com>, Michael Jung <MIJUNG@de.ibm.com>, Michael Ruettger <michael@ibmra.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | GenWQE Utility functionsFrank Haverkamp2013-12-181-0/+947
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Miscelanous functionality used in the other GenWQE driver parts. Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Co-authors: Joerg-Stephan Vogt <jsvogt@de.ibm.com>, Michael Jung <MIJUNG@de.ibm.com>, Michael Ruettger <michael@ibmra.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | GenWQE Character device and DDCB queueFrank Haverkamp2013-12-183-0/+3047
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GenWQE card itself provides access to a generic work queue into which the work can be put, which should be executed, e.g. compression or decompression request, or whatever the card was configured to do. Each request comes with a set of input data (ASV) and will produce some output data (ASIV). The request will also contain a sequence number, some timestamps and a command code/subcode plus some fields for hardware-/ software-interaction. A request can contain references to blocks of memory. Since the card requires DMA-addresses of that memory, the driver provides two ways to solve that task: 1) The drivers mmap() will allocate some DMAable memory for the user. The driver has a lookup table such that the virtual userspace address can properly be replaced and checked. 2) The user allocates memory and the driver will pin/unpin that memory and setup a scatter gatherlist with matching DMA addresses. Currently work requests are synchronous. Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Co-authors: Joerg-Stephan Vogt <jsvogt@de.ibm.com>, Michael Jung <MIJUNG@de.ibm.com>, Michael Ruettger <michael@ibmra.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | GenWQE PCI support, health monitoring and recoveryFrank Haverkamp2013-12-184-0/+2335
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Module initialization and PCIe setup. Card health monitoring and recovery functionality. Character device creation and deletion are controlled from here. Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com> Co-authors: Joerg-Stephan Vogt <jsvogt@de.ibm.com>, Michael Jung <MIJUNG@de.ibm.com>, Michael Ruettger <michael@ibmra.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | | i8k: Implement hwmon based fan speed controlGuenter Roeck2013-12-181-5/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fan speed can be set to off, slow, and fast, which can be exported to userspace through the hwmon ABI as pwm1 / pwm2. Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud