diff options
author | David S. Miller <davem@davemloft.net> | 2019-02-20 03:34:07 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-20 03:34:07 -0500 |
commit | 375ca548f7e3ac82acdd0959eddd1fa0e17c35cc (patch) | |
tree | 5360dc427e4eff7123613419ee522b7fda831de0 /drivers | |
parent | 58066ac9d7f5dcde4ef08c03b7e127f0522d9ea0 (diff) | |
parent | 40e196a906d969fd10d885c692d2674b3d657006 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Two easily resolvable overlapping change conflicts, one in
TCP and one in the eBPF verifier.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
42 files changed, 298 insertions, 197 deletions
diff --git a/drivers/auxdisplay/ht16k33.c b/drivers/auxdisplay/ht16k33.c index a43276c76fc6..21393ec3b9a4 100644 --- a/drivers/auxdisplay/ht16k33.c +++ b/drivers/auxdisplay/ht16k33.c | |||
@@ -509,7 +509,7 @@ static int ht16k33_remove(struct i2c_client *client) | |||
509 | struct ht16k33_priv *priv = i2c_get_clientdata(client); | 509 | struct ht16k33_priv *priv = i2c_get_clientdata(client); |
510 | struct ht16k33_fbdev *fbdev = &priv->fbdev; | 510 | struct ht16k33_fbdev *fbdev = &priv->fbdev; |
511 | 511 | ||
512 | cancel_delayed_work(&fbdev->work); | 512 | cancel_delayed_work_sync(&fbdev->work); |
513 | unregister_framebuffer(fbdev->info); | 513 | unregister_framebuffer(fbdev->info); |
514 | framebuffer_release(fbdev->info); | 514 | framebuffer_release(fbdev->info); |
515 | free_page((unsigned long) fbdev->buffer); | 515 | free_page((unsigned long) fbdev->buffer); |
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index f94d33525771..d299ec79e4c3 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c | |||
@@ -781,12 +781,12 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = { | |||
781 | SYSC_QUIRK("smartreflex", 0, -1, 0x38, -1, 0x00000000, 0xffffffff, | 781 | SYSC_QUIRK("smartreflex", 0, -1, 0x38, -1, 0x00000000, 0xffffffff, |
782 | SYSC_QUIRK_LEGACY_IDLE), | 782 | SYSC_QUIRK_LEGACY_IDLE), |
783 | SYSC_QUIRK("timer", 0, 0, 0x10, 0x14, 0x00000015, 0xffffffff, | 783 | SYSC_QUIRK("timer", 0, 0, 0x10, 0x14, 0x00000015, 0xffffffff, |
784 | SYSC_QUIRK_LEGACY_IDLE), | 784 | 0), |
785 | /* Some timers on omap4 and later */ | 785 | /* Some timers on omap4 and later */ |
786 | SYSC_QUIRK("timer", 0, 0, 0x10, -1, 0x50002100, 0xffffffff, | 786 | SYSC_QUIRK("timer", 0, 0, 0x10, -1, 0x50002100, 0xffffffff, |
787 | SYSC_QUIRK_LEGACY_IDLE), | 787 | 0), |
788 | SYSC_QUIRK("timer", 0, 0, 0x10, -1, 0x4fff1301, 0xffff00ff, | 788 | SYSC_QUIRK("timer", 0, 0, 0x10, -1, 0x4fff1301, 0xffff00ff, |
789 | SYSC_QUIRK_LEGACY_IDLE), | 789 | 0), |
790 | SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x00000052, 0xffffffff, | 790 | SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x00000052, 0xffffffff, |
791 | SYSC_QUIRK_LEGACY_IDLE), | 791 | SYSC_QUIRK_LEGACY_IDLE), |
792 | /* Uarts on omap4 and later */ | 792 | /* Uarts on omap4 and later */ |
diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c index 595124074821..c364027638e1 100644 --- a/drivers/clocksource/timer-ti-dm.c +++ b/drivers/clocksource/timer-ti-dm.c | |||
@@ -154,6 +154,10 @@ static int omap_dm_timer_of_set_source(struct omap_dm_timer *timer) | |||
154 | if (IS_ERR(parent)) | 154 | if (IS_ERR(parent)) |
155 | return -ENODEV; | 155 | return -ENODEV; |
156 | 156 | ||
157 | /* Bail out if both clocks point to fck */ | ||
158 | if (clk_is_match(parent, timer->fclk)) | ||
159 | return 0; | ||
160 | |||
157 | ret = clk_set_parent(timer->fclk, parent); | 161 | ret = clk_set_parent(timer->fclk, parent); |
158 | if (ret < 0) | 162 | if (ret < 0) |
159 | pr_err("%s: failed to set parent\n", __func__); | 163 | pr_err("%s: failed to set parent\n", __func__); |
@@ -864,7 +868,6 @@ static int omap_dm_timer_probe(struct platform_device *pdev) | |||
864 | timer->pdev = pdev; | 868 | timer->pdev = pdev; |
865 | 869 | ||
866 | pm_runtime_enable(dev); | 870 | pm_runtime_enable(dev); |
867 | pm_runtime_irq_safe(dev); | ||
868 | 871 | ||
869 | if (!timer->reserved) { | 872 | if (!timer->reserved) { |
870 | ret = pm_runtime_get_sync(dev); | 873 | ret = pm_runtime_get_sync(dev); |
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index 4c46ff6f2242..55b77c576c42 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c | |||
@@ -592,11 +592,7 @@ int __init efi_config_parse_tables(void *config_tables, int count, int sz, | |||
592 | 592 | ||
593 | early_memunmap(tbl, sizeof(*tbl)); | 593 | early_memunmap(tbl, sizeof(*tbl)); |
594 | } | 594 | } |
595 | return 0; | ||
596 | } | ||
597 | 595 | ||
598 | int __init efi_apply_persistent_mem_reservations(void) | ||
599 | { | ||
600 | if (efi.mem_reserve != EFI_INVALID_TABLE_ADDR) { | 596 | if (efi.mem_reserve != EFI_INVALID_TABLE_ADDR) { |
601 | unsigned long prsv = efi.mem_reserve; | 597 | unsigned long prsv = efi.mem_reserve; |
602 | 598 | ||
diff --git a/drivers/firmware/efi/libstub/arm-stub.c b/drivers/firmware/efi/libstub/arm-stub.c index eee42d5e25ee..c037c6c5d0b7 100644 --- a/drivers/firmware/efi/libstub/arm-stub.c +++ b/drivers/firmware/efi/libstub/arm-stub.c | |||
@@ -75,9 +75,6 @@ void install_memreserve_table(efi_system_table_t *sys_table_arg) | |||
75 | efi_guid_t memreserve_table_guid = LINUX_EFI_MEMRESERVE_TABLE_GUID; | 75 | efi_guid_t memreserve_table_guid = LINUX_EFI_MEMRESERVE_TABLE_GUID; |
76 | efi_status_t status; | 76 | efi_status_t status; |
77 | 77 | ||
78 | if (IS_ENABLED(CONFIG_ARM)) | ||
79 | return; | ||
80 | |||
81 | status = efi_call_early(allocate_pool, EFI_LOADER_DATA, sizeof(*rsv), | 78 | status = efi_call_early(allocate_pool, EFI_LOADER_DATA, sizeof(*rsv), |
82 | (void **)&rsv); | 79 | (void **)&rsv); |
83 | if (status != EFI_SUCCESS) { | 80 | if (status != EFI_SUCCESS) { |
diff --git a/drivers/firmware/efi/runtime-wrappers.c b/drivers/firmware/efi/runtime-wrappers.c index 8903b9ccfc2b..e2abfdb5cee6 100644 --- a/drivers/firmware/efi/runtime-wrappers.c +++ b/drivers/firmware/efi/runtime-wrappers.c | |||
@@ -147,6 +147,13 @@ void efi_call_virt_check_flags(unsigned long flags, const char *call) | |||
147 | static DEFINE_SEMAPHORE(efi_runtime_lock); | 147 | static DEFINE_SEMAPHORE(efi_runtime_lock); |
148 | 148 | ||
149 | /* | 149 | /* |
150 | * Expose the EFI runtime lock to the UV platform | ||
151 | */ | ||
152 | #ifdef CONFIG_X86_UV | ||
153 | extern struct semaphore __efi_uv_runtime_lock __alias(efi_runtime_lock); | ||
154 | #endif | ||
155 | |||
156 | /* | ||
150 | * Calls the appropriate efi_runtime_service() with the appropriate | 157 | * Calls the appropriate efi_runtime_service() with the appropriate |
151 | * arguments. | 158 | * arguments. |
152 | * | 159 | * |
diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c index ec6e69aa3a8e..d2fbb4bb4a43 100644 --- a/drivers/i2c/busses/i2c-bcm2835.c +++ b/drivers/i2c/busses/i2c-bcm2835.c | |||
@@ -183,6 +183,15 @@ static void bcm2835_i2c_start_transfer(struct bcm2835_i2c_dev *i2c_dev) | |||
183 | bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, c); | 183 | bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, c); |
184 | } | 184 | } |
185 | 185 | ||
186 | static void bcm2835_i2c_finish_transfer(struct bcm2835_i2c_dev *i2c_dev) | ||
187 | { | ||
188 | i2c_dev->curr_msg = NULL; | ||
189 | i2c_dev->num_msgs = 0; | ||
190 | |||
191 | i2c_dev->msg_buf = NULL; | ||
192 | i2c_dev->msg_buf_remaining = 0; | ||
193 | } | ||
194 | |||
186 | /* | 195 | /* |
187 | * Note about I2C_C_CLEAR on error: | 196 | * Note about I2C_C_CLEAR on error: |
188 | * The I2C_C_CLEAR on errors will take some time to resolve -- if you were in | 197 | * The I2C_C_CLEAR on errors will take some time to resolve -- if you were in |
@@ -283,6 +292,9 @@ static int bcm2835_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], | |||
283 | 292 | ||
284 | time_left = wait_for_completion_timeout(&i2c_dev->completion, | 293 | time_left = wait_for_completion_timeout(&i2c_dev->completion, |
285 | adap->timeout); | 294 | adap->timeout); |
295 | |||
296 | bcm2835_i2c_finish_transfer(i2c_dev); | ||
297 | |||
286 | if (!time_left) { | 298 | if (!time_left) { |
287 | bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, | 299 | bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, |
288 | BCM2835_I2C_C_CLEAR); | 300 | BCM2835_I2C_C_CLEAR); |
diff --git a/drivers/i2c/busses/i2c-cadence.c b/drivers/i2c/busses/i2c-cadence.c index b13605718291..d917cefc5a19 100644 --- a/drivers/i2c/busses/i2c-cadence.c +++ b/drivers/i2c/busses/i2c-cadence.c | |||
@@ -382,8 +382,10 @@ static void cdns_i2c_mrecv(struct cdns_i2c *id) | |||
382 | * Check for the message size against FIFO depth and set the | 382 | * Check for the message size against FIFO depth and set the |
383 | * 'hold bus' bit if it is greater than FIFO depth. | 383 | * 'hold bus' bit if it is greater than FIFO depth. |
384 | */ | 384 | */ |
385 | if (id->recv_count > CDNS_I2C_FIFO_DEPTH) | 385 | if ((id->recv_count > CDNS_I2C_FIFO_DEPTH) || id->bus_hold_flag) |
386 | ctrl_reg |= CDNS_I2C_CR_HOLD; | 386 | ctrl_reg |= CDNS_I2C_CR_HOLD; |
387 | else | ||
388 | ctrl_reg = ctrl_reg & ~CDNS_I2C_CR_HOLD; | ||
387 | 389 | ||
388 | cdns_i2c_writereg(ctrl_reg, CDNS_I2C_CR_OFFSET); | 390 | cdns_i2c_writereg(ctrl_reg, CDNS_I2C_CR_OFFSET); |
389 | 391 | ||
@@ -440,8 +442,11 @@ static void cdns_i2c_msend(struct cdns_i2c *id) | |||
440 | * Check for the message size against FIFO depth and set the | 442 | * Check for the message size against FIFO depth and set the |
441 | * 'hold bus' bit if it is greater than FIFO depth. | 443 | * 'hold bus' bit if it is greater than FIFO depth. |
442 | */ | 444 | */ |
443 | if (id->send_count > CDNS_I2C_FIFO_DEPTH) | 445 | if ((id->send_count > CDNS_I2C_FIFO_DEPTH) || id->bus_hold_flag) |
444 | ctrl_reg |= CDNS_I2C_CR_HOLD; | 446 | ctrl_reg |= CDNS_I2C_CR_HOLD; |
447 | else | ||
448 | ctrl_reg = ctrl_reg & ~CDNS_I2C_CR_HOLD; | ||
449 | |||
445 | cdns_i2c_writereg(ctrl_reg, CDNS_I2C_CR_OFFSET); | 450 | cdns_i2c_writereg(ctrl_reg, CDNS_I2C_CR_OFFSET); |
446 | 451 | ||
447 | /* Clear the interrupts in interrupt status register. */ | 452 | /* Clear the interrupts in interrupt status register. */ |
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index 4713957b0cbb..a878351f1643 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig | |||
@@ -420,7 +420,7 @@ config KEYBOARD_MPR121 | |||
420 | 420 | ||
421 | config KEYBOARD_SNVS_PWRKEY | 421 | config KEYBOARD_SNVS_PWRKEY |
422 | tristate "IMX SNVS Power Key Driver" | 422 | tristate "IMX SNVS Power Key Driver" |
423 | depends on SOC_IMX6SX | 423 | depends on SOC_IMX6SX || SOC_IMX7D |
424 | depends on OF | 424 | depends on OF |
425 | help | 425 | help |
426 | This is the snvs powerkey driver for the Freescale i.MX application | 426 | This is the snvs powerkey driver for the Freescale i.MX application |
diff --git a/drivers/input/keyboard/cap11xx.c b/drivers/input/keyboard/cap11xx.c index 312916f99597..73686c2460ce 100644 --- a/drivers/input/keyboard/cap11xx.c +++ b/drivers/input/keyboard/cap11xx.c | |||
@@ -75,9 +75,7 @@ | |||
75 | struct cap11xx_led { | 75 | struct cap11xx_led { |
76 | struct cap11xx_priv *priv; | 76 | struct cap11xx_priv *priv; |
77 | struct led_classdev cdev; | 77 | struct led_classdev cdev; |
78 | struct work_struct work; | ||
79 | u32 reg; | 78 | u32 reg; |
80 | enum led_brightness new_brightness; | ||
81 | }; | 79 | }; |
82 | #endif | 80 | #endif |
83 | 81 | ||
@@ -233,30 +231,21 @@ static void cap11xx_input_close(struct input_dev *idev) | |||
233 | } | 231 | } |
234 | 232 | ||
235 | #ifdef CONFIG_LEDS_CLASS | 233 | #ifdef CONFIG_LEDS_CLASS |
236 | static void cap11xx_led_work(struct work_struct *work) | 234 | static int cap11xx_led_set(struct led_classdev *cdev, |
235 | enum led_brightness value) | ||
237 | { | 236 | { |
238 | struct cap11xx_led *led = container_of(work, struct cap11xx_led, work); | 237 | struct cap11xx_led *led = container_of(cdev, struct cap11xx_led, cdev); |
239 | struct cap11xx_priv *priv = led->priv; | 238 | struct cap11xx_priv *priv = led->priv; |
240 | int value = led->new_brightness; | ||
241 | 239 | ||
242 | /* | 240 | /* |
243 | * All LEDs share the same duty cycle as this is a HW limitation. | 241 | * All LEDs share the same duty cycle as this is a HW |
244 | * Brightness levels per LED are either 0 (OFF) and 1 (ON). | 242 | * limitation. Brightness levels per LED are either |
243 | * 0 (OFF) and 1 (ON). | ||
245 | */ | 244 | */ |
246 | regmap_update_bits(priv->regmap, CAP11XX_REG_LED_OUTPUT_CONTROL, | 245 | return regmap_update_bits(priv->regmap, |
247 | BIT(led->reg), value ? BIT(led->reg) : 0); | 246 | CAP11XX_REG_LED_OUTPUT_CONTROL, |
248 | } | 247 | BIT(led->reg), |
249 | 248 | value ? BIT(led->reg) : 0); | |
250 | static void cap11xx_led_set(struct led_classdev *cdev, | ||
251 | enum led_brightness value) | ||
252 | { | ||
253 | struct cap11xx_led *led = container_of(cdev, struct cap11xx_led, cdev); | ||
254 | |||
255 | if (led->new_brightness == value) | ||
256 | return; | ||
257 | |||
258 | led->new_brightness = value; | ||
259 | schedule_work(&led->work); | ||
260 | } | 249 | } |
261 | 250 | ||
262 | static int cap11xx_init_leds(struct device *dev, | 251 | static int cap11xx_init_leds(struct device *dev, |
@@ -299,7 +288,7 @@ static int cap11xx_init_leds(struct device *dev, | |||
299 | led->cdev.default_trigger = | 288 | led->cdev.default_trigger = |
300 | of_get_property(child, "linux,default-trigger", NULL); | 289 | of_get_property(child, "linux,default-trigger", NULL); |
301 | led->cdev.flags = 0; | 290 | led->cdev.flags = 0; |
302 | led->cdev.brightness_set = cap11xx_led_set; | 291 | led->cdev.brightness_set_blocking = cap11xx_led_set; |
303 | led->cdev.max_brightness = 1; | 292 | led->cdev.max_brightness = 1; |
304 | led->cdev.brightness = LED_OFF; | 293 | led->cdev.brightness = LED_OFF; |
305 | 294 | ||
@@ -312,8 +301,6 @@ static int cap11xx_init_leds(struct device *dev, | |||
312 | led->reg = reg; | 301 | led->reg = reg; |
313 | led->priv = priv; | 302 | led->priv = priv; |
314 | 303 | ||
315 | INIT_WORK(&led->work, cap11xx_led_work); | ||
316 | |||
317 | error = devm_led_classdev_register(dev, &led->cdev); | 304 | error = devm_led_classdev_register(dev, &led->cdev); |
318 | if (error) { | 305 | if (error) { |
319 | of_node_put(child); | 306 | of_node_put(child); |
diff --git a/drivers/input/keyboard/matrix_keypad.c b/drivers/input/keyboard/matrix_keypad.c index 403452ef00e6..3d1cb7bf5e35 100644 --- a/drivers/input/keyboard/matrix_keypad.c +++ b/drivers/input/keyboard/matrix_keypad.c | |||
@@ -222,7 +222,7 @@ static void matrix_keypad_stop(struct input_dev *dev) | |||
222 | keypad->stopped = true; | 222 | keypad->stopped = true; |
223 | spin_unlock_irq(&keypad->lock); | 223 | spin_unlock_irq(&keypad->lock); |
224 | 224 | ||
225 | flush_work(&keypad->work.work); | 225 | flush_delayed_work(&keypad->work); |
226 | /* | 226 | /* |
227 | * matrix_keypad_scan() will leave IRQs enabled; | 227 | * matrix_keypad_scan() will leave IRQs enabled; |
228 | * we should disable them now. | 228 | * we should disable them now. |
diff --git a/drivers/input/keyboard/qt2160.c b/drivers/input/keyboard/qt2160.c index 43b86482dda0..d466bc07aebb 100644 --- a/drivers/input/keyboard/qt2160.c +++ b/drivers/input/keyboard/qt2160.c | |||
@@ -58,10 +58,9 @@ static unsigned char qt2160_key2code[] = { | |||
58 | struct qt2160_led { | 58 | struct qt2160_led { |
59 | struct qt2160_data *qt2160; | 59 | struct qt2160_data *qt2160; |
60 | struct led_classdev cdev; | 60 | struct led_classdev cdev; |
61 | struct work_struct work; | ||
62 | char name[32]; | 61 | char name[32]; |
63 | int id; | 62 | int id; |
64 | enum led_brightness new_brightness; | 63 | enum led_brightness brightness; |
65 | }; | 64 | }; |
66 | #endif | 65 | #endif |
67 | 66 | ||
@@ -74,7 +73,6 @@ struct qt2160_data { | |||
74 | u16 key_matrix; | 73 | u16 key_matrix; |
75 | #ifdef CONFIG_LEDS_CLASS | 74 | #ifdef CONFIG_LEDS_CLASS |
76 | struct qt2160_led leds[QT2160_NUM_LEDS_X]; | 75 | struct qt2160_led leds[QT2160_NUM_LEDS_X]; |
77 | struct mutex led_lock; | ||
78 | #endif | 76 | #endif |
79 | }; | 77 | }; |
80 | 78 | ||
@@ -83,46 +81,39 @@ static int qt2160_write(struct i2c_client *client, u8 reg, u8 data); | |||
83 | 81 | ||
84 | #ifdef CONFIG_LEDS_CLASS | 82 | #ifdef CONFIG_LEDS_CLASS |
85 | 83 | ||
86 | static void qt2160_led_work(struct work_struct *work) | 84 | static int qt2160_led_set(struct led_classdev *cdev, |
85 | enum led_brightness value) | ||
87 | { | 86 | { |
88 | struct qt2160_led *led = container_of(work, struct qt2160_led, work); | 87 | struct qt2160_led *led = container_of(cdev, struct qt2160_led, cdev); |
89 | struct qt2160_data *qt2160 = led->qt2160; | 88 | struct qt2160_data *qt2160 = led->qt2160; |
90 | struct i2c_client *client = qt2160->client; | 89 | struct i2c_client *client = qt2160->client; |
91 | int value = led->new_brightness; | ||
92 | u32 drive, pwmen; | 90 | u32 drive, pwmen; |
93 | 91 | ||
94 | mutex_lock(&qt2160->led_lock); | 92 | if (value != led->brightness) { |
95 | 93 | drive = qt2160_read(client, QT2160_CMD_DRIVE_X); | |
96 | drive = qt2160_read(client, QT2160_CMD_DRIVE_X); | 94 | pwmen = qt2160_read(client, QT2160_CMD_PWMEN_X); |
97 | pwmen = qt2160_read(client, QT2160_CMD_PWMEN_X); | 95 | if (value != LED_OFF) { |
98 | if (value != LED_OFF) { | 96 | drive |= BIT(led->id); |
99 | drive |= (1 << led->id); | 97 | pwmen |= BIT(led->id); |
100 | pwmen |= (1 << led->id); | ||
101 | |||
102 | } else { | ||
103 | drive &= ~(1 << led->id); | ||
104 | pwmen &= ~(1 << led->id); | ||
105 | } | ||
106 | qt2160_write(client, QT2160_CMD_DRIVE_X, drive); | ||
107 | qt2160_write(client, QT2160_CMD_PWMEN_X, pwmen); | ||
108 | 98 | ||
109 | /* | 99 | } else { |
110 | * Changing this register will change the brightness | 100 | drive &= ~BIT(led->id); |
111 | * of every LED in the qt2160. It's a HW limitation. | 101 | pwmen &= ~BIT(led->id); |
112 | */ | 102 | } |
113 | if (value != LED_OFF) | 103 | qt2160_write(client, QT2160_CMD_DRIVE_X, drive); |
114 | qt2160_write(client, QT2160_CMD_PWM_DUTY, value); | 104 | qt2160_write(client, QT2160_CMD_PWMEN_X, pwmen); |
115 | 105 | ||
116 | mutex_unlock(&qt2160->led_lock); | 106 | /* |
117 | } | 107 | * Changing this register will change the brightness |
108 | * of every LED in the qt2160. It's a HW limitation. | ||
109 | */ | ||
110 | if (value != LED_OFF) | ||
111 | qt2160_write(client, QT2160_CMD_PWM_DUTY, value); | ||
118 | 112 | ||
119 | static void qt2160_led_set(struct led_classdev *cdev, | 113 | led->brightness = value; |
120 | enum led_brightness value) | 114 | } |
121 | { | ||
122 | struct qt2160_led *led = container_of(cdev, struct qt2160_led, cdev); | ||
123 | 115 | ||
124 | led->new_brightness = value; | 116 | return 0; |
125 | schedule_work(&led->work); | ||
126 | } | 117 | } |
127 | 118 | ||
128 | #endif /* CONFIG_LEDS_CLASS */ | 119 | #endif /* CONFIG_LEDS_CLASS */ |
@@ -293,20 +284,16 @@ static int qt2160_register_leds(struct qt2160_data *qt2160) | |||
293 | int ret; | 284 | int ret; |
294 | int i; | 285 | int i; |
295 | 286 | ||
296 | mutex_init(&qt2160->led_lock); | ||
297 | |||
298 | for (i = 0; i < QT2160_NUM_LEDS_X; i++) { | 287 | for (i = 0; i < QT2160_NUM_LEDS_X; i++) { |
299 | struct qt2160_led *led = &qt2160->leds[i]; | 288 | struct qt2160_led *led = &qt2160->leds[i]; |
300 | 289 | ||
301 | snprintf(led->name, sizeof(led->name), "qt2160:x%d", i); | 290 | snprintf(led->name, sizeof(led->name), "qt2160:x%d", i); |
302 | led->cdev.name = led->name; | 291 | led->cdev.name = led->name; |
303 | led->cdev.brightness_set = qt2160_led_set; | 292 | led->cdev.brightness_set_blocking = qt2160_led_set; |
304 | led->cdev.brightness = LED_OFF; | 293 | led->cdev.brightness = LED_OFF; |
305 | led->id = i; | 294 | led->id = i; |
306 | led->qt2160 = qt2160; | 295 | led->qt2160 = qt2160; |
307 | 296 | ||
308 | INIT_WORK(&led->work, qt2160_led_work); | ||
309 | |||
310 | ret = led_classdev_register(&client->dev, &led->cdev); | 297 | ret = led_classdev_register(&client->dev, &led->cdev); |
311 | if (ret < 0) | 298 | if (ret < 0) |
312 | return ret; | 299 | return ret; |
@@ -324,10 +311,8 @@ static void qt2160_unregister_leds(struct qt2160_data *qt2160) | |||
324 | { | 311 | { |
325 | int i; | 312 | int i; |
326 | 313 | ||
327 | for (i = 0; i < QT2160_NUM_LEDS_X; i++) { | 314 | for (i = 0; i < QT2160_NUM_LEDS_X; i++) |
328 | led_classdev_unregister(&qt2160->leds[i].cdev); | 315 | led_classdev_unregister(&qt2160->leds[i].cdev); |
329 | cancel_work_sync(&qt2160->leds[i].work); | ||
330 | } | ||
331 | } | 316 | } |
332 | 317 | ||
333 | #else | 318 | #else |
diff --git a/drivers/input/keyboard/st-keyscan.c b/drivers/input/keyboard/st-keyscan.c index babcfb165e4f..3b85631fde91 100644 --- a/drivers/input/keyboard/st-keyscan.c +++ b/drivers/input/keyboard/st-keyscan.c | |||
@@ -153,6 +153,8 @@ static int keyscan_probe(struct platform_device *pdev) | |||
153 | 153 | ||
154 | input_dev->id.bustype = BUS_HOST; | 154 | input_dev->id.bustype = BUS_HOST; |
155 | 155 | ||
156 | keypad_data->input_dev = input_dev; | ||
157 | |||
156 | error = keypad_matrix_key_parse_dt(keypad_data); | 158 | error = keypad_matrix_key_parse_dt(keypad_data); |
157 | if (error) | 159 | if (error) |
158 | return error; | 160 | return error; |
@@ -168,8 +170,6 @@ static int keyscan_probe(struct platform_device *pdev) | |||
168 | 170 | ||
169 | input_set_drvdata(input_dev, keypad_data); | 171 | input_set_drvdata(input_dev, keypad_data); |
170 | 172 | ||
171 | keypad_data->input_dev = input_dev; | ||
172 | |||
173 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 173 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
174 | keypad_data->base = devm_ioremap_resource(&pdev->dev, res); | 174 | keypad_data->base = devm_ioremap_resource(&pdev->dev, res); |
175 | if (IS_ERR(keypad_data->base)) | 175 | if (IS_ERR(keypad_data->base)) |
diff --git a/drivers/input/misc/apanel.c b/drivers/input/misc/apanel.c index 094bddf56755..c1e66f45d552 100644 --- a/drivers/input/misc/apanel.c +++ b/drivers/input/misc/apanel.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/input-polldev.h> | 23 | #include <linux/input-polldev.h> |
24 | #include <linux/i2c.h> | 24 | #include <linux/i2c.h> |
25 | #include <linux/workqueue.h> | ||
26 | #include <linux/leds.h> | 25 | #include <linux/leds.h> |
27 | 26 | ||
28 | #define APANEL_NAME "Fujitsu Application Panel" | 27 | #define APANEL_NAME "Fujitsu Application Panel" |
@@ -59,8 +58,6 @@ struct apanel { | |||
59 | struct i2c_client *client; | 58 | struct i2c_client *client; |
60 | unsigned short keymap[MAX_PANEL_KEYS]; | 59 | unsigned short keymap[MAX_PANEL_KEYS]; |
61 | u16 nkeys; | 60 | u16 nkeys; |
62 | u16 led_bits; | ||
63 | struct work_struct led_work; | ||
64 | struct led_classdev mail_led; | 61 | struct led_classdev mail_led; |
65 | }; | 62 | }; |
66 | 63 | ||
@@ -109,25 +106,13 @@ static void apanel_poll(struct input_polled_dev *ipdev) | |||
109 | report_key(idev, ap->keymap[i]); | 106 | report_key(idev, ap->keymap[i]); |
110 | } | 107 | } |
111 | 108 | ||
112 | /* Track state changes of LED */ | 109 | static int mail_led_set(struct led_classdev *led, |
113 | static void led_update(struct work_struct *work) | ||
114 | { | ||
115 | struct apanel *ap = container_of(work, struct apanel, led_work); | ||
116 | |||
117 | i2c_smbus_write_word_data(ap->client, 0x10, ap->led_bits); | ||
118 | } | ||
119 | |||
120 | static void mail_led_set(struct led_classdev *led, | ||
121 | enum led_brightness value) | 110 | enum led_brightness value) |
122 | { | 111 | { |
123 | struct apanel *ap = container_of(led, struct apanel, mail_led); | 112 | struct apanel *ap = container_of(led, struct apanel, mail_led); |
113 | u16 led_bits = value != LED_OFF ? 0x8000 : 0x0000; | ||
124 | 114 | ||
125 | if (value != LED_OFF) | 115 | return i2c_smbus_write_word_data(ap->client, 0x10, led_bits); |
126 | ap->led_bits |= 0x8000; | ||
127 | else | ||
128 | ap->led_bits &= ~0x8000; | ||
129 | |||
130 | schedule_work(&ap->led_work); | ||
131 | } | 116 | } |
132 | 117 | ||
133 | static int apanel_remove(struct i2c_client *client) | 118 | static int apanel_remove(struct i2c_client *client) |
@@ -179,7 +164,7 @@ static struct apanel apanel = { | |||
179 | }, | 164 | }, |
180 | .mail_led = { | 165 | .mail_led = { |
181 | .name = "mail:blue", | 166 | .name = "mail:blue", |
182 | .brightness_set = mail_led_set, | 167 | .brightness_set_blocking = mail_led_set, |
183 | }, | 168 | }, |
184 | }; | 169 | }; |
185 | 170 | ||
@@ -235,7 +220,6 @@ static int apanel_probe(struct i2c_client *client, | |||
235 | if (err) | 220 | if (err) |
236 | goto out3; | 221 | goto out3; |
237 | 222 | ||
238 | INIT_WORK(&ap->led_work, led_update); | ||
239 | if (device_chip[APANEL_DEV_LED] != CHIP_NONE) { | 223 | if (device_chip[APANEL_DEV_LED] != CHIP_NONE) { |
240 | err = led_classdev_register(&client->dev, &ap->mail_led); | 224 | err = led_classdev_register(&client->dev, &ap->mail_led); |
241 | if (err) | 225 | if (err) |
diff --git a/drivers/input/misc/bma150.c b/drivers/input/misc/bma150.c index 1efcfdf9f8a8..dd9dd4e40827 100644 --- a/drivers/input/misc/bma150.c +++ b/drivers/input/misc/bma150.c | |||
@@ -481,13 +481,14 @@ static int bma150_register_input_device(struct bma150_data *bma150) | |||
481 | idev->close = bma150_irq_close; | 481 | idev->close = bma150_irq_close; |
482 | input_set_drvdata(idev, bma150); | 482 | input_set_drvdata(idev, bma150); |
483 | 483 | ||
484 | bma150->input = idev; | ||
485 | |||
484 | error = input_register_device(idev); | 486 | error = input_register_device(idev); |
485 | if (error) { | 487 | if (error) { |
486 | input_free_device(idev); | 488 | input_free_device(idev); |
487 | return error; | 489 | return error; |
488 | } | 490 | } |
489 | 491 | ||
490 | bma150->input = idev; | ||
491 | return 0; | 492 | return 0; |
492 | } | 493 | } |
493 | 494 | ||
@@ -510,15 +511,15 @@ static int bma150_register_polled_device(struct bma150_data *bma150) | |||
510 | 511 | ||
511 | bma150_init_input_device(bma150, ipoll_dev->input); | 512 | bma150_init_input_device(bma150, ipoll_dev->input); |
512 | 513 | ||
514 | bma150->input_polled = ipoll_dev; | ||
515 | bma150->input = ipoll_dev->input; | ||
516 | |||
513 | error = input_register_polled_device(ipoll_dev); | 517 | error = input_register_polled_device(ipoll_dev); |
514 | if (error) { | 518 | if (error) { |
515 | input_free_polled_device(ipoll_dev); | 519 | input_free_polled_device(ipoll_dev); |
516 | return error; | 520 | return error; |
517 | } | 521 | } |
518 | 522 | ||
519 | bma150->input_polled = ipoll_dev; | ||
520 | bma150->input = ipoll_dev->input; | ||
521 | |||
522 | return 0; | 523 | return 0; |
523 | } | 524 | } |
524 | 525 | ||
diff --git a/drivers/input/misc/pwm-vibra.c b/drivers/input/misc/pwm-vibra.c index 55da191ae550..dbb6d9e1b947 100644 --- a/drivers/input/misc/pwm-vibra.c +++ b/drivers/input/misc/pwm-vibra.c | |||
@@ -34,6 +34,7 @@ struct pwm_vibrator { | |||
34 | struct work_struct play_work; | 34 | struct work_struct play_work; |
35 | u16 level; | 35 | u16 level; |
36 | u32 direction_duty_cycle; | 36 | u32 direction_duty_cycle; |
37 | bool vcc_on; | ||
37 | }; | 38 | }; |
38 | 39 | ||
39 | static int pwm_vibrator_start(struct pwm_vibrator *vibrator) | 40 | static int pwm_vibrator_start(struct pwm_vibrator *vibrator) |
@@ -42,10 +43,13 @@ static int pwm_vibrator_start(struct pwm_vibrator *vibrator) | |||
42 | struct pwm_state state; | 43 | struct pwm_state state; |
43 | int err; | 44 | int err; |
44 | 45 | ||
45 | err = regulator_enable(vibrator->vcc); | 46 | if (!vibrator->vcc_on) { |
46 | if (err) { | 47 | err = regulator_enable(vibrator->vcc); |
47 | dev_err(pdev, "failed to enable regulator: %d", err); | 48 | if (err) { |
48 | return err; | 49 | dev_err(pdev, "failed to enable regulator: %d", err); |
50 | return err; | ||
51 | } | ||
52 | vibrator->vcc_on = true; | ||
49 | } | 53 | } |
50 | 54 | ||
51 | pwm_get_state(vibrator->pwm, &state); | 55 | pwm_get_state(vibrator->pwm, &state); |
@@ -76,11 +80,14 @@ static int pwm_vibrator_start(struct pwm_vibrator *vibrator) | |||
76 | 80 | ||
77 | static void pwm_vibrator_stop(struct pwm_vibrator *vibrator) | 81 | static void pwm_vibrator_stop(struct pwm_vibrator *vibrator) |
78 | { | 82 | { |
79 | regulator_disable(vibrator->vcc); | ||
80 | |||
81 | if (vibrator->pwm_dir) | 83 | if (vibrator->pwm_dir) |
82 | pwm_disable(vibrator->pwm_dir); | 84 | pwm_disable(vibrator->pwm_dir); |
83 | pwm_disable(vibrator->pwm); | 85 | pwm_disable(vibrator->pwm); |
86 | |||
87 | if (vibrator->vcc_on) { | ||
88 | regulator_disable(vibrator->vcc); | ||
89 | vibrator->vcc_on = false; | ||
90 | } | ||
84 | } | 91 | } |
85 | 92 | ||
86 | static void pwm_vibrator_play_work(struct work_struct *work) | 93 | static void pwm_vibrator_play_work(struct work_struct *work) |
diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c index f322a1768fbb..225ae6980182 100644 --- a/drivers/input/mouse/elan_i2c_core.c +++ b/drivers/input/mouse/elan_i2c_core.c | |||
@@ -1336,7 +1336,6 @@ MODULE_DEVICE_TABLE(i2c, elan_id); | |||
1336 | static const struct acpi_device_id elan_acpi_id[] = { | 1336 | static const struct acpi_device_id elan_acpi_id[] = { |
1337 | { "ELAN0000", 0 }, | 1337 | { "ELAN0000", 0 }, |
1338 | { "ELAN0100", 0 }, | 1338 | { "ELAN0100", 0 }, |
1339 | { "ELAN0501", 0 }, | ||
1340 | { "ELAN0600", 0 }, | 1339 | { "ELAN0600", 0 }, |
1341 | { "ELAN0602", 0 }, | 1340 | { "ELAN0602", 0 }, |
1342 | { "ELAN0605", 0 }, | 1341 | { "ELAN0605", 0 }, |
@@ -1346,6 +1345,7 @@ static const struct acpi_device_id elan_acpi_id[] = { | |||
1346 | { "ELAN060C", 0 }, | 1345 | { "ELAN060C", 0 }, |
1347 | { "ELAN0611", 0 }, | 1346 | { "ELAN0611", 0 }, |
1348 | { "ELAN0612", 0 }, | 1347 | { "ELAN0612", 0 }, |
1348 | { "ELAN0617", 0 }, | ||
1349 | { "ELAN0618", 0 }, | 1349 | { "ELAN0618", 0 }, |
1350 | { "ELAN061C", 0 }, | 1350 | { "ELAN061C", 0 }, |
1351 | { "ELAN061D", 0 }, | 1351 | { "ELAN061D", 0 }, |
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index 9fe075c137dc..a7f8b1614559 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c | |||
@@ -1119,6 +1119,8 @@ static int elantech_get_resolution_v4(struct psmouse *psmouse, | |||
1119 | * Asus UX31 0x361f00 20, 15, 0e clickpad | 1119 | * Asus UX31 0x361f00 20, 15, 0e clickpad |
1120 | * Asus UX32VD 0x361f02 00, 15, 0e clickpad | 1120 | * Asus UX32VD 0x361f02 00, 15, 0e clickpad |
1121 | * Avatar AVIU-145A2 0x361f00 ? clickpad | 1121 | * Avatar AVIU-145A2 0x361f00 ? clickpad |
1122 | * Fujitsu CELSIUS H760 0x570f02 40, 14, 0c 3 hw buttons (**) | ||
1123 | * Fujitsu CELSIUS H780 0x5d0f02 41, 16, 0d 3 hw buttons (**) | ||
1122 | * Fujitsu LIFEBOOK E544 0x470f00 d0, 12, 09 2 hw buttons | 1124 | * Fujitsu LIFEBOOK E544 0x470f00 d0, 12, 09 2 hw buttons |
1123 | * Fujitsu LIFEBOOK E546 0x470f00 50, 12, 09 2 hw buttons | 1125 | * Fujitsu LIFEBOOK E546 0x470f00 50, 12, 09 2 hw buttons |
1124 | * Fujitsu LIFEBOOK E547 0x470f00 50, 12, 09 2 hw buttons | 1126 | * Fujitsu LIFEBOOK E547 0x470f00 50, 12, 09 2 hw buttons |
@@ -1171,6 +1173,13 @@ static const struct dmi_system_id elantech_dmi_has_middle_button[] = { | |||
1171 | DMI_MATCH(DMI_PRODUCT_NAME, "CELSIUS H760"), | 1173 | DMI_MATCH(DMI_PRODUCT_NAME, "CELSIUS H760"), |
1172 | }, | 1174 | }, |
1173 | }, | 1175 | }, |
1176 | { | ||
1177 | /* Fujitsu H780 also has a middle button */ | ||
1178 | .matches = { | ||
1179 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), | ||
1180 | DMI_MATCH(DMI_PRODUCT_NAME, "CELSIUS H780"), | ||
1181 | }, | ||
1182 | }, | ||
1174 | #endif | 1183 | #endif |
1175 | { } | 1184 | { } |
1176 | }; | 1185 | }; |
diff --git a/drivers/input/serio/ps2-gpio.c b/drivers/input/serio/ps2-gpio.c index c62cceb97bb1..5e8d8384aa2a 100644 --- a/drivers/input/serio/ps2-gpio.c +++ b/drivers/input/serio/ps2-gpio.c | |||
@@ -76,6 +76,7 @@ static void ps2_gpio_close(struct serio *serio) | |||
76 | { | 76 | { |
77 | struct ps2_gpio_data *drvdata = serio->port_data; | 77 | struct ps2_gpio_data *drvdata = serio->port_data; |
78 | 78 | ||
79 | flush_delayed_work(&drvdata->tx_work); | ||
79 | disable_irq(drvdata->irq); | 80 | disable_irq(drvdata->irq); |
80 | } | 81 | } |
81 | 82 | ||
diff --git a/drivers/mailbox/bcm-flexrm-mailbox.c b/drivers/mailbox/bcm-flexrm-mailbox.c index d713271ebf7c..a64116586b4c 100644 --- a/drivers/mailbox/bcm-flexrm-mailbox.c +++ b/drivers/mailbox/bcm-flexrm-mailbox.c | |||
@@ -1396,9 +1396,9 @@ static void flexrm_shutdown(struct mbox_chan *chan) | |||
1396 | 1396 | ||
1397 | /* Clear ring flush state */ | 1397 | /* Clear ring flush state */ |
1398 | timeout = 1000; /* timeout of 1s */ | 1398 | timeout = 1000; /* timeout of 1s */ |
1399 | writel_relaxed(0x0, ring + RING_CONTROL); | 1399 | writel_relaxed(0x0, ring->regs + RING_CONTROL); |
1400 | do { | 1400 | do { |
1401 | if (!(readl_relaxed(ring + RING_FLUSH_DONE) & | 1401 | if (!(readl_relaxed(ring->regs + RING_FLUSH_DONE) & |
1402 | FLUSH_DONE_MASK)) | 1402 | FLUSH_DONE_MASK)) |
1403 | break; | 1403 | break; |
1404 | mdelay(1); | 1404 | mdelay(1); |
diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c index c6a7d4582dc6..38d9df3fb199 100644 --- a/drivers/mailbox/mailbox.c +++ b/drivers/mailbox/mailbox.c | |||
@@ -310,6 +310,7 @@ int mbox_flush(struct mbox_chan *chan, unsigned long timeout) | |||
310 | 310 | ||
311 | return ret; | 311 | return ret; |
312 | } | 312 | } |
313 | EXPORT_SYMBOL_GPL(mbox_flush); | ||
313 | 314 | ||
314 | /** | 315 | /** |
315 | * mbox_request_channel - Request a mailbox channel. | 316 | * mbox_request_channel - Request a mailbox channel. |
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c index 0e4bbdcc614f..c76892ac4e69 100644 --- a/drivers/net/dsa/b53/b53_common.c +++ b/drivers/net/dsa/b53/b53_common.c | |||
@@ -344,7 +344,8 @@ static void b53_set_forwarding(struct b53_device *dev, int enable) | |||
344 | b53_write8(dev, B53_CTRL_PAGE, B53_SWITCH_CTRL, mgmt); | 344 | b53_write8(dev, B53_CTRL_PAGE, B53_SWITCH_CTRL, mgmt); |
345 | } | 345 | } |
346 | 346 | ||
347 | static void b53_enable_vlan(struct b53_device *dev, bool enable) | 347 | static void b53_enable_vlan(struct b53_device *dev, bool enable, |
348 | bool enable_filtering) | ||
348 | { | 349 | { |
349 | u8 mgmt, vc0, vc1, vc4 = 0, vc5; | 350 | u8 mgmt, vc0, vc1, vc4 = 0, vc5; |
350 | 351 | ||
@@ -369,8 +370,13 @@ static void b53_enable_vlan(struct b53_device *dev, bool enable) | |||
369 | vc0 |= VC0_VLAN_EN | VC0_VID_CHK_EN | VC0_VID_HASH_VID; | 370 | vc0 |= VC0_VLAN_EN | VC0_VID_CHK_EN | VC0_VID_HASH_VID; |
370 | vc1 |= VC1_RX_MCST_UNTAG_EN | VC1_RX_MCST_FWD_EN; | 371 | vc1 |= VC1_RX_MCST_UNTAG_EN | VC1_RX_MCST_FWD_EN; |
371 | vc4 &= ~VC4_ING_VID_CHECK_MASK; | 372 | vc4 &= ~VC4_ING_VID_CHECK_MASK; |
372 | vc4 |= VC4_ING_VID_VIO_DROP << VC4_ING_VID_CHECK_S; | 373 | if (enable_filtering) { |
373 | vc5 |= VC5_DROP_VTABLE_MISS; | 374 | vc4 |= VC4_ING_VID_VIO_DROP << VC4_ING_VID_CHECK_S; |
375 | vc5 |= VC5_DROP_VTABLE_MISS; | ||
376 | } else { | ||
377 | vc4 |= VC4_ING_VID_VIO_FWD << VC4_ING_VID_CHECK_S; | ||
378 | vc5 &= ~VC5_DROP_VTABLE_MISS; | ||
379 | } | ||
374 | 380 | ||
375 | if (is5325(dev)) | 381 | if (is5325(dev)) |
376 | vc0 &= ~VC0_RESERVED_1; | 382 | vc0 &= ~VC0_RESERVED_1; |
@@ -420,6 +426,9 @@ static void b53_enable_vlan(struct b53_device *dev, bool enable) | |||
420 | } | 426 | } |
421 | 427 | ||
422 | b53_write8(dev, B53_CTRL_PAGE, B53_SWITCH_MODE, mgmt); | 428 | b53_write8(dev, B53_CTRL_PAGE, B53_SWITCH_MODE, mgmt); |
429 | |||
430 | dev->vlan_enabled = enable; | ||
431 | dev->vlan_filtering_enabled = enable_filtering; | ||
423 | } | 432 | } |
424 | 433 | ||
425 | static int b53_set_jumbo(struct b53_device *dev, bool enable, bool allow_10_100) | 434 | static int b53_set_jumbo(struct b53_device *dev, bool enable, bool allow_10_100) |
@@ -632,25 +641,35 @@ static void b53_enable_mib(struct b53_device *dev) | |||
632 | b53_write8(dev, B53_MGMT_PAGE, B53_GLOBAL_CONFIG, gc); | 641 | b53_write8(dev, B53_MGMT_PAGE, B53_GLOBAL_CONFIG, gc); |
633 | } | 642 | } |
634 | 643 | ||
644 | static u16 b53_default_pvid(struct b53_device *dev) | ||
645 | { | ||
646 | if (is5325(dev) || is5365(dev)) | ||
647 | return 1; | ||
648 | else | ||
649 | return 0; | ||
650 | } | ||
651 | |||
635 | int b53_configure_vlan(struct dsa_switch *ds) | 652 | int b53_configure_vlan(struct dsa_switch *ds) |
636 | { | 653 | { |
637 | struct b53_device *dev = ds->priv; | 654 | struct b53_device *dev = ds->priv; |
638 | struct b53_vlan vl = { 0 }; | 655 | struct b53_vlan vl = { 0 }; |
639 | int i; | 656 | int i, def_vid; |
657 | |||
658 | def_vid = b53_default_pvid(dev); | ||
640 | 659 | ||
641 | /* clear all vlan entries */ | 660 | /* clear all vlan entries */ |
642 | if (is5325(dev) || is5365(dev)) { | 661 | if (is5325(dev) || is5365(dev)) { |
643 | for (i = 1; i < dev->num_vlans; i++) | 662 | for (i = def_vid; i < dev->num_vlans; i++) |
644 | b53_set_vlan_entry(dev, i, &vl); | 663 | b53_set_vlan_entry(dev, i, &vl); |
645 | } else { | 664 | } else { |
646 | b53_do_vlan_op(dev, VTA_CMD_CLEAR); | 665 | b53_do_vlan_op(dev, VTA_CMD_CLEAR); |
647 | } | 666 | } |
648 | 667 | ||
649 | b53_enable_vlan(dev, false); | 668 | b53_enable_vlan(dev, false, dev->vlan_filtering_enabled); |
650 | 669 | ||
651 | b53_for_each_port(dev, i) | 670 | b53_for_each_port(dev, i) |
652 | b53_write16(dev, B53_VLAN_PAGE, | 671 | b53_write16(dev, B53_VLAN_PAGE, |
653 | B53_VLAN_PORT_DEF_TAG(i), 1); | 672 | B53_VLAN_PORT_DEF_TAG(i), def_vid); |
654 | 673 | ||
655 | if (!is5325(dev) && !is5365(dev)) | 674 | if (!is5325(dev) && !is5365(dev)) |
656 | b53_set_jumbo(dev, dev->enable_jumbo, false); | 675 | b53_set_jumbo(dev, dev->enable_jumbo, false); |
@@ -1255,6 +1274,46 @@ EXPORT_SYMBOL(b53_phylink_mac_link_up); | |||
1255 | 1274 | ||
1256 | int b53_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering) | 1275 | int b53_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering) |
1257 | { | 1276 | { |
1277 | struct b53_device *dev = ds->priv; | ||
1278 | struct net_device *bridge_dev; | ||
1279 | unsigned int i; | ||
1280 | u16 pvid, new_pvid; | ||
1281 | |||
1282 | /* Handle the case were multiple bridges span the same switch device | ||
1283 | * and one of them has a different setting than what is being requested | ||
1284 | * which would be breaking filtering semantics for any of the other | ||
1285 | * bridge devices. | ||
1286 | */ | ||
1287 | b53_for_each_port(dev, i) { | ||
1288 | bridge_dev = dsa_to_port(ds, i)->bridge_dev; | ||
1289 | if (bridge_dev && | ||
1290 | bridge_dev != dsa_to_port(ds, port)->bridge_dev && | ||
1291 | br_vlan_enabled(bridge_dev) != vlan_filtering) { | ||
1292 | netdev_err(bridge_dev, | ||
1293 | "VLAN filtering is global to the switch!\n"); | ||
1294 | return -EINVAL; | ||
1295 | } | ||
1296 | } | ||
1297 | |||
1298 | b53_read16(dev, B53_VLAN_PAGE, B53_VLAN_PORT_DEF_TAG(port), &pvid); | ||
1299 | new_pvid = pvid; | ||
1300 | if (dev->vlan_filtering_enabled && !vlan_filtering) { | ||
1301 | /* Filtering is currently enabled, use the default PVID since | ||
1302 | * the bridge does not expect tagging anymore | ||
1303 | */ | ||
1304 | dev->ports[port].pvid = pvid; | ||
1305 | new_pvid = b53_default_pvid(dev); | ||
1306 | } else if (!dev->vlan_filtering_enabled && vlan_filtering) { | ||
1307 | /* Filtering is currently disabled, restore the previous PVID */ | ||
1308 | new_pvid = dev->ports[port].pvid; | ||
1309 | } | ||
1310 | |||
1311 | if (pvid != new_pvid) | ||
1312 | b53_write16(dev, B53_VLAN_PAGE, B53_VLAN_PORT_DEF_TAG(port), | ||
1313 | new_pvid); | ||
1314 | |||
1315 | b53_enable_vlan(dev, dev->vlan_enabled, vlan_filtering); | ||
1316 | |||
1258 | return 0; | 1317 | return 0; |
1259 | } | 1318 | } |
1260 | EXPORT_SYMBOL(b53_vlan_filtering); | 1319 | EXPORT_SYMBOL(b53_vlan_filtering); |
@@ -1270,7 +1329,7 @@ int b53_vlan_prepare(struct dsa_switch *ds, int port, | |||
1270 | if (vlan->vid_end > dev->num_vlans) | 1329 | if (vlan->vid_end > dev->num_vlans) |
1271 | return -ERANGE; | 1330 | return -ERANGE; |
1272 | 1331 | ||
1273 | b53_enable_vlan(dev, true); | 1332 | b53_enable_vlan(dev, true, dev->vlan_filtering_enabled); |
1274 | 1333 | ||
1275 | return 0; | 1334 | return 0; |
1276 | } | 1335 | } |
@@ -1300,7 +1359,7 @@ void b53_vlan_add(struct dsa_switch *ds, int port, | |||
1300 | b53_fast_age_vlan(dev, vid); | 1359 | b53_fast_age_vlan(dev, vid); |
1301 | } | 1360 | } |
1302 | 1361 | ||
1303 | if (pvid) { | 1362 | if (pvid && !dsa_is_cpu_port(ds, port)) { |
1304 | b53_write16(dev, B53_VLAN_PAGE, B53_VLAN_PORT_DEF_TAG(port), | 1363 | b53_write16(dev, B53_VLAN_PAGE, B53_VLAN_PORT_DEF_TAG(port), |
1305 | vlan->vid_end); | 1364 | vlan->vid_end); |
1306 | b53_fast_age_vlan(dev, vid); | 1365 | b53_fast_age_vlan(dev, vid); |
@@ -1326,12 +1385,8 @@ int b53_vlan_del(struct dsa_switch *ds, int port, | |||
1326 | 1385 | ||
1327 | vl->members &= ~BIT(port); | 1386 | vl->members &= ~BIT(port); |
1328 | 1387 | ||
1329 | if (pvid == vid) { | 1388 | if (pvid == vid) |
1330 | if (is5325(dev) || is5365(dev)) | 1389 | pvid = b53_default_pvid(dev); |
1331 | pvid = 1; | ||
1332 | else | ||
1333 | pvid = 0; | ||
1334 | } | ||
1335 | 1390 | ||
1336 | if (untagged && !dsa_is_cpu_port(ds, port)) | 1391 | if (untagged && !dsa_is_cpu_port(ds, port)) |
1337 | vl->untag &= ~(BIT(port)); | 1392 | vl->untag &= ~(BIT(port)); |
@@ -1644,10 +1699,7 @@ void b53_br_leave(struct dsa_switch *ds, int port, struct net_device *br) | |||
1644 | b53_write16(dev, B53_PVLAN_PAGE, B53_PVLAN_PORT_MASK(port), pvlan); | 1699 | b53_write16(dev, B53_PVLAN_PAGE, B53_PVLAN_PORT_MASK(port), pvlan); |
1645 | dev->ports[port].vlan_ctl_mask = pvlan; | 1700 | dev->ports[port].vlan_ctl_mask = pvlan; |
1646 | 1701 | ||
1647 | if (is5325(dev) || is5365(dev)) | 1702 | pvid = b53_default_pvid(dev); |
1648 | pvid = 1; | ||
1649 | else | ||
1650 | pvid = 0; | ||
1651 | 1703 | ||
1652 | /* Make this port join all VLANs without VLAN entries */ | 1704 | /* Make this port join all VLANs without VLAN entries */ |
1653 | if (is58xx(dev)) { | 1705 | if (is58xx(dev)) { |
diff --git a/drivers/net/dsa/b53/b53_priv.h b/drivers/net/dsa/b53/b53_priv.h index ec796482792d..4dc7ee38b258 100644 --- a/drivers/net/dsa/b53/b53_priv.h +++ b/drivers/net/dsa/b53/b53_priv.h | |||
@@ -91,6 +91,7 @@ enum { | |||
91 | struct b53_port { | 91 | struct b53_port { |
92 | u16 vlan_ctl_mask; | 92 | u16 vlan_ctl_mask; |
93 | struct ethtool_eee eee; | 93 | struct ethtool_eee eee; |
94 | u16 pvid; | ||
94 | }; | 95 | }; |
95 | 96 | ||
96 | struct b53_vlan { | 97 | struct b53_vlan { |
@@ -137,6 +138,8 @@ struct b53_device { | |||
137 | 138 | ||
138 | unsigned int num_vlans; | 139 | unsigned int num_vlans; |
139 | struct b53_vlan *vlans; | 140 | struct b53_vlan *vlans; |
141 | bool vlan_enabled; | ||
142 | bool vlan_filtering_enabled; | ||
140 | unsigned int num_ports; | 143 | unsigned int num_ports; |
141 | struct b53_port *ports; | 144 | struct b53_port *ports; |
142 | }; | 145 | }; |
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c index 98696a88fa1c..f91b8e77d543 100644 --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c | |||
@@ -726,10 +726,11 @@ static void bcm_sf2_sw_get_wol(struct dsa_switch *ds, int port, | |||
726 | { | 726 | { |
727 | struct net_device *p = ds->ports[port].cpu_dp->master; | 727 | struct net_device *p = ds->ports[port].cpu_dp->master; |
728 | struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds); | 728 | struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds); |
729 | struct ethtool_wolinfo pwol; | 729 | struct ethtool_wolinfo pwol = { }; |
730 | 730 | ||
731 | /* Get the parent device WoL settings */ | 731 | /* Get the parent device WoL settings */ |
732 | p->ethtool_ops->get_wol(p, &pwol); | 732 | if (p->ethtool_ops->get_wol) |
733 | p->ethtool_ops->get_wol(p, &pwol); | ||
733 | 734 | ||
734 | /* Advertise the parent device supported settings */ | 735 | /* Advertise the parent device supported settings */ |
735 | wol->supported = pwol.supported; | 736 | wol->supported = pwol.supported; |
@@ -750,9 +751,10 @@ static int bcm_sf2_sw_set_wol(struct dsa_switch *ds, int port, | |||
750 | struct net_device *p = ds->ports[port].cpu_dp->master; | 751 | struct net_device *p = ds->ports[port].cpu_dp->master; |
751 | struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds); | 752 | struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds); |
752 | s8 cpu_port = ds->ports[port].cpu_dp->index; | 753 | s8 cpu_port = ds->ports[port].cpu_dp->index; |
753 | struct ethtool_wolinfo pwol; | 754 | struct ethtool_wolinfo pwol = { }; |
754 | 755 | ||
755 | p->ethtool_ops->get_wol(p, &pwol); | 756 | if (p->ethtool_ops->get_wol) |
757 | p->ethtool_ops->get_wol(p, &pwol); | ||
756 | if (wol->wolopts & ~pwol.supported) | 758 | if (wol->wolopts & ~pwol.supported) |
757 | return -EINVAL; | 759 | return -EINVAL; |
758 | 760 | ||
diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c index 28c9b0bdf2f6..bc3ac369cbe3 100644 --- a/drivers/net/ethernet/broadcom/bcmsysport.c +++ b/drivers/net/ethernet/broadcom/bcmsysport.c | |||
@@ -134,6 +134,10 @@ static void bcm_sysport_set_rx_csum(struct net_device *dev, | |||
134 | 134 | ||
135 | priv->rx_chk_en = !!(wanted & NETIF_F_RXCSUM); | 135 | priv->rx_chk_en = !!(wanted & NETIF_F_RXCSUM); |
136 | reg = rxchk_readl(priv, RXCHK_CONTROL); | 136 | reg = rxchk_readl(priv, RXCHK_CONTROL); |
137 | /* Clear L2 header checks, which would prevent BPDUs | ||
138 | * from being received. | ||
139 | */ | ||
140 | reg &= ~RXCHK_L2_HDR_DIS; | ||
137 | if (priv->rx_chk_en) | 141 | if (priv->rx_chk_en) |
138 | reg |= RXCHK_EN; | 142 | reg |= RXCHK_EN; |
139 | else | 143 | else |
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c index b8155f5e71b4..ac55db065f16 100644 --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | |||
@@ -3128,6 +3128,9 @@ int hns_dsaf_roce_reset(struct fwnode_handle *dsaf_fwnode, bool dereset) | |||
3128 | dsaf_set_bit(credit, DSAF_SBM_ROCEE_CFG_CRD_EN_B, 1); | 3128 | dsaf_set_bit(credit, DSAF_SBM_ROCEE_CFG_CRD_EN_B, 1); |
3129 | dsaf_write_dev(dsaf_dev, DSAF_SBM_ROCEE_CFG_REG_REG, credit); | 3129 | dsaf_write_dev(dsaf_dev, DSAF_SBM_ROCEE_CFG_REG_REG, credit); |
3130 | } | 3130 | } |
3131 | |||
3132 | put_device(&pdev->dev); | ||
3133 | |||
3131 | return 0; | 3134 | return 0; |
3132 | } | 3135 | } |
3133 | EXPORT_SYMBOL(hns_dsaf_roce_reset); | 3136 | EXPORT_SYMBOL(hns_dsaf_roce_reset); |
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c index 2f427271a793..292a668ce88e 100644 --- a/drivers/net/ethernet/marvell/mv643xx_eth.c +++ b/drivers/net/ethernet/marvell/mv643xx_eth.c | |||
@@ -2879,7 +2879,7 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev) | |||
2879 | 2879 | ||
2880 | ret = mv643xx_eth_shared_of_probe(pdev); | 2880 | ret = mv643xx_eth_shared_of_probe(pdev); |
2881 | if (ret) | 2881 | if (ret) |
2882 | return ret; | 2882 | goto err_put_clk; |
2883 | pd = dev_get_platdata(&pdev->dev); | 2883 | pd = dev_get_platdata(&pdev->dev); |
2884 | 2884 | ||
2885 | msp->tx_csum_limit = (pd != NULL && pd->tx_csum_limit) ? | 2885 | msp->tx_csum_limit = (pd != NULL && pd->tx_csum_limit) ? |
@@ -2887,6 +2887,11 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev) | |||
2887 | infer_hw_params(msp); | 2887 | infer_hw_params(msp); |
2888 | 2888 | ||
2889 | return 0; | 2889 | return 0; |
2890 | |||
2891 | err_put_clk: | ||
2892 | if (!IS_ERR(msp->clk)) | ||
2893 | clk_disable_unprepare(msp->clk); | ||
2894 | return ret; | ||
2890 | } | 2895 | } |
2891 | 2896 | ||
2892 | static int mv643xx_eth_shared_remove(struct platform_device *pdev) | 2897 | static int mv643xx_eth_shared_remove(struct platform_device *pdev) |
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c index f3a5fa84860f..57727fe1501e 100644 --- a/drivers/net/ethernet/marvell/sky2.c +++ b/drivers/net/ethernet/marvell/sky2.c | |||
@@ -5073,7 +5073,7 @@ static int sky2_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
5073 | INIT_WORK(&hw->restart_work, sky2_restart); | 5073 | INIT_WORK(&hw->restart_work, sky2_restart); |
5074 | 5074 | ||
5075 | pci_set_drvdata(pdev, hw); | 5075 | pci_set_drvdata(pdev, hw); |
5076 | pdev->d3_delay = 200; | 5076 | pdev->d3_delay = 300; |
5077 | 5077 | ||
5078 | return 0; | 5078 | return 0; |
5079 | 5079 | ||
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c index 6b88881b8e35..c1438ae52a11 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c | |||
@@ -3360,7 +3360,7 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, | |||
3360 | dev->addr_len = ETH_ALEN; | 3360 | dev->addr_len = ETH_ALEN; |
3361 | mlx4_en_u64_to_mac(dev->dev_addr, mdev->dev->caps.def_mac[priv->port]); | 3361 | mlx4_en_u64_to_mac(dev->dev_addr, mdev->dev->caps.def_mac[priv->port]); |
3362 | if (!is_valid_ether_addr(dev->dev_addr)) { | 3362 | if (!is_valid_ether_addr(dev->dev_addr)) { |
3363 | en_err(priv, "Port: %d, invalid mac burned: %pM, quiting\n", | 3363 | en_err(priv, "Port: %d, invalid mac burned: %pM, quitting\n", |
3364 | priv->port, dev->dev_addr); | 3364 | priv->port, dev->dev_addr); |
3365 | err = -EINVAL; | 3365 | err = -EINVAL; |
3366 | goto out; | 3366 | goto out; |
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c index bc349d8ca08a..7ee6d747e97b 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c | |||
@@ -862,8 +862,9 @@ int __mlxsw_sp_port_headroom_set(struct mlxsw_sp_port *mlxsw_sp_port, int mtu, | |||
862 | for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) { | 862 | for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) { |
863 | bool configure = false; | 863 | bool configure = false; |
864 | bool pfc = false; | 864 | bool pfc = false; |
865 | u16 thres_cells; | ||
866 | u16 delay_cells; | ||
865 | bool lossy; | 867 | bool lossy; |
866 | u16 thres; | ||
867 | 868 | ||
868 | for (j = 0; j < IEEE_8021QAZ_MAX_TCS; j++) { | 869 | for (j = 0; j < IEEE_8021QAZ_MAX_TCS; j++) { |
869 | if (prio_tc[j] == i) { | 870 | if (prio_tc[j] == i) { |
@@ -877,10 +878,11 @@ int __mlxsw_sp_port_headroom_set(struct mlxsw_sp_port *mlxsw_sp_port, int mtu, | |||
877 | continue; | 878 | continue; |
878 | 879 | ||
879 | lossy = !(pfc || pause_en); | 880 | lossy = !(pfc || pause_en); |
880 | thres = mlxsw_sp_pg_buf_threshold_get(mlxsw_sp, mtu); | 881 | thres_cells = mlxsw_sp_pg_buf_threshold_get(mlxsw_sp, mtu); |
881 | delay = mlxsw_sp_pg_buf_delay_get(mlxsw_sp, mtu, delay, pfc, | 882 | delay_cells = mlxsw_sp_pg_buf_delay_get(mlxsw_sp, mtu, delay, |
882 | pause_en); | 883 | pfc, pause_en); |
883 | mlxsw_sp_pg_buf_pack(pbmc_pl, i, thres + delay, thres, lossy); | 884 | mlxsw_sp_pg_buf_pack(pbmc_pl, i, thres_cells + delay_cells, |
885 | thres_cells, lossy); | ||
884 | } | 886 | } |
885 | 887 | ||
886 | return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(pbmc), pbmc_pl); | 888 | return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(pbmc), pbmc_pl); |
diff --git a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c b/drivers/net/ethernet/qlogic/qed/qed_iwarp.c index beb8e5d6401a..ded556b7bab5 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c +++ b/drivers/net/ethernet/qlogic/qed/qed_iwarp.c | |||
@@ -1688,6 +1688,15 @@ qed_iwarp_parse_rx_pkt(struct qed_hwfn *p_hwfn, | |||
1688 | 1688 | ||
1689 | eth_hlen = ETH_HLEN + (vlan_valid ? sizeof(u32) : 0); | 1689 | eth_hlen = ETH_HLEN + (vlan_valid ? sizeof(u32) : 0); |
1690 | 1690 | ||
1691 | if (!ether_addr_equal(ethh->h_dest, | ||
1692 | p_hwfn->p_rdma_info->iwarp.mac_addr)) { | ||
1693 | DP_VERBOSE(p_hwfn, | ||
1694 | QED_MSG_RDMA, | ||
1695 | "Got unexpected mac %pM instead of %pM\n", | ||
1696 | ethh->h_dest, p_hwfn->p_rdma_info->iwarp.mac_addr); | ||
1697 | return -EINVAL; | ||
1698 | } | ||
1699 | |||
1691 | ether_addr_copy(remote_mac_addr, ethh->h_source); | 1700 | ether_addr_copy(remote_mac_addr, ethh->h_source); |
1692 | ether_addr_copy(local_mac_addr, ethh->h_dest); | 1701 | ether_addr_copy(local_mac_addr, ethh->h_dest); |
1693 | 1702 | ||
@@ -2605,7 +2614,7 @@ qed_iwarp_ll2_start(struct qed_hwfn *p_hwfn, | |||
2605 | struct qed_iwarp_info *iwarp_info; | 2614 | struct qed_iwarp_info *iwarp_info; |
2606 | struct qed_ll2_acquire_data data; | 2615 | struct qed_ll2_acquire_data data; |
2607 | struct qed_ll2_cbs cbs; | 2616 | struct qed_ll2_cbs cbs; |
2608 | u32 mpa_buff_size; | 2617 | u32 buff_size; |
2609 | u16 n_ooo_bufs; | 2618 | u16 n_ooo_bufs; |
2610 | int rc = 0; | 2619 | int rc = 0; |
2611 | int i; | 2620 | int i; |
@@ -2632,7 +2641,7 @@ qed_iwarp_ll2_start(struct qed_hwfn *p_hwfn, | |||
2632 | 2641 | ||
2633 | memset(&data, 0, sizeof(data)); | 2642 | memset(&data, 0, sizeof(data)); |
2634 | data.input.conn_type = QED_LL2_TYPE_IWARP; | 2643 | data.input.conn_type = QED_LL2_TYPE_IWARP; |
2635 | data.input.mtu = QED_IWARP_MAX_SYN_PKT_SIZE; | 2644 | data.input.mtu = params->max_mtu; |
2636 | data.input.rx_num_desc = QED_IWARP_LL2_SYN_RX_SIZE; | 2645 | data.input.rx_num_desc = QED_IWARP_LL2_SYN_RX_SIZE; |
2637 | data.input.tx_num_desc = QED_IWARP_LL2_SYN_TX_SIZE; | 2646 | data.input.tx_num_desc = QED_IWARP_LL2_SYN_TX_SIZE; |
2638 | data.input.tx_max_bds_per_packet = 1; /* will never be fragmented */ | 2647 | data.input.tx_max_bds_per_packet = 1; /* will never be fragmented */ |
@@ -2654,9 +2663,10 @@ qed_iwarp_ll2_start(struct qed_hwfn *p_hwfn, | |||
2654 | goto err; | 2663 | goto err; |
2655 | } | 2664 | } |
2656 | 2665 | ||
2666 | buff_size = QED_IWARP_MAX_BUF_SIZE(params->max_mtu); | ||
2657 | rc = qed_iwarp_ll2_alloc_buffers(p_hwfn, | 2667 | rc = qed_iwarp_ll2_alloc_buffers(p_hwfn, |
2658 | QED_IWARP_LL2_SYN_RX_SIZE, | 2668 | QED_IWARP_LL2_SYN_RX_SIZE, |
2659 | QED_IWARP_MAX_SYN_PKT_SIZE, | 2669 | buff_size, |
2660 | iwarp_info->ll2_syn_handle); | 2670 | iwarp_info->ll2_syn_handle); |
2661 | if (rc) | 2671 | if (rc) |
2662 | goto err; | 2672 | goto err; |
@@ -2710,10 +2720,9 @@ qed_iwarp_ll2_start(struct qed_hwfn *p_hwfn, | |||
2710 | if (rc) | 2720 | if (rc) |
2711 | goto err; | 2721 | goto err; |
2712 | 2722 | ||
2713 | mpa_buff_size = QED_IWARP_MAX_BUF_SIZE(params->max_mtu); | ||
2714 | rc = qed_iwarp_ll2_alloc_buffers(p_hwfn, | 2723 | rc = qed_iwarp_ll2_alloc_buffers(p_hwfn, |
2715 | data.input.rx_num_desc, | 2724 | data.input.rx_num_desc, |
2716 | mpa_buff_size, | 2725 | buff_size, |
2717 | iwarp_info->ll2_mpa_handle); | 2726 | iwarp_info->ll2_mpa_handle); |
2718 | if (rc) | 2727 | if (rc) |
2719 | goto err; | 2728 | goto err; |
@@ -2726,7 +2735,7 @@ qed_iwarp_ll2_start(struct qed_hwfn *p_hwfn, | |||
2726 | 2735 | ||
2727 | iwarp_info->max_num_partial_fpdus = (u16)p_hwfn->p_rdma_info->num_qps; | 2736 | iwarp_info->max_num_partial_fpdus = (u16)p_hwfn->p_rdma_info->num_qps; |
2728 | 2737 | ||
2729 | iwarp_info->mpa_intermediate_buf = kzalloc(mpa_buff_size, GFP_KERNEL); | 2738 | iwarp_info->mpa_intermediate_buf = kzalloc(buff_size, GFP_KERNEL); |
2730 | if (!iwarp_info->mpa_intermediate_buf) | 2739 | if (!iwarp_info->mpa_intermediate_buf) |
2731 | goto err; | 2740 | goto err; |
2732 | 2741 | ||
diff --git a/drivers/net/ethernet/qlogic/qed/qed_iwarp.h b/drivers/net/ethernet/qlogic/qed/qed_iwarp.h index b8f612d00241..7ac959038324 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_iwarp.h +++ b/drivers/net/ethernet/qlogic/qed/qed_iwarp.h | |||
@@ -46,7 +46,6 @@ enum qed_iwarp_qp_state qed_roce2iwarp_state(enum qed_roce_qp_state state); | |||
46 | 46 | ||
47 | #define QED_IWARP_LL2_SYN_TX_SIZE (128) | 47 | #define QED_IWARP_LL2_SYN_TX_SIZE (128) |
48 | #define QED_IWARP_LL2_SYN_RX_SIZE (256) | 48 | #define QED_IWARP_LL2_SYN_RX_SIZE (256) |
49 | #define QED_IWARP_MAX_SYN_PKT_SIZE (128) | ||
50 | 49 | ||
51 | #define QED_IWARP_LL2_OOO_DEF_TX_SIZE (256) | 50 | #define QED_IWARP_LL2_OOO_DEF_TX_SIZE (256) |
52 | #define QED_IWARP_MAX_OOO (16) | 51 | #define QED_IWARP_MAX_OOO (16) |
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c index 90045fffd393..7fbb6a4dbf51 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c | |||
@@ -241,15 +241,18 @@ static inline void dwmac4_get_timestamp(void *desc, u32 ats, u64 *ts) | |||
241 | static int dwmac4_rx_check_timestamp(void *desc) | 241 | static int dwmac4_rx_check_timestamp(void *desc) |
242 | { | 242 | { |
243 | struct dma_desc *p = (struct dma_desc *)desc; | 243 | struct dma_desc *p = (struct dma_desc *)desc; |
244 | unsigned int rdes0 = le32_to_cpu(p->des0); | ||
245 | unsigned int rdes1 = le32_to_cpu(p->des1); | ||
246 | unsigned int rdes3 = le32_to_cpu(p->des3); | ||
244 | u32 own, ctxt; | 247 | u32 own, ctxt; |
245 | int ret = 1; | 248 | int ret = 1; |
246 | 249 | ||
247 | own = p->des3 & RDES3_OWN; | 250 | own = rdes3 & RDES3_OWN; |
248 | ctxt = ((p->des3 & RDES3_CONTEXT_DESCRIPTOR) | 251 | ctxt = ((rdes3 & RDES3_CONTEXT_DESCRIPTOR) |
249 | >> RDES3_CONTEXT_DESCRIPTOR_SHIFT); | 252 | >> RDES3_CONTEXT_DESCRIPTOR_SHIFT); |
250 | 253 | ||
251 | if (likely(!own && ctxt)) { | 254 | if (likely(!own && ctxt)) { |
252 | if ((p->des0 == 0xffffffff) && (p->des1 == 0xffffffff)) | 255 | if ((rdes0 == 0xffffffff) && (rdes1 == 0xffffffff)) |
253 | /* Corrupted value */ | 256 | /* Corrupted value */ |
254 | ret = -EINVAL; | 257 | ret = -EINVAL; |
255 | else | 258 | else |
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c index 5d85742a2be0..3c749c327cbd 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | |||
@@ -696,25 +696,27 @@ static int stmmac_ethtool_op_set_eee(struct net_device *dev, | |||
696 | struct ethtool_eee *edata) | 696 | struct ethtool_eee *edata) |
697 | { | 697 | { |
698 | struct stmmac_priv *priv = netdev_priv(dev); | 698 | struct stmmac_priv *priv = netdev_priv(dev); |
699 | int ret; | ||
699 | 700 | ||
700 | priv->eee_enabled = edata->eee_enabled; | 701 | if (!edata->eee_enabled) { |
701 | |||
702 | if (!priv->eee_enabled) | ||
703 | stmmac_disable_eee_mode(priv); | 702 | stmmac_disable_eee_mode(priv); |
704 | else { | 703 | } else { |
705 | /* We are asking for enabling the EEE but it is safe | 704 | /* We are asking for enabling the EEE but it is safe |
706 | * to verify all by invoking the eee_init function. | 705 | * to verify all by invoking the eee_init function. |
707 | * In case of failure it will return an error. | 706 | * In case of failure it will return an error. |
708 | */ | 707 | */ |
709 | priv->eee_enabled = stmmac_eee_init(priv); | 708 | edata->eee_enabled = stmmac_eee_init(priv); |
710 | if (!priv->eee_enabled) | 709 | if (!edata->eee_enabled) |
711 | return -EOPNOTSUPP; | 710 | return -EOPNOTSUPP; |
712 | |||
713 | /* Do not change tx_lpi_timer in case of failure */ | ||
714 | priv->tx_lpi_timer = edata->tx_lpi_timer; | ||
715 | } | 711 | } |
716 | 712 | ||
717 | return phy_ethtool_set_eee(dev->phydev, edata); | 713 | ret = phy_ethtool_set_eee(dev->phydev, edata); |
714 | if (ret) | ||
715 | return ret; | ||
716 | |||
717 | priv->eee_enabled = edata->eee_enabled; | ||
718 | priv->tx_lpi_timer = edata->tx_lpi_timer; | ||
719 | return 0; | ||
718 | } | 720 | } |
719 | 721 | ||
720 | static u32 stmmac_usec2riwt(u32 usec, struct stmmac_priv *priv) | 722 | static u32 stmmac_usec2riwt(u32 usec, struct stmmac_priv *priv) |
diff --git a/drivers/net/ethernet/ti/netcp_core.c b/drivers/net/ethernet/ti/netcp_core.c index 1f612268c998..d847f672a705 100644 --- a/drivers/net/ethernet/ti/netcp_core.c +++ b/drivers/net/ethernet/ti/netcp_core.c | |||
@@ -259,7 +259,7 @@ static int netcp_module_probe(struct netcp_device *netcp_device, | |||
259 | const char *name; | 259 | const char *name; |
260 | char node_name[32]; | 260 | char node_name[32]; |
261 | 261 | ||
262 | if (of_property_read_string(node, "label", &name) < 0) { | 262 | if (of_property_read_string(child, "label", &name) < 0) { |
263 | snprintf(node_name, sizeof(node_name), "%pOFn", child); | 263 | snprintf(node_name, sizeof(node_name), "%pOFn", child); |
264 | name = node_name; | 264 | name = node_name; |
265 | } | 265 | } |
diff --git a/drivers/net/phy/xilinx_gmii2rgmii.c b/drivers/net/phy/xilinx_gmii2rgmii.c index ebf419dc7307..2d1449345959 100644 --- a/drivers/net/phy/xilinx_gmii2rgmii.c +++ b/drivers/net/phy/xilinx_gmii2rgmii.c | |||
@@ -35,7 +35,10 @@ static int xgmiitorgmii_read_status(struct phy_device *phydev) | |||
35 | u16 val = 0; | 35 | u16 val = 0; |
36 | int err; | 36 | int err; |
37 | 37 | ||
38 | err = priv->phy_drv->read_status(phydev); | 38 | if (priv->phy_drv->read_status) |
39 | err = priv->phy_drv->read_status(phydev); | ||
40 | else | ||
41 | err = genphy_read_status(phydev); | ||
39 | if (err < 0) | 42 | if (err < 0) |
40 | return err; | 43 | return err; |
41 | 44 | ||
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 735ad838e2ba..18af2f8eee96 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c | |||
@@ -1201,8 +1201,8 @@ static const struct usb_device_id products[] = { | |||
1201 | {QMI_FIXED_INTF(0x114f, 0x68a2, 8)}, /* Sierra Wireless MC7750 */ | 1201 | {QMI_FIXED_INTF(0x114f, 0x68a2, 8)}, /* Sierra Wireless MC7750 */ |
1202 | {QMI_FIXED_INTF(0x1199, 0x68a2, 8)}, /* Sierra Wireless MC7710 in QMI mode */ | 1202 | {QMI_FIXED_INTF(0x1199, 0x68a2, 8)}, /* Sierra Wireless MC7710 in QMI mode */ |
1203 | {QMI_FIXED_INTF(0x1199, 0x68a2, 19)}, /* Sierra Wireless MC7710 in QMI mode */ | 1203 | {QMI_FIXED_INTF(0x1199, 0x68a2, 19)}, /* Sierra Wireless MC7710 in QMI mode */ |
1204 | {QMI_FIXED_INTF(0x1199, 0x68c0, 8)}, /* Sierra Wireless MC7304/MC7354 */ | 1204 | {QMI_QUIRK_SET_DTR(0x1199, 0x68c0, 8)}, /* Sierra Wireless MC7304/MC7354, WP76xx */ |
1205 | {QMI_FIXED_INTF(0x1199, 0x68c0, 10)}, /* Sierra Wireless MC7304/MC7354 */ | 1205 | {QMI_QUIRK_SET_DTR(0x1199, 0x68c0, 10)},/* Sierra Wireless MC7304/MC7354 */ |
1206 | {QMI_FIXED_INTF(0x1199, 0x901c, 8)}, /* Sierra Wireless EM7700 */ | 1206 | {QMI_FIXED_INTF(0x1199, 0x901c, 8)}, /* Sierra Wireless EM7700 */ |
1207 | {QMI_FIXED_INTF(0x1199, 0x901f, 8)}, /* Sierra Wireless EM7355 */ | 1207 | {QMI_FIXED_INTF(0x1199, 0x901f, 8)}, /* Sierra Wireless EM7355 */ |
1208 | {QMI_FIXED_INTF(0x1199, 0x9041, 8)}, /* Sierra Wireless MC7305/MC7355 */ | 1208 | {QMI_FIXED_INTF(0x1199, 0x9041, 8)}, /* Sierra Wireless MC7305/MC7355 */ |
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 60dd1ec1665f..ada6baf8847a 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c | |||
@@ -557,6 +557,7 @@ enum spd_duplex { | |||
557 | /* MAC PASSTHRU */ | 557 | /* MAC PASSTHRU */ |
558 | #define AD_MASK 0xfee0 | 558 | #define AD_MASK 0xfee0 |
559 | #define BND_MASK 0x0004 | 559 | #define BND_MASK 0x0004 |
560 | #define BD_MASK 0x0001 | ||
560 | #define EFUSE 0xcfdb | 561 | #define EFUSE 0xcfdb |
561 | #define PASS_THRU_MASK 0x1 | 562 | #define PASS_THRU_MASK 0x1 |
562 | 563 | ||
@@ -1176,9 +1177,9 @@ static int vendor_mac_passthru_addr_read(struct r8152 *tp, struct sockaddr *sa) | |||
1176 | return -ENODEV; | 1177 | return -ENODEV; |
1177 | } | 1178 | } |
1178 | } else { | 1179 | } else { |
1179 | /* test for RTL8153-BND */ | 1180 | /* test for RTL8153-BND and RTL8153-BD */ |
1180 | ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_MISC_1); | 1181 | ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_MISC_1); |
1181 | if ((ocp_data & BND_MASK) == 0) { | 1182 | if ((ocp_data & BND_MASK) == 0 && (ocp_data & BD_MASK)) { |
1182 | netif_dbg(tp, probe, tp->netdev, | 1183 | netif_dbg(tp, probe, tp->netdev, |
1183 | "Invalid variant for MAC pass through\n"); | 1184 | "Invalid variant for MAC pass through\n"); |
1184 | return -ENODEV; | 1185 | return -ENODEV; |
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c index f66e1b2f0980..3987adaaf2bd 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | |||
@@ -158,39 +158,49 @@ static const struct ieee80211_ops mt76x0u_ops = { | |||
158 | .get_txpower = mt76_get_txpower, | 158 | .get_txpower = mt76_get_txpower, |
159 | }; | 159 | }; |
160 | 160 | ||
161 | static int mt76x0u_register_device(struct mt76x02_dev *dev) | 161 | static int mt76x0u_init_hardware(struct mt76x02_dev *dev) |
162 | { | 162 | { |
163 | struct ieee80211_hw *hw = dev->mt76.hw; | ||
164 | int err; | 163 | int err; |
165 | 164 | ||
166 | err = mt76u_alloc_queues(&dev->mt76); | ||
167 | if (err < 0) | ||
168 | goto out_err; | ||
169 | |||
170 | err = mt76u_mcu_init_rx(&dev->mt76); | ||
171 | if (err < 0) | ||
172 | goto out_err; | ||
173 | |||
174 | mt76x0_chip_onoff(dev, true, true); | 165 | mt76x0_chip_onoff(dev, true, true); |
175 | if (!mt76x02_wait_for_mac(&dev->mt76)) { | 166 | |
176 | err = -ETIMEDOUT; | 167 | if (!mt76x02_wait_for_mac(&dev->mt76)) |
177 | goto out_err; | 168 | return -ETIMEDOUT; |
178 | } | ||
179 | 169 | ||
180 | err = mt76x0u_mcu_init(dev); | 170 | err = mt76x0u_mcu_init(dev); |
181 | if (err < 0) | 171 | if (err < 0) |
182 | goto out_err; | 172 | return err; |
183 | 173 | ||
184 | mt76x0_init_usb_dma(dev); | 174 | mt76x0_init_usb_dma(dev); |
185 | err = mt76x0_init_hardware(dev); | 175 | err = mt76x0_init_hardware(dev); |
186 | if (err < 0) | 176 | if (err < 0) |
187 | goto out_err; | 177 | return err; |
188 | 178 | ||
189 | mt76_rmw(dev, MT_US_CYC_CFG, MT_US_CYC_CNT, 0x1e); | 179 | mt76_rmw(dev, MT_US_CYC_CFG, MT_US_CYC_CNT, 0x1e); |
190 | mt76_wr(dev, MT_TXOP_CTRL_CFG, | 180 | mt76_wr(dev, MT_TXOP_CTRL_CFG, |
191 | FIELD_PREP(MT_TXOP_TRUN_EN, 0x3f) | | 181 | FIELD_PREP(MT_TXOP_TRUN_EN, 0x3f) | |
192 | FIELD_PREP(MT_TXOP_EXT_CCA_DLY, 0x58)); | 182 | FIELD_PREP(MT_TXOP_EXT_CCA_DLY, 0x58)); |
193 | 183 | ||
184 | return 0; | ||
185 | } | ||
186 | |||
187 | static int mt76x0u_register_device(struct mt76x02_dev *dev) | ||
188 | { | ||
189 | struct ieee80211_hw *hw = dev->mt76.hw; | ||
190 | int err; | ||
191 | |||
192 | err = mt76u_alloc_queues(&dev->mt76); | ||
193 | if (err < 0) | ||
194 | goto out_err; | ||
195 | |||
196 | err = mt76u_mcu_init_rx(&dev->mt76); | ||
197 | if (err < 0) | ||
198 | goto out_err; | ||
199 | |||
200 | err = mt76x0u_init_hardware(dev); | ||
201 | if (err < 0) | ||
202 | goto out_err; | ||
203 | |||
194 | err = mt76x0_register_device(dev); | 204 | err = mt76x0_register_device(dev); |
195 | if (err < 0) | 205 | if (err < 0) |
196 | goto out_err; | 206 | goto out_err; |
@@ -301,6 +311,8 @@ static int __maybe_unused mt76x0_suspend(struct usb_interface *usb_intf, | |||
301 | 311 | ||
302 | mt76u_stop_queues(&dev->mt76); | 312 | mt76u_stop_queues(&dev->mt76); |
303 | mt76x0u_mac_stop(dev); | 313 | mt76x0u_mac_stop(dev); |
314 | clear_bit(MT76_STATE_MCU_RUNNING, &dev->mt76.state); | ||
315 | mt76x0_chip_onoff(dev, false, false); | ||
304 | usb_kill_urb(usb->mcu.res.urb); | 316 | usb_kill_urb(usb->mcu.res.urb); |
305 | 317 | ||
306 | return 0; | 318 | return 0; |
@@ -328,7 +340,7 @@ static int __maybe_unused mt76x0_resume(struct usb_interface *usb_intf) | |||
328 | tasklet_enable(&usb->rx_tasklet); | 340 | tasklet_enable(&usb->rx_tasklet); |
329 | tasklet_enable(&usb->tx_tasklet); | 341 | tasklet_enable(&usb->tx_tasklet); |
330 | 342 | ||
331 | ret = mt76x0_init_hardware(dev); | 343 | ret = mt76x0u_init_hardware(dev); |
332 | if (ret) | 344 | if (ret) |
333 | goto err; | 345 | goto err; |
334 | 346 | ||
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index aeeb0144bd55..8d1acc802a67 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -1785,13 +1785,13 @@ qla2x00_async_tm_cmd(fc_port_t *fcport, uint32_t flags, uint32_t lun, | |||
1785 | 1785 | ||
1786 | /* Issue Marker IOCB */ | 1786 | /* Issue Marker IOCB */ |
1787 | qla2x00_marker(vha, vha->hw->req_q_map[0], | 1787 | qla2x00_marker(vha, vha->hw->req_q_map[0], |
1788 | vha->hw->rsp_q_map[0], sp->fcport->loop_id, lun, | 1788 | vha->hw->rsp_q_map[0], fcport->loop_id, lun, |
1789 | flags == TCF_LUN_RESET ? MK_SYNC_ID_LUN : MK_SYNC_ID); | 1789 | flags == TCF_LUN_RESET ? MK_SYNC_ID_LUN : MK_SYNC_ID); |
1790 | } | 1790 | } |
1791 | 1791 | ||
1792 | done_free_sp: | 1792 | done_free_sp: |
1793 | sp->free(sp); | 1793 | sp->free(sp); |
1794 | sp->fcport->flags &= ~FCF_ASYNC_SENT; | 1794 | fcport->flags &= ~FCF_ASYNC_SENT; |
1795 | done: | 1795 | done: |
1796 | return rval; | 1796 | return rval; |
1797 | } | 1797 | } |
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index b2da8a00ec33..5464d467e23e 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -2951,9 +2951,6 @@ static void sd_read_block_characteristics(struct scsi_disk *sdkp) | |||
2951 | if (rot == 1) { | 2951 | if (rot == 1) { |
2952 | blk_queue_flag_set(QUEUE_FLAG_NONROT, q); | 2952 | blk_queue_flag_set(QUEUE_FLAG_NONROT, q); |
2953 | blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, q); | 2953 | blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, q); |
2954 | } else { | ||
2955 | blk_queue_flag_clear(QUEUE_FLAG_NONROT, q); | ||
2956 | blk_queue_flag_set(QUEUE_FLAG_ADD_RANDOM, q); | ||
2957 | } | 2954 | } |
2958 | 2955 | ||
2959 | if (sdkp->device->type == TYPE_ZBC) { | 2956 | if (sdkp->device->type == TYPE_ZBC) { |
@@ -3090,6 +3087,15 @@ static int sd_revalidate_disk(struct gendisk *disk) | |||
3090 | if (sdkp->media_present) { | 3087 | if (sdkp->media_present) { |
3091 | sd_read_capacity(sdkp, buffer); | 3088 | sd_read_capacity(sdkp, buffer); |
3092 | 3089 | ||
3090 | /* | ||
3091 | * set the default to rotational. All non-rotational devices | ||
3092 | * support the block characteristics VPD page, which will | ||
3093 | * cause this to be updated correctly and any device which | ||
3094 | * doesn't support it should be treated as rotational. | ||
3095 | */ | ||
3096 | blk_queue_flag_clear(QUEUE_FLAG_NONROT, q); | ||
3097 | blk_queue_flag_set(QUEUE_FLAG_ADD_RANDOM, q); | ||
3098 | |||
3093 | if (scsi_device_supports_vpd(sdp)) { | 3099 | if (scsi_device_supports_vpd(sdp)) { |
3094 | sd_read_block_provisioning(sdkp); | 3100 | sd_read_block_provisioning(sdkp); |
3095 | sd_read_block_limits(sdkp); | 3101 | sd_read_block_limits(sdkp); |
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 24a129fcdd61..a2e5dc7716e2 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c | |||
@@ -1788,7 +1788,7 @@ static int log_used(struct vhost_virtqueue *vq, u64 used_offset, u64 len) | |||
1788 | 1788 | ||
1789 | ret = translate_desc(vq, (uintptr_t)vq->used + used_offset, | 1789 | ret = translate_desc(vq, (uintptr_t)vq->used + used_offset, |
1790 | len, iov, 64, VHOST_ACCESS_WO); | 1790 | len, iov, 64, VHOST_ACCESS_WO); |
1791 | if (ret) | 1791 | if (ret < 0) |
1792 | return ret; | 1792 | return ret; |
1793 | 1793 | ||
1794 | for (i = 0; i < ret; i++) { | 1794 | for (i = 0; i < ret; i++) { |