aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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 Dongili2-3/+6
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: documentation updatesMattia Dongili1-7/+30
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 Chary2-0/+14
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 Chary2-0/+12
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 Chary2-1/+102
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-28Btrfs: fix __btrfs_map_block on 32 bit machinesChris Mason1-6/+20
Recent changes for discard support didn't compile, this fixes them not to try and % 64 bit numbers. Signed-off-by: Chris Mason <[email protected]>
2011-03-28btrfs: fix possible deadlock by clearing __GFP_FS flagMiao Xie2-1/+4
Using the GFP_HIGHUSER_MOVABLE flag to allocate the metadata's page may cause deadlock. Task1 open() ... btrfs_search_slot() ... btrfs_cow_block() ... alloc_page() wait for reclaiming shrink_slab() ... shrink_icache_memory() ... btrfs_evict_inode() ... btrfs_search_slot() If the path is locked by task1, the deadlock happens. So the btree's page cache is different with the file's page cache, it can not allocate pages by GFP_HIGHUSER_MOVABLE flag, we must clear __GFP_FS flag in GFP_HIGHUSER_MOVABLE flag. Reported-by: Itaru Kitayama <[email protected]> Signed-off-by: Miao Xie <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-03-28btrfs: check link counter overflow in link(2)Al Viro1-0/+3
Signed-off-by: Al Viro <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-03-28btrfs: don't mess with i_nlink of unlocked inode in rename()Al Viro1-11/+25
old_inode is not locked; it's not safe to play with its link count. Instead of bumping it and calling btrfs_unlink_inode(), add a variant of the latter that does not do btrfs_drop_nlink()/ btrfs_update_inode(), call it instead of btrfs_inc_nlink()/ btrfs_unlink_inode() and do btrfs_update_inode() ourselves. Signed-off-by: Al Viro <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-03-28Btrfs: check return value of btrfs_alloc_path()Tsutomu Itoh4-14/+27
Adding the check on the return value of btrfs_alloc_path() to several places. And, some of callers are modified by this change. Signed-off-by: Tsutomu Itoh <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-03-28Btrfs: fix OOPS of empty filesystem after balanceliubo3-0/+30
btrfs will remove unused block groups after balance. When a empty filesystem is balanced, the block group with tag "DATA" may be dropped, and after umount and mount again, it will not find "DATA" space_info and lead to OOPS. So we initial the necessary space_infos(DATA, SYSTEM, METADATA) to avoid OOPS. Reported-by: Daniel J Blueman <[email protected]> Signed-off-by: Liu Bo <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-03-28Btrfs: fix memory leak of empty filesystem after balanceliubo1-0/+6
After Josef's patch(commit 3c14874acc71180553fb5aba528e3cf57c5b958b), btrfs will exclude super bytes when reading block groups(by marking a extent state UPTODATE). However, these bytes do not get freed while balance remove unused block groups, and we won't process those removed ones any more, when we do umount and unload the btrfs module, btrfs hits a memory leak. This patch add the missing free operation. Reproduce steps: $ mkfs.btrfs disk $ mount disk /mnt/btrfs -o loop $ btrfs filesystem balance /mnt/btrfs $ umount /mnt/btrfs $ rmmod btrfs Signed-off-by: Liu Bo <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-03-28Btrfs: fix return value of setflags ioctlliubo1-1/+3
setflags ioctl should return error when any checks fail. Signed-off-by: Liu Bo <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-03-28Btrfs: fix uncheck memory allocationsYoshinori Sano3-0/+12
To make Btrfs code more robust, several return value checks where memory allocation can fail are introduced. I use BUG_ON where I don't know how to handle the error properly, which increases the number of using the notorious BUG_ON, though. Signed-off-by: Yoshinori Sano <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-03-28btrfs: make inode ref log recovery fasterliubo1-24/+11
When we recover from crash via write-ahead log tree and process the inode refs, for each btrfs_inode_ref item, we will 1) check if we already have a perfect match in fs/file tree, if we have, then we're done. 2) search the corresponding back reference in fs/file tree, and check all the names in this back reference to see if they are also in the log to avoid conflict corners. 3) recover the logged inode refs to fs/file tree. In current btrfs, however, - for 2)'s check, once is enough, since the checked back reference will remain unchanged after processing all the inode refs belonged to the key. - it has no need to do another 1) between 2) and 3). I've made a small test to show how it improves, $dd if=/dev/zero of=foobar bs=4K count=1 $sync $make 100 hard links continuously, like ln foobar link_i $fsync foobar $echo b > /proc/sysrq-trigger after reboot $time mount DEV PATH without patch: real 0m0.285s user 0m0.001s sys 0m0.009s with patch: real 0m0.123s user 0m0.000s sys 0m0.010s Changelog v1->v2: - fix double free - pointed by David Sterba Changelog v2->v3: - adjust free order Signed-off-by: Liu Bo <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-03-28Btrfs: add btrfs_trim_fs() to handle FITRIMLi Dongyang5-1/+190
We take an free extent out from allocator, trim it, then put it back, but before we trim the block group, we should make sure the block group is cached, so plus a little change to make cache_block_group() run without a transaction. Signed-off-by: Li Dongyang <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-03-28Btrfs: adjust btrfs_discard_extent() return errors and trimmed bytesLi Dongyang3-19/+31
Callers of btrfs_discard_extent() should check if we are mounted with -o discard, as we want to make fitrim to work even the fs is not mounted with -o discard. Also we should use REQ_DISCARD to map the free extent to get a full mapping, last we only return errors if 1. the error is not a EOPNOTSUPP 2. no device supports discard Signed-off-by: Li Dongyang <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-03-28Btrfs: make btrfs_map_block() return entire free extent for each device of ↵Li Dongyang2-22/+129
RAID0/1/10/DUP btrfs_map_block() will only return a single stripe length, but we want the full extent be mapped to each disk when we are trimming the extent, so we add length to btrfs_bio_stripe and fill it if we are mapping for REQ_DISCARD. Signed-off-by: Li Dongyang <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-03-28Btrfs: make update_reserved_bytes() publicLi Dongyang2-9/+9
Make the function public as we should update the reserved extents calculations after taking out an extent for trimming. Signed-off-by: Li Dongyang <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-03-28btrfs: return EXDEV when linking from different subvolumesMark Fasheh1-1/+1
btrfs_link returns EPERM if a cross-subvolume link is attempted. However, in this case I believe EXDEV to be the more appropriate value. >From the link(2) man page: EXDEV oldpath and newpath are not on the same mounted file system. (Linux permits a file system to be mounted at multiple points, but link() does not work across different mount points, even if the same file system is mounted on both.) This matters because an application may have different behaviors based on return codes. Signed-off-by: Mark Fasheh <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-03-28Btrfs: Per file/directory controls for COW and compressionLiu Bo4-7/+72
Data compression and data cow are controlled across the entire FS by mount options right now. ioctls are needed to set this on a per file or per directory basis. This has been proposed previously, but VFS developers wanted us to use generic ioctls rather than btrfs-specific ones. According to Chris's comment, there should be just one true compression method(probably LZO) stored in the super. However, before this, we would wait for that one method is stable enough to be adopted into the super. So I list it as a long term goal, and just store it in ram today. After applying this patch, we can use the generic "FS_IOC_SETFLAGS" ioctl to control file and directory's datacow and compression attribute. NOTE: - The compression type is selected by such rules: If we mount btrfs with compress options, ie, zlib/lzo, the type is it. Otherwise, we'll use the default compress type (zlib today). v1->v2: - rebase to the latest btrfs. v2->v3: - fix a problem, i.e. when a file is set NOCOW via mount option, then this NOCOW will be screwed by inheritance from parent directory. Signed-off-by: Liu Bo <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-03-28Btrfs: add datacow flag in inode flagliubo1-0/+2
For datacow control, the corresponding inode flags are needed. This is for btrfs use. v1->v2: Change FS_COW_FL to another bit due to conflict with the upstream e2fsprogs Signed-off-by: Liu Bo <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-03-28btrfs: use GFP_NOFS instead of GFP_KERNELMiao Xie1-2/+2
In the filesystem context, we must allocate memory by GFP_NOFS, or we may start another filesystem operation and make kswap thread hang up. Signed-off-by: Miao Xie <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2011-03-28Btrfs: check return value of read_tree_block()Tsutomu Itoh3-0/+15
This patch is checking return value of read_tree_block(), and if it is NULL, error processing. Signed-off-by: Tsutomu Itoh <[email protected]> Signed-off-by: Chris Mason <[email protected]>