diff options
author | David S. Miller <davem@davemloft.net> | 2011-10-24 18:18:09 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-10-24 18:18:09 -0400 |
commit | 1805b2f04855f07afe3a71d620a68f483b0ed74f (patch) | |
tree | b823b90f37f5404fcaef70f785c70112ca74a329 /drivers | |
parent | 78d81d15b74246c7cedf84894434890b33da3907 (diff) | |
parent | f42af6c486aa5ca6ee62800cb45c5b252020509d (diff) |
Merge branch 'master' of ra.kernel.org:/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers')
26 files changed, 203 insertions, 108 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 0599854e2217..118ec12d2d5f 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c | |||
@@ -34,8 +34,8 @@ struct gpio_bank { | |||
34 | u16 irq; | 34 | u16 irq; |
35 | u16 virtual_irq_start; | 35 | u16 virtual_irq_start; |
36 | int method; | 36 | int method; |
37 | #if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2PLUS) | ||
38 | u32 suspend_wakeup; | 37 | u32 suspend_wakeup; |
38 | #if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2PLUS) | ||
39 | u32 saved_wakeup; | 39 | u32 saved_wakeup; |
40 | #endif | 40 | #endif |
41 | u32 non_wakeup_gpios; | 41 | u32 non_wakeup_gpios; |
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c index c43b8ff626a7..0550dcb85814 100644 --- a/drivers/gpio/gpio-pca953x.c +++ b/drivers/gpio/gpio-pca953x.c | |||
@@ -577,6 +577,7 @@ pca953x_get_alt_pdata(struct i2c_client *client, int *gpio_base, int *invert) | |||
577 | void | 577 | void |
578 | pca953x_get_alt_pdata(struct i2c_client *client, int *gpio_base, int *invert) | 578 | pca953x_get_alt_pdata(struct i2c_client *client, int *gpio_base, int *invert) |
579 | { | 579 | { |
580 | *gpio_base = -1; | ||
580 | } | 581 | } |
581 | #endif | 582 | #endif |
582 | 583 | ||
diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c index e88c64417a8a..14cc88aaf3a7 100644 --- a/drivers/gpu/drm/radeon/atom.c +++ b/drivers/gpu/drm/radeon/atom.c | |||
@@ -277,7 +277,12 @@ static uint32_t atom_get_src_int(atom_exec_context *ctx, uint8_t attr, | |||
277 | case ATOM_ARG_FB: | 277 | case ATOM_ARG_FB: |
278 | idx = U8(*ptr); | 278 | idx = U8(*ptr); |
279 | (*ptr)++; | 279 | (*ptr)++; |
280 | val = gctx->scratch[((gctx->fb_base + idx) / 4)]; | 280 | if ((gctx->fb_base + (idx * 4)) > gctx->scratch_size_bytes) { |
281 | DRM_ERROR("ATOM: fb read beyond scratch region: %d vs. %d\n", | ||
282 | gctx->fb_base + (idx * 4), gctx->scratch_size_bytes); | ||
283 | val = 0; | ||
284 | } else | ||
285 | val = gctx->scratch[(gctx->fb_base / 4) + idx]; | ||
281 | if (print) | 286 | if (print) |
282 | DEBUG("FB[0x%02X]", idx); | 287 | DEBUG("FB[0x%02X]", idx); |
283 | break; | 288 | break; |
@@ -531,7 +536,11 @@ static void atom_put_dst(atom_exec_context *ctx, int arg, uint8_t attr, | |||
531 | case ATOM_ARG_FB: | 536 | case ATOM_ARG_FB: |
532 | idx = U8(*ptr); | 537 | idx = U8(*ptr); |
533 | (*ptr)++; | 538 | (*ptr)++; |
534 | gctx->scratch[((gctx->fb_base + idx) / 4)] = val; | 539 | if ((gctx->fb_base + (idx * 4)) > gctx->scratch_size_bytes) { |
540 | DRM_ERROR("ATOM: fb write beyond scratch region: %d vs. %d\n", | ||
541 | gctx->fb_base + (idx * 4), gctx->scratch_size_bytes); | ||
542 | } else | ||
543 | gctx->scratch[(gctx->fb_base / 4) + idx] = val; | ||
535 | DEBUG("FB[0x%02X]", idx); | 544 | DEBUG("FB[0x%02X]", idx); |
536 | break; | 545 | break; |
537 | case ATOM_ARG_PLL: | 546 | case ATOM_ARG_PLL: |
@@ -1370,11 +1379,13 @@ int atom_allocate_fb_scratch(struct atom_context *ctx) | |||
1370 | 1379 | ||
1371 | usage_bytes = firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb * 1024; | 1380 | usage_bytes = firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb * 1024; |
1372 | } | 1381 | } |
1382 | ctx->scratch_size_bytes = 0; | ||
1373 | if (usage_bytes == 0) | 1383 | if (usage_bytes == 0) |
1374 | usage_bytes = 20 * 1024; | 1384 | usage_bytes = 20 * 1024; |
1375 | /* allocate some scratch memory */ | 1385 | /* allocate some scratch memory */ |
1376 | ctx->scratch = kzalloc(usage_bytes, GFP_KERNEL); | 1386 | ctx->scratch = kzalloc(usage_bytes, GFP_KERNEL); |
1377 | if (!ctx->scratch) | 1387 | if (!ctx->scratch) |
1378 | return -ENOMEM; | 1388 | return -ENOMEM; |
1389 | ctx->scratch_size_bytes = usage_bytes; | ||
1379 | return 0; | 1390 | return 0; |
1380 | } | 1391 | } |
diff --git a/drivers/gpu/drm/radeon/atom.h b/drivers/gpu/drm/radeon/atom.h index a589a55b223e..93cfe2086ba0 100644 --- a/drivers/gpu/drm/radeon/atom.h +++ b/drivers/gpu/drm/radeon/atom.h | |||
@@ -137,6 +137,7 @@ struct atom_context { | |||
137 | int cs_equal, cs_above; | 137 | int cs_equal, cs_above; |
138 | int io_mode; | 138 | int io_mode; |
139 | uint32_t *scratch; | 139 | uint32_t *scratch; |
140 | int scratch_size_bytes; | ||
140 | }; | 141 | }; |
141 | 142 | ||
142 | extern int atom_debug; | 143 | extern int atom_debug; |
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index c742944d3805..a515b2a09d85 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c | |||
@@ -466,7 +466,7 @@ static void atombios_crtc_program_ss(struct drm_crtc *crtc, | |||
466 | return; | 466 | return; |
467 | } | 467 | } |
468 | args.v2.ucEnable = enable; | 468 | args.v2.ucEnable = enable; |
469 | if ((ss->percentage == 0) || (ss->type & ATOM_EXTERNAL_SS_MASK)) | 469 | if ((ss->percentage == 0) || (ss->type & ATOM_EXTERNAL_SS_MASK) || ASIC_IS_DCE41(rdev)) |
470 | args.v2.ucEnable = ATOM_DISABLE; | 470 | args.v2.ucEnable = ATOM_DISABLE; |
471 | } else if (ASIC_IS_DCE3(rdev)) { | 471 | } else if (ASIC_IS_DCE3(rdev)) { |
472 | args.v1.usSpreadSpectrumPercentage = cpu_to_le16(ss->percentage); | 472 | args.v1.usSpreadSpectrumPercentage = cpu_to_le16(ss->percentage); |
diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c index 4da23889fea6..79e8ebc05307 100644 --- a/drivers/gpu/drm/radeon/atombios_dp.c +++ b/drivers/gpu/drm/radeon/atombios_dp.c | |||
@@ -129,7 +129,9 @@ static int radeon_dp_aux_native_write(struct radeon_connector *radeon_connector, | |||
129 | for (retry = 0; retry < 4; retry++) { | 129 | for (retry = 0; retry < 4; retry++) { |
130 | ret = radeon_process_aux_ch(dig_connector->dp_i2c_bus, | 130 | ret = radeon_process_aux_ch(dig_connector->dp_i2c_bus, |
131 | msg, msg_bytes, NULL, 0, delay, &ack); | 131 | msg, msg_bytes, NULL, 0, delay, &ack); |
132 | if (ret < 0) | 132 | if (ret == -EBUSY) |
133 | continue; | ||
134 | else if (ret < 0) | ||
133 | return ret; | 135 | return ret; |
134 | if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK) | 136 | if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK) |
135 | return send_bytes; | 137 | return send_bytes; |
@@ -160,7 +162,9 @@ static int radeon_dp_aux_native_read(struct radeon_connector *radeon_connector, | |||
160 | for (retry = 0; retry < 4; retry++) { | 162 | for (retry = 0; retry < 4; retry++) { |
161 | ret = radeon_process_aux_ch(dig_connector->dp_i2c_bus, | 163 | ret = radeon_process_aux_ch(dig_connector->dp_i2c_bus, |
162 | msg, msg_bytes, recv, recv_bytes, delay, &ack); | 164 | msg, msg_bytes, recv, recv_bytes, delay, &ack); |
163 | if (ret < 0) | 165 | if (ret == -EBUSY) |
166 | continue; | ||
167 | else if (ret < 0) | ||
164 | return ret; | 168 | return ret; |
165 | if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK) | 169 | if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK) |
166 | return ret; | 170 | return ret; |
@@ -236,7 +240,9 @@ int radeon_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode, | |||
236 | for (retry = 0; retry < 4; retry++) { | 240 | for (retry = 0; retry < 4; retry++) { |
237 | ret = radeon_process_aux_ch(auxch, | 241 | ret = radeon_process_aux_ch(auxch, |
238 | msg, msg_bytes, reply, reply_bytes, 0, &ack); | 242 | msg, msg_bytes, reply, reply_bytes, 0, &ack); |
239 | if (ret < 0) { | 243 | if (ret == -EBUSY) |
244 | continue; | ||
245 | else if (ret < 0) { | ||
240 | DRM_DEBUG_KMS("aux_ch failed %d\n", ret); | 246 | DRM_DEBUG_KMS("aux_ch failed %d\n", ret); |
241 | return ret; | 247 | return ret; |
242 | } | 248 | } |
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index bce63fd329d4..449c3d8c6836 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c | |||
@@ -1303,23 +1303,14 @@ radeon_dp_detect(struct drm_connector *connector, bool force) | |||
1303 | /* get the DPCD from the bridge */ | 1303 | /* get the DPCD from the bridge */ |
1304 | radeon_dp_getdpcd(radeon_connector); | 1304 | radeon_dp_getdpcd(radeon_connector); |
1305 | 1305 | ||
1306 | if (radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) | 1306 | if (encoder) { |
1307 | ret = connector_status_connected; | 1307 | /* setup ddc on the bridge */ |
1308 | else { | 1308 | radeon_atom_ext_encoder_setup_ddc(encoder); |
1309 | /* need to setup ddc on the bridge */ | ||
1310 | if (encoder) | ||
1311 | radeon_atom_ext_encoder_setup_ddc(encoder); | ||
1312 | if (radeon_ddc_probe(radeon_connector, | 1309 | if (radeon_ddc_probe(radeon_connector, |
1313 | radeon_connector->requires_extended_probe)) | 1310 | radeon_connector->requires_extended_probe)) /* try DDC */ |
1314 | ret = connector_status_connected; | 1311 | ret = connector_status_connected; |
1315 | } | 1312 | else if (radeon_connector->dac_load_detect) { /* try load detection */ |
1316 | 1313 | struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private; | |
1317 | if ((ret == connector_status_disconnected) && | ||
1318 | radeon_connector->dac_load_detect) { | ||
1319 | struct drm_encoder *encoder = radeon_best_single_encoder(connector); | ||
1320 | struct drm_encoder_helper_funcs *encoder_funcs; | ||
1321 | if (encoder) { | ||
1322 | encoder_funcs = encoder->helper_private; | ||
1323 | ret = encoder_funcs->detect(encoder, connector); | 1314 | ret = encoder_funcs->detect(encoder, connector); |
1324 | } | 1315 | } |
1325 | } | 1316 | } |
diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c index 13690f3eb4a4..eb3f6dc6df83 100644 --- a/drivers/gpu/drm/radeon/radeon_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_encoders.c | |||
@@ -1638,7 +1638,17 @@ atombios_set_encoder_crtc_source(struct drm_encoder *encoder) | |||
1638 | break; | 1638 | break; |
1639 | case 2: | 1639 | case 2: |
1640 | args.v2.ucCRTC = radeon_crtc->crtc_id; | 1640 | args.v2.ucCRTC = radeon_crtc->crtc_id; |
1641 | args.v2.ucEncodeMode = atombios_get_encoder_mode(encoder); | 1641 | if (radeon_encoder_is_dp_bridge(encoder)) { |
1642 | struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); | ||
1643 | |||
1644 | if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS) | ||
1645 | args.v2.ucEncodeMode = ATOM_ENCODER_MODE_LVDS; | ||
1646 | else if (connector->connector_type == DRM_MODE_CONNECTOR_VGA) | ||
1647 | args.v2.ucEncodeMode = ATOM_ENCODER_MODE_CRT; | ||
1648 | else | ||
1649 | args.v2.ucEncodeMode = atombios_get_encoder_mode(encoder); | ||
1650 | } else | ||
1651 | args.v2.ucEncodeMode = atombios_get_encoder_mode(encoder); | ||
1642 | switch (radeon_encoder->encoder_id) { | 1652 | switch (radeon_encoder->encoder_id) { |
1643 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: | 1653 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: |
1644 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1: | 1654 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1: |
@@ -1755,9 +1765,17 @@ static int radeon_atom_pick_dig_encoder(struct drm_encoder *encoder) | |||
1755 | /* DCE4/5 */ | 1765 | /* DCE4/5 */ |
1756 | if (ASIC_IS_DCE4(rdev)) { | 1766 | if (ASIC_IS_DCE4(rdev)) { |
1757 | dig = radeon_encoder->enc_priv; | 1767 | dig = radeon_encoder->enc_priv; |
1758 | if (ASIC_IS_DCE41(rdev)) | 1768 | if (ASIC_IS_DCE41(rdev)) { |
1759 | return radeon_crtc->crtc_id; | 1769 | /* ontario follows DCE4 */ |
1760 | else { | 1770 | if (rdev->family == CHIP_PALM) { |
1771 | if (dig->linkb) | ||
1772 | return 1; | ||
1773 | else | ||
1774 | return 0; | ||
1775 | } else | ||
1776 | /* llano follows DCE3.2 */ | ||
1777 | return radeon_crtc->crtc_id; | ||
1778 | } else { | ||
1761 | switch (radeon_encoder->encoder_id) { | 1779 | switch (radeon_encoder->encoder_id) { |
1762 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: | 1780 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: |
1763 | if (dig->linkb) | 1781 | if (dig->linkb) |
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c index ae3c6f5dd2b7..082fcaea583f 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_util.c +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c | |||
@@ -321,7 +321,7 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo, | |||
321 | struct ttm_mem_type_manager *man = &bdev->man[new_mem->mem_type]; | 321 | struct ttm_mem_type_manager *man = &bdev->man[new_mem->mem_type]; |
322 | struct ttm_tt *ttm = bo->ttm; | 322 | struct ttm_tt *ttm = bo->ttm; |
323 | struct ttm_mem_reg *old_mem = &bo->mem; | 323 | struct ttm_mem_reg *old_mem = &bo->mem; |
324 | struct ttm_mem_reg old_copy; | 324 | struct ttm_mem_reg old_copy = *old_mem; |
325 | void *old_iomap; | 325 | void *old_iomap; |
326 | void *new_iomap; | 326 | void *new_iomap; |
327 | int ret; | 327 | int ret; |
diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c index f2b377c56a3a..7b0260dc76fb 100644 --- a/drivers/hwmon/w83627ehf.c +++ b/drivers/hwmon/w83627ehf.c | |||
@@ -1715,7 +1715,8 @@ static void w83627ehf_device_remove_files(struct device *dev) | |||
1715 | } | 1715 | } |
1716 | 1716 | ||
1717 | /* Get the monitoring functions started */ | 1717 | /* Get the monitoring functions started */ |
1718 | static inline void __devinit w83627ehf_init_device(struct w83627ehf_data *data) | 1718 | static inline void __devinit w83627ehf_init_device(struct w83627ehf_data *data, |
1719 | enum kinds kind) | ||
1719 | { | 1720 | { |
1720 | int i; | 1721 | int i; |
1721 | u8 tmp, diode; | 1722 | u8 tmp, diode; |
@@ -1746,10 +1747,16 @@ static inline void __devinit w83627ehf_init_device(struct w83627ehf_data *data) | |||
1746 | w83627ehf_write_value(data, W83627EHF_REG_VBAT, tmp | 0x01); | 1747 | w83627ehf_write_value(data, W83627EHF_REG_VBAT, tmp | 0x01); |
1747 | 1748 | ||
1748 | /* Get thermal sensor types */ | 1749 | /* Get thermal sensor types */ |
1749 | diode = w83627ehf_read_value(data, W83627EHF_REG_DIODE); | 1750 | switch (kind) { |
1751 | case w83627ehf: | ||
1752 | diode = w83627ehf_read_value(data, W83627EHF_REG_DIODE); | ||
1753 | break; | ||
1754 | default: | ||
1755 | diode = 0x70; | ||
1756 | } | ||
1750 | for (i = 0; i < 3; i++) { | 1757 | for (i = 0; i < 3; i++) { |
1751 | if ((tmp & (0x02 << i))) | 1758 | if ((tmp & (0x02 << i))) |
1752 | data->temp_type[i] = (diode & (0x10 << i)) ? 1 : 2; | 1759 | data->temp_type[i] = (diode & (0x10 << i)) ? 1 : 3; |
1753 | else | 1760 | else |
1754 | data->temp_type[i] = 4; /* thermistor */ | 1761 | data->temp_type[i] = 4; /* thermistor */ |
1755 | } | 1762 | } |
@@ -2016,7 +2023,7 @@ static int __devinit w83627ehf_probe(struct platform_device *pdev) | |||
2016 | } | 2023 | } |
2017 | 2024 | ||
2018 | /* Initialize the chip */ | 2025 | /* Initialize the chip */ |
2019 | w83627ehf_init_device(data); | 2026 | w83627ehf_init_device(data, sio_data->kind); |
2020 | 2027 | ||
2021 | data->vrm = vid_which_vrm(); | 2028 | data->vrm = vid_which_vrm(); |
2022 | superio_enter(sio_data->sioreg); | 2029 | superio_enter(sio_data->sioreg); |
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 9827c5e686cb..811dbbd9306c 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig | |||
@@ -327,7 +327,7 @@ config BLK_DEV_OPTI621 | |||
327 | select BLK_DEV_IDEPCI | 327 | select BLK_DEV_IDEPCI |
328 | help | 328 | help |
329 | This is a driver for the OPTi 82C621 EIDE controller. | 329 | This is a driver for the OPTi 82C621 EIDE controller. |
330 | Please read the comments at the top of <file:drivers/ide/pci/opti621.c>. | 330 | Please read the comments at the top of <file:drivers/ide/opti621.c>. |
331 | 331 | ||
332 | config BLK_DEV_RZ1000 | 332 | config BLK_DEV_RZ1000 |
333 | tristate "RZ1000 chipset bugfix/support" | 333 | tristate "RZ1000 chipset bugfix/support" |
@@ -365,7 +365,7 @@ config BLK_DEV_ALI15X3 | |||
365 | normal dual channel support. | 365 | normal dual channel support. |
366 | 366 | ||
367 | Please read the comments at the top of | 367 | Please read the comments at the top of |
368 | <file:drivers/ide/pci/alim15x3.c>. | 368 | <file:drivers/ide/alim15x3.c>. |
369 | 369 | ||
370 | If unsure, say N. | 370 | If unsure, say N. |
371 | 371 | ||
@@ -528,7 +528,7 @@ config BLK_DEV_NS87415 | |||
528 | This driver adds detection and support for the NS87415 chip | 528 | This driver adds detection and support for the NS87415 chip |
529 | (used mainly on SPARC64 and PA-RISC machines). | 529 | (used mainly on SPARC64 and PA-RISC machines). |
530 | 530 | ||
531 | Please read the comments at the top of <file:drivers/ide/pci/ns87415.c>. | 531 | Please read the comments at the top of <file:drivers/ide/ns87415.c>. |
532 | 532 | ||
533 | config BLK_DEV_PDC202XX_OLD | 533 | config BLK_DEV_PDC202XX_OLD |
534 | tristate "PROMISE PDC202{46|62|65|67} support" | 534 | tristate "PROMISE PDC202{46|62|65|67} support" |
@@ -547,7 +547,7 @@ config BLK_DEV_PDC202XX_OLD | |||
547 | for more than one card. | 547 | for more than one card. |
548 | 548 | ||
549 | Please read the comments at the top of | 549 | Please read the comments at the top of |
550 | <file:drivers/ide/pci/pdc202xx_old.c>. | 550 | <file:drivers/ide/pdc202xx_old.c>. |
551 | 551 | ||
552 | If unsure, say N. | 552 | If unsure, say N. |
553 | 553 | ||
@@ -593,7 +593,7 @@ config BLK_DEV_SIS5513 | |||
593 | ATA100: SiS635, SiS645, SiS650, SiS730, SiS735, SiS740, | 593 | ATA100: SiS635, SiS645, SiS650, SiS730, SiS735, SiS740, |
594 | SiS745, SiS750 | 594 | SiS745, SiS750 |
595 | 595 | ||
596 | Please read the comments at the top of <file:drivers/ide/pci/sis5513.c>. | 596 | Please read the comments at the top of <file:drivers/ide/sis5513.c>. |
597 | 597 | ||
598 | config BLK_DEV_SL82C105 | 598 | config BLK_DEV_SL82C105 |
599 | tristate "Winbond SL82c105 support" | 599 | tristate "Winbond SL82c105 support" |
@@ -616,7 +616,7 @@ config BLK_DEV_SLC90E66 | |||
616 | look-a-like to the PIIX4 it should be a nice addition. | 616 | look-a-like to the PIIX4 it should be a nice addition. |
617 | 617 | ||
618 | Please read the comments at the top of | 618 | Please read the comments at the top of |
619 | <file:drivers/ide/pci/slc90e66.c>. | 619 | <file:drivers/ide/slc90e66.c>. |
620 | 620 | ||
621 | config BLK_DEV_TRM290 | 621 | config BLK_DEV_TRM290 |
622 | tristate "Tekram TRM290 chipset support" | 622 | tristate "Tekram TRM290 chipset support" |
@@ -625,7 +625,7 @@ config BLK_DEV_TRM290 | |||
625 | This driver adds support for bus master DMA transfers | 625 | This driver adds support for bus master DMA transfers |
626 | using the Tekram TRM290 PCI IDE chip. Volunteers are | 626 | using the Tekram TRM290 PCI IDE chip. Volunteers are |
627 | needed for further tweaking and development. | 627 | needed for further tweaking and development. |
628 | Please read the comments at the top of <file:drivers/ide/pci/trm290.c>. | 628 | Please read the comments at the top of <file:drivers/ide/trm290.c>. |
629 | 629 | ||
630 | config BLK_DEV_VIA82CXXX | 630 | config BLK_DEV_VIA82CXXX |
631 | tristate "VIA82CXXX chipset support" | 631 | tristate "VIA82CXXX chipset support" |
@@ -836,7 +836,7 @@ config BLK_DEV_ALI14XX | |||
836 | of the ALI M1439/1443/1445/1487/1489 chipsets, and permits faster | 836 | of the ALI M1439/1443/1445/1487/1489 chipsets, and permits faster |
837 | I/O speeds to be set as well. | 837 | I/O speeds to be set as well. |
838 | See the files <file:Documentation/ide/ide.txt> and | 838 | See the files <file:Documentation/ide/ide.txt> and |
839 | <file:drivers/ide/legacy/ali14xx.c> for more info. | 839 | <file:drivers/ide/ali14xx.c> for more info. |
840 | 840 | ||
841 | config BLK_DEV_DTC2278 | 841 | config BLK_DEV_DTC2278 |
842 | tristate "DTC-2278 support" | 842 | tristate "DTC-2278 support" |
@@ -847,7 +847,7 @@ config BLK_DEV_DTC2278 | |||
847 | boot parameter. It enables support for the secondary IDE interface | 847 | boot parameter. It enables support for the secondary IDE interface |
848 | of the DTC-2278 card, and permits faster I/O speeds to be set as | 848 | of the DTC-2278 card, and permits faster I/O speeds to be set as |
849 | well. See the <file:Documentation/ide/ide.txt> and | 849 | well. See the <file:Documentation/ide/ide.txt> and |
850 | <file:drivers/ide/legacy/dtc2278.c> files for more info. | 850 | <file:drivers/ide/dtc2278.c> files for more info. |
851 | 851 | ||
852 | config BLK_DEV_HT6560B | 852 | config BLK_DEV_HT6560B |
853 | tristate "Holtek HT6560B support" | 853 | tristate "Holtek HT6560B support" |
@@ -858,7 +858,7 @@ config BLK_DEV_HT6560B | |||
858 | boot parameter. It enables support for the secondary IDE interface | 858 | boot parameter. It enables support for the secondary IDE interface |
859 | of the Holtek card, and permits faster I/O speeds to be set as well. | 859 | of the Holtek card, and permits faster I/O speeds to be set as well. |
860 | See the <file:Documentation/ide/ide.txt> and | 860 | See the <file:Documentation/ide/ide.txt> and |
861 | <file:drivers/ide/legacy/ht6560b.c> files for more info. | 861 | <file:drivers/ide/ht6560b.c> files for more info. |
862 | 862 | ||
863 | config BLK_DEV_QD65XX | 863 | config BLK_DEV_QD65XX |
864 | tristate "QDI QD65xx support" | 864 | tristate "QDI QD65xx support" |
@@ -867,7 +867,7 @@ config BLK_DEV_QD65XX | |||
867 | help | 867 | help |
868 | This driver is enabled at runtime using the "qd65xx.probe" kernel | 868 | This driver is enabled at runtime using the "qd65xx.probe" kernel |
869 | boot parameter. It permits faster I/O speeds to be set. See the | 869 | boot parameter. It permits faster I/O speeds to be set. See the |
870 | <file:Documentation/ide/ide.txt> and <file:drivers/ide/legacy/qd65xx.c> | 870 | <file:Documentation/ide/ide.txt> and <file:drivers/ide/qd65xx.c> |
871 | for more info. | 871 | for more info. |
872 | 872 | ||
873 | config BLK_DEV_UMC8672 | 873 | config BLK_DEV_UMC8672 |
@@ -879,7 +879,7 @@ config BLK_DEV_UMC8672 | |||
879 | boot parameter. It enables support for the secondary IDE interface | 879 | boot parameter. It enables support for the secondary IDE interface |
880 | of the UMC-8672, and permits faster I/O speeds to be set as well. | 880 | of the UMC-8672, and permits faster I/O speeds to be set as well. |
881 | See the files <file:Documentation/ide/ide.txt> and | 881 | See the files <file:Documentation/ide/ide.txt> and |
882 | <file:drivers/ide/legacy/umc8672.c> for more info. | 882 | <file:drivers/ide/umc8672.c> for more info. |
883 | 883 | ||
884 | endif | 884 | endif |
885 | 885 | ||
diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c index d72156517726..a5c9ed128b97 100644 --- a/drivers/media/video/v4l2-dev.c +++ b/drivers/media/video/v4l2-dev.c | |||
@@ -181,7 +181,7 @@ static void v4l2_device_release(struct device *cd) | |||
181 | * TODO: In the long run all drivers that use v4l2_device should use the | 181 | * TODO: In the long run all drivers that use v4l2_device should use the |
182 | * v4l2_device release callback. This check will then be unnecessary. | 182 | * v4l2_device release callback. This check will then be unnecessary. |
183 | */ | 183 | */ |
184 | if (v4l2_dev->release == NULL) | 184 | if (v4l2_dev && v4l2_dev->release == NULL) |
185 | v4l2_dev = NULL; | 185 | v4l2_dev = NULL; |
186 | 186 | ||
187 | /* Release video_device and perform other | 187 | /* Release video_device and perform other |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 41430baa1321..71efff323941 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -1432,6 +1432,8 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb) | |||
1432 | struct sk_buff *skb = *pskb; | 1432 | struct sk_buff *skb = *pskb; |
1433 | struct slave *slave; | 1433 | struct slave *slave; |
1434 | struct bonding *bond; | 1434 | struct bonding *bond; |
1435 | void (*recv_probe)(struct sk_buff *, struct bonding *, | ||
1436 | struct slave *); | ||
1435 | 1437 | ||
1436 | skb = skb_share_check(skb, GFP_ATOMIC); | 1438 | skb = skb_share_check(skb, GFP_ATOMIC); |
1437 | if (unlikely(!skb)) | 1439 | if (unlikely(!skb)) |
@@ -1445,11 +1447,12 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb) | |||
1445 | if (bond->params.arp_interval) | 1447 | if (bond->params.arp_interval) |
1446 | slave->dev->last_rx = jiffies; | 1448 | slave->dev->last_rx = jiffies; |
1447 | 1449 | ||
1448 | if (bond->recv_probe) { | 1450 | recv_probe = ACCESS_ONCE(bond->recv_probe); |
1451 | if (recv_probe) { | ||
1449 | struct sk_buff *nskb = skb_clone(skb, GFP_ATOMIC); | 1452 | struct sk_buff *nskb = skb_clone(skb, GFP_ATOMIC); |
1450 | 1453 | ||
1451 | if (likely(nskb)) { | 1454 | if (likely(nskb)) { |
1452 | bond->recv_probe(nskb, bond, slave); | 1455 | recv_probe(nskb, bond, slave); |
1453 | dev_kfree_skb(nskb); | 1456 | dev_kfree_skb(nskb); |
1454 | } | 1457 | } |
1455 | } | 1458 | } |
diff --git a/drivers/net/can/mscan/mscan.c b/drivers/net/can/mscan/mscan.c index ac42f5da91b5..ec4a3119e2c9 100644 --- a/drivers/net/can/mscan/mscan.c +++ b/drivers/net/can/mscan/mscan.c | |||
@@ -261,11 +261,13 @@ static netdev_tx_t mscan_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
261 | void __iomem *data = ®s->tx.dsr1_0; | 261 | void __iomem *data = ®s->tx.dsr1_0; |
262 | u16 *payload = (u16 *)frame->data; | 262 | u16 *payload = (u16 *)frame->data; |
263 | 263 | ||
264 | /* It is safe to write into dsr[dlc+1] */ | 264 | for (i = 0; i < frame->can_dlc / 2; i++) { |
265 | for (i = 0; i < (frame->can_dlc + 1) / 2; i++) { | ||
266 | out_be16(data, *payload++); | 265 | out_be16(data, *payload++); |
267 | data += 2 + _MSCAN_RESERVED_DSR_SIZE; | 266 | data += 2 + _MSCAN_RESERVED_DSR_SIZE; |
268 | } | 267 | } |
268 | /* write remaining byte if necessary */ | ||
269 | if (frame->can_dlc & 1) | ||
270 | out_8(data, frame->data[frame->can_dlc - 1]); | ||
269 | } | 271 | } |
270 | 272 | ||
271 | out_8(®s->tx.dlr, frame->can_dlc); | 273 | out_8(®s->tx.dlr, frame->can_dlc); |
@@ -330,10 +332,13 @@ static void mscan_get_rx_frame(struct net_device *dev, struct can_frame *frame) | |||
330 | void __iomem *data = ®s->rx.dsr1_0; | 332 | void __iomem *data = ®s->rx.dsr1_0; |
331 | u16 *payload = (u16 *)frame->data; | 333 | u16 *payload = (u16 *)frame->data; |
332 | 334 | ||
333 | for (i = 0; i < (frame->can_dlc + 1) / 2; i++) { | 335 | for (i = 0; i < frame->can_dlc / 2; i++) { |
334 | *payload++ = in_be16(data); | 336 | *payload++ = in_be16(data); |
335 | data += 2 + _MSCAN_RESERVED_DSR_SIZE; | 337 | data += 2 + _MSCAN_RESERVED_DSR_SIZE; |
336 | } | 338 | } |
339 | /* read remaining byte if necessary */ | ||
340 | if (frame->can_dlc & 1) | ||
341 | frame->data[frame->can_dlc - 1] = in_8(data); | ||
337 | } | 342 | } |
338 | 343 | ||
339 | out_8(®s->canrflg, MSCAN_RXF); | 344 | out_8(®s->canrflg, MSCAN_RXF); |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h index 2f92487724c6..627a5807836d 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | |||
@@ -234,13 +234,19 @@ do { \ | |||
234 | * FUNC_N_CLID_X = N * NUM_SPECIAL_CLIENTS + FUNC_0_CLID_X | 234 | * FUNC_N_CLID_X = N * NUM_SPECIAL_CLIENTS + FUNC_0_CLID_X |
235 | * | 235 | * |
236 | */ | 236 | */ |
237 | /* iSCSI L2 */ | 237 | enum { |
238 | #define BNX2X_ISCSI_ETH_CL_ID_IDX 1 | 238 | BNX2X_ISCSI_ETH_CL_ID_IDX, |
239 | #define BNX2X_ISCSI_ETH_CID 49 | 239 | BNX2X_FCOE_ETH_CL_ID_IDX, |
240 | BNX2X_MAX_CNIC_ETH_CL_ID_IDX, | ||
241 | }; | ||
240 | 242 | ||
241 | /* FCoE L2 */ | 243 | #define BNX2X_CNIC_START_ETH_CID 48 |
242 | #define BNX2X_FCOE_ETH_CL_ID_IDX 2 | 244 | enum { |
243 | #define BNX2X_FCOE_ETH_CID 50 | 245 | /* iSCSI L2 */ |
246 | BNX2X_ISCSI_ETH_CID = BNX2X_CNIC_START_ETH_CID, | ||
247 | /* FCoE L2 */ | ||
248 | BNX2X_FCOE_ETH_CID, | ||
249 | }; | ||
244 | 250 | ||
245 | /** Additional rings budgeting */ | 251 | /** Additional rings budgeting */ |
246 | #ifdef BCM_CNIC | 252 | #ifdef BCM_CNIC |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h index 5b1f9b5ec499..283d663da180 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | |||
@@ -1297,7 +1297,7 @@ static inline void bnx2x_init_txdata(struct bnx2x *bp, | |||
1297 | static inline u8 bnx2x_cnic_eth_cl_id(struct bnx2x *bp, u8 cl_idx) | 1297 | static inline u8 bnx2x_cnic_eth_cl_id(struct bnx2x *bp, u8 cl_idx) |
1298 | { | 1298 | { |
1299 | return bp->cnic_base_cl_id + cl_idx + | 1299 | return bp->cnic_base_cl_id + cl_idx + |
1300 | (bp->pf_num >> 1) * NON_ETH_CONTEXT_USE; | 1300 | (bp->pf_num >> 1) * BNX2X_MAX_CNIC_ETH_CL_ID_IDX; |
1301 | } | 1301 | } |
1302 | 1302 | ||
1303 | static inline u8 bnx2x_cnic_fw_sb_id(struct bnx2x *bp) | 1303 | static inline u8 bnx2x_cnic_fw_sb_id(struct bnx2x *bp) |
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index b89027c61937..b865e9fdd089 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c | |||
@@ -6529,12 +6529,12 @@ static void tg3_tx_skb_unmap(struct tg3_napi *tnapi, u32 entry, int last) | |||
6529 | 6529 | ||
6530 | /* Workaround 4GB and 40-bit hardware DMA bugs. */ | 6530 | /* Workaround 4GB and 40-bit hardware DMA bugs. */ |
6531 | static int tigon3_dma_hwbug_workaround(struct tg3_napi *tnapi, | 6531 | static int tigon3_dma_hwbug_workaround(struct tg3_napi *tnapi, |
6532 | struct sk_buff *skb, | 6532 | struct sk_buff **pskb, |
6533 | u32 *entry, u32 *budget, | 6533 | u32 *entry, u32 *budget, |
6534 | u32 base_flags, u32 mss, u32 vlan) | 6534 | u32 base_flags, u32 mss, u32 vlan) |
6535 | { | 6535 | { |
6536 | struct tg3 *tp = tnapi->tp; | 6536 | struct tg3 *tp = tnapi->tp; |
6537 | struct sk_buff *new_skb; | 6537 | struct sk_buff *new_skb, *skb = *pskb; |
6538 | dma_addr_t new_addr = 0; | 6538 | dma_addr_t new_addr = 0; |
6539 | int ret = 0; | 6539 | int ret = 0; |
6540 | 6540 | ||
@@ -6576,7 +6576,7 @@ static int tigon3_dma_hwbug_workaround(struct tg3_napi *tnapi, | |||
6576 | } | 6576 | } |
6577 | 6577 | ||
6578 | dev_kfree_skb(skb); | 6578 | dev_kfree_skb(skb); |
6579 | 6579 | *pskb = new_skb; | |
6580 | return ret; | 6580 | return ret; |
6581 | } | 6581 | } |
6582 | 6582 | ||
@@ -6803,7 +6803,7 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
6803 | */ | 6803 | */ |
6804 | entry = tnapi->tx_prod; | 6804 | entry = tnapi->tx_prod; |
6805 | budget = tg3_tx_avail(tnapi); | 6805 | budget = tg3_tx_avail(tnapi); |
6806 | if (tigon3_dma_hwbug_workaround(tnapi, skb, &entry, &budget, | 6806 | if (tigon3_dma_hwbug_workaround(tnapi, &skb, &entry, &budget, |
6807 | base_flags, mss, vlan)) | 6807 | base_flags, mss, vlan)) |
6808 | goto out_unlock; | 6808 | goto out_unlock; |
6809 | } | 6809 | } |
@@ -15668,7 +15668,7 @@ static void __devexit tg3_remove_one(struct pci_dev *pdev) | |||
15668 | 15668 | ||
15669 | cancel_work_sync(&tp->reset_task); | 15669 | cancel_work_sync(&tp->reset_task); |
15670 | 15670 | ||
15671 | if (!tg3_flag(tp, USE_PHYLIB)) { | 15671 | if (tg3_flag(tp, USE_PHYLIB)) { |
15672 | tg3_phy_fini(tp); | 15672 | tg3_phy_fini(tp); |
15673 | tg3_mdio_fini(tp); | 15673 | tg3_mdio_fini(tp); |
15674 | } | 15674 | } |
diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c index 7a0c746f2749..7becff1f387d 100644 --- a/drivers/net/ethernet/jme.c +++ b/drivers/net/ethernet/jme.c | |||
@@ -3132,6 +3132,9 @@ jme_suspend(struct device *dev) | |||
3132 | struct net_device *netdev = pci_get_drvdata(pdev); | 3132 | struct net_device *netdev = pci_get_drvdata(pdev); |
3133 | struct jme_adapter *jme = netdev_priv(netdev); | 3133 | struct jme_adapter *jme = netdev_priv(netdev); |
3134 | 3134 | ||
3135 | if (!netif_running(netdev)) | ||
3136 | return 0; | ||
3137 | |||
3135 | atomic_dec(&jme->link_changing); | 3138 | atomic_dec(&jme->link_changing); |
3136 | 3139 | ||
3137 | netif_device_detach(netdev); | 3140 | netif_device_detach(netdev); |
@@ -3172,6 +3175,9 @@ jme_resume(struct device *dev) | |||
3172 | struct net_device *netdev = pci_get_drvdata(pdev); | 3175 | struct net_device *netdev = pci_get_drvdata(pdev); |
3173 | struct jme_adapter *jme = netdev_priv(netdev); | 3176 | struct jme_adapter *jme = netdev_priv(netdev); |
3174 | 3177 | ||
3178 | if (!netif_running(netdev)) | ||
3179 | return 0; | ||
3180 | |||
3175 | jme_clear_pm(jme); | 3181 | jme_clear_pm(jme); |
3176 | jme_phy_on(jme); | 3182 | jme_phy_on(jme); |
3177 | if (test_bit(JME_FLAG_SSET, &jme->flags)) | 3183 | if (test_bit(JME_FLAG_SSET, &jme->flags)) |
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c index 75338eb88e88..90f2cd24faac 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c | |||
@@ -172,7 +172,7 @@ int mlx4_en_activate_tx_ring(struct mlx4_en_priv *priv, | |||
172 | memset(ring->buf, 0, ring->buf_size); | 172 | memset(ring->buf, 0, ring->buf_size); |
173 | 173 | ||
174 | ring->qp_state = MLX4_QP_STATE_RST; | 174 | ring->qp_state = MLX4_QP_STATE_RST; |
175 | ring->doorbell_qpn = swab32(ring->qp.qpn << 8); | 175 | ring->doorbell_qpn = ring->qp.qpn << 8; |
176 | 176 | ||
177 | mlx4_en_fill_qp_context(priv, ring->size, ring->stride, 1, 0, ring->qpn, | 177 | mlx4_en_fill_qp_context(priv, ring->size, ring->stride, 1, 0, ring->qpn, |
178 | ring->cqn, &ring->context); | 178 | ring->cqn, &ring->context); |
@@ -779,7 +779,7 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev) | |||
779 | skb_orphan(skb); | 779 | skb_orphan(skb); |
780 | 780 | ||
781 | if (ring->bf_enabled && desc_size <= MAX_BF && !bounce && !vlan_tag) { | 781 | if (ring->bf_enabled && desc_size <= MAX_BF && !bounce && !vlan_tag) { |
782 | *(u32 *) (&tx_desc->ctrl.vlan_tag) |= ring->doorbell_qpn; | 782 | *(__be32 *) (&tx_desc->ctrl.vlan_tag) |= cpu_to_be32(ring->doorbell_qpn); |
783 | op_own |= htonl((bf_index & 0xffff) << 8); | 783 | op_own |= htonl((bf_index & 0xffff) << 8); |
784 | /* Ensure new descirptor hits memory | 784 | /* Ensure new descirptor hits memory |
785 | * before setting ownership of this descriptor to HW */ | 785 | * before setting ownership of this descriptor to HW */ |
@@ -800,7 +800,7 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev) | |||
800 | wmb(); | 800 | wmb(); |
801 | tx_desc->ctrl.owner_opcode = op_own; | 801 | tx_desc->ctrl.owner_opcode = op_own; |
802 | wmb(); | 802 | wmb(); |
803 | writel(ring->doorbell_qpn, ring->bf.uar->map + MLX4_SEND_DOORBELL); | 803 | iowrite32be(ring->doorbell_qpn, ring->bf.uar->map + MLX4_SEND_DOORBELL); |
804 | } | 804 | } |
805 | 805 | ||
806 | /* Poll CQ here */ | 806 | /* Poll CQ here */ |
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index aa39e771175c..92b45f08858f 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c | |||
@@ -2937,7 +2937,7 @@ static void rtl8168e_2_hw_phy_config(struct rtl8169_private *tp) | |||
2937 | rtl_writephy(tp, 0x1f, 0x0004); | 2937 | rtl_writephy(tp, 0x1f, 0x0004); |
2938 | rtl_writephy(tp, 0x1f, 0x0007); | 2938 | rtl_writephy(tp, 0x1f, 0x0007); |
2939 | rtl_writephy(tp, 0x1e, 0x0020); | 2939 | rtl_writephy(tp, 0x1e, 0x0020); |
2940 | rtl_w1w0_phy(tp, 0x06, 0x0000, 0x0100); | 2940 | rtl_w1w0_phy(tp, 0x15, 0x0000, 0x0100); |
2941 | rtl_writephy(tp, 0x1f, 0x0002); | 2941 | rtl_writephy(tp, 0x1f, 0x0002); |
2942 | rtl_writephy(tp, 0x1f, 0x0000); | 2942 | rtl_writephy(tp, 0x1f, 0x0000); |
2943 | rtl_writephy(tp, 0x0d, 0x0007); | 2943 | rtl_writephy(tp, 0x0d, 0x0007); |
@@ -3491,6 +3491,37 @@ static void __devinit rtl_init_mdio_ops(struct rtl8169_private *tp) | |||
3491 | } | 3491 | } |
3492 | } | 3492 | } |
3493 | 3493 | ||
3494 | static void rtl_wol_suspend_quirk(struct rtl8169_private *tp) | ||
3495 | { | ||
3496 | void __iomem *ioaddr = tp->mmio_addr; | ||
3497 | |||
3498 | switch (tp->mac_version) { | ||
3499 | case RTL_GIGA_MAC_VER_29: | ||
3500 | case RTL_GIGA_MAC_VER_30: | ||
3501 | case RTL_GIGA_MAC_VER_32: | ||
3502 | case RTL_GIGA_MAC_VER_33: | ||
3503 | case RTL_GIGA_MAC_VER_34: | ||
3504 | RTL_W32(RxConfig, RTL_R32(RxConfig) | | ||
3505 | AcceptBroadcast | AcceptMulticast | AcceptMyPhys); | ||
3506 | break; | ||
3507 | default: | ||
3508 | break; | ||
3509 | } | ||
3510 | } | ||
3511 | |||
3512 | static bool rtl_wol_pll_power_down(struct rtl8169_private *tp) | ||
3513 | { | ||
3514 | if (!(__rtl8169_get_wol(tp) & WAKE_ANY)) | ||
3515 | return false; | ||
3516 | |||
3517 | rtl_writephy(tp, 0x1f, 0x0000); | ||
3518 | rtl_writephy(tp, MII_BMCR, 0x0000); | ||
3519 | |||
3520 | rtl_wol_suspend_quirk(tp); | ||
3521 | |||
3522 | return true; | ||
3523 | } | ||
3524 | |||
3494 | static void r810x_phy_power_down(struct rtl8169_private *tp) | 3525 | static void r810x_phy_power_down(struct rtl8169_private *tp) |
3495 | { | 3526 | { |
3496 | rtl_writephy(tp, 0x1f, 0x0000); | 3527 | rtl_writephy(tp, 0x1f, 0x0000); |
@@ -3505,18 +3536,8 @@ static void r810x_phy_power_up(struct rtl8169_private *tp) | |||
3505 | 3536 | ||
3506 | static void r810x_pll_power_down(struct rtl8169_private *tp) | 3537 | static void r810x_pll_power_down(struct rtl8169_private *tp) |
3507 | { | 3538 | { |
3508 | void __iomem *ioaddr = tp->mmio_addr; | 3539 | if (rtl_wol_pll_power_down(tp)) |
3509 | |||
3510 | if (__rtl8169_get_wol(tp) & WAKE_ANY) { | ||
3511 | rtl_writephy(tp, 0x1f, 0x0000); | ||
3512 | rtl_writephy(tp, MII_BMCR, 0x0000); | ||
3513 | |||
3514 | if (tp->mac_version == RTL_GIGA_MAC_VER_29 || | ||
3515 | tp->mac_version == RTL_GIGA_MAC_VER_30) | ||
3516 | RTL_W32(RxConfig, RTL_R32(RxConfig) | AcceptBroadcast | | ||
3517 | AcceptMulticast | AcceptMyPhys); | ||
3518 | return; | 3540 | return; |
3519 | } | ||
3520 | 3541 | ||
3521 | r810x_phy_power_down(tp); | 3542 | r810x_phy_power_down(tp); |
3522 | } | 3543 | } |
@@ -3605,17 +3626,8 @@ static void r8168_pll_power_down(struct rtl8169_private *tp) | |||
3605 | tp->mac_version == RTL_GIGA_MAC_VER_33) | 3626 | tp->mac_version == RTL_GIGA_MAC_VER_33) |
3606 | rtl_ephy_write(ioaddr, 0x19, 0xff64); | 3627 | rtl_ephy_write(ioaddr, 0x19, 0xff64); |
3607 | 3628 | ||
3608 | if (__rtl8169_get_wol(tp) & WAKE_ANY) { | 3629 | if (rtl_wol_pll_power_down(tp)) |
3609 | rtl_writephy(tp, 0x1f, 0x0000); | ||
3610 | rtl_writephy(tp, MII_BMCR, 0x0000); | ||
3611 | |||
3612 | if (tp->mac_version == RTL_GIGA_MAC_VER_32 || | ||
3613 | tp->mac_version == RTL_GIGA_MAC_VER_33 || | ||
3614 | tp->mac_version == RTL_GIGA_MAC_VER_34) | ||
3615 | RTL_W32(RxConfig, RTL_R32(RxConfig) | AcceptBroadcast | | ||
3616 | AcceptMulticast | AcceptMyPhys); | ||
3617 | return; | 3630 | return; |
3618 | } | ||
3619 | 3631 | ||
3620 | r8168_phy_power_down(tp); | 3632 | r8168_phy_power_down(tp); |
3621 | 3633 | ||
@@ -6161,11 +6173,30 @@ static const struct dev_pm_ops rtl8169_pm_ops = { | |||
6161 | 6173 | ||
6162 | #endif /* !CONFIG_PM */ | 6174 | #endif /* !CONFIG_PM */ |
6163 | 6175 | ||
6176 | static void rtl_wol_shutdown_quirk(struct rtl8169_private *tp) | ||
6177 | { | ||
6178 | void __iomem *ioaddr = tp->mmio_addr; | ||
6179 | |||
6180 | /* WoL fails with 8168b when the receiver is disabled. */ | ||
6181 | switch (tp->mac_version) { | ||
6182 | case RTL_GIGA_MAC_VER_11: | ||
6183 | case RTL_GIGA_MAC_VER_12: | ||
6184 | case RTL_GIGA_MAC_VER_17: | ||
6185 | pci_clear_master(tp->pci_dev); | ||
6186 | |||
6187 | RTL_W8(ChipCmd, CmdRxEnb); | ||
6188 | /* PCI commit */ | ||
6189 | RTL_R8(ChipCmd); | ||
6190 | break; | ||
6191 | default: | ||
6192 | break; | ||
6193 | } | ||
6194 | } | ||
6195 | |||
6164 | static void rtl_shutdown(struct pci_dev *pdev) | 6196 | static void rtl_shutdown(struct pci_dev *pdev) |
6165 | { | 6197 | { |
6166 | struct net_device *dev = pci_get_drvdata(pdev); | 6198 | struct net_device *dev = pci_get_drvdata(pdev); |
6167 | struct rtl8169_private *tp = netdev_priv(dev); | 6199 | struct rtl8169_private *tp = netdev_priv(dev); |
6168 | void __iomem *ioaddr = tp->mmio_addr; | ||
6169 | 6200 | ||
6170 | rtl8169_net_suspend(dev); | 6201 | rtl8169_net_suspend(dev); |
6171 | 6202 | ||
@@ -6179,16 +6210,9 @@ static void rtl_shutdown(struct pci_dev *pdev) | |||
6179 | spin_unlock_irq(&tp->lock); | 6210 | spin_unlock_irq(&tp->lock); |
6180 | 6211 | ||
6181 | if (system_state == SYSTEM_POWER_OFF) { | 6212 | if (system_state == SYSTEM_POWER_OFF) { |
6182 | /* WoL fails with 8168b when the receiver is disabled. */ | 6213 | if (__rtl8169_get_wol(tp) & WAKE_ANY) { |
6183 | if ((tp->mac_version == RTL_GIGA_MAC_VER_11 || | 6214 | rtl_wol_suspend_quirk(tp); |
6184 | tp->mac_version == RTL_GIGA_MAC_VER_12 || | 6215 | rtl_wol_shutdown_quirk(tp); |
6185 | tp->mac_version == RTL_GIGA_MAC_VER_17) && | ||
6186 | (tp->features & RTL_FEATURE_WOL)) { | ||
6187 | pci_clear_master(pdev); | ||
6188 | |||
6189 | RTL_W8(ChipCmd, CmdRxEnb); | ||
6190 | /* PCI commit */ | ||
6191 | RTL_R8(ChipCmd); | ||
6192 | } | 6216 | } |
6193 | 6217 | ||
6194 | pci_wake_from_d3(pdev, true); | 6218 | pci_wake_from_d3(pdev, true); |
diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c index a3aa4c0e87f3..d2be42aafbef 100644 --- a/drivers/net/ethernet/smsc/smsc911x.c +++ b/drivers/net/ethernet/smsc/smsc911x.c | |||
@@ -26,6 +26,7 @@ | |||
26 | * LAN9215, LAN9216, LAN9217, LAN9218 | 26 | * LAN9215, LAN9216, LAN9217, LAN9218 |
27 | * LAN9210, LAN9211 | 27 | * LAN9210, LAN9211 |
28 | * LAN9220, LAN9221 | 28 | * LAN9220, LAN9221 |
29 | * LAN89218 | ||
29 | * | 30 | * |
30 | */ | 31 | */ |
31 | 32 | ||
@@ -1987,6 +1988,7 @@ static int __devinit smsc911x_init(struct net_device *dev) | |||
1987 | case 0x01170000: | 1988 | case 0x01170000: |
1988 | case 0x01160000: | 1989 | case 0x01160000: |
1989 | case 0x01150000: | 1990 | case 0x01150000: |
1991 | case 0x218A0000: | ||
1990 | /* LAN911[5678] family */ | 1992 | /* LAN911[5678] family */ |
1991 | pdata->generation = pdata->idrev & 0x0000FFFF; | 1993 | pdata->generation = pdata->idrev & 0x0000FFFF; |
1992 | break; | 1994 | break; |
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index ed2a3977c6e7..e8882023576b 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c | |||
@@ -307,6 +307,11 @@ static ssize_t store_enabled(struct netconsole_target *nt, | |||
307 | return err; | 307 | return err; |
308 | if (enabled < 0 || enabled > 1) | 308 | if (enabled < 0 || enabled > 1) |
309 | return -EINVAL; | 309 | return -EINVAL; |
310 | if (enabled == nt->enabled) { | ||
311 | printk(KERN_INFO "netconsole: network logging has already %s\n", | ||
312 | nt->enabled ? "started" : "stopped"); | ||
313 | return -EINVAL; | ||
314 | } | ||
310 | 315 | ||
311 | if (enabled) { /* 1 */ | 316 | if (enabled) { /* 1 */ |
312 | 317 | ||
diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c index 47c8339a0359..2843c90f712f 100644 --- a/drivers/net/phy/mdio-gpio.c +++ b/drivers/net/phy/mdio-gpio.c | |||
@@ -241,7 +241,7 @@ MODULE_DEVICE_TABLE(of, mdio_ofgpio_match); | |||
241 | 241 | ||
242 | static struct platform_driver mdio_ofgpio_driver = { | 242 | static struct platform_driver mdio_ofgpio_driver = { |
243 | .driver = { | 243 | .driver = { |
244 | .name = "mdio-gpio", | 244 | .name = "mdio-ofgpio", |
245 | .owner = THIS_MODULE, | 245 | .owner = THIS_MODULE, |
246 | .of_match_table = mdio_ofgpio_match, | 246 | .of_match_table = mdio_ofgpio_match, |
247 | }, | 247 | }, |
diff --git a/drivers/net/ppp/pptp.c b/drivers/net/ppp/pptp.c index eae542a7e987..89f829f5f725 100644 --- a/drivers/net/ppp/pptp.c +++ b/drivers/net/ppp/pptp.c | |||
@@ -285,8 +285,10 @@ static int pptp_xmit(struct ppp_channel *chan, struct sk_buff *skb) | |||
285 | ip_send_check(iph); | 285 | ip_send_check(iph); |
286 | 286 | ||
287 | ip_local_out(skb); | 287 | ip_local_out(skb); |
288 | return 1; | ||
288 | 289 | ||
289 | tx_error: | 290 | tx_error: |
291 | kfree_skb(skb); | ||
290 | return 1; | 292 | return 1; |
291 | } | 293 | } |
292 | 294 | ||
@@ -305,11 +307,18 @@ static int pptp_rcv_core(struct sock *sk, struct sk_buff *skb) | |||
305 | } | 307 | } |
306 | 308 | ||
307 | header = (struct pptp_gre_header *)(skb->data); | 309 | header = (struct pptp_gre_header *)(skb->data); |
310 | headersize = sizeof(*header); | ||
308 | 311 | ||
309 | /* test if acknowledgement present */ | 312 | /* test if acknowledgement present */ |
310 | if (PPTP_GRE_IS_A(header->ver)) { | 313 | if (PPTP_GRE_IS_A(header->ver)) { |
311 | __u32 ack = (PPTP_GRE_IS_S(header->flags)) ? | 314 | __u32 ack; |
312 | header->ack : header->seq; /* ack in different place if S = 0 */ | 315 | |
316 | if (!pskb_may_pull(skb, headersize)) | ||
317 | goto drop; | ||
318 | header = (struct pptp_gre_header *)(skb->data); | ||
319 | |||
320 | /* ack in different place if S = 0 */ | ||
321 | ack = PPTP_GRE_IS_S(header->flags) ? header->ack : header->seq; | ||
313 | 322 | ||
314 | ack = ntohl(ack); | 323 | ack = ntohl(ack); |
315 | 324 | ||
@@ -318,21 +327,18 @@ static int pptp_rcv_core(struct sock *sk, struct sk_buff *skb) | |||
318 | /* also handle sequence number wrap-around */ | 327 | /* also handle sequence number wrap-around */ |
319 | if (WRAPPED(ack, opt->ack_recv)) | 328 | if (WRAPPED(ack, opt->ack_recv)) |
320 | opt->ack_recv = ack; | 329 | opt->ack_recv = ack; |
330 | } else { | ||
331 | headersize -= sizeof(header->ack); | ||
321 | } | 332 | } |
322 | |||
323 | /* test if payload present */ | 333 | /* test if payload present */ |
324 | if (!PPTP_GRE_IS_S(header->flags)) | 334 | if (!PPTP_GRE_IS_S(header->flags)) |
325 | goto drop; | 335 | goto drop; |
326 | 336 | ||
327 | headersize = sizeof(*header); | ||
328 | payload_len = ntohs(header->payload_len); | 337 | payload_len = ntohs(header->payload_len); |
329 | seq = ntohl(header->seq); | 338 | seq = ntohl(header->seq); |
330 | 339 | ||
331 | /* no ack present? */ | ||
332 | if (!PPTP_GRE_IS_A(header->ver)) | ||
333 | headersize -= sizeof(header->ack); | ||
334 | /* check for incomplete packet (length smaller than expected) */ | 340 | /* check for incomplete packet (length smaller than expected) */ |
335 | if (skb->len - headersize < payload_len) | 341 | if (!pskb_may_pull(skb, headersize + payload_len)) |
336 | goto drop; | 342 | goto drop; |
337 | 343 | ||
338 | payload = skb->data + headersize; | 344 | payload = skb->data + headersize; |
diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c index 1a7c19ae766f..8b307b428791 100644 --- a/drivers/staging/octeon/ethernet-rx.c +++ b/drivers/staging/octeon/ethernet-rx.c | |||
@@ -411,7 +411,8 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) | |||
411 | skb->protocol = eth_type_trans(skb, dev); | 411 | skb->protocol = eth_type_trans(skb, dev); |
412 | skb->dev = dev; | 412 | skb->dev = dev; |
413 | 413 | ||
414 | if (unlikely(work->word2.s.not_IP || work->word2.s.IP_exc || work->word2.s.L4_error)) | 414 | if (unlikely(work->word2.s.not_IP || work->word2.s.IP_exc || |
415 | work->word2.s.L4_error || !work->word2.s.tcp_or_udp)) | ||
415 | skb->ip_summed = CHECKSUM_NONE; | 416 | skb->ip_summed = CHECKSUM_NONE; |
416 | else | 417 | else |
417 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 418 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
diff --git a/drivers/tty/serial/lantiq.c b/drivers/tty/serial/lantiq.c index 58cf279ed879..bc95f52cad8b 100644 --- a/drivers/tty/serial/lantiq.c +++ b/drivers/tty/serial/lantiq.c | |||
@@ -478,8 +478,10 @@ lqasc_set_termios(struct uart_port *port, | |||
478 | spin_unlock_irqrestore(<q_asc_lock, flags); | 478 | spin_unlock_irqrestore(<q_asc_lock, flags); |
479 | 479 | ||
480 | /* Don't rewrite B0 */ | 480 | /* Don't rewrite B0 */ |
481 | if (tty_termios_baud_rate(new)) | 481 | if (tty_termios_baud_rate(new)) |
482 | tty_termios_encode_baud_rate(new, baud, baud); | 482 | tty_termios_encode_baud_rate(new, baud, baud); |
483 | |||
484 | uart_update_timeout(port, cflag, baud); | ||
483 | } | 485 | } |
484 | 486 | ||
485 | static const char* | 487 | static const char* |