diff options
62 files changed, 411 insertions, 216 deletions
diff --git a/Documentation/input/multi-touch-protocol.txt b/Documentation/input/multi-touch-protocol.txt index 9f09557aea39..a12ea3b586e6 100644 --- a/Documentation/input/multi-touch-protocol.txt +++ b/Documentation/input/multi-touch-protocol.txt | |||
| @@ -18,8 +18,12 @@ Usage | |||
| 18 | Anonymous finger details are sent sequentially as separate packets of ABS | 18 | Anonymous finger details are sent sequentially as separate packets of ABS |
| 19 | events. Only the ABS_MT events are recognized as part of a finger | 19 | events. Only the ABS_MT events are recognized as part of a finger |
| 20 | packet. The end of a packet is marked by calling the input_mt_sync() | 20 | packet. The end of a packet is marked by calling the input_mt_sync() |
| 21 | function, which generates a SYN_MT_REPORT event. The end of multi-touch | 21 | function, which generates a SYN_MT_REPORT event. This instructs the |
| 22 | transfer is marked by calling the usual input_sync() function. | 22 | receiver to accept the data for the current finger and prepare to receive |
| 23 | another. The end of a multi-touch transfer is marked by calling the usual | ||
| 24 | input_sync() function. This instructs the receiver to act upon events | ||
| 25 | accumulated since last EV_SYN/SYN_REPORT and prepare to receive a new | ||
| 26 | set of events/packets. | ||
| 23 | 27 | ||
| 24 | A set of ABS_MT events with the desired properties is defined. The events | 28 | A set of ABS_MT events with the desired properties is defined. The events |
| 25 | are divided into categories, to allow for partial implementation. The | 29 | are divided into categories, to allow for partial implementation. The |
| @@ -27,11 +31,26 @@ minimum set consists of ABS_MT_TOUCH_MAJOR, ABS_MT_POSITION_X and | |||
| 27 | ABS_MT_POSITION_Y, which allows for multiple fingers to be tracked. If the | 31 | ABS_MT_POSITION_Y, which allows for multiple fingers to be tracked. If the |
| 28 | device supports it, the ABS_MT_WIDTH_MAJOR may be used to provide the size | 32 | device supports it, the ABS_MT_WIDTH_MAJOR may be used to provide the size |
| 29 | of the approaching finger. Anisotropy and direction may be specified with | 33 | of the approaching finger. Anisotropy and direction may be specified with |
| 30 | ABS_MT_TOUCH_MINOR, ABS_MT_WIDTH_MINOR and ABS_MT_ORIENTATION. Devices with | 34 | ABS_MT_TOUCH_MINOR, ABS_MT_WIDTH_MINOR and ABS_MT_ORIENTATION. The |
| 31 | more granular information may specify general shapes as blobs, i.e., as a | 35 | ABS_MT_TOOL_TYPE may be used to specify whether the touching tool is a |
| 32 | sequence of rectangular shapes grouped together by an | 36 | finger or a pen or something else. Devices with more granular information |
| 33 | ABS_MT_BLOB_ID. Finally, the ABS_MT_TOOL_TYPE may be used to specify | 37 | may specify general shapes as blobs, i.e., as a sequence of rectangular |
| 34 | whether the touching tool is a finger or a pen or something else. | 38 | shapes grouped together by an ABS_MT_BLOB_ID. Finally, for the few devices |
| 39 | that currently support it, the ABS_MT_TRACKING_ID event may be used to | ||
| 40 | report finger tracking from hardware [5]. | ||
| 41 | |||
| 42 | Here is what a minimal event sequence for a two-finger touch would look | ||
| 43 | like: | ||
| 44 | |||
| 45 | ABS_MT_TOUCH_MAJOR | ||
| 46 | ABS_MT_POSITION_X | ||
| 47 | ABS_MT_POSITION_Y | ||
| 48 | SYN_MT_REPORT | ||
| 49 | ABS_MT_TOUCH_MAJOR | ||
| 50 | ABS_MT_POSITION_X | ||
| 51 | ABS_MT_POSITION_Y | ||
| 52 | SYN_MT_REPORT | ||
| 53 | SYN_REPORT | ||
| 35 | 54 | ||
| 36 | 55 | ||
| 37 | Event Semantics | 56 | Event Semantics |
| @@ -44,24 +63,24 @@ ABS_MT_TOUCH_MAJOR | |||
| 44 | 63 | ||
| 45 | The length of the major axis of the contact. The length should be given in | 64 | The length of the major axis of the contact. The length should be given in |
| 46 | surface units. If the surface has an X times Y resolution, the largest | 65 | surface units. If the surface has an X times Y resolution, the largest |
| 47 | possible value of ABS_MT_TOUCH_MAJOR is sqrt(X^2 + Y^2), the diagonal. | 66 | possible value of ABS_MT_TOUCH_MAJOR is sqrt(X^2 + Y^2), the diagonal [4]. |
| 48 | 67 | ||
| 49 | ABS_MT_TOUCH_MINOR | 68 | ABS_MT_TOUCH_MINOR |
| 50 | 69 | ||
| 51 | The length, in surface units, of the minor axis of the contact. If the | 70 | The length, in surface units, of the minor axis of the contact. If the |
| 52 | contact is circular, this event can be omitted. | 71 | contact is circular, this event can be omitted [4]. |
| 53 | 72 | ||
| 54 | ABS_MT_WIDTH_MAJOR | 73 | ABS_MT_WIDTH_MAJOR |
| 55 | 74 | ||
| 56 | The length, in surface units, of the major axis of the approaching | 75 | The length, in surface units, of the major axis of the approaching |
| 57 | tool. This should be understood as the size of the tool itself. The | 76 | tool. This should be understood as the size of the tool itself. The |
| 58 | orientation of the contact and the approaching tool are assumed to be the | 77 | orientation of the contact and the approaching tool are assumed to be the |
| 59 | same. | 78 | same [4]. |
| 60 | 79 | ||
| 61 | ABS_MT_WIDTH_MINOR | 80 | ABS_MT_WIDTH_MINOR |
| 62 | 81 | ||
| 63 | The length, in surface units, of the minor axis of the approaching | 82 | The length, in surface units, of the minor axis of the approaching |
| 64 | tool. Omit if circular. | 83 | tool. Omit if circular [4]. |
| 65 | 84 | ||
| 66 | The above four values can be used to derive additional information about | 85 | The above four values can be used to derive additional information about |
| 67 | the contact. The ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR approximates | 86 | the contact. The ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR approximates |
| @@ -70,14 +89,17 @@ different characteristic widths [1]. | |||
| 70 | 89 | ||
| 71 | ABS_MT_ORIENTATION | 90 | ABS_MT_ORIENTATION |
| 72 | 91 | ||
| 73 | The orientation of the ellipse. The value should describe half a revolution | 92 | The orientation of the ellipse. The value should describe a signed quarter |
| 74 | clockwise around the touch center. The scale of the value is arbitrary, but | 93 | of a revolution clockwise around the touch center. The signed value range |
| 75 | zero should be returned for an ellipse aligned along the Y axis of the | 94 | is arbitrary, but zero should be returned for a finger aligned along the Y |
| 76 | surface. As an example, an index finger placed straight onto the axis could | 95 | axis of the surface, a negative value when finger is turned to the left, and |
| 77 | return zero orientation, something negative when twisted to the left, and | 96 | a positive value when finger turned to the right. When completely aligned with |
| 78 | something positive when twisted to the right. This value can be omitted if | 97 | the X axis, the range max should be returned. Orientation can be omitted |
| 79 | the touching object is circular, or if the information is not available in | 98 | if the touching object is circular, or if the information is not available |
| 80 | the kernel driver. | 99 | in the kernel driver. Partial orientation support is possible if the device |
| 100 | can distinguish between the two axis, but not (uniquely) any values in | ||
| 101 | between. In such cases, the range of ABS_MT_ORIENTATION should be [0, 1] | ||
| 102 | [4]. | ||
| 81 | 103 | ||
| 82 | ABS_MT_POSITION_X | 104 | ABS_MT_POSITION_X |
| 83 | 105 | ||
| @@ -98,8 +120,35 @@ ABS_MT_BLOB_ID | |||
| 98 | 120 | ||
| 99 | The BLOB_ID groups several packets together into one arbitrarily shaped | 121 | The BLOB_ID groups several packets together into one arbitrarily shaped |
| 100 | contact. This is a low-level anonymous grouping, and should not be confused | 122 | contact. This is a low-level anonymous grouping, and should not be confused |
| 101 | with the high-level contactID, explained below. Most kernel drivers will | 123 | with the high-level trackingID [5]. Most kernel drivers will not have blob |
| 102 | not have this capability, and can safely omit the event. | 124 | capability, and can safely omit the event. |
| 125 | |||
| 126 | ABS_MT_TRACKING_ID | ||
| 127 | |||
| 128 | The TRACKING_ID identifies an initiated contact throughout its life cycle | ||
| 129 | [5]. There are currently only a few devices that support it, so this event | ||
| 130 | should normally be omitted. | ||
| 131 | |||
| 132 | |||
| 133 | Event Computation | ||
| 134 | ----------------- | ||
| 135 | |||
| 136 | The flora of different hardware unavoidably leads to some devices fitting | ||
| 137 | better to the MT protocol than others. To simplify and unify the mapping, | ||
| 138 | this section gives recipes for how to compute certain events. | ||
| 139 | |||
| 140 | For devices reporting contacts as rectangular shapes, signed orientation | ||
| 141 | cannot be obtained. Assuming X and Y are the lengths of the sides of the | ||
| 142 | touching rectangle, here is a simple formula that retains the most | ||
| 143 | information possible: | ||
| 144 | |||
| 145 | ABS_MT_TOUCH_MAJOR := max(X, Y) | ||
| 146 | ABS_MT_TOUCH_MINOR := min(X, Y) | ||
| 147 | ABS_MT_ORIENTATION := bool(X > Y) | ||
| 148 | |||
| 149 | The range of ABS_MT_ORIENTATION should be set to [0, 1], to indicate that | ||
| 150 | the device can distinguish between a finger along the Y axis (0) and a | ||
| 151 | finger along the X axis (1). | ||
| 103 | 152 | ||
| 104 | 153 | ||
| 105 | Finger Tracking | 154 | Finger Tracking |
| @@ -109,14 +158,18 @@ The kernel driver should generate an arbitrary enumeration of the set of | |||
| 109 | anonymous contacts currently on the surface. The order in which the packets | 158 | anonymous contacts currently on the surface. The order in which the packets |
| 110 | appear in the event stream is not important. | 159 | appear in the event stream is not important. |
| 111 | 160 | ||
| 112 | The process of finger tracking, i.e., to assign a unique contactID to each | 161 | The process of finger tracking, i.e., to assign a unique trackingID to each |
| 113 | initiated contact on the surface, is left to user space; preferably the | 162 | initiated contact on the surface, is left to user space; preferably the |
| 114 | multi-touch X driver [3]. In that driver, the contactID stays the same and | 163 | multi-touch X driver [3]. In that driver, the trackingID stays the same and |
| 115 | unique until the contact vanishes (when the finger leaves the surface). The | 164 | unique until the contact vanishes (when the finger leaves the surface). The |
| 116 | problem of assigning a set of anonymous fingers to a set of identified | 165 | problem of assigning a set of anonymous fingers to a set of identified |
| 117 | fingers is a euclidian bipartite matching problem at each event update, and | 166 | fingers is a euclidian bipartite matching problem at each event update, and |
| 118 | relies on a sufficiently rapid update rate. | 167 | relies on a sufficiently rapid update rate. |
| 119 | 168 | ||
| 169 | There are a few devices that support trackingID in hardware. User space can | ||
| 170 | make use of these native identifiers to reduce bandwidth and cpu usage. | ||
| 171 | |||
| 172 | |||
| 120 | Notes | 173 | Notes |
| 121 | ----- | 174 | ----- |
| 122 | 175 | ||
| @@ -136,5 +189,7 @@ could be used to derive tilt. | |||
| 136 | time of writing (April 2009), the MT protocol is not yet merged, and the | 189 | time of writing (April 2009), the MT protocol is not yet merged, and the |
| 137 | prototype implements finger matching, basic mouse support and two-finger | 190 | prototype implements finger matching, basic mouse support and two-finger |
| 138 | scrolling. The project aims at improving the quality of current multi-touch | 191 | scrolling. The project aims at improving the quality of current multi-touch |
| 139 | functionality available in the synaptics X driver, and in addition | 192 | functionality available in the Synaptics X driver, and in addition |
| 140 | implement more advanced gestures. | 193 | implement more advanced gestures. |
| 194 | [4] See the section on event computation. | ||
| 195 | [5] See the section on finger tracking. | ||
diff --git a/Documentation/sound/alsa/Procfile.txt b/Documentation/sound/alsa/Procfile.txt index bba2dbb79d81..cfac20cf9e33 100644 --- a/Documentation/sound/alsa/Procfile.txt +++ b/Documentation/sound/alsa/Procfile.txt | |||
| @@ -104,6 +104,11 @@ card*/pcm*/xrun_debug | |||
| 104 | When this value is greater than 1, the driver will show the | 104 | When this value is greater than 1, the driver will show the |
| 105 | stack trace additionally. This may help the debugging. | 105 | stack trace additionally. This may help the debugging. |
| 106 | 106 | ||
| 107 | Since 2.6.30, this option also enables the hwptr check using | ||
| 108 | jiffies. This detects spontaneous invalid pointer callback | ||
| 109 | values, but can be lead to too much corrections for a (mostly | ||
| 110 | buggy) hardware that doesn't give smooth pointer updates. | ||
| 111 | |||
| 107 | card*/pcm*/sub*/info | 112 | card*/pcm*/sub*/info |
| 108 | The general information of this PCM sub-stream. | 113 | The general information of this PCM sub-stream. |
| 109 | 114 | ||
diff --git a/MAINTAINERS b/MAINTAINERS index 42c53ab6b9fa..196f72d241d0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -434,7 +434,7 @@ F: arch/alpha/ | |||
| 434 | 434 | ||
| 435 | AMD GEODE CS5536 USB DEVICE CONTROLLER DRIVER | 435 | AMD GEODE CS5536 USB DEVICE CONTROLLER DRIVER |
| 436 | P: Thomas Dahlmann | 436 | P: Thomas Dahlmann |
| 437 | M: thomas.dahlmann@amd.com | 437 | M: dahlmann.thomas@arcor.de |
| 438 | L: linux-geode@lists.infradead.org (moderated for non-subscribers) | 438 | L: linux-geode@lists.infradead.org (moderated for non-subscribers) |
| 439 | S: Supported | 439 | S: Supported |
| 440 | F: drivers/usb/gadget/amd5536udc.* | 440 | F: drivers/usb/gadget/amd5536udc.* |
| @@ -1973,8 +1973,8 @@ F: include/linux/edac.h | |||
| 1973 | 1973 | ||
| 1974 | EDAC-E752X | 1974 | EDAC-E752X |
| 1975 | P: Mark Gross | 1975 | P: Mark Gross |
| 1976 | P: Doug Thompson | ||
| 1977 | M: mark.gross@intel.com | 1976 | M: mark.gross@intel.com |
| 1977 | P: Doug Thompson | ||
| 1978 | M: dougthompson@xmission.com | 1978 | M: dougthompson@xmission.com |
| 1979 | L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers) | 1979 | L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers) |
| 1980 | W: bluesmoke.sourceforge.net | 1980 | W: bluesmoke.sourceforge.net |
diff --git a/arch/arm/include/asm/flat.h b/arch/arm/include/asm/flat.h index 1d77e51907f6..59426a4595c9 100644 --- a/arch/arm/include/asm/flat.h +++ b/arch/arm/include/asm/flat.h | |||
| @@ -5,9 +5,6 @@ | |||
| 5 | #ifndef __ARM_FLAT_H__ | 5 | #ifndef __ARM_FLAT_H__ |
| 6 | #define __ARM_FLAT_H__ | 6 | #define __ARM_FLAT_H__ |
| 7 | 7 | ||
| 8 | /* An odd number of words will be pushed after this alignment, so | ||
| 9 | deliberately misalign the value. */ | ||
| 10 | #define flat_stack_align(sp) sp = (void *)(((unsigned long)(sp) - 4) | 4) | ||
| 11 | #define flat_argvp_envp_on_stack() 1 | 8 | #define flat_argvp_envp_on_stack() 1 |
| 12 | #define flat_old_ram_flag(flags) (flags) | 9 | #define flat_old_ram_flag(flags) (flags) |
| 13 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) | 10 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) |
diff --git a/arch/blackfin/include/asm/flat.h b/arch/blackfin/include/asm/flat.h index e70074e05f4e..733a178d782d 100644 --- a/arch/blackfin/include/asm/flat.h +++ b/arch/blackfin/include/asm/flat.h | |||
| @@ -10,7 +10,6 @@ | |||
| 10 | 10 | ||
| 11 | #include <asm/unaligned.h> | 11 | #include <asm/unaligned.h> |
| 12 | 12 | ||
| 13 | #define flat_stack_align(sp) /* nothing needed */ | ||
| 14 | #define flat_argvp_envp_on_stack() 0 | 13 | #define flat_argvp_envp_on_stack() 0 |
| 15 | #define flat_old_ram_flag(flags) (flags) | 14 | #define flat_old_ram_flag(flags) (flags) |
| 16 | 15 | ||
diff --git a/arch/h8300/include/asm/flat.h b/arch/h8300/include/asm/flat.h index 2a873508a9a1..bd12b31b90e6 100644 --- a/arch/h8300/include/asm/flat.h +++ b/arch/h8300/include/asm/flat.h | |||
| @@ -5,7 +5,6 @@ | |||
| 5 | #ifndef __H8300_FLAT_H__ | 5 | #ifndef __H8300_FLAT_H__ |
| 6 | #define __H8300_FLAT_H__ | 6 | #define __H8300_FLAT_H__ |
| 7 | 7 | ||
| 8 | #define flat_stack_align(sp) /* nothing needed */ | ||
| 9 | #define flat_argvp_envp_on_stack() 1 | 8 | #define flat_argvp_envp_on_stack() 1 |
| 10 | #define flat_old_ram_flag(flags) 1 | 9 | #define flat_old_ram_flag(flags) 1 |
| 11 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) | 10 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) |
diff --git a/arch/m32r/include/asm/flat.h b/arch/m32r/include/asm/flat.h index d851cf0c4aa5..5d711c4688fb 100644 --- a/arch/m32r/include/asm/flat.h +++ b/arch/m32r/include/asm/flat.h | |||
| @@ -12,7 +12,6 @@ | |||
| 12 | #ifndef __ASM_M32R_FLAT_H | 12 | #ifndef __ASM_M32R_FLAT_H |
| 13 | #define __ASM_M32R_FLAT_H | 13 | #define __ASM_M32R_FLAT_H |
| 14 | 14 | ||
| 15 | #define flat_stack_align(sp) (*sp += (*sp & 3 ? (4 - (*sp & 3)): 0)) | ||
| 16 | #define flat_argvp_envp_on_stack() 0 | 15 | #define flat_argvp_envp_on_stack() 0 |
| 17 | #define flat_old_ram_flag(flags) (flags) | 16 | #define flat_old_ram_flag(flags) (flags) |
| 18 | #define flat_set_persistent(relval, p) 0 | 17 | #define flat_set_persistent(relval, p) 0 |
diff --git a/arch/m68k/include/asm/flat.h b/arch/m68k/include/asm/flat.h index 814b5174a8e0..a0e290793978 100644 --- a/arch/m68k/include/asm/flat.h +++ b/arch/m68k/include/asm/flat.h | |||
| @@ -5,7 +5,6 @@ | |||
| 5 | #ifndef __M68KNOMMU_FLAT_H__ | 5 | #ifndef __M68KNOMMU_FLAT_H__ |
| 6 | #define __M68KNOMMU_FLAT_H__ | 6 | #define __M68KNOMMU_FLAT_H__ |
| 7 | 7 | ||
| 8 | #define flat_stack_align(sp) /* nothing needed */ | ||
| 9 | #define flat_argvp_envp_on_stack() 1 | 8 | #define flat_argvp_envp_on_stack() 1 |
| 10 | #define flat_old_ram_flag(flags) (flags) | 9 | #define flat_old_ram_flag(flags) (flags) |
| 11 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) | 10 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) |
diff --git a/arch/sh/include/asm/flat.h b/arch/sh/include/asm/flat.h index d3b2b4f109e3..5d84df5e27f6 100644 --- a/arch/sh/include/asm/flat.h +++ b/arch/sh/include/asm/flat.h | |||
| @@ -12,7 +12,6 @@ | |||
| 12 | #ifndef __ASM_SH_FLAT_H | 12 | #ifndef __ASM_SH_FLAT_H |
| 13 | #define __ASM_SH_FLAT_H | 13 | #define __ASM_SH_FLAT_H |
| 14 | 14 | ||
| 15 | #define flat_stack_align(sp) /* nothing needed */ | ||
| 16 | #define flat_argvp_envp_on_stack() 0 | 15 | #define flat_argvp_envp_on_stack() 0 |
| 17 | #define flat_old_ram_flag(flags) (flags) | 16 | #define flat_old_ram_flag(flags) (flags) |
| 18 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) | 17 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) |
diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c index 8f307d914c2e..f46c340727b8 100644 --- a/arch/x86/mm/hugetlbpage.c +++ b/arch/x86/mm/hugetlbpage.c | |||
| @@ -26,12 +26,16 @@ static unsigned long page_table_shareable(struct vm_area_struct *svma, | |||
| 26 | unsigned long sbase = saddr & PUD_MASK; | 26 | unsigned long sbase = saddr & PUD_MASK; |
| 27 | unsigned long s_end = sbase + PUD_SIZE; | 27 | unsigned long s_end = sbase + PUD_SIZE; |
| 28 | 28 | ||
| 29 | /* Allow segments to share if only one is marked locked */ | ||
| 30 | unsigned long vm_flags = vma->vm_flags & ~VM_LOCKED; | ||
| 31 | unsigned long svm_flags = svma->vm_flags & ~VM_LOCKED; | ||
| 32 | |||
| 29 | /* | 33 | /* |
| 30 | * match the virtual addresses, permission and the alignment of the | 34 | * match the virtual addresses, permission and the alignment of the |
| 31 | * page table page. | 35 | * page table page. |
| 32 | */ | 36 | */ |
| 33 | if (pmd_index(addr) != pmd_index(saddr) || | 37 | if (pmd_index(addr) != pmd_index(saddr) || |
| 34 | vma->vm_flags != svma->vm_flags || | 38 | vm_flags != svm_flags || |
| 35 | sbase < svma->vm_start || svma->vm_end < s_end) | 39 | sbase < svma->vm_start || svma->vm_end < s_end) |
| 36 | return 0; | 40 | return 0; |
| 37 | 41 | ||
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index dc030f1f00f1..c6599618523e 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c | |||
| @@ -700,8 +700,10 @@ int bus_add_driver(struct device_driver *drv) | |||
| 700 | } | 700 | } |
| 701 | 701 | ||
| 702 | kobject_uevent(&priv->kobj, KOBJ_ADD); | 702 | kobject_uevent(&priv->kobj, KOBJ_ADD); |
| 703 | return error; | 703 | return 0; |
| 704 | out_unregister: | 704 | out_unregister: |
| 705 | kfree(drv->p); | ||
| 706 | drv->p = NULL; | ||
| 705 | kobject_put(&priv->kobj); | 707 | kobject_put(&priv->kobj); |
| 706 | out_put_bus: | 708 | out_put_bus: |
| 707 | bus_put(bus); | 709 | bus_put(bus); |
diff --git a/drivers/base/core.c b/drivers/base/core.c index 4aa527b8a913..1977d4beb89e 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
| @@ -879,7 +879,7 @@ int device_add(struct device *dev) | |||
| 879 | } | 879 | } |
| 880 | 880 | ||
| 881 | if (!dev_name(dev)) | 881 | if (!dev_name(dev)) |
| 882 | goto done; | 882 | goto name_error; |
| 883 | 883 | ||
| 884 | pr_debug("device: '%s': %s\n", dev_name(dev), __func__); | 884 | pr_debug("device: '%s': %s\n", dev_name(dev), __func__); |
| 885 | 885 | ||
| @@ -978,6 +978,9 @@ done: | |||
| 978 | cleanup_device_parent(dev); | 978 | cleanup_device_parent(dev); |
| 979 | if (parent) | 979 | if (parent) |
| 980 | put_device(parent); | 980 | put_device(parent); |
| 981 | name_error: | ||
| 982 | kfree(dev->p); | ||
| 983 | dev->p = NULL; | ||
| 981 | goto done; | 984 | goto done; |
| 982 | } | 985 | } |
| 983 | 986 | ||
diff --git a/drivers/base/driver.c b/drivers/base/driver.c index c51f11bb29ae..8ae0f63602e0 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c | |||
| @@ -257,6 +257,10 @@ EXPORT_SYMBOL_GPL(driver_register); | |||
| 257 | */ | 257 | */ |
| 258 | void driver_unregister(struct device_driver *drv) | 258 | void driver_unregister(struct device_driver *drv) |
| 259 | { | 259 | { |
| 260 | if (!drv || !drv->p) { | ||
| 261 | WARN(1, "Unexpected driver unregister!\n"); | ||
| 262 | return; | ||
| 263 | } | ||
| 260 | driver_remove_groups(drv, drv->groups); | 264 | driver_remove_groups(drv, drv->groups); |
| 261 | bus_remove_driver(drv); | 265 | bus_remove_driver(drv); |
| 262 | } | 266 | } |
diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig index e5f5c5a8ba6c..956982f8739b 100644 --- a/drivers/edac/Kconfig +++ b/drivers/edac/Kconfig | |||
| @@ -192,16 +192,20 @@ config EDAC_PPC4XX | |||
| 192 | 192 | ||
| 193 | config EDAC_AMD8131 | 193 | config EDAC_AMD8131 |
| 194 | tristate "AMD8131 HyperTransport PCI-X Tunnel" | 194 | tristate "AMD8131 HyperTransport PCI-X Tunnel" |
| 195 | depends on EDAC_MM_EDAC && PCI | 195 | depends on EDAC_MM_EDAC && PCI && PPC_MAPLE |
| 196 | help | 196 | help |
| 197 | Support for error detection and correction on the | 197 | Support for error detection and correction on the |
| 198 | AMD8131 HyperTransport PCI-X Tunnel chip. | 198 | AMD8131 HyperTransport PCI-X Tunnel chip. |
| 199 | Note, add more Kconfig dependency if it's adopted | ||
| 200 | on some machine other than Maple. | ||
| 199 | 201 | ||
| 200 | config EDAC_AMD8111 | 202 | config EDAC_AMD8111 |
| 201 | tristate "AMD8111 HyperTransport I/O Hub" | 203 | tristate "AMD8111 HyperTransport I/O Hub" |
| 202 | depends on EDAC_MM_EDAC && PCI | 204 | depends on EDAC_MM_EDAC && PCI && PPC_MAPLE |
| 203 | help | 205 | help |
| 204 | Support for error detection and correction on the | 206 | Support for error detection and correction on the |
| 205 | AMD8111 HyperTransport I/O Hub chip. | 207 | AMD8111 HyperTransport I/O Hub chip. |
| 208 | Note, add more Kconfig dependency if it's adopted | ||
| 209 | on some machine other than Maple. | ||
| 206 | 210 | ||
| 207 | endif # EDAC | 211 | endif # EDAC |
diff --git a/drivers/edac/Makefile b/drivers/edac/Makefile index a5fdcf02f591..59076819135d 100644 --- a/drivers/edac/Makefile +++ b/drivers/edac/Makefile | |||
| @@ -35,3 +35,5 @@ obj-$(CONFIG_EDAC_MPC85XX) += mpc85xx_edac.o | |||
| 35 | obj-$(CONFIG_EDAC_MV64X60) += mv64x60_edac.o | 35 | obj-$(CONFIG_EDAC_MV64X60) += mv64x60_edac.o |
| 36 | obj-$(CONFIG_EDAC_CELL) += cell_edac.o | 36 | obj-$(CONFIG_EDAC_CELL) += cell_edac.o |
| 37 | obj-$(CONFIG_EDAC_PPC4XX) += ppc4xx_edac.o | 37 | obj-$(CONFIG_EDAC_PPC4XX) += ppc4xx_edac.o |
| 38 | obj-$(CONFIG_EDAC_AMD8111) += amd8111_edac.o | ||
| 39 | obj-$(CONFIG_EDAC_AMD8131) += amd8131_edac.o | ||
diff --git a/drivers/edac/amd8111_edac.c b/drivers/edac/amd8111_edac.c index 614692181120..2cb58ef743e0 100644 --- a/drivers/edac/amd8111_edac.c +++ b/drivers/edac/amd8111_edac.c | |||
| @@ -389,7 +389,7 @@ static int amd8111_dev_probe(struct pci_dev *dev, | |||
| 389 | dev_info->edac_dev->dev = &dev_info->dev->dev; | 389 | dev_info->edac_dev->dev = &dev_info->dev->dev; |
| 390 | dev_info->edac_dev->mod_name = AMD8111_EDAC_MOD_STR; | 390 | dev_info->edac_dev->mod_name = AMD8111_EDAC_MOD_STR; |
| 391 | dev_info->edac_dev->ctl_name = dev_info->ctl_name; | 391 | dev_info->edac_dev->ctl_name = dev_info->ctl_name; |
| 392 | dev_info->edac_dev->dev_name = dev_info->dev->dev.bus_id; | 392 | dev_info->edac_dev->dev_name = dev_name(&dev_info->dev->dev); |
| 393 | 393 | ||
| 394 | if (edac_op_state == EDAC_OPSTATE_POLL) | 394 | if (edac_op_state == EDAC_OPSTATE_POLL) |
| 395 | dev_info->edac_dev->edac_check = dev_info->check; | 395 | dev_info->edac_dev->edac_check = dev_info->check; |
| @@ -473,7 +473,7 @@ static int amd8111_pci_probe(struct pci_dev *dev, | |||
| 473 | pci_info->edac_dev->dev = &pci_info->dev->dev; | 473 | pci_info->edac_dev->dev = &pci_info->dev->dev; |
| 474 | pci_info->edac_dev->mod_name = AMD8111_EDAC_MOD_STR; | 474 | pci_info->edac_dev->mod_name = AMD8111_EDAC_MOD_STR; |
| 475 | pci_info->edac_dev->ctl_name = pci_info->ctl_name; | 475 | pci_info->edac_dev->ctl_name = pci_info->ctl_name; |
| 476 | pci_info->edac_dev->dev_name = pci_info->dev->dev.bus_id; | 476 | pci_info->edac_dev->dev_name = dev_name(&pci_info->dev->dev); |
| 477 | 477 | ||
| 478 | if (edac_op_state == EDAC_OPSTATE_POLL) | 478 | if (edac_op_state == EDAC_OPSTATE_POLL) |
| 479 | pci_info->edac_dev->edac_check = pci_info->check; | 479 | pci_info->edac_dev->edac_check = pci_info->check; |
diff --git a/drivers/edac/amd8131_edac.c b/drivers/edac/amd8131_edac.c index c083b31cac5a..b432d60c622a 100644 --- a/drivers/edac/amd8131_edac.c +++ b/drivers/edac/amd8131_edac.c | |||
| @@ -287,7 +287,7 @@ static int amd8131_probe(struct pci_dev *dev, const struct pci_device_id *id) | |||
| 287 | dev_info->edac_dev->dev = &dev_info->dev->dev; | 287 | dev_info->edac_dev->dev = &dev_info->dev->dev; |
| 288 | dev_info->edac_dev->mod_name = AMD8131_EDAC_MOD_STR; | 288 | dev_info->edac_dev->mod_name = AMD8131_EDAC_MOD_STR; |
| 289 | dev_info->edac_dev->ctl_name = dev_info->ctl_name; | 289 | dev_info->edac_dev->ctl_name = dev_info->ctl_name; |
| 290 | dev_info->edac_dev->dev_name = dev_info->dev->dev.bus_id; | 290 | dev_info->edac_dev->dev_name = dev_name(&dev_info->dev->dev); |
| 291 | 291 | ||
| 292 | if (edac_op_state == EDAC_OPSTATE_POLL) | 292 | if (edac_op_state == EDAC_OPSTATE_POLL) |
| 293 | dev_info->edac_dev->edac_check = amd8131_chipset.check; | 293 | dev_info->edac_dev->edac_check = amd8131_chipset.check; |
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 717b6a854bcd..670d12881468 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
| @@ -1145,6 +1145,13 @@ int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf) | |||
| 1145 | mutex_unlock(&dev->struct_mutex); | 1145 | mutex_unlock(&dev->struct_mutex); |
| 1146 | return VM_FAULT_SIGBUS; | 1146 | return VM_FAULT_SIGBUS; |
| 1147 | } | 1147 | } |
| 1148 | |||
| 1149 | ret = i915_gem_object_set_to_gtt_domain(obj, write); | ||
| 1150 | if (ret) { | ||
| 1151 | mutex_unlock(&dev->struct_mutex); | ||
| 1152 | return VM_FAULT_SIGBUS; | ||
| 1153 | } | ||
| 1154 | |||
| 1148 | list_add_tail(&obj_priv->list, &dev_priv->mm.inactive_list); | 1155 | list_add_tail(&obj_priv->list, &dev_priv->mm.inactive_list); |
| 1149 | } | 1156 | } |
| 1150 | 1157 | ||
| @@ -2128,8 +2135,10 @@ static void i830_write_fence_reg(struct drm_i915_fence_reg *reg) | |||
| 2128 | return; | 2135 | return; |
| 2129 | } | 2136 | } |
| 2130 | 2137 | ||
| 2131 | pitch_val = (obj_priv->stride / 128) - 1; | 2138 | pitch_val = obj_priv->stride / 128; |
| 2132 | WARN_ON(pitch_val & ~0x0000000f); | 2139 | pitch_val = ffs(pitch_val) - 1; |
| 2140 | WARN_ON(pitch_val > I830_FENCE_MAX_PITCH_VAL); | ||
| 2141 | |||
| 2133 | val = obj_priv->gtt_offset; | 2142 | val = obj_priv->gtt_offset; |
| 2134 | if (obj_priv->tiling_mode == I915_TILING_Y) | 2143 | if (obj_priv->tiling_mode == I915_TILING_Y) |
| 2135 | val |= 1 << I830_FENCE_TILING_Y_SHIFT; | 2144 | val |= 1 << I830_FENCE_TILING_Y_SHIFT; |
| @@ -2421,6 +2430,16 @@ i915_gem_clflush_object(struct drm_gem_object *obj) | |||
| 2421 | if (obj_priv->pages == NULL) | 2430 | if (obj_priv->pages == NULL) |
| 2422 | return; | 2431 | return; |
| 2423 | 2432 | ||
| 2433 | /* XXX: The 865 in particular appears to be weird in how it handles | ||
| 2434 | * cache flushing. We haven't figured it out, but the | ||
| 2435 | * clflush+agp_chipset_flush doesn't appear to successfully get the | ||
| 2436 | * data visible to the PGU, while wbinvd + agp_chipset_flush does. | ||
| 2437 | */ | ||
| 2438 | if (IS_I865G(obj->dev)) { | ||
| 2439 | wbinvd(); | ||
| 2440 | return; | ||
| 2441 | } | ||
| 2442 | |||
| 2424 | drm_clflush_pages(obj_priv->pages, obj->size / PAGE_SIZE); | 2443 | drm_clflush_pages(obj_priv->pages, obj->size / PAGE_SIZE); |
| 2425 | } | 2444 | } |
| 2426 | 2445 | ||
diff --git a/drivers/gpu/drm/i915/i915_gem_tiling.c b/drivers/gpu/drm/i915/i915_gem_tiling.c index 52a059354e83..540dd336e6ec 100644 --- a/drivers/gpu/drm/i915/i915_gem_tiling.c +++ b/drivers/gpu/drm/i915/i915_gem_tiling.c | |||
| @@ -213,7 +213,8 @@ i915_tiling_ok(struct drm_device *dev, int stride, int size, int tiling_mode) | |||
| 213 | if (tiling_mode == I915_TILING_NONE) | 213 | if (tiling_mode == I915_TILING_NONE) |
| 214 | return true; | 214 | return true; |
| 215 | 215 | ||
| 216 | if (tiling_mode == I915_TILING_Y && HAS_128_BYTE_Y_TILING(dev)) | 216 | if (!IS_I9XX(dev) || |
| 217 | (tiling_mode == I915_TILING_Y && HAS_128_BYTE_Y_TILING(dev))) | ||
| 217 | tile_width = 128; | 218 | tile_width = 128; |
| 218 | else | 219 | else |
| 219 | tile_width = 512; | 220 | tile_width = 512; |
| @@ -225,11 +226,18 @@ i915_tiling_ok(struct drm_device *dev, int stride, int size, int tiling_mode) | |||
| 225 | if (stride / 128 > I965_FENCE_MAX_PITCH_VAL) | 226 | if (stride / 128 > I965_FENCE_MAX_PITCH_VAL) |
| 226 | return false; | 227 | return false; |
| 227 | } else if (IS_I9XX(dev)) { | 228 | } else if (IS_I9XX(dev)) { |
| 228 | if (stride / tile_width > I830_FENCE_MAX_PITCH_VAL || | 229 | uint32_t pitch_val = ffs(stride / tile_width) - 1; |
| 230 | |||
| 231 | /* XXX: For Y tiling, FENCE_MAX_PITCH_VAL is actually 6 (8KB) | ||
| 232 | * instead of 4 (2KB) on 945s. | ||
| 233 | */ | ||
| 234 | if (pitch_val > I915_FENCE_MAX_PITCH_VAL || | ||
| 229 | size > (I830_FENCE_MAX_SIZE_VAL << 20)) | 235 | size > (I830_FENCE_MAX_SIZE_VAL << 20)) |
| 230 | return false; | 236 | return false; |
| 231 | } else { | 237 | } else { |
| 232 | if (stride / 128 > I830_FENCE_MAX_PITCH_VAL || | 238 | uint32_t pitch_val = ffs(stride / tile_width) - 1; |
| 239 | |||
| 240 | if (pitch_val > I830_FENCE_MAX_PITCH_VAL || | ||
| 233 | size > (I830_FENCE_MAX_SIZE_VAL << 19)) | 241 | size > (I830_FENCE_MAX_SIZE_VAL << 19)) |
| 234 | return false; | 242 | return false; |
| 235 | } | 243 | } |
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 9668cc0d7f4e..375569d01d01 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
| @@ -190,7 +190,8 @@ | |||
| 190 | #define I830_FENCE_SIZE_BITS(size) ((ffs((size) >> 19) - 1) << 8) | 190 | #define I830_FENCE_SIZE_BITS(size) ((ffs((size) >> 19) - 1) << 8) |
| 191 | #define I830_FENCE_PITCH_SHIFT 4 | 191 | #define I830_FENCE_PITCH_SHIFT 4 |
| 192 | #define I830_FENCE_REG_VALID (1<<0) | 192 | #define I830_FENCE_REG_VALID (1<<0) |
| 193 | #define I830_FENCE_MAX_PITCH_VAL 0x10 | 193 | #define I915_FENCE_MAX_PITCH_VAL 0x10 |
| 194 | #define I830_FENCE_MAX_PITCH_VAL 6 | ||
| 194 | #define I830_FENCE_MAX_SIZE_VAL (1<<8) | 195 | #define I830_FENCE_MAX_SIZE_VAL (1<<8) |
| 195 | 196 | ||
| 196 | #define I915_FENCE_START_MASK 0x0ff00000 | 197 | #define I915_FENCE_START_MASK 0x0ff00000 |
diff --git a/drivers/input/input.c b/drivers/input/input.c index e54e002665b0..5d445f48789b 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
| @@ -42,6 +42,7 @@ static unsigned int input_abs_bypass_init_data[] __initdata = { | |||
| 42 | ABS_MT_POSITION_Y, | 42 | ABS_MT_POSITION_Y, |
| 43 | ABS_MT_TOOL_TYPE, | 43 | ABS_MT_TOOL_TYPE, |
| 44 | ABS_MT_BLOB_ID, | 44 | ABS_MT_BLOB_ID, |
| 45 | ABS_MT_TRACKING_ID, | ||
| 45 | 0 | 46 | 0 |
| 46 | }; | 47 | }; |
| 47 | static unsigned long input_abs_bypass[BITS_TO_LONGS(ABS_CNT)]; | 48 | static unsigned long input_abs_bypass[BITS_TO_LONGS(ABS_CNT)]; |
diff --git a/drivers/input/serio/libps2.c b/drivers/input/serio/libps2.c index 67248c31e19a..be5bbbb8ae4e 100644 --- a/drivers/input/serio/libps2.c +++ b/drivers/input/serio/libps2.c | |||
| @@ -210,7 +210,7 @@ int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command) | |||
| 210 | timeout = wait_event_timeout(ps2dev->wait, | 210 | timeout = wait_event_timeout(ps2dev->wait, |
| 211 | !(ps2dev->flags & PS2_FLAG_CMD1), timeout); | 211 | !(ps2dev->flags & PS2_FLAG_CMD1), timeout); |
| 212 | 212 | ||
| 213 | if (ps2dev->cmdcnt && timeout > 0) { | 213 | if (ps2dev->cmdcnt && !(ps2dev->flags & PS2_FLAG_CMD1)) { |
| 214 | 214 | ||
| 215 | timeout = ps2_adjust_timeout(ps2dev, command, timeout); | 215 | timeout = ps2_adjust_timeout(ps2dev, command, timeout); |
| 216 | wait_event_timeout(ps2dev->wait, | 216 | wait_event_timeout(ps2dev->wait, |
diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c index f100c7f4c1db..6954f5500108 100644 --- a/drivers/input/touchscreen/ucb1400_ts.c +++ b/drivers/input/touchscreen/ucb1400_ts.c | |||
| @@ -419,7 +419,7 @@ static int ucb1400_ts_remove(struct platform_device *dev) | |||
| 419 | #ifdef CONFIG_PM | 419 | #ifdef CONFIG_PM |
| 420 | static int ucb1400_ts_resume(struct platform_device *dev) | 420 | static int ucb1400_ts_resume(struct platform_device *dev) |
| 421 | { | 421 | { |
| 422 | struct ucb1400_ts *ucb = platform_get_drvdata(dev); | 422 | struct ucb1400_ts *ucb = dev->dev.platform_data; |
| 423 | 423 | ||
| 424 | if (ucb->ts_task) { | 424 | if (ucb->ts_task) { |
| 425 | /* | 425 | /* |
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index f3548d048014..40c26080ecda 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c | |||
| @@ -831,6 +831,7 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, | |||
| 831 | break; | 831 | break; |
| 832 | 832 | ||
| 833 | case NAND_CMD_READID: | 833 | case NAND_CMD_READID: |
| 834 | host->col_addr = 0; | ||
| 834 | send_read_id(host); | 835 | send_read_id(host); |
| 835 | break; | 836 | break; |
| 836 | 837 | ||
| @@ -867,6 +868,7 @@ static int __init mxcnd_probe(struct platform_device *pdev) | |||
| 867 | mtd->priv = this; | 868 | mtd->priv = this; |
| 868 | mtd->owner = THIS_MODULE; | 869 | mtd->owner = THIS_MODULE; |
| 869 | mtd->dev.parent = &pdev->dev; | 870 | mtd->dev.parent = &pdev->dev; |
| 871 | mtd->name = "mxc_nand"; | ||
| 870 | 872 | ||
| 871 | /* 50 us command delay time */ | 873 | /* 50 us command delay time */ |
| 872 | this->chip_delay = 5; | 874 | this->chip_delay = 5; |
| @@ -882,8 +884,10 @@ static int __init mxcnd_probe(struct platform_device *pdev) | |||
| 882 | this->verify_buf = mxc_nand_verify_buf; | 884 | this->verify_buf = mxc_nand_verify_buf; |
| 883 | 885 | ||
| 884 | host->clk = clk_get(&pdev->dev, "nfc"); | 886 | host->clk = clk_get(&pdev->dev, "nfc"); |
| 885 | if (IS_ERR(host->clk)) | 887 | if (IS_ERR(host->clk)) { |
| 888 | err = PTR_ERR(host->clk); | ||
| 886 | goto eclk; | 889 | goto eclk; |
| 890 | } | ||
| 887 | 891 | ||
| 888 | clk_enable(host->clk); | 892 | clk_enable(host->clk); |
| 889 | host->clk_act = 1; | 893 | host->clk_act = 1; |
| @@ -896,7 +900,7 @@ static int __init mxcnd_probe(struct platform_device *pdev) | |||
| 896 | 900 | ||
| 897 | host->regs = ioremap(res->start, res->end - res->start + 1); | 901 | host->regs = ioremap(res->start, res->end - res->start + 1); |
| 898 | if (!host->regs) { | 902 | if (!host->regs) { |
| 899 | err = -EIO; | 903 | err = -ENOMEM; |
| 900 | goto eres; | 904 | goto eres; |
| 901 | } | 905 | } |
| 902 | 906 | ||
| @@ -1011,30 +1015,35 @@ static int __devexit mxcnd_remove(struct platform_device *pdev) | |||
| 1011 | #ifdef CONFIG_PM | 1015 | #ifdef CONFIG_PM |
| 1012 | static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state) | 1016 | static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state) |
| 1013 | { | 1017 | { |
| 1014 | struct mtd_info *info = platform_get_drvdata(pdev); | 1018 | struct mtd_info *mtd = platform_get_drvdata(pdev); |
| 1019 | struct nand_chip *nand_chip = mtd->priv; | ||
| 1020 | struct mxc_nand_host *host = nand_chip->priv; | ||
| 1015 | int ret = 0; | 1021 | int ret = 0; |
| 1016 | 1022 | ||
| 1017 | DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND suspend\n"); | 1023 | DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND suspend\n"); |
| 1018 | if (info) | 1024 | if (mtd) { |
| 1019 | ret = info->suspend(info); | 1025 | ret = mtd->suspend(mtd); |
| 1020 | 1026 | /* Disable the NFC clock */ | |
| 1021 | /* Disable the NFC clock */ | 1027 | clk_disable(host->clk); |
| 1022 | clk_disable(nfc_clk); /* FIXME */ | 1028 | } |
| 1023 | 1029 | ||
| 1024 | return ret; | 1030 | return ret; |
| 1025 | } | 1031 | } |
| 1026 | 1032 | ||
| 1027 | static int mxcnd_resume(struct platform_device *pdev) | 1033 | static int mxcnd_resume(struct platform_device *pdev) |
| 1028 | { | 1034 | { |
| 1029 | struct mtd_info *info = platform_get_drvdata(pdev); | 1035 | struct mtd_info *mtd = platform_get_drvdata(pdev); |
| 1036 | struct nand_chip *nand_chip = mtd->priv; | ||
| 1037 | struct mxc_nand_host *host = nand_chip->priv; | ||
| 1030 | int ret = 0; | 1038 | int ret = 0; |
| 1031 | 1039 | ||
| 1032 | DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND resume\n"); | 1040 | DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND resume\n"); |
| 1033 | /* Enable the NFC clock */ | ||
| 1034 | clk_enable(nfc_clk); /* FIXME */ | ||
| 1035 | 1041 | ||
| 1036 | if (info) | 1042 | if (mtd) { |
| 1037 | info->resume(info); | 1043 | /* Enable the NFC clock */ |
| 1044 | clk_enable(host->clk); | ||
| 1045 | mtd->resume(mtd); | ||
| 1046 | } | ||
| 1038 | 1047 | ||
| 1039 | return ret; | 1048 | return ret; |
| 1040 | } | 1049 | } |
| @@ -1055,13 +1064,7 @@ static struct platform_driver mxcnd_driver = { | |||
| 1055 | 1064 | ||
| 1056 | static int __init mxc_nd_init(void) | 1065 | static int __init mxc_nd_init(void) |
| 1057 | { | 1066 | { |
| 1058 | /* Register the device driver structure. */ | 1067 | return platform_driver_probe(&mxcnd_driver, mxcnd_probe); |
| 1059 | pr_info("MXC MTD nand Driver\n"); | ||
| 1060 | if (platform_driver_probe(&mxcnd_driver, mxcnd_probe) != 0) { | ||
| 1061 | printk(KERN_ERR "Driver register failed for mxcnd_driver\n"); | ||
| 1062 | return -ENODEV; | ||
| 1063 | } | ||
| 1064 | return 0; | ||
| 1065 | } | 1068 | } |
| 1066 | 1069 | ||
| 1067 | static void __exit mxc_nd_cleanup(void) | 1070 | static void __exit mxc_nd_cleanup(void) |
diff --git a/drivers/parport/parport_gsc.c b/drivers/parport/parport_gsc.c index e6a7e847ee80..ea31a452b153 100644 --- a/drivers/parport/parport_gsc.c +++ b/drivers/parport/parport_gsc.c | |||
| @@ -352,8 +352,8 @@ static int __devinit parport_init_chip(struct parisc_device *dev) | |||
| 352 | unsigned long port; | 352 | unsigned long port; |
| 353 | 353 | ||
| 354 | if (!dev->irq) { | 354 | if (!dev->irq) { |
| 355 | printk(KERN_WARNING "IRQ not found for parallel device at 0x%lx\n", | 355 | printk(KERN_WARNING "IRQ not found for parallel device at 0x%llx\n", |
| 356 | dev->hpa.start); | 356 | (unsigned long long)dev->hpa.start); |
| 357 | return -ENODEV; | 357 | return -ENODEV; |
| 358 | } | 358 | } |
| 359 | 359 | ||
diff --git a/drivers/pci/hotplug/acpiphp.h b/drivers/pci/hotplug/acpiphp.h index 4fc168b70095..e68d5f20ffb3 100644 --- a/drivers/pci/hotplug/acpiphp.h +++ b/drivers/pci/hotplug/acpiphp.h | |||
| @@ -129,7 +129,6 @@ struct acpiphp_func { | |||
| 129 | struct acpiphp_bridge *bridge; /* Ejectable PCI-to-PCI bridge */ | 129 | struct acpiphp_bridge *bridge; /* Ejectable PCI-to-PCI bridge */ |
| 130 | 130 | ||
| 131 | struct list_head sibling; | 131 | struct list_head sibling; |
| 132 | struct pci_dev *pci_dev; | ||
| 133 | struct notifier_block nb; | 132 | struct notifier_block nb; |
| 134 | acpi_handle handle; | 133 | acpi_handle handle; |
| 135 | 134 | ||
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index a33794d9e0dc..3a6064bce561 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
| @@ -32,9 +32,6 @@ | |||
| 32 | 32 | ||
| 33 | /* | 33 | /* |
| 34 | * Lifetime rules for pci_dev: | 34 | * Lifetime rules for pci_dev: |
| 35 | * - The one in acpiphp_func has its refcount elevated by pci_get_slot() | ||
| 36 | * when the driver is loaded or when an insertion event occurs. It loses | ||
| 37 | * a refcount when its ejected or the driver unloads. | ||
| 38 | * - The one in acpiphp_bridge has its refcount elevated by pci_get_slot() | 35 | * - The one in acpiphp_bridge has its refcount elevated by pci_get_slot() |
| 39 | * when the bridge is scanned and it loses a refcount when the bridge | 36 | * when the bridge is scanned and it loses a refcount when the bridge |
| 40 | * is removed. | 37 | * is removed. |
| @@ -130,6 +127,7 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv) | |||
| 130 | unsigned long long adr, sun; | 127 | unsigned long long adr, sun; |
| 131 | int device, function, retval; | 128 | int device, function, retval; |
| 132 | struct pci_bus *pbus = bridge->pci_bus; | 129 | struct pci_bus *pbus = bridge->pci_bus; |
| 130 | struct pci_dev *pdev; | ||
| 133 | 131 | ||
| 134 | if (!acpi_pci_check_ejectable(pbus, handle) && !is_dock_device(handle)) | 132 | if (!acpi_pci_check_ejectable(pbus, handle) && !is_dock_device(handle)) |
| 135 | return AE_OK; | 133 | return AE_OK; |
| @@ -213,10 +211,10 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv) | |||
| 213 | newfunc->slot = slot; | 211 | newfunc->slot = slot; |
| 214 | list_add_tail(&newfunc->sibling, &slot->funcs); | 212 | list_add_tail(&newfunc->sibling, &slot->funcs); |
| 215 | 213 | ||
| 216 | /* associate corresponding pci_dev */ | 214 | pdev = pci_get_slot(pbus, PCI_DEVFN(device, function)); |
| 217 | newfunc->pci_dev = pci_get_slot(pbus, PCI_DEVFN(device, function)); | 215 | if (pdev) { |
| 218 | if (newfunc->pci_dev) { | ||
| 219 | slot->flags |= (SLOT_ENABLED | SLOT_POWEREDON); | 216 | slot->flags |= (SLOT_ENABLED | SLOT_POWEREDON); |
| 217 | pci_dev_put(pdev); | ||
| 220 | } | 218 | } |
| 221 | 219 | ||
| 222 | if (is_dock_device(handle)) { | 220 | if (is_dock_device(handle)) { |
| @@ -617,7 +615,6 @@ static void cleanup_bridge(struct acpiphp_bridge *bridge) | |||
| 617 | if (ACPI_FAILURE(status)) | 615 | if (ACPI_FAILURE(status)) |
| 618 | err("failed to remove notify handler\n"); | 616 | err("failed to remove notify handler\n"); |
| 619 | } | 617 | } |
| 620 | pci_dev_put(func->pci_dev); | ||
| 621 | list_del(list); | 618 | list_del(list); |
| 622 | kfree(func); | 619 | kfree(func); |
| 623 | } | 620 | } |
| @@ -1101,22 +1098,24 @@ static int __ref enable_device(struct acpiphp_slot *slot) | |||
| 1101 | pci_enable_bridges(bus); | 1098 | pci_enable_bridges(bus); |
| 1102 | pci_bus_add_devices(bus); | 1099 | pci_bus_add_devices(bus); |
| 1103 | 1100 | ||
| 1104 | /* associate pci_dev to our representation */ | ||
| 1105 | list_for_each (l, &slot->funcs) { | 1101 | list_for_each (l, &slot->funcs) { |
| 1106 | func = list_entry(l, struct acpiphp_func, sibling); | 1102 | func = list_entry(l, struct acpiphp_func, sibling); |
| 1107 | func->pci_dev = pci_get_slot(bus, PCI_DEVFN(slot->device, | 1103 | dev = pci_get_slot(bus, PCI_DEVFN(slot->device, |
| 1108 | func->function)); | 1104 | func->function)); |
| 1109 | if (!func->pci_dev) | 1105 | if (!dev) |
| 1110 | continue; | 1106 | continue; |
| 1111 | 1107 | ||
| 1112 | if (func->pci_dev->hdr_type != PCI_HEADER_TYPE_BRIDGE && | 1108 | if (dev->hdr_type != PCI_HEADER_TYPE_BRIDGE && |
| 1113 | func->pci_dev->hdr_type != PCI_HEADER_TYPE_CARDBUS) | 1109 | dev->hdr_type != PCI_HEADER_TYPE_CARDBUS) { |
| 1110 | pci_dev_put(dev); | ||
| 1114 | continue; | 1111 | continue; |
| 1112 | } | ||
| 1115 | 1113 | ||
| 1116 | status = find_p2p_bridge(func->handle, (u32)1, bus, NULL); | 1114 | status = find_p2p_bridge(func->handle, (u32)1, bus, NULL); |
| 1117 | if (ACPI_FAILURE(status)) | 1115 | if (ACPI_FAILURE(status)) |
| 1118 | warn("find_p2p_bridge failed (error code = 0x%x)\n", | 1116 | warn("find_p2p_bridge failed (error code = 0x%x)\n", |
| 1119 | status); | 1117 | status); |
| 1118 | pci_dev_put(dev); | ||
| 1120 | } | 1119 | } |
| 1121 | 1120 | ||
| 1122 | slot->flags |= SLOT_ENABLED; | 1121 | slot->flags |= SLOT_ENABLED; |
| @@ -1142,17 +1141,14 @@ static void disable_bridges(struct pci_bus *bus) | |||
| 1142 | */ | 1141 | */ |
| 1143 | static int disable_device(struct acpiphp_slot *slot) | 1142 | static int disable_device(struct acpiphp_slot *slot) |
| 1144 | { | 1143 | { |
| 1145 | int retval = 0; | ||
| 1146 | struct acpiphp_func *func; | 1144 | struct acpiphp_func *func; |
| 1147 | struct list_head *l; | 1145 | struct pci_dev *pdev; |
| 1148 | 1146 | ||
| 1149 | /* is this slot already disabled? */ | 1147 | /* is this slot already disabled? */ |
| 1150 | if (!(slot->flags & SLOT_ENABLED)) | 1148 | if (!(slot->flags & SLOT_ENABLED)) |
| 1151 | goto err_exit; | 1149 | goto err_exit; |
| 1152 | 1150 | ||
| 1153 | list_for_each (l, &slot->funcs) { | 1151 | list_for_each_entry(func, &slot->funcs, sibling) { |
| 1154 | func = list_entry(l, struct acpiphp_func, sibling); | ||
| 1155 | |||
| 1156 | if (func->bridge) { | 1152 | if (func->bridge) { |
| 1157 | /* cleanup p2p bridges under this P2P bridge */ | 1153 | /* cleanup p2p bridges under this P2P bridge */ |
| 1158 | cleanup_p2p_bridge(func->bridge->handle, | 1154 | cleanup_p2p_bridge(func->bridge->handle, |
| @@ -1160,35 +1156,28 @@ static int disable_device(struct acpiphp_slot *slot) | |||
| 1160 | func->bridge = NULL; | 1156 | func->bridge = NULL; |
| 1161 | } | 1157 | } |
| 1162 | 1158 | ||
| 1163 | if (func->pci_dev) { | 1159 | pdev = pci_get_slot(slot->bridge->pci_bus, |
| 1164 | pci_stop_bus_device(func->pci_dev); | 1160 | PCI_DEVFN(slot->device, func->function)); |
| 1165 | if (func->pci_dev->subordinate) { | 1161 | if (pdev) { |
| 1166 | disable_bridges(func->pci_dev->subordinate); | 1162 | pci_stop_bus_device(pdev); |
| 1167 | pci_disable_device(func->pci_dev); | 1163 | if (pdev->subordinate) { |
| 1164 | disable_bridges(pdev->subordinate); | ||
| 1165 | pci_disable_device(pdev); | ||
| 1168 | } | 1166 | } |
| 1167 | pci_remove_bus_device(pdev); | ||
| 1168 | pci_dev_put(pdev); | ||
| 1169 | } | 1169 | } |
| 1170 | } | 1170 | } |
| 1171 | 1171 | ||
| 1172 | list_for_each (l, &slot->funcs) { | 1172 | list_for_each_entry(func, &slot->funcs, sibling) { |
| 1173 | func = list_entry(l, struct acpiphp_func, sibling); | ||
| 1174 | |||
| 1175 | acpiphp_unconfigure_ioapics(func->handle); | 1173 | acpiphp_unconfigure_ioapics(func->handle); |
| 1176 | acpiphp_bus_trim(func->handle); | 1174 | acpiphp_bus_trim(func->handle); |
| 1177 | /* try to remove anyway. | ||
| 1178 | * acpiphp_bus_add might have been failed */ | ||
| 1179 | |||
| 1180 | if (!func->pci_dev) | ||
| 1181 | continue; | ||
| 1182 | |||
| 1183 | pci_remove_bus_device(func->pci_dev); | ||
| 1184 | pci_dev_put(func->pci_dev); | ||
| 1185 | func->pci_dev = NULL; | ||
| 1186 | } | 1175 | } |
| 1187 | 1176 | ||
| 1188 | slot->flags &= (~SLOT_ENABLED); | 1177 | slot->flags &= (~SLOT_ENABLED); |
| 1189 | 1178 | ||
| 1190 | err_exit: | 1179 | err_exit: |
| 1191 | return retval; | 1180 | return 0; |
| 1192 | } | 1181 | } |
| 1193 | 1182 | ||
| 1194 | 1183 | ||
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index b4b39811b445..a0127e93ade0 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
| @@ -137,6 +137,7 @@ struct uart_8250_port { | |||
| 137 | unsigned char mcr; | 137 | unsigned char mcr; |
| 138 | unsigned char mcr_mask; /* mask of user bits */ | 138 | unsigned char mcr_mask; /* mask of user bits */ |
| 139 | unsigned char mcr_force; /* mask of forced bits */ | 139 | unsigned char mcr_force; /* mask of forced bits */ |
| 140 | unsigned char cur_iotype; /* Running I/O type */ | ||
| 140 | 141 | ||
| 141 | /* | 142 | /* |
| 142 | * Some bits in registers are cleared on a read, so they must | 143 | * Some bits in registers are cleared on a read, so they must |
| @@ -471,6 +472,7 @@ static void io_serial_out(struct uart_port *p, int offset, int value) | |||
| 471 | 472 | ||
| 472 | static void set_io_from_upio(struct uart_port *p) | 473 | static void set_io_from_upio(struct uart_port *p) |
| 473 | { | 474 | { |
| 475 | struct uart_8250_port *up = (struct uart_8250_port *)p; | ||
| 474 | switch (p->iotype) { | 476 | switch (p->iotype) { |
| 475 | case UPIO_HUB6: | 477 | case UPIO_HUB6: |
| 476 | p->serial_in = hub6_serial_in; | 478 | p->serial_in = hub6_serial_in; |
| @@ -509,6 +511,8 @@ static void set_io_from_upio(struct uart_port *p) | |||
| 509 | p->serial_out = io_serial_out; | 511 | p->serial_out = io_serial_out; |
| 510 | break; | 512 | break; |
| 511 | } | 513 | } |
| 514 | /* Remember loaded iotype */ | ||
| 515 | up->cur_iotype = p->iotype; | ||
| 512 | } | 516 | } |
| 513 | 517 | ||
| 514 | static void | 518 | static void |
| @@ -1937,6 +1941,9 @@ static int serial8250_startup(struct uart_port *port) | |||
| 1937 | up->capabilities = uart_config[up->port.type].flags; | 1941 | up->capabilities = uart_config[up->port.type].flags; |
| 1938 | up->mcr = 0; | 1942 | up->mcr = 0; |
| 1939 | 1943 | ||
| 1944 | if (up->port.iotype != up->cur_iotype) | ||
| 1945 | set_io_from_upio(port); | ||
| 1946 | |||
| 1940 | if (up->port.type == PORT_16C950) { | 1947 | if (up->port.type == PORT_16C950) { |
| 1941 | /* Wake up and initialize UART */ | 1948 | /* Wake up and initialize UART */ |
| 1942 | up->acr = 0; | 1949 | up->acr = 0; |
| @@ -2563,6 +2570,9 @@ static void serial8250_config_port(struct uart_port *port, int flags) | |||
| 2563 | if (ret < 0) | 2570 | if (ret < 0) |
| 2564 | probeflags &= ~PROBE_RSA; | 2571 | probeflags &= ~PROBE_RSA; |
| 2565 | 2572 | ||
| 2573 | if (up->port.iotype != up->cur_iotype) | ||
| 2574 | set_io_from_upio(port); | ||
| 2575 | |||
| 2566 | if (flags & UART_CONFIG_TYPE) | 2576 | if (flags & UART_CONFIG_TYPE) |
| 2567 | autoconfig(up, probeflags); | 2577 | autoconfig(up, probeflags); |
| 2568 | if (up->port.type != PORT_UNKNOWN && flags & UART_CONFIG_IRQ) | 2578 | if (up->port.type != PORT_UNKNOWN && flags & UART_CONFIG_IRQ) |
| @@ -2671,6 +2681,11 @@ serial8250_register_ports(struct uart_driver *drv, struct device *dev) | |||
| 2671 | { | 2681 | { |
| 2672 | int i; | 2682 | int i; |
| 2673 | 2683 | ||
| 2684 | for (i = 0; i < nr_uarts; i++) { | ||
| 2685 | struct uart_8250_port *up = &serial8250_ports[i]; | ||
| 2686 | up->cur_iotype = 0xFF; | ||
| 2687 | } | ||
| 2688 | |||
| 2674 | serial8250_isa_init_ports(); | 2689 | serial8250_isa_init_ports(); |
| 2675 | 2690 | ||
| 2676 | for (i = 0; i < nr_uarts; i++) { | 2691 | for (i = 0; i < nr_uarts; i++) { |
diff --git a/drivers/serial/8250_gsc.c b/drivers/serial/8250_gsc.c index 418b4fe9a0a1..33149d982e82 100644 --- a/drivers/serial/8250_gsc.c +++ b/drivers/serial/8250_gsc.c | |||
| @@ -39,9 +39,9 @@ static int __init serial_init_chip(struct parisc_device *dev) | |||
| 39 | */ | 39 | */ |
| 40 | if (parisc_parent(dev)->id.hw_type != HPHW_IOA) | 40 | if (parisc_parent(dev)->id.hw_type != HPHW_IOA) |
| 41 | printk(KERN_INFO | 41 | printk(KERN_INFO |
| 42 | "Serial: device 0x%lx not configured.\n" | 42 | "Serial: device 0x%llx not configured.\n" |
| 43 | "Enable support for Wax, Lasi, Asp or Dino.\n", | 43 | "Enable support for Wax, Lasi, Asp or Dino.\n", |
| 44 | dev->hpa.start); | 44 | (unsigned long long)dev->hpa.start); |
| 45 | return -ENODEV; | 45 | return -ENODEV; |
| 46 | } | 46 | } |
| 47 | 47 | ||
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index 7f72f8ceaa6f..b3feb6198d57 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c | |||
| @@ -988,7 +988,7 @@ mpc52xx_console_setup(struct console *co, char *options) | |||
| 988 | pr_debug("mpc52xx_console_setup co=%p, co->index=%i, options=%s\n", | 988 | pr_debug("mpc52xx_console_setup co=%p, co->index=%i, options=%s\n", |
| 989 | co, co->index, options); | 989 | co, co->index, options); |
| 990 | 990 | ||
| 991 | if ((co->index < 0) || (co->index > MPC52xx_PSC_MAXNUM)) { | 991 | if ((co->index < 0) || (co->index >= MPC52xx_PSC_MAXNUM)) { |
| 992 | pr_debug("PSC%x out of range\n", co->index); | 992 | pr_debug("PSC%x out of range\n", co->index); |
| 993 | return -EINVAL; | 993 | return -EINVAL; |
| 994 | } | 994 | } |
diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile index 0716cdb44cd8..0a3dc5ece634 100644 --- a/drivers/usb/Makefile +++ b/drivers/usb/Makefile | |||
| @@ -11,7 +11,6 @@ obj-$(CONFIG_USB_MON) += mon/ | |||
| 11 | obj-$(CONFIG_PCI) += host/ | 11 | obj-$(CONFIG_PCI) += host/ |
| 12 | obj-$(CONFIG_USB_EHCI_HCD) += host/ | 12 | obj-$(CONFIG_USB_EHCI_HCD) += host/ |
| 13 | obj-$(CONFIG_USB_ISP116X_HCD) += host/ | 13 | obj-$(CONFIG_USB_ISP116X_HCD) += host/ |
| 14 | obj-$(CONFIG_USB_ISP1760_HCD) += host/ | ||
| 15 | obj-$(CONFIG_USB_OHCI_HCD) += host/ | 14 | obj-$(CONFIG_USB_OHCI_HCD) += host/ |
| 16 | obj-$(CONFIG_USB_UHCI_HCD) += host/ | 15 | obj-$(CONFIG_USB_UHCI_HCD) += host/ |
| 17 | obj-$(CONFIG_USB_FHCI_HCD) += host/ | 16 | obj-$(CONFIG_USB_FHCI_HCD) += host/ |
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 0a69c0977e3f..7a1164dd1d37 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
| @@ -1375,6 +1375,9 @@ static struct usb_device_id acm_ids[] = { | |||
| 1375 | { USB_DEVICE(0x0572, 0x1324), /* Conexant USB MODEM RD02-D400 */ | 1375 | { USB_DEVICE(0x0572, 0x1324), /* Conexant USB MODEM RD02-D400 */ |
| 1376 | .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ | 1376 | .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ |
| 1377 | }, | 1377 | }, |
| 1378 | { USB_DEVICE(0x0572, 0x1328), /* Shiro / Aztech USB MODEM UM-3100 */ | ||
| 1379 | .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ | ||
| 1380 | }, | ||
| 1378 | { USB_DEVICE(0x22b8, 0x6425), /* Motorola MOTOMAGX phones */ | 1381 | { USB_DEVICE(0x22b8, 0x6425), /* Motorola MOTOMAGX phones */ |
| 1379 | }, | 1382 | }, |
| 1380 | { USB_DEVICE(0x0572, 0x1329), /* Hummingbird huc56s (Conexant) */ | 1383 | { USB_DEVICE(0x0572, 0x1329), /* Hummingbird huc56s (Conexant) */ |
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index 563d57275448..05c913cc3658 100644 --- a/drivers/usb/gadget/atmel_usba_udc.c +++ b/drivers/usb/gadget/atmel_usba_udc.c | |||
| @@ -794,7 +794,8 @@ usba_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags) | |||
| 794 | if (ep->desc) { | 794 | if (ep->desc) { |
| 795 | list_add_tail(&req->queue, &ep->queue); | 795 | list_add_tail(&req->queue, &ep->queue); |
| 796 | 796 | ||
| 797 | if (ep->is_in || (ep_is_control(ep) | 797 | if ((!ep_is_control(ep) && ep->is_in) || |
| 798 | (ep_is_control(ep) | ||
| 798 | && (ep->state == DATA_STAGE_IN | 799 | && (ep->state == DATA_STAGE_IN |
| 799 | || ep->state == STATUS_STAGE_IN))) | 800 | || ep->state == STATUS_STAGE_IN))) |
| 800 | usba_ep_writel(ep, CTL_ENB, USBA_TX_PK_RDY); | 801 | usba_ep_writel(ep, CTL_ENB, USBA_TX_PK_RDY); |
| @@ -1940,7 +1941,7 @@ static int __init usba_udc_probe(struct platform_device *pdev) | |||
| 1940 | usba_writel(udc, CTRL, USBA_DISABLE_MASK); | 1941 | usba_writel(udc, CTRL, USBA_DISABLE_MASK); |
| 1941 | clk_disable(pclk); | 1942 | clk_disable(pclk); |
| 1942 | 1943 | ||
| 1943 | usba_ep = kmalloc(sizeof(struct usba_ep) * pdata->num_ep, | 1944 | usba_ep = kzalloc(sizeof(struct usba_ep) * pdata->num_ep, |
| 1944 | GFP_KERNEL); | 1945 | GFP_KERNEL); |
| 1945 | if (!usba_ep) | 1946 | if (!usba_ep) |
| 1946 | goto err_alloc_ep; | 1947 | goto err_alloc_ep; |
diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c index cd07ea3f0c63..15438469f21a 100644 --- a/drivers/usb/host/isp1760-hcd.c +++ b/drivers/usb/host/isp1760-hcd.c | |||
| @@ -1658,6 +1658,7 @@ static int isp1760_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, | |||
| 1658 | u32 reg_base, or_reg, skip_reg; | 1658 | u32 reg_base, or_reg, skip_reg; |
| 1659 | unsigned long flags; | 1659 | unsigned long flags; |
| 1660 | struct ptd ptd; | 1660 | struct ptd ptd; |
| 1661 | packet_enqueue *pe; | ||
| 1661 | 1662 | ||
| 1662 | switch (usb_pipetype(urb->pipe)) { | 1663 | switch (usb_pipetype(urb->pipe)) { |
| 1663 | case PIPE_ISOCHRONOUS: | 1664 | case PIPE_ISOCHRONOUS: |
| @@ -1669,6 +1670,7 @@ static int isp1760_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, | |||
| 1669 | reg_base = INT_REGS_OFFSET; | 1670 | reg_base = INT_REGS_OFFSET; |
| 1670 | or_reg = HC_INT_IRQ_MASK_OR_REG; | 1671 | or_reg = HC_INT_IRQ_MASK_OR_REG; |
| 1671 | skip_reg = HC_INT_PTD_SKIPMAP_REG; | 1672 | skip_reg = HC_INT_PTD_SKIPMAP_REG; |
| 1673 | pe = enqueue_an_INT_packet; | ||
| 1672 | break; | 1674 | break; |
| 1673 | 1675 | ||
| 1674 | default: | 1676 | default: |
| @@ -1676,6 +1678,7 @@ static int isp1760_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, | |||
| 1676 | reg_base = ATL_REGS_OFFSET; | 1678 | reg_base = ATL_REGS_OFFSET; |
| 1677 | or_reg = HC_ATL_IRQ_MASK_OR_REG; | 1679 | or_reg = HC_ATL_IRQ_MASK_OR_REG; |
| 1678 | skip_reg = HC_ATL_PTD_SKIPMAP_REG; | 1680 | skip_reg = HC_ATL_PTD_SKIPMAP_REG; |
| 1681 | pe = enqueue_an_ATL_packet; | ||
| 1679 | break; | 1682 | break; |
| 1680 | } | 1683 | } |
| 1681 | 1684 | ||
| @@ -1687,6 +1690,7 @@ static int isp1760_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, | |||
| 1687 | u32 skip_map; | 1690 | u32 skip_map; |
| 1688 | u32 or_map; | 1691 | u32 or_map; |
| 1689 | struct isp1760_qtd *qtd; | 1692 | struct isp1760_qtd *qtd; |
| 1693 | struct isp1760_qh *qh = ints->qh; | ||
| 1690 | 1694 | ||
| 1691 | skip_map = isp1760_readl(hcd->regs + skip_reg); | 1695 | skip_map = isp1760_readl(hcd->regs + skip_reg); |
| 1692 | skip_map |= 1 << i; | 1696 | skip_map |= 1 << i; |
| @@ -1699,8 +1703,7 @@ static int isp1760_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, | |||
| 1699 | priv_write_copy(priv, (u32 *)&ptd, hcd->regs + reg_base | 1703 | priv_write_copy(priv, (u32 *)&ptd, hcd->regs + reg_base |
| 1700 | + i * sizeof(ptd), sizeof(ptd)); | 1704 | + i * sizeof(ptd), sizeof(ptd)); |
| 1701 | qtd = ints->qtd; | 1705 | qtd = ints->qtd; |
| 1702 | 1706 | qtd = clean_up_qtdlist(qtd); | |
| 1703 | clean_up_qtdlist(qtd); | ||
| 1704 | 1707 | ||
| 1705 | free_mem(priv, ints->payload); | 1708 | free_mem(priv, ints->payload); |
| 1706 | 1709 | ||
| @@ -1711,7 +1714,24 @@ static int isp1760_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, | |||
| 1711 | ints->payload = 0; | 1714 | ints->payload = 0; |
| 1712 | 1715 | ||
| 1713 | isp1760_urb_done(priv, urb, status); | 1716 | isp1760_urb_done(priv, urb, status); |
| 1717 | if (qtd) | ||
| 1718 | pe(hcd, qh, qtd); | ||
| 1714 | break; | 1719 | break; |
| 1720 | |||
| 1721 | } else if (ints->qtd) { | ||
| 1722 | struct isp1760_qtd *qtd, *prev_qtd = ints->qtd; | ||
| 1723 | |||
| 1724 | for (qtd = ints->qtd->hw_next; qtd; qtd = qtd->hw_next) { | ||
| 1725 | if (qtd->urb == urb) { | ||
| 1726 | prev_qtd->hw_next = clean_up_qtdlist(qtd); | ||
| 1727 | isp1760_urb_done(priv, urb, status); | ||
| 1728 | break; | ||
| 1729 | } | ||
| 1730 | prev_qtd = qtd; | ||
| 1731 | } | ||
| 1732 | /* we found the urb before the end of the list */ | ||
| 1733 | if (qtd) | ||
| 1734 | break; | ||
| 1715 | } | 1735 | } |
| 1716 | ints++; | 1736 | ints++; |
| 1717 | } | 1737 | } |
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 0a566eea49c0..f331e2bde88a 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
| @@ -974,6 +974,7 @@ int usb_serial_probe(struct usb_interface *interface, | |||
| 974 | if (retval > 0) { | 974 | if (retval > 0) { |
| 975 | /* quietly accept this device, but don't bind to a | 975 | /* quietly accept this device, but don't bind to a |
| 976 | serial port as it's about to disappear */ | 976 | serial port as it's about to disappear */ |
| 977 | serial->num_ports = 0; | ||
| 977 | goto exit; | 978 | goto exit; |
| 978 | } | 979 | } |
| 979 | } | 980 | } |
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index 9a577a800db5..2fb63f6ea2f1 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c | |||
| @@ -29,14 +29,8 @@ | |||
| 29 | 29 | ||
| 30 | /* configurable parameters */ | 30 | /* configurable parameters */ |
| 31 | #define ATMEL_LCDC_CVAL_DEFAULT 0xc8 | 31 | #define ATMEL_LCDC_CVAL_DEFAULT 0xc8 |
| 32 | #define ATMEL_LCDC_DMA_BURST_LEN 8 | 32 | #define ATMEL_LCDC_DMA_BURST_LEN 8 /* words */ |
| 33 | 33 | #define ATMEL_LCDC_FIFO_SIZE 512 /* words */ | |
| 34 | #if defined(CONFIG_ARCH_AT91SAM9263) || defined(CONFIG_ARCH_AT91CAP9) || \ | ||
| 35 | defined(CONFIG_ARCH_AT91SAM9RL) | ||
| 36 | #define ATMEL_LCDC_FIFO_SIZE 2048 | ||
| 37 | #else | ||
| 38 | #define ATMEL_LCDC_FIFO_SIZE 512 | ||
| 39 | #endif | ||
| 40 | 34 | ||
| 41 | #if defined(CONFIG_ARCH_AT91) | 35 | #if defined(CONFIG_ARCH_AT91) |
| 42 | #define ATMEL_LCDFB_FBINFO_DEFAULT (FBINFO_DEFAULT \ | 36 | #define ATMEL_LCDFB_FBINFO_DEFAULT (FBINFO_DEFAULT \ |
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c index 5e9c6302433b..d3a568e6b169 100644 --- a/drivers/video/s3c-fb.c +++ b/drivers/video/s3c-fb.c | |||
| @@ -947,7 +947,8 @@ static int __devexit s3c_fb_remove(struct platform_device *pdev) | |||
| 947 | int win; | 947 | int win; |
| 948 | 948 | ||
| 949 | for (win = 0; win <= S3C_FB_MAX_WIN; win++) | 949 | for (win = 0; win <= S3C_FB_MAX_WIN; win++) |
| 950 | s3c_fb_release_win(sfb, sfb->windows[win]); | 950 | if (sfb->windows[win]) |
| 951 | s3c_fb_release_win(sfb, sfb->windows[win]); | ||
| 951 | 952 | ||
| 952 | iounmap(sfb->regs); | 953 | iounmap(sfb->regs); |
| 953 | 954 | ||
| @@ -985,11 +986,20 @@ static int s3c_fb_suspend(struct platform_device *pdev, pm_message_t state) | |||
| 985 | static int s3c_fb_resume(struct platform_device *pdev) | 986 | static int s3c_fb_resume(struct platform_device *pdev) |
| 986 | { | 987 | { |
| 987 | struct s3c_fb *sfb = platform_get_drvdata(pdev); | 988 | struct s3c_fb *sfb = platform_get_drvdata(pdev); |
| 989 | struct s3c_fb_platdata *pd = sfb->pdata; | ||
| 988 | struct s3c_fb_win *win; | 990 | struct s3c_fb_win *win; |
| 989 | int win_no; | 991 | int win_no; |
| 990 | 992 | ||
| 991 | clk_enable(sfb->bus_clk); | 993 | clk_enable(sfb->bus_clk); |
| 992 | 994 | ||
| 995 | /* setup registers */ | ||
| 996 | writel(pd->vidcon1, sfb->regs + VIDCON1); | ||
| 997 | |||
| 998 | /* zero all windows before we do anything */ | ||
| 999 | for (win_no = 0; win_no < S3C_FB_MAX_WIN; win_no++) | ||
| 1000 | s3c_fb_clear_win(sfb, win_no); | ||
| 1001 | |||
| 1002 | /* restore framebuffers */ | ||
| 993 | for (win_no = 0; win_no < S3C_FB_MAX_WIN; win_no++) { | 1003 | for (win_no = 0; win_no < S3C_FB_MAX_WIN; win_no++) { |
| 994 | win = sfb->windows[win_no]; | 1004 | win = sfb->windows[win_no]; |
| 995 | if (!win) | 1005 | if (!win) |
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index 5cebf0b37798..697f6b5f1313 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c | |||
| @@ -41,6 +41,7 @@ | |||
| 41 | #include <asm/uaccess.h> | 41 | #include <asm/uaccess.h> |
| 42 | #include <asm/unaligned.h> | 42 | #include <asm/unaligned.h> |
| 43 | #include <asm/cacheflush.h> | 43 | #include <asm/cacheflush.h> |
| 44 | #include <asm/page.h> | ||
| 44 | 45 | ||
| 45 | /****************************************************************************/ | 46 | /****************************************************************************/ |
| 46 | 47 | ||
| @@ -54,6 +55,18 @@ | |||
| 54 | #define DBG_FLT(a...) | 55 | #define DBG_FLT(a...) |
| 55 | #endif | 56 | #endif |
| 56 | 57 | ||
| 58 | /* | ||
| 59 | * User data (stack, data section and bss) needs to be aligned | ||
| 60 | * for the same reasons as SLAB memory is, and to the same amount. | ||
| 61 | * Avoid duplicating architecture specific code by using the same | ||
| 62 | * macro as with SLAB allocation: | ||
| 63 | */ | ||
| 64 | #ifdef ARCH_SLAB_MINALIGN | ||
| 65 | #define FLAT_DATA_ALIGN (ARCH_SLAB_MINALIGN) | ||
| 66 | #else | ||
| 67 | #define FLAT_DATA_ALIGN (sizeof(void *)) | ||
| 68 | #endif | ||
| 69 | |||
| 57 | #define RELOC_FAILED 0xff00ff01 /* Relocation incorrect somewhere */ | 70 | #define RELOC_FAILED 0xff00ff01 /* Relocation incorrect somewhere */ |
| 58 | #define UNLOADED_LIB 0x7ff000ff /* Placeholder for unused library */ | 71 | #define UNLOADED_LIB 0x7ff000ff /* Placeholder for unused library */ |
| 59 | 72 | ||
| @@ -114,20 +127,18 @@ static unsigned long create_flat_tables( | |||
| 114 | int envc = bprm->envc; | 127 | int envc = bprm->envc; |
| 115 | char uninitialized_var(dummy); | 128 | char uninitialized_var(dummy); |
| 116 | 129 | ||
| 117 | sp = (unsigned long *) ((-(unsigned long)sizeof(char *))&(unsigned long) p); | 130 | sp = (unsigned long *)p; |
| 131 | sp -= (envc + argc + 2) + 1 + (flat_argvp_envp_on_stack() ? 2 : 0); | ||
| 132 | sp = (unsigned long *) ((unsigned long)sp & -FLAT_DATA_ALIGN); | ||
| 133 | argv = sp + 1 + (flat_argvp_envp_on_stack() ? 2 : 0); | ||
| 134 | envp = argv + (argc + 1); | ||
| 118 | 135 | ||
| 119 | sp -= envc+1; | ||
| 120 | envp = sp; | ||
| 121 | sp -= argc+1; | ||
| 122 | argv = sp; | ||
| 123 | |||
| 124 | flat_stack_align(sp); | ||
| 125 | if (flat_argvp_envp_on_stack()) { | 136 | if (flat_argvp_envp_on_stack()) { |
| 126 | --sp; put_user((unsigned long) envp, sp); | 137 | put_user((unsigned long) envp, sp + 2); |
| 127 | --sp; put_user((unsigned long) argv, sp); | 138 | put_user((unsigned long) argv, sp + 1); |
| 128 | } | 139 | } |
| 129 | 140 | ||
| 130 | put_user(argc,--sp); | 141 | put_user(argc, sp); |
| 131 | current->mm->arg_start = (unsigned long) p; | 142 | current->mm->arg_start = (unsigned long) p; |
| 132 | while (argc-->0) { | 143 | while (argc-->0) { |
| 133 | put_user((unsigned long) p, argv++); | 144 | put_user((unsigned long) p, argv++); |
| @@ -558,7 +569,9 @@ static int load_flat_file(struct linux_binprm * bprm, | |||
| 558 | ret = realdatastart; | 569 | ret = realdatastart; |
| 559 | goto err; | 570 | goto err; |
| 560 | } | 571 | } |
| 561 | datapos = realdatastart + MAX_SHARED_LIBS * sizeof(unsigned long); | 572 | datapos = ALIGN(realdatastart + |
| 573 | MAX_SHARED_LIBS * sizeof(unsigned long), | ||
| 574 | FLAT_DATA_ALIGN); | ||
| 562 | 575 | ||
| 563 | DBG_FLT("BINFMT_FLAT: Allocated data+bss+stack (%d bytes): %x\n", | 576 | DBG_FLT("BINFMT_FLAT: Allocated data+bss+stack (%d bytes): %x\n", |
| 564 | (int)(data_len + bss_len + stack_len), (int)datapos); | 577 | (int)(data_len + bss_len + stack_len), (int)datapos); |
| @@ -604,9 +617,12 @@ static int load_flat_file(struct linux_binprm * bprm, | |||
| 604 | } | 617 | } |
| 605 | 618 | ||
| 606 | realdatastart = textpos + ntohl(hdr->data_start); | 619 | realdatastart = textpos + ntohl(hdr->data_start); |
| 607 | datapos = realdatastart + MAX_SHARED_LIBS * sizeof(unsigned long); | 620 | datapos = ALIGN(realdatastart + |
| 608 | reloc = (unsigned long *) (textpos + ntohl(hdr->reloc_start) + | 621 | MAX_SHARED_LIBS * sizeof(unsigned long), |
| 609 | MAX_SHARED_LIBS * sizeof(unsigned long)); | 622 | FLAT_DATA_ALIGN); |
| 623 | |||
| 624 | reloc = (unsigned long *) | ||
| 625 | (datapos + (ntohl(hdr->reloc_start) - text_len)); | ||
| 610 | memp = textpos; | 626 | memp = textpos; |
| 611 | memp_size = len; | 627 | memp_size = len; |
| 612 | #ifdef CONFIG_BINFMT_ZFLAT | 628 | #ifdef CONFIG_BINFMT_ZFLAT |
| @@ -854,7 +870,7 @@ static int load_flat_binary(struct linux_binprm * bprm, struct pt_regs * regs) | |||
| 854 | stack_len = TOP_OF_ARGS - bprm->p; /* the strings */ | 870 | stack_len = TOP_OF_ARGS - bprm->p; /* the strings */ |
| 855 | stack_len += (bprm->argc + 1) * sizeof(char *); /* the argv array */ | 871 | stack_len += (bprm->argc + 1) * sizeof(char *); /* the argv array */ |
| 856 | stack_len += (bprm->envc + 1) * sizeof(char *); /* the envp array */ | 872 | stack_len += (bprm->envc + 1) * sizeof(char *); /* the envp array */ |
| 857 | 873 | stack_len += FLAT_DATA_ALIGN - 1; /* reserve for upcoming alignment */ | |
| 858 | 874 | ||
| 859 | res = load_flat_file(bprm, &libinfo, 0, &stack_len); | 875 | res = load_flat_file(bprm, &libinfo, 0, &stack_len); |
| 860 | if (res > (unsigned long)-4096) | 876 | if (res > (unsigned long)-4096) |
diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c index c32b4a1ad6cf..a0244740b75a 100644 --- a/fs/jffs2/erase.c +++ b/fs/jffs2/erase.c | |||
| @@ -480,13 +480,6 @@ static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseb | |||
| 480 | return; | 480 | return; |
| 481 | 481 | ||
| 482 | filebad: | 482 | filebad: |
| 483 | mutex_lock(&c->erase_free_sem); | ||
| 484 | spin_lock(&c->erase_completion_lock); | ||
| 485 | /* Stick it on a list (any list) so erase_failed can take it | ||
| 486 | right off again. Silly, but shouldn't happen often. */ | ||
| 487 | list_move(&jeb->list, &c->erasing_list); | ||
| 488 | spin_unlock(&c->erase_completion_lock); | ||
| 489 | mutex_unlock(&c->erase_free_sem); | ||
| 490 | jffs2_erase_failed(c, jeb, bad_offset); | 483 | jffs2_erase_failed(c, jeb, bad_offset); |
| 491 | return; | 484 | return; |
| 492 | 485 | ||
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 6c68ffd6b4bb..b660435978d2 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
| @@ -1015,6 +1015,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, | |||
| 1015 | host_err = vfs_writev(file, (struct iovec __user *)vec, vlen, &offset); | 1015 | host_err = vfs_writev(file, (struct iovec __user *)vec, vlen, &offset); |
| 1016 | set_fs(oldfs); | 1016 | set_fs(oldfs); |
| 1017 | if (host_err >= 0) { | 1017 | if (host_err >= 0) { |
| 1018 | *cnt = host_err; | ||
| 1018 | nfsdstats.io_write += host_err; | 1019 | nfsdstats.io_write += host_err; |
| 1019 | fsnotify_modify(file->f_path.dentry); | 1020 | fsnotify_modify(file->f_path.dentry); |
| 1020 | } | 1021 | } |
| @@ -1060,10 +1061,9 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, | |||
| 1060 | } | 1061 | } |
| 1061 | 1062 | ||
| 1062 | dprintk("nfsd: write complete host_err=%d\n", host_err); | 1063 | dprintk("nfsd: write complete host_err=%d\n", host_err); |
| 1063 | if (host_err >= 0) { | 1064 | if (host_err >= 0) |
| 1064 | err = 0; | 1065 | err = 0; |
| 1065 | *cnt = host_err; | 1066 | else |
| 1066 | } else | ||
| 1067 | err = nfserrno(host_err); | 1067 | err = nfserrno(host_err); |
| 1068 | out: | 1068 | out: |
| 1069 | return err; | 1069 | return err; |
diff --git a/fs/proc/base.c b/fs/proc/base.c index fb45615943c2..3326bbf9ab95 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
| @@ -1956,7 +1956,7 @@ static struct dentry *proc_pident_instantiate(struct inode *dir, | |||
| 1956 | const struct pid_entry *p = ptr; | 1956 | const struct pid_entry *p = ptr; |
| 1957 | struct inode *inode; | 1957 | struct inode *inode; |
| 1958 | struct proc_inode *ei; | 1958 | struct proc_inode *ei; |
| 1959 | struct dentry *error = ERR_PTR(-EINVAL); | 1959 | struct dentry *error = ERR_PTR(-ENOENT); |
| 1960 | 1960 | ||
| 1961 | inode = proc_pid_make_inode(dir->i_sb, task); | 1961 | inode = proc_pid_make_inode(dir->i_sb, task); |
| 1962 | if (!inode) | 1962 | if (!inode) |
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index b1606e07b7a3..561a9c050cef 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c | |||
| @@ -723,7 +723,7 @@ int sysfs_schedule_callback(struct kobject *kobj, void (*func)(void *), | |||
| 723 | mutex_unlock(&sysfs_workq_mutex); | 723 | mutex_unlock(&sysfs_workq_mutex); |
| 724 | 724 | ||
| 725 | if (sysfs_workqueue == NULL) { | 725 | if (sysfs_workqueue == NULL) { |
| 726 | sysfs_workqueue = create_workqueue("sysfsd"); | 726 | sysfs_workqueue = create_singlethread_workqueue("sysfsd"); |
| 727 | if (sysfs_workqueue == NULL) { | 727 | if (sysfs_workqueue == NULL) { |
| 728 | module_put(owner); | 728 | module_put(owner); |
| 729 | return -ENOMEM; | 729 | return -ENOMEM; |
diff --git a/include/linux/cred.h b/include/linux/cred.h index 3282ee4318e7..4fa999696310 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #define _LINUX_CRED_H | 13 | #define _LINUX_CRED_H |
| 14 | 14 | ||
| 15 | #include <linux/capability.h> | 15 | #include <linux/capability.h> |
| 16 | #include <linux/init.h> | ||
| 16 | #include <linux/key.h> | 17 | #include <linux/key.h> |
| 17 | #include <asm/atomic.h> | 18 | #include <asm/atomic.h> |
| 18 | 19 | ||
diff --git a/include/linux/input.h b/include/linux/input.h index 0e6ff5de3588..6fed4f6a9c9e 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -656,6 +656,7 @@ struct input_absinfo { | |||
| 656 | #define ABS_MT_POSITION_Y 0x36 /* Center Y ellipse position */ | 656 | #define ABS_MT_POSITION_Y 0x36 /* Center Y ellipse position */ |
| 657 | #define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */ | 657 | #define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */ |
| 658 | #define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ | 658 | #define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ |
| 659 | #define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ | ||
| 659 | 660 | ||
| 660 | #define ABS_MAX 0x3f | 661 | #define ABS_MAX 0x3f |
| 661 | #define ABS_CNT (ABS_MAX+1) | 662 | #define ABS_CNT (ABS_MAX+1) |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 62d81435347a..d476aad3ff57 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
| @@ -437,6 +437,11 @@ static inline int mem_cgroup_cache_charge_swapin(struct page *page, | |||
| 437 | return 0; | 437 | return 0; |
| 438 | } | 438 | } |
| 439 | 439 | ||
| 440 | static inline void | ||
| 441 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) | ||
| 442 | { | ||
| 443 | } | ||
| 444 | |||
| 440 | #endif /* CONFIG_SWAP */ | 445 | #endif /* CONFIG_SWAP */ |
| 441 | #endif /* __KERNEL__*/ | 446 | #endif /* __KERNEL__*/ |
| 442 | #endif /* _LINUX_SWAP_H */ | 447 | #endif /* _LINUX_SWAP_H */ |
diff --git a/mm/filemap.c b/mm/filemap.c index 379ff0bcbf6e..1b60f30cebfa 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
| @@ -121,7 +121,6 @@ void __remove_from_page_cache(struct page *page) | |||
| 121 | mapping->nrpages--; | 121 | mapping->nrpages--; |
| 122 | __dec_zone_page_state(page, NR_FILE_PAGES); | 122 | __dec_zone_page_state(page, NR_FILE_PAGES); |
| 123 | BUG_ON(page_mapped(page)); | 123 | BUG_ON(page_mapped(page)); |
| 124 | mem_cgroup_uncharge_cache_page(page); | ||
| 125 | 124 | ||
| 126 | /* | 125 | /* |
| 127 | * Some filesystems seem to re-dirty the page even after | 126 | * Some filesystems seem to re-dirty the page even after |
| @@ -145,6 +144,7 @@ void remove_from_page_cache(struct page *page) | |||
| 145 | spin_lock_irq(&mapping->tree_lock); | 144 | spin_lock_irq(&mapping->tree_lock); |
| 146 | __remove_from_page_cache(page); | 145 | __remove_from_page_cache(page); |
| 147 | spin_unlock_irq(&mapping->tree_lock); | 146 | spin_unlock_irq(&mapping->tree_lock); |
| 147 | mem_cgroup_uncharge_cache_page(page); | ||
| 148 | } | 148 | } |
| 149 | 149 | ||
| 150 | static int sync_page(void *word) | 150 | static int sync_page(void *word) |
| @@ -476,13 +476,13 @@ int add_to_page_cache_locked(struct page *page, struct address_space *mapping, | |||
| 476 | if (likely(!error)) { | 476 | if (likely(!error)) { |
| 477 | mapping->nrpages++; | 477 | mapping->nrpages++; |
| 478 | __inc_zone_page_state(page, NR_FILE_PAGES); | 478 | __inc_zone_page_state(page, NR_FILE_PAGES); |
| 479 | spin_unlock_irq(&mapping->tree_lock); | ||
| 479 | } else { | 480 | } else { |
| 480 | page->mapping = NULL; | 481 | page->mapping = NULL; |
| 482 | spin_unlock_irq(&mapping->tree_lock); | ||
| 481 | mem_cgroup_uncharge_cache_page(page); | 483 | mem_cgroup_uncharge_cache_page(page); |
| 482 | page_cache_release(page); | 484 | page_cache_release(page); |
| 483 | } | 485 | } |
| 484 | |||
| 485 | spin_unlock_irq(&mapping->tree_lock); | ||
| 486 | radix_tree_preload_end(); | 486 | radix_tree_preload_end(); |
| 487 | } else | 487 | } else |
| 488 | mem_cgroup_uncharge_cache_page(page); | 488 | mem_cgroup_uncharge_cache_page(page); |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 28c655ba9353..e83ad2c9228c 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
| @@ -316,7 +316,7 @@ static void resv_map_release(struct kref *ref) | |||
| 316 | static struct resv_map *vma_resv_map(struct vm_area_struct *vma) | 316 | static struct resv_map *vma_resv_map(struct vm_area_struct *vma) |
| 317 | { | 317 | { |
| 318 | VM_BUG_ON(!is_vm_hugetlb_page(vma)); | 318 | VM_BUG_ON(!is_vm_hugetlb_page(vma)); |
| 319 | if (!(vma->vm_flags & VM_SHARED)) | 319 | if (!(vma->vm_flags & VM_MAYSHARE)) |
| 320 | return (struct resv_map *)(get_vma_private_data(vma) & | 320 | return (struct resv_map *)(get_vma_private_data(vma) & |
| 321 | ~HPAGE_RESV_MASK); | 321 | ~HPAGE_RESV_MASK); |
| 322 | return NULL; | 322 | return NULL; |
| @@ -325,7 +325,7 @@ static struct resv_map *vma_resv_map(struct vm_area_struct *vma) | |||
| 325 | static void set_vma_resv_map(struct vm_area_struct *vma, struct resv_map *map) | 325 | static void set_vma_resv_map(struct vm_area_struct *vma, struct resv_map *map) |
| 326 | { | 326 | { |
| 327 | VM_BUG_ON(!is_vm_hugetlb_page(vma)); | 327 | VM_BUG_ON(!is_vm_hugetlb_page(vma)); |
| 328 | VM_BUG_ON(vma->vm_flags & VM_SHARED); | 328 | VM_BUG_ON(vma->vm_flags & VM_MAYSHARE); |
| 329 | 329 | ||
| 330 | set_vma_private_data(vma, (get_vma_private_data(vma) & | 330 | set_vma_private_data(vma, (get_vma_private_data(vma) & |
| 331 | HPAGE_RESV_MASK) | (unsigned long)map); | 331 | HPAGE_RESV_MASK) | (unsigned long)map); |
| @@ -334,7 +334,7 @@ static void set_vma_resv_map(struct vm_area_struct *vma, struct resv_map *map) | |||
| 334 | static void set_vma_resv_flags(struct vm_area_struct *vma, unsigned long flags) | 334 | static void set_vma_resv_flags(struct vm_area_struct *vma, unsigned long flags) |
| 335 | { | 335 | { |
| 336 | VM_BUG_ON(!is_vm_hugetlb_page(vma)); | 336 | VM_BUG_ON(!is_vm_hugetlb_page(vma)); |
| 337 | VM_BUG_ON(vma->vm_flags & VM_SHARED); | 337 | VM_BUG_ON(vma->vm_flags & VM_MAYSHARE); |
| 338 | 338 | ||
| 339 | set_vma_private_data(vma, get_vma_private_data(vma) | flags); | 339 | set_vma_private_data(vma, get_vma_private_data(vma) | flags); |
| 340 | } | 340 | } |
| @@ -353,7 +353,7 @@ static void decrement_hugepage_resv_vma(struct hstate *h, | |||
| 353 | if (vma->vm_flags & VM_NORESERVE) | 353 | if (vma->vm_flags & VM_NORESERVE) |
| 354 | return; | 354 | return; |
| 355 | 355 | ||
| 356 | if (vma->vm_flags & VM_SHARED) { | 356 | if (vma->vm_flags & VM_MAYSHARE) { |
| 357 | /* Shared mappings always use reserves */ | 357 | /* Shared mappings always use reserves */ |
| 358 | h->resv_huge_pages--; | 358 | h->resv_huge_pages--; |
| 359 | } else if (is_vma_resv_set(vma, HPAGE_RESV_OWNER)) { | 359 | } else if (is_vma_resv_set(vma, HPAGE_RESV_OWNER)) { |
| @@ -369,14 +369,14 @@ static void decrement_hugepage_resv_vma(struct hstate *h, | |||
| 369 | void reset_vma_resv_huge_pages(struct vm_area_struct *vma) | 369 | void reset_vma_resv_huge_pages(struct vm_area_struct *vma) |
| 370 | { | 370 | { |
| 371 | VM_BUG_ON(!is_vm_hugetlb_page(vma)); | 371 | VM_BUG_ON(!is_vm_hugetlb_page(vma)); |
| 372 | if (!(vma->vm_flags & VM_SHARED)) | 372 | if (!(vma->vm_flags & VM_MAYSHARE)) |
| 373 | vma->vm_private_data = (void *)0; | 373 | vma->vm_private_data = (void *)0; |
| 374 | } | 374 | } |
| 375 | 375 | ||
| 376 | /* Returns true if the VMA has associated reserve pages */ | 376 | /* Returns true if the VMA has associated reserve pages */ |
| 377 | static int vma_has_reserves(struct vm_area_struct *vma) | 377 | static int vma_has_reserves(struct vm_area_struct *vma) |
| 378 | { | 378 | { |
| 379 | if (vma->vm_flags & VM_SHARED) | 379 | if (vma->vm_flags & VM_MAYSHARE) |
| 380 | return 1; | 380 | return 1; |
| 381 | if (is_vma_resv_set(vma, HPAGE_RESV_OWNER)) | 381 | if (is_vma_resv_set(vma, HPAGE_RESV_OWNER)) |
| 382 | return 1; | 382 | return 1; |
| @@ -924,7 +924,7 @@ static long vma_needs_reservation(struct hstate *h, | |||
| 924 | struct address_space *mapping = vma->vm_file->f_mapping; | 924 | struct address_space *mapping = vma->vm_file->f_mapping; |
| 925 | struct inode *inode = mapping->host; | 925 | struct inode *inode = mapping->host; |
| 926 | 926 | ||
| 927 | if (vma->vm_flags & VM_SHARED) { | 927 | if (vma->vm_flags & VM_MAYSHARE) { |
| 928 | pgoff_t idx = vma_hugecache_offset(h, vma, addr); | 928 | pgoff_t idx = vma_hugecache_offset(h, vma, addr); |
| 929 | return region_chg(&inode->i_mapping->private_list, | 929 | return region_chg(&inode->i_mapping->private_list, |
| 930 | idx, idx + 1); | 930 | idx, idx + 1); |
| @@ -949,7 +949,7 @@ static void vma_commit_reservation(struct hstate *h, | |||
| 949 | struct address_space *mapping = vma->vm_file->f_mapping; | 949 | struct address_space *mapping = vma->vm_file->f_mapping; |
| 950 | struct inode *inode = mapping->host; | 950 | struct inode *inode = mapping->host; |
| 951 | 951 | ||
| 952 | if (vma->vm_flags & VM_SHARED) { | 952 | if (vma->vm_flags & VM_MAYSHARE) { |
| 953 | pgoff_t idx = vma_hugecache_offset(h, vma, addr); | 953 | pgoff_t idx = vma_hugecache_offset(h, vma, addr); |
| 954 | region_add(&inode->i_mapping->private_list, idx, idx + 1); | 954 | region_add(&inode->i_mapping->private_list, idx, idx + 1); |
| 955 | 955 | ||
| @@ -1893,7 +1893,7 @@ retry_avoidcopy: | |||
| 1893 | * at the time of fork() could consume its reserves on COW instead | 1893 | * at the time of fork() could consume its reserves on COW instead |
| 1894 | * of the full address range. | 1894 | * of the full address range. |
| 1895 | */ | 1895 | */ |
| 1896 | if (!(vma->vm_flags & VM_SHARED) && | 1896 | if (!(vma->vm_flags & VM_MAYSHARE) && |
| 1897 | is_vma_resv_set(vma, HPAGE_RESV_OWNER) && | 1897 | is_vma_resv_set(vma, HPAGE_RESV_OWNER) && |
| 1898 | old_page != pagecache_page) | 1898 | old_page != pagecache_page) |
| 1899 | outside_reserve = 1; | 1899 | outside_reserve = 1; |
| @@ -2000,7 +2000,7 @@ retry: | |||
| 2000 | clear_huge_page(page, address, huge_page_size(h)); | 2000 | clear_huge_page(page, address, huge_page_size(h)); |
| 2001 | __SetPageUptodate(page); | 2001 | __SetPageUptodate(page); |
| 2002 | 2002 | ||
| 2003 | if (vma->vm_flags & VM_SHARED) { | 2003 | if (vma->vm_flags & VM_MAYSHARE) { |
| 2004 | int err; | 2004 | int err; |
| 2005 | struct inode *inode = mapping->host; | 2005 | struct inode *inode = mapping->host; |
| 2006 | 2006 | ||
| @@ -2104,7 +2104,7 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, | |||
| 2104 | goto out_mutex; | 2104 | goto out_mutex; |
| 2105 | } | 2105 | } |
| 2106 | 2106 | ||
| 2107 | if (!(vma->vm_flags & VM_SHARED)) | 2107 | if (!(vma->vm_flags & VM_MAYSHARE)) |
| 2108 | pagecache_page = hugetlbfs_pagecache_page(h, | 2108 | pagecache_page = hugetlbfs_pagecache_page(h, |
| 2109 | vma, address); | 2109 | vma, address); |
| 2110 | } | 2110 | } |
| @@ -2289,7 +2289,7 @@ int hugetlb_reserve_pages(struct inode *inode, | |||
| 2289 | * to reserve the full area even if read-only as mprotect() may be | 2289 | * to reserve the full area even if read-only as mprotect() may be |
| 2290 | * called to make the mapping read-write. Assume !vma is a shm mapping | 2290 | * called to make the mapping read-write. Assume !vma is a shm mapping |
| 2291 | */ | 2291 | */ |
| 2292 | if (!vma || vma->vm_flags & VM_SHARED) | 2292 | if (!vma || vma->vm_flags & VM_MAYSHARE) |
| 2293 | chg = region_chg(&inode->i_mapping->private_list, from, to); | 2293 | chg = region_chg(&inode->i_mapping->private_list, from, to); |
| 2294 | else { | 2294 | else { |
| 2295 | struct resv_map *resv_map = resv_map_alloc(); | 2295 | struct resv_map *resv_map = resv_map_alloc(); |
| @@ -2330,7 +2330,7 @@ int hugetlb_reserve_pages(struct inode *inode, | |||
| 2330 | * consumed reservations are stored in the map. Hence, nothing | 2330 | * consumed reservations are stored in the map. Hence, nothing |
| 2331 | * else has to be done for private mappings here | 2331 | * else has to be done for private mappings here |
| 2332 | */ | 2332 | */ |
| 2333 | if (!vma || vma->vm_flags & VM_SHARED) | 2333 | if (!vma || vma->vm_flags & VM_MAYSHARE) |
| 2334 | region_add(&inode->i_mapping->private_list, from, to); | 2334 | region_add(&inode->i_mapping->private_list, from, to); |
| 2335 | return 0; | 2335 | return 0; |
| 2336 | } | 2336 | } |
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 01c2d8f14685..78eb8552818b 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
| @@ -314,14 +314,6 @@ static struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm) | |||
| 314 | return mem; | 314 | return mem; |
| 315 | } | 315 | } |
| 316 | 316 | ||
| 317 | static bool mem_cgroup_is_obsolete(struct mem_cgroup *mem) | ||
| 318 | { | ||
| 319 | if (!mem) | ||
| 320 | return true; | ||
| 321 | return css_is_removed(&mem->css); | ||
| 322 | } | ||
| 323 | |||
| 324 | |||
| 325 | /* | 317 | /* |
| 326 | * Call callback function against all cgroup under hierarchy tree. | 318 | * Call callback function against all cgroup under hierarchy tree. |
| 327 | */ | 319 | */ |
| @@ -932,7 +924,7 @@ static int __mem_cgroup_try_charge(struct mm_struct *mm, | |||
| 932 | if (unlikely(!mem)) | 924 | if (unlikely(!mem)) |
| 933 | return 0; | 925 | return 0; |
| 934 | 926 | ||
| 935 | VM_BUG_ON(!mem || mem_cgroup_is_obsolete(mem)); | 927 | VM_BUG_ON(css_is_removed(&mem->css)); |
| 936 | 928 | ||
| 937 | while (1) { | 929 | while (1) { |
| 938 | int ret; | 930 | int ret; |
| @@ -1488,8 +1480,9 @@ void mem_cgroup_uncharge_cache_page(struct page *page) | |||
| 1488 | __mem_cgroup_uncharge_common(page, MEM_CGROUP_CHARGE_TYPE_CACHE); | 1480 | __mem_cgroup_uncharge_common(page, MEM_CGROUP_CHARGE_TYPE_CACHE); |
| 1489 | } | 1481 | } |
| 1490 | 1482 | ||
| 1483 | #ifdef CONFIG_SWAP | ||
| 1491 | /* | 1484 | /* |
| 1492 | * called from __delete_from_swap_cache() and drop "page" account. | 1485 | * called after __delete_from_swap_cache() and drop "page" account. |
| 1493 | * memcg information is recorded to swap_cgroup of "ent" | 1486 | * memcg information is recorded to swap_cgroup of "ent" |
| 1494 | */ | 1487 | */ |
| 1495 | void mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) | 1488 | void mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) |
| @@ -1506,6 +1499,7 @@ void mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) | |||
| 1506 | if (memcg) | 1499 | if (memcg) |
| 1507 | css_put(&memcg->css); | 1500 | css_put(&memcg->css); |
| 1508 | } | 1501 | } |
| 1502 | #endif | ||
| 1509 | 1503 | ||
| 1510 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP | 1504 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP |
| 1511 | /* | 1505 | /* |
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 92bcf1db16b2..a7b2460e922b 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c | |||
| @@ -284,22 +284,28 @@ static void dump_tasks(const struct mem_cgroup *mem) | |||
| 284 | printk(KERN_INFO "[ pid ] uid tgid total_vm rss cpu oom_adj " | 284 | printk(KERN_INFO "[ pid ] uid tgid total_vm rss cpu oom_adj " |
| 285 | "name\n"); | 285 | "name\n"); |
| 286 | do_each_thread(g, p) { | 286 | do_each_thread(g, p) { |
| 287 | /* | 287 | struct mm_struct *mm; |
| 288 | * total_vm and rss sizes do not exist for tasks with a | 288 | |
| 289 | * detached mm so there's no need to report them. | ||
| 290 | */ | ||
| 291 | if (!p->mm) | ||
| 292 | continue; | ||
| 293 | if (mem && !task_in_mem_cgroup(p, mem)) | 289 | if (mem && !task_in_mem_cgroup(p, mem)) |
| 294 | continue; | 290 | continue; |
| 295 | if (!thread_group_leader(p)) | 291 | if (!thread_group_leader(p)) |
| 296 | continue; | 292 | continue; |
| 297 | 293 | ||
| 298 | task_lock(p); | 294 | task_lock(p); |
| 295 | mm = p->mm; | ||
| 296 | if (!mm) { | ||
| 297 | /* | ||
| 298 | * total_vm and rss sizes do not exist for tasks with no | ||
| 299 | * mm so there's no need to report them; they can't be | ||
| 300 | * oom killed anyway. | ||
| 301 | */ | ||
| 302 | task_unlock(p); | ||
| 303 | continue; | ||
| 304 | } | ||
| 299 | printk(KERN_INFO "[%5d] %5d %5d %8lu %8lu %3d %3d %s\n", | 305 | printk(KERN_INFO "[%5d] %5d %5d %8lu %8lu %3d %3d %s\n", |
| 300 | p->pid, __task_cred(p)->uid, p->tgid, | 306 | p->pid, __task_cred(p)->uid, p->tgid, mm->total_vm, |
| 301 | p->mm->total_vm, get_mm_rss(p->mm), (int)task_cpu(p), | 307 | get_mm_rss(mm), (int)task_cpu(p), p->oomkilladj, |
| 302 | p->oomkilladj, p->comm); | 308 | p->comm); |
| 303 | task_unlock(p); | 309 | task_unlock(p); |
| 304 | } while_each_thread(g, p); | 310 | } while_each_thread(g, p); |
| 305 | } | 311 | } |
diff --git a/mm/swap_state.c b/mm/swap_state.c index 3ecea98ecb45..1416e7e9e02d 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c | |||
| @@ -109,8 +109,6 @@ int add_to_swap_cache(struct page *page, swp_entry_t entry, gfp_t gfp_mask) | |||
| 109 | */ | 109 | */ |
| 110 | void __delete_from_swap_cache(struct page *page) | 110 | void __delete_from_swap_cache(struct page *page) |
| 111 | { | 111 | { |
| 112 | swp_entry_t ent = {.val = page_private(page)}; | ||
| 113 | |||
| 114 | VM_BUG_ON(!PageLocked(page)); | 112 | VM_BUG_ON(!PageLocked(page)); |
| 115 | VM_BUG_ON(!PageSwapCache(page)); | 113 | VM_BUG_ON(!PageSwapCache(page)); |
| 116 | VM_BUG_ON(PageWriteback(page)); | 114 | VM_BUG_ON(PageWriteback(page)); |
| @@ -121,7 +119,6 @@ void __delete_from_swap_cache(struct page *page) | |||
| 121 | total_swapcache_pages--; | 119 | total_swapcache_pages--; |
| 122 | __dec_zone_page_state(page, NR_FILE_PAGES); | 120 | __dec_zone_page_state(page, NR_FILE_PAGES); |
| 123 | INC_CACHE_INFO(del_total); | 121 | INC_CACHE_INFO(del_total); |
| 124 | mem_cgroup_uncharge_swapcache(page, ent); | ||
| 125 | } | 122 | } |
| 126 | 123 | ||
| 127 | /** | 124 | /** |
| @@ -191,6 +188,7 @@ void delete_from_swap_cache(struct page *page) | |||
| 191 | __delete_from_swap_cache(page); | 188 | __delete_from_swap_cache(page); |
| 192 | spin_unlock_irq(&swapper_space.tree_lock); | 189 | spin_unlock_irq(&swapper_space.tree_lock); |
| 193 | 190 | ||
| 191 | mem_cgroup_uncharge_swapcache(page, entry); | ||
| 194 | swap_free(entry); | 192 | swap_free(entry); |
| 195 | page_cache_release(page); | 193 | page_cache_release(page); |
| 196 | } | 194 | } |
diff --git a/mm/truncate.c b/mm/truncate.c index 55206fab7b99..12e1579f9165 100644 --- a/mm/truncate.c +++ b/mm/truncate.c | |||
| @@ -359,6 +359,7 @@ invalidate_complete_page2(struct address_space *mapping, struct page *page) | |||
| 359 | BUG_ON(page_has_private(page)); | 359 | BUG_ON(page_has_private(page)); |
| 360 | __remove_from_page_cache(page); | 360 | __remove_from_page_cache(page); |
| 361 | spin_unlock_irq(&mapping->tree_lock); | 361 | spin_unlock_irq(&mapping->tree_lock); |
| 362 | mem_cgroup_uncharge_cache_page(page); | ||
| 362 | page_cache_release(page); /* pagecache ref */ | 363 | page_cache_release(page); /* pagecache ref */ |
| 363 | return 1; | 364 | return 1; |
| 364 | failed: | 365 | failed: |
diff --git a/mm/vmscan.c b/mm/vmscan.c index 5fa3eda1f03f..d254306562cd 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
| @@ -470,10 +470,12 @@ static int __remove_mapping(struct address_space *mapping, struct page *page) | |||
| 470 | swp_entry_t swap = { .val = page_private(page) }; | 470 | swp_entry_t swap = { .val = page_private(page) }; |
| 471 | __delete_from_swap_cache(page); | 471 | __delete_from_swap_cache(page); |
| 472 | spin_unlock_irq(&mapping->tree_lock); | 472 | spin_unlock_irq(&mapping->tree_lock); |
| 473 | mem_cgroup_uncharge_swapcache(page, swap); | ||
| 473 | swap_free(swap); | 474 | swap_free(swap); |
| 474 | } else { | 475 | } else { |
| 475 | __remove_from_page_cache(page); | 476 | __remove_from_page_cache(page); |
| 476 | spin_unlock_irq(&mapping->tree_lock); | 477 | spin_unlock_irq(&mapping->tree_lock); |
| 478 | mem_cgroup_uncharge_cache_page(page); | ||
| 477 | } | 479 | } |
| 478 | 480 | ||
| 479 | return 1; | 481 | return 1; |
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index af3198814c15..9d504234af4a 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
| @@ -345,6 +345,7 @@ static void svc_sock_setbufsize(struct socket *sock, unsigned int snd, | |||
| 345 | lock_sock(sock->sk); | 345 | lock_sock(sock->sk); |
| 346 | sock->sk->sk_sndbuf = snd * 2; | 346 | sock->sk->sk_sndbuf = snd * 2; |
| 347 | sock->sk->sk_rcvbuf = rcv * 2; | 347 | sock->sk->sk_rcvbuf = rcv * 2; |
| 348 | sock->sk->sk_userlocks |= SOCK_SNDBUF_LOCK|SOCK_RCVBUF_LOCK; | ||
| 348 | release_sock(sock->sk); | 349 | release_sock(sock->sk); |
| 349 | #endif | 350 | #endif |
| 350 | } | 351 | } |
| @@ -796,6 +797,23 @@ static int svc_tcp_recvfrom(struct svc_rqst *rqstp) | |||
| 796 | test_bit(XPT_CONN, &svsk->sk_xprt.xpt_flags), | 797 | test_bit(XPT_CONN, &svsk->sk_xprt.xpt_flags), |
| 797 | test_bit(XPT_CLOSE, &svsk->sk_xprt.xpt_flags)); | 798 | test_bit(XPT_CLOSE, &svsk->sk_xprt.xpt_flags)); |
| 798 | 799 | ||
| 800 | if (test_and_clear_bit(XPT_CHNGBUF, &svsk->sk_xprt.xpt_flags)) | ||
| 801 | /* sndbuf needs to have room for one request | ||
| 802 | * per thread, otherwise we can stall even when the | ||
| 803 | * network isn't a bottleneck. | ||
| 804 | * | ||
| 805 | * We count all threads rather than threads in a | ||
| 806 | * particular pool, which provides an upper bound | ||
| 807 | * on the number of threads which will access the socket. | ||
| 808 | * | ||
| 809 | * rcvbuf just needs to be able to hold a few requests. | ||
| 810 | * Normally they will be removed from the queue | ||
| 811 | * as soon a a complete request arrives. | ||
| 812 | */ | ||
| 813 | svc_sock_setbufsize(svsk->sk_sock, | ||
| 814 | (serv->sv_nrthreads+3) * serv->sv_max_mesg, | ||
| 815 | 3 * serv->sv_max_mesg); | ||
| 816 | |||
| 799 | clear_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags); | 817 | clear_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags); |
| 800 | 818 | ||
| 801 | /* Receive data. If we haven't got the record length yet, get | 819 | /* Receive data. If we haven't got the record length yet, get |
| @@ -1043,6 +1061,15 @@ static void svc_tcp_init(struct svc_sock *svsk, struct svc_serv *serv) | |||
| 1043 | 1061 | ||
| 1044 | tcp_sk(sk)->nonagle |= TCP_NAGLE_OFF; | 1062 | tcp_sk(sk)->nonagle |= TCP_NAGLE_OFF; |
| 1045 | 1063 | ||
| 1064 | /* initialise setting must have enough space to | ||
| 1065 | * receive and respond to one request. | ||
| 1066 | * svc_tcp_recvfrom will re-adjust if necessary | ||
| 1067 | */ | ||
| 1068 | svc_sock_setbufsize(svsk->sk_sock, | ||
| 1069 | 3 * svsk->sk_xprt.xpt_server->sv_max_mesg, | ||
| 1070 | 3 * svsk->sk_xprt.xpt_server->sv_max_mesg); | ||
| 1071 | |||
| 1072 | set_bit(XPT_CHNGBUF, &svsk->sk_xprt.xpt_flags); | ||
| 1046 | set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags); | 1073 | set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags); |
| 1047 | if (sk->sk_state != TCP_ESTABLISHED) | 1074 | if (sk->sk_state != TCP_ESTABLISHED) |
| 1048 | set_bit(XPT_CLOSE, &svsk->sk_xprt.xpt_flags); | 1075 | set_bit(XPT_CLOSE, &svsk->sk_xprt.xpt_flags); |
| @@ -1112,14 +1139,8 @@ static struct svc_sock *svc_setup_socket(struct svc_serv *serv, | |||
| 1112 | /* Initialize the socket */ | 1139 | /* Initialize the socket */ |
| 1113 | if (sock->type == SOCK_DGRAM) | 1140 | if (sock->type == SOCK_DGRAM) |
| 1114 | svc_udp_init(svsk, serv); | 1141 | svc_udp_init(svsk, serv); |
| 1115 | else { | 1142 | else |
| 1116 | /* initialise setting must have enough space to | ||
| 1117 | * receive and respond to one request. | ||
| 1118 | */ | ||
| 1119 | svc_sock_setbufsize(svsk->sk_sock, 4 * serv->sv_max_mesg, | ||
| 1120 | 4 * serv->sv_max_mesg); | ||
| 1121 | svc_tcp_init(svsk, serv); | 1143 | svc_tcp_init(svsk, serv); |
| 1122 | } | ||
| 1123 | 1144 | ||
| 1124 | dprintk("svc: svc_setup_socket created %p (inet %p)\n", | 1145 | dprintk("svc: svc_setup_socket created %p (inet %p)\n", |
| 1125 | svsk, svsk->sk_sk); | 1146 | svsk, svsk->sk_sk); |
diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c index 8b510c5e8777..f11be72a1a80 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c +++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c | |||
| @@ -128,7 +128,8 @@ static int fast_reg_xdr(struct svcxprt_rdma *xprt, | |||
| 128 | page_bytes -= sge_bytes; | 128 | page_bytes -= sge_bytes; |
| 129 | 129 | ||
| 130 | frmr->page_list->page_list[page_no] = | 130 | frmr->page_list->page_list[page_no] = |
| 131 | ib_dma_map_page(xprt->sc_cm_id->device, page, 0, | 131 | ib_dma_map_single(xprt->sc_cm_id->device, |
| 132 | page_address(page), | ||
| 132 | PAGE_SIZE, DMA_TO_DEVICE); | 133 | PAGE_SIZE, DMA_TO_DEVICE); |
| 133 | if (ib_dma_mapping_error(xprt->sc_cm_id->device, | 134 | if (ib_dma_mapping_error(xprt->sc_cm_id->device, |
| 134 | frmr->page_list->page_list[page_no])) | 135 | frmr->page_list->page_list[page_no])) |
| @@ -532,18 +533,17 @@ static int send_reply(struct svcxprt_rdma *rdma, | |||
| 532 | clear_bit(RDMACTXT_F_FAST_UNREG, &ctxt->flags); | 533 | clear_bit(RDMACTXT_F_FAST_UNREG, &ctxt->flags); |
| 533 | 534 | ||
| 534 | /* Prepare the SGE for the RPCRDMA Header */ | 535 | /* Prepare the SGE for the RPCRDMA Header */ |
| 536 | ctxt->sge[0].lkey = rdma->sc_dma_lkey; | ||
| 537 | ctxt->sge[0].length = svc_rdma_xdr_get_reply_hdr_len(rdma_resp); | ||
| 535 | ctxt->sge[0].addr = | 538 | ctxt->sge[0].addr = |
| 536 | ib_dma_map_page(rdma->sc_cm_id->device, | 539 | ib_dma_map_single(rdma->sc_cm_id->device, page_address(page), |
| 537 | page, 0, PAGE_SIZE, DMA_TO_DEVICE); | 540 | ctxt->sge[0].length, DMA_TO_DEVICE); |
| 538 | if (ib_dma_mapping_error(rdma->sc_cm_id->device, ctxt->sge[0].addr)) | 541 | if (ib_dma_mapping_error(rdma->sc_cm_id->device, ctxt->sge[0].addr)) |
| 539 | goto err; | 542 | goto err; |
| 540 | atomic_inc(&rdma->sc_dma_used); | 543 | atomic_inc(&rdma->sc_dma_used); |
| 541 | 544 | ||
| 542 | ctxt->direction = DMA_TO_DEVICE; | 545 | ctxt->direction = DMA_TO_DEVICE; |
| 543 | 546 | ||
| 544 | ctxt->sge[0].length = svc_rdma_xdr_get_reply_hdr_len(rdma_resp); | ||
| 545 | ctxt->sge[0].lkey = rdma->sc_dma_lkey; | ||
| 546 | |||
| 547 | /* Determine how many of our SGE are to be transmitted */ | 547 | /* Determine how many of our SGE are to be transmitted */ |
| 548 | for (sge_no = 1; byte_count && sge_no < vec->count; sge_no++) { | 548 | for (sge_no = 1; byte_count && sge_no < vec->count; sge_no++) { |
| 549 | sge_bytes = min_t(size_t, vec->sge[sge_no].iov_len, byte_count); | 549 | sge_bytes = min_t(size_t, vec->sge[sge_no].iov_len, byte_count); |
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c index 4b0c2fa15e0b..5151f9f6c573 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c | |||
| @@ -500,8 +500,8 @@ int svc_rdma_post_recv(struct svcxprt_rdma *xprt) | |||
| 500 | BUG_ON(sge_no >= xprt->sc_max_sge); | 500 | BUG_ON(sge_no >= xprt->sc_max_sge); |
| 501 | page = svc_rdma_get_page(); | 501 | page = svc_rdma_get_page(); |
| 502 | ctxt->pages[sge_no] = page; | 502 | ctxt->pages[sge_no] = page; |
| 503 | pa = ib_dma_map_page(xprt->sc_cm_id->device, | 503 | pa = ib_dma_map_single(xprt->sc_cm_id->device, |
| 504 | page, 0, PAGE_SIZE, | 504 | page_address(page), PAGE_SIZE, |
| 505 | DMA_FROM_DEVICE); | 505 | DMA_FROM_DEVICE); |
| 506 | if (ib_dma_mapping_error(xprt->sc_cm_id->device, pa)) | 506 | if (ib_dma_mapping_error(xprt->sc_cm_id->device, pa)) |
| 507 | goto err_put_ctxt; | 507 | goto err_put_ctxt; |
| @@ -1315,8 +1315,8 @@ void svc_rdma_send_error(struct svcxprt_rdma *xprt, struct rpcrdma_msg *rmsgp, | |||
| 1315 | length = svc_rdma_xdr_encode_error(xprt, rmsgp, err, va); | 1315 | length = svc_rdma_xdr_encode_error(xprt, rmsgp, err, va); |
| 1316 | 1316 | ||
| 1317 | /* Prepare SGE for local address */ | 1317 | /* Prepare SGE for local address */ |
| 1318 | sge.addr = ib_dma_map_page(xprt->sc_cm_id->device, | 1318 | sge.addr = ib_dma_map_single(xprt->sc_cm_id->device, |
| 1319 | p, 0, PAGE_SIZE, DMA_FROM_DEVICE); | 1319 | page_address(p), PAGE_SIZE, DMA_FROM_DEVICE); |
| 1320 | if (ib_dma_mapping_error(xprt->sc_cm_id->device, sge.addr)) { | 1320 | if (ib_dma_mapping_error(xprt->sc_cm_id->device, sge.addr)) { |
| 1321 | put_page(p); | 1321 | put_page(p); |
| 1322 | return; | 1322 | return; |
| @@ -1343,7 +1343,7 @@ void svc_rdma_send_error(struct svcxprt_rdma *xprt, struct rpcrdma_msg *rmsgp, | |||
| 1343 | if (ret) { | 1343 | if (ret) { |
| 1344 | dprintk("svcrdma: Error %d posting send for protocol error\n", | 1344 | dprintk("svcrdma: Error %d posting send for protocol error\n", |
| 1345 | ret); | 1345 | ret); |
| 1346 | ib_dma_unmap_page(xprt->sc_cm_id->device, | 1346 | ib_dma_unmap_single(xprt->sc_cm_id->device, |
| 1347 | sge.addr, PAGE_SIZE, | 1347 | sge.addr, PAGE_SIZE, |
| 1348 | DMA_FROM_DEVICE); | 1348 | DMA_FROM_DEVICE); |
| 1349 | svc_rdma_put_context(ctxt, 1); | 1349 | svc_rdma_put_context(ctxt, 1); |
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index a2a792c18c40..d659995ac3ac 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c | |||
| @@ -249,6 +249,11 @@ static int snd_pcm_update_hw_ptr_interrupt(struct snd_pcm_substream *substream) | |||
| 249 | new_hw_ptr = hw_base + pos; | 249 | new_hw_ptr = hw_base + pos; |
| 250 | } | 250 | } |
| 251 | } | 251 | } |
| 252 | |||
| 253 | /* Do jiffies check only in xrun_debug mode */ | ||
| 254 | if (!xrun_debug(substream)) | ||
| 255 | goto no_jiffies_check; | ||
| 256 | |||
| 252 | /* Skip the jiffies check for hardwares with BATCH flag. | 257 | /* Skip the jiffies check for hardwares with BATCH flag. |
| 253 | * Such hardware usually just increases the position at each IRQ, | 258 | * Such hardware usually just increases the position at each IRQ, |
| 254 | * thus it can't give any strange position. | 259 | * thus it can't give any strange position. |
| @@ -336,7 +341,9 @@ int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream) | |||
| 336 | hw_base = 0; | 341 | hw_base = 0; |
| 337 | new_hw_ptr = hw_base + pos; | 342 | new_hw_ptr = hw_base + pos; |
| 338 | } | 343 | } |
| 339 | if (((delta * HZ) / runtime->rate) > jdelta + HZ/100) { | 344 | /* Do jiffies check only in xrun_debug mode */ |
| 345 | if (xrun_debug(substream) && | ||
| 346 | ((delta * HZ) / runtime->rate) > jdelta + HZ/100) { | ||
| 340 | hw_ptr_error(substream, | 347 | hw_ptr_error(substream, |
| 341 | "hw_ptr skipping! " | 348 | "hw_ptr skipping! " |
| 342 | "(pos=%ld, delta=%ld, period=%ld, jdelta=%lu/%lu)\n", | 349 | "(pos=%ld, delta=%ld, period=%ld, jdelta=%lu/%lu)\n", |
| @@ -1478,7 +1485,6 @@ static int snd_pcm_lib_ioctl_reset(struct snd_pcm_substream *substream, | |||
| 1478 | runtime->status->hw_ptr %= runtime->buffer_size; | 1485 | runtime->status->hw_ptr %= runtime->buffer_size; |
| 1479 | else | 1486 | else |
| 1480 | runtime->status->hw_ptr = 0; | 1487 | runtime->status->hw_ptr = 0; |
| 1481 | runtime->hw_ptr_jiffies = jiffies; | ||
| 1482 | snd_pcm_stream_unlock_irqrestore(substream, flags); | 1488 | snd_pcm_stream_unlock_irqrestore(substream, flags); |
| 1483 | return 0; | 1489 | return 0; |
| 1484 | } | 1490 | } |
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index fc6f98e257df..b5da656d1ece 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
| @@ -848,6 +848,7 @@ static void snd_pcm_post_start(struct snd_pcm_substream *substream, int state) | |||
| 848 | { | 848 | { |
| 849 | struct snd_pcm_runtime *runtime = substream->runtime; | 849 | struct snd_pcm_runtime *runtime = substream->runtime; |
| 850 | snd_pcm_trigger_tstamp(substream); | 850 | snd_pcm_trigger_tstamp(substream); |
| 851 | runtime->hw_ptr_jiffies = jiffies; | ||
| 851 | runtime->status->state = state; | 852 | runtime->status->state = state; |
| 852 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK && | 853 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK && |
| 853 | runtime->silence_size > 0) | 854 | runtime->silence_size > 0) |
| @@ -961,6 +962,11 @@ static int snd_pcm_do_pause(struct snd_pcm_substream *substream, int push) | |||
| 961 | { | 962 | { |
| 962 | if (substream->runtime->trigger_master != substream) | 963 | if (substream->runtime->trigger_master != substream) |
| 963 | return 0; | 964 | return 0; |
| 965 | /* The jiffies check in snd_pcm_update_hw_ptr*() is done by | ||
| 966 | * a delta betwen the current jiffies, this gives a large enough | ||
| 967 | * delta, effectively to skip the check once. | ||
| 968 | */ | ||
| 969 | substream->runtime->hw_ptr_jiffies = jiffies - HZ * 1000; | ||
| 964 | return substream->ops->trigger(substream, | 970 | return substream->ops->trigger(substream, |
| 965 | push ? SNDRV_PCM_TRIGGER_PAUSE_PUSH : | 971 | push ? SNDRV_PCM_TRIGGER_PAUSE_PUSH : |
| 966 | SNDRV_PCM_TRIGGER_PAUSE_RELEASE); | 972 | SNDRV_PCM_TRIGGER_PAUSE_RELEASE); |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 56ce19e68cb5..4fcbe21829ab 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
| @@ -1848,6 +1848,7 @@ static const char *cxt5051_models[CXT5051_MODELS] = { | |||
| 1848 | 1848 | ||
| 1849 | static struct snd_pci_quirk cxt5051_cfg_tbl[] = { | 1849 | static struct snd_pci_quirk cxt5051_cfg_tbl[] = { |
| 1850 | SND_PCI_QUIRK(0x103c, 0x30cf, "HP DV6736", CXT5051_HP_DV6736), | 1850 | SND_PCI_QUIRK(0x103c, 0x30cf, "HP DV6736", CXT5051_HP_DV6736), |
| 1851 | SND_PCI_QUIRK(0x103c, 0x360b, "Compaq Presario CQ60", CXT5051_HP), | ||
| 1851 | SND_PCI_QUIRK(0x14f1, 0x0101, "Conexant Reference board", | 1852 | SND_PCI_QUIRK(0x14f1, 0x0101, "Conexant Reference board", |
| 1852 | CXT5051_LAPTOP), | 1853 | CXT5051_LAPTOP), |
| 1853 | SND_PCI_QUIRK(0x14f1, 0x5051, "HP Spartan 1.1", CXT5051_HP), | 1854 | SND_PCI_QUIRK(0x14f1, 0x5051, "HP Spartan 1.1", CXT5051_HP), |
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index 823296d7d578..a6b88482637b 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c | |||
| @@ -3347,7 +3347,7 @@ static int snd_usb_create_quirk(struct snd_usb_audio *chip, | |||
| 3347 | [QUIRK_MIDI_YAMAHA] = snd_usb_create_midi_interface, | 3347 | [QUIRK_MIDI_YAMAHA] = snd_usb_create_midi_interface, |
| 3348 | [QUIRK_MIDI_MIDIMAN] = snd_usb_create_midi_interface, | 3348 | [QUIRK_MIDI_MIDIMAN] = snd_usb_create_midi_interface, |
| 3349 | [QUIRK_MIDI_NOVATION] = snd_usb_create_midi_interface, | 3349 | [QUIRK_MIDI_NOVATION] = snd_usb_create_midi_interface, |
| 3350 | [QUIRK_MIDI_RAW] = snd_usb_create_midi_interface, | 3350 | [QUIRK_MIDI_FASTLANE] = snd_usb_create_midi_interface, |
| 3351 | [QUIRK_MIDI_EMAGIC] = snd_usb_create_midi_interface, | 3351 | [QUIRK_MIDI_EMAGIC] = snd_usb_create_midi_interface, |
| 3352 | [QUIRK_MIDI_CME] = snd_usb_create_midi_interface, | 3352 | [QUIRK_MIDI_CME] = snd_usb_create_midi_interface, |
| 3353 | [QUIRK_AUDIO_STANDARD_INTERFACE] = create_standard_audio_quirk, | 3353 | [QUIRK_AUDIO_STANDARD_INTERFACE] = create_standard_audio_quirk, |
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h index 36e4f7a29adc..8e7f78941ba6 100644 --- a/sound/usb/usbaudio.h +++ b/sound/usb/usbaudio.h | |||
| @@ -153,7 +153,7 @@ enum quirk_type { | |||
| 153 | QUIRK_MIDI_YAMAHA, | 153 | QUIRK_MIDI_YAMAHA, |
| 154 | QUIRK_MIDI_MIDIMAN, | 154 | QUIRK_MIDI_MIDIMAN, |
| 155 | QUIRK_MIDI_NOVATION, | 155 | QUIRK_MIDI_NOVATION, |
| 156 | QUIRK_MIDI_RAW, | 156 | QUIRK_MIDI_FASTLANE, |
| 157 | QUIRK_MIDI_EMAGIC, | 157 | QUIRK_MIDI_EMAGIC, |
| 158 | QUIRK_MIDI_CME, | 158 | QUIRK_MIDI_CME, |
| 159 | QUIRK_MIDI_US122L, | 159 | QUIRK_MIDI_US122L, |
diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c index 26bad373fe65..2fb35cc22a30 100644 --- a/sound/usb/usbmidi.c +++ b/sound/usb/usbmidi.c | |||
| @@ -1778,8 +1778,18 @@ int snd_usb_create_midi_interface(struct snd_usb_audio* chip, | |||
| 1778 | umidi->usb_protocol_ops = &snd_usbmidi_novation_ops; | 1778 | umidi->usb_protocol_ops = &snd_usbmidi_novation_ops; |
| 1779 | err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints); | 1779 | err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints); |
| 1780 | break; | 1780 | break; |
| 1781 | case QUIRK_MIDI_RAW: | 1781 | case QUIRK_MIDI_FASTLANE: |
| 1782 | umidi->usb_protocol_ops = &snd_usbmidi_raw_ops; | 1782 | umidi->usb_protocol_ops = &snd_usbmidi_raw_ops; |
| 1783 | /* | ||
| 1784 | * Interface 1 contains isochronous endpoints, but with the same | ||
| 1785 | * numbers as in interface 0. Since it is interface 1 that the | ||
| 1786 | * USB core has most recently seen, these descriptors are now | ||
| 1787 | * associated with the endpoint numbers. This will foul up our | ||
| 1788 | * attempts to submit bulk/interrupt URBs to the endpoints in | ||
| 1789 | * interface 0, so we have to make sure that the USB core looks | ||
| 1790 | * again at interface 0 by calling usb_set_interface() on it. | ||
| 1791 | */ | ||
| 1792 | usb_set_interface(umidi->chip->dev, 0, 0); | ||
| 1783 | err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints); | 1793 | err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints); |
| 1784 | break; | 1794 | break; |
| 1785 | case QUIRK_MIDI_EMAGIC: | 1795 | case QUIRK_MIDI_EMAGIC: |
diff --git a/sound/usb/usbquirks.h b/sound/usb/usbquirks.h index 647ef5029651..5d955aaad85f 100644 --- a/sound/usb/usbquirks.h +++ b/sound/usb/usbquirks.h | |||
| @@ -1868,7 +1868,7 @@ YAMAHA_DEVICE(0x7010, "UB99"), | |||
| 1868 | .data = & (const struct snd_usb_audio_quirk[]) { | 1868 | .data = & (const struct snd_usb_audio_quirk[]) { |
| 1869 | { | 1869 | { |
| 1870 | .ifnum = 0, | 1870 | .ifnum = 0, |
| 1871 | .type = QUIRK_MIDI_RAW | 1871 | .type = QUIRK_MIDI_FASTLANE |
| 1872 | }, | 1872 | }, |
| 1873 | { | 1873 | { |
| 1874 | .ifnum = 1, | 1874 | .ifnum = 1, |
