diff options
author | David S. Miller <davem@davemloft.net> | 2014-09-24 16:48:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-24 16:48:32 -0400 |
commit | 4daaab4f0c2b55adccab08da06e17acc270cb84a (patch) | |
tree | 41dfea3867755d3853218d50533c5600ac8fa6c0 | |
parent | 3c4d1daecef875d28bdbe93587908c897c29ba71 (diff) | |
parent | b94d525e58dc9638dd3f98094cb468bcfb262039 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
98 files changed, 667 insertions, 447 deletions
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml index eee6f0f4aa43..3a626d1b8f2e 100644 --- a/Documentation/DocBook/media/v4l/compat.xml +++ b/Documentation/DocBook/media/v4l/compat.xml | |||
@@ -2545,6 +2545,30 @@ fields changed from _s32 to _u32. | |||
2545 | </orderedlist> | 2545 | </orderedlist> |
2546 | </section> | 2546 | </section> |
2547 | 2547 | ||
2548 | <section> | ||
2549 | <title>V4L2 in Linux 3.16</title> | ||
2550 | <orderedlist> | ||
2551 | <listitem> | ||
2552 | <para>Added event V4L2_EVENT_SOURCE_CHANGE. | ||
2553 | </para> | ||
2554 | </listitem> | ||
2555 | </orderedlist> | ||
2556 | </section> | ||
2557 | |||
2558 | <section> | ||
2559 | <title>V4L2 in Linux 3.17</title> | ||
2560 | <orderedlist> | ||
2561 | <listitem> | ||
2562 | <para>Extended &v4l2-pix-format;. Added format flags. | ||
2563 | </para> | ||
2564 | </listitem> | ||
2565 | <listitem> | ||
2566 | <para>Added compound control types and &VIDIOC-QUERY-EXT-CTRL;. | ||
2567 | </para> | ||
2568 | </listitem> | ||
2569 | </orderedlist> | ||
2570 | </section> | ||
2571 | |||
2548 | <section id="other"> | 2572 | <section id="other"> |
2549 | <title>Relation of V4L2 to other Linux multimedia APIs</title> | 2573 | <title>Relation of V4L2 to other Linux multimedia APIs</title> |
2550 | 2574 | ||
diff --git a/Documentation/DocBook/media/v4l/func-poll.xml b/Documentation/DocBook/media/v4l/func-poll.xml index 85cad8bff5ba..4c73f115219b 100644 --- a/Documentation/DocBook/media/v4l/func-poll.xml +++ b/Documentation/DocBook/media/v4l/func-poll.xml | |||
@@ -29,9 +29,12 @@ can suspend execution until the driver has captured data or is ready | |||
29 | to accept data for output.</para> | 29 | to accept data for output.</para> |
30 | 30 | ||
31 | <para>When streaming I/O has been negotiated this function waits | 31 | <para>When streaming I/O has been negotiated this function waits |
32 | until a buffer has been filled or displayed and can be dequeued with | 32 | until a buffer has been filled by the capture device and can be dequeued |
33 | the &VIDIOC-DQBUF; ioctl. When buffers are already in the outgoing | 33 | with the &VIDIOC-DQBUF; ioctl. For output devices this function waits |
34 | queue of the driver the function returns immediately.</para> | 34 | until the device is ready to accept a new buffer to be queued up with |
35 | the &VIDIOC-QBUF; ioctl for display. When buffers are already in the outgoing | ||
36 | queue of the driver (capture) or the incoming queue isn't full (display) | ||
37 | the function returns immediately.</para> | ||
35 | 38 | ||
36 | <para>On success <function>poll()</function> returns the number of | 39 | <para>On success <function>poll()</function> returns the number of |
37 | file descriptors that have been selected (that is, file descriptors | 40 | file descriptors that have been selected (that is, file descriptors |
@@ -44,10 +47,22 @@ Capture devices set the <constant>POLLIN</constant> and | |||
44 | flags. When the function timed out it returns a value of zero, on | 47 | flags. When the function timed out it returns a value of zero, on |
45 | failure it returns <returnvalue>-1</returnvalue> and the | 48 | failure it returns <returnvalue>-1</returnvalue> and the |
46 | <varname>errno</varname> variable is set appropriately. When the | 49 | <varname>errno</varname> variable is set appropriately. When the |
47 | application did not call &VIDIOC-QBUF; or &VIDIOC-STREAMON; yet the | 50 | application did not call &VIDIOC-STREAMON; the |
48 | <function>poll()</function> function succeeds, but sets the | 51 | <function>poll()</function> function succeeds, but sets the |
49 | <constant>POLLERR</constant> flag in the | 52 | <constant>POLLERR</constant> flag in the |
50 | <structfield>revents</structfield> field.</para> | 53 | <structfield>revents</structfield> field. When the |
54 | application has called &VIDIOC-STREAMON; for a capture device but hasn't | ||
55 | yet called &VIDIOC-QBUF;, the <function>poll()</function> function | ||
56 | succeeds and sets the <constant>POLLERR</constant> flag in the | ||
57 | <structfield>revents</structfield> field. For output devices this | ||
58 | same situation will cause <function>poll()</function> to succeed | ||
59 | as well, but it sets the <constant>POLLOUT</constant> and | ||
60 | <constant>POLLWRNORM</constant> flags in the <structfield>revents</structfield> | ||
61 | field.</para> | ||
62 | |||
63 | <para>If an event occurred (see &VIDIOC-DQEVENT;) then | ||
64 | <constant>POLLPRI</constant> will be set in the <structfield>revents</structfield> | ||
65 | field and <function>poll()</function> will return.</para> | ||
51 | 66 | ||
52 | <para>When use of the <function>read()</function> function has | 67 | <para>When use of the <function>read()</function> function has |
53 | been negotiated and the driver does not capture yet, the | 68 | been negotiated and the driver does not capture yet, the |
@@ -58,10 +73,18 @@ continuously (as opposed to, for example, still images) the function | |||
58 | may return immediately.</para> | 73 | may return immediately.</para> |
59 | 74 | ||
60 | <para>When use of the <function>write()</function> function has | 75 | <para>When use of the <function>write()</function> function has |
61 | been negotiated the <function>poll</function> function just waits | 76 | been negotiated and the driver does not stream yet, the |
77 | <function>poll</function> function starts streaming. When that fails | ||
78 | it returns a <constant>POLLERR</constant> as above. Otherwise it waits | ||
62 | until the driver is ready for a non-blocking | 79 | until the driver is ready for a non-blocking |
63 | <function>write()</function> call.</para> | 80 | <function>write()</function> call.</para> |
64 | 81 | ||
82 | <para>If the caller is only interested in events (just | ||
83 | <constant>POLLPRI</constant> is set in the <structfield>events</structfield> | ||
84 | field), then <function>poll()</function> will <emphasis>not</emphasis> | ||
85 | start streaming if the driver does not stream yet. This makes it | ||
86 | possible to just poll for events and not for buffers.</para> | ||
87 | |||
65 | <para>All drivers implementing the <function>read()</function> or | 88 | <para>All drivers implementing the <function>read()</function> or |
66 | <function>write()</function> function or streaming I/O must also | 89 | <function>write()</function> function or streaming I/O must also |
67 | support the <function>poll()</function> function.</para> | 90 | support the <function>poll()</function> function.</para> |
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml index f2f81f06a17b..7cfe618f754d 100644 --- a/Documentation/DocBook/media/v4l/v4l2.xml +++ b/Documentation/DocBook/media/v4l/v4l2.xml | |||
@@ -152,10 +152,11 @@ structs, ioctls) must be noted in more detail in the history chapter | |||
152 | applications. --> | 152 | applications. --> |
153 | 153 | ||
154 | <revision> | 154 | <revision> |
155 | <revnumber>3.16</revnumber> | 155 | <revnumber>3.17</revnumber> |
156 | <date>2014-05-27</date> | 156 | <date>2014-08-04</date> |
157 | <authorinitials>lp</authorinitials> | 157 | <authorinitials>lp, hv</authorinitials> |
158 | <revremark>Extended &v4l2-pix-format;. Added format flags. | 158 | <revremark>Extended &v4l2-pix-format;. Added format flags. Added compound control types |
159 | and VIDIOC_QUERY_EXT_CTRL. | ||
159 | </revremark> | 160 | </revremark> |
160 | </revision> | 161 | </revision> |
161 | 162 | ||
@@ -538,7 +539,7 @@ and discussions on the V4L mailing list.</revremark> | |||
538 | </partinfo> | 539 | </partinfo> |
539 | 540 | ||
540 | <title>Video for Linux Two API Specification</title> | 541 | <title>Video for Linux Two API Specification</title> |
541 | <subtitle>Revision 3.14</subtitle> | 542 | <subtitle>Revision 3.17</subtitle> |
542 | 543 | ||
543 | <chapter id="common"> | 544 | <chapter id="common"> |
544 | &sub-common; | 545 | &sub-common; |
diff --git a/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml b/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml index 1ba9e999af3f..c62a7360719b 100644 --- a/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml +++ b/Documentation/DocBook/media/v4l/vidioc-subdev-g-selection.xml | |||
@@ -119,7 +119,7 @@ | |||
119 | </row> | 119 | </row> |
120 | <row> | 120 | <row> |
121 | <entry>&v4l2-rect;</entry> | 121 | <entry>&v4l2-rect;</entry> |
122 | <entry><structfield>rect</structfield></entry> | 122 | <entry><structfield>r</structfield></entry> |
123 | <entry>Selection rectangle, in pixels.</entry> | 123 | <entry>Selection rectangle, in pixels.</entry> |
124 | </row> | 124 | </row> |
125 | <row> | 125 | <row> |
diff --git a/arch/ia64/configs/bigsur_defconfig b/arch/ia64/configs/bigsur_defconfig index 4c4ac163c600..b6bda1838629 100644 --- a/arch/ia64/configs/bigsur_defconfig +++ b/arch/ia64/configs/bigsur_defconfig | |||
@@ -1,4 +1,3 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_SYSVIPC=y | 1 | CONFIG_SYSVIPC=y |
3 | CONFIG_POSIX_MQUEUE=y | 2 | CONFIG_POSIX_MQUEUE=y |
4 | CONFIG_LOG_BUF_SHIFT=16 | 3 | CONFIG_LOG_BUF_SHIFT=16 |
@@ -6,6 +5,8 @@ CONFIG_PROFILING=y | |||
6 | CONFIG_OPROFILE=y | 5 | CONFIG_OPROFILE=y |
7 | CONFIG_MODULES=y | 6 | CONFIG_MODULES=y |
8 | CONFIG_MODULE_UNLOAD=y | 7 | CONFIG_MODULE_UNLOAD=y |
8 | CONFIG_PARTITION_ADVANCED=y | ||
9 | CONFIG_SGI_PARTITION=y | ||
9 | CONFIG_IA64_DIG=y | 10 | CONFIG_IA64_DIG=y |
10 | CONFIG_SMP=y | 11 | CONFIG_SMP=y |
11 | CONFIG_NR_CPUS=2 | 12 | CONFIG_NR_CPUS=2 |
@@ -51,9 +52,6 @@ CONFIG_DM_MIRROR=m | |||
51 | CONFIG_DM_ZERO=m | 52 | CONFIG_DM_ZERO=m |
52 | CONFIG_NETDEVICES=y | 53 | CONFIG_NETDEVICES=y |
53 | CONFIG_DUMMY=y | 54 | CONFIG_DUMMY=y |
54 | CONFIG_NET_ETHERNET=y | ||
55 | CONFIG_MII=y | ||
56 | CONFIG_NET_PCI=y | ||
57 | CONFIG_INPUT_EVDEV=y | 55 | CONFIG_INPUT_EVDEV=y |
58 | CONFIG_SERIAL_8250=y | 56 | CONFIG_SERIAL_8250=y |
59 | CONFIG_SERIAL_8250_CONSOLE=y | 57 | CONFIG_SERIAL_8250_CONSOLE=y |
@@ -85,7 +83,6 @@ CONFIG_EXT3_FS=y | |||
85 | CONFIG_XFS_FS=y | 83 | CONFIG_XFS_FS=y |
86 | CONFIG_XFS_QUOTA=y | 84 | CONFIG_XFS_QUOTA=y |
87 | CONFIG_XFS_POSIX_ACL=y | 85 | CONFIG_XFS_POSIX_ACL=y |
88 | CONFIG_AUTOFS_FS=m | ||
89 | CONFIG_AUTOFS4_FS=m | 86 | CONFIG_AUTOFS4_FS=m |
90 | CONFIG_ISO9660_FS=m | 87 | CONFIG_ISO9660_FS=m |
91 | CONFIG_JOLIET=y | 88 | CONFIG_JOLIET=y |
@@ -95,17 +92,13 @@ CONFIG_PROC_KCORE=y | |||
95 | CONFIG_TMPFS=y | 92 | CONFIG_TMPFS=y |
96 | CONFIG_HUGETLBFS=y | 93 | CONFIG_HUGETLBFS=y |
97 | CONFIG_NFS_FS=m | 94 | CONFIG_NFS_FS=m |
98 | CONFIG_NFS_V3=y | 95 | CONFIG_NFS_V4=m |
99 | CONFIG_NFS_V4=y | ||
100 | CONFIG_NFSD=m | 96 | CONFIG_NFSD=m |
101 | CONFIG_NFSD_V4=y | 97 | CONFIG_NFSD_V4=y |
102 | CONFIG_CIFS=m | 98 | CONFIG_CIFS=m |
103 | CONFIG_CIFS_STATS=y | 99 | CONFIG_CIFS_STATS=y |
104 | CONFIG_CIFS_XATTR=y | 100 | CONFIG_CIFS_XATTR=y |
105 | CONFIG_CIFS_POSIX=y | 101 | CONFIG_CIFS_POSIX=y |
106 | CONFIG_PARTITION_ADVANCED=y | ||
107 | CONFIG_SGI_PARTITION=y | ||
108 | CONFIG_EFI_PARTITION=y | ||
109 | CONFIG_NLS_CODEPAGE_437=y | 102 | CONFIG_NLS_CODEPAGE_437=y |
110 | CONFIG_NLS_ISO8859_1=y | 103 | CONFIG_NLS_ISO8859_1=y |
111 | CONFIG_NLS_UTF8=m | 104 | CONFIG_NLS_UTF8=m |
diff --git a/arch/ia64/configs/generic_defconfig b/arch/ia64/configs/generic_defconfig index e8ed3ae70aae..81f686dee53c 100644 --- a/arch/ia64/configs/generic_defconfig +++ b/arch/ia64/configs/generic_defconfig | |||
@@ -1,4 +1,3 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_SYSVIPC=y | 1 | CONFIG_SYSVIPC=y |
3 | CONFIG_POSIX_MQUEUE=y | 2 | CONFIG_POSIX_MQUEUE=y |
4 | CONFIG_IKCONFIG=y | 3 | CONFIG_IKCONFIG=y |
@@ -6,13 +5,13 @@ CONFIG_IKCONFIG_PROC=y | |||
6 | CONFIG_LOG_BUF_SHIFT=20 | 5 | CONFIG_LOG_BUF_SHIFT=20 |
7 | CONFIG_CGROUPS=y | 6 | CONFIG_CGROUPS=y |
8 | CONFIG_CPUSETS=y | 7 | CONFIG_CPUSETS=y |
9 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
10 | CONFIG_BLK_DEV_INITRD=y | 8 | CONFIG_BLK_DEV_INITRD=y |
11 | CONFIG_KALLSYMS_ALL=y | 9 | CONFIG_KALLSYMS_ALL=y |
12 | CONFIG_MODULES=y | 10 | CONFIG_MODULES=y |
13 | CONFIG_MODULE_UNLOAD=y | 11 | CONFIG_MODULE_UNLOAD=y |
14 | CONFIG_MODVERSIONS=y | 12 | CONFIG_MODVERSIONS=y |
15 | # CONFIG_BLK_DEV_BSG is not set | 13 | CONFIG_PARTITION_ADVANCED=y |
14 | CONFIG_SGI_PARTITION=y | ||
16 | CONFIG_MCKINLEY=y | 15 | CONFIG_MCKINLEY=y |
17 | CONFIG_IA64_PAGE_SIZE_64KB=y | 16 | CONFIG_IA64_PAGE_SIZE_64KB=y |
18 | CONFIG_IA64_CYCLONE=y | 17 | CONFIG_IA64_CYCLONE=y |
@@ -29,14 +28,13 @@ CONFIG_ACPI_BUTTON=m | |||
29 | CONFIG_ACPI_FAN=m | 28 | CONFIG_ACPI_FAN=m |
30 | CONFIG_ACPI_DOCK=y | 29 | CONFIG_ACPI_DOCK=y |
31 | CONFIG_ACPI_PROCESSOR=m | 30 | CONFIG_ACPI_PROCESSOR=m |
32 | CONFIG_ACPI_CONTAINER=y | ||
33 | CONFIG_HOTPLUG_PCI=y | 31 | CONFIG_HOTPLUG_PCI=y |
34 | CONFIG_HOTPLUG_PCI_ACPI=y | 32 | CONFIG_HOTPLUG_PCI_ACPI=y |
33 | CONFIG_NET=y | ||
35 | CONFIG_PACKET=y | 34 | CONFIG_PACKET=y |
36 | CONFIG_UNIX=y | 35 | CONFIG_UNIX=y |
37 | CONFIG_INET=y | 36 | CONFIG_INET=y |
38 | CONFIG_IP_MULTICAST=y | 37 | CONFIG_IP_MULTICAST=y |
39 | CONFIG_ARPD=y | ||
40 | CONFIG_SYN_COOKIES=y | 38 | CONFIG_SYN_COOKIES=y |
41 | # CONFIG_IPV6 is not set | 39 | # CONFIG_IPV6 is not set |
42 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 40 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
@@ -82,16 +80,13 @@ CONFIG_FUSION_FC=m | |||
82 | CONFIG_FUSION_SAS=y | 80 | CONFIG_FUSION_SAS=y |
83 | CONFIG_NETDEVICES=y | 81 | CONFIG_NETDEVICES=y |
84 | CONFIG_DUMMY=m | 82 | CONFIG_DUMMY=m |
85 | CONFIG_NET_ETHERNET=y | 83 | CONFIG_NETCONSOLE=y |
84 | CONFIG_TIGON3=y | ||
86 | CONFIG_NET_TULIP=y | 85 | CONFIG_NET_TULIP=y |
87 | CONFIG_TULIP=m | 86 | CONFIG_TULIP=m |
88 | CONFIG_NET_PCI=y | ||
89 | CONFIG_NET_VENDOR_INTEL=y | ||
90 | CONFIG_E100=m | 87 | CONFIG_E100=m |
91 | CONFIG_E1000=y | 88 | CONFIG_E1000=y |
92 | CONFIG_IGB=y | 89 | CONFIG_IGB=y |
93 | CONFIG_TIGON3=y | ||
94 | CONFIG_NETCONSOLE=y | ||
95 | # CONFIG_SERIO_SERPORT is not set | 90 | # CONFIG_SERIO_SERPORT is not set |
96 | CONFIG_GAMEPORT=m | 91 | CONFIG_GAMEPORT=m |
97 | CONFIG_SERIAL_NONSTANDARD=y | 92 | CONFIG_SERIAL_NONSTANDARD=y |
@@ -151,6 +146,7 @@ CONFIG_USB_STORAGE=m | |||
151 | CONFIG_INFINIBAND=m | 146 | CONFIG_INFINIBAND=m |
152 | CONFIG_INFINIBAND_MTHCA=m | 147 | CONFIG_INFINIBAND_MTHCA=m |
153 | CONFIG_INFINIBAND_IPOIB=m | 148 | CONFIG_INFINIBAND_IPOIB=m |
149 | CONFIG_INTEL_IOMMU=y | ||
154 | CONFIG_MSPEC=m | 150 | CONFIG_MSPEC=m |
155 | CONFIG_EXT2_FS=y | 151 | CONFIG_EXT2_FS=y |
156 | CONFIG_EXT2_FS_XATTR=y | 152 | CONFIG_EXT2_FS_XATTR=y |
@@ -164,7 +160,6 @@ CONFIG_REISERFS_FS_XATTR=y | |||
164 | CONFIG_REISERFS_FS_POSIX_ACL=y | 160 | CONFIG_REISERFS_FS_POSIX_ACL=y |
165 | CONFIG_REISERFS_FS_SECURITY=y | 161 | CONFIG_REISERFS_FS_SECURITY=y |
166 | CONFIG_XFS_FS=y | 162 | CONFIG_XFS_FS=y |
167 | CONFIG_AUTOFS_FS=m | ||
168 | CONFIG_AUTOFS4_FS=m | 163 | CONFIG_AUTOFS4_FS=m |
169 | CONFIG_ISO9660_FS=m | 164 | CONFIG_ISO9660_FS=m |
170 | CONFIG_JOLIET=y | 165 | CONFIG_JOLIET=y |
@@ -175,16 +170,10 @@ CONFIG_PROC_KCORE=y | |||
175 | CONFIG_TMPFS=y | 170 | CONFIG_TMPFS=y |
176 | CONFIG_HUGETLBFS=y | 171 | CONFIG_HUGETLBFS=y |
177 | CONFIG_NFS_FS=m | 172 | CONFIG_NFS_FS=m |
178 | CONFIG_NFS_V3=y | 173 | CONFIG_NFS_V4=m |
179 | CONFIG_NFS_V4=y | ||
180 | CONFIG_NFSD=m | 174 | CONFIG_NFSD=m |
181 | CONFIG_NFSD_V4=y | 175 | CONFIG_NFSD_V4=y |
182 | CONFIG_SMB_FS=m | ||
183 | CONFIG_SMB_NLS_DEFAULT=y | ||
184 | CONFIG_CIFS=m | 176 | CONFIG_CIFS=m |
185 | CONFIG_PARTITION_ADVANCED=y | ||
186 | CONFIG_SGI_PARTITION=y | ||
187 | CONFIG_EFI_PARTITION=y | ||
188 | CONFIG_NLS_CODEPAGE_437=y | 177 | CONFIG_NLS_CODEPAGE_437=y |
189 | CONFIG_NLS_CODEPAGE_737=m | 178 | CONFIG_NLS_CODEPAGE_737=m |
190 | CONFIG_NLS_CODEPAGE_775=m | 179 | CONFIG_NLS_CODEPAGE_775=m |
@@ -225,11 +214,7 @@ CONFIG_NLS_UTF8=m | |||
225 | CONFIG_MAGIC_SYSRQ=y | 214 | CONFIG_MAGIC_SYSRQ=y |
226 | CONFIG_DEBUG_KERNEL=y | 215 | CONFIG_DEBUG_KERNEL=y |
227 | CONFIG_DEBUG_MUTEXES=y | 216 | CONFIG_DEBUG_MUTEXES=y |
228 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
229 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
230 | CONFIG_CRYPTO_ECB=m | ||
231 | CONFIG_CRYPTO_PCBC=m | 217 | CONFIG_CRYPTO_PCBC=m |
232 | CONFIG_CRYPTO_MD5=y | 218 | CONFIG_CRYPTO_MD5=y |
233 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | 219 | # CONFIG_CRYPTO_ANSI_CPRNG is not set |
234 | CONFIG_CRC_T10DIF=y | 220 | CONFIG_CRC_T10DIF=y |
235 | CONFIG_INTEL_IOMMU=y | ||
diff --git a/arch/ia64/configs/gensparse_defconfig b/arch/ia64/configs/gensparse_defconfig index d663efd1e4db..5b4fcdd51457 100644 --- a/arch/ia64/configs/gensparse_defconfig +++ b/arch/ia64/configs/gensparse_defconfig | |||
@@ -1,4 +1,3 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_SYSVIPC=y | 1 | CONFIG_SYSVIPC=y |
3 | CONFIG_POSIX_MQUEUE=y | 2 | CONFIG_POSIX_MQUEUE=y |
4 | CONFIG_IKCONFIG=y | 3 | CONFIG_IKCONFIG=y |
@@ -9,6 +8,8 @@ CONFIG_KALLSYMS_ALL=y | |||
9 | CONFIG_MODULES=y | 8 | CONFIG_MODULES=y |
10 | CONFIG_MODULE_UNLOAD=y | 9 | CONFIG_MODULE_UNLOAD=y |
11 | CONFIG_MODVERSIONS=y | 10 | CONFIG_MODVERSIONS=y |
11 | CONFIG_PARTITION_ADVANCED=y | ||
12 | CONFIG_SGI_PARTITION=y | ||
12 | CONFIG_MCKINLEY=y | 13 | CONFIG_MCKINLEY=y |
13 | CONFIG_IA64_CYCLONE=y | 14 | CONFIG_IA64_CYCLONE=y |
14 | CONFIG_SMP=y | 15 | CONFIG_SMP=y |
@@ -24,14 +25,12 @@ CONFIG_BINFMT_MISC=m | |||
24 | CONFIG_ACPI_BUTTON=m | 25 | CONFIG_ACPI_BUTTON=m |
25 | CONFIG_ACPI_FAN=m | 26 | CONFIG_ACPI_FAN=m |
26 | CONFIG_ACPI_PROCESSOR=m | 27 | CONFIG_ACPI_PROCESSOR=m |
27 | CONFIG_ACPI_CONTAINER=m | ||
28 | CONFIG_HOTPLUG_PCI=y | 28 | CONFIG_HOTPLUG_PCI=y |
29 | CONFIG_HOTPLUG_PCI_ACPI=m | 29 | CONFIG_NET=y |
30 | CONFIG_PACKET=y | 30 | CONFIG_PACKET=y |
31 | CONFIG_UNIX=y | 31 | CONFIG_UNIX=y |
32 | CONFIG_INET=y | 32 | CONFIG_INET=y |
33 | CONFIG_IP_MULTICAST=y | 33 | CONFIG_IP_MULTICAST=y |
34 | CONFIG_ARPD=y | ||
35 | CONFIG_SYN_COOKIES=y | 34 | CONFIG_SYN_COOKIES=y |
36 | # CONFIG_IPV6 is not set | 35 | # CONFIG_IPV6 is not set |
37 | CONFIG_BLK_DEV_LOOP=m | 36 | CONFIG_BLK_DEV_LOOP=m |
@@ -71,15 +70,12 @@ CONFIG_FUSION_SPI=y | |||
71 | CONFIG_FUSION_FC=m | 70 | CONFIG_FUSION_FC=m |
72 | CONFIG_NETDEVICES=y | 71 | CONFIG_NETDEVICES=y |
73 | CONFIG_DUMMY=m | 72 | CONFIG_DUMMY=m |
74 | CONFIG_NET_ETHERNET=y | 73 | CONFIG_NETCONSOLE=y |
74 | CONFIG_TIGON3=y | ||
75 | CONFIG_NET_TULIP=y | 75 | CONFIG_NET_TULIP=y |
76 | CONFIG_TULIP=m | 76 | CONFIG_TULIP=m |
77 | CONFIG_NET_PCI=y | ||
78 | CONFIG_NET_VENDOR_INTEL=y | ||
79 | CONFIG_E100=m | 77 | CONFIG_E100=m |
80 | CONFIG_E1000=y | 78 | CONFIG_E1000=y |
81 | CONFIG_TIGON3=y | ||
82 | CONFIG_NETCONSOLE=y | ||
83 | # CONFIG_SERIO_SERPORT is not set | 79 | # CONFIG_SERIO_SERPORT is not set |
84 | CONFIG_GAMEPORT=m | 80 | CONFIG_GAMEPORT=m |
85 | CONFIG_SERIAL_NONSTANDARD=y | 81 | CONFIG_SERIAL_NONSTANDARD=y |
@@ -146,7 +142,6 @@ CONFIG_REISERFS_FS_XATTR=y | |||
146 | CONFIG_REISERFS_FS_POSIX_ACL=y | 142 | CONFIG_REISERFS_FS_POSIX_ACL=y |
147 | CONFIG_REISERFS_FS_SECURITY=y | 143 | CONFIG_REISERFS_FS_SECURITY=y |
148 | CONFIG_XFS_FS=y | 144 | CONFIG_XFS_FS=y |
149 | CONFIG_AUTOFS_FS=y | ||
150 | CONFIG_AUTOFS4_FS=y | 145 | CONFIG_AUTOFS4_FS=y |
151 | CONFIG_ISO9660_FS=m | 146 | CONFIG_ISO9660_FS=m |
152 | CONFIG_JOLIET=y | 147 | CONFIG_JOLIET=y |
@@ -157,16 +152,10 @@ CONFIG_PROC_KCORE=y | |||
157 | CONFIG_TMPFS=y | 152 | CONFIG_TMPFS=y |
158 | CONFIG_HUGETLBFS=y | 153 | CONFIG_HUGETLBFS=y |
159 | CONFIG_NFS_FS=m | 154 | CONFIG_NFS_FS=m |
160 | CONFIG_NFS_V3=y | 155 | CONFIG_NFS_V4=m |
161 | CONFIG_NFS_V4=y | ||
162 | CONFIG_NFSD=m | 156 | CONFIG_NFSD=m |
163 | CONFIG_NFSD_V4=y | 157 | CONFIG_NFSD_V4=y |
164 | CONFIG_SMB_FS=m | ||
165 | CONFIG_SMB_NLS_DEFAULT=y | ||
166 | CONFIG_CIFS=m | 158 | CONFIG_CIFS=m |
167 | CONFIG_PARTITION_ADVANCED=y | ||
168 | CONFIG_SGI_PARTITION=y | ||
169 | CONFIG_EFI_PARTITION=y | ||
170 | CONFIG_NLS_CODEPAGE_437=y | 159 | CONFIG_NLS_CODEPAGE_437=y |
171 | CONFIG_NLS_CODEPAGE_737=m | 160 | CONFIG_NLS_CODEPAGE_737=m |
172 | CONFIG_NLS_CODEPAGE_775=m | 161 | CONFIG_NLS_CODEPAGE_775=m |
diff --git a/arch/ia64/configs/sim_defconfig b/arch/ia64/configs/sim_defconfig index b4548a3e82d5..f0f69fdbddae 100644 --- a/arch/ia64/configs/sim_defconfig +++ b/arch/ia64/configs/sim_defconfig | |||
@@ -1,13 +1,12 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_SYSVIPC=y | 1 | CONFIG_SYSVIPC=y |
3 | CONFIG_IKCONFIG=y | 2 | CONFIG_IKCONFIG=y |
4 | CONFIG_IKCONFIG_PROC=y | 3 | CONFIG_IKCONFIG_PROC=y |
5 | CONFIG_LOG_BUF_SHIFT=16 | 4 | CONFIG_LOG_BUF_SHIFT=16 |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
7 | CONFIG_MODULES=y | 5 | CONFIG_MODULES=y |
8 | CONFIG_MODULE_UNLOAD=y | 6 | CONFIG_MODULE_UNLOAD=y |
9 | CONFIG_MODULE_FORCE_UNLOAD=y | 7 | CONFIG_MODULE_FORCE_UNLOAD=y |
10 | CONFIG_MODVERSIONS=y | 8 | CONFIG_MODVERSIONS=y |
9 | CONFIG_PARTITION_ADVANCED=y | ||
11 | CONFIG_IA64_HP_SIM=y | 10 | CONFIG_IA64_HP_SIM=y |
12 | CONFIG_MCKINLEY=y | 11 | CONFIG_MCKINLEY=y |
13 | CONFIG_IA64_PAGE_SIZE_64KB=y | 12 | CONFIG_IA64_PAGE_SIZE_64KB=y |
@@ -27,7 +26,6 @@ CONFIG_BLK_DEV_LOOP=y | |||
27 | CONFIG_BLK_DEV_RAM=y | 26 | CONFIG_BLK_DEV_RAM=y |
28 | CONFIG_SCSI=y | 27 | CONFIG_SCSI=y |
29 | CONFIG_BLK_DEV_SD=y | 28 | CONFIG_BLK_DEV_SD=y |
30 | CONFIG_SCSI_MULTI_LUN=y | ||
31 | CONFIG_SCSI_CONSTANTS=y | 29 | CONFIG_SCSI_CONSTANTS=y |
32 | CONFIG_SCSI_LOGGING=y | 30 | CONFIG_SCSI_LOGGING=y |
33 | CONFIG_SCSI_SPI_ATTRS=y | 31 | CONFIG_SCSI_SPI_ATTRS=y |
@@ -49,8 +47,6 @@ CONFIG_HUGETLBFS=y | |||
49 | CONFIG_NFS_FS=y | 47 | CONFIG_NFS_FS=y |
50 | CONFIG_NFSD=y | 48 | CONFIG_NFSD=y |
51 | CONFIG_NFSD_V3=y | 49 | CONFIG_NFSD_V3=y |
52 | CONFIG_PARTITION_ADVANCED=y | 50 | CONFIG_DEBUG_INFO=y |
53 | CONFIG_EFI_PARTITION=y | ||
54 | CONFIG_DEBUG_KERNEL=y | 51 | CONFIG_DEBUG_KERNEL=y |
55 | CONFIG_DEBUG_MUTEXES=y | 52 | CONFIG_DEBUG_MUTEXES=y |
56 | CONFIG_DEBUG_INFO=y | ||
diff --git a/arch/ia64/configs/tiger_defconfig b/arch/ia64/configs/tiger_defconfig index c8a3f40e77f6..192ed157c9ce 100644 --- a/arch/ia64/configs/tiger_defconfig +++ b/arch/ia64/configs/tiger_defconfig | |||
@@ -1,4 +1,3 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_SYSVIPC=y | 1 | CONFIG_SYSVIPC=y |
3 | CONFIG_POSIX_MQUEUE=y | 2 | CONFIG_POSIX_MQUEUE=y |
4 | CONFIG_IKCONFIG=y | 3 | CONFIG_IKCONFIG=y |
@@ -11,6 +10,8 @@ CONFIG_MODULE_UNLOAD=y | |||
11 | CONFIG_MODVERSIONS=y | 10 | CONFIG_MODVERSIONS=y |
12 | CONFIG_MODULE_SRCVERSION_ALL=y | 11 | CONFIG_MODULE_SRCVERSION_ALL=y |
13 | # CONFIG_BLK_DEV_BSG is not set | 12 | # CONFIG_BLK_DEV_BSG is not set |
13 | CONFIG_PARTITION_ADVANCED=y | ||
14 | CONFIG_SGI_PARTITION=y | ||
14 | CONFIG_IA64_DIG=y | 15 | CONFIG_IA64_DIG=y |
15 | CONFIG_MCKINLEY=y | 16 | CONFIG_MCKINLEY=y |
16 | CONFIG_IA64_PAGE_SIZE_64KB=y | 17 | CONFIG_IA64_PAGE_SIZE_64KB=y |
@@ -29,14 +30,12 @@ CONFIG_BINFMT_MISC=m | |||
29 | CONFIG_ACPI_BUTTON=m | 30 | CONFIG_ACPI_BUTTON=m |
30 | CONFIG_ACPI_FAN=m | 31 | CONFIG_ACPI_FAN=m |
31 | CONFIG_ACPI_PROCESSOR=m | 32 | CONFIG_ACPI_PROCESSOR=m |
32 | CONFIG_ACPI_CONTAINER=m | ||
33 | CONFIG_HOTPLUG_PCI=y | 33 | CONFIG_HOTPLUG_PCI=y |
34 | CONFIG_HOTPLUG_PCI_ACPI=m | 34 | CONFIG_NET=y |
35 | CONFIG_PACKET=y | 35 | CONFIG_PACKET=y |
36 | CONFIG_UNIX=y | 36 | CONFIG_UNIX=y |
37 | CONFIG_INET=y | 37 | CONFIG_INET=y |
38 | CONFIG_IP_MULTICAST=y | 38 | CONFIG_IP_MULTICAST=y |
39 | CONFIG_ARPD=y | ||
40 | CONFIG_SYN_COOKIES=y | 39 | CONFIG_SYN_COOKIES=y |
41 | # CONFIG_IPV6 is not set | 40 | # CONFIG_IPV6 is not set |
42 | CONFIG_BLK_DEV_LOOP=m | 41 | CONFIG_BLK_DEV_LOOP=m |
@@ -53,6 +52,7 @@ CONFIG_BLK_DEV_SD=y | |||
53 | CONFIG_CHR_DEV_ST=m | 52 | CONFIG_CHR_DEV_ST=m |
54 | CONFIG_BLK_DEV_SR=m | 53 | CONFIG_BLK_DEV_SR=m |
55 | CONFIG_CHR_DEV_SG=m | 54 | CONFIG_CHR_DEV_SG=m |
55 | CONFIG_SCSI_FC_ATTRS=y | ||
56 | CONFIG_SCSI_SYM53C8XX_2=y | 56 | CONFIG_SCSI_SYM53C8XX_2=y |
57 | CONFIG_SCSI_QLOGIC_1280=y | 57 | CONFIG_SCSI_QLOGIC_1280=y |
58 | CONFIG_MD=y | 58 | CONFIG_MD=y |
@@ -72,15 +72,12 @@ CONFIG_FUSION_FC=y | |||
72 | CONFIG_FUSION_CTL=y | 72 | CONFIG_FUSION_CTL=y |
73 | CONFIG_NETDEVICES=y | 73 | CONFIG_NETDEVICES=y |
74 | CONFIG_DUMMY=m | 74 | CONFIG_DUMMY=m |
75 | CONFIG_NET_ETHERNET=y | 75 | CONFIG_NETCONSOLE=y |
76 | CONFIG_TIGON3=y | ||
76 | CONFIG_NET_TULIP=y | 77 | CONFIG_NET_TULIP=y |
77 | CONFIG_TULIP=m | 78 | CONFIG_TULIP=m |
78 | CONFIG_NET_PCI=y | ||
79 | CONFIG_NET_VENDOR_INTEL=y | ||
80 | CONFIG_E100=m | 79 | CONFIG_E100=m |
81 | CONFIG_E1000=y | 80 | CONFIG_E1000=y |
82 | CONFIG_TIGON3=y | ||
83 | CONFIG_NETCONSOLE=y | ||
84 | # CONFIG_SERIO_SERPORT is not set | 81 | # CONFIG_SERIO_SERPORT is not set |
85 | CONFIG_GAMEPORT=m | 82 | CONFIG_GAMEPORT=m |
86 | CONFIG_SERIAL_NONSTANDARD=y | 83 | CONFIG_SERIAL_NONSTANDARD=y |
@@ -118,7 +115,6 @@ CONFIG_REISERFS_FS_XATTR=y | |||
118 | CONFIG_REISERFS_FS_POSIX_ACL=y | 115 | CONFIG_REISERFS_FS_POSIX_ACL=y |
119 | CONFIG_REISERFS_FS_SECURITY=y | 116 | CONFIG_REISERFS_FS_SECURITY=y |
120 | CONFIG_XFS_FS=y | 117 | CONFIG_XFS_FS=y |
121 | CONFIG_AUTOFS_FS=y | ||
122 | CONFIG_AUTOFS4_FS=y | 118 | CONFIG_AUTOFS4_FS=y |
123 | CONFIG_ISO9660_FS=m | 119 | CONFIG_ISO9660_FS=m |
124 | CONFIG_JOLIET=y | 120 | CONFIG_JOLIET=y |
@@ -129,16 +125,10 @@ CONFIG_PROC_KCORE=y | |||
129 | CONFIG_TMPFS=y | 125 | CONFIG_TMPFS=y |
130 | CONFIG_HUGETLBFS=y | 126 | CONFIG_HUGETLBFS=y |
131 | CONFIG_NFS_FS=m | 127 | CONFIG_NFS_FS=m |
132 | CONFIG_NFS_V3=y | 128 | CONFIG_NFS_V4=m |
133 | CONFIG_NFS_V4=y | ||
134 | CONFIG_NFSD=m | 129 | CONFIG_NFSD=m |
135 | CONFIG_NFSD_V4=y | 130 | CONFIG_NFSD_V4=y |
136 | CONFIG_SMB_FS=m | ||
137 | CONFIG_SMB_NLS_DEFAULT=y | ||
138 | CONFIG_CIFS=m | 131 | CONFIG_CIFS=m |
139 | CONFIG_PARTITION_ADVANCED=y | ||
140 | CONFIG_SGI_PARTITION=y | ||
141 | CONFIG_EFI_PARTITION=y | ||
142 | CONFIG_NLS_CODEPAGE_437=y | 132 | CONFIG_NLS_CODEPAGE_437=y |
143 | CONFIG_NLS_CODEPAGE_737=m | 133 | CONFIG_NLS_CODEPAGE_737=m |
144 | CONFIG_NLS_CODEPAGE_775=m | 134 | CONFIG_NLS_CODEPAGE_775=m |
@@ -180,6 +170,5 @@ CONFIG_MAGIC_SYSRQ=y | |||
180 | CONFIG_DEBUG_KERNEL=y | 170 | CONFIG_DEBUG_KERNEL=y |
181 | CONFIG_DEBUG_MUTEXES=y | 171 | CONFIG_DEBUG_MUTEXES=y |
182 | CONFIG_IA64_GRANULE_16MB=y | 172 | CONFIG_IA64_GRANULE_16MB=y |
183 | CONFIG_CRYPTO_ECB=m | ||
184 | CONFIG_CRYPTO_PCBC=m | 173 | CONFIG_CRYPTO_PCBC=m |
185 | CONFIG_CRYPTO_MD5=y | 174 | CONFIG_CRYPTO_MD5=y |
diff --git a/arch/ia64/configs/zx1_defconfig b/arch/ia64/configs/zx1_defconfig index 54bc72eda30d..b504c8e2fd52 100644 --- a/arch/ia64/configs/zx1_defconfig +++ b/arch/ia64/configs/zx1_defconfig | |||
@@ -1,9 +1,9 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_SYSVIPC=y | 1 | CONFIG_SYSVIPC=y |
3 | CONFIG_BSD_PROCESS_ACCT=y | 2 | CONFIG_BSD_PROCESS_ACCT=y |
4 | CONFIG_BLK_DEV_INITRD=y | 3 | CONFIG_BLK_DEV_INITRD=y |
5 | CONFIG_KPROBES=y | 4 | CONFIG_KPROBES=y |
6 | CONFIG_MODULES=y | 5 | CONFIG_MODULES=y |
6 | CONFIG_PARTITION_ADVANCED=y | ||
7 | CONFIG_IA64_HP_ZX1=y | 7 | CONFIG_IA64_HP_ZX1=y |
8 | CONFIG_MCKINLEY=y | 8 | CONFIG_MCKINLEY=y |
9 | CONFIG_SMP=y | 9 | CONFIG_SMP=y |
@@ -18,6 +18,7 @@ CONFIG_EFI_VARS=y | |||
18 | CONFIG_BINFMT_MISC=y | 18 | CONFIG_BINFMT_MISC=y |
19 | CONFIG_HOTPLUG_PCI=y | 19 | CONFIG_HOTPLUG_PCI=y |
20 | CONFIG_HOTPLUG_PCI_ACPI=y | 20 | CONFIG_HOTPLUG_PCI_ACPI=y |
21 | CONFIG_NET=y | ||
21 | CONFIG_PACKET=y | 22 | CONFIG_PACKET=y |
22 | CONFIG_UNIX=y | 23 | CONFIG_UNIX=y |
23 | CONFIG_INET=y | 24 | CONFIG_INET=y |
@@ -37,9 +38,9 @@ CONFIG_CHR_DEV_OSST=y | |||
37 | CONFIG_BLK_DEV_SR=y | 38 | CONFIG_BLK_DEV_SR=y |
38 | CONFIG_BLK_DEV_SR_VENDOR=y | 39 | CONFIG_BLK_DEV_SR_VENDOR=y |
39 | CONFIG_CHR_DEV_SG=y | 40 | CONFIG_CHR_DEV_SG=y |
40 | CONFIG_SCSI_MULTI_LUN=y | ||
41 | CONFIG_SCSI_CONSTANTS=y | 41 | CONFIG_SCSI_CONSTANTS=y |
42 | CONFIG_SCSI_LOGGING=y | 42 | CONFIG_SCSI_LOGGING=y |
43 | CONFIG_SCSI_FC_ATTRS=y | ||
43 | CONFIG_SCSI_SYM53C8XX_2=y | 44 | CONFIG_SCSI_SYM53C8XX_2=y |
44 | CONFIG_SCSI_QLOGIC_1280=y | 45 | CONFIG_SCSI_QLOGIC_1280=y |
45 | CONFIG_FUSION=y | 46 | CONFIG_FUSION=y |
@@ -48,18 +49,15 @@ CONFIG_FUSION_FC=y | |||
48 | CONFIG_FUSION_CTL=m | 49 | CONFIG_FUSION_CTL=m |
49 | CONFIG_NETDEVICES=y | 50 | CONFIG_NETDEVICES=y |
50 | CONFIG_DUMMY=y | 51 | CONFIG_DUMMY=y |
51 | CONFIG_NET_ETHERNET=y | 52 | CONFIG_TIGON3=y |
52 | CONFIG_NET_TULIP=y | 53 | CONFIG_NET_TULIP=y |
53 | CONFIG_TULIP=y | 54 | CONFIG_TULIP=y |
54 | CONFIG_TULIP_MWI=y | 55 | CONFIG_TULIP_MWI=y |
55 | CONFIG_TULIP_MMIO=y | 56 | CONFIG_TULIP_MMIO=y |
56 | CONFIG_TULIP_NAPI=y | 57 | CONFIG_TULIP_NAPI=y |
57 | CONFIG_TULIP_NAPI_HW_MITIGATION=y | 58 | CONFIG_TULIP_NAPI_HW_MITIGATION=y |
58 | CONFIG_NET_PCI=y | ||
59 | CONFIG_NET_VENDOR_INTEL=y | ||
60 | CONFIG_E100=y | 59 | CONFIG_E100=y |
61 | CONFIG_E1000=y | 60 | CONFIG_E1000=y |
62 | CONFIG_TIGON3=y | ||
63 | CONFIG_INPUT_JOYDEV=y | 61 | CONFIG_INPUT_JOYDEV=y |
64 | CONFIG_INPUT_EVDEV=y | 62 | CONFIG_INPUT_EVDEV=y |
65 | # CONFIG_INPUT_KEYBOARD is not set | 63 | # CONFIG_INPUT_KEYBOARD is not set |
@@ -100,7 +98,6 @@ CONFIG_USB_STORAGE=y | |||
100 | CONFIG_EXT2_FS=y | 98 | CONFIG_EXT2_FS=y |
101 | CONFIG_EXT2_FS_XATTR=y | 99 | CONFIG_EXT2_FS_XATTR=y |
102 | CONFIG_EXT3_FS=y | 100 | CONFIG_EXT3_FS=y |
103 | CONFIG_AUTOFS_FS=y | ||
104 | CONFIG_ISO9660_FS=y | 101 | CONFIG_ISO9660_FS=y |
105 | CONFIG_JOLIET=y | 102 | CONFIG_JOLIET=y |
106 | CONFIG_UDF_FS=y | 103 | CONFIG_UDF_FS=y |
@@ -110,12 +107,9 @@ CONFIG_PROC_KCORE=y | |||
110 | CONFIG_TMPFS=y | 107 | CONFIG_TMPFS=y |
111 | CONFIG_HUGETLBFS=y | 108 | CONFIG_HUGETLBFS=y |
112 | CONFIG_NFS_FS=y | 109 | CONFIG_NFS_FS=y |
113 | CONFIG_NFS_V3=y | ||
114 | CONFIG_NFS_V4=y | 110 | CONFIG_NFS_V4=y |
115 | CONFIG_NFSD=y | 111 | CONFIG_NFSD=y |
116 | CONFIG_NFSD_V3=y | 112 | CONFIG_NFSD_V3=y |
117 | CONFIG_PARTITION_ADVANCED=y | ||
118 | CONFIG_EFI_PARTITION=y | ||
119 | CONFIG_NLS_CODEPAGE_437=y | 113 | CONFIG_NLS_CODEPAGE_437=y |
120 | CONFIG_NLS_CODEPAGE_737=y | 114 | CONFIG_NLS_CODEPAGE_737=y |
121 | CONFIG_NLS_CODEPAGE_775=y | 115 | CONFIG_NLS_CODEPAGE_775=y |
diff --git a/arch/mips/configs/gpr_defconfig b/arch/mips/configs/gpr_defconfig index 8f219dac9598..e24feb0633aa 100644 --- a/arch/mips/configs/gpr_defconfig +++ b/arch/mips/configs/gpr_defconfig | |||
@@ -19,6 +19,7 @@ CONFIG_MODULE_UNLOAD=y | |||
19 | # CONFIG_BLK_DEV_BSG is not set | 19 | # CONFIG_BLK_DEV_BSG is not set |
20 | CONFIG_PCI=y | 20 | CONFIG_PCI=y |
21 | CONFIG_BINFMT_MISC=m | 21 | CONFIG_BINFMT_MISC=m |
22 | CONFIG_NET=y | ||
22 | CONFIG_PACKET=y | 23 | CONFIG_PACKET=y |
23 | CONFIG_UNIX=y | 24 | CONFIG_UNIX=y |
24 | CONFIG_INET=y | 25 | CONFIG_INET=y |
diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defconfig index cc0756021398..48e16d98b2cc 100644 --- a/arch/mips/configs/ip27_defconfig +++ b/arch/mips/configs/ip27_defconfig | |||
@@ -28,6 +28,7 @@ CONFIG_MIPS32_COMPAT=y | |||
28 | CONFIG_MIPS32_O32=y | 28 | CONFIG_MIPS32_O32=y |
29 | CONFIG_MIPS32_N32=y | 29 | CONFIG_MIPS32_N32=y |
30 | CONFIG_PM=y | 30 | CONFIG_PM=y |
31 | CONFIG_NET=y | ||
31 | CONFIG_PACKET=y | 32 | CONFIG_PACKET=y |
32 | CONFIG_UNIX=y | 33 | CONFIG_UNIX=y |
33 | CONFIG_XFRM_USER=m | 34 | CONFIG_XFRM_USER=m |
diff --git a/arch/mips/configs/jazz_defconfig b/arch/mips/configs/jazz_defconfig index 2575302aa2be..4f37a5985459 100644 --- a/arch/mips/configs/jazz_defconfig +++ b/arch/mips/configs/jazz_defconfig | |||
@@ -18,6 +18,7 @@ CONFIG_MODULE_UNLOAD=y | |||
18 | CONFIG_MODVERSIONS=y | 18 | CONFIG_MODVERSIONS=y |
19 | CONFIG_BINFMT_MISC=m | 19 | CONFIG_BINFMT_MISC=m |
20 | CONFIG_PM=y | 20 | CONFIG_PM=y |
21 | CONFIG_NET=y | ||
21 | CONFIG_PACKET=m | 22 | CONFIG_PACKET=m |
22 | CONFIG_UNIX=y | 23 | CONFIG_UNIX=y |
23 | CONFIG_NET_KEY=m | 24 | CONFIG_NET_KEY=m |
diff --git a/arch/mips/configs/loongson3_defconfig b/arch/mips/configs/loongson3_defconfig index 4cb787ff273e..1c6191ebd583 100644 --- a/arch/mips/configs/loongson3_defconfig +++ b/arch/mips/configs/loongson3_defconfig | |||
@@ -59,6 +59,7 @@ CONFIG_MIPS32_COMPAT=y | |||
59 | CONFIG_MIPS32_O32=y | 59 | CONFIG_MIPS32_O32=y |
60 | CONFIG_MIPS32_N32=y | 60 | CONFIG_MIPS32_N32=y |
61 | CONFIG_PM_RUNTIME=y | 61 | CONFIG_PM_RUNTIME=y |
62 | CONFIG_NET=y | ||
62 | CONFIG_PACKET=y | 63 | CONFIG_PACKET=y |
63 | CONFIG_UNIX=y | 64 | CONFIG_UNIX=y |
64 | CONFIG_XFRM_USER=y | 65 | CONFIG_XFRM_USER=y |
diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig index e18741ea1771..f57b96dcf7df 100644 --- a/arch/mips/configs/malta_defconfig +++ b/arch/mips/configs/malta_defconfig | |||
@@ -19,6 +19,7 @@ CONFIG_MODULE_UNLOAD=y | |||
19 | CONFIG_MODVERSIONS=y | 19 | CONFIG_MODVERSIONS=y |
20 | CONFIG_MODULE_SRCVERSION_ALL=y | 20 | CONFIG_MODULE_SRCVERSION_ALL=y |
21 | CONFIG_PCI=y | 21 | CONFIG_PCI=y |
22 | CONFIG_NET=y | ||
22 | CONFIG_PACKET=y | 23 | CONFIG_PACKET=y |
23 | CONFIG_UNIX=y | 24 | CONFIG_UNIX=y |
24 | CONFIG_XFRM_USER=m | 25 | CONFIG_XFRM_USER=m |
diff --git a/arch/mips/configs/malta_kvm_defconfig b/arch/mips/configs/malta_kvm_defconfig index cf0e01f814e1..d41742dd26c8 100644 --- a/arch/mips/configs/malta_kvm_defconfig +++ b/arch/mips/configs/malta_kvm_defconfig | |||
@@ -20,6 +20,7 @@ CONFIG_MODULE_UNLOAD=y | |||
20 | CONFIG_MODVERSIONS=y | 20 | CONFIG_MODVERSIONS=y |
21 | CONFIG_MODULE_SRCVERSION_ALL=y | 21 | CONFIG_MODULE_SRCVERSION_ALL=y |
22 | CONFIG_PCI=y | 22 | CONFIG_PCI=y |
23 | CONFIG_NET=y | ||
23 | CONFIG_PACKET=y | 24 | CONFIG_PACKET=y |
24 | CONFIG_UNIX=y | 25 | CONFIG_UNIX=y |
25 | CONFIG_XFRM_USER=m | 26 | CONFIG_XFRM_USER=m |
diff --git a/arch/mips/configs/malta_kvm_guest_defconfig b/arch/mips/configs/malta_kvm_guest_defconfig index edd9ec9cb678..a7806e83ea0f 100644 --- a/arch/mips/configs/malta_kvm_guest_defconfig +++ b/arch/mips/configs/malta_kvm_guest_defconfig | |||
@@ -19,6 +19,7 @@ CONFIG_MODULE_UNLOAD=y | |||
19 | CONFIG_MODVERSIONS=y | 19 | CONFIG_MODVERSIONS=y |
20 | CONFIG_MODULE_SRCVERSION_ALL=y | 20 | CONFIG_MODULE_SRCVERSION_ALL=y |
21 | CONFIG_PCI=y | 21 | CONFIG_PCI=y |
22 | CONFIG_NET=y | ||
22 | CONFIG_PACKET=y | 23 | CONFIG_PACKET=y |
23 | CONFIG_UNIX=y | 24 | CONFIG_UNIX=y |
24 | CONFIG_XFRM_USER=m | 25 | CONFIG_XFRM_USER=m |
diff --git a/arch/mips/configs/mtx1_defconfig b/arch/mips/configs/mtx1_defconfig index d269a5326a30..9b6926d6bb32 100644 --- a/arch/mips/configs/mtx1_defconfig +++ b/arch/mips/configs/mtx1_defconfig | |||
@@ -27,6 +27,7 @@ CONFIG_PD6729=m | |||
27 | CONFIG_I82092=m | 27 | CONFIG_I82092=m |
28 | CONFIG_BINFMT_MISC=m | 28 | CONFIG_BINFMT_MISC=m |
29 | CONFIG_PM=y | 29 | CONFIG_PM=y |
30 | CONFIG_NET=y | ||
30 | CONFIG_PACKET=m | 31 | CONFIG_PACKET=m |
31 | CONFIG_UNIX=y | 32 | CONFIG_UNIX=y |
32 | CONFIG_XFRM_USER=m | 33 | CONFIG_XFRM_USER=m |
diff --git a/arch/mips/configs/nlm_xlp_defconfig b/arch/mips/configs/nlm_xlp_defconfig index 2f660e9a0da6..70509a48df82 100644 --- a/arch/mips/configs/nlm_xlp_defconfig +++ b/arch/mips/configs/nlm_xlp_defconfig | |||
@@ -63,6 +63,7 @@ CONFIG_MIPS32_O32=y | |||
63 | CONFIG_MIPS32_N32=y | 63 | CONFIG_MIPS32_N32=y |
64 | CONFIG_PM_RUNTIME=y | 64 | CONFIG_PM_RUNTIME=y |
65 | CONFIG_PM_DEBUG=y | 65 | CONFIG_PM_DEBUG=y |
66 | CONFIG_NET=y | ||
66 | CONFIG_PACKET=y | 67 | CONFIG_PACKET=y |
67 | CONFIG_UNIX=y | 68 | CONFIG_UNIX=y |
68 | CONFIG_XFRM_USER=m | 69 | CONFIG_XFRM_USER=m |
diff --git a/arch/mips/configs/nlm_xlr_defconfig b/arch/mips/configs/nlm_xlr_defconfig index c6f84655c98a..82207e8079f3 100644 --- a/arch/mips/configs/nlm_xlr_defconfig +++ b/arch/mips/configs/nlm_xlr_defconfig | |||
@@ -43,6 +43,7 @@ CONFIG_PCI_DEBUG=y | |||
43 | CONFIG_BINFMT_MISC=m | 43 | CONFIG_BINFMT_MISC=m |
44 | CONFIG_PM_RUNTIME=y | 44 | CONFIG_PM_RUNTIME=y |
45 | CONFIG_PM_DEBUG=y | 45 | CONFIG_PM_DEBUG=y |
46 | CONFIG_NET=y | ||
46 | CONFIG_PACKET=y | 47 | CONFIG_PACKET=y |
47 | CONFIG_UNIX=y | 48 | CONFIG_UNIX=y |
48 | CONFIG_XFRM_USER=m | 49 | CONFIG_XFRM_USER=m |
diff --git a/arch/mips/configs/rm200_defconfig b/arch/mips/configs/rm200_defconfig index 29d79ae8a823..db029f4ff759 100644 --- a/arch/mips/configs/rm200_defconfig +++ b/arch/mips/configs/rm200_defconfig | |||
@@ -20,6 +20,7 @@ CONFIG_MODVERSIONS=y | |||
20 | CONFIG_PCI=y | 20 | CONFIG_PCI=y |
21 | CONFIG_BINFMT_MISC=m | 21 | CONFIG_BINFMT_MISC=m |
22 | CONFIG_PM=y | 22 | CONFIG_PM=y |
23 | CONFIG_NET=y | ||
23 | CONFIG_PACKET=m | 24 | CONFIG_PACKET=m |
24 | CONFIG_UNIX=y | 25 | CONFIG_UNIX=y |
25 | CONFIG_NET_KEY=m | 26 | CONFIG_NET_KEY=m |
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index 7187664034c3..5db8882f732c 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile | |||
@@ -48,7 +48,12 @@ cflags-y := -pipe | |||
48 | 48 | ||
49 | # These flags should be implied by an hppa-linux configuration, but they | 49 | # These flags should be implied by an hppa-linux configuration, but they |
50 | # are not in gcc 3.2. | 50 | # are not in gcc 3.2. |
51 | cflags-y += -mno-space-regs -mfast-indirect-calls | 51 | cflags-y += -mno-space-regs |
52 | |||
53 | # -mfast-indirect-calls is only relevant for 32-bit kernels. | ||
54 | ifndef CONFIG_64BIT | ||
55 | cflags-y += -mfast-indirect-calls | ||
56 | endif | ||
52 | 57 | ||
53 | # Currently we save and restore fpregs on all kernel entry/interruption paths. | 58 | # Currently we save and restore fpregs on all kernel entry/interruption paths. |
54 | # If that gets optimized, we might need to disable the use of fpregs in the | 59 | # If that gets optimized, we might need to disable the use of fpregs in the |
diff --git a/arch/parisc/configs/a500_defconfig b/arch/parisc/configs/a500_defconfig index 90025322b75e..0490199d7b15 100644 --- a/arch/parisc/configs/a500_defconfig +++ b/arch/parisc/configs/a500_defconfig | |||
@@ -31,6 +31,7 @@ CONFIG_PD6729=m | |||
31 | CONFIG_I82092=m | 31 | CONFIG_I82092=m |
32 | # CONFIG_SUPERIO is not set | 32 | # CONFIG_SUPERIO is not set |
33 | # CONFIG_CHASSIS_LCD_LED is not set | 33 | # CONFIG_CHASSIS_LCD_LED is not set |
34 | CONFIG_NET=y | ||
34 | CONFIG_PACKET=y | 35 | CONFIG_PACKET=y |
35 | CONFIG_UNIX=y | 36 | CONFIG_UNIX=y |
36 | CONFIG_XFRM_USER=m | 37 | CONFIG_XFRM_USER=m |
diff --git a/arch/parisc/configs/c8000_defconfig b/arch/parisc/configs/c8000_defconfig index 8249ac9d9cfc..269c23d23fcb 100644 --- a/arch/parisc/configs/c8000_defconfig +++ b/arch/parisc/configs/c8000_defconfig | |||
@@ -33,6 +33,7 @@ CONFIG_PCI_LBA=y | |||
33 | # CONFIG_PDC_CHASSIS_WARN is not set | 33 | # CONFIG_PDC_CHASSIS_WARN is not set |
34 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | 34 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
35 | CONFIG_BINFMT_MISC=m | 35 | CONFIG_BINFMT_MISC=m |
36 | CONFIG_NET=y | ||
36 | CONFIG_PACKET=y | 37 | CONFIG_PACKET=y |
37 | CONFIG_UNIX=y | 38 | CONFIG_UNIX=y |
38 | CONFIG_XFRM_USER=m | 39 | CONFIG_XFRM_USER=m |
diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c index 3bab72462ab5..92438c21d453 100644 --- a/arch/parisc/kernel/ptrace.c +++ b/arch/parisc/kernel/ptrace.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/user.h> | 17 | #include <linux/user.h> |
18 | #include <linux/personality.h> | 18 | #include <linux/personality.h> |
19 | #include <linux/security.h> | 19 | #include <linux/security.h> |
20 | #include <linux/seccomp.h> | ||
20 | #include <linux/compat.h> | 21 | #include <linux/compat.h> |
21 | #include <linux/signal.h> | 22 | #include <linux/signal.h> |
22 | #include <linux/audit.h> | 23 | #include <linux/audit.h> |
@@ -271,10 +272,7 @@ long do_syscall_trace_enter(struct pt_regs *regs) | |||
271 | long ret = 0; | 272 | long ret = 0; |
272 | 273 | ||
273 | /* Do the secure computing check first. */ | 274 | /* Do the secure computing check first. */ |
274 | if (secure_computing(regs->gr[20])) { | 275 | secure_computing_strict(regs->gr[20]); |
275 | /* seccomp failures shouldn't expose any additional code. */ | ||
276 | return -1; | ||
277 | } | ||
278 | 276 | ||
279 | if (test_thread_flag(TIF_SYSCALL_TRACE) && | 277 | if (test_thread_flag(TIF_SYSCALL_TRACE) && |
280 | tracehook_report_syscall_entry(regs)) | 278 | tracehook_report_syscall_entry(regs)) |
diff --git a/arch/powerpc/configs/c2k_defconfig b/arch/powerpc/configs/c2k_defconfig index 5e2aa43562b5..59734916986a 100644 --- a/arch/powerpc/configs/c2k_defconfig +++ b/arch/powerpc/configs/c2k_defconfig | |||
@@ -29,6 +29,7 @@ CONFIG_PM=y | |||
29 | CONFIG_PCI_MSI=y | 29 | CONFIG_PCI_MSI=y |
30 | CONFIG_HOTPLUG_PCI=y | 30 | CONFIG_HOTPLUG_PCI=y |
31 | CONFIG_HOTPLUG_PCI_SHPC=m | 31 | CONFIG_HOTPLUG_PCI_SHPC=m |
32 | CONFIG_NET=y | ||
32 | CONFIG_PACKET=y | 33 | CONFIG_PACKET=y |
33 | CONFIG_UNIX=y | 34 | CONFIG_UNIX=y |
34 | CONFIG_XFRM_USER=y | 35 | CONFIG_XFRM_USER=y |
diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig index 553e66278010..0351b5ffdfef 100644 --- a/arch/powerpc/configs/pmac32_defconfig +++ b/arch/powerpc/configs/pmac32_defconfig | |||
@@ -31,6 +31,7 @@ CONFIG_HIBERNATION=y | |||
31 | CONFIG_APM_EMULATION=y | 31 | CONFIG_APM_EMULATION=y |
32 | CONFIG_PCCARD=m | 32 | CONFIG_PCCARD=m |
33 | CONFIG_YENTA=m | 33 | CONFIG_YENTA=m |
34 | CONFIG_NET=y | ||
34 | CONFIG_PACKET=y | 35 | CONFIG_PACKET=y |
35 | CONFIG_UNIX=y | 36 | CONFIG_UNIX=y |
36 | CONFIG_XFRM_USER=y | 37 | CONFIG_XFRM_USER=y |
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig index f6c02f8cdc62..36518870e6b2 100644 --- a/arch/powerpc/configs/ppc64_defconfig +++ b/arch/powerpc/configs/ppc64_defconfig | |||
@@ -58,6 +58,7 @@ CONFIG_ELECTRA_CF=y | |||
58 | CONFIG_HOTPLUG_PCI=y | 58 | CONFIG_HOTPLUG_PCI=y |
59 | CONFIG_HOTPLUG_PCI_RPA=m | 59 | CONFIG_HOTPLUG_PCI_RPA=m |
60 | CONFIG_HOTPLUG_PCI_RPA_DLPAR=m | 60 | CONFIG_HOTPLUG_PCI_RPA_DLPAR=m |
61 | CONFIG_NET=y | ||
61 | CONFIG_PACKET=y | 62 | CONFIG_PACKET=y |
62 | CONFIG_UNIX=y | 63 | CONFIG_UNIX=y |
63 | CONFIG_XFRM_USER=m | 64 | CONFIG_XFRM_USER=m |
diff --git a/arch/powerpc/configs/ppc64e_defconfig b/arch/powerpc/configs/ppc64e_defconfig index 587f5514f9b1..c3a3269b0865 100644 --- a/arch/powerpc/configs/ppc64e_defconfig +++ b/arch/powerpc/configs/ppc64e_defconfig | |||
@@ -33,6 +33,7 @@ CONFIG_SPARSEMEM_MANUAL=y | |||
33 | CONFIG_PCI_MSI=y | 33 | CONFIG_PCI_MSI=y |
34 | CONFIG_PCCARD=y | 34 | CONFIG_PCCARD=y |
35 | CONFIG_HOTPLUG_PCI=y | 35 | CONFIG_HOTPLUG_PCI=y |
36 | CONFIG_NET=y | ||
36 | CONFIG_PACKET=y | 37 | CONFIG_PACKET=y |
37 | CONFIG_UNIX=y | 38 | CONFIG_UNIX=y |
38 | CONFIG_XFRM_USER=m | 39 | CONFIG_XFRM_USER=m |
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig index 50375f1f59e7..dd2a9cab4b50 100644 --- a/arch/powerpc/configs/pseries_defconfig +++ b/arch/powerpc/configs/pseries_defconfig | |||
@@ -53,6 +53,7 @@ CONFIG_SCHED_SMT=y | |||
53 | CONFIG_HOTPLUG_PCI=y | 53 | CONFIG_HOTPLUG_PCI=y |
54 | CONFIG_HOTPLUG_PCI_RPA=m | 54 | CONFIG_HOTPLUG_PCI_RPA=m |
55 | CONFIG_HOTPLUG_PCI_RPA_DLPAR=m | 55 | CONFIG_HOTPLUG_PCI_RPA_DLPAR=m |
56 | CONFIG_NET=y | ||
56 | CONFIG_PACKET=y | 57 | CONFIG_PACKET=y |
57 | CONFIG_UNIX=y | 58 | CONFIG_UNIX=y |
58 | CONFIG_XFRM_USER=m | 59 | CONFIG_XFRM_USER=m |
diff --git a/arch/powerpc/configs/pseries_le_defconfig b/arch/powerpc/configs/pseries_le_defconfig index 4428ee428f4e..63392f4b29a4 100644 --- a/arch/powerpc/configs/pseries_le_defconfig +++ b/arch/powerpc/configs/pseries_le_defconfig | |||
@@ -55,6 +55,7 @@ CONFIG_SCHED_SMT=y | |||
55 | CONFIG_HOTPLUG_PCI=y | 55 | CONFIG_HOTPLUG_PCI=y |
56 | CONFIG_HOTPLUG_PCI_RPA=m | 56 | CONFIG_HOTPLUG_PCI_RPA=m |
57 | CONFIG_HOTPLUG_PCI_RPA_DLPAR=m | 57 | CONFIG_HOTPLUG_PCI_RPA_DLPAR=m |
58 | CONFIG_NET=y | ||
58 | CONFIG_PACKET=y | 59 | CONFIG_PACKET=y |
59 | CONFIG_UNIX=y | 60 | CONFIG_UNIX=y |
60 | CONFIG_XFRM_USER=m | 61 | CONFIG_XFRM_USER=m |
diff --git a/arch/s390/configs/default_defconfig b/arch/s390/configs/default_defconfig index 3ca1894ade09..9d94fdd9f525 100644 --- a/arch/s390/configs/default_defconfig +++ b/arch/s390/configs/default_defconfig | |||
@@ -63,6 +63,7 @@ CONFIG_CRASH_DUMP=y | |||
63 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | 63 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
64 | CONFIG_BINFMT_MISC=m | 64 | CONFIG_BINFMT_MISC=m |
65 | CONFIG_HIBERNATION=y | 65 | CONFIG_HIBERNATION=y |
66 | CONFIG_NET=y | ||
66 | CONFIG_PACKET=y | 67 | CONFIG_PACKET=y |
67 | CONFIG_PACKET_DIAG=m | 68 | CONFIG_PACKET_DIAG=m |
68 | CONFIG_UNIX=y | 69 | CONFIG_UNIX=y |
diff --git a/arch/s390/configs/gcov_defconfig b/arch/s390/configs/gcov_defconfig index 4830aa6e6f53..90f514baa37d 100644 --- a/arch/s390/configs/gcov_defconfig +++ b/arch/s390/configs/gcov_defconfig | |||
@@ -61,6 +61,7 @@ CONFIG_CRASH_DUMP=y | |||
61 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | 61 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
62 | CONFIG_BINFMT_MISC=m | 62 | CONFIG_BINFMT_MISC=m |
63 | CONFIG_HIBERNATION=y | 63 | CONFIG_HIBERNATION=y |
64 | CONFIG_NET=y | ||
64 | CONFIG_PACKET=y | 65 | CONFIG_PACKET=y |
65 | CONFIG_PACKET_DIAG=m | 66 | CONFIG_PACKET_DIAG=m |
66 | CONFIG_UNIX=y | 67 | CONFIG_UNIX=y |
diff --git a/arch/s390/configs/performance_defconfig b/arch/s390/configs/performance_defconfig index 61db449bf309..13559d32af69 100644 --- a/arch/s390/configs/performance_defconfig +++ b/arch/s390/configs/performance_defconfig | |||
@@ -59,6 +59,7 @@ CONFIG_CRASH_DUMP=y | |||
59 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | 59 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
60 | CONFIG_BINFMT_MISC=m | 60 | CONFIG_BINFMT_MISC=m |
61 | CONFIG_HIBERNATION=y | 61 | CONFIG_HIBERNATION=y |
62 | CONFIG_NET=y | ||
62 | CONFIG_PACKET=y | 63 | CONFIG_PACKET=y |
63 | CONFIG_PACKET_DIAG=m | 64 | CONFIG_PACKET_DIAG=m |
64 | CONFIG_UNIX=y | 65 | CONFIG_UNIX=y |
diff --git a/arch/s390/configs/zfcpdump_defconfig b/arch/s390/configs/zfcpdump_defconfig index 948e0e057a23..e376789f2d8d 100644 --- a/arch/s390/configs/zfcpdump_defconfig +++ b/arch/s390/configs/zfcpdump_defconfig | |||
@@ -23,6 +23,7 @@ CONFIG_CRASH_DUMP=y | |||
23 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | 23 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
24 | # CONFIG_SECCOMP is not set | 24 | # CONFIG_SECCOMP is not set |
25 | # CONFIG_IUCV is not set | 25 | # CONFIG_IUCV is not set |
26 | CONFIG_NET=y | ||
26 | CONFIG_ATM=y | 27 | CONFIG_ATM=y |
27 | CONFIG_ATM_LANE=y | 28 | CONFIG_ATM_LANE=y |
28 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 29 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index 2e56498a40df..fab35a8efa4f 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig | |||
@@ -50,6 +50,7 @@ CONFIG_CMA=y | |||
50 | CONFIG_CRASH_DUMP=y | 50 | CONFIG_CRASH_DUMP=y |
51 | CONFIG_BINFMT_MISC=m | 51 | CONFIG_BINFMT_MISC=m |
52 | CONFIG_HIBERNATION=y | 52 | CONFIG_HIBERNATION=y |
53 | CONFIG_NET=y | ||
53 | CONFIG_PACKET=y | 54 | CONFIG_PACKET=y |
54 | CONFIG_UNIX=y | 55 | CONFIG_UNIX=y |
55 | CONFIG_NET_KEY=y | 56 | CONFIG_NET_KEY=y |
diff --git a/arch/sh/configs/sdk7780_defconfig b/arch/sh/configs/sdk7780_defconfig index 6a96b9a2f7a5..bbd4c2298708 100644 --- a/arch/sh/configs/sdk7780_defconfig +++ b/arch/sh/configs/sdk7780_defconfig | |||
@@ -30,6 +30,7 @@ CONFIG_PCI_DEBUG=y | |||
30 | CONFIG_PCCARD=y | 30 | CONFIG_PCCARD=y |
31 | CONFIG_YENTA=y | 31 | CONFIG_YENTA=y |
32 | CONFIG_HOTPLUG_PCI=y | 32 | CONFIG_HOTPLUG_PCI=y |
33 | CONFIG_NET=y | ||
33 | CONFIG_PACKET=y | 34 | CONFIG_PACKET=y |
34 | CONFIG_UNIX=y | 35 | CONFIG_UNIX=y |
35 | CONFIG_INET=y | 36 | CONFIG_INET=y |
diff --git a/arch/sh/configs/sh2007_defconfig b/arch/sh/configs/sh2007_defconfig index e741b1e36acd..df25ae774ee0 100644 --- a/arch/sh/configs/sh2007_defconfig +++ b/arch/sh/configs/sh2007_defconfig | |||
@@ -25,6 +25,7 @@ CONFIG_CMDLINE_OVERWRITE=y | |||
25 | CONFIG_CMDLINE="console=ttySC1,115200 ip=dhcp root=/dev/nfs rw nfsroot=/nfs/rootfs,rsize=1024,wsize=1024 earlyprintk=sh-sci.1" | 25 | CONFIG_CMDLINE="console=ttySC1,115200 ip=dhcp root=/dev/nfs rw nfsroot=/nfs/rootfs,rsize=1024,wsize=1024 earlyprintk=sh-sci.1" |
26 | CONFIG_PCCARD=y | 26 | CONFIG_PCCARD=y |
27 | CONFIG_BINFMT_MISC=y | 27 | CONFIG_BINFMT_MISC=y |
28 | CONFIG_NET=y | ||
28 | CONFIG_PACKET=y | 29 | CONFIG_PACKET=y |
29 | CONFIG_UNIX=y | 30 | CONFIG_UNIX=y |
30 | CONFIG_XFRM_USER=y | 31 | CONFIG_XFRM_USER=y |
diff --git a/arch/sparc/configs/sparc64_defconfig b/arch/sparc/configs/sparc64_defconfig index 9d8521b8c854..6b68f12f29db 100644 --- a/arch/sparc/configs/sparc64_defconfig +++ b/arch/sparc/configs/sparc64_defconfig | |||
@@ -29,6 +29,7 @@ CONFIG_PCI=y | |||
29 | CONFIG_PCI_MSI=y | 29 | CONFIG_PCI_MSI=y |
30 | CONFIG_SUN_OPENPROMFS=m | 30 | CONFIG_SUN_OPENPROMFS=m |
31 | CONFIG_BINFMT_MISC=m | 31 | CONFIG_BINFMT_MISC=m |
32 | CONFIG_NET=y | ||
32 | CONFIG_PACKET=y | 33 | CONFIG_PACKET=y |
33 | CONFIG_UNIX=y | 34 | CONFIG_UNIX=y |
34 | CONFIG_XFRM_USER=m | 35 | CONFIG_XFRM_USER=m |
diff --git a/arch/sparc/net/bpf_jit_asm.S b/arch/sparc/net/bpf_jit_asm.S index 9d016c7017f7..8c83f4b8eb15 100644 --- a/arch/sparc/net/bpf_jit_asm.S +++ b/arch/sparc/net/bpf_jit_asm.S | |||
@@ -6,10 +6,12 @@ | |||
6 | #define SAVE_SZ 176 | 6 | #define SAVE_SZ 176 |
7 | #define SCRATCH_OFF STACK_BIAS + 128 | 7 | #define SCRATCH_OFF STACK_BIAS + 128 |
8 | #define BE_PTR(label) be,pn %xcc, label | 8 | #define BE_PTR(label) be,pn %xcc, label |
9 | #define SIGN_EXTEND(reg) sra reg, 0, reg | ||
9 | #else | 10 | #else |
10 | #define SAVE_SZ 96 | 11 | #define SAVE_SZ 96 |
11 | #define SCRATCH_OFF 72 | 12 | #define SCRATCH_OFF 72 |
12 | #define BE_PTR(label) be label | 13 | #define BE_PTR(label) be label |
14 | #define SIGN_EXTEND(reg) | ||
13 | #endif | 15 | #endif |
14 | 16 | ||
15 | #define SKF_MAX_NEG_OFF (-0x200000) /* SKF_LL_OFF from filter.h */ | 17 | #define SKF_MAX_NEG_OFF (-0x200000) /* SKF_LL_OFF from filter.h */ |
@@ -135,6 +137,7 @@ bpf_slow_path_byte_msh: | |||
135 | save %sp, -SAVE_SZ, %sp; \ | 137 | save %sp, -SAVE_SZ, %sp; \ |
136 | mov %i0, %o0; \ | 138 | mov %i0, %o0; \ |
137 | mov r_OFF, %o1; \ | 139 | mov r_OFF, %o1; \ |
140 | SIGN_EXTEND(%o1); \ | ||
138 | call bpf_internal_load_pointer_neg_helper; \ | 141 | call bpf_internal_load_pointer_neg_helper; \ |
139 | mov (LEN), %o2; \ | 142 | mov (LEN), %o2; \ |
140 | mov %o0, r_TMP; \ | 143 | mov %o0, r_TMP; \ |
diff --git a/arch/sparc/net/bpf_jit_comp.c b/arch/sparc/net/bpf_jit_comp.c index 7c06f18150ab..c1c60c32f6dd 100644 --- a/arch/sparc/net/bpf_jit_comp.c +++ b/arch/sparc/net/bpf_jit_comp.c | |||
@@ -184,7 +184,7 @@ do { \ | |||
184 | */ | 184 | */ |
185 | #define emit_alu_K(OPCODE, K) \ | 185 | #define emit_alu_K(OPCODE, K) \ |
186 | do { \ | 186 | do { \ |
187 | if (K) { \ | 187 | if (K || OPCODE == AND || OPCODE == MUL) { \ |
188 | unsigned int _insn = OPCODE; \ | 188 | unsigned int _insn = OPCODE; \ |
189 | _insn |= RS1(r_A) | RD(r_A); \ | 189 | _insn |= RS1(r_A) | RD(r_A); \ |
190 | if (is_simm13(K)) { \ | 190 | if (is_simm13(K)) { \ |
diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S index d6b8aa4c986c..cbed1407a5cd 100644 --- a/arch/x86/boot/compressed/head_32.S +++ b/arch/x86/boot/compressed/head_32.S | |||
@@ -30,33 +30,6 @@ | |||
30 | #include <asm/boot.h> | 30 | #include <asm/boot.h> |
31 | #include <asm/asm-offsets.h> | 31 | #include <asm/asm-offsets.h> |
32 | 32 | ||
33 | /* | ||
34 | * Adjust our own GOT | ||
35 | * | ||
36 | * The relocation base must be in %ebx | ||
37 | * | ||
38 | * It is safe to call this macro more than once, because in some of the | ||
39 | * code paths multiple invocations are inevitable, e.g. via the efi* | ||
40 | * entry points. | ||
41 | * | ||
42 | * Relocation is only performed the first time. | ||
43 | */ | ||
44 | .macro FIXUP_GOT | ||
45 | cmpb $1, got_fixed(%ebx) | ||
46 | je 2f | ||
47 | |||
48 | leal _got(%ebx), %edx | ||
49 | leal _egot(%ebx), %ecx | ||
50 | 1: | ||
51 | cmpl %ecx, %edx | ||
52 | jae 2f | ||
53 | addl %ebx, (%edx) | ||
54 | addl $4, %edx | ||
55 | jmp 1b | ||
56 | 2: | ||
57 | movb $1, got_fixed(%ebx) | ||
58 | .endm | ||
59 | |||
60 | __HEAD | 33 | __HEAD |
61 | ENTRY(startup_32) | 34 | ENTRY(startup_32) |
62 | #ifdef CONFIG_EFI_STUB | 35 | #ifdef CONFIG_EFI_STUB |
@@ -83,9 +56,6 @@ ENTRY(efi_pe_entry) | |||
83 | add %esi, 88(%eax) | 56 | add %esi, 88(%eax) |
84 | pushl %eax | 57 | pushl %eax |
85 | 58 | ||
86 | movl %esi, %ebx | ||
87 | FIXUP_GOT | ||
88 | |||
89 | call make_boot_params | 59 | call make_boot_params |
90 | cmpl $0, %eax | 60 | cmpl $0, %eax |
91 | je fail | 61 | je fail |
@@ -111,10 +81,6 @@ ENTRY(efi32_stub_entry) | |||
111 | leal efi32_config(%esi), %eax | 81 | leal efi32_config(%esi), %eax |
112 | add %esi, 88(%eax) | 82 | add %esi, 88(%eax) |
113 | pushl %eax | 83 | pushl %eax |
114 | |||
115 | movl %esi, %ebx | ||
116 | FIXUP_GOT | ||
117 | |||
118 | 2: | 84 | 2: |
119 | call efi_main | 85 | call efi_main |
120 | cmpl $0, %eax | 86 | cmpl $0, %eax |
@@ -224,7 +190,19 @@ relocated: | |||
224 | shrl $2, %ecx | 190 | shrl $2, %ecx |
225 | rep stosl | 191 | rep stosl |
226 | 192 | ||
227 | FIXUP_GOT | 193 | /* |
194 | * Adjust our own GOT | ||
195 | */ | ||
196 | leal _got(%ebx), %edx | ||
197 | leal _egot(%ebx), %ecx | ||
198 | 1: | ||
199 | cmpl %ecx, %edx | ||
200 | jae 2f | ||
201 | addl %ebx, (%edx) | ||
202 | addl $4, %edx | ||
203 | jmp 1b | ||
204 | 2: | ||
205 | |||
228 | /* | 206 | /* |
229 | * Do the decompression, and jump to the new kernel.. | 207 | * Do the decompression, and jump to the new kernel.. |
230 | */ | 208 | */ |
@@ -247,12 +225,8 @@ relocated: | |||
247 | xorl %ebx, %ebx | 225 | xorl %ebx, %ebx |
248 | jmp *%eax | 226 | jmp *%eax |
249 | 227 | ||
250 | .data | ||
251 | /* Have we relocated the GOT? */ | ||
252 | got_fixed: | ||
253 | .byte 0 | ||
254 | |||
255 | #ifdef CONFIG_EFI_STUB | 228 | #ifdef CONFIG_EFI_STUB |
229 | .data | ||
256 | efi32_config: | 230 | efi32_config: |
257 | .fill 11,8,0 | 231 | .fill 11,8,0 |
258 | .long efi_call_phys | 232 | .long efi_call_phys |
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S index 50f69c7eaaf4..2884e0c3e8a5 100644 --- a/arch/x86/boot/compressed/head_64.S +++ b/arch/x86/boot/compressed/head_64.S | |||
@@ -32,33 +32,6 @@ | |||
32 | #include <asm/processor-flags.h> | 32 | #include <asm/processor-flags.h> |
33 | #include <asm/asm-offsets.h> | 33 | #include <asm/asm-offsets.h> |
34 | 34 | ||
35 | /* | ||
36 | * Adjust our own GOT | ||
37 | * | ||
38 | * The relocation base must be in %rbx | ||
39 | * | ||
40 | * It is safe to call this macro more than once, because in some of the | ||
41 | * code paths multiple invocations are inevitable, e.g. via the efi* | ||
42 | * entry points. | ||
43 | * | ||
44 | * Relocation is only performed the first time. | ||
45 | */ | ||
46 | .macro FIXUP_GOT | ||
47 | cmpb $1, got_fixed(%rip) | ||
48 | je 2f | ||
49 | |||
50 | leaq _got(%rip), %rdx | ||
51 | leaq _egot(%rip), %rcx | ||
52 | 1: | ||
53 | cmpq %rcx, %rdx | ||
54 | jae 2f | ||
55 | addq %rbx, (%rdx) | ||
56 | addq $8, %rdx | ||
57 | jmp 1b | ||
58 | 2: | ||
59 | movb $1, got_fixed(%rip) | ||
60 | .endm | ||
61 | |||
62 | __HEAD | 35 | __HEAD |
63 | .code32 | 36 | .code32 |
64 | ENTRY(startup_32) | 37 | ENTRY(startup_32) |
@@ -279,13 +252,10 @@ ENTRY(efi_pe_entry) | |||
279 | subq $1b, %rbp | 252 | subq $1b, %rbp |
280 | 253 | ||
281 | /* | 254 | /* |
282 | * Relocate efi_config->call() and the GOT entries. | 255 | * Relocate efi_config->call(). |
283 | */ | 256 | */ |
284 | addq %rbp, efi64_config+88(%rip) | 257 | addq %rbp, efi64_config+88(%rip) |
285 | 258 | ||
286 | movq %rbp, %rbx | ||
287 | FIXUP_GOT | ||
288 | |||
289 | movq %rax, %rdi | 259 | movq %rax, %rdi |
290 | call make_boot_params | 260 | call make_boot_params |
291 | cmpq $0,%rax | 261 | cmpq $0,%rax |
@@ -301,13 +271,10 @@ handover_entry: | |||
301 | subq $1b, %rbp | 271 | subq $1b, %rbp |
302 | 272 | ||
303 | /* | 273 | /* |
304 | * Relocate efi_config->call() and the GOT entries. | 274 | * Relocate efi_config->call(). |
305 | */ | 275 | */ |
306 | movq efi_config(%rip), %rax | 276 | movq efi_config(%rip), %rax |
307 | addq %rbp, 88(%rax) | 277 | addq %rbp, 88(%rax) |
308 | |||
309 | movq %rbp, %rbx | ||
310 | FIXUP_GOT | ||
311 | 2: | 278 | 2: |
312 | movq efi_config(%rip), %rdi | 279 | movq efi_config(%rip), %rdi |
313 | call efi_main | 280 | call efi_main |
@@ -418,8 +385,19 @@ relocated: | |||
418 | shrq $3, %rcx | 385 | shrq $3, %rcx |
419 | rep stosq | 386 | rep stosq |
420 | 387 | ||
421 | FIXUP_GOT | 388 | /* |
422 | 389 | * Adjust our own GOT | |
390 | */ | ||
391 | leaq _got(%rip), %rdx | ||
392 | leaq _egot(%rip), %rcx | ||
393 | 1: | ||
394 | cmpq %rcx, %rdx | ||
395 | jae 2f | ||
396 | addq %rbx, (%rdx) | ||
397 | addq $8, %rdx | ||
398 | jmp 1b | ||
399 | 2: | ||
400 | |||
423 | /* | 401 | /* |
424 | * Do the decompression, and jump to the new kernel.. | 402 | * Do the decompression, and jump to the new kernel.. |
425 | */ | 403 | */ |
@@ -459,10 +437,6 @@ gdt: | |||
459 | .quad 0x0000000000000000 /* TS continued */ | 437 | .quad 0x0000000000000000 /* TS continued */ |
460 | gdt_end: | 438 | gdt_end: |
461 | 439 | ||
462 | /* Have we relocated the GOT? */ | ||
463 | got_fixed: | ||
464 | .byte 0 | ||
465 | |||
466 | #ifdef CONFIG_EFI_STUB | 440 | #ifdef CONFIG_EFI_STUB |
467 | efi_config: | 441 | efi_config: |
468 | .quad 0 | 442 | .quad 0 |
diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c index 888950f29fd9..a7ccd57f19e4 100644 --- a/arch/x86/crypto/aesni-intel_glue.c +++ b/arch/x86/crypto/aesni-intel_glue.c | |||
@@ -481,7 +481,7 @@ static void ctr_crypt_final(struct crypto_aes_ctx *ctx, | |||
481 | crypto_inc(ctrblk, AES_BLOCK_SIZE); | 481 | crypto_inc(ctrblk, AES_BLOCK_SIZE); |
482 | } | 482 | } |
483 | 483 | ||
484 | #ifdef CONFIG_AS_AVX | 484 | #if 0 /* temporary disabled due to failing crypto tests */ |
485 | static void aesni_ctr_enc_avx_tfm(struct crypto_aes_ctx *ctx, u8 *out, | 485 | static void aesni_ctr_enc_avx_tfm(struct crypto_aes_ctx *ctx, u8 *out, |
486 | const u8 *in, unsigned int len, u8 *iv) | 486 | const u8 *in, unsigned int len, u8 *iv) |
487 | { | 487 | { |
@@ -1522,7 +1522,7 @@ static int __init aesni_init(void) | |||
1522 | aesni_gcm_dec_tfm = aesni_gcm_dec; | 1522 | aesni_gcm_dec_tfm = aesni_gcm_dec; |
1523 | } | 1523 | } |
1524 | aesni_ctr_enc_tfm = aesni_ctr_enc; | 1524 | aesni_ctr_enc_tfm = aesni_ctr_enc; |
1525 | #ifdef CONFIG_AS_AVX | 1525 | #if 0 /* temporary disabled due to failing crypto tests */ |
1526 | if (cpu_has_avx) { | 1526 | if (cpu_has_avx) { |
1527 | /* optimize performance of ctr mode encryption transform */ | 1527 | /* optimize performance of ctr mode encryption transform */ |
1528 | aesni_ctr_enc_tfm = aesni_ctr_enc_avx_tfm; | 1528 | aesni_ctr_enc_tfm = aesni_ctr_enc_avx_tfm; |
diff --git a/block/blk-exec.c b/block/blk-exec.c index f4d27b12c90b..9924725fa50d 100644 --- a/block/blk-exec.c +++ b/block/blk-exec.c | |||
@@ -56,6 +56,7 @@ void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk, | |||
56 | bool is_pm_resume; | 56 | bool is_pm_resume; |
57 | 57 | ||
58 | WARN_ON(irqs_disabled()); | 58 | WARN_ON(irqs_disabled()); |
59 | WARN_ON(rq->cmd_type == REQ_TYPE_FS); | ||
59 | 60 | ||
60 | rq->rq_disk = bd_disk; | 61 | rq->rq_disk = bd_disk; |
61 | rq->end_io = done; | 62 | rq->end_io = done; |
diff --git a/block/blk-mq.c b/block/blk-mq.c index 383ea0cb1f0a..df8e1e09dd17 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c | |||
@@ -119,7 +119,16 @@ void blk_mq_freeze_queue(struct request_queue *q) | |||
119 | spin_unlock_irq(q->queue_lock); | 119 | spin_unlock_irq(q->queue_lock); |
120 | 120 | ||
121 | if (freeze) { | 121 | if (freeze) { |
122 | percpu_ref_kill(&q->mq_usage_counter); | 122 | /* |
123 | * XXX: Temporary kludge to work around SCSI blk-mq stall. | ||
124 | * SCSI synchronously creates and destroys many queues | ||
125 | * back-to-back during probe leading to lengthy stalls. | ||
126 | * This will be fixed by keeping ->mq_usage_counter in | ||
127 | * atomic mode until genhd registration, but, for now, | ||
128 | * let's work around using expedited synchronization. | ||
129 | */ | ||
130 | __percpu_ref_kill_expedited(&q->mq_usage_counter); | ||
131 | |||
123 | blk_mq_run_queues(q, false); | 132 | blk_mq_run_queues(q, false); |
124 | } | 133 | } |
125 | wait_event(q->mq_freeze_wq, percpu_ref_is_zero(&q->mq_usage_counter)); | 134 | wait_event(q->mq_freeze_wq, percpu_ref_is_zero(&q->mq_usage_counter)); |
@@ -203,7 +212,6 @@ __blk_mq_alloc_request(struct blk_mq_alloc_data *data, int rw) | |||
203 | if (tag != BLK_MQ_TAG_FAIL) { | 212 | if (tag != BLK_MQ_TAG_FAIL) { |
204 | rq = data->hctx->tags->rqs[tag]; | 213 | rq = data->hctx->tags->rqs[tag]; |
205 | 214 | ||
206 | rq->cmd_flags = 0; | ||
207 | if (blk_mq_tag_busy(data->hctx)) { | 215 | if (blk_mq_tag_busy(data->hctx)) { |
208 | rq->cmd_flags = REQ_MQ_INFLIGHT; | 216 | rq->cmd_flags = REQ_MQ_INFLIGHT; |
209 | atomic_inc(&data->hctx->nr_active); | 217 | atomic_inc(&data->hctx->nr_active); |
@@ -258,6 +266,7 @@ static void __blk_mq_free_request(struct blk_mq_hw_ctx *hctx, | |||
258 | 266 | ||
259 | if (rq->cmd_flags & REQ_MQ_INFLIGHT) | 267 | if (rq->cmd_flags & REQ_MQ_INFLIGHT) |
260 | atomic_dec(&hctx->nr_active); | 268 | atomic_dec(&hctx->nr_active); |
269 | rq->cmd_flags = 0; | ||
261 | 270 | ||
262 | clear_bit(REQ_ATOM_STARTED, &rq->atomic_flags); | 271 | clear_bit(REQ_ATOM_STARTED, &rq->atomic_flags); |
263 | blk_mq_put_tag(hctx, tag, &ctx->last_tag); | 272 | blk_mq_put_tag(hctx, tag, &ctx->last_tag); |
@@ -393,6 +402,12 @@ static void blk_mq_start_request(struct request *rq, bool last) | |||
393 | blk_add_timer(rq); | 402 | blk_add_timer(rq); |
394 | 403 | ||
395 | /* | 404 | /* |
405 | * Ensure that ->deadline is visible before set the started | ||
406 | * flag and clear the completed flag. | ||
407 | */ | ||
408 | smp_mb__before_atomic(); | ||
409 | |||
410 | /* | ||
396 | * Mark us as started and clear complete. Complete might have been | 411 | * Mark us as started and clear complete. Complete might have been |
397 | * set if requeue raced with timeout, which then marked it as | 412 | * set if requeue raced with timeout, which then marked it as |
398 | * complete. So be sure to clear complete again when we start | 413 | * complete. So be sure to clear complete again when we start |
@@ -473,7 +488,11 @@ static void blk_mq_requeue_work(struct work_struct *work) | |||
473 | blk_mq_insert_request(rq, false, false, false); | 488 | blk_mq_insert_request(rq, false, false, false); |
474 | } | 489 | } |
475 | 490 | ||
476 | blk_mq_run_queues(q, false); | 491 | /* |
492 | * Use the start variant of queue running here, so that running | ||
493 | * the requeue work will kick stopped queues. | ||
494 | */ | ||
495 | blk_mq_start_hw_queues(q); | ||
477 | } | 496 | } |
478 | 497 | ||
479 | void blk_mq_add_to_requeue_list(struct request *rq, bool at_head) | 498 | void blk_mq_add_to_requeue_list(struct request *rq, bool at_head) |
@@ -957,14 +976,9 @@ void blk_mq_insert_request(struct request *rq, bool at_head, bool run_queue, | |||
957 | 976 | ||
958 | hctx = q->mq_ops->map_queue(q, ctx->cpu); | 977 | hctx = q->mq_ops->map_queue(q, ctx->cpu); |
959 | 978 | ||
960 | if (rq->cmd_flags & (REQ_FLUSH | REQ_FUA) && | 979 | spin_lock(&ctx->lock); |
961 | !(rq->cmd_flags & (REQ_FLUSH_SEQ))) { | 980 | __blk_mq_insert_request(hctx, rq, at_head); |
962 | blk_insert_flush(rq); | 981 | spin_unlock(&ctx->lock); |
963 | } else { | ||
964 | spin_lock(&ctx->lock); | ||
965 | __blk_mq_insert_request(hctx, rq, at_head); | ||
966 | spin_unlock(&ctx->lock); | ||
967 | } | ||
968 | 982 | ||
969 | if (run_queue) | 983 | if (run_queue) |
970 | blk_mq_run_hw_queue(hctx, async); | 984 | blk_mq_run_hw_queue(hctx, async); |
@@ -1404,6 +1418,8 @@ static struct blk_mq_tags *blk_mq_init_rq_map(struct blk_mq_tag_set *set, | |||
1404 | left -= to_do * rq_size; | 1418 | left -= to_do * rq_size; |
1405 | for (j = 0; j < to_do; j++) { | 1419 | for (j = 0; j < to_do; j++) { |
1406 | tags->rqs[i] = p; | 1420 | tags->rqs[i] = p; |
1421 | tags->rqs[i]->atomic_flags = 0; | ||
1422 | tags->rqs[i]->cmd_flags = 0; | ||
1407 | if (set->ops->init_request) { | 1423 | if (set->ops->init_request) { |
1408 | if (set->ops->init_request(set->driver_data, | 1424 | if (set->ops->init_request(set->driver_data, |
1409 | tags->rqs[i], hctx_idx, i, | 1425 | tags->rqs[i], hctx_idx, i, |
@@ -1956,7 +1972,6 @@ out_unwind: | |||
1956 | while (--i >= 0) | 1972 | while (--i >= 0) |
1957 | blk_mq_free_rq_map(set, set->tags[i], i); | 1973 | blk_mq_free_rq_map(set, set->tags[i], i); |
1958 | 1974 | ||
1959 | set->tags = NULL; | ||
1960 | return -ENOMEM; | 1975 | return -ENOMEM; |
1961 | } | 1976 | } |
1962 | 1977 | ||
diff --git a/block/genhd.c b/block/genhd.c index 09da5e4a8e03..e6723bd4d7a1 100644 --- a/block/genhd.c +++ b/block/genhd.c | |||
@@ -445,8 +445,6 @@ int blk_alloc_devt(struct hd_struct *part, dev_t *devt) | |||
445 | */ | 445 | */ |
446 | void blk_free_devt(dev_t devt) | 446 | void blk_free_devt(dev_t devt) |
447 | { | 447 | { |
448 | might_sleep(); | ||
449 | |||
450 | if (devt == MKDEV(0, 0)) | 448 | if (devt == MKDEV(0, 0)) |
451 | return; | 449 | return; |
452 | 450 | ||
diff --git a/drivers/crypto/ccp/ccp-crypto-main.c b/drivers/crypto/ccp/ccp-crypto-main.c index 20dc848481e7..4d4e016d755b 100644 --- a/drivers/crypto/ccp/ccp-crypto-main.c +++ b/drivers/crypto/ccp/ccp-crypto-main.c | |||
@@ -367,6 +367,10 @@ static int ccp_crypto_init(void) | |||
367 | { | 367 | { |
368 | int ret; | 368 | int ret; |
369 | 369 | ||
370 | ret = ccp_present(); | ||
371 | if (ret) | ||
372 | return ret; | ||
373 | |||
370 | spin_lock_init(&req_queue_lock); | 374 | spin_lock_init(&req_queue_lock); |
371 | INIT_LIST_HEAD(&req_queue.cmds); | 375 | INIT_LIST_HEAD(&req_queue.cmds); |
372 | req_queue.backlog = &req_queue.cmds; | 376 | req_queue.backlog = &req_queue.cmds; |
diff --git a/drivers/crypto/ccp/ccp-dev.c b/drivers/crypto/ccp/ccp-dev.c index a7d110652a74..c6e6171eb6d3 100644 --- a/drivers/crypto/ccp/ccp-dev.c +++ b/drivers/crypto/ccp/ccp-dev.c | |||
@@ -55,6 +55,20 @@ static inline void ccp_del_device(struct ccp_device *ccp) | |||
55 | } | 55 | } |
56 | 56 | ||
57 | /** | 57 | /** |
58 | * ccp_present - check if a CCP device is present | ||
59 | * | ||
60 | * Returns zero if a CCP device is present, -ENODEV otherwise. | ||
61 | */ | ||
62 | int ccp_present(void) | ||
63 | { | ||
64 | if (ccp_get_device()) | ||
65 | return 0; | ||
66 | |||
67 | return -ENODEV; | ||
68 | } | ||
69 | EXPORT_SYMBOL_GPL(ccp_present); | ||
70 | |||
71 | /** | ||
58 | * ccp_enqueue_cmd - queue an operation for processing by the CCP | 72 | * ccp_enqueue_cmd - queue an operation for processing by the CCP |
59 | * | 73 | * |
60 | * @cmd: ccp_cmd struct to be processed | 74 | * @cmd: ccp_cmd struct to be processed |
diff --git a/drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.h b/drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.h index b707f292b377..65dd1ff93d3b 100644 --- a/drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.h +++ b/drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.h | |||
@@ -66,7 +66,7 @@ | |||
66 | #define ADF_DH895XCC_ETR_MAX_BANKS 32 | 66 | #define ADF_DH895XCC_ETR_MAX_BANKS 32 |
67 | #define ADF_DH895XCC_SMIAPF0_MASK_OFFSET (0x3A000 + 0x28) | 67 | #define ADF_DH895XCC_SMIAPF0_MASK_OFFSET (0x3A000 + 0x28) |
68 | #define ADF_DH895XCC_SMIAPF1_MASK_OFFSET (0x3A000 + 0x30) | 68 | #define ADF_DH895XCC_SMIAPF1_MASK_OFFSET (0x3A000 + 0x30) |
69 | #define ADF_DH895XCC_SMIA0_MASK 0xFFFF | 69 | #define ADF_DH895XCC_SMIA0_MASK 0xFFFFFFFF |
70 | #define ADF_DH895XCC_SMIA1_MASK 0x1 | 70 | #define ADF_DH895XCC_SMIA1_MASK 0x1 |
71 | /* Error detection and correction */ | 71 | /* Error detection and correction */ |
72 | #define ADF_DH895XCC_AE_CTX_ENABLES(i) (i * 0x1000 + 0x20818) | 72 | #define ADF_DH895XCC_AE_CTX_ENABLES(i) (i * 0x1000 + 0x20818) |
diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c index 4a7cbfad1d74..fcdbde4ec692 100644 --- a/drivers/hwmon/fam15h_power.c +++ b/drivers/hwmon/fam15h_power.c | |||
@@ -93,13 +93,29 @@ static ssize_t show_power_crit(struct device *dev, | |||
93 | } | 93 | } |
94 | static DEVICE_ATTR(power1_crit, S_IRUGO, show_power_crit, NULL); | 94 | static DEVICE_ATTR(power1_crit, S_IRUGO, show_power_crit, NULL); |
95 | 95 | ||
96 | static umode_t fam15h_power_is_visible(struct kobject *kobj, | ||
97 | struct attribute *attr, | ||
98 | int index) | ||
99 | { | ||
100 | /* power1_input is only reported for Fam15h, Models 00h-0fh */ | ||
101 | if (attr == &dev_attr_power1_input.attr && | ||
102 | (boot_cpu_data.x86 != 0x15 || boot_cpu_data.x86_model > 0xf)) | ||
103 | return 0; | ||
104 | |||
105 | return attr->mode; | ||
106 | } | ||
107 | |||
96 | static struct attribute *fam15h_power_attrs[] = { | 108 | static struct attribute *fam15h_power_attrs[] = { |
97 | &dev_attr_power1_input.attr, | 109 | &dev_attr_power1_input.attr, |
98 | &dev_attr_power1_crit.attr, | 110 | &dev_attr_power1_crit.attr, |
99 | NULL | 111 | NULL |
100 | }; | 112 | }; |
101 | 113 | ||
102 | ATTRIBUTE_GROUPS(fam15h_power); | 114 | static const struct attribute_group fam15h_power_group = { |
115 | .attrs = fam15h_power_attrs, | ||
116 | .is_visible = fam15h_power_is_visible, | ||
117 | }; | ||
118 | __ATTRIBUTE_GROUPS(fam15h_power); | ||
103 | 119 | ||
104 | static bool fam15h_power_is_internal_node0(struct pci_dev *f4) | 120 | static bool fam15h_power_is_internal_node0(struct pci_dev *f4) |
105 | { | 121 | { |
@@ -216,7 +232,9 @@ static int fam15h_power_probe(struct pci_dev *pdev, | |||
216 | 232 | ||
217 | static const struct pci_device_id fam15h_power_id_table[] = { | 233 | static const struct pci_device_id fam15h_power_id_table[] = { |
218 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) }, | 234 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) }, |
235 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M30H_NB_F4) }, | ||
219 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F4) }, | 236 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F4) }, |
237 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) }, | ||
220 | {} | 238 | {} |
221 | }; | 239 | }; |
222 | MODULE_DEVICE_TABLE(pci, fam15h_power_id_table); | 240 | MODULE_DEVICE_TABLE(pci, fam15h_power_id_table); |
diff --git a/drivers/hwmon/tmp103.c b/drivers/hwmon/tmp103.c index e42964f07f67..ad571ec795a3 100644 --- a/drivers/hwmon/tmp103.c +++ b/drivers/hwmon/tmp103.c | |||
@@ -145,7 +145,7 @@ static int tmp103_probe(struct i2c_client *client, | |||
145 | } | 145 | } |
146 | 146 | ||
147 | i2c_set_clientdata(client, regmap); | 147 | i2c_set_clientdata(client, regmap); |
148 | hwmon_dev = hwmon_device_register_with_groups(dev, client->name, | 148 | hwmon_dev = devm_hwmon_device_register_with_groups(dev, client->name, |
149 | regmap, tmp103_groups); | 149 | regmap, tmp103_groups); |
150 | return PTR_ERR_OR_ZERO(hwmon_dev); | 150 | return PTR_ERR_OR_ZERO(hwmon_dev); |
151 | } | 151 | } |
diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c index a3a2e9c1639b..df0c4f605a21 100644 --- a/drivers/infiniband/core/umem.c +++ b/drivers/infiniband/core/umem.c | |||
@@ -105,6 +105,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr, | |||
105 | umem->length = size; | 105 | umem->length = size; |
106 | umem->offset = addr & ~PAGE_MASK; | 106 | umem->offset = addr & ~PAGE_MASK; |
107 | umem->page_size = PAGE_SIZE; | 107 | umem->page_size = PAGE_SIZE; |
108 | umem->pid = get_task_pid(current, PIDTYPE_PID); | ||
108 | /* | 109 | /* |
109 | * We ask for writable memory if any access flags other than | 110 | * We ask for writable memory if any access flags other than |
110 | * "remote read" are set. "Local write" and "remote write" | 111 | * "remote read" are set. "Local write" and "remote write" |
@@ -198,6 +199,7 @@ out: | |||
198 | if (ret < 0) { | 199 | if (ret < 0) { |
199 | if (need_release) | 200 | if (need_release) |
200 | __ib_umem_release(context->device, umem, 0); | 201 | __ib_umem_release(context->device, umem, 0); |
202 | put_pid(umem->pid); | ||
201 | kfree(umem); | 203 | kfree(umem); |
202 | } else | 204 | } else |
203 | current->mm->pinned_vm = locked; | 205 | current->mm->pinned_vm = locked; |
@@ -230,15 +232,19 @@ void ib_umem_release(struct ib_umem *umem) | |||
230 | { | 232 | { |
231 | struct ib_ucontext *context = umem->context; | 233 | struct ib_ucontext *context = umem->context; |
232 | struct mm_struct *mm; | 234 | struct mm_struct *mm; |
235 | struct task_struct *task; | ||
233 | unsigned long diff; | 236 | unsigned long diff; |
234 | 237 | ||
235 | __ib_umem_release(umem->context->device, umem, 1); | 238 | __ib_umem_release(umem->context->device, umem, 1); |
236 | 239 | ||
237 | mm = get_task_mm(current); | 240 | task = get_pid_task(umem->pid, PIDTYPE_PID); |
238 | if (!mm) { | 241 | put_pid(umem->pid); |
239 | kfree(umem); | 242 | if (!task) |
240 | return; | 243 | goto out; |
241 | } | 244 | mm = get_task_mm(task); |
245 | put_task_struct(task); | ||
246 | if (!mm) | ||
247 | goto out; | ||
242 | 248 | ||
243 | diff = PAGE_ALIGN(umem->length + umem->offset) >> PAGE_SHIFT; | 249 | diff = PAGE_ALIGN(umem->length + umem->offset) >> PAGE_SHIFT; |
244 | 250 | ||
@@ -262,9 +268,10 @@ void ib_umem_release(struct ib_umem *umem) | |||
262 | } else | 268 | } else |
263 | down_write(&mm->mmap_sem); | 269 | down_write(&mm->mmap_sem); |
264 | 270 | ||
265 | current->mm->pinned_vm -= diff; | 271 | mm->pinned_vm -= diff; |
266 | up_write(&mm->mmap_sem); | 272 | up_write(&mm->mmap_sem); |
267 | mmput(mm); | 273 | mmput(mm); |
274 | out: | ||
268 | kfree(umem); | 275 | kfree(umem); |
269 | } | 276 | } |
270 | EXPORT_SYMBOL(ib_umem_release); | 277 | EXPORT_SYMBOL(ib_umem_release); |
diff --git a/drivers/infiniband/core/uverbs_marshall.c b/drivers/infiniband/core/uverbs_marshall.c index e7bee46868d1..abd97247443e 100644 --- a/drivers/infiniband/core/uverbs_marshall.c +++ b/drivers/infiniband/core/uverbs_marshall.c | |||
@@ -140,5 +140,9 @@ void ib_copy_path_rec_from_user(struct ib_sa_path_rec *dst, | |||
140 | dst->packet_life_time = src->packet_life_time; | 140 | dst->packet_life_time = src->packet_life_time; |
141 | dst->preference = src->preference; | 141 | dst->preference = src->preference; |
142 | dst->packet_life_time_selector = src->packet_life_time_selector; | 142 | dst->packet_life_time_selector = src->packet_life_time_selector; |
143 | |||
144 | memset(dst->smac, 0, sizeof(dst->smac)); | ||
145 | memset(dst->dmac, 0, sizeof(dst->dmac)); | ||
146 | dst->vlan_id = 0xffff; | ||
143 | } | 147 | } |
144 | EXPORT_SYMBOL(ib_copy_path_rec_from_user); | 148 | EXPORT_SYMBOL(ib_copy_path_rec_from_user); |
diff --git a/drivers/infiniband/hw/ipath/ipath_user_pages.c b/drivers/infiniband/hw/ipath/ipath_user_pages.c index dc66c4506916..1da1252dcdb3 100644 --- a/drivers/infiniband/hw/ipath/ipath_user_pages.c +++ b/drivers/infiniband/hw/ipath/ipath_user_pages.c | |||
@@ -54,7 +54,7 @@ static void __ipath_release_user_pages(struct page **p, size_t num_pages, | |||
54 | 54 | ||
55 | /* call with current->mm->mmap_sem held */ | 55 | /* call with current->mm->mmap_sem held */ |
56 | static int __ipath_get_user_pages(unsigned long start_page, size_t num_pages, | 56 | static int __ipath_get_user_pages(unsigned long start_page, size_t num_pages, |
57 | struct page **p, struct vm_area_struct **vma) | 57 | struct page **p) |
58 | { | 58 | { |
59 | unsigned long lock_limit; | 59 | unsigned long lock_limit; |
60 | size_t got; | 60 | size_t got; |
@@ -74,7 +74,7 @@ static int __ipath_get_user_pages(unsigned long start_page, size_t num_pages, | |||
74 | ret = get_user_pages(current, current->mm, | 74 | ret = get_user_pages(current, current->mm, |
75 | start_page + got * PAGE_SIZE, | 75 | start_page + got * PAGE_SIZE, |
76 | num_pages - got, 1, 1, | 76 | num_pages - got, 1, 1, |
77 | p + got, vma); | 77 | p + got, NULL); |
78 | if (ret < 0) | 78 | if (ret < 0) |
79 | goto bail_release; | 79 | goto bail_release; |
80 | } | 80 | } |
@@ -165,7 +165,7 @@ int ipath_get_user_pages(unsigned long start_page, size_t num_pages, | |||
165 | 165 | ||
166 | down_write(¤t->mm->mmap_sem); | 166 | down_write(¤t->mm->mmap_sem); |
167 | 167 | ||
168 | ret = __ipath_get_user_pages(start_page, num_pages, p, NULL); | 168 | ret = __ipath_get_user_pages(start_page, num_pages, p); |
169 | 169 | ||
170 | up_write(¤t->mm->mmap_sem); | 170 | up_write(¤t->mm->mmap_sem); |
171 | 171 | ||
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index 162b82c1dde4..bda5994ceb68 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c | |||
@@ -59,6 +59,7 @@ | |||
59 | 59 | ||
60 | #define MLX4_IB_FLOW_MAX_PRIO 0xFFF | 60 | #define MLX4_IB_FLOW_MAX_PRIO 0xFFF |
61 | #define MLX4_IB_FLOW_QPN_MASK 0xFFFFFF | 61 | #define MLX4_IB_FLOW_QPN_MASK 0xFFFFFF |
62 | #define MLX4_IB_CARD_REV_A0 0xA0 | ||
62 | 63 | ||
63 | MODULE_AUTHOR("Roland Dreier"); | 64 | MODULE_AUTHOR("Roland Dreier"); |
64 | MODULE_DESCRIPTION("Mellanox ConnectX HCA InfiniBand driver"); | 65 | MODULE_DESCRIPTION("Mellanox ConnectX HCA InfiniBand driver"); |
@@ -119,6 +120,17 @@ static int check_flow_steering_support(struct mlx4_dev *dev) | |||
119 | return dmfs; | 120 | return dmfs; |
120 | } | 121 | } |
121 | 122 | ||
123 | static int num_ib_ports(struct mlx4_dev *dev) | ||
124 | { | ||
125 | int ib_ports = 0; | ||
126 | int i; | ||
127 | |||
128 | mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_IB) | ||
129 | ib_ports++; | ||
130 | |||
131 | return ib_ports; | ||
132 | } | ||
133 | |||
122 | static int mlx4_ib_query_device(struct ib_device *ibdev, | 134 | static int mlx4_ib_query_device(struct ib_device *ibdev, |
123 | struct ib_device_attr *props) | 135 | struct ib_device_attr *props) |
124 | { | 136 | { |
@@ -126,6 +138,7 @@ static int mlx4_ib_query_device(struct ib_device *ibdev, | |||
126 | struct ib_smp *in_mad = NULL; | 138 | struct ib_smp *in_mad = NULL; |
127 | struct ib_smp *out_mad = NULL; | 139 | struct ib_smp *out_mad = NULL; |
128 | int err = -ENOMEM; | 140 | int err = -ENOMEM; |
141 | int have_ib_ports; | ||
129 | 142 | ||
130 | in_mad = kzalloc(sizeof *in_mad, GFP_KERNEL); | 143 | in_mad = kzalloc(sizeof *in_mad, GFP_KERNEL); |
131 | out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL); | 144 | out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL); |
@@ -142,6 +155,8 @@ static int mlx4_ib_query_device(struct ib_device *ibdev, | |||
142 | 155 | ||
143 | memset(props, 0, sizeof *props); | 156 | memset(props, 0, sizeof *props); |
144 | 157 | ||
158 | have_ib_ports = num_ib_ports(dev->dev); | ||
159 | |||
145 | props->fw_ver = dev->dev->caps.fw_ver; | 160 | props->fw_ver = dev->dev->caps.fw_ver; |
146 | props->device_cap_flags = IB_DEVICE_CHANGE_PHY_PORT | | 161 | props->device_cap_flags = IB_DEVICE_CHANGE_PHY_PORT | |
147 | IB_DEVICE_PORT_ACTIVE_EVENT | | 162 | IB_DEVICE_PORT_ACTIVE_EVENT | |
@@ -152,13 +167,15 @@ static int mlx4_ib_query_device(struct ib_device *ibdev, | |||
152 | props->device_cap_flags |= IB_DEVICE_BAD_PKEY_CNTR; | 167 | props->device_cap_flags |= IB_DEVICE_BAD_PKEY_CNTR; |
153 | if (dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_BAD_QKEY_CNTR) | 168 | if (dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_BAD_QKEY_CNTR) |
154 | props->device_cap_flags |= IB_DEVICE_BAD_QKEY_CNTR; | 169 | props->device_cap_flags |= IB_DEVICE_BAD_QKEY_CNTR; |
155 | if (dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_APM) | 170 | if (dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_APM && have_ib_ports) |
156 | props->device_cap_flags |= IB_DEVICE_AUTO_PATH_MIG; | 171 | props->device_cap_flags |= IB_DEVICE_AUTO_PATH_MIG; |
157 | if (dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_UD_AV_PORT) | 172 | if (dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_UD_AV_PORT) |
158 | props->device_cap_flags |= IB_DEVICE_UD_AV_PORT_ENFORCE; | 173 | props->device_cap_flags |= IB_DEVICE_UD_AV_PORT_ENFORCE; |
159 | if (dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_IPOIB_CSUM) | 174 | if (dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_IPOIB_CSUM) |
160 | props->device_cap_flags |= IB_DEVICE_UD_IP_CSUM; | 175 | props->device_cap_flags |= IB_DEVICE_UD_IP_CSUM; |
161 | if (dev->dev->caps.max_gso_sz && dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_BLH) | 176 | if (dev->dev->caps.max_gso_sz && |
177 | (dev->dev->rev_id != MLX4_IB_CARD_REV_A0) && | ||
178 | (dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_BLH)) | ||
162 | props->device_cap_flags |= IB_DEVICE_UD_TSO; | 179 | props->device_cap_flags |= IB_DEVICE_UD_TSO; |
163 | if (dev->dev->caps.bmme_flags & MLX4_BMME_FLAG_RESERVED_LKEY) | 180 | if (dev->dev->caps.bmme_flags & MLX4_BMME_FLAG_RESERVED_LKEY) |
164 | props->device_cap_flags |= IB_DEVICE_LOCAL_DMA_LKEY; | 181 | props->device_cap_flags |= IB_DEVICE_LOCAL_DMA_LKEY; |
@@ -357,7 +374,7 @@ static int eth_link_query_port(struct ib_device *ibdev, u8 port, | |||
357 | props->state = IB_PORT_DOWN; | 374 | props->state = IB_PORT_DOWN; |
358 | props->phys_state = state_to_phys_state(props->state); | 375 | props->phys_state = state_to_phys_state(props->state); |
359 | props->active_mtu = IB_MTU_256; | 376 | props->active_mtu = IB_MTU_256; |
360 | spin_lock(&iboe->lock); | 377 | spin_lock_bh(&iboe->lock); |
361 | ndev = iboe->netdevs[port - 1]; | 378 | ndev = iboe->netdevs[port - 1]; |
362 | if (!ndev) | 379 | if (!ndev) |
363 | goto out_unlock; | 380 | goto out_unlock; |
@@ -369,7 +386,7 @@ static int eth_link_query_port(struct ib_device *ibdev, u8 port, | |||
369 | IB_PORT_ACTIVE : IB_PORT_DOWN; | 386 | IB_PORT_ACTIVE : IB_PORT_DOWN; |
370 | props->phys_state = state_to_phys_state(props->state); | 387 | props->phys_state = state_to_phys_state(props->state); |
371 | out_unlock: | 388 | out_unlock: |
372 | spin_unlock(&iboe->lock); | 389 | spin_unlock_bh(&iboe->lock); |
373 | out: | 390 | out: |
374 | mlx4_free_cmd_mailbox(mdev->dev, mailbox); | 391 | mlx4_free_cmd_mailbox(mdev->dev, mailbox); |
375 | return err; | 392 | return err; |
@@ -811,11 +828,11 @@ int mlx4_ib_add_mc(struct mlx4_ib_dev *mdev, struct mlx4_ib_qp *mqp, | |||
811 | if (!mqp->port) | 828 | if (!mqp->port) |
812 | return 0; | 829 | return 0; |
813 | 830 | ||
814 | spin_lock(&mdev->iboe.lock); | 831 | spin_lock_bh(&mdev->iboe.lock); |
815 | ndev = mdev->iboe.netdevs[mqp->port - 1]; | 832 | ndev = mdev->iboe.netdevs[mqp->port - 1]; |
816 | if (ndev) | 833 | if (ndev) |
817 | dev_hold(ndev); | 834 | dev_hold(ndev); |
818 | spin_unlock(&mdev->iboe.lock); | 835 | spin_unlock_bh(&mdev->iboe.lock); |
819 | 836 | ||
820 | if (ndev) { | 837 | if (ndev) { |
821 | ret = 1; | 838 | ret = 1; |
@@ -1292,11 +1309,11 @@ static int mlx4_ib_mcg_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) | |||
1292 | mutex_lock(&mqp->mutex); | 1309 | mutex_lock(&mqp->mutex); |
1293 | ge = find_gid_entry(mqp, gid->raw); | 1310 | ge = find_gid_entry(mqp, gid->raw); |
1294 | if (ge) { | 1311 | if (ge) { |
1295 | spin_lock(&mdev->iboe.lock); | 1312 | spin_lock_bh(&mdev->iboe.lock); |
1296 | ndev = ge->added ? mdev->iboe.netdevs[ge->port - 1] : NULL; | 1313 | ndev = ge->added ? mdev->iboe.netdevs[ge->port - 1] : NULL; |
1297 | if (ndev) | 1314 | if (ndev) |
1298 | dev_hold(ndev); | 1315 | dev_hold(ndev); |
1299 | spin_unlock(&mdev->iboe.lock); | 1316 | spin_unlock_bh(&mdev->iboe.lock); |
1300 | if (ndev) | 1317 | if (ndev) |
1301 | dev_put(ndev); | 1318 | dev_put(ndev); |
1302 | list_del(&ge->list); | 1319 | list_del(&ge->list); |
@@ -1417,6 +1434,9 @@ static void update_gids_task(struct work_struct *work) | |||
1417 | int err; | 1434 | int err; |
1418 | struct mlx4_dev *dev = gw->dev->dev; | 1435 | struct mlx4_dev *dev = gw->dev->dev; |
1419 | 1436 | ||
1437 | if (!gw->dev->ib_active) | ||
1438 | return; | ||
1439 | |||
1420 | mailbox = mlx4_alloc_cmd_mailbox(dev); | 1440 | mailbox = mlx4_alloc_cmd_mailbox(dev); |
1421 | if (IS_ERR(mailbox)) { | 1441 | if (IS_ERR(mailbox)) { |
1422 | pr_warn("update gid table failed %ld\n", PTR_ERR(mailbox)); | 1442 | pr_warn("update gid table failed %ld\n", PTR_ERR(mailbox)); |
@@ -1447,6 +1467,9 @@ static void reset_gids_task(struct work_struct *work) | |||
1447 | int err; | 1467 | int err; |
1448 | struct mlx4_dev *dev = gw->dev->dev; | 1468 | struct mlx4_dev *dev = gw->dev->dev; |
1449 | 1469 | ||
1470 | if (!gw->dev->ib_active) | ||
1471 | return; | ||
1472 | |||
1450 | mailbox = mlx4_alloc_cmd_mailbox(dev); | 1473 | mailbox = mlx4_alloc_cmd_mailbox(dev); |
1451 | if (IS_ERR(mailbox)) { | 1474 | if (IS_ERR(mailbox)) { |
1452 | pr_warn("reset gid table failed\n"); | 1475 | pr_warn("reset gid table failed\n"); |
@@ -1581,7 +1604,7 @@ static int mlx4_ib_addr_event(int event, struct net_device *event_netdev, | |||
1581 | return 0; | 1604 | return 0; |
1582 | 1605 | ||
1583 | iboe = &ibdev->iboe; | 1606 | iboe = &ibdev->iboe; |
1584 | spin_lock(&iboe->lock); | 1607 | spin_lock_bh(&iboe->lock); |
1585 | 1608 | ||
1586 | for (port = 1; port <= ibdev->dev->caps.num_ports; ++port) | 1609 | for (port = 1; port <= ibdev->dev->caps.num_ports; ++port) |
1587 | if ((netif_is_bond_master(real_dev) && | 1610 | if ((netif_is_bond_master(real_dev) && |
@@ -1591,7 +1614,7 @@ static int mlx4_ib_addr_event(int event, struct net_device *event_netdev, | |||
1591 | update_gid_table(ibdev, port, gid, | 1614 | update_gid_table(ibdev, port, gid, |
1592 | event == NETDEV_DOWN, 0); | 1615 | event == NETDEV_DOWN, 0); |
1593 | 1616 | ||
1594 | spin_unlock(&iboe->lock); | 1617 | spin_unlock_bh(&iboe->lock); |
1595 | return 0; | 1618 | return 0; |
1596 | 1619 | ||
1597 | } | 1620 | } |
@@ -1664,13 +1687,21 @@ static void mlx4_ib_update_qps(struct mlx4_ib_dev *ibdev, | |||
1664 | new_smac = mlx4_mac_to_u64(dev->dev_addr); | 1687 | new_smac = mlx4_mac_to_u64(dev->dev_addr); |
1665 | read_unlock(&dev_base_lock); | 1688 | read_unlock(&dev_base_lock); |
1666 | 1689 | ||
1690 | atomic64_set(&ibdev->iboe.mac[port - 1], new_smac); | ||
1691 | |||
1692 | /* no need for update QP1 and mac registration in non-SRIOV */ | ||
1693 | if (!mlx4_is_mfunc(ibdev->dev)) | ||
1694 | return; | ||
1695 | |||
1667 | mutex_lock(&ibdev->qp1_proxy_lock[port - 1]); | 1696 | mutex_lock(&ibdev->qp1_proxy_lock[port - 1]); |
1668 | qp = ibdev->qp1_proxy[port - 1]; | 1697 | qp = ibdev->qp1_proxy[port - 1]; |
1669 | if (qp) { | 1698 | if (qp) { |
1670 | int new_smac_index; | 1699 | int new_smac_index; |
1671 | u64 old_smac = qp->pri.smac; | 1700 | u64 old_smac; |
1672 | struct mlx4_update_qp_params update_params; | 1701 | struct mlx4_update_qp_params update_params; |
1673 | 1702 | ||
1703 | mutex_lock(&qp->mutex); | ||
1704 | old_smac = qp->pri.smac; | ||
1674 | if (new_smac == old_smac) | 1705 | if (new_smac == old_smac) |
1675 | goto unlock; | 1706 | goto unlock; |
1676 | 1707 | ||
@@ -1685,17 +1716,20 @@ static void mlx4_ib_update_qps(struct mlx4_ib_dev *ibdev, | |||
1685 | release_mac = new_smac; | 1716 | release_mac = new_smac; |
1686 | goto unlock; | 1717 | goto unlock; |
1687 | } | 1718 | } |
1688 | 1719 | /* if old port was zero, no mac was yet registered for this QP */ | |
1720 | if (qp->pri.smac_port) | ||
1721 | release_mac = old_smac; | ||
1689 | qp->pri.smac = new_smac; | 1722 | qp->pri.smac = new_smac; |
1723 | qp->pri.smac_port = port; | ||
1690 | qp->pri.smac_index = new_smac_index; | 1724 | qp->pri.smac_index = new_smac_index; |
1691 | |||
1692 | release_mac = old_smac; | ||
1693 | } | 1725 | } |
1694 | 1726 | ||
1695 | unlock: | 1727 | unlock: |
1696 | mutex_unlock(&ibdev->qp1_proxy_lock[port - 1]); | ||
1697 | if (release_mac != MLX4_IB_INVALID_MAC) | 1728 | if (release_mac != MLX4_IB_INVALID_MAC) |
1698 | mlx4_unregister_mac(ibdev->dev, port, release_mac); | 1729 | mlx4_unregister_mac(ibdev->dev, port, release_mac); |
1730 | if (qp) | ||
1731 | mutex_unlock(&qp->mutex); | ||
1732 | mutex_unlock(&ibdev->qp1_proxy_lock[port - 1]); | ||
1699 | } | 1733 | } |
1700 | 1734 | ||
1701 | static void mlx4_ib_get_dev_addr(struct net_device *dev, | 1735 | static void mlx4_ib_get_dev_addr(struct net_device *dev, |
@@ -1706,6 +1740,7 @@ static void mlx4_ib_get_dev_addr(struct net_device *dev, | |||
1706 | struct inet6_dev *in6_dev; | 1740 | struct inet6_dev *in6_dev; |
1707 | union ib_gid *pgid; | 1741 | union ib_gid *pgid; |
1708 | struct inet6_ifaddr *ifp; | 1742 | struct inet6_ifaddr *ifp; |
1743 | union ib_gid default_gid; | ||
1709 | #endif | 1744 | #endif |
1710 | union ib_gid gid; | 1745 | union ib_gid gid; |
1711 | 1746 | ||
@@ -1726,12 +1761,15 @@ static void mlx4_ib_get_dev_addr(struct net_device *dev, | |||
1726 | in_dev_put(in_dev); | 1761 | in_dev_put(in_dev); |
1727 | } | 1762 | } |
1728 | #if IS_ENABLED(CONFIG_IPV6) | 1763 | #if IS_ENABLED(CONFIG_IPV6) |
1764 | mlx4_make_default_gid(dev, &default_gid); | ||
1729 | /* IPv6 gids */ | 1765 | /* IPv6 gids */ |
1730 | in6_dev = in6_dev_get(dev); | 1766 | in6_dev = in6_dev_get(dev); |
1731 | if (in6_dev) { | 1767 | if (in6_dev) { |
1732 | read_lock_bh(&in6_dev->lock); | 1768 | read_lock_bh(&in6_dev->lock); |
1733 | list_for_each_entry(ifp, &in6_dev->addr_list, if_list) { | 1769 | list_for_each_entry(ifp, &in6_dev->addr_list, if_list) { |
1734 | pgid = (union ib_gid *)&ifp->addr; | 1770 | pgid = (union ib_gid *)&ifp->addr; |
1771 | if (!memcmp(pgid, &default_gid, sizeof(*pgid))) | ||
1772 | continue; | ||
1735 | update_gid_table(ibdev, port, pgid, 0, 0); | 1773 | update_gid_table(ibdev, port, pgid, 0, 0); |
1736 | } | 1774 | } |
1737 | read_unlock_bh(&in6_dev->lock); | 1775 | read_unlock_bh(&in6_dev->lock); |
@@ -1753,24 +1791,33 @@ static int mlx4_ib_init_gid_table(struct mlx4_ib_dev *ibdev) | |||
1753 | struct net_device *dev; | 1791 | struct net_device *dev; |
1754 | struct mlx4_ib_iboe *iboe = &ibdev->iboe; | 1792 | struct mlx4_ib_iboe *iboe = &ibdev->iboe; |
1755 | int i; | 1793 | int i; |
1794 | int err = 0; | ||
1756 | 1795 | ||
1757 | for (i = 1; i <= ibdev->num_ports; ++i) | 1796 | for (i = 1; i <= ibdev->num_ports; ++i) { |
1758 | if (reset_gid_table(ibdev, i)) | 1797 | if (rdma_port_get_link_layer(&ibdev->ib_dev, i) == |
1759 | return -1; | 1798 | IB_LINK_LAYER_ETHERNET) { |
1799 | err = reset_gid_table(ibdev, i); | ||
1800 | if (err) | ||
1801 | goto out; | ||
1802 | } | ||
1803 | } | ||
1760 | 1804 | ||
1761 | read_lock(&dev_base_lock); | 1805 | read_lock(&dev_base_lock); |
1762 | spin_lock(&iboe->lock); | 1806 | spin_lock_bh(&iboe->lock); |
1763 | 1807 | ||
1764 | for_each_netdev(&init_net, dev) { | 1808 | for_each_netdev(&init_net, dev) { |
1765 | u8 port = mlx4_ib_get_dev_port(dev, ibdev); | 1809 | u8 port = mlx4_ib_get_dev_port(dev, ibdev); |
1766 | if (port) | 1810 | /* port will be non-zero only for ETH ports */ |
1811 | if (port) { | ||
1812 | mlx4_ib_set_default_gid(ibdev, dev, port); | ||
1767 | mlx4_ib_get_dev_addr(dev, ibdev, port); | 1813 | mlx4_ib_get_dev_addr(dev, ibdev, port); |
1814 | } | ||
1768 | } | 1815 | } |
1769 | 1816 | ||
1770 | spin_unlock(&iboe->lock); | 1817 | spin_unlock_bh(&iboe->lock); |
1771 | read_unlock(&dev_base_lock); | 1818 | read_unlock(&dev_base_lock); |
1772 | 1819 | out: | |
1773 | return 0; | 1820 | return err; |
1774 | } | 1821 | } |
1775 | 1822 | ||
1776 | static void mlx4_ib_scan_netdevs(struct mlx4_ib_dev *ibdev, | 1823 | static void mlx4_ib_scan_netdevs(struct mlx4_ib_dev *ibdev, |
@@ -1784,7 +1831,7 @@ static void mlx4_ib_scan_netdevs(struct mlx4_ib_dev *ibdev, | |||
1784 | 1831 | ||
1785 | iboe = &ibdev->iboe; | 1832 | iboe = &ibdev->iboe; |
1786 | 1833 | ||
1787 | spin_lock(&iboe->lock); | 1834 | spin_lock_bh(&iboe->lock); |
1788 | mlx4_foreach_ib_transport_port(port, ibdev->dev) { | 1835 | mlx4_foreach_ib_transport_port(port, ibdev->dev) { |
1789 | enum ib_port_state port_state = IB_PORT_NOP; | 1836 | enum ib_port_state port_state = IB_PORT_NOP; |
1790 | struct net_device *old_master = iboe->masters[port - 1]; | 1837 | struct net_device *old_master = iboe->masters[port - 1]; |
@@ -1816,35 +1863,47 @@ static void mlx4_ib_scan_netdevs(struct mlx4_ib_dev *ibdev, | |||
1816 | port_state = (netif_running(curr_netdev) && netif_carrier_ok(curr_netdev)) ? | 1863 | port_state = (netif_running(curr_netdev) && netif_carrier_ok(curr_netdev)) ? |
1817 | IB_PORT_ACTIVE : IB_PORT_DOWN; | 1864 | IB_PORT_ACTIVE : IB_PORT_DOWN; |
1818 | mlx4_ib_set_default_gid(ibdev, curr_netdev, port); | 1865 | mlx4_ib_set_default_gid(ibdev, curr_netdev, port); |
1819 | } else { | 1866 | if (curr_master) { |
1820 | reset_gid_table(ibdev, port); | 1867 | /* if using bonding/team and a slave port is down, we |
1821 | } | 1868 | * don't want the bond IP based gids in the table since |
1822 | /* if using bonding/team and a slave port is down, we don't the bond IP | 1869 | * flows that select port by gid may get the down port. |
1823 | * based gids in the table since flows that select port by gid may get | 1870 | */ |
1824 | * the down port. | 1871 | if (port_state == IB_PORT_DOWN) { |
1825 | */ | 1872 | reset_gid_table(ibdev, port); |
1826 | if (curr_master && (port_state == IB_PORT_DOWN)) { | 1873 | mlx4_ib_set_default_gid(ibdev, |
1827 | reset_gid_table(ibdev, port); | 1874 | curr_netdev, |
1828 | mlx4_ib_set_default_gid(ibdev, curr_netdev, port); | 1875 | port); |
1829 | } | 1876 | } else { |
1830 | /* if bonding is used it is possible that we add it to masters | 1877 | /* gids from the upper dev (bond/team) |
1831 | * only after IP address is assigned to the net bonding | 1878 | * should appear in port's gid table |
1832 | * interface. | 1879 | */ |
1833 | */ | 1880 | mlx4_ib_get_dev_addr(curr_master, |
1834 | if (curr_master && (old_master != curr_master)) { | 1881 | ibdev, port); |
1835 | reset_gid_table(ibdev, port); | 1882 | } |
1836 | mlx4_ib_set_default_gid(ibdev, curr_netdev, port); | 1883 | } |
1837 | mlx4_ib_get_dev_addr(curr_master, ibdev, port); | 1884 | /* if bonding is used it is possible that we add it to |
1838 | } | 1885 | * masters only after IP address is assigned to the |
1886 | * net bonding interface. | ||
1887 | */ | ||
1888 | if (curr_master && (old_master != curr_master)) { | ||
1889 | reset_gid_table(ibdev, port); | ||
1890 | mlx4_ib_set_default_gid(ibdev, | ||
1891 | curr_netdev, port); | ||
1892 | mlx4_ib_get_dev_addr(curr_master, ibdev, port); | ||
1893 | } | ||
1839 | 1894 | ||
1840 | if (!curr_master && (old_master != curr_master)) { | 1895 | if (!curr_master && (old_master != curr_master)) { |
1896 | reset_gid_table(ibdev, port); | ||
1897 | mlx4_ib_set_default_gid(ibdev, | ||
1898 | curr_netdev, port); | ||
1899 | mlx4_ib_get_dev_addr(curr_netdev, ibdev, port); | ||
1900 | } | ||
1901 | } else { | ||
1841 | reset_gid_table(ibdev, port); | 1902 | reset_gid_table(ibdev, port); |
1842 | mlx4_ib_set_default_gid(ibdev, curr_netdev, port); | ||
1843 | mlx4_ib_get_dev_addr(curr_netdev, ibdev, port); | ||
1844 | } | 1903 | } |
1845 | } | 1904 | } |
1846 | 1905 | ||
1847 | spin_unlock(&iboe->lock); | 1906 | spin_unlock_bh(&iboe->lock); |
1848 | 1907 | ||
1849 | if (update_qps_port > 0) | 1908 | if (update_qps_port > 0) |
1850 | mlx4_ib_update_qps(ibdev, dev, update_qps_port); | 1909 | mlx4_ib_update_qps(ibdev, dev, update_qps_port); |
@@ -2186,6 +2245,9 @@ static void *mlx4_ib_add(struct mlx4_dev *dev) | |||
2186 | goto err_steer_free_bitmap; | 2245 | goto err_steer_free_bitmap; |
2187 | } | 2246 | } |
2188 | 2247 | ||
2248 | for (j = 1; j <= ibdev->dev->caps.num_ports; j++) | ||
2249 | atomic64_set(&iboe->mac[j - 1], ibdev->dev->caps.def_mac[j]); | ||
2250 | |||
2189 | if (ib_register_device(&ibdev->ib_dev, NULL)) | 2251 | if (ib_register_device(&ibdev->ib_dev, NULL)) |
2190 | goto err_steer_free_bitmap; | 2252 | goto err_steer_free_bitmap; |
2191 | 2253 | ||
@@ -2222,12 +2284,8 @@ static void *mlx4_ib_add(struct mlx4_dev *dev) | |||
2222 | } | 2284 | } |
2223 | } | 2285 | } |
2224 | #endif | 2286 | #endif |
2225 | for (i = 1 ; i <= ibdev->num_ports ; ++i) | 2287 | if (mlx4_ib_init_gid_table(ibdev)) |
2226 | reset_gid_table(ibdev, i); | 2288 | goto err_notif; |
2227 | rtnl_lock(); | ||
2228 | mlx4_ib_scan_netdevs(ibdev, NULL, 0); | ||
2229 | rtnl_unlock(); | ||
2230 | mlx4_ib_init_gid_table(ibdev); | ||
2231 | } | 2289 | } |
2232 | 2290 | ||
2233 | for (j = 0; j < ARRAY_SIZE(mlx4_class_attributes); ++j) { | 2291 | for (j = 0; j < ARRAY_SIZE(mlx4_class_attributes); ++j) { |
@@ -2375,6 +2433,9 @@ static void mlx4_ib_remove(struct mlx4_dev *dev, void *ibdev_ptr) | |||
2375 | struct mlx4_ib_dev *ibdev = ibdev_ptr; | 2433 | struct mlx4_ib_dev *ibdev = ibdev_ptr; |
2376 | int p; | 2434 | int p; |
2377 | 2435 | ||
2436 | ibdev->ib_active = false; | ||
2437 | flush_workqueue(wq); | ||
2438 | |||
2378 | mlx4_ib_close_sriov(ibdev); | 2439 | mlx4_ib_close_sriov(ibdev); |
2379 | mlx4_ib_mad_cleanup(ibdev); | 2440 | mlx4_ib_mad_cleanup(ibdev); |
2380 | ib_unregister_device(&ibdev->ib_dev); | 2441 | ib_unregister_device(&ibdev->ib_dev); |
diff --git a/drivers/infiniband/hw/mlx4/mlx4_ib.h b/drivers/infiniband/hw/mlx4/mlx4_ib.h index e8cad3926bfc..6eb743f65f6f 100644 --- a/drivers/infiniband/hw/mlx4/mlx4_ib.h +++ b/drivers/infiniband/hw/mlx4/mlx4_ib.h | |||
@@ -451,6 +451,7 @@ struct mlx4_ib_iboe { | |||
451 | spinlock_t lock; | 451 | spinlock_t lock; |
452 | struct net_device *netdevs[MLX4_MAX_PORTS]; | 452 | struct net_device *netdevs[MLX4_MAX_PORTS]; |
453 | struct net_device *masters[MLX4_MAX_PORTS]; | 453 | struct net_device *masters[MLX4_MAX_PORTS]; |
454 | atomic64_t mac[MLX4_MAX_PORTS]; | ||
454 | struct notifier_block nb; | 455 | struct notifier_block nb; |
455 | struct notifier_block nb_inet; | 456 | struct notifier_block nb_inet; |
456 | struct notifier_block nb_inet6; | 457 | struct notifier_block nb_inet6; |
diff --git a/drivers/infiniband/hw/mlx4/mr.c b/drivers/infiniband/hw/mlx4/mr.c index 9b0e80e59b08..8f9325cfc85d 100644 --- a/drivers/infiniband/hw/mlx4/mr.c +++ b/drivers/infiniband/hw/mlx4/mr.c | |||
@@ -234,14 +234,13 @@ int mlx4_ib_rereg_user_mr(struct ib_mr *mr, int flags, | |||
234 | 0); | 234 | 0); |
235 | if (IS_ERR(mmr->umem)) { | 235 | if (IS_ERR(mmr->umem)) { |
236 | err = PTR_ERR(mmr->umem); | 236 | err = PTR_ERR(mmr->umem); |
237 | /* Prevent mlx4_ib_dereg_mr from free'ing invalid pointer */ | ||
237 | mmr->umem = NULL; | 238 | mmr->umem = NULL; |
238 | goto release_mpt_entry; | 239 | goto release_mpt_entry; |
239 | } | 240 | } |
240 | n = ib_umem_page_count(mmr->umem); | 241 | n = ib_umem_page_count(mmr->umem); |
241 | shift = ilog2(mmr->umem->page_size); | 242 | shift = ilog2(mmr->umem->page_size); |
242 | 243 | ||
243 | mmr->mmr.iova = virt_addr; | ||
244 | mmr->mmr.size = length; | ||
245 | err = mlx4_mr_rereg_mem_write(dev->dev, &mmr->mmr, | 244 | err = mlx4_mr_rereg_mem_write(dev->dev, &mmr->mmr, |
246 | virt_addr, length, n, shift, | 245 | virt_addr, length, n, shift, |
247 | *pmpt_entry); | 246 | *pmpt_entry); |
@@ -249,6 +248,8 @@ int mlx4_ib_rereg_user_mr(struct ib_mr *mr, int flags, | |||
249 | ib_umem_release(mmr->umem); | 248 | ib_umem_release(mmr->umem); |
250 | goto release_mpt_entry; | 249 | goto release_mpt_entry; |
251 | } | 250 | } |
251 | mmr->mmr.iova = virt_addr; | ||
252 | mmr->mmr.size = length; | ||
252 | 253 | ||
253 | err = mlx4_ib_umem_write_mtt(dev, &mmr->mmr.mtt, mmr->umem); | 254 | err = mlx4_ib_umem_write_mtt(dev, &mmr->mmr.mtt, mmr->umem); |
254 | if (err) { | 255 | if (err) { |
@@ -262,6 +263,8 @@ int mlx4_ib_rereg_user_mr(struct ib_mr *mr, int flags, | |||
262 | * return a failure. But dereg_mr will free the resources. | 263 | * return a failure. But dereg_mr will free the resources. |
263 | */ | 264 | */ |
264 | err = mlx4_mr_hw_write_mpt(dev->dev, &mmr->mmr, pmpt_entry); | 265 | err = mlx4_mr_hw_write_mpt(dev->dev, &mmr->mmr, pmpt_entry); |
266 | if (!err && flags & IB_MR_REREG_ACCESS) | ||
267 | mmr->mmr.access = mr_access_flags; | ||
265 | 268 | ||
266 | release_mpt_entry: | 269 | release_mpt_entry: |
267 | mlx4_mr_hw_put_mpt(dev->dev, pmpt_entry); | 270 | mlx4_mr_hw_put_mpt(dev->dev, pmpt_entry); |
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 836503927dea..9c5150c3cb31 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c | |||
@@ -964,9 +964,10 @@ static void destroy_qp_common(struct mlx4_ib_dev *dev, struct mlx4_ib_qp *qp, | |||
964 | MLX4_QP_STATE_RST, NULL, 0, 0, &qp->mqp)) | 964 | MLX4_QP_STATE_RST, NULL, 0, 0, &qp->mqp)) |
965 | pr_warn("modify QP %06x to RESET failed.\n", | 965 | pr_warn("modify QP %06x to RESET failed.\n", |
966 | qp->mqp.qpn); | 966 | qp->mqp.qpn); |
967 | if (qp->pri.smac) { | 967 | if (qp->pri.smac || (!qp->pri.smac && qp->pri.smac_port)) { |
968 | mlx4_unregister_mac(dev->dev, qp->pri.smac_port, qp->pri.smac); | 968 | mlx4_unregister_mac(dev->dev, qp->pri.smac_port, qp->pri.smac); |
969 | qp->pri.smac = 0; | 969 | qp->pri.smac = 0; |
970 | qp->pri.smac_port = 0; | ||
970 | } | 971 | } |
971 | if (qp->alt.smac) { | 972 | if (qp->alt.smac) { |
972 | mlx4_unregister_mac(dev->dev, qp->alt.smac_port, qp->alt.smac); | 973 | mlx4_unregister_mac(dev->dev, qp->alt.smac_port, qp->alt.smac); |
@@ -1325,7 +1326,8 @@ static int _mlx4_set_path(struct mlx4_ib_dev *dev, const struct ib_ah_attr *ah, | |||
1325 | * If one was already assigned, but the new mac differs, | 1326 | * If one was already assigned, but the new mac differs, |
1326 | * unregister the old one and register the new one. | 1327 | * unregister the old one and register the new one. |
1327 | */ | 1328 | */ |
1328 | if (!smac_info->smac || smac_info->smac != smac) { | 1329 | if ((!smac_info->smac && !smac_info->smac_port) || |
1330 | smac_info->smac != smac) { | ||
1329 | /* register candidate now, unreg if needed, after success */ | 1331 | /* register candidate now, unreg if needed, after success */ |
1330 | smac_index = mlx4_register_mac(dev->dev, port, smac); | 1332 | smac_index = mlx4_register_mac(dev->dev, port, smac); |
1331 | if (smac_index >= 0) { | 1333 | if (smac_index >= 0) { |
@@ -1390,21 +1392,13 @@ static void update_mcg_macs(struct mlx4_ib_dev *dev, struct mlx4_ib_qp *qp) | |||
1390 | static int handle_eth_ud_smac_index(struct mlx4_ib_dev *dev, struct mlx4_ib_qp *qp, u8 *smac, | 1392 | static int handle_eth_ud_smac_index(struct mlx4_ib_dev *dev, struct mlx4_ib_qp *qp, u8 *smac, |
1391 | struct mlx4_qp_context *context) | 1393 | struct mlx4_qp_context *context) |
1392 | { | 1394 | { |
1393 | struct net_device *ndev; | ||
1394 | u64 u64_mac; | 1395 | u64 u64_mac; |
1395 | int smac_index; | 1396 | int smac_index; |
1396 | 1397 | ||
1397 | 1398 | u64_mac = atomic64_read(&dev->iboe.mac[qp->port - 1]); | |
1398 | ndev = dev->iboe.netdevs[qp->port - 1]; | ||
1399 | if (ndev) { | ||
1400 | smac = ndev->dev_addr; | ||
1401 | u64_mac = mlx4_mac_to_u64(smac); | ||
1402 | } else { | ||
1403 | u64_mac = dev->dev->caps.def_mac[qp->port]; | ||
1404 | } | ||
1405 | 1399 | ||
1406 | context->pri_path.sched_queue = MLX4_IB_DEFAULT_SCHED_QUEUE | ((qp->port - 1) << 6); | 1400 | context->pri_path.sched_queue = MLX4_IB_DEFAULT_SCHED_QUEUE | ((qp->port - 1) << 6); |
1407 | if (!qp->pri.smac) { | 1401 | if (!qp->pri.smac && !qp->pri.smac_port) { |
1408 | smac_index = mlx4_register_mac(dev->dev, qp->port, u64_mac); | 1402 | smac_index = mlx4_register_mac(dev->dev, qp->port, u64_mac); |
1409 | if (smac_index >= 0) { | 1403 | if (smac_index >= 0) { |
1410 | qp->pri.candidate_smac_index = smac_index; | 1404 | qp->pri.candidate_smac_index = smac_index; |
@@ -1432,6 +1426,12 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp, | |||
1432 | int steer_qp = 0; | 1426 | int steer_qp = 0; |
1433 | int err = -EINVAL; | 1427 | int err = -EINVAL; |
1434 | 1428 | ||
1429 | /* APM is not supported under RoCE */ | ||
1430 | if (attr_mask & IB_QP_ALT_PATH && | ||
1431 | rdma_port_get_link_layer(&dev->ib_dev, qp->port) == | ||
1432 | IB_LINK_LAYER_ETHERNET) | ||
1433 | return -ENOTSUPP; | ||
1434 | |||
1435 | context = kzalloc(sizeof *context, GFP_KERNEL); | 1435 | context = kzalloc(sizeof *context, GFP_KERNEL); |
1436 | if (!context) | 1436 | if (!context) |
1437 | return -ENOMEM; | 1437 | return -ENOMEM; |
@@ -1786,9 +1786,10 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp, | |||
1786 | if (qp->flags & MLX4_IB_QP_NETIF) | 1786 | if (qp->flags & MLX4_IB_QP_NETIF) |
1787 | mlx4_ib_steer_qp_reg(dev, qp, 0); | 1787 | mlx4_ib_steer_qp_reg(dev, qp, 0); |
1788 | } | 1788 | } |
1789 | if (qp->pri.smac) { | 1789 | if (qp->pri.smac || (!qp->pri.smac && qp->pri.smac_port)) { |
1790 | mlx4_unregister_mac(dev->dev, qp->pri.smac_port, qp->pri.smac); | 1790 | mlx4_unregister_mac(dev->dev, qp->pri.smac_port, qp->pri.smac); |
1791 | qp->pri.smac = 0; | 1791 | qp->pri.smac = 0; |
1792 | qp->pri.smac_port = 0; | ||
1792 | } | 1793 | } |
1793 | if (qp->alt.smac) { | 1794 | if (qp->alt.smac) { |
1794 | mlx4_unregister_mac(dev->dev, qp->alt.smac_port, qp->alt.smac); | 1795 | mlx4_unregister_mac(dev->dev, qp->alt.smac_port, qp->alt.smac); |
@@ -1812,11 +1813,12 @@ out: | |||
1812 | if (err && steer_qp) | 1813 | if (err && steer_qp) |
1813 | mlx4_ib_steer_qp_reg(dev, qp, 0); | 1814 | mlx4_ib_steer_qp_reg(dev, qp, 0); |
1814 | kfree(context); | 1815 | kfree(context); |
1815 | if (qp->pri.candidate_smac) { | 1816 | if (qp->pri.candidate_smac || |
1817 | (!qp->pri.candidate_smac && qp->pri.candidate_smac_port)) { | ||
1816 | if (err) { | 1818 | if (err) { |
1817 | mlx4_unregister_mac(dev->dev, qp->pri.candidate_smac_port, qp->pri.candidate_smac); | 1819 | mlx4_unregister_mac(dev->dev, qp->pri.candidate_smac_port, qp->pri.candidate_smac); |
1818 | } else { | 1820 | } else { |
1819 | if (qp->pri.smac) | 1821 | if (qp->pri.smac || (!qp->pri.smac && qp->pri.smac_port)) |
1820 | mlx4_unregister_mac(dev->dev, qp->pri.smac_port, qp->pri.smac); | 1822 | mlx4_unregister_mac(dev->dev, qp->pri.smac_port, qp->pri.smac); |
1821 | qp->pri.smac = qp->pri.candidate_smac; | 1823 | qp->pri.smac = qp->pri.candidate_smac; |
1822 | qp->pri.smac_index = qp->pri.candidate_smac_index; | 1824 | qp->pri.smac_index = qp->pri.candidate_smac_index; |
@@ -2089,6 +2091,16 @@ static int build_sriov_qp0_header(struct mlx4_ib_sqp *sqp, | |||
2089 | return 0; | 2091 | return 0; |
2090 | } | 2092 | } |
2091 | 2093 | ||
2094 | static void mlx4_u64_to_smac(u8 *dst_mac, u64 src_mac) | ||
2095 | { | ||
2096 | int i; | ||
2097 | |||
2098 | for (i = ETH_ALEN; i; i--) { | ||
2099 | dst_mac[i - 1] = src_mac & 0xff; | ||
2100 | src_mac >>= 8; | ||
2101 | } | ||
2102 | } | ||
2103 | |||
2092 | static int build_mlx_header(struct mlx4_ib_sqp *sqp, struct ib_send_wr *wr, | 2104 | static int build_mlx_header(struct mlx4_ib_sqp *sqp, struct ib_send_wr *wr, |
2093 | void *wqe, unsigned *mlx_seg_len) | 2105 | void *wqe, unsigned *mlx_seg_len) |
2094 | { | 2106 | { |
@@ -2203,7 +2215,6 @@ static int build_mlx_header(struct mlx4_ib_sqp *sqp, struct ib_send_wr *wr, | |||
2203 | } | 2215 | } |
2204 | 2216 | ||
2205 | if (is_eth) { | 2217 | if (is_eth) { |
2206 | u8 *smac; | ||
2207 | struct in6_addr in6; | 2218 | struct in6_addr in6; |
2208 | 2219 | ||
2209 | u16 pcp = (be32_to_cpu(ah->av.ib.sl_tclass_flowlabel) >> 29) << 13; | 2220 | u16 pcp = (be32_to_cpu(ah->av.ib.sl_tclass_flowlabel) >> 29) << 13; |
@@ -2216,12 +2227,17 @@ static int build_mlx_header(struct mlx4_ib_sqp *sqp, struct ib_send_wr *wr, | |||
2216 | memcpy(&ctrl->imm, ah->av.eth.mac + 2, 4); | 2227 | memcpy(&ctrl->imm, ah->av.eth.mac + 2, 4); |
2217 | memcpy(&in6, sgid.raw, sizeof(in6)); | 2228 | memcpy(&in6, sgid.raw, sizeof(in6)); |
2218 | 2229 | ||
2219 | if (!mlx4_is_mfunc(to_mdev(ib_dev)->dev)) | 2230 | if (!mlx4_is_mfunc(to_mdev(ib_dev)->dev)) { |
2220 | smac = to_mdev(sqp->qp.ibqp.device)-> | 2231 | u64 mac = atomic64_read(&to_mdev(ib_dev)->iboe.mac[sqp->qp.port - 1]); |
2221 | iboe.netdevs[sqp->qp.port - 1]->dev_addr; | 2232 | u8 smac[ETH_ALEN]; |
2222 | else /* use the src mac of the tunnel */ | 2233 | |
2223 | smac = ah->av.eth.s_mac; | 2234 | mlx4_u64_to_smac(smac, mac); |
2224 | memcpy(sqp->ud_header.eth.smac_h, smac, 6); | 2235 | memcpy(sqp->ud_header.eth.smac_h, smac, ETH_ALEN); |
2236 | } else { | ||
2237 | /* use the src mac of the tunnel */ | ||
2238 | memcpy(sqp->ud_header.eth.smac_h, ah->av.eth.s_mac, ETH_ALEN); | ||
2239 | } | ||
2240 | |||
2225 | if (!memcmp(sqp->ud_header.eth.smac_h, sqp->ud_header.eth.dmac_h, 6)) | 2241 | if (!memcmp(sqp->ud_header.eth.smac_h, sqp->ud_header.eth.dmac_h, 6)) |
2226 | mlx->flags |= cpu_to_be32(MLX4_WQE_CTRL_FORCE_LOOPBACK); | 2242 | mlx->flags |= cpu_to_be32(MLX4_WQE_CTRL_FORCE_LOOPBACK); |
2227 | if (!is_vlan) { | 2243 | if (!is_vlan) { |
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c index 40f8536c10b0..ac02ce4e8040 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c | |||
@@ -38,7 +38,7 @@ | |||
38 | #define OCRDMA_VID_PCP_SHIFT 0xD | 38 | #define OCRDMA_VID_PCP_SHIFT 0xD |
39 | 39 | ||
40 | static inline int set_av_attr(struct ocrdma_dev *dev, struct ocrdma_ah *ah, | 40 | static inline int set_av_attr(struct ocrdma_dev *dev, struct ocrdma_ah *ah, |
41 | struct ib_ah_attr *attr, int pdid) | 41 | struct ib_ah_attr *attr, union ib_gid *sgid, int pdid) |
42 | { | 42 | { |
43 | int status = 0; | 43 | int status = 0; |
44 | u16 vlan_tag; bool vlan_enabled = false; | 44 | u16 vlan_tag; bool vlan_enabled = false; |
@@ -49,8 +49,7 @@ static inline int set_av_attr(struct ocrdma_dev *dev, struct ocrdma_ah *ah, | |||
49 | memset(ð, 0, sizeof(eth)); | 49 | memset(ð, 0, sizeof(eth)); |
50 | memset(&grh, 0, sizeof(grh)); | 50 | memset(&grh, 0, sizeof(grh)); |
51 | 51 | ||
52 | ah->sgid_index = attr->grh.sgid_index; | 52 | /* VLAN */ |
53 | |||
54 | vlan_tag = attr->vlan_id; | 53 | vlan_tag = attr->vlan_id; |
55 | if (!vlan_tag || (vlan_tag > 0xFFF)) | 54 | if (!vlan_tag || (vlan_tag > 0xFFF)) |
56 | vlan_tag = dev->pvid; | 55 | vlan_tag = dev->pvid; |
@@ -65,15 +64,14 @@ static inline int set_av_attr(struct ocrdma_dev *dev, struct ocrdma_ah *ah, | |||
65 | eth.eth_type = cpu_to_be16(OCRDMA_ROCE_ETH_TYPE); | 64 | eth.eth_type = cpu_to_be16(OCRDMA_ROCE_ETH_TYPE); |
66 | eth_sz = sizeof(struct ocrdma_eth_basic); | 65 | eth_sz = sizeof(struct ocrdma_eth_basic); |
67 | } | 66 | } |
67 | /* MAC */ | ||
68 | memcpy(ð.smac[0], &dev->nic_info.mac_addr[0], ETH_ALEN); | 68 | memcpy(ð.smac[0], &dev->nic_info.mac_addr[0], ETH_ALEN); |
69 | memcpy(ð.dmac[0], attr->dmac, ETH_ALEN); | ||
70 | status = ocrdma_resolve_dmac(dev, attr, ð.dmac[0]); | 69 | status = ocrdma_resolve_dmac(dev, attr, ð.dmac[0]); |
71 | if (status) | 70 | if (status) |
72 | return status; | 71 | return status; |
73 | status = ocrdma_query_gid(&dev->ibdev, 1, attr->grh.sgid_index, | 72 | ah->sgid_index = attr->grh.sgid_index; |
74 | (union ib_gid *)&grh.sgid[0]); | 73 | memcpy(&grh.sgid[0], sgid->raw, sizeof(union ib_gid)); |
75 | if (status) | 74 | memcpy(&grh.dgid[0], attr->grh.dgid.raw, sizeof(attr->grh.dgid.raw)); |
76 | return status; | ||
77 | 75 | ||
78 | grh.tclass_flow = cpu_to_be32((6 << 28) | | 76 | grh.tclass_flow = cpu_to_be32((6 << 28) | |
79 | (attr->grh.traffic_class << 24) | | 77 | (attr->grh.traffic_class << 24) | |
@@ -81,8 +79,7 @@ static inline int set_av_attr(struct ocrdma_dev *dev, struct ocrdma_ah *ah, | |||
81 | /* 0x1b is next header value in GRH */ | 79 | /* 0x1b is next header value in GRH */ |
82 | grh.pdid_hoplimit = cpu_to_be32((pdid << 16) | | 80 | grh.pdid_hoplimit = cpu_to_be32((pdid << 16) | |
83 | (0x1b << 8) | attr->grh.hop_limit); | 81 | (0x1b << 8) | attr->grh.hop_limit); |
84 | 82 | /* Eth HDR */ | |
85 | memcpy(&grh.dgid[0], attr->grh.dgid.raw, sizeof(attr->grh.dgid.raw)); | ||
86 | memcpy(&ah->av->eth_hdr, ð, eth_sz); | 83 | memcpy(&ah->av->eth_hdr, ð, eth_sz); |
87 | memcpy((u8 *)ah->av + eth_sz, &grh, sizeof(struct ocrdma_grh)); | 84 | memcpy((u8 *)ah->av + eth_sz, &grh, sizeof(struct ocrdma_grh)); |
88 | if (vlan_enabled) | 85 | if (vlan_enabled) |
@@ -98,6 +95,8 @@ struct ib_ah *ocrdma_create_ah(struct ib_pd *ibpd, struct ib_ah_attr *attr) | |||
98 | struct ocrdma_ah *ah; | 95 | struct ocrdma_ah *ah; |
99 | struct ocrdma_pd *pd = get_ocrdma_pd(ibpd); | 96 | struct ocrdma_pd *pd = get_ocrdma_pd(ibpd); |
100 | struct ocrdma_dev *dev = get_ocrdma_dev(ibpd->device); | 97 | struct ocrdma_dev *dev = get_ocrdma_dev(ibpd->device); |
98 | union ib_gid sgid; | ||
99 | u8 zmac[ETH_ALEN]; | ||
101 | 100 | ||
102 | if (!(attr->ah_flags & IB_AH_GRH)) | 101 | if (!(attr->ah_flags & IB_AH_GRH)) |
103 | return ERR_PTR(-EINVAL); | 102 | return ERR_PTR(-EINVAL); |
@@ -111,7 +110,27 @@ struct ib_ah *ocrdma_create_ah(struct ib_pd *ibpd, struct ib_ah_attr *attr) | |||
111 | status = ocrdma_alloc_av(dev, ah); | 110 | status = ocrdma_alloc_av(dev, ah); |
112 | if (status) | 111 | if (status) |
113 | goto av_err; | 112 | goto av_err; |
114 | status = set_av_attr(dev, ah, attr, pd->id); | 113 | |
114 | status = ocrdma_query_gid(&dev->ibdev, 1, attr->grh.sgid_index, &sgid); | ||
115 | if (status) { | ||
116 | pr_err("%s(): Failed to query sgid, status = %d\n", | ||
117 | __func__, status); | ||
118 | goto av_conf_err; | ||
119 | } | ||
120 | |||
121 | memset(&zmac, 0, ETH_ALEN); | ||
122 | if (pd->uctx && | ||
123 | memcmp(attr->dmac, &zmac, ETH_ALEN)) { | ||
124 | status = rdma_addr_find_dmac_by_grh(&sgid, &attr->grh.dgid, | ||
125 | attr->dmac, &attr->vlan_id); | ||
126 | if (status) { | ||
127 | pr_err("%s(): Failed to resolve dmac from gid." | ||
128 | "status = %d\n", __func__, status); | ||
129 | goto av_conf_err; | ||
130 | } | ||
131 | } | ||
132 | |||
133 | status = set_av_attr(dev, ah, attr, &sgid, pd->id); | ||
115 | if (status) | 134 | if (status) |
116 | goto av_conf_err; | 135 | goto av_conf_err; |
117 | 136 | ||
@@ -145,7 +164,7 @@ int ocrdma_query_ah(struct ib_ah *ibah, struct ib_ah_attr *attr) | |||
145 | struct ocrdma_av *av = ah->av; | 164 | struct ocrdma_av *av = ah->av; |
146 | struct ocrdma_grh *grh; | 165 | struct ocrdma_grh *grh; |
147 | attr->ah_flags |= IB_AH_GRH; | 166 | attr->ah_flags |= IB_AH_GRH; |
148 | if (ah->av->valid & Bit(1)) { | 167 | if (ah->av->valid & OCRDMA_AV_VALID) { |
149 | grh = (struct ocrdma_grh *)((u8 *)ah->av + | 168 | grh = (struct ocrdma_grh *)((u8 *)ah->av + |
150 | sizeof(struct ocrdma_eth_vlan)); | 169 | sizeof(struct ocrdma_eth_vlan)); |
151 | attr->sl = be16_to_cpu(av->eth_hdr.vlan_tag) >> 13; | 170 | attr->sl = be16_to_cpu(av->eth_hdr.vlan_tag) >> 13; |
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c index acb434d16903..8f5f2577f288 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | |||
@@ -101,7 +101,7 @@ int ocrdma_query_device(struct ib_device *ibdev, struct ib_device_attr *attr) | |||
101 | attr->max_srq_sge = dev->attr.max_srq_sge; | 101 | attr->max_srq_sge = dev->attr.max_srq_sge; |
102 | attr->max_srq_wr = dev->attr.max_rqe; | 102 | attr->max_srq_wr = dev->attr.max_rqe; |
103 | attr->local_ca_ack_delay = dev->attr.local_ca_ack_delay; | 103 | attr->local_ca_ack_delay = dev->attr.local_ca_ack_delay; |
104 | attr->max_fast_reg_page_list_len = 0; | 104 | attr->max_fast_reg_page_list_len = dev->attr.max_pages_per_frmr; |
105 | attr->max_pkeys = 1; | 105 | attr->max_pkeys = 1; |
106 | return 0; | 106 | return 0; |
107 | } | 107 | } |
@@ -2846,11 +2846,9 @@ int ocrdma_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags cq_flags) | |||
2846 | if (cq->first_arm) { | 2846 | if (cq->first_arm) { |
2847 | ocrdma_ring_cq_db(dev, cq_id, arm_needed, sol_needed, 0); | 2847 | ocrdma_ring_cq_db(dev, cq_id, arm_needed, sol_needed, 0); |
2848 | cq->first_arm = false; | 2848 | cq->first_arm = false; |
2849 | goto skip_defer; | ||
2850 | } | 2849 | } |
2851 | cq->deferred_arm = true; | ||
2852 | 2850 | ||
2853 | skip_defer: | 2851 | cq->deferred_arm = true; |
2854 | cq->deferred_sol = sol_needed; | 2852 | cq->deferred_sol = sol_needed; |
2855 | spin_unlock_irqrestore(&cq->cq_lock, flags); | 2853 | spin_unlock_irqrestore(&cq->cq_lock, flags); |
2856 | 2854 | ||
diff --git a/drivers/infiniband/hw/qib/qib_debugfs.c b/drivers/infiniband/hw/qib/qib_debugfs.c index 799a0c3bffc4..6abd3ed3cd51 100644 --- a/drivers/infiniband/hw/qib/qib_debugfs.c +++ b/drivers/infiniband/hw/qib/qib_debugfs.c | |||
@@ -193,6 +193,7 @@ static void *_qp_stats_seq_start(struct seq_file *s, loff_t *pos) | |||
193 | struct qib_qp_iter *iter; | 193 | struct qib_qp_iter *iter; |
194 | loff_t n = *pos; | 194 | loff_t n = *pos; |
195 | 195 | ||
196 | rcu_read_lock(); | ||
196 | iter = qib_qp_iter_init(s->private); | 197 | iter = qib_qp_iter_init(s->private); |
197 | if (!iter) | 198 | if (!iter) |
198 | return NULL; | 199 | return NULL; |
@@ -224,7 +225,7 @@ static void *_qp_stats_seq_next(struct seq_file *s, void *iter_ptr, | |||
224 | 225 | ||
225 | static void _qp_stats_seq_stop(struct seq_file *s, void *iter_ptr) | 226 | static void _qp_stats_seq_stop(struct seq_file *s, void *iter_ptr) |
226 | { | 227 | { |
227 | /* nothing for now */ | 228 | rcu_read_unlock(); |
228 | } | 229 | } |
229 | 230 | ||
230 | static int _qp_stats_seq_show(struct seq_file *s, void *iter_ptr) | 231 | static int _qp_stats_seq_show(struct seq_file *s, void *iter_ptr) |
diff --git a/drivers/infiniband/hw/qib/qib_qp.c b/drivers/infiniband/hw/qib/qib_qp.c index 7fcc150d603c..6ddc0264aad2 100644 --- a/drivers/infiniband/hw/qib/qib_qp.c +++ b/drivers/infiniband/hw/qib/qib_qp.c | |||
@@ -1325,7 +1325,6 @@ int qib_qp_iter_next(struct qib_qp_iter *iter) | |||
1325 | struct qib_qp *pqp = iter->qp; | 1325 | struct qib_qp *pqp = iter->qp; |
1326 | struct qib_qp *qp; | 1326 | struct qib_qp *qp; |
1327 | 1327 | ||
1328 | rcu_read_lock(); | ||
1329 | for (; n < dev->qp_table_size; n++) { | 1328 | for (; n < dev->qp_table_size; n++) { |
1330 | if (pqp) | 1329 | if (pqp) |
1331 | qp = rcu_dereference(pqp->next); | 1330 | qp = rcu_dereference(pqp->next); |
@@ -1333,18 +1332,11 @@ int qib_qp_iter_next(struct qib_qp_iter *iter) | |||
1333 | qp = rcu_dereference(dev->qp_table[n]); | 1332 | qp = rcu_dereference(dev->qp_table[n]); |
1334 | pqp = qp; | 1333 | pqp = qp; |
1335 | if (qp) { | 1334 | if (qp) { |
1336 | if (iter->qp) | ||
1337 | atomic_dec(&iter->qp->refcount); | ||
1338 | atomic_inc(&qp->refcount); | ||
1339 | rcu_read_unlock(); | ||
1340 | iter->qp = qp; | 1335 | iter->qp = qp; |
1341 | iter->n = n; | 1336 | iter->n = n; |
1342 | return 0; | 1337 | return 0; |
1343 | } | 1338 | } |
1344 | } | 1339 | } |
1345 | rcu_read_unlock(); | ||
1346 | if (iter->qp) | ||
1347 | atomic_dec(&iter->qp->refcount); | ||
1348 | return ret; | 1340 | return ret; |
1349 | } | 1341 | } |
1350 | 1342 | ||
diff --git a/drivers/infiniband/hw/qib/qib_user_pages.c b/drivers/infiniband/hw/qib/qib_user_pages.c index 2bc1d2b96298..74f90b2619f6 100644 --- a/drivers/infiniband/hw/qib/qib_user_pages.c +++ b/drivers/infiniband/hw/qib/qib_user_pages.c | |||
@@ -52,7 +52,7 @@ static void __qib_release_user_pages(struct page **p, size_t num_pages, | |||
52 | * Call with current->mm->mmap_sem held. | 52 | * Call with current->mm->mmap_sem held. |
53 | */ | 53 | */ |
54 | static int __qib_get_user_pages(unsigned long start_page, size_t num_pages, | 54 | static int __qib_get_user_pages(unsigned long start_page, size_t num_pages, |
55 | struct page **p, struct vm_area_struct **vma) | 55 | struct page **p) |
56 | { | 56 | { |
57 | unsigned long lock_limit; | 57 | unsigned long lock_limit; |
58 | size_t got; | 58 | size_t got; |
@@ -69,7 +69,7 @@ static int __qib_get_user_pages(unsigned long start_page, size_t num_pages, | |||
69 | ret = get_user_pages(current, current->mm, | 69 | ret = get_user_pages(current, current->mm, |
70 | start_page + got * PAGE_SIZE, | 70 | start_page + got * PAGE_SIZE, |
71 | num_pages - got, 1, 1, | 71 | num_pages - got, 1, 1, |
72 | p + got, vma); | 72 | p + got, NULL); |
73 | if (ret < 0) | 73 | if (ret < 0) |
74 | goto bail_release; | 74 | goto bail_release; |
75 | } | 75 | } |
@@ -136,7 +136,7 @@ int qib_get_user_pages(unsigned long start_page, size_t num_pages, | |||
136 | 136 | ||
137 | down_write(¤t->mm->mmap_sem); | 137 | down_write(¤t->mm->mmap_sem); |
138 | 138 | ||
139 | ret = __qib_get_user_pages(start_page, num_pages, p, NULL); | 139 | ret = __qib_get_user_pages(start_page, num_pages, p); |
140 | 140 | ||
141 | up_write(¤t->mm->mmap_sem); | 141 | up_write(¤t->mm->mmap_sem); |
142 | 142 | ||
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index d4e005720d01..ffb83b5f7e80 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c | |||
@@ -529,21 +529,13 @@ void ipoib_mcast_join_task(struct work_struct *work) | |||
529 | port_attr.state); | 529 | port_attr.state); |
530 | return; | 530 | return; |
531 | } | 531 | } |
532 | priv->local_lid = port_attr.lid; | ||
532 | 533 | ||
533 | if (ib_query_gid(priv->ca, priv->port, 0, &priv->local_gid)) | 534 | if (ib_query_gid(priv->ca, priv->port, 0, &priv->local_gid)) |
534 | ipoib_warn(priv, "ib_query_gid() failed\n"); | 535 | ipoib_warn(priv, "ib_query_gid() failed\n"); |
535 | else | 536 | else |
536 | memcpy(priv->dev->dev_addr + 4, priv->local_gid.raw, sizeof (union ib_gid)); | 537 | memcpy(priv->dev->dev_addr + 4, priv->local_gid.raw, sizeof (union ib_gid)); |
537 | 538 | ||
538 | { | ||
539 | struct ib_port_attr attr; | ||
540 | |||
541 | if (!ib_query_port(priv->ca, priv->port, &attr)) | ||
542 | priv->local_lid = attr.lid; | ||
543 | else | ||
544 | ipoib_warn(priv, "ib_query_port failed\n"); | ||
545 | } | ||
546 | |||
547 | if (!priv->broadcast) { | 539 | if (!priv->broadcast) { |
548 | struct ipoib_mcast *broadcast; | 540 | struct ipoib_mcast *broadcast; |
549 | 541 | ||
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c index 61ee91d88380..93ce62fe1594 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.c +++ b/drivers/infiniband/ulp/iser/iscsi_iser.c | |||
@@ -344,7 +344,6 @@ iscsi_iser_conn_bind(struct iscsi_cls_session *cls_session, | |||
344 | int is_leading) | 344 | int is_leading) |
345 | { | 345 | { |
346 | struct iscsi_conn *conn = cls_conn->dd_data; | 346 | struct iscsi_conn *conn = cls_conn->dd_data; |
347 | struct iscsi_session *session; | ||
348 | struct iser_conn *ib_conn; | 347 | struct iser_conn *ib_conn; |
349 | struct iscsi_endpoint *ep; | 348 | struct iscsi_endpoint *ep; |
350 | int error; | 349 | int error; |
@@ -363,9 +362,17 @@ iscsi_iser_conn_bind(struct iscsi_cls_session *cls_session, | |||
363 | } | 362 | } |
364 | ib_conn = ep->dd_data; | 363 | ib_conn = ep->dd_data; |
365 | 364 | ||
366 | session = conn->session; | 365 | mutex_lock(&ib_conn->state_mutex); |
367 | if (iser_alloc_rx_descriptors(ib_conn, session)) | 366 | if (ib_conn->state != ISER_CONN_UP) { |
368 | return -ENOMEM; | 367 | error = -EINVAL; |
368 | iser_err("iser_conn %p state is %d, teardown started\n", | ||
369 | ib_conn, ib_conn->state); | ||
370 | goto out; | ||
371 | } | ||
372 | |||
373 | error = iser_alloc_rx_descriptors(ib_conn, conn->session); | ||
374 | if (error) | ||
375 | goto out; | ||
369 | 376 | ||
370 | /* binds the iSER connection retrieved from the previously | 377 | /* binds the iSER connection retrieved from the previously |
371 | * connected ep_handle to the iSCSI layer connection. exchanges | 378 | * connected ep_handle to the iSCSI layer connection. exchanges |
@@ -375,7 +382,9 @@ iscsi_iser_conn_bind(struct iscsi_cls_session *cls_session, | |||
375 | conn->dd_data = ib_conn; | 382 | conn->dd_data = ib_conn; |
376 | ib_conn->iscsi_conn = conn; | 383 | ib_conn->iscsi_conn = conn; |
377 | 384 | ||
378 | return 0; | 385 | out: |
386 | mutex_unlock(&ib_conn->state_mutex); | ||
387 | return error; | ||
379 | } | 388 | } |
380 | 389 | ||
381 | static int | 390 | static int |
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h index c877dad381cb..9f0e0e34d6ca 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.h +++ b/drivers/infiniband/ulp/iser/iscsi_iser.h | |||
@@ -69,7 +69,7 @@ | |||
69 | 69 | ||
70 | #define DRV_NAME "iser" | 70 | #define DRV_NAME "iser" |
71 | #define PFX DRV_NAME ": " | 71 | #define PFX DRV_NAME ": " |
72 | #define DRV_VER "1.4" | 72 | #define DRV_VER "1.4.1" |
73 | 73 | ||
74 | #define iser_dbg(fmt, arg...) \ | 74 | #define iser_dbg(fmt, arg...) \ |
75 | do { \ | 75 | do { \ |
diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c index 3ef167f97d6f..3bfec4bbda52 100644 --- a/drivers/infiniband/ulp/iser/iser_verbs.c +++ b/drivers/infiniband/ulp/iser/iser_verbs.c | |||
@@ -73,7 +73,7 @@ static int iser_create_device_ib_res(struct iser_device *device) | |||
73 | { | 73 | { |
74 | struct iser_cq_desc *cq_desc; | 74 | struct iser_cq_desc *cq_desc; |
75 | struct ib_device_attr *dev_attr = &device->dev_attr; | 75 | struct ib_device_attr *dev_attr = &device->dev_attr; |
76 | int ret, i, j; | 76 | int ret, i; |
77 | 77 | ||
78 | ret = ib_query_device(device->ib_device, dev_attr); | 78 | ret = ib_query_device(device->ib_device, dev_attr); |
79 | if (ret) { | 79 | if (ret) { |
@@ -125,16 +125,20 @@ static int iser_create_device_ib_res(struct iser_device *device) | |||
125 | iser_cq_event_callback, | 125 | iser_cq_event_callback, |
126 | (void *)&cq_desc[i], | 126 | (void *)&cq_desc[i], |
127 | ISER_MAX_RX_CQ_LEN, i); | 127 | ISER_MAX_RX_CQ_LEN, i); |
128 | if (IS_ERR(device->rx_cq[i])) | 128 | if (IS_ERR(device->rx_cq[i])) { |
129 | device->rx_cq[i] = NULL; | ||
129 | goto cq_err; | 130 | goto cq_err; |
131 | } | ||
130 | 132 | ||
131 | device->tx_cq[i] = ib_create_cq(device->ib_device, | 133 | device->tx_cq[i] = ib_create_cq(device->ib_device, |
132 | NULL, iser_cq_event_callback, | 134 | NULL, iser_cq_event_callback, |
133 | (void *)&cq_desc[i], | 135 | (void *)&cq_desc[i], |
134 | ISER_MAX_TX_CQ_LEN, i); | 136 | ISER_MAX_TX_CQ_LEN, i); |
135 | 137 | ||
136 | if (IS_ERR(device->tx_cq[i])) | 138 | if (IS_ERR(device->tx_cq[i])) { |
139 | device->tx_cq[i] = NULL; | ||
137 | goto cq_err; | 140 | goto cq_err; |
141 | } | ||
138 | 142 | ||
139 | if (ib_req_notify_cq(device->rx_cq[i], IB_CQ_NEXT_COMP)) | 143 | if (ib_req_notify_cq(device->rx_cq[i], IB_CQ_NEXT_COMP)) |
140 | goto cq_err; | 144 | goto cq_err; |
@@ -160,14 +164,14 @@ static int iser_create_device_ib_res(struct iser_device *device) | |||
160 | handler_err: | 164 | handler_err: |
161 | ib_dereg_mr(device->mr); | 165 | ib_dereg_mr(device->mr); |
162 | dma_mr_err: | 166 | dma_mr_err: |
163 | for (j = 0; j < device->cqs_used; j++) | 167 | for (i = 0; i < device->cqs_used; i++) |
164 | tasklet_kill(&device->cq_tasklet[j]); | 168 | tasklet_kill(&device->cq_tasklet[i]); |
165 | cq_err: | 169 | cq_err: |
166 | for (j = 0; j < i; j++) { | 170 | for (i = 0; i < device->cqs_used; i++) { |
167 | if (device->tx_cq[j]) | 171 | if (device->tx_cq[i]) |
168 | ib_destroy_cq(device->tx_cq[j]); | 172 | ib_destroy_cq(device->tx_cq[i]); |
169 | if (device->rx_cq[j]) | 173 | if (device->rx_cq[i]) |
170 | ib_destroy_cq(device->rx_cq[j]); | 174 | ib_destroy_cq(device->rx_cq[i]); |
171 | } | 175 | } |
172 | ib_dealloc_pd(device->pd); | 176 | ib_dealloc_pd(device->pd); |
173 | pd_err: | 177 | pd_err: |
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index d7690f86fdb9..55de4f6f7eaf 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -540,11 +540,7 @@ static int read_balance(struct r1conf *conf, struct r1bio *r1_bio, int *max_sect | |||
540 | has_nonrot_disk = 0; | 540 | has_nonrot_disk = 0; |
541 | choose_next_idle = 0; | 541 | choose_next_idle = 0; |
542 | 542 | ||
543 | if (conf->mddev->recovery_cp < MaxSector && | 543 | choose_first = (conf->mddev->recovery_cp < this_sector + sectors); |
544 | (this_sector + sectors >= conf->next_resync)) | ||
545 | choose_first = 1; | ||
546 | else | ||
547 | choose_first = 0; | ||
548 | 544 | ||
549 | for (disk = 0 ; disk < conf->raid_disks * 2 ; disk++) { | 545 | for (disk = 0 ; disk < conf->raid_disks * 2 ; disk++) { |
550 | sector_t dist; | 546 | sector_t dist; |
@@ -831,7 +827,7 @@ static void flush_pending_writes(struct r1conf *conf) | |||
831 | * there is no normal IO happeing. It must arrange to call | 827 | * there is no normal IO happeing. It must arrange to call |
832 | * lower_barrier when the particular background IO completes. | 828 | * lower_barrier when the particular background IO completes. |
833 | */ | 829 | */ |
834 | static void raise_barrier(struct r1conf *conf) | 830 | static void raise_barrier(struct r1conf *conf, sector_t sector_nr) |
835 | { | 831 | { |
836 | spin_lock_irq(&conf->resync_lock); | 832 | spin_lock_irq(&conf->resync_lock); |
837 | 833 | ||
@@ -841,6 +837,7 @@ static void raise_barrier(struct r1conf *conf) | |||
841 | 837 | ||
842 | /* block any new IO from starting */ | 838 | /* block any new IO from starting */ |
843 | conf->barrier++; | 839 | conf->barrier++; |
840 | conf->next_resync = sector_nr; | ||
844 | 841 | ||
845 | /* For these conditions we must wait: | 842 | /* For these conditions we must wait: |
846 | * A: while the array is in frozen state | 843 | * A: while the array is in frozen state |
@@ -849,14 +846,17 @@ static void raise_barrier(struct r1conf *conf) | |||
849 | * C: next_resync + RESYNC_SECTORS > start_next_window, meaning | 846 | * C: next_resync + RESYNC_SECTORS > start_next_window, meaning |
850 | * next resync will reach to the window which normal bios are | 847 | * next resync will reach to the window which normal bios are |
851 | * handling. | 848 | * handling. |
849 | * D: while there are any active requests in the current window. | ||
852 | */ | 850 | */ |
853 | wait_event_lock_irq(conf->wait_barrier, | 851 | wait_event_lock_irq(conf->wait_barrier, |
854 | !conf->array_frozen && | 852 | !conf->array_frozen && |
855 | conf->barrier < RESYNC_DEPTH && | 853 | conf->barrier < RESYNC_DEPTH && |
854 | conf->current_window_requests == 0 && | ||
856 | (conf->start_next_window >= | 855 | (conf->start_next_window >= |
857 | conf->next_resync + RESYNC_SECTORS), | 856 | conf->next_resync + RESYNC_SECTORS), |
858 | conf->resync_lock); | 857 | conf->resync_lock); |
859 | 858 | ||
859 | conf->nr_pending++; | ||
860 | spin_unlock_irq(&conf->resync_lock); | 860 | spin_unlock_irq(&conf->resync_lock); |
861 | } | 861 | } |
862 | 862 | ||
@@ -866,6 +866,7 @@ static void lower_barrier(struct r1conf *conf) | |||
866 | BUG_ON(conf->barrier <= 0); | 866 | BUG_ON(conf->barrier <= 0); |
867 | spin_lock_irqsave(&conf->resync_lock, flags); | 867 | spin_lock_irqsave(&conf->resync_lock, flags); |
868 | conf->barrier--; | 868 | conf->barrier--; |
869 | conf->nr_pending--; | ||
869 | spin_unlock_irqrestore(&conf->resync_lock, flags); | 870 | spin_unlock_irqrestore(&conf->resync_lock, flags); |
870 | wake_up(&conf->wait_barrier); | 871 | wake_up(&conf->wait_barrier); |
871 | } | 872 | } |
@@ -877,12 +878,10 @@ static bool need_to_wait_for_sync(struct r1conf *conf, struct bio *bio) | |||
877 | if (conf->array_frozen || !bio) | 878 | if (conf->array_frozen || !bio) |
878 | wait = true; | 879 | wait = true; |
879 | else if (conf->barrier && bio_data_dir(bio) == WRITE) { | 880 | else if (conf->barrier && bio_data_dir(bio) == WRITE) { |
880 | if (conf->next_resync < RESYNC_WINDOW_SECTORS) | 881 | if ((conf->mddev->curr_resync_completed |
881 | wait = true; | 882 | >= bio_end_sector(bio)) || |
882 | else if ((conf->next_resync - RESYNC_WINDOW_SECTORS | 883 | (conf->next_resync + NEXT_NORMALIO_DISTANCE |
883 | >= bio_end_sector(bio)) || | 884 | <= bio->bi_iter.bi_sector)) |
884 | (conf->next_resync + NEXT_NORMALIO_DISTANCE | ||
885 | <= bio->bi_iter.bi_sector)) | ||
886 | wait = false; | 885 | wait = false; |
887 | else | 886 | else |
888 | wait = true; | 887 | wait = true; |
@@ -919,8 +918,8 @@ static sector_t wait_barrier(struct r1conf *conf, struct bio *bio) | |||
919 | } | 918 | } |
920 | 919 | ||
921 | if (bio && bio_data_dir(bio) == WRITE) { | 920 | if (bio && bio_data_dir(bio) == WRITE) { |
922 | if (conf->next_resync + NEXT_NORMALIO_DISTANCE | 921 | if (bio->bi_iter.bi_sector >= |
923 | <= bio->bi_iter.bi_sector) { | 922 | conf->mddev->curr_resync_completed) { |
924 | if (conf->start_next_window == MaxSector) | 923 | if (conf->start_next_window == MaxSector) |
925 | conf->start_next_window = | 924 | conf->start_next_window = |
926 | conf->next_resync + | 925 | conf->next_resync + |
@@ -1186,6 +1185,7 @@ read_again: | |||
1186 | atomic_read(&bitmap->behind_writes) == 0); | 1185 | atomic_read(&bitmap->behind_writes) == 0); |
1187 | } | 1186 | } |
1188 | r1_bio->read_disk = rdisk; | 1187 | r1_bio->read_disk = rdisk; |
1188 | r1_bio->start_next_window = 0; | ||
1189 | 1189 | ||
1190 | read_bio = bio_clone_mddev(bio, GFP_NOIO, mddev); | 1190 | read_bio = bio_clone_mddev(bio, GFP_NOIO, mddev); |
1191 | bio_trim(read_bio, r1_bio->sector - bio->bi_iter.bi_sector, | 1191 | bio_trim(read_bio, r1_bio->sector - bio->bi_iter.bi_sector, |
@@ -1548,8 +1548,13 @@ static void close_sync(struct r1conf *conf) | |||
1548 | mempool_destroy(conf->r1buf_pool); | 1548 | mempool_destroy(conf->r1buf_pool); |
1549 | conf->r1buf_pool = NULL; | 1549 | conf->r1buf_pool = NULL; |
1550 | 1550 | ||
1551 | spin_lock_irq(&conf->resync_lock); | ||
1551 | conf->next_resync = 0; | 1552 | conf->next_resync = 0; |
1552 | conf->start_next_window = MaxSector; | 1553 | conf->start_next_window = MaxSector; |
1554 | conf->current_window_requests += | ||
1555 | conf->next_window_requests; | ||
1556 | conf->next_window_requests = 0; | ||
1557 | spin_unlock_irq(&conf->resync_lock); | ||
1553 | } | 1558 | } |
1554 | 1559 | ||
1555 | static int raid1_spare_active(struct mddev *mddev) | 1560 | static int raid1_spare_active(struct mddev *mddev) |
@@ -2150,7 +2155,7 @@ static void fix_read_error(struct r1conf *conf, int read_disk, | |||
2150 | d--; | 2155 | d--; |
2151 | rdev = conf->mirrors[d].rdev; | 2156 | rdev = conf->mirrors[d].rdev; |
2152 | if (rdev && | 2157 | if (rdev && |
2153 | test_bit(In_sync, &rdev->flags)) | 2158 | !test_bit(Faulty, &rdev->flags)) |
2154 | r1_sync_page_io(rdev, sect, s, | 2159 | r1_sync_page_io(rdev, sect, s, |
2155 | conf->tmppage, WRITE); | 2160 | conf->tmppage, WRITE); |
2156 | } | 2161 | } |
@@ -2162,7 +2167,7 @@ static void fix_read_error(struct r1conf *conf, int read_disk, | |||
2162 | d--; | 2167 | d--; |
2163 | rdev = conf->mirrors[d].rdev; | 2168 | rdev = conf->mirrors[d].rdev; |
2164 | if (rdev && | 2169 | if (rdev && |
2165 | test_bit(In_sync, &rdev->flags)) { | 2170 | !test_bit(Faulty, &rdev->flags)) { |
2166 | if (r1_sync_page_io(rdev, sect, s, | 2171 | if (r1_sync_page_io(rdev, sect, s, |
2167 | conf->tmppage, READ)) { | 2172 | conf->tmppage, READ)) { |
2168 | atomic_add(s, &rdev->corrected_errors); | 2173 | atomic_add(s, &rdev->corrected_errors); |
@@ -2541,9 +2546,8 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr, int *skipp | |||
2541 | 2546 | ||
2542 | bitmap_cond_end_sync(mddev->bitmap, sector_nr); | 2547 | bitmap_cond_end_sync(mddev->bitmap, sector_nr); |
2543 | r1_bio = mempool_alloc(conf->r1buf_pool, GFP_NOIO); | 2548 | r1_bio = mempool_alloc(conf->r1buf_pool, GFP_NOIO); |
2544 | raise_barrier(conf); | ||
2545 | 2549 | ||
2546 | conf->next_resync = sector_nr; | 2550 | raise_barrier(conf, sector_nr); |
2547 | 2551 | ||
2548 | rcu_read_lock(); | 2552 | rcu_read_lock(); |
2549 | /* | 2553 | /* |
diff --git a/drivers/media/common/cx2341x.c b/drivers/media/common/cx2341x.c index 103ef6bad2e2..be763150b8aa 100644 --- a/drivers/media/common/cx2341x.c +++ b/drivers/media/common/cx2341x.c | |||
@@ -1490,6 +1490,7 @@ static struct v4l2_ctrl *cx2341x_ctrl_new_custom(struct v4l2_ctrl_handler *hdl, | |||
1490 | { | 1490 | { |
1491 | struct v4l2_ctrl_config cfg; | 1491 | struct v4l2_ctrl_config cfg; |
1492 | 1492 | ||
1493 | memset(&cfg, 0, sizeof(cfg)); | ||
1493 | cx2341x_ctrl_fill(id, &cfg.name, &cfg.type, &min, &max, &step, &def, &cfg.flags); | 1494 | cx2341x_ctrl_fill(id, &cfg.name, &cfg.type, &min, &max, &step, &def, &cfg.flags); |
1494 | cfg.ops = &cx2341x_ops; | 1495 | cfg.ops = &cx2341x_ops; |
1495 | cfg.id = id; | 1496 | cfg.id = id; |
diff --git a/drivers/media/dvb-frontends/cx24123.c b/drivers/media/dvb-frontends/cx24123.c index 72fb5838cae0..7975c6608e20 100644 --- a/drivers/media/dvb-frontends/cx24123.c +++ b/drivers/media/dvb-frontends/cx24123.c | |||
@@ -1095,6 +1095,7 @@ struct dvb_frontend *cx24123_attach(const struct cx24123_config *config, | |||
1095 | sizeof(state->tuner_i2c_adapter.name)); | 1095 | sizeof(state->tuner_i2c_adapter.name)); |
1096 | state->tuner_i2c_adapter.algo = &cx24123_tuner_i2c_algo; | 1096 | state->tuner_i2c_adapter.algo = &cx24123_tuner_i2c_algo; |
1097 | state->tuner_i2c_adapter.algo_data = NULL; | 1097 | state->tuner_i2c_adapter.algo_data = NULL; |
1098 | state->tuner_i2c_adapter.dev.parent = i2c->dev.parent; | ||
1098 | i2c_set_adapdata(&state->tuner_i2c_adapter, state); | 1099 | i2c_set_adapdata(&state->tuner_i2c_adapter, state); |
1099 | if (i2c_add_adapter(&state->tuner_i2c_adapter) < 0) { | 1100 | if (i2c_add_adapter(&state->tuner_i2c_adapter) < 0) { |
1100 | err("tuner i2c bus could not be initialized\n"); | 1101 | err("tuner i2c bus could not be initialized\n"); |
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index d4fa213ba74a..de88b980a837 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c | |||
@@ -2325,7 +2325,7 @@ static int adv7604_log_status(struct v4l2_subdev *sd) | |||
2325 | v4l2_info(sd, "HDCP keys read: %s%s\n", | 2325 | v4l2_info(sd, "HDCP keys read: %s%s\n", |
2326 | (hdmi_read(sd, 0x04) & 0x20) ? "yes" : "no", | 2326 | (hdmi_read(sd, 0x04) & 0x20) ? "yes" : "no", |
2327 | (hdmi_read(sd, 0x04) & 0x10) ? "ERROR" : ""); | 2327 | (hdmi_read(sd, 0x04) & 0x10) ? "ERROR" : ""); |
2328 | if (!is_hdmi(sd)) { | 2328 | if (is_hdmi(sd)) { |
2329 | bool audio_pll_locked = hdmi_read(sd, 0x04) & 0x01; | 2329 | bool audio_pll_locked = hdmi_read(sd, 0x04) & 0x01; |
2330 | bool audio_sample_packet_detect = hdmi_read(sd, 0x18) & 0x01; | 2330 | bool audio_sample_packet_detect = hdmi_read(sd, 0x18) & 0x01; |
2331 | bool audio_mute = io_read(sd, 0x65) & 0x40; | 2331 | bool audio_mute = io_read(sd, 0x65) & 0x40; |
diff --git a/drivers/media/radio/radio-miropcm20.c b/drivers/media/radio/radio-miropcm20.c index 998919e97dfe..7b35e633118d 100644 --- a/drivers/media/radio/radio-miropcm20.c +++ b/drivers/media/radio/radio-miropcm20.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/io.h> | ||
30 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
31 | #include <linux/videodev2.h> | 32 | #include <linux/videodev2.h> |
32 | #include <linux/kthread.h> | 33 | #include <linux/kthread.h> |
diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c index 90dec2955f1c..29abc379551e 100644 --- a/drivers/media/usb/em28xx/em28xx-video.c +++ b/drivers/media/usb/em28xx/em28xx-video.c | |||
@@ -1342,7 +1342,7 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv, | |||
1342 | struct em28xx *dev = video_drvdata(file); | 1342 | struct em28xx *dev = video_drvdata(file); |
1343 | struct em28xx_v4l2 *v4l2 = dev->v4l2; | 1343 | struct em28xx_v4l2 *v4l2 = dev->v4l2; |
1344 | 1344 | ||
1345 | if (v4l2->streaming_users > 0) | 1345 | if (vb2_is_busy(&v4l2->vb_vidq)) |
1346 | return -EBUSY; | 1346 | return -EBUSY; |
1347 | 1347 | ||
1348 | vidioc_try_fmt_vid_cap(file, priv, f); | 1348 | vidioc_try_fmt_vid_cap(file, priv, f); |
@@ -1883,8 +1883,9 @@ static int em28xx_v4l2_open(struct file *filp) | |||
1883 | return -EINVAL; | 1883 | return -EINVAL; |
1884 | } | 1884 | } |
1885 | 1885 | ||
1886 | em28xx_videodbg("open dev=%s type=%s\n", | 1886 | em28xx_videodbg("open dev=%s type=%s users=%d\n", |
1887 | video_device_node_name(vdev), v4l2_type_names[fh_type]); | 1887 | video_device_node_name(vdev), v4l2_type_names[fh_type], |
1888 | v4l2->users); | ||
1888 | 1889 | ||
1889 | if (mutex_lock_interruptible(&dev->lock)) | 1890 | if (mutex_lock_interruptible(&dev->lock)) |
1890 | return -ERESTARTSYS; | 1891 | return -ERESTARTSYS; |
@@ -1897,9 +1898,7 @@ static int em28xx_v4l2_open(struct file *filp) | |||
1897 | return ret; | 1898 | return ret; |
1898 | } | 1899 | } |
1899 | 1900 | ||
1900 | if (v4l2_fh_is_singular_file(filp)) { | 1901 | if (v4l2->users == 0) { |
1901 | em28xx_videodbg("first opened filehandle, initializing device\n"); | ||
1902 | |||
1903 | em28xx_set_mode(dev, EM28XX_ANALOG_MODE); | 1902 | em28xx_set_mode(dev, EM28XX_ANALOG_MODE); |
1904 | 1903 | ||
1905 | if (vdev->vfl_type != VFL_TYPE_RADIO) | 1904 | if (vdev->vfl_type != VFL_TYPE_RADIO) |
@@ -1910,8 +1909,6 @@ static int em28xx_v4l2_open(struct file *filp) | |||
1910 | * of some i2c devices | 1909 | * of some i2c devices |
1911 | */ | 1910 | */ |
1912 | em28xx_wake_i2c(dev); | 1911 | em28xx_wake_i2c(dev); |
1913 | } else { | ||
1914 | em28xx_videodbg("further filehandles are already opened\n"); | ||
1915 | } | 1912 | } |
1916 | 1913 | ||
1917 | if (vdev->vfl_type == VFL_TYPE_RADIO) { | 1914 | if (vdev->vfl_type == VFL_TYPE_RADIO) { |
@@ -1921,6 +1918,7 @@ static int em28xx_v4l2_open(struct file *filp) | |||
1921 | 1918 | ||
1922 | kref_get(&dev->ref); | 1919 | kref_get(&dev->ref); |
1923 | kref_get(&v4l2->ref); | 1920 | kref_get(&v4l2->ref); |
1921 | v4l2->users++; | ||
1924 | 1922 | ||
1925 | mutex_unlock(&dev->lock); | 1923 | mutex_unlock(&dev->lock); |
1926 | 1924 | ||
@@ -2027,11 +2025,12 @@ static int em28xx_v4l2_close(struct file *filp) | |||
2027 | struct em28xx_v4l2 *v4l2 = dev->v4l2; | 2025 | struct em28xx_v4l2 *v4l2 = dev->v4l2; |
2028 | int errCode; | 2026 | int errCode; |
2029 | 2027 | ||
2030 | mutex_lock(&dev->lock); | 2028 | em28xx_videodbg("users=%d\n", v4l2->users); |
2031 | 2029 | ||
2032 | if (v4l2_fh_is_singular_file(filp)) { | 2030 | vb2_fop_release(filp); |
2033 | em28xx_videodbg("last opened filehandle, shutting down device\n"); | 2031 | mutex_lock(&dev->lock); |
2034 | 2032 | ||
2033 | if (v4l2->users == 1) { | ||
2035 | /* No sense to try to write to the device */ | 2034 | /* No sense to try to write to the device */ |
2036 | if (dev->disconnected) | 2035 | if (dev->disconnected) |
2037 | goto exit; | 2036 | goto exit; |
@@ -2050,12 +2049,10 @@ static int em28xx_v4l2_close(struct file *filp) | |||
2050 | em28xx_errdev("cannot change alternate number to " | 2049 | em28xx_errdev("cannot change alternate number to " |
2051 | "0 (error=%i)\n", errCode); | 2050 | "0 (error=%i)\n", errCode); |
2052 | } | 2051 | } |
2053 | } else { | ||
2054 | em28xx_videodbg("further opened filehandles left\n"); | ||
2055 | } | 2052 | } |
2056 | 2053 | ||
2057 | exit: | 2054 | exit: |
2058 | vb2_fop_release(filp); | 2055 | v4l2->users--; |
2059 | kref_put(&v4l2->ref, em28xx_free_v4l2); | 2056 | kref_put(&v4l2->ref, em28xx_free_v4l2); |
2060 | mutex_unlock(&dev->lock); | 2057 | mutex_unlock(&dev->lock); |
2061 | kref_put(&dev->ref, em28xx_free_device); | 2058 | kref_put(&dev->ref, em28xx_free_device); |
diff --git a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h index 84ef8efdb148..4360338e7b31 100644 --- a/drivers/media/usb/em28xx/em28xx.h +++ b/drivers/media/usb/em28xx/em28xx.h | |||
@@ -524,6 +524,7 @@ struct em28xx_v4l2 { | |||
524 | int sensor_yres; | 524 | int sensor_yres; |
525 | int sensor_xtal; | 525 | int sensor_xtal; |
526 | 526 | ||
527 | int users; /* user count for exclusive use */ | ||
527 | int streaming_users; /* number of actively streaming users */ | 528 | int streaming_users; /* number of actively streaming users */ |
528 | 529 | ||
529 | u32 frequency; /* selected tuner frequency */ | 530 | u32 frequency; /* selected tuner frequency */ |
diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c index c359006074a8..25d3ae2188cb 100644 --- a/drivers/media/v4l2-core/videobuf2-core.c +++ b/drivers/media/v4l2-core/videobuf2-core.c | |||
@@ -971,6 +971,7 @@ static int __reqbufs(struct vb2_queue *q, struct v4l2_requestbuffers *req) | |||
971 | * to the userspace. | 971 | * to the userspace. |
972 | */ | 972 | */ |
973 | req->count = allocated_buffers; | 973 | req->count = allocated_buffers; |
974 | q->waiting_for_buffers = !V4L2_TYPE_IS_OUTPUT(q->type); | ||
974 | 975 | ||
975 | return 0; | 976 | return 0; |
976 | } | 977 | } |
@@ -1018,6 +1019,7 @@ static int __create_bufs(struct vb2_queue *q, struct v4l2_create_buffers *create | |||
1018 | memset(q->plane_sizes, 0, sizeof(q->plane_sizes)); | 1019 | memset(q->plane_sizes, 0, sizeof(q->plane_sizes)); |
1019 | memset(q->alloc_ctx, 0, sizeof(q->alloc_ctx)); | 1020 | memset(q->alloc_ctx, 0, sizeof(q->alloc_ctx)); |
1020 | q->memory = create->memory; | 1021 | q->memory = create->memory; |
1022 | q->waiting_for_buffers = !V4L2_TYPE_IS_OUTPUT(q->type); | ||
1021 | } | 1023 | } |
1022 | 1024 | ||
1023 | num_buffers = min(create->count, VIDEO_MAX_FRAME - q->num_buffers); | 1025 | num_buffers = min(create->count, VIDEO_MAX_FRAME - q->num_buffers); |
@@ -1130,7 +1132,7 @@ EXPORT_SYMBOL_GPL(vb2_plane_vaddr); | |||
1130 | */ | 1132 | */ |
1131 | void *vb2_plane_cookie(struct vb2_buffer *vb, unsigned int plane_no) | 1133 | void *vb2_plane_cookie(struct vb2_buffer *vb, unsigned int plane_no) |
1132 | { | 1134 | { |
1133 | if (plane_no > vb->num_planes || !vb->planes[plane_no].mem_priv) | 1135 | if (plane_no >= vb->num_planes || !vb->planes[plane_no].mem_priv) |
1134 | return NULL; | 1136 | return NULL; |
1135 | 1137 | ||
1136 | return call_ptr_memop(vb, cookie, vb->planes[plane_no].mem_priv); | 1138 | return call_ptr_memop(vb, cookie, vb->planes[plane_no].mem_priv); |
@@ -1165,13 +1167,10 @@ void vb2_buffer_done(struct vb2_buffer *vb, enum vb2_buffer_state state) | |||
1165 | if (WARN_ON(vb->state != VB2_BUF_STATE_ACTIVE)) | 1167 | if (WARN_ON(vb->state != VB2_BUF_STATE_ACTIVE)) |
1166 | return; | 1168 | return; |
1167 | 1169 | ||
1168 | if (!q->start_streaming_called) { | 1170 | if (WARN_ON(state != VB2_BUF_STATE_DONE && |
1169 | if (WARN_ON(state != VB2_BUF_STATE_QUEUED)) | 1171 | state != VB2_BUF_STATE_ERROR && |
1170 | state = VB2_BUF_STATE_QUEUED; | 1172 | state != VB2_BUF_STATE_QUEUED)) |
1171 | } else if (WARN_ON(state != VB2_BUF_STATE_DONE && | 1173 | state = VB2_BUF_STATE_ERROR; |
1172 | state != VB2_BUF_STATE_ERROR)) { | ||
1173 | state = VB2_BUF_STATE_ERROR; | ||
1174 | } | ||
1175 | 1174 | ||
1176 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 1175 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
1177 | /* | 1176 | /* |
@@ -1762,6 +1761,12 @@ static int vb2_start_streaming(struct vb2_queue *q) | |||
1762 | q->start_streaming_called = 0; | 1761 | q->start_streaming_called = 0; |
1763 | 1762 | ||
1764 | dprintk(1, "driver refused to start streaming\n"); | 1763 | dprintk(1, "driver refused to start streaming\n"); |
1764 | /* | ||
1765 | * If you see this warning, then the driver isn't cleaning up properly | ||
1766 | * after a failed start_streaming(). See the start_streaming() | ||
1767 | * documentation in videobuf2-core.h for more information how buffers | ||
1768 | * should be returned to vb2 in start_streaming(). | ||
1769 | */ | ||
1765 | if (WARN_ON(atomic_read(&q->owned_by_drv_count))) { | 1770 | if (WARN_ON(atomic_read(&q->owned_by_drv_count))) { |
1766 | unsigned i; | 1771 | unsigned i; |
1767 | 1772 | ||
@@ -1777,6 +1782,12 @@ static int vb2_start_streaming(struct vb2_queue *q) | |||
1777 | /* Must be zero now */ | 1782 | /* Must be zero now */ |
1778 | WARN_ON(atomic_read(&q->owned_by_drv_count)); | 1783 | WARN_ON(atomic_read(&q->owned_by_drv_count)); |
1779 | } | 1784 | } |
1785 | /* | ||
1786 | * If done_list is not empty, then start_streaming() didn't call | ||
1787 | * vb2_buffer_done(vb, VB2_BUF_STATE_QUEUED) but STATE_ERROR or | ||
1788 | * STATE_DONE. | ||
1789 | */ | ||
1790 | WARN_ON(!list_empty(&q->done_list)); | ||
1780 | return ret; | 1791 | return ret; |
1781 | } | 1792 | } |
1782 | 1793 | ||
@@ -1812,6 +1823,7 @@ static int vb2_internal_qbuf(struct vb2_queue *q, struct v4l2_buffer *b) | |||
1812 | */ | 1823 | */ |
1813 | list_add_tail(&vb->queued_entry, &q->queued_list); | 1824 | list_add_tail(&vb->queued_entry, &q->queued_list); |
1814 | q->queued_count++; | 1825 | q->queued_count++; |
1826 | q->waiting_for_buffers = false; | ||
1815 | vb->state = VB2_BUF_STATE_QUEUED; | 1827 | vb->state = VB2_BUF_STATE_QUEUED; |
1816 | if (V4L2_TYPE_IS_OUTPUT(q->type)) { | 1828 | if (V4L2_TYPE_IS_OUTPUT(q->type)) { |
1817 | /* | 1829 | /* |
@@ -2123,6 +2135,12 @@ static void __vb2_queue_cancel(struct vb2_queue *q) | |||
2123 | if (q->start_streaming_called) | 2135 | if (q->start_streaming_called) |
2124 | call_void_qop(q, stop_streaming, q); | 2136 | call_void_qop(q, stop_streaming, q); |
2125 | 2137 | ||
2138 | /* | ||
2139 | * If you see this warning, then the driver isn't cleaning up properly | ||
2140 | * in stop_streaming(). See the stop_streaming() documentation in | ||
2141 | * videobuf2-core.h for more information how buffers should be returned | ||
2142 | * to vb2 in stop_streaming(). | ||
2143 | */ | ||
2126 | if (WARN_ON(atomic_read(&q->owned_by_drv_count))) { | 2144 | if (WARN_ON(atomic_read(&q->owned_by_drv_count))) { |
2127 | for (i = 0; i < q->num_buffers; ++i) | 2145 | for (i = 0; i < q->num_buffers; ++i) |
2128 | if (q->bufs[i]->state == VB2_BUF_STATE_ACTIVE) | 2146 | if (q->bufs[i]->state == VB2_BUF_STATE_ACTIVE) |
@@ -2272,6 +2290,7 @@ static int vb2_internal_streamoff(struct vb2_queue *q, enum v4l2_buf_type type) | |||
2272 | * their normal dequeued state. | 2290 | * their normal dequeued state. |
2273 | */ | 2291 | */ |
2274 | __vb2_queue_cancel(q); | 2292 | __vb2_queue_cancel(q); |
2293 | q->waiting_for_buffers = !V4L2_TYPE_IS_OUTPUT(q->type); | ||
2275 | 2294 | ||
2276 | dprintk(3, "successful\n"); | 2295 | dprintk(3, "successful\n"); |
2277 | return 0; | 2296 | return 0; |
@@ -2590,10 +2609,17 @@ unsigned int vb2_poll(struct vb2_queue *q, struct file *file, poll_table *wait) | |||
2590 | } | 2609 | } |
2591 | 2610 | ||
2592 | /* | 2611 | /* |
2593 | * There is nothing to wait for if no buffer has been queued and the | 2612 | * There is nothing to wait for if the queue isn't streaming, or if the |
2594 | * queue isn't streaming, or if the error flag is set. | 2613 | * error flag is set. |
2614 | */ | ||
2615 | if (!vb2_is_streaming(q) || q->error) | ||
2616 | return res | POLLERR; | ||
2617 | /* | ||
2618 | * For compatibility with vb1: if QBUF hasn't been called yet, then | ||
2619 | * return POLLERR as well. This only affects capture queues, output | ||
2620 | * queues will always initialize waiting_for_buffers to false. | ||
2595 | */ | 2621 | */ |
2596 | if ((list_empty(&q->queued_list) && !vb2_is_streaming(q)) || q->error) | 2622 | if (q->waiting_for_buffers) |
2597 | return res | POLLERR; | 2623 | return res | POLLERR; |
2598 | 2624 | ||
2599 | /* | 2625 | /* |
diff --git a/drivers/media/v4l2-core/videobuf2-dma-sg.c b/drivers/media/v4l2-core/videobuf2-dma-sg.c index adefc31bb853..9b163a440f89 100644 --- a/drivers/media/v4l2-core/videobuf2-dma-sg.c +++ b/drivers/media/v4l2-core/videobuf2-dma-sg.c | |||
@@ -113,7 +113,7 @@ static void *vb2_dma_sg_alloc(void *alloc_ctx, unsigned long size, gfp_t gfp_fla | |||
113 | goto fail_pages_alloc; | 113 | goto fail_pages_alloc; |
114 | 114 | ||
115 | ret = sg_alloc_table_from_pages(&buf->sg_table, buf->pages, | 115 | ret = sg_alloc_table_from_pages(&buf->sg_table, buf->pages, |
116 | buf->num_pages, 0, size, gfp_flags); | 116 | buf->num_pages, 0, size, GFP_KERNEL); |
117 | if (ret) | 117 | if (ret) |
118 | goto fail_table_alloc; | 118 | goto fail_table_alloc; |
119 | 119 | ||
diff --git a/drivers/net/ethernet/mellanox/mlx4/mr.c b/drivers/net/ethernet/mellanox/mlx4/mr.c index 7d717eccb7b0..193a6adb5d04 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mr.c +++ b/drivers/net/ethernet/mellanox/mlx4/mr.c | |||
@@ -298,6 +298,7 @@ static int mlx4_HW2SW_MPT(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox | |||
298 | MLX4_CMD_TIME_CLASS_B, MLX4_CMD_WRAPPED); | 298 | MLX4_CMD_TIME_CLASS_B, MLX4_CMD_WRAPPED); |
299 | } | 299 | } |
300 | 300 | ||
301 | /* Must protect against concurrent access */ | ||
301 | int mlx4_mr_hw_get_mpt(struct mlx4_dev *dev, struct mlx4_mr *mmr, | 302 | int mlx4_mr_hw_get_mpt(struct mlx4_dev *dev, struct mlx4_mr *mmr, |
302 | struct mlx4_mpt_entry ***mpt_entry) | 303 | struct mlx4_mpt_entry ***mpt_entry) |
303 | { | 304 | { |
@@ -305,13 +306,10 @@ int mlx4_mr_hw_get_mpt(struct mlx4_dev *dev, struct mlx4_mr *mmr, | |||
305 | int key = key_to_hw_index(mmr->key) & (dev->caps.num_mpts - 1); | 306 | int key = key_to_hw_index(mmr->key) & (dev->caps.num_mpts - 1); |
306 | struct mlx4_cmd_mailbox *mailbox = NULL; | 307 | struct mlx4_cmd_mailbox *mailbox = NULL; |
307 | 308 | ||
308 | /* Make sure that at this point we have single-threaded access only */ | ||
309 | |||
310 | if (mmr->enabled != MLX4_MPT_EN_HW) | 309 | if (mmr->enabled != MLX4_MPT_EN_HW) |
311 | return -EINVAL; | 310 | return -EINVAL; |
312 | 311 | ||
313 | err = mlx4_HW2SW_MPT(dev, NULL, key); | 312 | err = mlx4_HW2SW_MPT(dev, NULL, key); |
314 | |||
315 | if (err) { | 313 | if (err) { |
316 | mlx4_warn(dev, "HW2SW_MPT failed (%d).", err); | 314 | mlx4_warn(dev, "HW2SW_MPT failed (%d).", err); |
317 | mlx4_warn(dev, "Most likely the MR has MWs bound to it.\n"); | 315 | mlx4_warn(dev, "Most likely the MR has MWs bound to it.\n"); |
@@ -333,7 +331,6 @@ int mlx4_mr_hw_get_mpt(struct mlx4_dev *dev, struct mlx4_mr *mmr, | |||
333 | 0, MLX4_CMD_QUERY_MPT, | 331 | 0, MLX4_CMD_QUERY_MPT, |
334 | MLX4_CMD_TIME_CLASS_B, | 332 | MLX4_CMD_TIME_CLASS_B, |
335 | MLX4_CMD_WRAPPED); | 333 | MLX4_CMD_WRAPPED); |
336 | |||
337 | if (err) | 334 | if (err) |
338 | goto free_mailbox; | 335 | goto free_mailbox; |
339 | 336 | ||
@@ -378,9 +375,10 @@ int mlx4_mr_hw_write_mpt(struct mlx4_dev *dev, struct mlx4_mr *mmr, | |||
378 | err = mlx4_SW2HW_MPT(dev, mailbox, key); | 375 | err = mlx4_SW2HW_MPT(dev, mailbox, key); |
379 | } | 376 | } |
380 | 377 | ||
381 | mmr->pd = be32_to_cpu((*mpt_entry)->pd_flags) & MLX4_MPT_PD_MASK; | 378 | if (!err) { |
382 | if (!err) | 379 | mmr->pd = be32_to_cpu((*mpt_entry)->pd_flags) & MLX4_MPT_PD_MASK; |
383 | mmr->enabled = MLX4_MPT_EN_HW; | 380 | mmr->enabled = MLX4_MPT_EN_HW; |
381 | } | ||
384 | return err; | 382 | return err; |
385 | } | 383 | } |
386 | EXPORT_SYMBOL_GPL(mlx4_mr_hw_write_mpt); | 384 | EXPORT_SYMBOL_GPL(mlx4_mr_hw_write_mpt); |
@@ -400,11 +398,12 @@ EXPORT_SYMBOL_GPL(mlx4_mr_hw_put_mpt); | |||
400 | int mlx4_mr_hw_change_pd(struct mlx4_dev *dev, struct mlx4_mpt_entry *mpt_entry, | 398 | int mlx4_mr_hw_change_pd(struct mlx4_dev *dev, struct mlx4_mpt_entry *mpt_entry, |
401 | u32 pdn) | 399 | u32 pdn) |
402 | { | 400 | { |
403 | u32 pd_flags = be32_to_cpu(mpt_entry->pd_flags); | 401 | u32 pd_flags = be32_to_cpu(mpt_entry->pd_flags) & ~MLX4_MPT_PD_MASK; |
404 | /* The wrapper function will put the slave's id here */ | 402 | /* The wrapper function will put the slave's id here */ |
405 | if (mlx4_is_mfunc(dev)) | 403 | if (mlx4_is_mfunc(dev)) |
406 | pd_flags &= ~MLX4_MPT_PD_VF_MASK; | 404 | pd_flags &= ~MLX4_MPT_PD_VF_MASK; |
407 | mpt_entry->pd_flags = cpu_to_be32((pd_flags & ~MLX4_MPT_PD_MASK) | | 405 | |
406 | mpt_entry->pd_flags = cpu_to_be32(pd_flags | | ||
408 | (pdn & MLX4_MPT_PD_MASK) | 407 | (pdn & MLX4_MPT_PD_MASK) |
409 | | MLX4_MPT_PD_FLAG_EN_INV); | 408 | | MLX4_MPT_PD_FLAG_EN_INV); |
410 | return 0; | 409 | return 0; |
@@ -600,14 +599,18 @@ int mlx4_mr_rereg_mem_write(struct mlx4_dev *dev, struct mlx4_mr *mr, | |||
600 | { | 599 | { |
601 | int err; | 600 | int err; |
602 | 601 | ||
603 | mpt_entry->start = cpu_to_be64(mr->iova); | 602 | mpt_entry->start = cpu_to_be64(iova); |
604 | mpt_entry->length = cpu_to_be64(mr->size); | 603 | mpt_entry->length = cpu_to_be64(size); |
605 | mpt_entry->entity_size = cpu_to_be32(mr->mtt.page_shift); | 604 | mpt_entry->entity_size = cpu_to_be32(page_shift); |
606 | 605 | ||
607 | err = mlx4_mtt_init(dev, npages, page_shift, &mr->mtt); | 606 | err = mlx4_mtt_init(dev, npages, page_shift, &mr->mtt); |
608 | if (err) | 607 | if (err) |
609 | return err; | 608 | return err; |
610 | 609 | ||
610 | mpt_entry->pd_flags &= cpu_to_be32(MLX4_MPT_PD_MASK | | ||
611 | MLX4_MPT_PD_FLAG_EN_INV); | ||
612 | mpt_entry->flags &= cpu_to_be32(MLX4_MPT_FLAG_FREE | | ||
613 | MLX4_MPT_FLAG_SW_OWNS); | ||
611 | if (mr->mtt.order < 0) { | 614 | if (mr->mtt.order < 0) { |
612 | mpt_entry->flags |= cpu_to_be32(MLX4_MPT_FLAG_PHYSICAL); | 615 | mpt_entry->flags |= cpu_to_be32(MLX4_MPT_FLAG_PHYSICAL); |
613 | mpt_entry->mtt_addr = 0; | 616 | mpt_entry->mtt_addr = 0; |
@@ -617,6 +620,14 @@ int mlx4_mr_rereg_mem_write(struct mlx4_dev *dev, struct mlx4_mr *mr, | |||
617 | if (mr->mtt.page_shift == 0) | 620 | if (mr->mtt.page_shift == 0) |
618 | mpt_entry->mtt_sz = cpu_to_be32(1 << mr->mtt.order); | 621 | mpt_entry->mtt_sz = cpu_to_be32(1 << mr->mtt.order); |
619 | } | 622 | } |
623 | if (mr->mtt.order >= 0 && mr->mtt.page_shift == 0) { | ||
624 | /* fast register MR in free state */ | ||
625 | mpt_entry->flags |= cpu_to_be32(MLX4_MPT_FLAG_FREE); | ||
626 | mpt_entry->pd_flags |= cpu_to_be32(MLX4_MPT_PD_FLAG_FAST_REG | | ||
627 | MLX4_MPT_PD_FLAG_RAE); | ||
628 | } else { | ||
629 | mpt_entry->flags |= cpu_to_be32(MLX4_MPT_FLAG_SW_OWNS); | ||
630 | } | ||
620 | mr->enabled = MLX4_MPT_EN_SW; | 631 | mr->enabled = MLX4_MPT_EN_SW; |
621 | 632 | ||
622 | return 0; | 633 | return 0; |
diff --git a/drivers/net/ethernet/mellanox/mlx4/port.c b/drivers/net/ethernet/mellanox/mlx4/port.c index 9ba0c1ca10d5..94eeb2c7d7e4 100644 --- a/drivers/net/ethernet/mellanox/mlx4/port.c +++ b/drivers/net/ethernet/mellanox/mlx4/port.c | |||
@@ -103,7 +103,8 @@ static int find_index(struct mlx4_dev *dev, | |||
103 | int i; | 103 | int i; |
104 | 104 | ||
105 | for (i = 0; i < MLX4_MAX_MAC_NUM; i++) { | 105 | for (i = 0; i < MLX4_MAX_MAC_NUM; i++) { |
106 | if ((mac & MLX4_MAC_MASK) == | 106 | if (table->refs[i] && |
107 | (MLX4_MAC_MASK & mac) == | ||
107 | (MLX4_MAC_MASK & be64_to_cpu(table->entries[i]))) | 108 | (MLX4_MAC_MASK & be64_to_cpu(table->entries[i]))) |
108 | return i; | 109 | return i; |
109 | } | 110 | } |
@@ -165,12 +166,14 @@ int __mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac) | |||
165 | 166 | ||
166 | mutex_lock(&table->mutex); | 167 | mutex_lock(&table->mutex); |
167 | for (i = 0; i < MLX4_MAX_MAC_NUM; i++) { | 168 | for (i = 0; i < MLX4_MAX_MAC_NUM; i++) { |
168 | if (free < 0 && !table->entries[i]) { | 169 | if (!table->refs[i]) { |
169 | free = i; | 170 | if (free < 0) |
171 | free = i; | ||
170 | continue; | 172 | continue; |
171 | } | 173 | } |
172 | 174 | ||
173 | if (mac == (MLX4_MAC_MASK & be64_to_cpu(table->entries[i]))) { | 175 | if ((MLX4_MAC_MASK & mac) == |
176 | (MLX4_MAC_MASK & be64_to_cpu(table->entries[i]))) { | ||
174 | /* MAC already registered, increment ref count */ | 177 | /* MAC already registered, increment ref count */ |
175 | err = i; | 178 | err = i; |
176 | ++table->refs[i]; | 179 | ++table->refs[i]; |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index d9be83158a82..4a8c9b80b08e 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -505,7 +505,7 @@ irqreturn_t ath_isr(int irq, void *dev) | |||
505 | * touch anything. Note this can happen early | 505 | * touch anything. Note this can happen early |
506 | * on if the IRQ is shared. | 506 | * on if the IRQ is shared. |
507 | */ | 507 | */ |
508 | if (test_bit(ATH_OP_INVALID, &common->op_flags)) | 508 | if (!ah || test_bit(ATH_OP_INVALID, &common->op_flags)) |
509 | return IRQ_NONE; | 509 | return IRQ_NONE; |
510 | 510 | ||
511 | /* shared irq, not for us */ | 511 | /* shared irq, not for us */ |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c index 54fc1a1cb4f7..1db11b00001c 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | |||
@@ -4927,7 +4927,7 @@ static void brcmf_count_20mhz_channels(struct brcmf_cfg80211_info *cfg, | |||
4927 | struct brcmu_chan ch; | 4927 | struct brcmu_chan ch; |
4928 | int i; | 4928 | int i; |
4929 | 4929 | ||
4930 | for (i = 0; i <= total; i++) { | 4930 | for (i = 0; i < total; i++) { |
4931 | ch.chspec = (u16)le32_to_cpu(chlist->element[i]); | 4931 | ch.chspec = (u16)le32_to_cpu(chlist->element[i]); |
4932 | cfg->d11inf.decchspec(&ch); | 4932 | cfg->d11inf.decchspec(&ch); |
4933 | 4933 | ||
diff --git a/drivers/nfc/microread/microread.c b/drivers/nfc/microread/microread.c index f868333271aa..963a4a5dc88e 100644 --- a/drivers/nfc/microread/microread.c +++ b/drivers/nfc/microread/microread.c | |||
@@ -501,9 +501,13 @@ static void microread_target_discovered(struct nfc_hci_dev *hdev, u8 gate, | |||
501 | targets->sens_res = | 501 | targets->sens_res = |
502 | be16_to_cpu(*(u16 *)&skb->data[MICROREAD_EMCF_A_ATQA]); | 502 | be16_to_cpu(*(u16 *)&skb->data[MICROREAD_EMCF_A_ATQA]); |
503 | targets->sel_res = skb->data[MICROREAD_EMCF_A_SAK]; | 503 | targets->sel_res = skb->data[MICROREAD_EMCF_A_SAK]; |
504 | memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A_UID], | ||
505 | skb->data[MICROREAD_EMCF_A_LEN]); | ||
506 | targets->nfcid1_len = skb->data[MICROREAD_EMCF_A_LEN]; | 504 | targets->nfcid1_len = skb->data[MICROREAD_EMCF_A_LEN]; |
505 | if (targets->nfcid1_len > sizeof(targets->nfcid1)) { | ||
506 | r = -EINVAL; | ||
507 | goto exit_free; | ||
508 | } | ||
509 | memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A_UID], | ||
510 | targets->nfcid1_len); | ||
507 | break; | 511 | break; |
508 | case MICROREAD_GATE_ID_MREAD_ISO_A_3: | 512 | case MICROREAD_GATE_ID_MREAD_ISO_A_3: |
509 | targets->supported_protocols = | 513 | targets->supported_protocols = |
@@ -511,9 +515,13 @@ static void microread_target_discovered(struct nfc_hci_dev *hdev, u8 gate, | |||
511 | targets->sens_res = | 515 | targets->sens_res = |
512 | be16_to_cpu(*(u16 *)&skb->data[MICROREAD_EMCF_A3_ATQA]); | 516 | be16_to_cpu(*(u16 *)&skb->data[MICROREAD_EMCF_A3_ATQA]); |
513 | targets->sel_res = skb->data[MICROREAD_EMCF_A3_SAK]; | 517 | targets->sel_res = skb->data[MICROREAD_EMCF_A3_SAK]; |
514 | memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A3_UID], | ||
515 | skb->data[MICROREAD_EMCF_A3_LEN]); | ||
516 | targets->nfcid1_len = skb->data[MICROREAD_EMCF_A3_LEN]; | 518 | targets->nfcid1_len = skb->data[MICROREAD_EMCF_A3_LEN]; |
519 | if (targets->nfcid1_len > sizeof(targets->nfcid1)) { | ||
520 | r = -EINVAL; | ||
521 | goto exit_free; | ||
522 | } | ||
523 | memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A3_UID], | ||
524 | targets->nfcid1_len); | ||
517 | break; | 525 | break; |
518 | case MICROREAD_GATE_ID_MREAD_ISO_B: | 526 | case MICROREAD_GATE_ID_MREAD_ISO_B: |
519 | targets->supported_protocols = NFC_PROTO_ISO14443_B_MASK; | 527 | targets->supported_protocols = NFC_PROTO_ISO14443_B_MASK; |
diff --git a/drivers/nfc/st21nfca/Makefile b/drivers/nfc/st21nfca/Makefile index db7a38ae05f7..7d688f97aa27 100644 --- a/drivers/nfc/st21nfca/Makefile +++ b/drivers/nfc/st21nfca/Makefile | |||
@@ -2,7 +2,8 @@ | |||
2 | # Makefile for ST21NFCA HCI based NFC driver | 2 | # Makefile for ST21NFCA HCI based NFC driver |
3 | # | 3 | # |
4 | 4 | ||
5 | st21nfca_i2c-objs = i2c.o | 5 | st21nfca_hci-objs = st21nfca.o st21nfca_dep.o |
6 | obj-$(CONFIG_NFC_ST21NFCA) += st21nfca_hci.o | ||
6 | 7 | ||
7 | obj-$(CONFIG_NFC_ST21NFCA) += st21nfca.o st21nfca_dep.o | 8 | st21nfca_i2c-objs = i2c.o |
8 | obj-$(CONFIG_NFC_ST21NFCA_I2C) += st21nfca_i2c.o | 9 | obj-$(CONFIG_NFC_ST21NFCA_I2C) += st21nfca_i2c.o |
diff --git a/drivers/nfc/st21nfcb/Makefile b/drivers/nfc/st21nfcb/Makefile index 13d9f03b2fea..f4d835dd15f2 100644 --- a/drivers/nfc/st21nfcb/Makefile +++ b/drivers/nfc/st21nfcb/Makefile | |||
@@ -2,7 +2,8 @@ | |||
2 | # Makefile for ST21NFCB NCI based NFC driver | 2 | # Makefile for ST21NFCB NCI based NFC driver |
3 | # | 3 | # |
4 | 4 | ||
5 | st21nfcb_i2c-objs = i2c.o | 5 | st21nfcb_nci-objs = ndlc.o st21nfcb.o |
6 | obj-$(CONFIG_NFC_ST21NFCB) += st21nfcb_nci.o | ||
6 | 7 | ||
7 | obj-$(CONFIG_NFC_ST21NFCB) += st21nfcb.o ndlc.o | 8 | st21nfcb_i2c-objs = i2c.o |
8 | obj-$(CONFIG_NFC_ST21NFCB_I2C) += st21nfcb_i2c.o | 9 | obj-$(CONFIG_NFC_ST21NFCB_I2C) += st21nfcb_i2c.o |
diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c index 0f54ab6260df..3651c3871d5b 100644 --- a/drivers/parisc/pdc_stable.c +++ b/drivers/parisc/pdc_stable.c | |||
@@ -278,7 +278,7 @@ pdcspath_hwpath_write(struct pdcspath_entry *entry, const char *buf, size_t coun | |||
278 | { | 278 | { |
279 | struct hardware_path hwpath; | 279 | struct hardware_path hwpath; |
280 | unsigned short i; | 280 | unsigned short i; |
281 | char in[count+1], *temp; | 281 | char in[64], *temp; |
282 | struct device *dev; | 282 | struct device *dev; |
283 | int ret; | 283 | int ret; |
284 | 284 | ||
@@ -286,8 +286,9 @@ pdcspath_hwpath_write(struct pdcspath_entry *entry, const char *buf, size_t coun | |||
286 | return -EINVAL; | 286 | return -EINVAL; |
287 | 287 | ||
288 | /* We'll use a local copy of buf */ | 288 | /* We'll use a local copy of buf */ |
289 | memset(in, 0, count+1); | 289 | count = min_t(size_t, count, sizeof(in)-1); |
290 | strncpy(in, buf, count); | 290 | strncpy(in, buf, count); |
291 | in[count] = '\0'; | ||
291 | 292 | ||
292 | /* Let's clean up the target. 0xff is a blank pattern */ | 293 | /* Let's clean up the target. 0xff is a blank pattern */ |
293 | memset(&hwpath, 0xff, sizeof(hwpath)); | 294 | memset(&hwpath, 0xff, sizeof(hwpath)); |
@@ -393,14 +394,15 @@ pdcspath_layer_write(struct pdcspath_entry *entry, const char *buf, size_t count | |||
393 | { | 394 | { |
394 | unsigned int layers[6]; /* device-specific info (ctlr#, unit#, ...) */ | 395 | unsigned int layers[6]; /* device-specific info (ctlr#, unit#, ...) */ |
395 | unsigned short i; | 396 | unsigned short i; |
396 | char in[count+1], *temp; | 397 | char in[64], *temp; |
397 | 398 | ||
398 | if (!entry || !buf || !count) | 399 | if (!entry || !buf || !count) |
399 | return -EINVAL; | 400 | return -EINVAL; |
400 | 401 | ||
401 | /* We'll use a local copy of buf */ | 402 | /* We'll use a local copy of buf */ |
402 | memset(in, 0, count+1); | 403 | count = min_t(size_t, count, sizeof(in)-1); |
403 | strncpy(in, buf, count); | 404 | strncpy(in, buf, count); |
405 | in[count] = '\0'; | ||
404 | 406 | ||
405 | /* Let's clean up the target. 0 is a blank pattern */ | 407 | /* Let's clean up the target. 0 is a blank pattern */ |
406 | memset(&layers, 0, sizeof(layers)); | 408 | memset(&layers, 0, sizeof(layers)); |
@@ -755,7 +757,7 @@ static ssize_t pdcs_auto_write(struct kobject *kobj, | |||
755 | { | 757 | { |
756 | struct pdcspath_entry *pathentry; | 758 | struct pdcspath_entry *pathentry; |
757 | unsigned char flags; | 759 | unsigned char flags; |
758 | char in[count+1], *temp; | 760 | char in[8], *temp; |
759 | char c; | 761 | char c; |
760 | 762 | ||
761 | if (!capable(CAP_SYS_ADMIN)) | 763 | if (!capable(CAP_SYS_ADMIN)) |
@@ -765,8 +767,9 @@ static ssize_t pdcs_auto_write(struct kobject *kobj, | |||
765 | return -EINVAL; | 767 | return -EINVAL; |
766 | 768 | ||
767 | /* We'll use a local copy of buf */ | 769 | /* We'll use a local copy of buf */ |
768 | memset(in, 0, count+1); | 770 | count = min_t(size_t, count, sizeof(in)-1); |
769 | strncpy(in, buf, count); | 771 | strncpy(in, buf, count); |
772 | in[count] = '\0'; | ||
770 | 773 | ||
771 | /* Current flags are stored in primary boot path entry */ | 774 | /* Current flags are stored in primary boot path entry */ |
772 | pathentry = &pdcspath_entry_primary; | 775 | pathentry = &pdcspath_entry_primary; |
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 5e01ae39ec46..2a412fa3b338 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c | |||
@@ -160,7 +160,7 @@ static void pcie_wait_cmd(struct controller *ctrl) | |||
160 | ctrl->slot_ctrl & PCI_EXP_SLTCTL_CCIE) | 160 | ctrl->slot_ctrl & PCI_EXP_SLTCTL_CCIE) |
161 | rc = wait_event_timeout(ctrl->queue, !ctrl->cmd_busy, timeout); | 161 | rc = wait_event_timeout(ctrl->queue, !ctrl->cmd_busy, timeout); |
162 | else | 162 | else |
163 | rc = pcie_poll_cmd(ctrl, timeout); | 163 | rc = pcie_poll_cmd(ctrl, jiffies_to_msecs(timeout)); |
164 | 164 | ||
165 | /* | 165 | /* |
166 | * Controllers with errata like Intel CF118 don't generate | 166 | * Controllers with errata like Intel CF118 don't generate |
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index e3cf8a2e6292..4170113cde61 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -775,7 +775,7 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass) | |||
775 | /* Check if setup is sensible at all */ | 775 | /* Check if setup is sensible at all */ |
776 | if (!pass && | 776 | if (!pass && |
777 | (primary != bus->number || secondary <= bus->number || | 777 | (primary != bus->number || secondary <= bus->number || |
778 | secondary > subordinate || subordinate > bus->busn_res.end)) { | 778 | secondary > subordinate)) { |
779 | dev_info(&dev->dev, "bridge configuration invalid ([bus %02x-%02x]), reconfiguring\n", | 779 | dev_info(&dev->dev, "bridge configuration invalid ([bus %02x-%02x]), reconfiguring\n", |
780 | secondary, subordinate); | 780 | secondary, subordinate); |
781 | broken = 1; | 781 | broken = 1; |
@@ -838,23 +838,18 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass) | |||
838 | goto out; | 838 | goto out; |
839 | } | 839 | } |
840 | 840 | ||
841 | if (max >= bus->busn_res.end) { | ||
842 | dev_warn(&dev->dev, "can't allocate child bus %02x from %pR\n", | ||
843 | max, &bus->busn_res); | ||
844 | goto out; | ||
845 | } | ||
846 | |||
847 | /* Clear errors */ | 841 | /* Clear errors */ |
848 | pci_write_config_word(dev, PCI_STATUS, 0xffff); | 842 | pci_write_config_word(dev, PCI_STATUS, 0xffff); |
849 | 843 | ||
850 | /* The bus will already exist if we are rescanning */ | 844 | /* Prevent assigning a bus number that already exists. |
845 | * This can happen when a bridge is hot-plugged, so in | ||
846 | * this case we only re-scan this bus. */ | ||
851 | child = pci_find_bus(pci_domain_nr(bus), max+1); | 847 | child = pci_find_bus(pci_domain_nr(bus), max+1); |
852 | if (!child) { | 848 | if (!child) { |
853 | child = pci_add_new_bus(bus, dev, max+1); | 849 | child = pci_add_new_bus(bus, dev, max+1); |
854 | if (!child) | 850 | if (!child) |
855 | goto out; | 851 | goto out; |
856 | pci_bus_insert_busn_res(child, max+1, | 852 | pci_bus_insert_busn_res(child, max+1, 0xff); |
857 | bus->busn_res.end); | ||
858 | } | 853 | } |
859 | max++; | 854 | max++; |
860 | buses = (buses & 0xff000000) | 855 | buses = (buses & 0xff000000) |
@@ -913,11 +908,6 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass) | |||
913 | /* | 908 | /* |
914 | * Set the subordinate bus number to its real value. | 909 | * Set the subordinate bus number to its real value. |
915 | */ | 910 | */ |
916 | if (max > bus->busn_res.end) { | ||
917 | dev_warn(&dev->dev, "max busn %02x is outside %pR\n", | ||
918 | max, &bus->busn_res); | ||
919 | max = bus->busn_res.end; | ||
920 | } | ||
921 | pci_bus_update_busn_res_end(child, max); | 911 | pci_bus_update_busn_res_end(child, max); |
922 | pci_write_config_byte(dev, PCI_SUBORDINATE_BUS, max); | 912 | pci_write_config_byte(dev, PCI_SUBORDINATE_BUS, max); |
923 | } | 913 | } |
diff --git a/include/linux/ccp.h b/include/linux/ccp.h index ebcc9d146219..7f437036baa4 100644 --- a/include/linux/ccp.h +++ b/include/linux/ccp.h | |||
@@ -27,6 +27,13 @@ struct ccp_cmd; | |||
27 | defined(CONFIG_CRYPTO_DEV_CCP_DD_MODULE) | 27 | defined(CONFIG_CRYPTO_DEV_CCP_DD_MODULE) |
28 | 28 | ||
29 | /** | 29 | /** |
30 | * ccp_present - check if a CCP device is present | ||
31 | * | ||
32 | * Returns zero if a CCP device is present, -ENODEV otherwise. | ||
33 | */ | ||
34 | int ccp_present(void); | ||
35 | |||
36 | /** | ||
30 | * ccp_enqueue_cmd - queue an operation for processing by the CCP | 37 | * ccp_enqueue_cmd - queue an operation for processing by the CCP |
31 | * | 38 | * |
32 | * @cmd: ccp_cmd struct to be processed | 39 | * @cmd: ccp_cmd struct to be processed |
@@ -53,6 +60,11 @@ int ccp_enqueue_cmd(struct ccp_cmd *cmd); | |||
53 | 60 | ||
54 | #else /* CONFIG_CRYPTO_DEV_CCP_DD is not enabled */ | 61 | #else /* CONFIG_CRYPTO_DEV_CCP_DD is not enabled */ |
55 | 62 | ||
63 | static inline int ccp_present(void) | ||
64 | { | ||
65 | return -ENODEV; | ||
66 | } | ||
67 | |||
56 | static inline int ccp_enqueue_cmd(struct ccp_cmd *cmd) | 68 | static inline int ccp_enqueue_cmd(struct ccp_cmd *cmd) |
57 | { | 69 | { |
58 | return -ENODEV; | 70 | return -ENODEV; |
diff --git a/include/linux/percpu-refcount.h b/include/linux/percpu-refcount.h index 3dfbf237cd8f..ef5894ca8e50 100644 --- a/include/linux/percpu-refcount.h +++ b/include/linux/percpu-refcount.h | |||
@@ -71,6 +71,7 @@ void percpu_ref_reinit(struct percpu_ref *ref); | |||
71 | void percpu_ref_exit(struct percpu_ref *ref); | 71 | void percpu_ref_exit(struct percpu_ref *ref); |
72 | void percpu_ref_kill_and_confirm(struct percpu_ref *ref, | 72 | void percpu_ref_kill_and_confirm(struct percpu_ref *ref, |
73 | percpu_ref_func_t *confirm_kill); | 73 | percpu_ref_func_t *confirm_kill); |
74 | void __percpu_ref_kill_expedited(struct percpu_ref *ref); | ||
74 | 75 | ||
75 | /** | 76 | /** |
76 | * percpu_ref_kill - drop the initial ref | 77 | * percpu_ref_kill - drop the initial ref |
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index fc910a622451..2fefcf491aa8 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h | |||
@@ -295,7 +295,7 @@ struct vb2_buffer { | |||
295 | * can return an error if hardware fails, in that case all | 295 | * can return an error if hardware fails, in that case all |
296 | * buffers that have been already given by the @buf_queue | 296 | * buffers that have been already given by the @buf_queue |
297 | * callback are to be returned by the driver by calling | 297 | * callback are to be returned by the driver by calling |
298 | * @vb2_buffer_done(VB2_BUF_STATE_DEQUEUED). | 298 | * @vb2_buffer_done(VB2_BUF_STATE_QUEUED). |
299 | * If you need a minimum number of buffers before you can | 299 | * If you need a minimum number of buffers before you can |
300 | * start streaming, then set @min_buffers_needed in the | 300 | * start streaming, then set @min_buffers_needed in the |
301 | * vb2_queue structure. If that is non-zero then | 301 | * vb2_queue structure. If that is non-zero then |
@@ -380,6 +380,9 @@ struct v4l2_fh; | |||
380 | * @start_streaming_called: start_streaming() was called successfully and we | 380 | * @start_streaming_called: start_streaming() was called successfully and we |
381 | * started streaming. | 381 | * started streaming. |
382 | * @error: a fatal error occurred on the queue | 382 | * @error: a fatal error occurred on the queue |
383 | * @waiting_for_buffers: used in poll() to check if vb2 is still waiting for | ||
384 | * buffers. Only set for capture queues if qbuf has not yet been | ||
385 | * called since poll() needs to return POLLERR in that situation. | ||
383 | * @fileio: file io emulator internal data, used only if emulator is active | 386 | * @fileio: file io emulator internal data, used only if emulator is active |
384 | * @threadio: thread io internal data, used only if thread is active | 387 | * @threadio: thread io internal data, used only if thread is active |
385 | */ | 388 | */ |
@@ -417,6 +420,7 @@ struct vb2_queue { | |||
417 | unsigned int streaming:1; | 420 | unsigned int streaming:1; |
418 | unsigned int start_streaming_called:1; | 421 | unsigned int start_streaming_called:1; |
419 | unsigned int error:1; | 422 | unsigned int error:1; |
423 | unsigned int waiting_for_buffers:1; | ||
420 | 424 | ||
421 | struct vb2_fileio_data *fileio; | 425 | struct vb2_fileio_data *fileio; |
422 | struct vb2_threadio_data *threadio; | 426 | struct vb2_threadio_data *threadio; |
diff --git a/include/rdma/ib_umem.h b/include/rdma/ib_umem.h index 1ea0b65c4cfb..a2bf41e0bde9 100644 --- a/include/rdma/ib_umem.h +++ b/include/rdma/ib_umem.h | |||
@@ -47,6 +47,7 @@ struct ib_umem { | |||
47 | int writable; | 47 | int writable; |
48 | int hugetlb; | 48 | int hugetlb; |
49 | struct work_struct work; | 49 | struct work_struct work; |
50 | struct pid *pid; | ||
50 | struct mm_struct *mm; | 51 | struct mm_struct *mm; |
51 | unsigned long diff; | 52 | unsigned long diff; |
52 | struct sg_table sg_head; | 53 | struct sg_table sg_head; |
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 940aced4ed00..3a73f995a81e 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -3985,7 +3985,6 @@ static int pidlist_array_load(struct cgroup *cgrp, enum cgroup_filetype type, | |||
3985 | 3985 | ||
3986 | l = cgroup_pidlist_find_create(cgrp, type); | 3986 | l = cgroup_pidlist_find_create(cgrp, type); |
3987 | if (!l) { | 3987 | if (!l) { |
3988 | mutex_unlock(&cgrp->pidlist_mutex); | ||
3989 | pidlist_free(array); | 3988 | pidlist_free(array); |
3990 | return -ENOMEM; | 3989 | return -ENOMEM; |
3991 | } | 3990 | } |
diff --git a/lib/percpu-refcount.c b/lib/percpu-refcount.c index fe5a3342e960..a89cf09a8268 100644 --- a/lib/percpu-refcount.c +++ b/lib/percpu-refcount.c | |||
@@ -184,3 +184,19 @@ void percpu_ref_kill_and_confirm(struct percpu_ref *ref, | |||
184 | call_rcu_sched(&ref->rcu, percpu_ref_kill_rcu); | 184 | call_rcu_sched(&ref->rcu, percpu_ref_kill_rcu); |
185 | } | 185 | } |
186 | EXPORT_SYMBOL_GPL(percpu_ref_kill_and_confirm); | 186 | EXPORT_SYMBOL_GPL(percpu_ref_kill_and_confirm); |
187 | |||
188 | /* | ||
189 | * XXX: Temporary kludge to work around SCSI blk-mq stall. Used only by | ||
190 | * block/blk-mq.c::blk_mq_freeze_queue(). Will be removed during v3.18 | ||
191 | * devel cycle. Do not use anywhere else. | ||
192 | */ | ||
193 | void __percpu_ref_kill_expedited(struct percpu_ref *ref) | ||
194 | { | ||
195 | WARN_ONCE(ref->pcpu_count_ptr & PCPU_REF_DEAD, | ||
196 | "percpu_ref_kill() called more than once on %pf!", | ||
197 | ref->release); | ||
198 | |||
199 | ref->pcpu_count_ptr |= PCPU_REF_DEAD; | ||
200 | synchronize_sched_expedited(); | ||
201 | percpu_ref_kill_rcu(&ref->rcu); | ||
202 | } | ||
diff --git a/net/rfkill/rfkill-gpio.c b/net/rfkill/rfkill-gpio.c index 5fa54dd78e25..0f62326c0f5e 100644 --- a/net/rfkill/rfkill-gpio.c +++ b/net/rfkill/rfkill-gpio.c | |||
@@ -54,7 +54,7 @@ static int rfkill_gpio_set_power(void *data, bool blocked) | |||
54 | if (blocked && !IS_ERR(rfkill->clk) && rfkill->clk_enabled) | 54 | if (blocked && !IS_ERR(rfkill->clk) && rfkill->clk_enabled) |
55 | clk_disable(rfkill->clk); | 55 | clk_disable(rfkill->clk); |
56 | 56 | ||
57 | rfkill->clk_enabled = blocked; | 57 | rfkill->clk_enabled = !blocked; |
58 | 58 | ||
59 | return 0; | 59 | return 0; |
60 | } | 60 | } |
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 9acc77eae487..0032278567ad 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c | |||
@@ -1782,14 +1782,16 @@ static int snd_pcm_lib_ioctl_fifo_size(struct snd_pcm_substream *substream, | |||
1782 | { | 1782 | { |
1783 | struct snd_pcm_hw_params *params = arg; | 1783 | struct snd_pcm_hw_params *params = arg; |
1784 | snd_pcm_format_t format; | 1784 | snd_pcm_format_t format; |
1785 | int channels, width; | 1785 | int channels; |
1786 | ssize_t frame_size; | ||
1786 | 1787 | ||
1787 | params->fifo_size = substream->runtime->hw.fifo_size; | 1788 | params->fifo_size = substream->runtime->hw.fifo_size; |
1788 | if (!(substream->runtime->hw.info & SNDRV_PCM_INFO_FIFO_IN_FRAMES)) { | 1789 | if (!(substream->runtime->hw.info & SNDRV_PCM_INFO_FIFO_IN_FRAMES)) { |
1789 | format = params_format(params); | 1790 | format = params_format(params); |
1790 | channels = params_channels(params); | 1791 | channels = params_channels(params); |
1791 | width = snd_pcm_format_physical_width(format); | 1792 | frame_size = snd_pcm_format_size(format, channels); |
1792 | params->fifo_size /= width * channels; | 1793 | if (frame_size > 0) |
1794 | params->fifo_size /= (unsigned)frame_size; | ||
1793 | } | 1795 | } |
1794 | return 0; | 1796 | return 0; |
1795 | } | 1797 | } |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 6e5d0cb4e3d7..47ccb8f44adb 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -777,6 +777,7 @@ static const struct hda_model_fixup cxt5066_fixup_models[] = { | |||
777 | { .id = CXT_PINCFG_LENOVO_TP410, .name = "tp410" }, | 777 | { .id = CXT_PINCFG_LENOVO_TP410, .name = "tp410" }, |
778 | { .id = CXT_FIXUP_THINKPAD_ACPI, .name = "thinkpad" }, | 778 | { .id = CXT_FIXUP_THINKPAD_ACPI, .name = "thinkpad" }, |
779 | { .id = CXT_PINCFG_LEMOTE_A1004, .name = "lemote-a1004" }, | 779 | { .id = CXT_PINCFG_LEMOTE_A1004, .name = "lemote-a1004" }, |
780 | { .id = CXT_PINCFG_LEMOTE_A1205, .name = "lemote-a1205" }, | ||
780 | { .id = CXT_FIXUP_OLPC_XO, .name = "olpc-xo" }, | 781 | { .id = CXT_FIXUP_OLPC_XO, .name = "olpc-xo" }, |
781 | {} | 782 | {} |
782 | }; | 783 | }; |
diff --git a/sound/usb/caiaq/control.c b/sound/usb/caiaq/control.c index f65fc0987cfb..b7a7c805d63f 100644 --- a/sound/usb/caiaq/control.c +++ b/sound/usb/caiaq/control.c | |||
@@ -100,15 +100,19 @@ static int control_put(struct snd_kcontrol *kcontrol, | |||
100 | struct snd_usb_caiaqdev *cdev = caiaqdev(chip->card); | 100 | struct snd_usb_caiaqdev *cdev = caiaqdev(chip->card); |
101 | int pos = kcontrol->private_value; | 101 | int pos = kcontrol->private_value; |
102 | int v = ucontrol->value.integer.value[0]; | 102 | int v = ucontrol->value.integer.value[0]; |
103 | unsigned char cmd = EP1_CMD_WRITE_IO; | 103 | unsigned char cmd; |
104 | 104 | ||
105 | if (cdev->chip.usb_id == | 105 | switch (cdev->chip.usb_id) { |
106 | USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_TRAKTORKONTROLX1)) | 106 | case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_MASCHINECONTROLLER): |
107 | cmd = EP1_CMD_DIMM_LEDS; | 107 | case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_TRAKTORKONTROLX1): |
108 | 108 | case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER2): | |
109 | if (cdev->chip.usb_id == | 109 | case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER): |
110 | USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_MASCHINECONTROLLER)) | ||
111 | cmd = EP1_CMD_DIMM_LEDS; | 110 | cmd = EP1_CMD_DIMM_LEDS; |
111 | break; | ||
112 | default: | ||
113 | cmd = EP1_CMD_WRITE_IO; | ||
114 | break; | ||
115 | } | ||
112 | 116 | ||
113 | if (pos & CNT_INTVAL) { | 117 | if (pos & CNT_INTVAL) { |
114 | int i = pos & ~CNT_INTVAL; | 118 | int i = pos & ~CNT_INTVAL; |
diff --git a/virt/kvm/arm/vgic-v2.c b/virt/kvm/arm/vgic-v2.c index 01124ef3690a..416baedfc89f 100644 --- a/virt/kvm/arm/vgic-v2.c +++ b/virt/kvm/arm/vgic-v2.c | |||
@@ -71,7 +71,7 @@ static void vgic_v2_sync_lr_elrsr(struct kvm_vcpu *vcpu, int lr, | |||
71 | struct vgic_lr lr_desc) | 71 | struct vgic_lr lr_desc) |
72 | { | 72 | { |
73 | if (!(lr_desc.state & LR_STATE_MASK)) | 73 | if (!(lr_desc.state & LR_STATE_MASK)) |
74 | set_bit(lr, (unsigned long *)vcpu->arch.vgic_cpu.vgic_v2.vgic_elrsr); | 74 | __set_bit(lr, (unsigned long *)vcpu->arch.vgic_cpu.vgic_v2.vgic_elrsr); |
75 | } | 75 | } |
76 | 76 | ||
77 | static u64 vgic_v2_get_elrsr(const struct kvm_vcpu *vcpu) | 77 | static u64 vgic_v2_get_elrsr(const struct kvm_vcpu *vcpu) |