summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'fortglx/3.0/tip/timers/ptp' of ↵Thomas Gleixner2011-06-061-5/+6
|\ | | | | | | git://git.linaro.org/people/jstultz/linux into timers/urgent
| * ptp: Fix some locking bugs in ptp_read()Dan Carpenter2011-06-021-4/+4
| | | | | | | | | | | | | | | | | | In ptp_read there is an unlock missing on an error path, and a double unlock on another error path. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Richard Cochran <richard.cochran@omicron.at> Signed-off-by: John Stultz <john.stultz@linaro.org>
| * ptp: Return -EFAULT on copy_to_user() errorsDan Carpenter2011-06-021-1/+2
| | | | | | | | | | | | | | | | | | copy_to_user() returns the number of bytes remaining, but we want a negative error code in ptp_ioctl. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Richard Cochran <richard.cochran@omicron.at> Signed-off-by: John Stultz <john.stultz@linaro.org>
* | rtc: Staticize non-exported __rtc_set_alarm()Mark Brown2011-06-021-1/+1
| | | | | | | | | | | | | | | | It's not referenced outside this file so there's no need for it to be in the global namespace and sparse warns about that. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: John Stultz <john.stultz@linaro.org>
* | rtc: Fix ioctl error path returnJohn Stultz2011-06-021-1/+2
|/ | | | | | | | | | | | | | Bryan Henderson noticed that the "RTC: Fix rtc driver ioctl specific shortcutting" commit has a small bug: When an ioctl is called with an invalid command code and the clock driver does not have an "ioctl" method, the ioctl returns rc 0 instead of -ENOTTY. This patch fixes the issue. CC: Bryan Henderson <bryanh@giraffe-data.com> CC: Gabor Z. Papp <gzp@papp.hu> Reported-by: Bryan Henderson <bryanh@giraffe-data.com> Signed-off-by: John Stultz <john.stultz@linaro.org>
* Merge git://git.infradead.org/iommu-2.6Linus Torvalds2011-06-013-47/+212
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.infradead.org/iommu-2.6: intel-iommu: Fix off-by-one in RMRR setup intel-iommu: Add domain check in domain_remove_one_dev_info intel-iommu: Remove Host Bridge devices from identity mapping intel-iommu: Use coherent DMA mask when requested intel-iommu: Dont cache iova above 32bit intel-iommu: Speed up processing of the identity_mapping function intel-iommu: Check for identity mapping candidate using system dma mask intel-iommu: Only unlink device domains from iommu intel-iommu: Enable super page (2MiB, 1GiB, etc.) support intel-iommu: Flush unmaps at domain_exit intel-iommu: Remove obsolete comment from detect_intel_iommu intel-iommu: fix VT-d PMR disable for TXT on S3 resume
| * intel-iommu: Fix off-by-one in RMRR setupDavid Woodhouse2011-06-011-2/+2
| | | | | | | | | | | | | | | | We were mapping an extra byte (and hence usually an extra page): iommu_prepare_identity_map() expects to be given an 'end' argument which is the last byte to be mapped; not the first byte *not* to be mapped. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * intel-iommu: Add domain check in domain_remove_one_dev_infoMike Habeck2011-06-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The comment in domain_remove_one_dev_info() states "No need to compare PCI domain; it has to be the same". But for the si_domain that isn't going to be true, as it consists of all the PCI devices that are identity mapped thus multiple PCI domains can be in si_domain. The code needs to validate the PCI domain too. Signed-off-by: Mike Habeck <habeck@sgi.com> Signed-off-by: Mike Travis <travis@sgi.com> Cc: stable@kernel.org Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * intel-iommu: Remove Host Bridge devices from identity mappingMike Travis2011-06-011-0/+5
| | | | | | | | | | | | | | | | | | | | | | When using the 1:1 (identity) PCI DMA remapping, PCI Host Bridge devices that do not use the IOMMU causes a kernel panic. Fix that by not inserting those devices into the si_domain. Signed-off-by: Mike Travis <travis@sgi.com> Reviewed-by: Mike Habeck <habeck@sgi.com> Cc: stable@kernel.org Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * intel-iommu: Use coherent DMA mask when requestedMike Travis2011-06-011-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | The __intel_map_single function is not honoring the passed in DMA mask. This results in not using the coherent DMA mask when called from intel_alloc_coherent(). Signed-off-by: Mike Travis <travis@sgi.com> Acked-by: Chris Wright <chrisw@sous-sol.org> Reviewed-by: Mike Habeck <habeck@sgi.com> Cc: stable@kernel.org Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * intel-iommu: Dont cache iova above 32bitChris Wright2011-06-011-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mike Travis and Mike Habeck reported an issue where iova allocation would return a range that was larger than a device's dma mask. https://lkml.org/lkml/2011/3/29/423 The dmar initialization code will reserve all PCI MMIO regions and copy those reservations into a domain specific iova tree. It is possible for one of those regions to be above the dma mask of a device. It is typical to allocate iovas with a 32bit mask (despite device's dma mask possibly being larger) and cache the result until it exhausts the lower 32bit address space. Freeing the iova range that is >= the last iova in the lower 32bit range when there is still an iova above the 32bit range will corrupt the cached iova by pointing it to a region that is above 32bit. If that region is also larger than the device's dma mask, a subsequent allocation will return an unusable iova and cause dma failure. Simply don't cache an iova that is above the 32bit caching boundary. Reported-by: Mike Travis <travis@sgi.com> Reported-by: Mike Habeck <habeck@sgi.com> Cc: stable@kernel.org Acked-by: Mike Travis <travis@sgi.com> Tested-by: Mike Habeck <habeck@sgi.com> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * intel-iommu: Speed up processing of the identity_mapping functionMike Travis2011-06-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When there are a large count of PCI devices, and the pass through option for iommu is set, much time is spent in the identity_mapping function hunting though the iommu domains to check if a specific device is "identity mapped". Speed up the function by checking the cached info to see if it's mapped to the static identity domain. Signed-off-by: Mike Travis <travis@sgi.com> Reviewed-by: Mike Habeck <habeck@sgi.com> Cc: stable@kernel.org Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * intel-iommu: Check for identity mapping candidate using system dma maskChris Wright2011-06-011-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The identity mapping code appears to make the assumption that if the devices dma_mask is greater than 32bits the device can use identity mapping. But that is not true: take the case where we have a 40bit device in a 44bit architecture. The device can potentially receive a physical address that it will truncate and cause incorrect addresses to be used. Instead check to see if the device's dma_mask is large enough to address the system's dma_mask. Signed-off-by: Mike Travis <travis@sgi.com> Reviewed-by: Mike Habeck <habeck@sgi.com> Cc: stable@kernel.org Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * intel-iommu: Only unlink device domains from iommuAlex Williamson2011-06-011-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit a97590e5 added unlinking domains from iommus to reciprocate the iommu from domains unlinking that was already done. We actually want to only do this for device domains and never for the static identity map domain or VM domains. The SI domain is special and never freed, while VM domain->id lives in their own special address space, separate from iommu->domain_ids. In the current code, a VM can get domain->id zero, then mark that domain unused when unbound from pci-stub. This leads to DMAR write faults when the device is re-bound to the host driver. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Cc: stable@kernel.org Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * intel-iommu: Enable super page (2MiB, 1GiB, etc.) supportYouquan Song2011-06-011-18/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are no externally-visible changes with this. In the loop in the internal __domain_mapping() function, we simply detect if we are mapping: - size >= 2MiB, and - virtual address aligned to 2MiB, and - physical address aligned to 2MiB, and - on hardware that supports superpages. (and likewise for larger superpages). We automatically use a superpage for such mappings. We never have to worry about *breaking* superpages, since we trust that we will always *unmap* the same range that was mapped. So all we need to do is ensure that dma_pte_clear_range() will also cope with superpages. Adjust pfn_to_dma_pte() to take a superpage 'level' as an argument, so it can return a PTE at the appropriate level rather than always extending the page tables all the way down to level 1. Again, this is simplified by the fact that we should never encounter existing small pages when we're creating a mapping; any old mapping that used the same virtual range will have been entirely removed and its obsolete page tables freed. Provide an 'intel_iommu=sp_off' argument on the command line as a chicken bit. Not that it should ever be required. == The original commit seen in the iommu-2.6.git was Youquan's implementation (and completion) of my own half-baked code which I'd typed into an email. Followed by half a dozen subsequent 'fixes'. I've taken the unusual step of rewriting history and collapsing the original commits in order to keep the main history simpler, and make life easier for the people who are going to have to backport this to older kernels. And also so I can give it a more coherent commit comment which (hopefully) gives a better explanation of what's going on. The original sequence of commits leading to identical code was: Youquan Song (3): intel-iommu: super page support intel-iommu: Fix superpage alignment calculation error intel-iommu: Fix superpage level calculation error in dma_pfn_level_pte() David Woodhouse (4): intel-iommu: Precalculate superpage support for dmar_domain intel-iommu: Fix hardware_largepage_caps() intel-iommu: Fix inappropriate use of superpages in __domain_mapping() intel-iommu: Fix phys_pfn in __domain_mapping for sglist pages Signed-off-by: Youquan Song <youquan.song@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * intel-iommu: Flush unmaps at domain_exitAlex Williamson2011-05-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | We typically batch unmaps to be lazily flushed out at regular intervals. When we destroy a domain, we need to force a flush of these lazy unmaps to be sure none reference the domain we're about to free. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=35062 Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Cc: stable@kernel.org
| * intel-iommu: Remove obsolete comment from detect_intel_iommuJan Kiszka2011-05-241-6/+1Star
| | | | | | | | | | | | | | Since cacd4213d8, this comment no longer applies. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * intel-iommu: fix VT-d PMR disable for TXT on S3 resumeJoseph Cihula2011-05-241-6/+25
| | | | | | | | | | | | | | | | | | | | This patch is a follow on to https://lkml.org/lkml/2011/3/21/239, which was merged as commit 51a63e67da6056c13b5b597dcc9e1b3bd7ceaa55. This patch adds support for S3, as pointed out by Chris Wright. Signed-off-by: Joseph Cihula <joseph.cihula@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | block: fix mismerge of the DISK_EVENT_MEDIA_CHANGE removalLinus Torvalds2011-06-013-3/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jens' back-merge commit 698567f3fa79 ("Merge commit 'v2.6.39' into for-2.6.40/core") was incorrectly done, and re-introduced the DISK_EVENT_MEDIA_CHANGE lines that had been removed earlier in commits - 9fd097b14918 ("block: unexport DISK_EVENT_MEDIA_CHANGE for legacy/fringe drivers") - 7eec77a1816a ("ide: unexport DISK_EVENT_MEDIA_CHANGE for ide-gd and ide-cd") because of conflicts with the "g->flags" updates near-by by commit d4dc210f69bc ("block: don't block events on excl write for non-optical devices") As a result, we re-introduced the hanging behavior due to infinite disk media change reports. Tssk, tssk, people! Don't do back-merges at all, and *definitely* don't do them to hide merge conflicts from me - especially as I'm likely better at merging them than you are, since I do so many merges. Reported-by: Steven Rostedt <rostedt@goodmis.org> Cc: Jens Axboe <jaxboe@fusionio.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | kgdbts: only use new asm-generic/ptrace.h api when neededMike Frysinger2011-06-011-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The new instruction_pointer_set helper is defined for people who have converted to asm-generic/ptrace.h, so don't use it generally unless the arch needs it (in which case it has been converted). This should fix building of kgdb tests for arches not yet converted. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Jason Wessel <jason.wessel@windriver.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | virtio_net: delay TX callbacksMichael S. Tsirkin2011-05-301-1/+1
| | | | | | | | | | | | | | | | | | Ask for delayed callbacks on TX ring full, to give the other side more of a chance to make progress. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* | virtio: add api for delayed callbacksMichael S. Tsirkin2011-05-301-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an API that tells the other side that callbacks should be delayed until a lot of work has been done. Implement using the new event_idx feature. Note: it might seem advantageous to let the drivers ask for a callback after a specific capacity has been reached. However, as a single head can free many entries in the descriptor table, we don't really have a clue about capacity until get_buf is called. The API is the simplest to implement at the moment, we'll see what kind of hints drivers can pass when there's more than one user of the feature. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* | vhost: support event indexMichael S. Tsirkin2011-05-304-50/+127
| | | | | | | | | | | | | | | | Support the new event index feature. When acked, utilize it to reduce the # of interrupts sent to the guest. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* | virtio_ring: support event idx featureMichael S. Tsirkin2011-05-301-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support for the new event idx feature: 1. When enabling interrupts, publish the current avail index value to the host to get interrupts on the next update. 2. Use the new avail_event feature to reduce the number of exits from the guest. Simple test with the simulator: [virtio]# time ./virtio_test spurious wakeus: 0x7 real 0m0.169s user 0m0.140s sys 0m0.019s [virtio]# time ./virtio_test --no-event-idx spurious wakeus: 0x11 real 0m0.649s user 0m0.295s sys 0m0.335s Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* | virtio balloon: kill tell-host-first logicDave Hansen2011-05-301-13/+8Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The virtio balloon driver has a VIRTIO_BALLOON_F_MUST_TELL_HOST feature bit. Whenever the bit is set, the guest kernel must always tell the host before we free pages back to the allocator. Without this feature, we might free a page (and have another user touch it) while the hypervisor is unprepared for it. But, if the bit is _not_ set, we are under no obligation to reverse the order; we're under no obligation to do _anything_. As of now, qemu-kvm defines the bit, but doesn't set it. This patch makes the "tell host first" logic the only case. This should make everybody happy, and reduce the amount of untested or untestable code in the kernel. This _also_ means that we don't have to preserve a pfn list after the pages are freed, which should let us get rid of some temporary storage (vb->pfns) eventually. Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* | virtio console: don't manually set or finalize VIRTIO_CONSOLE_F_MULTIPORT.Rusty Russell2011-05-301-5/+0Star
| | | | | | | | | | | | | | | | | | | | That's already been done by the virtio infrastructure before the probe function is called. Reported-by: alexey.kardashevskiy@au1.ibm.com Acked-by: Amit Shah <amit.shah@redhat.com> Tested-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* | drivers, block: virtio_blk: Replace cryptic number with the macroLiu Yuan2011-05-301-1/+2
| | | | | | | | | | | | | | | | It is easier to figure out the context by reading SCSI_SENSE_BUFFERSIZE instead of plain '96'. Signed-off-by: Liu Yuan <tailai.ly@taobao.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* | virtio_blk: allow re-reading config space at runtimeChristoph Hellwig2011-05-301-10/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Wire up the virtio_driver config_changed method to get notified about config changes raised by the host. For now we just re-read the device size to support online resizing of devices, but once we add more attributes that might be changeable they could be added as well. Note that the config_changed method is called from irq context, so we'll have to use the workqueue infrastructure to provide us a proper user context for our changes. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* | arm gpio drivers: make them 'depends on ARM'Linus Torvalds2011-05-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | We had a few drivers move from arch/arm into drivers/gpio, but they don't actually compile without the ARM platform headers etc. As a result they were messing up allyesconfig on x86. Make them depend on ARM. Reported-by: Ingo Molnar <mingo@elte.hu> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge branch 'for_linus' of ↵Linus Torvalds2011-05-2933-1000/+1390
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86: (43 commits) acer-wmi: support integer return type from WMI methods msi-laptop: fix section mismatch in reference from the function load_scm_model_init acer-wmi: support to set communication device state by new wmid method acer-wmi: allow 64-bits return buffer from WMI methods acer-wmi: check the existence of internal 3G device when set capability platform/x86:delete two unused variables support wlan hotkey on Acer Travelmate 5735Z platform-x86: intel_mid_thermal: Fix memory leak platform/x86: Fix Makefile for intel_mid_powerbtn platform/x86: Simplify intel_mid_powerbtn acer-wmi: Delete out-of-date documentation acerhdf: Clean up includes acerhdf: Drop pointless dependency on THERMAL_HWMON acer-wmi: Update MAINTAINERS wmi: Orphan ACPI-WMI driver tc1100-wmi: Orphan driver acer-wmi: does not allow negative number set to initial device state platform/oaktrail: ACPI EC Extra driver for Oaktrail thinkpad_acpi: Convert printks to pr_<level> thinkpad_acpi: Correct !CONFIG_THINKPAD_ACPI_VIDEO warning ...
| * \ Merge branch 'x86-platform-next' into x86-platformMatthew Garrett2011-05-2933-1000/+1390
| |\ \
| | * | acer-wmi: support integer return type from WMI methodsLee, Chun-Yi2011-05-271-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Acer WMID_GUID1/2 method's return value was declared to integer type on Gateway notebook. So, add this patch for support integer return type. Reference: bko#33032 https://bugzilla.kernel.org/show_bug.cgi?id=33032 Tested on Gateway NV5909H laptop Tested-by: Filipus Klutiero <chealer@gmail.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@novell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| | * | msi-laptop: fix section mismatch in reference from the function ↵Lee, Chun-Yi2011-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | load_scm_model_init There have section mismatch warning message shows up when building the kernel with make CONFIG_DEBUG_SECTION_MISMATCH=y. The problem is the load_scm_model_init() calls msi_laptop_input_setup() which is an __init function, but load_scm_model_init() lacks a __init annotation. This patch add __init on load_scm_model_init() to avoid warning message. 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@novell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| | * | acer-wmi: support to set communication device state by new wmid methodLee, Chun-Yi2011-05-271-1/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Have many Acer notebooks' BIOS already support new WMID_GUID3 method. On those machines, that will be better set communication device by evaluate WMID_GUID3 method. Tested on Acer Travelmate 8572 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@novell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| | * | acer-wmi: allow 64-bits return buffer from WMI methodsLee, Chun-Yi2011-05-271-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Acer WMID_GUID1/2 method's return buffer was declared to 64-bits on some Acer notebook, but WMI method only use 32-bits in return buffer. So, add this patch for allow 64-bits return buffer. Reference: bko#34142 https://bugzilla.kernel.org/show_bug.cgi?id=34142 Tested on Acer Travelmate 5735Z-452G32Mnss Tested-by: Melchior FRANZ <melchior.franz@gmail.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@novell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| | * | acer-wmi: check the existence of internal 3G device when set capabilityLee, Chun-Yi2011-05-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That will be better to check the existence of internal 3G device when we set threeg capability and generate killswitch for threeg. It can avoid userland access 3G rfkill but the machine doesn't have internal 3G device. Reference: bko#32862 https://bugzilla.kernel.org/show_bug.cgi?id=32862 Tested on Acer Aspire 8930G, Acer Travelmate 8572 Tested-by: Hector Martin <hector@marcansoft.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@novell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| | * | platform/x86:delete two unused variablesWeiping Pan2011-05-271-2/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | variable handle is not used in these two functions, just delete them. Signed-off-by: Weiping Pan <panweiping3@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| | * | support wlan hotkey on Acer Travelmate 5735ZMelchior FRANZ2011-05-271-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On an Acer Travelmate 5735Z-452G32Mnss the WLAN-enable/disable key doesn't send 0x1 as acpi event key code, but 0x3. This patch also makes the module ignore hotkey acpi events for functions that are already handled without. This avoids warning message "keyboard: can't emulate rawmode for keycode 240". Signed-off-by: Melchior FRANZ <mfranz@aon.at> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| | * | platform-x86: intel_mid_thermal: Fix memory leakAmeya Palande2011-05-271-0/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Ameya Palande <2ameya@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| | * | platform/x86: Fix Makefile for intel_mid_powerbtnAmeya Palande2011-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Ameya Palande <2ameya@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| | * | platform/x86: Simplify intel_mid_powerbtnAmeya Palande2011-05-271-42/+30Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch: 1. Removes unnecessay #defines 2. Removes 'mfld_pb_priv' data structure which results in simpler error handling and less memory allocations. Signed-off-by: Ameya Palande <2ameya@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| | * | acerhdf: Clean up includesJean Delvare2011-05-271-3/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * The acerhdf driver isn't an ACPI driver, so it needs not include <acpi/acpi_drivers.h>. All it uses is ec_read() and ec_write(), for which <linux/acpi.h> is sufficient. * I couldn't find any reason why <linux/fs.h> and <linux/sched.h> were included. This should avoid unneeded rebuilds of the acerhdf driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Peter Feuerer <peter@piie.net> Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| | * | acerhdf: Drop pointless dependency on THERMAL_HWMONJean Delvare2011-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The THERMAL_HWMON config option simply exposes the thermal zone temperature values and limits to user-space. It makes no sense for a kernel driver to depend on this. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Peter Feuerer <peter@piie.net> Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| | * | acer-wmi: does not allow negative number set to initial device stateLee, Chun-Yi2011-05-271-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver set module parameter value: mailled, threeg and brightness to BIOS by evaluate wmi method when driver was initialed. The default values for those parameters are -1, so, that will be better don't set negative value to BIOS. 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> Signed-off-by: Lee, Chun-Yi <jlee@novell.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| | * | platform/oaktrail: ACPI EC Extra driver for OaktrailYin Kangkai2011-05-273-0/+406
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver implements an Extra ACPI EC driver for products based on Intel Oaktrail platform. This driver does below things: 1. registers itself in the Linux backlight control in /sys/class/backlight/intel_oaktrail/ 2. registers in the rfkill subsystem here: /sys/class/rfkill/rfkillX/ for these components: wifi, bluetooth, wwan (3g), gps Signed-off-by: Yin Kangkai <kangkai.yin@linux.intel.com> [Extracted from a bigger patch by Yin Kangkai, this version leaves out some sysfs bits that probably want to be driver managed, and ACPI i2c enumeration] Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| | * | thinkpad_acpi: Convert printks to pr_<level>Joe Perches2011-05-271-284/+188Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add pr_fmt. Removed local TPACPI_<level> #defines, convert to pr_<level>. Neaten dbg_<foo> macros. Added a few missing newlines to logging messages. Added static inline str_supported for !CONFIG_THINKPAD_ACPI_DEBUG vdbg_printk defect reported by Sedat Dilek <sedat.dilek@googlemail.com>. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| | * | thinkpad_acpi: Correct !CONFIG_THINKPAD_ACPI_VIDEO warningJoe Perches2011-05-271-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move TPACPI_HANDLE declaration into #ifdef block and neaten it a bit. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| | * | platform-x86: intel_mid_thermal: Fix coding styleAmeya Palande2011-05-271-306/+300Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Before fixing checkpatch.pl reported 74 errors and 234 warnings Signed-off-by: Ameya Palande <ameya.palande@nokia.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| | * | xo15-ebook: Use pr_<level>Joe Perches2011-05-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the current logging styles. Remove local #define PREFIX. Add pr_fmt. Convert printk to pr_<level>. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| | * | wmi: Removed trailing whitespace from logging message.Joe Perches2011-05-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Just neatening. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>