diff options
author | David S. Miller <davem@davemloft.net> | 2014-01-14 17:37:09 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-14 17:42:42 -0500 |
commit | 0a379e21c503b2ff66b44d588df9f231e9b0b9ca (patch) | |
tree | 22b875fcf4b67fcd007726f00c5fc1748ce985d0 /drivers | |
parent | a49da8811e71c5355b52c65ee32976741d5834cd (diff) | |
parent | fdc3452cd2c7b2bfe0f378f92123f4f9a98fa2bd (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers')
69 files changed, 467 insertions, 248 deletions
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index 8711e3797165..3c2e4aa529c4 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c | |||
@@ -207,7 +207,7 @@ static int acpi_ac_probe(struct platform_device *pdev) | |||
207 | goto end; | 207 | goto end; |
208 | 208 | ||
209 | result = acpi_install_notify_handler(ACPI_HANDLE(&pdev->dev), | 209 | result = acpi_install_notify_handler(ACPI_HANDLE(&pdev->dev), |
210 | ACPI_DEVICE_NOTIFY, acpi_ac_notify_handler, ac); | 210 | ACPI_ALL_NOTIFY, acpi_ac_notify_handler, ac); |
211 | if (result) { | 211 | if (result) { |
212 | power_supply_unregister(&ac->charger); | 212 | power_supply_unregister(&ac->charger); |
213 | goto end; | 213 | goto end; |
@@ -255,7 +255,7 @@ static int acpi_ac_remove(struct platform_device *pdev) | |||
255 | return -EINVAL; | 255 | return -EINVAL; |
256 | 256 | ||
257 | acpi_remove_notify_handler(ACPI_HANDLE(&pdev->dev), | 257 | acpi_remove_notify_handler(ACPI_HANDLE(&pdev->dev), |
258 | ACPI_DEVICE_NOTIFY, acpi_ac_notify_handler); | 258 | ACPI_ALL_NOTIFY, acpi_ac_notify_handler); |
259 | 259 | ||
260 | ac = platform_get_drvdata(pdev); | 260 | ac = platform_get_drvdata(pdev); |
261 | if (ac->charger.dev) | 261 | if (ac->charger.dev) |
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index fbf1aceda8b8..5876a49dfd38 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c | |||
@@ -62,6 +62,7 @@ MODULE_AUTHOR("Alexey Starikovskiy <astarikovskiy@suse.de>"); | |||
62 | MODULE_DESCRIPTION("ACPI Battery Driver"); | 62 | MODULE_DESCRIPTION("ACPI Battery Driver"); |
63 | MODULE_LICENSE("GPL"); | 63 | MODULE_LICENSE("GPL"); |
64 | 64 | ||
65 | static int battery_bix_broken_package; | ||
65 | static unsigned int cache_time = 1000; | 66 | static unsigned int cache_time = 1000; |
66 | module_param(cache_time, uint, 0644); | 67 | module_param(cache_time, uint, 0644); |
67 | MODULE_PARM_DESC(cache_time, "cache time in milliseconds"); | 68 | MODULE_PARM_DESC(cache_time, "cache time in milliseconds"); |
@@ -416,7 +417,12 @@ static int acpi_battery_get_info(struct acpi_battery *battery) | |||
416 | ACPI_EXCEPTION((AE_INFO, status, "Evaluating %s", name)); | 417 | ACPI_EXCEPTION((AE_INFO, status, "Evaluating %s", name)); |
417 | return -ENODEV; | 418 | return -ENODEV; |
418 | } | 419 | } |
419 | if (test_bit(ACPI_BATTERY_XINFO_PRESENT, &battery->flags)) | 420 | |
421 | if (battery_bix_broken_package) | ||
422 | result = extract_package(battery, buffer.pointer, | ||
423 | extended_info_offsets + 1, | ||
424 | ARRAY_SIZE(extended_info_offsets) - 1); | ||
425 | else if (test_bit(ACPI_BATTERY_XINFO_PRESENT, &battery->flags)) | ||
420 | result = extract_package(battery, buffer.pointer, | 426 | result = extract_package(battery, buffer.pointer, |
421 | extended_info_offsets, | 427 | extended_info_offsets, |
422 | ARRAY_SIZE(extended_info_offsets)); | 428 | ARRAY_SIZE(extended_info_offsets)); |
@@ -754,6 +760,17 @@ static int battery_notify(struct notifier_block *nb, | |||
754 | return 0; | 760 | return 0; |
755 | } | 761 | } |
756 | 762 | ||
763 | static struct dmi_system_id bat_dmi_table[] = { | ||
764 | { | ||
765 | .ident = "NEC LZ750/LS", | ||
766 | .matches = { | ||
767 | DMI_MATCH(DMI_SYS_VENDOR, "NEC"), | ||
768 | DMI_MATCH(DMI_PRODUCT_NAME, "PC-LZ750LS"), | ||
769 | }, | ||
770 | }, | ||
771 | {}, | ||
772 | }; | ||
773 | |||
757 | static int acpi_battery_add(struct acpi_device *device) | 774 | static int acpi_battery_add(struct acpi_device *device) |
758 | { | 775 | { |
759 | int result = 0; | 776 | int result = 0; |
@@ -846,6 +863,9 @@ static void __init acpi_battery_init_async(void *unused, async_cookie_t cookie) | |||
846 | { | 863 | { |
847 | if (acpi_disabled) | 864 | if (acpi_disabled) |
848 | return; | 865 | return; |
866 | |||
867 | if (dmi_check_system(bat_dmi_table)) | ||
868 | battery_bix_broken_package = 1; | ||
849 | acpi_bus_register_driver(&acpi_battery_driver); | 869 | acpi_bus_register_driver(&acpi_battery_driver); |
850 | } | 870 | } |
851 | 871 | ||
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index bba9b72e25f8..0710004055c8 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -156,6 +156,16 @@ int acpi_bus_get_private_data(acpi_handle handle, void **data) | |||
156 | } | 156 | } |
157 | EXPORT_SYMBOL(acpi_bus_get_private_data); | 157 | EXPORT_SYMBOL(acpi_bus_get_private_data); |
158 | 158 | ||
159 | void acpi_bus_no_hotplug(acpi_handle handle) | ||
160 | { | ||
161 | struct acpi_device *adev = NULL; | ||
162 | |||
163 | acpi_bus_get_device(handle, &adev); | ||
164 | if (adev) | ||
165 | adev->flags.no_hotplug = true; | ||
166 | } | ||
167 | EXPORT_SYMBOL_GPL(acpi_bus_no_hotplug); | ||
168 | |||
159 | static void acpi_print_osc_error(acpi_handle handle, | 169 | static void acpi_print_osc_error(acpi_handle handle, |
160 | struct acpi_osc_context *context, char *error) | 170 | struct acpi_osc_context *context, char *error) |
161 | { | 171 | { |
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index c0ed4f273cf2..e3a92a6da39a 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -427,6 +427,9 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
427 | .driver_data = board_ahci_yes_fbs }, /* 88se9128 */ | 427 | .driver_data = board_ahci_yes_fbs }, /* 88se9128 */ |
428 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9125), | 428 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9125), |
429 | .driver_data = board_ahci_yes_fbs }, /* 88se9125 */ | 429 | .driver_data = board_ahci_yes_fbs }, /* 88se9125 */ |
430 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_MARVELL_EXT, 0x9178, | ||
431 | PCI_VENDOR_ID_MARVELL_EXT, 0x9170), | ||
432 | .driver_data = board_ahci_yes_fbs }, /* 88se9170 */ | ||
430 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x917a), | 433 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x917a), |
431 | .driver_data = board_ahci_yes_fbs }, /* 88se9172 */ | 434 | .driver_data = board_ahci_yes_fbs }, /* 88se9172 */ |
432 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9172), | 435 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9172), |
diff --git a/drivers/ata/sata_sis.c b/drivers/ata/sata_sis.c index fe3ca0989b14..1ad2f62d34b9 100644 --- a/drivers/ata/sata_sis.c +++ b/drivers/ata/sata_sis.c | |||
@@ -83,6 +83,10 @@ static struct pci_driver sis_pci_driver = { | |||
83 | .id_table = sis_pci_tbl, | 83 | .id_table = sis_pci_tbl, |
84 | .probe = sis_init_one, | 84 | .probe = sis_init_one, |
85 | .remove = ata_pci_remove_one, | 85 | .remove = ata_pci_remove_one, |
86 | #ifdef CONFIG_PM | ||
87 | .suspend = ata_pci_device_suspend, | ||
88 | .resume = ata_pci_device_resume, | ||
89 | #endif | ||
86 | }; | 90 | }; |
87 | 91 | ||
88 | static struct scsi_host_template sis_sht = { | 92 | static struct scsi_host_template sis_sht = { |
diff --git a/drivers/char/tpm/tpm_ppi.c b/drivers/char/tpm/tpm_ppi.c index 8e562dc65601..e1f3337a0cf9 100644 --- a/drivers/char/tpm/tpm_ppi.c +++ b/drivers/char/tpm/tpm_ppi.c | |||
@@ -27,15 +27,18 @@ static char *tpm_device_name = "TPM"; | |||
27 | static acpi_status ppi_callback(acpi_handle handle, u32 level, void *context, | 27 | static acpi_status ppi_callback(acpi_handle handle, u32 level, void *context, |
28 | void **return_value) | 28 | void **return_value) |
29 | { | 29 | { |
30 | acpi_status status; | 30 | acpi_status status = AE_OK; |
31 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | 31 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
32 | status = acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer); | 32 | |
33 | if (strstr(buffer.pointer, context) != NULL) { | 33 | if (ACPI_SUCCESS(acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer))) { |
34 | *return_value = handle; | 34 | if (strstr(buffer.pointer, context) != NULL) { |
35 | *return_value = handle; | ||
36 | status = AE_CTRL_TERMINATE; | ||
37 | } | ||
35 | kfree(buffer.pointer); | 38 | kfree(buffer.pointer); |
36 | return AE_CTRL_TERMINATE; | ||
37 | } | 39 | } |
38 | return AE_OK; | 40 | |
41 | return status; | ||
39 | } | 42 | } |
40 | 43 | ||
41 | static inline void ppi_assign_params(union acpi_object params[4], | 44 | static inline void ppi_assign_params(union acpi_object params[4], |
diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c index 8d3009e44fba..5543b7df8e16 100644 --- a/drivers/clk/clk-divider.c +++ b/drivers/clk/clk-divider.c | |||
@@ -87,7 +87,7 @@ static unsigned int _get_table_val(const struct clk_div_table *table, | |||
87 | return 0; | 87 | return 0; |
88 | } | 88 | } |
89 | 89 | ||
90 | static unsigned int _get_val(struct clk_divider *divider, u8 div) | 90 | static unsigned int _get_val(struct clk_divider *divider, unsigned int div) |
91 | { | 91 | { |
92 | if (divider->flags & CLK_DIVIDER_ONE_BASED) | 92 | if (divider->flags & CLK_DIVIDER_ONE_BASED) |
93 | return div; | 93 | return div; |
diff --git a/drivers/clk/samsung/clk-exynos-audss.c b/drivers/clk/samsung/clk-exynos-audss.c index 39b40aaede2b..68e515d093d8 100644 --- a/drivers/clk/samsung/clk-exynos-audss.c +++ b/drivers/clk/samsung/clk-exynos-audss.c | |||
@@ -26,17 +26,17 @@ static struct clk_onecell_data clk_data; | |||
26 | #define ASS_CLK_DIV 0x4 | 26 | #define ASS_CLK_DIV 0x4 |
27 | #define ASS_CLK_GATE 0x8 | 27 | #define ASS_CLK_GATE 0x8 |
28 | 28 | ||
29 | /* list of all parent clock list */ | ||
30 | static const char *mout_audss_p[] = { "fin_pll", "fout_epll" }; | ||
31 | static const char *mout_i2s_p[] = { "mout_audss", "cdclk0", "sclk_audio0" }; | ||
32 | |||
33 | #ifdef CONFIG_PM_SLEEP | ||
29 | static unsigned long reg_save[][2] = { | 34 | static unsigned long reg_save[][2] = { |
30 | {ASS_CLK_SRC, 0}, | 35 | {ASS_CLK_SRC, 0}, |
31 | {ASS_CLK_DIV, 0}, | 36 | {ASS_CLK_DIV, 0}, |
32 | {ASS_CLK_GATE, 0}, | 37 | {ASS_CLK_GATE, 0}, |
33 | }; | 38 | }; |
34 | 39 | ||
35 | /* list of all parent clock list */ | ||
36 | static const char *mout_audss_p[] = { "fin_pll", "fout_epll" }; | ||
37 | static const char *mout_i2s_p[] = { "mout_audss", "cdclk0", "sclk_audio0" }; | ||
38 | |||
39 | #ifdef CONFIG_PM_SLEEP | ||
40 | static int exynos_audss_clk_suspend(void) | 40 | static int exynos_audss_clk_suspend(void) |
41 | { | 41 | { |
42 | int i; | 42 | int i; |
diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers/clk/samsung/clk-exynos4.c index ad5ff50c5f28..1a7c1b929c69 100644 --- a/drivers/clk/samsung/clk-exynos4.c +++ b/drivers/clk/samsung/clk-exynos4.c | |||
@@ -39,7 +39,7 @@ | |||
39 | #define SRC_TOP1 0xc214 | 39 | #define SRC_TOP1 0xc214 |
40 | #define SRC_CAM 0xc220 | 40 | #define SRC_CAM 0xc220 |
41 | #define SRC_TV 0xc224 | 41 | #define SRC_TV 0xc224 |
42 | #define SRC_MFC 0xcc28 | 42 | #define SRC_MFC 0xc228 |
43 | #define SRC_G3D 0xc22c | 43 | #define SRC_G3D 0xc22c |
44 | #define E4210_SRC_IMAGE 0xc230 | 44 | #define E4210_SRC_IMAGE 0xc230 |
45 | #define SRC_LCD0 0xc234 | 45 | #define SRC_LCD0 0xc234 |
diff --git a/drivers/clk/samsung/clk-exynos5250.c b/drivers/clk/samsung/clk-exynos5250.c index adf32343c9f9..e52359cf9b6f 100644 --- a/drivers/clk/samsung/clk-exynos5250.c +++ b/drivers/clk/samsung/clk-exynos5250.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #define MPLL_LOCK 0x4000 | 25 | #define MPLL_LOCK 0x4000 |
26 | #define MPLL_CON0 0x4100 | 26 | #define MPLL_CON0 0x4100 |
27 | #define SRC_CORE1 0x4204 | 27 | #define SRC_CORE1 0x4204 |
28 | #define GATE_IP_ACP 0x8800 | ||
28 | #define CPLL_LOCK 0x10020 | 29 | #define CPLL_LOCK 0x10020 |
29 | #define EPLL_LOCK 0x10030 | 30 | #define EPLL_LOCK 0x10030 |
30 | #define VPLL_LOCK 0x10040 | 31 | #define VPLL_LOCK 0x10040 |
@@ -75,7 +76,6 @@ | |||
75 | #define SRC_CDREX 0x20200 | 76 | #define SRC_CDREX 0x20200 |
76 | #define PLL_DIV2_SEL 0x20a24 | 77 | #define PLL_DIV2_SEL 0x20a24 |
77 | #define GATE_IP_DISP1 0x10928 | 78 | #define GATE_IP_DISP1 0x10928 |
78 | #define GATE_IP_ACP 0x10000 | ||
79 | 79 | ||
80 | /* list of PLLs to be registered */ | 80 | /* list of PLLs to be registered */ |
81 | enum exynos5250_plls { | 81 | enum exynos5250_plls { |
@@ -120,7 +120,8 @@ enum exynos5250_clks { | |||
120 | spi2, i2s1, i2s2, pcm1, pcm2, pwm, spdif, ac97, hsi2c0, hsi2c1, hsi2c2, | 120 | spi2, i2s1, i2s2, pcm1, pcm2, pwm, spdif, ac97, hsi2c0, hsi2c1, hsi2c2, |
121 | hsi2c3, chipid, sysreg, pmu, cmu_top, cmu_core, cmu_mem, tzpc0, tzpc1, | 121 | hsi2c3, chipid, sysreg, pmu, cmu_top, cmu_core, cmu_mem, tzpc0, tzpc1, |
122 | tzpc2, tzpc3, tzpc4, tzpc5, tzpc6, tzpc7, tzpc8, tzpc9, hdmi_cec, mct, | 122 | tzpc2, tzpc3, tzpc4, tzpc5, tzpc6, tzpc7, tzpc8, tzpc9, hdmi_cec, mct, |
123 | wdt, rtc, tmu, fimd1, mie1, dsim0, dp, mixer, hdmi, g2d, | 123 | wdt, rtc, tmu, fimd1, mie1, dsim0, dp, mixer, hdmi, g2d, mdma0, |
124 | smmu_mdma0, | ||
124 | 125 | ||
125 | /* mux clocks */ | 126 | /* mux clocks */ |
126 | mout_hdmi = 1024, | 127 | mout_hdmi = 1024, |
@@ -354,8 +355,8 @@ static struct samsung_gate_clock exynos5250_gate_clks[] __initdata = { | |||
354 | GATE(smmu_gscl2, "smmu_gscl2", "aclk266", GATE_IP_GSCL, 9, 0, 0), | 355 | GATE(smmu_gscl2, "smmu_gscl2", "aclk266", GATE_IP_GSCL, 9, 0, 0), |
355 | GATE(smmu_gscl3, "smmu_gscl3", "aclk266", GATE_IP_GSCL, 10, 0, 0), | 356 | GATE(smmu_gscl3, "smmu_gscl3", "aclk266", GATE_IP_GSCL, 10, 0, 0), |
356 | GATE(mfc, "mfc", "aclk333", GATE_IP_MFC, 0, 0, 0), | 357 | GATE(mfc, "mfc", "aclk333", GATE_IP_MFC, 0, 0, 0), |
357 | GATE(smmu_mfcl, "smmu_mfcl", "aclk333", GATE_IP_MFC, 1, 0, 0), | 358 | GATE(smmu_mfcl, "smmu_mfcl", "aclk333", GATE_IP_MFC, 2, 0, 0), |
358 | GATE(smmu_mfcr, "smmu_mfcr", "aclk333", GATE_IP_MFC, 2, 0, 0), | 359 | GATE(smmu_mfcr, "smmu_mfcr", "aclk333", GATE_IP_MFC, 1, 0, 0), |
359 | GATE(rotator, "rotator", "aclk266", GATE_IP_GEN, 1, 0, 0), | 360 | GATE(rotator, "rotator", "aclk266", GATE_IP_GEN, 1, 0, 0), |
360 | GATE(jpeg, "jpeg", "aclk166", GATE_IP_GEN, 2, 0, 0), | 361 | GATE(jpeg, "jpeg", "aclk166", GATE_IP_GEN, 2, 0, 0), |
361 | GATE(mdma1, "mdma1", "aclk266", GATE_IP_GEN, 4, 0, 0), | 362 | GATE(mdma1, "mdma1", "aclk266", GATE_IP_GEN, 4, 0, 0), |
@@ -406,7 +407,8 @@ static struct samsung_gate_clock exynos5250_gate_clks[] __initdata = { | |||
406 | GATE(hsi2c2, "hsi2c2", "aclk66", GATE_IP_PERIC, 30, 0, 0), | 407 | GATE(hsi2c2, "hsi2c2", "aclk66", GATE_IP_PERIC, 30, 0, 0), |
407 | GATE(hsi2c3, "hsi2c3", "aclk66", GATE_IP_PERIC, 31, 0, 0), | 408 | GATE(hsi2c3, "hsi2c3", "aclk66", GATE_IP_PERIC, 31, 0, 0), |
408 | GATE(chipid, "chipid", "aclk66", GATE_IP_PERIS, 0, 0, 0), | 409 | GATE(chipid, "chipid", "aclk66", GATE_IP_PERIS, 0, 0, 0), |
409 | GATE(sysreg, "sysreg", "aclk66", GATE_IP_PERIS, 1, 0, 0), | 410 | GATE(sysreg, "sysreg", "aclk66", |
411 | GATE_IP_PERIS, 1, CLK_IGNORE_UNUSED, 0), | ||
410 | GATE(pmu, "pmu", "aclk66", GATE_IP_PERIS, 2, CLK_IGNORE_UNUSED, 0), | 412 | GATE(pmu, "pmu", "aclk66", GATE_IP_PERIS, 2, CLK_IGNORE_UNUSED, 0), |
411 | GATE(tzpc0, "tzpc0", "aclk66", GATE_IP_PERIS, 6, 0, 0), | 413 | GATE(tzpc0, "tzpc0", "aclk66", GATE_IP_PERIS, 6, 0, 0), |
412 | GATE(tzpc1, "tzpc1", "aclk66", GATE_IP_PERIS, 7, 0, 0), | 414 | GATE(tzpc1, "tzpc1", "aclk66", GATE_IP_PERIS, 7, 0, 0), |
@@ -492,6 +494,8 @@ static struct samsung_gate_clock exynos5250_gate_clks[] __initdata = { | |||
492 | GATE(mixer, "mixer", "mout_aclk200_disp1", GATE_IP_DISP1, 5, 0, 0), | 494 | GATE(mixer, "mixer", "mout_aclk200_disp1", GATE_IP_DISP1, 5, 0, 0), |
493 | GATE(hdmi, "hdmi", "mout_aclk200_disp1", GATE_IP_DISP1, 6, 0, 0), | 495 | GATE(hdmi, "hdmi", "mout_aclk200_disp1", GATE_IP_DISP1, 6, 0, 0), |
494 | GATE(g2d, "g2d", "aclk200", GATE_IP_ACP, 3, 0, 0), | 496 | GATE(g2d, "g2d", "aclk200", GATE_IP_ACP, 3, 0, 0), |
497 | GATE(mdma0, "mdma0", "aclk266", GATE_IP_ACP, 1, 0, 0), | ||
498 | GATE(smmu_mdma0, "smmu_mdma0", "aclk266", GATE_IP_ACP, 5, 0, 0), | ||
495 | }; | 499 | }; |
496 | 500 | ||
497 | static struct samsung_pll_rate_table vpll_24mhz_tbl[] __initdata = { | 501 | static struct samsung_pll_rate_table vpll_24mhz_tbl[] __initdata = { |
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 16d7b4ac94be..8d19f7c06010 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -839,9 +839,6 @@ static void cpufreq_init_policy(struct cpufreq_policy *policy) | |||
839 | 839 | ||
840 | /* set default policy */ | 840 | /* set default policy */ |
841 | ret = cpufreq_set_policy(policy, &new_policy); | 841 | ret = cpufreq_set_policy(policy, &new_policy); |
842 | policy->user_policy.policy = policy->policy; | ||
843 | policy->user_policy.governor = policy->governor; | ||
844 | |||
845 | if (ret) { | 842 | if (ret) { |
846 | pr_debug("setting policy failed\n"); | 843 | pr_debug("setting policy failed\n"); |
847 | if (cpufreq_driver->exit) | 844 | if (cpufreq_driver->exit) |
@@ -1016,15 +1013,17 @@ static int __cpufreq_add_dev(struct device *dev, struct subsys_interface *sif, | |||
1016 | read_unlock_irqrestore(&cpufreq_driver_lock, flags); | 1013 | read_unlock_irqrestore(&cpufreq_driver_lock, flags); |
1017 | #endif | 1014 | #endif |
1018 | 1015 | ||
1019 | if (frozen) | 1016 | /* |
1020 | /* Restore the saved policy when doing light-weight init */ | 1017 | * Restore the saved policy when doing light-weight init and fall back |
1021 | policy = cpufreq_policy_restore(cpu); | 1018 | * to the full init if that fails. |
1022 | else | 1019 | */ |
1020 | policy = frozen ? cpufreq_policy_restore(cpu) : NULL; | ||
1021 | if (!policy) { | ||
1022 | frozen = false; | ||
1023 | policy = cpufreq_policy_alloc(); | 1023 | policy = cpufreq_policy_alloc(); |
1024 | 1024 | if (!policy) | |
1025 | if (!policy) | 1025 | goto nomem_out; |
1026 | goto nomem_out; | 1026 | } |
1027 | |||
1028 | 1027 | ||
1029 | /* | 1028 | /* |
1030 | * In the resume path, since we restore a saved policy, the assignment | 1029 | * In the resume path, since we restore a saved policy, the assignment |
@@ -1069,8 +1068,10 @@ static int __cpufreq_add_dev(struct device *dev, struct subsys_interface *sif, | |||
1069 | */ | 1068 | */ |
1070 | cpumask_and(policy->cpus, policy->cpus, cpu_online_mask); | 1069 | cpumask_and(policy->cpus, policy->cpus, cpu_online_mask); |
1071 | 1070 | ||
1072 | policy->user_policy.min = policy->min; | 1071 | if (!frozen) { |
1073 | policy->user_policy.max = policy->max; | 1072 | policy->user_policy.min = policy->min; |
1073 | policy->user_policy.max = policy->max; | ||
1074 | } | ||
1074 | 1075 | ||
1075 | blocking_notifier_call_chain(&cpufreq_policy_notifier_list, | 1076 | blocking_notifier_call_chain(&cpufreq_policy_notifier_list, |
1076 | CPUFREQ_START, policy); | 1077 | CPUFREQ_START, policy); |
@@ -1101,6 +1102,11 @@ static int __cpufreq_add_dev(struct device *dev, struct subsys_interface *sif, | |||
1101 | 1102 | ||
1102 | cpufreq_init_policy(policy); | 1103 | cpufreq_init_policy(policy); |
1103 | 1104 | ||
1105 | if (!frozen) { | ||
1106 | policy->user_policy.policy = policy->policy; | ||
1107 | policy->user_policy.governor = policy->governor; | ||
1108 | } | ||
1109 | |||
1104 | kobject_uevent(&policy->kobj, KOBJ_ADD); | 1110 | kobject_uevent(&policy->kobj, KOBJ_ADD); |
1105 | up_read(&cpufreq_rwsem); | 1111 | up_read(&cpufreq_rwsem); |
1106 | 1112 | ||
@@ -1118,8 +1124,11 @@ err_get_freq: | |||
1118 | if (cpufreq_driver->exit) | 1124 | if (cpufreq_driver->exit) |
1119 | cpufreq_driver->exit(policy); | 1125 | cpufreq_driver->exit(policy); |
1120 | err_set_policy_cpu: | 1126 | err_set_policy_cpu: |
1121 | if (frozen) | 1127 | if (frozen) { |
1128 | /* Do not leave stale fallback data behind. */ | ||
1129 | per_cpu(cpufreq_cpu_data_fallback, cpu) = NULL; | ||
1122 | cpufreq_policy_put_kobj(policy); | 1130 | cpufreq_policy_put_kobj(policy); |
1131 | } | ||
1123 | cpufreq_policy_free(policy); | 1132 | cpufreq_policy_free(policy); |
1124 | 1133 | ||
1125 | nomem_out: | 1134 | nomem_out: |
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 5f1cbae36961..d51f17ed691e 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c | |||
@@ -581,7 +581,8 @@ static void intel_pstate_timer_func(unsigned long __data) | |||
581 | } | 581 | } |
582 | 582 | ||
583 | #define ICPU(model, policy) \ | 583 | #define ICPU(model, policy) \ |
584 | { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, (unsigned long)&policy } | 584 | { X86_VENDOR_INTEL, 6, model, X86_FEATURE_APERFMPERF,\ |
585 | (unsigned long)&policy } | ||
585 | 586 | ||
586 | static const struct x86_cpu_id intel_pstate_cpu_ids[] = { | 587 | static const struct x86_cpu_id intel_pstate_cpu_ids[] = { |
587 | ICPU(0x2a, core_params), | 588 | ICPU(0x2a, core_params), |
@@ -614,6 +615,11 @@ static int intel_pstate_init_cpu(unsigned int cpunum) | |||
614 | cpu = all_cpu_data[cpunum]; | 615 | cpu = all_cpu_data[cpunum]; |
615 | 616 | ||
616 | intel_pstate_get_cpu_pstates(cpu); | 617 | intel_pstate_get_cpu_pstates(cpu); |
618 | if (!cpu->pstate.current_pstate) { | ||
619 | all_cpu_data[cpunum] = NULL; | ||
620 | kfree(cpu); | ||
621 | return -ENODATA; | ||
622 | } | ||
617 | 623 | ||
618 | cpu->cpu = cpunum; | 624 | cpu->cpu = cpunum; |
619 | 625 | ||
diff --git a/drivers/cpuidle/cpuidle-calxeda.c b/drivers/cpuidle/cpuidle-calxeda.c index 36795639df0d..6e51114057d0 100644 --- a/drivers/cpuidle/cpuidle-calxeda.c +++ b/drivers/cpuidle/cpuidle-calxeda.c | |||
@@ -65,7 +65,7 @@ static struct cpuidle_driver calxeda_idle_driver = { | |||
65 | .state_count = 2, | 65 | .state_count = 2, |
66 | }; | 66 | }; |
67 | 67 | ||
68 | static int __init calxeda_cpuidle_probe(struct platform_device *pdev) | 68 | static int calxeda_cpuidle_probe(struct platform_device *pdev) |
69 | { | 69 | { |
70 | return cpuidle_register(&calxeda_idle_driver, NULL); | 70 | return cpuidle_register(&calxeda_idle_driver, NULL); |
71 | } | 71 | } |
diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c index 9dd6e01eac33..f757a0f428bd 100644 --- a/drivers/crypto/ixp4xx_crypto.c +++ b/drivers/crypto/ixp4xx_crypto.c | |||
@@ -1410,14 +1410,12 @@ static const struct platform_device_info ixp_dev_info __initdata = { | |||
1410 | static int __init ixp_module_init(void) | 1410 | static int __init ixp_module_init(void) |
1411 | { | 1411 | { |
1412 | int num = ARRAY_SIZE(ixp4xx_algos); | 1412 | int num = ARRAY_SIZE(ixp4xx_algos); |
1413 | int i, err ; | 1413 | int i, err; |
1414 | 1414 | ||
1415 | pdev = platform_device_register_full(&ixp_dev_info); | 1415 | pdev = platform_device_register_full(&ixp_dev_info); |
1416 | if (IS_ERR(pdev)) | 1416 | if (IS_ERR(pdev)) |
1417 | return PTR_ERR(pdev); | 1417 | return PTR_ERR(pdev); |
1418 | 1418 | ||
1419 | dev = &pdev->dev; | ||
1420 | |||
1421 | spin_lock_init(&desc_lock); | 1419 | spin_lock_init(&desc_lock); |
1422 | spin_lock_init(&emerg_lock); | 1420 | spin_lock_init(&emerg_lock); |
1423 | 1421 | ||
diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c index 1a49c777607c..87529181efcc 100644 --- a/drivers/dma/ioat/dma.c +++ b/drivers/dma/ioat/dma.c | |||
@@ -817,7 +817,15 @@ int ioat_dma_self_test(struct ioatdma_device *device) | |||
817 | } | 817 | } |
818 | 818 | ||
819 | dma_src = dma_map_single(dev, src, IOAT_TEST_SIZE, DMA_TO_DEVICE); | 819 | dma_src = dma_map_single(dev, src, IOAT_TEST_SIZE, DMA_TO_DEVICE); |
820 | if (dma_mapping_error(dev, dma_src)) { | ||
821 | dev_err(dev, "mapping src buffer failed\n"); | ||
822 | goto free_resources; | ||
823 | } | ||
820 | dma_dest = dma_map_single(dev, dest, IOAT_TEST_SIZE, DMA_FROM_DEVICE); | 824 | dma_dest = dma_map_single(dev, dest, IOAT_TEST_SIZE, DMA_FROM_DEVICE); |
825 | if (dma_mapping_error(dev, dma_dest)) { | ||
826 | dev_err(dev, "mapping dest buffer failed\n"); | ||
827 | goto unmap_src; | ||
828 | } | ||
821 | flags = DMA_PREP_INTERRUPT; | 829 | flags = DMA_PREP_INTERRUPT; |
822 | tx = device->common.device_prep_dma_memcpy(dma_chan, dma_dest, dma_src, | 830 | tx = device->common.device_prep_dma_memcpy(dma_chan, dma_dest, dma_src, |
823 | IOAT_TEST_SIZE, flags); | 831 | IOAT_TEST_SIZE, flags); |
@@ -855,8 +863,9 @@ int ioat_dma_self_test(struct ioatdma_device *device) | |||
855 | } | 863 | } |
856 | 864 | ||
857 | unmap_dma: | 865 | unmap_dma: |
858 | dma_unmap_single(dev, dma_src, IOAT_TEST_SIZE, DMA_TO_DEVICE); | ||
859 | dma_unmap_single(dev, dma_dest, IOAT_TEST_SIZE, DMA_FROM_DEVICE); | 866 | dma_unmap_single(dev, dma_dest, IOAT_TEST_SIZE, DMA_FROM_DEVICE); |
867 | unmap_src: | ||
868 | dma_unmap_single(dev, dma_src, IOAT_TEST_SIZE, DMA_TO_DEVICE); | ||
860 | free_resources: | 869 | free_resources: |
861 | dma->device_free_chan_resources(dma_chan); | 870 | dma->device_free_chan_resources(dma_chan); |
862 | out: | 871 | out: |
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index c79dd2b1f70e..d3c3b5b15824 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c | |||
@@ -906,14 +906,12 @@ static void gen8_ggtt_insert_entries(struct i915_address_space *vm, | |||
906 | WARN_ON(readq(>t_entries[i-1]) | 906 | WARN_ON(readq(>t_entries[i-1]) |
907 | != gen8_pte_encode(addr, level, true)); | 907 | != gen8_pte_encode(addr, level, true)); |
908 | 908 | ||
909 | #if 0 /* TODO: Still needed on GEN8? */ | ||
910 | /* This next bit makes the above posting read even more important. We | 909 | /* This next bit makes the above posting read even more important. We |
911 | * want to flush the TLBs only after we're certain all the PTE updates | 910 | * want to flush the TLBs only after we're certain all the PTE updates |
912 | * have finished. | 911 | * have finished. |
913 | */ | 912 | */ |
914 | I915_WRITE(GFX_FLSH_CNTL_GEN6, GFX_FLSH_CNTL_EN); | 913 | I915_WRITE(GFX_FLSH_CNTL_GEN6, GFX_FLSH_CNTL_EN); |
915 | POSTING_READ(GFX_FLSH_CNTL_GEN6); | 914 | POSTING_READ(GFX_FLSH_CNTL_GEN6); |
916 | #endif | ||
917 | } | 915 | } |
918 | 916 | ||
919 | /* | 917 | /* |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 54e82a80cf50..769b864465a9 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -10541,11 +10541,20 @@ static struct intel_quirk intel_quirks[] = { | |||
10541 | /* Sony Vaio Y cannot use SSC on LVDS */ | 10541 | /* Sony Vaio Y cannot use SSC on LVDS */ |
10542 | { 0x0046, 0x104d, 0x9076, quirk_ssc_force_disable }, | 10542 | { 0x0046, 0x104d, 0x9076, quirk_ssc_force_disable }, |
10543 | 10543 | ||
10544 | /* | 10544 | /* Acer Aspire 5734Z must invert backlight brightness */ |
10545 | * All GM45 Acer (and its brands eMachines and Packard Bell) laptops | 10545 | { 0x2a42, 0x1025, 0x0459, quirk_invert_brightness }, |
10546 | * seem to use inverted backlight PWM. | 10546 | |
10547 | */ | 10547 | /* Acer/eMachines G725 */ |
10548 | { 0x2a42, 0x1025, PCI_ANY_ID, quirk_invert_brightness }, | 10548 | { 0x2a42, 0x1025, 0x0210, quirk_invert_brightness }, |
10549 | |||
10550 | /* Acer/eMachines e725 */ | ||
10551 | { 0x2a42, 0x1025, 0x0212, quirk_invert_brightness }, | ||
10552 | |||
10553 | /* Acer/Packard Bell NCL20 */ | ||
10554 | { 0x2a42, 0x1025, 0x034b, quirk_invert_brightness }, | ||
10555 | |||
10556 | /* Acer Aspire 4736Z */ | ||
10557 | { 0x2a42, 0x1025, 0x0260, quirk_invert_brightness }, | ||
10549 | 10558 | ||
10550 | /* Dell XPS13 HD Sandy Bridge */ | 10559 | /* Dell XPS13 HD Sandy Bridge */ |
10551 | { 0x0116, 0x1028, 0x052e, quirk_no_pcm_pwm_enable }, | 10560 | { 0x0116, 0x1028, 0x052e, quirk_no_pcm_pwm_enable }, |
diff --git a/drivers/gpu/drm/nouveau/core/core/subdev.c b/drivers/gpu/drm/nouveau/core/core/subdev.c index 48f06378d3f9..2ea5568b6cf5 100644 --- a/drivers/gpu/drm/nouveau/core/core/subdev.c +++ b/drivers/gpu/drm/nouveau/core/core/subdev.c | |||
@@ -104,11 +104,8 @@ nouveau_subdev_create_(struct nouveau_object *parent, | |||
104 | 104 | ||
105 | if (parent) { | 105 | if (parent) { |
106 | struct nouveau_device *device = nv_device(parent); | 106 | struct nouveau_device *device = nv_device(parent); |
107 | int subidx = nv_hclass(subdev) & 0xff; | ||
108 | |||
109 | subdev->debug = nouveau_dbgopt(device->dbgopt, subname); | 107 | subdev->debug = nouveau_dbgopt(device->dbgopt, subname); |
110 | subdev->mmio = nv_subdev(device)->mmio; | 108 | subdev->mmio = nv_subdev(device)->mmio; |
111 | device->subdev[subidx] = *pobject; | ||
112 | } | 109 | } |
113 | 110 | ||
114 | return 0; | 111 | return 0; |
diff --git a/drivers/gpu/drm/nouveau/core/engine/device/base.c b/drivers/gpu/drm/nouveau/core/engine/device/base.c index 9135b25a29d0..dd01c6c435d6 100644 --- a/drivers/gpu/drm/nouveau/core/engine/device/base.c +++ b/drivers/gpu/drm/nouveau/core/engine/device/base.c | |||
@@ -268,6 +268,8 @@ nouveau_devobj_ctor(struct nouveau_object *parent, | |||
268 | if (ret) | 268 | if (ret) |
269 | return ret; | 269 | return ret; |
270 | 270 | ||
271 | device->subdev[i] = devobj->subdev[i]; | ||
272 | |||
271 | /* note: can't init *any* subdevs until devinit has been run | 273 | /* note: can't init *any* subdevs until devinit has been run |
272 | * due to not knowing exactly what the vbios init tables will | 274 | * due to not knowing exactly what the vbios init tables will |
273 | * mess with. devinit also can't be run until all of its | 275 | * mess with. devinit also can't be run until all of its |
diff --git a/drivers/gpu/drm/nouveau/core/engine/device/nvc0.c b/drivers/gpu/drm/nouveau/core/engine/device/nvc0.c index 8d06eef2b9ee..dbc5e33de94f 100644 --- a/drivers/gpu/drm/nouveau/core/engine/device/nvc0.c +++ b/drivers/gpu/drm/nouveau/core/engine/device/nvc0.c | |||
@@ -161,7 +161,7 @@ nvc0_identify(struct nouveau_device *device) | |||
161 | device->oclass[NVDEV_SUBDEV_THERM ] = &nva3_therm_oclass; | 161 | device->oclass[NVDEV_SUBDEV_THERM ] = &nva3_therm_oclass; |
162 | device->oclass[NVDEV_SUBDEV_MXM ] = &nv50_mxm_oclass; | 162 | device->oclass[NVDEV_SUBDEV_MXM ] = &nv50_mxm_oclass; |
163 | device->oclass[NVDEV_SUBDEV_DEVINIT] = &nvc0_devinit_oclass; | 163 | device->oclass[NVDEV_SUBDEV_DEVINIT] = &nvc0_devinit_oclass; |
164 | device->oclass[NVDEV_SUBDEV_MC ] = nvc3_mc_oclass; | 164 | device->oclass[NVDEV_SUBDEV_MC ] = nvc0_mc_oclass; |
165 | device->oclass[NVDEV_SUBDEV_BUS ] = nvc0_bus_oclass; | 165 | device->oclass[NVDEV_SUBDEV_BUS ] = nvc0_bus_oclass; |
166 | device->oclass[NVDEV_SUBDEV_TIMER ] = &nv04_timer_oclass; | 166 | device->oclass[NVDEV_SUBDEV_TIMER ] = &nv04_timer_oclass; |
167 | device->oclass[NVDEV_SUBDEV_FB ] = nvc0_fb_oclass; | 167 | device->oclass[NVDEV_SUBDEV_FB ] = nvc0_fb_oclass; |
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c index 434bb4b0fa2e..5c8a63dc506a 100644 --- a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c +++ b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c | |||
@@ -334,7 +334,7 @@ nvc0_graph_mthd(struct nvc0_graph_priv *priv, struct nvc0_graph_mthd *mthds) | |||
334 | while ((mthd = &mthds[i++]) && (init = mthd->init)) { | 334 | while ((mthd = &mthds[i++]) && (init = mthd->init)) { |
335 | u32 addr = 0x80000000 | mthd->oclass; | 335 | u32 addr = 0x80000000 | mthd->oclass; |
336 | for (data = 0; init->count; init++) { | 336 | for (data = 0; init->count; init++) { |
337 | if (data != init->data) { | 337 | if (init == mthd->init || data != init->data) { |
338 | nv_wr32(priv, 0x40448c, init->data); | 338 | nv_wr32(priv, 0x40448c, init->data); |
339 | data = init->data; | 339 | data = init->data; |
340 | } | 340 | } |
diff --git a/drivers/gpu/drm/nouveau/core/include/subdev/fb.h b/drivers/gpu/drm/nouveau/core/include/subdev/fb.h index 8541aa382ff2..d89dbdf39b0d 100644 --- a/drivers/gpu/drm/nouveau/core/include/subdev/fb.h +++ b/drivers/gpu/drm/nouveau/core/include/subdev/fb.h | |||
@@ -75,6 +75,11 @@ struct nouveau_fb { | |||
75 | static inline struct nouveau_fb * | 75 | static inline struct nouveau_fb * |
76 | nouveau_fb(void *obj) | 76 | nouveau_fb(void *obj) |
77 | { | 77 | { |
78 | /* fbram uses this before device subdev pointer is valid */ | ||
79 | if (nv_iclass(obj, NV_SUBDEV_CLASS) && | ||
80 | nv_subidx(obj) == NVDEV_SUBDEV_FB) | ||
81 | return obj; | ||
82 | |||
78 | return (void *)nv_device(obj)->subdev[NVDEV_SUBDEV_FB]; | 83 | return (void *)nv_device(obj)->subdev[NVDEV_SUBDEV_FB]; |
79 | } | 84 | } |
80 | 85 | ||
diff --git a/drivers/gpu/drm/nouveau/core/subdev/bios/init.c b/drivers/gpu/drm/nouveau/core/subdev/bios/init.c index 420908cb82b6..df1b1b423093 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/bios/init.c +++ b/drivers/gpu/drm/nouveau/core/subdev/bios/init.c | |||
@@ -365,13 +365,13 @@ static u16 | |||
365 | init_script(struct nouveau_bios *bios, int index) | 365 | init_script(struct nouveau_bios *bios, int index) |
366 | { | 366 | { |
367 | struct nvbios_init init = { .bios = bios }; | 367 | struct nvbios_init init = { .bios = bios }; |
368 | u16 data; | 368 | u16 bmp_ver = bmp_version(bios), data; |
369 | 369 | ||
370 | if (bmp_version(bios) && bmp_version(bios) < 0x0510) { | 370 | if (bmp_ver && bmp_ver < 0x0510) { |
371 | if (index > 1) | 371 | if (index > 1 || bmp_ver < 0x0100) |
372 | return 0x0000; | 372 | return 0x0000; |
373 | 373 | ||
374 | data = bios->bmp_offset + (bios->version.major < 2 ? 14 : 18); | 374 | data = bios->bmp_offset + (bmp_ver < 0x0200 ? 14 : 18); |
375 | return nv_ro16(bios, data + (index * 2)); | 375 | return nv_ro16(bios, data + (index * 2)); |
376 | } | 376 | } |
377 | 377 | ||
@@ -1294,7 +1294,11 @@ init_jump(struct nvbios_init *init) | |||
1294 | u16 offset = nv_ro16(bios, init->offset + 1); | 1294 | u16 offset = nv_ro16(bios, init->offset + 1); |
1295 | 1295 | ||
1296 | trace("JUMP\t0x%04x\n", offset); | 1296 | trace("JUMP\t0x%04x\n", offset); |
1297 | init->offset = offset; | 1297 | |
1298 | if (init_exec(init)) | ||
1299 | init->offset = offset; | ||
1300 | else | ||
1301 | init->offset += 3; | ||
1298 | } | 1302 | } |
1299 | 1303 | ||
1300 | /** | 1304 | /** |
diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c index 6828d81ed7b9..900fae01793e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_abi16.c +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c | |||
@@ -447,6 +447,8 @@ nouveau_abi16_ioctl_notifierobj_alloc(ABI16_IOCTL_ARGS) | |||
447 | if (ret) | 447 | if (ret) |
448 | goto done; | 448 | goto done; |
449 | 449 | ||
450 | info->offset = ntfy->node->offset; | ||
451 | |||
450 | done: | 452 | done: |
451 | if (ret) | 453 | if (ret) |
452 | nouveau_abi16_ntfy_fini(chan, ntfy); | 454 | nouveau_abi16_ntfy_fini(chan, ntfy); |
diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c index 95c740454049..ba0183fb84f3 100644 --- a/drivers/gpu/drm/nouveau/nouveau_acpi.c +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c | |||
@@ -51,6 +51,7 @@ static struct nouveau_dsm_priv { | |||
51 | bool dsm_detected; | 51 | bool dsm_detected; |
52 | bool optimus_detected; | 52 | bool optimus_detected; |
53 | acpi_handle dhandle; | 53 | acpi_handle dhandle; |
54 | acpi_handle other_handle; | ||
54 | acpi_handle rom_handle; | 55 | acpi_handle rom_handle; |
55 | } nouveau_dsm_priv; | 56 | } nouveau_dsm_priv; |
56 | 57 | ||
@@ -260,9 +261,10 @@ static int nouveau_dsm_pci_probe(struct pci_dev *pdev) | |||
260 | if (!dhandle) | 261 | if (!dhandle) |
261 | return false; | 262 | return false; |
262 | 263 | ||
263 | if (!acpi_has_method(dhandle, "_DSM")) | 264 | if (!acpi_has_method(dhandle, "_DSM")) { |
265 | nouveau_dsm_priv.other_handle = dhandle; | ||
264 | return false; | 266 | return false; |
265 | 267 | } | |
266 | if (nouveau_test_dsm(dhandle, nouveau_dsm, NOUVEAU_DSM_POWER)) | 268 | if (nouveau_test_dsm(dhandle, nouveau_dsm, NOUVEAU_DSM_POWER)) |
267 | retval |= NOUVEAU_DSM_HAS_MUX; | 269 | retval |= NOUVEAU_DSM_HAS_MUX; |
268 | 270 | ||
@@ -338,6 +340,16 @@ static bool nouveau_dsm_detect(void) | |||
338 | printk(KERN_INFO "VGA switcheroo: detected DSM switching method %s handle\n", | 340 | printk(KERN_INFO "VGA switcheroo: detected DSM switching method %s handle\n", |
339 | acpi_method_name); | 341 | acpi_method_name); |
340 | nouveau_dsm_priv.dsm_detected = true; | 342 | nouveau_dsm_priv.dsm_detected = true; |
343 | /* | ||
344 | * On some systems hotplug events are generated for the device | ||
345 | * being switched off when _DSM is executed. They cause ACPI | ||
346 | * hotplug to trigger and attempt to remove the device from | ||
347 | * the system, which causes it to break down. Prevent that from | ||
348 | * happening by setting the no_hotplug flag for the involved | ||
349 | * ACPI device objects. | ||
350 | */ | ||
351 | acpi_bus_no_hotplug(nouveau_dsm_priv.dhandle); | ||
352 | acpi_bus_no_hotplug(nouveau_dsm_priv.other_handle); | ||
341 | ret = true; | 353 | ret = true; |
342 | } | 354 | } |
343 | 355 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index 29c3efdfc7dd..25ea82f8def3 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c | |||
@@ -610,7 +610,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, | |||
610 | ret = nouveau_fence_sync(fence, chan); | 610 | ret = nouveau_fence_sync(fence, chan); |
611 | nouveau_fence_unref(&fence); | 611 | nouveau_fence_unref(&fence); |
612 | if (ret) | 612 | if (ret) |
613 | return ret; | 613 | goto fail_free; |
614 | 614 | ||
615 | if (new_bo != old_bo) { | 615 | if (new_bo != old_bo) { |
616 | ret = nouveau_bo_pin(new_bo, TTM_PL_FLAG_VRAM); | 616 | ret = nouveau_bo_pin(new_bo, TTM_PL_FLAG_VRAM); |
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index b1970596a782..0b9621c9aeea 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c | |||
@@ -1143,31 +1143,53 @@ static int dce4_crtc_do_set_base(struct drm_crtc *crtc, | |||
1143 | } | 1143 | } |
1144 | 1144 | ||
1145 | if (tiling_flags & RADEON_TILING_MACRO) { | 1145 | if (tiling_flags & RADEON_TILING_MACRO) { |
1146 | if (rdev->family >= CHIP_BONAIRE) | 1146 | evergreen_tiling_fields(tiling_flags, &bankw, &bankh, &mtaspect, &tile_split); |
1147 | tmp = rdev->config.cik.tile_config; | ||
1148 | else if (rdev->family >= CHIP_TAHITI) | ||
1149 | tmp = rdev->config.si.tile_config; | ||
1150 | else if (rdev->family >= CHIP_CAYMAN) | ||
1151 | tmp = rdev->config.cayman.tile_config; | ||
1152 | else | ||
1153 | tmp = rdev->config.evergreen.tile_config; | ||
1154 | 1147 | ||
1155 | switch ((tmp & 0xf0) >> 4) { | 1148 | /* Set NUM_BANKS. */ |
1156 | case 0: /* 4 banks */ | 1149 | if (rdev->family >= CHIP_BONAIRE) { |
1157 | fb_format |= EVERGREEN_GRPH_NUM_BANKS(EVERGREEN_ADDR_SURF_4_BANK); | 1150 | unsigned tileb, index, num_banks, tile_split_bytes; |
1158 | break; | 1151 | |
1159 | case 1: /* 8 banks */ | 1152 | /* Calculate the macrotile mode index. */ |
1160 | default: | 1153 | tile_split_bytes = 64 << tile_split; |
1161 | fb_format |= EVERGREEN_GRPH_NUM_BANKS(EVERGREEN_ADDR_SURF_8_BANK); | 1154 | tileb = 8 * 8 * target_fb->bits_per_pixel / 8; |
1162 | break; | 1155 | tileb = min(tile_split_bytes, tileb); |
1163 | case 2: /* 16 banks */ | 1156 | |
1164 | fb_format |= EVERGREEN_GRPH_NUM_BANKS(EVERGREEN_ADDR_SURF_16_BANK); | 1157 | for (index = 0; tileb > 64; index++) { |
1165 | break; | 1158 | tileb >>= 1; |
1159 | } | ||
1160 | |||
1161 | if (index >= 16) { | ||
1162 | DRM_ERROR("Wrong screen bpp (%u) or tile split (%u)\n", | ||
1163 | target_fb->bits_per_pixel, tile_split); | ||
1164 | return -EINVAL; | ||
1165 | } | ||
1166 | |||
1167 | num_banks = (rdev->config.cik.macrotile_mode_array[index] >> 6) & 0x3; | ||
1168 | fb_format |= EVERGREEN_GRPH_NUM_BANKS(num_banks); | ||
1169 | } else { | ||
1170 | /* SI and older. */ | ||
1171 | if (rdev->family >= CHIP_TAHITI) | ||
1172 | tmp = rdev->config.si.tile_config; | ||
1173 | else if (rdev->family >= CHIP_CAYMAN) | ||
1174 | tmp = rdev->config.cayman.tile_config; | ||
1175 | else | ||
1176 | tmp = rdev->config.evergreen.tile_config; | ||
1177 | |||
1178 | switch ((tmp & 0xf0) >> 4) { | ||
1179 | case 0: /* 4 banks */ | ||
1180 | fb_format |= EVERGREEN_GRPH_NUM_BANKS(EVERGREEN_ADDR_SURF_4_BANK); | ||
1181 | break; | ||
1182 | case 1: /* 8 banks */ | ||
1183 | default: | ||
1184 | fb_format |= EVERGREEN_GRPH_NUM_BANKS(EVERGREEN_ADDR_SURF_8_BANK); | ||
1185 | break; | ||
1186 | case 2: /* 16 banks */ | ||
1187 | fb_format |= EVERGREEN_GRPH_NUM_BANKS(EVERGREEN_ADDR_SURF_16_BANK); | ||
1188 | break; | ||
1189 | } | ||
1166 | } | 1190 | } |
1167 | 1191 | ||
1168 | fb_format |= EVERGREEN_GRPH_ARRAY_MODE(EVERGREEN_GRPH_ARRAY_2D_TILED_THIN1); | 1192 | fb_format |= EVERGREEN_GRPH_ARRAY_MODE(EVERGREEN_GRPH_ARRAY_2D_TILED_THIN1); |
1169 | |||
1170 | evergreen_tiling_fields(tiling_flags, &bankw, &bankh, &mtaspect, &tile_split); | ||
1171 | fb_format |= EVERGREEN_GRPH_TILE_SPLIT(tile_split); | 1193 | fb_format |= EVERGREEN_GRPH_TILE_SPLIT(tile_split); |
1172 | fb_format |= EVERGREEN_GRPH_BANK_WIDTH(bankw); | 1194 | fb_format |= EVERGREEN_GRPH_BANK_WIDTH(bankw); |
1173 | fb_format |= EVERGREEN_GRPH_BANK_HEIGHT(bankh); | 1195 | fb_format |= EVERGREEN_GRPH_BANK_HEIGHT(bankh); |
@@ -1180,19 +1202,12 @@ static int dce4_crtc_do_set_base(struct drm_crtc *crtc, | |||
1180 | fb_format |= EVERGREEN_GRPH_ARRAY_MODE(EVERGREEN_GRPH_ARRAY_1D_TILED_THIN1); | 1202 | fb_format |= EVERGREEN_GRPH_ARRAY_MODE(EVERGREEN_GRPH_ARRAY_1D_TILED_THIN1); |
1181 | 1203 | ||
1182 | if (rdev->family >= CHIP_BONAIRE) { | 1204 | if (rdev->family >= CHIP_BONAIRE) { |
1183 | u32 num_pipe_configs = rdev->config.cik.max_tile_pipes; | 1205 | /* Read the pipe config from the 2D TILED SCANOUT mode. |
1184 | u32 num_rb = rdev->config.cik.max_backends_per_se; | 1206 | * It should be the same for the other modes too, but not all |
1185 | if (num_pipe_configs > 8) | 1207 | * modes set the pipe config field. */ |
1186 | num_pipe_configs = 8; | 1208 | u32 pipe_config = (rdev->config.cik.tile_mode_array[10] >> 6) & 0x1f; |
1187 | if (num_pipe_configs == 8) | 1209 | |
1188 | fb_format |= CIK_GRPH_PIPE_CONFIG(CIK_ADDR_SURF_P8_32x32_16x16); | 1210 | fb_format |= CIK_GRPH_PIPE_CONFIG(pipe_config); |
1189 | else if (num_pipe_configs == 4) { | ||
1190 | if (num_rb == 4) | ||
1191 | fb_format |= CIK_GRPH_PIPE_CONFIG(CIK_ADDR_SURF_P4_16x16); | ||
1192 | else if (num_rb < 4) | ||
1193 | fb_format |= CIK_GRPH_PIPE_CONFIG(CIK_ADDR_SURF_P4_8x16); | ||
1194 | } else if (num_pipe_configs == 2) | ||
1195 | fb_format |= CIK_GRPH_PIPE_CONFIG(CIK_ADDR_SURF_P2); | ||
1196 | } else if ((rdev->family == CHIP_TAHITI) || | 1211 | } else if ((rdev->family == CHIP_TAHITI) || |
1197 | (rdev->family == CHIP_PITCAIRN)) | 1212 | (rdev->family == CHIP_PITCAIRN)) |
1198 | fb_format |= SI_GRPH_PIPE_CONFIG(SI_ADDR_SURF_P8_32x32_8x16); | 1213 | fb_format |= SI_GRPH_PIPE_CONFIG(SI_ADDR_SURF_P8_32x32_8x16); |
diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c index b43a3a3c9067..e950fabd7f5e 100644 --- a/drivers/gpu/drm/radeon/cik.c +++ b/drivers/gpu/drm/radeon/cik.c | |||
@@ -3057,7 +3057,7 @@ static u32 cik_create_bitmask(u32 bit_width) | |||
3057 | * Returns the disabled RB bitmask. | 3057 | * Returns the disabled RB bitmask. |
3058 | */ | 3058 | */ |
3059 | static u32 cik_get_rb_disabled(struct radeon_device *rdev, | 3059 | static u32 cik_get_rb_disabled(struct radeon_device *rdev, |
3060 | u32 max_rb_num, u32 se_num, | 3060 | u32 max_rb_num_per_se, |
3061 | u32 sh_per_se) | 3061 | u32 sh_per_se) |
3062 | { | 3062 | { |
3063 | u32 data, mask; | 3063 | u32 data, mask; |
@@ -3071,7 +3071,7 @@ static u32 cik_get_rb_disabled(struct radeon_device *rdev, | |||
3071 | 3071 | ||
3072 | data >>= BACKEND_DISABLE_SHIFT; | 3072 | data >>= BACKEND_DISABLE_SHIFT; |
3073 | 3073 | ||
3074 | mask = cik_create_bitmask(max_rb_num / se_num / sh_per_se); | 3074 | mask = cik_create_bitmask(max_rb_num_per_se / sh_per_se); |
3075 | 3075 | ||
3076 | return data & mask; | 3076 | return data & mask; |
3077 | } | 3077 | } |
@@ -3088,7 +3088,7 @@ static u32 cik_get_rb_disabled(struct radeon_device *rdev, | |||
3088 | */ | 3088 | */ |
3089 | static void cik_setup_rb(struct radeon_device *rdev, | 3089 | static void cik_setup_rb(struct radeon_device *rdev, |
3090 | u32 se_num, u32 sh_per_se, | 3090 | u32 se_num, u32 sh_per_se, |
3091 | u32 max_rb_num) | 3091 | u32 max_rb_num_per_se) |
3092 | { | 3092 | { |
3093 | int i, j; | 3093 | int i, j; |
3094 | u32 data, mask; | 3094 | u32 data, mask; |
@@ -3098,7 +3098,7 @@ static void cik_setup_rb(struct radeon_device *rdev, | |||
3098 | for (i = 0; i < se_num; i++) { | 3098 | for (i = 0; i < se_num; i++) { |
3099 | for (j = 0; j < sh_per_se; j++) { | 3099 | for (j = 0; j < sh_per_se; j++) { |
3100 | cik_select_se_sh(rdev, i, j); | 3100 | cik_select_se_sh(rdev, i, j); |
3101 | data = cik_get_rb_disabled(rdev, max_rb_num, se_num, sh_per_se); | 3101 | data = cik_get_rb_disabled(rdev, max_rb_num_per_se, sh_per_se); |
3102 | if (rdev->family == CHIP_HAWAII) | 3102 | if (rdev->family == CHIP_HAWAII) |
3103 | disabled_rbs |= data << ((i * sh_per_se + j) * HAWAII_RB_BITMAP_WIDTH_PER_SH); | 3103 | disabled_rbs |= data << ((i * sh_per_se + j) * HAWAII_RB_BITMAP_WIDTH_PER_SH); |
3104 | else | 3104 | else |
@@ -3108,12 +3108,14 @@ static void cik_setup_rb(struct radeon_device *rdev, | |||
3108 | cik_select_se_sh(rdev, 0xffffffff, 0xffffffff); | 3108 | cik_select_se_sh(rdev, 0xffffffff, 0xffffffff); |
3109 | 3109 | ||
3110 | mask = 1; | 3110 | mask = 1; |
3111 | for (i = 0; i < max_rb_num; i++) { | 3111 | for (i = 0; i < max_rb_num_per_se * se_num; i++) { |
3112 | if (!(disabled_rbs & mask)) | 3112 | if (!(disabled_rbs & mask)) |
3113 | enabled_rbs |= mask; | 3113 | enabled_rbs |= mask; |
3114 | mask <<= 1; | 3114 | mask <<= 1; |
3115 | } | 3115 | } |
3116 | 3116 | ||
3117 | rdev->config.cik.backend_enable_mask = enabled_rbs; | ||
3118 | |||
3117 | for (i = 0; i < se_num; i++) { | 3119 | for (i = 0; i < se_num; i++) { |
3118 | cik_select_se_sh(rdev, i, 0xffffffff); | 3120 | cik_select_se_sh(rdev, i, 0xffffffff); |
3119 | data = 0; | 3121 | data = 0; |
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index b1f990d0eaa1..45e1f447bc79 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
@@ -1940,7 +1940,7 @@ struct si_asic { | |||
1940 | unsigned sc_earlyz_tile_fifo_size; | 1940 | unsigned sc_earlyz_tile_fifo_size; |
1941 | 1941 | ||
1942 | unsigned num_tile_pipes; | 1942 | unsigned num_tile_pipes; |
1943 | unsigned num_backends_per_se; | 1943 | unsigned backend_enable_mask; |
1944 | unsigned backend_disable_mask_per_asic; | 1944 | unsigned backend_disable_mask_per_asic; |
1945 | unsigned backend_map; | 1945 | unsigned backend_map; |
1946 | unsigned num_texture_channel_caches; | 1946 | unsigned num_texture_channel_caches; |
@@ -1970,7 +1970,7 @@ struct cik_asic { | |||
1970 | unsigned sc_earlyz_tile_fifo_size; | 1970 | unsigned sc_earlyz_tile_fifo_size; |
1971 | 1971 | ||
1972 | unsigned num_tile_pipes; | 1972 | unsigned num_tile_pipes; |
1973 | unsigned num_backends_per_se; | 1973 | unsigned backend_enable_mask; |
1974 | unsigned backend_disable_mask_per_asic; | 1974 | unsigned backend_disable_mask_per_asic; |
1975 | unsigned backend_map; | 1975 | unsigned backend_map; |
1976 | unsigned num_texture_channel_caches; | 1976 | unsigned num_texture_channel_caches; |
diff --git a/drivers/gpu/drm/radeon/radeon_atpx_handler.c b/drivers/gpu/drm/radeon/radeon_atpx_handler.c index 9d302eaeea15..485848f889f5 100644 --- a/drivers/gpu/drm/radeon/radeon_atpx_handler.c +++ b/drivers/gpu/drm/radeon/radeon_atpx_handler.c | |||
@@ -33,6 +33,7 @@ static struct radeon_atpx_priv { | |||
33 | bool atpx_detected; | 33 | bool atpx_detected; |
34 | /* handle for device - and atpx */ | 34 | /* handle for device - and atpx */ |
35 | acpi_handle dhandle; | 35 | acpi_handle dhandle; |
36 | acpi_handle other_handle; | ||
36 | struct radeon_atpx atpx; | 37 | struct radeon_atpx atpx; |
37 | } radeon_atpx_priv; | 38 | } radeon_atpx_priv; |
38 | 39 | ||
@@ -451,9 +452,10 @@ static bool radeon_atpx_pci_probe_handle(struct pci_dev *pdev) | |||
451 | return false; | 452 | return false; |
452 | 453 | ||
453 | status = acpi_get_handle(dhandle, "ATPX", &atpx_handle); | 454 | status = acpi_get_handle(dhandle, "ATPX", &atpx_handle); |
454 | if (ACPI_FAILURE(status)) | 455 | if (ACPI_FAILURE(status)) { |
456 | radeon_atpx_priv.other_handle = dhandle; | ||
455 | return false; | 457 | return false; |
456 | 458 | } | |
457 | radeon_atpx_priv.dhandle = dhandle; | 459 | radeon_atpx_priv.dhandle = dhandle; |
458 | radeon_atpx_priv.atpx.handle = atpx_handle; | 460 | radeon_atpx_priv.atpx.handle = atpx_handle; |
459 | return true; | 461 | return true; |
@@ -530,6 +532,16 @@ static bool radeon_atpx_detect(void) | |||
530 | printk(KERN_INFO "VGA switcheroo: detected switching method %s handle\n", | 532 | printk(KERN_INFO "VGA switcheroo: detected switching method %s handle\n", |
531 | acpi_method_name); | 533 | acpi_method_name); |
532 | radeon_atpx_priv.atpx_detected = true; | 534 | radeon_atpx_priv.atpx_detected = true; |
535 | /* | ||
536 | * On some systems hotplug events are generated for the device | ||
537 | * being switched off when ATPX is executed. They cause ACPI | ||
538 | * hotplug to trigger and attempt to remove the device from | ||
539 | * the system, which causes it to break down. Prevent that from | ||
540 | * happening by setting the no_hotplug flag for the involved | ||
541 | * ACPI device objects. | ||
542 | */ | ||
543 | acpi_bus_no_hotplug(radeon_atpx_priv.dhandle); | ||
544 | acpi_bus_no_hotplug(radeon_atpx_priv.other_handle); | ||
533 | return true; | 545 | return true; |
534 | } | 546 | } |
535 | return false; | 547 | return false; |
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index 1958b36ad0e5..db39ea36bf22 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c | |||
@@ -77,9 +77,10 @@ | |||
77 | * 2.33.0 - Add SI tiling mode array query | 77 | * 2.33.0 - Add SI tiling mode array query |
78 | * 2.34.0 - Add CIK tiling mode array query | 78 | * 2.34.0 - Add CIK tiling mode array query |
79 | * 2.35.0 - Add CIK macrotile mode array query | 79 | * 2.35.0 - Add CIK macrotile mode array query |
80 | * 2.36.0 - Fix CIK DCE tiling setup | ||
80 | */ | 81 | */ |
81 | #define KMS_DRIVER_MAJOR 2 | 82 | #define KMS_DRIVER_MAJOR 2 |
82 | #define KMS_DRIVER_MINOR 35 | 83 | #define KMS_DRIVER_MINOR 36 |
83 | #define KMS_DRIVER_PATCHLEVEL 0 | 84 | #define KMS_DRIVER_PATCHLEVEL 0 |
84 | int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags); | 85 | int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags); |
85 | int radeon_driver_unload_kms(struct drm_device *dev); | 86 | int radeon_driver_unload_kms(struct drm_device *dev); |
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c index 55d0b474bd37..21d593c0ecaf 100644 --- a/drivers/gpu/drm/radeon/radeon_kms.c +++ b/drivers/gpu/drm/radeon/radeon_kms.c | |||
@@ -461,6 +461,15 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) | |||
461 | case RADEON_INFO_SI_CP_DMA_COMPUTE: | 461 | case RADEON_INFO_SI_CP_DMA_COMPUTE: |
462 | *value = 1; | 462 | *value = 1; |
463 | break; | 463 | break; |
464 | case RADEON_INFO_SI_BACKEND_ENABLED_MASK: | ||
465 | if (rdev->family >= CHIP_BONAIRE) { | ||
466 | *value = rdev->config.cik.backend_enable_mask; | ||
467 | } else if (rdev->family >= CHIP_TAHITI) { | ||
468 | *value = rdev->config.si.backend_enable_mask; | ||
469 | } else { | ||
470 | DRM_DEBUG_KMS("BACKEND_ENABLED_MASK is si+ only!\n"); | ||
471 | } | ||
472 | break; | ||
464 | default: | 473 | default: |
465 | DRM_DEBUG_KMS("Invalid request %d\n", info->request); | 474 | DRM_DEBUG_KMS("Invalid request %d\n", info->request); |
466 | return -EINVAL; | 475 | return -EINVAL; |
diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c index 373d088bac66..b9c0529b4a2e 100644 --- a/drivers/gpu/drm/radeon/radeon_uvd.c +++ b/drivers/gpu/drm/radeon/radeon_uvd.c | |||
@@ -473,7 +473,7 @@ static int radeon_uvd_cs_reloc(struct radeon_cs_parser *p, | |||
473 | return -EINVAL; | 473 | return -EINVAL; |
474 | } | 474 | } |
475 | 475 | ||
476 | if ((start >> 28) != (end >> 28)) { | 476 | if ((start >> 28) != ((end - 1) >> 28)) { |
477 | DRM_ERROR("reloc %LX-%LX crossing 256MB boundary!\n", | 477 | DRM_ERROR("reloc %LX-%LX crossing 256MB boundary!\n", |
478 | start, end); | 478 | start, end); |
479 | return -EINVAL; | 479 | return -EINVAL; |
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c index a36736dab5e0..85e1edfaa3be 100644 --- a/drivers/gpu/drm/radeon/si.c +++ b/drivers/gpu/drm/radeon/si.c | |||
@@ -2811,7 +2811,7 @@ static void si_setup_spi(struct radeon_device *rdev, | |||
2811 | } | 2811 | } |
2812 | 2812 | ||
2813 | static u32 si_get_rb_disabled(struct radeon_device *rdev, | 2813 | static u32 si_get_rb_disabled(struct radeon_device *rdev, |
2814 | u32 max_rb_num, u32 se_num, | 2814 | u32 max_rb_num_per_se, |
2815 | u32 sh_per_se) | 2815 | u32 sh_per_se) |
2816 | { | 2816 | { |
2817 | u32 data, mask; | 2817 | u32 data, mask; |
@@ -2825,14 +2825,14 @@ static u32 si_get_rb_disabled(struct radeon_device *rdev, | |||
2825 | 2825 | ||
2826 | data >>= BACKEND_DISABLE_SHIFT; | 2826 | data >>= BACKEND_DISABLE_SHIFT; |
2827 | 2827 | ||
2828 | mask = si_create_bitmask(max_rb_num / se_num / sh_per_se); | 2828 | mask = si_create_bitmask(max_rb_num_per_se / sh_per_se); |
2829 | 2829 | ||
2830 | return data & mask; | 2830 | return data & mask; |
2831 | } | 2831 | } |
2832 | 2832 | ||
2833 | static void si_setup_rb(struct radeon_device *rdev, | 2833 | static void si_setup_rb(struct radeon_device *rdev, |
2834 | u32 se_num, u32 sh_per_se, | 2834 | u32 se_num, u32 sh_per_se, |
2835 | u32 max_rb_num) | 2835 | u32 max_rb_num_per_se) |
2836 | { | 2836 | { |
2837 | int i, j; | 2837 | int i, j; |
2838 | u32 data, mask; | 2838 | u32 data, mask; |
@@ -2842,19 +2842,21 @@ static void si_setup_rb(struct radeon_device *rdev, | |||
2842 | for (i = 0; i < se_num; i++) { | 2842 | for (i = 0; i < se_num; i++) { |
2843 | for (j = 0; j < sh_per_se; j++) { | 2843 | for (j = 0; j < sh_per_se; j++) { |
2844 | si_select_se_sh(rdev, i, j); | 2844 | si_select_se_sh(rdev, i, j); |
2845 | data = si_get_rb_disabled(rdev, max_rb_num, se_num, sh_per_se); | 2845 | data = si_get_rb_disabled(rdev, max_rb_num_per_se, sh_per_se); |
2846 | disabled_rbs |= data << ((i * sh_per_se + j) * TAHITI_RB_BITMAP_WIDTH_PER_SH); | 2846 | disabled_rbs |= data << ((i * sh_per_se + j) * TAHITI_RB_BITMAP_WIDTH_PER_SH); |
2847 | } | 2847 | } |
2848 | } | 2848 | } |
2849 | si_select_se_sh(rdev, 0xffffffff, 0xffffffff); | 2849 | si_select_se_sh(rdev, 0xffffffff, 0xffffffff); |
2850 | 2850 | ||
2851 | mask = 1; | 2851 | mask = 1; |
2852 | for (i = 0; i < max_rb_num; i++) { | 2852 | for (i = 0; i < max_rb_num_per_se * se_num; i++) { |
2853 | if (!(disabled_rbs & mask)) | 2853 | if (!(disabled_rbs & mask)) |
2854 | enabled_rbs |= mask; | 2854 | enabled_rbs |= mask; |
2855 | mask <<= 1; | 2855 | mask <<= 1; |
2856 | } | 2856 | } |
2857 | 2857 | ||
2858 | rdev->config.si.backend_enable_mask = enabled_rbs; | ||
2859 | |||
2858 | for (i = 0; i < se_num; i++) { | 2860 | for (i = 0; i < se_num; i++) { |
2859 | si_select_se_sh(rdev, i, 0xffffffff); | 2861 | si_select_se_sh(rdev, i, 0xffffffff); |
2860 | data = 0; | 2862 | data = 0; |
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index f80b700f821c..797ed29a36ea 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c | |||
@@ -123,7 +123,7 @@ static struct cpuidle_state *cpuidle_state_table; | |||
123 | * which is also the index into the MWAIT hint array. | 123 | * which is also the index into the MWAIT hint array. |
124 | * Thus C0 is a dummy. | 124 | * Thus C0 is a dummy. |
125 | */ | 125 | */ |
126 | static struct cpuidle_state nehalem_cstates[] __initdata = { | 126 | static struct cpuidle_state nehalem_cstates[] = { |
127 | { | 127 | { |
128 | .name = "C1-NHM", | 128 | .name = "C1-NHM", |
129 | .desc = "MWAIT 0x00", | 129 | .desc = "MWAIT 0x00", |
@@ -156,7 +156,7 @@ static struct cpuidle_state nehalem_cstates[] __initdata = { | |||
156 | .enter = NULL } | 156 | .enter = NULL } |
157 | }; | 157 | }; |
158 | 158 | ||
159 | static struct cpuidle_state snb_cstates[] __initdata = { | 159 | static struct cpuidle_state snb_cstates[] = { |
160 | { | 160 | { |
161 | .name = "C1-SNB", | 161 | .name = "C1-SNB", |
162 | .desc = "MWAIT 0x00", | 162 | .desc = "MWAIT 0x00", |
@@ -196,7 +196,7 @@ static struct cpuidle_state snb_cstates[] __initdata = { | |||
196 | .enter = NULL } | 196 | .enter = NULL } |
197 | }; | 197 | }; |
198 | 198 | ||
199 | static struct cpuidle_state ivb_cstates[] __initdata = { | 199 | static struct cpuidle_state ivb_cstates[] = { |
200 | { | 200 | { |
201 | .name = "C1-IVB", | 201 | .name = "C1-IVB", |
202 | .desc = "MWAIT 0x00", | 202 | .desc = "MWAIT 0x00", |
@@ -236,7 +236,7 @@ static struct cpuidle_state ivb_cstates[] __initdata = { | |||
236 | .enter = NULL } | 236 | .enter = NULL } |
237 | }; | 237 | }; |
238 | 238 | ||
239 | static struct cpuidle_state hsw_cstates[] __initdata = { | 239 | static struct cpuidle_state hsw_cstates[] = { |
240 | { | 240 | { |
241 | .name = "C1-HSW", | 241 | .name = "C1-HSW", |
242 | .desc = "MWAIT 0x00", | 242 | .desc = "MWAIT 0x00", |
@@ -297,7 +297,7 @@ static struct cpuidle_state hsw_cstates[] __initdata = { | |||
297 | .enter = NULL } | 297 | .enter = NULL } |
298 | }; | 298 | }; |
299 | 299 | ||
300 | static struct cpuidle_state atom_cstates[] __initdata = { | 300 | static struct cpuidle_state atom_cstates[] = { |
301 | { | 301 | { |
302 | .name = "C1E-ATM", | 302 | .name = "C1E-ATM", |
303 | .desc = "MWAIT 0x00", | 303 | .desc = "MWAIT 0x00", |
@@ -329,7 +329,7 @@ static struct cpuidle_state atom_cstates[] __initdata = { | |||
329 | { | 329 | { |
330 | .enter = NULL } | 330 | .enter = NULL } |
331 | }; | 331 | }; |
332 | static struct cpuidle_state avn_cstates[] __initdata = { | 332 | static struct cpuidle_state avn_cstates[] = { |
333 | { | 333 | { |
334 | .name = "C1-AVN", | 334 | .name = "C1-AVN", |
335 | .desc = "MWAIT 0x00", | 335 | .desc = "MWAIT 0x00", |
@@ -344,6 +344,8 @@ static struct cpuidle_state avn_cstates[] __initdata = { | |||
344 | .exit_latency = 15, | 344 | .exit_latency = 15, |
345 | .target_residency = 45, | 345 | .target_residency = 45, |
346 | .enter = &intel_idle }, | 346 | .enter = &intel_idle }, |
347 | { | ||
348 | .enter = NULL } | ||
347 | }; | 349 | }; |
348 | 350 | ||
349 | /** | 351 | /** |
diff --git a/drivers/input/input.c b/drivers/input/input.c index 846ccdd905b1..d2965e4b3224 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -1871,6 +1871,10 @@ void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int | |||
1871 | break; | 1871 | break; |
1872 | 1872 | ||
1873 | case EV_ABS: | 1873 | case EV_ABS: |
1874 | input_alloc_absinfo(dev); | ||
1875 | if (!dev->absinfo) | ||
1876 | return; | ||
1877 | |||
1874 | __set_bit(code, dev->absbit); | 1878 | __set_bit(code, dev->absbit); |
1875 | break; | 1879 | break; |
1876 | 1880 | ||
diff --git a/drivers/input/touchscreen/zforce_ts.c b/drivers/input/touchscreen/zforce_ts.c index 75762d6ff3ba..aa127ba392a4 100644 --- a/drivers/input/touchscreen/zforce_ts.c +++ b/drivers/input/touchscreen/zforce_ts.c | |||
@@ -455,7 +455,18 @@ static void zforce_complete(struct zforce_ts *ts, int cmd, int result) | |||
455 | } | 455 | } |
456 | } | 456 | } |
457 | 457 | ||
458 | static irqreturn_t zforce_interrupt(int irq, void *dev_id) | 458 | static irqreturn_t zforce_irq(int irq, void *dev_id) |
459 | { | ||
460 | struct zforce_ts *ts = dev_id; | ||
461 | struct i2c_client *client = ts->client; | ||
462 | |||
463 | if (ts->suspended && device_may_wakeup(&client->dev)) | ||
464 | pm_wakeup_event(&client->dev, 500); | ||
465 | |||
466 | return IRQ_WAKE_THREAD; | ||
467 | } | ||
468 | |||
469 | static irqreturn_t zforce_irq_thread(int irq, void *dev_id) | ||
459 | { | 470 | { |
460 | struct zforce_ts *ts = dev_id; | 471 | struct zforce_ts *ts = dev_id; |
461 | struct i2c_client *client = ts->client; | 472 | struct i2c_client *client = ts->client; |
@@ -465,12 +476,10 @@ static irqreturn_t zforce_interrupt(int irq, void *dev_id) | |||
465 | u8 *payload; | 476 | u8 *payload; |
466 | 477 | ||
467 | /* | 478 | /* |
468 | * When suspended, emit a wakeup signal if necessary and return. | 479 | * When still suspended, return. |
469 | * Due to the level-interrupt we will get re-triggered later. | 480 | * Due to the level-interrupt we will get re-triggered later. |
470 | */ | 481 | */ |
471 | if (ts->suspended) { | 482 | if (ts->suspended) { |
472 | if (device_may_wakeup(&client->dev)) | ||
473 | pm_wakeup_event(&client->dev, 500); | ||
474 | msleep(20); | 483 | msleep(20); |
475 | return IRQ_HANDLED; | 484 | return IRQ_HANDLED; |
476 | } | 485 | } |
@@ -763,8 +772,8 @@ static int zforce_probe(struct i2c_client *client, | |||
763 | * Therefore we can trigger the interrupt anytime it is low and do | 772 | * Therefore we can trigger the interrupt anytime it is low and do |
764 | * not need to limit it to the interrupt edge. | 773 | * not need to limit it to the interrupt edge. |
765 | */ | 774 | */ |
766 | ret = devm_request_threaded_irq(&client->dev, client->irq, NULL, | 775 | ret = devm_request_threaded_irq(&client->dev, client->irq, |
767 | zforce_interrupt, | 776 | zforce_irq, zforce_irq_thread, |
768 | IRQF_TRIGGER_LOW | IRQF_ONESHOT, | 777 | IRQF_TRIGGER_LOW | IRQF_ONESHOT, |
769 | input_dev->name, ts); | 778 | input_dev->name, ts); |
770 | if (ret) { | 779 | if (ret) { |
diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c index 05188351711d..a97263e902ff 100644 --- a/drivers/leds/leds-lp5521.c +++ b/drivers/leds/leds-lp5521.c | |||
@@ -244,18 +244,12 @@ static int lp5521_update_program_memory(struct lp55xx_chip *chip, | |||
244 | if (i % 2) | 244 | if (i % 2) |
245 | goto err; | 245 | goto err; |
246 | 246 | ||
247 | mutex_lock(&chip->lock); | ||
248 | |||
249 | for (i = 0; i < LP5521_PROGRAM_LENGTH; i++) { | 247 | for (i = 0; i < LP5521_PROGRAM_LENGTH; i++) { |
250 | ret = lp55xx_write(chip, addr[idx] + i, pattern[i]); | 248 | ret = lp55xx_write(chip, addr[idx] + i, pattern[i]); |
251 | if (ret) { | 249 | if (ret) |
252 | mutex_unlock(&chip->lock); | ||
253 | return -EINVAL; | 250 | return -EINVAL; |
254 | } | ||
255 | } | 251 | } |
256 | 252 | ||
257 | mutex_unlock(&chip->lock); | ||
258 | |||
259 | return size; | 253 | return size; |
260 | 254 | ||
261 | err: | 255 | err: |
@@ -427,15 +421,17 @@ static ssize_t store_engine_load(struct device *dev, | |||
427 | { | 421 | { |
428 | struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); | 422 | struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); |
429 | struct lp55xx_chip *chip = led->chip; | 423 | struct lp55xx_chip *chip = led->chip; |
424 | int ret; | ||
430 | 425 | ||
431 | mutex_lock(&chip->lock); | 426 | mutex_lock(&chip->lock); |
432 | 427 | ||
433 | chip->engine_idx = nr; | 428 | chip->engine_idx = nr; |
434 | lp5521_load_engine(chip); | 429 | lp5521_load_engine(chip); |
430 | ret = lp5521_update_program_memory(chip, buf, len); | ||
435 | 431 | ||
436 | mutex_unlock(&chip->lock); | 432 | mutex_unlock(&chip->lock); |
437 | 433 | ||
438 | return lp5521_update_program_memory(chip, buf, len); | 434 | return ret; |
439 | } | 435 | } |
440 | store_load(1) | 436 | store_load(1) |
441 | store_load(2) | 437 | store_load(2) |
diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c index 6b553d9f4266..fd9ab5f61441 100644 --- a/drivers/leds/leds-lp5523.c +++ b/drivers/leds/leds-lp5523.c | |||
@@ -337,18 +337,12 @@ static int lp5523_update_program_memory(struct lp55xx_chip *chip, | |||
337 | if (i % 2) | 337 | if (i % 2) |
338 | goto err; | 338 | goto err; |
339 | 339 | ||
340 | mutex_lock(&chip->lock); | ||
341 | |||
342 | for (i = 0; i < LP5523_PROGRAM_LENGTH; i++) { | 340 | for (i = 0; i < LP5523_PROGRAM_LENGTH; i++) { |
343 | ret = lp55xx_write(chip, LP5523_REG_PROG_MEM + i, pattern[i]); | 341 | ret = lp55xx_write(chip, LP5523_REG_PROG_MEM + i, pattern[i]); |
344 | if (ret) { | 342 | if (ret) |
345 | mutex_unlock(&chip->lock); | ||
346 | return -EINVAL; | 343 | return -EINVAL; |
347 | } | ||
348 | } | 344 | } |
349 | 345 | ||
350 | mutex_unlock(&chip->lock); | ||
351 | |||
352 | return size; | 346 | return size; |
353 | 347 | ||
354 | err: | 348 | err: |
@@ -548,15 +542,17 @@ static ssize_t store_engine_load(struct device *dev, | |||
548 | { | 542 | { |
549 | struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); | 543 | struct lp55xx_led *led = i2c_get_clientdata(to_i2c_client(dev)); |
550 | struct lp55xx_chip *chip = led->chip; | 544 | struct lp55xx_chip *chip = led->chip; |
545 | int ret; | ||
551 | 546 | ||
552 | mutex_lock(&chip->lock); | 547 | mutex_lock(&chip->lock); |
553 | 548 | ||
554 | chip->engine_idx = nr; | 549 | chip->engine_idx = nr; |
555 | lp5523_load_engine_and_select_page(chip); | 550 | lp5523_load_engine_and_select_page(chip); |
551 | ret = lp5523_update_program_memory(chip, buf, len); | ||
556 | 552 | ||
557 | mutex_unlock(&chip->lock); | 553 | mutex_unlock(&chip->lock); |
558 | 554 | ||
559 | return lp5523_update_program_memory(chip, buf, len); | 555 | return ret; |
560 | } | 556 | } |
561 | store_load(1) | 557 | store_load(1) |
562 | store_load(2) | 558 | store_load(2) |
diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c index 11e20afbdcac..705698fd2c7e 100644 --- a/drivers/mfd/rtsx_pcr.c +++ b/drivers/mfd/rtsx_pcr.c | |||
@@ -1228,8 +1228,14 @@ static void rtsx_pci_remove(struct pci_dev *pcidev) | |||
1228 | 1228 | ||
1229 | pcr->remove_pci = true; | 1229 | pcr->remove_pci = true; |
1230 | 1230 | ||
1231 | cancel_delayed_work(&pcr->carddet_work); | 1231 | /* Disable interrupts at the pcr level */ |
1232 | cancel_delayed_work(&pcr->idle_work); | 1232 | spin_lock_irq(&pcr->lock); |
1233 | rtsx_pci_writel(pcr, RTSX_BIER, 0); | ||
1234 | pcr->bier = 0; | ||
1235 | spin_unlock_irq(&pcr->lock); | ||
1236 | |||
1237 | cancel_delayed_work_sync(&pcr->carddet_work); | ||
1238 | cancel_delayed_work_sync(&pcr->idle_work); | ||
1233 | 1239 | ||
1234 | mfd_remove_devices(&pcidev->dev); | 1240 | mfd_remove_devices(&pcidev->dev); |
1235 | 1241 | ||
diff --git a/drivers/mtd/maps/pxa2xx-flash.c b/drivers/mtd/maps/pxa2xx-flash.c index d210d131fef2..0f55589a56b8 100644 --- a/drivers/mtd/maps/pxa2xx-flash.c +++ b/drivers/mtd/maps/pxa2xx-flash.c | |||
@@ -73,7 +73,7 @@ static int pxa2xx_flash_probe(struct platform_device *pdev) | |||
73 | return -ENOMEM; | 73 | return -ENOMEM; |
74 | } | 74 | } |
75 | info->map.cached = | 75 | info->map.cached = |
76 | ioremap_cached(info->map.phys, info->map.size); | 76 | ioremap_cache(info->map.phys, info->map.size); |
77 | if (!info->map.cached) | 77 | if (!info->map.cached) |
78 | printk(KERN_WARNING "Failed to ioremap cached %s\n", | 78 | printk(KERN_WARNING "Failed to ioremap cached %s\n", |
79 | info->map.name); | 79 | info->map.name); |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index e06c4453eabb..7069b846a6ce 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -3692,7 +3692,8 @@ static inline int bond_slave_override(struct bonding *bond, | |||
3692 | } | 3692 | } |
3693 | 3693 | ||
3694 | 3694 | ||
3695 | static u16 bond_select_queue(struct net_device *dev, struct sk_buff *skb) | 3695 | static u16 bond_select_queue(struct net_device *dev, struct sk_buff *skb, |
3696 | void *accel_priv) | ||
3696 | { | 3697 | { |
3697 | /* | 3698 | /* |
3698 | * This helper function exists to help dev_pick_tx get the correct | 3699 | * This helper function exists to help dev_pick_tx get the correct |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h index 0578fb90d8f3..9819a548e3b9 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | |||
@@ -520,10 +520,12 @@ struct bnx2x_fastpath { | |||
520 | #define BNX2X_FP_STATE_IDLE 0 | 520 | #define BNX2X_FP_STATE_IDLE 0 |
521 | #define BNX2X_FP_STATE_NAPI (1 << 0) /* NAPI owns this FP */ | 521 | #define BNX2X_FP_STATE_NAPI (1 << 0) /* NAPI owns this FP */ |
522 | #define BNX2X_FP_STATE_POLL (1 << 1) /* poll owns this FP */ | 522 | #define BNX2X_FP_STATE_POLL (1 << 1) /* poll owns this FP */ |
523 | #define BNX2X_FP_STATE_NAPI_YIELD (1 << 2) /* NAPI yielded this FP */ | 523 | #define BNX2X_FP_STATE_DISABLED (1 << 2) |
524 | #define BNX2X_FP_STATE_POLL_YIELD (1 << 3) /* poll yielded this FP */ | 524 | #define BNX2X_FP_STATE_NAPI_YIELD (1 << 3) /* NAPI yielded this FP */ |
525 | #define BNX2X_FP_STATE_POLL_YIELD (1 << 4) /* poll yielded this FP */ | ||
526 | #define BNX2X_FP_OWNED (BNX2X_FP_STATE_NAPI | BNX2X_FP_STATE_POLL) | ||
525 | #define BNX2X_FP_YIELD (BNX2X_FP_STATE_NAPI_YIELD | BNX2X_FP_STATE_POLL_YIELD) | 527 | #define BNX2X_FP_YIELD (BNX2X_FP_STATE_NAPI_YIELD | BNX2X_FP_STATE_POLL_YIELD) |
526 | #define BNX2X_FP_LOCKED (BNX2X_FP_STATE_NAPI | BNX2X_FP_STATE_POLL) | 528 | #define BNX2X_FP_LOCKED (BNX2X_FP_OWNED | BNX2X_FP_STATE_DISABLED) |
527 | #define BNX2X_FP_USER_PEND (BNX2X_FP_STATE_POLL | BNX2X_FP_STATE_POLL_YIELD) | 529 | #define BNX2X_FP_USER_PEND (BNX2X_FP_STATE_POLL | BNX2X_FP_STATE_POLL_YIELD) |
528 | /* protect state */ | 530 | /* protect state */ |
529 | spinlock_t lock; | 531 | spinlock_t lock; |
@@ -613,7 +615,7 @@ static inline bool bnx2x_fp_lock_napi(struct bnx2x_fastpath *fp) | |||
613 | { | 615 | { |
614 | bool rc = true; | 616 | bool rc = true; |
615 | 617 | ||
616 | spin_lock(&fp->lock); | 618 | spin_lock_bh(&fp->lock); |
617 | if (fp->state & BNX2X_FP_LOCKED) { | 619 | if (fp->state & BNX2X_FP_LOCKED) { |
618 | WARN_ON(fp->state & BNX2X_FP_STATE_NAPI); | 620 | WARN_ON(fp->state & BNX2X_FP_STATE_NAPI); |
619 | fp->state |= BNX2X_FP_STATE_NAPI_YIELD; | 621 | fp->state |= BNX2X_FP_STATE_NAPI_YIELD; |
@@ -622,7 +624,7 @@ static inline bool bnx2x_fp_lock_napi(struct bnx2x_fastpath *fp) | |||
622 | /* we don't care if someone yielded */ | 624 | /* we don't care if someone yielded */ |
623 | fp->state = BNX2X_FP_STATE_NAPI; | 625 | fp->state = BNX2X_FP_STATE_NAPI; |
624 | } | 626 | } |
625 | spin_unlock(&fp->lock); | 627 | spin_unlock_bh(&fp->lock); |
626 | return rc; | 628 | return rc; |
627 | } | 629 | } |
628 | 630 | ||
@@ -631,14 +633,16 @@ static inline bool bnx2x_fp_unlock_napi(struct bnx2x_fastpath *fp) | |||
631 | { | 633 | { |
632 | bool rc = false; | 634 | bool rc = false; |
633 | 635 | ||
634 | spin_lock(&fp->lock); | 636 | spin_lock_bh(&fp->lock); |
635 | WARN_ON(fp->state & | 637 | WARN_ON(fp->state & |
636 | (BNX2X_FP_STATE_POLL | BNX2X_FP_STATE_NAPI_YIELD)); | 638 | (BNX2X_FP_STATE_POLL | BNX2X_FP_STATE_NAPI_YIELD)); |
637 | 639 | ||
638 | if (fp->state & BNX2X_FP_STATE_POLL_YIELD) | 640 | if (fp->state & BNX2X_FP_STATE_POLL_YIELD) |
639 | rc = true; | 641 | rc = true; |
640 | fp->state = BNX2X_FP_STATE_IDLE; | 642 | |
641 | spin_unlock(&fp->lock); | 643 | /* state ==> idle, unless currently disabled */ |
644 | fp->state &= BNX2X_FP_STATE_DISABLED; | ||
645 | spin_unlock_bh(&fp->lock); | ||
642 | return rc; | 646 | return rc; |
643 | } | 647 | } |
644 | 648 | ||
@@ -669,7 +673,9 @@ static inline bool bnx2x_fp_unlock_poll(struct bnx2x_fastpath *fp) | |||
669 | 673 | ||
670 | if (fp->state & BNX2X_FP_STATE_POLL_YIELD) | 674 | if (fp->state & BNX2X_FP_STATE_POLL_YIELD) |
671 | rc = true; | 675 | rc = true; |
672 | fp->state = BNX2X_FP_STATE_IDLE; | 676 | |
677 | /* state ==> idle, unless currently disabled */ | ||
678 | fp->state &= BNX2X_FP_STATE_DISABLED; | ||
673 | spin_unlock_bh(&fp->lock); | 679 | spin_unlock_bh(&fp->lock); |
674 | return rc; | 680 | return rc; |
675 | } | 681 | } |
@@ -677,9 +683,23 @@ static inline bool bnx2x_fp_unlock_poll(struct bnx2x_fastpath *fp) | |||
677 | /* true if a socket is polling, even if it did not get the lock */ | 683 | /* true if a socket is polling, even if it did not get the lock */ |
678 | static inline bool bnx2x_fp_ll_polling(struct bnx2x_fastpath *fp) | 684 | static inline bool bnx2x_fp_ll_polling(struct bnx2x_fastpath *fp) |
679 | { | 685 | { |
680 | WARN_ON(!(fp->state & BNX2X_FP_LOCKED)); | 686 | WARN_ON(!(fp->state & BNX2X_FP_OWNED)); |
681 | return fp->state & BNX2X_FP_USER_PEND; | 687 | return fp->state & BNX2X_FP_USER_PEND; |
682 | } | 688 | } |
689 | |||
690 | /* false if fp is currently owned */ | ||
691 | static inline bool bnx2x_fp_ll_disable(struct bnx2x_fastpath *fp) | ||
692 | { | ||
693 | int rc = true; | ||
694 | |||
695 | spin_lock_bh(&fp->lock); | ||
696 | if (fp->state & BNX2X_FP_OWNED) | ||
697 | rc = false; | ||
698 | fp->state |= BNX2X_FP_STATE_DISABLED; | ||
699 | spin_unlock_bh(&fp->lock); | ||
700 | |||
701 | return rc; | ||
702 | } | ||
683 | #else | 703 | #else |
684 | static inline void bnx2x_fp_init_lock(struct bnx2x_fastpath *fp) | 704 | static inline void bnx2x_fp_init_lock(struct bnx2x_fastpath *fp) |
685 | { | 705 | { |
@@ -709,6 +729,10 @@ static inline bool bnx2x_fp_ll_polling(struct bnx2x_fastpath *fp) | |||
709 | { | 729 | { |
710 | return false; | 730 | return false; |
711 | } | 731 | } |
732 | static inline bool bnx2x_fp_ll_disable(struct bnx2x_fastpath *fp) | ||
733 | { | ||
734 | return true; | ||
735 | } | ||
712 | #endif /* CONFIG_NET_RX_BUSY_POLL */ | 736 | #endif /* CONFIG_NET_RX_BUSY_POLL */ |
713 | 737 | ||
714 | /* Use 2500 as a mini-jumbo MTU for FCoE */ | 738 | /* Use 2500 as a mini-jumbo MTU for FCoE */ |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index cdc12ea0fc3f..9d7419e0390b 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | |||
@@ -197,6 +197,7 @@ static u16 bnx2x_free_tx_pkt(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata, | |||
197 | struct sk_buff *skb = tx_buf->skb; | 197 | struct sk_buff *skb = tx_buf->skb; |
198 | u16 bd_idx = TX_BD(tx_buf->first_bd), new_cons; | 198 | u16 bd_idx = TX_BD(tx_buf->first_bd), new_cons; |
199 | int nbd; | 199 | int nbd; |
200 | u16 split_bd_len = 0; | ||
200 | 201 | ||
201 | /* prefetch skb end pointer to speedup dev_kfree_skb() */ | 202 | /* prefetch skb end pointer to speedup dev_kfree_skb() */ |
202 | prefetch(&skb->end); | 203 | prefetch(&skb->end); |
@@ -204,10 +205,7 @@ static u16 bnx2x_free_tx_pkt(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata, | |||
204 | DP(NETIF_MSG_TX_DONE, "fp[%d]: pkt_idx %d buff @(%p)->skb %p\n", | 205 | DP(NETIF_MSG_TX_DONE, "fp[%d]: pkt_idx %d buff @(%p)->skb %p\n", |
205 | txdata->txq_index, idx, tx_buf, skb); | 206 | txdata->txq_index, idx, tx_buf, skb); |
206 | 207 | ||
207 | /* unmap first bd */ | ||
208 | tx_start_bd = &txdata->tx_desc_ring[bd_idx].start_bd; | 208 | tx_start_bd = &txdata->tx_desc_ring[bd_idx].start_bd; |
209 | dma_unmap_single(&bp->pdev->dev, BD_UNMAP_ADDR(tx_start_bd), | ||
210 | BD_UNMAP_LEN(tx_start_bd), DMA_TO_DEVICE); | ||
211 | 209 | ||
212 | nbd = le16_to_cpu(tx_start_bd->nbd) - 1; | 210 | nbd = le16_to_cpu(tx_start_bd->nbd) - 1; |
213 | #ifdef BNX2X_STOP_ON_ERROR | 211 | #ifdef BNX2X_STOP_ON_ERROR |
@@ -225,12 +223,19 @@ static u16 bnx2x_free_tx_pkt(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata, | |||
225 | --nbd; | 223 | --nbd; |
226 | bd_idx = TX_BD(NEXT_TX_IDX(bd_idx)); | 224 | bd_idx = TX_BD(NEXT_TX_IDX(bd_idx)); |
227 | 225 | ||
228 | /* ...and the TSO split header bd since they have no mapping */ | 226 | /* TSO headers+data bds share a common mapping. See bnx2x_tx_split() */ |
229 | if (tx_buf->flags & BNX2X_TSO_SPLIT_BD) { | 227 | if (tx_buf->flags & BNX2X_TSO_SPLIT_BD) { |
228 | tx_data_bd = &txdata->tx_desc_ring[bd_idx].reg_bd; | ||
229 | split_bd_len = BD_UNMAP_LEN(tx_data_bd); | ||
230 | --nbd; | 230 | --nbd; |
231 | bd_idx = TX_BD(NEXT_TX_IDX(bd_idx)); | 231 | bd_idx = TX_BD(NEXT_TX_IDX(bd_idx)); |
232 | } | 232 | } |
233 | 233 | ||
234 | /* unmap first bd */ | ||
235 | dma_unmap_single(&bp->pdev->dev, BD_UNMAP_ADDR(tx_start_bd), | ||
236 | BD_UNMAP_LEN(tx_start_bd) + split_bd_len, | ||
237 | DMA_TO_DEVICE); | ||
238 | |||
234 | /* now free frags */ | 239 | /* now free frags */ |
235 | while (nbd > 0) { | 240 | while (nbd > 0) { |
236 | 241 | ||
@@ -1829,26 +1834,22 @@ static void bnx2x_napi_disable_cnic(struct bnx2x *bp) | |||
1829 | { | 1834 | { |
1830 | int i; | 1835 | int i; |
1831 | 1836 | ||
1832 | local_bh_disable(); | ||
1833 | for_each_rx_queue_cnic(bp, i) { | 1837 | for_each_rx_queue_cnic(bp, i) { |
1834 | napi_disable(&bnx2x_fp(bp, i, napi)); | 1838 | napi_disable(&bnx2x_fp(bp, i, napi)); |
1835 | while (!bnx2x_fp_lock_napi(&bp->fp[i])) | 1839 | while (!bnx2x_fp_ll_disable(&bp->fp[i])) |
1836 | mdelay(1); | 1840 | usleep_range(1000, 2000); |
1837 | } | 1841 | } |
1838 | local_bh_enable(); | ||
1839 | } | 1842 | } |
1840 | 1843 | ||
1841 | static void bnx2x_napi_disable(struct bnx2x *bp) | 1844 | static void bnx2x_napi_disable(struct bnx2x *bp) |
1842 | { | 1845 | { |
1843 | int i; | 1846 | int i; |
1844 | 1847 | ||
1845 | local_bh_disable(); | ||
1846 | for_each_eth_queue(bp, i) { | 1848 | for_each_eth_queue(bp, i) { |
1847 | napi_disable(&bnx2x_fp(bp, i, napi)); | 1849 | napi_disable(&bnx2x_fp(bp, i, napi)); |
1848 | while (!bnx2x_fp_lock_napi(&bp->fp[i])) | 1850 | while (!bnx2x_fp_ll_disable(&bp->fp[i])) |
1849 | mdelay(1); | 1851 | usleep_range(1000, 2000); |
1850 | } | 1852 | } |
1851 | local_bh_enable(); | ||
1852 | } | 1853 | } |
1853 | 1854 | ||
1854 | void bnx2x_netif_start(struct bnx2x *bp) | 1855 | void bnx2x_netif_start(struct bnx2x *bp) |
@@ -1871,7 +1872,8 @@ void bnx2x_netif_stop(struct bnx2x *bp, int disable_hw) | |||
1871 | bnx2x_napi_disable_cnic(bp); | 1872 | bnx2x_napi_disable_cnic(bp); |
1872 | } | 1873 | } |
1873 | 1874 | ||
1874 | u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb) | 1875 | u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb, |
1876 | void *accel_priv) | ||
1875 | { | 1877 | { |
1876 | struct bnx2x *bp = netdev_priv(dev); | 1878 | struct bnx2x *bp = netdev_priv(dev); |
1877 | 1879 | ||
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h index 7ebbddc7290c..17d1689aec6b 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | |||
@@ -495,7 +495,8 @@ int bnx2x_set_vf_mac(struct net_device *dev, int queue, u8 *mac); | |||
495 | int bnx2x_set_vf_vlan(struct net_device *netdev, int vf, u16 vlan, u8 qos); | 495 | int bnx2x_set_vf_vlan(struct net_device *netdev, int vf, u16 vlan, u8 qos); |
496 | 496 | ||
497 | /* select_queue callback */ | 497 | /* select_queue callback */ |
498 | u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb); | 498 | u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb, |
499 | void *accel_priv); | ||
499 | 500 | ||
500 | static inline void bnx2x_update_rx_prod(struct bnx2x *bp, | 501 | static inline void bnx2x_update_rx_prod(struct bnx2x *bp, |
501 | struct bnx2x_fastpath *fp, | 502 | struct bnx2x_fastpath *fp, |
diff --git a/drivers/net/ethernet/chelsio/cxgb4/l2t.c b/drivers/net/ethernet/chelsio/cxgb4/l2t.c index cb05be905def..81e8402a74b4 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/l2t.c +++ b/drivers/net/ethernet/chelsio/cxgb4/l2t.c | |||
@@ -423,7 +423,7 @@ u64 cxgb4_select_ntuple(struct net_device *dev, | |||
423 | * in the Compressed Filter Tuple. | 423 | * in the Compressed Filter Tuple. |
424 | */ | 424 | */ |
425 | if (tp->vlan_shift >= 0 && l2t->vlan != VLAN_NONE) | 425 | if (tp->vlan_shift >= 0 && l2t->vlan != VLAN_NONE) |
426 | ntuple |= (F_FT_VLAN_VLD | l2t->vlan) << tp->vlan_shift; | 426 | ntuple |= (u64)(F_FT_VLAN_VLD | l2t->vlan) << tp->vlan_shift; |
427 | 427 | ||
428 | if (tp->port_shift >= 0) | 428 | if (tp->port_shift >= 0) |
429 | ntuple |= (u64)l2t->lport << tp->port_shift; | 429 | ntuple |= (u64)l2t->lport << tp->port_shift; |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index cc06854296a3..5bcc870f8367 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | |||
@@ -6827,12 +6827,20 @@ static inline int ixgbe_maybe_stop_tx(struct ixgbe_ring *tx_ring, u16 size) | |||
6827 | return __ixgbe_maybe_stop_tx(tx_ring, size); | 6827 | return __ixgbe_maybe_stop_tx(tx_ring, size); |
6828 | } | 6828 | } |
6829 | 6829 | ||
6830 | #ifdef IXGBE_FCOE | 6830 | static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb, |
6831 | static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb) | 6831 | void *accel_priv) |
6832 | { | 6832 | { |
6833 | struct ixgbe_fwd_adapter *fwd_adapter = accel_priv; | ||
6834 | #ifdef IXGBE_FCOE | ||
6833 | struct ixgbe_adapter *adapter; | 6835 | struct ixgbe_adapter *adapter; |
6834 | struct ixgbe_ring_feature *f; | 6836 | struct ixgbe_ring_feature *f; |
6835 | int txq; | 6837 | int txq; |
6838 | #endif | ||
6839 | |||
6840 | if (fwd_adapter) | ||
6841 | return skb->queue_mapping + fwd_adapter->tx_base_queue; | ||
6842 | |||
6843 | #ifdef IXGBE_FCOE | ||
6836 | 6844 | ||
6837 | /* | 6845 | /* |
6838 | * only execute the code below if protocol is FCoE | 6846 | * only execute the code below if protocol is FCoE |
@@ -6858,9 +6866,11 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb) | |||
6858 | txq -= f->indices; | 6866 | txq -= f->indices; |
6859 | 6867 | ||
6860 | return txq + f->offset; | 6868 | return txq + f->offset; |
6869 | #else | ||
6870 | return __netdev_pick_tx(dev, skb); | ||
6871 | #endif | ||
6861 | } | 6872 | } |
6862 | 6873 | ||
6863 | #endif | ||
6864 | netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb, | 6874 | netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb, |
6865 | struct ixgbe_adapter *adapter, | 6875 | struct ixgbe_adapter *adapter, |
6866 | struct ixgbe_ring *tx_ring) | 6876 | struct ixgbe_ring *tx_ring) |
@@ -7629,27 +7639,11 @@ static void ixgbe_fwd_del(struct net_device *pdev, void *priv) | |||
7629 | kfree(fwd_adapter); | 7639 | kfree(fwd_adapter); |
7630 | } | 7640 | } |
7631 | 7641 | ||
7632 | static netdev_tx_t ixgbe_fwd_xmit(struct sk_buff *skb, | ||
7633 | struct net_device *dev, | ||
7634 | void *priv) | ||
7635 | { | ||
7636 | struct ixgbe_fwd_adapter *fwd_adapter = priv; | ||
7637 | unsigned int queue; | ||
7638 | struct ixgbe_ring *tx_ring; | ||
7639 | |||
7640 | queue = skb->queue_mapping + fwd_adapter->tx_base_queue; | ||
7641 | tx_ring = fwd_adapter->real_adapter->tx_ring[queue]; | ||
7642 | |||
7643 | return __ixgbe_xmit_frame(skb, dev, tx_ring); | ||
7644 | } | ||
7645 | |||
7646 | static const struct net_device_ops ixgbe_netdev_ops = { | 7642 | static const struct net_device_ops ixgbe_netdev_ops = { |
7647 | .ndo_open = ixgbe_open, | 7643 | .ndo_open = ixgbe_open, |
7648 | .ndo_stop = ixgbe_close, | 7644 | .ndo_stop = ixgbe_close, |
7649 | .ndo_start_xmit = ixgbe_xmit_frame, | 7645 | .ndo_start_xmit = ixgbe_xmit_frame, |
7650 | #ifdef IXGBE_FCOE | ||
7651 | .ndo_select_queue = ixgbe_select_queue, | 7646 | .ndo_select_queue = ixgbe_select_queue, |
7652 | #endif | ||
7653 | .ndo_set_rx_mode = ixgbe_set_rx_mode, | 7647 | .ndo_set_rx_mode = ixgbe_set_rx_mode, |
7654 | .ndo_validate_addr = eth_validate_addr, | 7648 | .ndo_validate_addr = eth_validate_addr, |
7655 | .ndo_set_mac_address = ixgbe_set_mac, | 7649 | .ndo_set_mac_address = ixgbe_set_mac, |
@@ -7689,7 +7683,6 @@ static const struct net_device_ops ixgbe_netdev_ops = { | |||
7689 | .ndo_bridge_getlink = ixgbe_ndo_bridge_getlink, | 7683 | .ndo_bridge_getlink = ixgbe_ndo_bridge_getlink, |
7690 | .ndo_dfwd_add_station = ixgbe_fwd_add, | 7684 | .ndo_dfwd_add_station = ixgbe_fwd_add, |
7691 | .ndo_dfwd_del_station = ixgbe_fwd_del, | 7685 | .ndo_dfwd_del_station = ixgbe_fwd_del, |
7692 | .ndo_dfwd_start_xmit = ixgbe_fwd_xmit, | ||
7693 | }; | 7686 | }; |
7694 | 7687 | ||
7695 | /** | 7688 | /** |
diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c index 974a007c4277..8f9266c64c75 100644 --- a/drivers/net/ethernet/lantiq_etop.c +++ b/drivers/net/ethernet/lantiq_etop.c | |||
@@ -618,7 +618,8 @@ ltq_etop_set_multicast_list(struct net_device *dev) | |||
618 | } | 618 | } |
619 | 619 | ||
620 | static u16 | 620 | static u16 |
621 | ltq_etop_select_queue(struct net_device *dev, struct sk_buff *skb) | 621 | ltq_etop_select_queue(struct net_device *dev, struct sk_buff *skb, |
622 | void *accel_priv) | ||
622 | { | 623 | { |
623 | /* we are currently only using the first queue */ | 624 | /* we are currently only using the first queue */ |
624 | return 0; | 625 | return 0; |
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c index 160e86d21607..8e8a7eb43a2c 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c | |||
@@ -628,7 +628,8 @@ static void build_inline_wqe(struct mlx4_en_tx_desc *tx_desc, struct sk_buff *sk | |||
628 | } | 628 | } |
629 | } | 629 | } |
630 | 630 | ||
631 | u16 mlx4_en_select_queue(struct net_device *dev, struct sk_buff *skb) | 631 | u16 mlx4_en_select_queue(struct net_device *dev, struct sk_buff *skb, |
632 | void *accel_priv) | ||
632 | { | 633 | { |
633 | struct mlx4_en_priv *priv = netdev_priv(dev); | 634 | struct mlx4_en_priv *priv = netdev_priv(dev); |
634 | u16 rings_p_up = priv->num_tx_rings_p_up; | 635 | u16 rings_p_up = priv->num_tx_rings_p_up; |
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h index fe7bdfebf353..3af04c3f42ea 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h +++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | |||
@@ -722,7 +722,8 @@ int mlx4_en_set_cq_moder(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq); | |||
722 | int mlx4_en_arm_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq); | 722 | int mlx4_en_arm_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq); |
723 | 723 | ||
724 | void mlx4_en_tx_irq(struct mlx4_cq *mcq); | 724 | void mlx4_en_tx_irq(struct mlx4_cq *mcq); |
725 | u16 mlx4_en_select_queue(struct net_device *dev, struct sk_buff *skb); | 725 | u16 mlx4_en_select_queue(struct net_device *dev, struct sk_buff *skb, |
726 | void *accel_priv); | ||
726 | netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev); | 727 | netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev); |
727 | 728 | ||
728 | int mlx4_en_create_tx_ring(struct mlx4_en_priv *priv, | 729 | int mlx4_en_create_tx_ring(struct mlx4_en_priv *priv, |
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h index 25e1492ad528..1accd9531224 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | |||
@@ -1723,6 +1723,7 @@ int qlcnic_83xx_init_mailbox_work(struct qlcnic_adapter *); | |||
1723 | void qlcnic_83xx_detach_mailbox_work(struct qlcnic_adapter *); | 1723 | void qlcnic_83xx_detach_mailbox_work(struct qlcnic_adapter *); |
1724 | void qlcnic_83xx_reinit_mbx_work(struct qlcnic_mailbox *mbx); | 1724 | void qlcnic_83xx_reinit_mbx_work(struct qlcnic_mailbox *mbx); |
1725 | void qlcnic_83xx_free_mailbox(struct qlcnic_mailbox *mbx); | 1725 | void qlcnic_83xx_free_mailbox(struct qlcnic_mailbox *mbx); |
1726 | void qlcnic_update_stats(struct qlcnic_adapter *); | ||
1726 | 1727 | ||
1727 | /* Adapter hardware abstraction */ | 1728 | /* Adapter hardware abstraction */ |
1728 | struct qlcnic_hardware_ops { | 1729 | struct qlcnic_hardware_ops { |
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c index 45fa6eff56c9..18ced0fb6cf0 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | |||
@@ -167,27 +167,35 @@ static const char qlcnic_gstrings_test[][ETH_GSTRING_LEN] = { | |||
167 | 167 | ||
168 | #define QLCNIC_TEST_LEN ARRAY_SIZE(qlcnic_gstrings_test) | 168 | #define QLCNIC_TEST_LEN ARRAY_SIZE(qlcnic_gstrings_test) |
169 | 169 | ||
170 | static inline int qlcnic_82xx_statistics(void) | 170 | static inline int qlcnic_82xx_statistics(struct qlcnic_adapter *adapter) |
171 | { | 171 | { |
172 | return ARRAY_SIZE(qlcnic_device_gstrings_stats) + | 172 | return ARRAY_SIZE(qlcnic_gstrings_stats) + |
173 | ARRAY_SIZE(qlcnic_83xx_mac_stats_strings); | 173 | ARRAY_SIZE(qlcnic_83xx_mac_stats_strings) + |
174 | QLCNIC_TX_STATS_LEN * adapter->drv_tx_rings; | ||
174 | } | 175 | } |
175 | 176 | ||
176 | static inline int qlcnic_83xx_statistics(void) | 177 | static inline int qlcnic_83xx_statistics(struct qlcnic_adapter *adapter) |
177 | { | 178 | { |
178 | return ARRAY_SIZE(qlcnic_83xx_tx_stats_strings) + | 179 | return ARRAY_SIZE(qlcnic_gstrings_stats) + |
180 | ARRAY_SIZE(qlcnic_83xx_tx_stats_strings) + | ||
179 | ARRAY_SIZE(qlcnic_83xx_mac_stats_strings) + | 181 | ARRAY_SIZE(qlcnic_83xx_mac_stats_strings) + |
180 | ARRAY_SIZE(qlcnic_83xx_rx_stats_strings); | 182 | ARRAY_SIZE(qlcnic_83xx_rx_stats_strings) + |
183 | QLCNIC_TX_STATS_LEN * adapter->drv_tx_rings; | ||
181 | } | 184 | } |
182 | 185 | ||
183 | static int qlcnic_dev_statistics_len(struct qlcnic_adapter *adapter) | 186 | static int qlcnic_dev_statistics_len(struct qlcnic_adapter *adapter) |
184 | { | 187 | { |
185 | if (qlcnic_82xx_check(adapter)) | 188 | int len = -1; |
186 | return qlcnic_82xx_statistics(); | 189 | |
187 | else if (qlcnic_83xx_check(adapter)) | 190 | if (qlcnic_82xx_check(adapter)) { |
188 | return qlcnic_83xx_statistics(); | 191 | len = qlcnic_82xx_statistics(adapter); |
189 | else | 192 | if (adapter->flags & QLCNIC_ESWITCH_ENABLED) |
190 | return -1; | 193 | len += ARRAY_SIZE(qlcnic_device_gstrings_stats); |
194 | } else if (qlcnic_83xx_check(adapter)) { | ||
195 | len = qlcnic_83xx_statistics(adapter); | ||
196 | } | ||
197 | |||
198 | return len; | ||
191 | } | 199 | } |
192 | 200 | ||
193 | #define QLCNIC_TX_INTR_NOT_CONFIGURED 0X78563412 | 201 | #define QLCNIC_TX_INTR_NOT_CONFIGURED 0X78563412 |
@@ -923,18 +931,13 @@ static int qlcnic_eeprom_test(struct net_device *dev) | |||
923 | 931 | ||
924 | static int qlcnic_get_sset_count(struct net_device *dev, int sset) | 932 | static int qlcnic_get_sset_count(struct net_device *dev, int sset) |
925 | { | 933 | { |
926 | int len; | ||
927 | 934 | ||
928 | struct qlcnic_adapter *adapter = netdev_priv(dev); | 935 | struct qlcnic_adapter *adapter = netdev_priv(dev); |
929 | switch (sset) { | 936 | switch (sset) { |
930 | case ETH_SS_TEST: | 937 | case ETH_SS_TEST: |
931 | return QLCNIC_TEST_LEN; | 938 | return QLCNIC_TEST_LEN; |
932 | case ETH_SS_STATS: | 939 | case ETH_SS_STATS: |
933 | len = qlcnic_dev_statistics_len(adapter) + QLCNIC_STATS_LEN; | 940 | return qlcnic_dev_statistics_len(adapter); |
934 | if ((adapter->flags & QLCNIC_ESWITCH_ENABLED) || | ||
935 | qlcnic_83xx_check(adapter)) | ||
936 | return len; | ||
937 | return qlcnic_82xx_statistics(); | ||
938 | default: | 941 | default: |
939 | return -EOPNOTSUPP; | 942 | return -EOPNOTSUPP; |
940 | } | 943 | } |
@@ -1270,7 +1273,7 @@ static u64 *qlcnic_fill_stats(u64 *data, void *stats, int type) | |||
1270 | return data; | 1273 | return data; |
1271 | } | 1274 | } |
1272 | 1275 | ||
1273 | static void qlcnic_update_stats(struct qlcnic_adapter *adapter) | 1276 | void qlcnic_update_stats(struct qlcnic_adapter *adapter) |
1274 | { | 1277 | { |
1275 | struct qlcnic_host_tx_ring *tx_ring; | 1278 | struct qlcnic_host_tx_ring *tx_ring; |
1276 | int ring; | 1279 | int ring; |
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c index a57dfe4ad40e..eec7b412477c 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | |||
@@ -2780,6 +2780,9 @@ static struct net_device_stats *qlcnic_get_stats(struct net_device *netdev) | |||
2780 | struct qlcnic_adapter *adapter = netdev_priv(netdev); | 2780 | struct qlcnic_adapter *adapter = netdev_priv(netdev); |
2781 | struct net_device_stats *stats = &netdev->stats; | 2781 | struct net_device_stats *stats = &netdev->stats; |
2782 | 2782 | ||
2783 | if (test_bit(__QLCNIC_DEV_UP, &adapter->state)) | ||
2784 | qlcnic_update_stats(adapter); | ||
2785 | |||
2783 | stats->rx_packets = adapter->stats.rx_pkts + adapter->stats.lro_pkts; | 2786 | stats->rx_packets = adapter->stats.rx_pkts + adapter->stats.lro_pkts; |
2784 | stats->tx_packets = adapter->stats.xmitfinished; | 2787 | stats->tx_packets = adapter->stats.xmitfinished; |
2785 | stats->rx_bytes = adapter->stats.rxbytes + adapter->stats.lrobytes; | 2788 | stats->rx_bytes = adapter->stats.rxbytes + adapter->stats.lrobytes; |
diff --git a/drivers/net/ethernet/tile/tilegx.c b/drivers/net/ethernet/tile/tilegx.c index 570495be77f3..023237a65720 100644 --- a/drivers/net/ethernet/tile/tilegx.c +++ b/drivers/net/ethernet/tile/tilegx.c | |||
@@ -2070,7 +2070,8 @@ static int tile_net_tx(struct sk_buff *skb, struct net_device *dev) | |||
2070 | } | 2070 | } |
2071 | 2071 | ||
2072 | /* Return subqueue id on this core (one per core). */ | 2072 | /* Return subqueue id on this core (one per core). */ |
2073 | static u16 tile_net_select_queue(struct net_device *dev, struct sk_buff *skb) | 2073 | static u16 tile_net_select_queue(struct net_device *dev, struct sk_buff *skb, |
2074 | void *accel_priv) | ||
2074 | { | 2075 | { |
2075 | return smp_processor_id(); | 2076 | return smp_processor_id(); |
2076 | } | 2077 | } |
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index 09ababe54a5b..8433de4509c7 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c | |||
@@ -299,7 +299,7 @@ static netdev_tx_t macvlan_start_xmit(struct sk_buff *skb, | |||
299 | 299 | ||
300 | if (vlan->fwd_priv) { | 300 | if (vlan->fwd_priv) { |
301 | skb->dev = vlan->lowerdev; | 301 | skb->dev = vlan->lowerdev; |
302 | ret = dev_hard_start_xmit(skb, skb->dev, NULL, vlan->fwd_priv); | 302 | ret = dev_queue_xmit_accel(skb, vlan->fwd_priv); |
303 | } else { | 303 | } else { |
304 | ret = macvlan_queue_xmit(skb, dev); | 304 | ret = macvlan_queue_xmit(skb, dev); |
305 | } | 305 | } |
@@ -337,6 +337,8 @@ static const struct header_ops macvlan_hard_header_ops = { | |||
337 | .cache_update = eth_header_cache_update, | 337 | .cache_update = eth_header_cache_update, |
338 | }; | 338 | }; |
339 | 339 | ||
340 | static struct rtnl_link_ops macvlan_link_ops; | ||
341 | |||
340 | static int macvlan_open(struct net_device *dev) | 342 | static int macvlan_open(struct net_device *dev) |
341 | { | 343 | { |
342 | struct macvlan_dev *vlan = netdev_priv(dev); | 344 | struct macvlan_dev *vlan = netdev_priv(dev); |
@@ -352,7 +354,8 @@ static int macvlan_open(struct net_device *dev) | |||
352 | goto hash_add; | 354 | goto hash_add; |
353 | } | 355 | } |
354 | 356 | ||
355 | if (lowerdev->features & NETIF_F_HW_L2FW_DOFFLOAD) { | 357 | if (lowerdev->features & NETIF_F_HW_L2FW_DOFFLOAD && |
358 | dev->rtnl_link_ops == &macvlan_link_ops) { | ||
356 | vlan->fwd_priv = | 359 | vlan->fwd_priv = |
357 | lowerdev->netdev_ops->ndo_dfwd_add_station(lowerdev, dev); | 360 | lowerdev->netdev_ops->ndo_dfwd_add_station(lowerdev, dev); |
358 | 361 | ||
@@ -361,10 +364,8 @@ static int macvlan_open(struct net_device *dev) | |||
361 | */ | 364 | */ |
362 | if (IS_ERR_OR_NULL(vlan->fwd_priv)) { | 365 | if (IS_ERR_OR_NULL(vlan->fwd_priv)) { |
363 | vlan->fwd_priv = NULL; | 366 | vlan->fwd_priv = NULL; |
364 | } else { | 367 | } else |
365 | dev->features &= ~NETIF_F_LLTX; | ||
366 | return 0; | 368 | return 0; |
367 | } | ||
368 | } | 369 | } |
369 | 370 | ||
370 | err = -EBUSY; | 371 | err = -EBUSY; |
@@ -698,8 +699,7 @@ static netdev_features_t macvlan_fix_features(struct net_device *dev, | |||
698 | features = netdev_increment_features(vlan->lowerdev->features, | 699 | features = netdev_increment_features(vlan->lowerdev->features, |
699 | features, | 700 | features, |
700 | mask); | 701 | mask); |
701 | if (!vlan->fwd_priv) | 702 | features |= NETIF_F_LLTX; |
702 | features |= NETIF_F_LLTX; | ||
703 | 703 | ||
704 | return features; | 704 | return features; |
705 | } | 705 | } |
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index 736050d6b451..b75ae5bde673 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c | |||
@@ -1647,7 +1647,8 @@ static netdev_tx_t team_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1647 | return NETDEV_TX_OK; | 1647 | return NETDEV_TX_OK; |
1648 | } | 1648 | } |
1649 | 1649 | ||
1650 | static u16 team_select_queue(struct net_device *dev, struct sk_buff *skb) | 1650 | static u16 team_select_queue(struct net_device *dev, struct sk_buff *skb, |
1651 | void *accel_priv) | ||
1651 | { | 1652 | { |
1652 | /* | 1653 | /* |
1653 | * This helper function exists to help dev_pick_tx get the correct | 1654 | * This helper function exists to help dev_pick_tx get the correct |
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 09f66624eaca..34cca74c99ed 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -364,7 +364,8 @@ static inline void tun_flow_save_rps_rxhash(struct tun_flow_entry *e, u32 hash) | |||
364 | * different rxq no. here. If we could not get rxhash, then we would | 364 | * different rxq no. here. If we could not get rxhash, then we would |
365 | * hope the rxq no. may help here. | 365 | * hope the rxq no. may help here. |
366 | */ | 366 | */ |
367 | static u16 tun_select_queue(struct net_device *dev, struct sk_buff *skb) | 367 | static u16 tun_select_queue(struct net_device *dev, struct sk_buff *skb, |
368 | void *accel_priv) | ||
368 | { | 369 | { |
369 | struct tun_struct *tun = netdev_priv(dev); | 370 | struct tun_struct *tun = netdev_priv(dev); |
370 | struct tun_flow_entry *e; | 371 | struct tun_flow_entry *e; |
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 56c175ebae3c..4671da755e7b 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
@@ -1244,7 +1244,7 @@ static int build_dma_sg(const struct sk_buff *skb, struct urb *urb) | |||
1244 | return -ENOMEM; | 1244 | return -ENOMEM; |
1245 | 1245 | ||
1246 | urb->num_sgs = num_sgs; | 1246 | urb->num_sgs = num_sgs; |
1247 | sg_init_table(urb->sg, urb->num_sgs); | 1247 | sg_init_table(urb->sg, urb->num_sgs + 1); |
1248 | 1248 | ||
1249 | sg_set_buf(&urb->sg[s++], skb->data, skb_headlen(skb)); | 1249 | sg_set_buf(&urb->sg[s++], skb->data, skb_headlen(skb)); |
1250 | total_len += skb_headlen(skb); | 1250 | total_len += skb_headlen(skb); |
diff --git a/drivers/net/wireless/iwlwifi/pcie/drv.c b/drivers/net/wireless/iwlwifi/pcie/drv.c index e58b8af56c04..3040924f5f3c 100644 --- a/drivers/net/wireless/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/iwlwifi/pcie/drv.c | |||
@@ -362,21 +362,27 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = { | |||
362 | {IWL_PCI_DEVICE(0x095B, 0x5310, iwl7265_2ac_cfg)}, | 362 | {IWL_PCI_DEVICE(0x095B, 0x5310, iwl7265_2ac_cfg)}, |
363 | {IWL_PCI_DEVICE(0x095B, 0x5302, iwl7265_2ac_cfg)}, | 363 | {IWL_PCI_DEVICE(0x095B, 0x5302, iwl7265_2ac_cfg)}, |
364 | {IWL_PCI_DEVICE(0x095B, 0x5210, iwl7265_2ac_cfg)}, | 364 | {IWL_PCI_DEVICE(0x095B, 0x5210, iwl7265_2ac_cfg)}, |
365 | {IWL_PCI_DEVICE(0x095B, 0x5012, iwl7265_2ac_cfg)}, | 365 | {IWL_PCI_DEVICE(0x095A, 0x5012, iwl7265_2ac_cfg)}, |
366 | {IWL_PCI_DEVICE(0x095B, 0x500A, iwl7265_2ac_cfg)}, | 366 | {IWL_PCI_DEVICE(0x095A, 0x500A, iwl7265_2ac_cfg)}, |
367 | {IWL_PCI_DEVICE(0x095A, 0x5410, iwl7265_2ac_cfg)}, | 367 | {IWL_PCI_DEVICE(0x095A, 0x5410, iwl7265_2ac_cfg)}, |
368 | {IWL_PCI_DEVICE(0x095A, 0x5400, iwl7265_2ac_cfg)}, | ||
368 | {IWL_PCI_DEVICE(0x095A, 0x1010, iwl7265_2ac_cfg)}, | 369 | {IWL_PCI_DEVICE(0x095A, 0x1010, iwl7265_2ac_cfg)}, |
369 | {IWL_PCI_DEVICE(0x095A, 0x5000, iwl7265_2n_cfg)}, | 370 | {IWL_PCI_DEVICE(0x095A, 0x5000, iwl7265_2n_cfg)}, |
370 | {IWL_PCI_DEVICE(0x095B, 0x5200, iwl7265_2n_cfg)}, | 371 | {IWL_PCI_DEVICE(0x095B, 0x5200, iwl7265_2n_cfg)}, |
371 | {IWL_PCI_DEVICE(0x095A, 0x5002, iwl7265_n_cfg)}, | 372 | {IWL_PCI_DEVICE(0x095A, 0x5002, iwl7265_n_cfg)}, |
372 | {IWL_PCI_DEVICE(0x095B, 0x5202, iwl7265_n_cfg)}, | 373 | {IWL_PCI_DEVICE(0x095B, 0x5202, iwl7265_n_cfg)}, |
373 | {IWL_PCI_DEVICE(0x095A, 0x9010, iwl7265_2ac_cfg)}, | 374 | {IWL_PCI_DEVICE(0x095A, 0x9010, iwl7265_2ac_cfg)}, |
375 | {IWL_PCI_DEVICE(0x095A, 0x9110, iwl7265_2ac_cfg)}, | ||
374 | {IWL_PCI_DEVICE(0x095A, 0x9210, iwl7265_2ac_cfg)}, | 376 | {IWL_PCI_DEVICE(0x095A, 0x9210, iwl7265_2ac_cfg)}, |
377 | {IWL_PCI_DEVICE(0x095A, 0x9510, iwl7265_2ac_cfg)}, | ||
378 | {IWL_PCI_DEVICE(0x095A, 0x9310, iwl7265_2ac_cfg)}, | ||
375 | {IWL_PCI_DEVICE(0x095A, 0x9410, iwl7265_2ac_cfg)}, | 379 | {IWL_PCI_DEVICE(0x095A, 0x9410, iwl7265_2ac_cfg)}, |
376 | {IWL_PCI_DEVICE(0x095A, 0x5020, iwl7265_2n_cfg)}, | 380 | {IWL_PCI_DEVICE(0x095A, 0x5020, iwl7265_2n_cfg)}, |
377 | {IWL_PCI_DEVICE(0x095A, 0x502A, iwl7265_2n_cfg)}, | 381 | {IWL_PCI_DEVICE(0x095A, 0x502A, iwl7265_2n_cfg)}, |
378 | {IWL_PCI_DEVICE(0x095A, 0x5420, iwl7265_2n_cfg)}, | 382 | {IWL_PCI_DEVICE(0x095A, 0x5420, iwl7265_2n_cfg)}, |
379 | {IWL_PCI_DEVICE(0x095A, 0x5090, iwl7265_2ac_cfg)}, | 383 | {IWL_PCI_DEVICE(0x095A, 0x5090, iwl7265_2ac_cfg)}, |
384 | {IWL_PCI_DEVICE(0x095A, 0x5190, iwl7265_2ac_cfg)}, | ||
385 | {IWL_PCI_DEVICE(0x095A, 0x5590, iwl7265_2ac_cfg)}, | ||
380 | {IWL_PCI_DEVICE(0x095B, 0x5290, iwl7265_2ac_cfg)}, | 386 | {IWL_PCI_DEVICE(0x095B, 0x5290, iwl7265_2ac_cfg)}, |
381 | {IWL_PCI_DEVICE(0x095A, 0x5490, iwl7265_2ac_cfg)}, | 387 | {IWL_PCI_DEVICE(0x095A, 0x5490, iwl7265_2ac_cfg)}, |
382 | #endif /* CONFIG_IWLMVM */ | 388 | #endif /* CONFIG_IWLMVM */ |
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 9c0cc8ded021..fa41a773b79b 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -2018,7 +2018,7 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2, | |||
2018 | (hwsim_flags & HWSIM_TX_STAT_ACK)) { | 2018 | (hwsim_flags & HWSIM_TX_STAT_ACK)) { |
2019 | if (skb->len >= 16) { | 2019 | if (skb->len >= 16) { |
2020 | hdr = (struct ieee80211_hdr *) skb->data; | 2020 | hdr = (struct ieee80211_hdr *) skb->data; |
2021 | mac80211_hwsim_monitor_ack(txi->rate_driver_data[0], | 2021 | mac80211_hwsim_monitor_ack(data2->channel, |
2022 | hdr->addr2); | 2022 | hdr->addr2); |
2023 | } | 2023 | } |
2024 | txi->flags |= IEEE80211_TX_STAT_ACK; | 2024 | txi->flags |= IEEE80211_TX_STAT_ACK; |
diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c index 2d6f5e1721cf..4d79761b9c87 100644 --- a/drivers/net/wireless/mwifiex/main.c +++ b/drivers/net/wireless/mwifiex/main.c | |||
@@ -747,7 +747,8 @@ static struct net_device_stats *mwifiex_get_stats(struct net_device *dev) | |||
747 | } | 747 | } |
748 | 748 | ||
749 | static u16 | 749 | static u16 |
750 | mwifiex_netdev_select_wmm_queue(struct net_device *dev, struct sk_buff *skb) | 750 | mwifiex_netdev_select_wmm_queue(struct net_device *dev, struct sk_buff *skb, |
751 | void *accel_priv) | ||
751 | { | 752 | { |
752 | skb->priority = cfg80211_classify8021d(skb, NULL); | 753 | skb->priority = cfg80211_classify8021d(skb, NULL); |
753 | return mwifiex_1d_to_wmm_queue[skb->priority]; | 754 | return mwifiex_1d_to_wmm_queue[skb->priority]; |
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 1cf605f67673..e86439283a5d 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
@@ -279,7 +279,9 @@ static acpi_status register_slot(acpi_handle handle, u32 lvl, void *data, | |||
279 | 279 | ||
280 | status = acpi_evaluate_integer(handle, "_ADR", NULL, &adr); | 280 | status = acpi_evaluate_integer(handle, "_ADR", NULL, &adr); |
281 | if (ACPI_FAILURE(status)) { | 281 | if (ACPI_FAILURE(status)) { |
282 | acpi_handle_warn(handle, "can't evaluate _ADR (%#x)\n", status); | 282 | if (status != AE_NOT_FOUND) |
283 | acpi_handle_warn(handle, | ||
284 | "can't evaluate _ADR (%#x)\n", status); | ||
283 | return AE_OK; | 285 | return AE_OK; |
284 | } | 286 | } |
285 | 287 | ||
@@ -643,6 +645,24 @@ static void disable_slot(struct acpiphp_slot *slot) | |||
643 | slot->flags &= (~SLOT_ENABLED); | 645 | slot->flags &= (~SLOT_ENABLED); |
644 | } | 646 | } |
645 | 647 | ||
648 | static bool acpiphp_no_hotplug(acpi_handle handle) | ||
649 | { | ||
650 | struct acpi_device *adev = NULL; | ||
651 | |||
652 | acpi_bus_get_device(handle, &adev); | ||
653 | return adev && adev->flags.no_hotplug; | ||
654 | } | ||
655 | |||
656 | static bool slot_no_hotplug(struct acpiphp_slot *slot) | ||
657 | { | ||
658 | struct acpiphp_func *func; | ||
659 | |||
660 | list_for_each_entry(func, &slot->funcs, sibling) | ||
661 | if (acpiphp_no_hotplug(func_to_handle(func))) | ||
662 | return true; | ||
663 | |||
664 | return false; | ||
665 | } | ||
646 | 666 | ||
647 | /** | 667 | /** |
648 | * get_slot_status - get ACPI slot status | 668 | * get_slot_status - get ACPI slot status |
@@ -701,7 +721,8 @@ static void trim_stale_devices(struct pci_dev *dev) | |||
701 | unsigned long long sta; | 721 | unsigned long long sta; |
702 | 722 | ||
703 | status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); | 723 | status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); |
704 | alive = ACPI_SUCCESS(status) && sta == ACPI_STA_ALL; | 724 | alive = (ACPI_SUCCESS(status) && sta == ACPI_STA_ALL) |
725 | || acpiphp_no_hotplug(handle); | ||
705 | } | 726 | } |
706 | if (!alive) { | 727 | if (!alive) { |
707 | u32 v; | 728 | u32 v; |
@@ -741,8 +762,9 @@ static void acpiphp_check_bridge(struct acpiphp_bridge *bridge) | |||
741 | struct pci_dev *dev, *tmp; | 762 | struct pci_dev *dev, *tmp; |
742 | 763 | ||
743 | mutex_lock(&slot->crit_sect); | 764 | mutex_lock(&slot->crit_sect); |
744 | /* wake up all functions */ | 765 | if (slot_no_hotplug(slot)) { |
745 | if (get_slot_status(slot) == ACPI_STA_ALL) { | 766 | ; /* do nothing */ |
767 | } else if (get_slot_status(slot) == ACPI_STA_ALL) { | ||
746 | /* remove stale devices if any */ | 768 | /* remove stale devices if any */ |
747 | list_for_each_entry_safe(dev, tmp, &bus->devices, | 769 | list_for_each_entry_safe(dev, tmp, &bus->devices, |
748 | bus_list) | 770 | bus_list) |
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index 577074efbe62..f7ebdba14bde 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c | |||
@@ -330,29 +330,32 @@ static int acpi_pci_find_device(struct device *dev, acpi_handle *handle) | |||
330 | static void pci_acpi_setup(struct device *dev) | 330 | static void pci_acpi_setup(struct device *dev) |
331 | { | 331 | { |
332 | struct pci_dev *pci_dev = to_pci_dev(dev); | 332 | struct pci_dev *pci_dev = to_pci_dev(dev); |
333 | acpi_handle handle = ACPI_HANDLE(dev); | 333 | struct acpi_device *adev = ACPI_COMPANION(dev); |
334 | struct acpi_device *adev; | ||
335 | 334 | ||
336 | if (acpi_bus_get_device(handle, &adev) || !adev->wakeup.flags.valid) | 335 | if (!adev) |
336 | return; | ||
337 | |||
338 | pci_acpi_add_pm_notifier(adev, pci_dev); | ||
339 | if (!adev->wakeup.flags.valid) | ||
337 | return; | 340 | return; |
338 | 341 | ||
339 | device_set_wakeup_capable(dev, true); | 342 | device_set_wakeup_capable(dev, true); |
340 | acpi_pci_sleep_wake(pci_dev, false); | 343 | acpi_pci_sleep_wake(pci_dev, false); |
341 | |||
342 | pci_acpi_add_pm_notifier(adev, pci_dev); | ||
343 | if (adev->wakeup.flags.run_wake) | 344 | if (adev->wakeup.flags.run_wake) |
344 | device_set_run_wake(dev, true); | 345 | device_set_run_wake(dev, true); |
345 | } | 346 | } |
346 | 347 | ||
347 | static void pci_acpi_cleanup(struct device *dev) | 348 | static void pci_acpi_cleanup(struct device *dev) |
348 | { | 349 | { |
349 | acpi_handle handle = ACPI_HANDLE(dev); | 350 | struct acpi_device *adev = ACPI_COMPANION(dev); |
350 | struct acpi_device *adev; | 351 | |
352 | if (!adev) | ||
353 | return; | ||
351 | 354 | ||
352 | if (!acpi_bus_get_device(handle, &adev) && adev->wakeup.flags.valid) { | 355 | pci_acpi_remove_pm_notifier(adev); |
356 | if (adev->wakeup.flags.valid) { | ||
353 | device_set_wakeup_capable(dev, false); | 357 | device_set_wakeup_capable(dev, false); |
354 | device_set_run_wake(dev, false); | 358 | device_set_run_wake(dev, false); |
355 | pci_acpi_remove_pm_notifier(adev); | ||
356 | } | 359 | } |
357 | } | 360 | } |
358 | 361 | ||
diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index 5e2054afe840..85ad58c6da17 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig | |||
@@ -196,6 +196,7 @@ config BATTERY_MAX17040 | |||
196 | config BATTERY_MAX17042 | 196 | config BATTERY_MAX17042 |
197 | tristate "Maxim MAX17042/17047/17050/8997/8966 Fuel Gauge" | 197 | tristate "Maxim MAX17042/17047/17050/8997/8966 Fuel Gauge" |
198 | depends on I2C | 198 | depends on I2C |
199 | select REGMAP_I2C | ||
199 | help | 200 | help |
200 | MAX17042 is fuel-gauge systems for lithium-ion (Li+) batteries | 201 | MAX17042 is fuel-gauge systems for lithium-ion (Li+) batteries |
201 | in handheld and portable equipment. The MAX17042 is configured | 202 | in handheld and portable equipment. The MAX17042 is configured |
diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c index 00e667296360..557af943b2f5 100644 --- a/drivers/power/power_supply_core.c +++ b/drivers/power/power_supply_core.c | |||
@@ -511,6 +511,10 @@ int power_supply_register(struct device *parent, struct power_supply *psy) | |||
511 | dev_set_drvdata(dev, psy); | 511 | dev_set_drvdata(dev, psy); |
512 | psy->dev = dev; | 512 | psy->dev = dev; |
513 | 513 | ||
514 | rc = dev_set_name(dev, "%s", psy->name); | ||
515 | if (rc) | ||
516 | goto dev_set_name_failed; | ||
517 | |||
514 | INIT_WORK(&psy->changed_work, power_supply_changed_work); | 518 | INIT_WORK(&psy->changed_work, power_supply_changed_work); |
515 | 519 | ||
516 | rc = power_supply_check_supplies(psy); | 520 | rc = power_supply_check_supplies(psy); |
@@ -524,10 +528,6 @@ int power_supply_register(struct device *parent, struct power_supply *psy) | |||
524 | if (rc) | 528 | if (rc) |
525 | goto wakeup_init_failed; | 529 | goto wakeup_init_failed; |
526 | 530 | ||
527 | rc = kobject_set_name(&dev->kobj, "%s", psy->name); | ||
528 | if (rc) | ||
529 | goto kobject_set_name_failed; | ||
530 | |||
531 | rc = device_add(dev); | 531 | rc = device_add(dev); |
532 | if (rc) | 532 | if (rc) |
533 | goto device_add_failed; | 533 | goto device_add_failed; |
@@ -553,11 +553,11 @@ create_triggers_failed: | |||
553 | register_cooler_failed: | 553 | register_cooler_failed: |
554 | psy_unregister_thermal(psy); | 554 | psy_unregister_thermal(psy); |
555 | register_thermal_failed: | 555 | register_thermal_failed: |
556 | wakeup_init_failed: | ||
557 | device_del(dev); | 556 | device_del(dev); |
558 | kobject_set_name_failed: | ||
559 | device_add_failed: | 557 | device_add_failed: |
558 | wakeup_init_failed: | ||
560 | check_supplies_failed: | 559 | check_supplies_failed: |
560 | dev_set_name_failed: | ||
561 | put_device(dev); | 561 | put_device(dev); |
562 | success: | 562 | success: |
563 | return rc; | 563 | return rc; |
diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c index 3f4ca4e09a4c..34629ea913d4 100644 --- a/drivers/s390/char/tty3270.c +++ b/drivers/s390/char/tty3270.c | |||
@@ -942,7 +942,7 @@ static int tty3270_install(struct tty_driver *driver, struct tty_struct *tty) | |||
942 | return rc; | 942 | return rc; |
943 | } | 943 | } |
944 | 944 | ||
945 | tp->screen = tty3270_alloc_screen(tp->view.cols, tp->view.rows); | 945 | tp->screen = tty3270_alloc_screen(tp->view.rows, tp->view.cols); |
946 | if (IS_ERR(tp->screen)) { | 946 | if (IS_ERR(tp->screen)) { |
947 | rc = PTR_ERR(tp->screen); | 947 | rc = PTR_ERR(tp->screen); |
948 | raw3270_put_view(&tp->view); | 948 | raw3270_put_view(&tp->view); |
diff --git a/drivers/staging/bcm/Bcmnet.c b/drivers/staging/bcm/Bcmnet.c index 53fee2f9a498..8dfdd2732bdc 100644 --- a/drivers/staging/bcm/Bcmnet.c +++ b/drivers/staging/bcm/Bcmnet.c | |||
@@ -39,7 +39,8 @@ static INT bcm_close(struct net_device *dev) | |||
39 | return 0; | 39 | return 0; |
40 | } | 40 | } |
41 | 41 | ||
42 | static u16 bcm_select_queue(struct net_device *dev, struct sk_buff *skb) | 42 | static u16 bcm_select_queue(struct net_device *dev, struct sk_buff *skb, |
43 | void *accel_priv) | ||
43 | { | 44 | { |
44 | return ClassifyPacket(netdev_priv(dev), skb); | 45 | return ClassifyPacket(netdev_priv(dev), skb); |
45 | } | 46 | } |
diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c index 235d2b1ec593..eedffed17e39 100644 --- a/drivers/staging/netlogic/xlr_net.c +++ b/drivers/staging/netlogic/xlr_net.c | |||
@@ -306,7 +306,8 @@ static netdev_tx_t xlr_net_start_xmit(struct sk_buff *skb, | |||
306 | return NETDEV_TX_OK; | 306 | return NETDEV_TX_OK; |
307 | } | 307 | } |
308 | 308 | ||
309 | static u16 xlr_net_select_queue(struct net_device *ndev, struct sk_buff *skb) | 309 | static u16 xlr_net_select_queue(struct net_device *ndev, struct sk_buff *skb, |
310 | void *accel_priv) | ||
310 | { | 311 | { |
311 | return (u16)smp_processor_id(); | 312 | return (u16)smp_processor_id(); |
312 | } | 313 | } |
diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c b/drivers/staging/rtl8188eu/os_dep/os_intfs.c index 17659bb04bef..dd69e344e409 100644 --- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c +++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c | |||
@@ -652,7 +652,8 @@ static unsigned int rtw_classify8021d(struct sk_buff *skb) | |||
652 | return dscp >> 5; | 652 | return dscp >> 5; |
653 | } | 653 | } |
654 | 654 | ||
655 | static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb) | 655 | static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb, |
656 | void *accel_priv) | ||
656 | { | 657 | { |
657 | struct adapter *padapter = rtw_netdev_priv(dev); | 658 | struct adapter *padapter = rtw_netdev_priv(dev); |
658 | struct mlme_priv *pmlmepriv = &padapter->mlmepriv; | 659 | struct mlme_priv *pmlmepriv = &padapter->mlmepriv; |