aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2010-08-11sdio: allow non-standard SDIO cardsGrazvydas Ignotas1-0/+2
There are some chips (like TI WL12xx series) that can be interfaced over SDIO but don't support the SDIO specification, meaning that they are missing CIA (Common I/O Area) with all it's registers. Current Linux SDIO implementation relies on those registers to identify and configure the card, so non-standard cards can not function and cause lots of warnings from the core when it reads invalid data from non-existent registers. After this patch, init_card() host callback can now set new quirk MMC_QUIRK_NONSTD_SDIO, which means that SDIO core should not try to access any standard SDIO registers and rely on init_card() to fill all SDIO structures instead. As those cards are usually embedded chips, all the required information can be obtained from machine board files by the host driver when it's called through init_card() callback. Signed-off-by: Grazvydas Ignotas <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Tony Lindgren <[email protected]> Cc: Bob Copeland <[email protected]> Cc: Kalle Valo <[email protected]> Cc: Madhusudhan Chikkature <[email protected]> Cc: Kishore Kadiyala <[email protected]> Cc: Russell King <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11mmc: fix all hangs related to mmc/sd card insert/removal during suspend/resumeMaxim Levitsky1-0/+3
If you don't use CONFIG_MMC_UNSAFE_RESUME, as soon as you attempt to suspend, the card will be removed, therefore this patch doesn't change the behavior of this option. However the removal will be done by pm notifier, which runs while userspace is still not frozen and thus can freely use del_gendisk, without the risk of deadlock which would happen otherwise. Card detect workqueue is now disabled while userspace is frozen, Therefore if you do use CONFIG_MMC_UNSAFE_RESUME, and remove the card during suspend, the removal will be detected as soon as userspace is unfrozen, again at the moment it is safe to call del_gendisk. Tested with and without CONFIG_MMC_UNSAFE_RESUME with suspend and hibernate. [[email protected]: clean up function prototype] [[email protected]: fix CONFIG_PM-n linkage, small cleanups] [[email protected]: coding-style fixes] Signed-off-by: Maxim Levitsky <[email protected]> Cc: David Brownell <[email protected]> Cc: Alan Stern <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11mmc: implement SD-combo (IO+mem) supportMichal Miroslaw1-0/+1
Signed-off-by: Michal Miroslaw <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Chris Ball <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11mmc: recognize CSD structureKyungmin Park2-0/+2
The eMMC spec 4.4 and 4.3 + additional feature chips has CSD structure version 3 and version 3 have to check the CSD_STRUCTURE byte in the EXT_CSD register. Also fix EXT_CSD revision message. [[email protected]: fix comment, per Chris Ball] Signed-off-by: Kyungmin Park <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Chris Ball <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11vfs: O_* bit numbers uniqueness checkWu Fengguang1-0/+4
The O_* bit numbers are defined in 20+ arch/*, and can silently overlap. Add a compile time check to ensure the uniqueness as suggested by David Miller. Signed-off-by: Wu Fengguang <[email protected]> Cc: David Miller <[email protected]> Cc: Stephen Rothwell <[email protected]> Cc: Al Viro <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Eric Paris <[email protected]> Cc: Roland Dreier <[email protected]> Cc: Jamie Lokier <[email protected]> Cc: Andreas Schwab <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11virtio_9p.h: include linux/types.hRandy Dunlap1-0/+1
Add <linux/types.h> to <linux/virtio_9p.h> so that types are explicitly defined: linux/virtio_9p.h:15: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Randy Dunlap <[email protected]> Cc: Eric Van Hensbergen <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11scsi: use __uX types for headers exported to user spacePeter Korsgaard2-6/+6
Commit 9e4f5e29 ("FC Pass Thru support") exported a number of header files in include/scsi to user space, but didn't change the uX types to the userspace-compatible __uX types. Without that you'll get compile errors when including them - E.G.: include/scsi/scsi.h:145: error: expected specifier-qualifier-list before `u8' Signed-off-by: Peter Korsgaard <[email protected]> Cc: Boaz Harrosh <[email protected]> Cc: James Smart <[email protected]> Cc: James Bottomley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11include/linux/fs.h: complete hexification of FMODE_* constantsAndrew Morton1-1/+1
One straggler which was missed due to merge ordering issues. Cc: Wu Fengguang <[email protected]> Cc: Eric Paris <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11param: don't deref arg in __same_type() checksRusty Russell1-5/+5
gcc allows this when arg is a function, but sparse complains: drivers/char/ipmi/ipmi_watchdog.c:303:1: error: cannot dereference this type drivers/char/ipmi/ipmi_watchdog.c:307:1: error: cannot dereference this type drivers/char/ipmi/ipmi_watchdog.c:311:1: error: cannot dereference this type Reported-by: Randy Dunlap <[email protected]> Tested-by: Randy Dunlap <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-08-11param: add kerneldoc to moduleparam.hRusty Russell1-26/+95
Also reorders the macros with the most common ones at the top. Signed-off-by: Rusty Russell <[email protected]> Reviewed-by: Takashi Iwai <[email protected]> Tested-by: Phil Carmody <[email protected]>
2010-08-11param: locking for kernel parametersRusty Russell1-0/+56
There may be cases (most obviously, sysfs-writable charp parameters) where a module needs to prevent sysfs access to parameters. Rather than express this in terms of a big lock, the functions are expressed in terms of what they protect against. This is clearer, esp. if the implementation changes to a module-level or even param-level lock. Signed-off-by: Rusty Russell <[email protected]> Reviewed-by: Takashi Iwai <[email protected]> Tested-by: Phil Carmody <[email protected]>
2010-08-11param: make param sections const.Rusty Russell1-1/+1
Since this section can be read-only (they're in .rodata), they should always have been const. Minor flow-through various functions. Signed-off-by: Rusty Russell <[email protected]> Tested-by: Phil Carmody <[email protected]>
2010-08-11param: add a free hook to kernel_param_ops.Rusty Russell1-0/+2
This allows us to generalize the KPARAM_KMALLOCED flag, by calling a function on every parameter when a module is unloaded. Signed-off-by: Rusty Russell <[email protected]> Reviewed-by: Takashi Iwai <[email protected]> Tested-by: Phil Carmody <[email protected]>
2010-08-11param: use ops in struct kernel_param, rather than get and set fns directlyRusty Russell1-48/+75
This is more kernel-ish, saves some space, and also allows us to expand the ops without breaking all the callers who are happy for the new members to be NULL. The few places which defined their own param types are changed to the new scheme (more which crept in recently fixed in following patches). Since we're touching them anyway, we change get() and set() to take a const struct kernel_param (which they really are). This causes some harmless warnings until we fix them (in following patches). To reduce churn, module_param_call creates the ops struct so the callers don't have to change (and casts the functions to reduce warnings). The modern version which takes an ops struct is called module_param_cb. Signed-off-by: Rusty Russell <[email protected]> Reviewed-by: Takashi Iwai <[email protected]> Tested-by: Phil Carmody <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Ville Syrjala <[email protected]> Cc: Dmitry Torokhov <[email protected]> Cc: Alessandro Rubini <[email protected]> Cc: Michal Januszewski <[email protected]> Cc: Trond Myklebust <[email protected]> Cc: "J. Bruce Fields" <[email protected]> Cc: Neil Brown <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected]
2010-08-11ab8500-mfd: add regulator support to ab8500 mfd deviceSundar R Iyer2-0/+31
Acked-by: Linus Walleij <[email protected]> Acked-By: Mattias Wallin <[email protected]> Acked-By: Bengt JONSSON <[email protected]> Signed-off-by: Sundar R Iyer <[email protected]> Acked-by: Mark Brown <[email protected]> Acked-by: Samuel Ortiz <[email protected]> Signed-off-by: Liam Girdwood <[email protected]>
2010-08-11drivers: regulator: add Maxim 8998 driverKyungmin Park2-0/+190
Acked-by: Mark Brown <[email protected]> This patch adds voltage regulator driver for Maxim 8998 chip. This chip is used on Samsung Aquila and GONI boards and provides following functionalities: - 4 BUCK voltage converters, 17 LDO power regulators and 5 other power controllers - battery charger This patch adds basic driver for voltage regulators and MAX 8998 MFD core. Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Marek Szyprowski <[email protected]> Acked-by: Samuel Ortiz <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Liam Girdwood <[email protected]>
2010-08-11hwpoison: rename CONFIGNaoya Horiguchi1-2/+2
CONFIG_HUGETLBFS controls hugetlbfs interface code. OTOH, CONFIG_HUGETLB_PAGE controls hugepage management code. So we should use CONFIG_HUGETLB_PAGE here. Signed-off-by: Naoya Horiguchi <[email protected]> Signed-off-by: Andi Kleen <[email protected]>
2010-08-11HWPOISON, hugetlb: isolate corrupted hugepageNaoya Horiguchi1-0/+2
If error hugepage is not in-use, we can fully recovery from error by dequeuing it from freelist, so return RECOVERY. Otherwise whether or not we can recovery depends on user processes, so return DELAYED. Dependency: "HWPOISON, hugetlb: enable error handling path for hugepage" Signed-off-by: Naoya Horiguchi <[email protected]> Cc: Andrew Morton <[email protected]> Acked-by: Fengguang Wu <[email protected]> Signed-off-by: Andi Kleen <[email protected]>
2010-08-11hugetlb, rmap: add reverse mapping for hugepageNaoya Horiguchi4-10/+13
This patch adds reverse mapping feature for hugepage by introducing mapcount for shared/private-mapped hugepage and anon_vma for private-mapped hugepage. While hugepage is not currently swappable, reverse mapping can be useful for memory error handler. Without this patch, memory error handler cannot identify processes using the bad hugepage nor unmap it from them. That is: - for shared hugepage: we can collect processes using a hugepage through pagecache, but can not unmap the hugepage because of the lack of mapcount. - for privately mapped hugepage: we can neither collect processes nor unmap the hugepage. This patch solves these problems. This patch include the bug fix given by commit 23be7468e8, so reverts it. Dependency: "hugetlb: move definition of is_vm_hugetlb_page() to hugepage_inline.h" ChangeLog since May 24. - create hugetlb_inline.h and move is_vm_hugetlb_index() in it. - move functions setting up anon_vma for hugepage into mm/rmap.c. ChangeLog since May 13. - rebased to 2.6.34 - fix logic error (in case that private mapping and shared mapping coexist) - move is_vm_hugetlb_page() into include/linux/mm.h to use this function from linear_page_index() - define and use linear_hugepage_index() instead of compound_order() - use page_move_anon_rmap() in hugetlb_cow() - copy exclusive switch of __set_page_anon_rmap() into hugepage counterpart. - revert commit 24be7468 completely Signed-off-by: Naoya Horiguchi <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Andrea Arcangeli <[email protected]> Cc: Larry Woodman <[email protected]> Cc: Lee Schermerhorn <[email protected]> Acked-by: Fengguang Wu <[email protected]> Acked-by: Mel Gorman <[email protected]> Signed-off-by: Andi Kleen <[email protected]>
2010-08-11hugetlb: move definition of is_vm_hugetlb_page() to hugepage_inline.hNaoya Horiguchi3-10/+24
is_vm_hugetlb_page() is a widely used inline function to insert hooks into hugetlb code. But we can't use it in pagemap.h because of circular dependency of the header files. This patch removes this limitation. Acked-by: Mel Gorman <[email protected]> Acked-by: Fengguang Wu <[email protected]> Signed-off-by: Naoya Horiguchi <[email protected]> Signed-off-by: Andi Kleen <[email protected]>
2010-08-11vfs: remove unused MNT_STRICTATIMEMiklos Szeredi1-1/+0
Commit d0adde574b8487ef30f69e2d08bba769e4be513f added MNT_STRICTATIME but it isn't actually used (MS_STRICTATIME clears MNT_RELATIME and MNT_NOATIME rather than setting any mount flag). Signed-off-by: Miklos Szeredi <[email protected]> Signed-off-by: Al Viro <[email protected]>
2010-08-11vfs: show unreachable paths in getcwd and procMiklos Szeredi2-0/+6
Prepend "(unreachable)" to path strings if the path is not reachable from the current root. Two places updated are - the return string from getcwd() - and symlinks under /proc/$PID. Other uses of d_path() are left unchanged (we know that some old software crashes if /proc/mounts is changed). Signed-off-by: Miklos Szeredi <[email protected]> Signed-off-by: Al Viro <[email protected]>
2010-08-11vfs: add helpers to get root and pwdMiklos Szeredi1-0/+27
Add three helpers that retrieve a refcounted copy of the root and cwd from the supplied fs_struct. get_fs_root() get_fs_pwd() get_fs_root_and_pwd() Signed-off-by: Miklos Szeredi <[email protected]> Signed-off-by: Al Viro <[email protected]>
2010-08-11V7: Adjust sanity checks for some volumesLubomir Rintel1-0/+11
Newly mkfs-ed filesystems from Seventh Edition have last modification time set to zero, but are otherwise perfectly valid. Also, tighten up other sanity checks to filter out most filesystems with different bytesex than we're using. Cc: Christoph Hellwig <[email protected]> Signed-off-by: Lubomir Rintel <[email protected]> Signed-off-by: Al Viro <[email protected]>
2010-08-10net: make netpoll_rx return bool for !CONFIG_NETPOLLJohn W. Linville1-1/+1
"netpoll: Use 'bool' for netpoll_rx() return type." missed the case when CONFIG_NETPOLL is disabled. Signed-off-by: John W. Linville <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-08-10Merge branch 'master' of ↵David S. Miller1-2/+2
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
2010-08-10i2c.h: fix kernel-doc warningsRandy Dunlap1-0/+2
Fix kernel-doc warnings in linux/i2c.h: Warning(include/linux/i2c.h:176): No description found for parameter 'alert' Warning(include/linux/i2c.h:259): No description found for parameter 'of_node' Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-10Merge branch 'for-2.6.36' of git://git.kernel.dk/linux-2.6-blockLinus Torvalds13-315/+461
* 'for-2.6.36' of git://git.kernel.dk/linux-2.6-block: (149 commits) block: make sure that REQ_* types are seen even with CONFIG_BLOCK=n xen-blkfront: fix missing out label blkdev: fix blkdev_issue_zeroout return value block: update request stacking methods to support discards block: fix missing export of blk_types.h writeback: fix bad _bh spinlock nesting drbd: revert "delay probes", feature is being re-implemented differently drbd: Initialize all members of sync_conf to their defaults [Bugz 315] drbd: Disable delay probes for the upcomming release writeback: cleanup bdi_register writeback: add new tracepoints writeback: remove unnecessary init_timer call writeback: optimize periodic bdi thread wakeups writeback: prevent unnecessary bdi threads wakeups writeback: move bdi threads exiting logic to the forker thread writeback: restructure bdi forker loop a little writeback: move last_active to bdi writeback: do not remove bdi from bdi_list writeback: simplify bdi code a little writeback: do not lose wake-ups in bdi threads ... Fixed up pretty trivial conflicts in drivers/block/virtio_blk.c and drivers/scsi/scsi_error.c as per Jens.
2010-08-10Merge branches 'master' and 'devel' into for-linusRussell King7-40/+230
Conflicts: arch/arm/Kconfig arch/arm/mm/Kconfig
2010-08-10Merge branch 'v4l_for_linus' of ↵Linus Torvalds10-22/+732
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (94 commits) V4L/DVB: tvp7002: fix write to H-PLL Feedback Divider LSB register V4L/DVB: dvb: siano: free spinlock before schedule() V4L/DVB: media: video: pvrusb2: remove custom hex_to_bin() V4L/DVB: drivers: usbvideo: remove custom implementation of hex_to_bin() V4L/DVB: Report supported QAM modes on bt8xx V4L/DVB: media: ir-keytable: null dereference in debug code V4L/DVB: ivtv: convert to the new control framework V4L/DVB: ivtv: convert gpio subdev to new control framework V4L/DVB: wm8739: convert to the new control framework V4L/DVB: cs53l32a: convert to new control framework V4L/DVB: wm8775: convert to the new control framework V4L/DVB: cx2341x: convert to the control framework V4L/DVB: cx25840: convert to the new control framework V4L/DVB: cx25840/ivtv: replace ugly priv control with s_config V4L/DVB: saa717x: convert to the new control framework V4L/DVB: msp3400: convert to the new control framework V4L/DVB: saa7115: convert to the new control framework V4L/DVB: v4l2: hook up the new control framework into the core framework V4L/DVB: Documentation: add v4l2-controls.txt documenting the new controls API V4L/DVB: v4l2-ctrls: Whitespace cleanups ...
2010-08-10Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdogLinus Torvalds1-0/+3
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog: watchdog: hpwdt: formatting of pointers in printk() watchdog: Adding support for ARM Primecell SP805 Watchdog watchdog: f71808e_wdt: new watchdog driver for Fintek F71808E and F71882FG watchdog: sch311x_wdt.c: set parent before registeriing the misc device in probe() function watchdog: wdt_pci.c: move ids to pci_ids.h watchdog: s3c2410_wdt - Fix removing of platform device
2010-08-10Merge branch 'for-linus' of ↵Linus Torvalds2-22/+33
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: xpad - add USB-ID for PL-3601 Xbox 360 pad Input: cy8ctmg100_ts - signedness bug Input: elantech - report position also with 3 fingers Input: elantech - discard the first 2 positions on some firmwares Input: adxl34x - do not mark device as disabled on startup Input: gpio_keys - add hooks to enable/disable device Input: evdev - rearrange ioctl handling Input: dynamically allocate ABS information Input: switch to input_abs_*() access functions Input: add static inline accessors for ABS properties
2010-08-10Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6Linus Torvalds8-19/+107
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (148 commits) USB: serial: fix stalled writes USB: remove fake "address-of" expressions USB: fix thread-unsafe anchor utiliy routines USB: usbtest: support test device with only one iso-in or iso-out endpoint USB: usbtest: avoid to free coherent buffer in atomic context USB: xhci: Set DMA mask for host. USB: xhci: Don't flush doorbell writes. USB: xhci: Reduce reads and writes of interrupter registers. USB: xhci: Make xhci_set_hc_event_deq() static. USB: xhci: Minimize HW event ring dequeue pointer writes. USB: xhci: Make xhci_handle_event() static. USB: xhci: Remove unnecessary reads of IRQ_PENDING register. USB: xhci: Performance - move xhci_work() into xhci_irq() USB: xhci: Performance - move interrupt handlers into xhci-ring.c USB: xhci: Performance - move functions that find ep ring. USB:: fix linux/usb.h kernel-doc warnings USB: add USB serial ssu100 driver USB: usb-storage: implement autosuspend USB: ehci: fix remove of ehci debugfs dir USB: Add USB 2.0 to ssb ohci driver ...
2010-08-10Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6Linus Torvalds12-21/+202
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (68 commits) U6715 16550A serial driver support Char: nozomi, set tty->driver_data appropriately Char: nozomi, fix tty->count counting serial: max3107: Fix gpiolib support hsu: call PCI pm hooks in suspend/resume function hsu: some code cleanup hsu: add a periodic timer to check dma rx channel hsu: driver for Medfield High Speed UART device mxser: remove unnesesary NULL check serial: add support for OX16PCI958 card serial: 68328serial.c: remove dead (ALMA_ANS | DRAGONIXVZ | M68EZ328ADS) timbuart: use __devinit and __devexit macros for probe and remove serial: MMIO32 support for 8250_early.c serial: mcf: don't take spinlocks in already protected functions serial: general fixes in the serial_rs485 structure serial: fix missing bit coverage of ASYNC_FLAGS serial: "altera_uart: simplify altera_uart_console_putc()" checkpatch fixes serial: crisv10: formatting of pointers in printk() vt: Fix warning: statement with no effect due to vt_kern.h tty_io: remove casts from void* ...
2010-08-10USB:: fix linux/usb.h kernel-doc warningsRandy Dunlap1-0/+3
Fix kernel-doc warnings in linux/usb.h: Warning(include/linux/usb.h:185): No description found for parameter 'resetting_device' Warning(include/linux/usb.h:1212): No description found for parameter 'stream_id' Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-08-10USB delay init quirk for logitech Harmony 700-series devicesPhil Dibowitz1-0/+4
The Logitech Harmony 700 series needs an extra delay during initialization. This patch adds a USB quirk which enables such a delay and adds the device to the quirks list. Signed-off-by: Phil Dibowitz <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-08-10USB: otg/ulpi: extend the generic ulpi driver.Igor Grinberg2-7/+39
1) Introduce ulpi specific flags for control of the ulpi phy 2) Extend the generic ulpi driver with support for Function and Interface control of upli phy 3) Update the platforms using the generic ulpi driver with new ulpi flags 4) Remove the otg control flags not in use Signed-off-by: Igor Grinberg <[email protected]> Signed-off-by: Mike Rapoport <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-08-10USB: ulpi: fix compilation warningAjay Kumar Gupta1-0/+1
Fixes below compilation warning from ulpi.h include/linux/usb/ulpi.h:145: warning: 'struct otg_io_access_ops' declared inside parameter list include/linux/usb/ulpi.h:145: warning: its scope is only this definition or declaration, which is probably not what you want Signed-off-by: Ajay Kumar Gupta <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-08-10USB: fix race between root-hub wakeup & controller suspendAlan Stern1-0/+2
This patch (as1395) adds code to hcd_pci_suspend() for handling wakeup races. This is another general race pattern, similar to the "open vs. unregister" race we're all familiar with. Here, the race is between suspending a device and receiving a wakeup request from one of the device's suspended children. In particular, if a root-hub wakeup is requested at about the same time as the corresponding USB controller is suspended, and if the controller is enabled for wakeup, then the controller should either fail to suspend or else wake right back up again. During system sleep this won't happen very much, especially since host controllers generally aren't enabled for wakeup during sleep. However it is definitely an issue for runtime PM. Something like this will be needed to prevent the controller from autosuspending while waiting for a root-hub resume to take place. (That is, in fact, the common case, for which there is an extra test.) Signed-off-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-08-10USB: add do_wakeup parameter for PCI HCD suspendAlan Stern1-1/+1
This patch (as1385) adds a "do_wakeup" parameter to the pci_suspend method used by PCI-based host controller drivers. ehci-hcd in particular needs to know whether or not to enable wakeup when suspending a controller. Although that information is currently available through device_may_wakeup(), when support is added for runtime suspend this will no longer be true. Signed-off-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-08-10USB: convert usb_hcd bitfields into atomic flagsAlan Stern1-5/+17
This patch (as1393) converts several of the single-bit fields in struct usb_hcd to atomic flags. This is for safety's sake; not all CPUs can update bitfield values atomically, and these flags are used in multiple contexts. The flag fields that are set only during registration or removal can remain as they are, since non-atomic accesses at those times will not cause any problems. (Strictly speaking, the authorized_default flag should become atomic as well. I didn't bother with it because it gets changed only via sysfs. It can be done later, if anyone wants.) Signed-off-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-08-10USB: gadget: composite: added disconnect callbackMichal Nazarewicz1-0/+2
Added a disconnect() callback to composite devices which is called by composite glue when its disconnect callback is called by gadget. Signed-off-by: Michal Nazarewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Acked-by: David Brownell <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-08-10USB: gadget: composite: usb_string_ids_*() functions addedMichal Nazarewicz1-0/+4
usb_string_ids_tab() and usb_string_ids_n() functions added to the composite framework. The first accepts an array of usb_string object and for each registeres a string id and the second registeres a given number of ids and returns the first. This may simplify string ids registration since gadgets and composite functions won't have to call usb_string_id() several times and each time check for errer status -- all this will be done with a single call. Signed-off-by: Michal Nazarewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-08-10USB: gadget: f_fs: functionfs_add() renamed to functionfs_bind_config()Michal Nazarewicz1-3/+3
FunctionFS had a bit unique name for function used to add it to USB configuration. Renamed as to match naming convention of other functions. Signed-off-by: Michal Nazarewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-08-10USB-BKL: Convert usb_driver ioctl to unlocked_ioctlAndi Kleen1-1/+1
And audit all the users. None needed the BKL. That was easy because there was only very few around. Tested with allmodconfig build on x86-64 Signed-off-by: Andi Kleen <[email protected]> Cc: Arnd Bergmann <[email protected]> From: Andi Kleen <[email protected]>
2010-08-10USB: EHCI: EHCI 1.1 addendum: Basic LPM feature supportAlek Du1-0/+4
With this patch, the LPM capable EHCI host controller can put device into L1 sleep state which is a mode that can enter/exit quickly, and reduce power consumption. Signed-off-by: Jacob Pan <[email protected]> Signed-off-by: Alek Du <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-08-10USB: EHCI: EHCI 1.1 addendum: preparationAlek Du1-0/+23
EHCI 1.1 addendum introduced several energy efficiency extensions for EHCI USB host controllers: 1. LPM (link power management) 2. Per-port change 3. Shorter periodic frame list 4. Hardware prefetching This patch is intended to define the HW bits and debug interface for EHCI 1.1 addendum. The LPM and Per-port change patches will be sent out after this patch. Signed-off-by: Jacob Pan <[email protected]> Signed-off-by: Alek Du <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-08-10USB: otg.h: Fix the mixup in parameters order.Igor Grinberg1-2/+2
otg_io_write() function does not follow the declaration of struct otg_io_access_ops. Signed-off-by: Igor Grinberg <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-08-10USB: don't stop root-hub status polls too soonAlan Stern1-0/+1
This patch (as1390) fixes a problem that crops up when a UHCI host controller is unbound from uhci-hcd while there are still some active URBs. The URBs have to be unlinked when the root hub is unregistered, and uhci-hcd relies upon root-hub status polls as part of its unlinking procedure. But usb_hcd_poll_rh_status() won't make those status calls if hcd->rh_registered is clear, and the flag is cleared _before_ the unregistration takes place. Since hcd->rh_registered is used for other things and needs to be cleared early, the solution is to add a new flag (rh_pollable) and use it instead. It gets cleared _after_ the root hub is unregistered. Now that the status polls don't end too soon, we have to make sure they also don't occur too late -- after the root hub's usb_device structure or the HCD's private structures are deallocated. Therefore the patch adds usb_get_device() and usb_put_device() calls to protect the root hub structure, and it adds an extra del_timer_sync() to prevent the root-hub timer from causing an unexpected status poll. This additional complexity would not be needed if the HCD framework had provided separate stop() and release() callbacks instead of just stop(). This lack could be fixed at some future time (although it would require changes to every host controller driver); when that happens this patch won't be needed any more. Signed-off-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-08-10Merge branch 'bkl/ioctl' of ↵Linus Torvalds1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing * 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing: staging: Pushdown bkl to easycap ioctl handlers autofs/autofs4: Move compat_ioctl handling into fs v4l: Convert v4l2-dev to unlocked_ioctl ia64/perfmon: Convert to unlocked_ioctl sunrpc: Remove duplicated #include ncpfs: Remove duplicated #include