This resolves a merge issue with the option.c USB serial driver.
Unified · Split
| @@ -986,13 +986,13 @@ http://www.thedirks.org/winnov/</ulink></para></entry> · 985 unmodified lines | ||
| 986 | 986 | <row id="V4L2-PIX-FMT-Y4"> |
| 987 | 987 | <entry><constant>V4L2_PIX_FMT_Y4</constant></entry> |
| 988 | 988 | <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, | |
| 990 | 990 | the other bits are set to 0.</entry> |
| 991 | 991 | </row> |
| 992 | 992 | <row id="V4L2-PIX-FMT-Y6"> |
| 993 | 993 | <entry><constant>V4L2_PIX_FMT_Y6</constant></entry> |
| 994 | 994 | <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, | |
| 996 | 996 | the other bits are set to 0.</entry> |
| 997 | 997 | </row> |
| 998 | 998 | </tbody> |
| @@ -560,6 +560,7 @@ and discussions on the V4L mailing list.</revremark> · 559 unmodified lines | ||
| 560 | 560 | &sub-g-tuner; |
| 561 | 561 | &sub-log-status; |
| 562 | 562 | &sub-overlay; |
| 563 | + &sub-prepare-buf; | |
| 563 | 564 | &sub-qbuf; |
| 564 | 565 | &sub-querybuf; |
| 565 | 566 | &sub-querycap; |
| @@ -567,7 +568,6 @@ and discussions on the V4L mailing list.</revremark> · 1 unmodified line | ||
| 567 | 568 | &sub-query-dv-preset; |
| 568 | 569 | &sub-query-dv-timings; |
| 569 | 570 | &sub-querystd; |
| 570 | − &sub-prepare-buf; | |
| 571 | 571 | &sub-reqbufs; |
| 572 | 572 | &sub-s-hw-freq-seek; |
| 573 | 573 | &sub-streamon; |
| @@ -108,10 +108,9 @@ information.</para> · 107 unmodified lines | ||
| 108 | 108 | /></entry> |
| 109 | 109 | </row> |
| 110 | 110 | <row> |
| 111 | − <entry>__u32</entry> | |
| 111 | + <entry>struct v4l2_format</entry> | |
| 112 | 112 | <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> | |
| 115 | 114 | </row> |
| 116 | 115 | <row> |
| 117 | 116 | <entry>__u32</entry> |
| @@ -89,7 +89,7 @@ · 88 unmodified lines | ||
| 89 | 89 | <row> |
| 90 | 90 | <entry></entry> |
| 91 | 91 | <entry>&v4l2-event-frame-sync;</entry> |
| 92 | − <entry><structfield>frame</structfield></entry> | |
| 92 | + <entry><structfield>frame_sync</structfield></entry> | |
| 93 | 93 | <entry>Event data for event V4L2_EVENT_FRAME_SYNC.</entry> |
| 94 | 94 | </row> |
| 95 | 95 | <row> |
| @@ -12,6 +12,12 @@ Rules on what kind of patches are accepted, and which ones are not, into the · 11 unmodified lines | ||
| 12 | 12 | marked CONFIG_BROKEN), an oops, a hang, data corruption, a real |
| 13 | 13 | security issue, or some "oh, that's not good" issue. In short, something |
| 14 | 14 | 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. | |
| 15 | 21 | - New device IDs and quirks are also accepted. |
| 16 | 22 | - No "theoretical race condition" issues, unless an explanation of how the |
| 17 | 23 | race can be exploited is also provided. |
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | VERSION = 3 |
| 2 | 2 | PATCHLEVEL = 5 |
| 3 | 3 | SUBLEVEL = 0 |
| 4 | −EXTRAVERSION = -rc4 | |
| 4 | +EXTRAVERSION = -rc5 | |
| 5 | 5 | NAME = Saber-toothed Squirrel |
| 6 | 6 | |
| 7 | 7 | # *DOCUMENTATION* |
| @@ -212,7 +212,7 @@ config MACH_SMDKV310 · 211 unmodified lines | ||
| 212 | 212 | select EXYNOS_DEV_SYSMMU |
| 213 | 213 | select EXYNOS4_DEV_AHCI |
| 214 | 214 | select SAMSUNG_DEV_KEYPAD |
| 215 | − select EXYNOS4_DEV_DMA | |
| 215 | + select EXYNOS_DEV_DMA | |
| 216 | 216 | select SAMSUNG_DEV_PWM |
| 217 | 217 | select EXYNOS4_DEV_USB_OHCI |
| 218 | 218 | select EXYNOS4_SETUP_FIMD0 |
| @@ -264,7 +264,7 @@ config MACH_UNIVERSAL_C210 · 45 unmodified lines | ||
| 264 | 264 | select S5P_DEV_ONENAND |
| 265 | 265 | select S5P_DEV_TV |
| 266 | 266 | select EXYNOS_DEV_SYSMMU |
| 267 | − select EXYNOS4_DEV_DMA | |
| 267 | + select EXYNOS_DEV_DMA | |
| 268 | 268 | select EXYNOS_DEV_DRM |
| 269 | 269 | select EXYNOS4_SETUP_FIMD0 |
| 270 | 270 | select EXYNOS4_SETUP_I2C1 |
| @@ -303,7 +303,7 @@ config MACH_NURI · 32 unmodified lines | ||
| 303 | 303 | select S5P_DEV_MFC |
| 304 | 304 | select S5P_DEV_USB_EHCI |
| 305 | 305 | select S5P_SETUP_MIPIPHY |
| 306 | − select EXYNOS4_DEV_DMA | |
| 306 | + select EXYNOS_DEV_DMA | |
| 307 | 307 | select EXYNOS_DEV_DRM |
| 308 | 308 | select EXYNOS4_SETUP_FIMC |
| 309 | 309 | select EXYNOS4_SETUP_FIMD0 |
| @@ -341,7 +341,7 @@ config MACH_ORIGEN · 31 unmodified lines | ||
| 341 | 341 | select SAMSUNG_DEV_PWM |
| 342 | 342 | select EXYNOS_DEV_DRM |
| 343 | 343 | select EXYNOS_DEV_SYSMMU |
| 344 | − select EXYNOS4_DEV_DMA | |
| 344 | + select EXYNOS_DEV_DMA | |
| 345 | 345 | select EXYNOS4_DEV_USB_OHCI |
| 346 | 346 | select EXYNOS4_SETUP_FIMD0 |
| 347 | 347 | select EXYNOS4_SETUP_SDHCI |
| @@ -152,13 +152,14 @@ enum mx6q_clks { · 151 unmodified lines | ||
| 152 | 152 | ssi2, ssi3, uart_ipg, uart_serial, usboh3, usdhc1, usdhc2, usdhc3, |
| 153 | 153 | usdhc4, vdo_axi, vpu_axi, cko1, pll1_sys, pll2_bus, pll3_usb_otg, |
| 154 | 154 | 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 | |
| 156 | 157 | }; |
| 157 | 158 | |
| 158 | 159 | static struct clk *clk[clk_max]; |
| 159 | 160 | |
| 160 | 161 | static enum mx6q_clks const clks_init_on[] __initconst = { |
| 161 | − mmdc_ch0_axi, mmdc_ch1_axi, | |
| 162 | + mmdc_ch0_axi, rom, | |
| 162 | 163 | }; |
| 163 | 164 | |
| 164 | 165 | int __init mx6q_clocks_init(void) |
| @@ -364,6 +365,7 @@ int __init mx6q_clocks_init(void) · 199 unmodified lines | ||
| 364 | 365 | clk[gpmi_bch] = imx_clk_gate2("gpmi_bch", "usdhc4", base + 0x78, 26); |
| 365 | 366 | clk[gpmi_io] = imx_clk_gate2("gpmi_io", "enfc", base + 0x78, 28); |
| 366 | 367 | clk[gpmi_apb] = imx_clk_gate2("gpmi_apb", "usdhc3", base + 0x78, 30); |
| 368 | + clk[rom] = imx_clk_gate2("rom", "ahb", base + 0x7c, 0); | |
| 367 | 369 | clk[sata] = imx_clk_gate2("sata", "ipg", base + 0x7c, 4); |
| 368 | 370 | clk[sdma] = imx_clk_gate2("sdma", "ahb", base + 0x7c, 6); |
| 369 | 371 | clk[spba] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12); |
| @@ -97,11 +97,6 @@ __init board_onenand_init(struct mtd_partition *onenand_parts, · 96 unmodified lines | ||
| 97 | 97 | |
| 98 | 98 | gpmc_onenand_init(&board_onenand_data); |
| 99 | 99 | } |
| 100 | −#else | |
| 101 | −void | |
| 102 | −__init board_onenand_init(struct mtd_partition *nor_parts, u8 nr_parts, u8 cs) | |
| 103 | −{ | |
| 104 | −} | |
| 105 | 100 | #endif /* CONFIG_MTD_ONENAND_OMAP2 || CONFIG_MTD_ONENAND_OMAP2_MODULE */ |
| 106 | 101 | |
| 107 | 102 | #if defined(CONFIG_MTD_NAND_OMAP2) || \ |
| @@ -3417,9 +3417,12 @@ int __init omap4xxx_clk_init(void) · 3416 unmodified lines | ||
| 3417 | 3417 | if (cpu_is_omap443x()) { |
| 3418 | 3418 | cpu_mask = RATE_IN_4430; |
| 3419 | 3419 | cpu_clkflg = CK_443X; |
| 3420 | − } else if (cpu_is_omap446x()) { | |
| 3420 | + } else if (cpu_is_omap446x() || cpu_is_omap447x()) { | |
| 3421 | 3421 | cpu_mask = RATE_IN_4460 | RATE_IN_4430; |
| 3422 | 3422 | cpu_clkflg = CK_446X | CK_443X; |
| 3423 | + | |
| 3424 | + if (cpu_is_omap447x()) | |
| 3425 | + pr_warn("WARNING: OMAP4470 clock data incomplete!\n"); | |
| 3423 | 3426 | } else { |
| 3424 | 3427 | return 0; |
| 3425 | 3428 | } |
| @@ -779,6 +779,7 @@ DT_MACHINE_START(ARMADILLO800EVA_DT, "armadillo800eva") · 778 unmodified lines | ||
| 779 | 779 | .init_irq = r8a7740_init_irq, |
| 780 | 780 | .handle_irq = shmobile_handle_irq_intc, |
| 781 | 781 | .init_machine = eva_init, |
| 782 | + .init_late = shmobile_init_late, | |
| 782 | 783 | .timer = &shmobile_timer, |
| 783 | 784 | .dt_compat = eva_boards_compat_dt, |
| 784 | 785 | MACHINE_END |
| @@ -80,6 +80,7 @@ DT_MACHINE_START(KZM9D_DT, "kzm9d") · 79 unmodified lines | ||
| 80 | 80 | .init_irq = emev2_init_irq, |
| 81 | 81 | .handle_irq = gic_handle_irq, |
| 82 | 82 | .init_machine = kzm9d_add_standard_devices, |
| 83 | + .init_late = shmobile_init_late, | |
| 83 | 84 | .timer = &shmobile_timer, |
| 84 | 85 | .dt_compat = kzm9d_boards_compat_dt, |
| 85 | 86 | MACHINE_END |
| @@ -455,6 +455,7 @@ DT_MACHINE_START(KZM9G_DT, "kzm9g") · 454 unmodified lines | ||
| 455 | 455 | .init_irq = sh73a0_init_irq, |
| 456 | 456 | .handle_irq = gic_handle_irq, |
| 457 | 457 | .init_machine = kzm_init, |
| 458 | + .init_late = shmobile_init_late, | |
| 458 | 459 | .timer = &shmobile_timer, |
| 459 | 460 | .dt_compat = kzm9g_boards_compat_dt, |
| 460 | 461 | MACHINE_END |
| @@ -1512,6 +1512,9 @@ static void __init mackerel_init(void) · 1511 unmodified lines | ||
| 1512 | 1512 | gpio_request(GPIO_FN_SDHID0_1, NULL); |
| 1513 | 1513 | gpio_request(GPIO_FN_SDHID0_0, NULL); |
| 1514 | 1514 | |
| 1515 | + /* SDHI0 PORT172 card-detect IRQ26 */ | |
| 1516 | + gpio_request(GPIO_FN_IRQ26_172, NULL); | |
| 1517 | + | |
| 1515 | 1518 | #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) |
| 1516 | 1519 | /* enable SDHI1 */ |
| 1517 | 1520 | gpio_request(GPIO_FN_SDHICMD1, NULL); |
| @@ -475,9 +475,9 @@ static struct clk *late_main_clks[] = { · 474 unmodified lines | ||
| 475 | 475 | |
| 476 | 476 | enum { MSTP001, |
| 477 | 477 | MSTP129, MSTP128, MSTP127, MSTP126, MSTP125, MSTP118, MSTP116, MSTP100, |
| 478 | − MSTP219, | |
| 478 | + MSTP219, MSTP218, | |
| 479 | 479 | MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, |
| 480 | − MSTP331, MSTP329, MSTP325, MSTP323, MSTP318, | |
| 480 | + MSTP331, MSTP329, MSTP325, MSTP323, | |
| 481 | 481 | MSTP314, MSTP313, MSTP312, MSTP311, |
| 482 | 482 | MSTP303, MSTP302, MSTP301, MSTP300, |
| 483 | 483 | MSTP411, MSTP410, MSTP403, |
| @@ -497,6 +497,7 @@ static struct clk mstp_clks[MSTP_NR] = { · 13 unmodified lines | ||
| 497 | 497 | [MSTP116] = MSTP(&div4_clks[DIV4_HP], SMSTPCR1, 16, 0), /* IIC0 */ |
| 498 | 498 | [MSTP100] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 0, 0), /* LCDC0 */ |
| 499 | 499 | [MSTP219] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 19, 0), /* SCIFA7 */ |
| 500 | + [MSTP218] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 18, 0), /* SY-DMAC */ | |
| 500 | 501 | [MSTP207] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 7, 0), /* SCIFA5 */ |
| 501 | 502 | [MSTP206] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 6, 0), /* SCIFB */ |
| 502 | 503 | [MSTP204] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 4, 0), /* SCIFA0 */ |
| @@ -508,7 +509,6 @@ static struct clk mstp_clks[MSTP_NR] = { · 5 unmodified lines | ||
| 508 | 509 | [MSTP329] = MSTP(&r_clk, SMSTPCR3, 29, 0), /* CMT10 */ |
| 509 | 510 | [MSTP325] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 25, 0), /* IrDA */ |
| 510 | 511 | [MSTP323] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 23, 0), /* IIC1 */ |
| 511 | − [MSTP318] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 18, 0), /* SY-DMAC */ | |
| 512 | 512 | [MSTP314] = MSTP(&div6_clks[DIV6_SDHI0], SMSTPCR3, 14, 0), /* SDHI0 */ |
| 513 | 513 | [MSTP313] = MSTP(&div6_clks[DIV6_SDHI1], SMSTPCR3, 13, 0), /* SDHI1 */ |
| 514 | 514 | [MSTP312] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMCIF0 */ |
| @@ -552,6 +552,7 @@ static struct clk_lookup lookups[] = { · 37 unmodified lines | ||
| 552 | 552 | CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* I2C0 */ |
| 553 | 553 | CLKDEV_DEV_ID("sh_mobile_lcdc_fb.0", &mstp_clks[MSTP100]), /* LCDC0 */ |
| 554 | 554 | CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP219]), /* SCIFA7 */ |
| 555 | + CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]), /* SY-DMAC */ | |
| 555 | 556 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */ |
| 556 | 557 | CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP206]), /* SCIFB */ |
| 557 | 558 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */ |
| @@ -563,7 +564,6 @@ static struct clk_lookup lookups[] = { · 5 unmodified lines | ||
| 563 | 564 | CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */ |
| 564 | 565 | CLKDEV_DEV_ID("sh_irda.0", &mstp_clks[MSTP325]), /* IrDA */ |
| 565 | 566 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* I2C1 */ |
| 566 | − CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP318]), /* SY-DMAC */ | |
| 567 | 567 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), /* SDHI0 */ |
| 568 | 568 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */ |
| 569 | 569 | CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMCIF0 */ |
| @@ -35,6 +35,9 @@ · 34 unmodified lines | ||
| 35 | 35 | #define INT2SMSKCR3 0xfe7822ac |
| 36 | 36 | #define INT2SMSKCR4 0xfe7822b0 |
| 37 | 37 | |
| 38 | +#define INT2NTSR0 0xfe700060 | |
| 39 | +#define INT2NTSR1 0xfe700064 | |
| 40 | + | |
| 38 | 41 | static int r8a7779_set_wake(struct irq_data *data, unsigned int on) |
| 39 | 42 | { |
| 40 | 43 | return 0; /* always allow wakeup */ |
| @@ -49,6 +52,10 @@ void __init r8a7779_init_irq(void) · 8 unmodified lines | ||
| 49 | 52 | gic_init(0, 29, gic_dist_base, gic_cpu_base); |
| 50 | 53 | gic_arch_extn.irq_set_wake = r8a7779_set_wake; |
| 51 | 54 | |
| 55 | + /* route all interrupts to ARM */ | |
| 56 | + __raw_writel(0xffffffff, INT2NTSR0); | |
| 57 | + __raw_writel(0x3fffffff, INT2NTSR1); | |
| 58 | + | |
| 52 | 59 | /* unmask all known interrupts in INTCS2 */ |
| 53 | 60 | __raw_writel(0xfffffff0, INT2SMSKCR0); |
| 54 | 61 | __raw_writel(0xfff7ffff, INT2SMSKCR1); |
| @@ -25,7 +25,12 @@ · 24 unmodified lines | ||
| 25 | 25 | #define is_sh73a0() (machine_is_ag5evm() || machine_is_kota2() || \ |
| 26 | 26 | of_machine_is_compatible("renesas,sh73a0")) |
| 27 | 27 | #define is_r8a7779() machine_is_marzen() |
| 28 | + | |
| 29 | +#ifdef CONFIG_ARCH_EMEV2 | |
| 28 | 30 | #define is_emev2() of_machine_is_compatible("renesas,emev2") |
| 31 | +#else | |
| 32 | +#define is_emev2() (0) | |
| 33 | +#endif | |
| 29 | 34 | |
| 30 | 35 | static unsigned int __init shmobile_smp_get_core_count(void) |
| 31 | 36 | { |
| @@ -484,7 +484,7 @@ static const struct sh_dmae_slave_config sh7372_dmae_slaves[] = { · 483 unmodified lines | ||
| 484 | 484 | }, |
| 485 | 485 | }; |
| 486 | 486 | |
| 487 | −#define SH7372_CHCLR 0x220 | |
| 487 | +#define SH7372_CHCLR (0x220 - 0x20) | |
| 488 | 488 | |
| 489 | 489 | static const struct sh_dmae_channel sh7372_dmae_channels[] = { |
| 490 | 490 | { |
| @@ -1067,7 +1067,7 @@ static struct page **__iommu_alloc_buffer(struct device *dev, size_t size, gfp_t · 1066 unmodified lines | ||
| 1067 | 1067 | return NULL; |
| 1068 | 1068 | |
| 1069 | 1069 | while (count) { |
| 1070 | − int j, order = __ffs(count); | |
| 1070 | + int j, order = __fls(count); | |
| 1071 | 1071 | |
| 1072 | 1072 | pages[i] = alloc_pages(gfp | __GFP_NOWARN, order); |
| 1073 | 1073 | while (!pages[i] && order) |
| @@ -23,6 +23,7 @@ · 22 unmodified lines | ||
| 23 | 23 | #ifndef __MACH_MX2_CAM_H_ |
| 24 | 24 | #define __MACH_MX2_CAM_H_ |
| 25 | 25 | |
| 26 | +#define MX2_CAMERA_SWAP16 (1 << 0) | |
| 26 | 27 | #define MX2_CAMERA_EXT_VSYNC (1 << 1) |
| 27 | 28 | #define MX2_CAMERA_CCIR (1 << 2) |
| 28 | 29 | #define MX2_CAMERA_CCIR_INTERLACE (1 << 3) |
| @@ -30,6 +31,7 @@ · 1 unmodified line | ||
| 30 | 31 | #define MX2_CAMERA_GATED_CLOCK (1 << 5) |
| 31 | 32 | #define MX2_CAMERA_INV_DATA (1 << 6) |
| 32 | 33 | #define MX2_CAMERA_PCLK_SAMPLE_RISING (1 << 7) |
| 34 | +#define MX2_CAMERA_PACK_DIR_MSB (1 << 8) | |
| 33 | 35 | |
| 34 | 36 | /** |
| 35 | 37 | * struct mx2_camera_platform_data - optional platform data for mx2_camera |
| @@ -22,7 +22,7 @@ · 21 unmodified lines | ||
| 22 | 22 | #define S3C24XX_VA_WATCHDOG S3C_VA_WATCHDOG |
| 23 | 23 | |
| 24 | 24 | #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) | |
| 26 | 26 | |
| 27 | 27 | #define S3C2410_PA_UART (0x50000000) |
| 28 | 28 | #define S3C24XX_PA_UART S3C2410_PA_UART |
| @@ -25,7 +25,7 @@ static inline void arch_wdt_reset(void) · 24 unmodified lines | ||
| 25 | 25 | |
| 26 | 26 | __raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */ |
| 27 | 27 | |
| 28 | − if (s3c2410_wdtclk) | |
| 28 | + if (!IS_ERR(s3c2410_wdtclk)) | |
| 29 | 29 | clk_enable(s3c2410_wdtclk); |
| 30 | 30 | |
| 31 | 31 | /* put initial values into count and data */ |
| @@ -42,4 +42,11 @@ unsigned long clk_get_rate(struct clk *clk) · 41 unmodified lines | ||
| 42 | 42 | return MCF_CLK; |
| 43 | 43 | } |
| 44 | 44 | 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 | + | |
| 45 | 52 | /***************************************************************************/ |
| @@ -103,6 +103,11 @@ static inline void hard_irq_disable(void) · 102 unmodified lines | ||
| 103 | 103 | /* include/linux/interrupt.h needs hard_irq_disable to be a macro */ |
| 104 | 104 | #define hard_irq_disable hard_irq_disable |
| 105 | 105 | |
| 106 | +static inline bool lazy_irq_pending(void) | |
| 107 | +{ | |
| 108 | + return !!(get_paca()->irq_happened & ~PACA_IRQ_HARD_DIS); | |
| 109 | +} | |
| 110 | + | |
| 106 | 111 | /* |
| 107 | 112 | * This is called by asynchronous interrupts to conditionally |
| 108 | 113 | * re-enable hard interrupts when soft-disabled after having |
| @@ -558,27 +558,54 @@ _GLOBAL(ret_from_except_lite) · 557 unmodified lines | ||
| 558 | 558 | mtmsrd r10,1 /* Update machine state */ |
| 559 | 559 | #endif /* CONFIG_PPC_BOOK3E */ |
| 560 | 560 | |
| 561 | −#ifdef CONFIG_PREEMPT | |
| 562 | 561 | clrrdi r9,r1,THREAD_SHIFT /* current_thread_info() */ |
| 563 | − li r0,_TIF_NEED_RESCHED /* bits to check */ | |
| 564 | 562 | ld r3,_MSR(r1) |
| 565 | 563 | 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? */ | |
| 573 | 564 | andi. r3,r3,MSR_PR |
| 574 | − beq restore /* if not, just restore regs and return */ | |
| 565 | + beq resume_kernel | |
| 575 | 566 | |
| 576 | 567 | /* 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 */ | |
| 577 | 604 | clrrdi r9,r1,THREAD_SHIFT |
| 578 | 605 | 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 */ | |
| 582 | 609 | |
| 583 | 610 | .globl fast_exc_return_irq |
| 584 | 611 | fast_exc_return_irq: |
| @@ -759,50 +786,6 @@ restore_check_irq_replay: · 174 unmodified lines | ||
| 759 | 786 | #endif /* CONFIG_PPC_BOOK3E */ |
| 760 | 787 | 1: b .ret_from_except /* What else to do here ? */ |
| 761 | 788 | |
| 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 | − | |
| 806 | 789 | unrecov_restore: |
| 807 | 790 | addi r3,r1,STACK_FRAME_OVERHEAD |
| 808 | 791 | bl .unrecoverable_exception |
| @@ -277,7 +277,7 @@ EXPORT_SYMBOL(arch_local_irq_restore); · 276 unmodified lines | ||
| 277 | 277 | * NOTE: This is called with interrupts hard disabled but not marked |
| 278 | 278 | * as such in paca->irq_happened, so we need to resync this. |
| 279 | 279 | */ |
| 280 | −void restore_interrupts(void) | |
| 280 | +void notrace restore_interrupts(void) | |
| 281 | 281 | { |
| 282 | 282 | if (irqs_disabled()) { |
| 283 | 283 | local_paca->irq_happened |= PACA_IRQ_HARD_DIS; |
| @@ -1312,7 +1312,7 @@ static struct opal_secondary_data { · 1311 unmodified lines | ||
| 1312 | 1312 | |
| 1313 | 1313 | extern char opal_secondary_entry; |
| 1314 | 1314 | |
| 1315 | −static void prom_query_opal(void) | |
| 1315 | +static void __init prom_query_opal(void) | |
| 1316 | 1316 | { |
| 1317 | 1317 | long rc; |
| 1318 | 1318 | |
| @@ -1436,7 +1436,7 @@ static void __init prom_opal_hold_cpus(void) · 117 unmodified lines | ||
| 1436 | 1436 | prom_debug("prom_opal_hold_cpus: end...\n"); |
| 1437 | 1437 | } |
| 1438 | 1438 | |
| 1439 | −static void prom_opal_takeover(void) | |
| 1439 | +static void __init prom_opal_takeover(void) | |
| 1440 | 1440 | { |
| 1441 | 1441 | struct opal_secondary_data *data = &RELOC(opal_secondary_data); |
| 1442 | 1442 | struct opal_takeover_args *args = &data->args; |
| @@ -635,7 +635,7 @@ static inline int __init read_usm_ranges(const u32 **usm) · 634 unmodified lines | ||
| 635 | 635 | */ |
| 636 | 636 | static void __init parse_drconf_memory(struct device_node *memory) |
| 637 | 637 | { |
| 638 | − const u32 *dm, *usm; | |
| 638 | + const u32 *uninitialized_var(dm), *usm; | |
| 639 | 639 | unsigned int n, rc, ranges, is_kexec_kdump = 0; |
| 640 | 640 | unsigned long lmb_size, base, size, sz; |
| 641 | 641 | int nid; |
| @@ -105,6 +105,7 @@ sk_load_byte_msh_positive_offset: · 104 unmodified lines | ||
| 105 | 105 | mr r4, r_addr; \ |
| 106 | 106 | li r6, SIZE; \ |
| 107 | 107 | bl skb_copy_bits; \ |
| 108 | + nop; \ | |
| 108 | 109 | /* R3 = 0 on success */ \ |
| 109 | 110 | addi r1, r1, BPF_PPC_SLOWPATH_FRAME; \ |
| 110 | 111 | ld r0, 16(r1); \ |
| @@ -156,6 +157,7 @@ bpf_slow_path_byte_msh: · 45 unmodified lines | ||
| 156 | 157 | mr r4, r_addr; \ |
| 157 | 158 | li r5, SIZE; \ |
| 158 | 159 | bl bpf_internal_load_pointer_neg_helper; \ |
| 160 | + nop; \ | |
| 159 | 161 | /* R3 != 0 on success */ \ |
| 160 | 162 | addi r1, r1, BPF_PPC_SLOWPATH_FRAME; \ |
| 161 | 163 | ld r0, 16(r1); \ |
| @@ -106,7 +106,7 @@ static int tce_build_pSeries(struct iommu_table *tbl, long index, · 105 unmodified lines | ||
| 106 | 106 | tcep++; |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | − if (tbl->it_type == TCE_PCI_SWINV_CREATE) | |
| 109 | + if (tbl->it_type & TCE_PCI_SWINV_CREATE) | |
| 110 | 110 | tce_invalidate_pSeries_sw(tbl, tces, tcep - 1); |
| 111 | 111 | return 0; |
| 112 | 112 | } |
| @@ -121,7 +121,7 @@ static void tce_free_pSeries(struct iommu_table *tbl, long index, long npages) · 8 unmodified lines | ||
| 121 | 121 | while (npages--) |
| 122 | 122 | *(tcep++) = 0; |
| 123 | 123 | |
| 124 | − if (tbl->it_type == TCE_PCI_SWINV_FREE) | |
| 124 | + if (tbl->it_type & TCE_PCI_SWINV_FREE) | |
| 125 | 125 | tce_invalidate_pSeries_sw(tbl, tces, tcep - 1); |
| 126 | 126 | } |
| 127 | 127 | |
| @@ -106,7 +106,7 @@ static void check_and_cede_processor(void) · 105 unmodified lines | ||
| 106 | 106 | * we first hard disable then check. |
| 107 | 107 | */ |
| 108 | 108 | hard_irq_disable(); |
| 109 | − if (get_paca()->irq_happened == 0) | |
| 109 | + if (!lazy_irq_pending()) | |
| 110 | 110 | cede_processor(); |
| 111 | 111 | } |
| 112 | 112 | |
| @@ -201,8 +201,8 @@ static struct resource kfr2r09_usb0_gadget_resources[] = { · 200 unmodified lines | ||
| 201 | 201 | .flags = IORESOURCE_MEM, |
| 202 | 202 | }, |
| 203 | 203 | [1] = { |
| 204 | − .start = evtirq(0xa20), | |
| 205 | − .end = evtirq(0xa20), | |
| 204 | + .start = evt2irq(0xa20), | |
| 205 | + .end = evt2irq(0xa20), | |
| 206 | 206 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW, |
| 207 | 207 | }, |
| 208 | 208 | }; |
| @@ -239,7 +239,7 @@ static int __init pcie_clk_init(struct sh7786_pcie_port *port) · 238 unmodified lines | ||
| 239 | 239 | clk->enable_reg = (void __iomem *)(chan->reg_base + SH4A_PCIEPHYCTLR); |
| 240 | 240 | clk->enable_bit = BITS_CKE; |
| 241 | 241 | |
| 242 | − ret = sh_clk_mstp32_register(clk, 1); | |
| 242 | + ret = sh_clk_mstp_register(clk, 1); | |
| 243 | 243 | if (unlikely(ret < 0)) |
| 244 | 244 | goto err_phy; |
| 245 | 245 | |
| @@ -283,7 +283,7 @@ int __init arch_clk_init(void) · 282 unmodified lines | ||
| 283 | 283 | ret = sh_clk_div6_register(div6_clks, DIV6_NR); |
| 284 | 284 | |
| 285 | 285 | if (!ret) |
| 286 | − ret = sh_clk_mstp32_register(mstp_clks, MSTP_NR); | |
| 286 | + ret = sh_clk_mstp_register(mstp_clks, MSTP_NR); | |
| 287 | 287 | |
| 288 | 288 | return ret; |
| 289 | 289 | } |
| @@ -276,7 +276,7 @@ int __init arch_clk_init(void) · 275 unmodified lines | ||
| 276 | 276 | ret = sh_clk_div6_register(div6_clks, DIV6_NR); |
| 277 | 277 | |
| 278 | 278 | if (!ret) |
| 279 | − ret = sh_clk_mstp32_register(mstp_clks, MSTP_NR); | |
| 279 | + ret = sh_clk_mstp_register(mstp_clks, MSTP_NR); | |
| 280 | 280 | |
| 281 | 281 | return ret; |
| 282 | 282 | } |
| @@ -261,7 +261,7 @@ int __init arch_clk_init(void) · 260 unmodified lines | ||
| 261 | 261 | ret = sh_clk_div6_register(div6_clks, DIV6_NR); |
| 262 | 262 | |
| 263 | 263 | if (!ret) |
| 264 | − ret = sh_clk_mstp32_register(mstp_clks, HWBLK_NR); | |
| 264 | + ret = sh_clk_mstp_register(mstp_clks, HWBLK_NR); | |
| 265 | 265 | |
| 266 | 266 | return ret; |
| 267 | 267 | } |
| @@ -311,7 +311,7 @@ int __init arch_clk_init(void) · 310 unmodified lines | ||
| 311 | 311 | ret = sh_clk_div6_register(div6_clks, DIV6_NR); |
| 312 | 312 | |
| 313 | 313 | if (!ret) |
| 314 | − ret = sh_clk_mstp32_register(mstp_clks, HWBLK_NR); | |
| 314 | + ret = sh_clk_mstp_register(mstp_clks, HWBLK_NR); | |
| 315 | 315 | |
| 316 | 316 | return ret; |
| 317 | 317 | } |
| @@ -375,7 +375,7 @@ int __init arch_clk_init(void) · 374 unmodified lines | ||
| 375 | 375 | ret = sh_clk_div6_reparent_register(div6_clks, DIV6_NR); |
| 376 | 376 | |
| 377 | 377 | if (!ret) |
| 378 | − ret = sh_clk_mstp32_register(mstp_clks, HWBLK_NR); | |
| 378 | + ret = sh_clk_mstp_register(mstp_clks, HWBLK_NR); | |
| 379 | 379 | |
| 380 | 380 | return ret; |
| 381 | 381 | } |
| @@ -260,7 +260,7 @@ int __init arch_clk_init(void) · 259 unmodified lines | ||
| 260 | 260 | &div4_table); |
| 261 | 261 | |
| 262 | 262 | if (!ret) |
| 263 | − ret = sh_clk_mstp32_register(mstp_clks, MSTP_NR); | |
| 263 | + ret = sh_clk_mstp_register(mstp_clks, MSTP_NR); | |
| 264 | 264 | |
| 265 | 265 | return ret; |
| 266 | 266 | } |
| @@ -148,7 +148,7 @@ int __init arch_clk_init(void) · 147 unmodified lines | ||
| 148 | 148 | ret = sh_clk_div4_register(div4_clks, ARRAY_SIZE(div4_clks), |
| 149 | 149 | &div4_table); |
| 150 | 150 | if (!ret) |
| 151 | − ret = sh_clk_mstp32_register(mstp_clks, MSTP_NR); | |
| 151 | + ret = sh_clk_mstp_register(mstp_clks, MSTP_NR); | |
| 152 | 152 | |
| 153 | 153 | return ret; |
| 154 | 154 | } |
| @@ -175,7 +175,7 @@ int __init arch_clk_init(void) · 174 unmodified lines | ||
| 175 | 175 | ret = sh_clk_div4_register(div4_clks, ARRAY_SIZE(div4_clks), |
| 176 | 176 | &div4_table); |
| 177 | 177 | if (!ret) |
| 178 | − ret = sh_clk_mstp32_register(mstp_clks, MSTP_NR); | |
| 178 | + ret = sh_clk_mstp_register(mstp_clks, MSTP_NR); | |
| 179 | 179 | |
| 180 | 180 | return ret; |
| 181 | 181 | } |
| @@ -194,7 +194,7 @@ int __init arch_clk_init(void) · 193 unmodified lines | ||
| 194 | 194 | ret = sh_clk_div4_register(div4_clks, ARRAY_SIZE(div4_clks), |
| 195 | 195 | &div4_table); |
| 196 | 196 | if (!ret) |
| 197 | − ret = sh_clk_mstp32_register(mstp_clks, MSTP_NR); | |
| 197 | + ret = sh_clk_mstp_register(mstp_clks, MSTP_NR); | |
| 198 | 198 | |
| 199 | 199 | return ret; |
| 200 | 200 | } |
| @@ -149,7 +149,7 @@ int __init arch_clk_init(void) · 148 unmodified lines | ||
| 149 | 149 | ret = sh_clk_div4_register(div4_clks, ARRAY_SIZE(div4_clks), |
| 150 | 150 | &div4_table); |
| 151 | 151 | if (!ret) |
| 152 | − ret = sh_clk_mstp32_register(mstp_clks, MSTP_NR); | |
| 152 | + ret = sh_clk_mstp_register(mstp_clks, MSTP_NR); | |
| 153 | 153 | |
| 154 | 154 | return ret; |
| 155 | 155 | } |
| @@ -38,7 +38,7 @@ · 37 unmodified lines | ||
| 38 | 38 | int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from) |
| 39 | 39 | { |
| 40 | 40 | int err = 0; |
| 41 | − bool ia32 = is_ia32_task(); | |
| 41 | + bool ia32 = test_thread_flag(TIF_IA32); | |
| 42 | 42 | |
| 43 | 43 | if (!access_ok(VERIFY_WRITE, to, sizeof(compat_siginfo_t))) |
| 44 | 44 | return -EFAULT; |
| @@ -176,7 +176,7 @@ · 175 unmodified lines | ||
| 176 | 176 | #define X86_FEATURE_XSAVEOPT (7*32+ 4) /* Optimized Xsave */ |
| 177 | 177 | #define X86_FEATURE_PLN (7*32+ 5) /* Intel Power Limit Notification */ |
| 178 | 178 | #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 */ | |
| 180 | 180 | #define X86_FEATURE_HW_PSTATE (7*32+ 8) /* AMD HW-PState */ |
| 181 | 181 | |
| 182 | 182 | /* Virtualization flags: Linux defined, word 8 */ |
| @@ -422,12 +422,14 @@ acpi_parse_int_src_ovr(struct acpi_subtable_header * header, · 421 unmodified lines | ||
| 422 | 422 | return 0; |
| 423 | 423 | } |
| 424 | 424 | |
| 425 | − if (intsrc->source_irq == 0 && intsrc->global_irq == 2) { | |
| 425 | + if (intsrc->source_irq == 0) { | |
| 426 | 426 | if (acpi_skip_timer_override) { |
| 427 | − printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n"); | |
| 427 | + printk(PREFIX "BIOS IRQ0 override ignored.\n"); | |
| 428 | 428 | return 0; |
| 429 | 429 | } |
| 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)) { | |
| 431 | 433 | intsrc->inti_flags &= ~ACPI_MADT_POLARITY_MASK; |
| 432 | 434 | printk(PREFIX "BIOS IRQ0 pin2 override: forcing polarity to high active.\n"); |
| 433 | 435 | } |
| @@ -1334,17 +1336,12 @@ static int __init dmi_disable_acpi(const struct dmi_system_id *d) · 900 unmodified lines | ||
| 1334 | 1336 | } |
| 1335 | 1337 | |
| 1336 | 1338 | /* |
| 1337 | − * Force ignoring BIOS IRQ0 pin2 override | |
| 1339 | + * Force ignoring BIOS IRQ0 override | |
| 1338 | 1340 | */ |
| 1339 | 1341 | static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d) |
| 1340 | 1342 | { |
| 1341 | − /* | |
| 1342 | − * The ati_ixp4x0_rev() early PCI quirk should have set | |
| 1343 | − * the acpi_skip_timer_override flag already: | |
| 1344 | − */ | |
| 1345 | 1343 | 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", | |
| 1348 | 1345 | d->ident); |
| 1349 | 1346 | acpi_skip_timer_override = 1; |
| 1350 | 1347 | } |
| @@ -1438,7 +1435,7 @@ static struct dmi_system_id __initdata acpi_dmi_table_late[] = { · 87 unmodified lines | ||
| 1438 | 1435 | * is enabled. This input is incorrectly designated the |
| 1439 | 1436 | * ISA IRQ 0 via an interrupt source override even though |
| 1440 | 1437 | * 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 | |
| 1442 | 1439 | * override in that cases. |
| 1443 | 1440 | */ |
| 1444 | 1441 | { |
| @@ -1473,6 +1470,14 @@ static struct dmi_system_id __initdata acpi_dmi_table_late[] = { · 28 unmodified lines | ||
| 1473 | 1470 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq 6715b"), |
| 1474 | 1471 | }, |
| 1475 | 1472 | }, |
| 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 | + }, | |
| 1476 | 1481 | {} |
| 1477 | 1482 | }; |
| 1478 | 1483 | |
| @@ -1,4 +1,4 @@ | ||
| 1 | −#!/usr/bin/perl | |
| 1 | +#!/usr/bin/perl -w | |
| 2 | 2 | # |
| 3 | 3 | # Generate the x86_cap_flags[] array from include/asm-x86/cpufeature.h |
| 4 | 4 | # |
| @@ -11,22 +11,35 @@ open(OUT, "> $out\0") or die "$0: cannot create: $out: $!\n"; · 6 unmodified lines | ||
| 11 | 11 | print OUT "#include <asm/cpufeature.h>\n\n"; |
| 12 | 12 | print OUT "const char * const x86_cap_flags[NCAPINTS*32] = {\n"; |
| 13 | 13 | |
| 14 | +%features = (); | |
| 15 | +$err = 0; | |
| 16 | + | |
| 14 | 17 | while (defined($line = <IN>)) { |
| 15 | 18 | if ($line =~ /^\s*\#\s*define\s+(X86_FEATURE_(\S+))\s+(.*)$/) { |
| 16 | 19 | $macro = $1; |
| 17 | − $feature = $2; | |
| 20 | + $feature = "\L$2"; | |
| 18 | 21 | $tail = $3; |
| 19 | 22 | if ($tail =~ /\/\*\s*\"([^"]*)\".*\*\//) { |
| 20 | − $feature = $1; | |
| 23 | + $feature = "\L$1"; | |
| 21 | 24 | } |
| 22 | 25 | |
| 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++; | |
| 26 | 31 | } |
| 32 | + printf OUT "\t%-32s = \"%s\",\n", "[$macro]", $feature; | |
| 27 | 33 | } |
| 28 | 34 | } |
| 29 | 35 | print OUT "};\n"; |
| 30 | 36 | |
| 31 | 37 | close(IN); |
| 32 | 38 | close(OUT); |
| 39 | + | |
| 40 | +if ($err) { | |
| 41 | + unlink($out); | |
| 42 | + exit(1); | |
| 43 | +} | |
| 44 | + | |
| 45 | +exit(0); | |
| @@ -31,7 +31,7 @@ void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c) · 30 unmodified lines | ||
| 31 | 31 | const struct cpuid_bit *cb; |
| 32 | 32 | |
| 33 | 33 | 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 }, | |
| 35 | 35 | { X86_FEATURE_IDA, CR_EAX, 1, 0x00000006, 0 }, |
| 36 | 36 | { X86_FEATURE_ARAT, CR_EAX, 2, 0x00000006, 0 }, |
| 37 | 37 | { X86_FEATURE_PLN, CR_EAX, 4, 0x00000006, 0 }, |
| @@ -444,12 +444,12 @@ void kgdb_roundup_cpus(unsigned long flags) · 443 unmodified lines | ||
| 444 | 444 | |
| 445 | 445 | /** |
| 446 | 446 | * 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. | |
| 448 | 448 | * @signo: The signal number of the exception that happened. |
| 449 | 449 | * @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. | |
| 453 | 453 | * |
| 454 | 454 | * This function MUST handle the 'c' and 's' command packets, |
| 455 | 455 | * as well packets to set / remove a hardware breakpoint, if used. |
| @@ -451,6 +451,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { · 450 unmodified lines | ||
| 451 | 451 | DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 990"), |
| 452 | 452 | }, |
| 453 | 453 | }, |
| 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 | + }, | |
| 454 | 462 | { } |
| 455 | 463 | }; |
| 456 | 464 | |
| @@ -115,7 +115,7 @@ EXPORT_SYMBOL(csum_partial_copy_to_user); · 114 unmodified lines | ||
| 115 | 115 | * @src: source address |
| 116 | 116 | * @dst: destination address |
| 117 | 117 | * @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) | |
| 119 | 119 | * |
| 120 | 120 | * Returns an 32bit unfolded checksum of the buffer. |
| 121 | 121 | */ |
| @@ -36,6 +36,7 @@ · 35 unmodified lines | ||
| 36 | 36 | #define ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME "Processor Aggregator" |
| 37 | 37 | #define ACPI_PROCESSOR_AGGREGATOR_NOTIFY 0x80 |
| 38 | 38 | static DEFINE_MUTEX(isolated_cpus_lock); |
| 39 | +static DEFINE_MUTEX(round_robin_lock); | |
| 39 | 40 | |
| 40 | 41 | static unsigned long power_saving_mwait_eax; |
| 41 | 42 | |
| @@ -107,7 +108,7 @@ static void round_robin_cpu(unsigned int tsk_index) · 65 unmodified lines | ||
| 107 | 108 | if (!alloc_cpumask_var(&tmp, GFP_KERNEL)) |
| 108 | 109 | return; |
| 109 | 110 | |
| 110 | − mutex_lock(&isolated_cpus_lock); | |
| 111 | + mutex_lock(&round_robin_lock); | |
| 111 | 112 | cpumask_clear(tmp); |
| 112 | 113 | for_each_cpu(cpu, pad_busy_cpus) |
| 113 | 114 | cpumask_or(tmp, tmp, topology_thread_cpumask(cpu)); |
| @@ -116,7 +117,7 @@ static void round_robin_cpu(unsigned int tsk_index) · 2 unmodified lines | ||
| 116 | 117 | if (cpumask_empty(tmp)) |
| 117 | 118 | cpumask_andnot(tmp, cpu_online_mask, pad_busy_cpus); |
| 118 | 119 | if (cpumask_empty(tmp)) { |
| 119 | − mutex_unlock(&isolated_cpus_lock); | |
| 120 | + mutex_unlock(&round_robin_lock); | |
| 120 | 121 | return; |
| 121 | 122 | } |
| 122 | 123 | for_each_cpu(cpu, tmp) { |
| @@ -131,7 +132,7 @@ static void round_robin_cpu(unsigned int tsk_index) · 8 unmodified lines | ||
| 131 | 132 | tsk_in_cpu[tsk_index] = preferred_cpu; |
| 132 | 133 | cpumask_set_cpu(preferred_cpu, pad_busy_cpus); |
| 133 | 134 | cpu_weight[preferred_cpu]++; |
| 134 | − mutex_unlock(&isolated_cpus_lock); | |
| 135 | + mutex_unlock(&round_robin_lock); | |
| 135 | 136 | |
| 136 | 137 | set_cpus_allowed_ptr(current, cpumask_of(preferred_cpu)); |
| 137 | 138 | } |
| @@ -243,7 +243,7 @@ static int pre_map_gar_callback(struct apei_exec_context *ctx, · 242 unmodified lines | ||
| 243 | 243 | u8 ins = entry->instruction; |
| 244 | 244 | |
| 245 | 245 | 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); | |
| 247 | 247 | |
| 248 | 248 | return 0; |
| 249 | 249 | } |
| @@ -276,7 +276,7 @@ static int post_unmap_gar_callback(struct apei_exec_context *ctx, · 26 unmodified lines | ||
| 276 | 276 | u8 ins = entry->instruction; |
| 277 | 277 | |
| 278 | 278 | 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); | |
| 280 | 280 | |
| 281 | 281 | return 0; |
| 282 | 282 | } |
| @@ -606,6 +606,19 @@ static int apei_check_gar(struct acpi_generic_address *reg, u64 *paddr, · 323 unmodified lines | ||
| 606 | 606 | return 0; |
| 607 | 607 | } |
| 608 | 608 | |
| 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 | + | |
| 609 | 622 | /* read GAR in interrupt (including NMI) or process context */ |
| 610 | 623 | int apei_read(u64 *val, struct acpi_generic_address *reg) |
| 611 | 624 | { |
| @@ -7,6 +7,8 @@ · 6 unmodified lines | ||
| 7 | 7 | #define APEI_INTERNAL_H |
| 8 | 8 | |
| 9 | 9 | #include <linux/cper.h> |
| 10 | +#include <linux/acpi.h> | |
| 11 | +#include <linux/acpi_io.h> | |
| 10 | 12 | |
| 11 | 13 | struct apei_exec_context; |
| 12 | 14 | |
| @@ -68,6 +70,13 @@ static inline int apei_exec_run_optional(struct apei_exec_context *ctx, u8 actio · 55 unmodified lines | ||
| 68 | 70 | /* IP has been set in instruction function */ |
| 69 | 71 | #define APEI_EXEC_SET_IP 1 |
| 70 | 72 | |
| 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 | + | |
| 71 | 80 | int apei_read(u64 *val, struct acpi_generic_address *reg); |
| 72 | 81 | int apei_write(u64 val, struct acpi_generic_address *reg); |
| 73 | 82 | |
| @@ -301,7 +301,7 @@ static struct ghes *ghes_new(struct acpi_hest_generic *generic) · 300 unmodified lines | ||
| 301 | 301 | if (!ghes) |
| 302 | 302 | return ERR_PTR(-ENOMEM); |
| 303 | 303 | ghes->generic = generic; |
| 304 | − rc = acpi_os_map_generic_address(&generic->error_status_address); | |
| 304 | + rc = apei_map_generic_address(&generic->error_status_address); | |
| 305 | 305 | if (rc) |
| 306 | 306 | goto err_free; |
| 307 | 307 | error_block_length = generic->error_block_length; |
| @@ -321,7 +321,7 @@ static struct ghes *ghes_new(struct acpi_hest_generic *generic) · 13 unmodified lines | ||
| 321 | 321 | return ghes; |
| 322 | 322 | |
| 323 | 323 | err_unmap: |
| 324 | − acpi_os_unmap_generic_address(&generic->error_status_address); | |
| 324 | + apei_unmap_generic_address(&generic->error_status_address); | |
| 325 | 325 | err_free: |
| 326 | 326 | kfree(ghes); |
| 327 | 327 | return ERR_PTR(rc); |
| @@ -330,7 +330,7 @@ err_free: · 2 unmodified lines | ||
| 330 | 330 | static void ghes_fini(struct ghes *ghes) |
| 331 | 331 | { |
| 332 | 332 | kfree(ghes->estatus); |
| 333 | − acpi_os_unmap_generic_address(&ghes->generic->error_status_address); | |
| 333 | + apei_unmap_generic_address(&ghes->generic->error_status_address); | |
| 334 | 334 | } |
| 335 | 335 | |
| 336 | 336 | enum { |
| @@ -224,6 +224,7 @@ static void lapic_timer_state_broadcast(struct acpi_processor *pr, · 223 unmodified lines | ||
| 224 | 224 | /* |
| 225 | 225 | * Suspend / resume control |
| 226 | 226 | */ |
| 227 | +static int acpi_idle_suspend; | |
| 227 | 228 | static u32 saved_bm_rld; |
| 228 | 229 | |
| 229 | 230 | static void acpi_idle_bm_rld_save(void) |
| @@ -242,13 +243,21 @@ static void acpi_idle_bm_rld_restore(void) · 12 unmodified lines | ||
| 242 | 243 | |
| 243 | 244 | int acpi_processor_suspend(struct acpi_device * device, pm_message_t state) |
| 244 | 245 | { |
| 246 | + if (acpi_idle_suspend == 1) | |
| 247 | + return 0; | |
| 248 | + | |
| 245 | 249 | acpi_idle_bm_rld_save(); |
| 250 | + acpi_idle_suspend = 1; | |
| 246 | 251 | return 0; |
| 247 | 252 | } |
| 248 | 253 | |
| 249 | 254 | int acpi_processor_resume(struct acpi_device * device) |
| 250 | 255 | { |
| 256 | + if (acpi_idle_suspend == 0) | |
| 257 | + return 0; | |
| 258 | + | |
| 251 | 259 | acpi_idle_bm_rld_restore(); |
| 260 | + acpi_idle_suspend = 0; | |
| 252 | 261 | return 0; |
| 253 | 262 | } |
| 254 | 263 | |
| @@ -754,6 +763,12 @@ static int acpi_idle_enter_c1(struct cpuidle_device *dev, · 499 unmodified lines | ||
| 754 | 763 | |
| 755 | 764 | local_irq_disable(); |
| 756 | 765 | |
| 766 | + if (acpi_idle_suspend) { | |
| 767 | + local_irq_enable(); | |
| 768 | + cpu_relax(); | |
| 769 | + return -EBUSY; | |
| 770 | + } | |
| 771 | + | |
| 757 | 772 | lapic_timer_state_broadcast(pr, cx, 1); |
| 758 | 773 | kt1 = ktime_get_real(); |
| 759 | 774 | acpi_idle_do_entry(cx); |
| @@ -823,6 +838,12 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, · 63 unmodified lines | ||
| 823 | 838 | |
| 824 | 839 | local_irq_disable(); |
| 825 | 840 | |
| 841 | + if (acpi_idle_suspend) { | |
| 842 | + local_irq_enable(); | |
| 843 | + cpu_relax(); | |
| 844 | + return -EBUSY; | |
| 845 | + } | |
| 846 | + | |
| 826 | 847 | if (cx->entry_method != ACPI_CSTATE_FFH) { |
| 827 | 848 | current_thread_info()->status &= ~TS_POLLING; |
| 828 | 849 | /* |
| @@ -907,14 +928,21 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, · 78 unmodified lines | ||
| 907 | 928 | drv, drv->safe_state_index); |
| 908 | 929 | } else { |
| 909 | 930 | local_irq_disable(); |
| 910 | − acpi_safe_halt(); | |
| 931 | + if (!acpi_idle_suspend) | |
| 932 | + acpi_safe_halt(); | |
| 911 | 933 | local_irq_enable(); |
| 912 | − return -EINVAL; | |
| 934 | + return -EBUSY; | |
| 913 | 935 | } |
| 914 | 936 | } |
| 915 | 937 | |
| 916 | 938 | local_irq_disable(); |
| 917 | 939 | |
| 940 | + if (acpi_idle_suspend) { | |
| 941 | + local_irq_enable(); | |
| 942 | + cpu_relax(); | |
| 943 | + return -EBUSY; | |
| 944 | + } | |
| 945 | + | |
| 918 | 946 | if (cx->entry_method != ACPI_CSTATE_FFH) { |
| 919 | 947 | current_thread_info()->status &= ~TS_POLLING; |
| 920 | 948 | /* |
| @@ -173,7 +173,7 @@ static int param_set_trace_state(const char *val, struct kernel_param *kp) · 172 unmodified lines | ||
| 173 | 173 | { |
| 174 | 174 | int result = 0; |
| 175 | 175 | |
| 176 | − if (!strncmp(val, "enable", strlen("enable") - 1)) { | |
| 176 | + if (!strncmp(val, "enable", strlen("enable"))) { | |
| 177 | 177 | result = acpi_debug_trace(trace_method_name, trace_debug_level, |
| 178 | 178 | trace_debug_layer, 0); |
| 179 | 179 | if (result) |
| @@ -181,7 +181,7 @@ static int param_set_trace_state(const char *val, struct kernel_param *kp) · 1 unmodified line | ||
| 181 | 181 | goto exit; |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | − if (!strncmp(val, "disable", strlen("disable") - 1)) { | |
| 184 | + if (!strncmp(val, "disable", strlen("disable"))) { | |
| 185 | 185 | int name = 0; |
| 186 | 186 | result = acpi_debug_trace((char *)&name, trace_debug_level, |
| 187 | 187 | trace_debug_layer, 0); |
| @@ -558,6 +558,8 @@ acpi_video_bus_DOS(struct acpi_video_bus *video, int bios_flag, int lcd_flag) · 557 unmodified lines | ||
| 558 | 558 | union acpi_object arg0 = { ACPI_TYPE_INTEGER }; |
| 559 | 559 | struct acpi_object_list args = { 1, &arg0 }; |
| 560 | 560 | |
| 561 | + if (!video->cap._DOS) | |
| 562 | + return 0; | |
| 561 | 563 | |
| 562 | 564 | if (bios_flag < 0 || bios_flag > 3 || lcd_flag < 0 || lcd_flag > 1) |
| 563 | 565 | return -EINVAL; |
| @@ -1031,7 +1031,7 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async) · 1030 unmodified lines | ||
| 1031 | 1031 | dpm_wait_for_children(dev, async); |
| 1032 | 1032 | |
| 1033 | 1033 | if (async_error) |
| 1034 | − return 0; | |
| 1034 | + goto Complete; | |
| 1035 | 1035 | |
| 1036 | 1036 | pm_runtime_get_noresume(dev); |
| 1037 | 1037 | 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 | ||
| 1040 | 1040 | if (pm_wakeup_pending()) { |
| 1041 | 1041 | pm_runtime_put_sync(dev); |
| 1042 | 1042 | async_error = -EBUSY; |
| 1043 | − return 0; | |
| 1043 | + goto Complete; | |
| 1044 | 1044 | } |
| 1045 | 1045 | |
| 1046 | 1046 | device_lock(dev); |
| @@ -1097,6 +1097,8 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async) · 50 unmodified lines | ||
| 1097 | 1097 | } |
| 1098 | 1098 | |
| 1099 | 1099 | device_unlock(dev); |
| 1100 | + | |
| 1101 | + Complete: | |
| 1100 | 1102 | complete_all(&dev->power.completion); |
| 1101 | 1103 | |
| 1102 | 1104 | if (error) { |
| @@ -63,6 +63,7 @@ static struct usb_device_id ath3k_table[] = { · 62 unmodified lines | ||
| 63 | 63 | |
| 64 | 64 | /* Atheros AR3011 with sflash firmware*/ |
| 65 | 65 | { USB_DEVICE(0x0CF3, 0x3002) }, |
| 66 | + { USB_DEVICE(0x0CF3, 0xE019) }, | |
| 66 | 67 | { USB_DEVICE(0x13d3, 0x3304) }, |
| 67 | 68 | { USB_DEVICE(0x0930, 0x0215) }, |
| 68 | 69 | { USB_DEVICE(0x0489, 0xE03D) }, |
| @@ -77,6 +78,7 @@ static struct usb_device_id ath3k_table[] = { · 8 unmodified lines | ||
| 77 | 78 | { USB_DEVICE(0x04CA, 0x3005) }, |
| 78 | 79 | { USB_DEVICE(0x13d3, 0x3362) }, |
| 79 | 80 | { USB_DEVICE(0x0CF3, 0xE004) }, |
| 81 | + { USB_DEVICE(0x0930, 0x0219) }, | |
| 80 | 82 | |
| 81 | 83 | /* Atheros AR5BBU12 with sflash firmware */ |
| 82 | 84 | { USB_DEVICE(0x0489, 0xE02C) }, |
| @@ -101,6 +103,7 @@ static struct usb_device_id ath3k_blist_tbl[] = { · 18 unmodified lines | ||
| 101 | 103 | { USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 }, |
| 102 | 104 | { USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 }, |
| 103 | 105 | { USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 }, |
| 106 | + { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, | |
| 104 | 107 | |
| 105 | 108 | /* Atheros AR5BBU22 with sflash firmware */ |
| 106 | 109 | { USB_DEVICE(0x0489, 0xE03C), .driver_info = BTUSB_ATH3012 }, |
| @@ -136,7 +136,7 @@ int btmrvl_remove_card(struct btmrvl_private *priv); · 135 unmodified lines | ||
| 136 | 136 | |
| 137 | 137 | void btmrvl_interrupt(struct btmrvl_private *priv); |
| 138 | 138 | |
| 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); | |
| 140 | 140 | int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb); |
| 141 | 141 | |
| 142 | 142 | int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd); |
| @@ -44,23 +44,33 @@ void btmrvl_interrupt(struct btmrvl_private *priv) · 43 unmodified lines | ||
| 44 | 44 | } |
| 45 | 45 | EXPORT_SYMBOL_GPL(btmrvl_interrupt); |
| 46 | 46 | |
| 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) | |
| 48 | 48 | { |
| 49 | 49 | struct hci_event_hdr *hdr = (void *) skb->data; |
| 50 | 50 | struct hci_ev_cmd_complete *ec; |
| 51 | − u16 opcode, ocf; | |
| 51 | + u16 opcode, ocf, ogf; | |
| 52 | 52 | |
| 53 | 53 | if (hdr->evt == HCI_EV_CMD_COMPLETE) { |
| 54 | 54 | ec = (void *) (skb->data + HCI_EVENT_HDR_SIZE); |
| 55 | 55 | opcode = __le16_to_cpu(ec->opcode); |
| 56 | 56 | ocf = hci_opcode_ocf(opcode); |
| 57 | + ogf = hci_opcode_ogf(opcode); | |
| 58 | + | |
| 57 | 59 | if (ocf == BT_CMD_MODULE_CFG_REQ && |
| 58 | 60 | priv->btmrvl_dev.sendcmdflag) { |
| 59 | 61 | priv->btmrvl_dev.sendcmdflag = false; |
| 60 | 62 | priv->adapter->cmd_complete = true; |
| 61 | 63 | wake_up_interruptible(&priv->adapter->cmd_wait_q); |
| 62 | 64 | } |
| 65 | + | |
| 66 | + if (ogf == OGF) { | |
| 67 | + BT_DBG("vendor event skipped: ogf 0x%4.4x", ogf); | |
| 68 | + kfree_skb(skb); | |
| 69 | + return false; | |
| 70 | + } | |
| 63 | 71 | } |
| 72 | + | |
| 73 | + return true; | |
| 64 | 74 | } |
| 65 | 75 | EXPORT_SYMBOL_GPL(btmrvl_check_evtpkt); |
| 66 | 76 | |
| @@ -562,10 +562,12 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv) · 561 unmodified lines | ||
| 562 | 562 | skb_put(skb, buf_len); |
| 563 | 563 | skb_pull(skb, SDIO_HEADER_LEN); |
| 564 | 564 | |
| 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); | |
| 567 | 570 | |
| 568 | − hci_recv_frame(skb); | |
| 569 | 571 | hdev->stat.byte_rx += buf_len; |
| 570 | 572 | break; |
| 571 | 573 | |
| @@ -125,6 +125,7 @@ static struct usb_device_id blacklist_table[] = { · 124 unmodified lines | ||
| 125 | 125 | |
| 126 | 126 | /* Atheros 3011 with sflash firmware */ |
| 127 | 127 | { USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE }, |
| 128 | + { USB_DEVICE(0x0cf3, 0xe019), .driver_info = BTUSB_IGNORE }, | |
| 128 | 129 | { USB_DEVICE(0x13d3, 0x3304), .driver_info = BTUSB_IGNORE }, |
| 129 | 130 | { USB_DEVICE(0x0930, 0x0215), .driver_info = BTUSB_IGNORE }, |
| 130 | 131 | { USB_DEVICE(0x0489, 0xe03d), .driver_info = BTUSB_IGNORE }, |
| @@ -139,6 +140,7 @@ static struct usb_device_id blacklist_table[] = { · 8 unmodified lines | ||
| 139 | 140 | { USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 }, |
| 140 | 141 | { USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 }, |
| 141 | 142 | { USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 }, |
| 143 | + { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, | |
| 142 | 144 | |
| 143 | 145 | /* Atheros AR5BBU12 with sflash firmware */ |
| 144 | 146 | { USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE }, |
| @@ -850,18 +850,21 @@ static void clk_change_rate(struct clk *clk) · 849 unmodified lines | ||
| 850 | 850 | { |
| 851 | 851 | struct clk *child; |
| 852 | 852 | unsigned long old_rate; |
| 853 | + unsigned long best_parent_rate = 0; | |
| 853 | 854 | struct hlist_node *tmp; |
| 854 | 855 | |
| 855 | 856 | old_rate = clk->rate; |
| 856 | 857 | |
| 858 | + if (clk->parent) | |
| 859 | + best_parent_rate = clk->parent->rate; | |
| 860 | + | |
| 857 | 861 | 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); | |
| 859 | 863 | |
| 860 | 864 | 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); | |
| 863 | 866 | else |
| 864 | − clk->rate = clk->parent->rate; | |
| 867 | + clk->rate = best_parent_rate; | |
| 865 | 868 | |
| 866 | 869 | if (clk->notifier_count && old_rate != clk->rate) |
| 867 | 870 | __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 | ||
| 999 | 1002 | |
| 1000 | 1003 | if (!clk->parents) |
| 1001 | 1004 | clk->parents = |
| 1002 | − kmalloc((sizeof(struct clk*) * clk->num_parents), | |
| 1005 | + kzalloc((sizeof(struct clk*) * clk->num_parents), | |
| 1003 | 1006 | GFP_KERNEL); |
| 1004 | 1007 | |
| 1005 | 1008 | if (!clk->parents) |
| @@ -1065,9 +1068,13 @@ static int __clk_set_parent(struct clk *clk, struct clk *parent) · 59 unmodified lines | ||
| 1065 | 1068 | old_parent = clk->parent; |
| 1066 | 1069 | |
| 1067 | 1070 | /* 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); | |
| 1071 | 1078 | |
| 1072 | 1079 | /* |
| 1073 | 1080 | * 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 | ||
| 1076 | 1083 | if (i == clk->num_parents) |
| 1077 | 1084 | for (i = 0; i < clk->num_parents; i++) |
| 1078 | 1085 | 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); | |
| 1080 | 1088 | break; |
| 1081 | 1089 | } |
| 1082 | 1090 | |
| @@ -71,7 +71,7 @@ static void __init clk_misc_init(void) · 70 unmodified lines | ||
| 71 | 71 | __mxs_setl(30 << BP_FRAC_IOFRAC, FRAC); |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | −static struct clk_lookup uart_lookups[] __initdata = { | |
| 74 | +static struct clk_lookup uart_lookups[] = { | |
| 75 | 75 | { .dev_id = "duart", }, |
| 76 | 76 | { .dev_id = "mxs-auart.0", }, |
| 77 | 77 | { .dev_id = "mxs-auart.1", }, |
| @@ -80,31 +80,31 @@ static struct clk_lookup uart_lookups[] __initdata = { · 2 unmodified lines | ||
| 80 | 80 | { .dev_id = "80070000.serial", }, |
| 81 | 81 | }; |
| 82 | 82 | |
| 83 | −static struct clk_lookup hbus_lookups[] __initdata = { | |
| 83 | +static struct clk_lookup hbus_lookups[] = { | |
| 84 | 84 | { .dev_id = "imx23-dma-apbh", }, |
| 85 | 85 | { .dev_id = "80004000.dma-apbh", }, |
| 86 | 86 | }; |
| 87 | 87 | |
| 88 | −static struct clk_lookup xbus_lookups[] __initdata = { | |
| 88 | +static struct clk_lookup xbus_lookups[] = { | |
| 89 | 89 | { .dev_id = "duart", .con_id = "apb_pclk"}, |
| 90 | 90 | { .dev_id = "80070000.serial", .con_id = "apb_pclk"}, |
| 91 | 91 | { .dev_id = "imx23-dma-apbx", }, |
| 92 | 92 | { .dev_id = "80024000.dma-apbx", }, |
| 93 | 93 | }; |
| 94 | 94 | |
| 95 | −static struct clk_lookup ssp_lookups[] __initdata = { | |
| 95 | +static struct clk_lookup ssp_lookups[] = { | |
| 96 | 96 | { .dev_id = "imx23-mmc.0", }, |
| 97 | 97 | { .dev_id = "imx23-mmc.1", }, |
| 98 | 98 | { .dev_id = "80010000.ssp", }, |
| 99 | 99 | { .dev_id = "80034000.ssp", }, |
| 100 | 100 | }; |
| 101 | 101 | |
| 102 | −static struct clk_lookup lcdif_lookups[] __initdata = { | |
| 102 | +static struct clk_lookup lcdif_lookups[] = { | |
| 103 | 103 | { .dev_id = "imx23-fb", }, |
| 104 | 104 | { .dev_id = "80030000.lcdif", }, |
| 105 | 105 | }; |
| 106 | 106 | |
| 107 | −static struct clk_lookup gpmi_lookups[] __initdata = { | |
| 107 | +static struct clk_lookup gpmi_lookups[] = { | |
| 108 | 108 | { .dev_id = "imx23-gpmi-nand", }, |
| 109 | 109 | { .dev_id = "8000c000.gpmi", }, |
| 110 | 110 | }; |
| @@ -120,7 +120,7 @@ static void __init clk_misc_init(void) · 119 unmodified lines | ||
| 120 | 120 | writel_relaxed(val, FRAC0); |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | −static struct clk_lookup uart_lookups[] __initdata = { | |
| 123 | +static struct clk_lookup uart_lookups[] = { | |
| 124 | 124 | { .dev_id = "duart", }, |
| 125 | 125 | { .dev_id = "mxs-auart.0", }, |
| 126 | 126 | { .dev_id = "mxs-auart.1", }, |
| @@ -135,71 +135,71 @@ static struct clk_lookup uart_lookups[] __initdata = { · 8 unmodified lines | ||
| 135 | 135 | { .dev_id = "80074000.serial", }, |
| 136 | 136 | }; |
| 137 | 137 | |
| 138 | −static struct clk_lookup hbus_lookups[] __initdata = { | |
| 138 | +static struct clk_lookup hbus_lookups[] = { | |
| 139 | 139 | { .dev_id = "imx28-dma-apbh", }, |
| 140 | 140 | { .dev_id = "80004000.dma-apbh", }, |
| 141 | 141 | }; |
| 142 | 142 | |
| 143 | −static struct clk_lookup xbus_lookups[] __initdata = { | |
| 143 | +static struct clk_lookup xbus_lookups[] = { | |
| 144 | 144 | { .dev_id = "duart", .con_id = "apb_pclk"}, |
| 145 | 145 | { .dev_id = "80074000.serial", .con_id = "apb_pclk"}, |
| 146 | 146 | { .dev_id = "imx28-dma-apbx", }, |
| 147 | 147 | { .dev_id = "80024000.dma-apbx", }, |
| 148 | 148 | }; |
| 149 | 149 | |
| 150 | −static struct clk_lookup ssp0_lookups[] __initdata = { | |
| 150 | +static struct clk_lookup ssp0_lookups[] = { | |
| 151 | 151 | { .dev_id = "imx28-mmc.0", }, |
| 152 | 152 | { .dev_id = "80010000.ssp", }, |
| 153 | 153 | }; |
| 154 | 154 | |
| 155 | −static struct clk_lookup ssp1_lookups[] __initdata = { | |
| 155 | +static struct clk_lookup ssp1_lookups[] = { | |
| 156 | 156 | { .dev_id = "imx28-mmc.1", }, |
| 157 | 157 | { .dev_id = "80012000.ssp", }, |
| 158 | 158 | }; |
| 159 | 159 | |
| 160 | −static struct clk_lookup ssp2_lookups[] __initdata = { | |
| 160 | +static struct clk_lookup ssp2_lookups[] = { | |
| 161 | 161 | { .dev_id = "imx28-mmc.2", }, |
| 162 | 162 | { .dev_id = "80014000.ssp", }, |
| 163 | 163 | }; |
| 164 | 164 | |
| 165 | −static struct clk_lookup ssp3_lookups[] __initdata = { | |
| 165 | +static struct clk_lookup ssp3_lookups[] = { | |
| 166 | 166 | { .dev_id = "imx28-mmc.3", }, |
| 167 | 167 | { .dev_id = "80016000.ssp", }, |
| 168 | 168 | }; |
| 169 | 169 | |
| 170 | −static struct clk_lookup lcdif_lookups[] __initdata = { | |
| 170 | +static struct clk_lookup lcdif_lookups[] = { | |
| 171 | 171 | { .dev_id = "imx28-fb", }, |
| 172 | 172 | { .dev_id = "80030000.lcdif", }, |
| 173 | 173 | }; |
| 174 | 174 | |
| 175 | −static struct clk_lookup gpmi_lookups[] __initdata = { | |
| 175 | +static struct clk_lookup gpmi_lookups[] = { | |
| 176 | 176 | { .dev_id = "imx28-gpmi-nand", }, |
| 177 | 177 | { .dev_id = "8000c000.gpmi", }, |
| 178 | 178 | }; |
| 179 | 179 | |
| 180 | −static struct clk_lookup fec_lookups[] __initdata = { | |
| 180 | +static struct clk_lookup fec_lookups[] = { | |
| 181 | 181 | { .dev_id = "imx28-fec.0", }, |
| 182 | 182 | { .dev_id = "imx28-fec.1", }, |
| 183 | 183 | { .dev_id = "800f0000.ethernet", }, |
| 184 | 184 | { .dev_id = "800f4000.ethernet", }, |
| 185 | 185 | }; |
| 186 | 186 | |
| 187 | −static struct clk_lookup can0_lookups[] __initdata = { | |
| 187 | +static struct clk_lookup can0_lookups[] = { | |
| 188 | 188 | { .dev_id = "flexcan.0", }, |
| 189 | 189 | { .dev_id = "80032000.can", }, |
| 190 | 190 | }; |
| 191 | 191 | |
| 192 | −static struct clk_lookup can1_lookups[] __initdata = { | |
| 192 | +static struct clk_lookup can1_lookups[] = { | |
| 193 | 193 | { .dev_id = "flexcan.1", }, |
| 194 | 194 | { .dev_id = "80034000.can", }, |
| 195 | 195 | }; |
| 196 | 196 | |
| 197 | −static struct clk_lookup saif0_lookups[] __initdata = { | |
| 197 | +static struct clk_lookup saif0_lookups[] = { | |
| 198 | 198 | { .dev_id = "mxs-saif.0", }, |
| 199 | 199 | { .dev_id = "80042000.saif", }, |
| 200 | 200 | }; |
| 201 | 201 | |
| 202 | −static struct clk_lookup saif1_lookups[] __initdata = { | |
| 202 | +static struct clk_lookup saif1_lookups[] = { | |
| 203 | 203 | { .dev_id = "mxs-saif.1", }, |
| 204 | 204 | { .dev_id = "80046000.saif", }, |
| 205 | 205 | }; |
| @@ -245,8 +245,8 @@ int __init mx28_clocks_init(void) · 39 unmodified lines | ||
| 245 | 245 | clks[pll2] = mxs_clk_pll("pll2", "ref_xtal", PLL2CTRL0, 23, 50000000); |
| 246 | 246 | clks[ref_cpu] = mxs_clk_ref("ref_cpu", "pll0", FRAC0, 0); |
| 247 | 247 | 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); | |
| 250 | 250 | clks[ref_pix] = mxs_clk_ref("ref_pix", "pll0", FRAC1, 0); |
| 251 | 251 | clks[ref_hsadc] = mxs_clk_ref("ref_hsadc", "pll0", FRAC1, 1); |
| 252 | 252 | clks[ref_gpmi] = mxs_clk_ref("ref_gpmi", "pll0", FRAC1, 2); |
| @@ -298,7 +298,7 @@ void __init spear6xx_clk_init(void) · 297 unmodified lines | ||
| 298 | 298 | |
| 299 | 299 | clk = clk_register_gate(NULL, "gmac_clk", "ahb_clk", 0, PERIP1_CLK_ENB, |
| 300 | 300 | GMAC_CLK_ENB, 0, &_lock); |
| 301 | − clk_register_clkdev(clk, NULL, "gmac"); | |
| 301 | + clk_register_clkdev(clk, NULL, "e0800000.ethernet"); | |
| 302 | 302 | |
| 303 | 303 | clk = clk_register_gate(NULL, "i2c_clk", "ahb_clk", 0, PERIP1_CLK_ENB, |
| 304 | 304 | I2C_CLK_ENB, 0, &_lock); |
| @@ -412,7 +412,6 @@ static void gen6_queue_rps_work(struct drm_i915_private *dev_priv, · 411 unmodified lines | ||
| 412 | 412 | */ |
| 413 | 413 | |
| 414 | 414 | spin_lock_irqsave(&dev_priv->rps_lock, flags); |
| 415 | − WARN(dev_priv->pm_iir & pm_iir, "Missed a PM interrupt\n"); | |
| 416 | 415 | dev_priv->pm_iir |= pm_iir; |
| 417 | 416 | I915_WRITE(GEN6_PMIMR, dev_priv->pm_iir); |
| 418 | 417 | POSTING_READ(GEN6_PMIMR); |
| @@ -740,8 +740,11 @@ static void i915_restore_display(struct drm_device *dev) · 739 unmodified lines | ||
| 740 | 740 | if (HAS_PCH_SPLIT(dev)) { |
| 741 | 741 | I915_WRITE(BLC_PWM_PCH_CTL1, dev_priv->saveBLC_PWM_CTL); |
| 742 | 742 | 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 | + */ | |
| 744 | 746 | 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); | |
| 745 | 748 | I915_WRITE(PCH_PP_ON_DELAYS, dev_priv->savePP_ON_DELAYS); |
| 746 | 749 | I915_WRITE(PCH_PP_OFF_DELAYS, dev_priv->savePP_OFF_DELAYS); |
| 747 | 750 | I915_WRITE(PCH_PP_DIVISOR, dev_priv->savePP_DIVISOR); |
| @@ -6921,19 +6921,6 @@ static void i915_disable_vga(struct drm_device *dev) · 6920 unmodified lines | ||
| 6921 | 6921 | POSTING_READ(vga_reg); |
| 6922 | 6922 | } |
| 6923 | 6923 | |
| 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 | − | |
| 6937 | 6924 | void intel_modeset_init_hw(struct drm_device *dev) |
| 6938 | 6925 | { |
| 6939 | 6926 | 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 | ||
| 6950 | 6937 | gen6_enable_rps(dev_priv); |
| 6951 | 6938 | gen6_update_ring_freq(dev_priv); |
| 6952 | 6939 | } |
| 6953 | − | |
| 6954 | − if (IS_IVYBRIDGE(dev)) | |
| 6955 | − ivb_pch_pwm_override(dev); | |
| 6956 | 6940 | } |
| 6957 | 6941 | |
| 6958 | 6942 | void intel_modeset_init(struct drm_device *dev) |
| @@ -467,7 +467,7 @@ int nouveau_fbcon_init(struct drm_device *dev) · 466 unmodified lines | ||
| 467 | 467 | nfbdev->helper.funcs = &nouveau_fbcon_helper_funcs; |
| 468 | 468 | |
| 469 | 469 | ret = drm_fb_helper_init(dev, &nfbdev->helper, |
| 470 | − nv_two_heads(dev) ? 2 : 1, 4); | |
| 470 | + dev->mode_config.num_crtc, 4); | |
| 471 | 471 | if (ret) { |
| 472 | 472 | kfree(nfbdev); |
| 473 | 473 | return ret; |
| @@ -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 | + */ | |
| 1 | 24 | |
| 2 | 25 | #include "drmP.h" |
| 3 | 26 | #include "drm.h" |
| @@ -61,7 +61,7 @@ static int udl_parse_vendor_descriptor(struct drm_device *dev, · 60 unmodified lines | ||
| 61 | 61 | u8 length; |
| 62 | 62 | u16 key; |
| 63 | 63 | |
| 64 | − key = *((u16 *) desc); | |
| 64 | + key = le16_to_cpu(*((u16 *) desc)); | |
| 65 | 65 | desc += sizeof(u16); |
| 66 | 66 | length = *desc; |
| 67 | 67 | desc++; |
| @@ -1,20 +1,11 @@ | ||
| 1 | 1 | # |
| 2 | 2 | # HID driver configuration |
| 3 | 3 | # |
| 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 | |
| 15 | 6 | |
| 16 | 7 | config HID |
| 17 | − tristate "Generic HID support" | |
| 8 | + tristate "HID bus support" | |
| 18 | 9 | depends on INPUT |
| 19 | 10 | default y |
| 20 | 11 | ---help--- |
| @@ -23,14 +14,17 @@ config HID · 2 unmodified lines | ||
| 23 | 14 | most commonly used to refer to the USB-HID specification, but other |
| 24 | 15 | devices (such as, but not strictly limited to, Bluetooth) are |
| 25 | 16 | 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). | |
| 29 | 21 | |
| 30 | 22 | For docs and specs, see http://www.usb.org/developers/hidpage/ |
| 31 | 23 | |
| 32 | 24 | If unsure, say Y. |
| 33 | 25 | |
| 26 | +if HID | |
| 27 | + | |
| 34 | 28 | config HID_BATTERY_STRENGTH |
| 35 | 29 | bool "Battery level reporting for HID devices" |
| 36 | 30 | depends on HID && POWER_SUPPLY && HID = POWER_SUPPLY |
| @@ -59,23 +53,22 @@ config HIDRAW · 22 unmodified lines | ||
| 59 | 53 | |
| 60 | 54 | If unsure, say Y. |
| 61 | 55 | |
| 62 | −source "drivers/hid/usbhid/Kconfig" | |
| 63 | − | |
| 64 | −menu "Special HID drivers" | |
| 65 | − depends on HID | |
| 66 | − | |
| 67 | 56 | config HID_GENERIC |
| 68 | 57 | tristate "Generic HID driver" |
| 69 | 58 | depends on HID |
| 70 | − default y | |
| 59 | + default HID | |
| 71 | 60 | ---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. | |
| 73 | 63 | |
| 74 | 64 | To compile this driver as a module, choose M here: the module |
| 75 | 65 | will be called hid-generic. |
| 76 | 66 | |
| 77 | 67 | If unsure, say Y. |
| 78 | 68 | |
| 69 | +menu "Special HID drivers" | |
| 70 | + depends on HID | |
| 71 | + | |
| 79 | 72 | config HID_A4TECH |
| 80 | 73 | tristate "A4 tech mice" if EXPERT |
| 81 | 74 | depends on USB_HID |
| @@ -662,4 +655,8 @@ config HID_ZYDACRON · 580 unmodified lines | ||
| 662 | 655 | |
| 663 | 656 | endmenu |
| 664 | 657 | |
| 665 | −endif # HID_SUPPORT | |
| 658 | +endif # HID | |
| 659 | + | |
| 660 | +source "drivers/hid/usbhid/Kconfig" | |
| 661 | + | |
| 662 | +endmenu | |
| @@ -1880,6 +1880,7 @@ static const struct hid_device_id hid_ignore_list[] = { · 1879 unmodified lines | ||
| 1880 | 1880 | { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_LCM)}, |
| 1881 | 1881 | { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_LCM2)}, |
| 1882 | 1882 | { 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) }, | |
| 1883 | 1884 | { HID_USB_DEVICE(USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD) }, |
| 1884 | 1885 | { HID_USB_DEVICE(USB_VENDOR_ID_CIDC, 0x0103) }, |
| 1885 | 1886 | { HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, USB_DEVICE_ID_CYGNAL_RADIO_SI470X) }, |
| @@ -160,6 +160,9 @@ · 159 unmodified lines | ||
| 160 | 160 | #define USB_VENDOR_ID_AVERMEDIA 0x07ca |
| 161 | 161 | #define USB_DEVICE_ID_AVER_FM_MR800 0xb800 |
| 162 | 162 | |
| 163 | +#define USB_VENDOR_ID_AXENTIA 0x12cf | |
| 164 | +#define USB_DEVICE_ID_AXENTIA_FM_RADIO 0x7111 | |
| 165 | + | |
| 163 | 166 | #define USB_VENDOR_ID_BAANTO 0x2453 |
| 164 | 167 | #define USB_DEVICE_ID_BAANTO_MT_190W2 0x0100 |
| 165 | 168 | |
| @@ -436,27 +436,37 @@ static int logi_dj_recv_send_report(struct dj_receiver_dev *djrcv_dev, · 435 unmodified lines | ||
| 436 | 436 | |
| 437 | 437 | static int logi_dj_recv_query_paired_devices(struct dj_receiver_dev *djrcv_dev) |
| 438 | 438 | { |
| 439 | − struct dj_report dj_report; | |
| 439 | + struct dj_report *dj_report; | |
| 440 | + int retval; | |
| 440 | 441 | |
| 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; | |
| 446 | 451 | } |
| 447 | 452 | |
| 448 | 453 | static int logi_dj_recv_switch_to_dj_mode(struct dj_receiver_dev *djrcv_dev, |
| 449 | 454 | unsigned timeout) |
| 450 | 455 | { |
| 451 | − struct dj_report dj_report; | |
| 456 | + struct dj_report *dj_report; | |
| 457 | + int retval; | |
| 452 | 458 | |
| 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; | |
| 460 | 470 | } |
| 461 | 471 | |
| 462 | 472 | |
| @@ -426,8 +426,10 @@ static void magicmouse_setup_input(struct input_dev *input, struct hid_device *h · 425 unmodified lines | ||
| 426 | 426 | __set_bit(EV_ABS, input->evbit); |
| 427 | 427 | |
| 428 | 428 | 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); | |
| 431 | 433 | input_set_abs_params(input, ABS_MT_ORIENTATION, -31, 32, 1, 0); |
| 432 | 434 | |
| 433 | 435 | /* Note: Touch Y position from the device is inverted relative |
| @@ -1,13 +1,13 @@ | ||
| 1 | −comment "USB Input Devices" | |
| 1 | +menu "USB HID support" | |
| 2 | 2 | depends on USB |
| 3 | 3 | |
| 4 | 4 | config USB_HID |
| 5 | − tristate "USB Human Interface Device (full HID) support" | |
| 5 | + tristate "USB HID transport layer" | |
| 6 | 6 | default y |
| 7 | 7 | depends on USB && INPUT |
| 8 | 8 | select HID |
| 9 | 9 | ---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, | |
| 11 | 11 | mice, joysticks, graphic tablets, or any other HID based devices |
| 12 | 12 | to your computer via USB, as well as Uninterruptible Power Supply |
| 13 | 13 | (UPS) and monitor control devices. |
| @@ -81,4 +81,4 @@ config USB_MOUSE · 67 unmodified lines | ||
| 81 | 81 | |
| 82 | 82 | endmenu |
| 83 | 83 | |
| 84 | − | |
| 84 | +endmenu | |
| @@ -8,7 +8,7 @@ · 7 unmodified lines | ||
| 8 | 8 | * |
| 9 | 9 | * Based on hdaps.c driver: |
| 10 | 10 | * 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> | |
| 12 | 12 | * |
| 13 | 13 | * Fan control based on smcFanControl: |
| 14 | 14 | * Copyright (C) 2006 Hendrik Holtmann <holtmann@mac.com> |
| @@ -693,7 +693,7 @@ static void __cpuinit get_core_online(unsigned int cpu) · 692 unmodified lines | ||
| 693 | 693 | * sensors. We check this bit only, all the early CPUs |
| 694 | 694 | * without thermal sensors will be filtered out. |
| 695 | 695 | */ |
| 696 | − if (!cpu_has(c, X86_FEATURE_DTS)) | |
| 696 | + if (!cpu_has(c, X86_FEATURE_DTHERM)) | |
| 697 | 697 | return; |
| 698 | 698 | |
| 699 | 699 | if (!pdev) { |
| @@ -794,7 +794,7 @@ static struct notifier_block coretemp_cpu_notifier __refdata = { · 94 unmodified lines | ||
| 794 | 794 | }; |
| 795 | 795 | |
| 796 | 796 | 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 }, | |
| 798 | 798 | {} |
| 799 | 799 | }; |
| 800 | 800 | MODULE_DEVICE_TABLE(x86cpu, coretemp_ids); |
| @@ -590,6 +590,6 @@ abort: · 589 unmodified lines | ||
| 590 | 590 | |
| 591 | 591 | module_i2c_driver(jc42_driver); |
| 592 | 592 | |
| 593 | −MODULE_AUTHOR("Guenter Roeck <guenter.roeck@ericsson.com>"); | |
| 593 | +MODULE_AUTHOR("Guenter Roeck <linux@roeck-us.net>"); | |
| 594 | 594 | MODULE_DESCRIPTION("JC42 driver"); |
| 595 | 595 | MODULE_LICENSE("GPL"); |
| @@ -567,6 +567,6 @@ static struct i2c_driver pem_driver = { · 566 unmodified lines | ||
| 567 | 567 | |
| 568 | 568 | module_i2c_driver(pem_driver); |
| 569 | 569 | |
| 570 | −MODULE_AUTHOR("Guenter Roeck <guenter.roeck@ericsson.com>"); | |
| 570 | +MODULE_AUTHOR("Guenter Roeck <linux@roeck-us.net>"); | |
| 571 | 571 | MODULE_DESCRIPTION("Lineage CPL PEM hardware monitoring driver"); |
| 572 | 572 | MODULE_LICENSE("GPL"); |
| @@ -292,6 +292,6 @@ static struct i2c_driver ltc4261_driver = { · 291 unmodified lines | ||
| 292 | 292 | |
| 293 | 293 | module_i2c_driver(ltc4261_driver); |
| 294 | 294 | |
| 295 | −MODULE_AUTHOR("Guenter Roeck <guenter.roeck@ericsson.com>"); | |
| 295 | +MODULE_AUTHOR("Guenter Roeck <linux@roeck-us.net>"); | |
| 296 | 296 | MODULE_DESCRIPTION("LTC4261 driver"); |
| 297 | 297 | MODULE_LICENSE("GPL"); |
| @@ -692,6 +692,6 @@ static struct i2c_driver max16065_driver = { · 691 unmodified lines | ||
| 692 | 692 | |
| 693 | 693 | module_i2c_driver(max16065_driver); |
| 694 | 694 | |
| 695 | −MODULE_AUTHOR("Guenter Roeck <guenter.roeck@ericsson.com>"); | |
| 695 | +MODULE_AUTHOR("Guenter Roeck <linux@roeck-us.net>"); | |
| 696 | 696 | MODULE_DESCRIPTION("MAX16065 driver"); |
| 697 | 697 | MODULE_LICENSE("GPL"); |
| @@ -198,7 +198,6 @@ static int fops_open(struct file *file) · 197 unmodified lines | ||
| 198 | 198 | struct saa7146_dev *dev = video_drvdata(file); |
| 199 | 199 | struct saa7146_fh *fh = NULL; |
| 200 | 200 | int result = 0; |
| 201 | − enum v4l2_buf_type type; | |
| 202 | 201 | |
| 203 | 202 | DEB_EE("file:%p, dev:%s\n", file, video_device_node_name(vdev)); |
| 204 | 203 | |
| @@ -207,10 +206,6 @@ static int fops_open(struct file *file) · 2 unmodified lines | ||
| 207 | 206 | |
| 208 | 207 | DEB_D("using: %p\n", dev); |
| 209 | 208 | |
| 210 | − type = vdev->vfl_type == VFL_TYPE_GRABBER | |
| 211 | − ? V4L2_BUF_TYPE_VIDEO_CAPTURE | |
| 212 | − : V4L2_BUF_TYPE_VBI_CAPTURE; | |
| 213 | − | |
| 214 | 209 | /* check if an extension is registered */ |
| 215 | 210 | if( NULL == dev->ext ) { |
| 216 | 211 | DEB_S("no extension registered for this device\n"); |
| @@ -516,9 +516,9 @@ static int cx24110_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) · 515 unmodified lines | ||
| 516 | 516 | if(cx24110_readreg(state,0x10)&0x40) { |
| 517 | 517 | /* the RS error counter has finished one counting window */ |
| 518 | 518 | cx24110_writereg(state,0x10,0x60); /* select the byer reg */ |
| 519 | − cx24110_readreg(state, 0x12) | | |
| 519 | + (void)(cx24110_readreg(state, 0x12) | | |
| 520 | 520 | (cx24110_readreg(state, 0x13) << 8) | |
| 521 | − (cx24110_readreg(state, 0x14) << 16); | |
| 521 | + (cx24110_readreg(state, 0x14) << 16)); | |
| 522 | 522 | cx24110_writereg(state,0x10,0x70); /* select the bler reg */ |
| 523 | 523 | state->lastbler=cx24110_readreg(state,0x12)| |
| 524 | 524 | (cx24110_readreg(state,0x13)<<8)| |
| @@ -121,7 +121,7 @@ int cxd2820r_get_frontend_c(struct dvb_frontend *fe) · 120 unmodified lines | ||
| 121 | 121 | if (ret) |
| 122 | 122 | goto error; |
| 123 | 123 | |
| 124 | − switch ((buf[0] >> 0) & 0x03) { | |
| 124 | + switch ((buf[0] >> 0) & 0x07) { | |
| 125 | 125 | case 0: |
| 126 | 126 | c->modulation = QAM_16; |
| 127 | 127 | break; |
| @@ -126,7 +126,7 @@ static int lg216x_write_regs(struct lg216x_state *state, · 125 unmodified lines | ||
| 126 | 126 | |
| 127 | 127 | lg_reg("writing %d registers...\n", len); |
| 128 | 128 | |
| 129 | − for (i = 0; i < len - 1; i++) { | |
| 129 | + for (i = 0; i < len; i++) { | |
| 130 | 130 | ret = lg216x_write_reg(state, regs[i].reg, regs[i].val); |
| 131 | 131 | if (lg_fail(ret)) |
| 132 | 132 | return ret; |
| @@ -544,6 +544,8 @@ static const struct usb_device_id smsusb_id_table[] __devinitconst = { · 543 unmodified lines | ||
| 544 | 544 | .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, |
| 545 | 545 | { USB_DEVICE(0x2040, 0xc0a0), |
| 546 | 546 | .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, |
| 547 | + { USB_DEVICE(0x2040, 0xf5a0), | |
| 548 | + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, | |
| 547 | 549 | { } /* Terminating entry */ |
| 548 | 550 | }; |
| 549 | 551 | |
| @@ -157,7 +157,7 @@ static int __devinit maxiradio_probe(struct pci_dev *pdev, const struct pci_devi · 156 unmodified lines | ||
| 157 | 157 | goto err_out_free_region; |
| 158 | 158 | |
| 159 | 159 | dev->io = pci_resource_start(pdev, 0); |
| 160 | − if (snd_tea575x_init(&dev->tea)) { | |
| 160 | + if (snd_tea575x_init(&dev->tea, THIS_MODULE)) { | |
| 161 | 161 | printk(KERN_ERR "radio-maxiradio: Unable to detect TEA575x tuner\n"); |
| 162 | 162 | goto err_out_free_region; |
| 163 | 163 | } |
| @@ -238,7 +238,7 @@ static int __devinit fmr2_probe(struct fmr2 *fmr2, struct device *pdev, int io) · 237 unmodified lines | ||
| 238 | 238 | snprintf(fmr2->tea.bus_info, sizeof(fmr2->tea.bus_info), "%s:%s", |
| 239 | 239 | fmr2->is_fmd2 ? "PnP" : "ISA", dev_name(pdev)); |
| 240 | 240 | |
| 241 | − if (snd_tea575x_init(&fmr2->tea)) { | |
| 241 | + if (snd_tea575x_init(&fmr2->tea, THIS_MODULE)) { | |
| 242 | 242 | printk(KERN_ERR "radio-sf16fmr2: Unable to detect TEA575x tuner\n"); |
| 243 | 243 | release_region(fmr2->io, 2); |
| 244 | 244 | return -ENODEV; |
| @@ -51,6 +51,8 @@ static struct usb_device_id si470x_usb_driver_id_table[] = { · 50 unmodified lines | ||
| 51 | 51 | { USB_DEVICE_AND_INTERFACE_INFO(0x1b80, 0xd700, USB_CLASS_HID, 0, 0) }, |
| 52 | 52 | /* Sanei Electric, Inc. FM USB Radio (sold as DealExtreme.com PCear) */ |
| 53 | 53 | { 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) }, | |
| 54 | 56 | /* Terminating entry */ |
| 55 | 57 | { } |
| 56 | 58 | }; |
| @@ -371,7 +371,6 @@ struct tvcard bttv_tvcards[] = { · 370 unmodified lines | ||
| 371 | 371 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 372 | 372 | .gpiomux = { 2, 0, 0, 0 }, |
| 373 | 373 | .gpiomute = 10, |
| 374 | − .needs_tvaudio = 1, | |
| 375 | 374 | .tuner_type = UNSET, |
| 376 | 375 | .tuner_addr = ADDR_UNSET, |
| 377 | 376 | }, |
| @@ -384,7 +383,6 @@ struct tvcard bttv_tvcards[] = { · 6 unmodified lines | ||
| 384 | 383 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 385 | 384 | .gpiomux = { 0, 1, 2, 3 }, |
| 386 | 385 | .gpiomute = 4, |
| 387 | − .needs_tvaudio = 1, | |
| 388 | 386 | .tuner_type = UNSET, |
| 389 | 387 | .tuner_addr = ADDR_UNSET, |
| 390 | 388 | }, |
| @@ -398,7 +396,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines | ||
| 398 | 396 | .gpiomux = { 4, 0, 2, 3 }, |
| 399 | 397 | .gpiomute = 1, |
| 400 | 398 | .no_msp34xx = 1, |
| 401 | − .needs_tvaudio = 1, | |
| 402 | 399 | .tuner_type = TUNER_PHILIPS_NTSC, |
| 403 | 400 | .tuner_addr = ADDR_UNSET, |
| 404 | 401 | .pll = PLL_28, |
| @@ -414,7 +411,6 @@ struct tvcard bttv_tvcards[] = { · 9 unmodified lines | ||
| 414 | 411 | .gpiomask = 0, |
| 415 | 412 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 416 | 413 | .gpiomux = { 0 }, |
| 417 | − .needs_tvaudio = 0, | |
| 418 | 414 | .tuner_type = TUNER_ABSENT, |
| 419 | 415 | .tuner_addr = ADDR_UNSET, |
| 420 | 416 | }, |
| @@ -427,7 +423,6 @@ struct tvcard bttv_tvcards[] = { · 6 unmodified lines | ||
| 427 | 423 | .muxsel = MUXSEL(2, 3, 1, 0), |
| 428 | 424 | .gpiomux = { 0, 1, 0, 1 }, |
| 429 | 425 | .gpiomute = 3, |
| 430 | − .needs_tvaudio = 1, | |
| 431 | 426 | .tuner_type = UNSET, |
| 432 | 427 | .tuner_addr = ADDR_UNSET, |
| 433 | 428 | }, |
| @@ -440,7 +435,6 @@ struct tvcard bttv_tvcards[] = { · 6 unmodified lines | ||
| 440 | 435 | .gpiomask = 0x0f, |
| 441 | 436 | .gpiomux = { 0x0c, 0x04, 0x08, 0x04 }, |
| 442 | 437 | /* 0x04 for some cards ?? */ |
| 443 | − .needs_tvaudio = 1, | |
| 444 | 438 | .tuner_type = UNSET, |
| 445 | 439 | .tuner_addr = ADDR_UNSET, |
| 446 | 440 | .audio_mode_gpio= avermedia_tvphone_audio, |
| @@ -454,7 +448,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines | ||
| 454 | 448 | .gpiomask = 0, |
| 455 | 449 | .muxsel = MUXSEL(2, 3, 1, 0, 0), |
| 456 | 450 | .gpiomux = { 0 }, |
| 457 | − .needs_tvaudio = 1, | |
| 458 | 451 | .tuner_type = TUNER_ABSENT, |
| 459 | 452 | .tuner_addr = ADDR_UNSET, |
| 460 | 453 | }, |
| @@ -469,7 +462,6 @@ struct tvcard bttv_tvcards[] = { · 8 unmodified lines | ||
| 469 | 462 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 470 | 463 | .gpiomux = { 0, 0xc00, 0x800, 0x400 }, |
| 471 | 464 | .gpiomute = 0xc00, |
| 472 | − .needs_tvaudio = 1, | |
| 473 | 465 | .pll = PLL_28, |
| 474 | 466 | .tuner_type = UNSET, |
| 475 | 467 | .tuner_addr = ADDR_UNSET, |
| @@ -482,7 +474,6 @@ struct tvcard bttv_tvcards[] = { · 6 unmodified lines | ||
| 482 | 474 | .gpiomask = 3, |
| 483 | 475 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 484 | 476 | .gpiomux = { 1, 1, 2, 3 }, |
| 485 | − .needs_tvaudio = 0, | |
| 486 | 477 | .pll = PLL_28, |
| 487 | 478 | .tuner_type = TUNER_TEMIC_PAL, |
| 488 | 479 | .tuner_addr = ADDR_UNSET, |
| @@ -496,7 +487,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines | ||
| 496 | 487 | .muxsel = MUXSEL(2, 0, 1, 1), |
| 497 | 488 | .gpiomux = { 0, 1, 2, 3 }, |
| 498 | 489 | .gpiomute = 4, |
| 499 | − .needs_tvaudio = 1, | |
| 500 | 490 | .pll = PLL_28, |
| 501 | 491 | .tuner_type = UNSET, |
| 502 | 492 | .tuner_addr = ADDR_UNSET, |
| @@ -510,7 +500,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines | ||
| 510 | 500 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 511 | 501 | .gpiomux = { 0x20001,0x10001, 0, 0 }, |
| 512 | 502 | .gpiomute = 10, |
| 513 | − .needs_tvaudio = 1, | |
| 514 | 503 | .tuner_type = UNSET, |
| 515 | 504 | .tuner_addr = ADDR_UNSET, |
| 516 | 505 | }, |
| @@ -524,7 +513,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines | ||
| 524 | 513 | .gpiomask = 15, |
| 525 | 514 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 526 | 515 | .gpiomux = { 13, 14, 11, 7 }, |
| 527 | − .needs_tvaudio = 1, | |
| 528 | 516 | .tuner_type = UNSET, |
| 529 | 517 | .tuner_addr = ADDR_UNSET, |
| 530 | 518 | }, |
| @@ -536,7 +524,6 @@ struct tvcard bttv_tvcards[] = { · 5 unmodified lines | ||
| 536 | 524 | .gpiomask = 15, |
| 537 | 525 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 538 | 526 | .gpiomux = { 13, 14, 11, 7 }, |
| 539 | − .needs_tvaudio = 1, | |
| 540 | 527 | .msp34xx_alt = 1, |
| 541 | 528 | .pll = PLL_28, |
| 542 | 529 | .tuner_type = TUNER_PHILIPS_PAL, |
| @@ -553,7 +540,6 @@ struct tvcard bttv_tvcards[] = { · 10 unmodified lines | ||
| 553 | 540 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 554 | 541 | .gpiomux = { 0, 2, 1, 3 }, /* old: {0, 1, 2, 3, 4} */ |
| 555 | 542 | .gpiomute = 4, |
| 556 | − .needs_tvaudio = 1, | |
| 557 | 543 | .pll = PLL_28, |
| 558 | 544 | .tuner_type = UNSET, |
| 559 | 545 | .tuner_addr = ADDR_UNSET, |
| @@ -567,7 +553,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines | ||
| 567 | 553 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 568 | 554 | .gpiomux = { 0, 0, 1, 0 }, |
| 569 | 555 | .gpiomute = 10, |
| 570 | − .needs_tvaudio = 1, | |
| 571 | 556 | .tuner_type = UNSET, |
| 572 | 557 | .tuner_addr = ADDR_UNSET, |
| 573 | 558 | }, |
| @@ -583,7 +568,6 @@ struct tvcard bttv_tvcards[] = { · 9 unmodified lines | ||
| 583 | 568 | /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */ |
| 584 | 569 | .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 }, |
| 585 | 570 | .gpiomute = 0x002000, |
| 586 | − .needs_tvaudio = 1, | |
| 587 | 571 | .pll = PLL_28, |
| 588 | 572 | .tuner_type = UNSET, |
| 589 | 573 | .tuner_addr = ADDR_UNSET, |
| @@ -597,7 +581,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines | ||
| 597 | 581 | .muxsel = MUXSEL(2, 3, 1, 1, 0), |
| 598 | 582 | .gpiomux = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007 }, |
| 599 | 583 | .gpiomute = 0xcfa007, |
| 600 | − .needs_tvaudio = 1, | |
| 601 | 584 | .tuner_type = UNSET, |
| 602 | 585 | .tuner_addr = ADDR_UNSET, |
| 603 | 586 | .volume_gpio = winview_volume, |
| @@ -611,7 +594,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines | ||
| 611 | 594 | .gpiomask = 0, |
| 612 | 595 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 613 | 596 | .gpiomux = { 1, 0, 0, 0 }, |
| 614 | − .needs_tvaudio = 1, | |
| 615 | 597 | .tuner_type = UNSET, |
| 616 | 598 | .tuner_addr = ADDR_UNSET, |
| 617 | 599 | }, |
| @@ -660,7 +642,6 @@ struct tvcard bttv_tvcards[] = { · 42 unmodified lines | ||
| 660 | 642 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 661 | 643 | .gpiomux = { 0, 1, 0x800, 0x400 }, |
| 662 | 644 | .gpiomute = 0xc00, |
| 663 | − .needs_tvaudio = 1, | |
| 664 | 645 | .pll = PLL_28, |
| 665 | 646 | .tuner_type = UNSET, |
| 666 | 647 | .tuner_addr = ADDR_UNSET, |
| @@ -691,7 +672,6 @@ struct tvcard bttv_tvcards[] = { · 24 unmodified lines | ||
| 691 | 672 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 692 | 673 | .gpiomux = {0x400, 0x400, 0x400, 0x400 }, |
| 693 | 674 | .gpiomute = 0xc00, |
| 694 | − .needs_tvaudio = 1, | |
| 695 | 675 | .pll = PLL_28, |
| 696 | 676 | .tuner_type = UNSET, |
| 697 | 677 | .tuner_addr = ADDR_UNSET, |
| @@ -706,7 +686,6 @@ struct tvcard bttv_tvcards[] = { · 8 unmodified lines | ||
| 706 | 686 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 707 | 687 | .gpiomux = { 0x20000, 0x30000, 0x10000, 0 }, |
| 708 | 688 | .gpiomute = 0x40000, |
| 709 | − .needs_tvaudio = 0, | |
| 710 | 689 | .tuner_type = TUNER_PHILIPS_PAL, |
| 711 | 690 | .tuner_addr = ADDR_UNSET, |
| 712 | 691 | .audio_mode_gpio= terratv_audio, |
| @@ -720,7 +699,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines | ||
| 720 | 699 | .muxsel = MUXSEL(2, 0, 1, 1), |
| 721 | 700 | .gpiomux = { 0, 1, 2, 3 }, |
| 722 | 701 | .gpiomute = 4, |
| 723 | − .needs_tvaudio = 1, | |
| 724 | 702 | .tuner_type = UNSET, |
| 725 | 703 | .tuner_addr = ADDR_UNSET, |
| 726 | 704 | }, |
| @@ -748,7 +726,6 @@ struct tvcard bttv_tvcards[] = { · 21 unmodified lines | ||
| 748 | 726 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 749 | 727 | .gpiomux = { 0x20000, 0x30000, 0x10000, 0x00000 }, |
| 750 | 728 | .gpiomute = 0x40000, |
| 751 | − .needs_tvaudio = 0, | |
| 752 | 729 | .tuner_type = TUNER_PHILIPS_PAL, |
| 753 | 730 | .tuner_addr = ADDR_UNSET, |
| 754 | 731 | .audio_mode_gpio= terratv_audio, |
| @@ -793,7 +770,6 @@ struct tvcard bttv_tvcards[] = { · 38 unmodified lines | ||
| 793 | 770 | .gpiomask = 0, |
| 794 | 771 | .muxsel = MUXSEL(2, 3, 1, 0, 0), |
| 795 | 772 | .gpiomux = { 0 }, |
| 796 | − .needs_tvaudio = 1, | |
| 797 | 773 | .tuner_type = TUNER_ABSENT, |
| 798 | 774 | .tuner_addr = ADDR_UNSET, |
| 799 | 775 | .muxsel_hook = PXC200_muxsel, |
| @@ -834,7 +810,6 @@ struct tvcard bttv_tvcards[] = { · 34 unmodified lines | ||
| 834 | 810 | .gpiomask = 0, |
| 835 | 811 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 836 | 812 | .gpiomux = { 0 }, |
| 837 | − .needs_tvaudio = 0, | |
| 838 | 813 | .tuner_type = TUNER_ABSENT, |
| 839 | 814 | .tuner_addr = ADDR_UNSET, |
| 840 | 815 | }, |
| @@ -847,7 +822,6 @@ struct tvcard bttv_tvcards[] = { · 6 unmodified lines | ||
| 847 | 822 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 848 | 823 | .gpiomux = { 0x500, 0, 0x300, 0x900 }, |
| 849 | 824 | .gpiomute = 0x900, |
| 850 | − .needs_tvaudio = 1, | |
| 851 | 825 | .pll = PLL_28, |
| 852 | 826 | .tuner_type = TUNER_PHILIPS_PAL, |
| 853 | 827 | .tuner_addr = ADDR_UNSET, |
| @@ -874,7 +848,6 @@ struct tvcard bttv_tvcards[] = { · 20 unmodified lines | ||
| 874 | 848 | Note: There exists another variant "Winfast 2000" with tv stereo !? |
| 875 | 849 | Note: eeprom only contains FF and pci subsystem id 107d:6606 |
| 876 | 850 | */ |
| 877 | − .needs_tvaudio = 0, | |
| 878 | 851 | .pll = PLL_28, |
| 879 | 852 | .has_radio = 1, |
| 880 | 853 | .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 | ||
| 934 | 907 | .muxsel = MUXSEL(2, 3, 1, 0), |
| 935 | 908 | .gpiomux = { 0x551400, 0x551200, 0, 0 }, |
| 936 | 909 | .gpiomute = 0x551c00, |
| 937 | − .needs_tvaudio = 1, | |
| 938 | 910 | .pll = PLL_28, |
| 939 | 911 | .tuner_type = TUNER_PHILIPS_PAL_I, |
| 940 | 912 | .tuner_addr = ADDR_UNSET, |
| @@ -949,7 +921,6 @@ struct tvcard bttv_tvcards[] = { · 8 unmodified lines | ||
| 949 | 921 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 950 | 922 | .gpiomux = { 2, 0xd0001, 0, 0 }, |
| 951 | 923 | .gpiomute = 1, |
| 952 | − .needs_tvaudio = 0, | |
| 953 | 924 | .pll = PLL_28, |
| 954 | 925 | .tuner_type = UNSET, |
| 955 | 926 | .tuner_addr = ADDR_UNSET, |
| @@ -966,7 +937,6 @@ struct tvcard bttv_tvcards[] = { · 10 unmodified lines | ||
| 966 | 937 | .gpiomux = { 4, 0, 2, 3 }, |
| 967 | 938 | .gpiomute = 1, |
| 968 | 939 | .no_msp34xx = 1, |
| 969 | − .needs_tvaudio = 1, | |
| 970 | 940 | .tuner_type = TUNER_PHILIPS_NTSC, |
| 971 | 941 | .tuner_addr = ADDR_UNSET, |
| 972 | 942 | .pll = PLL_28, |
| @@ -980,7 +950,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines | ||
| 980 | 950 | .gpiomask = 15, |
| 981 | 951 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 982 | 952 | .gpiomux = { 13, 4, 11, 7 }, |
| 983 | − .needs_tvaudio = 1, | |
| 984 | 953 | .pll = PLL_28, |
| 985 | 954 | .tuner_type = UNSET, |
| 986 | 955 | .tuner_addr = ADDR_UNSET, |
| @@ -995,7 +964,6 @@ struct tvcard bttv_tvcards[] = { · 8 unmodified lines | ||
| 995 | 964 | .gpiomask = 0, |
| 996 | 965 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 997 | 966 | .gpiomux = { 0, 0, 0, 0}, |
| 998 | − .needs_tvaudio = 1, | |
| 999 | 967 | .no_msp34xx = 1, |
| 1000 | 968 | .pll = PLL_28, |
| 1001 | 969 | .tuner_type = TUNER_PHILIPS_PAL_I, |
| @@ -1066,7 +1034,6 @@ struct tvcard bttv_tvcards[] = { · 64 unmodified lines | ||
| 1066 | 1034 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 1067 | 1035 | .gpiomux = { 0x20000, 0x30000, 0x10000, 0 }, |
| 1068 | 1036 | .gpiomute = 0x40000, |
| 1069 | − .needs_tvaudio = 1, | |
| 1070 | 1037 | .no_msp34xx = 1, |
| 1071 | 1038 | .pll = PLL_35, |
| 1072 | 1039 | .tuner_type = TUNER_PHILIPS_PAL_I, |
| @@ -1084,7 +1051,6 @@ struct tvcard bttv_tvcards[] = { · 11 unmodified lines | ||
| 1084 | 1051 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 1085 | 1052 | .gpiomux = {2,0,0,0 }, |
| 1086 | 1053 | .gpiomute = 1, |
| 1087 | − .needs_tvaudio = 1, | |
| 1088 | 1054 | .pll = PLL_28, |
| 1089 | 1055 | .tuner_type = UNSET, |
| 1090 | 1056 | .tuner_addr = ADDR_UNSET, |
| @@ -1163,7 +1129,6 @@ struct tvcard bttv_tvcards[] = { · 72 unmodified lines | ||
| 1163 | 1129 | MUX2 (mask 0x30000): |
| 1164 | 1130 | 0,2,3= from MSP34xx |
| 1165 | 1131 | 1= FM stereo Radio from Tuner */ |
| 1166 | − .needs_tvaudio = 0, | |
| 1167 | 1132 | .pll = PLL_28, |
| 1168 | 1133 | .tuner_type = UNSET, |
| 1169 | 1134 | .tuner_addr = ADDR_UNSET, |
| @@ -1179,7 +1144,6 @@ struct tvcard bttv_tvcards[] = { · 9 unmodified lines | ||
| 1179 | 1144 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 1180 | 1145 | .gpiomux = { 0, 0, 0x10, 8 }, |
| 1181 | 1146 | .gpiomute = 4, |
| 1182 | − .needs_tvaudio = 1, | |
| 1183 | 1147 | .pll = PLL_28, |
| 1184 | 1148 | .tuner_type = TUNER_PHILIPS_PAL, |
| 1185 | 1149 | .tuner_addr = ADDR_UNSET, |
| @@ -1218,7 +1182,6 @@ struct tvcard bttv_tvcards[] = { · 32 unmodified lines | ||
| 1218 | 1182 | .muxsel = MUXSEL(2, 3, 1, 0), |
| 1219 | 1183 | .gpiomux = { 2, 0, 0, 0 }, |
| 1220 | 1184 | .gpiomute = 10, |
| 1221 | − .needs_tvaudio = 0, | |
| 1222 | 1185 | .pll = PLL_28, |
| 1223 | 1186 | .tuner_type = TUNER_TEMIC_PAL, |
| 1224 | 1187 | .tuner_addr = ADDR_UNSET, |
| @@ -1250,7 +1213,6 @@ struct tvcard bttv_tvcards[] = { · 25 unmodified lines | ||
| 1250 | 1213 | .gpiomask = 0, |
| 1251 | 1214 | .muxsel = MUXSEL(3, 1), |
| 1252 | 1215 | .gpiomux = { 0 }, |
| 1253 | − .needs_tvaudio = 0, | |
| 1254 | 1216 | .no_msp34xx = 1, |
| 1255 | 1217 | .pll = PLL_35, |
| 1256 | 1218 | .tuner_type = TUNER_ABSENT, |
| @@ -1266,7 +1228,6 @@ struct tvcard bttv_tvcards[] = { · 9 unmodified lines | ||
| 1266 | 1228 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 1267 | 1229 | .gpiomux = { 0x400, 0x400, 0x400, 0x400 }, |
| 1268 | 1230 | .gpiomute = 0x800, |
| 1269 | − .needs_tvaudio = 1, | |
| 1270 | 1231 | .pll = PLL_28, |
| 1271 | 1232 | .tuner_type = TUNER_TEMIC_4036FY5_NTSC, |
| 1272 | 1233 | .tuner_addr = ADDR_UNSET, |
| @@ -1312,7 +1273,6 @@ struct tvcard bttv_tvcards[] = { · 39 unmodified lines | ||
| 1312 | 1273 | .muxsel = MUXSEL(2, 2), |
| 1313 | 1274 | .gpiomux = { }, |
| 1314 | 1275 | .no_msp34xx = 1, |
| 1315 | − .needs_tvaudio = 0, | |
| 1316 | 1276 | .pll = PLL_28, |
| 1317 | 1277 | .tuner_type = TUNER_ABSENT, |
| 1318 | 1278 | .tuner_addr = ADDR_UNSET, |
| @@ -1329,7 +1289,6 @@ struct tvcard bttv_tvcards[] = { · 10 unmodified lines | ||
| 1329 | 1289 | .muxsel = MUXSEL(2, 3, 1, 0), |
| 1330 | 1290 | .gpiomux = { 1, 0, 4, 4 }, |
| 1331 | 1291 | .gpiomute = 9, |
| 1332 | − .needs_tvaudio = 0, | |
| 1333 | 1292 | .pll = PLL_28, |
| 1334 | 1293 | .tuner_type = TUNER_PHILIPS_PAL, |
| 1335 | 1294 | .tuner_addr = ADDR_UNSET, |
| @@ -1379,7 +1338,6 @@ struct tvcard bttv_tvcards[] = { · 43 unmodified lines | ||
| 1379 | 1338 | .gpiomute = 0x1800, |
| 1380 | 1339 | .audio_mode_gpio= fv2000s_audio, |
| 1381 | 1340 | .no_msp34xx = 1, |
| 1382 | − .needs_tvaudio = 1, | |
| 1383 | 1341 | .pll = PLL_28, |
| 1384 | 1342 | .tuner_type = TUNER_PHILIPS_PAL, |
| 1385 | 1343 | .tuner_addr = ADDR_UNSET, |
| @@ -1393,7 +1351,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines | ||
| 1393 | 1351 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 1394 | 1352 | .gpiomux = { 0x500, 0x500, 0x300, 0x900 }, |
| 1395 | 1353 | .gpiomute = 0x900, |
| 1396 | − .needs_tvaudio = 1, | |
| 1397 | 1354 | .pll = PLL_28, |
| 1398 | 1355 | .tuner_type = TUNER_PHILIPS_PAL, |
| 1399 | 1356 | .tuner_addr = ADDR_UNSET, |
| @@ -1477,7 +1434,6 @@ struct tvcard bttv_tvcards[] = { · 77 unmodified lines | ||
| 1477 | 1434 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 1478 | 1435 | .gpiomux = { 0, 0, 11, 7 }, /* TV and Radio with same GPIO ! */ |
| 1479 | 1436 | .gpiomute = 13, |
| 1480 | − .needs_tvaudio = 1, | |
| 1481 | 1437 | .pll = PLL_28, |
| 1482 | 1438 | .tuner_type = TUNER_LG_PAL_I_FM, |
| 1483 | 1439 | .tuner_addr = ADDR_UNSET, |
| @@ -1514,7 +1470,6 @@ struct tvcard bttv_tvcards[] = { · 30 unmodified lines | ||
| 1514 | 1470 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 1515 | 1471 | .gpiomux = { 0x01, 0x00, 0x03, 0x03 }, |
| 1516 | 1472 | .gpiomute = 0x09, |
| 1517 | − .needs_tvaudio = 1, | |
| 1518 | 1473 | .no_msp34xx = 1, |
| 1519 | 1474 | .pll = PLL_28, |
| 1520 | 1475 | .tuner_type = TUNER_PHILIPS_PAL, |
| @@ -1540,7 +1495,6 @@ struct tvcard bttv_tvcards[] = { · 19 unmodified lines | ||
| 1540 | 1495 | .gpiomask = 0, |
| 1541 | 1496 | .muxsel = MUXSEL(2, 3, 1, 0, 0), |
| 1542 | 1497 | .gpiomux = { 0 }, |
| 1543 | − .needs_tvaudio = 0, | |
| 1544 | 1498 | .tuner_type = TUNER_ABSENT, |
| 1545 | 1499 | .tuner_addr = ADDR_UNSET, |
| 1546 | 1500 | }, |
| @@ -1567,7 +1521,6 @@ struct tvcard bttv_tvcards[] = { · 20 unmodified lines | ||
| 1567 | 1521 | .muxsel = MUXSEL(2, 1, 1), |
| 1568 | 1522 | .gpiomux = { 0, 1, 2, 2 }, |
| 1569 | 1523 | .gpiomute = 4, |
| 1570 | − .needs_tvaudio = 0, | |
| 1571 | 1524 | .tuner_type = TUNER_PHILIPS_PAL, |
| 1572 | 1525 | .tuner_addr = ADDR_UNSET, |
| 1573 | 1526 | .pll = PLL_28, |
| @@ -1597,7 +1550,6 @@ struct tvcard bttv_tvcards[] = { · 23 unmodified lines | ||
| 1597 | 1550 | .gpiomask = 0, |
| 1598 | 1551 | .muxsel = MUXSEL(2, 3, 1, 0), |
| 1599 | 1552 | .gpiomux = { 0 }, |
| 1600 | − .needs_tvaudio = 0, | |
| 1601 | 1553 | .no_msp34xx = 1, |
| 1602 | 1554 | .pll = PLL_28, |
| 1603 | 1555 | .tuner_type = TUNER_ABSENT, |
| @@ -1619,7 +1571,6 @@ struct tvcard bttv_tvcards[] = { · 15 unmodified lines | ||
| 1619 | 1571 | * btwincap uses 0x80000/0x80003 |
| 1620 | 1572 | */ |
| 1621 | 1573 | .gpiomute = 4, |
| 1622 | − .needs_tvaudio = 0, | |
| 1623 | 1574 | .no_msp34xx = 1, |
| 1624 | 1575 | .pll = PLL_28, |
| 1625 | 1576 | .tuner_type = TUNER_PHILIPS_PAL, |
| @@ -1655,7 +1606,6 @@ struct tvcard bttv_tvcards[] = { · 29 unmodified lines | ||
| 1655 | 1606 | /* .audio_inputs= 1, */ |
| 1656 | 1607 | .svhs = 2, |
| 1657 | 1608 | .muxsel = MUXSEL(2, 0, 1, 1), |
| 1658 | − .needs_tvaudio = 1, | |
| 1659 | 1609 | .pll = PLL_28, |
| 1660 | 1610 | .tuner_type = UNSET, |
| 1661 | 1611 | .tuner_addr = ADDR_UNSET, |
| @@ -1875,7 +1825,6 @@ struct tvcard bttv_tvcards[] = { · 213 unmodified lines | ||
| 1875 | 1825 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 1876 | 1826 | .gpiomux = { 0, 1, 2, 3}, |
| 1877 | 1827 | .gpiomute = 4, |
| 1878 | − .needs_tvaudio = 1, | |
| 1879 | 1828 | .tuner_type = TUNER_PHILIPS_PAL, |
| 1880 | 1829 | .tuner_addr = ADDR_UNSET, |
| 1881 | 1830 | .pll = PLL_28, |
| @@ -1902,7 +1851,6 @@ struct tvcard bttv_tvcards[] = { · 20 unmodified lines | ||
| 1902 | 1851 | .gpiomask = 0, |
| 1903 | 1852 | .muxsel = MUXSEL(2, 3), |
| 1904 | 1853 | .gpiomux = { 0 }, |
| 1905 | − .needs_tvaudio = 0, | |
| 1906 | 1854 | .no_msp34xx = 1, |
| 1907 | 1855 | .pll = PLL_28, |
| 1908 | 1856 | .tuner_type = TUNER_ABSENT, |
| @@ -1920,7 +1868,6 @@ struct tvcard bttv_tvcards[] = { · 11 unmodified lines | ||
| 1920 | 1868 | /* Tuner, Radio, external, internal, off, on */ |
| 1921 | 1869 | .gpiomux = { 0x08, 0x0f, 0x0a, 0x08 }, |
| 1922 | 1870 | .gpiomute = 0x0f, |
| 1923 | − .needs_tvaudio = 0, | |
| 1924 | 1871 | .no_msp34xx = 1, |
| 1925 | 1872 | .pll = PLL_28, |
| 1926 | 1873 | .tuner_type = TUNER_PHILIPS_NTSC, |
| @@ -1936,7 +1883,6 @@ struct tvcard bttv_tvcards[] = { · 9 unmodified lines | ||
| 1936 | 1883 | .svhs = 2, |
| 1937 | 1884 | .gpiomask = 0x00, |
| 1938 | 1885 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 1939 | − .needs_tvaudio = 1, | |
| 1940 | 1886 | .no_msp34xx = 1, |
| 1941 | 1887 | .pll = PLL_28, |
| 1942 | 1888 | .tuner_type = TUNER_PHILIPS_PAL, |
| @@ -2034,7 +1980,6 @@ struct tvcard bttv_tvcards[] = { · 91 unmodified lines | ||
| 2034 | 1980 | .gpiomask = 0, |
| 2035 | 1981 | .muxsel = MUXSEL(2, 3, 1, 0), |
| 2036 | 1982 | .gpiomux = { 0 }, |
| 2037 | − .needs_tvaudio = 0, | |
| 2038 | 1983 | .no_msp34xx = 1, |
| 2039 | 1984 | .pll = PLL_28, |
| 2040 | 1985 | .tuner_type = TUNER_ABSENT, |
| @@ -2049,7 +1994,6 @@ struct tvcard bttv_tvcards[] = { · 8 unmodified lines | ||
| 2049 | 1994 | .gpiomask = 0x00, |
| 2050 | 1995 | .muxsel = MUXSEL(2, 3, 1, 0), |
| 2051 | 1996 | .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */ |
| 2052 | − .needs_tvaudio = 0, | |
| 2053 | 1997 | .pll = PLL_28, |
| 2054 | 1998 | .tuner_type = TUNER_ABSENT, |
| 2055 | 1999 | .tuner_addr = ADDR_UNSET, |
| @@ -2062,7 +2006,6 @@ struct tvcard bttv_tvcards[] = { · 6 unmodified lines | ||
| 2062 | 2006 | .gpiomask = 0x00, |
| 2063 | 2007 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 2064 | 2008 | .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */ |
| 2065 | − .needs_tvaudio = 0, | |
| 2066 | 2009 | .pll = PLL_28, |
| 2067 | 2010 | .tuner_type = TUNER_ABSENT, |
| 2068 | 2011 | .tuner_addr = ADDR_UNSET, |
| @@ -2079,7 +2022,6 @@ struct tvcard bttv_tvcards[] = { · 10 unmodified lines | ||
| 2079 | 2022 | .muxsel = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 0), |
| 2080 | 2023 | .muxsel_hook = phytec_muxsel, |
| 2081 | 2024 | .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */ |
| 2082 | − .needs_tvaudio = 1, | |
| 2083 | 2025 | .pll = PLL_28, |
| 2084 | 2026 | .tuner_type = TUNER_ABSENT, |
| 2085 | 2027 | .tuner_addr = ADDR_UNSET, |
| @@ -2094,7 +2036,6 @@ struct tvcard bttv_tvcards[] = { · 8 unmodified lines | ||
| 2094 | 2036 | .muxsel = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 1), |
| 2095 | 2037 | .muxsel_hook = phytec_muxsel, |
| 2096 | 2038 | .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */ |
| 2097 | − .needs_tvaudio = 1, | |
| 2098 | 2039 | .pll = PLL_28, |
| 2099 | 2040 | .tuner_type = TUNER_ABSENT, |
| 2100 | 2041 | .tuner_addr = ADDR_UNSET, |
| @@ -2118,7 +2059,6 @@ struct tvcard bttv_tvcards[] = { · 17 unmodified lines | ||
| 2118 | 2059 | .tuner_type = TUNER_ABSENT, |
| 2119 | 2060 | .tuner_addr = ADDR_UNSET, |
| 2120 | 2061 | .svhs = NO_SVHS, /* card has no svhs */ |
| 2121 | − .needs_tvaudio = 0, | |
| 2122 | 2062 | .no_msp34xx = 1, |
| 2123 | 2063 | .no_tda7432 = 1, |
| 2124 | 2064 | .gpiomask = 0x00, |
| @@ -2168,7 +2108,6 @@ struct tvcard bttv_tvcards[] = { · 43 unmodified lines | ||
| 2168 | 2108 | .gpiomask = 3, |
| 2169 | 2109 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 2170 | 2110 | .gpiomux = { 1, 1, 1, 1 }, |
| 2171 | − .needs_tvaudio = 1, | |
| 2172 | 2111 | .tuner_type = TUNER_PHILIPS_PAL, |
| 2173 | 2112 | .tuner_addr = ADDR_UNSET, |
| 2174 | 2113 | .pll = PLL_35, |
| @@ -2210,7 +2149,6 @@ struct tvcard bttv_tvcards[] = { · 35 unmodified lines | ||
| 2210 | 2149 | .muxsel = MUXSEL(2, 3, 1, 0), |
| 2211 | 2150 | .no_msp34xx = 1, |
| 2212 | 2151 | .no_tda7432 = 1, |
| 2213 | − .needs_tvaudio = 0, | |
| 2214 | 2152 | .tuner_type = TUNER_ABSENT, |
| 2215 | 2153 | .tuner_addr = ADDR_UNSET, |
| 2216 | 2154 | }, |
| @@ -2222,7 +2160,6 @@ struct tvcard bttv_tvcards[] = { · 5 unmodified lines | ||
| 2222 | 2160 | .tuner_type = TUNER_PHILIPS_PAL, |
| 2223 | 2161 | .tuner_addr = ADDR_UNSET, |
| 2224 | 2162 | .svhs = 2, |
| 2225 | − .needs_tvaudio = 0, | |
| 2226 | 2163 | .gpiomask = 0x68, |
| 2227 | 2164 | .muxsel = MUXSEL(2, 3, 1), |
| 2228 | 2165 | .gpiomux = { 0x68, 0x68, 0x61, 0x61 }, |
| @@ -2241,7 +2178,6 @@ struct tvcard bttv_tvcards[] = { · 12 unmodified lines | ||
| 2241 | 2178 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 2242 | 2179 | .gpiomux = { 0, 1, 2, 2 }, |
| 2243 | 2180 | .gpiomute = 3, |
| 2244 | − .needs_tvaudio = 0, | |
| 2245 | 2181 | .pll = PLL_28, |
| 2246 | 2182 | .tuner_type = TUNER_PHILIPS_PAL, |
| 2247 | 2183 | .tuner_addr = ADDR_UNSET, |
| @@ -2265,7 +2201,6 @@ struct tvcard bttv_tvcards[] = { · 17 unmodified lines | ||
| 2265 | 2201 | .muxsel = MUXSEL(2, 2, 2, 2), |
| 2266 | 2202 | .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */ |
| 2267 | 2203 | .pll = PLL_28, |
| 2268 | − .needs_tvaudio = 0, | |
| 2269 | 2204 | .muxsel_hook = picolo_tetra_muxsel,/*Required as it doesn't follow the classic input selection policy*/ |
| 2270 | 2205 | .tuner_type = TUNER_ABSENT, |
| 2271 | 2206 | .tuner_addr = ADDR_UNSET, |
| @@ -2358,7 +2293,6 @@ struct tvcard bttv_tvcards[] = { · 86 unmodified lines | ||
| 2358 | 2293 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 2359 | 2294 | .gpiomux = { 2, 0, 0, 0 }, |
| 2360 | 2295 | .gpiomute = 10, |
| 2361 | − .needs_tvaudio = 0, | |
| 2362 | 2296 | .pll = PLL_28, |
| 2363 | 2297 | .tuner_type = TUNER_PHILIPS_PAL, |
| 2364 | 2298 | .tuner_addr = ADDR_UNSET, |
| @@ -2405,7 +2339,6 @@ struct tvcard bttv_tvcards[] = { · 40 unmodified lines | ||
| 2405 | 2339 | .tuner_addr = ADDR_UNSET, |
| 2406 | 2340 | .gpiomask = 0x008007, |
| 2407 | 2341 | .gpiomux = { 0, 0x000001,0,0 }, |
| 2408 | − .needs_tvaudio = 1, | |
| 2409 | 2342 | .has_radio = 1, |
| 2410 | 2343 | }, |
| 2411 | 2344 | [BTTV_BOARD_TIBET_CS16] = { |
| @@ -2518,7 +2451,6 @@ struct tvcard bttv_tvcards[] = { · 106 unmodified lines | ||
| 2518 | 2451 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 2519 | 2452 | .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 }, |
| 2520 | 2453 | .gpiomute = 0x002000, |
| 2521 | − .needs_tvaudio = 1, | |
| 2522 | 2454 | .pll = PLL_28, |
| 2523 | 2455 | .tuner_type = TUNER_YMEC_TVF66T5_B_DFF, |
| 2524 | 2456 | .tuner_addr = 0xc1 >>1, |
| @@ -2534,7 +2466,6 @@ struct tvcard bttv_tvcards[] = { · 9 unmodified lines | ||
| 2534 | 2466 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 2535 | 2467 | .gpiomux = { 0, 1, 2, 2 }, |
| 2536 | 2468 | .gpiomute = 3, |
| 2537 | − .needs_tvaudio = 0, | |
| 2538 | 2469 | .pll = PLL_28, |
| 2539 | 2470 | .tuner_type = TUNER_TENA_9533_DI, |
| 2540 | 2471 | .tuner_addr = ADDR_UNSET, |
| @@ -2615,7 +2546,6 @@ struct tvcard bttv_tvcards[] = { · 74 unmodified lines | ||
| 2615 | 2546 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 2616 | 2547 | .gpiomux = { 2, 0, 0, 0 }, |
| 2617 | 2548 | .gpiomute = 1, |
| 2618 | − .needs_tvaudio = 1, | |
| 2619 | 2549 | .pll = PLL_28, |
| 2620 | 2550 | .tuner_type = TUNER_PHILIPS_NTSC, |
| 2621 | 2551 | .tuner_addr = ADDR_UNSET, |
| @@ -2714,7 +2644,6 @@ struct tvcard bttv_tvcards[] = { · 92 unmodified lines | ||
| 2714 | 2644 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 2715 | 2645 | .gpiomux = { 0x20001,0x10001, 0, 0 }, |
| 2716 | 2646 | .gpiomute = 10, |
| 2717 | − .needs_tvaudio = 1, | |
| 2718 | 2647 | .pll = PLL_28, |
| 2719 | 2648 | .tuner_type = TUNER_PHILIPS_PAL_I, |
| 2720 | 2649 | .tuner_addr = ADDR_UNSET, |
| @@ -2746,7 +2675,6 @@ struct tvcard bttv_tvcards[] = { · 25 unmodified lines | ||
| 2746 | 2675 | .muxsel = MUXSEL(2, 3, 1, 1), |
| 2747 | 2676 | .gpiomux = { 0, 1, 2, 2 }, /* CONTVFMi */ |
| 2748 | 2677 | .gpiomute = 3, /* CONTVFMi */ |
| 2749 | − .needs_tvaudio = 0, | |
| 2750 | 2678 | .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, /* TCL MK3 */ |
| 2751 | 2679 | .tuner_addr = ADDR_UNSET, |
| 2752 | 2680 | .pll = PLL_28, |
| @@ -2785,7 +2713,6 @@ struct tvcard bttv_tvcards[] = { · 32 unmodified lines | ||
| 2785 | 2713 | .gpiomask = 0x00, |
| 2786 | 2714 | .muxsel = MUXSEL(0, 2, 3, 1), |
| 2787 | 2715 | .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */ |
| 2788 | − .needs_tvaudio = 0, | |
| 2789 | 2716 | .pll = PLL_28, |
| 2790 | 2717 | .tuner_type = TUNER_ABSENT, |
| 2791 | 2718 | .tuner_addr = ADDR_UNSET, |
| @@ -2799,7 +2726,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines | ||
| 2799 | 2726 | .gpiomask = 0x00, |
| 2800 | 2727 | .muxsel = MUXSEL(2, 3, 1), |
| 2801 | 2728 | .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */ |
| 2802 | − .needs_tvaudio = 0, | |
| 2803 | 2729 | .pll = PLL_28, |
| 2804 | 2730 | .tuner_type = TUNER_ABSENT, |
| 2805 | 2731 | .tuner_addr = ADDR_UNSET, |
| @@ -2813,7 +2739,6 @@ struct tvcard bttv_tvcards[] = { · 7 unmodified lines | ||
| 2813 | 2739 | .gpiomask = 0x00, |
| 2814 | 2740 | .muxsel = MUXSEL(3, 2, 1), |
| 2815 | 2741 | .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */ |
| 2816 | − .needs_tvaudio = 0, | |
| 2817 | 2742 | .pll = PLL_28, |
| 2818 | 2743 | .tuner_type = TUNER_ABSENT, |
| 2819 | 2744 | .tuner_addr = ADDR_UNSET, |
| @@ -2877,7 +2802,6 @@ struct tvcard bttv_tvcards[] = { · 57 unmodified lines | ||
| 2877 | 2802 | .gpiomask = 0, |
| 2878 | 2803 | .muxsel = MUXSEL(2, 3), |
| 2879 | 2804 | .gpiomux = { 0 }, |
| 2880 | − .needs_tvaudio = 0, | |
| 2881 | 2805 | .no_msp34xx = 1, |
| 2882 | 2806 | .pll = PLL_28, |
| 2883 | 2807 | .tuner_type = TUNER_ABSENT, |
| @@ -3649,7 +3573,7 @@ void __devinit bttv_init_tuner(struct bttv *btv) · 765 unmodified lines | ||
| 3649 | 3573 | struct tuner_setup tun_setup; |
| 3650 | 3574 | |
| 3651 | 3575 | /* Load tuner module before issuing tuner config call! */ |
| 3652 | − if (bttv_tvcards[btv->c.type].has_radio) | |
| 3576 | + if (btv->has_radio) | |
| 3653 | 3577 | v4l2_i2c_new_subdev(&btv->c.v4l2_dev, |
| 3654 | 3578 | &btv->c.i2c_adap, "tuner", |
| 3655 | 3579 | 0, v4l2_i2c_tuner_addrs(ADDRS_RADIO)); |
| @@ -3664,7 +3588,7 @@ void __devinit bttv_init_tuner(struct bttv *btv) · 8 unmodified lines | ||
| 3664 | 3588 | tun_setup.type = btv->tuner_type; |
| 3665 | 3589 | tun_setup.addr = addr; |
| 3666 | 3590 | |
| 3667 | − if (bttv_tvcards[btv->c.type].has_radio) | |
| 3591 | + if (btv->has_radio) | |
| 3668 | 3592 | tun_setup.mode_mask |= T_RADIO; |
| 3669 | 3593 | |
| 3670 | 3594 | 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 | ||
| 3724 | 3648 | bttv_tvcards[BTTV_BOARD_HAUPPAUGE_IMPACTVCB].name); |
| 3725 | 3649 | btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB; |
| 3726 | 3650 | } |
| 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; | |
| 3727 | 3655 | } |
| 3728 | 3656 | |
| 3729 | 3657 | static int terratec_active_radio_upgrade(struct bttv *btv) |
| @@ -1218,6 +1218,11 @@ audio_mux(struct bttv *btv, int input, int mute) · 1217 unmodified lines | ||
| 1218 | 1218 | For now this is sufficient. */ |
| 1219 | 1219 | switch (input) { |
| 1220 | 1220 | 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 | + } | |
| 1221 | 1226 | in = MSP_INPUT(MSP_IN_SCART2, MSP_IN_TUNER1, |
| 1222 | 1227 | MSP_DSP_IN_SCART, MSP_DSP_IN_SCART); |
| 1223 | 1228 | break; |
| @@ -236,7 +236,6 @@ struct tvcard { · 235 unmodified lines | ||
| 236 | 236 | /* i2c audio flags */ |
| 237 | 237 | unsigned int no_msp34xx:1; |
| 238 | 238 | unsigned int no_tda7432:1; |
| 239 | − unsigned int needs_tvaudio:1; | |
| 240 | 239 | unsigned int msp34xx_alt:1; |
| 241 | 240 | /* Note: currently no card definition needs to mark the presence |
| 242 | 241 | of a RDS saa6588 chip. If this is ever needed, then add a new |
| @@ -440,6 +440,7 @@ struct bttv { · 439 unmodified lines | ||
| 440 | 440 | /* radio data/state */ |
| 441 | 441 | int has_radio; |
| 442 | 442 | int radio_user; |
| 443 | + int radio_uses_msp_demodulator; | |
| 443 | 444 | |
| 444 | 445 | /* miro/pinnacle + Aimslab VHX |
| 445 | 446 | philips matchbox (tea5757 radio tuner) support */ |
| @@ -607,8 +607,9 @@ static long qc_capture(struct qcam *q, char __user *buf, unsigned long len) · 606 unmodified lines | ||
| 607 | 607 | } |
| 608 | 608 | o = i * pixels_per_line + pixels_read + k; |
| 609 | 609 | if (o < len) { |
| 610 | + u8 ch = invert - buffer[k]; | |
| 610 | 611 | got++; |
| 611 | − put_user((invert - buffer[k]) << shift, buf + o); | |
| 612 | + put_user(ch << shift, buf + o); | |
| 612 | 613 | } |
| 613 | 614 | } |
| 614 | 615 | pixels_read += bytes; |
| @@ -648,8 +649,8 @@ static int qcam_querycap(struct file *file, void *priv, · 33 unmodified lines | ||
| 648 | 649 | struct qcam *qcam = video_drvdata(file); |
| 649 | 650 | |
| 650 | 651 | 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)); | |
| 653 | 654 | vcap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE; |
| 654 | 655 | vcap->capabilities = vcap->device_caps | V4L2_CAP_DEVICE_CAPS; |
| 655 | 656 | 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 | ||
| 688 | 689 | pix->height = qcam->height / qcam->transfer_scale; |
| 689 | 690 | pix->pixelformat = (qcam->bpp == 4) ? V4L2_PIX_FMT_Y4 : V4L2_PIX_FMT_Y6; |
| 690 | 691 | 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; | |
| 693 | 694 | /* Just a guess */ |
| 694 | 695 | pix->colorspace = V4L2_COLORSPACE_SRGB; |
| 695 | 696 | return 0; |
| @@ -757,7 +758,7 @@ static int qcam_enum_fmt_vid_cap(struct file *file, void *fh, struct v4l2_fmtdes · 61 unmodified lines | ||
| 757 | 758 | "4-Bit Monochrome", V4L2_PIX_FMT_Y4, |
| 758 | 759 | { 0, 0, 0, 0 } |
| 759 | 760 | }, |
| 760 | − { 0, 0, 0, | |
| 761 | + { 1, 0, 0, | |
| 761 | 762 | "6-Bit Monochrome", V4L2_PIX_FMT_Y6, |
| 762 | 763 | { 0, 0, 0, 0 } |
| 763 | 764 | }, |
| @@ -772,6 +773,25 @@ static int qcam_enum_fmt_vid_cap(struct file *file, void *fh, struct v4l2_fmtdes · 8 unmodified lines | ||
| 772 | 773 | return 0; |
| 773 | 774 | } |
| 774 | 775 | |
| 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 | + | |
| 775 | 795 | static ssize_t qcam_read(struct file *file, char __user *buf, |
| 776 | 796 | size_t count, loff_t *ppos) |
| 777 | 797 | { |
| @@ -795,6 +815,11 @@ static ssize_t qcam_read(struct file *file, char __user *buf, · 17 unmodified lines | ||
| 795 | 815 | return len; |
| 796 | 816 | } |
| 797 | 817 | |
| 818 | +static unsigned int qcam_poll(struct file *filp, poll_table *wait) | |
| 819 | +{ | |
| 820 | + return v4l2_ctrl_poll(filp, wait) | POLLIN | POLLRDNORM; | |
| 821 | +} | |
| 822 | + | |
| 798 | 823 | static int qcam_s_ctrl(struct v4l2_ctrl *ctrl) |
| 799 | 824 | { |
| 800 | 825 | struct qcam *qcam = |
| @@ -828,7 +853,7 @@ static const struct v4l2_file_operations qcam_fops = { · 27 unmodified lines | ||
| 828 | 853 | .owner = THIS_MODULE, |
| 829 | 854 | .open = v4l2_fh_open, |
| 830 | 855 | .release = v4l2_fh_release, |
| 831 | − .poll = v4l2_ctrl_poll, | |
| 856 | + .poll = qcam_poll, | |
| 832 | 857 | .unlocked_ioctl = video_ioctl2, |
| 833 | 858 | .read = qcam_read, |
| 834 | 859 | }; |
| @@ -839,6 +864,7 @@ static const struct v4l2_ioctl_ops qcam_ioctl_ops = { · 4 unmodified lines | ||
| 839 | 864 | .vidioc_s_input = qcam_s_input, |
| 840 | 865 | .vidioc_enum_input = qcam_enum_input, |
| 841 | 866 | .vidioc_enum_fmt_vid_cap = qcam_enum_fmt_vid_cap, |
| 867 | + .vidioc_enum_framesizes = qcam_enum_framesizes, | |
| 842 | 868 | .vidioc_g_fmt_vid_cap = qcam_g_fmt_vid_cap, |
| 843 | 869 | .vidioc_s_fmt_vid_cap = qcam_s_fmt_vid_cap, |
| 844 | 870 | .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 | ||
| 864 | 890 | return NULL; |
| 865 | 891 | |
| 866 | 892 | 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); | |
| 868 | 894 | |
| 869 | − if (v4l2_device_register(NULL, v4l2_dev) < 0) { | |
| 895 | + if (v4l2_device_register(port->dev, v4l2_dev) < 0) { | |
| 870 | 896 | v4l2_err(v4l2_dev, "Could not register v4l2_device\n"); |
| 871 | 897 | kfree(qcam); |
| 872 | 898 | return NULL; |
| @@ -886,7 +912,7 @@ static struct qcam *qcam_init(struct parport *port) · 13 unmodified lines | ||
| 886 | 912 | return NULL; |
| 887 | 913 | } |
| 888 | 914 | 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, | |
| 890 | 916 | NULL, 0, NULL); |
| 891 | 917 | if (qcam->pdev == NULL) { |
| 892 | 918 | 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 | ||
| 975 | 1001 | return -ENODEV; |
| 976 | 1002 | } |
| 977 | 1003 | qc_calibrate(qcam); |
| 1004 | + v4l2_ctrl_handler_setup(&qcam->hdl); | |
| 978 | 1005 | |
| 979 | 1006 | parport_release(qcam->pdev); |
| 980 | 1007 | |
| @@ -838,10 +838,10 @@ static int cx18_setup_pci(struct cx18 *cx, struct pci_dev *pci_dev, · 837 unmodified lines | ||
| 838 | 838 | } |
| 839 | 839 | |
| 840 | 840 | 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", | |
| 842 | 842 | cx->pci_dev->device, cx->card_rev, pci_dev->bus->number, |
| 843 | 843 | 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); | |
| 845 | 845 | |
| 846 | 846 | return 0; |
| 847 | 847 | } |
| @@ -938,7 +938,7 @@ static int __devinit cx18_probe(struct pci_dev *pci_dev, · 90 unmodified lines | ||
| 938 | 938 | if (retval) |
| 939 | 939 | goto err; |
| 940 | 940 | |
| 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); | |
| 942 | 942 | |
| 943 | 943 | /* PCI Device Setup */ |
| 944 | 944 | 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 | ||
| 946 | 946 | goto free_workqueues; |
| 947 | 947 | |
| 948 | 948 | /* 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); | |
| 951 | 951 | cx->enc_mem = ioremap_nocache(cx->base_addr + CX18_MEM_OFFSET, |
| 952 | 952 | CX18_MEM_SIZE); |
| 953 | 953 | if (!cx->enc_mem) { |
| @@ -622,7 +622,7 @@ struct cx18 { · 621 unmodified lines | ||
| 622 | 622 | unique ID. Starts at 1, so 0 can be used as |
| 623 | 623 | uninitialized value in the stream->id. */ |
| 624 | 624 | |
| 625 | − u32 base_addr; | |
| 625 | + resource_size_t base_addr; | |
| 626 | 626 | |
| 627 | 627 | u8 card_rev; |
| 628 | 628 | void __iomem *enc_mem, *reg_mem; |
| @@ -164,8 +164,13 @@ static int load_apu_fw_direct(const char *fn, u8 __iomem *dst, struct cx18 *cx, · 163 unmodified lines | ||
| 164 | 164 | |
| 165 | 165 | apu_version = (vers[0] << 24) | (vers[4] << 16) | vers[32]; |
| 166 | 166 | 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 | + | |
| 169 | 174 | offset += sizeof(seghdr); |
| 170 | 175 | if (seghdr.sync1 != APU_ROM_SYNC1 || |
| 171 | 176 | seghdr.sync2 != APU_ROM_SYNC2) { |
| @@ -434,6 +434,7 @@ static int epu_dma_done_irq(struct cx18 *cx, struct cx18_in_work_order *order) · 433 unmodified lines | ||
| 434 | 434 | { |
| 435 | 435 | u32 handle, mdl_ack_offset, mdl_ack_count; |
| 436 | 436 | struct cx18_mailbox *mb; |
| 437 | + int i; | |
| 437 | 438 | |
| 438 | 439 | mb = &order->mb; |
| 439 | 440 | 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 | ||
| 447 | 448 | return -1; |
| 448 | 449 | } |
| 449 | 450 | |
| 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); | |
| 452 | 454 | |
| 453 | 455 | if ((order->flags & CX18_F_EWO_MB_STALE) == 0) |
| 454 | 456 | mb_ack_irq(cx, order); |
| @@ -538,6 +540,7 @@ void cx18_api_epu_cmd_irq(struct cx18 *cx, int rpu) · 83 unmodified lines | ||
| 538 | 540 | struct cx18_mailbox *order_mb; |
| 539 | 541 | struct cx18_in_work_order *order; |
| 540 | 542 | int submit; |
| 543 | + int i; | |
| 541 | 544 | |
| 542 | 545 | switch (rpu) { |
| 543 | 546 | case CPU: |
| @@ -562,10 +565,12 @@ void cx18_api_epu_cmd_irq(struct cx18 *cx, int rpu) · 18 unmodified lines | ||
| 562 | 565 | order_mb = &order->mb; |
| 563 | 566 | |
| 564 | 567 | /* 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 | + | |
| 566 | 571 | /* 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); | |
| 569 | 574 | |
| 570 | 575 | if (order_mb->request == order_mb->ack) { |
| 571 | 576 | CX18_DEBUG_WARN("Possibly falling behind: %s self-ack'ed our " |
| @@ -471,7 +471,7 @@ static int blackbird_load_firmware(struct cx8802_dev *dev) · 470 unmodified lines | ||
| 471 | 471 | dprintk(1,"Loading firmware ...\n"); |
| 472 | 472 | dataptr = (u32*)firmware->data; |
| 473 | 473 | for (i = 0; i < (firmware->size >> 2); i++) { |
| 474 | − value = *dataptr; | |
| 474 | + value = le32_to_cpu(*dataptr); | |
| 475 | 475 | checksum += ~value; |
| 476 | 476 | memory_write(dev->core, i, value); |
| 477 | 477 | dataptr++; |
| @@ -974,6 +974,7 @@ struct em28xx_board em28xx_boards[] = { · 973 unmodified lines | ||
| 974 | 974 | [EM2884_BOARD_CINERGY_HTC_STICK] = { |
| 975 | 975 | .name = "Terratec Cinergy HTC Stick", |
| 976 | 976 | .has_dvb = 1, |
| 977 | + .ir_codes = RC_MAP_NEC_TERRATEC_CINERGY_XS, | |
| 977 | 978 | #if 0 |
| 978 | 979 | .tuner_type = TUNER_PHILIPS_TDA8290, |
| 979 | 980 | .tuner_addr = 0x41, |
| @@ -527,6 +527,8 @@ static int em28xx_ir_init(struct em28xx *dev) · 526 unmodified lines | ||
| 527 | 527 | |
| 528 | 528 | if (dev->board.ir_codes == NULL) { |
| 529 | 529 | /* No remote control support */ |
| 530 | + em28xx_warn("Remote control support is not available for " | |
| 531 | + "this card.\n"); | |
| 530 | 532 | return 0; |
| 531 | 533 | } |
| 532 | 534 | |
| @@ -1653,7 +1653,7 @@ static int vidioc_streamoff(struct file *file, void *priv, · 1652 unmodified lines | ||
| 1653 | 1653 | enum v4l2_buf_type buf_type) |
| 1654 | 1654 | { |
| 1655 | 1655 | struct gspca_dev *gspca_dev = video_drvdata(file); |
| 1656 | − int ret; | |
| 1656 | + int i, ret; | |
| 1657 | 1657 | |
| 1658 | 1658 | if (buf_type != V4L2_BUF_TYPE_VIDEO_CAPTURE) |
| 1659 | 1659 | return -EINVAL; |
| @@ -1678,6 +1678,8 @@ static int vidioc_streamoff(struct file *file, void *priv, · 18 unmodified lines | ||
| 1678 | 1678 | wake_up_interruptible(&gspca_dev->wq); |
| 1679 | 1679 | |
| 1680 | 1680 | /* empty the transfer queues */ |
| 1681 | + for (i = 0; i < gspca_dev->nframes; i++) | |
| 1682 | + gspca_dev->frame[i].v4l2_buf.flags &= ~BUF_ALL_FLAGS; | |
| 1681 | 1683 | atomic_set(&gspca_dev->fr_q, 0); |
| 1682 | 1684 | atomic_set(&gspca_dev->fr_i, 0); |
| 1683 | 1685 | gspca_dev->fr_o = 0; |
| @@ -96,7 +96,7 @@ static void setbrightness(struct gspca_dev *gspca_dev); · 95 unmodified lines | ||
| 96 | 96 | static void setcontrast(struct gspca_dev *gspca_dev); |
| 97 | 97 | static void setgain(struct gspca_dev *gspca_dev); |
| 98 | 98 | 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); | |
| 100 | 100 | static void setawb(struct gspca_dev *gspca_dev); |
| 101 | 101 | static void setaec(struct gspca_dev *gspca_dev); |
| 102 | 102 | static void setsharpness(struct gspca_dev *gspca_dev); |
| @@ -189,7 +189,7 @@ static const struct ctrl sd_ctrls[] = { · 86 unmodified lines | ||
| 189 | 189 | .step = 1, |
| 190 | 190 | .default_value = 1, |
| 191 | 191 | }, |
| 192 | − .set = sd_setagc | |
| 192 | + .set_control = setagc | |
| 193 | 193 | }, |
| 194 | 194 | [AWB] = { |
| 195 | 195 | { |
| @@ -851,6 +851,7 @@ static int sccb_check_status(struct gspca_dev *gspca_dev) · 655 unmodified lines | ||
| 851 | 851 | int i; |
| 852 | 852 | |
| 853 | 853 | for (i = 0; i < 5; i++) { |
| 854 | + msleep(10); | |
| 854 | 855 | data = ov534_reg_read(gspca_dev, OV534_REG_STATUS); |
| 855 | 856 | |
| 856 | 857 | switch (data) { |
| @@ -1242,10 +1243,6 @@ static int sd_config(struct gspca_dev *gspca_dev, · 385 unmodified lines | ||
| 1242 | 1243 | |
| 1243 | 1244 | cam->ctrls = sd->ctrls; |
| 1244 | 1245 | |
| 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 | − | |
| 1249 | 1246 | cam->cam_mode = ov772x_mode; |
| 1250 | 1247 | cam->nmodes = ARRAY_SIZE(ov772x_mode); |
| 1251 | 1248 | |
| @@ -1486,29 +1483,6 @@ scan_next: · 234 unmodified lines | ||
| 1486 | 1483 | } while (remaining_len > 0); |
| 1487 | 1484 | } |
| 1488 | 1485 | |
| 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 | − | |
| 1512 | 1486 | static int sd_querymenu(struct gspca_dev *gspca_dev, |
| 1513 | 1487 | struct v4l2_querymenu *menu) |
| 1514 | 1488 | { |
| @@ -1008,6 +1008,7 @@ static int sccb_check_status(struct gspca_dev *gspca_dev) · 1007 unmodified lines | ||
| 1008 | 1008 | int i; |
| 1009 | 1009 | |
| 1010 | 1010 | for (i = 0; i < 5; i++) { |
| 1011 | + msleep(10); | |
| 1011 | 1012 | data = reg_r(gspca_dev, OV534_REG_STATUS); |
| 1012 | 1013 | |
| 1013 | 1014 | switch (data) { |
| @@ -418,7 +418,7 @@ static int sd_init_controls(struct gspca_dev *gspca_dev) · 417 unmodified lines | ||
| 418 | 418 | struct v4l2_ctrl_handler *hdl = &gspca_dev->ctrl_handler; |
| 419 | 419 | |
| 420 | 420 | gspca_dev->vdev.ctrl_handler = hdl; |
| 421 | − v4l2_ctrl_handler_init(hdl, 4); | |
| 421 | + v4l2_ctrl_handler_init(hdl, 5); | |
| 422 | 422 | |
| 423 | 423 | sd->contrast = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops, |
| 424 | 424 | V4L2_CID_CONTRAST, 0, 15, 1, 7); |
| @@ -1761,7 +1761,6 @@ static int sd_init_controls(struct gspca_dev *gspca_dev) · 1760 unmodified lines | ||
| 1761 | 1761 | V4L2_CID_SATURATION, 0, 255, 1, 127); |
| 1762 | 1762 | sd->hue = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops, |
| 1763 | 1763 | V4L2_CID_HUE, -180, 180, 1, 0); |
| 1764 | − v4l2_ctrl_cluster(4, &sd->brightness); | |
| 1765 | 1764 | |
| 1766 | 1765 | sd->gamma = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops, |
| 1767 | 1766 | V4L2_CID_GAMMA, 0, 255, 1, 0x10); |
| @@ -1770,7 +1769,6 @@ static int sd_init_controls(struct gspca_dev *gspca_dev) · 2 unmodified lines | ||
| 1770 | 1769 | V4L2_CID_BLUE_BALANCE, 0, 127, 1, 0x28); |
| 1771 | 1770 | sd->red = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops, |
| 1772 | 1771 | V4L2_CID_RED_BALANCE, 0, 127, 1, 0x28); |
| 1773 | − v4l2_ctrl_cluster(2, &sd->blue); | |
| 1774 | 1772 | |
| 1775 | 1773 | if (sd->sensor != SENSOR_OV9655 && sd->sensor != SENSOR_SOI968 && |
| 1776 | 1774 | 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 | ||
| 1779 | 1777 | V4L2_CID_HFLIP, 0, 1, 1, 0); |
| 1780 | 1778 | sd->vflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops, |
| 1781 | 1779 | V4L2_CID_VFLIP, 0, 1, 1, 0); |
| 1782 | − v4l2_ctrl_cluster(2, &sd->hflip); | |
| 1783 | 1780 | } |
| 1784 | 1781 | |
| 1785 | 1782 | 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 | ||
| 1794 | 1791 | V4L2_CID_GAIN, 0, 28, 1, 0); |
| 1795 | 1792 | sd->autogain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops, |
| 1796 | 1793 | 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) { | |
| 1797 | 1808 | if (sd->sensor == SENSOR_SOI968) |
| 1798 | 1809 | /* this sensor doesn't have the exposure control and |
| 1799 | 1810 | 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 | ||
| 1803 | 1814 | /* Otherwise autogain is clustered with exposure. */ |
| 1804 | 1815 | v4l2_ctrl_auto_cluster(2, &sd->autogain, 0, false); |
| 1805 | 1816 | } |
| 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 | − } | |
| 1813 | 1817 | return 0; |
| 1814 | 1818 | } |
| 1815 | 1819 | |
| @@ -3120,7 +3120,7 @@ static const struct sd_desc sd_desc = { · 3119 unmodified lines | ||
| 3120 | 3120 | | (SENSOR_ ## sensor << 8) \ |
| 3121 | 3121 | | (flags) |
| 3122 | 3122 | 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)}, | |
| 3124 | 3124 | {USB_DEVICE(0x0458, 0x702e), BS(SN9C120, OV7660)}, |
| 3125 | 3125 | {USB_DEVICE(0x045e, 0x00f5), BSF(SN9C105, OV7660, F_PDN_INV)}, |
| 3126 | 3126 | {USB_DEVICE(0x045e, 0x00f7), BSF(SN9C105, OV7660, F_PDN_INV)}, |
| @@ -866,10 +866,10 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev *pdev, · 865 unmodified lines | ||
| 866 | 866 | pci_write_config_dword(pdev, 0x40, 0xffff); |
| 867 | 867 | |
| 868 | 868 | 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", | |
| 870 | 870 | pdev->device, pdev->revision, pdev->bus->number, |
| 871 | 871 | 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); | |
| 873 | 873 | |
| 874 | 874 | return 0; |
| 875 | 875 | } |
| @@ -1007,7 +1007,7 @@ static int __devinit ivtv_probe(struct pci_dev *pdev, · 131 unmodified lines | ||
| 1007 | 1007 | itv->cxhdl.priv = itv; |
| 1008 | 1008 | itv->cxhdl.func = ivtv_api_func; |
| 1009 | 1009 | |
| 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); | |
| 1011 | 1011 | |
| 1012 | 1012 | /* PCI Device Setup */ |
| 1013 | 1013 | retval = ivtv_setup_pci(itv, pdev, pci_id); |
| @@ -1017,8 +1017,8 @@ static int __devinit ivtv_probe(struct pci_dev *pdev, · 3 unmodified lines | ||
| 1017 | 1017 | goto free_mem; |
| 1018 | 1018 | |
| 1019 | 1019 | /* 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); | |
| 1022 | 1022 | itv->enc_mem = ioremap_nocache(itv->base_addr + IVTV_ENCODER_OFFSET, |
| 1023 | 1023 | IVTV_ENCODER_SIZE); |
| 1024 | 1024 | if (!itv->enc_mem) { |
| @@ -1034,8 +1034,8 @@ static int __devinit ivtv_probe(struct pci_dev *pdev, · 9 unmodified lines | ||
| 1034 | 1034 | } |
| 1035 | 1035 | |
| 1036 | 1036 | 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); | |
| 1039 | 1039 | itv->dec_mem = ioremap_nocache(itv->base_addr + IVTV_DECODER_OFFSET, |
| 1040 | 1040 | IVTV_DECODER_SIZE); |
| 1041 | 1041 | if (!itv->dec_mem) { |
| @@ -1056,8 +1056,8 @@ static int __devinit ivtv_probe(struct pci_dev *pdev, · 14 unmodified lines | ||
| 1056 | 1056 | } |
| 1057 | 1057 | |
| 1058 | 1058 | /* 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); | |
| 1061 | 1061 | itv->reg_mem = |
| 1062 | 1062 | ioremap_nocache(itv->base_addr + IVTV_REG_OFFSET, IVTV_REG_SIZE); |
| 1063 | 1063 | if (!itv->reg_mem) { |
| @@ -622,7 +622,7 @@ struct ivtv { · 621 unmodified lines | ||
| 622 | 622 | struct v4l2_subdev *sd_video; /* controlling video decoder subdev */ |
| 623 | 623 | struct v4l2_subdev *sd_audio; /* controlling audio subdev */ |
| 624 | 624 | 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 */ | |
| 626 | 626 | volatile void __iomem *enc_mem; /* pointer to mapped encoder memory */ |
| 627 | 627 | volatile void __iomem *dec_mem; /* pointer to mapped decoder memory */ |
| 628 | 628 | volatile void __iomem *reg_mem; /* pointer to mapped registers */ |
| @@ -110,22 +110,6 @@ enum { · 109 unmodified lines | ||
| 110 | 110 | V4L2_M2M_DST = 1, |
| 111 | 111 | }; |
| 112 | 112 | |
| 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 | − | |
| 129 | 113 | #define V4L2_CID_TRANS_TIME_MSEC V4L2_CID_PRIVATE_BASE |
| 130 | 114 | #define V4L2_CID_TRANS_NUM_BUFS (V4L2_CID_PRIVATE_BASE + 1) |
| 131 | 115 | |
| @@ -198,8 +182,26 @@ struct m2mtest_ctx { · 66 unmodified lines | ||
| 198 | 182 | int aborting; |
| 199 | 183 | |
| 200 | 184 | struct v4l2_m2m_ctx *m2m_ctx; |
| 185 | + | |
| 186 | + /* Source and destination queue data */ | |
| 187 | + struct m2mtest_q_data q_data[2]; | |
| 201 | 188 | }; |
| 202 | 189 | |
| 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 | + | |
| 203 | 205 | static struct v4l2_queryctrl *get_ctrl(int id) |
| 204 | 206 | { |
| 205 | 207 | int i; |
| @@ -223,7 +225,7 @@ static int device_process(struct m2mtest_ctx *ctx, · 17 unmodified lines | ||
| 223 | 225 | int tile_w, bytes_left; |
| 224 | 226 | int width, height, bytesperline; |
| 225 | 227 | |
| 226 | − q_data = get_q_data(V4L2_BUF_TYPE_VIDEO_OUTPUT); | |
| 228 | + q_data = get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); | |
| 227 | 229 | |
| 228 | 230 | width = q_data->width; |
| 229 | 231 | height = q_data->height; |
| @@ -436,7 +438,7 @@ static int vidioc_g_fmt(struct m2mtest_ctx *ctx, struct v4l2_format *f) · 206 unmodified lines | ||
| 436 | 438 | if (!vq) |
| 437 | 439 | return -EINVAL; |
| 438 | 440 | |
| 439 | − q_data = get_q_data(f->type); | |
| 441 | + q_data = get_q_data(ctx, f->type); | |
| 440 | 442 | |
| 441 | 443 | f->fmt.pix.width = q_data->width; |
| 442 | 444 | 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 | ||
| 535 | 537 | if (!vq) |
| 536 | 538 | return -EINVAL; |
| 537 | 539 | |
| 538 | − q_data = get_q_data(f->type); | |
| 540 | + q_data = get_q_data(ctx, f->type); | |
| 539 | 541 | if (!q_data) |
| 540 | 542 | return -EINVAL; |
| 541 | 543 | |
| @@ -747,7 +749,7 @@ static int m2mtest_queue_setup(struct vb2_queue *vq, · 205 unmodified lines | ||
| 747 | 749 | struct m2mtest_q_data *q_data; |
| 748 | 750 | unsigned int size, count = *nbuffers; |
| 749 | 751 | |
| 750 | − q_data = get_q_data(vq->type); | |
| 752 | + q_data = get_q_data(ctx, vq->type); | |
| 751 | 753 | |
| 752 | 754 | size = q_data->width * q_data->height * q_data->fmt->depth >> 3; |
| 753 | 755 | |
| @@ -775,7 +777,7 @@ static int m2mtest_buf_prepare(struct vb2_buffer *vb) · 21 unmodified lines | ||
| 775 | 777 | |
| 776 | 778 | dprintk(ctx->dev, "type: %d\n", vb->vb2_queue->type); |
| 777 | 779 | |
| 778 | − q_data = get_q_data(vb->vb2_queue->type); | |
| 780 | + q_data = get_q_data(ctx, vb->vb2_queue->type); | |
| 779 | 781 | |
| 780 | 782 | if (vb2_plane_size(vb, 0) < q_data->sizeimage) { |
| 781 | 783 | 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 | ||
| 860 | 862 | ctx->transtime = MEM2MEM_DEF_TRANSTIME; |
| 861 | 863 | ctx->num_processed = 0; |
| 862 | 864 | |
| 865 | + ctx->q_data[V4L2_M2M_SRC].fmt = &formats[0]; | |
| 866 | + ctx->q_data[V4L2_M2M_DST].fmt = &formats[0]; | |
| 867 | + | |
| 863 | 868 | ctx->m2m_ctx = v4l2_m2m_ctx_init(dev->m2m_dev, ctx, &queue_init); |
| 864 | 869 | |
| 865 | 870 | if (IS_ERR(ctx->m2m_ctx)) { |
| @@ -986,9 +991,6 @@ static int m2mtest_probe(struct platform_device *pdev) · 120 unmodified lines | ||
| 986 | 991 | goto err_m2m; |
| 987 | 992 | } |
| 988 | 993 | |
| 989 | − q_data[V4L2_M2M_SRC].fmt = &formats[0]; | |
| 990 | − q_data[V4L2_M2M_DST].fmt = &formats[0]; | |
| 991 | − | |
| 992 | 994 | return 0; |
| 993 | 995 | |
| 994 | 996 | v4l2_m2m_release(dev->m2m_dev); |
| @@ -345,19 +345,6 @@ static struct mx2_fmt_cfg mx27_emma_prp_table[] = { · 344 unmodified lines | ||
| 345 | 345 | PRP_INTR_CH2OVF, |
| 346 | 346 | } |
| 347 | 347 | }, |
| 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 | − }, | |
| 361 | 348 | }; |
| 362 | 349 | |
| 363 | 350 | 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 | ||
| 984 | 971 | struct soc_camera_host *ici = to_soc_camera_host(icd->parent); |
| 985 | 972 | struct mx2_camera_dev *pcdev = ici->priv; |
| 986 | 973 | struct v4l2_mbus_config cfg = {.type = V4L2_MBUS_PARALLEL,}; |
| 987 | − const struct soc_camera_format_xlate *xlate; | |
| 988 | 974 | unsigned long common_flags; |
| 989 | 975 | int ret; |
| 990 | 976 | int bytesperline; |
| @@ -1029,31 +1015,14 @@ static int mx2_camera_set_bus_param(struct soc_camera_device *icd) · 38 unmodified lines | ||
| 1029 | 1015 | return ret; |
| 1030 | 1016 | } |
| 1031 | 1017 | |
| 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 | − | |
| 1051 | 1018 | if (common_flags & V4L2_MBUS_PCLK_SAMPLE_RISING) |
| 1052 | 1019 | csicr1 |= CSICR1_REDGE; |
| 1053 | 1020 | if (common_flags & V4L2_MBUS_VSYNC_ACTIVE_HIGH) |
| 1054 | 1021 | csicr1 |= CSICR1_SOF_POL; |
| 1055 | 1022 | if (common_flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH) |
| 1056 | 1023 | csicr1 |= CSICR1_HSYNC_POL; |
| 1024 | + if (pcdev->platform_flags & MX2_CAMERA_SWAP16) | |
| 1025 | + csicr1 |= CSICR1_SWAP16_EN; | |
| 1057 | 1026 | if (pcdev->platform_flags & MX2_CAMERA_EXT_VSYNC) |
| 1058 | 1027 | csicr1 |= CSICR1_EXT_VSYNC; |
| 1059 | 1028 | 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 | ||
| 1064 | 1033 | csicr1 |= CSICR1_GCLK_MODE; |
| 1065 | 1034 | if (pcdev->platform_flags & MX2_CAMERA_INV_DATA) |
| 1066 | 1035 | csicr1 |= CSICR1_INV_DATA; |
| 1036 | + if (pcdev->platform_flags & MX2_CAMERA_PACK_DIR_MSB) | |
| 1037 | + csicr1 |= CSICR1_PACK_DIR; | |
| 1067 | 1038 | |
| 1068 | 1039 | pcdev->csicr1 = csicr1; |
| 1069 | 1040 | |
| @@ -1138,8 +1109,7 @@ static int mx2_camera_get_formats(struct soc_camera_device *icd, · 68 unmodified lines | ||
| 1138 | 1109 | return 0; |
| 1139 | 1110 | } |
| 1140 | 1111 | |
| 1141 | − if (code == V4L2_MBUS_FMT_YUYV8_2X8 || | |
| 1142 | − code == V4L2_MBUS_FMT_UYVY8_2X8) { | |
| 1112 | + if (code == V4L2_MBUS_FMT_YUYV8_2X8) { | |
| 1143 | 1113 | formats++; |
| 1144 | 1114 | if (xlate) { |
| 1145 | 1115 | /* |
| @@ -1155,18 +1125,6 @@ static int mx2_camera_get_formats(struct soc_camera_device *icd, · 9 unmodified lines | ||
| 1155 | 1125 | } |
| 1156 | 1126 | } |
| 1157 | 1127 | |
| 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 | − | |
| 1170 | 1128 | /* Generic pass-trough */ |
| 1171 | 1129 | formats++; |
| 1172 | 1130 | if (xlate) { |
| @@ -615,7 +615,7 @@ int fimc_ctrls_create(struct fimc_ctx *ctx) · 614 unmodified lines | ||
| 615 | 615 | ctx->effect.type = FIMC_REG_CIIMGEFF_FIN_BYPASS; |
| 616 | 616 | |
| 617 | 617 | if (!handler->error) { |
| 618 | − v4l2_ctrl_cluster(3, &ctrls->colorfx); | |
| 618 | + v4l2_ctrl_cluster(2, &ctrls->colorfx); | |
| 619 | 619 | ctrls->ready = true; |
| 620 | 620 | } |
| 621 | 621 | |
| @@ -164,10 +164,15 @@ · 163 unmodified lines | ||
| 164 | 164 | decoded pic */ |
| 165 | 165 | #define S5P_FIMV_SI_DISPLAY_Y_ADR 0x2010 /* luma addr of displayed pic */ |
| 166 | 166 | #define S5P_FIMV_SI_DISPLAY_C_ADR 0x2014 /* chroma addrof displayed pic */ |
| 167 | + | |
| 167 | 168 | #define S5P_FIMV_SI_CONSUMED_BYTES 0x2018 /* Consumed number of bytes to |
| 168 | 169 | decode a frame */ |
| 169 | 170 | #define S5P_FIMV_SI_DISPLAY_STATUS 0x201c /* status of decoded picture */ |
| 170 | 171 | |
| 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 | + | |
| 171 | 176 | #define S5P_FIMV_SI_CH0_SB_ST_ADR 0x2044 /* start addr of stream buf */ |
| 172 | 177 | #define S5P_FIMV_SI_CH0_SB_FRM_SIZE 0x2048 /* size of stream buf */ |
| 173 | 178 | #define S5P_FIMV_SI_CH0_DESC_ADR 0x204c /* addr of descriptor buf */ |
| @@ -627,13 +627,13 @@ static int s5p_mfc_dec_s_ctrl(struct v4l2_ctrl *ctrl) · 626 unmodified lines | ||
| 627 | 627 | |
| 628 | 628 | switch (ctrl->id) { |
| 629 | 629 | case V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY: |
| 630 | − ctx->loop_filter_mpeg4 = ctrl->val; | |
| 630 | + ctx->display_delay = ctrl->val; | |
| 631 | 631 | break; |
| 632 | 632 | case V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE: |
| 633 | 633 | ctx->display_delay_enable = ctrl->val; |
| 634 | 634 | break; |
| 635 | 635 | case V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER: |
| 636 | − ctx->display_delay = ctrl->val; | |
| 636 | + ctx->loop_filter_mpeg4 = ctrl->val; | |
| 637 | 637 | break; |
| 638 | 638 | case V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE: |
| 639 | 639 | ctx->slice_interface = ctrl->val; |
| @@ -243,12 +243,6 @@ static struct mfc_control controls[] = { · 242 unmodified lines | ||
| 243 | 243 | .minimum = V4L2_MPEG_VIDEO_H264_LEVEL_1_0, |
| 244 | 244 | .maximum = V4L2_MPEG_VIDEO_H264_LEVEL_4_0, |
| 245 | 245 | .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 | − ), | |
| 252 | 246 | }, |
| 253 | 247 | { |
| 254 | 248 | .id = V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL, |
| @@ -494,7 +488,7 @@ static struct mfc_control controls[] = { · 239 unmodified lines | ||
| 494 | 488 | .type = V4L2_CTRL_TYPE_MENU, |
| 495 | 489 | .minimum = V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED, |
| 496 | 490 | .maximum = V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED, |
| 497 | − .default_value = 0, | |
| 491 | + .default_value = V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED, | |
| 498 | 492 | .menu_skip_mask = 0, |
| 499 | 493 | }, |
| 500 | 494 | { |
| @@ -534,7 +528,7 @@ static struct mfc_control controls[] = { · 33 unmodified lines | ||
| 534 | 528 | .type = V4L2_CTRL_TYPE_MENU, |
| 535 | 529 | .minimum = V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE, |
| 536 | 530 | .maximum = V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE, |
| 537 | − .default_value = 0, | |
| 531 | + .default_value = V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE, | |
| 538 | 532 | .menu_skip_mask = 0, |
| 539 | 533 | }, |
| 540 | 534 | { |
| @@ -907,6 +901,8 @@ static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f) · 366 unmodified lines | ||
| 907 | 901 | mfc_err("failed to try output format\n"); |
| 908 | 902 | return -EINVAL; |
| 909 | 903 | } |
| 904 | + v4l_bound_align_image(&pix_fmt_mp->width, 8, 1920, 1, | |
| 905 | + &pix_fmt_mp->height, 4, 1080, 1, 0); | |
| 910 | 906 | } else { |
| 911 | 907 | mfc_err("invalid buf type\n"); |
| 912 | 908 | return -EINVAL; |
| @@ -57,10 +57,12 @@ void s5p_mfc_cleanup_queue(struct list_head *lh, struct vb2_queue *vq); · 56 unmodified lines | ||
| 57 | 57 | S5P_FIMV_SI_DISPLAY_Y_ADR) << \ |
| 58 | 58 | MFC_OFFSET_SHIFT) |
| 59 | 59 | #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) << \ | |
| 61 | 61 | MFC_OFFSET_SHIFT) |
| 62 | 62 | #define s5p_mfc_get_dspl_status() readl(dev->regs_base + \ |
| 63 | 63 | S5P_FIMV_SI_DISPLAY_STATUS) |
| 64 | +#define s5p_mfc_get_dec_status() readl(dev->regs_base + \ | |
| 65 | + S5P_FIMV_SI_DECODE_STATUS) | |
| 64 | 66 | #define s5p_mfc_get_frame_type() (readl(dev->regs_base + \ |
| 65 | 67 | S5P_FIMV_DECODE_FRAME_TYPE) \ |
| 66 | 68 | & S5P_FIMV_DECODE_FRAME_MASK) |
| @@ -13,8 +13,7 @@ · 12 unmodified lines | ||
| 13 | 13 | #ifndef S5P_MFC_SHM_H_ |
| 14 | 14 | #define S5P_MFC_SHM_H_ |
| 15 | 15 | |
| 16 | −enum MFC_SHM_OFS | |
| 17 | −{ | |
| 16 | +enum MFC_SHM_OFS { | |
| 18 | 17 | EXTENEDED_DECODE_STATUS = 0x00, /* D */ |
| 19 | 18 | SET_FRAME_TAG = 0x04, /* D */ |
| 20 | 19 | GET_FRAME_TAG_TOP = 0x08, /* D */ |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | config VIDEO_SMIAPP |
| 2 | 2 | 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 | |
| 4 | 4 | select VIDEO_SMIAPP_PLL |
| 5 | 5 | ---help--- |
| 6 | 6 | This is a generic driver for SMIA++/SMIA camera modules. |
| @@ -32,6 +32,7 @@ · 31 unmodified lines | ||
| 32 | 32 | #include <linux/gpio.h> |
| 33 | 33 | #include <linux/module.h> |
| 34 | 34 | #include <linux/regulator/consumer.h> |
| 35 | +#include <linux/slab.h> | |
| 35 | 36 | #include <linux/v4l2-mediabus.h> |
| 36 | 37 | #include <media/v4l2-device.h> |
| 37 | 38 | |
| @@ -1178,7 +1178,7 @@ static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) · 1177 unmodified lines | ||
| 1178 | 1178 | return 0; |
| 1179 | 1179 | if (vt->type == t->mode && analog_ops->get_afc) |
| 1180 | 1180 | vt->afc = analog_ops->get_afc(&t->fe); |
| 1181 | − if (t->mode != V4L2_TUNER_RADIO) { | |
| 1181 | + if (vt->type != V4L2_TUNER_RADIO) { | |
| 1182 | 1182 | vt->capability |= V4L2_TUNER_CAP_NORM; |
| 1183 | 1183 | vt->rangelow = tv_range[0] * 16; |
| 1184 | 1184 | vt->rangehigh = tv_range[1] * 16; |
| @@ -656,7 +656,7 @@ static void determine_valid_ioctls(struct video_device *vdev) · 655 unmodified lines | ||
| 656 | 656 | SET_VALID_IOCTL(ops, VIDIOC_TRY_ENCODER_CMD, vidioc_try_encoder_cmd); |
| 657 | 657 | SET_VALID_IOCTL(ops, VIDIOC_DECODER_CMD, vidioc_decoder_cmd); |
| 658 | 658 | 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) | |
| 660 | 660 | set_bit(_IOC_NR(VIDIOC_G_PARM), valid_ioctls); |
| 661 | 661 | SET_VALID_IOCTL(ops, VIDIOC_S_PARM, vidioc_s_parm); |
| 662 | 662 | 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 | ||
| 679 | 679 | SET_VALID_IOCTL(ops, VIDIOC_QUERY_DV_PRESET, vidioc_query_dv_preset); |
| 680 | 680 | SET_VALID_IOCTL(ops, VIDIOC_S_DV_TIMINGS, vidioc_s_dv_timings); |
| 681 | 681 | 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); | |
| 682 | 684 | /* yes, really vidioc_subscribe_event */ |
| 683 | 685 | SET_VALID_IOCTL(ops, VIDIOC_DQEVENT, vidioc_subscribe_event); |
| 684 | 686 | SET_VALID_IOCTL(ops, VIDIOC_SUBSCRIBE_EVENT, vidioc_subscribe_event); |
| @@ -1680,6 +1680,7 @@ static long __video_do_ioctl(struct file *file, · 1679 unmodified lines | ||
| 1680 | 1680 | break; |
| 1681 | 1681 | |
| 1682 | 1682 | ret = 0; |
| 1683 | + p->parm.capture.readbuffers = 2; | |
| 1683 | 1684 | if (ops->vidioc_g_std) |
| 1684 | 1685 | ret = ops->vidioc_g_std(file, fh, &std); |
| 1685 | 1686 | if (ret == 0) |
| @@ -2561,7 +2561,7 @@ static int vino_acquire_input(struct vino_channel_settings *vcs) · 2560 unmodified lines | ||
| 2561 | 2561 | } else if (vino_drvdata->decoder |
| 2562 | 2562 | && (vino_drvdata->decoder_owner == VINO_NO_CHANNEL)) { |
| 2563 | 2563 | int input; |
| 2564 | − int data_norm; | |
| 2564 | + int data_norm = 0; | |
| 2565 | 2565 | v4l2_std_id norm; |
| 2566 | 2566 | |
| 2567 | 2567 | input = VINO_INPUT_COMPOSITE; |
| @@ -2651,7 +2651,7 @@ static int vino_set_input(struct vino_channel_settings *vcs, int input) · 83 unmodified lines | ||
| 2651 | 2651 | } |
| 2652 | 2652 | |
| 2653 | 2653 | if (vino_drvdata->decoder_owner == vcs->channel) { |
| 2654 | − int data_norm; | |
| 2654 | + int data_norm = 0; | |
| 2655 | 2655 | v4l2_std_id norm; |
| 2656 | 2656 | |
| 2657 | 2657 | ret = decoder_call(video, s_routing, |
| @@ -1149,10 +1149,14 @@ static ssize_t · 1148 unmodified lines | ||
| 1149 | 1149 | vivi_read(struct file *file, char __user *data, size_t count, loff_t *ppos) |
| 1150 | 1150 | { |
| 1151 | 1151 | struct vivi_dev *dev = video_drvdata(file); |
| 1152 | + int err; | |
| 1152 | 1153 | |
| 1153 | 1154 | 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, | |
| 1155 | 1157 | file->f_flags & O_NONBLOCK); |
| 1158 | + mutex_unlock(&dev->mutex); | |
| 1159 | + return err; | |
| 1156 | 1160 | } |
| 1157 | 1161 | |
| 1158 | 1162 | static unsigned int |
| @@ -554,7 +554,6 @@ static u32 mmc_sd_num_wr_blocks(struct mmc_card *card) · 553 unmodified lines | ||
| 554 | 554 | struct mmc_request mrq = {NULL}; |
| 555 | 555 | struct mmc_command cmd = {0}; |
| 556 | 556 | struct mmc_data data = {0}; |
| 557 | − unsigned int timeout_us; | |
| 558 | 557 | |
| 559 | 558 | struct scatterlist sg; |
| 560 | 559 | |
| @@ -574,23 +573,12 @@ static u32 mmc_sd_num_wr_blocks(struct mmc_card *card) · 13 unmodified lines | ||
| 574 | 573 | cmd.arg = 0; |
| 575 | 574 | cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC; |
| 576 | 575 | |
| 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 | − | |
| 589 | 576 | data.blksz = 4; |
| 590 | 577 | data.blocks = 1; |
| 591 | 578 | data.flags = MMC_DATA_READ; |
| 592 | 579 | data.sg = &sg; |
| 593 | 580 | data.sg_len = 1; |
| 581 | + mmc_set_data_timeout(&data, card); | |
| 594 | 582 | |
| 595 | 583 | mrq.cmd = &cmd; |
| 596 | 584 | mrq.data = &data; |
| @@ -85,7 +85,6 @@ · 84 unmodified lines | ||
| 85 | 85 | #define BRR_ENABLE (1 << 5) |
| 86 | 86 | #define DTO_ENABLE (1 << 20) |
| 87 | 87 | #define INIT_STREAM (1 << 1) |
| 88 | −#define ACEN_ACMD12 (1 << 2) | |
| 89 | 88 | #define DP_SELECT (1 << 21) |
| 90 | 89 | #define DDIR (1 << 4) |
| 91 | 90 | #define DMA_EN 0x1 |
| @@ -117,7 +116,6 @@ · 25 unmodified lines | ||
| 117 | 116 | #define OMAP_MMC_MAX_CLOCK 52000000 |
| 118 | 117 | #define DRIVER_NAME "omap_hsmmc" |
| 119 | 118 | |
| 120 | −#define AUTO_CMD12 (1 << 0) /* Auto CMD12 support */ | |
| 121 | 119 | /* |
| 122 | 120 | * One controller can have multiple slots, like on some omap boards using |
| 123 | 121 | * omap.c controller driver. Luckily this is not currently done on any known |
| @@ -177,7 +175,6 @@ struct omap_hsmmc_host { · 53 unmodified lines | ||
| 177 | 175 | int reqs_blocked; |
| 178 | 176 | int use_reg; |
| 179 | 177 | int req_in_progress; |
| 180 | − unsigned int flags; | |
| 181 | 178 | struct omap_hsmmc_next next_data; |
| 182 | 179 | |
| 183 | 180 | 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 | ||
| 773 | 770 | cmdtype = 0x3; |
| 774 | 771 | |
| 775 | 772 | cmdreg = (cmd->opcode << 24) | (resptype << 16) | (cmdtype << 22); |
| 776 | − if ((host->flags & AUTO_CMD12) && mmc_op_multi(cmd->opcode)) | |
| 777 | − cmdreg |= ACEN_ACMD12; | |
| 778 | 773 | |
| 779 | 774 | if (data) { |
| 780 | 775 | 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 | ||
| 847 | 842 | else |
| 848 | 843 | data->bytes_xfered = 0; |
| 849 | 844 | |
| 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) { | |
| 856 | 846 | omap_hsmmc_request_done(host, data->mrq); |
| 847 | + return; | |
| 857 | 848 | } |
| 849 | + omap_hsmmc_start_command(host, data->stop, NULL); | |
| 858 | 850 | } |
| 859 | 851 | |
| 860 | 852 | /* |
| @@ -1859,7 +1851,6 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev) · 998 unmodified lines | ||
| 1859 | 1851 | host->mapbase = res->start + pdata->reg_offset; |
| 1860 | 1852 | host->base = ioremap(host->mapbase, SZ_4K); |
| 1861 | 1853 | host->power_mode = MMC_POWER_OFF; |
| 1862 | − host->flags = AUTO_CMD12; | |
| 1863 | 1854 | host->next_data.cookie = 1; |
| 1864 | 1855 | |
| 1865 | 1856 | platform_set_drvdata(pdev, host); |
| @@ -264,7 +264,7 @@ static struct dentry *dfs_rootdir; · 263 unmodified lines | ||
| 264 | 264 | */ |
| 265 | 265 | int ubi_debugfs_init(void) |
| 266 | 266 | { |
| 267 | − if (!IS_ENABLED(DEBUG_FS)) | |
| 267 | + if (!IS_ENABLED(CONFIG_DEBUG_FS)) | |
| 268 | 268 | return 0; |
| 269 | 269 | |
| 270 | 270 | dfs_rootdir = debugfs_create_dir("ubi", NULL); |
| @@ -284,7 +284,7 @@ int ubi_debugfs_init(void) · 13 unmodified lines | ||
| 284 | 284 | */ |
| 285 | 285 | void ubi_debugfs_exit(void) |
| 286 | 286 | { |
| 287 | − if (IS_ENABLED(DEBUG_FS)) | |
| 287 | + if (IS_ENABLED(CONFIG_DEBUG_FS)) | |
| 288 | 288 | debugfs_remove(dfs_rootdir); |
| 289 | 289 | } |
| 290 | 290 | |
| @@ -407,7 +407,7 @@ int ubi_debugfs_init_dev(struct ubi_device *ubi) · 116 unmodified lines | ||
| 407 | 407 | struct dentry *dent; |
| 408 | 408 | struct ubi_debug_info *d = ubi->dbg; |
| 409 | 409 | |
| 410 | − if (!IS_ENABLED(DEBUG_FS)) | |
| 410 | + if (!IS_ENABLED(CONFIG_DEBUG_FS)) | |
| 411 | 411 | return 0; |
| 412 | 412 | |
| 413 | 413 | n = snprintf(d->dfs_dir_name, UBI_DFS_DIR_LEN + 1, UBI_DFS_DIR_NAME, |
| @@ -477,6 +477,6 @@ out: · 63 unmodified lines | ||
| 477 | 477 | */ |
| 478 | 478 | void ubi_debugfs_exit_dev(struct ubi_device *ubi) |
| 479 | 479 | { |
| 480 | − if (IS_ENABLED(DEBUG_FS)) | |
| 480 | + if (IS_ENABLED(CONFIG_DEBUG_FS)) | |
| 481 | 481 | debugfs_remove_recursive(ubi->dbg->dfs_dir); |
| 482 | 482 | } |
| @@ -150,14 +150,25 @@ static void bond_info_show_master(struct seq_file *seq) · 149 unmodified lines | ||
| 150 | 150 | } |
| 151 | 151 | } |
| 152 | 152 | |
| 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 | + | |
| 153 | 165 | static void bond_info_show_slave(struct seq_file *seq, |
| 154 | 166 | const struct slave *slave) |
| 155 | 167 | { |
| 156 | 168 | struct bonding *bond = seq->private; |
| 157 | 169 | |
| 158 | 170 | 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)); | |
| 161 | 172 | if (slave->speed == SPEED_UNKNOWN) |
| 162 | 173 | seq_printf(seq, "Speed: %s\n", "Unknown"); |
| 163 | 174 | else |
| @@ -693,8 +693,6 @@ static void cfhsi_rx_done(struct cfhsi *cfhsi) · 692 unmodified lines | ||
| 693 | 693 | */ |
| 694 | 694 | memcpy(rx_buf, (u8 *)piggy_desc, |
| 695 | 695 | CFHSI_DESC_SHORT_SZ); |
| 696 | − /* Mark no embedded frame here */ | |
| 697 | − piggy_desc->offset = 0; | |
| 698 | 696 | if (desc_pld_len == -EPROTO) |
| 699 | 697 | goto out_of_sync; |
| 700 | 698 | } |
| @@ -737,6 +735,8 @@ static void cfhsi_rx_done(struct cfhsi *cfhsi) · 36 unmodified lines | ||
| 737 | 735 | /* Extract any payload in piggyback descriptor. */ |
| 738 | 736 | if (cfhsi_rx_desc(piggy_desc, cfhsi) < 0) |
| 739 | 737 | goto out_of_sync; |
| 738 | + /* Mark no embedded frame after extracting it */ | |
| 739 | + piggy_desc->offset = 0; | |
| 740 | 740 | } |
| 741 | 741 | } |
| 742 | 742 | |
| @@ -1178,6 +1178,7 @@ int cfhsi_probe(struct platform_device *pdev) · 435 unmodified lines | ||
| 1178 | 1178 | dev_err(&ndev->dev, "%s: Registration error: %d.\n", |
| 1179 | 1179 | __func__, res); |
| 1180 | 1180 | free_netdev(ndev); |
| 1181 | + return -ENODEV; | |
| 1181 | 1182 | } |
| 1182 | 1183 | /* Add CAIF HSI device to list. */ |
| 1183 | 1184 | spin_lock(&cfhsi_list_lock); |
| @@ -590,8 +590,8 @@ static void c_can_chip_config(struct net_device *dev) · 589 unmodified lines | ||
| 590 | 590 | priv->write_reg(priv, &priv->regs->control, |
| 591 | 591 | CONTROL_ENABLE_AR); |
| 592 | 592 | |
| 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)) { | |
| 595 | 595 | /* loopback + silent mode : useful for hot self-test */ |
| 596 | 596 | priv->write_reg(priv, &priv->regs->control, CONTROL_EIE | |
| 597 | 597 | CONTROL_SIE | CONTROL_IE | CONTROL_TEST); |
| @@ -939,12 +939,12 @@ static int __devinit flexcan_probe(struct platform_device *pdev) · 938 unmodified lines | ||
| 939 | 939 | return PTR_ERR(pinctrl); |
| 940 | 940 | |
| 941 | 941 | if (pdev->dev.of_node) { |
| 942 | − const u32 *clock_freq_p; | |
| 942 | + const __be32 *clock_freq_p; | |
| 943 | 943 | |
| 944 | 944 | clock_freq_p = of_get_property(pdev->dev.of_node, |
| 945 | 945 | "clock-frequency", NULL); |
| 946 | 946 | if (clock_freq_p) |
| 947 | − clock_freq = *clock_freq_p; | |
| 947 | + clock_freq = be32_to_cpup(clock_freq_p); | |
| 948 | 948 | } |
| 949 | 949 | |
| 950 | 950 | if (!clock_freq) { |
| @@ -190,7 +190,7 @@ int bnx2x_tx_int(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata) · 189 unmodified lines | ||
| 190 | 190 | |
| 191 | 191 | if ((netif_tx_queue_stopped(txq)) && |
| 192 | 192 | (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)) | |
| 194 | 194 | netif_tx_wake_queue(txq); |
| 195 | 195 | |
| 196 | 196 | __netif_tx_unlock(txq); |
| @@ -2516,8 +2516,6 @@ int bnx2x_poll(struct napi_struct *napi, int budget) · 2319 unmodified lines | ||
| 2516 | 2516 | /* we split the first BD into headers and data BDs |
| 2517 | 2517 | * to ease the pain of our fellow microcode engineers |
| 2518 | 2518 | * we use one mapping for both BDs |
| 2519 | − * So far this has only been observed to happen | |
| 2520 | − * in Other Operating Systems(TM) | |
| 2521 | 2519 | */ |
| 2522 | 2520 | static noinline u16 bnx2x_tx_split(struct bnx2x *bp, |
| 2523 | 2521 | 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 | ||
| 3171 | 3169 | |
| 3172 | 3170 | txdata->tx_bd_prod += nbd; |
| 3173 | 3171 | |
| 3174 | − if (unlikely(bnx2x_tx_avail(bp, txdata) < MAX_SKB_FRAGS + 3)) { | |
| 3172 | + if (unlikely(bnx2x_tx_avail(bp, txdata) < MAX_SKB_FRAGS + 4)) { | |
| 3175 | 3173 | netif_tx_stop_queue(txq); |
| 3176 | 3174 | |
| 3177 | 3175 | /* 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 | ||
| 3180 | 3178 | smp_mb(); |
| 3181 | 3179 | |
| 3182 | 3180 | 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) | |
| 3184 | 3182 | netif_tx_wake_queue(txq); |
| 3185 | 3183 | } |
| 3186 | 3184 | txdata->tx_pkt++; |
| @@ -40,6 +40,7 @@ · 39 unmodified lines | ||
| 40 | 40 | #define I2C_BSC0 0 |
| 41 | 41 | #define I2C_BSC1 1 |
| 42 | 42 | #define I2C_WA_RETRY_CNT 3 |
| 43 | +#define I2C_WA_PWR_ITER (I2C_WA_RETRY_CNT - 1) | |
| 43 | 44 | #define MCPR_IMC_COMMAND_READ_OP 1 |
| 44 | 45 | #define MCPR_IMC_COMMAND_WRITE_OP 2 |
| 45 | 46 | |
| @@ -7659,6 +7660,28 @@ static int bnx2x_8726_read_sfp_module_eeprom(struct bnx2x_phy *phy, · 7613 unmodified lines | ||
| 7659 | 7660 | return -EINVAL; |
| 7660 | 7661 | } |
| 7661 | 7662 | |
| 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 | +} | |
| 7662 | 7685 | static int bnx2x_warpcore_read_sfp_module_eeprom(struct bnx2x_phy *phy, |
| 7663 | 7686 | struct link_params *params, |
| 7664 | 7687 | u16 addr, u8 byte_cnt, |
| @@ -7678,6 +7701,12 @@ static int bnx2x_warpcore_read_sfp_module_eeprom(struct bnx2x_phy *phy, · 13 unmodified lines | ||
| 7678 | 7701 | /* 4 byte aligned address */ |
| 7679 | 7702 | addr32 = addr & (~0x3); |
| 7680 | 7703 | 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 | + } | |
| 7681 | 7710 | rc = bnx2x_bsc_read(params, phy, 0xa0, addr32, 0, byte_cnt, |
| 7682 | 7711 | data_array); |
| 7683 | 7712 | } 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 | ||
| 8200 | 8229 | bnx2x_set_e1e2_module_fault_led(params, gpio_mode); |
| 8201 | 8230 | } |
| 8202 | 8231 | |
| 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 | − | |
| 8226 | 8232 | static void bnx2x_warpcore_hw_reset(struct bnx2x_phy *phy, |
| 8227 | 8233 | struct link_params *params) |
| 8228 | 8234 | { |
| @@ -9748,7 +9754,7 @@ static int bnx2x_848x3_config_init(struct bnx2x_phy *phy, · 1519 unmodified lines | ||
| 9748 | 9754 | |
| 9749 | 9755 | msleep(1); |
| 9750 | 9756 | |
| 9751 | − if (!(CHIP_IS_E1(bp))) | |
| 9757 | + if (!(CHIP_IS_E1x(bp))) | |
| 9752 | 9758 | port = BP_PATH(bp); |
| 9753 | 9759 | else |
| 9754 | 9760 | port = params->port; |
| @@ -122,15 +122,15 @@ static int be_mcc_compl_process(struct be_adapter *adapter, · 121 unmodified lines | ||
| 122 | 122 | goto done; |
| 123 | 123 | |
| 124 | 124 | 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); | |
| 128 | 128 | } else { |
| 129 | 129 | extd_status = (compl->status >> CQE_STATUS_EXTD_SHIFT) & |
| 130 | 130 | 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); | |
| 134 | 134 | } |
| 135 | 135 | } |
| 136 | 136 | done: |
| @@ -1566,7 +1566,7 @@ struct be_hw_stats_v1 { · 1565 unmodified lines | ||
| 1566 | 1566 | u32 rsvd0[BE_TXP_SW_SZ]; |
| 1567 | 1567 | struct be_erx_stats_v1 erx; |
| 1568 | 1568 | struct be_pmem_stats pmem; |
| 1569 | − u32 rsvd1[3]; | |
| 1569 | + u32 rsvd1[18]; | |
| 1570 | 1570 | }; |
| 1571 | 1571 | |
| 1572 | 1572 | struct be_cmd_req_get_stats_v1 { |
| @@ -3237,7 +3237,7 @@ static void be_netdev_init(struct net_device *netdev) · 3236 unmodified lines | ||
| 3237 | 3237 | |
| 3238 | 3238 | netdev->flags |= IFF_MULTICAST; |
| 3239 | 3239 | |
| 3240 | − netif_set_gso_max_size(netdev, 65535); | |
| 3240 | + netif_set_gso_max_size(netdev, 65535 - ETH_HLEN); | |
| 3241 | 3241 | |
| 3242 | 3242 | netdev->netdev_ops = &be_netdev_ops; |
| 3243 | 3243 | |
| @@ -122,8 +122,10 @@ config IGB_DCA · 121 unmodified lines | ||
| 122 | 122 | |
| 123 | 123 | config IGB_PTP |
| 124 | 124 | 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 | |
| 127 | 129 | ---help--- |
| 128 | 130 | Say Y here if you want to use PTP Hardware Clock (PHC) in the |
| 129 | 131 | driver. Only the basic clock operations have been implemented. |
| @@ -223,7 +225,9 @@ config IXGBE_DCB · 93 unmodified lines | ||
| 223 | 225 | config IXGBE_PTP |
| 224 | 226 | bool "PTP Clock Support" |
| 225 | 227 | default n |
| 226 | − depends on IXGBE && PTP_1588_CLOCK | |
| 228 | + depends on IXGBE && EXPERIMENTAL | |
| 229 | + select PPS | |
| 230 | + select PTP_1588_CLOCK | |
| 227 | 231 | ---help--- |
| 228 | 232 | Say Y here if you want support for 1588 Timestamping with a |
| 229 | 233 | PHC device, using the PTP 1588 Clock support. This is |
| @@ -206,8 +206,6 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw) · 205 unmodified lines | ||
| 206 | 206 | mac->rar_entry_count = E1000_RAR_ENTRIES_82580; |
| 207 | 207 | break; |
| 208 | 208 | case e1000_i350: |
| 209 | − case e1000_i210: | |
| 210 | − case e1000_i211: | |
| 211 | 209 | mac->rar_entry_count = E1000_RAR_ENTRIES_I350; |
| 212 | 210 | break; |
| 213 | 211 | default: |
| @@ -196,7 +196,7 @@ enum ixgbe_ring_state_t { · 195 unmodified lines | ||
| 196 | 196 | __IXGBE_HANG_CHECK_ARMED, |
| 197 | 197 | __IXGBE_RX_RSC_ENABLED, |
| 198 | 198 | __IXGBE_RX_CSUM_UDP_ZERO_ERR, |
| 199 | − __IXGBE_RX_FCOE_BUFSZ, | |
| 199 | + __IXGBE_RX_FCOE, | |
| 200 | 200 | }; |
| 201 | 201 | |
| 202 | 202 | #define check_for_tx_hang(ring) \ |
| @@ -290,7 +290,7 @@ struct ixgbe_ring_feature { · 87 unmodified lines | ||
| 290 | 290 | #if defined(IXGBE_FCOE) && (PAGE_SIZE < 8192) |
| 291 | 291 | static inline unsigned int ixgbe_rx_pg_order(struct ixgbe_ring *ring) |
| 292 | 292 | { |
| 293 | − return test_bit(__IXGBE_RX_FCOE_BUFSZ, &ring->state) ? 1 : 0; | |
| 293 | + return test_bit(__IXGBE_RX_FCOE, &ring->state) ? 1 : 0; | |
| 294 | 294 | } |
| 295 | 295 | #else |
| 296 | 296 | #define ixgbe_rx_pg_order(_ring) 0 |
| @@ -634,7 +634,7 @@ static int ixgbe_alloc_q_vector(struct ixgbe_adapter *adapter, · 633 unmodified lines | ||
| 634 | 634 | f = &adapter->ring_feature[RING_F_FCOE]; |
| 635 | 635 | if ((rxr_idx >= f->mask) && |
| 636 | 636 | (rxr_idx < f->mask + f->indices)) |
| 637 | − set_bit(__IXGBE_RX_FCOE_BUFSZ, &ring->state); | |
| 637 | + set_bit(__IXGBE_RX_FCOE, &ring->state); | |
| 638 | 638 | } |
| 639 | 639 | |
| 640 | 640 | #endif /* IXGBE_FCOE */ |
| @@ -1058,17 +1058,17 @@ static inline void ixgbe_rx_hash(struct ixgbe_ring *ring, · 1057 unmodified lines | ||
| 1058 | 1058 | #ifdef IXGBE_FCOE |
| 1059 | 1059 | /** |
| 1060 | 1060 | * 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 | |
| 1062 | 1062 | * @rx_desc: advanced rx descriptor |
| 1063 | 1063 | * |
| 1064 | 1064 | * Returns : true if it is FCoE pkt |
| 1065 | 1065 | */ |
| 1066 | −static inline bool ixgbe_rx_is_fcoe(struct ixgbe_adapter *adapter, | |
| 1066 | +static inline bool ixgbe_rx_is_fcoe(struct ixgbe_ring *ring, | |
| 1067 | 1067 | union ixgbe_adv_rx_desc *rx_desc) |
| 1068 | 1068 | { |
| 1069 | 1069 | __le16 pkt_info = rx_desc->wb.lower.lo_dword.hs_rss.pkt_info; |
| 1070 | 1070 | |
| 1071 | − return (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) && | |
| 1071 | + return test_bit(__IXGBE_RX_FCOE, &ring->state) && | |
| 1072 | 1072 | ((pkt_info & cpu_to_le16(IXGBE_RXDADV_PKTTYPE_ETQF_MASK)) == |
| 1073 | 1073 | (cpu_to_le16(IXGBE_ETQF_FILTER_FCOE << |
| 1074 | 1074 | IXGBE_RXDADV_PKTTYPE_ETQF_SHIFT))); |
| @@ -1148,7 +1148,7 @@ static bool ixgbe_alloc_mapped_page(struct ixgbe_ring *rx_ring, · 73 unmodified lines | ||
| 1148 | 1148 | |
| 1149 | 1149 | /* alloc new page for storage */ |
| 1150 | 1150 | if (likely(!page)) { |
| 1151 | − page = alloc_pages(GFP_ATOMIC | __GFP_COLD, | |
| 1151 | + page = alloc_pages(GFP_ATOMIC | __GFP_COLD | __GFP_COMP, | |
| 1152 | 1152 | ixgbe_rx_pg_order(rx_ring)); |
| 1153 | 1153 | if (unlikely(!page)) { |
| 1154 | 1154 | 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 | ||
| 1549 | 1549 | skb->truesize -= ixgbe_rx_bufsz(rx_ring); |
| 1550 | 1550 | } |
| 1551 | 1551 | |
| 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 | |
| 1552 | 1558 | /* if skb_pad returns an error the skb was freed */ |
| 1553 | 1559 | if (unlikely(skb->len < 60)) { |
| 1554 | 1560 | 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 | ||
| 1775 | 1781 | |
| 1776 | 1782 | #ifdef IXGBE_FCOE |
| 1777 | 1783 | /* 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)) { | |
| 1779 | 1785 | ddp_bytes = ixgbe_fcoe_ddp(adapter, rx_desc, skb); |
| 1780 | 1786 | if (!ddp_bytes) { |
| 1781 | 1787 | dev_kfree_skb_any(skb); |
| @@ -708,6 +708,7 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter) · 707 unmodified lines | ||
| 708 | 708 | { |
| 709 | 709 | struct ixgbe_hw *hw = &adapter->hw; |
| 710 | 710 | u32 incval = 0; |
| 711 | + u32 timinca = 0; | |
| 711 | 712 | u32 shift = 0; |
| 712 | 713 | u32 cycle_speed; |
| 713 | 714 | unsigned long flags; |
| @@ -730,8 +731,16 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter) · 16 unmodified lines | ||
| 730 | 731 | break; |
| 731 | 732 | } |
| 732 | 733 | |
| 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) | |
| 735 | 744 | return; |
| 736 | 745 | |
| 737 | 746 | /* disable the SDP clock out */ |
| @@ -929,15 +929,20 @@ void mlx4_en_free_resources(struct mlx4_en_priv *priv) · 928 unmodified lines | ||
| 929 | 929 | if (priv->rx_cq[i].buf) |
| 930 | 930 | mlx4_en_destroy_cq(priv, &priv->rx_cq[i]); |
| 931 | 931 | } |
| 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 | + } | |
| 932 | 937 | } |
| 933 | 938 | |
| 934 | 939 | int mlx4_en_alloc_resources(struct mlx4_en_priv *priv) |
| 935 | 940 | { |
| 936 | 941 | struct mlx4_en_port_profile *prof = priv->prof; |
| 937 | 942 | int i; |
| 938 | − int base_tx_qpn, err; | |
| 943 | + int err; | |
| 939 | 944 | |
| 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); | |
| 941 | 946 | if (err) { |
| 942 | 947 | en_err(priv, "failed reserving range for TX rings\n"); |
| 943 | 948 | return err; |
| @@ -949,7 +954,7 @@ int mlx4_en_alloc_resources(struct mlx4_en_priv *priv) · 5 unmodified lines | ||
| 949 | 954 | prof->tx_ring_size, i, TX)) |
| 950 | 955 | goto err; |
| 951 | 956 | |
| 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, | |
| 953 | 958 | prof->tx_ring_size, TXBB_SIZE)) |
| 954 | 959 | goto err; |
| 955 | 960 | } |
| @@ -969,7 +974,6 @@ int mlx4_en_alloc_resources(struct mlx4_en_priv *priv) · 13 unmodified lines | ||
| 969 | 974 | |
| 970 | 975 | err: |
| 971 | 976 | en_err(priv, "Failed to allocate NIC resources\n"); |
| 972 | − mlx4_qp_release_range(priv->mdev->dev, base_tx_qpn, priv->tx_ring_num); | |
| 973 | 977 | return -ENOMEM; |
| 974 | 978 | } |
| 975 | 979 | |
| @@ -1204,9 +1208,11 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, · 228 unmodified lines | ||
| 1204 | 1208 | en_warn(priv, "Using %d RX rings\n", prof->rx_ring_num); |
| 1205 | 1209 | |
| 1206 | 1210 | /* Configure port */ |
| 1211 | + mlx4_en_calc_rx_buf(dev); | |
| 1207 | 1212 | 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); | |
| 1210 | 1216 | if (err) { |
| 1211 | 1217 | en_err(priv, "Failed setting port general configurations " |
| 1212 | 1218 | "for port %d, with error %d\n", priv->port, err); |
| @@ -1975,6 +1975,8 @@ slave_start: · 1974 unmodified lines | ||
| 1975 | 1975 | if (err == -EBUSY && (dev->flags & MLX4_FLAG_MSI_X) && |
| 1976 | 1976 | !mlx4_is_mfunc(dev)) { |
| 1977 | 1977 | dev->flags &= ~MLX4_FLAG_MSI_X; |
| 1978 | + dev->caps.num_comp_vectors = 1; | |
| 1979 | + dev->caps.comp_pool = 0; | |
| 1978 | 1980 | pci_disable_msix(pdev); |
| 1979 | 1981 | err = mlx4_setup_hca(dev); |
| 1980 | 1982 | } |
| @@ -495,6 +495,7 @@ struct mlx4_en_priv { · 494 unmodified lines | ||
| 495 | 495 | int vids[128]; |
| 496 | 496 | bool wol; |
| 497 | 497 | struct device *ddev; |
| 498 | + int base_tx_qpn; | |
| 498 | 499 | |
| 499 | 500 | #ifdef CONFIG_MLX4_EN_DCB |
| 500 | 501 | struct ieee_ets ets; |
| @@ -479,7 +479,7 @@ qlcnic_init_pci_info(struct qlcnic_adapter *adapter) · 478 unmodified lines | ||
| 479 | 479 | |
| 480 | 480 | for (i = 0; i < QLCNIC_MAX_PCI_FUNC; i++) { |
| 481 | 481 | pfn = pci_info[i].id; |
| 482 | − if (pfn > QLCNIC_MAX_PCI_FUNC) { | |
| 482 | + if (pfn >= QLCNIC_MAX_PCI_FUNC) { | |
| 483 | 483 | ret = QL_STATUS_INVALID_PARAM; |
| 484 | 484 | goto err_eswitch; |
| 485 | 485 | } |
| @@ -3894,6 +3894,7 @@ static void rtl_init_rxcfg(struct rtl8169_private *tp) · 3893 unmodified lines | ||
| 3894 | 3894 | case RTL_GIGA_MAC_VER_22: |
| 3895 | 3895 | case RTL_GIGA_MAC_VER_23: |
| 3896 | 3896 | case RTL_GIGA_MAC_VER_24: |
| 3897 | + case RTL_GIGA_MAC_VER_34: | |
| 3897 | 3898 | RTL_W32(RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST); |
| 3898 | 3899 | break; |
| 3899 | 3900 | default: |
| @@ -1011,7 +1011,7 @@ static int sh_eth_txfree(struct net_device *ndev) · 1010 unmodified lines | ||
| 1011 | 1011 | } |
| 1012 | 1012 | |
| 1013 | 1013 | /* 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) | |
| 1015 | 1015 | { |
| 1016 | 1016 | struct sh_eth_private *mdp = netdev_priv(ndev); |
| 1017 | 1017 | struct sh_eth_rxdesc *rxdesc; |
| @@ -1102,9 +1102,11 @@ static int sh_eth_rx(struct net_device *ndev) · 84 unmodified lines | ||
| 1102 | 1102 | /* Restart Rx engine if stopped. */ |
| 1103 | 1103 | /* If we don't need to check status, don't. -KDU */ |
| 1104 | 1104 | 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; | |
| 1108 | 1110 | sh_eth_write(ndev, EDRRR_R, EDRRR); |
| 1109 | 1111 | } |
| 1110 | 1112 | |
| @@ -1273,7 +1275,7 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev) · 162 unmodified lines | ||
| 1273 | 1275 | EESR_RTSF | /* short frame recv */ |
| 1274 | 1276 | EESR_PRE | /* PHY-LSI recv error */ |
| 1275 | 1277 | EESR_CERF)){ /* recv frame CRC error */ |
| 1276 | − sh_eth_rx(ndev); | |
| 1278 | + sh_eth_rx(ndev, intr_status); | |
| 1277 | 1279 | } |
| 1278 | 1280 | |
| 1279 | 1281 | /* Tx Check */ |
| @@ -161,7 +161,7 @@ static struct phy_driver ks8051_driver = { · 160 unmodified lines | ||
| 161 | 161 | static struct phy_driver ks8001_driver = { |
| 162 | 162 | .phy_id = PHY_ID_KS8001, |
| 163 | 163 | .name = "Micrel KS8001 or KS8721", |
| 164 | − .phy_id_mask = 0x00fffff0, | |
| 164 | + .phy_id_mask = 0x00ffffff, | |
| 165 | 165 | .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause), |
| 166 | 166 | .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT, |
| 167 | 167 | .config_init = kszphy_config_init, |
| @@ -174,7 +174,7 @@ static struct phy_driver ks8001_driver = { · 6 unmodified lines | ||
| 174 | 174 | |
| 175 | 175 | static struct phy_driver ksz9021_driver = { |
| 176 | 176 | .phy_id = PHY_ID_KSZ9021, |
| 177 | − .phy_id_mask = 0x000fff10, | |
| 177 | + .phy_id_mask = 0x000ffffe, | |
| 178 | 178 | .name = "Micrel KSZ9021 Gigabit PHY", |
| 179 | 179 | .features = (PHY_GBIT_FEATURES | SUPPORTED_Pause |
| 180 | 180 | | SUPPORTED_Asym_Pause), |
| @@ -240,8 +240,8 @@ MODULE_AUTHOR("David J. Choi"); · 59 unmodified lines | ||
| 240 | 240 | MODULE_LICENSE("GPL"); |
| 241 | 241 | |
| 242 | 242 | 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 }, | |
| 245 | 245 | { PHY_ID_KS8737, 0x00fffff0 }, |
| 246 | 246 | { PHY_ID_KS8041, 0x00fffff0 }, |
| 247 | 247 | { PHY_ID_KS8051, 0x00fffff0 }, |
| @@ -59,6 +59,7 @@ · 58 unmodified lines | ||
| 59 | 59 | #define USB_PRODUCT_IPHONE_3G 0x1292 |
| 60 | 60 | #define USB_PRODUCT_IPHONE_3GS 0x1294 |
| 61 | 61 | #define USB_PRODUCT_IPHONE_4 0x1297 |
| 62 | +#define USB_PRODUCT_IPAD 0x129a | |
| 62 | 63 | #define USB_PRODUCT_IPHONE_4_VZW 0x129c |
| 63 | 64 | #define USB_PRODUCT_IPHONE_4S 0x12a0 |
| 64 | 65 | |
| @@ -100,6 +101,10 @@ static struct usb_device_id ipheth_table[] = { · 35 unmodified lines | ||
| 100 | 101 | USB_VENDOR_APPLE, USB_PRODUCT_IPHONE_4, |
| 101 | 102 | IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS, |
| 102 | 103 | 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) }, | |
| 103 | 108 | { USB_DEVICE_AND_INTERFACE_INFO( |
| 104 | 109 | USB_VENDOR_APPLE, USB_PRODUCT_IPHONE_4_VZW, |
| 105 | 110 | IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS, |
| @@ -257,29 +257,6 @@ err: · 256 unmodified lines | ||
| 257 | 257 | return rv; |
| 258 | 258 | } |
| 259 | 259 | |
| 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 | − | |
| 283 | 260 | static void qmi_wwan_unbind_shared(struct usbnet *dev, struct usb_interface *intf) |
| 284 | 261 | { |
| 285 | 262 | struct usb_driver *subdriver = (void *)dev->data[0]; |
| @@ -347,15 +324,15 @@ static const struct driver_info qmi_wwan_shared = { · 61 unmodified lines | ||
| 347 | 324 | .manage_power = qmi_wwan_manage_power, |
| 348 | 325 | }; |
| 349 | 326 | |
| 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", | |
| 352 | 329 | .flags = FLAG_WWAN, |
| 353 | − .bind = qmi_wwan_bind_gobi, | |
| 330 | + .bind = qmi_wwan_bind_shared, | |
| 354 | 331 | .unbind = qmi_wwan_unbind_shared, |
| 355 | 332 | .manage_power = qmi_wwan_manage_power, |
| 333 | + .data = BIT(0), /* interface whitelist bitmap */ | |
| 356 | 334 | }; |
| 357 | 335 | |
| 358 | −/* ZTE suck at making USB descriptors */ | |
| 359 | 336 | static const struct driver_info qmi_wwan_force_int1 = { |
| 360 | 337 | .description = "Qualcomm WWAN/QMI device", |
| 361 | 338 | .flags = FLAG_WWAN, |
| @@ -365,6 +342,15 @@ static const struct driver_info qmi_wwan_force_int1 = { · 3 unmodified lines | ||
| 365 | 342 | .data = BIT(1), /* interface whitelist bitmap */ |
| 366 | 343 | }; |
| 367 | 344 | |
| 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 | + | |
| 368 | 354 | static const struct driver_info qmi_wwan_force_int4 = { |
| 369 | 355 | .description = "Qualcomm WWAN/QMI device", |
| 370 | 356 | .flags = FLAG_WWAN, |
| @@ -390,16 +376,23 @@ static const struct driver_info qmi_wwan_force_int4 = { · 19 unmodified lines | ||
| 390 | 376 | static const struct driver_info qmi_wwan_sierra = { |
| 391 | 377 | .description = "Sierra Wireless wwan/QMI device", |
| 392 | 378 | .flags = FLAG_WWAN, |
| 393 | − .bind = qmi_wwan_bind_gobi, | |
| 379 | + .bind = qmi_wwan_bind_shared, | |
| 394 | 380 | .unbind = qmi_wwan_unbind_shared, |
| 395 | 381 | .manage_power = qmi_wwan_manage_power, |
| 396 | 382 | .data = BIT(8) | BIT(19), /* interface whitelist bitmap */ |
| 397 | 383 | }; |
| 398 | 384 | |
| 399 | 385 | #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 */ | |
| 400 | 393 | #define QMI_GOBI_DEVICE(vend, prod) \ |
| 401 | 394 | USB_DEVICE(vend, prod), \ |
| 402 | − .driver_info = (unsigned long)&qmi_wwan_gobi | |
| 395 | + .driver_info = (unsigned long)&qmi_wwan_force_int0 | |
| 403 | 396 | |
| 404 | 397 | static const struct usb_device_id products[] = { |
| 405 | 398 | { /* 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 | ||
| 510 | 503 | .bInterfaceProtocol = 0xff, |
| 511 | 504 | .driver_info = (unsigned long)&qmi_wwan_sierra, |
| 512 | 505 | }, |
| 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 */ | |
| 527 | 524 | {QMI_GOBI_DEVICE(0x413c, 0x8186)}, /* Dell Gobi 2000 Modem device (N0218, VU936) */ |
| 528 | 525 | {QMI_GOBI_DEVICE(0x05c6, 0x920b)}, /* Generic Gobi 2000 Modem device */ |
| 529 | 526 | {QMI_GOBI_DEVICE(0x05c6, 0x9225)}, /* Sony Gobi 2000 Modem device (N0279, VU730) */ |
| @@ -796,11 +796,13 @@ int usbnet_open (struct net_device *net) · 795 unmodified lines | ||
| 796 | 796 | if (info->manage_power) { |
| 797 | 797 | retval = info->manage_power(dev, 1); |
| 798 | 798 | if (retval < 0) |
| 799 | − goto done; | |
| 799 | + goto done_manage_power_error; | |
| 800 | 800 | usb_autopm_put_interface(dev->intf); |
| 801 | 801 | } |
| 802 | 802 | return retval; |
| 803 | 803 | |
| 804 | +done_manage_power_error: | |
| 805 | + clear_bit(EVENT_DEV_OPEN, &dev->flags); | |
| 804 | 806 | done: |
| 805 | 807 | usb_autopm_put_interface(dev->intf); |
| 806 | 808 | done_nopm: |
| @@ -876,9 +878,9 @@ void usbnet_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info) · 69 unmodified lines | ||
| 876 | 878 | { |
| 877 | 879 | struct usbnet *dev = netdev_priv(net); |
| 878 | 880 | |
| 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, | |
| 882 | 884 | sizeof info->fw_version); |
| 883 | 885 | usb_make_path (dev->udev, info->bus_info, sizeof info->bus_info); |
| 884 | 886 | } |
| @@ -1202,6 +1204,21 @@ deferred: · 317 unmodified lines | ||
| 1202 | 1204 | } |
| 1203 | 1205 | EXPORT_SYMBOL_GPL(usbnet_start_xmit); |
| 1204 | 1206 | |
| 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 | + | |
| 1205 | 1222 | /*-------------------------------------------------------------------------*/ |
| 1206 | 1223 | |
| 1207 | 1224 | // tasklet (work deferred from completions, in_irq) or timer |
| @@ -1241,26 +1258,14 @@ static void usbnet_bh (unsigned long param) · 33 unmodified lines | ||
| 1241 | 1258 | !timer_pending (&dev->delay) && |
| 1242 | 1259 | !test_bit (EVENT_RX_HALT, &dev->flags)) { |
| 1243 | 1260 | 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); | |
| 1259 | 1264 | if (temp != dev->rxq.qlen) |
| 1260 | 1265 | netif_dbg(dev, link, dev->net, |
| 1261 | 1266 | "rxqlen %d --> %d\n", |
| 1262 | 1267 | temp, dev->rxq.qlen); |
| 1263 | − if (dev->rxq.qlen < qlen) | |
| 1268 | + if (dev->rxq.qlen < RX_QLEN(dev)) | |
| 1264 | 1269 | tasklet_schedule (&dev->bh); |
| 1265 | 1270 | } |
| 1266 | 1271 | 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 | ||
| 1513 | 1518 | spin_lock_irq(&dev->txq.lock); |
| 1514 | 1519 | /* don't autosuspend while transmitting */ |
| 1515 | 1520 | if (dev->txq.qlen && PMSG_IS_AUTO(message)) { |
| 1521 | + dev->suspend_count--; | |
| 1516 | 1522 | spin_unlock_irq(&dev->txq.lock); |
| 1517 | 1523 | return -EBUSY; |
| 1518 | 1524 | } else { |
| @@ -1569,6 +1575,13 @@ int usbnet_resume (struct usb_interface *intf) · 50 unmodified lines | ||
| 1569 | 1575 | spin_unlock_irq(&dev->txq.lock); |
| 1570 | 1576 | |
| 1571 | 1577 | 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 | + | |
| 1572 | 1585 | if (!(dev->txq.qlen >= TX_QLEN(dev))) |
| 1573 | 1586 | netif_tx_wake_all_queues(dev->net); |
| 1574 | 1587 | tasklet_schedule (&dev->bh); |
| @@ -7233,8 +7233,8 @@ static int airo_get_aplist(struct net_device *dev, · 7232 unmodified lines | ||
| 7233 | 7233 | } |
| 7234 | 7234 | } else { |
| 7235 | 7235 | 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); | |
| 7238 | 7238 | } |
| 7239 | 7239 | dwrq->length = i; |
| 7240 | 7240 | |
| @@ -1045,11 +1045,11 @@ ath5k_drain_tx_buffs(struct ath5k_hw *ah) · 1044 unmodified lines | ||
| 1045 | 1045 | |
| 1046 | 1046 | ath5k_txbuf_free_skb(ah, bf); |
| 1047 | 1047 | |
| 1048 | − spin_lock_bh(&ah->txbuflock); | |
| 1048 | + spin_lock(&ah->txbuflock); | |
| 1049 | 1049 | list_move_tail(&bf->list, &ah->txbuf); |
| 1050 | 1050 | ah->txbuf_len++; |
| 1051 | 1051 | txq->txq_len--; |
| 1052 | − spin_unlock_bh(&ah->txbuflock); | |
| 1052 | + spin_unlock(&ah->txbuflock); | |
| 1053 | 1053 | } |
| 1054 | 1054 | txq->link = NULL; |
| 1055 | 1055 | txq->txq_poll_mark = false; |
| @@ -214,6 +214,7 @@ struct ath_frame_info { · 213 unmodified lines | ||
| 214 | 214 | enum ath9k_key_type keytype; |
| 215 | 215 | u8 keyix; |
| 216 | 216 | u8 retries; |
| 217 | + u8 rtscts_rate; | |
| 217 | 218 | }; |
| 218 | 219 | |
| 219 | 220 | struct ath_buf_state { |
| @@ -1496,6 +1496,7 @@ static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw, · 1495 unmodified lines | ||
| 1496 | 1496 | priv->num_sta_assoc_vif++ : priv->num_sta_assoc_vif--; |
| 1497 | 1497 | |
| 1498 | 1498 | if (priv->ah->opmode == NL80211_IFTYPE_STATION) { |
| 1499 | + ath9k_htc_choose_set_bssid(priv); | |
| 1499 | 1500 | if (bss_conf->assoc && (priv->num_sta_assoc_vif == 1)) |
| 1500 | 1501 | ath9k_htc_start_ani(priv); |
| 1501 | 1502 | 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 | ||
| 1503 | 1504 | } |
| 1504 | 1505 | } |
| 1505 | 1506 | |
| 1506 | − if (changed & BSS_CHANGED_BSSID) { | |
| 1507 | + if (changed & BSS_CHANGED_IBSS) { | |
| 1507 | 1508 | if (priv->ah->opmode == NL80211_IFTYPE_ADHOC) { |
| 1508 | 1509 | common->curaid = bss_conf->aid; |
| 1509 | 1510 | memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN); |
| 1510 | 1511 | ath9k_htc_set_bssid(priv); |
| 1511 | − } else if (priv->ah->opmode == NL80211_IFTYPE_STATION) { | |
| 1512 | − ath9k_htc_choose_set_bssid(priv); | |
| 1513 | 1512 | } |
| 1514 | 1513 | } |
| 1515 | 1514 | |
| @@ -784,13 +784,25 @@ static void ath9k_hw_init_qos(struct ath_hw *ah) · 783 unmodified lines | ||
| 784 | 784 | |
| 785 | 785 | u32 ar9003_get_pll_sqsum_dvc(struct ath_hw *ah) |
| 786 | 786 | { |
| 787 | + struct ath_common *common = ath9k_hw_common(ah); | |
| 788 | + int i = 0; | |
| 789 | + | |
| 787 | 790 | REG_CLR_BIT(ah, PLL3, PLL3_DO_MEAS_MASK); |
| 788 | 791 | udelay(100); |
| 789 | 792 | REG_SET_BIT(ah, PLL3, PLL3_DO_MEAS_MASK); |
| 790 | 793 | |
| 791 | − while ((REG_READ(ah, PLL4) & PLL4_MEAS_DONE) == 0) | |
| 794 | + while ((REG_READ(ah, PLL4) & PLL4_MEAS_DONE) == 0) { | |
| 795 | + | |
| 792 | 796 | udelay(100); |
| 793 | 797 | |
| 798 | + if (WARN_ON_ONCE(i >= 100)) { | |
| 799 | + ath_err(common, "PLL4 meaurement not done\n"); | |
| 800 | + break; | |
| 801 | + } | |
| 802 | + | |
| 803 | + i++; | |
| 804 | + } | |
| 805 | + | |
| 794 | 806 | return (REG_READ(ah, PLL3) & SQSUM_DVC_MASK) >> 3; |
| 795 | 807 | } |
| 796 | 808 | EXPORT_SYMBOL(ar9003_get_pll_sqsum_dvc); |
| @@ -971,6 +971,15 @@ void ath_hw_pll_work(struct work_struct *work) · 970 unmodified lines | ||
| 971 | 971 | hw_pll_work.work); |
| 972 | 972 | u32 pll_sqsum; |
| 973 | 973 | |
| 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 | + | |
| 974 | 983 | if (AR_SREV_9485(sc->sc_ah)) { |
| 975 | 984 | |
| 976 | 985 | ath9k_ps_wakeup(sc); |
| @@ -1443,15 +1452,6 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, · 466 unmodified lines | ||
| 1443 | 1452 | } |
| 1444 | 1453 | } |
| 1445 | 1454 | |
| 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 | − | |
| 1455 | 1455 | ath_dbg(common, CONFIG, "Attach a VIF of type: %d\n", vif->type); |
| 1456 | 1456 | |
| 1457 | 1457 | sc->nvifs++; |
| @@ -1476,15 +1476,6 @@ static int ath9k_change_interface(struct ieee80211_hw *hw, · 18 unmodified lines | ||
| 1476 | 1476 | mutex_lock(&sc->mutex); |
| 1477 | 1477 | ath9k_ps_wakeup(sc); |
| 1478 | 1478 | |
| 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 | − | |
| 1488 | 1479 | if (ath9k_uses_beacons(new_type) && |
| 1489 | 1480 | !ath9k_uses_beacons(vif->type)) { |
| 1490 | 1481 | if (sc->nbcnvifs >= ATH_BCBUF) { |
| @@ -938,6 +938,7 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf, · 937 unmodified lines | ||
| 938 | 938 | struct ieee80211_tx_rate *rates; |
| 939 | 939 | const struct ieee80211_rate *rate; |
| 940 | 940 | struct ieee80211_hdr *hdr; |
| 941 | + struct ath_frame_info *fi = get_frame_info(bf->bf_mpdu); | |
| 941 | 942 | int i; |
| 942 | 943 | u8 rix = 0; |
| 943 | 944 | |
| @@ -948,18 +949,7 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf, · 4 unmodified lines | ||
| 948 | 949 | |
| 949 | 950 | /* set dur_update_en for l-sig computation except for PS-Poll frames */ |
| 950 | 951 | 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; | |
| 963 | 953 | |
| 964 | 954 | for (i = 0; i < 4; i++) { |
| 965 | 955 | 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 | ||
| 1001 | 991 | } |
| 1002 | 992 | |
| 1003 | 993 | /* legacy rates */ |
| 994 | + rate = &sc->sbands[tx_info->band].bitrates[rates[i].idx]; | |
| 1004 | 995 | if ((tx_info->band == IEEE80211_BAND_2GHZ) && |
| 1005 | 996 | !(rate->flags & IEEE80211_RATE_ERP_G)) |
| 1006 | 997 | phy = WLAN_RC_PHY_CCK; |
| 1007 | 998 | else |
| 1008 | 999 | phy = WLAN_RC_PHY_OFDM; |
| 1009 | 1000 | |
| 1010 | − rate = &sc->sbands[tx_info->band].bitrates[rates[i].idx]; | |
| 1011 | 1001 | info->rates[i].Rate = rate->hw_value; |
| 1012 | 1002 | if (rate->hw_value_short) { |
| 1013 | 1003 | 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 | ||
| 1776 | 1766 | struct ieee80211_sta *sta = tx_info->control.sta; |
| 1777 | 1767 | struct ieee80211_key_conf *hw_key = tx_info->control.hw_key; |
| 1778 | 1768 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; |
| 1769 | + const struct ieee80211_rate *rate; | |
| 1779 | 1770 | struct ath_frame_info *fi = get_frame_info(skb); |
| 1780 | 1771 | struct ath_node *an = NULL; |
| 1781 | 1772 | 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; | |
| 1782 | 1783 | |
| 1784 | + rate = ieee80211_get_rts_cts_rate(hw, tx_info); | |
| 1783 | 1785 | keytype = ath9k_cmn_get_hw_crypto_keytype(skb); |
| 1784 | 1786 | |
| 1785 | 1787 | if (sta) |
| @@ -1794,6 +1796,9 @@ static void setup_frame_info(struct ieee80211_hw *hw, struct sk_buff *skb, · 8 unmodified lines | ||
| 1794 | 1796 | fi->keyix = ATH9K_TXKEYIX_INVALID; |
| 1795 | 1797 | fi->keytype = keytype; |
| 1796 | 1798 | fi->framelen = framelen; |
| 1799 | + fi->rtscts_rate = rate->hw_value; | |
| 1800 | + if (short_preamble) | |
| 1801 | + fi->rtscts_rate |= rate->hw_value_short; | |
| 1797 | 1802 | } |
| 1798 | 1803 | |
| 1799 | 1804 | u8 ath_txchainmask_reduction(struct ath_softc *sc, u8 chainmask, u32 rate) |
| @@ -2239,6 +2239,7 @@ static ssize_t iwl_dbgfs_echo_test_write(struct file *file, · 2238 unmodified lines | ||
| 2239 | 2239 | return count; |
| 2240 | 2240 | } |
| 2241 | 2241 | |
| 2242 | +#ifdef CONFIG_IWLWIFI_DEBUG | |
| 2242 | 2243 | static ssize_t iwl_dbgfs_log_event_read(struct file *file, |
| 2243 | 2244 | char __user *user_buf, |
| 2244 | 2245 | size_t count, loff_t *ppos) |
| @@ -2276,6 +2277,7 @@ static ssize_t iwl_dbgfs_log_event_write(struct file *file, · 31 unmodified lines | ||
| 2276 | 2277 | |
| 2277 | 2278 | return count; |
| 2278 | 2279 | } |
| 2280 | +#endif | |
| 2279 | 2281 | |
| 2280 | 2282 | static ssize_t iwl_dbgfs_calib_disabled_read(struct file *file, |
| 2281 | 2283 | char __user *user_buf, |
| @@ -2345,7 +2347,9 @@ DEBUGFS_READ_FILE_OPS(bt_traffic); · 63 unmodified lines | ||
| 2345 | 2347 | DEBUGFS_READ_WRITE_FILE_OPS(protection_mode); |
| 2346 | 2348 | DEBUGFS_READ_FILE_OPS(reply_tx_error); |
| 2347 | 2349 | DEBUGFS_WRITE_FILE_OPS(echo_test); |
| 2350 | +#ifdef CONFIG_IWLWIFI_DEBUG | |
| 2348 | 2351 | DEBUGFS_READ_WRITE_FILE_OPS(log_event); |
| 2352 | +#endif | |
| 2349 | 2353 | DEBUGFS_READ_WRITE_FILE_OPS(calib_disabled); |
| 2350 | 2354 | |
| 2351 | 2355 | /* |
| @@ -2405,7 +2409,9 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name) · 53 unmodified lines | ||
| 2405 | 2409 | DEBUGFS_ADD_FILE(rxon_flags, dir_debug, S_IWUSR); |
| 2406 | 2410 | DEBUGFS_ADD_FILE(rxon_filter_flags, dir_debug, S_IWUSR); |
| 2407 | 2411 | DEBUGFS_ADD_FILE(echo_test, dir_debug, S_IWUSR); |
| 2412 | +#ifdef CONFIG_IWLWIFI_DEBUG | |
| 2408 | 2413 | DEBUGFS_ADD_FILE(log_event, dir_debug, S_IWUSR | S_IRUSR); |
| 2414 | +#endif | |
| 2409 | 2415 | |
| 2410 | 2416 | if (iwl_advanced_bt_coexist(priv)) |
| 2411 | 2417 | DEBUGFS_ADD_FILE(bt_traffic, dir_debug, S_IRUSR); |
| @@ -1484,7 +1484,7 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy, · 1483 unmodified lines | ||
| 1484 | 1484 | struct wireless_dev *wdev; |
| 1485 | 1485 | |
| 1486 | 1486 | if (!adapter) |
| 1487 | − return NULL; | |
| 1487 | + return ERR_PTR(-EFAULT); | |
| 1488 | 1488 | |
| 1489 | 1489 | switch (type) { |
| 1490 | 1490 | case NL80211_IFTYPE_UNSPECIFIED: |
| @@ -1494,12 +1494,12 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy, · 3 unmodified lines | ||
| 1494 | 1494 | if (priv->bss_mode) { |
| 1495 | 1495 | wiphy_err(wiphy, |
| 1496 | 1496 | "cannot create multiple sta/adhoc ifaces\n"); |
| 1497 | − return NULL; | |
| 1497 | + return ERR_PTR(-EINVAL); | |
| 1498 | 1498 | } |
| 1499 | 1499 | |
| 1500 | 1500 | wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL); |
| 1501 | 1501 | if (!wdev) |
| 1502 | − return NULL; | |
| 1502 | + return ERR_PTR(-ENOMEM); | |
| 1503 | 1503 | |
| 1504 | 1504 | wdev->wiphy = wiphy; |
| 1505 | 1505 | priv->wdev = wdev; |
| @@ -1522,12 +1522,12 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy, · 16 unmodified lines | ||
| 1522 | 1522 | |
| 1523 | 1523 | if (priv->bss_mode) { |
| 1524 | 1524 | wiphy_err(wiphy, "Can't create multiple AP interfaces"); |
| 1525 | − return NULL; | |
| 1525 | + return ERR_PTR(-EINVAL); | |
| 1526 | 1526 | } |
| 1527 | 1527 | |
| 1528 | 1528 | wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL); |
| 1529 | 1529 | if (!wdev) |
| 1530 | − return NULL; | |
| 1530 | + return ERR_PTR(-ENOMEM); | |
| 1531 | 1531 | |
| 1532 | 1532 | priv->wdev = wdev; |
| 1533 | 1533 | wdev->wiphy = wiphy; |
| @@ -1544,14 +1544,15 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy, · 10 unmodified lines | ||
| 1544 | 1544 | break; |
| 1545 | 1545 | default: |
| 1546 | 1546 | wiphy_err(wiphy, "type not supported\n"); |
| 1547 | − return NULL; | |
| 1547 | + return ERR_PTR(-EINVAL); | |
| 1548 | 1548 | } |
| 1549 | 1549 | |
| 1550 | 1550 | dev = alloc_netdev_mq(sizeof(struct mwifiex_private *), name, |
| 1551 | 1551 | ether_setup, 1); |
| 1552 | 1552 | if (!dev) { |
| 1553 | 1553 | wiphy_err(wiphy, "no memory available for netdevice\n"); |
| 1554 | − goto error; | |
| 1554 | + priv->bss_mode = NL80211_IFTYPE_UNSPECIFIED; | |
| 1555 | + return ERR_PTR(-ENOMEM); | |
| 1555 | 1556 | } |
| 1556 | 1557 | |
| 1557 | 1558 | mwifiex_init_priv_params(priv, dev); |
| @@ -1582,7 +1583,9 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy, · 24 unmodified lines | ||
| 1582 | 1583 | /* Register network device */ |
| 1583 | 1584 | if (register_netdevice(dev)) { |
| 1584 | 1585 | 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); | |
| 1586 | 1589 | } |
| 1587 | 1590 | |
| 1588 | 1591 | sema_init(&priv->async_sem, 1); |
| @@ -1594,12 +1597,6 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy, · 5 unmodified lines | ||
| 1594 | 1597 | mwifiex_dev_debugfs_init(priv); |
| 1595 | 1598 | #endif |
| 1596 | 1599 | 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; | |
| 1603 | 1600 | } |
| 1604 | 1601 | EXPORT_SYMBOL_GPL(mwifiex_add_virtual_intf); |
| 1605 | 1602 | |
| @@ -161,15 +161,11 @@ int mwifiex_write_data_complete(struct mwifiex_adapter *adapter, · 160 unmodified lines | ||
| 161 | 161 | goto done; |
| 162 | 162 | |
| 163 | 163 | for (i = 0; i < adapter->priv_num; i++) { |
| 164 | − | |
| 165 | 164 | tpriv = adapter->priv[i]; |
| 166 | 165 | |
| 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); | |
| 173 | 169 | } |
| 174 | 170 | done: |
| 175 | 171 | dev_kfree_skb_any(skb); |
| @@ -27,6 +27,17 @@ int mwifiex_set_secure_params(struct mwifiex_private *priv, · 26 unmodified lines | ||
| 27 | 27 | struct cfg80211_ap_settings *params) { |
| 28 | 28 | int i; |
| 29 | 29 | |
| 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 | + | |
| 30 | 41 | switch (params->auth_type) { |
| 31 | 42 | case NL80211_AUTHTYPE_OPEN_SYSTEM: |
| 32 | 43 | bss_config->auth_mode = WLAN_AUTH_OPEN; |
| @@ -2110,7 +2110,7 @@ resize_buf: · 2109 unmodified lines | ||
| 2110 | 2110 | while (check_bssid_list_item(bssid, bssid_len, buf, len)) { |
| 2111 | 2111 | if (rndis_bss_info_update(usbdev, bssid) && match_bssid && |
| 2112 | 2112 | matched) { |
| 2113 | − if (!ether_addr_equal(bssid->mac, match_bssid)) | |
| 2113 | + if (ether_addr_equal(bssid->mac, match_bssid)) | |
| 2114 | 2114 | *matched = true; |
| 2115 | 2115 | } |
| 2116 | 2116 | |
| @@ -869,7 +869,7 @@ int wl1251_acx_tsf_info(struct wl1251 *wl, u64 *mactime) · 868 unmodified lines | ||
| 869 | 869 | } |
| 870 | 870 | |
| 871 | 871 | *mactime = tsf_info->current_tsf_lsb | |
| 872 | − (tsf_info->current_tsf_msb << 31); | |
| 872 | + ((u64)tsf_info->current_tsf_msb << 32); | |
| 873 | 873 | |
| 874 | 874 | out: |
| 875 | 875 | kfree(tsf_info); |
| @@ -76,8 +76,7 @@ static int wl1251_event_process(struct wl1251 *wl, struct event_mailbox *mbox) · 75 unmodified lines | ||
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | − if (vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID && | |
| 80 | − wl->station_mode != STATION_ACTIVE_MODE) { | |
| 79 | + if (vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID) { | |
| 81 | 80 | wl1251_debug(DEBUG_EVENT, "SYNCHRONIZATION_TIMEOUT_EVENT"); |
| 82 | 81 | |
| 83 | 82 | /* indicate to the stack, that beacons have been lost */ |
| @@ -73,6 +73,8 @@ static void wl1251_spi_reset(struct wl1251 *wl) · 72 unmodified lines | ||
| 73 | 73 | spi_sync(wl_to_spi(wl), &m); |
| 74 | 74 | |
| 75 | 75 | wl1251_dump(DEBUG_SPI, "spi reset -> ", cmd, WSPI_INIT_CMD_LEN); |
| 76 | + | |
| 77 | + kfree(cmd); | |
| 76 | 78 | } |
| 77 | 79 | |
| 78 | 80 | static void wl1251_spi_wake(struct wl1251 *wl) |
| @@ -127,6 +129,8 @@ static void wl1251_spi_wake(struct wl1251 *wl) · 48 unmodified lines | ||
| 127 | 129 | spi_sync(wl_to_spi(wl), &m); |
| 128 | 130 | |
| 129 | 131 | wl1251_dump(DEBUG_SPI, "spi init -> ", cmd, WSPI_INIT_CMD_LEN); |
| 132 | + | |
| 133 | + kfree(cmd); | |
| 130 | 134 | } |
| 131 | 135 | |
| 132 | 136 | static void wl1251_spi_reset_wake(struct wl1251 *wl) |
| @@ -1935,14 +1935,14 @@ static int __devexit xennet_remove(struct xenbus_device *dev) · 1934 unmodified lines | ||
| 1935 | 1935 | |
| 1936 | 1936 | dev_dbg(&dev->dev, "%s\n", dev->nodename); |
| 1937 | 1937 | |
| 1938 | − unregister_netdev(info->netdev); | |
| 1939 | − | |
| 1940 | 1938 | xennet_disconnect_backend(info); |
| 1941 | 1939 | |
| 1942 | − del_timer_sync(&info->rx_refill_timer); | |
| 1943 | − | |
| 1944 | 1940 | xennet_sysfs_delif(info->netdev); |
| 1945 | 1941 | |
| 1942 | + unregister_netdev(info->netdev); | |
| 1943 | + | |
| 1944 | + del_timer_sync(&info->rx_refill_timer); | |
| 1945 | + | |
| 1946 | 1946 | free_percpu(info->stats); |
| 1947 | 1947 | |
| 1948 | 1948 | free_netdev(info->netdev); |
| @@ -25,7 +25,7 @@ static int oprofile_perf_enabled; · 24 unmodified lines | ||
| 25 | 25 | static DEFINE_MUTEX(oprofile_perf_mutex); |
| 26 | 26 | |
| 27 | 27 | 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]; | |
| 29 | 29 | static int num_counters; |
| 30 | 30 | |
| 31 | 31 | /* |
| @@ -673,7 +673,9 @@ static __devinit int palmas_probe(struct platform_device *pdev) · 672 unmodified lines | ||
| 673 | 673 | pmic->desc[id].ops = &palmas_ops_smps10; |
| 674 | 674 | pmic->desc[id].vsel_reg = PALMAS_SMPS10_CTRL; |
| 675 | 675 | 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); | |
| 677 | 679 | pmic->desc[id].enable_mask = SMPS10_BOOST_EN; |
| 678 | 680 | } |
| 679 | 681 | |
| @@ -739,7 +741,8 @@ static __devinit int palmas_probe(struct platform_device *pdev) · 59 unmodified lines | ||
| 739 | 741 | |
| 740 | 742 | pmic->desc[id].type = REGULATOR_VOLTAGE; |
| 741 | 743 | 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); | |
| 743 | 746 | pmic->desc[id].enable_mask = PALMAS_LDO1_CTRL_MODE_ACTIVE; |
| 744 | 747 | |
| 745 | 748 | if (pdata && pdata->reg_data) |
| @@ -71,7 +71,7 @@ · 70 unmodified lines | ||
| 71 | 71 | |
| 72 | 72 | /* LDO_CTRL bitfields */ |
| 73 | 73 | #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)) | |
| 75 | 75 | |
| 76 | 76 | /* Number of step-down converters available */ |
| 77 | 77 | #define TPS65023_NUM_DCDC 3 |
| @@ -482,7 +482,7 @@ static int get_voltage_sel(struct regulator_dev *rdev) · 481 unmodified lines | ||
| 482 | 482 | info = &supply_info[rdev_get_id(rdev)]; |
| 483 | 483 | |
| 484 | 484 | if (info->flags & FIXED_VOLTAGE) |
| 485 | − return info->fixed_voltage; | |
| 485 | + return 0; | |
| 486 | 486 | |
| 487 | 487 | ret = read_field(hw, &info->voltage); |
| 488 | 488 | if (ret < 0) |
| @@ -1899,6 +1899,8 @@ static int sd_try_rc16_first(struct scsi_device *sdp) · 1898 unmodified lines | ||
| 1899 | 1899 | { |
| 1900 | 1900 | if (sdp->host->max_cmd_len < 16) |
| 1901 | 1901 | return 0; |
| 1902 | + if (sdp->try_rc_10_first) | |
| 1903 | + return 0; | |
| 1902 | 1904 | if (sdp->scsi_level > SCSI_SPC_2) |
| 1903 | 1905 | return 1; |
| 1904 | 1906 | if (scsi_device_protection(sdp)) |
| @@ -129,6 +129,7 @@ static void send_space_homebrew(long length); · 128 unmodified lines | ||
| 129 | 129 | |
| 130 | 130 | static struct lirc_serial hardware[] = { |
| 131 | 131 | [LIRC_HOMEBREW] = { |
| 132 | + .lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_HOMEBREW].lock), | |
| 132 | 133 | .signal_pin = UART_MSR_DCD, |
| 133 | 134 | .signal_pin_change = UART_MSR_DDCD, |
| 134 | 135 | .on = (UART_MCR_RTS | UART_MCR_OUT2 | UART_MCR_DTR), |
| @@ -145,6 +146,7 @@ static struct lirc_serial hardware[] = { · 10 unmodified lines | ||
| 145 | 146 | }, |
| 146 | 147 | |
| 147 | 148 | [LIRC_IRDEO] = { |
| 149 | + .lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_IRDEO].lock), | |
| 148 | 150 | .signal_pin = UART_MSR_DSR, |
| 149 | 151 | .signal_pin_change = UART_MSR_DDSR, |
| 150 | 152 | .on = UART_MCR_OUT2, |
| @@ -156,6 +158,7 @@ static struct lirc_serial hardware[] = { · 5 unmodified lines | ||
| 156 | 158 | }, |
| 157 | 159 | |
| 158 | 160 | [LIRC_IRDEO_REMOTE] = { |
| 161 | + .lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_IRDEO_REMOTE].lock), | |
| 159 | 162 | .signal_pin = UART_MSR_DSR, |
| 160 | 163 | .signal_pin_change = UART_MSR_DDSR, |
| 161 | 164 | .on = (UART_MCR_RTS | UART_MCR_DTR | UART_MCR_OUT2), |
| @@ -167,6 +170,7 @@ static struct lirc_serial hardware[] = { · 5 unmodified lines | ||
| 167 | 170 | }, |
| 168 | 171 | |
| 169 | 172 | [LIRC_ANIMAX] = { |
| 173 | + .lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_ANIMAX].lock), | |
| 170 | 174 | .signal_pin = UART_MSR_DCD, |
| 171 | 175 | .signal_pin_change = UART_MSR_DDCD, |
| 172 | 176 | .on = 0, |
| @@ -177,6 +181,7 @@ static struct lirc_serial hardware[] = { · 4 unmodified lines | ||
| 177 | 181 | }, |
| 178 | 182 | |
| 179 | 183 | [LIRC_IGOR] = { |
| 184 | + .lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_IGOR].lock), | |
| 180 | 185 | .signal_pin = UART_MSR_DSR, |
| 181 | 186 | .signal_pin_change = UART_MSR_DDSR, |
| 182 | 187 | .on = (UART_MCR_RTS | UART_MCR_OUT2 | UART_MCR_DTR), |
| @@ -201,6 +206,7 @@ static struct lirc_serial hardware[] = { · 18 unmodified lines | ||
| 201 | 206 | * See also http://www.nslu2-linux.org for this device |
| 202 | 207 | */ |
| 203 | 208 | [LIRC_NSLU2] = { |
| 209 | + .lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_NSLU2].lock), | |
| 204 | 210 | .signal_pin = UART_MSR_CTS, |
| 205 | 211 | .signal_pin_change = UART_MSR_DCTS, |
| 206 | 212 | .on = (UART_MCR_RTS | UART_MCR_OUT2 | UART_MCR_DTR), |
| @@ -46,7 +46,7 @@ obj-$(CONFIG_USB_MICROTEK) += image/ · 45 unmodified lines | ||
| 46 | 46 | obj-$(CONFIG_USB_SERIAL) += serial/ |
| 47 | 47 | |
| 48 | 48 | obj-$(CONFIG_USB) += misc/ |
| 49 | −obj-$(CONFIG_USB) += phy/ | |
| 49 | +obj-$(CONFIG_USB_COMMON) += phy/ | |
| 50 | 50 | obj-$(CONFIG_EARLY_PRINTK_DBGP) += early/ |
| 51 | 51 | |
| 52 | 52 | obj-$(CONFIG_USB_ATM) += atm/ |
| @@ -1091,7 +1091,7 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep, · 1090 unmodified lines | ||
| 1091 | 1091 | if (r == req) { |
| 1092 | 1092 | /* wait until it is processed */ |
| 1093 | 1093 | dwc3_stop_active_transfer(dwc, dep->number); |
| 1094 | − goto out0; | |
| 1094 | + goto out1; | |
| 1095 | 1095 | } |
| 1096 | 1096 | dev_err(dwc->dev, "request %p was not queued to %s\n", |
| 1097 | 1097 | request, ep->name); |
| @@ -1099,6 +1099,7 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep, · 1 unmodified line | ||
| 1099 | 1099 | goto out0; |
| 1100 | 1100 | } |
| 1101 | 1101 | |
| 1102 | +out1: | |
| 1102 | 1103 | /* giveback the request */ |
| 1103 | 1104 | dwc3_gadget_giveback(dep, req, -ECONNRESET); |
| 1104 | 1105 | |
| @@ -153,10 +153,10 @@ struct usb_ep_para{ · 152 unmodified lines | ||
| 153 | 153 | #define USB_BUSMODE_DTB 0x02 |
| 154 | 154 | |
| 155 | 155 | /* Endpoint basic handle */ |
| 156 | −#define ep_index(EP) ((EP)->desc->bEndpointAddress & 0xF) | |
| 156 | +#define ep_index(EP) ((EP)->ep.desc->bEndpointAddress & 0xF) | |
| 157 | 157 | #define ep_maxpacket(EP) ((EP)->ep.maxpacket) |
| 158 | 158 | #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 \ | |
| 160 | 160 | & USB_DIR_IN) == USB_DIR_IN) |
| 161 | 161 | |
| 162 | 162 | /* ep0 transfer state */ |
| @@ -61,6 +61,7 @@ · 60 unmodified lines | ||
| 61 | 61 | #include <mach/irqs.h> |
| 62 | 62 | #include <mach/board.h> |
| 63 | 63 | #ifdef CONFIG_USB_GADGET_DEBUG_FILES |
| 64 | +#include <linux/debugfs.h> | |
| 64 | 65 | #include <linux/seq_file.h> |
| 65 | 66 | #endif |
| 66 | 67 | |
| @@ -375,11 +375,21 @@ static void musb_advance_schedule(struct musb *musb, struct urb *urb, · 374 unmodified lines | ||
| 375 | 375 | */ |
| 376 | 376 | if (list_empty(&qh->hep->urb_list)) { |
| 377 | 377 | struct list_head *head; |
| 378 | + struct dma_controller *dma = musb->dma_controller; | |
| 378 | 379 | |
| 379 | − if (is_in) | |
| 380 | + if (is_in) { | |
| 380 | 381 | 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 { | |
| 382 | 387 | ep->tx_reinit = 1; |
| 388 | + if (ep->tx_channel) { | |
| 389 | + dma->channel_release(ep->tx_channel); | |
| 390 | + ep->tx_channel = NULL; | |
| 391 | + } | |
| 392 | + } | |
| 383 | 393 | |
| 384 | 394 | /* Clobber old pointers to this qh */ |
| 385 | 395 | musb_ep_set_qh(ep, is_in, NULL); |
| @@ -305,9 +305,8 @@ static irqreturn_t twl6030_usbotg_irq(int irq, void *_twl) · 304 unmodified lines | ||
| 305 | 305 | |
| 306 | 306 | regulator_enable(twl->usb3v3); |
| 307 | 307 | 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); | |
| 311 | 310 | status = USB_EVENT_ID; |
| 312 | 311 | otg->default_a = true; |
| 313 | 312 | twl->phy.state = OTG_STATE_A_IDLE; |
| @@ -316,12 +315,10 @@ static irqreturn_t twl6030_usbotg_irq(int irq, void *_twl) · 2 unmodified lines | ||
| 316 | 315 | atomic_notifier_call_chain(&twl->phy.notifier, status, |
| 317 | 316 | otg->gadget); |
| 318 | 317 | } 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); | |
| 323 | 320 | } |
| 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); | |
| 325 | 322 | |
| 326 | 323 | return IRQ_HANDLED; |
| 327 | 324 | } |
| @@ -343,7 +340,7 @@ static int twl6030_enable_irq(struct usb_phy *x) · 15 unmodified lines | ||
| 343 | 340 | { |
| 344 | 341 | struct twl6030_usb *twl = phy_to_twl(x); |
| 345 | 342 | |
| 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); | |
| 347 | 344 | twl6030_interrupt_unmask(0x05, REG_INT_MSK_LINE_C); |
| 348 | 345 | twl6030_interrupt_unmask(0x05, REG_INT_MSK_STS_C); |
| 349 | 346 | |
| @@ -2,11 +2,11 @@ · 1 unmodified line | ||
| 2 | 2 | # Physical Layer USB driver configuration |
| 3 | 3 | # |
| 4 | 4 | comment "USB Physical Layer drivers" |
| 5 | − depends on USB | |
| 5 | + depends on USB || USB_GADGET | |
| 6 | 6 | |
| 7 | 7 | config USB_ISP1301 |
| 8 | 8 | tristate "NXP ISP1301 USB transceiver support" |
| 9 | − depends on USB | |
| 9 | + depends on USB || USB_GADGET | |
| 10 | 10 | depends on I2C |
| 11 | 11 | help |
| 12 | 12 | Say Y here to add support for the NXP ISP1301 USB transceiver driver. |
| @@ -93,6 +93,7 @@ static const struct usb_device_id id_table[] = { · 92 unmodified lines | ||
| 93 | 93 | { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */ |
| 94 | 94 | { USB_DEVICE(0x10C4, 0x8156) }, /* B&G H3000 link cable */ |
| 95 | 95 | { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */ |
| 96 | + { USB_DEVICE(0x10C4, 0x815F) }, /* Timewave HamLinkUSB */ | |
| 96 | 97 | { USB_DEVICE(0x10C4, 0x818B) }, /* AVIT Research USB to TTL */ |
| 97 | 98 | { USB_DEVICE(0x10C4, 0x819F) }, /* MJS USB Toslink Switcher */ |
| 98 | 99 | { USB_DEVICE(0x10C4, 0x81A6) }, /* ThinkOptics WavIt */ |
| @@ -134,7 +135,13 @@ static const struct usb_device_id id_table[] = { · 35 unmodified lines | ||
| 134 | 135 | { USB_DEVICE(0x10CE, 0xEA6A) }, /* Silicon Labs MobiData GPRS USB Modem 100EU */ |
| 135 | 136 | { USB_DEVICE(0x13AD, 0x9999) }, /* Baltech card reader */ |
| 136 | 137 | { 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 */ | |
| 137 | 140 | { 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 */ | |
| 138 | 145 | { USB_DEVICE(0x16D6, 0x0001) }, /* Jablotron serial interface */ |
| 139 | 146 | { USB_DEVICE(0x16DC, 0x0010) }, /* W-IE-NE-R Plein & Baus GmbH PL512 Power Supply */ |
| 140 | 147 | { 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 | ||
| 146 | 153 | { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ |
| 147 | 154 | { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ |
| 148 | 155 | { 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 */ | |
| 149 | 158 | { 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 */ | |
| 150 | 161 | { USB_DEVICE(0x413C, 0x9500) }, /* DW700 GPS USB interface */ |
| 151 | 162 | { } /* Terminating Entry */ |
| 152 | 163 | }; |
| @@ -236,6 +236,7 @@ static void option_instat_callback(struct urb *urb); · 235 unmodified lines | ||
| 236 | 236 | #define NOVATELWIRELESS_PRODUCT_G1 0xA001 |
| 237 | 237 | #define NOVATELWIRELESS_PRODUCT_G1_M 0xA002 |
| 238 | 238 | #define NOVATELWIRELESS_PRODUCT_G2 0xA010 |
| 239 | +#define NOVATELWIRELESS_PRODUCT_MC551 0xB001 | |
| 239 | 240 | |
| 240 | 241 | /* AMOI PRODUCTS */ |
| 241 | 242 | #define AMOI_VENDOR_ID 0x1614 |
| @@ -497,6 +498,10 @@ static void option_instat_callback(struct urb *urb); · 255 unmodified lines | ||
| 497 | 498 | /* MediaTek products */ |
| 498 | 499 | #define MEDIATEK_VENDOR_ID 0x0e8d |
| 499 | 500 | |
| 501 | +/* Cellient products */ | |
| 502 | +#define CELLIENT_VENDOR_ID 0x2692 | |
| 503 | +#define CELLIENT_PRODUCT_MEN200 0x9005 | |
| 504 | + | |
| 500 | 505 | /* some devices interfaces need special handling due to a number of reasons */ |
| 501 | 506 | enum option_blacklist_reason { |
| 502 | 507 | OPTION_BLACKLIST_NONE = 0, |
| @@ -734,6 +739,8 @@ static const struct usb_device_id option_ids[] = { · 231 unmodified lines | ||
| 734 | 739 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_G1) }, |
| 735 | 740 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_G1_M) }, |
| 736 | 741 | { 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) }, | |
| 737 | 744 | |
| 738 | 745 | { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01) }, |
| 739 | 746 | { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01A) }, |
| @@ -1233,6 +1240,7 @@ static const struct usb_device_id option_ids[] = { · 493 unmodified lines | ||
| 1233 | 1240 | { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a1, 0xff, 0x02, 0x01) }, |
| 1234 | 1241 | { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a2, 0xff, 0x00, 0x00) }, |
| 1235 | 1242 | { 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) }, | |
| 1236 | 1244 | { } /* Terminating entry */ |
| 1237 | 1245 | }; |
| 1238 | 1246 | MODULE_DEVICE_TABLE(usb, option_ids); |
| @@ -202,6 +202,12 @@ static int slave_configure(struct scsi_device *sdev) · 201 unmodified lines | ||
| 202 | 202 | if (us->fflags & US_FL_NO_READ_CAPACITY_16) |
| 203 | 203 | sdev->no_read_capacity_16 = 1; |
| 204 | 204 | |
| 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 | + | |
| 205 | 211 | /* assume SPC3 or latter devices support sense size > 18 */ |
| 206 | 212 | if (sdev->scsi_level > SCSI_SPC_2) |
| 207 | 213 | us->fflags |= US_FL_SANE_SENSE; |
| @@ -1107,13 +1107,6 @@ UNUSUAL_DEV( 0x090a, 0x1200, 0x0000, 0x9999, · 1106 unmodified lines | ||
| 1107 | 1107 | USB_SC_RBC, USB_PR_BULK, NULL, |
| 1108 | 1108 | 0 ), |
| 1109 | 1109 | |
| 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 | − | |
| 1117 | 1110 | /* aeb */ |
| 1118 | 1111 | UNUSUAL_DEV( 0x090c, 0x1132, 0x0000, 0xffff, |
| 1119 | 1112 | "Feiya", |
| @@ -191,7 +191,9 @@ static int vhost_worker(void *data) · 190 unmodified lines | ||
| 191 | 191 | struct vhost_dev *dev = data; |
| 192 | 192 | struct vhost_work *work = NULL; |
| 193 | 193 | unsigned uninitialized_var(seq); |
| 194 | + mm_segment_t oldfs = get_fs(); | |
| 194 | 195 | |
| 196 | + set_fs(USER_DS); | |
| 195 | 197 | use_mm(dev->mm); |
| 196 | 198 | |
| 197 | 199 | for (;;) { |
| @@ -229,6 +231,7 @@ static int vhost_worker(void *data) · 31 unmodified lines | ||
| 229 | 231 | |
| 230 | 232 | } |
| 231 | 233 | unuse_mm(dev->mm); |
| 234 | + set_fs(oldfs); | |
| 232 | 235 | return 0; |
| 233 | 236 | } |
| 234 | 237 | |
| @@ -146,7 +146,7 @@ struct cmn_registers { · 145 unmodified lines | ||
| 146 | 146 | } __attribute__((packed)); |
| 147 | 147 | |
| 148 | 148 | static unsigned int hpwdt_nmi_decoding; |
| 149 | −static unsigned int allow_kdump; | |
| 149 | +static unsigned int allow_kdump = 1; | |
| 150 | 150 | static unsigned int is_icru; |
| 151 | 151 | static DEFINE_SPINLOCK(rom_lock); |
| 152 | 152 | static void *cru_rom_addr; |
| @@ -756,6 +756,8 @@ error: · 603 unmodified lines | ||
| 756 | 756 | static void hpwdt_exit_nmi_decoding(void) |
| 757 | 757 | { |
| 758 | 758 | unregister_nmi_handler(NMI_UNKNOWN, "hpwdt"); |
| 759 | + unregister_nmi_handler(NMI_SERR, "hpwdt"); | |
| 760 | + unregister_nmi_handler(NMI_IO_CHECK, "hpwdt"); | |
| 759 | 761 | if (cru_rom_addr) |
| 760 | 762 | iounmap(cru_rom_addr); |
| 761 | 763 | } |
| @@ -699,3 +699,4 @@ MODULE_DESCRIPTION("Intel TCO WatchDog Timer Driver"); · 698 unmodified lines | ||
| 699 | 699 | MODULE_VERSION(DRV_VERSION); |
| 700 | 700 | MODULE_LICENSE("GPL"); |
| 701 | 701 | MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); |
| 702 | +MODULE_ALIAS("platform:" DRV_NAME); | |
| @@ -349,7 +349,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd, · 348 unmodified lines | ||
| 349 | 349 | sizeof(struct watchdog_info)) ? -EFAULT : 0; |
| 350 | 350 | case WDIOC_GETSTATUS: |
| 351 | 351 | err = watchdog_get_status(wdd, &val); |
| 352 | − if (err) | |
| 352 | + if (err == -ENODEV) | |
| 353 | 353 | return err; |
| 354 | 354 | return put_user(val, p); |
| 355 | 355 | case WDIOC_GETBOOTSTATUS: |
| @@ -2918,7 +2918,7 @@ int dbg_debugfs_init_fs(struct ubifs_info *c) · 2917 unmodified lines | ||
| 2918 | 2918 | struct dentry *dent; |
| 2919 | 2919 | struct ubifs_debug_info *d = c->dbg; |
| 2920 | 2920 | |
| 2921 | − if (!IS_ENABLED(DEBUG_FS)) | |
| 2921 | + if (!IS_ENABLED(CONFIG_DEBUG_FS)) | |
| 2922 | 2922 | return 0; |
| 2923 | 2923 | |
| 2924 | 2924 | n = snprintf(d->dfs_dir_name, UBIFS_DFS_DIR_LEN + 1, UBIFS_DFS_DIR_NAME, |
| @@ -3013,7 +3013,7 @@ out: · 88 unmodified lines | ||
| 3013 | 3013 | */ |
| 3014 | 3014 | void dbg_debugfs_exit_fs(struct ubifs_info *c) |
| 3015 | 3015 | { |
| 3016 | − if (IS_ENABLED(DEBUG_FS)) | |
| 3016 | + if (IS_ENABLED(CONFIG_DEBUG_FS)) | |
| 3017 | 3017 | debugfs_remove_recursive(c->dbg->dfs_dir); |
| 3018 | 3018 | } |
| 3019 | 3019 | |
| @@ -3099,7 +3099,7 @@ int dbg_debugfs_init(void) · 79 unmodified lines | ||
| 3099 | 3099 | const char *fname; |
| 3100 | 3100 | struct dentry *dent; |
| 3101 | 3101 | |
| 3102 | − if (!IS_ENABLED(DEBUG_FS)) | |
| 3102 | + if (!IS_ENABLED(CONFIG_DEBUG_FS)) | |
| 3103 | 3103 | return 0; |
| 3104 | 3104 | |
| 3105 | 3105 | fname = "ubifs"; |
| @@ -3166,7 +3166,7 @@ out: · 60 unmodified lines | ||
| 3166 | 3166 | */ |
| 3167 | 3167 | void dbg_debugfs_exit(void) |
| 3168 | 3168 | { |
| 3169 | − if (IS_ENABLED(DEBUG_FS)) | |
| 3169 | + if (IS_ENABLED(CONFIG_DEBUG_FS)) | |
| 3170 | 3170 | debugfs_remove_recursive(dfs_rootdir); |
| 3171 | 3171 | } |
| 3172 | 3172 | |
| @@ -939,8 +939,8 @@ static int find_dirtiest_idx_leb(struct ubifs_info *c) · 938 unmodified lines | ||
| 939 | 939 | } |
| 940 | 940 | dbg_find("LEB %d, dirty %d and free %d flags %#x", lp->lnum, lp->dirty, |
| 941 | 941 | 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); | |
| 944 | 944 | return lnum; |
| 945 | 945 | } |
| 946 | 946 | |
| @@ -56,6 +56,7 @@ · 55 unmodified lines | ||
| 56 | 56 | #include <linux/seq_file.h> |
| 57 | 57 | #include <linux/bitmap.h> |
| 58 | 58 | #include <linux/crc-itu-t.h> |
| 59 | +#include <linux/log2.h> | |
| 59 | 60 | #include <asm/byteorder.h> |
| 60 | 61 | |
| 61 | 62 | #include "udf_sb.h" |
| @@ -1215,16 +1216,65 @@ out_bh: · 1153 unmodified lines | ||
| 1215 | 1216 | return ret; |
| 1216 | 1217 | } |
| 1217 | 1218 | |
| 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 | + | |
| 1218 | 1267 | static int udf_load_logicalvol(struct super_block *sb, sector_t block, |
| 1219 | 1268 | struct kernel_lb_addr *fileset) |
| 1220 | 1269 | { |
| 1221 | 1270 | struct logicalVolDesc *lvd; |
| 1222 | − int i, j, offset; | |
| 1271 | + int i, offset; | |
| 1223 | 1272 | uint8_t type; |
| 1224 | 1273 | struct udf_sb_info *sbi = UDF_SB(sb); |
| 1225 | 1274 | struct genericPartitionMap *gpm; |
| 1226 | 1275 | uint16_t ident; |
| 1227 | 1276 | struct buffer_head *bh; |
| 1277 | + unsigned int table_len; | |
| 1228 | 1278 | int ret = 0; |
| 1229 | 1279 | |
| 1230 | 1280 | 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 | ||
| 1232 | 1282 | return 1; |
| 1233 | 1283 | BUG_ON(ident != TAG_IDENT_LVD); |
| 1234 | 1284 | 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)); | |
| 1239 | 1290 | goto out_bh; |
| 1240 | 1291 | } |
| 1241 | 1292 | |
| 1293 | + ret = udf_sb_alloc_partition_maps(sb, le32_to_cpu(lvd->numPartitionMaps)); | |
| 1294 | + if (ret) | |
| 1295 | + goto out_bh; | |
| 1296 | + | |
| 1242 | 1297 | for (i = 0, offset = 0; |
| 1243 | − i < sbi->s_partitions && offset < le32_to_cpu(lvd->mapTableLength); | |
| 1298 | + i < sbi->s_partitions && offset < table_len; | |
| 1244 | 1299 | i++, offset += gpm->partitionMapLength) { |
| 1245 | 1300 | struct udf_part_map *map = &sbi->s_partmaps[i]; |
| 1246 | 1301 | gpm = (struct genericPartitionMap *) |
| @@ -1275,38 +1330,9 @@ static int udf_load_logicalvol(struct super_block *sb, sector_t block, · 28 unmodified lines | ||
| 1275 | 1330 | } else if (!strncmp(upm2->partIdent.ident, |
| 1276 | 1331 | UDF_ID_SPARABLE, |
| 1277 | 1332 | 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; | |
| 1310 | 1336 | } else if (!strncmp(upm2->partIdent.ident, |
| 1311 | 1337 | UDF_ID_METADATA, |
| 1312 | 1338 | strlen(UDF_ID_METADATA))) { |
| @@ -3,10 +3,18 @@ · 2 unmodified lines | ||
| 3 | 3 | |
| 4 | 4 | #include <linux/compiler.h> |
| 5 | 5 | |
| 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 | + | |
| 6 | 15 | #ifdef CONFIG_BUG |
| 7 | 16 | |
| 8 | 17 | #ifdef CONFIG_GENERIC_BUG |
| 9 | −#ifndef __ASSEMBLY__ | |
| 10 | 18 | struct bug_entry { |
| 11 | 19 | #ifndef CONFIG_GENERIC_BUG_RELATIVE_POINTERS |
| 12 | 20 | unsigned long bug_addr; |
| @@ -23,17 +31,8 @@ struct bug_entry { · 10 unmodified lines | ||
| 23 | 31 | #endif |
| 24 | 32 | unsigned short flags; |
| 25 | 33 | }; |
| 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 | − | |
| 32 | 34 | #endif /* CONFIG_GENERIC_BUG */ |
| 33 | 35 | |
| 34 | −#ifndef __ASSEMBLY__ | |
| 35 | −#include <linux/kernel.h> | |
| 36 | − | |
| 37 | 36 | /* |
| 38 | 37 | * Don't use BUG() or BUG_ON() unless there's really no way out; one |
| 39 | 38 | * example might be detecting data structure corruption in the middle |
| @@ -301,8 +301,6 @@ static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d) · 300 unmodified lines | ||
| 301 | 301 | * @irq_pm_shutdown: function called from core code on shutdown once per chip |
| 302 | 302 | * @irq_print_chip: optional to print special chip info in show_interrupts |
| 303 | 303 | * @flags: chip specific flags |
| 304 | − * | |
| 305 | − * @release: release function solely used by UML | |
| 306 | 304 | */ |
| 307 | 305 | struct irq_chip { |
| 308 | 306 | const char *name; |
| @@ -225,14 +225,11 @@ enum { · 224 unmodified lines | ||
| 225 | 225 | /* device driver is going to provide hardware time stamp */ |
| 226 | 226 | SKBTX_IN_PROGRESS = 1 << 2, |
| 227 | 227 | |
| 228 | − /* ensure the originating sk reference is available on driver level */ | |
| 229 | − SKBTX_DRV_NEEDS_SK_REF = 1 << 3, | |
| 230 | − | |
| 231 | 228 | /* device driver supports TX zero-copy buffers */ |
| 232 | − SKBTX_DEV_ZEROCOPY = 1 << 4, | |
| 229 | + SKBTX_DEV_ZEROCOPY = 1 << 3, | |
| 233 | 230 | |
| 234 | 231 | /* generate wifi status information (where possible) */ |
| 235 | − SKBTX_WIFI_STATUS = 1 << 5, | |
| 232 | + SKBTX_WIFI_STATUS = 1 << 4, | |
| 236 | 233 | }; |
| 237 | 234 | |
| 238 | 235 | /* |
| @@ -2640,9 +2640,9 @@ struct v4l2_create_buffers { · 2639 unmodified lines | ||
| 2640 | 2640 | |
| 2641 | 2641 | /* Experimental, these three ioctls may change over the next couple of kernel |
| 2642 | 2642 | 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) | |
| 2646 | 2646 | |
| 2647 | 2647 | /* Reminder: when adding new ioctls please add support for them to |
| 2648 | 2648 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ |
| @@ -1144,6 +1144,12 @@ struct extended_inquiry_info { · 1143 unmodified lines | ||
| 1144 | 1144 | __u8 data[240]; |
| 1145 | 1145 | } __packed; |
| 1146 | 1146 | |
| 1147 | +#define HCI_EV_KEY_REFRESH_COMPLETE 0x30 | |
| 1148 | +struct hci_ev_key_refresh_complete { | |
| 1149 | + __u8 status; | |
| 1150 | + __le16 handle; | |
| 1151 | +} __packed; | |
| 1152 | + | |
| 1147 | 1153 | #define HCI_EV_IO_CAPA_REQUEST 0x31 |
| 1148 | 1154 | struct hci_ev_io_capa_request { |
| 1149 | 1155 | bdaddr_t bdaddr; |
| @@ -1940,6 +1940,11 @@ enum ieee80211_rate_control_changed { · 1939 unmodified lines | ||
| 1940 | 1940 | * to also unregister the device. If it returns 1, then mac80211 |
| 1941 | 1941 | * will also go through the regular complete restart on resume. |
| 1942 | 1942 | * |
| 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 | + * | |
| 1943 | 1948 | * @add_interface: Called when a netdevice attached to the hardware is |
| 1944 | 1949 | * enabled. Because it is not called for monitor mode devices, @start |
| 1945 | 1950 | * and @stop must be implemented. |
| @@ -2966,6 +2971,7 @@ __le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw, · 1020 unmodified lines | ||
| 2966 | 2971 | * ieee80211_generic_frame_duration - Calculate the duration field for a frame |
| 2967 | 2972 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
| 2968 | 2973 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
| 2974 | + * @band: the band to calculate the frame duration on | |
| 2969 | 2975 | * @frame_len: the length of the frame. |
| 2970 | 2976 | * @rate: the rate at which the frame is going to be transmitted. |
| 2971 | 2977 | * |
| @@ -5,7 +5,7 @@ · 4 unmodified lines | ||
| 5 | 5 | * |
| 6 | 6 | * Copyright (C) 2008 Nokia Corporation. |
| 7 | 7 | * |
| 8 | − * Author: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> | |
| 8 | + * Author: Rémi Denis-Courmont | |
| 9 | 9 | * |
| 10 | 10 | * This program is free software; you can redistribute it and/or |
| 11 | 11 | * modify it under the terms of the GNU General Public License |
| @@ -151,6 +151,7 @@ struct scsi_device { · 150 unmodified lines | ||
| 151 | 151 | SD_LAST_BUGGY_SECTORS */ |
| 152 | 152 | unsigned no_read_disc_info:1; /* Avoid READ_DISC_INFO cmds */ |
| 153 | 153 | unsigned no_read_capacity_16:1; /* Avoid READ_CAPACITY_16 cmds */ |
| 154 | + unsigned try_rc_10_first:1; /* Try READ_CAPACACITY_10 first */ | |
| 154 | 155 | unsigned is_visible:1; /* is the device visible in sysfs */ |
| 155 | 156 | |
| 156 | 157 | DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */ |
| @@ -44,6 +44,7 @@ struct snd_tea575x_ops { · 43 unmodified lines | ||
| 44 | 44 | |
| 45 | 45 | struct snd_tea575x { |
| 46 | 46 | struct v4l2_device *v4l2_dev; |
| 47 | + struct v4l2_file_operations fops; | |
| 47 | 48 | struct video_device vd; /* video device */ |
| 48 | 49 | int radio_nr; /* radio_nr */ |
| 49 | 50 | bool tea5759; /* 5759 chip is present */ |
| @@ -62,7 +63,7 @@ struct snd_tea575x { · 12 unmodified lines | ||
| 62 | 63 | int (*ext_init)(struct snd_tea575x *tea); |
| 63 | 64 | }; |
| 64 | 65 | |
| 65 | −int snd_tea575x_init(struct snd_tea575x *tea); | |
| 66 | +int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner); | |
| 66 | 67 | void snd_tea575x_exit(struct snd_tea575x *tea); |
| 67 | 68 | |
| 68 | 69 | #endif /* __SOUND_TEA575X_TUNER_H */ |
| @@ -193,12 +193,19 @@ static int console_may_schedule; · 192 unmodified lines | ||
| 193 | 193 | * separated by ',', and find the message after the ';' character. |
| 194 | 194 | */ |
| 195 | 195 | |
| 196 | +enum log_flags { | |
| 197 | + LOG_DEFAULT = 0, | |
| 198 | + LOG_NOCONS = 1, /* already flushed, do not print to console */ | |
| 199 | +}; | |
| 200 | + | |
| 196 | 201 | struct log { |
| 197 | 202 | u64 ts_nsec; /* timestamp in nanoseconds */ |
| 198 | 203 | u16 len; /* length of entire record */ |
| 199 | 204 | u16 text_len; /* length of text buffer */ |
| 200 | 205 | 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 */ | |
| 202 | 209 | }; |
| 203 | 210 | |
| 204 | 211 | /* |
| @@ -286,6 +293,7 @@ static u32 log_next(u32 idx) · 81 unmodified lines | ||
| 286 | 293 | |
| 287 | 294 | /* insert record into the buffer, discard old ones, update heads */ |
| 288 | 295 | static void log_store(int facility, int level, |
| 296 | + enum log_flags flags, u64 ts_nsec, | |
| 289 | 297 | const char *dict, u16 dict_len, |
| 290 | 298 | const char *text, u16 text_len) |
| 291 | 299 | { |
| @@ -329,8 +337,13 @@ static void log_store(int facility, int level, · 37 unmodified lines | ||
| 329 | 337 | msg->text_len = text_len; |
| 330 | 338 | memcpy(log_dict(msg), dict, dict_len); |
| 331 | 339 | 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(); | |
| 334 | 347 | memset(log_dict(msg) + dict_len, 0, pad_len); |
| 335 | 348 | msg->len = sizeof(struct log) + text_len + dict_len + pad_len; |
| 336 | 349 | |
| @@ -446,7 +459,7 @@ static ssize_t devkmsg_read(struct file *file, char __user *buf, · 109 unmodified lines | ||
| 446 | 459 | ts_usec = msg->ts_nsec; |
| 447 | 460 | do_div(ts_usec, 1000); |
| 448 | 461 | len = sprintf(user->buf, "%u,%llu,%llu;", |
| 449 | − msg->level, user->seq, ts_usec); | |
| 462 | + (msg->facility << 3) | msg->level, user->seq, ts_usec); | |
| 450 | 463 | |
| 451 | 464 | /* escape non-printable characters */ |
| 452 | 465 | for (i = 0; i < msg->text_len; i++) { |
| @@ -787,6 +800,21 @@ static bool printk_time; · 334 unmodified lines | ||
| 787 | 800 | #endif |
| 788 | 801 | module_param_named(time, printk_time, bool, S_IRUGO | S_IWUSR); |
| 789 | 802 | |
| 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 | + | |
| 790 | 818 | static size_t print_prefix(const struct log *msg, bool syslog, char *buf) |
| 791 | 819 | { |
| 792 | 820 | size_t len = 0; |
| @@ -803,18 +831,7 @@ static size_t print_prefix(const struct log *msg, bool syslog, char *buf) · 10 unmodified lines | ||
| 803 | 831 | } |
| 804 | 832 | } |
| 805 | 833 | |
| 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); | |
| 818 | 835 | return len; |
| 819 | 836 | } |
| 820 | 837 | |
| @@ -862,28 +879,49 @@ static int syslog_print(char __user *buf, int size) · 41 unmodified lines | ||
| 862 | 879 | { |
| 863 | 880 | char *text; |
| 864 | 881 | struct log *msg; |
| 865 | − int len; | |
| 882 | + int len = 0; | |
| 866 | 883 | |
| 867 | 884 | text = kmalloc(LOG_LINE_MAX, GFP_KERNEL); |
| 868 | 885 | if (!text) |
| 869 | 886 | return -ENOMEM; |
| 870 | 887 | |
| 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; | |
| 882 | 890 | |
| 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 | + } | |
| 887 | 925 | |
| 888 | 926 | kfree(text); |
| 889 | 927 | return len; |
| @@ -1040,6 +1078,7 @@ int do_syslog(int type, char __user *buf, int len, bool from_file) · 150 unmodified lines | ||
| 1040 | 1078 | /* Clear ring buffer */ |
| 1041 | 1079 | case SYSLOG_ACTION_CLEAR: |
| 1042 | 1080 | syslog_print_all(NULL, 0, true); |
| 1081 | + break; | |
| 1043 | 1082 | /* Disable logging to console */ |
| 1044 | 1083 | case SYSLOG_ACTION_CONSOLE_OFF: |
| 1045 | 1084 | if (saved_console_loglevel == -1) |
| @@ -1272,15 +1311,92 @@ static inline void printk_delay(void) · 226 unmodified lines | ||
| 1272 | 1311 | } |
| 1273 | 1312 | } |
| 1274 | 1313 | |
| 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 | + | |
| 1275 | 1395 | asmlinkage int vprintk_emit(int facility, int level, |
| 1276 | 1396 | const char *dict, size_t dictlen, |
| 1277 | 1397 | const char *fmt, va_list args) |
| 1278 | 1398 | { |
| 1279 | 1399 | 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; | |
| 1284 | 1400 | static char textbuf[LOG_LINE_MAX]; |
| 1285 | 1401 | char *text = textbuf; |
| 1286 | 1402 | size_t text_len; |
| @@ -1326,7 +1442,8 @@ asmlinkage int vprintk_emit(int facility, int level, · 39 unmodified lines | ||
| 1326 | 1442 | recursion_bug = 0; |
| 1327 | 1443 | printed_len += strlen(recursion_msg); |
| 1328 | 1444 | /* 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); | |
| 1330 | 1447 | } |
| 1331 | 1448 | |
| 1332 | 1449 | /* |
| @@ -1364,55 +1481,37 @@ asmlinkage int vprintk_emit(int facility, int level, · 31 unmodified lines | ||
| 1364 | 1481 | } |
| 1365 | 1482 | |
| 1366 | 1483 | 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(); | |
| 1380 | 1490 | |
| 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); | |
| 1386 | 1495 | } 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; | |
| 1398 | 1497 | |
| 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(); | |
| 1414 | 1508 | } |
| 1509 | + | |
| 1510 | + if (!stored) | |
| 1511 | + log_store(facility, level, LOG_DEFAULT, 0, | |
| 1512 | + dict, dictlen, text, text_len); | |
| 1415 | 1513 | } |
| 1514 | + printed_len += text_len; | |
| 1416 | 1515 | |
| 1417 | 1516 | /* |
| 1418 | 1517 | * Try to acquire and then immediately release the console semaphore. |
| @@ -1499,11 +1598,18 @@ EXPORT_SYMBOL(printk); · 80 unmodified lines | ||
| 1499 | 1598 | #else |
| 1500 | 1599 | |
| 1501 | 1600 | #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; | |
| 1502 | 1607 | static struct log *log_from_idx(u32 idx) { return NULL; } |
| 1503 | 1608 | static u32 log_next(u32 idx) { return 0; } |
| 1504 | 1609 | static void call_console_drivers(int level, const char *text, size_t len) {} |
| 1505 | 1610 | static size_t msg_print_text(const struct log *msg, bool syslog, |
| 1506 | 1611 | char *buf, size_t size) { return 0; } |
| 1612 | +static size_t cont_print_text(char *text, size_t size) { return 0; } | |
| 1507 | 1613 | |
| 1508 | 1614 | #endif /* CONFIG_PRINTK */ |
| 1509 | 1615 | |
| @@ -1795,6 +1901,7 @@ static u32 console_idx; · 285 unmodified lines | ||
| 1795 | 1901 | */ |
| 1796 | 1902 | void console_unlock(void) |
| 1797 | 1903 | { |
| 1904 | + static char text[LOG_LINE_MAX]; | |
| 1798 | 1905 | static u64 seen_seq; |
| 1799 | 1906 | unsigned long flags; |
| 1800 | 1907 | bool wake_klogd = false; |
| @@ -1807,10 +1914,23 @@ void console_unlock(void) · 6 unmodified lines | ||
| 1807 | 1914 | |
| 1808 | 1915 | console_may_schedule = 0; |
| 1809 | 1916 | |
| 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 | + | |
| 1810 | 1931 | again: |
| 1811 | 1932 | for (;;) { |
| 1812 | 1933 | struct log *msg; |
| 1813 | − static char text[LOG_LINE_MAX]; | |
| 1814 | 1934 | size_t len; |
| 1815 | 1935 | int level; |
| 1816 | 1936 | |
| @@ -1825,13 +1945,22 @@ again: · 8 unmodified lines | ||
| 1825 | 1945 | console_seq = log_first_seq; |
| 1826 | 1946 | console_idx = log_first_idx; |
| 1827 | 1947 | } |
| 1828 | − | |
| 1948 | +skip: | |
| 1829 | 1949 | if (console_seq == log_next_seq) |
| 1830 | 1950 | break; |
| 1831 | 1951 | |
| 1832 | 1952 | 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 | + } | |
| 1834 | 1962 | |
| 1963 | + level = msg->level; | |
| 1835 | 1964 | len = msg_print_text(msg, false, text, sizeof(text)); |
| 1836 | 1965 | |
| 1837 | 1966 | console_idx = log_next(console_idx); |
| @@ -2409,7 +2538,7 @@ EXPORT_SYMBOL_GPL(kmsg_dump_get_line); · 571 unmodified lines | ||
| 2409 | 2538 | * kmsg_dump_get_buffer - copy kmsg log lines |
| 2410 | 2539 | * @dumper: registered kmsg dumper |
| 2411 | 2540 | * @syslog: include the "<4>" prefixes |
| 2412 | − * @line: buffer to copy the line to | |
| 2541 | + * @buf: buffer to copy the line to | |
| 2413 | 2542 | * @size: maximum size of the buffer |
| 2414 | 2543 | * @len: length of line placed into buffer |
| 2415 | 2544 | * |
| @@ -1530,7 +1530,7 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp) · 1529 unmodified lines | ||
| 1530 | 1530 | { |
| 1531 | 1531 | unsigned long flags; |
| 1532 | 1532 | struct rcu_head *next, *list, **tail; |
| 1533 | − int bl, count, count_lazy; | |
| 1533 | + int bl, count, count_lazy, i; | |
| 1534 | 1534 | |
| 1535 | 1535 | /* If no callbacks are ready, just return.*/ |
| 1536 | 1536 | 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 | ||
| 1553 | 1553 | rdp->nxtlist = *rdp->nxttail[RCU_DONE_TAIL]; |
| 1554 | 1554 | *rdp->nxttail[RCU_DONE_TAIL] = NULL; |
| 1555 | 1555 | 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; | |
| 1559 | 1559 | local_irq_restore(flags); |
| 1560 | 1560 | |
| 1561 | 1561 | /* Invoke callbacks. */ |
| @@ -1583,9 +1583,9 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp) · 21 unmodified lines | ||
| 1583 | 1583 | if (list != NULL) { |
| 1584 | 1584 | *tail = rdp->nxtlist; |
| 1585 | 1585 | 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; | |
| 1589 | 1589 | else |
| 1590 | 1590 | break; |
| 1591 | 1591 | } |
| @@ -368,7 +368,7 @@ p9pdu_vwritef(struct p9_fcall *pdu, int proto_version, const char *fmt, · 367 unmodified lines | ||
| 368 | 368 | const char *sptr = va_arg(ap, const char *); |
| 369 | 369 | uint16_t len = 0; |
| 370 | 370 | if (sptr) |
| 371 | − len = min_t(uint16_t, strlen(sptr), | |
| 371 | + len = min_t(size_t, strlen(sptr), | |
| 372 | 372 | USHRT_MAX); |
| 373 | 373 | |
| 374 | 374 | errcode = p9pdu_writef(pdu, proto_version, |
| @@ -617,6 +617,8 @@ int recv_tt_query(struct sk_buff *skb, struct hard_iface *recv_if) · 616 unmodified lines | ||
| 617 | 617 | * changes */ |
| 618 | 618 | if (skb_linearize(skb) < 0) |
| 619 | 619 | goto out; |
| 620 | + /* skb_linearize() possibly changed skb->data */ | |
| 621 | + tt_query = (struct tt_query_packet *)skb->data; | |
| 620 | 622 | |
| 621 | 623 | tt_len = tt_query->tt_data * sizeof(struct tt_change); |
| 622 | 624 | |
| @@ -141,13 +141,14 @@ static void tt_orig_list_entry_free_rcu(struct rcu_head *rcu) · 140 unmodified lines | ||
| 141 | 141 | struct tt_orig_list_entry *orig_entry; |
| 142 | 142 | |
| 143 | 143 | orig_entry = container_of(rcu, struct tt_orig_list_entry, rcu); |
| 144 | − atomic_dec(&orig_entry->orig_node->tt_size); | |
| 145 | 144 | orig_node_free_ref(orig_entry->orig_node); |
| 146 | 145 | kfree(orig_entry); |
| 147 | 146 | } |
| 148 | 147 | |
| 149 | 148 | static void tt_orig_list_entry_free_ref(struct tt_orig_list_entry *orig_entry) |
| 150 | 149 | { |
| 150 | + /* to avoid race conditions, immediately decrease the tt counter */ | |
| 151 | + atomic_dec(&orig_entry->orig_node->tt_size); | |
| 151 | 152 | call_rcu(&orig_entry->rcu, tt_orig_list_entry_free_rcu); |
| 152 | 153 | } |
| 153 | 154 | |
| @@ -910,7 +911,6 @@ void tt_global_del_orig(struct bat_priv *bat_priv, · 756 unmodified lines | ||
| 910 | 911 | } |
| 911 | 912 | spin_unlock_bh(list_lock); |
| 912 | 913 | } |
| 913 | − atomic_set(&orig_node->tt_size, 0); | |
| 914 | 914 | orig_node->tt_initialised = false; |
| 915 | 915 | } |
| 916 | 916 | |
| @@ -2031,10 +2031,10 @@ bool is_ap_isolated(struct bat_priv *bat_priv, uint8_t *src, uint8_t *dst) · 1114 unmodified lines | ||
| 2031 | 2031 | { |
| 2032 | 2032 | struct tt_local_entry *tt_local_entry = NULL; |
| 2033 | 2033 | struct tt_global_entry *tt_global_entry = NULL; |
| 2034 | − bool ret = true; | |
| 2034 | + bool ret = false; | |
| 2035 | 2035 | |
| 2036 | 2036 | if (!atomic_read(&bat_priv->ap_isolation)) |
| 2037 | − return false; | |
| 2037 | + goto out; | |
| 2038 | 2038 | |
| 2039 | 2039 | tt_local_entry = tt_local_hash_find(bat_priv, dst); |
| 2040 | 2040 | 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 | ||
| 2044 | 2044 | if (!tt_global_entry) |
| 2045 | 2045 | goto out; |
| 2046 | 2046 | |
| 2047 | − if (_is_ap_isolated(tt_local_entry, tt_global_entry)) | |
| 2047 | + if (!_is_ap_isolated(tt_local_entry, tt_global_entry)) | |
| 2048 | 2048 | goto out; |
| 2049 | 2049 | |
| 2050 | − ret = false; | |
| 2050 | + ret = true; | |
| 2051 | 2051 | |
| 2052 | 2052 | out: |
| 2053 | 2053 | if (tt_global_entry) |
| @@ -3043,6 +3043,50 @@ static inline void hci_extended_inquiry_result_evt(struct hci_dev *hdev, struct · 3042 unmodified lines | ||
| 3043 | 3043 | hci_dev_unlock(hdev); |
| 3044 | 3044 | } |
| 3045 | 3045 | |
| 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 | + | |
| 3046 | 3090 | static inline u8 hci_get_auth_req(struct hci_conn *conn) |
| 3047 | 3091 | { |
| 3048 | 3092 | /* 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 | ||
| 3559 | 3603 | hci_extended_inquiry_result_evt(hdev, skb); |
| 3560 | 3604 | break; |
| 3561 | 3605 | |
| 3606 | + case HCI_EV_KEY_REFRESH_COMPLETE: | |
| 3607 | + hci_key_refresh_complete_evt(hdev, skb); | |
| 3608 | + break; | |
| 3609 | + | |
| 3562 | 3610 | case HCI_EV_IO_CAPA_REQUEST: |
| 3563 | 3611 | hci_io_capa_request_evt(hdev, skb); |
| 3564 | 3612 | break; |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | config BT_HIDP |
| 2 | 2 | tristate "HIDP protocol support" |
| 3 | − depends on BT && INPUT && HID_SUPPORT | |
| 3 | + depends on BT && INPUT | |
| 4 | 4 | select HID |
| 5 | 5 | help |
| 6 | 6 | HIDP (Human Interface Device Protocol) is a transport layer |
| @@ -1295,7 +1295,12 @@ static void security_timeout(struct work_struct *work) · 1294 unmodified lines | ||
| 1295 | 1295 | struct l2cap_conn *conn = container_of(work, struct l2cap_conn, |
| 1296 | 1296 | security_timer.work); |
| 1297 | 1297 | |
| 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 | + } | |
| 1299 | 1304 | } |
| 1300 | 1305 | |
| 1301 | 1306 | 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 | ||
| 2910 | 2915 | while (len >= L2CAP_CONF_OPT_SIZE) { |
| 2911 | 2916 | len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val); |
| 2912 | 2917 | |
| 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; | |
| 2919 | 2926 | } |
| 2920 | 2927 | |
| 2921 | 2928 | /* Use sane default values in case a misbehaving remote device |
| @@ -1598,7 +1598,7 @@ static int disconnect(struct sock *sk, struct hci_dev *hdev, void *data, · 1597 unmodified lines | ||
| 1598 | 1598 | else |
| 1599 | 1599 | conn = hci_conn_hash_lookup_ba(hdev, LE_LINK, &cp->addr.bdaddr); |
| 1600 | 1600 | |
| 1601 | − if (!conn) { | |
| 1601 | + if (!conn || conn->state == BT_OPEN || conn->state == BT_CLOSED) { | |
| 1602 | 1602 | err = cmd_status(sk, hdev->id, MGMT_OP_DISCONNECT, |
| 1603 | 1603 | MGMT_STATUS_NOT_CONNECTED); |
| 1604 | 1604 | goto failed; |
| @@ -1873,6 +1873,22 @@ static void pairing_complete_cb(struct hci_conn *conn, u8 status) · 268 unmodified lines | ||
| 1873 | 1873 | pairing_complete(cmd, mgmt_status(status)); |
| 1874 | 1874 | } |
| 1875 | 1875 | |
| 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 | + | |
| 1876 | 1892 | static int pair_device(struct sock *sk, struct hci_dev *hdev, void *data, |
| 1877 | 1893 | u16 len) |
| 1878 | 1894 | { |
| @@ -1934,6 +1950,8 @@ static int pair_device(struct sock *sk, struct hci_dev *hdev, void *data, · 55 unmodified lines | ||
| 1934 | 1950 | /* For LE, just connecting isn't a proof that the pairing finished */ |
| 1935 | 1951 | if (cp->addr.type == BDADDR_BREDR) |
| 1936 | 1952 | conn->connect_cfm_cb = pairing_complete_cb; |
| 1953 | + else | |
| 1954 | + conn->connect_cfm_cb = le_connect_complete_cb; | |
| 1937 | 1955 | |
| 1938 | 1956 | conn->security_cfm_cb = pairing_complete_cb; |
| 1939 | 1957 | conn->disconn_cfm_cb = pairing_complete_cb; |
| @@ -648,7 +648,7 @@ static u8 smp_cmd_pairing_rsp(struct l2cap_conn *conn, struct sk_buff *skb) · 647 unmodified lines | ||
| 648 | 648 | |
| 649 | 649 | auth |= (req->auth_req | rsp->auth_req) & SMP_AUTH_MITM; |
| 650 | 650 | |
| 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); | |
| 652 | 652 | if (ret) |
| 653 | 653 | return SMP_UNSPECIFIED; |
| 654 | 654 | |
| @@ -703,7 +703,7 @@ static u8 smp_cmd_pairing_random(struct l2cap_conn *conn, struct sk_buff *skb) · 48 unmodified lines | ||
| 703 | 703 | return 0; |
| 704 | 704 | } |
| 705 | 705 | |
| 706 | −static u8 smp_ltk_encrypt(struct l2cap_conn *conn) | |
| 706 | +static u8 smp_ltk_encrypt(struct l2cap_conn *conn, u8 sec_level) | |
| 707 | 707 | { |
| 708 | 708 | struct smp_ltk *key; |
| 709 | 709 | struct hci_conn *hcon = conn->hcon; |
| @@ -712,6 +712,9 @@ static u8 smp_ltk_encrypt(struct l2cap_conn *conn) · 2 unmodified lines | ||
| 712 | 712 | if (!key) |
| 713 | 713 | return 0; |
| 714 | 714 | |
| 715 | + if (sec_level > BT_SECURITY_MEDIUM && !key->authenticated) | |
| 716 | + return 0; | |
| 717 | + | |
| 715 | 718 | if (test_and_set_bit(HCI_CONN_ENCRYPT_PEND, &hcon->flags)) |
| 716 | 719 | return 1; |
| 717 | 720 | |
| @@ -732,7 +735,7 @@ static u8 smp_cmd_security_req(struct l2cap_conn *conn, struct sk_buff *skb) · 14 unmodified lines | ||
| 732 | 735 | |
| 733 | 736 | hcon->pending_sec_level = authreq_to_seclevel(rp->auth_req); |
| 734 | 737 | |
| 735 | − if (smp_ltk_encrypt(conn)) | |
| 738 | + if (smp_ltk_encrypt(conn, hcon->pending_sec_level)) | |
| 736 | 739 | return 0; |
| 737 | 740 | |
| 738 | 741 | 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 | ||
| 771 | 774 | return 1; |
| 772 | 775 | |
| 773 | 776 | if (hcon->link_mode & HCI_LM_MASTER) |
| 774 | − if (smp_ltk_encrypt(conn)) | |
| 777 | + if (smp_ltk_encrypt(conn, sec_level)) | |
| 775 | 778 | goto done; |
| 776 | 779 | |
| 777 | 780 | if (test_and_set_bit(HCI_CONN_LE_SMP_PEND, &hcon->flags)) |
| @@ -240,6 +240,7 @@ int br_add_bridge(struct net *net, const char *name) · 239 unmodified lines | ||
| 240 | 240 | return -ENOMEM; |
| 241 | 241 | |
| 242 | 242 | dev_net_set(dev, net); |
| 243 | + dev->rtnl_link_ops = &br_link_ops; | |
| 243 | 244 | |
| 244 | 245 | res = register_netdev(dev); |
| 245 | 246 | if (res) |
| @@ -208,7 +208,7 @@ static int br_validate(struct nlattr *tb[], struct nlattr *data[]) · 207 unmodified lines | ||
| 208 | 208 | return 0; |
| 209 | 209 | } |
| 210 | 210 | |
| 211 | −static struct rtnl_link_ops br_link_ops __read_mostly = { | |
| 211 | +struct rtnl_link_ops br_link_ops __read_mostly = { | |
| 212 | 212 | .kind = "bridge", |
| 213 | 213 | .priv_size = sizeof(struct net_bridge), |
| 214 | 214 | .setup = br_dev_setup, |
| @@ -549,6 +549,7 @@ extern int (*br_fdb_test_addr_hook)(struct net_device *dev, unsigned char *addr) · 548 unmodified lines | ||
| 549 | 549 | #endif |
| 550 | 550 | |
| 551 | 551 | /* br_netlink.c */ |
| 552 | +extern struct rtnl_link_ops br_link_ops; | |
| 552 | 553 | extern int br_netlink_init(void); |
| 553 | 554 | extern void br_netlink_fini(void); |
| 554 | 555 | extern void br_ifinfo_notify(int event, struct net_bridge_port *port); |
| @@ -4,8 +4,7 @@ · 3 unmodified lines | ||
| 4 | 4 | * Author: Sjur Brendeland/sjur.brandeland@stericsson.com |
| 5 | 5 | * License terms: GNU General Public License (GPL) version 2 |
| 6 | 6 | * |
| 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 | |
| 9 | 8 | * and Sakari Ailus <sakari.ailus@nokia.com> |
| 10 | 9 | */ |
| 11 | 10 | |
| @@ -220,6 +220,7 @@ static void caif_ctrl_cb(struct cflayer *layr, · 219 unmodified lines | ||
| 220 | 220 | cfsk_hold, cfsk_put); |
| 221 | 221 | cf_sk->sk.sk_state = CAIF_CONNECTED; |
| 222 | 222 | set_tx_flow_on(cf_sk); |
| 223 | + cf_sk->sk.sk_shutdown = 0; | |
| 223 | 224 | cf_sk->sk.sk_state_change(&cf_sk->sk); |
| 224 | 225 | break; |
| 225 | 226 | |
| @@ -681,9 +681,6 @@ static int raw_sendmsg(struct kiocb *iocb, struct socket *sock, · 680 unmodified lines | ||
| 681 | 681 | if (err < 0) |
| 682 | 682 | goto free_skb; |
| 683 | 683 | |
| 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 | − | |
| 687 | 684 | skb->dev = dev; |
| 688 | 685 | skb->sk = sk; |
| 689 | 686 | |
| @@ -2089,25 +2089,6 @@ static int dev_gso_segment(struct sk_buff *skb, netdev_features_t features) · 2088 unmodified lines | ||
| 2089 | 2089 | return 0; |
| 2090 | 2090 | } |
| 2091 | 2091 | |
| 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 | − | |
| 2111 | 2092 | static bool can_checksum_protocol(netdev_features_t features, __be16 protocol) |
| 2112 | 2093 | { |
| 2113 | 2094 | 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 | ||
| 2193 | 2174 | if (!list_empty(&ptype_all)) |
| 2194 | 2175 | dev_queue_xmit_nit(skb, dev); |
| 2195 | 2176 | |
| 2196 | − skb_orphan_try(skb); | |
| 2197 | − | |
| 2198 | 2177 | features = netif_skb_features(skb); |
| 2199 | 2178 | |
| 2200 | 2179 | 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 | ||
| 2304 | 2283 | if (skb->sk && skb->sk->sk_hash) |
| 2305 | 2284 | hash = skb->sk->sk_hash; |
| 2306 | 2285 | else |
| 2307 | − hash = (__force u16) skb->protocol ^ skb->rxhash; | |
| 2286 | + hash = (__force u16) skb->protocol; | |
| 2308 | 2287 | hash = jhash_1word(hash, hashrnd); |
| 2309 | 2288 | |
| 2310 | 2289 | return (u16) (((u64) hash * qcount) >> 32) + qoffset; |
| @@ -1349,8 +1349,8 @@ static int fib6_walk_continue(struct fib6_walker_t *w) · 1348 unmodified lines | ||
| 1349 | 1349 | if (w->leaf && fn->fn_flags & RTN_RTINFO) { |
| 1350 | 1350 | int err; |
| 1351 | 1351 | |
| 1352 | − if (w->count < w->skip) { | |
| 1353 | − w->count++; | |
| 1352 | + if (w->skip) { | |
| 1353 | + w->skip--; | |
| 1354 | 1354 | continue; |
| 1355 | 1355 | } |
| 1356 | 1356 | |
| @@ -2957,10 +2957,6 @@ static int __net_init ip6_route_net_init(struct net *net) · 2956 unmodified lines | ||
| 2957 | 2957 | net->ipv6.sysctl.ip6_rt_mtu_expires = 10*60*HZ; |
| 2958 | 2958 | net->ipv6.sysctl.ip6_rt_min_advmss = IPV6_MIN_MTU - 20 - 40; |
| 2959 | 2959 | |
| 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 | |
| 2964 | 2960 | net->ipv6.ip6_rt_gc_expire = 30*HZ; |
| 2965 | 2961 | |
| 2966 | 2962 | ret = 0; |
| @@ -2981,10 +2977,6 @@ out_ip6_dst_ops: · 14 unmodified lines | ||
| 2981 | 2977 | |
| 2982 | 2978 | static void __net_exit ip6_route_net_exit(struct net *net) |
| 2983 | 2979 | { |
| 2984 | −#ifdef CONFIG_PROC_FS | |
| 2985 | − proc_net_remove(net, "ipv6_route"); | |
| 2986 | − proc_net_remove(net, "rt6_stats"); | |
| 2987 | −#endif | |
| 2988 | 2980 | kfree(net->ipv6.ip6_null_entry); |
| 2989 | 2981 | #ifdef CONFIG_IPV6_MULTIPLE_TABLES |
| 2990 | 2982 | kfree(net->ipv6.ip6_prohibit_entry); |
| @@ -2993,11 +2985,33 @@ static void __net_exit ip6_route_net_exit(struct net *net) · 2 unmodified lines | ||
| 2993 | 2985 | dst_entries_destroy(&net->ipv6.ip6_dst_ops); |
| 2994 | 2986 | } |
| 2995 | 2987 | |
| 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 | + | |
| 2996 | 3005 | static struct pernet_operations ip6_route_net_ops = { |
| 2997 | 3006 | .init = ip6_route_net_init, |
| 2998 | 3007 | .exit = ip6_route_net_exit, |
| 2999 | 3008 | }; |
| 3000 | 3009 | |
| 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 | + | |
| 3001 | 3015 | static struct notifier_block ip6_route_dev_notifier = { |
| 3002 | 3016 | .notifier_call = ip6_route_dev_notify, |
| 3003 | 3017 | .priority = 0, |
| @@ -3047,19 +3061,25 @@ int __init ip6_route_init(void) · 43 unmodified lines | ||
| 3047 | 3061 | if (ret) |
| 3048 | 3062 | goto xfrm6_init; |
| 3049 | 3063 | |
| 3064 | + ret = register_pernet_subsys(&ip6_route_net_late_ops); | |
| 3065 | + if (ret) | |
| 3066 | + goto fib6_rules_init; | |
| 3067 | + | |
| 3050 | 3068 | ret = -ENOBUFS; |
| 3051 | 3069 | if (__rtnl_register(PF_INET6, RTM_NEWROUTE, inet6_rtm_newroute, NULL, NULL) || |
| 3052 | 3070 | __rtnl_register(PF_INET6, RTM_DELROUTE, inet6_rtm_delroute, NULL, NULL) || |
| 3053 | 3071 | __rtnl_register(PF_INET6, RTM_GETROUTE, inet6_rtm_getroute, NULL, NULL)) |
| 3054 | − goto fib6_rules_init; | |
| 3072 | + goto out_register_late_subsys; | |
| 3055 | 3073 | |
| 3056 | 3074 | ret = register_netdevice_notifier(&ip6_route_dev_notifier); |
| 3057 | 3075 | if (ret) |
| 3058 | − goto fib6_rules_init; | |
| 3076 | + goto out_register_late_subsys; | |
| 3059 | 3077 | |
| 3060 | 3078 | out: |
| 3061 | 3079 | return ret; |
| 3062 | 3080 | |
| 3081 | +out_register_late_subsys: | |
| 3082 | + unregister_pernet_subsys(&ip6_route_net_late_ops); | |
| 3063 | 3083 | fib6_rules_init: |
| 3064 | 3084 | fib6_rules_cleanup(); |
| 3065 | 3085 | xfrm6_init: |
| @@ -3078,6 +3098,7 @@ out_kmem_cache: · 12 unmodified lines | ||
| 3078 | 3098 | void ip6_route_cleanup(void) |
| 3079 | 3099 | { |
| 3080 | 3100 | unregister_netdevice_notifier(&ip6_route_dev_notifier); |
| 3101 | + unregister_pernet_subsys(&ip6_route_net_late_ops); | |
| 3081 | 3102 | fib6_rules_cleanup(); |
| 3082 | 3103 | xfrm6_fini(); |
| 3083 | 3104 | fib6_gc_cleanup(); |
| @@ -1212,7 +1212,8 @@ have_isn: · 1211 unmodified lines | ||
| 1212 | 1212 | tcp_rsk(req)->snt_isn = isn; |
| 1213 | 1213 | tcp_rsk(req)->snt_synack = tcp_time_stamp; |
| 1214 | 1214 | |
| 1215 | − security_inet_conn_request(sk, skb, req); | |
| 1215 | + if (security_inet_conn_request(sk, skb, req)) | |
| 1216 | + goto drop_and_release; | |
| 1216 | 1217 | |
| 1217 | 1218 | if (tcp_v6_send_synack(sk, req, |
| 1218 | 1219 | (struct request_values *)&tmp_ext, |
| @@ -372,7 +372,6 @@ static int afiucv_hs_send(struct iucv_message *imsg, struct sock *sock, · 371 unmodified lines | ||
| 372 | 372 | skb_trim(skb, skb->dev->mtu); |
| 373 | 373 | } |
| 374 | 374 | skb->protocol = ETH_P_AF_IUCV; |
| 375 | − skb_shinfo(skb)->tx_flags |= SKBTX_DRV_NEEDS_SK_REF; | |
| 376 | 375 | nskb = skb_clone(skb, GFP_ATOMIC); |
| 377 | 376 | if (!nskb) |
| 378 | 377 | return -ENOMEM; |
| @@ -42,6 +42,11 @@ struct l2tp_eth { · 41 unmodified lines | ||
| 42 | 42 | struct sock *tunnel_sock; |
| 43 | 43 | struct l2tp_session *session; |
| 44 | 44 | 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; | |
| 45 | 50 | }; |
| 46 | 51 | |
| 47 | 52 | /* 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 | ||
| 88 | 93 | struct l2tp_eth *priv = netdev_priv(dev); |
| 89 | 94 | struct l2tp_session *session = priv->session; |
| 90 | 95 | |
| 96 | + atomic_long_add(skb->len, &priv->tx_bytes); | |
| 97 | + atomic_long_inc(&priv->tx_packets); | |
| 98 | + | |
| 91 | 99 | l2tp_xmit_skb(session, skb, session->hdr_len); |
| 92 | 100 | |
| 93 | − dev->stats.tx_bytes += skb->len; | |
| 94 | − dev->stats.tx_packets++; | |
| 101 | + return NETDEV_TX_OK; | |
| 102 | +} | |
| 95 | 103 | |
| 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; | |
| 97 | 115 | } |
| 98 | 116 | |
| 117 | + | |
| 99 | 118 | static struct net_device_ops l2tp_eth_netdev_ops = { |
| 100 | 119 | .ndo_init = l2tp_eth_dev_init, |
| 101 | 120 | .ndo_uninit = l2tp_eth_dev_uninit, |
| 102 | 121 | .ndo_start_xmit = l2tp_eth_dev_xmit, |
| 122 | + .ndo_get_stats64 = l2tp_eth_get_stats64, | |
| 103 | 123 | }; |
| 104 | 124 | |
| 105 | 125 | static void l2tp_eth_dev_setup(struct net_device *dev) |
| 106 | 126 | { |
| 107 | 127 | 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; | |
| 109 | 130 | dev->netdev_ops = &l2tp_eth_netdev_ops; |
| 110 | 131 | dev->destructor = free_netdev; |
| 111 | 132 | } |
| @@ -114,17 +135,17 @@ static void l2tp_eth_dev_recv(struct l2tp_session *session, struct sk_buff *skb, · 2 unmodified lines | ||
| 114 | 135 | { |
| 115 | 136 | struct l2tp_eth_sess *spriv = l2tp_session_priv(session); |
| 116 | 137 | struct net_device *dev = spriv->dev; |
| 138 | + struct l2tp_eth *priv = netdev_priv(dev); | |
| 117 | 139 | |
| 118 | 140 | if (session->debug & L2TP_MSG_DATA) { |
| 119 | 141 | unsigned int length; |
| 120 | − u8 *ptr = skb->data; | |
| 121 | 142 | |
| 122 | 143 | length = min(32u, skb->len); |
| 123 | 144 | if (!pskb_may_pull(skb, length)) |
| 124 | 145 | goto error; |
| 125 | 146 | |
| 126 | 147 | 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); | |
| 128 | 149 | } |
| 129 | 150 | |
| 130 | 151 | 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 | ||
| 139 | 160 | nf_reset(skb); |
| 140 | 161 | |
| 141 | 162 | 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 | + } | |
| 147 | 168 | return; |
| 148 | 169 | |
| 149 | 170 | error: |
| 150 | − dev->stats.rx_errors++; | |
| 171 | + atomic_long_inc(&priv->rx_errors); | |
| 151 | 172 | kfree_skb(skb); |
| 152 | 173 | } |
| 153 | 174 | |
| @@ -2093,6 +2093,9 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy, · 2092 unmodified lines | ||
| 2093 | 2093 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); |
| 2094 | 2094 | int i, ret; |
| 2095 | 2095 | |
| 2096 | + if (!ieee80211_sdata_running(sdata)) | |
| 2097 | + return -ENETDOWN; | |
| 2098 | + | |
| 2096 | 2099 | if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) { |
| 2097 | 2100 | ret = drv_set_bitrate_mask(local, sdata, mask); |
| 2098 | 2101 | if (ret) |
| @@ -1352,6 +1352,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, · 1351 unmodified lines | ||
| 1352 | 1352 | if (WARN_ON(!ifmgd->associated)) |
| 1353 | 1353 | return; |
| 1354 | 1354 | |
| 1355 | + ieee80211_stop_poll(sdata); | |
| 1356 | + | |
| 1355 | 1357 | memcpy(bssid, ifmgd->associated->bssid, ETH_ALEN); |
| 1356 | 1358 | |
| 1357 | 1359 | ifmgd->associated = NULL; |
| @@ -2612,8 +2614,6 @@ static void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata, · 1254 unmodified lines | ||
| 2612 | 2614 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; |
| 2613 | 2615 | u8 frame_buf[DEAUTH_DISASSOC_LEN]; |
| 2614 | 2616 | |
| 2615 | − ieee80211_stop_poll(sdata); | |
| 2616 | − | |
| 2617 | 2617 | ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, reason, |
| 2618 | 2618 | false, frame_buf); |
| 2619 | 2619 | mutex_unlock(&ifmgd->mtx); |
| @@ -271,6 +271,9 @@ struct sta_ampdu_mlme { · 270 unmodified lines | ||
| 271 | 271 | * @plink_timer: peer link watch timer |
| 272 | 272 | * @plink_timer_was_running: used by suspend/resume to restore timers |
| 273 | 273 | * @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 | |
| 274 | 277 | * @debugfs: debug filesystem info |
| 275 | 278 | * @dead: set to true when sta is unlinked |
| 276 | 279 | * @uploaded: set to true when sta is uploaded to the driver |
| @@ -278,6 +281,8 @@ struct sta_ampdu_mlme { · 1 unmodified line | ||
| 278 | 281 | * @sta: station information we share with the driver |
| 279 | 282 | * @sta_state: duplicates information about station state (for debug) |
| 280 | 283 | * @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 | |
| 281 | 286 | */ |
| 282 | 287 | struct sta_info { |
| 283 | 288 | /* General information, mostly static */ |
| @@ -83,9 +83,10 @@ netdev_tx_t mac802154_tx(struct mac802154_priv *priv, struct sk_buff *skb, · 82 unmodified lines | ||
| 83 | 83 | { |
| 84 | 84 | struct xmit_work *work; |
| 85 | 85 | |
| 86 | − if (!(priv->phy->channels_supported[page] & (1 << chan))) | |
| 86 | + if (!(priv->phy->channels_supported[page] & (1 << chan))) { | |
| 87 | 87 | WARN_ON(1); |
| 88 | 88 | return NETDEV_TX_OK; |
| 89 | + } | |
| 89 | 90 | |
| 90 | 91 | if (!(priv->hw.flags & IEEE802154_HW_OMIT_CKSUM)) { |
| 91 | 92 | u16 crc = crc_ccitt(0, skb->data, skb->len); |
| @@ -5,8 +5,8 @@ · 4 unmodified lines | ||
| 5 | 5 | * |
| 6 | 6 | * Copyright (C) 2008 Nokia Corporation. |
| 7 | 7 | * |
| 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 | |
| 10 | 10 | * |
| 11 | 11 | * This program is free software; you can redistribute it and/or |
| 12 | 12 | * modify it under the terms of the GNU General Public License |
| @@ -5,8 +5,8 @@ · 4 unmodified lines | ||
| 5 | 5 | * |
| 6 | 6 | * Copyright (C) 2008 Nokia Corporation. |
| 7 | 7 | * |
| 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 | |
| 10 | 10 | * |
| 11 | 11 | * This program is free software; you can redistribute it and/or |
| 12 | 12 | * modify it under the terms of the GNU General Public License |
| @@ -5,7 +5,7 @@ · 4 unmodified lines | ||
| 5 | 5 | * |
| 6 | 6 | * Copyright (C) 2008 Nokia Corporation. |
| 7 | 7 | * |
| 8 | − * Author: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> | |
| 8 | + * Author: Rémi Denis-Courmont | |
| 9 | 9 | * |
| 10 | 10 | * This program is free software; you can redistribute it and/or |
| 11 | 11 | * modify it under the terms of the GNU General Public License |
| @@ -5,7 +5,7 @@ · 4 unmodified lines | ||
| 5 | 5 | * |
| 6 | 6 | * Copyright (C) 2008 Nokia Corporation. |
| 7 | 7 | * |
| 8 | − * Author: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> | |
| 8 | + * Author: Rémi Denis-Courmont | |
| 9 | 9 | * |
| 10 | 10 | * This program is free software; you can redistribute it and/or |
| 11 | 11 | * modify it under the terms of the GNU General Public License |
| @@ -5,8 +5,8 @@ · 4 unmodified lines | ||
| 5 | 5 | * |
| 6 | 6 | * Copyright (C) 2008 Nokia Corporation. |
| 7 | 7 | * |
| 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 | |
| 10 | 10 | * |
| 11 | 11 | * This program is free software; you can redistribute it and/or |
| 12 | 12 | * modify it under the terms of the GNU General Public License |
| @@ -5,8 +5,8 @@ · 4 unmodified lines | ||
| 5 | 5 | * |
| 6 | 6 | * Copyright (C) 2008 Nokia Corporation. |
| 7 | 7 | * |
| 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 | |
| 10 | 10 | * |
| 11 | 11 | * This program is free software; you can redistribute it and/or |
| 12 | 12 | * modify it under the terms of the GNU General Public License |
| @@ -5,8 +5,8 @@ · 4 unmodified lines | ||
| 5 | 5 | * |
| 6 | 6 | * Copyright (C) 2008 Nokia Corporation. |
| 7 | 7 | * |
| 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 | |
| 10 | 10 | * |
| 11 | 11 | * This program is free software; you can redistribute it and/or |
| 12 | 12 | * modify it under the terms of the GNU General Public License |
| @@ -5,7 +5,7 @@ · 4 unmodified lines | ||
| 5 | 5 | * |
| 6 | 6 | * Copyright (C) 2008 Nokia Corporation. |
| 7 | 7 | * |
| 8 | − * Contact: Remi Denis-Courmont <remi.denis-courmont@nokia.com> | |
| 8 | + * Author: Rémi Denis-Courmont | |
| 9 | 9 | * |
| 10 | 10 | * This program is free software; you can redistribute it and/or |
| 11 | 11 | * modify it under the terms of the GNU General Public License |
| @@ -673,7 +673,9 @@ void sctp_addr_wq_timeout_handler(unsigned long arg) · 672 unmodified lines | ||
| 673 | 673 | SCTP_DEBUG_PRINTK("sctp_addrwq_timo_handler: sctp_asconf_mgmt failed\n"); |
| 674 | 674 | sctp_bh_unlock_sock(sk); |
| 675 | 675 | } |
| 676 | +#if IS_ENABLED(CONFIG_IPV6) | |
| 676 | 677 | free_next: |
| 678 | +#endif | |
| 677 | 679 | list_del(&addrw->list); |
| 678 | 680 | kfree(addrw); |
| 679 | 681 | } |
| @@ -1389,7 +1389,7 @@ static void reg_set_request_processed(void) · 1388 unmodified lines | ||
| 1389 | 1389 | spin_unlock(®_requests_lock); |
| 1390 | 1390 | |
| 1391 | 1391 | if (last_request->initiator == NL80211_REGDOM_SET_BY_USER) |
| 1392 | − cancel_delayed_work_sync(®_timeout); | |
| 1392 | + cancel_delayed_work(®_timeout); | |
| 1393 | 1393 | |
| 1394 | 1394 | if (need_more_processing) |
| 1395 | 1395 | schedule_work(®_work); |
| @@ -804,7 +804,7 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev, · 803 unmodified lines | ||
| 804 | 804 | ntype == NL80211_IFTYPE_P2P_CLIENT)) |
| 805 | 805 | return -EBUSY; |
| 806 | 806 | |
| 807 | − if (ntype != otype) { | |
| 807 | + if (ntype != otype && netif_running(dev)) { | |
| 808 | 808 | err = cfg80211_can_change_interface(rdev, dev->ieee80211_ptr, |
| 809 | 809 | ntype); |
| 810 | 810 | if (err) |
File mode changed from 100644 to 100755.
| @@ -37,8 +37,8 @@ MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>"); · 36 unmodified lines | ||
| 37 | 37 | MODULE_DESCRIPTION("Routines for control of TEA5757/5759 Philips AM/FM radio tuner chips"); |
| 38 | 38 | MODULE_LICENSE("GPL"); |
| 39 | 39 | |
| 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) | |
| 42 | 42 | |
| 43 | 43 | /* |
| 44 | 44 | * definitions |
| @@ -120,9 +120,9 @@ static u32 snd_tea575x_read(struct snd_tea575x *tea) · 75 unmodified lines | ||
| 120 | 120 | return data; |
| 121 | 121 | } |
| 122 | 122 | |
| 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) | |
| 124 | 124 | { |
| 125 | − u32 freq = snd_tea575x_read(tea) & TEA575X_BIT_FREQ_MASK; | |
| 125 | + u32 freq = val & TEA575X_BIT_FREQ_MASK; | |
| 126 | 126 | |
| 127 | 127 | if (freq == 0) |
| 128 | 128 | return freq; |
| @@ -139,6 +139,11 @@ static u32 snd_tea575x_get_freq(struct snd_tea575x *tea) · 10 unmodified lines | ||
| 139 | 139 | return clamp(freq * 16, FREQ_LO, FREQ_HI); /* from kHz */ |
| 140 | 140 | } |
| 141 | 141 | |
| 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 | + | |
| 142 | 147 | static void snd_tea575x_set_freq(struct snd_tea575x *tea) |
| 143 | 148 | { |
| 144 | 149 | u32 freq = tea->freq; |
| @@ -156,6 +161,7 @@ static void snd_tea575x_set_freq(struct snd_tea575x *tea) · 11 unmodified lines | ||
| 156 | 161 | tea->val &= ~TEA575X_BIT_FREQ_MASK; |
| 157 | 162 | tea->val |= freq & TEA575X_BIT_FREQ_MASK; |
| 158 | 163 | snd_tea575x_write(tea, tea->val); |
| 164 | + tea->freq = snd_tea575x_val_to_freq(tea, tea->val); | |
| 159 | 165 | } |
| 160 | 166 | |
| 161 | 167 | /* |
| @@ -317,7 +323,6 @@ static int tea575x_s_ctrl(struct v4l2_ctrl *ctrl) · 155 unmodified lines | ||
| 317 | 323 | } |
| 318 | 324 | |
| 319 | 325 | static const struct v4l2_file_operations tea575x_fops = { |
| 320 | − .owner = THIS_MODULE, | |
| 321 | 326 | .unlocked_ioctl = video_ioctl2, |
| 322 | 327 | .open = v4l2_fh_open, |
| 323 | 328 | .release = v4l2_fh_release, |
| @@ -337,7 +342,6 @@ static const struct v4l2_ioctl_ops tea575x_ioctl_ops = { · 13 unmodified lines | ||
| 337 | 342 | }; |
| 338 | 343 | |
| 339 | 344 | static const struct video_device tea575x_radio = { |
| 340 | − .fops = &tea575x_fops, | |
| 341 | 345 | .ioctl_ops = &tea575x_ioctl_ops, |
| 342 | 346 | .release = video_device_release_empty, |
| 343 | 347 | }; |
| @@ -349,7 +353,7 @@ static const struct v4l2_ctrl_ops tea575x_ctrl_ops = { · 5 unmodified lines | ||
| 349 | 353 | /* |
| 350 | 354 | * initialize all the tea575x chips |
| 351 | 355 | */ |
| 352 | −int snd_tea575x_init(struct snd_tea575x *tea) | |
| 356 | +int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner) | |
| 353 | 357 | { |
| 354 | 358 | int retval; |
| 355 | 359 | |
| @@ -374,6 +378,9 @@ int snd_tea575x_init(struct snd_tea575x *tea) · 18 unmodified lines | ||
| 374 | 378 | tea->vd.lock = &tea->mutex; |
| 375 | 379 | tea->vd.v4l2_dev = tea->v4l2_dev; |
| 376 | 380 | tea->vd.ctrl_handler = &tea->ctrl_handler; |
| 381 | + tea->fops = tea575x_fops; | |
| 382 | + tea->fops.owner = owner; | |
| 383 | + tea->vd.fops = &tea->fops; | |
| 377 | 384 | set_bit(V4L2_FL_USE_FH_PRIO, &tea->vd.flags); |
| 378 | 385 | /* disable hw_freq_seek if we can't use it */ |
| 379 | 386 | if (tea->cannot_read_data) |
| @@ -2769,7 +2769,7 @@ static int __devinit snd_es1968_create(struct snd_card *card, · 2768 unmodified lines | ||
| 2769 | 2769 | chip->tea.ops = &snd_es1968_tea_ops; |
| 2770 | 2770 | strlcpy(chip->tea.card, "SF64-PCE2", sizeof(chip->tea.card)); |
| 2771 | 2771 | 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)) | |
| 2773 | 2773 | printk(KERN_INFO "es1968: detected TEA575x radio\n"); |
| 2774 | 2774 | #endif |
| 2775 | 2775 | |
| @@ -1254,7 +1254,7 @@ static int __devinit snd_fm801_create(struct snd_card *card, · 1253 unmodified lines | ||
| 1254 | 1254 | sprintf(chip->tea.bus_info, "PCI:%s", pci_name(pci)); |
| 1255 | 1255 | if ((tea575x_tuner & TUNER_TYPE_MASK) > 0 && |
| 1256 | 1256 | (tea575x_tuner & TUNER_TYPE_MASK) < 4) { |
| 1257 | − if (snd_tea575x_init(&chip->tea)) { | |
| 1257 | + if (snd_tea575x_init(&chip->tea, THIS_MODULE)) { | |
| 1258 | 1258 | snd_printk(KERN_ERR "TEA575x radio not found\n"); |
| 1259 | 1259 | snd_fm801_free(chip); |
| 1260 | 1260 | return -ENODEV; |
| @@ -1263,7 +1263,7 @@ static int __devinit snd_fm801_create(struct snd_card *card, · 2 unmodified lines | ||
| 1263 | 1263 | /* autodetect tuner connection */ |
| 1264 | 1264 | for (tea575x_tuner = 1; tea575x_tuner <= 3; tea575x_tuner++) { |
| 1265 | 1265 | chip->tea575x_tuner = tea575x_tuner; |
| 1266 | − if (!snd_tea575x_init(&chip->tea)) { | |
| 1266 | + if (!snd_tea575x_init(&chip->tea, THIS_MODULE)) { | |
| 1267 | 1267 | snd_printk(KERN_INFO "detected TEA575x radio type %s\n", |
| 1268 | 1268 | get_tea575x_gpio(chip)->name); |
| 1269 | 1269 | break; |
| @@ -97,19 +97,6 @@ config SND_HDA_CODEC_REALTEK · 96 unmodified lines | ||
| 97 | 97 | snd-hda-codec-realtek. |
| 98 | 98 | This module is automatically loaded at probing. |
| 99 | 99 | |
| 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 | − | |
| 113 | 100 | config SND_HDA_CODEC_ANALOG |
| 114 | 101 | bool "Build Analog Device HD-audio codec support" |
| 115 | 102 | default y |
| @@ -618,7 +618,6 @@ int snd_hda_gen_add_verbs(struct hda_gen_spec *spec, · 617 unmodified lines | ||
| 618 | 618 | const struct hda_verb *list) |
| 619 | 619 | { |
| 620 | 620 | const struct hda_verb **v; |
| 621 | − snd_array_init(&spec->verbs, sizeof(struct hda_verb *), 8); | |
| 622 | 621 | v = snd_array_new(&spec->verbs); |
| 623 | 622 | if (!v) |
| 624 | 623 | return -ENOMEM; |
| @@ -157,4 +157,14 @@ void snd_hda_pick_fixup(struct hda_codec *codec, · 156 unmodified lines | ||
| 157 | 157 | const struct snd_pci_quirk *quirk, |
| 158 | 158 | const struct hda_fixup *fixlist); |
| 159 | 159 | |
| 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 | + | |
| 160 | 170 | #endif /* __SOUND_HDA_AUTO_PARSER_H */ |
| @@ -1184,6 +1184,7 @@ static void snd_hda_codec_free(struct hda_codec *codec) · 1183 unmodified lines | ||
| 1184 | 1184 | { |
| 1185 | 1185 | if (!codec) |
| 1186 | 1186 | return; |
| 1187 | + snd_hda_jack_tbl_clear(codec); | |
| 1187 | 1188 | restore_init_pincfgs(codec); |
| 1188 | 1189 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
| 1189 | 1190 | cancel_delayed_work(&codec->power_work); |
| @@ -1192,6 +1193,7 @@ static void snd_hda_codec_free(struct hda_codec *codec) · 2 unmodified lines | ||
| 1192 | 1193 | list_del(&codec->list); |
| 1193 | 1194 | snd_array_free(&codec->mixers); |
| 1194 | 1195 | snd_array_free(&codec->nids); |
| 1196 | + snd_array_free(&codec->cvt_setups); | |
| 1195 | 1197 | snd_array_free(&codec->conn_lists); |
| 1196 | 1198 | snd_array_free(&codec->spdif_out); |
| 1197 | 1199 | codec->bus->caddr_tbl[codec->addr] = NULL; |
| @@ -2333,6 +2335,8 @@ int snd_hda_codec_reset(struct hda_codec *codec) · 1135 unmodified lines | ||
| 2333 | 2335 | /* free only driver_pins so that init_pins + user_pins are restored */ |
| 2334 | 2336 | snd_array_free(&codec->driver_pins); |
| 2335 | 2337 | restore_pincfgs(codec); |
| 2338 | + snd_array_free(&codec->cvt_setups); | |
| 2339 | + snd_array_free(&codec->spdif_out); | |
| 2336 | 2340 | codec->num_pcms = 0; |
| 2337 | 2341 | codec->pcm_info = NULL; |
| 2338 | 2342 | codec->preset = NULL; |
| @@ -445,8 +445,10 @@ static int conexant_init(struct hda_codec *codec) · 444 unmodified lines | ||
| 445 | 445 | |
| 446 | 446 | static void conexant_free(struct hda_codec *codec) |
| 447 | 447 | { |
| 448 | + struct conexant_spec *spec = codec->spec; | |
| 449 | + snd_hda_gen_free(&spec->gen); | |
| 448 | 450 | snd_hda_detach_beep_device(codec); |
| 449 | − kfree(codec->spec); | |
| 451 | + kfree(spec); | |
| 450 | 452 | } |
| 451 | 453 | |
| 452 | 454 | static const struct snd_kcontrol_new cxt_capture_mixers[] = { |
| @@ -4466,6 +4468,7 @@ static const struct snd_pci_quirk cxt5066_fixups[] = { · 4013 unmodified lines | ||
| 4466 | 4468 | SND_PCI_QUIRK(0x17aa, 0x21ce, "Lenovo T420", CXT_PINCFG_LENOVO_TP410), |
| 4467 | 4469 | SND_PCI_QUIRK(0x17aa, 0x21cf, "Lenovo T520", CXT_PINCFG_LENOVO_TP410), |
| 4468 | 4470 | SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC), |
| 4471 | + SND_PCI_QUIRK(0x17aa, 0x397b, "Lenovo S205", CXT_FIXUP_STEREO_DMIC), | |
| 4469 | 4472 | {} |
| 4470 | 4473 | }; |
| 4471 | 4474 | |
| @@ -4497,6 +4500,7 @@ static int patch_conexant_auto(struct hda_codec *codec) · 25 unmodified lines | ||
| 4497 | 4500 | if (!spec) |
| 4498 | 4501 | return -ENOMEM; |
| 4499 | 4502 | codec->spec = spec; |
| 4503 | + snd_hda_gen_init(&spec->gen); | |
| 4500 | 4504 | |
| 4501 | 4505 | switch (codec->vendor_id) { |
| 4502 | 4506 | case 0x14f15045: |
| @@ -2289,6 +2289,7 @@ static void alc_free(struct hda_codec *codec) · 2288 unmodified lines | ||
| 2289 | 2289 | alc_shutup(codec); |
| 2290 | 2290 | alc_free_kctls(codec); |
| 2291 | 2291 | alc_free_bind_ctls(codec); |
| 2292 | + snd_hda_gen_free(&spec->gen); | |
| 2292 | 2293 | kfree(spec); |
| 2293 | 2294 | snd_hda_detach_beep_device(codec); |
| 2294 | 2295 | } |
| @@ -4253,6 +4254,7 @@ static int alc_alloc_spec(struct hda_codec *codec, hda_nid_t mixer_nid) · 1958 unmodified lines | ||
| 4253 | 4254 | return -ENOMEM; |
| 4254 | 4255 | codec->spec = spec; |
| 4255 | 4256 | spec->mixer_nid = mixer_nid; |
| 4257 | + snd_hda_gen_init(&spec->gen); | |
| 4256 | 4258 | |
| 4257 | 4259 | err = alc_codec_rename_from_preset(codec); |
| 4258 | 4260 | if (err < 0) { |
| @@ -6705,6 +6707,12 @@ static int patch_alc662(struct hda_codec *codec) · 2446 unmodified lines | ||
| 6705 | 6707 | |
| 6706 | 6708 | alc_fix_pll_init(codec, 0x20, 0x04, 15); |
| 6707 | 6709 | |
| 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 | + | |
| 6708 | 6716 | if ((alc_get_coef0(codec) & (1 << 14)) && |
| 6709 | 6717 | codec->bus->pci->subsystem_vendor == 0x1025 && |
| 6710 | 6718 | spec->cdefine.platform_type == 1) { |
| @@ -6712,12 +6720,6 @@ static int patch_alc662(struct hda_codec *codec) · 1 unmodified line | ||
| 6712 | 6720 | goto error; |
| 6713 | 6721 | } |
| 6714 | 6722 | |
| 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 | − | |
| 6721 | 6723 | /* automatic parse from the BIOS config */ |
| 6722 | 6724 | err = alc662_parse_auto_config(codec); |
| 6723 | 6725 | if (err < 0) |
| @@ -6800,6 +6802,7 @@ static const struct hda_codec_preset snd_hda_preset_realtek[] = { · 76 unmodified lines | ||
| 6800 | 6802 | { .id = 0x10ec0272, .name = "ALC272", .patch = patch_alc662 }, |
| 6801 | 6803 | { .id = 0x10ec0275, .name = "ALC275", .patch = patch_alc269 }, |
| 6802 | 6804 | { .id = 0x10ec0276, .name = "ALC276", .patch = patch_alc269 }, |
| 6805 | + { .id = 0x10ec0280, .name = "ALC280", .patch = patch_alc269 }, | |
| 6803 | 6806 | { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660", |
| 6804 | 6807 | .patch = patch_alc861 }, |
| 6805 | 6808 | { .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd }, |
| @@ -4367,7 +4367,7 @@ static int stac92xx_init(struct hda_codec *codec) · 4366 unmodified lines | ||
| 4367 | 4367 | AC_PINCTL_IN_EN); |
| 4368 | 4368 | for (i = 0; i < spec->num_pwrs; i++) { |
| 4369 | 4369 | hda_nid_t nid = spec->pwr_nids[i]; |
| 4370 | − int pinctl, def_conf; | |
| 4370 | + unsigned int pinctl, def_conf; | |
| 4371 | 4371 | |
| 4372 | 4372 | def_conf = snd_hda_codec_get_pincfg(codec, nid); |
| 4373 | 4373 | def_conf = get_defcfg_connect(def_conf); |
| @@ -4376,6 +4376,11 @@ static int stac92xx_init(struct hda_codec *codec) · 2 unmodified lines | ||
| 4376 | 4376 | stac_toggle_power_map(codec, nid, 0); |
| 4377 | 4377 | continue; |
| 4378 | 4378 | } |
| 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 | + } | |
| 4379 | 4384 | /* power on when no jack detection is available */ |
| 4380 | 4385 | /* or when the VREF is used for controlling LED */ |
| 4381 | 4386 | if (!spec->hp_detect || |
| @@ -724,9 +724,6 @@ static void wm1811_jackdet_set_mode(struct snd_soc_codec *codec, u16 mode) · 723 unmodified lines | ||
| 724 | 724 | { |
| 725 | 725 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); |
| 726 | 726 | |
| 727 | − if (!wm8994->jackdet || !wm8994->jack_cb) | |
| 728 | − return; | |
| 729 | − | |
| 730 | 727 | if (!wm8994->jackdet || !wm8994->jack_cb) |
| 731 | 728 | return; |
| 732 | 729 | |
| @@ -341,6 +341,14 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = { · 340 unmodified lines | ||
| 341 | 341 | .map = audigy2nx_map, |
| 342 | 342 | .selector_map = audigy2nx_selectors, |
| 343 | 343 | }, |
| 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 | + }, | |
| 344 | 352 | { |
| 345 | 353 | /* Hercules DJ Console (Windows Edition) */ |
| 346 | 354 | .id = USB_ID(0x06f8, 0xb000), |
| @@ -1831,6 +1831,36 @@ YAMAHA_DEVICE(0x7010, "UB99"), · 1830 unmodified lines | ||
| 1831 | 1831 | } |
| 1832 | 1832 | } |
| 1833 | 1833 | }, |
| 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 | +}, | |
| 1834 | 1864 | |
| 1835 | 1865 | /* Guillemot devices */ |
| 1836 | 1866 | { |