Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

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