summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge git://github.com/rustyrussell/linuxLinus Torvalds2012-03-288-99/+172
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull module and param updates from Rusty Russell: "I'm getting married next week, and then honeymoon until 6th May. I'll be offline from next week, except to post the compulsory pictures if Alex shaves her head..." I'm sure Rusty can take time off from his honeymoon if something comes up. And here's the explanation about head shaving: http://baldalex.org/ in case you wondered and wanted to support another insane caper or Rusty's involving shaving. What *is* it with Rusty and shaving, anyway? * git://github.com/rustyrussell/linux: module: Remove module size limit module: move __module_get and try_module_get() out of line. params: <level>_initcall-like kernel parameters module_param: remove support for bool parameters which are really int. module: add kernel param to force disable module load
| * module: Remove module size limitSasha Levin2012-03-261-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Module size was limited to 64MB, this was legacy limitation due to vmalloc() which was removed a while ago. Limiting module size to 64MB is both pointless and affects real world use cases. Cc: Tim Abbott <tim.abbott@oracle.com> Cc: stable@vger.kernel.org Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * module: move __module_get and try_module_get() out of line.Steven Rostedt2012-03-262-28/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the preempt, tracepoint and everything, it's getting a bit chubby. For an Ubuntu-based config: Before: $ size -t `find * -name '*.ko'` | grep TOTAL 56199906 3870760 1606616 61677282 3ad1ee2 (TOTALS) $ size vmlinux text data bss dec hex filename 8509342 850368 3358720 12718430 c2115e vmlinux After: $ size -t `find * -name '*.ko'` | grep TOTAL 56183760 3867892 1606616 61658268 3acd49c (TOTALS) $ size vmlinux text data bss dec hex filename 8501842 849088 3358720 12709650 c1ef12 vmlinux Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (made all out-of-line)
| * params: <level>_initcall-like kernel parametersPawel Moll2012-03-266-41/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a set of macros that can be used to declare kernel parameters to be parsed _before_ initcalls at a chosen level are executed. We rename the now-unused "flags" field of struct kernel_param as the level. It's signed, for when we use this for early params as well, in future. Linker macro collating init calls had to be modified in order to add additional symbols between levels that are later used by the init code to split the calls into blocks. Signed-off-by: Pawel Moll <pawel.moll@arm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * module_param: remove support for bool parameters which are really int.Rusty Russell2012-03-262-34/+8
| | | | | | | | | | | | | | | | | | | | | | module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. This eliminates that code (though leaves the flags field in the struct, for impending use). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * module: add kernel param to force disable module loadDave Young2012-03-262-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes we need to test a kernel of same version with code or config option changes. We already have sysctl to disable module load, but add a kernel parameter will be more convenient. Since modules_disabled is int, so here use bint type in core_param. TODO: make sysctl accept bool and change modules_disabled to bool Signed-off-by: Dave Young <dyoung@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* | Merge branch 'for-linus' of ↵Linus Torvalds2012-03-282-1/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull an Apparmor bugfix from James Morris. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: apparmor: Fix change_onexec when called from a confined task
| * | apparmor: Fix change_onexec when called from a confined taskJohn Johansen2012-03-282-1/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix failure in aa_change_onexec api when the request is made from a confined task. This failure was caused by two problems The AA_MAY_ONEXEC perm was not being mapped correctly for this case. The executable name was being checked as second time instead of using the requested onexec profile name, which may not be the same as the exec profile name. This mistake can not be exploited to grant extra permission because of the above flaw where the ONEXEC permission was not being mapped so it will not be granted. BugLink: http://bugs.launchpad.net/bugs/963756 Signed-off-by: John Johansen <john.johansen@canonical.com> Signed-off-by: James Morris <james.l.morris@oracle.com>
* | Merge branch 'linux_next' of ↵Linus Torvalds2012-03-287-102/+208
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac Pull EDAC fixes from Mauro Carvalho Chehab: "A series of EDAC driver fixes. It also has one core fix at the documentation, and a rename patch, fixing the name of the struct that contains the rank information." * 'linux_next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac: edac: rename channel_info to rank_info i5400_edac: Avoid calling pci_put_device() twice edac: i5100 ack error detection register after each read edac: i5100 fix erroneous define for M1Err edac: sb_edac: Fix a wrong value setting for the previous value edac: sb_edac: Fix a INTERLEAVE_MODE() misuse edac: sb_edac: Let the driver depend on PCI_MMCONFIG edac: Improve the comments to better describe the memory concepts edac/ppc4xx_edac: Fix compilation Fix sb_edac compilation with 32 bits kernels
| * | edac: rename channel_info to rank_infoMauro Carvalho Chehab2012-03-212-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | What it is pointed by a csrow/channel vector is a rank information, and not a channel information. On a traditional architecture, the memory controller directly access the memory ranks, via chip select rows. Different ranks at the same DIMM is selected via different chip select rows. So, typically, one csrow/channel pair means one different DIMM. On FB-DIMMs, there's a microcontroller chip at the DIMM, called Advanced Memory Buffer (AMB) that serves as the interface between the memory controller and the memory chips. The AMB selection is via the DIMM slot, and not via a csrow. It is up to the AMB to talk with the csrows of the DRAM chips. So, the FB-DIMM memory controllers see the DIMM slot, and not the DIMM rank. RAMBUS is similar. Newer memory controllers, like the ones found on Intel Sandy Bridge and Nehalem, even working with normal DDR3 DIMM's, don't use the usual channel A/channel B interleaving schema to provide 128 bits data access. Instead, they have more channels (3 or 4 channels), and they can use several interleaving schemas. Such memory controllers see the DIMMs directly on their registers, instead of the ranks, which is better for the driver, as its main usageis to point to a broken DIMM stick (the Field Repleceable Unit), and not to point to a broken DRAM chip. The drivers that support such such newer memory architecture models currently need to fake information and to abuse on EDAC structures, as the subsystem was conceived with the idea that the csrow would always be visible by the CPU. To make things a little worse, those drivers don't currently fake csrows/channels on a consistent way, as the concepts there don't apply to the memory controllers they're talking with. So, each driver author interpreted the concepts using a different logic. In order to fix it, let's rename the data structure that points into a DIMM rank to "rank_info", in order to be clearer about what's stored there. Latter patches will provide a better way to represent the memory hierarchy for the other types of memory controller. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * | i5400_edac: Avoid calling pci_put_device() twiceMauro Carvalho Chehab2012-03-211-16/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When i5400_edac driver is removed and re-loaded a few times, it causes an OOPS, as it is currently decrementing some PCI device usage two times. When called inside a loop, pci_get_device() will call pci_put_device(). That mangles the error count. In this specific case, it seems easier to just duplicate the call. Also fixes the error logic when pci_get_device fails. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * | edac: i5100 ack error detection register after each readNiklas Söderlund2012-03-211-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If I only ack the detection register after a error have been detected I'm unable to reliably detect errors. I have verified this behavior using both an error injection DIMM and software to inject errors. I can't find any documentation supporting this behavior in Intel 5100 Memory Controller Hub Chipset, see 1. So this is all based on experimentation. [1] Intel® 5100 Memory Controller Hub Chipset http://www.intel.com/content/dam/doc/datasheet/5100- memory-controller-hub-chipset-datasheet.pdf Signed-off-by: Niklas Söderlund <niklas.soderlund@ericsson.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * | edac: i5100 fix erroneous define for M1ErrNiklas Söderlund2012-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to [1] the define for M1Err in the FERR_NF_MEM register is wrong. It should be at position 1 not 0. [1] Intel 5100 Memory Controller Hub Chipset Doc.Nr: 318378 http://www.intel.com/content/dam/doc/datasheet/5100- memory-controller-hub-chipset-datasheet.pdf Reported-by: Ba Thang Nguyen <thang.b.nguyen@dektech.com.au> Signed-off-by: Niklas Söderlund <niklas.soderlund@ericsson.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * | edac: sb_edac: Fix a wrong value setting for the previous valueHui Wang2012-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | >From the driver design, the variable limit wants to compare with its previous value, we should set the value of limit instead of the value of tmp_mb to the variable prev. Signed-off-by: Hui Wang <jason77.wang@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * | edac: sb_edac: Fix a INTERLEAVE_MODE() misuseHui Wang2012-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can identify dram interleave mode from the Dram Rule register rather than Dram Interleave list register. In this context, the reg of INTERLEAVE_MODE(reg) contains the Dram Interleave list register, we can't get interleave mode from the reg, while the variable interleave_mode saves the the mode got from the Dram Rule register, so we use the variable to replace INTERLEAVE_MDDE(reg) here. Signed-off-by: Hui Wang <jason77.wang@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * | edac: sb_edac: Let the driver depend on PCI_MMCONFIGHui Wang2012-03-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver needs to access PCIe Extended Configuration Space Registers (0x100~0xfff), to correctly access those registers, we need to enable PCI_MMCONFIG option. Since this option is not enabled for X86_64 by default, we let the driver depend on it to prevent users forgetting to enable this option. Signed-off-by: Hui Wang <jason77.wang@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * | edac: Improve the comments to better describe the memory conceptsMauro Carvalho Chehab2012-03-211-46/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Computer memory terminology has changed with time since EDAC was originally written: new concepts were introduced, and some things have different meanings, depending on the memory architecture. Improve the definition of all related terms. Also, describe each memory type in a more detailed fashion. No functional changes. Just comments were touched. Acked-by: Borislav Petkov <borislav.petkov@amd.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * | edac/ppc4xx_edac: Fix compilationMauro Carvalho Chehab2012-03-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems that nobody is cross-compiling for this arch anymore... drivers/edac/ppc4xx_edac.c: In function 'ppc4xx_edac_probe': drivers/edac/ppc4xx_edac.c:188:12: error: storage class specified for parameter 'ppc4xx_edac_remove' ... drivers/edac/ppc4xx_edac.c:1068:19: error: 'match' undeclared (first use in this function) drivers/edac/ppc4xx_edac.c:1068:19: note: each undeclared identifier is reported only once for each function it appears in drivers/edac/ppc4xx_edac.c:1068:36: warning: left-hand operand of comma expression has no effect [-Wunused-value] Acked-by: Josh Boyer <jwboyer@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * | Fix sb_edac compilation with 32 bits kernelsMauro Carvalho Chehab2012-03-212-20/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported by Josh Boyer <jwboyer@redhat.com>: > drivers/edac/sb_edac.c: In function 'get_memory_error_data': > drivers/edac/sb_edac.c:861:2: warning: left shift count >= width of type > [enabled by default] > <snip> > ERROR: "__udivdi3" [drivers/edac/sb_edac.ko] undefined! > make[1]: *** [__modpost] Error 1 > make: *** [modules] Error 2 PS.: compile-tested only Reported-by: Josh Boyer <jwboyer@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | | Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86Linus Torvalds2012-03-2836-2403/+2437
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull x86 platform driver updates from Matthew Garrett: "Some significant updates to samsung-laptop, additional hardware support for Toshibas, misc updates to various hardware and a new backlight driver for some Apple machines." Fix up trivial conflicts: geode Geos update happening next to net5501 support, and MSIC thermal platform support added twice. * 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86: (77 commits) acer-wmi: add quirk table for video backlight vendor mode drivers/platform/x86/amilo-rfkill.c::amilo_rfkill_probe() avoid NULL deref samsung-laptop: unregister ACPI video module for some well known laptops acer-wmi: No wifi rfkill on Sony machines thinkpad-acpi: recognize Lenovo as version string in newer V-series BIOS asus-wmi: don't update power and brightness when using scalar eeepc-wmi: split et2012 specific hacks eeepc-wmi: refine quirks handling asus-nb-wmi: set panel_power correctly asus-wmi: move WAPF variable into quirks_entry asus-wmi: store backlight power status for AIO machine asus-wmi: add scalar board brightness adj. support samsung-laptop: cleanup return type: mode_t vs umode_t drivers, samsung-laptop: fix usage of isalnum drivers, samsung-laptop: fix initialization of sabi_data in sabi_set_commandb asus-wmi: on/off bit is not set when reading the value eeepc-wmi: add extra keymaps for EP121 asus-nb-wmi: ignore useless keys acer-wmi: support Lenovo ideapad S205 Brazos wifi switch acer-wmi: fix out of input parameter size when set ...
| * | | acer-wmi: add quirk table for video backlight vendor modeLee, Chun-Yi2012-03-262-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There have some acer laptop have broken _BCM implemenation, the AML code wrote value to EC register but firmware didn't change brighenss. Fortunately, the brightness control works on those machines with vendor mode. So, add quirk table for video backlight vendor mode and unregister acpi video interface on those machines. Tested on Acer TravelMate 4750 Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | drivers/platform/x86/amilo-rfkill.c::amilo_rfkill_probe() avoid NULL derefJesper Juhl2012-03-261-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In drivers/platform/x86/amilo-rfkill.c::amilo_rfkill_probe() the call to dmi_first_match() may fail and return NULL. If it does return NULL, then we'll be dereferencing a NULL pointer in the rfkill_alloc() call where we do 'system_id->driver_data' --> KABOOM! Avoid that problem by testing for a NULL return value from dmi_first_match() and bailing out if it fails. I was a bit uncertain about what to return in the failure case. In the end I settled for -ENXIO as the most logical error to return. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | samsung-laptop: unregister ACPI video module for some well known laptopsCorentin Chary2012-03-261-4/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On these laptops, the ACPI video is not functional, and very unlikely to be fixed by the vendor. Note that intel_backlight works for some of these laptops, and the backlight from samsung-laptop always work. The good news is that newer laptops have functional ACPI video device and won't end up growing this list. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | acer-wmi: No wifi rfkill on Sony machinesLee, Chun-Yi2012-03-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The wireless rfkill should charged by sony-laptop but not acer-wmi. So, add Sony's SNY5001 acpi device to blacklist in acer-wmi. Tested on Sony Vaio Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Mattia Dongili <malattia@linux.it> Cc: Dimitris N <ddarlac@gmail.com> Tested-by: Dimitris N <ddarlac@gmail.com> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | thinkpad-acpi: recognize Lenovo as version string in newer V-series BIOSManoj Iyer2012-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The newer V series bios reports product version as 'Lenovo' instead of 'ThinkPad'. Recoginze this new string so that the module can load. Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com> Tested-by: James Ferguson <james.ferguson@canonical.com> Tested-by: Dennis Chua <dennis.chua@canonical.com> Tested-by: Ike Pan <ike.pan@canonical.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
| * | | asus-wmi: don't update power and brightness when using scalarCorentin Chary2012-03-261-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | But we can still do it on other boards, as this might happen if the backlight driver change when update_bl is called. Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | eeepc-wmi: split et2012 specific hacksCorentin Chary2012-03-261-14/+20
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | eeepc-wmi: refine quirks handlingCorentin Chary2012-03-261-5/+8
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | asus-nb-wmi: set panel_power correctlyCorentin Chary2012-03-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Even if it's currently unused. Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | asus-wmi: move WAPF variable into quirks_entryCorentin Chary2012-03-264-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some models work better with different values of wapf, so move the variable into quriks_entry to make it more easy to give a specific value to different models. Based on original patch from AceLan Kao <acelan.kao@canonical.com> Cc: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | asus-wmi: store backlight power status for AIO machineAceLan Kao2012-03-263-16/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to some implementation reasons, ASUS ET2012 All-in-One machines can't report the correct backlight power status, it will always return 1. To track the backlight power status correctly, we have to store the status by ourselves. BTW, by the BIOS design, the backlight power will be turn on/off sequently, no matter what the value of the parameter will be. More over, the brightness adjustment command will turn on the backlight power. Those behaviors will make us fail to track the backlight power status. For example, While we are trying to turn on the backlight power, we will send out the brightness adjustment command and then trying to figure out if we have to turn on the backlight power, then send out the command. But, the real case is that, the backlight power turns on while sending the brightness adjustment command, and then we send out the command to turn on the backlight power, it actually will turn off the backlight power and the backlight power status we recorded becomes wrong. So, we have to seperate these two commands by a if statement. Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | asus-wmi: add scalar board brightness adj. supportAceLan Kao2012-03-264-33/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some ASUS ET2012E/I All-in-One machines that use a scalar board to control the brightness, and they only accept brightness up and down command. So, I introduced a get_scalar_command() function to pass the command to the scalar board through WMI. Besides, we have to store the brightness value locally, for we need the old value to know the brightness value is increasing or decreasing. BTW, since there is no way to retrieve the actual brightness(it would be a fixed value), and the max brightness value would be fixed to 1, so we have to keep passing the brightness up/down command when we reached the max brightness value or 0. Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | samsung-laptop: cleanup return type: mode_t vs umode_tDan Carpenter2012-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function returns a umode_t (unsigned short) instead of mode_t which is an unsigned int on some architectures. Cleaning this up silences a compile warning: drivers/platform/x86/samsung-laptop.c:1108:2: warning: initialization from incompatible pointer type [enabled by default] Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | drivers, samsung-laptop: fix usage of isalnumDavid Rientjes2012-03-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | linux/ctype.h is needed for isalnum() to avoid a build error: drivers/platform/x86/samsung-laptop.c: In function ‘samsung_sabi_diag’: drivers/platform/x86/samsung-laptop.c:1306: error: implicit declaration of function ‘isalnum’ Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | drivers, samsung-laptop: fix initialization of sabi_data in sabi_set_commandbDavid Rientjes2012-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fields d0, d1, d2, and d3 are members of an anonymous struct inside an anonymous union inside struct sabi_data. Initialization must be done by wrapping the anonymous union and structs with brackets to avoid a build error: drivers/platform/x86/samsung-laptop.c: In function ‘sabi_set_commandb’: drivers/platform/x86/samsung-laptop.c:433: error: unknown field ‘d0’ specified in initializer drivers/platform/x86/samsung-laptop.c:433: warning: missing braces around initializer drivers/platform/x86/samsung-laptop.c:433: warning: (near initialization for ‘in.<anonymous>’) ... Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | asus-wmi: on/off bit is not set when reading the valueCorentin Chary2012-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | eeepc-wmi: add extra keymaps for EP121Chih-Wei Huang2012-03-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw> Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | asus-nb-wmi: ignore useless keysCorentin Chary2012-03-261-0/+2
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | acer-wmi: support Lenovo ideapad S205 Brazos wifi switchLee, Chun-Yi2012-03-261-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vaclav found a new ideapad S205 Brazos machine that used the same EC register of wireless with S205 but has different product name. So, add this machine to quirk for support wireless rfkill. Tested on Lenovo ideapad S205 Brazos Tested-by: Vaclav Mocek <vmocek@gmail.com> Acked-by: Ike Panhc <ike.pan@canonical.com> Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | acer-wmi: fix out of input parameter size when setLee, Chun-Yi2012-03-261-12/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The input parameter of set device status is different with get device status. There have volume value element for set status but don't need for get action. On Acer TravelMate 4750 creates field on volume value element even doesn't use it in DSDT. So, add this patch for separate input paramter between set device status with get status. Tested on Acer TravelMate 4750 Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | acer-wmi: Detect communication hot key numberLee, Chun-Yi2012-03-261-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we set a fixed hot key number to 0x01 for communction button, but, actually, the key number is different on each acer laptop and it was reported by SMBIOS. So, add this patch to get the communication hot key number from Acer OEM-specific SMBIOS Type AA. Tested on Acer TravelMate 4750 Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | platform/x86: Add driver for Apple gmux deviceSeth Forshee2012-03-263-0/+255
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apple laptops with hybrid graphics have a device named gmux that controls the muxing of the LVDS panel between the GPUs as well as screen brightness. This driver adds support for the gmux device. Only backlight control is supported initially. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com> Tested-by: Grant Likely <grant.likely@secretlab.ca>
| * | | apple_bl: Add register/unregister functionsSeth Forshee2012-03-222-2/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add functions to allow other modules to enable or disable apple_bl. This will be used by the gmux driver to disable apple_bl when the gmux is present, as it is a better and more reliable option for brightness control. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | toshiba_acpi: Refuse to load on machines with buggy INFO implementationsSeth Forshee2012-03-223-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several Satellite models have a buggy implementation of the INFO method that causes ACPI exceptions when executed: ACPI Error: Result stack is empty! State=ffff88012d70f800 (20110413/dswstate-98) ACPI Exception: AE_AML_NO_RETURN_VALUE, Missing or null operand (20110413/dsutils-646) ACPI Exception: AE_AML_NO_RETURN_VALUE, While creating Arg 0 (20110413/dsutils-763) ACPI Error: Method parse/execution failed [\_SB_.VALZ.GETE] (Node ffff880131175eb0), AE_AML_NO_RETURN_VALUE (20110413/psparse-536) ACPI Error: Method parse/execution failed [\_SB_.VALZ.INFO] (Node ffff880131175ed8), AE_AML_NO_RETURN_VALUE (20110413/psparse-536) toshiba_acpi: ACPI INFO method execution failed toshiba_acpi: Failed to query hotkey event All known machines with this implementation also have a WMI interface with event GUID 59142400-C6A3-40FA-BADB-8A2652834100 which is not seen on any other models. Refuse to load toshiba_acpi on machines with this guid. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | toshiba_acpi: Support additional hotkey scancodesAzael Avalos2012-03-221-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These scancodes are used by many of the models now supported with the addition of TOS1900 device support. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | toshiba_acpi: Support alternate hotkey interfacesSeth Forshee2012-03-221-36/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two types of problems that prevent hotkeys from working on many of the machines supported by toshiba_acpi. The first of these is the lack of a functioning SCI for hotkey events. For these machines it is possible to filter the Fn keypresses from the keyboard and generate a notification by executing the ACPI NTFY method. The second problem is a lack of support for HCI_SYSTEM_EVENT, which is used for reading the hotkey scancodes. On these machines the scancodes can be read by executing the ACPI NTFY method. This patch fixes both problems by installing an i8042 filter when the NTFY method is present to generate notifications and by detecting which of INFO or HCI_SYSTEM_EVENT is supported for reading scancodes. If neither method of reading scancodes is supported, the hotkey input device is not registered. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | ACPI: EC: Add ec_get_handle()Seth Forshee2012-03-202-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | toshiba_acpi needs to execute an AML method within the EC namespace to make hotkeys work on some platforms. Provide an interface to allow it to easily get a handle to the EC namespace for this purpose. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | intel_mid_powerbtn: use MSIC read/write instead of ipc_scuMichael Demeter2012-03-201-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the 2.6.36 kernel we did not have the MSIC driver. Changed all ipc_scu_reads/writes to use the MSIC driver and defines. Added a fix from the 2.6.36 kernel where the SCU FW could send a power button interrupt to the IA32 FW and the kernel was not running yet. This resulted in the interrupt not getting cleared and the power button was ignored. this fix just clears the interrupt on start-up. Signed-off-by: Michael Demeter <michael.demeter@intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Revert style-only changes. Remove unused variable. Fix comment style.] Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | platform, x86: Kill off MoorestownAlan Cox2012-03-204-752/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All production devices operate in the Oaktrail configuration with legacy PC elements present and an ACPI BIOS. Continue stripping out the Moorestown elements from the tree leaving Medfield. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | | hdaps: trivial fix for -WuninitializedDanny Kukawka2012-03-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Trivial fix for some -Wuninitialized compiler warnings. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: Matthew Garrett <mjg@redhat.com>
OpenPOWER on IntegriCloud