aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2011-03-28hp-wmi: clear rfkill device pointers when appropriateAnssi Hannula1-0/+8
NULLify rfkill pointers during initialization. This prevents dereference of invalid pointer in case the driver is rebound and some rfkill device isn't detected anymore. Clear them also in hp_wmi_rfkill_setup failure path so that an rfkill initialization failure doesn't need to be fatal for the whole driver. Signed-off-by: Anssi Hannula <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28hp-wmi: split rfkill initialization out of hp_wmi_bios_setupAnssi Hannula1-17/+29
Split initialization of rfkill devices from hp_wmi_bios_setup() to hp_wmi_rfkill_setup(). This makes the code somewhat cleaner, especially with the future command 0x1b rfkill support. Signed-off-by: Anssi Hannula <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28hp-wmi: allow setting input and output buffer sizes separatelyAnssi Hannula1-24/+39
Split buffersize parameter of hp_wmi_perform_query to insize and outsize. Existing callers are changed to use the same value for insize and outsize to avoid any regressions, with the exception of hp_wmi_set_block where the output buffer is unused and therefore outsize is set to 0 (this change is not seen by BIOS code). The maximum input buffer size is kept at 4 bytes as per struct bios_args. Some commands exist that take longer buffers, but they haven't been implemented. The data portion of bios_args can be trivially made dynamically allocated later when such larger buffers become needed. Signed-off-by: Anssi Hannula <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28hp-wmi: remove a variable that is never readAnssi Hannula1-2/+1
Remove the status variable from hp_wmi_perform_query which holds the return value from wmi_evaluate_method(). It is never checked as the function bails out if the output buffer hasn't been allocated which indicates the call failed. Signed-off-by: Anssi Hannula <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28hp-wmi: check query return value in hp_wmi_perform_queryAnssi Hannula1-0/+16
Check BIOS provided return value code in hp_wmi_perform_query and print a warning on error. Printing is suppressed for HPWMI_RET_UNKNOWN_CMDTYPE which is returned when the command type is unsupported. Signed-off-by: Anssi Hannula <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28sony-laptop: implement new backlight control methodMattia Dongili1-30/+79
Reasonably recent Vaios have a 0x12f or 0x137 handler that exposes a fine lid backlight regulation with values ranging from 0 to 255. The patch is based on findings and code from Javier Achirica <[email protected]> and Marco Chiappero <[email protected]> Signed-off-by: Mattia Dongili <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28sony-laptop: implement keyboard backlight supportMattia Dongili1-1/+175
Recent Vaios have the opportunity to control the keyboard backlight via ACPI calls to the SNC device. Introduce two module parameters to control how keyboard backlight should be set at module loading (default to on and with 10 seconds timeout). Tested-by: Marco Chiappero <[email protected]> Signed-off-by: Mattia Dongili <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28sony-laptop: cache handles and report them via sysfsMattia Dongili1-16/+81
Avoid calling into acpi each time we need to lookup a method handle and report the available handles to ease collection of information when debugging issues. Also move initialization of the platform driver earlier to allow adding files from other setup functions. Signed-off-by: Mattia Dongili <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28sony-laptop: remove unused Type4 defineMattia Dongili1-1/+0
Signed-off-by: Mattia Dongili <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28sony-laptop: use pr_<level> for messagesMattia Dongili1-54/+46
Signed-off-by: Mattia Dongili <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28sony-laptop: ignore hard switch rfkill events (SPIC)Mattia Dongili1-3/+5
There is not much use for these events in userspace and handling the events themselves seems to get in the way of the actual activation of the rf devices. The SNC device doesn't expose them already. https://bugzilla.kernel.org/show_bug.cgi?id=15303 Signed-off-by: Mattia Dongili <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28sony-laptop: add some debug printk useful for bug reportsMattia Dongili1-3/+11
Signed-off-by: Mattia Dongili <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28platform/x86: intel_mid_powerbutton needs INPUTRandy Dunlap1-1/+1
intel_mid_powerbtn.c uses input interfaces, so it should depend on INPUT to fix build errors when CONFIG_INPUT is not enabled: intel_mid_powerbtn.c:(.text+0x56ca8f): undefined reference to `input_event' intel_mid_powerbtn.c:(.devinit.text+0x2e7b4): undefined reference to `input_allocate_device' intel_mid_powerbtn.c:(.devinit.text+0x2e7ff): undefined reference to `input_set_capability' intel_mid_powerbtn.c:(.devinit.text+0x2e84a): undefined reference to `input_register_device' intel_mid_powerbtn.c:(.devinit.text+0x2e88b): undefined reference to `input_free_device' intel_mid_powerbtn.c:(.devexit.text+0x42f0): undefined reference to `input_unregister_device' Signed-off-by: Randy Dunlap <[email protected]> Cc: Hong Liu <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28Enable Dell All-In-One volume up/down keysColin Ian King3-0/+185
Enable volume up and down hotkeys on WMI events GUID 284A0E6B-380E-472A-921F-E52786257FB4 and GUID 02314822-307C-4F66-bf0E-48AEAEB26CC8. Also works around a firmware bug where the _WED method should return an integer containing the key code and in fact the method returns the key code in element zero of a buffer. BugLink: http://bugs.launchpad.net/bugs/701530 BugLink: http://bugs.launchpad.net/bugs/676997 Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28intel_mid_powerbtn: add power button driver for Medfield platform (#3)Hong Liu3-0/+157
The power button is connected to MSIC on Medfield, we will get two interrupts from IOAPIC when pressing or releasing the power button. Signed-off-by: Hong Liu <[email protected]> [Minor fixes as noted by Dmitry] Signed-off-by: Alan Cox <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28eeepc-wmi: add camera keysCorentin Chary1-0/+7
These keys are supposed to be handled by any software using the camera (like webKam or cheese...). They can also be used to actually move the camera when possible. Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28eeepc-wmi: reorder device idsCorentin Chary1-0/+11
Each device seems to be in a "group" (devid >> 16 & 0xFF). Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28eeepc-wmi: add touchpad sysfs fileCorentin Chary1-0/+5
Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28asus-laptop: remove deprecated interfaces (lcd_switch and display_get)Corentin Chary1-160/+3
I should have done that one year ago, so it's more than time to do it. These two features use non-standard interfaces. There are the only features that really need multiple path to guess what's the right method name on a specific laptop. Removing them allow to remove a lot of code an significantly clean the driver. This will affect the backlight code which won't be able to know if the backlight is on or off. The platform display file will also be write only (like the one in eeepc-laptop). Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28asus-laptop: let WLED alone on L1400BCorentin Chary1-0/+17
Asus took the DSDT from another model (L84F), made some change to make it work, but forgot to remove WLED method (the laptop doesn't have a wireless card). They even didn't change the model name. ref: https://bugzilla.kernel.org/show_bug.cgi?id=25712 Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28eeepc-wmi: comments keymap to clarify the meaning of some keysCorentin Chary1-3/+3
Found while checking PDF manuals... Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28eeepc-wmi: real touchpad led device id is 0x001000012Corentin Chary1-6/+6
Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28eeepc-wmi: respect wireless_hotplug settingCorentin Chary1-0/+3
Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28eeepc-wmi: support backlight power (bl_power) attributeCorentin Chary1-14/+61
Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28eeepc-wmi: set the right key code for 0xe9Corentin Chary1-1/+1
This key should power off the backlight, not the display, it is also used in acpi/video.c to do the same thing. Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28eeepc-wmi: add wimax supportCorentin Chary1-1/+19
Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28eeepc-wmi: add camera and card reader supportCorentin Chary1-1/+88
Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28eeepc-wmi: use the presence bit correctlyCorentin Chary1-8/+5
I checked some more DSDT, and it seems that I wasn't totally right about the meaning of DSTS return value. Bit 0 is clearly the status of the device, and I discovered that bit 16 is set when the device is present. Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28eeepc-wmi: reorder definesCorentin Chary1-9/+9
Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28eeepc-wmi: switch to platform_create_bundle()Corentin Chary1-53/+22
This allow to remove ~30 lines of code. Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28eeepc-wmi: add hibernate/resume callbacksCorentin Chary1-0/+49
Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28eeepc-wmi: add an helper using simple return codesCorentin Chary1-57/+39
eeepc_wmi_get_devstate returns an acpi_status, so each call need extra logic to handle the return code. This patch add a simple getter, returning a boolean (or a negative error code). Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28eeepc-wmi: return proper error code in eeepc_rfkill_set()Corentin Chary1-1/+7
Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28eeepc-wmi: serialize access to wmi methodCorentin Chary1-6/+72
\AMW0.WMBC, which is the main method that we use, is not reentrant. When wireless hotpluging is enabled, toggling the status of the wireless device using WMBC will trigger a notification and the notification handler need to call WMBC again to get the new status of the device, this will trigger the following error: ACPI Error (dswload-0802): [_T_0] Namespace lookup failure, AE_ALREADY_EXISTS ACPI Exception: AE_ALREADY_EXISTS, During name lookup/catalog (20100428/psloop-231) ACPI Error (psparse-0537): Method parse/execution failed [\AMW0.WMBC] (Node f7023b88), AE_ALREADY_EXISTS ACPI: Marking method WMBC as Serialized because of AE_ALREADY_EXISTS error Since there is currently no way to tell the acpi subsystem to mark a method as serialized, we do it in eeepc-wmi. Of course, we could let the first call fail, and then it would work, but it doesn't seems really clean, and it will make the first WMBC call return a random value. This patch was tested on EeePc 1000H with a RaLink RT2860 wireless card using the rt2800pci driver. rt2860sta driver seems to deadlock when we remove the pci device... Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28eeepc-wmi: add hotplug code for Eeepc 1000HCorentin Chary1-1/+273
Implement wireless like hotplug handling (code stolen from eeepc-laptop). Reminder: on some models rfkill is implemented by logically unplugging the wireless card from the PCI bus. Despite sending ACPI notifications, this does not appear to be implemented using standard ACPI hotplug - nor does the firmware provide the _OSC method required to support native PCIe hotplug. The only sensible choice appears to be to handle the hotplugging directly in the platform driver. Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28eeepc-wmi: add wlan key found on 1015PCorentin Chary1-0/+1
Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28eeepc-wmi: reorder keymapCorentin Chary1-7/+7
Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28OLPC XO-1.5 ebook switch driverPaul Fox3-0/+191
The OLPC XO-1.5 has an ebook switch, triggered when the laptop screen is rotated then folding down, converting the device into ebook form. This switch is exposed through ACPI. Add a driver that exposes it to userspace as an input device. Signed-off-by: Daniel Drake <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-28gpio: driver for 42 AB8500 GPIO pinsBibek Basu5-1/+543
To get rid of port expanders, the free GPIOs of ab8500 can be used. There are 42 GPIO pins. Out of which 16 are interrupt capable.This patch implements 16 virtual IRQ mapped to 16 interrupt capable AB8500 GPIOs. Signed-off-by: Bibek Basu <[email protected]> Acked-by: Grant Likely <[email protected]> [Renamed header file as per MFD structure] Signed-off-by: Linus Walleij <[email protected]>
2011-03-27net: fix ethtool->set_flags not intended -EINVAL return valueStanislaw Gruszka5-7/+7
After commit d5dbda23804156ae6f35025ade5307a49d1db6d7 "ethtool: Add support for vlan accleration.", drivers that have NETIF_F_HW_VLAN_TX, and/or NETIF_F_HW_VLAN_RX feature, but do not allow enable/disable vlan acceleration via ethtool set_flags, always return -EINVAL from that function. Fix by returning -EINVAL only if requested features do not match current settings and can not be changed by driver. Change any driver that define ethtool->set_flags to use ethtool_invalid_flags() to avoid similar problems in the future (also on drivers that do not have the problem). Tested with modified (to reproduce this bug) myri10ge driver. Cc: [email protected] # 2.6.37+ Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-03-27mlx4_en: Fix loss of promiscuityHerbert Xu1-0/+3
The mlx4_en driver uses the combination stop_port/start_port in a number of places. Unfortunately that causes any promiscuous mode settings on the hardware to be lost. This patch fixes that problem. Signed-off-by: Herbert Xu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-03-27tg3: Fix inline keyword usageJavier Martinez Canillas1-1/+1
The correct usage is "static inline void" not "static void inline". Signed-off-by: Javier Martinez Canillas <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-03-27tg3: use <linux/io.h> and <linux/uaccess.h> instead <asm/io.h> and ↵Javier Martinez Canillas1-2/+2
<asm/uaccess.h> It is proper style to include linux/foo.h instead asm/foo.h if both exist Signed-off-by: Javier Martinez Canillas <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-03-27net: use CHECKSUM_NONE instead of magic numberCesar Eduardo Barros1-1/+1
Two places in the kernel were doing skb->ip_summed = 0. Change both to skb->ip_summed = CHECKSUM_NONE, which is more readable. Signed-off-by: Cesar Eduardo Barros <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-03-27Net / jme: Do not use legacy PCI power managementRafael J. Wysocki1-14/+16
The jme driver uses the legacy PCI power management, so it has to do some PCI-specific things in its ->suspend() and ->resume() callbacks, which isn't necessary and should better be done by the PCI sybsystem-level power management code. It also doesn't use device wakeup flags correctly. Convert jme to the new PCI power management framework and make it let the PCI subsystem take care of all the PCI-specific aspects of device handling during system power transitions. Signed-off-by: Rafael J. Wysocki <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-03-27myri10ge: small rx_done refactoringStanislaw Gruszka1-14/+23
Avoid theoretical race condition regarding accessing dev->features NETIF_F_LRO flag, which is illustrated below. CPU1 CPU2 myri10ge_clean_rx_done(): myri10ge_set_flags(): or myri10ge_set_rx_csum(): if (dev->features & NETIF_F_LRO) setup lro dev->features |= NETIF_F_LRO or dev->features &= ~NETIF_F_LRO; if (dev->features & NETIF_F_LRO) flush lro On the way reduce myri10ge_rx_done() number of arguments and calls by moving mgp->small_bytes check into that function. That reduce code size from: text data bss dec hex filename 36644 248 100 36992 9080 drivers/net/myri10ge/myri10ge.o to: text data bss dec hex filename 36037 247 100 36384 8e20 drivers/net/myri10ge/myri10ge.o on my i686 system, what should also make myri10ge_clean_rx_done() being faster. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-03-27can: c_can: Fix tx_bytes accountingJan Altenberg1-1/+1
The current SocketCAN implementation for the Bosch c_can cell doesn't account the TX bytes correctly, because it calls c_can_inval_msg_object() (which clears the msg ctrl register) before reading the DLC value: for (/* nix */; (priv->tx_next - priv->tx_echo) > 0; priv->tx_echo++) { msg_obj_no = get_tx_echo_msg_obj(priv); c_can_inval_msg_object(dev, 0, msg_obj_no); val = c_can_read_reg32(priv, &priv->regs->txrqst1); if (!(val & (1 << msg_obj_no))) { can_get_echo_skb(dev, msg_obj_no - C_CAN_MSG_OBJ_TX_FIRST); stats->tx_bytes += priv->read_reg(priv, &priv->regs->ifregs[0].msg_cntrl) & IF_MCONT_DLC_MASK; stats->tx_packets++; } } So, we will always read 0 for the DLC value and "ifconfig" will report *0* TX Bytes. The fix is quite easy: Just move c_can_inval_msg_object() to the end of the if() statement. So: * We only call c_can_inval_msg_object() if the message was actually transmitted * We read out the DLC value _before_ clearing the msg ctrl register Signed-off-by: Jan Altenberg <[email protected]> Acked-by: Kurt Van Dijck <[email protected]> Acked-by: Wolfgang Grandegger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-03-27can: c_can_platform: fix irq check in probeMarc Kleine-Budde1-4/+5
This patch fixes the check in the probe function whether a IRQ was supplied to the driver. The original driver check the irq "struct resource *" against <= 0. Use "platform_get_irq" instead. Signed-off-by: Marc Kleine-Budde <[email protected]> Cc: Bhupesh Sharma <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-03-27can: c_can: disable one shot mode until driver is fixedMarc Kleine-Budde1-10/+4
This patch disables the one shot mode, until the driver has been fixed and tested to support it. > I'm quite sure I've seen a situation where msg_obj 17 "seemed" to be > pending, while msg_obj 18 and 19 already have been transmitted. But > in that case, I enabled ONESHOT for the can interface, which enables > the DA mode (automatic retransmission is disabled). Reported-by: Jan Altenberg <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]> Signed-off-by: Kurt Van Dijck <[email protected]> Cc: Bhupesh Sharma <[email protected]> Acked-by: Wolfgang Grandegger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-03-27Merge branch 'irq-cleanup-for-linus' of ↵Linus Torvalds1-29/+29
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'irq-cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: tile: Use generic show_interupts() tile: Convert to new irq function names dma: Ipu: Convert interupt code