History

Merge 3.5-rc5 into usb-next

This resolves a merge issue with the option.c USB serial driver.

Greg Kroah-Hartman committed 14 years ago

Commit e765bf82 parents afd6bb3 6887a41257 files · +1564 −1061Browse files

Unified · Split

257 files
  1. Documentation/DocBook/media/v4l/pixfmt.xml +2 −2
  2. Documentation/DocBook/media/v4l/v4l2.xml +1 −1
  3. Documentation/DocBook/media/v4l/vidioc-create-bufs.xml +2 −3
  4. Documentation/DocBook/media/v4l/vidioc-dqevent.xml +1 −1
  5. Documentation/stable_kernel_rules.txt +6 −0
  6. Makefile +1 −1
  7. arch/arm/mach-exynos/Kconfig +4 −4
  8. arch/arm/mach-imx/clk-imx6q.c +4 −2
  9. arch/arm/mach-omap2/board-flash.c +0 −5
  10. arch/arm/mach-omap2/clock44xx_data.c +4 −1
  11. arch/arm/mach-shmobile/board-armadillo800eva.c +1 −0
  12. arch/arm/mach-shmobile/board-kzm9d.c +1 −0
  13. arch/arm/mach-shmobile/board-kzm9g.c +1 −0
  14. arch/arm/mach-shmobile/board-mackerel.c +3 −0
  15. arch/arm/mach-shmobile/clock-sh73a0.c +4 −4
  16. arch/arm/mach-shmobile/intc-r8a7779.c +7 −0
  17. arch/arm/mach-shmobile/platsmp.c +5 −0
  18. arch/arm/mach-shmobile/setup-sh7372.c +1 −1
  19. arch/arm/mm/dma-mapping.c +1 −1
  20. arch/arm/plat-mxc/include/mach/mx2_cam.h +2 −0
  21. arch/arm/plat-samsung/include/plat/map-s3c.h +1 −1
  22. arch/arm/plat-samsung/include/plat/watchdog-reset.h +1 −1
  23. arch/m68k/platform/coldfire/clk.c +7 −0
  24. arch/powerpc/include/asm/hw_irq.h +5 −0
  25. arch/powerpc/kernel/entry_64.S +40 −57
  26. arch/powerpc/kernel/irq.c +1 −1
  27. arch/powerpc/kernel/prom_init.c +2 −2
  28. arch/powerpc/mm/numa.c +1 −1
  29. arch/powerpc/net/bpf_jit_64.S +2 −0
  30. arch/powerpc/platforms/pseries/iommu.c +2 −2
  31. arch/powerpc/platforms/pseries/processor_idle.c +1 −1
  32. arch/sh/boards/mach-kfr2r09/setup.c +2 −2
  33. arch/sh/drivers/pci/pcie-sh7786.c +1 −1
  34. arch/sh/kernel/cpu/sh4a/clock-sh7343.c +1 −1
  35. arch/sh/kernel/cpu/sh4a/clock-sh7366.c +1 −1
  36. arch/sh/kernel/cpu/sh4a/clock-sh7722.c +1 −1
  37. arch/sh/kernel/cpu/sh4a/clock-sh7723.c +1 −1
  38. arch/sh/kernel/cpu/sh4a/clock-sh7724.c +1 −1
  39. arch/sh/kernel/cpu/sh4a/clock-sh7734.c +1 −1
  40. arch/sh/kernel/cpu/sh4a/clock-sh7757.c +1 −1
  41. arch/sh/kernel/cpu/sh4a/clock-sh7785.c +1 −1
  42. arch/sh/kernel/cpu/sh4a/clock-sh7786.c +1 −1
  43. arch/sh/kernel/cpu/sh4a/clock-shx3.c +1 −1
  44. arch/x86/ia32/ia32_signal.c +1 −1
  45. arch/x86/include/asm/cpufeature.h +1 −1
  46. arch/x86/kernel/acpi/boot.c +16 −11
  47. arch/x86/kernel/cpu/mkcapflags.pl +19 −6
  48. arch/x86/kernel/cpu/scattered.c +1 −1
  49. arch/x86/kernel/kgdb.c +4 −4
  50. arch/x86/kernel/reboot.c +8 −0
  51. arch/x86/lib/csum-wrappers_64.c +1 −1
  52. drivers/acpi/acpi_pad.c +4 −3
  53. drivers/acpi/apei/apei-base.c +15 −2
  54. drivers/acpi/apei/apei-internal.h +9 −0
  55. drivers/acpi/apei/ghes.c +3 −3
  56. drivers/acpi/processor_idle.c +30 −2
  57. drivers/acpi/sysfs.c +2 −2
  58. drivers/acpi/video.c +2 −0
  59. drivers/base/power/main.c +4 −2
  60. drivers/bluetooth/ath3k.c +3 −0
  61. drivers/bluetooth/btmrvl_drv.h +1 −1
  62. drivers/bluetooth/btmrvl_main.c +12 −2
  63. drivers/bluetooth/btmrvl_sdio.c +5 −3
  64. drivers/bluetooth/btusb.c +2 −0
  65. drivers/clk/clk.c +17 −9
  66. drivers/clk/mxs/clk-imx23.c +6 −6
  67. drivers/clk/mxs/clk-imx28.c +16 −16
  68. drivers/clk/spear/spear6xx_clock.c +1 −1
  69. drivers/gpu/drm/i915/i915_irq.c +0 −1
  70. drivers/gpu/drm/i915/i915_suspend.c +4 −1
  71. drivers/gpu/drm/i915/intel_display.c +0 −16
  72. drivers/gpu/drm/nouveau/nouveau_fbcon.c +1 −1
  73. drivers/gpu/drm/nouveau/nouveau_prime.c +23 −0
  74. drivers/gpu/drm/udl/udl_main.c +1 −1
  75. drivers/hid/Kconfig +20 −23
  76. drivers/hid/hid-core.c +1 −0
  77. drivers/hid/hid-ids.h +3 −0
  78. drivers/hid/hid-logitech-dj.c +24 −14
  79. drivers/hid/hid-magicmouse.c +4 −2
  80. drivers/hid/usbhid/Kconfig +4 −4
  81. drivers/hwmon/applesmc.c +1 −1
  82. drivers/hwmon/coretemp.c +2 −2
  83. drivers/hwmon/jc42.c +1 −1
  84. drivers/hwmon/lineage-pem.c +1 −1
  85. drivers/hwmon/ltc4261.c +1 −1
  86. drivers/hwmon/max16065.c +1 −1
  87. drivers/media/common/saa7146_fops.c +0 −5
  88. drivers/media/dvb/frontends/cx24110.c +2 −2
  89. drivers/media/dvb/frontends/cxd2820r_c.c +1 −1
  90. drivers/media/dvb/frontends/lg2160.c +1 −1
  91. drivers/media/dvb/siano/smsusb.c +2 −0
  92. drivers/media/radio/radio-maxiradio.c +1 −1
  93. drivers/media/radio/radio-sf16fmr2.c +1 −1
  94. drivers/media/radio/si470x/radio-si470x-usb.c +2 −0
  95. drivers/media/video/bt8xx/bttv-cards.c +6 −78
  96. drivers/media/video/bt8xx/bttv-driver.c +5 −0
  97. drivers/media/video/bt8xx/bttv.h +0 −1
  98. drivers/media/video/bt8xx/bttvp.h +1 −0
  99. drivers/media/video/bw-qcam.c +37 −10
  100. drivers/media/video/cx18/cx18-driver.c +5 −5
  101. drivers/media/video/cx18/cx18-driver.h +1 −1
  102. drivers/media/video/cx18/cx18-firmware.c +7 −2
  103. drivers/media/video/cx18/cx18-mailbox.c +10 −5
  104. drivers/media/video/cx88/cx88-blackbird.c +1 −1
  105. drivers/media/video/em28xx/em28xx-cards.c +1 −0
  106. drivers/media/video/em28xx/em28xx-input.c +2 −0
  107. drivers/media/video/gspca/gspca.c +3 −1
  108. drivers/media/video/gspca/ov534.c +3 −29
  109. drivers/media/video/gspca/ov534_9.c +1 −0
  110. drivers/media/video/gspca/pac7311.c +1 −1
  111. drivers/media/video/gspca/sn9c20x.c +14 −10
  112. drivers/media/video/gspca/sonixj.c +1 −1
  113. drivers/media/video/ivtv/ivtv-driver.c +9 −9
  114. drivers/media/video/ivtv/ivtv-driver.h +1 −1
  115. drivers/media/video/mem2mem_testdev.c +26 −24
  116. drivers/media/video/mx2_camera.c +5 −47
  117. drivers/media/video/s5p-fimc/fimc-core.c +1 −1
  118. drivers/media/video/s5p-mfc/regs-mfc.h +5 −0
  119. drivers/media/video/s5p-mfc/s5p_mfc_dec.c +2 −2
  120. drivers/media/video/s5p-mfc/s5p_mfc_enc.c +4 −8
  121. drivers/media/video/s5p-mfc/s5p_mfc_opr.h +3 −1
  122. drivers/media/video/s5p-mfc/s5p_mfc_shm.h +1 −2
  123. drivers/media/video/smiapp/Kconfig +1 −1
  124. drivers/media/video/smiapp/smiapp-core.c +1 −0
  125. drivers/media/video/tuner-core.c +1 −1
  126. drivers/media/video/v4l2-dev.c +3 −1
  127. drivers/media/video/v4l2-ioctl.c +1 −0
  128. drivers/media/video/vino.c +2 −2
  129. drivers/media/video/vivi.c +5 −1
  130. drivers/mmc/card/block.c +1 −13
  131. drivers/mmc/host/omap_hsmmc.c +3 −12
  132. drivers/mtd/ubi/debug.c +4 −4
  133. drivers/net/bonding/bond_procfs.c +13 −2
  134. drivers/net/caif/caif_hsi.c +3 −2
  135. drivers/net/can/c_can/c_can.c +2 −2
  136. drivers/net/can/flexcan.c +2 −2
  137. drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +3 −5
  138. drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c +30 −24
  139. drivers/net/ethernet/emulex/benet/be_cmds.c +6 −6
  140. drivers/net/ethernet/emulex/benet/be_cmds.h +1 −1
  141. drivers/net/ethernet/emulex/benet/be_main.c +1 −1
  142. drivers/net/ethernet/intel/Kconfig +7 −3
  143. drivers/net/ethernet/intel/igb/e1000_82575.c +0 −2
  144. drivers/net/ethernet/intel/ixgbe/ixgbe.h +2 −2
  145. drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c +1 −1
  146. drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +11 −5
  147. drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c +11 −2
  148. drivers/net/ethernet/mellanox/mlx4/en_netdev.c +12 −6
  149. drivers/net/ethernet/mellanox/mlx4/main.c +2 −0
  150. drivers/net/ethernet/mellanox/mlx4/mlx4_en.h +1 −0
  151. drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +1 −1
  152. drivers/net/ethernet/realtek/r8169.c +1 −0
  153. drivers/net/ethernet/renesas/sh_eth.c +7 −5
  154. drivers/net/phy/micrel.c +4 −4
  155. drivers/net/usb/ipheth.c +5 −0
  156. drivers/net/usb/qmi_wwan.c +40 −43
  157. drivers/net/usb/usbnet.c +33 −20
  158. drivers/net/wireless/airo.c +2 −2
  159. drivers/net/wireless/ath/ath5k/base.c +2 −2
  160. drivers/net/wireless/ath/ath9k/ath9k.h +1 −0
  161. drivers/net/wireless/ath/ath9k/htc_drv_main.c +2 −3
  162. drivers/net/wireless/ath/ath9k/hw.c +13 −1
  163. drivers/net/wireless/ath/ath9k/main.c +9 −18
  164. drivers/net/wireless/ath/ath9k/xmit.c +18 −13
  165. drivers/net/wireless/iwlwifi/iwl-debugfs.c +6 −0
  166. drivers/net/wireless/mwifiex/cfg80211.c +11 −14
  167. drivers/net/wireless/mwifiex/txrx.c +3 −7
  168. drivers/net/wireless/mwifiex/uap_cmd.c +11 −0
  169. drivers/net/wireless/rndis_wlan.c +1 −1
  170. drivers/net/wireless/ti/wl1251/acx.c +1 −1
  171. drivers/net/wireless/ti/wl1251/event.c +1 −2
  172. drivers/net/wireless/ti/wl1251/spi.c +4 −0
  173. drivers/net/xen-netfront.c +4 −4
  174. drivers/oprofile/oprofile_perf.c +1 −1
  175. drivers/regulator/palmas-regulator.c +5 −2
  176. drivers/regulator/tps65023-regulator.c +1 −1
  177. drivers/regulator/tps6524x-regulator.c +1 −1
  178. drivers/scsi/sd.c +2 −0
  179. drivers/staging/media/lirc/lirc_serial.c +6 −0
  180. drivers/usb/Makefile +1 −1
  181. drivers/usb/dwc3/gadget.c +2 −1
  182. drivers/usb/gadget/fsl_qe_udc.h +2 −2
  183. drivers/usb/gadget/lpc32xx_udc.c +1 −0
  184. drivers/usb/musb/musb_host.c +12 −2
  185. drivers/usb/otg/twl6030-usb.c +6 −9
  186. drivers/usb/phy/Kconfig +2 −2
  187. drivers/usb/serial/cp210x.c +11 −0
  188. drivers/usb/serial/option.c +8 −0
  189. drivers/usb/storage/scsiglue.c +6 −0
  190. drivers/usb/storage/unusual_devs.h +0 −7
  191. drivers/vhost/vhost.c +3 −0
  192. drivers/watchdog/hpwdt.c +3 −1
  193. drivers/watchdog/iTCO_wdt.c +1 −0
  194. drivers/watchdog/watchdog_dev.c +1 −1
  195. fs/ubifs/debug.c +4 −4
  196. fs/ubifs/find.c +2 −2
  197. fs/udf/super.c +64 −38
  198. include/asm-generic/bug.h +9 −10
  199. include/linux/irq.h +0 −2
  200. include/linux/skbuff.h +2 −5
  201. include/linux/videodev2.h +3 −3
  202. include/net/bluetooth/hci.h +6 −0
  203. include/net/mac80211.h +6 −0
  204. include/net/phonet/gprs.h +1 −1
  205. include/scsi/scsi_device.h +1 −0
  206. include/sound/tea575x-tuner.h +2 −1
  207. kernel/printk.c +214 −85
  208. kernel/rcutree.c +7 −7
  209. net/9p/protocol.c +1 −1
  210. net/batman-adv/routing.c +2 −0
  211. net/batman-adv/translation-table.c +6 −6
  212. net/bluetooth/hci_event.c +48 −0
  213. net/bluetooth/hidp/Kconfig +1 −1
  214. net/bluetooth/l2cap_core.c +14 −7
  215. net/bluetooth/mgmt.c +19 −1
  216. net/bluetooth/smp.c +7 −4
  217. net/bridge/br_if.c +1 −0
  218. net/bridge/br_netlink.c +1 −1
  219. net/bridge/br_private.h +1 −0
  220. net/caif/caif_dev.c +1 −2
  221. net/caif/caif_socket.c +1 −0
  222. net/can/raw.c +0 −3
  223. net/core/dev.c +1 −22
  224. net/ipv6/ip6_fib.c +2 −2
  225. net/ipv6/route.c +31 −10
  226. net/ipv6/tcp_ipv6.c +2 −1
  227. net/iucv/af_iucv.c +0 −1
  228. net/l2tp/l2tp_eth.c +33 −12
  229. net/mac80211/cfg.c +3 −0
  230. net/mac80211/mlme.c +2 −2
  231. net/mac80211/sta_info.h +5 −0
  232. net/mac802154/tx.c +2 −1
  233. net/phonet/af_phonet.c +2 −2
  234. net/phonet/datagram.c +2 −2
  235. net/phonet/pep-gprs.c +1 −1
  236. net/phonet/pep.c +1 −1
  237. net/phonet/pn_dev.c +2 −2
  238. net/phonet/pn_netlink.c +2 −2
  239. net/phonet/socket.c +2 −2
  240. net/phonet/sysctl.c +1 −1
  241. net/sctp/protocol.c +2 −0
  242. net/wireless/reg.c +1 −1
  243. net/wireless/util.c +1 −1
  244. scripts/gfp-translate +0 −0
  245. sound/i2c/other/tea575x-tuner.c +14 −7
  246. sound/pci/es1968.c +1 −1
  247. sound/pci/fm801.c +2 −2
  248. sound/pci/hda/Kconfig +0 −13
  249. sound/pci/hda/hda_auto_parser.c +0 −1
  250. sound/pci/hda/hda_auto_parser.h +10 −0
  251. sound/pci/hda/hda_codec.c +4 −0
  252. sound/pci/hda/patch_conexant.c +5 −1
  253. sound/pci/hda/patch_realtek.c +9 −6
  254. sound/pci/hda/patch_sigmatel.c +6 −1
  255. sound/soc/codecs/wm8994.c +0 −3
  256. sound/usb/mixer_maps.c +8 −0
  257. sound/usb/quirks-table.h +30 −0
Documentation/DocBook/media/v4l/pixfmt.xml+2−2
@@ -986,13 +986,13 @@ http://www.thedirks.org/winnov/</ulink></para></entry> · 985 unmodified lines
986986 <row id="V4L2-PIX-FMT-Y4">
987987 <entry><constant>V4L2_PIX_FMT_Y4</constant></entry>
988988 <entry>'Y04 '</entry>
989− <entry>Old 4-bit greyscale format. Only the least significant 4 bits of each byte are used,
989+ <entry>Old 4-bit greyscale format. Only the most significant 4 bits of each byte are used,
990990 the other bits are set to 0.</entry>
991991 </row>
992992 <row id="V4L2-PIX-FMT-Y6">
993993 <entry><constant>V4L2_PIX_FMT_Y6</constant></entry>
994994 <entry>'Y06 '</entry>
995− <entry>Old 6-bit greyscale format. Only the least significant 6 bits of each byte are used,
995+ <entry>Old 6-bit greyscale format. Only the most significant 6 bits of each byte are used,
996996 the other bits are set to 0.</entry>
997997 </row>
998998 </tbody>
Documentation/DocBook/media/v4l/v4l2.xml+1−1
@@ -560,6 +560,7 @@ and discussions on the V4L mailing list.</revremark> · 559 unmodified lines
560560 &sub-g-tuner;
561561 &sub-log-status;
562562 &sub-overlay;
563+ &sub-prepare-buf;
563564 &sub-qbuf;
564565 &sub-querybuf;
565566 &sub-querycap;
@@ -567,7 +568,6 @@ and discussions on the V4L mailing list.</revremark> · 1 unmodified line
567568 &sub-query-dv-preset;
568569 &sub-query-dv-timings;
569570 &sub-querystd;
570− &sub-prepare-buf;
571571 &sub-reqbufs;
572572 &sub-s-hw-freq-seek;
573573 &sub-streamon;
Documentation/DocBook/media/v4l/vidioc-create-bufs.xml+2−3
@@ -108,10 +108,9 @@ information.</para> · 107 unmodified lines
108108 /></entry>
109109 </row>
110110 <row>
111− <entry>__u32</entry>
111+ <entry>struct&nbsp;v4l2_format</entry>
112112 <entry><structfield>format</structfield></entry>
113− <entry>Filled in by the application, preserved by the driver.
114− See <xref linkend="v4l2-format" />.</entry>
113+ <entry>Filled in by the application, preserved by the driver.</entry>
115114 </row>
116115 <row>
117116 <entry>__u32</entry>
Documentation/DocBook/media/v4l/vidioc-dqevent.xml+1−1
@@ -89,7 +89,7 @@ · 88 unmodified lines
8989 <row>
9090 <entry></entry>
9191 <entry>&v4l2-event-frame-sync;</entry>
92− <entry><structfield>frame</structfield></entry>
92+ <entry><structfield>frame_sync</structfield></entry>
9393 <entry>Event data for event V4L2_EVENT_FRAME_SYNC.</entry>
9494 </row>
9595 <row>
Documentation/stable_kernel_rules.txt+6−0
@@ -12,6 +12,12 @@ Rules on what kind of patches are accepted, and which ones are not, into the · 11 unmodified lines
1212 marked CONFIG_BROKEN), an oops, a hang, data corruption, a real
1313 security issue, or some "oh, that's not good" issue. In short, something
1414 critical.
15+ - Serious issues as reported by a user of a distribution kernel may also
16+ be considered if they fix a notable performance or interactivity issue.
17+ As these fixes are not as obvious and have a higher risk of a subtle
18+ regression they should only be submitted by a distribution kernel
19+ maintainer and include an addendum linking to a bugzilla entry if it
20+ exists and additional information on the user-visible impact.
1521 - New device IDs and quirks are also accepted.
1622 - No "theoretical race condition" issues, unless an explanation of how the
1723 race can be exploited is also provided.
Makefile+1−1
@@ -1,7 +1,7 @@
11 VERSION = 3
22 PATCHLEVEL = 5
33 SUBLEVEL = 0
4−EXTRAVERSION = -rc4
4+EXTRAVERSION = -rc5
55 NAME = Saber-toothed Squirrel
66
77 # *DOCUMENTATION*
arch/arm/mach-exynos/Kconfig+4−4
@@ -212,7 +212,7 @@ config MACH_SMDKV310 · 211 unmodified lines
212212 select EXYNOS_DEV_SYSMMU
213213 select EXYNOS4_DEV_AHCI
214214 select SAMSUNG_DEV_KEYPAD
215− select EXYNOS4_DEV_DMA
215+ select EXYNOS_DEV_DMA
216216 select SAMSUNG_DEV_PWM
217217 select EXYNOS4_DEV_USB_OHCI
218218 select EXYNOS4_SETUP_FIMD0
@@ -264,7 +264,7 @@ config MACH_UNIVERSAL_C210 · 45 unmodified lines
264264 select S5P_DEV_ONENAND
265265 select S5P_DEV_TV
266266 select EXYNOS_DEV_SYSMMU
267− select EXYNOS4_DEV_DMA
267+ select EXYNOS_DEV_DMA
268268 select EXYNOS_DEV_DRM
269269 select EXYNOS4_SETUP_FIMD0
270270 select EXYNOS4_SETUP_I2C1
@@ -303,7 +303,7 @@ config MACH_NURI · 32 unmodified lines
303303 select S5P_DEV_MFC
304304 select S5P_DEV_USB_EHCI
305305 select S5P_SETUP_MIPIPHY
306− select EXYNOS4_DEV_DMA
306+ select EXYNOS_DEV_DMA
307307 select EXYNOS_DEV_DRM
308308 select EXYNOS4_SETUP_FIMC
309309 select EXYNOS4_SETUP_FIMD0
@@ -341,7 +341,7 @@ config MACH_ORIGEN · 31 unmodified lines
341341 select SAMSUNG_DEV_PWM
342342 select EXYNOS_DEV_DRM
343343 select EXYNOS_DEV_SYSMMU
344− select EXYNOS4_DEV_DMA
344+ select EXYNOS_DEV_DMA
345345 select EXYNOS4_DEV_USB_OHCI
346346 select EXYNOS4_SETUP_FIMD0
347347 select EXYNOS4_SETUP_SDHCI
arch/arm/mach-imx/clk-imx6q.c+4−2
@@ -152,13 +152,14 @@ enum mx6q_clks { · 151 unmodified lines
152152 ssi2, ssi3, uart_ipg, uart_serial, usboh3, usdhc1, usdhc2, usdhc3,
153153 usdhc4, vdo_axi, vpu_axi, cko1, pll1_sys, pll2_bus, pll3_usb_otg,
154154 pll4_audio, pll5_video, pll6_mlb, pll7_usb_host, pll8_enet, ssi1_ipg,
155− ssi2_ipg, ssi3_ipg, clk_max
155+ ssi2_ipg, ssi3_ipg, rom,
156+ clk_max
156157 };
157158
158159 static struct clk *clk[clk_max];
159160
160161 static enum mx6q_clks const clks_init_on[] __initconst = {
161− mmdc_ch0_axi, mmdc_ch1_axi,
162+ mmdc_ch0_axi, rom,
162163 };
163164
164165 int __init mx6q_clocks_init(void)
@@ -364,6 +365,7 @@ int __init mx6q_clocks_init(void) · 199 unmodified lines
364365 clk[gpmi_bch] = imx_clk_gate2("gpmi_bch", "usdhc4", base + 0x78, 26);
365366 clk[gpmi_io] = imx_clk_gate2("gpmi_io", "enfc", base + 0x78, 28);
366367 clk[gpmi_apb] = imx_clk_gate2("gpmi_apb", "usdhc3", base + 0x78, 30);
368+ clk[rom] = imx_clk_gate2("rom", "ahb", base + 0x7c, 0);
367369 clk[sata] = imx_clk_gate2("sata", "ipg", base + 0x7c, 4);
368370 clk[sdma] = imx_clk_gate2("sdma", "ahb", base + 0x7c, 6);
369371 clk[spba] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12);
arch/arm/mach-omap2/board-flash.c+0−5
@@ -97,11 +97,6 @@ __init board_onenand_init(struct mtd_partition *onenand_parts, · 96 unmodified lines
9797
9898 gpmc_onenand_init(&board_onenand_data);
9999 }
100−#else
101−void
102−__init board_onenand_init(struct mtd_partition *nor_parts, u8 nr_parts, u8 cs)
103−{
104−}
105100 #endif /* CONFIG_MTD_ONENAND_OMAP2 || CONFIG_MTD_ONENAND_OMAP2_MODULE */
106101
107102 #if defined(CONFIG_MTD_NAND_OMAP2) || \
arch/arm/mach-omap2/clock44xx_data.c+4−1
@@ -3417,9 +3417,12 @@ int __init omap4xxx_clk_init(void) · 3416 unmodified lines
34173417 if (cpu_is_omap443x()) {
34183418 cpu_mask = RATE_IN_4430;
34193419 cpu_clkflg = CK_443X;
3420− } else if (cpu_is_omap446x()) {
3420+ } else if (cpu_is_omap446x() || cpu_is_omap447x()) {
34213421 cpu_mask = RATE_IN_4460 | RATE_IN_4430;
34223422 cpu_clkflg = CK_446X | CK_443X;
3423+
3424+ if (cpu_is_omap447x())
3425+ pr_warn("WARNING: OMAP4470 clock data incomplete!\n");
34233426 } else {
34243427 return 0;
34253428 }
arch/arm/mach-shmobile/board-armadillo800eva.c+1−0
@@ -779,6 +779,7 @@ DT_MACHINE_START(ARMADILLO800EVA_DT, "armadillo800eva") · 778 unmodified lines
779779 .init_irq = r8a7740_init_irq,
780780 .handle_irq = shmobile_handle_irq_intc,
781781 .init_machine = eva_init,
782+ .init_late = shmobile_init_late,
782783 .timer = &shmobile_timer,
783784 .dt_compat = eva_boards_compat_dt,
784785 MACHINE_END
arch/arm/mach-shmobile/board-kzm9d.c+1−0
@@ -80,6 +80,7 @@ DT_MACHINE_START(KZM9D_DT, "kzm9d") · 79 unmodified lines
8080 .init_irq = emev2_init_irq,
8181 .handle_irq = gic_handle_irq,
8282 .init_machine = kzm9d_add_standard_devices,
83+ .init_late = shmobile_init_late,
8384 .timer = &shmobile_timer,
8485 .dt_compat = kzm9d_boards_compat_dt,
8586 MACHINE_END
arch/arm/mach-shmobile/board-kzm9g.c+1−0
@@ -455,6 +455,7 @@ DT_MACHINE_START(KZM9G_DT, "kzm9g") · 454 unmodified lines
455455 .init_irq = sh73a0_init_irq,
456456 .handle_irq = gic_handle_irq,
457457 .init_machine = kzm_init,
458+ .init_late = shmobile_init_late,
458459 .timer = &shmobile_timer,
459460 .dt_compat = kzm9g_boards_compat_dt,
460461 MACHINE_END
arch/arm/mach-shmobile/board-mackerel.c+3−0
@@ -1512,6 +1512,9 @@ static void __init mackerel_init(void) · 1511 unmodified lines
15121512 gpio_request(GPIO_FN_SDHID0_1, NULL);
15131513 gpio_request(GPIO_FN_SDHID0_0, NULL);
15141514
1515+ /* SDHI0 PORT172 card-detect IRQ26 */
1516+ gpio_request(GPIO_FN_IRQ26_172, NULL);
1517+
15151518 #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE)
15161519 /* enable SDHI1 */
15171520 gpio_request(GPIO_FN_SDHICMD1, NULL);
arch/arm/mach-shmobile/clock-sh73a0.c+4−4
@@ -475,9 +475,9 @@ static struct clk *late_main_clks[] = { · 474 unmodified lines
475475
476476 enum { MSTP001,
477477 MSTP129, MSTP128, MSTP127, MSTP126, MSTP125, MSTP118, MSTP116, MSTP100,
478− MSTP219,
478+ MSTP219, MSTP218,
479479 MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200,
480− MSTP331, MSTP329, MSTP325, MSTP323, MSTP318,
480+ MSTP331, MSTP329, MSTP325, MSTP323,
481481 MSTP314, MSTP313, MSTP312, MSTP311,
482482 MSTP303, MSTP302, MSTP301, MSTP300,
483483 MSTP411, MSTP410, MSTP403,
@@ -497,6 +497,7 @@ static struct clk mstp_clks[MSTP_NR] = { · 13 unmodified lines
497497 [MSTP116] = MSTP(&div4_clks[DIV4_HP], SMSTPCR1, 16, 0), /* IIC0 */
498498 [MSTP100] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 0, 0), /* LCDC0 */
499499 [MSTP219] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 19, 0), /* SCIFA7 */
500+ [MSTP218] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 18, 0), /* SY-DMAC */
500501 [MSTP207] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 7, 0), /* SCIFA5 */
501502 [MSTP206] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 6, 0), /* SCIFB */
502503 [MSTP204] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 4, 0), /* SCIFA0 */
@@ -508,7 +509,6 @@ static struct clk mstp_clks[MSTP_NR] = { · 5 unmodified lines
508509 [MSTP329] = MSTP(&r_clk, SMSTPCR3, 29, 0), /* CMT10 */
509510 [MSTP325] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 25, 0), /* IrDA */
510511 [MSTP323] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 23, 0), /* IIC1 */
511− [MSTP318] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 18, 0), /* SY-DMAC */
512512 [MSTP314] = MSTP(&div6_clks[DIV6_SDHI0], SMSTPCR3, 14, 0), /* SDHI0 */
513513 [MSTP313] = MSTP(&div6_clks[DIV6_SDHI1], SMSTPCR3, 13, 0), /* SDHI1 */
514514 [MSTP312] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMCIF0 */
@@ -552,6 +552,7 @@ static struct clk_lookup lookups[] = { · 37 unmodified lines
552552 CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* I2C0 */
553553 CLKDEV_DEV_ID("sh_mobile_lcdc_fb.0", &mstp_clks[MSTP100]), /* LCDC0 */
554554 CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP219]), /* SCIFA7 */
555+ CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]), /* SY-DMAC */
555556 CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */
556557 CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP206]), /* SCIFB */
557558 CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */
@@ -563,7 +564,6 @@ static struct clk_lookup lookups[] = { · 5 unmodified lines
563564 CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */
564565 CLKDEV_DEV_ID("sh_irda.0", &mstp_clks[MSTP325]), /* IrDA */
565566 CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* I2C1 */
566− CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP318]), /* SY-DMAC */
567567 CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), /* SDHI0 */
568568 CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */
569569 CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMCIF0 */
arch/arm/mach-shmobile/intc-r8a7779.c+7−0
@@ -35,6 +35,9 @@ · 34 unmodified lines
3535 #define INT2SMSKCR3 0xfe7822ac
3636 #define INT2SMSKCR4 0xfe7822b0
3737
38+#define INT2NTSR0 0xfe700060
39+#define INT2NTSR1 0xfe700064
40+
3841 static int r8a7779_set_wake(struct irq_data *data, unsigned int on)
3942 {
4043 return 0; /* always allow wakeup */
@@ -49,6 +52,10 @@ void __init r8a7779_init_irq(void) · 8 unmodified lines
4952 gic_init(0, 29, gic_dist_base, gic_cpu_base);
5053 gic_arch_extn.irq_set_wake = r8a7779_set_wake;
5154
55+ /* route all interrupts to ARM */
56+ __raw_writel(0xffffffff, INT2NTSR0);
57+ __raw_writel(0x3fffffff, INT2NTSR1);
58+
5259 /* unmask all known interrupts in INTCS2 */
5360 __raw_writel(0xfffffff0, INT2SMSKCR0);
5461 __raw_writel(0xfff7ffff, INT2SMSKCR1);
arch/arm/mach-shmobile/platsmp.c+5−0
@@ -25,7 +25,12 @@ · 24 unmodified lines
2525 #define is_sh73a0() (machine_is_ag5evm() || machine_is_kota2() || \
2626 of_machine_is_compatible("renesas,sh73a0"))
2727 #define is_r8a7779() machine_is_marzen()
28+
29+#ifdef CONFIG_ARCH_EMEV2
2830 #define is_emev2() of_machine_is_compatible("renesas,emev2")
31+#else
32+#define is_emev2() (0)
33+#endif
2934
3035 static unsigned int __init shmobile_smp_get_core_count(void)
3136 {
arch/arm/mach-shmobile/setup-sh7372.c+1−1
@@ -484,7 +484,7 @@ static const struct sh_dmae_slave_config sh7372_dmae_slaves[] = { · 483 unmodified lines
484484 },
485485 };
486486
487−#define SH7372_CHCLR 0x220
487+#define SH7372_CHCLR (0x220 - 0x20)
488488
489489 static const struct sh_dmae_channel sh7372_dmae_channels[] = {
490490 {
arch/arm/mm/dma-mapping.c+1−1
@@ -1067,7 +1067,7 @@ static struct page **__iommu_alloc_buffer(struct device *dev, size_t size, gfp_t · 1066 unmodified lines
10671067 return NULL;
10681068
10691069 while (count) {
1070− int j, order = __ffs(count);
1070+ int j, order = __fls(count);
10711071
10721072 pages[i] = alloc_pages(gfp | __GFP_NOWARN, order);
10731073 while (!pages[i] && order)
arch/arm/plat-mxc/include/mach/mx2_cam.h+2−0
@@ -23,6 +23,7 @@ · 22 unmodified lines
2323 #ifndef __MACH_MX2_CAM_H_
2424 #define __MACH_MX2_CAM_H_
2525
26+#define MX2_CAMERA_SWAP16 (1 << 0)
2627 #define MX2_CAMERA_EXT_VSYNC (1 << 1)
2728 #define MX2_CAMERA_CCIR (1 << 2)
2829 #define MX2_CAMERA_CCIR_INTERLACE (1 << 3)
@@ -30,6 +31,7 @@ · 1 unmodified line
3031 #define MX2_CAMERA_GATED_CLOCK (1 << 5)
3132 #define MX2_CAMERA_INV_DATA (1 << 6)
3233 #define MX2_CAMERA_PCLK_SAMPLE_RISING (1 << 7)
34+#define MX2_CAMERA_PACK_DIR_MSB (1 << 8)
3335
3436 /**
3537 * struct mx2_camera_platform_data - optional platform data for mx2_camera
arch/arm/plat-samsung/include/plat/map-s3c.h+1−1
@@ -22,7 +22,7 @@ · 21 unmodified lines
2222 #define S3C24XX_VA_WATCHDOG S3C_VA_WATCHDOG
2323
2424 #define S3C2412_VA_SSMC S3C_ADDR_CPU(0x00000000)
25−#define S3C2412_VA_EBI S3C_ADDR_CPU(0x00010000)
25+#define S3C2412_VA_EBI S3C_ADDR_CPU(0x00100000)
2626
2727 #define S3C2410_PA_UART (0x50000000)
2828 #define S3C24XX_PA_UART S3C2410_PA_UART
arch/arm/plat-samsung/include/plat/watchdog-reset.h+1−1
@@ -25,7 +25,7 @@ static inline void arch_wdt_reset(void) · 24 unmodified lines
2525
2626 __raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */
2727
28− if (s3c2410_wdtclk)
28+ if (!IS_ERR(s3c2410_wdtclk))
2929 clk_enable(s3c2410_wdtclk);
3030
3131 /* put initial values into count and data */
arch/m68k/platform/coldfire/clk.c+7−0
@@ -42,4 +42,11 @@ unsigned long clk_get_rate(struct clk *clk) · 41 unmodified lines
4242 return MCF_CLK;
4343 }
4444 EXPORT_SYMBOL(clk_get_rate);
45+
46+struct clk *devm_clk_get(struct device *dev, const char *id)
47+{
48+ return NULL;
49+}
50+EXPORT_SYMBOL(devm_clk_get);
51+
4552 /***************************************************************************/
arch/powerpc/include/asm/hw_irq.h+5−0
@@ -103,6 +103,11 @@ static inline void hard_irq_disable(void) · 102 unmodified lines
103103 /* include/linux/interrupt.h needs hard_irq_disable to be a macro */
104104 #define hard_irq_disable hard_irq_disable
105105
106+static inline bool lazy_irq_pending(void)
107+{
108+ return !!(get_paca()->irq_happened & ~PACA_IRQ_HARD_DIS);
109+}
110+
106111 /*
107112 * This is called by asynchronous interrupts to conditionally
108113 * re-enable hard interrupts when soft-disabled after having
arch/powerpc/kernel/entry_64.S+40−57
@@ -558,27 +558,54 @@ _GLOBAL(ret_from_except_lite) · 557 unmodified lines
558558 mtmsrd r10,1 /* Update machine state */
559559 #endif /* CONFIG_PPC_BOOK3E */
560560
561−#ifdef CONFIG_PREEMPT
562561 clrrdi r9,r1,THREAD_SHIFT /* current_thread_info() */
563− li r0,_TIF_NEED_RESCHED /* bits to check */
564562 ld r3,_MSR(r1)
565563 ld r4,TI_FLAGS(r9)
566− /* Move MSR_PR bit in r3 to _TIF_SIGPENDING position in r0 */
567− rlwimi r0,r3,32+TIF_SIGPENDING-MSR_PR_LG,_TIF_SIGPENDING
568− and. r0,r4,r0 /* check NEED_RESCHED and maybe SIGPENDING */
569− bne do_work
570−
571−#else /* !CONFIG_PREEMPT */
572− ld r3,_MSR(r1) /* Returning to user mode? */
573564 andi. r3,r3,MSR_PR
574− beq restore /* if not, just restore regs and return */
565+ beq resume_kernel
575566
576567 /* Check current_thread_info()->flags */
568+ andi. r0,r4,_TIF_USER_WORK_MASK
569+ beq restore
570+
571+ andi. r0,r4,_TIF_NEED_RESCHED
572+ beq 1f
573+ bl .restore_interrupts
574+ bl .schedule
575+ b .ret_from_except_lite
576+
577+1: bl .save_nvgprs
578+ bl .restore_interrupts
579+ addi r3,r1,STACK_FRAME_OVERHEAD
580+ bl .do_notify_resume
581+ b .ret_from_except
582+
583+resume_kernel:
584+#ifdef CONFIG_PREEMPT
585+ /* Check if we need to preempt */
586+ andi. r0,r4,_TIF_NEED_RESCHED
587+ beq+ restore
588+ /* Check that preempt_count() == 0 and interrupts are enabled */
589+ lwz r8,TI_PREEMPT(r9)
590+ cmpwi cr1,r8,0
591+ ld r0,SOFTE(r1)
592+ cmpdi r0,0
593+ crandc eq,cr1*4+eq,eq
594+ bne restore
595+
596+ /*
597+ * Here we are preempting the current task. We want to make
598+ * sure we are soft-disabled first
599+ */
600+ SOFT_DISABLE_INTS(r3,r4)
601+1: bl .preempt_schedule_irq
602+
603+ /* Re-test flags and eventually loop */
577604 clrrdi r9,r1,THREAD_SHIFT
578605 ld r4,TI_FLAGS(r9)
579− andi. r0,r4,_TIF_USER_WORK_MASK
580− bne do_work
581−#endif /* !CONFIG_PREEMPT */
606+ andi. r0,r4,_TIF_NEED_RESCHED
607+ bne 1b
608+#endif /* CONFIG_PREEMPT */
582609
583610 .globl fast_exc_return_irq
584611 fast_exc_return_irq:
@@ -759,50 +786,6 @@ restore_check_irq_replay: · 174 unmodified lines
759786 #endif /* CONFIG_PPC_BOOK3E */
760787 1: b .ret_from_except /* What else to do here ? */
761788
762−
763−
764−3:
765−do_work:
766−#ifdef CONFIG_PREEMPT
767− andi. r0,r3,MSR_PR /* Returning to user mode? */
768− bne user_work
769− /* Check that preempt_count() == 0 and interrupts are enabled */
770− lwz r8,TI_PREEMPT(r9)
771− cmpwi cr1,r8,0
772− ld r0,SOFTE(r1)
773− cmpdi r0,0
774− crandc eq,cr1*4+eq,eq
775− bne restore
776−
777− /*
778− * Here we are preempting the current task. We want to make
779− * sure we are soft-disabled first
780− */
781− SOFT_DISABLE_INTS(r3,r4)
782−1: bl .preempt_schedule_irq
783−
784− /* Re-test flags and eventually loop */
785− clrrdi r9,r1,THREAD_SHIFT
786− ld r4,TI_FLAGS(r9)
787− andi. r0,r4,_TIF_NEED_RESCHED
788− bne 1b
789− b restore
790−
791−user_work:
792−#endif /* CONFIG_PREEMPT */
793−
794− andi. r0,r4,_TIF_NEED_RESCHED
795− beq 1f
796− bl .restore_interrupts
797− bl .schedule
798− b .ret_from_except_lite
799−
800−1: bl .save_nvgprs
801− bl .restore_interrupts
802− addi r3,r1,STACK_FRAME_OVERHEAD
803− bl .do_notify_resume
804− b .ret_from_except
805−
806789 unrecov_restore:
807790 addi r3,r1,STACK_FRAME_OVERHEAD
808791 bl .unrecoverable_exception
arch/powerpc/kernel/irq.c+1−1
@@ -277,7 +277,7 @@ EXPORT_SYMBOL(arch_local_irq_restore); · 276 unmodified lines
277277 * NOTE: This is called with interrupts hard disabled but not marked
278278 * as such in paca->irq_happened, so we need to resync this.
279279 */
280−void restore_interrupts(void)
280+void notrace restore_interrupts(void)
281281 {
282282 if (irqs_disabled()) {
283283 local_paca->irq_happened |= PACA_IRQ_HARD_DIS;
arch/powerpc/kernel/prom_init.c+2−2
@@ -1312,7 +1312,7 @@ static struct opal_secondary_data { · 1311 unmodified lines
13121312
13131313 extern char opal_secondary_entry;
13141314
1315−static void prom_query_opal(void)
1315+static void __init prom_query_opal(void)
13161316 {
13171317 long rc;
13181318
@@ -1436,7 +1436,7 @@ static void __init prom_opal_hold_cpus(void) · 117 unmodified lines
14361436 prom_debug("prom_opal_hold_cpus: end...\n");
14371437 }
14381438
1439−static void prom_opal_takeover(void)
1439+static void __init prom_opal_takeover(void)
14401440 {
14411441 struct opal_secondary_data *data = &RELOC(opal_secondary_data);
14421442 struct opal_takeover_args *args = &data->args;
arch/powerpc/mm/numa.c+1−1
@@ -635,7 +635,7 @@ static inline int __init read_usm_ranges(const u32 **usm) · 634 unmodified lines
635635 */
636636 static void __init parse_drconf_memory(struct device_node *memory)
637637 {
638− const u32 *dm, *usm;
638+ const u32 *uninitialized_var(dm), *usm;
639639 unsigned int n, rc, ranges, is_kexec_kdump = 0;
640640 unsigned long lmb_size, base, size, sz;
641641 int nid;
arch/powerpc/net/bpf_jit_64.S+2−0
@@ -105,6 +105,7 @@ sk_load_byte_msh_positive_offset: · 104 unmodified lines
105105 mr r4, r_addr; \
106106 li r6, SIZE; \
107107 bl skb_copy_bits; \
108+ nop; \
108109 /* R3 = 0 on success */ \
109110 addi r1, r1, BPF_PPC_SLOWPATH_FRAME; \
110111 ld r0, 16(r1); \
@@ -156,6 +157,7 @@ bpf_slow_path_byte_msh: · 45 unmodified lines
156157 mr r4, r_addr; \
157158 li r5, SIZE; \
158159 bl bpf_internal_load_pointer_neg_helper; \
160+ nop; \
159161 /* R3 != 0 on success */ \
160162 addi r1, r1, BPF_PPC_SLOWPATH_FRAME; \
161163 ld r0, 16(r1); \
arch/powerpc/platforms/pseries/iommu.c+2−2
@@ -106,7 +106,7 @@ static int tce_build_pSeries(struct iommu_table *tbl, long index, · 105 unmodified lines
106106 tcep++;
107107 }
108108
109− if (tbl->it_type == TCE_PCI_SWINV_CREATE)
109+ if (tbl->it_type & TCE_PCI_SWINV_CREATE)
110110 tce_invalidate_pSeries_sw(tbl, tces, tcep - 1);
111111 return 0;
112112 }
@@ -121,7 +121,7 @@ static void tce_free_pSeries(struct iommu_table *tbl, long index, long npages) · 8 unmodified lines
121121 while (npages--)
122122 *(tcep++) = 0;
123123
124− if (tbl->it_type == TCE_PCI_SWINV_FREE)
124+ if (tbl->it_type & TCE_PCI_SWINV_FREE)
125125 tce_invalidate_pSeries_sw(tbl, tces, tcep - 1);
126126 }
127127
arch/powerpc/platforms/pseries/processor_idle.c+1−1
@@ -106,7 +106,7 @@ static void check_and_cede_processor(void) · 105 unmodified lines
106106 * we first hard disable then check.
107107 */
108108 hard_irq_disable();
109− if (get_paca()->irq_happened == 0)
109+ if (!lazy_irq_pending())
110110 cede_processor();
111111 }
112112
arch/sh/boards/mach-kfr2r09/setup.c+2−2
@@ -201,8 +201,8 @@ static struct resource kfr2r09_usb0_gadget_resources[] = { · 200 unmodified lines
201201 .flags = IORESOURCE_MEM,
202202 },
203203 [1] = {
204− .start = evtirq(0xa20),
205− .end = evtirq(0xa20),
204+ .start = evt2irq(0xa20),
205+ .end = evt2irq(0xa20),
206206 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
207207 },
208208 };
arch/sh/drivers/pci/pcie-sh7786.c+1−1
@@ -239,7 +239,7 @@ static int __init pcie_clk_init(struct sh7786_pcie_port *port) · 238 unmodified lines
239239 clk->enable_reg = (void __iomem *)(chan->reg_base + SH4A_PCIEPHYCTLR);
240240 clk->enable_bit = BITS_CKE;
241241
242− ret = sh_clk_mstp32_register(clk, 1);
242+ ret = sh_clk_mstp_register(clk, 1);
243243 if (unlikely(ret < 0))
244244 goto err_phy;
245245
arch/sh/kernel/cpu/sh4a/clock-sh7343.c+1−1
@@ -283,7 +283,7 @@ int __init arch_clk_init(void) · 282 unmodified lines
283283 ret = sh_clk_div6_register(div6_clks, DIV6_NR);
284284
285285 if (!ret)
286− ret = sh_clk_mstp32_register(mstp_clks, MSTP_NR);
286+ ret = sh_clk_mstp_register(mstp_clks, MSTP_NR);
287287
288288 return ret;
289289 }
arch/sh/kernel/cpu/sh4a/clock-sh7366.c+1−1
@@ -276,7 +276,7 @@ int __init arch_clk_init(void) · 275 unmodified lines
276276 ret = sh_clk_div6_register(div6_clks, DIV6_NR);
277277
278278 if (!ret)
279− ret = sh_clk_mstp32_register(mstp_clks, MSTP_NR);
279+ ret = sh_clk_mstp_register(mstp_clks, MSTP_NR);
280280
281281 return ret;
282282 }
arch/sh/kernel/cpu/sh4a/clock-sh7722.c+1−1
@@ -261,7 +261,7 @@ int __init arch_clk_init(void) · 260 unmodified lines
261261 ret = sh_clk_div6_register(div6_clks, DIV6_NR);
262262
263263 if (!ret)
264− ret = sh_clk_mstp32_register(mstp_clks, HWBLK_NR);
264+ ret = sh_clk_mstp_register(mstp_clks, HWBLK_NR);
265265
266266 return ret;
267267 }
arch/sh/kernel/cpu/sh4a/clock-sh7723.c+1−1
@@ -311,7 +311,7 @@ int __init arch_clk_init(void) · 310 unmodified lines
311311 ret = sh_clk_div6_register(div6_clks, DIV6_NR);
312312
313313 if (!ret)
314− ret = sh_clk_mstp32_register(mstp_clks, HWBLK_NR);
314+ ret = sh_clk_mstp_register(mstp_clks, HWBLK_NR);
315315
316316 return ret;
317317 }
arch/sh/kernel/cpu/sh4a/clock-sh7724.c+1−1
@@ -375,7 +375,7 @@ int __init arch_clk_init(void) · 374 unmodified lines
375375 ret = sh_clk_div6_reparent_register(div6_clks, DIV6_NR);
376376
377377 if (!ret)
378− ret = sh_clk_mstp32_register(mstp_clks, HWBLK_NR);
378+ ret = sh_clk_mstp_register(mstp_clks, HWBLK_NR);
379379
380380 return ret;
381381 }
arch/sh/kernel/cpu/sh4a/clock-sh7734.c+1−1
@@ -260,7 +260,7 @@ int __init arch_clk_init(void) · 259 unmodified lines
260260 &div4_table);
261261
262262 if (!ret)
263− ret = sh_clk_mstp32_register(mstp_clks, MSTP_NR);
263+ ret = sh_clk_mstp_register(mstp_clks, MSTP_NR);
264264
265265 return ret;
266266 }
arch/sh/kernel/cpu/sh4a/clock-sh7757.c+1−1
@@ -148,7 +148,7 @@ int __init arch_clk_init(void) · 147 unmodified lines
148148 ret = sh_clk_div4_register(div4_clks, ARRAY_SIZE(div4_clks),
149149 &div4_table);
150150 if (!ret)
151− ret = sh_clk_mstp32_register(mstp_clks, MSTP_NR);
151+ ret = sh_clk_mstp_register(mstp_clks, MSTP_NR);
152152
153153 return ret;
154154 }
arch/sh/kernel/cpu/sh4a/clock-sh7785.c+1−1
@@ -175,7 +175,7 @@ int __init arch_clk_init(void) · 174 unmodified lines
175175 ret = sh_clk_div4_register(div4_clks, ARRAY_SIZE(div4_clks),
176176 &div4_table);
177177 if (!ret)
178− ret = sh_clk_mstp32_register(mstp_clks, MSTP_NR);
178+ ret = sh_clk_mstp_register(mstp_clks, MSTP_NR);
179179
180180 return ret;
181181 }
arch/sh/kernel/cpu/sh4a/clock-sh7786.c+1−1
@@ -194,7 +194,7 @@ int __init arch_clk_init(void) · 193 unmodified lines
194194 ret = sh_clk_div4_register(div4_clks, ARRAY_SIZE(div4_clks),
195195 &div4_table);
196196 if (!ret)
197− ret = sh_clk_mstp32_register(mstp_clks, MSTP_NR);
197+ ret = sh_clk_mstp_register(mstp_clks, MSTP_NR);
198198
199199 return ret;
200200 }
arch/sh/kernel/cpu/sh4a/clock-shx3.c+1−1
@@ -149,7 +149,7 @@ int __init arch_clk_init(void) · 148 unmodified lines
149149 ret = sh_clk_div4_register(div4_clks, ARRAY_SIZE(div4_clks),
150150 &div4_table);
151151 if (!ret)
152− ret = sh_clk_mstp32_register(mstp_clks, MSTP_NR);
152+ ret = sh_clk_mstp_register(mstp_clks, MSTP_NR);
153153
154154 return ret;
155155 }
arch/x86/ia32/ia32_signal.c+1−1
@@ -38,7 +38,7 @@ · 37 unmodified lines
3838 int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from)
3939 {
4040 int err = 0;
41− bool ia32 = is_ia32_task();
41+ bool ia32 = test_thread_flag(TIF_IA32);
4242
4343 if (!access_ok(VERIFY_WRITE, to, sizeof(compat_siginfo_t)))
4444 return -EFAULT;
arch/x86/include/asm/cpufeature.h+1−1
@@ -176,7 +176,7 @@ · 175 unmodified lines
176176 #define X86_FEATURE_XSAVEOPT (7*32+ 4) /* Optimized Xsave */
177177 #define X86_FEATURE_PLN (7*32+ 5) /* Intel Power Limit Notification */
178178 #define X86_FEATURE_PTS (7*32+ 6) /* Intel Package Thermal Status */
179−#define X86_FEATURE_DTS (7*32+ 7) /* Digital Thermal Sensor */
179+#define X86_FEATURE_DTHERM (7*32+ 7) /* Digital Thermal Sensor */
180180 #define X86_FEATURE_HW_PSTATE (7*32+ 8) /* AMD HW-PState */
181181
182182 /* Virtualization flags: Linux defined, word 8 */
arch/x86/kernel/acpi/boot.c+16−11
@@ -422,12 +422,14 @@ acpi_parse_int_src_ovr(struct acpi_subtable_header * header, · 421 unmodified lines
422422 return 0;
423423 }
424424
425− if (intsrc->source_irq == 0 && intsrc->global_irq == 2) {
425+ if (intsrc->source_irq == 0) {
426426 if (acpi_skip_timer_override) {
427− printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n");
427+ printk(PREFIX "BIOS IRQ0 override ignored.\n");
428428 return 0;
429429 }
430− if (acpi_fix_pin2_polarity && (intsrc->inti_flags & ACPI_MADT_POLARITY_MASK)) {
430+
431+ if ((intsrc->global_irq == 2) && acpi_fix_pin2_polarity
432+ && (intsrc->inti_flags & ACPI_MADT_POLARITY_MASK)) {
431433 intsrc->inti_flags &= ~ACPI_MADT_POLARITY_MASK;
432434 printk(PREFIX "BIOS IRQ0 pin2 override: forcing polarity to high active.\n");
433435 }
@@ -1334,17 +1336,12 @@ static int __init dmi_disable_acpi(const struct dmi_system_id *d) · 900 unmodified lines
13341336 }
13351337
13361338 /*
1337− * Force ignoring BIOS IRQ0 pin2 override
1339+ * Force ignoring BIOS IRQ0 override
13381340 */
13391341 static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d)
13401342 {
1341− /*
1342− * The ati_ixp4x0_rev() early PCI quirk should have set
1343− * the acpi_skip_timer_override flag already:
1344− */
13451343 if (!acpi_skip_timer_override) {
1346− WARN(1, KERN_ERR "ati_ixp4x0 quirk not complete.\n");
1347− pr_notice("%s detected: Ignoring BIOS IRQ0 pin2 override\n",
1344+ pr_notice("%s detected: Ignoring BIOS IRQ0 override\n",
13481345 d->ident);
13491346 acpi_skip_timer_override = 1;
13501347 }
@@ -1438,7 +1435,7 @@ static struct dmi_system_id __initdata acpi_dmi_table_late[] = { · 87 unmodified lines
14381435 * is enabled. This input is incorrectly designated the
14391436 * ISA IRQ 0 via an interrupt source override even though
14401437 * it is wired to the output of the master 8259A and INTIN0
1441− * is not connected at all. Force ignoring BIOS IRQ0 pin2
1438+ * is not connected at all. Force ignoring BIOS IRQ0
14421439 * override in that cases.
14431440 */
14441441 {
@@ -1473,6 +1470,14 @@ static struct dmi_system_id __initdata acpi_dmi_table_late[] = { · 28 unmodified lines
14731470 DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq 6715b"),
14741471 },
14751472 },
1473+ {
1474+ .callback = dmi_ignore_irq0_timer_override,
1475+ .ident = "FUJITSU SIEMENS",
1476+ .matches = {
1477+ DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
1478+ DMI_MATCH(DMI_PRODUCT_NAME, "AMILO PRO V2030"),
1479+ },
1480+ },
14761481 {}
14771482 };
14781483
arch/x86/kernel/cpu/mkcapflags.pl+19−6
@@ -1,4 +1,4 @@
1−#!/usr/bin/perl
1+#!/usr/bin/perl -w
22 #
33 # Generate the x86_cap_flags[] array from include/asm-x86/cpufeature.h
44 #
@@ -11,22 +11,35 @@ open(OUT, "> $out\0") or die "$0: cannot create: $out: $!\n"; · 6 unmodified lines
1111 print OUT "#include <asm/cpufeature.h>\n\n";
1212 print OUT "const char * const x86_cap_flags[NCAPINTS*32] = {\n";
1313
14+%features = ();
15+$err = 0;
16+
1417 while (defined($line = <IN>)) {
1518 if ($line =~ /^\s*\#\s*define\s+(X86_FEATURE_(\S+))\s+(.*)$/) {
1619 $macro = $1;
17− $feature = $2;
20+ $feature = "\L$2";
1821 $tail = $3;
1922 if ($tail =~ /\/\*\s*\"([^"]*)\".*\*\//) {
20− $feature = $1;
23+ $feature = "\L$1";
2124 }
2225
23− if ($feature ne '') {
24− printf OUT "\t%-32s = \"%s\",\n",
25− "[$macro]", "\L$feature";
26+ next if ($feature eq '');
27+
28+ if ($features{$feature}++) {
29+ print STDERR "$in: duplicate feature name: $feature\n";
30+ $err++;
2631 }
32+ printf OUT "\t%-32s = \"%s\",\n", "[$macro]", $feature;
2733 }
2834 }
2935 print OUT "};\n";
3036
3137 close(IN);
3238 close(OUT);
39+
40+if ($err) {
41+ unlink($out);
42+ exit(1);
43+}
44+
45+exit(0);
arch/x86/kernel/cpu/scattered.c+1−1
@@ -31,7 +31,7 @@ void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c) · 30 unmodified lines
3131 const struct cpuid_bit *cb;
3232
3333 static const struct cpuid_bit __cpuinitconst cpuid_bits[] = {
34− { X86_FEATURE_DTS, CR_EAX, 0, 0x00000006, 0 },
34+ { X86_FEATURE_DTHERM, CR_EAX, 0, 0x00000006, 0 },
3535 { X86_FEATURE_IDA, CR_EAX, 1, 0x00000006, 0 },
3636 { X86_FEATURE_ARAT, CR_EAX, 2, 0x00000006, 0 },
3737 { X86_FEATURE_PLN, CR_EAX, 4, 0x00000006, 0 },
arch/x86/kernel/kgdb.c+4−4
@@ -444,12 +444,12 @@ void kgdb_roundup_cpus(unsigned long flags) · 443 unmodified lines
444444
445445 /**
446446 * kgdb_arch_handle_exception - Handle architecture specific GDB packets.
447− * @vector: The error vector of the exception that happened.
447+ * @e_vector: The error vector of the exception that happened.
448448 * @signo: The signal number of the exception that happened.
449449 * @err_code: The error code of the exception that happened.
450− * @remcom_in_buffer: The buffer of the packet we have read.
451− * @remcom_out_buffer: The buffer of %BUFMAX bytes to write a packet into.
452− * @regs: The &struct pt_regs of the current process.
450+ * @remcomInBuffer: The buffer of the packet we have read.
451+ * @remcomOutBuffer: The buffer of %BUFMAX bytes to write a packet into.
452+ * @linux_regs: The &struct pt_regs of the current process.
453453 *
454454 * This function MUST handle the 'c' and 's' command packets,
455455 * as well packets to set / remove a hardware breakpoint, if used.
arch/x86/kernel/reboot.c+8−0
@@ -451,6 +451,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { · 450 unmodified lines
451451 DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 990"),
452452 },
453453 },
454+ { /* Handle problems with rebooting on the Precision M6600. */
455+ .callback = set_pci_reboot,
456+ .ident = "Dell OptiPlex 990",
457+ .matches = {
458+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
459+ DMI_MATCH(DMI_PRODUCT_NAME, "Precision M6600"),
460+ },
461+ },
454462 { }
455463 };
456464
arch/x86/lib/csum-wrappers_64.c+1−1
@@ -115,7 +115,7 @@ EXPORT_SYMBOL(csum_partial_copy_to_user); · 114 unmodified lines
115115 * @src: source address
116116 * @dst: destination address
117117 * @len: number of bytes to be copied.
118− * @isum: initial sum that is added into the result (32bit unfolded)
118+ * @sum: initial sum that is added into the result (32bit unfolded)
119119 *
120120 * Returns an 32bit unfolded checksum of the buffer.
121121 */
drivers/acpi/acpi_pad.c+4−3
@@ -36,6 +36,7 @@ · 35 unmodified lines
3636 #define ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME "Processor Aggregator"
3737 #define ACPI_PROCESSOR_AGGREGATOR_NOTIFY 0x80
3838 static DEFINE_MUTEX(isolated_cpus_lock);
39+static DEFINE_MUTEX(round_robin_lock);
3940
4041 static unsigned long power_saving_mwait_eax;
4142
@@ -107,7 +108,7 @@ static void round_robin_cpu(unsigned int tsk_index) · 65 unmodified lines
107108 if (!alloc_cpumask_var(&tmp, GFP_KERNEL))
108109 return;
109110
110− mutex_lock(&isolated_cpus_lock);
111+ mutex_lock(&round_robin_lock);
111112 cpumask_clear(tmp);
112113 for_each_cpu(cpu, pad_busy_cpus)
113114 cpumask_or(tmp, tmp, topology_thread_cpumask(cpu));
@@ -116,7 +117,7 @@ static void round_robin_cpu(unsigned int tsk_index) · 2 unmodified lines
116117 if (cpumask_empty(tmp))
117118 cpumask_andnot(tmp, cpu_online_mask, pad_busy_cpus);
118119 if (cpumask_empty(tmp)) {
119− mutex_unlock(&isolated_cpus_lock);
120+ mutex_unlock(&round_robin_lock);
120121 return;
121122 }
122123 for_each_cpu(cpu, tmp) {
@@ -131,7 +132,7 @@ static void round_robin_cpu(unsigned int tsk_index) · 8 unmodified lines
131132 tsk_in_cpu[tsk_index] = preferred_cpu;
132133 cpumask_set_cpu(preferred_cpu, pad_busy_cpus);
133134 cpu_weight[preferred_cpu]++;
134− mutex_unlock(&isolated_cpus_lock);
135+ mutex_unlock(&round_robin_lock);
135136
136137 set_cpus_allowed_ptr(current, cpumask_of(preferred_cpu));
137138 }
drivers/acpi/apei/apei-base.c+15−2
@@ -243,7 +243,7 @@ static int pre_map_gar_callback(struct apei_exec_context *ctx, · 242 unmodified lines
243243 u8 ins = entry->instruction;
244244
245245 if (ctx->ins_table[ins].flags & APEI_EXEC_INS_ACCESS_REGISTER)
246− return acpi_os_map_generic_address(&entry->register_region);
246+ return apei_map_generic_address(&entry->register_region);
247247
248248 return 0;
249249 }
@@ -276,7 +276,7 @@ static int post_unmap_gar_callback(struct apei_exec_context *ctx, · 26 unmodified lines
276276 u8 ins = entry->instruction;
277277
278278 if (ctx->ins_table[ins].flags & APEI_EXEC_INS_ACCESS_REGISTER)
279− acpi_os_unmap_generic_address(&entry->register_region);
279+ apei_unmap_generic_address(&entry->register_region);
280280
281281 return 0;
282282 }
@@ -606,6 +606,19 @@ static int apei_check_gar(struct acpi_generic_address *reg, u64 *paddr, · 323 unmodified lines
606606 return 0;
607607 }
608608
609+int apei_map_generic_address(struct acpi_generic_address *reg)
610+{
611+ int rc;
612+ u32 access_bit_width;
613+ u64 address;
614+
615+ rc = apei_check_gar(reg, &address, &access_bit_width);
616+ if (rc)
617+ return rc;
618+ return acpi_os_map_generic_address(reg);
619+}
620+EXPORT_SYMBOL_GPL(apei_map_generic_address);
621+
609622 /* read GAR in interrupt (including NMI) or process context */
610623 int apei_read(u64 *val, struct acpi_generic_address *reg)
611624 {
drivers/acpi/apei/apei-internal.h+9−0
@@ -7,6 +7,8 @@ · 6 unmodified lines
77 #define APEI_INTERNAL_H
88
99 #include <linux/cper.h>
10+#include <linux/acpi.h>
11+#include <linux/acpi_io.h>
1012
1113 struct apei_exec_context;
1214
@@ -68,6 +70,13 @@ static inline int apei_exec_run_optional(struct apei_exec_context *ctx, u8 actio · 55 unmodified lines
6870 /* IP has been set in instruction function */
6971 #define APEI_EXEC_SET_IP 1
7072
73+int apei_map_generic_address(struct acpi_generic_address *reg);
74+
75+static inline void apei_unmap_generic_address(struct acpi_generic_address *reg)
76+{
77+ acpi_os_unmap_generic_address(reg);
78+}
79+
7180 int apei_read(u64 *val, struct acpi_generic_address *reg);
7281 int apei_write(u64 val, struct acpi_generic_address *reg);
7382
drivers/acpi/apei/ghes.c+3−3
@@ -301,7 +301,7 @@ static struct ghes *ghes_new(struct acpi_hest_generic *generic) · 300 unmodified lines
301301 if (!ghes)
302302 return ERR_PTR(-ENOMEM);
303303 ghes->generic = generic;
304− rc = acpi_os_map_generic_address(&generic->error_status_address);
304+ rc = apei_map_generic_address(&generic->error_status_address);
305305 if (rc)
306306 goto err_free;
307307 error_block_length = generic->error_block_length;
@@ -321,7 +321,7 @@ static struct ghes *ghes_new(struct acpi_hest_generic *generic) · 13 unmodified lines
321321 return ghes;
322322
323323 err_unmap:
324− acpi_os_unmap_generic_address(&generic->error_status_address);
324+ apei_unmap_generic_address(&generic->error_status_address);
325325 err_free:
326326 kfree(ghes);
327327 return ERR_PTR(rc);
@@ -330,7 +330,7 @@ err_free: · 2 unmodified lines
330330 static void ghes_fini(struct ghes *ghes)
331331 {
332332 kfree(ghes->estatus);
333− acpi_os_unmap_generic_address(&ghes->generic->error_status_address);
333+ apei_unmap_generic_address(&ghes->generic->error_status_address);
334334 }
335335
336336 enum {
drivers/acpi/processor_idle.c+30−2
@@ -224,6 +224,7 @@ static void lapic_timer_state_broadcast(struct acpi_processor *pr, · 223 unmodified lines
224224 /*
225225 * Suspend / resume control
226226 */
227+static int acpi_idle_suspend;
227228 static u32 saved_bm_rld;
228229
229230 static void acpi_idle_bm_rld_save(void)
@@ -242,13 +243,21 @@ static void acpi_idle_bm_rld_restore(void) · 12 unmodified lines
242243
243244 int acpi_processor_suspend(struct acpi_device * device, pm_message_t state)
244245 {
246+ if (acpi_idle_suspend == 1)
247+ return 0;
248+
245249 acpi_idle_bm_rld_save();
250+ acpi_idle_suspend = 1;
246251 return 0;
247252 }
248253
249254 int acpi_processor_resume(struct acpi_device * device)
250255 {
256+ if (acpi_idle_suspend == 0)
257+ return 0;
258+
251259 acpi_idle_bm_rld_restore();
260+ acpi_idle_suspend = 0;
252261 return 0;
253262 }
254263
@@ -754,6 +763,12 @@ static int acpi_idle_enter_c1(struct cpuidle_device *dev, · 499 unmodified lines
754763
755764 local_irq_disable();
756765
766+ if (acpi_idle_suspend) {
767+ local_irq_enable();
768+ cpu_relax();
769+ return -EBUSY;
770+ }
771+
757772 lapic_timer_state_broadcast(pr, cx, 1);
758773 kt1 = ktime_get_real();
759774 acpi_idle_do_entry(cx);
@@ -823,6 +838,12 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, · 63 unmodified lines
823838
824839 local_irq_disable();
825840
841+ if (acpi_idle_suspend) {
842+ local_irq_enable();
843+ cpu_relax();
844+ return -EBUSY;
845+ }
846+
826847 if (cx->entry_method != ACPI_CSTATE_FFH) {
827848 current_thread_info()->status &= ~TS_POLLING;
828849 /*
@@ -907,14 +928,21 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, · 78 unmodified lines
907928 drv, drv->safe_state_index);
908929 } else {
909930 local_irq_disable();
910− acpi_safe_halt();
931+ if (!acpi_idle_suspend)
932+ acpi_safe_halt();
911933 local_irq_enable();
912− return -EINVAL;
934+ return -EBUSY;
913935 }
914936 }
915937
916938 local_irq_disable();
917939
940+ if (acpi_idle_suspend) {
941+ local_irq_enable();
942+ cpu_relax();
943+ return -EBUSY;
944+ }
945+
918946 if (cx->entry_method != ACPI_CSTATE_FFH) {
919947 current_thread_info()->status &= ~TS_POLLING;
920948 /*
drivers/acpi/sysfs.c+2−2
@@ -173,7 +173,7 @@ static int param_set_trace_state(const char *val, struct kernel_param *kp) · 172 unmodified lines
173173 {
174174 int result = 0;
175175
176− if (!strncmp(val, "enable", strlen("enable") - 1)) {
176+ if (!strncmp(val, "enable", strlen("enable"))) {
177177 result = acpi_debug_trace(trace_method_name, trace_debug_level,
178178 trace_debug_layer, 0);
179179 if (result)
@@ -181,7 +181,7 @@ static int param_set_trace_state(const char *val, struct kernel_param *kp) · 1 unmodified line
181181 goto exit;
182182 }
183183
184− if (!strncmp(val, "disable", strlen("disable") - 1)) {
184+ if (!strncmp(val, "disable", strlen("disable"))) {
185185 int name = 0;
186186 result = acpi_debug_trace((char *)&name, trace_debug_level,
187187 trace_debug_layer, 0);
drivers/acpi/video.c+2−0
@@ -558,6 +558,8 @@ acpi_video_bus_DOS(struct acpi_video_bus *video, int bios_flag, int lcd_flag) · 557 unmodified lines
558558 union acpi_object arg0 = { ACPI_TYPE_INTEGER };
559559 struct acpi_object_list args = { 1, &arg0 };
560560
561+ if (!video->cap._DOS)
562+ return 0;
561563
562564 if (bios_flag < 0 || bios_flag > 3 || lcd_flag < 0 || lcd_flag > 1)
563565 return -EINVAL;
drivers/base/power/main.c+4−2
@@ -1031,7 +1031,7 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async) · 1030 unmodified lines
10311031 dpm_wait_for_children(dev, async);
10321032
10331033 if (async_error)
1034− return 0;
1034+ goto Complete;
10351035
10361036 pm_runtime_get_noresume(dev);
10371037 if (pm_runtime_barrier(dev) && device_may_wakeup(dev))
@@ -1040,7 +1040,7 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async) · 2 unmodified lines
10401040 if (pm_wakeup_pending()) {
10411041 pm_runtime_put_sync(dev);
10421042 async_error = -EBUSY;
1043− return 0;
1043+ goto Complete;
10441044 }
10451045
10461046 device_lock(dev);
@@ -1097,6 +1097,8 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async) · 50 unmodified lines
10971097 }
10981098
10991099 device_unlock(dev);
1100+
1101+ Complete:
11001102 complete_all(&dev->power.completion);
11011103
11021104 if (error) {
drivers/bluetooth/ath3k.c+3−0
@@ -63,6 +63,7 @@ static struct usb_device_id ath3k_table[] = { · 62 unmodified lines
6363
6464 /* Atheros AR3011 with sflash firmware*/
6565 { USB_DEVICE(0x0CF3, 0x3002) },
66+ { USB_DEVICE(0x0CF3, 0xE019) },
6667 { USB_DEVICE(0x13d3, 0x3304) },
6768 { USB_DEVICE(0x0930, 0x0215) },
6869 { USB_DEVICE(0x0489, 0xE03D) },
@@ -77,6 +78,7 @@ static struct usb_device_id ath3k_table[] = { · 8 unmodified lines
7778 { USB_DEVICE(0x04CA, 0x3005) },
7879 { USB_DEVICE(0x13d3, 0x3362) },
7980 { USB_DEVICE(0x0CF3, 0xE004) },
81+ { USB_DEVICE(0x0930, 0x0219) },
8082
8183 /* Atheros AR5BBU12 with sflash firmware */
8284 { USB_DEVICE(0x0489, 0xE02C) },
@@ -101,6 +103,7 @@ static struct usb_device_id ath3k_blist_tbl[] = { · 18 unmodified lines
101103 { USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },
102104 { USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 },
103105 { USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 },
106+ { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 },
104107
105108 /* Atheros AR5BBU22 with sflash firmware */
106109 { USB_DEVICE(0x0489, 0xE03C), .driver_info = BTUSB_ATH3012 },
drivers/bluetooth/btmrvl_drv.h+1−1
@@ -136,7 +136,7 @@ int btmrvl_remove_card(struct btmrvl_private *priv); · 135 unmodified lines
136136
137137 void btmrvl_interrupt(struct btmrvl_private *priv);
138138
139−void btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb);
139+bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb);
140140 int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb);
141141
142142 int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd);
drivers/bluetooth/btmrvl_main.c+12−2
@@ -44,23 +44,33 @@ void btmrvl_interrupt(struct btmrvl_private *priv) · 43 unmodified lines
4444 }
4545 EXPORT_SYMBOL_GPL(btmrvl_interrupt);
4646
47−void btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
47+bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
4848 {
4949 struct hci_event_hdr *hdr = (void *) skb->data;
5050 struct hci_ev_cmd_complete *ec;
51− u16 opcode, ocf;
51+ u16 opcode, ocf, ogf;
5252
5353 if (hdr->evt == HCI_EV_CMD_COMPLETE) {
5454 ec = (void *) (skb->data + HCI_EVENT_HDR_SIZE);
5555 opcode = __le16_to_cpu(ec->opcode);
5656 ocf = hci_opcode_ocf(opcode);
57+ ogf = hci_opcode_ogf(opcode);
58+
5759 if (ocf == BT_CMD_MODULE_CFG_REQ &&
5860 priv->btmrvl_dev.sendcmdflag) {
5961 priv->btmrvl_dev.sendcmdflag = false;
6062 priv->adapter->cmd_complete = true;
6163 wake_up_interruptible(&priv->adapter->cmd_wait_q);
6264 }
65+
66+ if (ogf == OGF) {
67+ BT_DBG("vendor event skipped: ogf 0x%4.4x", ogf);
68+ kfree_skb(skb);
69+ return false;
70+ }
6371 }
72+
73+ return true;
6474 }
6575 EXPORT_SYMBOL_GPL(btmrvl_check_evtpkt);
6676
drivers/bluetooth/btmrvl_sdio.c+5−3
@@ -562,10 +562,12 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv) · 561 unmodified lines
562562 skb_put(skb, buf_len);
563563 skb_pull(skb, SDIO_HEADER_LEN);
564564
565− if (type == HCI_EVENT_PKT)
566− btmrvl_check_evtpkt(priv, skb);
565+ if (type == HCI_EVENT_PKT) {
566+ if (btmrvl_check_evtpkt(priv, skb))
567+ hci_recv_frame(skb);
568+ } else
569+ hci_recv_frame(skb);
567570
568− hci_recv_frame(skb);
569571 hdev->stat.byte_rx += buf_len;
570572 break;
571573
drivers/bluetooth/btusb.c+2−0
@@ -125,6 +125,7 @@ static struct usb_device_id blacklist_table[] = { · 124 unmodified lines
125125
126126 /* Atheros 3011 with sflash firmware */
127127 { USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE },
128+ { USB_DEVICE(0x0cf3, 0xe019), .driver_info = BTUSB_IGNORE },
128129 { USB_DEVICE(0x13d3, 0x3304), .driver_info = BTUSB_IGNORE },
129130 { USB_DEVICE(0x0930, 0x0215), .driver_info = BTUSB_IGNORE },
130131 { USB_DEVICE(0x0489, 0xe03d), .driver_info = BTUSB_IGNORE },
@@ -139,6 +140,7 @@ static struct usb_device_id blacklist_table[] = { · 8 unmodified lines
139140 { USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },
140141 { USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 },
141142 { USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 },
143+ { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 },
142144
143145 /* Atheros AR5BBU12 with sflash firmware */
144146 { USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },
drivers/clk/clk.c+17−9
@@ -850,18 +850,21 @@ static void clk_change_rate(struct clk *clk) · 849 unmodified lines
850850 {
851851 struct clk *child;
852852 unsigned long old_rate;
853+ unsigned long best_parent_rate = 0;
853854 struct hlist_node *tmp;
854855
855856 old_rate = clk->rate;
856857
858+ if (clk->parent)
859+ best_parent_rate = clk->parent->rate;
860+
857861 if (clk->ops->set_rate)
858− clk->ops->set_rate(clk->hw, clk->new_rate, clk->parent->rate);
862+ clk->ops->set_rate(clk->hw, clk->new_rate, best_parent_rate);
859863
860864 if (clk->ops->recalc_rate)
861− clk->rate = clk->ops->recalc_rate(clk->hw,
862− clk->parent->rate);
865+ clk->rate = clk->ops->recalc_rate(clk->hw, best_parent_rate);
863866 else
864− clk->rate = clk->parent->rate;
867+ clk->rate = best_parent_rate;
865868
866869 if (clk->notifier_count && old_rate != clk->rate)
867870 __clk_notify(clk, POST_RATE_CHANGE, old_rate, clk->rate);
@@ -999,7 +1002,7 @@ static struct clk *__clk_init_parent(struct clk *clk) · 131 unmodified lines
9991002
10001003 if (!clk->parents)
10011004 clk->parents =
1002− kmalloc((sizeof(struct clk*) * clk->num_parents),
1005+ kzalloc((sizeof(struct clk*) * clk->num_parents),
10031006 GFP_KERNEL);
10041007
10051008 if (!clk->parents)
@@ -1065,9 +1068,13 @@ static int __clk_set_parent(struct clk *clk, struct clk *parent) · 59 unmodified lines
10651068 old_parent = clk->parent;
10661069
10671070 /* find index of new parent clock using cached parent ptrs */
1068− for (i = 0; i < clk->num_parents; i++)
1069− if (clk->parents[i] == parent)
1070− break;
1071+ if (clk->parents)
1072+ for (i = 0; i < clk->num_parents; i++)
1073+ if (clk->parents[i] == parent)
1074+ break;
1075+ else
1076+ clk->parents = kzalloc((sizeof(struct clk*) * clk->num_parents),
1077+ GFP_KERNEL);
10711078
10721079 /*
10731080 * find index of new parent clock using string name comparison
@@ -1076,7 +1083,8 @@ static int __clk_set_parent(struct clk *clk, struct clk *parent) · 2 unmodified lines
10761083 if (i == clk->num_parents)
10771084 for (i = 0; i < clk->num_parents; i++)
10781085 if (!strcmp(clk->parent_names[i], parent->name)) {
1079− clk->parents[i] = __clk_lookup(parent->name);
1086+ if (clk->parents)
1087+ clk->parents[i] = __clk_lookup(parent->name);
10801088 break;
10811089 }
10821090
drivers/clk/mxs/clk-imx23.c+6−6
@@ -71,7 +71,7 @@ static void __init clk_misc_init(void) · 70 unmodified lines
7171 __mxs_setl(30 << BP_FRAC_IOFRAC, FRAC);
7272 }
7373
74−static struct clk_lookup uart_lookups[] __initdata = {
74+static struct clk_lookup uart_lookups[] = {
7575 { .dev_id = "duart", },
7676 { .dev_id = "mxs-auart.0", },
7777 { .dev_id = "mxs-auart.1", },
@@ -80,31 +80,31 @@ static struct clk_lookup uart_lookups[] __initdata = { · 2 unmodified lines
8080 { .dev_id = "80070000.serial", },
8181 };
8282
83−static struct clk_lookup hbus_lookups[] __initdata = {
83+static struct clk_lookup hbus_lookups[] = {
8484 { .dev_id = "imx23-dma-apbh", },
8585 { .dev_id = "80004000.dma-apbh", },
8686 };
8787
88−static struct clk_lookup xbus_lookups[] __initdata = {
88+static struct clk_lookup xbus_lookups[] = {
8989 { .dev_id = "duart", .con_id = "apb_pclk"},
9090 { .dev_id = "80070000.serial", .con_id = "apb_pclk"},
9191 { .dev_id = "imx23-dma-apbx", },
9292 { .dev_id = "80024000.dma-apbx", },
9393 };
9494
95−static struct clk_lookup ssp_lookups[] __initdata = {
95+static struct clk_lookup ssp_lookups[] = {
9696 { .dev_id = "imx23-mmc.0", },
9797 { .dev_id = "imx23-mmc.1", },
9898 { .dev_id = "80010000.ssp", },
9999 { .dev_id = "80034000.ssp", },
100100 };
101101
102−static struct clk_lookup lcdif_lookups[] __initdata = {
102+static struct clk_lookup lcdif_lookups[] = {
103103 { .dev_id = "imx23-fb", },
104104 { .dev_id = "80030000.lcdif", },
105105 };
106106
107−static struct clk_lookup gpmi_lookups[] __initdata = {
107+static struct clk_lookup gpmi_lookups[] = {
108108 { .dev_id = "imx23-gpmi-nand", },
109109 { .dev_id = "8000c000.gpmi", },
110110 };
drivers/clk/mxs/clk-imx28.c+16−16
@@ -120,7 +120,7 @@ static void __init clk_misc_init(void) · 119 unmodified lines
120120 writel_relaxed(val, FRAC0);
121121 }
122122
123−static struct clk_lookup uart_lookups[] __initdata = {
123+static struct clk_lookup uart_lookups[] = {
124124 { .dev_id = "duart", },
125125 { .dev_id = "mxs-auart.0", },
126126 { .dev_id = "mxs-auart.1", },
@@ -135,71 +135,71 @@ static struct clk_lookup uart_lookups[] __initdata = { · 8 unmodified lines
135135 { .dev_id = "80074000.serial", },
136136 };
137137
138−static struct clk_lookup hbus_lookups[] __initdata = {
138+static struct clk_lookup hbus_lookups[] = {
139139 { .dev_id = "imx28-dma-apbh", },
140140 { .dev_id = "80004000.dma-apbh", },
141141 };
142142
143−static struct clk_lookup xbus_lookups[] __initdata = {
143+static struct clk_lookup xbus_lookups[] = {
144144 { .dev_id = "duart", .con_id = "apb_pclk"},
145145 { .dev_id = "80074000.serial", .con_id = "apb_pclk"},
146146 { .dev_id = "imx28-dma-apbx", },
147147 { .dev_id = "80024000.dma-apbx", },
148148 };
149149
150−static struct clk_lookup ssp0_lookups[] __initdata = {
150+static struct clk_lookup ssp0_lookups[] = {
151151 { .dev_id = "imx28-mmc.0", },
152152 { .dev_id = "80010000.ssp", },
153153 };
154154
155−static struct clk_lookup ssp1_lookups[] __initdata = {
155+static struct clk_lookup ssp1_lookups[] = {
156156 { .dev_id = "imx28-mmc.1", },
157157 { .dev_id = "80012000.ssp", },
158158 };
159159
160−static struct clk_lookup ssp2_lookups[] __initdata = {
160+static struct clk_lookup ssp2_lookups[] = {
161161 { .dev_id = "imx28-mmc.2", },
162162 { .dev_id = "80014000.ssp", },
163163 };
164164
165−static struct clk_lookup ssp3_lookups[] __initdata = {
165+static struct clk_lookup ssp3_lookups[] = {
166166 { .dev_id = "imx28-mmc.3", },
167167 { .dev_id = "80016000.ssp", },
168168 };
169169
170−static struct clk_lookup lcdif_lookups[] __initdata = {
170+static struct clk_lookup lcdif_lookups[] = {
171171 { .dev_id = "imx28-fb", },
172172 { .dev_id = "80030000.lcdif", },
173173 };
174174
175−static struct clk_lookup gpmi_lookups[] __initdata = {
175+static struct clk_lookup gpmi_lookups[] = {
176176 { .dev_id = "imx28-gpmi-nand", },
177177 { .dev_id = "8000c000.gpmi", },
178178 };
179179
180−static struct clk_lookup fec_lookups[] __initdata = {
180+static struct clk_lookup fec_lookups[] = {
181181 { .dev_id = "imx28-fec.0", },
182182 { .dev_id = "imx28-fec.1", },
183183 { .dev_id = "800f0000.ethernet", },
184184 { .dev_id = "800f4000.ethernet", },
185185 };
186186
187−static struct clk_lookup can0_lookups[] __initdata = {
187+static struct clk_lookup can0_lookups[] = {
188188 { .dev_id = "flexcan.0", },
189189 { .dev_id = "80032000.can", },
190190 };
191191
192−static struct clk_lookup can1_lookups[] __initdata = {
192+static struct clk_lookup can1_lookups[] = {
193193 { .dev_id = "flexcan.1", },
194194 { .dev_id = "80034000.can", },
195195 };
196196
197−static struct clk_lookup saif0_lookups[] __initdata = {
197+static struct clk_lookup saif0_lookups[] = {
198198 { .dev_id = "mxs-saif.0", },
199199 { .dev_id = "80042000.saif", },
200200 };
201201
202−static struct clk_lookup saif1_lookups[] __initdata = {
202+static struct clk_lookup saif1_lookups[] = {
203203 { .dev_id = "mxs-saif.1", },
204204 { .dev_id = "80046000.saif", },
205205 };
@@ -245,8 +245,8 @@ int __init mx28_clocks_init(void) · 39 unmodified lines
245245 clks[pll2] = mxs_clk_pll("pll2", "ref_xtal", PLL2CTRL0, 23, 50000000);
246246 clks[ref_cpu] = mxs_clk_ref("ref_cpu", "pll0", FRAC0, 0);
247247 clks[ref_emi] = mxs_clk_ref("ref_emi", "pll0", FRAC0, 1);
248− clks[ref_io0] = mxs_clk_ref("ref_io0", "pll0", FRAC0, 2);
249− clks[ref_io1] = mxs_clk_ref("ref_io1", "pll0", FRAC0, 3);
248+ clks[ref_io1] = mxs_clk_ref("ref_io1", "pll0", FRAC0, 2);
249+ clks[ref_io0] = mxs_clk_ref("ref_io0", "pll0", FRAC0, 3);
250250 clks[ref_pix] = mxs_clk_ref("ref_pix", "pll0", FRAC1, 0);
251251 clks[ref_hsadc] = mxs_clk_ref("ref_hsadc", "pll0", FRAC1, 1);
252252 clks[ref_gpmi] = mxs_clk_ref("ref_gpmi", "pll0", FRAC1, 2);
drivers/clk/spear/spear6xx_clock.c+1−1
@@ -298,7 +298,7 @@ void __init spear6xx_clk_init(void) · 297 unmodified lines
298298
299299 clk = clk_register_gate(NULL, "gmac_clk", "ahb_clk", 0, PERIP1_CLK_ENB,
300300 GMAC_CLK_ENB, 0, &_lock);
301− clk_register_clkdev(clk, NULL, "gmac");
301+ clk_register_clkdev(clk, NULL, "e0800000.ethernet");
302302
303303 clk = clk_register_gate(NULL, "i2c_clk", "ahb_clk", 0, PERIP1_CLK_ENB,
304304 I2C_CLK_ENB, 0, &_lock);
drivers/gpu/drm/i915/i915_irq.c+0−1
@@ -412,7 +412,6 @@ static void gen6_queue_rps_work(struct drm_i915_private *dev_priv, · 411 unmodified lines
412412 */
413413
414414 spin_lock_irqsave(&dev_priv->rps_lock, flags);
415− WARN(dev_priv->pm_iir & pm_iir, "Missed a PM interrupt\n");
416415 dev_priv->pm_iir |= pm_iir;
417416 I915_WRITE(GEN6_PMIMR, dev_priv->pm_iir);
418417 POSTING_READ(GEN6_PMIMR);
drivers/gpu/drm/i915/i915_suspend.c+4−1
@@ -740,8 +740,11 @@ static void i915_restore_display(struct drm_device *dev) · 739 unmodified lines
740740 if (HAS_PCH_SPLIT(dev)) {
741741 I915_WRITE(BLC_PWM_PCH_CTL1, dev_priv->saveBLC_PWM_CTL);
742742 I915_WRITE(BLC_PWM_PCH_CTL2, dev_priv->saveBLC_PWM_CTL2);
743− I915_WRITE(BLC_PWM_CPU_CTL, dev_priv->saveBLC_CPU_PWM_CTL);
743+ /* NOTE: BLC_PWM_CPU_CTL must be written after BLC_PWM_CPU_CTL2;
744+ * otherwise we get blank eDP screen after S3 on some machines
745+ */
744746 I915_WRITE(BLC_PWM_CPU_CTL2, dev_priv->saveBLC_CPU_PWM_CTL2);
747+ I915_WRITE(BLC_PWM_CPU_CTL, dev_priv->saveBLC_CPU_PWM_CTL);
745748 I915_WRITE(PCH_PP_ON_DELAYS, dev_priv->savePP_ON_DELAYS);
746749 I915_WRITE(PCH_PP_OFF_DELAYS, dev_priv->savePP_OFF_DELAYS);
747750 I915_WRITE(PCH_PP_DIVISOR, dev_priv->savePP_DIVISOR);
drivers/gpu/drm/i915/intel_display.c+0−16
@@ -6921,19 +6921,6 @@ static void i915_disable_vga(struct drm_device *dev) · 6920 unmodified lines
69216921 POSTING_READ(vga_reg);
69226922 }
69236923
6924−static void ivb_pch_pwm_override(struct drm_device *dev)
6925−{
6926− struct drm_i915_private *dev_priv = dev->dev_private;
6927−
6928− /*
6929− * IVB has CPU eDP backlight regs too, set things up to let the
6930− * PCH regs control the backlight
6931− */
6932− I915_WRITE(BLC_PWM_CPU_CTL2, PWM_ENABLE);
6933− I915_WRITE(BLC_PWM_CPU_CTL, 0);
6934− I915_WRITE(BLC_PWM_PCH_CTL1, PWM_ENABLE | (1<<30));
6935−}
6936−
69376924 void intel_modeset_init_hw(struct drm_device *dev)
69386925 {
69396926 struct drm_i915_private *dev_priv = dev->dev_private;
@@ -6950,9 +6937,6 @@ void intel_modeset_init_hw(struct drm_device *dev) · 10 unmodified lines
69506937 gen6_enable_rps(dev_priv);
69516938 gen6_update_ring_freq(dev_priv);
69526939 }
6953−
6954− if (IS_IVYBRIDGE(dev))
6955− ivb_pch_pwm_override(dev);
69566940 }
69576941
69586942 void intel_modeset_init(struct drm_device *dev)
drivers/gpu/drm/nouveau/nouveau_fbcon.c+1−1
@@ -467,7 +467,7 @@ int nouveau_fbcon_init(struct drm_device *dev) · 466 unmodified lines
467467 nfbdev->helper.funcs = &nouveau_fbcon_helper_funcs;
468468
469469 ret = drm_fb_helper_init(dev, &nfbdev->helper,
470− nv_two_heads(dev) ? 2 : 1, 4);
470+ dev->mode_config.num_crtc, 4);
471471 if (ret) {
472472 kfree(nfbdev);
473473 return ret;
drivers/gpu/drm/nouveau/nouveau_prime.c+23−0
@@ -1,3 +1,26 @@
1+/*
2+ * Copyright 2011 Red Hat Inc.
3+ *
4+ * Permission is hereby granted, free of charge, to any person obtaining a
5+ * copy of this software and associated documentation files (the "Software"),
6+ * to deal in the Software without restriction, including without limitation
7+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+ * and/or sell copies of the Software, and to permit persons to whom the
9+ * Software is furnished to do so, subject to the following conditions:
10+ *
11+ * The above copyright notice and this permission notice shall be included in
12+ * all copies or substantial portions of the Software.
13+ *
14+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20+ * OTHER DEALINGS IN THE SOFTWARE.
21+ *
22+ * Authors: Dave Airlie
23+ */
124
225 #include "drmP.h"
326 #include "drm.h"
drivers/gpu/drm/udl/udl_main.c+1−1
@@ -61,7 +61,7 @@ static int udl_parse_vendor_descriptor(struct drm_device *dev, · 60 unmodified lines
6161 u8 length;
6262 u16 key;
6363
64− key = *((u16 *) desc);
64+ key = le16_to_cpu(*((u16 *) desc));
6565 desc += sizeof(u16);
6666 length = *desc;
6767 desc++;
drivers/hid/Kconfig+20−23
@@ -1,20 +1,11 @@
11 #
22 # HID driver configuration
33 #
4−menuconfig HID_SUPPORT
5− bool "HID Devices"
6− depends on INPUT
7− default y
8− ---help---
9− Say Y here to get to see options for various computer-human interface
10− device drivers. This option alone does not add any kernel code.
11−
12− If you say N, all options in this submenu will be skipped and disabled.
13−
14−if HID_SUPPORT
4+menu "HID support"
5+ depends on INPUT
156
167 config HID
17− tristate "Generic HID support"
8+ tristate "HID bus support"
189 depends on INPUT
1910 default y
2011 ---help---
@@ -23,14 +14,17 @@ config HID · 2 unmodified lines
2314 most commonly used to refer to the USB-HID specification, but other
2415 devices (such as, but not strictly limited to, Bluetooth) are
2516 designed using HID specification (this involves certain keyboards,
26− mice, tablets, etc). This option compiles into kernel the generic
27− HID layer code (parser, usages, etc.), which can then be used by
28− transport-specific HID implementation (like USB or Bluetooth).
17+ mice, tablets, etc). This option adds the HID bus to the kernel,
18+ together with generic HID layer code. The HID devices are added and
19+ removed from the HID bus by the transport-layer drivers, such as
20+ usbhid (USB_HID) and hidp (BT_HIDP).
2921
3022 For docs and specs, see http://www.usb.org/developers/hidpage/
3123
3224 If unsure, say Y.
3325
26+if HID
27+
3428 config HID_BATTERY_STRENGTH
3529 bool "Battery level reporting for HID devices"
3630 depends on HID && POWER_SUPPLY && HID = POWER_SUPPLY
@@ -59,23 +53,22 @@ config HIDRAW · 22 unmodified lines
5953
6054 If unsure, say Y.
6155
62−source "drivers/hid/usbhid/Kconfig"
63−
64−menu "Special HID drivers"
65− depends on HID
66−
6756 config HID_GENERIC
6857 tristate "Generic HID driver"
6958 depends on HID
70− default y
59+ default HID
7160 ---help---
72− Support for generic HID devices.
61+ Support for generic devices on the HID bus. This includes most
62+ keyboards and mice, joysticks, tablets and digitizers.
7363
7464 To compile this driver as a module, choose M here: the module
7565 will be called hid-generic.
7666
7767 If unsure, say Y.
7868
69+menu "Special HID drivers"
70+ depends on HID
71+
7972 config HID_A4TECH
8073 tristate "A4 tech mice" if EXPERT
8174 depends on USB_HID
@@ -662,4 +655,8 @@ config HID_ZYDACRON · 580 unmodified lines
662655
663656 endmenu
664657
665−endif # HID_SUPPORT
658+endif # HID
659+
660+source "drivers/hid/usbhid/Kconfig"
661+
662+endmenu
drivers/hid/hid-core.c+1−0
@@ -1880,6 +1880,7 @@ static const struct hid_device_id hid_ignore_list[] = { · 1879 unmodified lines
18801880 { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_LCM)},
18811881 { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_LCM2)},
18821882 { HID_USB_DEVICE(USB_VENDOR_ID_AVERMEDIA, USB_DEVICE_ID_AVER_FM_MR800) },
1883+ { HID_USB_DEVICE(USB_VENDOR_ID_AXENTIA, USB_DEVICE_ID_AXENTIA_FM_RADIO) },
18831884 { HID_USB_DEVICE(USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD) },
18841885 { HID_USB_DEVICE(USB_VENDOR_ID_CIDC, 0x0103) },
18851886 { HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, USB_DEVICE_ID_CYGNAL_RADIO_SI470X) },
drivers/hid/hid-ids.h+3−0
@@ -160,6 +160,9 @@ · 159 unmodified lines
160160 #define USB_VENDOR_ID_AVERMEDIA 0x07ca
161161 #define USB_DEVICE_ID_AVER_FM_MR800 0xb800
162162
163+#define USB_VENDOR_ID_AXENTIA 0x12cf
164+#define USB_DEVICE_ID_AXENTIA_FM_RADIO 0x7111
165+
163166 #define USB_VENDOR_ID_BAANTO 0x2453
164167 #define USB_DEVICE_ID_BAANTO_MT_190W2 0x0100
165168
drivers/hid/hid-logitech-dj.c+24−14
@@ -436,27 +436,37 @@ static int logi_dj_recv_send_report(struct dj_receiver_dev *djrcv_dev, · 435 unmodified lines
436436
437437 static int logi_dj_recv_query_paired_devices(struct dj_receiver_dev *djrcv_dev)
438438 {
439− struct dj_report dj_report;
439+ struct dj_report *dj_report;
440+ int retval;
440441
441− memset(&dj_report, 0, sizeof(dj_report));
442− dj_report.report_id = REPORT_ID_DJ_SHORT;
443− dj_report.device_index = 0xFF;
444− dj_report.report_type = REPORT_TYPE_CMD_GET_PAIRED_DEVICES;
445− return logi_dj_recv_send_report(djrcv_dev, &dj_report);
442+ dj_report = kzalloc(sizeof(dj_report), GFP_KERNEL);
443+ if (!dj_report)
444+ return -ENOMEM;
445+ dj_report->report_id = REPORT_ID_DJ_SHORT;
446+ dj_report->device_index = 0xFF;
447+ dj_report->report_type = REPORT_TYPE_CMD_GET_PAIRED_DEVICES;
448+ retval = logi_dj_recv_send_report(djrcv_dev, dj_report);
449+ kfree(dj_report);
450+ return retval;
446451 }
447452
448453 static int logi_dj_recv_switch_to_dj_mode(struct dj_receiver_dev *djrcv_dev,
449454 unsigned timeout)
450455 {
451− struct dj_report dj_report;
456+ struct dj_report *dj_report;
457+ int retval;
452458
453− memset(&dj_report, 0, sizeof(dj_report));
454− dj_report.report_id = REPORT_ID_DJ_SHORT;
455− dj_report.device_index = 0xFF;
456− dj_report.report_type = REPORT_TYPE_CMD_SWITCH;
457− dj_report.report_params[CMD_SWITCH_PARAM_DEVBITFIELD] = 0x3F;
458− dj_report.report_params[CMD_SWITCH_PARAM_TIMEOUT_SECONDS] = (u8)timeout;
459− return logi_dj_recv_send_report(djrcv_dev, &dj_report);
459+ dj_report = kzalloc(sizeof(dj_report), GFP_KERNEL);
460+ if (!dj_report)
461+ return -ENOMEM;
462+ dj_report->report_id = REPORT_ID_DJ_SHORT;
463+ dj_report->device_index = 0xFF;
464+ dj_report->report_type = REPORT_TYPE_CMD_SWITCH;
465+ dj_report->report_params[CMD_SWITCH_PARAM_DEVBITFIELD] = 0x3F;
466+ dj_report->report_params[CMD_SWITCH_PARAM_TIMEOUT_SECONDS] = (u8)timeout;
467+ retval = logi_dj_recv_send_report(djrcv_dev, dj_report);
468+ kfree(dj_report);
469+ return retval;
460470 }
461471
462472
drivers/hid/hid-magicmouse.c+4−2
@@ -426,8 +426,10 @@ static void magicmouse_setup_input(struct input_dev *input, struct hid_device *h · 425 unmodified lines
426426 __set_bit(EV_ABS, input->evbit);
427427
428428 input_set_abs_params(input, ABS_MT_TRACKING_ID, 0, 15, 0, 0);
429− input_set_abs_params(input, ABS_MT_TOUCH_MAJOR, 0, 255, 4, 0);
430− input_set_abs_params(input, ABS_MT_TOUCH_MINOR, 0, 255, 4, 0);
429+ input_set_abs_params(input, ABS_MT_TOUCH_MAJOR, 0, 255 << 2,
430+ 4, 0);
431+ input_set_abs_params(input, ABS_MT_TOUCH_MINOR, 0, 255 << 2,
432+ 4, 0);
431433 input_set_abs_params(input, ABS_MT_ORIENTATION, -31, 32, 1, 0);
432434
433435 /* Note: Touch Y position from the device is inverted relative
drivers/hid/usbhid/Kconfig+4−4
@@ -1,13 +1,13 @@
1−comment "USB Input Devices"
1+menu "USB HID support"
22 depends on USB
33
44 config USB_HID
5− tristate "USB Human Interface Device (full HID) support"
5+ tristate "USB HID transport layer"
66 default y
77 depends on USB && INPUT
88 select HID
99 ---help---
10− Say Y here if you want full HID support to connect USB keyboards,
10+ Say Y here if you want to connect USB keyboards,
1111 mice, joysticks, graphic tablets, or any other HID based devices
1212 to your computer via USB, as well as Uninterruptible Power Supply
1313 (UPS) and monitor control devices.
@@ -81,4 +81,4 @@ config USB_MOUSE · 67 unmodified lines
8181
8282 endmenu
8383
84−
84+endmenu
drivers/hwmon/applesmc.c+1−1
@@ -8,7 +8,7 @@ · 7 unmodified lines
88 *
99 * Based on hdaps.c driver:
1010 * Copyright (C) 2005 Robert Love <rml@novell.com>
11− * Copyright (C) 2005 Jesper Juhl <jesper.juhl@gmail.com>
11+ * Copyright (C) 2005 Jesper Juhl <jj@chaosbits.net>
1212 *
1313 * Fan control based on smcFanControl:
1414 * Copyright (C) 2006 Hendrik Holtmann <holtmann@mac.com>
drivers/hwmon/coretemp.c+2−2
@@ -693,7 +693,7 @@ static void __cpuinit get_core_online(unsigned int cpu) · 692 unmodified lines
693693 * sensors. We check this bit only, all the early CPUs
694694 * without thermal sensors will be filtered out.
695695 */
696− if (!cpu_has(c, X86_FEATURE_DTS))
696+ if (!cpu_has(c, X86_FEATURE_DTHERM))
697697 return;
698698
699699 if (!pdev) {
@@ -794,7 +794,7 @@ static struct notifier_block coretemp_cpu_notifier __refdata = { · 94 unmodified lines
794794 };
795795
796796 static const struct x86_cpu_id coretemp_ids[] = {
797− { X86_VENDOR_INTEL, X86_FAMILY_ANY, X86_MODEL_ANY, X86_FEATURE_DTS },
797+ { X86_VENDOR_INTEL, X86_FAMILY_ANY, X86_MODEL_ANY, X86_FEATURE_DTHERM },
798798 {}
799799 };
800800 MODULE_DEVICE_TABLE(x86cpu, coretemp_ids);
drivers/hwmon/jc42.c+1−1
@@ -590,6 +590,6 @@ abort: · 589 unmodified lines
590590
591591 module_i2c_driver(jc42_driver);
592592
593−MODULE_AUTHOR("Guenter Roeck <guenter.roeck@ericsson.com>");
593+MODULE_AUTHOR("Guenter Roeck <linux@roeck-us.net>");
594594 MODULE_DESCRIPTION("JC42 driver");
595595 MODULE_LICENSE("GPL");
drivers/hwmon/lineage-pem.c+1−1
@@ -567,6 +567,6 @@ static struct i2c_driver pem_driver = { · 566 unmodified lines
567567
568568 module_i2c_driver(pem_driver);
569569
570−MODULE_AUTHOR("Guenter Roeck <guenter.roeck@ericsson.com>");
570+MODULE_AUTHOR("Guenter Roeck <linux@roeck-us.net>");
571571 MODULE_DESCRIPTION("Lineage CPL PEM hardware monitoring driver");
572572 MODULE_LICENSE("GPL");
drivers/hwmon/ltc4261.c+1−1
@@ -292,6 +292,6 @@ static struct i2c_driver ltc4261_driver = { · 291 unmodified lines
292292
293293 module_i2c_driver(ltc4261_driver);
294294
295−MODULE_AUTHOR("Guenter Roeck <guenter.roeck@ericsson.com>");
295+MODULE_AUTHOR("Guenter Roeck <linux@roeck-us.net>");
296296 MODULE_DESCRIPTION("LTC4261 driver");
297297 MODULE_LICENSE("GPL");
drivers/hwmon/max16065.c+1−1
@@ -692,6 +692,6 @@ static struct i2c_driver max16065_driver = { · 691 unmodified lines
692692
693693 module_i2c_driver(max16065_driver);
694694
695−MODULE_AUTHOR("Guenter Roeck <guenter.roeck@ericsson.com>");
695+MODULE_AUTHOR("Guenter Roeck <linux@roeck-us.net>");
696696 MODULE_DESCRIPTION("MAX16065 driver");
697697 MODULE_LICENSE("GPL");
drivers/media/common/saa7146_fops.c+0−5
@@ -198,7 +198,6 @@ static int fops_open(struct file *file) · 197 unmodified lines
198198 struct saa7146_dev *dev = video_drvdata(file);
199199 struct saa7146_fh *fh = NULL;
200200 int result = 0;
201− enum v4l2_buf_type type;
202201
203202 DEB_EE("file:%p, dev:%s\n", file, video_device_node_name(vdev));
204203
@@ -207,10 +206,6 @@ static int fops_open(struct file *file) · 2 unmodified lines
207206
208207 DEB_D("using: %p\n", dev);
209208
210− type = vdev->vfl_type == VFL_TYPE_GRABBER
211− ? V4L2_BUF_TYPE_VIDEO_CAPTURE
212− : V4L2_BUF_TYPE_VBI_CAPTURE;
213−
214209 /* check if an extension is registered */
215210 if( NULL == dev->ext ) {
216211 DEB_S("no extension registered for this device\n");
drivers/media/dvb/frontends/cx24110.c+2−2
@@ -516,9 +516,9 @@ static int cx24110_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) · 515 unmodified lines
516516 if(cx24110_readreg(state,0x10)&0x40) {
517517 /* the RS error counter has finished one counting window */
518518 cx24110_writereg(state,0x10,0x60); /* select the byer reg */
519− cx24110_readreg(state, 0x12) |
519+ (void)(cx24110_readreg(state, 0x12) |
520520 (cx24110_readreg(state, 0x13) << 8) |
521− (cx24110_readreg(state, 0x14) << 16);
521+ (cx24110_readreg(state, 0x14) << 16));
522522 cx24110_writereg(state,0x10,0x70); /* select the bler reg */
523523 state->lastbler=cx24110_readreg(state,0x12)|
524524 (cx24110_readreg(state,0x13)<<8)|
drivers/media/dvb/frontends/cxd2820r_c.c+1−1
@@ -121,7 +121,7 @@ int cxd2820r_get_frontend_c(struct dvb_frontend *fe) · 120 unmodified lines
121121 if (ret)
122122 goto error;
123123
124− switch ((buf[0] >> 0) & 0x03) {
124+ switch ((buf[0] >> 0) & 0x07) {
125125 case 0:
126126 c->modulation = QAM_16;
127127 break;
drivers/media/dvb/frontends/lg2160.c+1−1
@@ -126,7 +126,7 @@ static int lg216x_write_regs(struct lg216x_state *state, · 125 unmodified lines
126126
127127 lg_reg("writing %d registers...\n", len);
128128
129− for (i = 0; i < len - 1; i++) {
129+ for (i = 0; i < len; i++) {
130130 ret = lg216x_write_reg(state, regs[i].reg, regs[i].val);
131131 if (lg_fail(ret))
132132 return ret;
drivers/media/dvb/siano/smsusb.c+2−0
@@ -544,6 +544,8 @@ static const struct usb_device_id smsusb_id_table[] __devinitconst = { · 543 unmodified lines
544544 .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
545545 { USB_DEVICE(0x2040, 0xc0a0),
546546 .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
547+ { USB_DEVICE(0x2040, 0xf5a0),
548+ .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
547549 { } /* Terminating entry */
548550 };
549551
drivers/media/radio/radio-maxiradio.c+1−1
@@ -157,7 +157,7 @@ static int __devinit maxiradio_probe(struct pci_dev *pdev, const struct pci_devi · 156 unmodified lines
157157 goto err_out_free_region;
158158
159159 dev->io = pci_resource_start(pdev, 0);
160− if (snd_tea575x_init(&dev->tea)) {
160+ if (snd_tea575x_init(&dev->tea, THIS_MODULE)) {
161161 printk(KERN_ERR "radio-maxiradio: Unable to detect TEA575x tuner\n");
162162 goto err_out_free_region;
163163 }
drivers/media/radio/radio-sf16fmr2.c+1−1
@@ -238,7 +238,7 @@ static int __devinit fmr2_probe(struct fmr2 *fmr2, struct device *pdev, int io) · 237 unmodified lines
238238 snprintf(fmr2->tea.bus_info, sizeof(fmr2->tea.bus_info), "%s:%s",
239239 fmr2->is_fmd2 ? "PnP" : "ISA", dev_name(pdev));
240240
241− if (snd_tea575x_init(&fmr2->tea)) {
241+ if (snd_tea575x_init(&fmr2->tea, THIS_MODULE)) {
242242 printk(KERN_ERR "radio-sf16fmr2: Unable to detect TEA575x tuner\n");
243243 release_region(fmr2->io, 2);
244244 return -ENODEV;
drivers/media/radio/si470x/radio-si470x-usb.c+2−0
@@ -51,6 +51,8 @@ static struct usb_device_id si470x_usb_driver_id_table[] = { · 50 unmodified lines
5151 { USB_DEVICE_AND_INTERFACE_INFO(0x1b80, 0xd700, USB_CLASS_HID, 0, 0) },
5252 /* Sanei Electric, Inc. FM USB Radio (sold as DealExtreme.com PCear) */
5353 { USB_DEVICE_AND_INTERFACE_INFO(0x10c5, 0x819a, USB_CLASS_HID, 0, 0) },
54+ /* Axentia ALERT FM USB Receiver */
55+ { USB_DEVICE_AND_INTERFACE_INFO(0x12cf, 0x7111, USB_CLASS_HID, 0, 0) },
5456 /* Terminating entry */
5557 { }
5658 };
drivers/media/video/bt8xx/bttv-cards.c+6−78
@@ -371,7 +371,6 @@ struct tvcard bttv_tvcards[] = { · 370 unmodified lines
371371 .muxsel = MUXSEL(2, 3, 1, 1),
372372 .gpiomux = { 2, 0, 0, 0 },
373373 .gpiomute = 10,
374− .needs_tvaudio = 1,
375374 .tuner_type = UNSET,
376375 .tuner_addr = ADDR_UNSET,
377376 },
@@ -384,7 +383,6 @@ struct tvcard bttv_tvcards[] = { · 6 unmodified lines
384383 .muxsel = MUXSEL(2, 3, 1, 1),
385384 .gpiomux = { 0, 1, 2, 3 },
386385 .gpiomute = 4,
387− .needs_tvaudio = 1,
388386 .tuner_type = UNSET,
389387 .tuner_addr = ADDR_UNSET,
390388 },
@@ -398,7 +396,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines
398396 .gpiomux = { 4, 0, 2, 3 },
399397 .gpiomute = 1,
400398 .no_msp34xx = 1,
401− .needs_tvaudio = 1,
402399 .tuner_type = TUNER_PHILIPS_NTSC,
403400 .tuner_addr = ADDR_UNSET,
404401 .pll = PLL_28,
@@ -414,7 +411,6 @@ struct tvcard bttv_tvcards[] = { · 9 unmodified lines
414411 .gpiomask = 0,
415412 .muxsel = MUXSEL(2, 3, 1, 1),
416413 .gpiomux = { 0 },
417− .needs_tvaudio = 0,
418414 .tuner_type = TUNER_ABSENT,
419415 .tuner_addr = ADDR_UNSET,
420416 },
@@ -427,7 +423,6 @@ struct tvcard bttv_tvcards[] = { · 6 unmodified lines
427423 .muxsel = MUXSEL(2, 3, 1, 0),
428424 .gpiomux = { 0, 1, 0, 1 },
429425 .gpiomute = 3,
430− .needs_tvaudio = 1,
431426 .tuner_type = UNSET,
432427 .tuner_addr = ADDR_UNSET,
433428 },
@@ -440,7 +435,6 @@ struct tvcard bttv_tvcards[] = { · 6 unmodified lines
440435 .gpiomask = 0x0f,
441436 .gpiomux = { 0x0c, 0x04, 0x08, 0x04 },
442437 /* 0x04 for some cards ?? */
443− .needs_tvaudio = 1,
444438 .tuner_type = UNSET,
445439 .tuner_addr = ADDR_UNSET,
446440 .audio_mode_gpio= avermedia_tvphone_audio,
@@ -454,7 +448,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines
454448 .gpiomask = 0,
455449 .muxsel = MUXSEL(2, 3, 1, 0, 0),
456450 .gpiomux = { 0 },
457− .needs_tvaudio = 1,
458451 .tuner_type = TUNER_ABSENT,
459452 .tuner_addr = ADDR_UNSET,
460453 },
@@ -469,7 +462,6 @@ struct tvcard bttv_tvcards[] = { · 8 unmodified lines
469462 .muxsel = MUXSEL(2, 3, 1, 1),
470463 .gpiomux = { 0, 0xc00, 0x800, 0x400 },
471464 .gpiomute = 0xc00,
472− .needs_tvaudio = 1,
473465 .pll = PLL_28,
474466 .tuner_type = UNSET,
475467 .tuner_addr = ADDR_UNSET,
@@ -482,7 +474,6 @@ struct tvcard bttv_tvcards[] = { · 6 unmodified lines
482474 .gpiomask = 3,
483475 .muxsel = MUXSEL(2, 3, 1, 1),
484476 .gpiomux = { 1, 1, 2, 3 },
485− .needs_tvaudio = 0,
486477 .pll = PLL_28,
487478 .tuner_type = TUNER_TEMIC_PAL,
488479 .tuner_addr = ADDR_UNSET,
@@ -496,7 +487,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines
496487 .muxsel = MUXSEL(2, 0, 1, 1),
497488 .gpiomux = { 0, 1, 2, 3 },
498489 .gpiomute = 4,
499− .needs_tvaudio = 1,
500490 .pll = PLL_28,
501491 .tuner_type = UNSET,
502492 .tuner_addr = ADDR_UNSET,
@@ -510,7 +500,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines
510500 .muxsel = MUXSEL(2, 3, 1, 1),
511501 .gpiomux = { 0x20001,0x10001, 0, 0 },
512502 .gpiomute = 10,
513− .needs_tvaudio = 1,
514503 .tuner_type = UNSET,
515504 .tuner_addr = ADDR_UNSET,
516505 },
@@ -524,7 +513,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines
524513 .gpiomask = 15,
525514 .muxsel = MUXSEL(2, 3, 1, 1),
526515 .gpiomux = { 13, 14, 11, 7 },
527− .needs_tvaudio = 1,
528516 .tuner_type = UNSET,
529517 .tuner_addr = ADDR_UNSET,
530518 },
@@ -536,7 +524,6 @@ struct tvcard bttv_tvcards[] = { · 5 unmodified lines
536524 .gpiomask = 15,
537525 .muxsel = MUXSEL(2, 3, 1, 1),
538526 .gpiomux = { 13, 14, 11, 7 },
539− .needs_tvaudio = 1,
540527 .msp34xx_alt = 1,
541528 .pll = PLL_28,
542529 .tuner_type = TUNER_PHILIPS_PAL,
@@ -553,7 +540,6 @@ struct tvcard bttv_tvcards[] = { · 10 unmodified lines
553540 .muxsel = MUXSEL(2, 3, 1, 1),
554541 .gpiomux = { 0, 2, 1, 3 }, /* old: {0, 1, 2, 3, 4} */
555542 .gpiomute = 4,
556− .needs_tvaudio = 1,
557543 .pll = PLL_28,
558544 .tuner_type = UNSET,
559545 .tuner_addr = ADDR_UNSET,
@@ -567,7 +553,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines
567553 .muxsel = MUXSEL(2, 3, 1, 1),
568554 .gpiomux = { 0, 0, 1, 0 },
569555 .gpiomute = 10,
570− .needs_tvaudio = 1,
571556 .tuner_type = UNSET,
572557 .tuner_addr = ADDR_UNSET,
573558 },
@@ -583,7 +568,6 @@ struct tvcard bttv_tvcards[] = { · 9 unmodified lines
583568 /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */
584569 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
585570 .gpiomute = 0x002000,
586− .needs_tvaudio = 1,
587571 .pll = PLL_28,
588572 .tuner_type = UNSET,
589573 .tuner_addr = ADDR_UNSET,
@@ -597,7 +581,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines
597581 .muxsel = MUXSEL(2, 3, 1, 1, 0),
598582 .gpiomux = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007 },
599583 .gpiomute = 0xcfa007,
600− .needs_tvaudio = 1,
601584 .tuner_type = UNSET,
602585 .tuner_addr = ADDR_UNSET,
603586 .volume_gpio = winview_volume,
@@ -611,7 +594,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines
611594 .gpiomask = 0,
612595 .muxsel = MUXSEL(2, 3, 1, 1),
613596 .gpiomux = { 1, 0, 0, 0 },
614− .needs_tvaudio = 1,
615597 .tuner_type = UNSET,
616598 .tuner_addr = ADDR_UNSET,
617599 },
@@ -660,7 +642,6 @@ struct tvcard bttv_tvcards[] = { · 42 unmodified lines
660642 .muxsel = MUXSEL(2, 3, 1, 1),
661643 .gpiomux = { 0, 1, 0x800, 0x400 },
662644 .gpiomute = 0xc00,
663− .needs_tvaudio = 1,
664645 .pll = PLL_28,
665646 .tuner_type = UNSET,
666647 .tuner_addr = ADDR_UNSET,
@@ -691,7 +672,6 @@ struct tvcard bttv_tvcards[] = { · 24 unmodified lines
691672 .muxsel = MUXSEL(2, 3, 1, 1),
692673 .gpiomux = {0x400, 0x400, 0x400, 0x400 },
693674 .gpiomute = 0xc00,
694− .needs_tvaudio = 1,
695675 .pll = PLL_28,
696676 .tuner_type = UNSET,
697677 .tuner_addr = ADDR_UNSET,
@@ -706,7 +686,6 @@ struct tvcard bttv_tvcards[] = { · 8 unmodified lines
706686 .muxsel = MUXSEL(2, 3, 1, 1),
707687 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
708688 .gpiomute = 0x40000,
709− .needs_tvaudio = 0,
710689 .tuner_type = TUNER_PHILIPS_PAL,
711690 .tuner_addr = ADDR_UNSET,
712691 .audio_mode_gpio= terratv_audio,
@@ -720,7 +699,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines
720699 .muxsel = MUXSEL(2, 0, 1, 1),
721700 .gpiomux = { 0, 1, 2, 3 },
722701 .gpiomute = 4,
723− .needs_tvaudio = 1,
724702 .tuner_type = UNSET,
725703 .tuner_addr = ADDR_UNSET,
726704 },
@@ -748,7 +726,6 @@ struct tvcard bttv_tvcards[] = { · 21 unmodified lines
748726 .muxsel = MUXSEL(2, 3, 1, 1),
749727 .gpiomux = { 0x20000, 0x30000, 0x10000, 0x00000 },
750728 .gpiomute = 0x40000,
751− .needs_tvaudio = 0,
752729 .tuner_type = TUNER_PHILIPS_PAL,
753730 .tuner_addr = ADDR_UNSET,
754731 .audio_mode_gpio= terratv_audio,
@@ -793,7 +770,6 @@ struct tvcard bttv_tvcards[] = { · 38 unmodified lines
793770 .gpiomask = 0,
794771 .muxsel = MUXSEL(2, 3, 1, 0, 0),
795772 .gpiomux = { 0 },
796− .needs_tvaudio = 1,
797773 .tuner_type = TUNER_ABSENT,
798774 .tuner_addr = ADDR_UNSET,
799775 .muxsel_hook = PXC200_muxsel,
@@ -834,7 +810,6 @@ struct tvcard bttv_tvcards[] = { · 34 unmodified lines
834810 .gpiomask = 0,
835811 .muxsel = MUXSEL(2, 3, 1, 1),
836812 .gpiomux = { 0 },
837− .needs_tvaudio = 0,
838813 .tuner_type = TUNER_ABSENT,
839814 .tuner_addr = ADDR_UNSET,
840815 },
@@ -847,7 +822,6 @@ struct tvcard bttv_tvcards[] = { · 6 unmodified lines
847822 .muxsel = MUXSEL(2, 3, 1, 1),
848823 .gpiomux = { 0x500, 0, 0x300, 0x900 },
849824 .gpiomute = 0x900,
850− .needs_tvaudio = 1,
851825 .pll = PLL_28,
852826 .tuner_type = TUNER_PHILIPS_PAL,
853827 .tuner_addr = ADDR_UNSET,
@@ -874,7 +848,6 @@ struct tvcard bttv_tvcards[] = { · 20 unmodified lines
874848 Note: There exists another variant "Winfast 2000" with tv stereo !?
875849 Note: eeprom only contains FF and pci subsystem id 107d:6606
876850 */
877− .needs_tvaudio = 0,
878851 .pll = PLL_28,
879852 .has_radio = 1,
880853 .tuner_type = TUNER_PHILIPS_PAL, /* default for now, gpio reads BFFF06 for Pal bg+dk */
@@ -934,7 +907,6 @@ struct tvcard bttv_tvcards[] = { · 53 unmodified lines
934907 .muxsel = MUXSEL(2, 3, 1, 0),
935908 .gpiomux = { 0x551400, 0x551200, 0, 0 },
936909 .gpiomute = 0x551c00,
937− .needs_tvaudio = 1,
938910 .pll = PLL_28,
939911 .tuner_type = TUNER_PHILIPS_PAL_I,
940912 .tuner_addr = ADDR_UNSET,
@@ -949,7 +921,6 @@ struct tvcard bttv_tvcards[] = { · 8 unmodified lines
949921 .muxsel = MUXSEL(2, 3, 1, 1),
950922 .gpiomux = { 2, 0xd0001, 0, 0 },
951923 .gpiomute = 1,
952− .needs_tvaudio = 0,
953924 .pll = PLL_28,
954925 .tuner_type = UNSET,
955926 .tuner_addr = ADDR_UNSET,
@@ -966,7 +937,6 @@ struct tvcard bttv_tvcards[] = { · 10 unmodified lines
966937 .gpiomux = { 4, 0, 2, 3 },
967938 .gpiomute = 1,
968939 .no_msp34xx = 1,
969− .needs_tvaudio = 1,
970940 .tuner_type = TUNER_PHILIPS_NTSC,
971941 .tuner_addr = ADDR_UNSET,
972942 .pll = PLL_28,
@@ -980,7 +950,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines
980950 .gpiomask = 15,
981951 .muxsel = MUXSEL(2, 3, 1, 1),
982952 .gpiomux = { 13, 4, 11, 7 },
983− .needs_tvaudio = 1,
984953 .pll = PLL_28,
985954 .tuner_type = UNSET,
986955 .tuner_addr = ADDR_UNSET,
@@ -995,7 +964,6 @@ struct tvcard bttv_tvcards[] = { · 8 unmodified lines
995964 .gpiomask = 0,
996965 .muxsel = MUXSEL(2, 3, 1, 1),
997966 .gpiomux = { 0, 0, 0, 0},
998− .needs_tvaudio = 1,
999967 .no_msp34xx = 1,
1000968 .pll = PLL_28,
1001969 .tuner_type = TUNER_PHILIPS_PAL_I,
@@ -1066,7 +1034,6 @@ struct tvcard bttv_tvcards[] = { · 64 unmodified lines
10661034 .muxsel = MUXSEL(2, 3, 1, 1),
10671035 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
10681036 .gpiomute = 0x40000,
1069− .needs_tvaudio = 1,
10701037 .no_msp34xx = 1,
10711038 .pll = PLL_35,
10721039 .tuner_type = TUNER_PHILIPS_PAL_I,
@@ -1084,7 +1051,6 @@ struct tvcard bttv_tvcards[] = { · 11 unmodified lines
10841051 .muxsel = MUXSEL(2, 3, 1, 1),
10851052 .gpiomux = {2,0,0,0 },
10861053 .gpiomute = 1,
1087− .needs_tvaudio = 1,
10881054 .pll = PLL_28,
10891055 .tuner_type = UNSET,
10901056 .tuner_addr = ADDR_UNSET,
@@ -1163,7 +1129,6 @@ struct tvcard bttv_tvcards[] = { · 72 unmodified lines
11631129 MUX2 (mask 0x30000):
11641130 0,2,3= from MSP34xx
11651131 1= FM stereo Radio from Tuner */
1166− .needs_tvaudio = 0,
11671132 .pll = PLL_28,
11681133 .tuner_type = UNSET,
11691134 .tuner_addr = ADDR_UNSET,
@@ -1179,7 +1144,6 @@ struct tvcard bttv_tvcards[] = { · 9 unmodified lines
11791144 .muxsel = MUXSEL(2, 3, 1, 1),
11801145 .gpiomux = { 0, 0, 0x10, 8 },
11811146 .gpiomute = 4,
1182− .needs_tvaudio = 1,
11831147 .pll = PLL_28,
11841148 .tuner_type = TUNER_PHILIPS_PAL,
11851149 .tuner_addr = ADDR_UNSET,
@@ -1218,7 +1182,6 @@ struct tvcard bttv_tvcards[] = { · 32 unmodified lines
12181182 .muxsel = MUXSEL(2, 3, 1, 0),
12191183 .gpiomux = { 2, 0, 0, 0 },
12201184 .gpiomute = 10,
1221− .needs_tvaudio = 0,
12221185 .pll = PLL_28,
12231186 .tuner_type = TUNER_TEMIC_PAL,
12241187 .tuner_addr = ADDR_UNSET,
@@ -1250,7 +1213,6 @@ struct tvcard bttv_tvcards[] = { · 25 unmodified lines
12501213 .gpiomask = 0,
12511214 .muxsel = MUXSEL(3, 1),
12521215 .gpiomux = { 0 },
1253− .needs_tvaudio = 0,
12541216 .no_msp34xx = 1,
12551217 .pll = PLL_35,
12561218 .tuner_type = TUNER_ABSENT,
@@ -1266,7 +1228,6 @@ struct tvcard bttv_tvcards[] = { · 9 unmodified lines
12661228 .muxsel = MUXSEL(2, 3, 1, 1),
12671229 .gpiomux = { 0x400, 0x400, 0x400, 0x400 },
12681230 .gpiomute = 0x800,
1269− .needs_tvaudio = 1,
12701231 .pll = PLL_28,
12711232 .tuner_type = TUNER_TEMIC_4036FY5_NTSC,
12721233 .tuner_addr = ADDR_UNSET,
@@ -1312,7 +1273,6 @@ struct tvcard bttv_tvcards[] = { · 39 unmodified lines
13121273 .muxsel = MUXSEL(2, 2),
13131274 .gpiomux = { },
13141275 .no_msp34xx = 1,
1315− .needs_tvaudio = 0,
13161276 .pll = PLL_28,
13171277 .tuner_type = TUNER_ABSENT,
13181278 .tuner_addr = ADDR_UNSET,
@@ -1329,7 +1289,6 @@ struct tvcard bttv_tvcards[] = { · 10 unmodified lines
13291289 .muxsel = MUXSEL(2, 3, 1, 0),
13301290 .gpiomux = { 1, 0, 4, 4 },
13311291 .gpiomute = 9,
1332− .needs_tvaudio = 0,
13331292 .pll = PLL_28,
13341293 .tuner_type = TUNER_PHILIPS_PAL,
13351294 .tuner_addr = ADDR_UNSET,
@@ -1379,7 +1338,6 @@ struct tvcard bttv_tvcards[] = { · 43 unmodified lines
13791338 .gpiomute = 0x1800,
13801339 .audio_mode_gpio= fv2000s_audio,
13811340 .no_msp34xx = 1,
1382− .needs_tvaudio = 1,
13831341 .pll = PLL_28,
13841342 .tuner_type = TUNER_PHILIPS_PAL,
13851343 .tuner_addr = ADDR_UNSET,
@@ -1393,7 +1351,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines
13931351 .muxsel = MUXSEL(2, 3, 1, 1),
13941352 .gpiomux = { 0x500, 0x500, 0x300, 0x900 },
13951353 .gpiomute = 0x900,
1396− .needs_tvaudio = 1,
13971354 .pll = PLL_28,
13981355 .tuner_type = TUNER_PHILIPS_PAL,
13991356 .tuner_addr = ADDR_UNSET,
@@ -1477,7 +1434,6 @@ struct tvcard bttv_tvcards[] = { · 77 unmodified lines
14771434 .muxsel = MUXSEL(2, 3, 1, 1),
14781435 .gpiomux = { 0, 0, 11, 7 }, /* TV and Radio with same GPIO ! */
14791436 .gpiomute = 13,
1480− .needs_tvaudio = 1,
14811437 .pll = PLL_28,
14821438 .tuner_type = TUNER_LG_PAL_I_FM,
14831439 .tuner_addr = ADDR_UNSET,
@@ -1514,7 +1470,6 @@ struct tvcard bttv_tvcards[] = { · 30 unmodified lines
15141470 .muxsel = MUXSEL(2, 3, 1, 1),
15151471 .gpiomux = { 0x01, 0x00, 0x03, 0x03 },
15161472 .gpiomute = 0x09,
1517− .needs_tvaudio = 1,
15181473 .no_msp34xx = 1,
15191474 .pll = PLL_28,
15201475 .tuner_type = TUNER_PHILIPS_PAL,
@@ -1540,7 +1495,6 @@ struct tvcard bttv_tvcards[] = { · 19 unmodified lines
15401495 .gpiomask = 0,
15411496 .muxsel = MUXSEL(2, 3, 1, 0, 0),
15421497 .gpiomux = { 0 },
1543− .needs_tvaudio = 0,
15441498 .tuner_type = TUNER_ABSENT,
15451499 .tuner_addr = ADDR_UNSET,
15461500 },
@@ -1567,7 +1521,6 @@ struct tvcard bttv_tvcards[] = { · 20 unmodified lines
15671521 .muxsel = MUXSEL(2, 1, 1),
15681522 .gpiomux = { 0, 1, 2, 2 },
15691523 .gpiomute = 4,
1570− .needs_tvaudio = 0,
15711524 .tuner_type = TUNER_PHILIPS_PAL,
15721525 .tuner_addr = ADDR_UNSET,
15731526 .pll = PLL_28,
@@ -1597,7 +1550,6 @@ struct tvcard bttv_tvcards[] = { · 23 unmodified lines
15971550 .gpiomask = 0,
15981551 .muxsel = MUXSEL(2, 3, 1, 0),
15991552 .gpiomux = { 0 },
1600− .needs_tvaudio = 0,
16011553 .no_msp34xx = 1,
16021554 .pll = PLL_28,
16031555 .tuner_type = TUNER_ABSENT,
@@ -1619,7 +1571,6 @@ struct tvcard bttv_tvcards[] = { · 15 unmodified lines
16191571 * btwincap uses 0x80000/0x80003
16201572 */
16211573 .gpiomute = 4,
1622− .needs_tvaudio = 0,
16231574 .no_msp34xx = 1,
16241575 .pll = PLL_28,
16251576 .tuner_type = TUNER_PHILIPS_PAL,
@@ -1655,7 +1606,6 @@ struct tvcard bttv_tvcards[] = { · 29 unmodified lines
16551606 /* .audio_inputs= 1, */
16561607 .svhs = 2,
16571608 .muxsel = MUXSEL(2, 0, 1, 1),
1658− .needs_tvaudio = 1,
16591609 .pll = PLL_28,
16601610 .tuner_type = UNSET,
16611611 .tuner_addr = ADDR_UNSET,
@@ -1875,7 +1825,6 @@ struct tvcard bttv_tvcards[] = { · 213 unmodified lines
18751825 .muxsel = MUXSEL(2, 3, 1, 1),
18761826 .gpiomux = { 0, 1, 2, 3},
18771827 .gpiomute = 4,
1878− .needs_tvaudio = 1,
18791828 .tuner_type = TUNER_PHILIPS_PAL,
18801829 .tuner_addr = ADDR_UNSET,
18811830 .pll = PLL_28,
@@ -1902,7 +1851,6 @@ struct tvcard bttv_tvcards[] = { · 20 unmodified lines
19021851 .gpiomask = 0,
19031852 .muxsel = MUXSEL(2, 3),
19041853 .gpiomux = { 0 },
1905− .needs_tvaudio = 0,
19061854 .no_msp34xx = 1,
19071855 .pll = PLL_28,
19081856 .tuner_type = TUNER_ABSENT,
@@ -1920,7 +1868,6 @@ struct tvcard bttv_tvcards[] = { · 11 unmodified lines
19201868 /* Tuner, Radio, external, internal, off, on */
19211869 .gpiomux = { 0x08, 0x0f, 0x0a, 0x08 },
19221870 .gpiomute = 0x0f,
1923− .needs_tvaudio = 0,
19241871 .no_msp34xx = 1,
19251872 .pll = PLL_28,
19261873 .tuner_type = TUNER_PHILIPS_NTSC,
@@ -1936,7 +1883,6 @@ struct tvcard bttv_tvcards[] = { · 9 unmodified lines
19361883 .svhs = 2,
19371884 .gpiomask = 0x00,
19381885 .muxsel = MUXSEL(2, 3, 1, 1),
1939− .needs_tvaudio = 1,
19401886 .no_msp34xx = 1,
19411887 .pll = PLL_28,
19421888 .tuner_type = TUNER_PHILIPS_PAL,
@@ -2034,7 +1980,6 @@ struct tvcard bttv_tvcards[] = { · 91 unmodified lines
20341980 .gpiomask = 0,
20351981 .muxsel = MUXSEL(2, 3, 1, 0),
20361982 .gpiomux = { 0 },
2037− .needs_tvaudio = 0,
20381983 .no_msp34xx = 1,
20391984 .pll = PLL_28,
20401985 .tuner_type = TUNER_ABSENT,
@@ -2049,7 +1994,6 @@ struct tvcard bttv_tvcards[] = { · 8 unmodified lines
20491994 .gpiomask = 0x00,
20501995 .muxsel = MUXSEL(2, 3, 1, 0),
20511996 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2052− .needs_tvaudio = 0,
20531997 .pll = PLL_28,
20541998 .tuner_type = TUNER_ABSENT,
20551999 .tuner_addr = ADDR_UNSET,
@@ -2062,7 +2006,6 @@ struct tvcard bttv_tvcards[] = { · 6 unmodified lines
20622006 .gpiomask = 0x00,
20632007 .muxsel = MUXSEL(2, 3, 1, 1),
20642008 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2065− .needs_tvaudio = 0,
20662009 .pll = PLL_28,
20672010 .tuner_type = TUNER_ABSENT,
20682011 .tuner_addr = ADDR_UNSET,
@@ -2079,7 +2022,6 @@ struct tvcard bttv_tvcards[] = { · 10 unmodified lines
20792022 .muxsel = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 0),
20802023 .muxsel_hook = phytec_muxsel,
20812024 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2082− .needs_tvaudio = 1,
20832025 .pll = PLL_28,
20842026 .tuner_type = TUNER_ABSENT,
20852027 .tuner_addr = ADDR_UNSET,
@@ -2094,7 +2036,6 @@ struct tvcard bttv_tvcards[] = { · 8 unmodified lines
20942036 .muxsel = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 1),
20952037 .muxsel_hook = phytec_muxsel,
20962038 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2097− .needs_tvaudio = 1,
20982039 .pll = PLL_28,
20992040 .tuner_type = TUNER_ABSENT,
21002041 .tuner_addr = ADDR_UNSET,
@@ -2118,7 +2059,6 @@ struct tvcard bttv_tvcards[] = { · 17 unmodified lines
21182059 .tuner_type = TUNER_ABSENT,
21192060 .tuner_addr = ADDR_UNSET,
21202061 .svhs = NO_SVHS, /* card has no svhs */
2121− .needs_tvaudio = 0,
21222062 .no_msp34xx = 1,
21232063 .no_tda7432 = 1,
21242064 .gpiomask = 0x00,
@@ -2168,7 +2108,6 @@ struct tvcard bttv_tvcards[] = { · 43 unmodified lines
21682108 .gpiomask = 3,
21692109 .muxsel = MUXSEL(2, 3, 1, 1),
21702110 .gpiomux = { 1, 1, 1, 1 },
2171− .needs_tvaudio = 1,
21722111 .tuner_type = TUNER_PHILIPS_PAL,
21732112 .tuner_addr = ADDR_UNSET,
21742113 .pll = PLL_35,
@@ -2210,7 +2149,6 @@ struct tvcard bttv_tvcards[] = { · 35 unmodified lines
22102149 .muxsel = MUXSEL(2, 3, 1, 0),
22112150 .no_msp34xx = 1,
22122151 .no_tda7432 = 1,
2213− .needs_tvaudio = 0,
22142152 .tuner_type = TUNER_ABSENT,
22152153 .tuner_addr = ADDR_UNSET,
22162154 },
@@ -2222,7 +2160,6 @@ struct tvcard bttv_tvcards[] = { · 5 unmodified lines
22222160 .tuner_type = TUNER_PHILIPS_PAL,
22232161 .tuner_addr = ADDR_UNSET,
22242162 .svhs = 2,
2225− .needs_tvaudio = 0,
22262163 .gpiomask = 0x68,
22272164 .muxsel = MUXSEL(2, 3, 1),
22282165 .gpiomux = { 0x68, 0x68, 0x61, 0x61 },
@@ -2241,7 +2178,6 @@ struct tvcard bttv_tvcards[] = { · 12 unmodified lines
22412178 .muxsel = MUXSEL(2, 3, 1, 1),
22422179 .gpiomux = { 0, 1, 2, 2 },
22432180 .gpiomute = 3,
2244− .needs_tvaudio = 0,
22452181 .pll = PLL_28,
22462182 .tuner_type = TUNER_PHILIPS_PAL,
22472183 .tuner_addr = ADDR_UNSET,
@@ -2265,7 +2201,6 @@ struct tvcard bttv_tvcards[] = { · 17 unmodified lines
22652201 .muxsel = MUXSEL(2, 2, 2, 2),
22662202 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
22672203 .pll = PLL_28,
2268− .needs_tvaudio = 0,
22692204 .muxsel_hook = picolo_tetra_muxsel,/*Required as it doesn't follow the classic input selection policy*/
22702205 .tuner_type = TUNER_ABSENT,
22712206 .tuner_addr = ADDR_UNSET,
@@ -2358,7 +2293,6 @@ struct tvcard bttv_tvcards[] = { · 86 unmodified lines
23582293 .muxsel = MUXSEL(2, 3, 1, 1),
23592294 .gpiomux = { 2, 0, 0, 0 },
23602295 .gpiomute = 10,
2361− .needs_tvaudio = 0,
23622296 .pll = PLL_28,
23632297 .tuner_type = TUNER_PHILIPS_PAL,
23642298 .tuner_addr = ADDR_UNSET,
@@ -2405,7 +2339,6 @@ struct tvcard bttv_tvcards[] = { · 40 unmodified lines
24052339 .tuner_addr = ADDR_UNSET,
24062340 .gpiomask = 0x008007,
24072341 .gpiomux = { 0, 0x000001,0,0 },
2408− .needs_tvaudio = 1,
24092342 .has_radio = 1,
24102343 },
24112344 [BTTV_BOARD_TIBET_CS16] = {
@@ -2518,7 +2451,6 @@ struct tvcard bttv_tvcards[] = { · 106 unmodified lines
25182451 .muxsel = MUXSEL(2, 3, 1, 1),
25192452 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
25202453 .gpiomute = 0x002000,
2521− .needs_tvaudio = 1,
25222454 .pll = PLL_28,
25232455 .tuner_type = TUNER_YMEC_TVF66T5_B_DFF,
25242456 .tuner_addr = 0xc1 >>1,
@@ -2534,7 +2466,6 @@ struct tvcard bttv_tvcards[] = { · 9 unmodified lines
25342466 .muxsel = MUXSEL(2, 3, 1, 1),
25352467 .gpiomux = { 0, 1, 2, 2 },
25362468 .gpiomute = 3,
2537− .needs_tvaudio = 0,
25382469 .pll = PLL_28,
25392470 .tuner_type = TUNER_TENA_9533_DI,
25402471 .tuner_addr = ADDR_UNSET,
@@ -2615,7 +2546,6 @@ struct tvcard bttv_tvcards[] = { · 74 unmodified lines
26152546 .muxsel = MUXSEL(2, 3, 1, 1),
26162547 .gpiomux = { 2, 0, 0, 0 },
26172548 .gpiomute = 1,
2618− .needs_tvaudio = 1,
26192549 .pll = PLL_28,
26202550 .tuner_type = TUNER_PHILIPS_NTSC,
26212551 .tuner_addr = ADDR_UNSET,
@@ -2714,7 +2644,6 @@ struct tvcard bttv_tvcards[] = { · 92 unmodified lines
27142644 .muxsel = MUXSEL(2, 3, 1, 1),
27152645 .gpiomux = { 0x20001,0x10001, 0, 0 },
27162646 .gpiomute = 10,
2717− .needs_tvaudio = 1,
27182647 .pll = PLL_28,
27192648 .tuner_type = TUNER_PHILIPS_PAL_I,
27202649 .tuner_addr = ADDR_UNSET,
@@ -2746,7 +2675,6 @@ struct tvcard bttv_tvcards[] = { · 25 unmodified lines
27462675 .muxsel = MUXSEL(2, 3, 1, 1),
27472676 .gpiomux = { 0, 1, 2, 2 }, /* CONTVFMi */
27482677 .gpiomute = 3, /* CONTVFMi */
2749− .needs_tvaudio = 0,
27502678 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, /* TCL MK3 */
27512679 .tuner_addr = ADDR_UNSET,
27522680 .pll = PLL_28,
@@ -2785,7 +2713,6 @@ struct tvcard bttv_tvcards[] = { · 32 unmodified lines
27852713 .gpiomask = 0x00,
27862714 .muxsel = MUXSEL(0, 2, 3, 1),
27872715 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2788− .needs_tvaudio = 0,
27892716 .pll = PLL_28,
27902717 .tuner_type = TUNER_ABSENT,
27912718 .tuner_addr = ADDR_UNSET,
@@ -2799,7 +2726,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines
27992726 .gpiomask = 0x00,
28002727 .muxsel = MUXSEL(2, 3, 1),
28012728 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2802− .needs_tvaudio = 0,
28032729 .pll = PLL_28,
28042730 .tuner_type = TUNER_ABSENT,
28052731 .tuner_addr = ADDR_UNSET,
@@ -2813,7 +2739,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines
28132739 .gpiomask = 0x00,
28142740 .muxsel = MUXSEL(3, 2, 1),
28152741 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2816− .needs_tvaudio = 0,
28172742 .pll = PLL_28,
28182743 .tuner_type = TUNER_ABSENT,
28192744 .tuner_addr = ADDR_UNSET,
@@ -2877,7 +2802,6 @@ struct tvcard bttv_tvcards[] = { · 57 unmodified lines
28772802 .gpiomask = 0,
28782803 .muxsel = MUXSEL(2, 3),
28792804 .gpiomux = { 0 },
2880− .needs_tvaudio = 0,
28812805 .no_msp34xx = 1,
28822806 .pll = PLL_28,
28832807 .tuner_type = TUNER_ABSENT,
@@ -3649,7 +3573,7 @@ void __devinit bttv_init_tuner(struct bttv *btv) · 765 unmodified lines
36493573 struct tuner_setup tun_setup;
36503574
36513575 /* Load tuner module before issuing tuner config call! */
3652− if (bttv_tvcards[btv->c.type].has_radio)
3576+ if (btv->has_radio)
36533577 v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
36543578 &btv->c.i2c_adap, "tuner",
36553579 0, v4l2_i2c_tuner_addrs(ADDRS_RADIO));
@@ -3664,7 +3588,7 @@ void __devinit bttv_init_tuner(struct bttv *btv) · 8 unmodified lines
36643588 tun_setup.type = btv->tuner_type;
36653589 tun_setup.addr = addr;
36663590
3667− if (bttv_tvcards[btv->c.type].has_radio)
3591+ if (btv->has_radio)
36683592 tun_setup.mode_mask |= T_RADIO;
36693593
36703594 bttv_call_all(btv, tuner, s_type_addr, &tun_setup);
@@ -3724,6 +3648,10 @@ static void __devinit hauppauge_eeprom(struct bttv *btv) · 53 unmodified lines
37243648 bttv_tvcards[BTTV_BOARD_HAUPPAUGE_IMPACTVCB].name);
37253649 btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB;
37263650 }
3651+
3652+ /* The 61334 needs the msp3410 to do the radio demod to get sound */
3653+ if (tv.model == 61334)
3654+ btv->radio_uses_msp_demodulator = 1;
37273655 }
37283656
37293657 static int terratec_active_radio_upgrade(struct bttv *btv)
drivers/media/video/bt8xx/bttv-driver.c+5−0
@@ -1218,6 +1218,11 @@ audio_mux(struct bttv *btv, int input, int mute) · 1217 unmodified lines
12181218 For now this is sufficient. */
12191219 switch (input) {
12201220 case TVAUDIO_INPUT_RADIO:
1221+ /* Some boards need the msp do to the radio demod */
1222+ if (btv->radio_uses_msp_demodulator) {
1223+ in = MSP_INPUT_DEFAULT;
1224+ break;
1225+ }
12211226 in = MSP_INPUT(MSP_IN_SCART2, MSP_IN_TUNER1,
12221227 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART);
12231228 break;
drivers/media/video/bt8xx/bttv.h+0−1
@@ -236,7 +236,6 @@ struct tvcard { · 235 unmodified lines
236236 /* i2c audio flags */
237237 unsigned int no_msp34xx:1;
238238 unsigned int no_tda7432:1;
239− unsigned int needs_tvaudio:1;
240239 unsigned int msp34xx_alt:1;
241240 /* Note: currently no card definition needs to mark the presence
242241 of a RDS saa6588 chip. If this is ever needed, then add a new
drivers/media/video/bt8xx/bttvp.h+1−0
@@ -440,6 +440,7 @@ struct bttv { · 439 unmodified lines
440440 /* radio data/state */
441441 int has_radio;
442442 int radio_user;
443+ int radio_uses_msp_demodulator;
443444
444445 /* miro/pinnacle + Aimslab VHX
445446 philips matchbox (tea5757 radio tuner) support */
drivers/media/video/bw-qcam.c+37−10
@@ -607,8 +607,9 @@ static long qc_capture(struct qcam *q, char __user *buf, unsigned long len) · 606 unmodified lines
607607 }
608608 o = i * pixels_per_line + pixels_read + k;
609609 if (o < len) {
610+ u8 ch = invert - buffer[k];
610611 got++;
611− put_user((invert - buffer[k]) << shift, buf + o);
612+ put_user(ch << shift, buf + o);
612613 }
613614 }
614615 pixels_read += bytes;
@@ -648,8 +649,8 @@ static int qcam_querycap(struct file *file, void *priv, · 33 unmodified lines
648649 struct qcam *qcam = video_drvdata(file);
649650
650651 strlcpy(vcap->driver, qcam->v4l2_dev.name, sizeof(vcap->driver));
651− strlcpy(vcap->card, "B&W Quickcam", sizeof(vcap->card));
652− strlcpy(vcap->bus_info, "parport", sizeof(vcap->bus_info));
652+ strlcpy(vcap->card, "Connectix B&W Quickcam", sizeof(vcap->card));
653+ strlcpy(vcap->bus_info, qcam->pport->name, sizeof(vcap->bus_info));
653654 vcap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE;
654655 vcap->capabilities = vcap->device_caps | V4L2_CAP_DEVICE_CAPS;
655656 return 0;
@@ -688,8 +689,8 @@ static int qcam_g_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *f · 32 unmodified lines
688689 pix->height = qcam->height / qcam->transfer_scale;
689690 pix->pixelformat = (qcam->bpp == 4) ? V4L2_PIX_FMT_Y4 : V4L2_PIX_FMT_Y6;
690691 pix->field = V4L2_FIELD_NONE;
691− pix->bytesperline = qcam->width;
692− pix->sizeimage = qcam->width * qcam->height;
692+ pix->bytesperline = pix->width;
693+ pix->sizeimage = pix->width * pix->height;
693694 /* Just a guess */
694695 pix->colorspace = V4L2_COLORSPACE_SRGB;
695696 return 0;
@@ -757,7 +758,7 @@ static int qcam_enum_fmt_vid_cap(struct file *file, void *fh, struct v4l2_fmtdes · 61 unmodified lines
757758 "4-Bit Monochrome", V4L2_PIX_FMT_Y4,
758759 { 0, 0, 0, 0 }
759760 },
760− { 0, 0, 0,
761+ { 1, 0, 0,
761762 "6-Bit Monochrome", V4L2_PIX_FMT_Y6,
762763 { 0, 0, 0, 0 }
763764 },
@@ -772,6 +773,25 @@ static int qcam_enum_fmt_vid_cap(struct file *file, void *fh, struct v4l2_fmtdes · 8 unmodified lines
772773 return 0;
773774 }
774775
776+static int qcam_enum_framesizes(struct file *file, void *fh,
777+ struct v4l2_frmsizeenum *fsize)
778+{
779+ static const struct v4l2_frmsize_discrete sizes[] = {
780+ { 80, 60 },
781+ { 160, 120 },
782+ { 320, 240 },
783+ };
784+
785+ if (fsize->index > 2)
786+ return -EINVAL;
787+ if (fsize->pixel_format != V4L2_PIX_FMT_Y4 &&
788+ fsize->pixel_format != V4L2_PIX_FMT_Y6)
789+ return -EINVAL;
790+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
791+ fsize->discrete = sizes[fsize->index];
792+ return 0;
793+}
794+
775795 static ssize_t qcam_read(struct file *file, char __user *buf,
776796 size_t count, loff_t *ppos)
777797 {
@@ -795,6 +815,11 @@ static ssize_t qcam_read(struct file *file, char __user *buf, · 17 unmodified lines
795815 return len;
796816 }
797817
818+static unsigned int qcam_poll(struct file *filp, poll_table *wait)
819+{
820+ return v4l2_ctrl_poll(filp, wait) | POLLIN | POLLRDNORM;
821+}
822+
798823 static int qcam_s_ctrl(struct v4l2_ctrl *ctrl)
799824 {
800825 struct qcam *qcam =
@@ -828,7 +853,7 @@ static const struct v4l2_file_operations qcam_fops = { · 27 unmodified lines
828853 .owner = THIS_MODULE,
829854 .open = v4l2_fh_open,
830855 .release = v4l2_fh_release,
831− .poll = v4l2_ctrl_poll,
856+ .poll = qcam_poll,
832857 .unlocked_ioctl = video_ioctl2,
833858 .read = qcam_read,
834859 };
@@ -839,6 +864,7 @@ static const struct v4l2_ioctl_ops qcam_ioctl_ops = { · 4 unmodified lines
839864 .vidioc_s_input = qcam_s_input,
840865 .vidioc_enum_input = qcam_enum_input,
841866 .vidioc_enum_fmt_vid_cap = qcam_enum_fmt_vid_cap,
867+ .vidioc_enum_framesizes = qcam_enum_framesizes,
842868 .vidioc_g_fmt_vid_cap = qcam_g_fmt_vid_cap,
843869 .vidioc_s_fmt_vid_cap = qcam_s_fmt_vid_cap,
844870 .vidioc_try_fmt_vid_cap = qcam_try_fmt_vid_cap,
@@ -864,9 +890,9 @@ static struct qcam *qcam_init(struct parport *port) · 19 unmodified lines
864890 return NULL;
865891
866892 v4l2_dev = &qcam->v4l2_dev;
867− strlcpy(v4l2_dev->name, "bw-qcam", sizeof(v4l2_dev->name));
893+ snprintf(v4l2_dev->name, sizeof(v4l2_dev->name), "bw-qcam%d", num_cams);
868894
869− if (v4l2_device_register(NULL, v4l2_dev) < 0) {
895+ if (v4l2_device_register(port->dev, v4l2_dev) < 0) {
870896 v4l2_err(v4l2_dev, "Could not register v4l2_device\n");
871897 kfree(qcam);
872898 return NULL;
@@ -886,7 +912,7 @@ static struct qcam *qcam_init(struct parport *port) · 13 unmodified lines
886912 return NULL;
887913 }
888914 qcam->pport = port;
889− qcam->pdev = parport_register_device(port, "bw-qcam", NULL, NULL,
915+ qcam->pdev = parport_register_device(port, v4l2_dev->name, NULL, NULL,
890916 NULL, 0, NULL);
891917 if (qcam->pdev == NULL) {
892918 v4l2_err(v4l2_dev, "couldn't register for %s.\n", port->name);
@@ -975,6 +1001,7 @@ static int init_bwqcam(struct parport *port) · 82 unmodified lines
9751001 return -ENODEV;
9761002 }
9771003 qc_calibrate(qcam);
1004+ v4l2_ctrl_handler_setup(&qcam->hdl);
9781005
9791006 parport_release(qcam->pdev);
9801007
drivers/media/video/cx18/cx18-driver.c+5−5
@@ -838,10 +838,10 @@ static int cx18_setup_pci(struct cx18 *cx, struct pci_dev *pci_dev, · 837 unmodified lines
838838 }
839839
840840 CX18_DEBUG_INFO("cx%d (rev %d) at %02x:%02x.%x, "
841− "irq: %d, latency: %d, memory: 0x%lx\n",
841+ "irq: %d, latency: %d, memory: 0x%llx\n",
842842 cx->pci_dev->device, cx->card_rev, pci_dev->bus->number,
843843 PCI_SLOT(pci_dev->devfn), PCI_FUNC(pci_dev->devfn),
844− cx->pci_dev->irq, pci_latency, (unsigned long)cx->base_addr);
844+ cx->pci_dev->irq, pci_latency, (u64)cx->base_addr);
845845
846846 return 0;
847847 }
@@ -938,7 +938,7 @@ static int __devinit cx18_probe(struct pci_dev *pci_dev, · 90 unmodified lines
938938 if (retval)
939939 goto err;
940940
941− CX18_DEBUG_INFO("base addr: 0x%08x\n", cx->base_addr);
941+ CX18_DEBUG_INFO("base addr: 0x%llx\n", (u64)cx->base_addr);
942942
943943 /* PCI Device Setup */
944944 retval = cx18_setup_pci(cx, pci_dev, pci_id);
@@ -946,8 +946,8 @@ static int __devinit cx18_probe(struct pci_dev *pci_dev, · 1 unmodified line
946946 goto free_workqueues;
947947
948948 /* map io memory */
949− CX18_DEBUG_INFO("attempting ioremap at 0x%08x len 0x%08x\n",
950− cx->base_addr + CX18_MEM_OFFSET, CX18_MEM_SIZE);
949+ CX18_DEBUG_INFO("attempting ioremap at 0x%llx len 0x%08x\n",
950+ (u64)cx->base_addr + CX18_MEM_OFFSET, CX18_MEM_SIZE);
951951 cx->enc_mem = ioremap_nocache(cx->base_addr + CX18_MEM_OFFSET,
952952 CX18_MEM_SIZE);
953953 if (!cx->enc_mem) {
drivers/media/video/cx18/cx18-driver.h+1−1
@@ -622,7 +622,7 @@ struct cx18 { · 621 unmodified lines
622622 unique ID. Starts at 1, so 0 can be used as
623623 uninitialized value in the stream->id. */
624624
625− u32 base_addr;
625+ resource_size_t base_addr;
626626
627627 u8 card_rev;
628628 void __iomem *enc_mem, *reg_mem;
drivers/media/video/cx18/cx18-firmware.c+7−2
@@ -164,8 +164,13 @@ static int load_apu_fw_direct(const char *fn, u8 __iomem *dst, struct cx18 *cx, · 163 unmodified lines
164164
165165 apu_version = (vers[0] << 24) | (vers[4] << 16) | vers[32];
166166 while (offset + sizeof(seghdr) < fw->size) {
167− /* TODO: byteswapping */
168− memcpy(&seghdr, src + offset / 4, sizeof(seghdr));
167+ const u32 *shptr = src + offset / 4;
168+
169+ seghdr.sync1 = le32_to_cpu(shptr[0]);
170+ seghdr.sync2 = le32_to_cpu(shptr[1]);
171+ seghdr.addr = le32_to_cpu(shptr[2]);
172+ seghdr.size = le32_to_cpu(shptr[3]);
173+
169174 offset += sizeof(seghdr);
170175 if (seghdr.sync1 != APU_ROM_SYNC1 ||
171176 seghdr.sync2 != APU_ROM_SYNC2) {
drivers/media/video/cx18/cx18-mailbox.c+10−5
@@ -434,6 +434,7 @@ static int epu_dma_done_irq(struct cx18 *cx, struct cx18_in_work_order *order) · 433 unmodified lines
434434 {
435435 u32 handle, mdl_ack_offset, mdl_ack_count;
436436 struct cx18_mailbox *mb;
437+ int i;
437438
438439 mb = &order->mb;
439440 handle = mb->args[0];
@@ -447,8 +448,9 @@ static int epu_dma_done_irq(struct cx18 *cx, struct cx18_in_work_order *order) · 7 unmodified lines
447448 return -1;
448449 }
449450
450− cx18_memcpy_fromio(cx, order->mdl_ack, cx->enc_mem + mdl_ack_offset,
451− sizeof(struct cx18_mdl_ack) * mdl_ack_count);
451+ for (i = 0; i < sizeof(struct cx18_mdl_ack) * mdl_ack_count; i += sizeof(u32))
452+ ((u32 *)order->mdl_ack)[i / sizeof(u32)] =
453+ cx18_readl(cx, cx->enc_mem + mdl_ack_offset + i);
452454
453455 if ((order->flags & CX18_F_EWO_MB_STALE) == 0)
454456 mb_ack_irq(cx, order);
@@ -538,6 +540,7 @@ void cx18_api_epu_cmd_irq(struct cx18 *cx, int rpu) · 83 unmodified lines
538540 struct cx18_mailbox *order_mb;
539541 struct cx18_in_work_order *order;
540542 int submit;
543+ int i;
541544
542545 switch (rpu) {
543546 case CPU:
@@ -562,10 +565,12 @@ void cx18_api_epu_cmd_irq(struct cx18 *cx, int rpu) · 18 unmodified lines
562565 order_mb = &order->mb;
563566
564567 /* mb->cmd and mb->args[0] through mb->args[2] */
565− cx18_memcpy_fromio(cx, &order_mb->cmd, &mb->cmd, 4 * sizeof(u32));
568+ for (i = 0; i < 4; i++)
569+ (&order_mb->cmd)[i] = cx18_readl(cx, &mb->cmd + i);
570+
566571 /* mb->request and mb->ack. N.B. we want to read mb->ack last */
567− cx18_memcpy_fromio(cx, &order_mb->request, &mb->request,
568− 2 * sizeof(u32));
572+ for (i = 0; i < 2; i++)
573+ (&order_mb->request)[i] = cx18_readl(cx, &mb->request + i);
569574
570575 if (order_mb->request == order_mb->ack) {
571576 CX18_DEBUG_WARN("Possibly falling behind: %s self-ack'ed our "
drivers/media/video/cx88/cx88-blackbird.c+1−1
@@ -471,7 +471,7 @@ static int blackbird_load_firmware(struct cx8802_dev *dev) · 470 unmodified lines
471471 dprintk(1,"Loading firmware ...\n");
472472 dataptr = (u32*)firmware->data;
473473 for (i = 0; i < (firmware->size >> 2); i++) {
474− value = *dataptr;
474+ value = le32_to_cpu(*dataptr);
475475 checksum += ~value;
476476 memory_write(dev->core, i, value);
477477 dataptr++;
drivers/media/video/em28xx/em28xx-cards.c+1−0
@@ -974,6 +974,7 @@ struct em28xx_board em28xx_boards[] = { · 973 unmodified lines
974974 [EM2884_BOARD_CINERGY_HTC_STICK] = {
975975 .name = "Terratec Cinergy HTC Stick",
976976 .has_dvb = 1,
977+ .ir_codes = RC_MAP_NEC_TERRATEC_CINERGY_XS,
977978 #if 0
978979 .tuner_type = TUNER_PHILIPS_TDA8290,
979980 .tuner_addr = 0x41,
drivers/media/video/em28xx/em28xx-input.c+2−0
@@ -527,6 +527,8 @@ static int em28xx_ir_init(struct em28xx *dev) · 526 unmodified lines
527527
528528 if (dev->board.ir_codes == NULL) {
529529 /* No remote control support */
530+ em28xx_warn("Remote control support is not available for "
531+ "this card.\n");
530532 return 0;
531533 }
532534
drivers/media/video/gspca/gspca.c+3−1
@@ -1653,7 +1653,7 @@ static int vidioc_streamoff(struct file *file, void *priv, · 1652 unmodified lines
16531653 enum v4l2_buf_type buf_type)
16541654 {
16551655 struct gspca_dev *gspca_dev = video_drvdata(file);
1656− int ret;
1656+ int i, ret;
16571657
16581658 if (buf_type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
16591659 return -EINVAL;
@@ -1678,6 +1678,8 @@ static int vidioc_streamoff(struct file *file, void *priv, · 18 unmodified lines
16781678 wake_up_interruptible(&gspca_dev->wq);
16791679
16801680 /* empty the transfer queues */
1681+ for (i = 0; i < gspca_dev->nframes; i++)
1682+ gspca_dev->frame[i].v4l2_buf.flags &= ~BUF_ALL_FLAGS;
16811683 atomic_set(&gspca_dev->fr_q, 0);
16821684 atomic_set(&gspca_dev->fr_i, 0);
16831685 gspca_dev->fr_o = 0;
drivers/media/video/gspca/ov534.c+3−29
@@ -96,7 +96,7 @@ static void setbrightness(struct gspca_dev *gspca_dev); · 95 unmodified lines
9696 static void setcontrast(struct gspca_dev *gspca_dev);
9797 static void setgain(struct gspca_dev *gspca_dev);
9898 static void setexposure(struct gspca_dev *gspca_dev);
99−static int sd_setagc(struct gspca_dev *gspca_dev, __s32 val);
99+static void setagc(struct gspca_dev *gspca_dev);
100100 static void setawb(struct gspca_dev *gspca_dev);
101101 static void setaec(struct gspca_dev *gspca_dev);
102102 static void setsharpness(struct gspca_dev *gspca_dev);
@@ -189,7 +189,7 @@ static const struct ctrl sd_ctrls[] = { · 86 unmodified lines
189189 .step = 1,
190190 .default_value = 1,
191191 },
192− .set = sd_setagc
192+ .set_control = setagc
193193 },
194194 [AWB] = {
195195 {
@@ -851,6 +851,7 @@ static int sccb_check_status(struct gspca_dev *gspca_dev) · 655 unmodified lines
851851 int i;
852852
853853 for (i = 0; i < 5; i++) {
854+ msleep(10);
854855 data = ov534_reg_read(gspca_dev, OV534_REG_STATUS);
855856
856857 switch (data) {
@@ -1242,10 +1243,6 @@ static int sd_config(struct gspca_dev *gspca_dev, · 385 unmodified lines
12421243
12431244 cam->ctrls = sd->ctrls;
12441245
1245− /* the auto white balance control works only when auto gain is set */
1246− if (sd_ctrls[AGC].qctrl.default_value == 0)
1247− gspca_dev->ctrl_inac |= (1 << AWB);
1248−
12491246 cam->cam_mode = ov772x_mode;
12501247 cam->nmodes = ARRAY_SIZE(ov772x_mode);
12511248
@@ -1486,29 +1483,6 @@ scan_next: · 234 unmodified lines
14861483 } while (remaining_len > 0);
14871484 }
14881485
1489−static int sd_setagc(struct gspca_dev *gspca_dev, __s32 val)
1490−{
1491− struct sd *sd = (struct sd *) gspca_dev;
1492−
1493− sd->ctrls[AGC].val = val;
1494−
1495− /* the auto white balance control works only
1496− * when auto gain is set */
1497− if (val) {
1498− gspca_dev->ctrl_inac &= ~(1 << AWB);
1499− } else {
1500− gspca_dev->ctrl_inac |= (1 << AWB);
1501− if (sd->ctrls[AWB].val) {
1502− sd->ctrls[AWB].val = 0;
1503− if (gspca_dev->streaming)
1504− setawb(gspca_dev);
1505− }
1506− }
1507− if (gspca_dev->streaming)
1508− setagc(gspca_dev);
1509− return gspca_dev->usb_err;
1510−}
1511−
15121486 static int sd_querymenu(struct gspca_dev *gspca_dev,
15131487 struct v4l2_querymenu *menu)
15141488 {
drivers/media/video/gspca/ov534_9.c+1−0
@@ -1008,6 +1008,7 @@ static int sccb_check_status(struct gspca_dev *gspca_dev) · 1007 unmodified lines
10081008 int i;
10091009
10101010 for (i = 0; i < 5; i++) {
1011+ msleep(10);
10111012 data = reg_r(gspca_dev, OV534_REG_STATUS);
10121013
10131014 switch (data) {
drivers/media/video/gspca/pac7311.c+1−1
@@ -418,7 +418,7 @@ static int sd_init_controls(struct gspca_dev *gspca_dev) · 417 unmodified lines
418418 struct v4l2_ctrl_handler *hdl = &gspca_dev->ctrl_handler;
419419
420420 gspca_dev->vdev.ctrl_handler = hdl;
421− v4l2_ctrl_handler_init(hdl, 4);
421+ v4l2_ctrl_handler_init(hdl, 5);
422422
423423 sd->contrast = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
424424 V4L2_CID_CONTRAST, 0, 15, 1, 7);
drivers/media/video/gspca/sn9c20x.c+14−10
@@ -1761,7 +1761,6 @@ static int sd_init_controls(struct gspca_dev *gspca_dev) · 1760 unmodified lines
17611761 V4L2_CID_SATURATION, 0, 255, 1, 127);
17621762 sd->hue = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
17631763 V4L2_CID_HUE, -180, 180, 1, 0);
1764− v4l2_ctrl_cluster(4, &sd->brightness);
17651764
17661765 sd->gamma = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
17671766 V4L2_CID_GAMMA, 0, 255, 1, 0x10);
@@ -1770,7 +1769,6 @@ static int sd_init_controls(struct gspca_dev *gspca_dev) · 2 unmodified lines
17701769 V4L2_CID_BLUE_BALANCE, 0, 127, 1, 0x28);
17711770 sd->red = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
17721771 V4L2_CID_RED_BALANCE, 0, 127, 1, 0x28);
1773− v4l2_ctrl_cluster(2, &sd->blue);
17741772
17751773 if (sd->sensor != SENSOR_OV9655 && sd->sensor != SENSOR_SOI968 &&
17761774 sd->sensor != SENSOR_OV7670 && sd->sensor != SENSOR_MT9M001 &&
@@ -1779,7 +1777,6 @@ static int sd_init_controls(struct gspca_dev *gspca_dev) · 2 unmodified lines
17791777 V4L2_CID_HFLIP, 0, 1, 1, 0);
17801778 sd->vflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
17811779 V4L2_CID_VFLIP, 0, 1, 1, 0);
1782− v4l2_ctrl_cluster(2, &sd->hflip);
17831780 }
17841781
17851782 if (sd->sensor != SENSOR_SOI968 && sd->sensor != SENSOR_MT9VPRB &&
@@ -1794,6 +1791,20 @@ static int sd_init_controls(struct gspca_dev *gspca_dev) · 8 unmodified lines
17941791 V4L2_CID_GAIN, 0, 28, 1, 0);
17951792 sd->autogain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
17961793 V4L2_CID_AUTOGAIN, 0, 1, 1, 1);
1794+ }
1795+
1796+ sd->jpegqual = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
1797+ V4L2_CID_JPEG_COMPRESSION_QUALITY, 50, 90, 1, 80);
1798+ if (hdl->error) {
1799+ pr_err("Could not initialize controls\n");
1800+ return hdl->error;
1801+ }
1802+
1803+ v4l2_ctrl_cluster(4, &sd->brightness);
1804+ v4l2_ctrl_cluster(2, &sd->blue);
1805+ if (sd->hflip)
1806+ v4l2_ctrl_cluster(2, &sd->hflip);
1807+ if (sd->autogain) {
17971808 if (sd->sensor == SENSOR_SOI968)
17981809 /* this sensor doesn't have the exposure control and
17991810 autogain is clustered with gain instead. This works
@@ -1803,13 +1814,6 @@ static int sd_init_controls(struct gspca_dev *gspca_dev) · 3 unmodified lines
18031814 /* Otherwise autogain is clustered with exposure. */
18041815 v4l2_ctrl_auto_cluster(2, &sd->autogain, 0, false);
18051816 }
1806−
1807− sd->jpegqual = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
1808− V4L2_CID_JPEG_COMPRESSION_QUALITY, 50, 90, 1, 80);
1809− if (hdl->error) {
1810− pr_err("Could not initialize controls\n");
1811− return hdl->error;
1812− }
18131817 return 0;
18141818 }
18151819
drivers/media/video/gspca/sonixj.c+1−1
@@ -3120,7 +3120,7 @@ static const struct sd_desc sd_desc = { · 3119 unmodified lines
31203120 | (SENSOR_ ## sensor << 8) \
31213121 | (flags)
31223122 static const struct usb_device_id device_table[] = {
3123− {USB_DEVICE(0x0458, 0x7025), BS(SN9C120, MI0360)},
3123+ {USB_DEVICE(0x0458, 0x7025), BSF(SN9C120, MI0360B, F_PDN_INV)},
31243124 {USB_DEVICE(0x0458, 0x702e), BS(SN9C120, OV7660)},
31253125 {USB_DEVICE(0x045e, 0x00f5), BSF(SN9C105, OV7660, F_PDN_INV)},
31263126 {USB_DEVICE(0x045e, 0x00f7), BSF(SN9C105, OV7660, F_PDN_INV)},
drivers/media/video/ivtv/ivtv-driver.c+9−9
@@ -866,10 +866,10 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev *pdev, · 865 unmodified lines
866866 pci_write_config_dword(pdev, 0x40, 0xffff);
867867
868868 IVTV_DEBUG_INFO("%d (rev %d) at %02x:%02x.%x, "
869− "irq: %d, latency: %d, memory: 0x%lx\n",
869+ "irq: %d, latency: %d, memory: 0x%llx\n",
870870 pdev->device, pdev->revision, pdev->bus->number,
871871 PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn),
872− pdev->irq, pci_latency, (unsigned long)itv->base_addr);
872+ pdev->irq, pci_latency, (u64)itv->base_addr);
873873
874874 return 0;
875875 }
@@ -1007,7 +1007,7 @@ static int __devinit ivtv_probe(struct pci_dev *pdev, · 131 unmodified lines
10071007 itv->cxhdl.priv = itv;
10081008 itv->cxhdl.func = ivtv_api_func;
10091009
1010− IVTV_DEBUG_INFO("base addr: 0x%08x\n", itv->base_addr);
1010+ IVTV_DEBUG_INFO("base addr: 0x%llx\n", (u64)itv->base_addr);
10111011
10121012 /* PCI Device Setup */
10131013 retval = ivtv_setup_pci(itv, pdev, pci_id);
@@ -1017,8 +1017,8 @@ static int __devinit ivtv_probe(struct pci_dev *pdev, · 3 unmodified lines
10171017 goto free_mem;
10181018
10191019 /* map io memory */
1020− IVTV_DEBUG_INFO("attempting ioremap at 0x%08x len 0x%08x\n",
1021− itv->base_addr + IVTV_ENCODER_OFFSET, IVTV_ENCODER_SIZE);
1020+ IVTV_DEBUG_INFO("attempting ioremap at 0x%llx len 0x%08x\n",
1021+ (u64)itv->base_addr + IVTV_ENCODER_OFFSET, IVTV_ENCODER_SIZE);
10221022 itv->enc_mem = ioremap_nocache(itv->base_addr + IVTV_ENCODER_OFFSET,
10231023 IVTV_ENCODER_SIZE);
10241024 if (!itv->enc_mem) {
@@ -1034,8 +1034,8 @@ static int __devinit ivtv_probe(struct pci_dev *pdev, · 9 unmodified lines
10341034 }
10351035
10361036 if (itv->has_cx23415) {
1037− IVTV_DEBUG_INFO("attempting ioremap at 0x%08x len 0x%08x\n",
1038− itv->base_addr + IVTV_DECODER_OFFSET, IVTV_DECODER_SIZE);
1037+ IVTV_DEBUG_INFO("attempting ioremap at 0x%llx len 0x%08x\n",
1038+ (u64)itv->base_addr + IVTV_DECODER_OFFSET, IVTV_DECODER_SIZE);
10391039 itv->dec_mem = ioremap_nocache(itv->base_addr + IVTV_DECODER_OFFSET,
10401040 IVTV_DECODER_SIZE);
10411041 if (!itv->dec_mem) {
@@ -1056,8 +1056,8 @@ static int __devinit ivtv_probe(struct pci_dev *pdev, · 14 unmodified lines
10561056 }
10571057
10581058 /* map registers memory */
1059− IVTV_DEBUG_INFO("attempting ioremap at 0x%08x len 0x%08x\n",
1060− itv->base_addr + IVTV_REG_OFFSET, IVTV_REG_SIZE);
1059+ IVTV_DEBUG_INFO("attempting ioremap at 0x%llx len 0x%08x\n",
1060+ (u64)itv->base_addr + IVTV_REG_OFFSET, IVTV_REG_SIZE);
10611061 itv->reg_mem =
10621062 ioremap_nocache(itv->base_addr + IVTV_REG_OFFSET, IVTV_REG_SIZE);
10631063 if (!itv->reg_mem) {
drivers/media/video/ivtv/ivtv-driver.h+1−1
@@ -622,7 +622,7 @@ struct ivtv { · 621 unmodified lines
622622 struct v4l2_subdev *sd_video; /* controlling video decoder subdev */
623623 struct v4l2_subdev *sd_audio; /* controlling audio subdev */
624624 struct v4l2_subdev *sd_muxer; /* controlling audio muxer subdev */
625− u32 base_addr; /* PCI resource base address */
625+ resource_size_t base_addr; /* PCI resource base address */
626626 volatile void __iomem *enc_mem; /* pointer to mapped encoder memory */
627627 volatile void __iomem *dec_mem; /* pointer to mapped decoder memory */
628628 volatile void __iomem *reg_mem; /* pointer to mapped registers */
drivers/media/video/mem2mem_testdev.c+26−24
@@ -110,22 +110,6 @@ enum { · 109 unmodified lines
110110 V4L2_M2M_DST = 1,
111111 };
112112
113−/* Source and destination queue data */
114−static struct m2mtest_q_data q_data[2];
115−
116−static struct m2mtest_q_data *get_q_data(enum v4l2_buf_type type)
117−{
118− switch (type) {
119− case V4L2_BUF_TYPE_VIDEO_OUTPUT:
120− return &q_data[V4L2_M2M_SRC];
121− case V4L2_BUF_TYPE_VIDEO_CAPTURE:
122− return &q_data[V4L2_M2M_DST];
123− default:
124− BUG();
125− }
126− return NULL;
127−}
128−
129113 #define V4L2_CID_TRANS_TIME_MSEC V4L2_CID_PRIVATE_BASE
130114 #define V4L2_CID_TRANS_NUM_BUFS (V4L2_CID_PRIVATE_BASE + 1)
131115
@@ -198,8 +182,26 @@ struct m2mtest_ctx { · 66 unmodified lines
198182 int aborting;
199183
200184 struct v4l2_m2m_ctx *m2m_ctx;
185+
186+ /* Source and destination queue data */
187+ struct m2mtest_q_data q_data[2];
201188 };
202189
190+static struct m2mtest_q_data *get_q_data(struct m2mtest_ctx *ctx,
191+ enum v4l2_buf_type type)
192+{
193+ switch (type) {
194+ case V4L2_BUF_TYPE_VIDEO_OUTPUT:
195+ return &ctx->q_data[V4L2_M2M_SRC];
196+ case V4L2_BUF_TYPE_VIDEO_CAPTURE:
197+ return &ctx->q_data[V4L2_M2M_DST];
198+ default:
199+ BUG();
200+ }
201+ return NULL;
202+}
203+
204+
203205 static struct v4l2_queryctrl *get_ctrl(int id)
204206 {
205207 int i;
@@ -223,7 +225,7 @@ static int device_process(struct m2mtest_ctx *ctx, · 17 unmodified lines
223225 int tile_w, bytes_left;
224226 int width, height, bytesperline;
225227
226− q_data = get_q_data(V4L2_BUF_TYPE_VIDEO_OUTPUT);
228+ q_data = get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT);
227229
228230 width = q_data->width;
229231 height = q_data->height;
@@ -436,7 +438,7 @@ static int vidioc_g_fmt(struct m2mtest_ctx *ctx, struct v4l2_format *f) · 206 unmodified lines
436438 if (!vq)
437439 return -EINVAL;
438440
439− q_data = get_q_data(f->type);
441+ q_data = get_q_data(ctx, f->type);
440442
441443 f->fmt.pix.width = q_data->width;
442444 f->fmt.pix.height = q_data->height;
@@ -535,7 +537,7 @@ static int vidioc_s_fmt(struct m2mtest_ctx *ctx, struct v4l2_format *f) · 92 unmodified lines
535537 if (!vq)
536538 return -EINVAL;
537539
538− q_data = get_q_data(f->type);
540+ q_data = get_q_data(ctx, f->type);
539541 if (!q_data)
540542 return -EINVAL;
541543
@@ -747,7 +749,7 @@ static int m2mtest_queue_setup(struct vb2_queue *vq, · 205 unmodified lines
747749 struct m2mtest_q_data *q_data;
748750 unsigned int size, count = *nbuffers;
749751
750− q_data = get_q_data(vq->type);
752+ q_data = get_q_data(ctx, vq->type);
751753
752754 size = q_data->width * q_data->height * q_data->fmt->depth >> 3;
753755
@@ -775,7 +777,7 @@ static int m2mtest_buf_prepare(struct vb2_buffer *vb) · 21 unmodified lines
775777
776778 dprintk(ctx->dev, "type: %d\n", vb->vb2_queue->type);
777779
778− q_data = get_q_data(vb->vb2_queue->type);
780+ q_data = get_q_data(ctx, vb->vb2_queue->type);
779781
780782 if (vb2_plane_size(vb, 0) < q_data->sizeimage) {
781783 dprintk(ctx->dev, "%s data will not fit into plane (%lu < %lu)\n",
@@ -860,6 +862,9 @@ static int m2mtest_open(struct file *file) · 78 unmodified lines
860862 ctx->transtime = MEM2MEM_DEF_TRANSTIME;
861863 ctx->num_processed = 0;
862864
865+ ctx->q_data[V4L2_M2M_SRC].fmt = &formats[0];
866+ ctx->q_data[V4L2_M2M_DST].fmt = &formats[0];
867+
863868 ctx->m2m_ctx = v4l2_m2m_ctx_init(dev->m2m_dev, ctx, &queue_init);
864869
865870 if (IS_ERR(ctx->m2m_ctx)) {
@@ -986,9 +991,6 @@ static int m2mtest_probe(struct platform_device *pdev) · 120 unmodified lines
986991 goto err_m2m;
987992 }
988993
989− q_data[V4L2_M2M_SRC].fmt = &formats[0];
990− q_data[V4L2_M2M_DST].fmt = &formats[0];
991−
992994 return 0;
993995
994996 v4l2_m2m_release(dev->m2m_dev);
drivers/media/video/mx2_camera.c+5−47
@@ -345,19 +345,6 @@ static struct mx2_fmt_cfg mx27_emma_prp_table[] = { · 344 unmodified lines
345345 PRP_INTR_CH2OVF,
346346 }
347347 },
348− {
349− .in_fmt = V4L2_MBUS_FMT_UYVY8_2X8,
350− .out_fmt = V4L2_PIX_FMT_YUV420,
351− .cfg = {
352− .channel = 2,
353− .in_fmt = PRP_CNTL_DATA_IN_YUV422,
354− .out_fmt = PRP_CNTL_CH2_OUT_YUV420,
355− .src_pixel = 0x22000888, /* YUV422 (YUYV) */
356− .irq_flags = PRP_INTR_RDERR | PRP_INTR_CH2WERR |
357− PRP_INTR_CH2FC | PRP_INTR_LBOVF |
358− PRP_INTR_CH2OVF,
359− }
360− },
361348 };
362349
363350 static struct mx2_fmt_cfg *mx27_emma_prp_get_format(
@@ -984,7 +971,6 @@ static int mx2_camera_set_bus_param(struct soc_camera_device *icd) · 620 unmodified lines
984971 struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
985972 struct mx2_camera_dev *pcdev = ici->priv;
986973 struct v4l2_mbus_config cfg = {.type = V4L2_MBUS_PARALLEL,};
987− const struct soc_camera_format_xlate *xlate;
988974 unsigned long common_flags;
989975 int ret;
990976 int bytesperline;
@@ -1029,31 +1015,14 @@ static int mx2_camera_set_bus_param(struct soc_camera_device *icd) · 38 unmodified lines
10291015 return ret;
10301016 }
10311017
1032− xlate = soc_camera_xlate_by_fourcc(icd, pixfmt);
1033− if (!xlate) {
1034− dev_warn(icd->parent, "Format %x not found\n", pixfmt);
1035− return -EINVAL;
1036− }
1037−
1038− if (xlate->code == V4L2_MBUS_FMT_YUYV8_2X8) {
1039− csicr1 |= CSICR1_PACK_DIR;
1040− csicr1 &= ~CSICR1_SWAP16_EN;
1041− dev_dbg(icd->parent, "already yuyv format, don't convert\n");
1042− } else if (xlate->code == V4L2_MBUS_FMT_UYVY8_2X8) {
1043− csicr1 &= ~CSICR1_PACK_DIR;
1044− csicr1 |= CSICR1_SWAP16_EN;
1045− dev_dbg(icd->parent, "convert uyvy mbus format into yuyv\n");
1046− } else {
1047− dev_warn(icd->parent, "mbus format not supported\n");
1048− return -EINVAL;
1049− }
1050−
10511018 if (common_flags & V4L2_MBUS_PCLK_SAMPLE_RISING)
10521019 csicr1 |= CSICR1_REDGE;
10531020 if (common_flags & V4L2_MBUS_VSYNC_ACTIVE_HIGH)
10541021 csicr1 |= CSICR1_SOF_POL;
10551022 if (common_flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH)
10561023 csicr1 |= CSICR1_HSYNC_POL;
1024+ if (pcdev->platform_flags & MX2_CAMERA_SWAP16)
1025+ csicr1 |= CSICR1_SWAP16_EN;
10571026 if (pcdev->platform_flags & MX2_CAMERA_EXT_VSYNC)
10581027 csicr1 |= CSICR1_EXT_VSYNC;
10591028 if (pcdev->platform_flags & MX2_CAMERA_CCIR)
@@ -1064,6 +1033,8 @@ static int mx2_camera_set_bus_param(struct soc_camera_device *icd) · 4 unmodified lines
10641033 csicr1 |= CSICR1_GCLK_MODE;
10651034 if (pcdev->platform_flags & MX2_CAMERA_INV_DATA)
10661035 csicr1 |= CSICR1_INV_DATA;
1036+ if (pcdev->platform_flags & MX2_CAMERA_PACK_DIR_MSB)
1037+ csicr1 |= CSICR1_PACK_DIR;
10671038
10681039 pcdev->csicr1 = csicr1;
10691040
@@ -1138,8 +1109,7 @@ static int mx2_camera_get_formats(struct soc_camera_device *icd, · 68 unmodified lines
11381109 return 0;
11391110 }
11401111
1141− if (code == V4L2_MBUS_FMT_YUYV8_2X8 ||
1142− code == V4L2_MBUS_FMT_UYVY8_2X8) {
1112+ if (code == V4L2_MBUS_FMT_YUYV8_2X8) {
11431113 formats++;
11441114 if (xlate) {
11451115 /*
@@ -1155,18 +1125,6 @@ static int mx2_camera_get_formats(struct soc_camera_device *icd, · 9 unmodified lines
11551125 }
11561126 }
11571127
1158− if (code == V4L2_MBUS_FMT_UYVY8_2X8) {
1159− formats++;
1160− if (xlate) {
1161− xlate->host_fmt =
1162− soc_mbus_get_fmtdesc(V4L2_MBUS_FMT_YUYV8_2X8);
1163− xlate->code = code;
1164− dev_dbg(dev, "Providing host format %s for sensor code %d\n",
1165− xlate->host_fmt->name, code);
1166− xlate++;
1167− }
1168− }
1169−
11701128 /* Generic pass-trough */
11711129 formats++;
11721130 if (xlate) {
drivers/media/video/s5p-fimc/fimc-core.c+1−1
@@ -615,7 +615,7 @@ int fimc_ctrls_create(struct fimc_ctx *ctx) · 614 unmodified lines
615615 ctx->effect.type = FIMC_REG_CIIMGEFF_FIN_BYPASS;
616616
617617 if (!handler->error) {
618− v4l2_ctrl_cluster(3, &ctrls->colorfx);
618+ v4l2_ctrl_cluster(2, &ctrls->colorfx);
619619 ctrls->ready = true;
620620 }
621621
drivers/media/video/s5p-mfc/regs-mfc.h+5−0
@@ -164,10 +164,15 @@ · 163 unmodified lines
164164 decoded pic */
165165 #define S5P_FIMV_SI_DISPLAY_Y_ADR 0x2010 /* luma addr of displayed pic */
166166 #define S5P_FIMV_SI_DISPLAY_C_ADR 0x2014 /* chroma addrof displayed pic */
167+
167168 #define S5P_FIMV_SI_CONSUMED_BYTES 0x2018 /* Consumed number of bytes to
168169 decode a frame */
169170 #define S5P_FIMV_SI_DISPLAY_STATUS 0x201c /* status of decoded picture */
170171
172+#define S5P_FIMV_SI_DECODE_Y_ADR 0x2024 /* luma addr of decoded pic */
173+#define S5P_FIMV_SI_DECODE_C_ADR 0x2028 /* chroma addrof decoded pic */
174+#define S5P_FIMV_SI_DECODE_STATUS 0x202c /* status of decoded picture */
175+
171176 #define S5P_FIMV_SI_CH0_SB_ST_ADR 0x2044 /* start addr of stream buf */
172177 #define S5P_FIMV_SI_CH0_SB_FRM_SIZE 0x2048 /* size of stream buf */
173178 #define S5P_FIMV_SI_CH0_DESC_ADR 0x204c /* addr of descriptor buf */
drivers/media/video/s5p-mfc/s5p_mfc_dec.c+2−2
@@ -627,13 +627,13 @@ static int s5p_mfc_dec_s_ctrl(struct v4l2_ctrl *ctrl) · 626 unmodified lines
627627
628628 switch (ctrl->id) {
629629 case V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY:
630− ctx->loop_filter_mpeg4 = ctrl->val;
630+ ctx->display_delay = ctrl->val;
631631 break;
632632 case V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE:
633633 ctx->display_delay_enable = ctrl->val;
634634 break;
635635 case V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER:
636− ctx->display_delay = ctrl->val;
636+ ctx->loop_filter_mpeg4 = ctrl->val;
637637 break;
638638 case V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE:
639639 ctx->slice_interface = ctrl->val;
drivers/media/video/s5p-mfc/s5p_mfc_enc.c+4−8
@@ -243,12 +243,6 @@ static struct mfc_control controls[] = { · 242 unmodified lines
243243 .minimum = V4L2_MPEG_VIDEO_H264_LEVEL_1_0,
244244 .maximum = V4L2_MPEG_VIDEO_H264_LEVEL_4_0,
245245 .default_value = V4L2_MPEG_VIDEO_H264_LEVEL_1_0,
246− .menu_skip_mask = ~(
247− (1 << V4L2_MPEG_VIDEO_H264_LEVEL_4_1) |
248− (1 << V4L2_MPEG_VIDEO_H264_LEVEL_4_2) |
249− (1 << V4L2_MPEG_VIDEO_H264_LEVEL_5_0) |
250− (1 << V4L2_MPEG_VIDEO_H264_LEVEL_5_1)
251− ),
252246 },
253247 {
254248 .id = V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL,
@@ -494,7 +488,7 @@ static struct mfc_control controls[] = { · 239 unmodified lines
494488 .type = V4L2_CTRL_TYPE_MENU,
495489 .minimum = V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED,
496490 .maximum = V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED,
497− .default_value = 0,
491+ .default_value = V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED,
498492 .menu_skip_mask = 0,
499493 },
500494 {
@@ -534,7 +528,7 @@ static struct mfc_control controls[] = { · 33 unmodified lines
534528 .type = V4L2_CTRL_TYPE_MENU,
535529 .minimum = V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE,
536530 .maximum = V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE,
537− .default_value = 0,
531+ .default_value = V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE,
538532 .menu_skip_mask = 0,
539533 },
540534 {
@@ -907,6 +901,8 @@ static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f) · 366 unmodified lines
907901 mfc_err("failed to try output format\n");
908902 return -EINVAL;
909903 }
904+ v4l_bound_align_image(&pix_fmt_mp->width, 8, 1920, 1,
905+ &pix_fmt_mp->height, 4, 1080, 1, 0);
910906 } else {
911907 mfc_err("invalid buf type\n");
912908 return -EINVAL;
drivers/media/video/s5p-mfc/s5p_mfc_opr.h+3−1
@@ -57,10 +57,12 @@ void s5p_mfc_cleanup_queue(struct list_head *lh, struct vb2_queue *vq); · 56 unmodified lines
5757 S5P_FIMV_SI_DISPLAY_Y_ADR) << \
5858 MFC_OFFSET_SHIFT)
5959 #define s5p_mfc_get_dec_y_adr() (readl(dev->regs_base + \
60− S5P_FIMV_SI_DISPLAY_Y_ADR) << \
60+ S5P_FIMV_SI_DECODE_Y_ADR) << \
6161 MFC_OFFSET_SHIFT)
6262 #define s5p_mfc_get_dspl_status() readl(dev->regs_base + \
6363 S5P_FIMV_SI_DISPLAY_STATUS)
64+#define s5p_mfc_get_dec_status() readl(dev->regs_base + \
65+ S5P_FIMV_SI_DECODE_STATUS)
6466 #define s5p_mfc_get_frame_type() (readl(dev->regs_base + \
6567 S5P_FIMV_DECODE_FRAME_TYPE) \
6668 & S5P_FIMV_DECODE_FRAME_MASK)
drivers/media/video/s5p-mfc/s5p_mfc_shm.h+1−2
@@ -13,8 +13,7 @@ · 12 unmodified lines
1313 #ifndef S5P_MFC_SHM_H_
1414 #define S5P_MFC_SHM_H_
1515
16−enum MFC_SHM_OFS
17−{
16+enum MFC_SHM_OFS {
1817 EXTENEDED_DECODE_STATUS = 0x00, /* D */
1918 SET_FRAME_TAG = 0x04, /* D */
2019 GET_FRAME_TAG_TOP = 0x08, /* D */
drivers/media/video/smiapp/Kconfig+1−1
@@ -1,6 +1,6 @@
11 config VIDEO_SMIAPP
22 tristate "SMIA++/SMIA sensor support"
3− depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
3+ depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API && HAVE_CLK
44 select VIDEO_SMIAPP_PLL
55 ---help---
66 This is a generic driver for SMIA++/SMIA camera modules.
drivers/media/video/smiapp/smiapp-core.c+1−0
@@ -32,6 +32,7 @@ · 31 unmodified lines
3232 #include <linux/gpio.h>
3333 #include <linux/module.h>
3434 #include <linux/regulator/consumer.h>
35+#include <linux/slab.h>
3536 #include <linux/v4l2-mediabus.h>
3637 #include <media/v4l2-device.h>
3738
drivers/media/video/tuner-core.c+1−1
@@ -1178,7 +1178,7 @@ static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) · 1177 unmodified lines
11781178 return 0;
11791179 if (vt->type == t->mode && analog_ops->get_afc)
11801180 vt->afc = analog_ops->get_afc(&t->fe);
1181− if (t->mode != V4L2_TUNER_RADIO) {
1181+ if (vt->type != V4L2_TUNER_RADIO) {
11821182 vt->capability |= V4L2_TUNER_CAP_NORM;
11831183 vt->rangelow = tv_range[0] * 16;
11841184 vt->rangehigh = tv_range[1] * 16;
drivers/media/video/v4l2-dev.c+3−1
@@ -656,7 +656,7 @@ static void determine_valid_ioctls(struct video_device *vdev) · 655 unmodified lines
656656 SET_VALID_IOCTL(ops, VIDIOC_TRY_ENCODER_CMD, vidioc_try_encoder_cmd);
657657 SET_VALID_IOCTL(ops, VIDIOC_DECODER_CMD, vidioc_decoder_cmd);
658658 SET_VALID_IOCTL(ops, VIDIOC_TRY_DECODER_CMD, vidioc_try_decoder_cmd);
659− if (ops->vidioc_g_parm || vdev->current_norm)
659+ if (ops->vidioc_g_parm || vdev->vfl_type == VFL_TYPE_GRABBER)
660660 set_bit(_IOC_NR(VIDIOC_G_PARM), valid_ioctls);
661661 SET_VALID_IOCTL(ops, VIDIOC_S_PARM, vidioc_s_parm);
662662 SET_VALID_IOCTL(ops, VIDIOC_G_TUNER, vidioc_g_tuner);
@@ -679,6 +679,8 @@ static void determine_valid_ioctls(struct video_device *vdev) · 16 unmodified lines
679679 SET_VALID_IOCTL(ops, VIDIOC_QUERY_DV_PRESET, vidioc_query_dv_preset);
680680 SET_VALID_IOCTL(ops, VIDIOC_S_DV_TIMINGS, vidioc_s_dv_timings);
681681 SET_VALID_IOCTL(ops, VIDIOC_G_DV_TIMINGS, vidioc_g_dv_timings);
682+ SET_VALID_IOCTL(ops, VIDIOC_ENUM_DV_TIMINGS, vidioc_enum_dv_timings);
683+ SET_VALID_IOCTL(ops, VIDIOC_QUERY_DV_TIMINGS, vidioc_query_dv_timings);
682684 /* yes, really vidioc_subscribe_event */
683685 SET_VALID_IOCTL(ops, VIDIOC_DQEVENT, vidioc_subscribe_event);
684686 SET_VALID_IOCTL(ops, VIDIOC_SUBSCRIBE_EVENT, vidioc_subscribe_event);
drivers/media/video/v4l2-ioctl.c+1−0
@@ -1680,6 +1680,7 @@ static long __video_do_ioctl(struct file *file, · 1679 unmodified lines
16801680 break;
16811681
16821682 ret = 0;
1683+ p->parm.capture.readbuffers = 2;
16831684 if (ops->vidioc_g_std)
16841685 ret = ops->vidioc_g_std(file, fh, &std);
16851686 if (ret == 0)
drivers/media/video/vino.c+2−2
@@ -2561,7 +2561,7 @@ static int vino_acquire_input(struct vino_channel_settings *vcs) · 2560 unmodified lines
25612561 } else if (vino_drvdata->decoder
25622562 && (vino_drvdata->decoder_owner == VINO_NO_CHANNEL)) {
25632563 int input;
2564− int data_norm;
2564+ int data_norm = 0;
25652565 v4l2_std_id norm;
25662566
25672567 input = VINO_INPUT_COMPOSITE;
@@ -2651,7 +2651,7 @@ static int vino_set_input(struct vino_channel_settings *vcs, int input) · 83 unmodified lines
26512651 }
26522652
26532653 if (vino_drvdata->decoder_owner == vcs->channel) {
2654− int data_norm;
2654+ int data_norm = 0;
26552655 v4l2_std_id norm;
26562656
26572657 ret = decoder_call(video, s_routing,
drivers/media/video/vivi.c+5−1
@@ -1149,10 +1149,14 @@ static ssize_t · 1148 unmodified lines
11491149 vivi_read(struct file *file, char __user *data, size_t count, loff_t *ppos)
11501150 {
11511151 struct vivi_dev *dev = video_drvdata(file);
1152+ int err;
11521153
11531154 dprintk(dev, 1, "read called\n");
1154− return vb2_read(&dev->vb_vidq, data, count, ppos,
1155+ mutex_lock(&dev->mutex);
1156+ err = vb2_read(&dev->vb_vidq, data, count, ppos,
11551157 file->f_flags & O_NONBLOCK);
1158+ mutex_unlock(&dev->mutex);
1159+ return err;
11561160 }
11571161
11581162 static unsigned int
drivers/mmc/card/block.c+1−13
@@ -554,7 +554,6 @@ static u32 mmc_sd_num_wr_blocks(struct mmc_card *card) · 553 unmodified lines
554554 struct mmc_request mrq = {NULL};
555555 struct mmc_command cmd = {0};
556556 struct mmc_data data = {0};
557− unsigned int timeout_us;
558557
559558 struct scatterlist sg;
560559
@@ -574,23 +573,12 @@ static u32 mmc_sd_num_wr_blocks(struct mmc_card *card) · 13 unmodified lines
574573 cmd.arg = 0;
575574 cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC;
576575
577− data.timeout_ns = card->csd.tacc_ns * 100;
578− data.timeout_clks = card->csd.tacc_clks * 100;
579−
580− timeout_us = data.timeout_ns / 1000;
581− timeout_us += data.timeout_clks * 1000 /
582− (card->host->ios.clock / 1000);
583−
584− if (timeout_us > 100000) {
585− data.timeout_ns = 100000000;
586− data.timeout_clks = 0;
587− }
588−
589576 data.blksz = 4;
590577 data.blocks = 1;
591578 data.flags = MMC_DATA_READ;
592579 data.sg = &sg;
593580 data.sg_len = 1;
581+ mmc_set_data_timeout(&data, card);
594582
595583 mrq.cmd = &cmd;
596584 mrq.data = &data;
drivers/mmc/host/omap_hsmmc.c+3−12
@@ -85,7 +85,6 @@ · 84 unmodified lines
8585 #define BRR_ENABLE (1 << 5)
8686 #define DTO_ENABLE (1 << 20)
8787 #define INIT_STREAM (1 << 1)
88−#define ACEN_ACMD12 (1 << 2)
8988 #define DP_SELECT (1 << 21)
9089 #define DDIR (1 << 4)
9190 #define DMA_EN 0x1
@@ -117,7 +116,6 @@ · 25 unmodified lines
117116 #define OMAP_MMC_MAX_CLOCK 52000000
118117 #define DRIVER_NAME "omap_hsmmc"
119118
120−#define AUTO_CMD12 (1 << 0) /* Auto CMD12 support */
121119 /*
122120 * One controller can have multiple slots, like on some omap boards using
123121 * omap.c controller driver. Luckily this is not currently done on any known
@@ -177,7 +175,6 @@ struct omap_hsmmc_host { · 53 unmodified lines
177175 int reqs_blocked;
178176 int use_reg;
179177 int req_in_progress;
180− unsigned int flags;
181178 struct omap_hsmmc_next next_data;
182179
183180 struct omap_mmc_platform_data *pdata;
@@ -773,8 +770,6 @@ omap_hsmmc_start_command(struct omap_hsmmc_host *host, struct mmc_command *cmd, · 589 unmodified lines
773770 cmdtype = 0x3;
774771
775772 cmdreg = (cmd->opcode << 24) | (resptype << 16) | (cmdtype << 22);
776− if ((host->flags & AUTO_CMD12) && mmc_op_multi(cmd->opcode))
777− cmdreg |= ACEN_ACMD12;
778773
779774 if (data) {
780775 cmdreg |= DP_SELECT | MSBS | BCE;
@@ -847,14 +842,11 @@ omap_hsmmc_xfer_done(struct omap_hsmmc_host *host, struct mmc_data *data) · 66 unmodified lines
847842 else
848843 data->bytes_xfered = 0;
849844
850− if (data->stop && ((!(host->flags & AUTO_CMD12)) || data->error)) {
851− omap_hsmmc_start_command(host, data->stop, NULL);
852− } else {
853− if (data->stop)
854− data->stop->resp[0] = OMAP_HSMMC_READ(host->base,
855− RSP76);
845+ if (!data->stop) {
856846 omap_hsmmc_request_done(host, data->mrq);
847+ return;
857848 }
849+ omap_hsmmc_start_command(host, data->stop, NULL);
858850 }
859851
860852 /*
@@ -1859,7 +1851,6 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev) · 998 unmodified lines
18591851 host->mapbase = res->start + pdata->reg_offset;
18601852 host->base = ioremap(host->mapbase, SZ_4K);
18611853 host->power_mode = MMC_POWER_OFF;
1862− host->flags = AUTO_CMD12;
18631854 host->next_data.cookie = 1;
18641855
18651856 platform_set_drvdata(pdev, host);
drivers/mtd/ubi/debug.c+4−4
@@ -264,7 +264,7 @@ static struct dentry *dfs_rootdir; · 263 unmodified lines
264264 */
265265 int ubi_debugfs_init(void)
266266 {
267− if (!IS_ENABLED(DEBUG_FS))
267+ if (!IS_ENABLED(CONFIG_DEBUG_FS))
268268 return 0;
269269
270270 dfs_rootdir = debugfs_create_dir("ubi", NULL);
@@ -284,7 +284,7 @@ int ubi_debugfs_init(void) · 13 unmodified lines
284284 */
285285 void ubi_debugfs_exit(void)
286286 {
287− if (IS_ENABLED(DEBUG_FS))
287+ if (IS_ENABLED(CONFIG_DEBUG_FS))
288288 debugfs_remove(dfs_rootdir);
289289 }
290290
@@ -407,7 +407,7 @@ int ubi_debugfs_init_dev(struct ubi_device *ubi) · 116 unmodified lines
407407 struct dentry *dent;
408408 struct ubi_debug_info *d = ubi->dbg;
409409
410− if (!IS_ENABLED(DEBUG_FS))
410+ if (!IS_ENABLED(CONFIG_DEBUG_FS))
411411 return 0;
412412
413413 n = snprintf(d->dfs_dir_name, UBI_DFS_DIR_LEN + 1, UBI_DFS_DIR_NAME,
@@ -477,6 +477,6 @@ out: · 63 unmodified lines
477477 */
478478 void ubi_debugfs_exit_dev(struct ubi_device *ubi)
479479 {
480− if (IS_ENABLED(DEBUG_FS))
480+ if (IS_ENABLED(CONFIG_DEBUG_FS))
481481 debugfs_remove_recursive(ubi->dbg->dfs_dir);
482482 }
drivers/net/bonding/bond_procfs.c+13−2
@@ -150,14 +150,25 @@ static void bond_info_show_master(struct seq_file *seq) · 149 unmodified lines
150150 }
151151 }
152152
153+static const char *bond_slave_link_status(s8 link)
154+{
155+ static const char * const status[] = {
156+ [BOND_LINK_UP] = "up",
157+ [BOND_LINK_FAIL] = "going down",
158+ [BOND_LINK_DOWN] = "down",
159+ [BOND_LINK_BACK] = "going back",
160+ };
161+
162+ return status[link];
163+}
164+
153165 static void bond_info_show_slave(struct seq_file *seq,
154166 const struct slave *slave)
155167 {
156168 struct bonding *bond = seq->private;
157169
158170 seq_printf(seq, "\nSlave Interface: %s\n", slave->dev->name);
159− seq_printf(seq, "MII Status: %s\n",
160− (slave->link == BOND_LINK_UP) ? "up" : "down");
171+ seq_printf(seq, "MII Status: %s\n", bond_slave_link_status(slave->link));
161172 if (slave->speed == SPEED_UNKNOWN)
162173 seq_printf(seq, "Speed: %s\n", "Unknown");
163174 else
drivers/net/caif/caif_hsi.c+3−2
@@ -693,8 +693,6 @@ static void cfhsi_rx_done(struct cfhsi *cfhsi) · 692 unmodified lines
693693 */
694694 memcpy(rx_buf, (u8 *)piggy_desc,
695695 CFHSI_DESC_SHORT_SZ);
696− /* Mark no embedded frame here */
697− piggy_desc->offset = 0;
698696 if (desc_pld_len == -EPROTO)
699697 goto out_of_sync;
700698 }
@@ -737,6 +735,8 @@ static void cfhsi_rx_done(struct cfhsi *cfhsi) · 36 unmodified lines
737735 /* Extract any payload in piggyback descriptor. */
738736 if (cfhsi_rx_desc(piggy_desc, cfhsi) < 0)
739737 goto out_of_sync;
738+ /* Mark no embedded frame after extracting it */
739+ piggy_desc->offset = 0;
740740 }
741741 }
742742
@@ -1178,6 +1178,7 @@ int cfhsi_probe(struct platform_device *pdev) · 435 unmodified lines
11781178 dev_err(&ndev->dev, "%s: Registration error: %d.\n",
11791179 __func__, res);
11801180 free_netdev(ndev);
1181+ return -ENODEV;
11811182 }
11821183 /* Add CAIF HSI device to list. */
11831184 spin_lock(&cfhsi_list_lock);
drivers/net/can/c_can/c_can.c+2−2
@@ -590,8 +590,8 @@ static void c_can_chip_config(struct net_device *dev) · 589 unmodified lines
590590 priv->write_reg(priv, &priv->regs->control,
591591 CONTROL_ENABLE_AR);
592592
593− if (priv->can.ctrlmode & (CAN_CTRLMODE_LISTENONLY &
594− CAN_CTRLMODE_LOOPBACK)) {
593+ if ((priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY) &&
594+ (priv->can.ctrlmode & CAN_CTRLMODE_LOOPBACK)) {
595595 /* loopback + silent mode : useful for hot self-test */
596596 priv->write_reg(priv, &priv->regs->control, CONTROL_EIE |
597597 CONTROL_SIE | CONTROL_IE | CONTROL_TEST);
drivers/net/can/flexcan.c+2−2
@@ -939,12 +939,12 @@ static int __devinit flexcan_probe(struct platform_device *pdev) · 938 unmodified lines
939939 return PTR_ERR(pinctrl);
940940
941941 if (pdev->dev.of_node) {
942− const u32 *clock_freq_p;
942+ const __be32 *clock_freq_p;
943943
944944 clock_freq_p = of_get_property(pdev->dev.of_node,
945945 "clock-frequency", NULL);
946946 if (clock_freq_p)
947− clock_freq = *clock_freq_p;
947+ clock_freq = be32_to_cpup(clock_freq_p);
948948 }
949949
950950 if (!clock_freq) {
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c+3−5
@@ -190,7 +190,7 @@ int bnx2x_tx_int(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata) · 189 unmodified lines
190190
191191 if ((netif_tx_queue_stopped(txq)) &&
192192 (bp->state == BNX2X_STATE_OPEN) &&
193− (bnx2x_tx_avail(bp, txdata) >= MAX_SKB_FRAGS + 3))
193+ (bnx2x_tx_avail(bp, txdata) >= MAX_SKB_FRAGS + 4))
194194 netif_tx_wake_queue(txq);
195195
196196 __netif_tx_unlock(txq);
@@ -2516,8 +2516,6 @@ int bnx2x_poll(struct napi_struct *napi, int budget) · 2319 unmodified lines
25162516 /* we split the first BD into headers and data BDs
25172517 * to ease the pain of our fellow microcode engineers
25182518 * we use one mapping for both BDs
2519− * So far this has only been observed to happen
2520− * in Other Operating Systems(TM)
25212519 */
25222520 static noinline u16 bnx2x_tx_split(struct bnx2x *bp,
25232521 struct bnx2x_fp_txdata *txdata,
@@ -3171,7 +3169,7 @@ netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev) · 647 unmodified lines
31713169
31723170 txdata->tx_bd_prod += nbd;
31733171
3174− if (unlikely(bnx2x_tx_avail(bp, txdata) < MAX_SKB_FRAGS + 3)) {
3172+ if (unlikely(bnx2x_tx_avail(bp, txdata) < MAX_SKB_FRAGS + 4)) {
31753173 netif_tx_stop_queue(txq);
31763174
31773175 /* paired memory barrier is in bnx2x_tx_int(), we have to keep
@@ -3180,7 +3178,7 @@ netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev) · 2 unmodified lines
31803178 smp_mb();
31813179
31823180 fp->eth_q_stats.driver_xoff++;
3183− if (bnx2x_tx_avail(bp, txdata) >= MAX_SKB_FRAGS + 3)
3181+ if (bnx2x_tx_avail(bp, txdata) >= MAX_SKB_FRAGS + 4)
31843182 netif_tx_wake_queue(txq);
31853183 }
31863184 txdata->tx_pkt++;
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c+30−24
@@ -40,6 +40,7 @@ · 39 unmodified lines
4040 #define I2C_BSC0 0
4141 #define I2C_BSC1 1
4242 #define I2C_WA_RETRY_CNT 3
43+#define I2C_WA_PWR_ITER (I2C_WA_RETRY_CNT - 1)
4344 #define MCPR_IMC_COMMAND_READ_OP 1
4445 #define MCPR_IMC_COMMAND_WRITE_OP 2
4546
@@ -7659,6 +7660,28 @@ static int bnx2x_8726_read_sfp_module_eeprom(struct bnx2x_phy *phy, · 7613 unmodified lines
76597660 return -EINVAL;
76607661 }
76617662
7663+static void bnx2x_warpcore_power_module(struct link_params *params,
7664+ struct bnx2x_phy *phy,
7665+ u8 power)
7666+{
7667+ u32 pin_cfg;
7668+ struct bnx2x *bp = params->bp;
7669+
7670+ pin_cfg = (REG_RD(bp, params->shmem_base +
7671+ offsetof(struct shmem_region,
7672+ dev_info.port_hw_config[params->port].e3_sfp_ctrl)) &
7673+ PORT_HW_CFG_E3_PWR_DIS_MASK) >>
7674+ PORT_HW_CFG_E3_PWR_DIS_SHIFT;
7675+
7676+ if (pin_cfg == PIN_CFG_NA)
7677+ return;
7678+ DP(NETIF_MSG_LINK, "Setting SFP+ module power to %d using pin cfg %d\n",
7679+ power, pin_cfg);
7680+ /* Low ==> corresponding SFP+ module is powered
7681+ * high ==> the SFP+ module is powered down
7682+ */
7683+ bnx2x_set_cfg_pin(bp, pin_cfg, power ^ 1);
7684+}
76627685 static int bnx2x_warpcore_read_sfp_module_eeprom(struct bnx2x_phy *phy,
76637686 struct link_params *params,
76647687 u16 addr, u8 byte_cnt,
@@ -7678,6 +7701,12 @@ static int bnx2x_warpcore_read_sfp_module_eeprom(struct bnx2x_phy *phy, · 13 unmodified lines
76787701 /* 4 byte aligned address */
76797702 addr32 = addr & (~0x3);
76807703 do {
7704+ if (cnt == I2C_WA_PWR_ITER) {
7705+ bnx2x_warpcore_power_module(params, phy, 0);
7706+ /* Note that 100us are not enough here */
7707+ usleep_range(1000,1000);
7708+ bnx2x_warpcore_power_module(params, phy, 1);
7709+ }
76817710 rc = bnx2x_bsc_read(params, phy, 0xa0, addr32, 0, byte_cnt,
76827711 data_array);
76837712 } while ((rc != 0) && (++cnt < I2C_WA_RETRY_CNT));
@@ -8200,29 +8229,6 @@ static void bnx2x_set_sfp_module_fault_led(struct link_params *params, · 516 unmodified lines
82008229 bnx2x_set_e1e2_module_fault_led(params, gpio_mode);
82018230 }
82028231
8203−static void bnx2x_warpcore_power_module(struct link_params *params,
8204− struct bnx2x_phy *phy,
8205− u8 power)
8206−{
8207− u32 pin_cfg;
8208− struct bnx2x *bp = params->bp;
8209−
8210− pin_cfg = (REG_RD(bp, params->shmem_base +
8211− offsetof(struct shmem_region,
8212− dev_info.port_hw_config[params->port].e3_sfp_ctrl)) &
8213− PORT_HW_CFG_E3_PWR_DIS_MASK) >>
8214− PORT_HW_CFG_E3_PWR_DIS_SHIFT;
8215−
8216− if (pin_cfg == PIN_CFG_NA)
8217− return;
8218− DP(NETIF_MSG_LINK, "Setting SFP+ module power to %d using pin cfg %d\n",
8219− power, pin_cfg);
8220− /* Low ==> corresponding SFP+ module is powered
8221− * high ==> the SFP+ module is powered down
8222− */
8223− bnx2x_set_cfg_pin(bp, pin_cfg, power ^ 1);
8224−}
8225−
82268232 static void bnx2x_warpcore_hw_reset(struct bnx2x_phy *phy,
82278233 struct link_params *params)
82288234 {
@@ -9748,7 +9754,7 @@ static int bnx2x_848x3_config_init(struct bnx2x_phy *phy, · 1519 unmodified lines
97489754
97499755 msleep(1);
97509756
9751− if (!(CHIP_IS_E1(bp)))
9757+ if (!(CHIP_IS_E1x(bp)))
97529758 port = BP_PATH(bp);
97539759 else
97549760 port = params->port;
drivers/net/ethernet/emulex/benet/be_cmds.c+6−6
@@ -122,15 +122,15 @@ static int be_mcc_compl_process(struct be_adapter *adapter, · 121 unmodified lines
122122 goto done;
123123
124124 if (compl_status == MCC_STATUS_UNAUTHORIZED_REQUEST) {
125− dev_warn(&adapter->pdev->dev, "This domain(VM) is not "
126− "permitted to execute this cmd (opcode %d)\n",
127− opcode);
125+ dev_warn(&adapter->pdev->dev,
126+ "opcode %d-%d is not permitted\n",
127+ opcode, subsystem);
128128 } else {
129129 extd_status = (compl->status >> CQE_STATUS_EXTD_SHIFT) &
130130 CQE_STATUS_EXTD_MASK;
131− dev_err(&adapter->pdev->dev, "Cmd (opcode %d) failed:"
132− "status %d, extd-status %d\n",
133− opcode, compl_status, extd_status);
131+ dev_err(&adapter->pdev->dev,
132+ "opcode %d-%d failed:status %d-%d\n",
133+ opcode, subsystem, compl_status, extd_status);
134134 }
135135 }
136136 done:
drivers/net/ethernet/emulex/benet/be_cmds.h+1−1
@@ -1566,7 +1566,7 @@ struct be_hw_stats_v1 { · 1565 unmodified lines
15661566 u32 rsvd0[BE_TXP_SW_SZ];
15671567 struct be_erx_stats_v1 erx;
15681568 struct be_pmem_stats pmem;
1569− u32 rsvd1[3];
1569+ u32 rsvd1[18];
15701570 };
15711571
15721572 struct be_cmd_req_get_stats_v1 {
drivers/net/ethernet/emulex/benet/be_main.c+1−1
@@ -3237,7 +3237,7 @@ static void be_netdev_init(struct net_device *netdev) · 3236 unmodified lines
32373237
32383238 netdev->flags |= IFF_MULTICAST;
32393239
3240− netif_set_gso_max_size(netdev, 65535);
3240+ netif_set_gso_max_size(netdev, 65535 - ETH_HLEN);
32413241
32423242 netdev->netdev_ops = &be_netdev_ops;
32433243
drivers/net/ethernet/intel/Kconfig+7−3
@@ -122,8 +122,10 @@ config IGB_DCA · 121 unmodified lines
122122
123123 config IGB_PTP
124124 bool "PTP Hardware Clock (PHC)"
125− default y
126− depends on IGB && PTP_1588_CLOCK
125+ default n
126+ depends on IGB && EXPERIMENTAL
127+ select PPS
128+ select PTP_1588_CLOCK
127129 ---help---
128130 Say Y here if you want to use PTP Hardware Clock (PHC) in the
129131 driver. Only the basic clock operations have been implemented.
@@ -223,7 +225,9 @@ config IXGBE_DCB · 93 unmodified lines
223225 config IXGBE_PTP
224226 bool "PTP Clock Support"
225227 default n
226− depends on IXGBE && PTP_1588_CLOCK
228+ depends on IXGBE && EXPERIMENTAL
229+ select PPS
230+ select PTP_1588_CLOCK
227231 ---help---
228232 Say Y here if you want support for 1588 Timestamping with a
229233 PHC device, using the PTP 1588 Clock support. This is
drivers/net/ethernet/intel/igb/e1000_82575.c+0−2
@@ -206,8 +206,6 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw) · 205 unmodified lines
206206 mac->rar_entry_count = E1000_RAR_ENTRIES_82580;
207207 break;
208208 case e1000_i350:
209− case e1000_i210:
210− case e1000_i211:
211209 mac->rar_entry_count = E1000_RAR_ENTRIES_I350;
212210 break;
213211 default:
drivers/net/ethernet/intel/ixgbe/ixgbe.h+2−2
@@ -196,7 +196,7 @@ enum ixgbe_ring_state_t { · 195 unmodified lines
196196 __IXGBE_HANG_CHECK_ARMED,
197197 __IXGBE_RX_RSC_ENABLED,
198198 __IXGBE_RX_CSUM_UDP_ZERO_ERR,
199− __IXGBE_RX_FCOE_BUFSZ,
199+ __IXGBE_RX_FCOE,
200200 };
201201
202202 #define check_for_tx_hang(ring) \
@@ -290,7 +290,7 @@ struct ixgbe_ring_feature { · 87 unmodified lines
290290 #if defined(IXGBE_FCOE) && (PAGE_SIZE < 8192)
291291 static inline unsigned int ixgbe_rx_pg_order(struct ixgbe_ring *ring)
292292 {
293− return test_bit(__IXGBE_RX_FCOE_BUFSZ, &ring->state) ? 1 : 0;
293+ return test_bit(__IXGBE_RX_FCOE, &ring->state) ? 1 : 0;
294294 }
295295 #else
296296 #define ixgbe_rx_pg_order(_ring) 0
drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c+1−1
@@ -634,7 +634,7 @@ static int ixgbe_alloc_q_vector(struct ixgbe_adapter *adapter, · 633 unmodified lines
634634 f = &adapter->ring_feature[RING_F_FCOE];
635635 if ((rxr_idx >= f->mask) &&
636636 (rxr_idx < f->mask + f->indices))
637− set_bit(__IXGBE_RX_FCOE_BUFSZ, &ring->state);
637+ set_bit(__IXGBE_RX_FCOE, &ring->state);
638638 }
639639
640640 #endif /* IXGBE_FCOE */
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c+11−5
@@ -1058,17 +1058,17 @@ static inline void ixgbe_rx_hash(struct ixgbe_ring *ring, · 1057 unmodified lines
10581058 #ifdef IXGBE_FCOE
10591059 /**
10601060 * ixgbe_rx_is_fcoe - check the rx desc for incoming pkt type
1061− * @adapter: address of board private structure
1061+ * @ring: structure containing ring specific data
10621062 * @rx_desc: advanced rx descriptor
10631063 *
10641064 * Returns : true if it is FCoE pkt
10651065 */
1066−static inline bool ixgbe_rx_is_fcoe(struct ixgbe_adapter *adapter,
1066+static inline bool ixgbe_rx_is_fcoe(struct ixgbe_ring *ring,
10671067 union ixgbe_adv_rx_desc *rx_desc)
10681068 {
10691069 __le16 pkt_info = rx_desc->wb.lower.lo_dword.hs_rss.pkt_info;
10701070
1071− return (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) &&
1071+ return test_bit(__IXGBE_RX_FCOE, &ring->state) &&
10721072 ((pkt_info & cpu_to_le16(IXGBE_RXDADV_PKTTYPE_ETQF_MASK)) ==
10731073 (cpu_to_le16(IXGBE_ETQF_FILTER_FCOE <<
10741074 IXGBE_RXDADV_PKTTYPE_ETQF_SHIFT)));
@@ -1148,7 +1148,7 @@ static bool ixgbe_alloc_mapped_page(struct ixgbe_ring *rx_ring, · 73 unmodified lines
11481148
11491149 /* alloc new page for storage */
11501150 if (likely(!page)) {
1151− page = alloc_pages(GFP_ATOMIC | __GFP_COLD,
1151+ page = alloc_pages(GFP_ATOMIC | __GFP_COLD | __GFP_COMP,
11521152 ixgbe_rx_pg_order(rx_ring));
11531153 if (unlikely(!page)) {
11541154 rx_ring->rx_stats.alloc_rx_page_failed++;
@@ -1549,6 +1549,12 @@ static bool ixgbe_cleanup_headers(struct ixgbe_ring *rx_ring, · 394 unmodified lines
15491549 skb->truesize -= ixgbe_rx_bufsz(rx_ring);
15501550 }
15511551
1552+#ifdef IXGBE_FCOE
1553+ /* do not attempt to pad FCoE Frames as this will disrupt DDP */
1554+ if (ixgbe_rx_is_fcoe(rx_ring, rx_desc))
1555+ return false;
1556+
1557+#endif
15521558 /* if skb_pad returns an error the skb was freed */
15531559 if (unlikely(skb->len < 60)) {
15541560 int pad_len = 60 - skb->len;
@@ -1775,7 +1781,7 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector, · 220 unmodified lines
17751781
17761782 #ifdef IXGBE_FCOE
17771783 /* if ddp, not passing to ULD unless for FCP_RSP or error */
1778− if (ixgbe_rx_is_fcoe(adapter, rx_desc)) {
1784+ if (ixgbe_rx_is_fcoe(rx_ring, rx_desc)) {
17791785 ddp_bytes = ixgbe_fcoe_ddp(adapter, rx_desc, skb);
17801786 if (!ddp_bytes) {
17811787 dev_kfree_skb_any(skb);
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c+11−2
@@ -708,6 +708,7 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter) · 707 unmodified lines
708708 {
709709 struct ixgbe_hw *hw = &adapter->hw;
710710 u32 incval = 0;
711+ u32 timinca = 0;
711712 u32 shift = 0;
712713 u32 cycle_speed;
713714 unsigned long flags;
@@ -730,8 +731,16 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter) · 16 unmodified lines
730731 break;
731732 }
732733
733− /* Bail if the cycle speed didn't change */
734− if (adapter->cycle_speed == cycle_speed)
734+ /*
735+ * grab the current TIMINCA value from the register so that it can be
736+ * double checked. If the register value has been cleared, it must be
737+ * reset to the correct value for generating a cyclecounter. If
738+ * TIMINCA is zero, the SYSTIME registers do not increment at all.
739+ */
740+ timinca = IXGBE_READ_REG(hw, IXGBE_TIMINCA);
741+
742+ /* Bail if the cycle speed didn't change and TIMINCA is non-zero */
743+ if (adapter->cycle_speed == cycle_speed && timinca)
735744 return;
736745
737746 /* disable the SDP clock out */
drivers/net/ethernet/mellanox/mlx4/en_netdev.c+12−6
@@ -929,15 +929,20 @@ void mlx4_en_free_resources(struct mlx4_en_priv *priv) · 928 unmodified lines
929929 if (priv->rx_cq[i].buf)
930930 mlx4_en_destroy_cq(priv, &priv->rx_cq[i]);
931931 }
932+
933+ if (priv->base_tx_qpn) {
934+ mlx4_qp_release_range(priv->mdev->dev, priv->base_tx_qpn, priv->tx_ring_num);
935+ priv->base_tx_qpn = 0;
936+ }
932937 }
933938
934939 int mlx4_en_alloc_resources(struct mlx4_en_priv *priv)
935940 {
936941 struct mlx4_en_port_profile *prof = priv->prof;
937942 int i;
938− int base_tx_qpn, err;
943+ int err;
939944
940− err = mlx4_qp_reserve_range(priv->mdev->dev, priv->tx_ring_num, 256, &base_tx_qpn);
945+ err = mlx4_qp_reserve_range(priv->mdev->dev, priv->tx_ring_num, 256, &priv->base_tx_qpn);
941946 if (err) {
942947 en_err(priv, "failed reserving range for TX rings\n");
943948 return err;
@@ -949,7 +954,7 @@ int mlx4_en_alloc_resources(struct mlx4_en_priv *priv) · 5 unmodified lines
949954 prof->tx_ring_size, i, TX))
950955 goto err;
951956
952− if (mlx4_en_create_tx_ring(priv, &priv->tx_ring[i], base_tx_qpn + i,
957+ if (mlx4_en_create_tx_ring(priv, &priv->tx_ring[i], priv->base_tx_qpn + i,
953958 prof->tx_ring_size, TXBB_SIZE))
954959 goto err;
955960 }
@@ -969,7 +974,6 @@ int mlx4_en_alloc_resources(struct mlx4_en_priv *priv) · 13 unmodified lines
969974
970975 err:
971976 en_err(priv, "Failed to allocate NIC resources\n");
972− mlx4_qp_release_range(priv->mdev->dev, base_tx_qpn, priv->tx_ring_num);
973977 return -ENOMEM;
974978 }
975979
@@ -1204,9 +1208,11 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, · 228 unmodified lines
12041208 en_warn(priv, "Using %d RX rings\n", prof->rx_ring_num);
12051209
12061210 /* Configure port */
1211+ mlx4_en_calc_rx_buf(dev);
12071212 err = mlx4_SET_PORT_general(mdev->dev, priv->port,
1208− MLX4_EN_MIN_MTU,
1209− 0, 0, 0, 0);
1213+ priv->rx_skb_size + ETH_FCS_LEN,
1214+ prof->tx_pause, prof->tx_ppp,
1215+ prof->rx_pause, prof->rx_ppp);
12101216 if (err) {
12111217 en_err(priv, "Failed setting port general configurations "
12121218 "for port %d, with error %d\n", priv->port, err);
drivers/net/ethernet/mellanox/mlx4/main.c+2−0
@@ -1975,6 +1975,8 @@ slave_start: · 1974 unmodified lines
19751975 if (err == -EBUSY && (dev->flags & MLX4_FLAG_MSI_X) &&
19761976 !mlx4_is_mfunc(dev)) {
19771977 dev->flags &= ~MLX4_FLAG_MSI_X;
1978+ dev->caps.num_comp_vectors = 1;
1979+ dev->caps.comp_pool = 0;
19781980 pci_disable_msix(pdev);
19791981 err = mlx4_setup_hca(dev);
19801982 }
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h+1−0
@@ -495,6 +495,7 @@ struct mlx4_en_priv { · 494 unmodified lines
495495 int vids[128];
496496 bool wol;
497497 struct device *ddev;
498+ int base_tx_qpn;
498499
499500 #ifdef CONFIG_MLX4_EN_DCB
500501 struct ieee_ets ets;
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c+1−1
@@ -479,7 +479,7 @@ qlcnic_init_pci_info(struct qlcnic_adapter *adapter) · 478 unmodified lines
479479
480480 for (i = 0; i < QLCNIC_MAX_PCI_FUNC; i++) {
481481 pfn = pci_info[i].id;
482− if (pfn > QLCNIC_MAX_PCI_FUNC) {
482+ if (pfn >= QLCNIC_MAX_PCI_FUNC) {
483483 ret = QL_STATUS_INVALID_PARAM;
484484 goto err_eswitch;
485485 }
drivers/net/ethernet/realtek/r8169.c+1−0
@@ -3894,6 +3894,7 @@ static void rtl_init_rxcfg(struct rtl8169_private *tp) · 3893 unmodified lines
38943894 case RTL_GIGA_MAC_VER_22:
38953895 case RTL_GIGA_MAC_VER_23:
38963896 case RTL_GIGA_MAC_VER_24:
3897+ case RTL_GIGA_MAC_VER_34:
38973898 RTL_W32(RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST);
38983899 break;
38993900 default:
drivers/net/ethernet/renesas/sh_eth.c+7−5
@@ -1011,7 +1011,7 @@ static int sh_eth_txfree(struct net_device *ndev) · 1010 unmodified lines
10111011 }
10121012
10131013 /* Packet receive function */
1014−static int sh_eth_rx(struct net_device *ndev)
1014+static int sh_eth_rx(struct net_device *ndev, u32 intr_status)
10151015 {
10161016 struct sh_eth_private *mdp = netdev_priv(ndev);
10171017 struct sh_eth_rxdesc *rxdesc;
@@ -1102,9 +1102,11 @@ static int sh_eth_rx(struct net_device *ndev) · 84 unmodified lines
11021102 /* Restart Rx engine if stopped. */
11031103 /* If we don't need to check status, don't. -KDU */
11041104 if (!(sh_eth_read(ndev, EDRRR) & EDRRR_R)) {
1105− /* fix the values for the next receiving */
1106− mdp->cur_rx = mdp->dirty_rx = (sh_eth_read(ndev, RDFAR) -
1107− sh_eth_read(ndev, RDLAR)) >> 4;
1105+ /* fix the values for the next receiving if RDE is set */
1106+ if (intr_status & EESR_RDE)
1107+ mdp->cur_rx = mdp->dirty_rx =
1108+ (sh_eth_read(ndev, RDFAR) -
1109+ sh_eth_read(ndev, RDLAR)) >> 4;
11081110 sh_eth_write(ndev, EDRRR_R, EDRRR);
11091111 }
11101112
@@ -1273,7 +1275,7 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev) · 162 unmodified lines
12731275 EESR_RTSF | /* short frame recv */
12741276 EESR_PRE | /* PHY-LSI recv error */
12751277 EESR_CERF)){ /* recv frame CRC error */
1276− sh_eth_rx(ndev);
1278+ sh_eth_rx(ndev, intr_status);
12771279 }
12781280
12791281 /* Tx Check */
drivers/net/phy/micrel.c+4−4
@@ -161,7 +161,7 @@ static struct phy_driver ks8051_driver = { · 160 unmodified lines
161161 static struct phy_driver ks8001_driver = {
162162 .phy_id = PHY_ID_KS8001,
163163 .name = "Micrel KS8001 or KS8721",
164− .phy_id_mask = 0x00fffff0,
164+ .phy_id_mask = 0x00ffffff,
165165 .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause),
166166 .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
167167 .config_init = kszphy_config_init,
@@ -174,7 +174,7 @@ static struct phy_driver ks8001_driver = { · 6 unmodified lines
174174
175175 static struct phy_driver ksz9021_driver = {
176176 .phy_id = PHY_ID_KSZ9021,
177− .phy_id_mask = 0x000fff10,
177+ .phy_id_mask = 0x000ffffe,
178178 .name = "Micrel KSZ9021 Gigabit PHY",
179179 .features = (PHY_GBIT_FEATURES | SUPPORTED_Pause
180180 | SUPPORTED_Asym_Pause),
@@ -240,8 +240,8 @@ MODULE_AUTHOR("David J. Choi"); · 59 unmodified lines
240240 MODULE_LICENSE("GPL");
241241
242242 static struct mdio_device_id __maybe_unused micrel_tbl[] = {
243− { PHY_ID_KSZ9021, 0x000fff10 },
244− { PHY_ID_KS8001, 0x00fffff0 },
243+ { PHY_ID_KSZ9021, 0x000ffffe },
244+ { PHY_ID_KS8001, 0x00ffffff },
245245 { PHY_ID_KS8737, 0x00fffff0 },
246246 { PHY_ID_KS8041, 0x00fffff0 },
247247 { PHY_ID_KS8051, 0x00fffff0 },
drivers/net/usb/ipheth.c+5−0
@@ -59,6 +59,7 @@ · 58 unmodified lines
5959 #define USB_PRODUCT_IPHONE_3G 0x1292
6060 #define USB_PRODUCT_IPHONE_3GS 0x1294
6161 #define USB_PRODUCT_IPHONE_4 0x1297
62+#define USB_PRODUCT_IPAD 0x129a
6263 #define USB_PRODUCT_IPHONE_4_VZW 0x129c
6364 #define USB_PRODUCT_IPHONE_4S 0x12a0
6465
@@ -100,6 +101,10 @@ static struct usb_device_id ipheth_table[] = { · 35 unmodified lines
100101 USB_VENDOR_APPLE, USB_PRODUCT_IPHONE_4,
101102 IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS,
102103 IPHETH_USBINTF_PROTO) },
104+ { USB_DEVICE_AND_INTERFACE_INFO(
105+ USB_VENDOR_APPLE, USB_PRODUCT_IPAD,
106+ IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS,
107+ IPHETH_USBINTF_PROTO) },
103108 { USB_DEVICE_AND_INTERFACE_INFO(
104109 USB_VENDOR_APPLE, USB_PRODUCT_IPHONE_4_VZW,
105110 IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS,
drivers/net/usb/qmi_wwan.c+40−43
@@ -257,29 +257,6 @@ err: · 256 unmodified lines
257257 return rv;
258258 }
259259
260−/* Gobi devices uses identical class/protocol codes for all interfaces regardless
261− * of function. Some of these are CDC ACM like and have the exact same endpoints
262− * we are looking for. This leaves two possible strategies for identifying the
263− * correct interface:
264− * a) hardcoding interface number, or
265− * b) use the fact that the wwan interface is the only one lacking additional
266− * (CDC functional) descriptors
267− *
268− * Let's see if we can get away with the generic b) solution.
269− */
270−static int qmi_wwan_bind_gobi(struct usbnet *dev, struct usb_interface *intf)
271−{
272− int rv = -EINVAL;
273−
274− /* ignore any interface with additional descriptors */
275− if (intf->cur_altsetting->extralen)
276− goto err;
277−
278− rv = qmi_wwan_bind_shared(dev, intf);
279−err:
280− return rv;
281−}
282−
283260 static void qmi_wwan_unbind_shared(struct usbnet *dev, struct usb_interface *intf)
284261 {
285262 struct usb_driver *subdriver = (void *)dev->data[0];
@@ -347,15 +324,15 @@ static const struct driver_info qmi_wwan_shared = { · 61 unmodified lines
347324 .manage_power = qmi_wwan_manage_power,
348325 };
349326
350−static const struct driver_info qmi_wwan_gobi = {
351− .description = "Qualcomm Gobi wwan/QMI device",
327+static const struct driver_info qmi_wwan_force_int0 = {
328+ .description = "Qualcomm WWAN/QMI device",
352329 .flags = FLAG_WWAN,
353− .bind = qmi_wwan_bind_gobi,
330+ .bind = qmi_wwan_bind_shared,
354331 .unbind = qmi_wwan_unbind_shared,
355332 .manage_power = qmi_wwan_manage_power,
333+ .data = BIT(0), /* interface whitelist bitmap */
356334 };
357335
358−/* ZTE suck at making USB descriptors */
359336 static const struct driver_info qmi_wwan_force_int1 = {
360337 .description = "Qualcomm WWAN/QMI device",
361338 .flags = FLAG_WWAN,
@@ -365,6 +342,15 @@ static const struct driver_info qmi_wwan_force_int1 = { · 3 unmodified lines
365342 .data = BIT(1), /* interface whitelist bitmap */
366343 };
367344
345+static const struct driver_info qmi_wwan_force_int3 = {
346+ .description = "Qualcomm WWAN/QMI device",
347+ .flags = FLAG_WWAN,
348+ .bind = qmi_wwan_bind_shared,
349+ .unbind = qmi_wwan_unbind_shared,
350+ .manage_power = qmi_wwan_manage_power,
351+ .data = BIT(3), /* interface whitelist bitmap */
352+};
353+
368354 static const struct driver_info qmi_wwan_force_int4 = {
369355 .description = "Qualcomm WWAN/QMI device",
370356 .flags = FLAG_WWAN,
@@ -390,16 +376,23 @@ static const struct driver_info qmi_wwan_force_int4 = { · 19 unmodified lines
390376 static const struct driver_info qmi_wwan_sierra = {
391377 .description = "Sierra Wireless wwan/QMI device",
392378 .flags = FLAG_WWAN,
393− .bind = qmi_wwan_bind_gobi,
379+ .bind = qmi_wwan_bind_shared,
394380 .unbind = qmi_wwan_unbind_shared,
395381 .manage_power = qmi_wwan_manage_power,
396382 .data = BIT(8) | BIT(19), /* interface whitelist bitmap */
397383 };
398384
399385 #define HUAWEI_VENDOR_ID 0x12D1
386+
387+/* Gobi 1000 QMI/wwan interface number is 3 according to qcserial */
388+#define QMI_GOBI1K_DEVICE(vend, prod) \
389+ USB_DEVICE(vend, prod), \
390+ .driver_info = (unsigned long)&qmi_wwan_force_int3
391+
392+/* Gobi 2000 and Gobi 3000 QMI/wwan interface number is 0 according to qcserial */
400393 #define QMI_GOBI_DEVICE(vend, prod) \
401394 USB_DEVICE(vend, prod), \
402− .driver_info = (unsigned long)&qmi_wwan_gobi
395+ .driver_info = (unsigned long)&qmi_wwan_force_int0
403396
404397 static const struct usb_device_id products[] = {
405398 { /* Huawei E392, E398 and possibly others sharing both device id and more... */
@@ -510,20 +503,24 @@ static const struct usb_device_id products[] = { · 104 unmodified lines
510503 .bInterfaceProtocol = 0xff,
511504 .driver_info = (unsigned long)&qmi_wwan_sierra,
512505 },
513− {QMI_GOBI_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */
514− {QMI_GOBI_DEVICE(0x03f0, 0x1f1d)}, /* HP un2400 Gobi Modem Device */
515− {QMI_GOBI_DEVICE(0x03f0, 0x371d)}, /* HP un2430 Mobile Broadband Module */
516− {QMI_GOBI_DEVICE(0x04da, 0x250d)}, /* Panasonic Gobi Modem device */
517− {QMI_GOBI_DEVICE(0x413c, 0x8172)}, /* Dell Gobi Modem device */
518− {QMI_GOBI_DEVICE(0x1410, 0xa001)}, /* Novatel Gobi Modem device */
519− {QMI_GOBI_DEVICE(0x0b05, 0x1776)}, /* Asus Gobi Modem device */
520− {QMI_GOBI_DEVICE(0x19d2, 0xfff3)}, /* ONDA Gobi Modem device */
521− {QMI_GOBI_DEVICE(0x05c6, 0x9001)}, /* Generic Gobi Modem device */
522− {QMI_GOBI_DEVICE(0x05c6, 0x9002)}, /* Generic Gobi Modem device */
523− {QMI_GOBI_DEVICE(0x05c6, 0x9202)}, /* Generic Gobi Modem device */
524− {QMI_GOBI_DEVICE(0x05c6, 0x9203)}, /* Generic Gobi Modem device */
525− {QMI_GOBI_DEVICE(0x05c6, 0x9222)}, /* Generic Gobi Modem device */
526− {QMI_GOBI_DEVICE(0x05c6, 0x9009)}, /* Generic Gobi Modem device */
506+
507+ /* Gobi 1000 devices */
508+ {QMI_GOBI1K_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */
509+ {QMI_GOBI1K_DEVICE(0x03f0, 0x1f1d)}, /* HP un2400 Gobi Modem Device */
510+ {QMI_GOBI1K_DEVICE(0x03f0, 0x371d)}, /* HP un2430 Mobile Broadband Module */
511+ {QMI_GOBI1K_DEVICE(0x04da, 0x250d)}, /* Panasonic Gobi Modem device */
512+ {QMI_GOBI1K_DEVICE(0x413c, 0x8172)}, /* Dell Gobi Modem device */
513+ {QMI_GOBI1K_DEVICE(0x1410, 0xa001)}, /* Novatel Gobi Modem device */
514+ {QMI_GOBI1K_DEVICE(0x0b05, 0x1776)}, /* Asus Gobi Modem device */
515+ {QMI_GOBI1K_DEVICE(0x19d2, 0xfff3)}, /* ONDA Gobi Modem device */
516+ {QMI_GOBI1K_DEVICE(0x05c6, 0x9001)}, /* Generic Gobi Modem device */
517+ {QMI_GOBI1K_DEVICE(0x05c6, 0x9002)}, /* Generic Gobi Modem device */
518+ {QMI_GOBI1K_DEVICE(0x05c6, 0x9202)}, /* Generic Gobi Modem device */
519+ {QMI_GOBI1K_DEVICE(0x05c6, 0x9203)}, /* Generic Gobi Modem device */
520+ {QMI_GOBI1K_DEVICE(0x05c6, 0x9222)}, /* Generic Gobi Modem device */
521+ {QMI_GOBI1K_DEVICE(0x05c6, 0x9009)}, /* Generic Gobi Modem device */
522+
523+ /* Gobi 2000 and 3000 devices */
527524 {QMI_GOBI_DEVICE(0x413c, 0x8186)}, /* Dell Gobi 2000 Modem device (N0218, VU936) */
528525 {QMI_GOBI_DEVICE(0x05c6, 0x920b)}, /* Generic Gobi 2000 Modem device */
529526 {QMI_GOBI_DEVICE(0x05c6, 0x9225)}, /* Sony Gobi 2000 Modem device (N0279, VU730) */
drivers/net/usb/usbnet.c+33−20
@@ -796,11 +796,13 @@ int usbnet_open (struct net_device *net) · 795 unmodified lines
796796 if (info->manage_power) {
797797 retval = info->manage_power(dev, 1);
798798 if (retval < 0)
799− goto done;
799+ goto done_manage_power_error;
800800 usb_autopm_put_interface(dev->intf);
801801 }
802802 return retval;
803803
804+done_manage_power_error:
805+ clear_bit(EVENT_DEV_OPEN, &dev->flags);
804806 done:
805807 usb_autopm_put_interface(dev->intf);
806808 done_nopm:
@@ -876,9 +878,9 @@ void usbnet_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info) · 69 unmodified lines
876878 {
877879 struct usbnet *dev = netdev_priv(net);
878880
879− strncpy (info->driver, dev->driver_name, sizeof info->driver);
880− strncpy (info->version, DRIVER_VERSION, sizeof info->version);
881− strncpy (info->fw_version, dev->driver_info->description,
881+ strlcpy (info->driver, dev->driver_name, sizeof info->driver);
882+ strlcpy (info->version, DRIVER_VERSION, sizeof info->version);
883+ strlcpy (info->fw_version, dev->driver_info->description,
882884 sizeof info->fw_version);
883885 usb_make_path (dev->udev, info->bus_info, sizeof info->bus_info);
884886 }
@@ -1202,6 +1204,21 @@ deferred: · 317 unmodified lines
12021204 }
12031205 EXPORT_SYMBOL_GPL(usbnet_start_xmit);
12041206
1207+static void rx_alloc_submit(struct usbnet *dev, gfp_t flags)
1208+{
1209+ struct urb *urb;
1210+ int i;
1211+
1212+ /* don't refill the queue all at once */
1213+ for (i = 0; i < 10 && dev->rxq.qlen < RX_QLEN(dev); i++) {
1214+ urb = usb_alloc_urb(0, flags);
1215+ if (urb != NULL) {
1216+ if (rx_submit(dev, urb, flags) == -ENOLINK)
1217+ return;
1218+ }
1219+ }
1220+}
1221+
12051222 /*-------------------------------------------------------------------------*/
12061223
12071224 // tasklet (work deferred from completions, in_irq) or timer
@@ -1241,26 +1258,14 @@ static void usbnet_bh (unsigned long param) · 33 unmodified lines
12411258 !timer_pending (&dev->delay) &&
12421259 !test_bit (EVENT_RX_HALT, &dev->flags)) {
12431260 int temp = dev->rxq.qlen;
1244− int qlen = RX_QLEN (dev);
1245−
1246− if (temp < qlen) {
1247− struct urb *urb;
1248− int i;
1249−
1250− // don't refill the queue all at once
1251− for (i = 0; i < 10 && dev->rxq.qlen < qlen; i++) {
1252− urb = usb_alloc_urb (0, GFP_ATOMIC);
1253− if (urb != NULL) {
1254− if (rx_submit (dev, urb, GFP_ATOMIC) ==
1255− -ENOLINK)
1256− return;
1257− }
1258− }
1261+
1262+ if (temp < RX_QLEN(dev)) {
1263+ rx_alloc_submit(dev, GFP_ATOMIC);
12591264 if (temp != dev->rxq.qlen)
12601265 netif_dbg(dev, link, dev->net,
12611266 "rxqlen %d --> %d\n",
12621267 temp, dev->rxq.qlen);
1263− if (dev->rxq.qlen < qlen)
1268+ if (dev->rxq.qlen < RX_QLEN(dev))
12641269 tasklet_schedule (&dev->bh);
12651270 }
12661271 if (dev->txq.qlen < TX_QLEN (dev))
@@ -1513,6 +1518,7 @@ int usbnet_suspend (struct usb_interface *intf, pm_message_t message) · 246 unmodified lines
15131518 spin_lock_irq(&dev->txq.lock);
15141519 /* don't autosuspend while transmitting */
15151520 if (dev->txq.qlen && PMSG_IS_AUTO(message)) {
1521+ dev->suspend_count--;
15161522 spin_unlock_irq(&dev->txq.lock);
15171523 return -EBUSY;
15181524 } else {
@@ -1569,6 +1575,13 @@ int usbnet_resume (struct usb_interface *intf) · 50 unmodified lines
15691575 spin_unlock_irq(&dev->txq.lock);
15701576
15711577 if (test_bit(EVENT_DEV_OPEN, &dev->flags)) {
1578+ /* handle remote wakeup ASAP */
1579+ if (!dev->wait &&
1580+ netif_device_present(dev->net) &&
1581+ !timer_pending(&dev->delay) &&
1582+ !test_bit(EVENT_RX_HALT, &dev->flags))
1583+ rx_alloc_submit(dev, GFP_KERNEL);
1584+
15721585 if (!(dev->txq.qlen >= TX_QLEN(dev)))
15731586 netif_tx_wake_all_queues(dev->net);
15741587 tasklet_schedule (&dev->bh);
drivers/net/wireless/airo.c+2−2
@@ -7233,8 +7233,8 @@ static int airo_get_aplist(struct net_device *dev, · 7232 unmodified lines
72337233 }
72347234 } else {
72357235 dwrq->flags = 1; /* Should be define'd */
7236− memcpy(extra + sizeof(struct sockaddr)*i,
7237− &qual, sizeof(struct iw_quality)*i);
7236+ memcpy(extra + sizeof(struct sockaddr) * i, qual,
7237+ sizeof(struct iw_quality) * i);
72387238 }
72397239 dwrq->length = i;
72407240
drivers/net/wireless/ath/ath5k/base.c+2−2
@@ -1045,11 +1045,11 @@ ath5k_drain_tx_buffs(struct ath5k_hw *ah) · 1044 unmodified lines
10451045
10461046 ath5k_txbuf_free_skb(ah, bf);
10471047
1048− spin_lock_bh(&ah->txbuflock);
1048+ spin_lock(&ah->txbuflock);
10491049 list_move_tail(&bf->list, &ah->txbuf);
10501050 ah->txbuf_len++;
10511051 txq->txq_len--;
1052− spin_unlock_bh(&ah->txbuflock);
1052+ spin_unlock(&ah->txbuflock);
10531053 }
10541054 txq->link = NULL;
10551055 txq->txq_poll_mark = false;
drivers/net/wireless/ath/ath9k/ath9k.h+1−0
@@ -214,6 +214,7 @@ struct ath_frame_info { · 213 unmodified lines
214214 enum ath9k_key_type keytype;
215215 u8 keyix;
216216 u8 retries;
217+ u8 rtscts_rate;
217218 };
218219
219220 struct ath_buf_state {
drivers/net/wireless/ath/ath9k/htc_drv_main.c+2−3
@@ -1496,6 +1496,7 @@ static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw, · 1495 unmodified lines
14961496 priv->num_sta_assoc_vif++ : priv->num_sta_assoc_vif--;
14971497
14981498 if (priv->ah->opmode == NL80211_IFTYPE_STATION) {
1499+ ath9k_htc_choose_set_bssid(priv);
14991500 if (bss_conf->assoc && (priv->num_sta_assoc_vif == 1))
15001501 ath9k_htc_start_ani(priv);
15011502 else if (priv->num_sta_assoc_vif == 0)
@@ -1503,13 +1504,11 @@ static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw, · 1 unmodified line
15031504 }
15041505 }
15051506
1506− if (changed & BSS_CHANGED_BSSID) {
1507+ if (changed & BSS_CHANGED_IBSS) {
15071508 if (priv->ah->opmode == NL80211_IFTYPE_ADHOC) {
15081509 common->curaid = bss_conf->aid;
15091510 memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN);
15101511 ath9k_htc_set_bssid(priv);
1511− } else if (priv->ah->opmode == NL80211_IFTYPE_STATION) {
1512− ath9k_htc_choose_set_bssid(priv);
15131512 }
15141513 }
15151514
drivers/net/wireless/ath/ath9k/hw.c+13−1
@@ -784,13 +784,25 @@ static void ath9k_hw_init_qos(struct ath_hw *ah) · 783 unmodified lines
784784
785785 u32 ar9003_get_pll_sqsum_dvc(struct ath_hw *ah)
786786 {
787+ struct ath_common *common = ath9k_hw_common(ah);
788+ int i = 0;
789+
787790 REG_CLR_BIT(ah, PLL3, PLL3_DO_MEAS_MASK);
788791 udelay(100);
789792 REG_SET_BIT(ah, PLL3, PLL3_DO_MEAS_MASK);
790793
791− while ((REG_READ(ah, PLL4) & PLL4_MEAS_DONE) == 0)
794+ while ((REG_READ(ah, PLL4) & PLL4_MEAS_DONE) == 0) {
795+
792796 udelay(100);
793797
798+ if (WARN_ON_ONCE(i >= 100)) {
799+ ath_err(common, "PLL4 meaurement not done\n");
800+ break;
801+ }
802+
803+ i++;
804+ }
805+
794806 return (REG_READ(ah, PLL3) & SQSUM_DVC_MASK) >> 3;
795807 }
796808 EXPORT_SYMBOL(ar9003_get_pll_sqsum_dvc);
drivers/net/wireless/ath/ath9k/main.c+9−18
@@ -971,6 +971,15 @@ void ath_hw_pll_work(struct work_struct *work) · 970 unmodified lines
971971 hw_pll_work.work);
972972 u32 pll_sqsum;
973973
974+ /*
975+ * ensure that the PLL WAR is executed only
976+ * after the STA is associated (or) if the
977+ * beaconing had started in interfaces that
978+ * uses beacons.
979+ */
980+ if (!(sc->sc_flags & SC_OP_BEACONS))
981+ return;
982+
974983 if (AR_SREV_9485(sc->sc_ah)) {
975984
976985 ath9k_ps_wakeup(sc);
@@ -1443,15 +1452,6 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, · 466 unmodified lines
14431452 }
14441453 }
14451454
1446− if ((ah->opmode == NL80211_IFTYPE_ADHOC) ||
1447− ((vif->type == NL80211_IFTYPE_ADHOC) &&
1448− sc->nvifs > 0)) {
1449− ath_err(common, "Cannot create ADHOC interface when other"
1450− " interfaces already exist.\n");
1451− ret = -EINVAL;
1452− goto out;
1453− }
1454−
14551455 ath_dbg(common, CONFIG, "Attach a VIF of type: %d\n", vif->type);
14561456
14571457 sc->nvifs++;
@@ -1476,15 +1476,6 @@ static int ath9k_change_interface(struct ieee80211_hw *hw, · 18 unmodified lines
14761476 mutex_lock(&sc->mutex);
14771477 ath9k_ps_wakeup(sc);
14781478
1479− /* See if new interface type is valid. */
1480− if ((new_type == NL80211_IFTYPE_ADHOC) &&
1481− (sc->nvifs > 1)) {
1482− ath_err(common, "When using ADHOC, it must be the only"
1483− " interface.\n");
1484− ret = -EINVAL;
1485− goto out;
1486− }
1487−
14881479 if (ath9k_uses_beacons(new_type) &&
14891480 !ath9k_uses_beacons(vif->type)) {
14901481 if (sc->nbcnvifs >= ATH_BCBUF) {
drivers/net/wireless/ath/ath9k/xmit.c+18−13
@@ -938,6 +938,7 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf, · 937 unmodified lines
938938 struct ieee80211_tx_rate *rates;
939939 const struct ieee80211_rate *rate;
940940 struct ieee80211_hdr *hdr;
941+ struct ath_frame_info *fi = get_frame_info(bf->bf_mpdu);
941942 int i;
942943 u8 rix = 0;
943944
@@ -948,18 +949,7 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf, · 4 unmodified lines
948949
949950 /* set dur_update_en for l-sig computation except for PS-Poll frames */
950951 info->dur_update = !ieee80211_is_pspoll(hdr->frame_control);
951−
952− /*
953− * We check if Short Preamble is needed for the CTS rate by
954− * checking the BSS's global flag.
955− * But for the rate series, IEEE80211_TX_RC_USE_SHORT_PREAMBLE is used.
956− */
957− rate = ieee80211_get_rts_cts_rate(sc->hw, tx_info);
958− info->rtscts_rate = rate->hw_value;
959−
960− if (tx_info->control.vif &&
961− tx_info->control.vif->bss_conf.use_short_preamble)
962− info->rtscts_rate |= rate->hw_value_short;
952+ info->rtscts_rate = fi->rtscts_rate;
963953
964954 for (i = 0; i < 4; i++) {
965955 bool is_40, is_sgi, is_sp;
@@ -1001,13 +991,13 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf, · 35 unmodified lines
1001991 }
1002992
1003993 /* legacy rates */
994+ rate = &sc->sbands[tx_info->band].bitrates[rates[i].idx];
1004995 if ((tx_info->band == IEEE80211_BAND_2GHZ) &&
1005996 !(rate->flags & IEEE80211_RATE_ERP_G))
1006997 phy = WLAN_RC_PHY_CCK;
1007998 else
1008999 phy = WLAN_RC_PHY_OFDM;
10091000
1010− rate = &sc->sbands[tx_info->band].bitrates[rates[i].idx];
10111001 info->rates[i].Rate = rate->hw_value;
10121002 if (rate->hw_value_short) {
10131003 if (rates[i].flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE)
@@ -1776,10 +1766,22 @@ static void setup_frame_info(struct ieee80211_hw *hw, struct sk_buff *skb, · 762 unmodified lines
17761766 struct ieee80211_sta *sta = tx_info->control.sta;
17771767 struct ieee80211_key_conf *hw_key = tx_info->control.hw_key;
17781768 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
1769+ const struct ieee80211_rate *rate;
17791770 struct ath_frame_info *fi = get_frame_info(skb);
17801771 struct ath_node *an = NULL;
17811772 enum ath9k_key_type keytype;
1773+ bool short_preamble = false;
1774+
1775+ /*
1776+ * We check if Short Preamble is needed for the CTS rate by
1777+ * checking the BSS's global flag.
1778+ * But for the rate series, IEEE80211_TX_RC_USE_SHORT_PREAMBLE is used.
1779+ */
1780+ if (tx_info->control.vif &&
1781+ tx_info->control.vif->bss_conf.use_short_preamble)
1782+ short_preamble = true;
17821783
1784+ rate = ieee80211_get_rts_cts_rate(hw, tx_info);
17831785 keytype = ath9k_cmn_get_hw_crypto_keytype(skb);
17841786
17851787 if (sta)
@@ -1794,6 +1796,9 @@ static void setup_frame_info(struct ieee80211_hw *hw, struct sk_buff *skb, · 8 unmodified lines
17941796 fi->keyix = ATH9K_TXKEYIX_INVALID;
17951797 fi->keytype = keytype;
17961798 fi->framelen = framelen;
1799+ fi->rtscts_rate = rate->hw_value;
1800+ if (short_preamble)
1801+ fi->rtscts_rate |= rate->hw_value_short;
17971802 }
17981803
17991804 u8 ath_txchainmask_reduction(struct ath_softc *sc, u8 chainmask, u32 rate)
drivers/net/wireless/iwlwifi/iwl-debugfs.c+6−0
@@ -2239,6 +2239,7 @@ static ssize_t iwl_dbgfs_echo_test_write(struct file *file, · 2238 unmodified lines
22392239 return count;
22402240 }
22412241
2242+#ifdef CONFIG_IWLWIFI_DEBUG
22422243 static ssize_t iwl_dbgfs_log_event_read(struct file *file,
22432244 char __user *user_buf,
22442245 size_t count, loff_t *ppos)
@@ -2276,6 +2277,7 @@ static ssize_t iwl_dbgfs_log_event_write(struct file *file, · 31 unmodified lines
22762277
22772278 return count;
22782279 }
2280+#endif
22792281
22802282 static ssize_t iwl_dbgfs_calib_disabled_read(struct file *file,
22812283 char __user *user_buf,
@@ -2345,7 +2347,9 @@ DEBUGFS_READ_FILE_OPS(bt_traffic); · 63 unmodified lines
23452347 DEBUGFS_READ_WRITE_FILE_OPS(protection_mode);
23462348 DEBUGFS_READ_FILE_OPS(reply_tx_error);
23472349 DEBUGFS_WRITE_FILE_OPS(echo_test);
2350+#ifdef CONFIG_IWLWIFI_DEBUG
23482351 DEBUGFS_READ_WRITE_FILE_OPS(log_event);
2352+#endif
23492353 DEBUGFS_READ_WRITE_FILE_OPS(calib_disabled);
23502354
23512355 /*
@@ -2405,7 +2409,9 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name) · 53 unmodified lines
24052409 DEBUGFS_ADD_FILE(rxon_flags, dir_debug, S_IWUSR);
24062410 DEBUGFS_ADD_FILE(rxon_filter_flags, dir_debug, S_IWUSR);
24072411 DEBUGFS_ADD_FILE(echo_test, dir_debug, S_IWUSR);
2412+#ifdef CONFIG_IWLWIFI_DEBUG
24082413 DEBUGFS_ADD_FILE(log_event, dir_debug, S_IWUSR | S_IRUSR);
2414+#endif
24092415
24102416 if (iwl_advanced_bt_coexist(priv))
24112417 DEBUGFS_ADD_FILE(bt_traffic, dir_debug, S_IRUSR);
drivers/net/wireless/mwifiex/cfg80211.c+11−14
@@ -1484,7 +1484,7 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy, · 1483 unmodified lines
14841484 struct wireless_dev *wdev;
14851485
14861486 if (!adapter)
1487− return NULL;
1487+ return ERR_PTR(-EFAULT);
14881488
14891489 switch (type) {
14901490 case NL80211_IFTYPE_UNSPECIFIED:
@@ -1494,12 +1494,12 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy, · 3 unmodified lines
14941494 if (priv->bss_mode) {
14951495 wiphy_err(wiphy,
14961496 "cannot create multiple sta/adhoc ifaces\n");
1497− return NULL;
1497+ return ERR_PTR(-EINVAL);
14981498 }
14991499
15001500 wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL);
15011501 if (!wdev)
1502− return NULL;
1502+ return ERR_PTR(-ENOMEM);
15031503
15041504 wdev->wiphy = wiphy;
15051505 priv->wdev = wdev;
@@ -1522,12 +1522,12 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy, · 16 unmodified lines
15221522
15231523 if (priv->bss_mode) {
15241524 wiphy_err(wiphy, "Can't create multiple AP interfaces");
1525− return NULL;
1525+ return ERR_PTR(-EINVAL);
15261526 }
15271527
15281528 wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL);
15291529 if (!wdev)
1530− return NULL;
1530+ return ERR_PTR(-ENOMEM);
15311531
15321532 priv->wdev = wdev;
15331533 wdev->wiphy = wiphy;
@@ -1544,14 +1544,15 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy, · 10 unmodified lines
15441544 break;
15451545 default:
15461546 wiphy_err(wiphy, "type not supported\n");
1547− return NULL;
1547+ return ERR_PTR(-EINVAL);
15481548 }
15491549
15501550 dev = alloc_netdev_mq(sizeof(struct mwifiex_private *), name,
15511551 ether_setup, 1);
15521552 if (!dev) {
15531553 wiphy_err(wiphy, "no memory available for netdevice\n");
1554− goto error;
1554+ priv->bss_mode = NL80211_IFTYPE_UNSPECIFIED;
1555+ return ERR_PTR(-ENOMEM);
15551556 }
15561557
15571558 mwifiex_init_priv_params(priv, dev);
@@ -1582,7 +1583,9 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy, · 24 unmodified lines
15821583 /* Register network device */
15831584 if (register_netdevice(dev)) {
15841585 wiphy_err(wiphy, "cannot register virtual network device\n");
1585− goto error;
1586+ free_netdev(dev);
1587+ priv->bss_mode = NL80211_IFTYPE_UNSPECIFIED;
1588+ return ERR_PTR(-EFAULT);
15861589 }
15871590
15881591 sema_init(&priv->async_sem, 1);
@@ -1594,12 +1597,6 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy, · 5 unmodified lines
15941597 mwifiex_dev_debugfs_init(priv);
15951598 #endif
15961599 return dev;
1597−error:
1598− if (dev && (dev->reg_state == NETREG_UNREGISTERED))
1599− free_netdev(dev);
1600− priv->bss_mode = NL80211_IFTYPE_UNSPECIFIED;
1601−
1602− return NULL;
16031600 }
16041601 EXPORT_SYMBOL_GPL(mwifiex_add_virtual_intf);
16051602
drivers/net/wireless/mwifiex/txrx.c+3−7
@@ -161,15 +161,11 @@ int mwifiex_write_data_complete(struct mwifiex_adapter *adapter, · 160 unmodified lines
161161 goto done;
162162
163163 for (i = 0; i < adapter->priv_num; i++) {
164−
165164 tpriv = adapter->priv[i];
166165
167− if ((GET_BSS_ROLE(tpriv) == MWIFIEX_BSS_ROLE_STA) &&
168− (tpriv->media_connected)) {
169− if (netif_queue_stopped(tpriv->netdev))
170− mwifiex_wake_up_net_dev_queue(tpriv->netdev,
171− adapter);
172− }
166+ if (tpriv->media_connected &&
167+ netif_queue_stopped(tpriv->netdev))
168+ mwifiex_wake_up_net_dev_queue(tpriv->netdev, adapter);
173169 }
174170 done:
175171 dev_kfree_skb_any(skb);
drivers/net/wireless/mwifiex/uap_cmd.c+11−0
@@ -27,6 +27,17 @@ int mwifiex_set_secure_params(struct mwifiex_private *priv, · 26 unmodified lines
2727 struct cfg80211_ap_settings *params) {
2828 int i;
2929
30+ if (!params->privacy) {
31+ bss_config->protocol = PROTOCOL_NO_SECURITY;
32+ bss_config->key_mgmt = KEY_MGMT_NONE;
33+ bss_config->wpa_cfg.length = 0;
34+ priv->sec_info.wep_enabled = 0;
35+ priv->sec_info.wpa_enabled = 0;
36+ priv->sec_info.wpa2_enabled = 0;
37+
38+ return 0;
39+ }
40+
3041 switch (params->auth_type) {
3142 case NL80211_AUTHTYPE_OPEN_SYSTEM:
3243 bss_config->auth_mode = WLAN_AUTH_OPEN;
drivers/net/wireless/rndis_wlan.c+1−1
@@ -2110,7 +2110,7 @@ resize_buf: · 2109 unmodified lines
21102110 while (check_bssid_list_item(bssid, bssid_len, buf, len)) {
21112111 if (rndis_bss_info_update(usbdev, bssid) && match_bssid &&
21122112 matched) {
2113− if (!ether_addr_equal(bssid->mac, match_bssid))
2113+ if (ether_addr_equal(bssid->mac, match_bssid))
21142114 *matched = true;
21152115 }
21162116
drivers/net/wireless/ti/wl1251/acx.c+1−1
@@ -869,7 +869,7 @@ int wl1251_acx_tsf_info(struct wl1251 *wl, u64 *mactime) · 868 unmodified lines
869869 }
870870
871871 *mactime = tsf_info->current_tsf_lsb |
872− (tsf_info->current_tsf_msb << 31);
872+ ((u64)tsf_info->current_tsf_msb << 32);
873873
874874 out:
875875 kfree(tsf_info);
drivers/net/wireless/ti/wl1251/event.c+1−2
@@ -76,8 +76,7 @@ static int wl1251_event_process(struct wl1251 *wl, struct event_mailbox *mbox) · 75 unmodified lines
7676 }
7777 }
7878
79− if (vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID &&
80− wl->station_mode != STATION_ACTIVE_MODE) {
79+ if (vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID) {
8180 wl1251_debug(DEBUG_EVENT, "SYNCHRONIZATION_TIMEOUT_EVENT");
8281
8382 /* indicate to the stack, that beacons have been lost */
drivers/net/wireless/ti/wl1251/spi.c+4−0
@@ -73,6 +73,8 @@ static void wl1251_spi_reset(struct wl1251 *wl) · 72 unmodified lines
7373 spi_sync(wl_to_spi(wl), &m);
7474
7575 wl1251_dump(DEBUG_SPI, "spi reset -> ", cmd, WSPI_INIT_CMD_LEN);
76+
77+ kfree(cmd);
7678 }
7779
7880 static void wl1251_spi_wake(struct wl1251 *wl)
@@ -127,6 +129,8 @@ static void wl1251_spi_wake(struct wl1251 *wl) · 48 unmodified lines
127129 spi_sync(wl_to_spi(wl), &m);
128130
129131 wl1251_dump(DEBUG_SPI, "spi init -> ", cmd, WSPI_INIT_CMD_LEN);
132+
133+ kfree(cmd);
130134 }
131135
132136 static void wl1251_spi_reset_wake(struct wl1251 *wl)
drivers/net/xen-netfront.c+4−4
@@ -1935,14 +1935,14 @@ static int __devexit xennet_remove(struct xenbus_device *dev) · 1934 unmodified lines
19351935
19361936 dev_dbg(&dev->dev, "%s\n", dev->nodename);
19371937
1938− unregister_netdev(info->netdev);
1939−
19401938 xennet_disconnect_backend(info);
19411939
1942− del_timer_sync(&info->rx_refill_timer);
1943−
19441940 xennet_sysfs_delif(info->netdev);
19451941
1942+ unregister_netdev(info->netdev);
1943+
1944+ del_timer_sync(&info->rx_refill_timer);
1945+
19461946 free_percpu(info->stats);
19471947
19481948 free_netdev(info->netdev);
drivers/oprofile/oprofile_perf.c+1−1
@@ -25,7 +25,7 @@ static int oprofile_perf_enabled; · 24 unmodified lines
2525 static DEFINE_MUTEX(oprofile_perf_mutex);
2626
2727 static struct op_counter_config *counter_config;
28−static struct perf_event **perf_events[nr_cpumask_bits];
28+static struct perf_event **perf_events[NR_CPUS];
2929 static int num_counters;
3030
3131 /*
drivers/regulator/palmas-regulator.c+5−2
@@ -673,7 +673,9 @@ static __devinit int palmas_probe(struct platform_device *pdev) · 672 unmodified lines
673673 pmic->desc[id].ops = &palmas_ops_smps10;
674674 pmic->desc[id].vsel_reg = PALMAS_SMPS10_CTRL;
675675 pmic->desc[id].vsel_mask = SMPS10_VSEL;
676− pmic->desc[id].enable_reg = PALMAS_SMPS10_STATUS;
676+ pmic->desc[id].enable_reg =
677+ PALMAS_BASE_TO_REG(PALMAS_SMPS_BASE,
678+ PALMAS_SMPS10_STATUS);
677679 pmic->desc[id].enable_mask = SMPS10_BOOST_EN;
678680 }
679681
@@ -739,7 +741,8 @@ static __devinit int palmas_probe(struct platform_device *pdev) · 59 unmodified lines
739741
740742 pmic->desc[id].type = REGULATOR_VOLTAGE;
741743 pmic->desc[id].owner = THIS_MODULE;
742− pmic->desc[id].enable_reg = palmas_regs_info[id].ctrl_addr;
744+ pmic->desc[id].enable_reg = PALMAS_BASE_TO_REG(PALMAS_LDO_BASE,
745+ palmas_regs_info[id].ctrl_addr);
743746 pmic->desc[id].enable_mask = PALMAS_LDO1_CTRL_MODE_ACTIVE;
744747
745748 if (pdata && pdata->reg_data)
drivers/regulator/tps65023-regulator.c+1−1
@@ -71,7 +71,7 @@ · 70 unmodified lines
7171
7272 /* LDO_CTRL bitfields */
7373 #define TPS65023_LDO_CTRL_LDOx_SHIFT(ldo_id) ((ldo_id)*4)
74−#define TPS65023_LDO_CTRL_LDOx_MASK(ldo_id) (0x0F << ((ldo_id)*4))
74+#define TPS65023_LDO_CTRL_LDOx_MASK(ldo_id) (0x07 << ((ldo_id)*4))
7575
7676 /* Number of step-down converters available */
7777 #define TPS65023_NUM_DCDC 3
drivers/regulator/tps6524x-regulator.c+1−1
@@ -482,7 +482,7 @@ static int get_voltage_sel(struct regulator_dev *rdev) · 481 unmodified lines
482482 info = &supply_info[rdev_get_id(rdev)];
483483
484484 if (info->flags & FIXED_VOLTAGE)
485− return info->fixed_voltage;
485+ return 0;
486486
487487 ret = read_field(hw, &info->voltage);
488488 if (ret < 0)
drivers/scsi/sd.c+2−0
@@ -1899,6 +1899,8 @@ static int sd_try_rc16_first(struct scsi_device *sdp) · 1898 unmodified lines
18991899 {
19001900 if (sdp->host->max_cmd_len < 16)
19011901 return 0;
1902+ if (sdp->try_rc_10_first)
1903+ return 0;
19021904 if (sdp->scsi_level > SCSI_SPC_2)
19031905 return 1;
19041906 if (scsi_device_protection(sdp))
drivers/staging/media/lirc/lirc_serial.c+6−0
@@ -129,6 +129,7 @@ static void send_space_homebrew(long length); · 128 unmodified lines
129129
130130 static struct lirc_serial hardware[] = {
131131 [LIRC_HOMEBREW] = {
132+ .lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_HOMEBREW].lock),
132133 .signal_pin = UART_MSR_DCD,
133134 .signal_pin_change = UART_MSR_DDCD,
134135 .on = (UART_MCR_RTS | UART_MCR_OUT2 | UART_MCR_DTR),
@@ -145,6 +146,7 @@ static struct lirc_serial hardware[] = { · 10 unmodified lines
145146 },
146147
147148 [LIRC_IRDEO] = {
149+ .lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_IRDEO].lock),
148150 .signal_pin = UART_MSR_DSR,
149151 .signal_pin_change = UART_MSR_DDSR,
150152 .on = UART_MCR_OUT2,
@@ -156,6 +158,7 @@ static struct lirc_serial hardware[] = { · 5 unmodified lines
156158 },
157159
158160 [LIRC_IRDEO_REMOTE] = {
161+ .lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_IRDEO_REMOTE].lock),
159162 .signal_pin = UART_MSR_DSR,
160163 .signal_pin_change = UART_MSR_DDSR,
161164 .on = (UART_MCR_RTS | UART_MCR_DTR | UART_MCR_OUT2),
@@ -167,6 +170,7 @@ static struct lirc_serial hardware[] = { · 5 unmodified lines
167170 },
168171
169172 [LIRC_ANIMAX] = {
173+ .lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_ANIMAX].lock),
170174 .signal_pin = UART_MSR_DCD,
171175 .signal_pin_change = UART_MSR_DDCD,
172176 .on = 0,
@@ -177,6 +181,7 @@ static struct lirc_serial hardware[] = { · 4 unmodified lines
177181 },
178182
179183 [LIRC_IGOR] = {
184+ .lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_IGOR].lock),
180185 .signal_pin = UART_MSR_DSR,
181186 .signal_pin_change = UART_MSR_DDSR,
182187 .on = (UART_MCR_RTS | UART_MCR_OUT2 | UART_MCR_DTR),
@@ -201,6 +206,7 @@ static struct lirc_serial hardware[] = { · 18 unmodified lines
201206 * See also http://www.nslu2-linux.org for this device
202207 */
203208 [LIRC_NSLU2] = {
209+ .lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_NSLU2].lock),
204210 .signal_pin = UART_MSR_CTS,
205211 .signal_pin_change = UART_MSR_DCTS,
206212 .on = (UART_MCR_RTS | UART_MCR_OUT2 | UART_MCR_DTR),
drivers/usb/Makefile+1−1
@@ -46,7 +46,7 @@ obj-$(CONFIG_USB_MICROTEK) += image/ · 45 unmodified lines
4646 obj-$(CONFIG_USB_SERIAL) += serial/
4747
4848 obj-$(CONFIG_USB) += misc/
49−obj-$(CONFIG_USB) += phy/
49+obj-$(CONFIG_USB_COMMON) += phy/
5050 obj-$(CONFIG_EARLY_PRINTK_DBGP) += early/
5151
5252 obj-$(CONFIG_USB_ATM) += atm/
drivers/usb/dwc3/gadget.c+2−1
@@ -1091,7 +1091,7 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep, · 1090 unmodified lines
10911091 if (r == req) {
10921092 /* wait until it is processed */
10931093 dwc3_stop_active_transfer(dwc, dep->number);
1094− goto out0;
1094+ goto out1;
10951095 }
10961096 dev_err(dwc->dev, "request %p was not queued to %s\n",
10971097 request, ep->name);
@@ -1099,6 +1099,7 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep, · 1 unmodified line
10991099 goto out0;
11001100 }
11011101
1102+out1:
11021103 /* giveback the request */
11031104 dwc3_gadget_giveback(dep, req, -ECONNRESET);
11041105
drivers/usb/gadget/fsl_qe_udc.h+2−2
@@ -153,10 +153,10 @@ struct usb_ep_para{ · 152 unmodified lines
153153 #define USB_BUSMODE_DTB 0x02
154154
155155 /* Endpoint basic handle */
156−#define ep_index(EP) ((EP)->desc->bEndpointAddress & 0xF)
156+#define ep_index(EP) ((EP)->ep.desc->bEndpointAddress & 0xF)
157157 #define ep_maxpacket(EP) ((EP)->ep.maxpacket)
158158 #define ep_is_in(EP) ((ep_index(EP) == 0) ? (EP->udc->ep0_dir == \
159− USB_DIR_IN) : ((EP)->desc->bEndpointAddress \
159+ USB_DIR_IN) : ((EP)->ep.desc->bEndpointAddress \
160160 & USB_DIR_IN) == USB_DIR_IN)
161161
162162 /* ep0 transfer state */
drivers/usb/gadget/lpc32xx_udc.c+1−0
@@ -61,6 +61,7 @@ · 60 unmodified lines
6161 #include <mach/irqs.h>
6262 #include <mach/board.h>
6363 #ifdef CONFIG_USB_GADGET_DEBUG_FILES
64+#include <linux/debugfs.h>
6465 #include <linux/seq_file.h>
6566 #endif
6667
drivers/usb/musb/musb_host.c+12−2
@@ -375,11 +375,21 @@ static void musb_advance_schedule(struct musb *musb, struct urb *urb, · 374 unmodified lines
375375 */
376376 if (list_empty(&qh->hep->urb_list)) {
377377 struct list_head *head;
378+ struct dma_controller *dma = musb->dma_controller;
378379
379− if (is_in)
380+ if (is_in) {
380381 ep->rx_reinit = 1;
381− else
382+ if (ep->rx_channel) {
383+ dma->channel_release(ep->rx_channel);
384+ ep->rx_channel = NULL;
385+ }
386+ } else {
382387 ep->tx_reinit = 1;
388+ if (ep->tx_channel) {
389+ dma->channel_release(ep->tx_channel);
390+ ep->tx_channel = NULL;
391+ }
392+ }
383393
384394 /* Clobber old pointers to this qh */
385395 musb_ep_set_qh(ep, is_in, NULL);
drivers/usb/otg/twl6030-usb.c+6−9
@@ -305,9 +305,8 @@ static irqreturn_t twl6030_usbotg_irq(int irq, void *_twl) · 304 unmodified lines
305305
306306 regulator_enable(twl->usb3v3);
307307 twl->asleep = 1;
308− twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_EN_HI_CLR, 0x1);
309− twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_EN_HI_SET,
310− 0x10);
308+ twl6030_writeb(twl, TWL_MODULE_USB, 0x1, USB_ID_INT_EN_HI_CLR);
309+ twl6030_writeb(twl, TWL_MODULE_USB, 0x10, USB_ID_INT_EN_HI_SET);
311310 status = USB_EVENT_ID;
312311 otg->default_a = true;
313312 twl->phy.state = OTG_STATE_A_IDLE;
@@ -316,12 +315,10 @@ static irqreturn_t twl6030_usbotg_irq(int irq, void *_twl) · 2 unmodified lines
316315 atomic_notifier_call_chain(&twl->phy.notifier, status,
317316 otg->gadget);
318317 } else {
319− twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_EN_HI_CLR,
320− 0x10);
321− twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_EN_HI_SET,
322− 0x1);
318+ twl6030_writeb(twl, TWL_MODULE_USB, 0x10, USB_ID_INT_EN_HI_CLR);
319+ twl6030_writeb(twl, TWL_MODULE_USB, 0x1, USB_ID_INT_EN_HI_SET);
323320 }
324− twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_LATCH_CLR, status);
321+ twl6030_writeb(twl, TWL_MODULE_USB, status, USB_ID_INT_LATCH_CLR);
325322
326323 return IRQ_HANDLED;
327324 }
@@ -343,7 +340,7 @@ static int twl6030_enable_irq(struct usb_phy *x) · 15 unmodified lines
343340 {
344341 struct twl6030_usb *twl = phy_to_twl(x);
345342
346− twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_EN_HI_SET, 0x1);
343+ twl6030_writeb(twl, TWL_MODULE_USB, 0x1, USB_ID_INT_EN_HI_SET);
347344 twl6030_interrupt_unmask(0x05, REG_INT_MSK_LINE_C);
348345 twl6030_interrupt_unmask(0x05, REG_INT_MSK_STS_C);
349346
drivers/usb/phy/Kconfig+2−2
@@ -2,11 +2,11 @@ · 1 unmodified line
22 # Physical Layer USB driver configuration
33 #
44 comment "USB Physical Layer drivers"
5− depends on USB
5+ depends on USB || USB_GADGET
66
77 config USB_ISP1301
88 tristate "NXP ISP1301 USB transceiver support"
9− depends on USB
9+ depends on USB || USB_GADGET
1010 depends on I2C
1111 help
1212 Say Y here to add support for the NXP ISP1301 USB transceiver driver.
drivers/usb/serial/cp210x.c+11−0
@@ -93,6 +93,7 @@ static const struct usb_device_id id_table[] = { · 92 unmodified lines
9393 { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */
9494 { USB_DEVICE(0x10C4, 0x8156) }, /* B&G H3000 link cable */
9595 { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */
96+ { USB_DEVICE(0x10C4, 0x815F) }, /* Timewave HamLinkUSB */
9697 { USB_DEVICE(0x10C4, 0x818B) }, /* AVIT Research USB to TTL */
9798 { USB_DEVICE(0x10C4, 0x819F) }, /* MJS USB Toslink Switcher */
9899 { USB_DEVICE(0x10C4, 0x81A6) }, /* ThinkOptics WavIt */
@@ -134,7 +135,13 @@ static const struct usb_device_id id_table[] = { · 35 unmodified lines
134135 { USB_DEVICE(0x10CE, 0xEA6A) }, /* Silicon Labs MobiData GPRS USB Modem 100EU */
135136 { USB_DEVICE(0x13AD, 0x9999) }, /* Baltech card reader */
136137 { USB_DEVICE(0x1555, 0x0004) }, /* Owen AC4 USB-RS485 Converter */
138+ { USB_DEVICE(0x166A, 0x0201) }, /* Clipsal 5500PACA C-Bus Pascal Automation Controller */
139+ { USB_DEVICE(0x166A, 0x0301) }, /* Clipsal 5800PC C-Bus Wireless PC Interface */
137140 { USB_DEVICE(0x166A, 0x0303) }, /* Clipsal 5500PCU C-Bus USB interface */
141+ { USB_DEVICE(0x166A, 0x0304) }, /* Clipsal 5000CT2 C-Bus Black and White Touchscreen */
142+ { USB_DEVICE(0x166A, 0x0305) }, /* Clipsal C-5000CT2 C-Bus Spectrum Colour Touchscreen */
143+ { USB_DEVICE(0x166A, 0x0401) }, /* Clipsal L51xx C-Bus Architectural Dimmer */
144+ { USB_DEVICE(0x166A, 0x0101) }, /* Clipsal 5560884 C-Bus Multi-room Audio Matrix Switcher */
138145 { USB_DEVICE(0x16D6, 0x0001) }, /* Jablotron serial interface */
139146 { USB_DEVICE(0x16DC, 0x0010) }, /* W-IE-NE-R Plein & Baus GmbH PL512 Power Supply */
140147 { USB_DEVICE(0x16DC, 0x0011) }, /* W-IE-NE-R Plein & Baus GmbH RCM Remote Control for MARATON Power Supply */
@@ -146,7 +153,11 @@ static const struct usb_device_id id_table[] = { · 5 unmodified lines
146153 { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */
147154 { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
148155 { USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */
156+ { USB_DEVICE(0x1E29, 0x0102) }, /* Festo CPX-USB */
157+ { USB_DEVICE(0x1E29, 0x0501) }, /* Festo CMSP */
149158 { USB_DEVICE(0x3195, 0xF190) }, /* Link Instruments MSO-19 */
159+ { USB_DEVICE(0x3195, 0xF280) }, /* Link Instruments MSO-28 */
160+ { USB_DEVICE(0x3195, 0xF281) }, /* Link Instruments MSO-28 */
150161 { USB_DEVICE(0x413C, 0x9500) }, /* DW700 GPS USB interface */
151162 { } /* Terminating Entry */
152163 };
drivers/usb/serial/option.c+8−0
@@ -236,6 +236,7 @@ static void option_instat_callback(struct urb *urb); · 235 unmodified lines
236236 #define NOVATELWIRELESS_PRODUCT_G1 0xA001
237237 #define NOVATELWIRELESS_PRODUCT_G1_M 0xA002
238238 #define NOVATELWIRELESS_PRODUCT_G2 0xA010
239+#define NOVATELWIRELESS_PRODUCT_MC551 0xB001
239240
240241 /* AMOI PRODUCTS */
241242 #define AMOI_VENDOR_ID 0x1614
@@ -497,6 +498,10 @@ static void option_instat_callback(struct urb *urb); · 255 unmodified lines
497498 /* MediaTek products */
498499 #define MEDIATEK_VENDOR_ID 0x0e8d
499500
501+/* Cellient products */
502+#define CELLIENT_VENDOR_ID 0x2692
503+#define CELLIENT_PRODUCT_MEN200 0x9005
504+
500505 /* some devices interfaces need special handling due to a number of reasons */
501506 enum option_blacklist_reason {
502507 OPTION_BLACKLIST_NONE = 0,
@@ -734,6 +739,8 @@ static const struct usb_device_id option_ids[] = { · 231 unmodified lines
734739 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_G1) },
735740 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_G1_M) },
736741 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_G2) },
742+ /* Novatel Ovation MC551 a.k.a. Verizon USB551L */
743+ { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC551, 0xff, 0xff, 0xff) },
737744
738745 { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01) },
739746 { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01A) },
@@ -1233,6 +1240,7 @@ static const struct usb_device_id option_ids[] = { · 493 unmodified lines
12331240 { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a1, 0xff, 0x02, 0x01) },
12341241 { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a2, 0xff, 0x00, 0x00) },
12351242 { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a2, 0xff, 0x02, 0x01) }, /* MediaTek MT6276M modem & app port */
1243+ { USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) },
12361244 { } /* Terminating entry */
12371245 };
12381246 MODULE_DEVICE_TABLE(usb, option_ids);
drivers/usb/storage/scsiglue.c+6−0
@@ -202,6 +202,12 @@ static int slave_configure(struct scsi_device *sdev) · 201 unmodified lines
202202 if (us->fflags & US_FL_NO_READ_CAPACITY_16)
203203 sdev->no_read_capacity_16 = 1;
204204
205+ /*
206+ * Many devices do not respond properly to READ_CAPACITY_16.
207+ * Tell the SCSI layer to try READ_CAPACITY_10 first.
208+ */
209+ sdev->try_rc_10_first = 1;
210+
205211 /* assume SPC3 or latter devices support sense size > 18 */
206212 if (sdev->scsi_level > SCSI_SPC_2)
207213 us->fflags |= US_FL_SANE_SENSE;
drivers/usb/storage/unusual_devs.h+0−7
@@ -1107,13 +1107,6 @@ UNUSUAL_DEV( 0x090a, 0x1200, 0x0000, 0x9999, · 1106 unmodified lines
11071107 USB_SC_RBC, USB_PR_BULK, NULL,
11081108 0 ),
11091109
1110−/* Feiya QDI U2 DISK, reported by Hans de Goede <hdegoede@redhat.com> */
1111−UNUSUAL_DEV( 0x090c, 0x1000, 0x0000, 0xffff,
1112− "Feiya",
1113− "QDI U2 DISK",
1114− USB_SC_DEVICE, USB_PR_DEVICE, NULL,
1115− US_FL_NO_READ_CAPACITY_16 ),
1116−
11171110 /* aeb */
11181111 UNUSUAL_DEV( 0x090c, 0x1132, 0x0000, 0xffff,
11191112 "Feiya",
drivers/vhost/vhost.c+3−0
@@ -191,7 +191,9 @@ static int vhost_worker(void *data) · 190 unmodified lines
191191 struct vhost_dev *dev = data;
192192 struct vhost_work *work = NULL;
193193 unsigned uninitialized_var(seq);
194+ mm_segment_t oldfs = get_fs();
194195
196+ set_fs(USER_DS);
195197 use_mm(dev->mm);
196198
197199 for (;;) {
@@ -229,6 +231,7 @@ static int vhost_worker(void *data) · 31 unmodified lines
229231
230232 }
231233 unuse_mm(dev->mm);
234+ set_fs(oldfs);
232235 return 0;
233236 }
234237
drivers/watchdog/hpwdt.c+3−1
@@ -146,7 +146,7 @@ struct cmn_registers { · 145 unmodified lines
146146 } __attribute__((packed));
147147
148148 static unsigned int hpwdt_nmi_decoding;
149−static unsigned int allow_kdump;
149+static unsigned int allow_kdump = 1;
150150 static unsigned int is_icru;
151151 static DEFINE_SPINLOCK(rom_lock);
152152 static void *cru_rom_addr;
@@ -756,6 +756,8 @@ error: · 603 unmodified lines
756756 static void hpwdt_exit_nmi_decoding(void)
757757 {
758758 unregister_nmi_handler(NMI_UNKNOWN, "hpwdt");
759+ unregister_nmi_handler(NMI_SERR, "hpwdt");
760+ unregister_nmi_handler(NMI_IO_CHECK, "hpwdt");
759761 if (cru_rom_addr)
760762 iounmap(cru_rom_addr);
761763 }
drivers/watchdog/iTCO_wdt.c+1−0
@@ -699,3 +699,4 @@ MODULE_DESCRIPTION("Intel TCO WatchDog Timer Driver"); · 698 unmodified lines
699699 MODULE_VERSION(DRV_VERSION);
700700 MODULE_LICENSE("GPL");
701701 MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
702+MODULE_ALIAS("platform:" DRV_NAME);
drivers/watchdog/watchdog_dev.c+1−1
@@ -349,7 +349,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd, · 348 unmodified lines
349349 sizeof(struct watchdog_info)) ? -EFAULT : 0;
350350 case WDIOC_GETSTATUS:
351351 err = watchdog_get_status(wdd, &val);
352− if (err)
352+ if (err == -ENODEV)
353353 return err;
354354 return put_user(val, p);
355355 case WDIOC_GETBOOTSTATUS:
fs/ubifs/debug.c+4−4
@@ -2918,7 +2918,7 @@ int dbg_debugfs_init_fs(struct ubifs_info *c) · 2917 unmodified lines
29182918 struct dentry *dent;
29192919 struct ubifs_debug_info *d = c->dbg;
29202920
2921− if (!IS_ENABLED(DEBUG_FS))
2921+ if (!IS_ENABLED(CONFIG_DEBUG_FS))
29222922 return 0;
29232923
29242924 n = snprintf(d->dfs_dir_name, UBIFS_DFS_DIR_LEN + 1, UBIFS_DFS_DIR_NAME,
@@ -3013,7 +3013,7 @@ out: · 88 unmodified lines
30133013 */
30143014 void dbg_debugfs_exit_fs(struct ubifs_info *c)
30153015 {
3016− if (IS_ENABLED(DEBUG_FS))
3016+ if (IS_ENABLED(CONFIG_DEBUG_FS))
30173017 debugfs_remove_recursive(c->dbg->dfs_dir);
30183018 }
30193019
@@ -3099,7 +3099,7 @@ int dbg_debugfs_init(void) · 79 unmodified lines
30993099 const char *fname;
31003100 struct dentry *dent;
31013101
3102− if (!IS_ENABLED(DEBUG_FS))
3102+ if (!IS_ENABLED(CONFIG_DEBUG_FS))
31033103 return 0;
31043104
31053105 fname = "ubifs";
@@ -3166,7 +3166,7 @@ out: · 60 unmodified lines
31663166 */
31673167 void dbg_debugfs_exit(void)
31683168 {
3169− if (IS_ENABLED(DEBUG_FS))
3169+ if (IS_ENABLED(CONFIG_DEBUG_FS))
31703170 debugfs_remove_recursive(dfs_rootdir);
31713171 }
31723172
fs/ubifs/find.c+2−2
@@ -939,8 +939,8 @@ static int find_dirtiest_idx_leb(struct ubifs_info *c) · 938 unmodified lines
939939 }
940940 dbg_find("LEB %d, dirty %d and free %d flags %#x", lp->lnum, lp->dirty,
941941 lp->free, lp->flags);
942− ubifs_assert(lp->flags | LPROPS_TAKEN);
943− ubifs_assert(lp->flags | LPROPS_INDEX);
942+ ubifs_assert(lp->flags & LPROPS_TAKEN);
943+ ubifs_assert(lp->flags & LPROPS_INDEX);
944944 return lnum;
945945 }
946946
fs/udf/super.c+64−38
@@ -56,6 +56,7 @@ · 55 unmodified lines
5656 #include <linux/seq_file.h>
5757 #include <linux/bitmap.h>
5858 #include <linux/crc-itu-t.h>
59+#include <linux/log2.h>
5960 #include <asm/byteorder.h>
6061
6162 #include "udf_sb.h"
@@ -1215,16 +1216,65 @@ out_bh: · 1153 unmodified lines
12151216 return ret;
12161217 }
12171218
1219+static int udf_load_sparable_map(struct super_block *sb,
1220+ struct udf_part_map *map,
1221+ struct sparablePartitionMap *spm)
1222+{
1223+ uint32_t loc;
1224+ uint16_t ident;
1225+ struct sparingTable *st;
1226+ struct udf_sparing_data *sdata = &map->s_type_specific.s_sparing;
1227+ int i;
1228+ struct buffer_head *bh;
1229+
1230+ map->s_partition_type = UDF_SPARABLE_MAP15;
1231+ sdata->s_packet_len = le16_to_cpu(spm->packetLength);
1232+ if (!is_power_of_2(sdata->s_packet_len)) {
1233+ udf_err(sb, "error loading logical volume descriptor: "
1234+ "Invalid packet length %u\n",
1235+ (unsigned)sdata->s_packet_len);
1236+ return -EIO;
1237+ }
1238+ if (spm->numSparingTables > 4) {
1239+ udf_err(sb, "error loading logical volume descriptor: "
1240+ "Too many sparing tables (%d)\n",
1241+ (int)spm->numSparingTables);
1242+ return -EIO;
1243+ }
1244+
1245+ for (i = 0; i < spm->numSparingTables; i++) {
1246+ loc = le32_to_cpu(spm->locSparingTable[i]);
1247+ bh = udf_read_tagged(sb, loc, loc, &ident);
1248+ if (!bh)
1249+ continue;
1250+
1251+ st = (struct sparingTable *)bh->b_data;
1252+ if (ident != 0 ||
1253+ strncmp(st->sparingIdent.ident, UDF_ID_SPARING,
1254+ strlen(UDF_ID_SPARING)) ||
1255+ sizeof(*st) + le16_to_cpu(st->reallocationTableLen) >
1256+ sb->s_blocksize) {
1257+ brelse(bh);
1258+ continue;
1259+ }
1260+
1261+ sdata->s_spar_map[i] = bh;
1262+ }
1263+ map->s_partition_func = udf_get_pblock_spar15;
1264+ return 0;
1265+}
1266+
12181267 static int udf_load_logicalvol(struct super_block *sb, sector_t block,
12191268 struct kernel_lb_addr *fileset)
12201269 {
12211270 struct logicalVolDesc *lvd;
1222− int i, j, offset;
1271+ int i, offset;
12231272 uint8_t type;
12241273 struct udf_sb_info *sbi = UDF_SB(sb);
12251274 struct genericPartitionMap *gpm;
12261275 uint16_t ident;
12271276 struct buffer_head *bh;
1277+ unsigned int table_len;
12281278 int ret = 0;
12291279
12301280 bh = udf_read_tagged(sb, block, block, &ident);
@@ -1232,15 +1282,20 @@ static int udf_load_logicalvol(struct super_block *sb, sector_t block, · 1 unmodified line
12321282 return 1;
12331283 BUG_ON(ident != TAG_IDENT_LVD);
12341284 lvd = (struct logicalVolDesc *)bh->b_data;
1235−
1236− i = udf_sb_alloc_partition_maps(sb, le32_to_cpu(lvd->numPartitionMaps));
1237− if (i != 0) {
1238− ret = i;
1285+ table_len = le32_to_cpu(lvd->mapTableLength);
1286+ if (sizeof(*lvd) + table_len > sb->s_blocksize) {
1287+ udf_err(sb, "error loading logical volume descriptor: "
1288+ "Partition table too long (%u > %lu)\n", table_len,
1289+ sb->s_blocksize - sizeof(*lvd));
12391290 goto out_bh;
12401291 }
12411292
1293+ ret = udf_sb_alloc_partition_maps(sb, le32_to_cpu(lvd->numPartitionMaps));
1294+ if (ret)
1295+ goto out_bh;
1296+
12421297 for (i = 0, offset = 0;
1243− i < sbi->s_partitions && offset < le32_to_cpu(lvd->mapTableLength);
1298+ i < sbi->s_partitions && offset < table_len;
12441299 i++, offset += gpm->partitionMapLength) {
12451300 struct udf_part_map *map = &sbi->s_partmaps[i];
12461301 gpm = (struct genericPartitionMap *)
@@ -1275,38 +1330,9 @@ static int udf_load_logicalvol(struct super_block *sb, sector_t block, · 28 unmodified lines
12751330 } else if (!strncmp(upm2->partIdent.ident,
12761331 UDF_ID_SPARABLE,
12771332 strlen(UDF_ID_SPARABLE))) {
1278− uint32_t loc;
1279− struct sparingTable *st;
1280− struct sparablePartitionMap *spm =
1281− (struct sparablePartitionMap *)gpm;
1282−
1283− map->s_partition_type = UDF_SPARABLE_MAP15;
1284− map->s_type_specific.s_sparing.s_packet_len =
1285− le16_to_cpu(spm->packetLength);
1286− for (j = 0; j < spm->numSparingTables; j++) {
1287− struct buffer_head *bh2;
1288−
1289− loc = le32_to_cpu(
1290− spm->locSparingTable[j]);
1291− bh2 = udf_read_tagged(sb, loc, loc,
1292− &ident);
1293− map->s_type_specific.s_sparing.
1294− s_spar_map[j] = bh2;
1295−
1296− if (bh2 == NULL)
1297− continue;
1298−
1299− st = (struct sparingTable *)bh2->b_data;
1300− if (ident != 0 || strncmp(
1301− st->sparingIdent.ident,
1302− UDF_ID_SPARING,
1303− strlen(UDF_ID_SPARING))) {
1304− brelse(bh2);
1305− map->s_type_specific.s_sparing.
1306− s_spar_map[j] = NULL;
1307− }
1308− }
1309− map->s_partition_func = udf_get_pblock_spar15;
1333+ if (udf_load_sparable_map(sb, map,
1334+ (struct sparablePartitionMap *)gpm) < 0)
1335+ goto out_bh;
13101336 } else if (!strncmp(upm2->partIdent.ident,
13111337 UDF_ID_METADATA,
13121338 strlen(UDF_ID_METADATA))) {
include/asm-generic/bug.h+9−10
@@ -3,10 +3,18 @@ · 2 unmodified lines
33
44 #include <linux/compiler.h>
55
6+#ifdef CONFIG_GENERIC_BUG
7+#define BUGFLAG_WARNING (1 << 0)
8+#define BUGFLAG_TAINT(taint) (BUGFLAG_WARNING | ((taint) << 8))
9+#define BUG_GET_TAINT(bug) ((bug)->flags >> 8)
10+#endif
11+
12+#ifndef __ASSEMBLY__
13+#include <linux/kernel.h>
14+
615 #ifdef CONFIG_BUG
716
817 #ifdef CONFIG_GENERIC_BUG
9−#ifndef __ASSEMBLY__
1018 struct bug_entry {
1119 #ifndef CONFIG_GENERIC_BUG_RELATIVE_POINTERS
1220 unsigned long bug_addr;
@@ -23,17 +31,8 @@ struct bug_entry { · 10 unmodified lines
2331 #endif
2432 unsigned short flags;
2533 };
26−#endif /* __ASSEMBLY__ */
27−
28−#define BUGFLAG_WARNING (1 << 0)
29−#define BUGFLAG_TAINT(taint) (BUGFLAG_WARNING | ((taint) << 8))
30−#define BUG_GET_TAINT(bug) ((bug)->flags >> 8)
31−
3234 #endif /* CONFIG_GENERIC_BUG */
3335
34−#ifndef __ASSEMBLY__
35−#include <linux/kernel.h>
36−
3736 /*
3837 * Don't use BUG() or BUG_ON() unless there's really no way out; one
3938 * example might be detecting data structure corruption in the middle
include/linux/irq.h+0−2
@@ -301,8 +301,6 @@ static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d) · 300 unmodified lines
301301 * @irq_pm_shutdown: function called from core code on shutdown once per chip
302302 * @irq_print_chip: optional to print special chip info in show_interrupts
303303 * @flags: chip specific flags
304− *
305− * @release: release function solely used by UML
306304 */
307305 struct irq_chip {
308306 const char *name;
include/linux/skbuff.h+2−5
@@ -225,14 +225,11 @@ enum { · 224 unmodified lines
225225 /* device driver is going to provide hardware time stamp */
226226 SKBTX_IN_PROGRESS = 1 << 2,
227227
228− /* ensure the originating sk reference is available on driver level */
229− SKBTX_DRV_NEEDS_SK_REF = 1 << 3,
230−
231228 /* device driver supports TX zero-copy buffers */
232− SKBTX_DEV_ZEROCOPY = 1 << 4,
229+ SKBTX_DEV_ZEROCOPY = 1 << 3,
233230
234231 /* generate wifi status information (where possible) */
235− SKBTX_WIFI_STATUS = 1 << 5,
232+ SKBTX_WIFI_STATUS = 1 << 4,
236233 };
237234
238235 /*
include/linux/videodev2.h+3−3
@@ -2640,9 +2640,9 @@ struct v4l2_create_buffers { · 2639 unmodified lines
26402640
26412641 /* Experimental, these three ioctls may change over the next couple of kernel
26422642 versions. */
2643−#define VIDIOC_ENUM_DV_TIMINGS _IOWR('V', 96, struct v4l2_enum_dv_timings)
2644−#define VIDIOC_QUERY_DV_TIMINGS _IOR('V', 97, struct v4l2_dv_timings)
2645−#define VIDIOC_DV_TIMINGS_CAP _IOWR('V', 98, struct v4l2_dv_timings_cap)
2643+#define VIDIOC_ENUM_DV_TIMINGS _IOWR('V', 98, struct v4l2_enum_dv_timings)
2644+#define VIDIOC_QUERY_DV_TIMINGS _IOR('V', 99, struct v4l2_dv_timings)
2645+#define VIDIOC_DV_TIMINGS_CAP _IOWR('V', 100, struct v4l2_dv_timings_cap)
26462646
26472647 /* Reminder: when adding new ioctls please add support for them to
26482648 drivers/media/video/v4l2-compat-ioctl32.c as well! */
include/net/bluetooth/hci.h+6−0
@@ -1144,6 +1144,12 @@ struct extended_inquiry_info { · 1143 unmodified lines
11441144 __u8 data[240];
11451145 } __packed;
11461146
1147+#define HCI_EV_KEY_REFRESH_COMPLETE 0x30
1148+struct hci_ev_key_refresh_complete {
1149+ __u8 status;
1150+ __le16 handle;
1151+} __packed;
1152+
11471153 #define HCI_EV_IO_CAPA_REQUEST 0x31
11481154 struct hci_ev_io_capa_request {
11491155 bdaddr_t bdaddr;
include/net/mac80211.h+6−0
@@ -1940,6 +1940,11 @@ enum ieee80211_rate_control_changed { · 1939 unmodified lines
19401940 * to also unregister the device. If it returns 1, then mac80211
19411941 * will also go through the regular complete restart on resume.
19421942 *
1943+ * @set_wakeup: Enable or disable wakeup when WoWLAN configuration is
1944+ * modified. The reason is that device_set_wakeup_enable() is
1945+ * supposed to be called when the configuration changes, not only
1946+ * in suspend().
1947+ *
19431948 * @add_interface: Called when a netdevice attached to the hardware is
19441949 * enabled. Because it is not called for monitor mode devices, @start
19451950 * and @stop must be implemented.
@@ -2966,6 +2971,7 @@ __le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw, · 1020 unmodified lines
29662971 * ieee80211_generic_frame_duration - Calculate the duration field for a frame
29672972 * @hw: pointer obtained from ieee80211_alloc_hw().
29682973 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
2974+ * @band: the band to calculate the frame duration on
29692975 * @frame_len: the length of the frame.
29702976 * @rate: the rate at which the frame is going to be transmitted.
29712977 *
include/net/phonet/gprs.h+1−1
@@ -5,7 +5,7 @@ · 4 unmodified lines
55 *
66 * Copyright (C) 2008 Nokia Corporation.
77 *
8− * Author: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
8+ * Author: Rémi Denis-Courmont
99 *
1010 * This program is free software; you can redistribute it and/or
1111 * modify it under the terms of the GNU General Public License
include/scsi/scsi_device.h+1−0
@@ -151,6 +151,7 @@ struct scsi_device { · 150 unmodified lines
151151 SD_LAST_BUGGY_SECTORS */
152152 unsigned no_read_disc_info:1; /* Avoid READ_DISC_INFO cmds */
153153 unsigned no_read_capacity_16:1; /* Avoid READ_CAPACITY_16 cmds */
154+ unsigned try_rc_10_first:1; /* Try READ_CAPACACITY_10 first */
154155 unsigned is_visible:1; /* is the device visible in sysfs */
155156
156157 DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */
include/sound/tea575x-tuner.h+2−1
@@ -44,6 +44,7 @@ struct snd_tea575x_ops { · 43 unmodified lines
4444
4545 struct snd_tea575x {
4646 struct v4l2_device *v4l2_dev;
47+ struct v4l2_file_operations fops;
4748 struct video_device vd; /* video device */
4849 int radio_nr; /* radio_nr */
4950 bool tea5759; /* 5759 chip is present */
@@ -62,7 +63,7 @@ struct snd_tea575x { · 12 unmodified lines
6263 int (*ext_init)(struct snd_tea575x *tea);
6364 };
6465
65−int snd_tea575x_init(struct snd_tea575x *tea);
66+int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner);
6667 void snd_tea575x_exit(struct snd_tea575x *tea);
6768
6869 #endif /* __SOUND_TEA575X_TUNER_H */
kernel/printk.c+214−85
@@ -193,12 +193,19 @@ static int console_may_schedule; · 192 unmodified lines
193193 * separated by ',', and find the message after the ';' character.
194194 */
195195
196+enum log_flags {
197+ LOG_DEFAULT = 0,
198+ LOG_NOCONS = 1, /* already flushed, do not print to console */
199+};
200+
196201 struct log {
197202 u64 ts_nsec; /* timestamp in nanoseconds */
198203 u16 len; /* length of entire record */
199204 u16 text_len; /* length of text buffer */
200205 u16 dict_len; /* length of dictionary buffer */
201− u16 level; /* syslog level + facility */
206+ u8 facility; /* syslog facility */
207+ u8 flags:5; /* internal record flags */
208+ u8 level:3; /* syslog level */
202209 };
203210
204211 /*
@@ -286,6 +293,7 @@ static u32 log_next(u32 idx) · 81 unmodified lines
286293
287294 /* insert record into the buffer, discard old ones, update heads */
288295 static void log_store(int facility, int level,
296+ enum log_flags flags, u64 ts_nsec,
289297 const char *dict, u16 dict_len,
290298 const char *text, u16 text_len)
291299 {
@@ -329,8 +337,13 @@ static void log_store(int facility, int level, · 37 unmodified lines
329337 msg->text_len = text_len;
330338 memcpy(log_dict(msg), dict, dict_len);
331339 msg->dict_len = dict_len;
332− msg->level = (facility << 3) | (level & 7);
333− msg->ts_nsec = local_clock();
340+ msg->facility = facility;
341+ msg->level = level & 7;
342+ msg->flags = flags & 0x1f;
343+ if (ts_nsec > 0)
344+ msg->ts_nsec = ts_nsec;
345+ else
346+ msg->ts_nsec = local_clock();
334347 memset(log_dict(msg) + dict_len, 0, pad_len);
335348 msg->len = sizeof(struct log) + text_len + dict_len + pad_len;
336349
@@ -446,7 +459,7 @@ static ssize_t devkmsg_read(struct file *file, char __user *buf, · 109 unmodified lines
446459 ts_usec = msg->ts_nsec;
447460 do_div(ts_usec, 1000);
448461 len = sprintf(user->buf, "%u,%llu,%llu;",
449− msg->level, user->seq, ts_usec);
462+ (msg->facility << 3) | msg->level, user->seq, ts_usec);
450463
451464 /* escape non-printable characters */
452465 for (i = 0; i < msg->text_len; i++) {
@@ -787,6 +800,21 @@ static bool printk_time; · 334 unmodified lines
787800 #endif
788801 module_param_named(time, printk_time, bool, S_IRUGO | S_IWUSR);
789802
803+static size_t print_time(u64 ts, char *buf)
804+{
805+ unsigned long rem_nsec;
806+
807+ if (!printk_time)
808+ return 0;
809+
810+ if (!buf)
811+ return 15;
812+
813+ rem_nsec = do_div(ts, 1000000000);
814+ return sprintf(buf, "[%5lu.%06lu] ",
815+ (unsigned long)ts, rem_nsec / 1000);
816+}
817+
790818 static size_t print_prefix(const struct log *msg, bool syslog, char *buf)
791819 {
792820 size_t len = 0;
@@ -803,18 +831,7 @@ static size_t print_prefix(const struct log *msg, bool syslog, char *buf) · 10 unmodified lines
803831 }
804832 }
805833
806− if (printk_time) {
807− if (buf) {
808− unsigned long long ts = msg->ts_nsec;
809− unsigned long rem_nsec = do_div(ts, 1000000000);
810−
811− len += sprintf(buf + len, "[%5lu.%06lu] ",
812− (unsigned long) ts, rem_nsec / 1000);
813− } else {
814− len += 15;
815− }
816− }
817−
834+ len += print_time(msg->ts_nsec, buf ? buf + len : NULL);
818835 return len;
819836 }
820837
@@ -862,28 +879,49 @@ static int syslog_print(char __user *buf, int size) · 41 unmodified lines
862879 {
863880 char *text;
864881 struct log *msg;
865− int len;
882+ int len = 0;
866883
867884 text = kmalloc(LOG_LINE_MAX, GFP_KERNEL);
868885 if (!text)
869886 return -ENOMEM;
870887
871− raw_spin_lock_irq(&logbuf_lock);
872− if (syslog_seq < log_first_seq) {
873− /* messages are gone, move to first one */
874− syslog_seq = log_first_seq;
875− syslog_idx = log_first_idx;
876− }
877− msg = log_from_idx(syslog_idx);
878− len = msg_print_text(msg, true, text, LOG_LINE_MAX);
879− syslog_idx = log_next(syslog_idx);
880− syslog_seq++;
881− raw_spin_unlock_irq(&logbuf_lock);
888+ while (size > 0) {
889+ size_t n;
882890
883− if (len > size)
884− len = -EINVAL;
885− else if (len > 0 && copy_to_user(buf, text, len))
886− len = -EFAULT;
891+ raw_spin_lock_irq(&logbuf_lock);
892+ if (syslog_seq < log_first_seq) {
893+ /* messages are gone, move to first one */
894+ syslog_seq = log_first_seq;
895+ syslog_idx = log_first_idx;
896+ }
897+ if (syslog_seq == log_next_seq) {
898+ raw_spin_unlock_irq(&logbuf_lock);
899+ break;
900+ }
901+ msg = log_from_idx(syslog_idx);
902+ n = msg_print_text(msg, true, text, LOG_LINE_MAX);
903+ if (n <= size) {
904+ syslog_idx = log_next(syslog_idx);
905+ syslog_seq++;
906+ } else
907+ n = 0;
908+ raw_spin_unlock_irq(&logbuf_lock);
909+
910+ if (!n)
911+ break;
912+
913+ len += n;
914+ size -= n;
915+ buf += n;
916+ n = copy_to_user(buf - n, text, n);
917+
918+ if (n) {
919+ len -= n;
920+ if (!len)
921+ len = -EFAULT;
922+ break;
923+ }
924+ }
887925
888926 kfree(text);
889927 return len;
@@ -1040,6 +1078,7 @@ int do_syslog(int type, char __user *buf, int len, bool from_file) · 150 unmodified lines
10401078 /* Clear ring buffer */
10411079 case SYSLOG_ACTION_CLEAR:
10421080 syslog_print_all(NULL, 0, true);
1081+ break;
10431082 /* Disable logging to console */
10441083 case SYSLOG_ACTION_CONSOLE_OFF:
10451084 if (saved_console_loglevel == -1)
@@ -1272,15 +1311,92 @@ static inline void printk_delay(void) · 226 unmodified lines
12721311 }
12731312 }
12741313
1314+/*
1315+ * Continuation lines are buffered, and not committed to the record buffer
1316+ * until the line is complete, or a race forces it. The line fragments
1317+ * though, are printed immediately to the consoles to ensure everything has
1318+ * reached the console in case of a kernel crash.
1319+ */
1320+static struct cont {
1321+ char buf[LOG_LINE_MAX];
1322+ size_t len; /* length == 0 means unused buffer */
1323+ size_t cons; /* bytes written to console */
1324+ struct task_struct *owner; /* task of first print*/
1325+ u64 ts_nsec; /* time of first print */
1326+ u8 level; /* log level of first message */
1327+ u8 facility; /* log level of first message */
1328+ bool flushed:1; /* buffer sealed and committed */
1329+} cont;
1330+
1331+static void cont_flush(void)
1332+{
1333+ if (cont.flushed)
1334+ return;
1335+ if (cont.len == 0)
1336+ return;
1337+
1338+ log_store(cont.facility, cont.level, LOG_NOCONS, cont.ts_nsec,
1339+ NULL, 0, cont.buf, cont.len);
1340+
1341+ cont.flushed = true;
1342+}
1343+
1344+static bool cont_add(int facility, int level, const char *text, size_t len)
1345+{
1346+ if (cont.len && cont.flushed)
1347+ return false;
1348+
1349+ if (cont.len + len > sizeof(cont.buf)) {
1350+ cont_flush();
1351+ return false;
1352+ }
1353+
1354+ if (!cont.len) {
1355+ cont.facility = facility;
1356+ cont.level = level;
1357+ cont.owner = current;
1358+ cont.ts_nsec = local_clock();
1359+ cont.cons = 0;
1360+ cont.flushed = false;
1361+ }
1362+
1363+ memcpy(cont.buf + cont.len, text, len);
1364+ cont.len += len;
1365+ return true;
1366+}
1367+
1368+static size_t cont_print_text(char *text, size_t size)
1369+{
1370+ size_t textlen = 0;
1371+ size_t len;
1372+
1373+ if (cont.cons == 0) {
1374+ textlen += print_time(cont.ts_nsec, text);
1375+ size -= textlen;
1376+ }
1377+
1378+ len = cont.len - cont.cons;
1379+ if (len > 0) {
1380+ if (len+1 > size)
1381+ len = size-1;
1382+ memcpy(text + textlen, cont.buf + cont.cons, len);
1383+ textlen += len;
1384+ cont.cons = cont.len;
1385+ }
1386+
1387+ if (cont.flushed) {
1388+ text[textlen++] = '\n';
1389+ /* got everything, release buffer */
1390+ cont.len = 0;
1391+ }
1392+ return textlen;
1393+}
1394+
12751395 asmlinkage int vprintk_emit(int facility, int level,
12761396 const char *dict, size_t dictlen,
12771397 const char *fmt, va_list args)
12781398 {
12791399 static int recursion_bug;
1280− static char cont_buf[LOG_LINE_MAX];
1281− static size_t cont_len;
1282− static int cont_level;
1283− static struct task_struct *cont_task;
12841400 static char textbuf[LOG_LINE_MAX];
12851401 char *text = textbuf;
12861402 size_t text_len;
@@ -1326,7 +1442,8 @@ asmlinkage int vprintk_emit(int facility, int level, · 39 unmodified lines
13261442 recursion_bug = 0;
13271443 printed_len += strlen(recursion_msg);
13281444 /* emit KERN_CRIT message */
1329− log_store(0, 2, NULL, 0, recursion_msg, printed_len);
1445+ log_store(0, 2, LOG_DEFAULT, 0,
1446+ NULL, 0, recursion_msg, printed_len);
13301447 }
13311448
13321449 /*
@@ -1364,55 +1481,37 @@ asmlinkage int vprintk_emit(int facility, int level, · 31 unmodified lines
13641481 }
13651482
13661483 if (!newline) {
1367− if (cont_len && (prefix || cont_task != current)) {
1368− /*
1369− * Flush earlier buffer, which is either from a
1370− * different thread, or when we got a new prefix.
1371− */
1372− log_store(facility, cont_level, NULL, 0, cont_buf, cont_len);
1373− cont_len = 0;
1374− }
1375−
1376− if (!cont_len) {
1377− cont_level = level;
1378− cont_task = current;
1379− }
1484+ /*
1485+ * Flush the conflicting buffer. An earlier newline was missing,
1486+ * or another task also prints continuation lines.
1487+ */
1488+ if (cont.len && (prefix || cont.owner != current))
1489+ cont_flush();
13801490
1381− /* buffer or append to earlier buffer from the same thread */
1382− if (cont_len + text_len > sizeof(cont_buf))
1383− text_len = sizeof(cont_buf) - cont_len;
1384− memcpy(cont_buf + cont_len, text, text_len);
1385− cont_len += text_len;
1491+ /* buffer line if possible, otherwise store it right away */
1492+ if (!cont_add(facility, level, text, text_len))
1493+ log_store(facility, level, LOG_DEFAULT, 0,
1494+ dict, dictlen, text, text_len);
13861495 } else {
1387− if (cont_len && cont_task == current) {
1388− if (prefix) {
1389− /*
1390− * New prefix from the same thread; flush. We
1391− * either got no earlier newline, or we race
1392− * with an interrupt.
1393− */
1394− log_store(facility, cont_level,
1395− NULL, 0, cont_buf, cont_len);
1396− cont_len = 0;
1397− }
1496+ bool stored = false;
13981497
1399− /* append to the earlier buffer and flush */
1400− if (cont_len + text_len > sizeof(cont_buf))
1401− text_len = sizeof(cont_buf) - cont_len;
1402− memcpy(cont_buf + cont_len, text, text_len);
1403− cont_len += text_len;
1404− log_store(facility, cont_level,
1405− NULL, 0, cont_buf, cont_len);
1406− cont_len = 0;
1407− cont_task = NULL;
1408− printed_len = cont_len;
1409− } else {
1410− /* ordinary single and terminated line */
1411− log_store(facility, level,
1412− dict, dictlen, text, text_len);
1413− printed_len = text_len;
1498+ /*
1499+ * If an earlier newline was missing and it was the same task,
1500+ * either merge it with the current buffer and flush, or if
1501+ * there was a race with interrupts (prefix == true) then just
1502+ * flush it out and store this line separately.
1503+ */
1504+ if (cont.len && cont.owner == current) {
1505+ if (!prefix)
1506+ stored = cont_add(facility, level, text, text_len);
1507+ cont_flush();
14141508 }
1509+
1510+ if (!stored)
1511+ log_store(facility, level, LOG_DEFAULT, 0,
1512+ dict, dictlen, text, text_len);
14151513 }
1514+ printed_len += text_len;
14161515
14171516 /*
14181517 * Try to acquire and then immediately release the console semaphore.
@@ -1499,11 +1598,18 @@ EXPORT_SYMBOL(printk); · 80 unmodified lines
14991598 #else
15001599
15011600 #define LOG_LINE_MAX 0
1601+static struct cont {
1602+ size_t len;
1603+ size_t cons;
1604+ u8 level;
1605+ bool flushed:1;
1606+} cont;
15021607 static struct log *log_from_idx(u32 idx) { return NULL; }
15031608 static u32 log_next(u32 idx) { return 0; }
15041609 static void call_console_drivers(int level, const char *text, size_t len) {}
15051610 static size_t msg_print_text(const struct log *msg, bool syslog,
15061611 char *buf, size_t size) { return 0; }
1612+static size_t cont_print_text(char *text, size_t size) { return 0; }
15071613
15081614 #endif /* CONFIG_PRINTK */
15091615
@@ -1795,6 +1901,7 @@ static u32 console_idx; · 285 unmodified lines
17951901 */
17961902 void console_unlock(void)
17971903 {
1904+ static char text[LOG_LINE_MAX];
17981905 static u64 seen_seq;
17991906 unsigned long flags;
18001907 bool wake_klogd = false;
@@ -1807,10 +1914,23 @@ void console_unlock(void) · 6 unmodified lines
18071914
18081915 console_may_schedule = 0;
18091916
1917+ /* flush buffered message fragment immediately to console */
1918+ raw_spin_lock_irqsave(&logbuf_lock, flags);
1919+ if (cont.len && (cont.cons < cont.len || cont.flushed)) {
1920+ size_t len;
1921+
1922+ len = cont_print_text(text, sizeof(text));
1923+ raw_spin_unlock(&logbuf_lock);
1924+ stop_critical_timings();
1925+ call_console_drivers(cont.level, text, len);
1926+ start_critical_timings();
1927+ local_irq_restore(flags);
1928+ } else
1929+ raw_spin_unlock_irqrestore(&logbuf_lock, flags);
1930+
18101931 again:
18111932 for (;;) {
18121933 struct log *msg;
1813− static char text[LOG_LINE_MAX];
18141934 size_t len;
18151935 int level;
18161936
@@ -1825,13 +1945,22 @@ again: · 8 unmodified lines
18251945 console_seq = log_first_seq;
18261946 console_idx = log_first_idx;
18271947 }
1828−
1948+skip:
18291949 if (console_seq == log_next_seq)
18301950 break;
18311951
18321952 msg = log_from_idx(console_idx);
1833− level = msg->level & 7;
1953+ if (msg->flags & LOG_NOCONS) {
1954+ /*
1955+ * Skip record we have buffered and already printed
1956+ * directly to the console when we received it.
1957+ */
1958+ console_idx = log_next(console_idx);
1959+ console_seq++;
1960+ goto skip;
1961+ }
18341962
1963+ level = msg->level;
18351964 len = msg_print_text(msg, false, text, sizeof(text));
18361965
18371966 console_idx = log_next(console_idx);
@@ -2409,7 +2538,7 @@ EXPORT_SYMBOL_GPL(kmsg_dump_get_line); · 571 unmodified lines
24092538 * kmsg_dump_get_buffer - copy kmsg log lines
24102539 * @dumper: registered kmsg dumper
24112540 * @syslog: include the "<4>" prefixes
2412− * @line: buffer to copy the line to
2541+ * @buf: buffer to copy the line to
24132542 * @size: maximum size of the buffer
24142543 * @len: length of line placed into buffer
24152544 *
kernel/rcutree.c+7−7
@@ -1530,7 +1530,7 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp) · 1529 unmodified lines
15301530 {
15311531 unsigned long flags;
15321532 struct rcu_head *next, *list, **tail;
1533− int bl, count, count_lazy;
1533+ int bl, count, count_lazy, i;
15341534
15351535 /* If no callbacks are ready, just return.*/
15361536 if (!cpu_has_callbacks_ready_to_invoke(rdp)) {
@@ -1553,9 +1553,9 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp) · 16 unmodified lines
15531553 rdp->nxtlist = *rdp->nxttail[RCU_DONE_TAIL];
15541554 *rdp->nxttail[RCU_DONE_TAIL] = NULL;
15551555 tail = rdp->nxttail[RCU_DONE_TAIL];
1556− for (count = RCU_NEXT_SIZE - 1; count >= 0; count--)
1557− if (rdp->nxttail[count] == rdp->nxttail[RCU_DONE_TAIL])
1558− rdp->nxttail[count] = &rdp->nxtlist;
1556+ for (i = RCU_NEXT_SIZE - 1; i >= 0; i--)
1557+ if (rdp->nxttail[i] == rdp->nxttail[RCU_DONE_TAIL])
1558+ rdp->nxttail[i] = &rdp->nxtlist;
15591559 local_irq_restore(flags);
15601560
15611561 /* Invoke callbacks. */
@@ -1583,9 +1583,9 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp) · 21 unmodified lines
15831583 if (list != NULL) {
15841584 *tail = rdp->nxtlist;
15851585 rdp->nxtlist = list;
1586− for (count = 0; count < RCU_NEXT_SIZE; count++)
1587− if (&rdp->nxtlist == rdp->nxttail[count])
1588− rdp->nxttail[count] = tail;
1586+ for (i = 0; i < RCU_NEXT_SIZE; i++)
1587+ if (&rdp->nxtlist == rdp->nxttail[i])
1588+ rdp->nxttail[i] = tail;
15891589 else
15901590 break;
15911591 }
net/9p/protocol.c+1−1
@@ -368,7 +368,7 @@ p9pdu_vwritef(struct p9_fcall *pdu, int proto_version, const char *fmt, · 367 unmodified lines
368368 const char *sptr = va_arg(ap, const char *);
369369 uint16_t len = 0;
370370 if (sptr)
371− len = min_t(uint16_t, strlen(sptr),
371+ len = min_t(size_t, strlen(sptr),
372372 USHRT_MAX);
373373
374374 errcode = p9pdu_writef(pdu, proto_version,
net/batman-adv/routing.c+2−0
@@ -617,6 +617,8 @@ int recv_tt_query(struct sk_buff *skb, struct hard_iface *recv_if) · 616 unmodified lines
617617 * changes */
618618 if (skb_linearize(skb) < 0)
619619 goto out;
620+ /* skb_linearize() possibly changed skb->data */
621+ tt_query = (struct tt_query_packet *)skb->data;
620622
621623 tt_len = tt_query->tt_data * sizeof(struct tt_change);
622624
net/batman-adv/translation-table.c+6−6
@@ -141,13 +141,14 @@ static void tt_orig_list_entry_free_rcu(struct rcu_head *rcu) · 140 unmodified lines
141141 struct tt_orig_list_entry *orig_entry;
142142
143143 orig_entry = container_of(rcu, struct tt_orig_list_entry, rcu);
144− atomic_dec(&orig_entry->orig_node->tt_size);
145144 orig_node_free_ref(orig_entry->orig_node);
146145 kfree(orig_entry);
147146 }
148147
149148 static void tt_orig_list_entry_free_ref(struct tt_orig_list_entry *orig_entry)
150149 {
150+ /* to avoid race conditions, immediately decrease the tt counter */
151+ atomic_dec(&orig_entry->orig_node->tt_size);
151152 call_rcu(&orig_entry->rcu, tt_orig_list_entry_free_rcu);
152153 }
153154
@@ -910,7 +911,6 @@ void tt_global_del_orig(struct bat_priv *bat_priv, · 756 unmodified lines
910911 }
911912 spin_unlock_bh(list_lock);
912913 }
913− atomic_set(&orig_node->tt_size, 0);
914914 orig_node->tt_initialised = false;
915915 }
916916
@@ -2031,10 +2031,10 @@ bool is_ap_isolated(struct bat_priv *bat_priv, uint8_t *src, uint8_t *dst) · 1114 unmodified lines
20312031 {
20322032 struct tt_local_entry *tt_local_entry = NULL;
20332033 struct tt_global_entry *tt_global_entry = NULL;
2034− bool ret = true;
2034+ bool ret = false;
20352035
20362036 if (!atomic_read(&bat_priv->ap_isolation))
2037− return false;
2037+ goto out;
20382038
20392039 tt_local_entry = tt_local_hash_find(bat_priv, dst);
20402040 if (!tt_local_entry)
@@ -2044,10 +2044,10 @@ bool is_ap_isolated(struct bat_priv *bat_priv, uint8_t *src, uint8_t *dst) · 3 unmodified lines
20442044 if (!tt_global_entry)
20452045 goto out;
20462046
2047− if (_is_ap_isolated(tt_local_entry, tt_global_entry))
2047+ if (!_is_ap_isolated(tt_local_entry, tt_global_entry))
20482048 goto out;
20492049
2050− ret = false;
2050+ ret = true;
20512051
20522052 out:
20532053 if (tt_global_entry)
net/bluetooth/hci_event.c+48−0
@@ -3043,6 +3043,50 @@ static inline void hci_extended_inquiry_result_evt(struct hci_dev *hdev, struct · 3042 unmodified lines
30433043 hci_dev_unlock(hdev);
30443044 }
30453045
3046+static void hci_key_refresh_complete_evt(struct hci_dev *hdev,
3047+ struct sk_buff *skb)
3048+{
3049+ struct hci_ev_key_refresh_complete *ev = (void *) skb->data;
3050+ struct hci_conn *conn;
3051+
3052+ BT_DBG("%s status %u handle %u", hdev->name, ev->status,
3053+ __le16_to_cpu(ev->handle));
3054+
3055+ hci_dev_lock(hdev);
3056+
3057+ conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle));
3058+ if (!conn)
3059+ goto unlock;
3060+
3061+ if (!ev->status)
3062+ conn->sec_level = conn->pending_sec_level;
3063+
3064+ clear_bit(HCI_CONN_ENCRYPT_PEND, &conn->flags);
3065+
3066+ if (ev->status && conn->state == BT_CONNECTED) {
3067+ hci_acl_disconn(conn, HCI_ERROR_AUTH_FAILURE);
3068+ hci_conn_put(conn);
3069+ goto unlock;
3070+ }
3071+
3072+ if (conn->state == BT_CONFIG) {
3073+ if (!ev->status)
3074+ conn->state = BT_CONNECTED;
3075+
3076+ hci_proto_connect_cfm(conn, ev->status);
3077+ hci_conn_put(conn);
3078+ } else {
3079+ hci_auth_cfm(conn, ev->status);
3080+
3081+ hci_conn_hold(conn);
3082+ conn->disc_timeout = HCI_DISCONN_TIMEOUT;
3083+ hci_conn_put(conn);
3084+ }
3085+
3086+unlock:
3087+ hci_dev_unlock(hdev);
3088+}
3089+
30463090 static inline u8 hci_get_auth_req(struct hci_conn *conn)
30473091 {
30483092 /* If remote requests dedicated bonding follow that lead */
@@ -3559,6 +3603,10 @@ void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb) · 510 unmodified lines
35593603 hci_extended_inquiry_result_evt(hdev, skb);
35603604 break;
35613605
3606+ case HCI_EV_KEY_REFRESH_COMPLETE:
3607+ hci_key_refresh_complete_evt(hdev, skb);
3608+ break;
3609+
35623610 case HCI_EV_IO_CAPA_REQUEST:
35633611 hci_io_capa_request_evt(hdev, skb);
35643612 break;
net/bluetooth/hidp/Kconfig+1−1
@@ -1,6 +1,6 @@
11 config BT_HIDP
22 tristate "HIDP protocol support"
3− depends on BT && INPUT && HID_SUPPORT
3+ depends on BT && INPUT
44 select HID
55 help
66 HIDP (Human Interface Device Protocol) is a transport layer
net/bluetooth/l2cap_core.c+14−7
@@ -1295,7 +1295,12 @@ static void security_timeout(struct work_struct *work) · 1294 unmodified lines
12951295 struct l2cap_conn *conn = container_of(work, struct l2cap_conn,
12961296 security_timer.work);
12971297
1298− l2cap_conn_del(conn->hcon, ETIMEDOUT);
1298+ BT_DBG("conn %p", conn);
1299+
1300+ if (test_and_clear_bit(HCI_CONN_LE_SMP_PEND, &conn->hcon->flags)) {
1301+ smp_chan_destroy(conn);
1302+ l2cap_conn_del(conn->hcon, ETIMEDOUT);
1303+ }
12991304 }
13001305
13011306 static struct l2cap_conn *l2cap_conn_add(struct hci_conn *hcon, u8 status)
@@ -2910,12 +2915,14 @@ static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) · 1608 unmodified lines
29102915 while (len >= L2CAP_CONF_OPT_SIZE) {
29112916 len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
29122917
2913− switch (type) {
2914− case L2CAP_CONF_RFC:
2915− if (olen == sizeof(rfc))
2916− memcpy(&rfc, (void *)val, olen);
2917− goto done;
2918− }
2918+ if (type != L2CAP_CONF_RFC)
2919+ continue;
2920+
2921+ if (olen != sizeof(rfc))
2922+ break;
2923+
2924+ memcpy(&rfc, (void *)val, olen);
2925+ goto done;
29192926 }
29202927
29212928 /* Use sane default values in case a misbehaving remote device
net/bluetooth/mgmt.c+19−1
@@ -1598,7 +1598,7 @@ static int disconnect(struct sock *sk, struct hci_dev *hdev, void *data, · 1597 unmodified lines
15981598 else
15991599 conn = hci_conn_hash_lookup_ba(hdev, LE_LINK, &cp->addr.bdaddr);
16001600
1601− if (!conn) {
1601+ if (!conn || conn->state == BT_OPEN || conn->state == BT_CLOSED) {
16021602 err = cmd_status(sk, hdev->id, MGMT_OP_DISCONNECT,
16031603 MGMT_STATUS_NOT_CONNECTED);
16041604 goto failed;
@@ -1873,6 +1873,22 @@ static void pairing_complete_cb(struct hci_conn *conn, u8 status) · 268 unmodified lines
18731873 pairing_complete(cmd, mgmt_status(status));
18741874 }
18751875
1876+static void le_connect_complete_cb(struct hci_conn *conn, u8 status)
1877+{
1878+ struct pending_cmd *cmd;
1879+
1880+ BT_DBG("status %u", status);
1881+
1882+ if (!status)
1883+ return;
1884+
1885+ cmd = find_pairing(conn);
1886+ if (!cmd)
1887+ BT_DBG("Unable to find a pending command");
1888+ else
1889+ pairing_complete(cmd, mgmt_status(status));
1890+}
1891+
18761892 static int pair_device(struct sock *sk, struct hci_dev *hdev, void *data,
18771893 u16 len)
18781894 {
@@ -1934,6 +1950,8 @@ static int pair_device(struct sock *sk, struct hci_dev *hdev, void *data, · 55 unmodified lines
19341950 /* For LE, just connecting isn't a proof that the pairing finished */
19351951 if (cp->addr.type == BDADDR_BREDR)
19361952 conn->connect_cfm_cb = pairing_complete_cb;
1953+ else
1954+ conn->connect_cfm_cb = le_connect_complete_cb;
19371955
19381956 conn->security_cfm_cb = pairing_complete_cb;
19391957 conn->disconn_cfm_cb = pairing_complete_cb;
net/bluetooth/smp.c+7−4
@@ -648,7 +648,7 @@ static u8 smp_cmd_pairing_rsp(struct l2cap_conn *conn, struct sk_buff *skb) · 647 unmodified lines
648648
649649 auth |= (req->auth_req | rsp->auth_req) & SMP_AUTH_MITM;
650650
651− ret = tk_request(conn, 0, auth, rsp->io_capability, req->io_capability);
651+ ret = tk_request(conn, 0, auth, req->io_capability, rsp->io_capability);
652652 if (ret)
653653 return SMP_UNSPECIFIED;
654654
@@ -703,7 +703,7 @@ static u8 smp_cmd_pairing_random(struct l2cap_conn *conn, struct sk_buff *skb) · 48 unmodified lines
703703 return 0;
704704 }
705705
706−static u8 smp_ltk_encrypt(struct l2cap_conn *conn)
706+static u8 smp_ltk_encrypt(struct l2cap_conn *conn, u8 sec_level)
707707 {
708708 struct smp_ltk *key;
709709 struct hci_conn *hcon = conn->hcon;
@@ -712,6 +712,9 @@ static u8 smp_ltk_encrypt(struct l2cap_conn *conn) · 2 unmodified lines
712712 if (!key)
713713 return 0;
714714
715+ if (sec_level > BT_SECURITY_MEDIUM && !key->authenticated)
716+ return 0;
717+
715718 if (test_and_set_bit(HCI_CONN_ENCRYPT_PEND, &hcon->flags))
716719 return 1;
717720
@@ -732,7 +735,7 @@ static u8 smp_cmd_security_req(struct l2cap_conn *conn, struct sk_buff *skb) · 14 unmodified lines
732735
733736 hcon->pending_sec_level = authreq_to_seclevel(rp->auth_req);
734737
735− if (smp_ltk_encrypt(conn))
738+ if (smp_ltk_encrypt(conn, hcon->pending_sec_level))
736739 return 0;
737740
738741 if (test_and_set_bit(HCI_CONN_LE_SMP_PEND, &hcon->flags))
@@ -771,7 +774,7 @@ int smp_conn_security(struct l2cap_conn *conn, __u8 sec_level) · 32 unmodified lines
771774 return 1;
772775
773776 if (hcon->link_mode & HCI_LM_MASTER)
774− if (smp_ltk_encrypt(conn))
777+ if (smp_ltk_encrypt(conn, sec_level))
775778 goto done;
776779
777780 if (test_and_set_bit(HCI_CONN_LE_SMP_PEND, &hcon->flags))
net/bridge/br_if.c+1−0
@@ -240,6 +240,7 @@ int br_add_bridge(struct net *net, const char *name) · 239 unmodified lines
240240 return -ENOMEM;
241241
242242 dev_net_set(dev, net);
243+ dev->rtnl_link_ops = &br_link_ops;
243244
244245 res = register_netdev(dev);
245246 if (res)
net/bridge/br_netlink.c+1−1
@@ -208,7 +208,7 @@ static int br_validate(struct nlattr *tb[], struct nlattr *data[]) · 207 unmodified lines
208208 return 0;
209209 }
210210
211−static struct rtnl_link_ops br_link_ops __read_mostly = {
211+struct rtnl_link_ops br_link_ops __read_mostly = {
212212 .kind = "bridge",
213213 .priv_size = sizeof(struct net_bridge),
214214 .setup = br_dev_setup,
net/bridge/br_private.h+1−0
@@ -549,6 +549,7 @@ extern int (*br_fdb_test_addr_hook)(struct net_device *dev, unsigned char *addr) · 548 unmodified lines
549549 #endif
550550
551551 /* br_netlink.c */
552+extern struct rtnl_link_ops br_link_ops;
552553 extern int br_netlink_init(void);
553554 extern void br_netlink_fini(void);
554555 extern void br_ifinfo_notify(int event, struct net_bridge_port *port);
net/caif/caif_dev.c+1−2
@@ -4,8 +4,7 @@ · 3 unmodified lines
44 * Author: Sjur Brendeland/sjur.brandeland@stericsson.com
55 * License terms: GNU General Public License (GPL) version 2
66 *
7− * Borrowed heavily from file: pn_dev.c. Thanks to
8− * Remi Denis-Courmont <remi.denis-courmont@nokia.com>
7+ * Borrowed heavily from file: pn_dev.c. Thanks to Remi Denis-Courmont
98 * and Sakari Ailus <sakari.ailus@nokia.com>
109 */
1110
net/caif/caif_socket.c+1−0
@@ -220,6 +220,7 @@ static void caif_ctrl_cb(struct cflayer *layr, · 219 unmodified lines
220220 cfsk_hold, cfsk_put);
221221 cf_sk->sk.sk_state = CAIF_CONNECTED;
222222 set_tx_flow_on(cf_sk);
223+ cf_sk->sk.sk_shutdown = 0;
223224 cf_sk->sk.sk_state_change(&cf_sk->sk);
224225 break;
225226
net/can/raw.c+0−3
@@ -681,9 +681,6 @@ static int raw_sendmsg(struct kiocb *iocb, struct socket *sock, · 680 unmodified lines
681681 if (err < 0)
682682 goto free_skb;
683683
684− /* to be able to check the received tx sock reference in raw_rcv() */
685− skb_shinfo(skb)->tx_flags |= SKBTX_DRV_NEEDS_SK_REF;
686−
687684 skb->dev = dev;
688685 skb->sk = sk;
689686
net/core/dev.c+1−22
@@ -2089,25 +2089,6 @@ static int dev_gso_segment(struct sk_buff *skb, netdev_features_t features) · 2088 unmodified lines
20892089 return 0;
20902090 }
20912091
2092−/*
2093− * Try to orphan skb early, right before transmission by the device.
2094− * We cannot orphan skb if tx timestamp is requested or the sk-reference
2095− * is needed on driver level for other reasons, e.g. see net/can/raw.c
2096− */
2097−static inline void skb_orphan_try(struct sk_buff *skb)
2098−{
2099− struct sock *sk = skb->sk;
2100−
2101− if (sk && !skb_shinfo(skb)->tx_flags) {
2102− /* skb_tx_hash() wont be able to get sk.
2103− * We copy sk_hash into skb->rxhash
2104− */
2105− if (!skb->rxhash)
2106− skb->rxhash = sk->sk_hash;
2107− skb_orphan(skb);
2108− }
2109−}
2110−
21112092 static bool can_checksum_protocol(netdev_features_t features, __be16 protocol)
21122093 {
21132094 return ((features & NETIF_F_GEN_CSUM) ||
@@ -2193,8 +2174,6 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev, · 79 unmodified lines
21932174 if (!list_empty(&ptype_all))
21942175 dev_queue_xmit_nit(skb, dev);
21952176
2196− skb_orphan_try(skb);
2197−
21982177 features = netif_skb_features(skb);
21992178
22002179 if (vlan_tx_tag_present(skb) &&
@@ -2304,7 +2283,7 @@ u16 __skb_tx_hash(const struct net_device *dev, const struct sk_buff *skb, · 103 unmodified lines
23042283 if (skb->sk && skb->sk->sk_hash)
23052284 hash = skb->sk->sk_hash;
23062285 else
2307− hash = (__force u16) skb->protocol ^ skb->rxhash;
2286+ hash = (__force u16) skb->protocol;
23082287 hash = jhash_1word(hash, hashrnd);
23092288
23102289 return (u16) (((u64) hash * qcount) >> 32) + qoffset;
net/ipv6/ip6_fib.c+2−2
@@ -1349,8 +1349,8 @@ static int fib6_walk_continue(struct fib6_walker_t *w) · 1348 unmodified lines
13491349 if (w->leaf && fn->fn_flags & RTN_RTINFO) {
13501350 int err;
13511351
1352− if (w->count < w->skip) {
1353− w->count++;
1352+ if (w->skip) {
1353+ w->skip--;
13541354 continue;
13551355 }
13561356
net/ipv6/route.c+31−10
@@ -2957,10 +2957,6 @@ static int __net_init ip6_route_net_init(struct net *net) · 2956 unmodified lines
29572957 net->ipv6.sysctl.ip6_rt_mtu_expires = 10*60*HZ;
29582958 net->ipv6.sysctl.ip6_rt_min_advmss = IPV6_MIN_MTU - 20 - 40;
29592959
2960−#ifdef CONFIG_PROC_FS
2961− proc_net_fops_create(net, "ipv6_route", 0, &ipv6_route_proc_fops);
2962− proc_net_fops_create(net, "rt6_stats", S_IRUGO, &rt6_stats_seq_fops);
2963−#endif
29642960 net->ipv6.ip6_rt_gc_expire = 30*HZ;
29652961
29662962 ret = 0;
@@ -2981,10 +2977,6 @@ out_ip6_dst_ops: · 14 unmodified lines
29812977
29822978 static void __net_exit ip6_route_net_exit(struct net *net)
29832979 {
2984−#ifdef CONFIG_PROC_FS
2985− proc_net_remove(net, "ipv6_route");
2986− proc_net_remove(net, "rt6_stats");
2987−#endif
29882980 kfree(net->ipv6.ip6_null_entry);
29892981 #ifdef CONFIG_IPV6_MULTIPLE_TABLES
29902982 kfree(net->ipv6.ip6_prohibit_entry);
@@ -2993,11 +2985,33 @@ static void __net_exit ip6_route_net_exit(struct net *net) · 2 unmodified lines
29932985 dst_entries_destroy(&net->ipv6.ip6_dst_ops);
29942986 }
29952987
2988+static int __net_init ip6_route_net_init_late(struct net *net)
2989+{
2990+#ifdef CONFIG_PROC_FS
2991+ proc_net_fops_create(net, "ipv6_route", 0, &ipv6_route_proc_fops);
2992+ proc_net_fops_create(net, "rt6_stats", S_IRUGO, &rt6_stats_seq_fops);
2993+#endif
2994+ return 0;
2995+}
2996+
2997+static void __net_exit ip6_route_net_exit_late(struct net *net)
2998+{
2999+#ifdef CONFIG_PROC_FS
3000+ proc_net_remove(net, "ipv6_route");
3001+ proc_net_remove(net, "rt6_stats");
3002+#endif
3003+}
3004+
29963005 static struct pernet_operations ip6_route_net_ops = {
29973006 .init = ip6_route_net_init,
29983007 .exit = ip6_route_net_exit,
29993008 };
30003009
3010+static struct pernet_operations ip6_route_net_late_ops = {
3011+ .init = ip6_route_net_init_late,
3012+ .exit = ip6_route_net_exit_late,
3013+};
3014+
30013015 static struct notifier_block ip6_route_dev_notifier = {
30023016 .notifier_call = ip6_route_dev_notify,
30033017 .priority = 0,
@@ -3047,19 +3061,25 @@ int __init ip6_route_init(void) · 43 unmodified lines
30473061 if (ret)
30483062 goto xfrm6_init;
30493063
3064+ ret = register_pernet_subsys(&ip6_route_net_late_ops);
3065+ if (ret)
3066+ goto fib6_rules_init;
3067+
30503068 ret = -ENOBUFS;
30513069 if (__rtnl_register(PF_INET6, RTM_NEWROUTE, inet6_rtm_newroute, NULL, NULL) ||
30523070 __rtnl_register(PF_INET6, RTM_DELROUTE, inet6_rtm_delroute, NULL, NULL) ||
30533071 __rtnl_register(PF_INET6, RTM_GETROUTE, inet6_rtm_getroute, NULL, NULL))
3054− goto fib6_rules_init;
3072+ goto out_register_late_subsys;
30553073
30563074 ret = register_netdevice_notifier(&ip6_route_dev_notifier);
30573075 if (ret)
3058− goto fib6_rules_init;
3076+ goto out_register_late_subsys;
30593077
30603078 out:
30613079 return ret;
30623080
3081+out_register_late_subsys:
3082+ unregister_pernet_subsys(&ip6_route_net_late_ops);
30633083 fib6_rules_init:
30643084 fib6_rules_cleanup();
30653085 xfrm6_init:
@@ -3078,6 +3098,7 @@ out_kmem_cache: · 12 unmodified lines
30783098 void ip6_route_cleanup(void)
30793099 {
30803100 unregister_netdevice_notifier(&ip6_route_dev_notifier);
3101+ unregister_pernet_subsys(&ip6_route_net_late_ops);
30813102 fib6_rules_cleanup();
30823103 xfrm6_fini();
30833104 fib6_gc_cleanup();
net/ipv6/tcp_ipv6.c+2−1
@@ -1212,7 +1212,8 @@ have_isn: · 1211 unmodified lines
12121212 tcp_rsk(req)->snt_isn = isn;
12131213 tcp_rsk(req)->snt_synack = tcp_time_stamp;
12141214
1215− security_inet_conn_request(sk, skb, req);
1215+ if (security_inet_conn_request(sk, skb, req))
1216+ goto drop_and_release;
12161217
12171218 if (tcp_v6_send_synack(sk, req,
12181219 (struct request_values *)&tmp_ext,
net/iucv/af_iucv.c+0−1
@@ -372,7 +372,6 @@ static int afiucv_hs_send(struct iucv_message *imsg, struct sock *sock, · 371 unmodified lines
372372 skb_trim(skb, skb->dev->mtu);
373373 }
374374 skb->protocol = ETH_P_AF_IUCV;
375− skb_shinfo(skb)->tx_flags |= SKBTX_DRV_NEEDS_SK_REF;
376375 nskb = skb_clone(skb, GFP_ATOMIC);
377376 if (!nskb)
378377 return -ENOMEM;
net/l2tp/l2tp_eth.c+33−12
@@ -42,6 +42,11 @@ struct l2tp_eth { · 41 unmodified lines
4242 struct sock *tunnel_sock;
4343 struct l2tp_session *session;
4444 struct list_head list;
45+ atomic_long_t tx_bytes;
46+ atomic_long_t tx_packets;
47+ atomic_long_t rx_bytes;
48+ atomic_long_t rx_packets;
49+ atomic_long_t rx_errors;
4550 };
4651
4752 /* via l2tp_session_priv() */
@@ -88,24 +93,40 @@ static int l2tp_eth_dev_xmit(struct sk_buff *skb, struct net_device *dev) · 40 unmodified lines
8893 struct l2tp_eth *priv = netdev_priv(dev);
8994 struct l2tp_session *session = priv->session;
9095
96+ atomic_long_add(skb->len, &priv->tx_bytes);
97+ atomic_long_inc(&priv->tx_packets);
98+
9199 l2tp_xmit_skb(session, skb, session->hdr_len);
92100
93− dev->stats.tx_bytes += skb->len;
94− dev->stats.tx_packets++;
101+ return NETDEV_TX_OK;
102+}
95103
96− return 0;
104+static struct rtnl_link_stats64 *l2tp_eth_get_stats64(struct net_device *dev,
105+ struct rtnl_link_stats64 *stats)
106+{
107+ struct l2tp_eth *priv = netdev_priv(dev);
108+
109+ stats->tx_bytes = atomic_long_read(&priv->tx_bytes);
110+ stats->tx_packets = atomic_long_read(&priv->tx_packets);
111+ stats->rx_bytes = atomic_long_read(&priv->rx_bytes);
112+ stats->rx_packets = atomic_long_read(&priv->rx_packets);
113+ stats->rx_errors = atomic_long_read(&priv->rx_errors);
114+ return stats;
97115 }
98116
117+
99118 static struct net_device_ops l2tp_eth_netdev_ops = {
100119 .ndo_init = l2tp_eth_dev_init,
101120 .ndo_uninit = l2tp_eth_dev_uninit,
102121 .ndo_start_xmit = l2tp_eth_dev_xmit,
122+ .ndo_get_stats64 = l2tp_eth_get_stats64,
103123 };
104124
105125 static void l2tp_eth_dev_setup(struct net_device *dev)
106126 {
107127 ether_setup(dev);
108− dev->priv_flags &= ~IFF_TX_SKB_SHARING;
128+ dev->priv_flags &= ~IFF_TX_SKB_SHARING;
129+ dev->features |= NETIF_F_LLTX;
109130 dev->netdev_ops = &l2tp_eth_netdev_ops;
110131 dev->destructor = free_netdev;
111132 }
@@ -114,17 +135,17 @@ static void l2tp_eth_dev_recv(struct l2tp_session *session, struct sk_buff *skb, · 2 unmodified lines
114135 {
115136 struct l2tp_eth_sess *spriv = l2tp_session_priv(session);
116137 struct net_device *dev = spriv->dev;
138+ struct l2tp_eth *priv = netdev_priv(dev);
117139
118140 if (session->debug & L2TP_MSG_DATA) {
119141 unsigned int length;
120− u8 *ptr = skb->data;
121142
122143 length = min(32u, skb->len);
123144 if (!pskb_may_pull(skb, length))
124145 goto error;
125146
126147 pr_debug("%s: eth recv\n", session->name);
127− print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, ptr, length);
148+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, skb->data, length);
128149 }
129150
130151 if (!pskb_may_pull(skb, sizeof(ETH_HLEN)))
@@ -139,15 +160,15 @@ static void l2tp_eth_dev_recv(struct l2tp_session *session, struct sk_buff *skb, · 8 unmodified lines
139160 nf_reset(skb);
140161
141162 if (dev_forward_skb(dev, skb) == NET_RX_SUCCESS) {
142− dev->stats.rx_packets++;
143− dev->stats.rx_bytes += data_len;
144− } else
145− dev->stats.rx_errors++;
146−
163+ atomic_long_inc(&priv->rx_packets);
164+ atomic_long_add(data_len, &priv->rx_bytes);
165+ } else {
166+ atomic_long_inc(&priv->rx_errors);
167+ }
147168 return;
148169
149170 error:
150− dev->stats.rx_errors++;
171+ atomic_long_inc(&priv->rx_errors);
151172 kfree_skb(skb);
152173 }
153174
net/mac80211/cfg.c+3−0
@@ -2093,6 +2093,9 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy, · 2092 unmodified lines
20932093 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
20942094 int i, ret;
20952095
2096+ if (!ieee80211_sdata_running(sdata))
2097+ return -ENETDOWN;
2098+
20962099 if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) {
20972100 ret = drv_set_bitrate_mask(local, sdata, mask);
20982101 if (ret)
net/mac80211/mlme.c+2−2
@@ -1352,6 +1352,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, · 1351 unmodified lines
13521352 if (WARN_ON(!ifmgd->associated))
13531353 return;
13541354
1355+ ieee80211_stop_poll(sdata);
1356+
13551357 memcpy(bssid, ifmgd->associated->bssid, ETH_ALEN);
13561358
13571359 ifmgd->associated = NULL;
@@ -2612,8 +2614,6 @@ static void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata, · 1254 unmodified lines
26122614 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
26132615 u8 frame_buf[DEAUTH_DISASSOC_LEN];
26142616
2615− ieee80211_stop_poll(sdata);
2616−
26172617 ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, reason,
26182618 false, frame_buf);
26192619 mutex_unlock(&ifmgd->mtx);
net/mac80211/sta_info.h+5−0
@@ -271,6 +271,9 @@ struct sta_ampdu_mlme { · 270 unmodified lines
271271 * @plink_timer: peer link watch timer
272272 * @plink_timer_was_running: used by suspend/resume to restore timers
273273 * @t_offset: timing offset relative to this host
274+ * @t_offset_setpoint: reference timing offset of this sta to be used when
275+ * calculating clockdrift
276+ * @ch_type: peer's channel type
274277 * @debugfs: debug filesystem info
275278 * @dead: set to true when sta is unlinked
276279 * @uploaded: set to true when sta is uploaded to the driver
@@ -278,6 +281,8 @@ struct sta_ampdu_mlme { · 1 unmodified line
278281 * @sta: station information we share with the driver
279282 * @sta_state: duplicates information about station state (for debug)
280283 * @beacon_loss_count: number of times beacon loss has triggered
284+ * @supports_40mhz: tracks whether the station advertised 40 MHz support
285+ * as we overwrite its HT parameters with the currently used value
281286 */
282287 struct sta_info {
283288 /* General information, mostly static */
net/mac802154/tx.c+2−1
@@ -83,9 +83,10 @@ netdev_tx_t mac802154_tx(struct mac802154_priv *priv, struct sk_buff *skb, · 82 unmodified lines
8383 {
8484 struct xmit_work *work;
8585
86− if (!(priv->phy->channels_supported[page] & (1 << chan)))
86+ if (!(priv->phy->channels_supported[page] & (1 << chan))) {
8787 WARN_ON(1);
8888 return NETDEV_TX_OK;
89+ }
8990
9091 if (!(priv->hw.flags & IEEE802154_HW_OMIT_CKSUM)) {
9192 u16 crc = crc_ccitt(0, skb->data, skb->len);
net/phonet/af_phonet.c+2−2
@@ -5,8 +5,8 @@ · 4 unmodified lines
55 *
66 * Copyright (C) 2008 Nokia Corporation.
77 *
8− * Contact: Remi Denis-Courmont <remi.denis-courmont@nokia.com>
9− * Original author: Sakari Ailus <sakari.ailus@nokia.com>
8+ * Authors: Sakari Ailus <sakari.ailus@nokia.com>
9+ * Rémi Denis-Courmont
1010 *
1111 * This program is free software; you can redistribute it and/or
1212 * modify it under the terms of the GNU General Public License
net/phonet/datagram.c+2−2
@@ -5,8 +5,8 @@ · 4 unmodified lines
55 *
66 * Copyright (C) 2008 Nokia Corporation.
77 *
8− * Contact: Remi Denis-Courmont <remi.denis-courmont@nokia.com>
9− * Original author: Sakari Ailus <sakari.ailus@nokia.com>
8+ * Authors: Sakari Ailus <sakari.ailus@nokia.com>
9+ * Rémi Denis-Courmont
1010 *
1111 * This program is free software; you can redistribute it and/or
1212 * modify it under the terms of the GNU General Public License
net/phonet/pep-gprs.c+1−1
@@ -5,7 +5,7 @@ · 4 unmodified lines
55 *
66 * Copyright (C) 2008 Nokia Corporation.
77 *
8− * Author: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
8+ * Author: Rémi Denis-Courmont
99 *
1010 * This program is free software; you can redistribute it and/or
1111 * modify it under the terms of the GNU General Public License
net/phonet/pep.c+1−1
@@ -5,7 +5,7 @@ · 4 unmodified lines
55 *
66 * Copyright (C) 2008 Nokia Corporation.
77 *
8− * Author: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
8+ * Author: Rémi Denis-Courmont
99 *
1010 * This program is free software; you can redistribute it and/or
1111 * modify it under the terms of the GNU General Public License
net/phonet/pn_dev.c+2−2
@@ -5,8 +5,8 @@ · 4 unmodified lines
55 *
66 * Copyright (C) 2008 Nokia Corporation.
77 *
8− * Contact: Remi Denis-Courmont <remi.denis-courmont@nokia.com>
9− * Original author: Sakari Ailus <sakari.ailus@nokia.com>
8+ * Authors: Sakari Ailus <sakari.ailus@nokia.com>
9+ * Rémi Denis-Courmont
1010 *
1111 * This program is free software; you can redistribute it and/or
1212 * modify it under the terms of the GNU General Public License
net/phonet/pn_netlink.c+2−2
@@ -5,8 +5,8 @@ · 4 unmodified lines
55 *
66 * Copyright (C) 2008 Nokia Corporation.
77 *
8− * Contact: Remi Denis-Courmont <remi.denis-courmont@nokia.com>
9− * Original author: Sakari Ailus <sakari.ailus@nokia.com>
8+ * Authors: Sakari Ailus <sakari.ailus@nokia.com>
9+ * Remi Denis-Courmont
1010 *
1111 * This program is free software; you can redistribute it and/or
1212 * modify it under the terms of the GNU General Public License
net/phonet/socket.c+2−2
@@ -5,8 +5,8 @@ · 4 unmodified lines
55 *
66 * Copyright (C) 2008 Nokia Corporation.
77 *
8− * Contact: Remi Denis-Courmont <remi.denis-courmont@nokia.com>
9− * Original author: Sakari Ailus <sakari.ailus@nokia.com>
8+ * Authors: Sakari Ailus <sakari.ailus@nokia.com>
9+ * Rémi Denis-Courmont
1010 *
1111 * This program is free software; you can redistribute it and/or
1212 * modify it under the terms of the GNU General Public License
net/phonet/sysctl.c+1−1
@@ -5,7 +5,7 @@ · 4 unmodified lines
55 *
66 * Copyright (C) 2008 Nokia Corporation.
77 *
8− * Contact: Remi Denis-Courmont <remi.denis-courmont@nokia.com>
8+ * Author: Rémi Denis-Courmont
99 *
1010 * This program is free software; you can redistribute it and/or
1111 * modify it under the terms of the GNU General Public License
net/sctp/protocol.c+2−0
@@ -673,7 +673,9 @@ void sctp_addr_wq_timeout_handler(unsigned long arg) · 672 unmodified lines
673673 SCTP_DEBUG_PRINTK("sctp_addrwq_timo_handler: sctp_asconf_mgmt failed\n");
674674 sctp_bh_unlock_sock(sk);
675675 }
676+#if IS_ENABLED(CONFIG_IPV6)
676677 free_next:
678+#endif
677679 list_del(&addrw->list);
678680 kfree(addrw);
679681 }
net/wireless/reg.c+1−1
@@ -1389,7 +1389,7 @@ static void reg_set_request_processed(void) · 1388 unmodified lines
13891389 spin_unlock(&reg_requests_lock);
13901390
13911391 if (last_request->initiator == NL80211_REGDOM_SET_BY_USER)
1392− cancel_delayed_work_sync(&reg_timeout);
1392+ cancel_delayed_work(&reg_timeout);
13931393
13941394 if (need_more_processing)
13951395 schedule_work(&reg_work);
net/wireless/util.c+1−1
@@ -804,7 +804,7 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev, · 803 unmodified lines
804804 ntype == NL80211_IFTYPE_P2P_CLIENT))
805805 return -EBUSY;
806806
807− if (ntype != otype) {
807+ if (ntype != otype && netif_running(dev)) {
808808 err = cfg80211_can_change_interface(rdev, dev->ieee80211_ptr,
809809 ntype);
810810 if (err)
scripts/gfp-translate+0−0

File mode changed from 100644 to 100755.

sound/i2c/other/tea575x-tuner.c+14−7
@@ -37,8 +37,8 @@ MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>"); · 36 unmodified lines
3737 MODULE_DESCRIPTION("Routines for control of TEA5757/5759 Philips AM/FM radio tuner chips");
3838 MODULE_LICENSE("GPL");
3939
40−#define FREQ_LO (76U * 16000)
41−#define FREQ_HI (108U * 16000)
40+#define FREQ_LO ((tea->tea5759 ? 760 : 875) * 1600U)
41+#define FREQ_HI ((tea->tea5759 ? 910 : 1080) * 1600U)
4242
4343 /*
4444 * definitions
@@ -120,9 +120,9 @@ static u32 snd_tea575x_read(struct snd_tea575x *tea) · 75 unmodified lines
120120 return data;
121121 }
122122
123−static u32 snd_tea575x_get_freq(struct snd_tea575x *tea)
123+static u32 snd_tea575x_val_to_freq(struct snd_tea575x *tea, u32 val)
124124 {
125− u32 freq = snd_tea575x_read(tea) & TEA575X_BIT_FREQ_MASK;
125+ u32 freq = val & TEA575X_BIT_FREQ_MASK;
126126
127127 if (freq == 0)
128128 return freq;
@@ -139,6 +139,11 @@ static u32 snd_tea575x_get_freq(struct snd_tea575x *tea) · 10 unmodified lines
139139 return clamp(freq * 16, FREQ_LO, FREQ_HI); /* from kHz */
140140 }
141141
142+static u32 snd_tea575x_get_freq(struct snd_tea575x *tea)
143+{
144+ return snd_tea575x_val_to_freq(tea, snd_tea575x_read(tea));
145+}
146+
142147 static void snd_tea575x_set_freq(struct snd_tea575x *tea)
143148 {
144149 u32 freq = tea->freq;
@@ -156,6 +161,7 @@ static void snd_tea575x_set_freq(struct snd_tea575x *tea) · 11 unmodified lines
156161 tea->val &= ~TEA575X_BIT_FREQ_MASK;
157162 tea->val |= freq & TEA575X_BIT_FREQ_MASK;
158163 snd_tea575x_write(tea, tea->val);
164+ tea->freq = snd_tea575x_val_to_freq(tea, tea->val);
159165 }
160166
161167 /*
@@ -317,7 +323,6 @@ static int tea575x_s_ctrl(struct v4l2_ctrl *ctrl) · 155 unmodified lines
317323 }
318324
319325 static const struct v4l2_file_operations tea575x_fops = {
320− .owner = THIS_MODULE,
321326 .unlocked_ioctl = video_ioctl2,
322327 .open = v4l2_fh_open,
323328 .release = v4l2_fh_release,
@@ -337,7 +342,6 @@ static const struct v4l2_ioctl_ops tea575x_ioctl_ops = { · 13 unmodified lines
337342 };
338343
339344 static const struct video_device tea575x_radio = {
340− .fops = &tea575x_fops,
341345 .ioctl_ops = &tea575x_ioctl_ops,
342346 .release = video_device_release_empty,
343347 };
@@ -349,7 +353,7 @@ static const struct v4l2_ctrl_ops tea575x_ctrl_ops = { · 5 unmodified lines
349353 /*
350354 * initialize all the tea575x chips
351355 */
352−int snd_tea575x_init(struct snd_tea575x *tea)
356+int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner)
353357 {
354358 int retval;
355359
@@ -374,6 +378,9 @@ int snd_tea575x_init(struct snd_tea575x *tea) · 18 unmodified lines
374378 tea->vd.lock = &tea->mutex;
375379 tea->vd.v4l2_dev = tea->v4l2_dev;
376380 tea->vd.ctrl_handler = &tea->ctrl_handler;
381+ tea->fops = tea575x_fops;
382+ tea->fops.owner = owner;
383+ tea->vd.fops = &tea->fops;
377384 set_bit(V4L2_FL_USE_FH_PRIO, &tea->vd.flags);
378385 /* disable hw_freq_seek if we can't use it */
379386 if (tea->cannot_read_data)
sound/pci/es1968.c+1−1
@@ -2769,7 +2769,7 @@ static int __devinit snd_es1968_create(struct snd_card *card, · 2768 unmodified lines
27692769 chip->tea.ops = &snd_es1968_tea_ops;
27702770 strlcpy(chip->tea.card, "SF64-PCE2", sizeof(chip->tea.card));
27712771 sprintf(chip->tea.bus_info, "PCI:%s", pci_name(pci));
2772− if (!snd_tea575x_init(&chip->tea))
2772+ if (!snd_tea575x_init(&chip->tea, THIS_MODULE))
27732773 printk(KERN_INFO "es1968: detected TEA575x radio\n");
27742774 #endif
27752775
sound/pci/fm801.c+2−2
@@ -1254,7 +1254,7 @@ static int __devinit snd_fm801_create(struct snd_card *card, · 1253 unmodified lines
12541254 sprintf(chip->tea.bus_info, "PCI:%s", pci_name(pci));
12551255 if ((tea575x_tuner & TUNER_TYPE_MASK) > 0 &&
12561256 (tea575x_tuner & TUNER_TYPE_MASK) < 4) {
1257− if (snd_tea575x_init(&chip->tea)) {
1257+ if (snd_tea575x_init(&chip->tea, THIS_MODULE)) {
12581258 snd_printk(KERN_ERR "TEA575x radio not found\n");
12591259 snd_fm801_free(chip);
12601260 return -ENODEV;
@@ -1263,7 +1263,7 @@ static int __devinit snd_fm801_create(struct snd_card *card, · 2 unmodified lines
12631263 /* autodetect tuner connection */
12641264 for (tea575x_tuner = 1; tea575x_tuner <= 3; tea575x_tuner++) {
12651265 chip->tea575x_tuner = tea575x_tuner;
1266− if (!snd_tea575x_init(&chip->tea)) {
1266+ if (!snd_tea575x_init(&chip->tea, THIS_MODULE)) {
12671267 snd_printk(KERN_INFO "detected TEA575x radio type %s\n",
12681268 get_tea575x_gpio(chip)->name);
12691269 break;
sound/pci/hda/Kconfig+0−13
@@ -97,19 +97,6 @@ config SND_HDA_CODEC_REALTEK · 96 unmodified lines
9797 snd-hda-codec-realtek.
9898 This module is automatically loaded at probing.
9999
100−config SND_HDA_ENABLE_REALTEK_QUIRKS
101− bool "Build static quirks for Realtek codecs"
102− depends on SND_HDA_CODEC_REALTEK
103− default y
104− help
105− Say Y here to build the static quirks codes for Realtek codecs.
106− If you need the "model" preset that the default BIOS auto-parser
107− can't handle, turn this option on.
108−
109− If your device works with model=auto option, basically you don't
110− need the quirk code. By turning this off, you can reduce the
111− module size quite a lot.
112−
113100 config SND_HDA_CODEC_ANALOG
114101 bool "Build Analog Device HD-audio codec support"
115102 default y
sound/pci/hda/hda_auto_parser.c+0−1
@@ -618,7 +618,6 @@ int snd_hda_gen_add_verbs(struct hda_gen_spec *spec, · 617 unmodified lines
618618 const struct hda_verb *list)
619619 {
620620 const struct hda_verb **v;
621− snd_array_init(&spec->verbs, sizeof(struct hda_verb *), 8);
622621 v = snd_array_new(&spec->verbs);
623622 if (!v)
624623 return -ENOMEM;
sound/pci/hda/hda_auto_parser.h+10−0
@@ -157,4 +157,14 @@ void snd_hda_pick_fixup(struct hda_codec *codec, · 156 unmodified lines
157157 const struct snd_pci_quirk *quirk,
158158 const struct hda_fixup *fixlist);
159159
160+static inline void snd_hda_gen_init(struct hda_gen_spec *spec)
161+{
162+ snd_array_init(&spec->verbs, sizeof(struct hda_verb *), 8);
163+}
164+
165+static inline void snd_hda_gen_free(struct hda_gen_spec *spec)
166+{
167+ snd_array_free(&spec->verbs);
168+}
169+
160170 #endif /* __SOUND_HDA_AUTO_PARSER_H */
sound/pci/hda/hda_codec.c+4−0
@@ -1184,6 +1184,7 @@ static void snd_hda_codec_free(struct hda_codec *codec) · 1183 unmodified lines
11841184 {
11851185 if (!codec)
11861186 return;
1187+ snd_hda_jack_tbl_clear(codec);
11871188 restore_init_pincfgs(codec);
11881189 #ifdef CONFIG_SND_HDA_POWER_SAVE
11891190 cancel_delayed_work(&codec->power_work);
@@ -1192,6 +1193,7 @@ static void snd_hda_codec_free(struct hda_codec *codec) · 2 unmodified lines
11921193 list_del(&codec->list);
11931194 snd_array_free(&codec->mixers);
11941195 snd_array_free(&codec->nids);
1196+ snd_array_free(&codec->cvt_setups);
11951197 snd_array_free(&codec->conn_lists);
11961198 snd_array_free(&codec->spdif_out);
11971199 codec->bus->caddr_tbl[codec->addr] = NULL;
@@ -2333,6 +2335,8 @@ int snd_hda_codec_reset(struct hda_codec *codec) · 1135 unmodified lines
23332335 /* free only driver_pins so that init_pins + user_pins are restored */
23342336 snd_array_free(&codec->driver_pins);
23352337 restore_pincfgs(codec);
2338+ snd_array_free(&codec->cvt_setups);
2339+ snd_array_free(&codec->spdif_out);
23362340 codec->num_pcms = 0;
23372341 codec->pcm_info = NULL;
23382342 codec->preset = NULL;
sound/pci/hda/patch_conexant.c+5−1
@@ -445,8 +445,10 @@ static int conexant_init(struct hda_codec *codec) · 444 unmodified lines
445445
446446 static void conexant_free(struct hda_codec *codec)
447447 {
448+ struct conexant_spec *spec = codec->spec;
449+ snd_hda_gen_free(&spec->gen);
448450 snd_hda_detach_beep_device(codec);
449− kfree(codec->spec);
451+ kfree(spec);
450452 }
451453
452454 static const struct snd_kcontrol_new cxt_capture_mixers[] = {
@@ -4466,6 +4468,7 @@ static const struct snd_pci_quirk cxt5066_fixups[] = { · 4013 unmodified lines
44664468 SND_PCI_QUIRK(0x17aa, 0x21ce, "Lenovo T420", CXT_PINCFG_LENOVO_TP410),
44674469 SND_PCI_QUIRK(0x17aa, 0x21cf, "Lenovo T520", CXT_PINCFG_LENOVO_TP410),
44684470 SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC),
4471+ SND_PCI_QUIRK(0x17aa, 0x397b, "Lenovo S205", CXT_FIXUP_STEREO_DMIC),
44694472 {}
44704473 };
44714474
@@ -4497,6 +4500,7 @@ static int patch_conexant_auto(struct hda_codec *codec) · 25 unmodified lines
44974500 if (!spec)
44984501 return -ENOMEM;
44994502 codec->spec = spec;
4503+ snd_hda_gen_init(&spec->gen);
45004504
45014505 switch (codec->vendor_id) {
45024506 case 0x14f15045:
sound/pci/hda/patch_realtek.c+9−6
@@ -2289,6 +2289,7 @@ static void alc_free(struct hda_codec *codec) · 2288 unmodified lines
22892289 alc_shutup(codec);
22902290 alc_free_kctls(codec);
22912291 alc_free_bind_ctls(codec);
2292+ snd_hda_gen_free(&spec->gen);
22922293 kfree(spec);
22932294 snd_hda_detach_beep_device(codec);
22942295 }
@@ -4253,6 +4254,7 @@ static int alc_alloc_spec(struct hda_codec *codec, hda_nid_t mixer_nid) · 1958 unmodified lines
42534254 return -ENOMEM;
42544255 codec->spec = spec;
42554256 spec->mixer_nid = mixer_nid;
4257+ snd_hda_gen_init(&spec->gen);
42564258
42574259 err = alc_codec_rename_from_preset(codec);
42584260 if (err < 0) {
@@ -6705,6 +6707,12 @@ static int patch_alc662(struct hda_codec *codec) · 2446 unmodified lines
67056707
67066708 alc_fix_pll_init(codec, 0x20, 0x04, 15);
67076709
6710+ alc_pick_fixup(codec, alc662_fixup_models,
6711+ alc662_fixup_tbl, alc662_fixups);
6712+ alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);
6713+
6714+ alc_auto_parse_customize_define(codec);
6715+
67086716 if ((alc_get_coef0(codec) & (1 << 14)) &&
67096717 codec->bus->pci->subsystem_vendor == 0x1025 &&
67106718 spec->cdefine.platform_type == 1) {
@@ -6712,12 +6720,6 @@ static int patch_alc662(struct hda_codec *codec) · 1 unmodified line
67126720 goto error;
67136721 }
67146722
6715− alc_pick_fixup(codec, alc662_fixup_models,
6716− alc662_fixup_tbl, alc662_fixups);
6717− alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);
6718−
6719− alc_auto_parse_customize_define(codec);
6720−
67216723 /* automatic parse from the BIOS config */
67226724 err = alc662_parse_auto_config(codec);
67236725 if (err < 0)
@@ -6800,6 +6802,7 @@ static const struct hda_codec_preset snd_hda_preset_realtek[] = { · 76 unmodified lines
68006802 { .id = 0x10ec0272, .name = "ALC272", .patch = patch_alc662 },
68016803 { .id = 0x10ec0275, .name = "ALC275", .patch = patch_alc269 },
68026804 { .id = 0x10ec0276, .name = "ALC276", .patch = patch_alc269 },
6805+ { .id = 0x10ec0280, .name = "ALC280", .patch = patch_alc269 },
68036806 { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660",
68046807 .patch = patch_alc861 },
68056808 { .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd },
sound/pci/hda/patch_sigmatel.c+6−1
@@ -4367,7 +4367,7 @@ static int stac92xx_init(struct hda_codec *codec) · 4366 unmodified lines
43674367 AC_PINCTL_IN_EN);
43684368 for (i = 0; i < spec->num_pwrs; i++) {
43694369 hda_nid_t nid = spec->pwr_nids[i];
4370− int pinctl, def_conf;
4370+ unsigned int pinctl, def_conf;
43714371
43724372 def_conf = snd_hda_codec_get_pincfg(codec, nid);
43734373 def_conf = get_defcfg_connect(def_conf);
@@ -4376,6 +4376,11 @@ static int stac92xx_init(struct hda_codec *codec) · 2 unmodified lines
43764376 stac_toggle_power_map(codec, nid, 0);
43774377 continue;
43784378 }
4379+ if (def_conf == AC_JACK_PORT_FIXED) {
4380+ /* no need for jack detection for fixed pins */
4381+ stac_toggle_power_map(codec, nid, 1);
4382+ continue;
4383+ }
43794384 /* power on when no jack detection is available */
43804385 /* or when the VREF is used for controlling LED */
43814386 if (!spec->hp_detect ||
sound/soc/codecs/wm8994.c+0−3
@@ -724,9 +724,6 @@ static void wm1811_jackdet_set_mode(struct snd_soc_codec *codec, u16 mode) · 723 unmodified lines
724724 {
725725 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
726726
727− if (!wm8994->jackdet || !wm8994->jack_cb)
728− return;
729−
730727 if (!wm8994->jackdet || !wm8994->jack_cb)
731728 return;
732729
sound/usb/mixer_maps.c+8−0
@@ -341,6 +341,14 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = { · 340 unmodified lines
341341 .map = audigy2nx_map,
342342 .selector_map = audigy2nx_selectors,
343343 },
344+ { /* Logitech, Inc. QuickCam Pro for Notebooks */
345+ .id = USB_ID(0x046d, 0x0991),
346+ .ignore_ctl_error = 1,
347+ },
348+ { /* Logitech, Inc. QuickCam E 3500 */
349+ .id = USB_ID(0x046d, 0x09a4),
350+ .ignore_ctl_error = 1,
351+ },
344352 {
345353 /* Hercules DJ Console (Windows Edition) */
346354 .id = USB_ID(0x06f8, 0xb000),
sound/usb/quirks-table.h+30−0
@@ -1831,6 +1831,36 @@ YAMAHA_DEVICE(0x7010, "UB99"), · 1830 unmodified lines
18311831 }
18321832 }
18331833 },
1834+{
1835+ USB_DEVICE(0x0582, 0x014d),
1836+ .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1837+ /* .vendor_name = "BOSS", */
1838+ /* .product_name = "GT-100", */
1839+ .ifnum = QUIRK_ANY_INTERFACE,
1840+ .type = QUIRK_COMPOSITE,
1841+ .data = (const struct snd_usb_audio_quirk[]) {
1842+ {
1843+ .ifnum = 1,
1844+ .type = QUIRK_AUDIO_STANDARD_INTERFACE
1845+ },
1846+ {
1847+ .ifnum = 2,
1848+ .type = QUIRK_AUDIO_STANDARD_INTERFACE
1849+ },
1850+ {
1851+ .ifnum = 3,
1852+ .type = QUIRK_MIDI_FIXED_ENDPOINT,
1853+ .data = & (const struct snd_usb_midi_endpoint_info) {
1854+ .out_cables = 0x0001,
1855+ .in_cables = 0x0001
1856+ }
1857+ },
1858+ {
1859+ .ifnum = -1
1860+ }
1861+ }
1862+ }
1863+},
18341864
18351865 /* Guillemot devices */
18361866 {