diff options
Diffstat (limited to 'drivers')
64 files changed, 338 insertions, 138 deletions
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index 5d64e3acb000..878ac0c2cc68 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c | |||
@@ -493,7 +493,7 @@ static void __sysrq_put_key_op(int key, struct sysrq_key_op *op_p) | |||
493 | sysrq_key_table[i] = op_p; | 493 | sysrq_key_table[i] = op_p; |
494 | } | 494 | } |
495 | 495 | ||
496 | static void __handle_sysrq(int key, struct tty_struct *tty, int check_mask) | 496 | void __handle_sysrq(int key, struct tty_struct *tty, int check_mask) |
497 | { | 497 | { |
498 | struct sysrq_key_op *op_p; | 498 | struct sysrq_key_op *op_p; |
499 | int orig_log_level; | 499 | int orig_log_level; |
diff --git a/drivers/clocksource/cs5535-clockevt.c b/drivers/clocksource/cs5535-clockevt.c index d7be69f13154..b7dab32ce63c 100644 --- a/drivers/clocksource/cs5535-clockevt.c +++ b/drivers/clocksource/cs5535-clockevt.c | |||
@@ -194,6 +194,6 @@ err_timer: | |||
194 | 194 | ||
195 | module_init(cs5535_mfgpt_init); | 195 | module_init(cs5535_mfgpt_init); |
196 | 196 | ||
197 | MODULE_AUTHOR("Andres Salomon <dilinger@collabora.co.uk>"); | 197 | MODULE_AUTHOR("Andres Salomon <dilinger@queued.net>"); |
198 | MODULE_DESCRIPTION("CS5535/CS5536 MFGPT clock event driver"); | 198 | MODULE_DESCRIPTION("CS5535/CS5536 MFGPT clock event driver"); |
199 | MODULE_LICENSE("GPL"); | 199 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 637c105f53d2..bd78acf3c365 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c | |||
@@ -1183,10 +1183,14 @@ static size_t sg_copy_end_to_buffer(struct scatterlist *sgl, unsigned int nents, | |||
1183 | /* Copy part of this segment */ | 1183 | /* Copy part of this segment */ |
1184 | ignore = skip - offset; | 1184 | ignore = skip - offset; |
1185 | len = miter.length - ignore; | 1185 | len = miter.length - ignore; |
1186 | if (boffset + len > buflen) | ||
1187 | len = buflen - boffset; | ||
1186 | memcpy(buf + boffset, miter.addr + ignore, len); | 1188 | memcpy(buf + boffset, miter.addr + ignore, len); |
1187 | } else { | 1189 | } else { |
1188 | /* Copy all of this segment */ | 1190 | /* Copy all of this segment (up to buflen) */ |
1189 | len = miter.length; | 1191 | len = miter.length; |
1192 | if (boffset + len > buflen) | ||
1193 | len = buflen - boffset; | ||
1190 | memcpy(buf + boffset, miter.addr, len); | 1194 | memcpy(buf + boffset, miter.addr, len); |
1191 | } | 1195 | } |
1192 | boffset += len; | 1196 | boffset += len; |
diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig index aedef7941b22..0d2f9dbb47e4 100644 --- a/drivers/edac/Kconfig +++ b/drivers/edac/Kconfig | |||
@@ -209,7 +209,7 @@ config EDAC_I5100 | |||
209 | 209 | ||
210 | config EDAC_MPC85XX | 210 | config EDAC_MPC85XX |
211 | tristate "Freescale MPC83xx / MPC85xx" | 211 | tristate "Freescale MPC83xx / MPC85xx" |
212 | depends on EDAC_MM_EDAC && FSL_SOC && (PPC_83xx || MPC85xx) | 212 | depends on EDAC_MM_EDAC && FSL_SOC && (PPC_83xx || PPC_85xx) |
213 | help | 213 | help |
214 | Support for error detection and correction on the Freescale | 214 | Support for error detection and correction on the Freescale |
215 | MPC8349, MPC8560, MPC8540, MPC8548 | 215 | MPC8349, MPC8560, MPC8540, MPC8548 |
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c index 52ca09bf4726..f39b00a46eda 100644 --- a/drivers/edac/mpc85xx_edac.c +++ b/drivers/edac/mpc85xx_edac.c | |||
@@ -1120,6 +1120,7 @@ static struct of_device_id mpc85xx_mc_err_of_match[] = { | |||
1120 | { .compatible = "fsl,mpc8555-memory-controller", }, | 1120 | { .compatible = "fsl,mpc8555-memory-controller", }, |
1121 | { .compatible = "fsl,mpc8560-memory-controller", }, | 1121 | { .compatible = "fsl,mpc8560-memory-controller", }, |
1122 | { .compatible = "fsl,mpc8568-memory-controller", }, | 1122 | { .compatible = "fsl,mpc8568-memory-controller", }, |
1123 | { .compatible = "fsl,mpc8569-memory-controller", }, | ||
1123 | { .compatible = "fsl,mpc8572-memory-controller", }, | 1124 | { .compatible = "fsl,mpc8572-memory-controller", }, |
1124 | { .compatible = "fsl,mpc8349-memory-controller", }, | 1125 | { .compatible = "fsl,mpc8349-memory-controller", }, |
1125 | { .compatible = "fsl,p2020-memory-controller", }, | 1126 | { .compatible = "fsl,p2020-memory-controller", }, |
diff --git a/drivers/gpio/cs5535-gpio.c b/drivers/gpio/cs5535-gpio.c index f73a1555e49d..e23c06893d19 100644 --- a/drivers/gpio/cs5535-gpio.c +++ b/drivers/gpio/cs5535-gpio.c | |||
@@ -352,6 +352,6 @@ static void __exit cs5535_gpio_exit(void) | |||
352 | module_init(cs5535_gpio_init); | 352 | module_init(cs5535_gpio_init); |
353 | module_exit(cs5535_gpio_exit); | 353 | module_exit(cs5535_gpio_exit); |
354 | 354 | ||
355 | MODULE_AUTHOR("Andres Salomon <dilinger@collabora.co.uk>"); | 355 | MODULE_AUTHOR("Andres Salomon <dilinger@queued.net>"); |
356 | MODULE_DESCRIPTION("AMD CS5535/CS5536 GPIO driver"); | 356 | MODULE_DESCRIPTION("AMD CS5535/CS5536 GPIO driver"); |
357 | MODULE_LICENSE("GPL"); | 357 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 074385882ccf..51bd301cf10d 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -2241,6 +2241,7 @@ i915_gem_object_get_pages(struct drm_gem_object *obj, | |||
2241 | page = read_cache_page_gfp(mapping, i, | 2241 | page = read_cache_page_gfp(mapping, i, |
2242 | GFP_HIGHUSER | | 2242 | GFP_HIGHUSER | |
2243 | __GFP_COLD | | 2243 | __GFP_COLD | |
2244 | __GFP_RECLAIMABLE | | ||
2244 | gfpmask); | 2245 | gfpmask); |
2245 | if (IS_ERR(page)) | 2246 | if (IS_ERR(page)) |
2246 | goto err_pages; | 2247 | goto err_pages; |
@@ -4741,6 +4742,16 @@ i915_gem_load(struct drm_device *dev) | |||
4741 | list_add(&dev_priv->mm.shrink_list, &shrink_list); | 4742 | list_add(&dev_priv->mm.shrink_list, &shrink_list); |
4742 | spin_unlock(&shrink_list_lock); | 4743 | spin_unlock(&shrink_list_lock); |
4743 | 4744 | ||
4745 | /* On GEN3 we really need to make sure the ARB C3 LP bit is set */ | ||
4746 | if (IS_GEN3(dev)) { | ||
4747 | u32 tmp = I915_READ(MI_ARB_STATE); | ||
4748 | if (!(tmp & MI_ARB_C3_LP_WRITE_ENABLE)) { | ||
4749 | /* arb state is a masked write, so set bit + bit in mask */ | ||
4750 | tmp = MI_ARB_C3_LP_WRITE_ENABLE | (MI_ARB_C3_LP_WRITE_ENABLE << MI_ARB_MASK_SHIFT); | ||
4751 | I915_WRITE(MI_ARB_STATE, tmp); | ||
4752 | } | ||
4753 | } | ||
4754 | |||
4744 | /* Old X drivers will take 0-2 for front, back, depth buffers */ | 4755 | /* Old X drivers will take 0-2 for front, back, depth buffers */ |
4745 | if (!drm_core_check_feature(dev, DRIVER_MODESET)) | 4756 | if (!drm_core_check_feature(dev, DRIVER_MODESET)) |
4746 | dev_priv->fence_reg_start = 3; | 4757 | dev_priv->fence_reg_start = 3; |
@@ -4977,7 +4988,7 @@ i915_gpu_is_active(struct drm_device *dev) | |||
4977 | } | 4988 | } |
4978 | 4989 | ||
4979 | static int | 4990 | static int |
4980 | i915_gem_shrink(int nr_to_scan, gfp_t gfp_mask) | 4991 | i915_gem_shrink(struct shrinker *shrink, int nr_to_scan, gfp_t gfp_mask) |
4981 | { | 4992 | { |
4982 | drm_i915_private_t *dev_priv, *next_dev; | 4993 | drm_i915_private_t *dev_priv, *next_dev; |
4983 | struct drm_i915_gem_object *obj_priv, *next_obj; | 4994 | struct drm_i915_gem_object *obj_priv, *next_obj; |
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 150400f40534..6d9b0288272a 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -359,6 +359,70 @@ | |||
359 | #define LM_BURST_LENGTH 0x00000700 | 359 | #define LM_BURST_LENGTH 0x00000700 |
360 | #define LM_FIFO_WATERMARK 0x0000001F | 360 | #define LM_FIFO_WATERMARK 0x0000001F |
361 | #define MI_ARB_STATE 0x020e4 /* 915+ only */ | 361 | #define MI_ARB_STATE 0x020e4 /* 915+ only */ |
362 | #define MI_ARB_MASK_SHIFT 16 /* shift for enable bits */ | ||
363 | |||
364 | /* Make render/texture TLB fetches lower priorty than associated data | ||
365 | * fetches. This is not turned on by default | ||
366 | */ | ||
367 | #define MI_ARB_RENDER_TLB_LOW_PRIORITY (1 << 15) | ||
368 | |||
369 | /* Isoch request wait on GTT enable (Display A/B/C streams). | ||
370 | * Make isoch requests stall on the TLB update. May cause | ||
371 | * display underruns (test mode only) | ||
372 | */ | ||
373 | #define MI_ARB_ISOCH_WAIT_GTT (1 << 14) | ||
374 | |||
375 | /* Block grant count for isoch requests when block count is | ||
376 | * set to a finite value. | ||
377 | */ | ||
378 | #define MI_ARB_BLOCK_GRANT_MASK (3 << 12) | ||
379 | #define MI_ARB_BLOCK_GRANT_8 (0 << 12) /* for 3 display planes */ | ||
380 | #define MI_ARB_BLOCK_GRANT_4 (1 << 12) /* for 2 display planes */ | ||
381 | #define MI_ARB_BLOCK_GRANT_2 (2 << 12) /* for 1 display plane */ | ||
382 | #define MI_ARB_BLOCK_GRANT_0 (3 << 12) /* don't use */ | ||
383 | |||
384 | /* Enable render writes to complete in C2/C3/C4 power states. | ||
385 | * If this isn't enabled, render writes are prevented in low | ||
386 | * power states. That seems bad to me. | ||
387 | */ | ||
388 | #define MI_ARB_C3_LP_WRITE_ENABLE (1 << 11) | ||
389 | |||
390 | /* This acknowledges an async flip immediately instead | ||
391 | * of waiting for 2TLB fetches. | ||
392 | */ | ||
393 | #define MI_ARB_ASYNC_FLIP_ACK_IMMEDIATE (1 << 10) | ||
394 | |||
395 | /* Enables non-sequential data reads through arbiter | ||
396 | */ | ||
397 | #define MI_ARB_DUAL_DATA_PHASE_DISABLE (1 << 9) | ||
398 | |||
399 | /* Disable FSB snooping of cacheable write cycles from binner/render | ||
400 | * command stream | ||
401 | */ | ||
402 | #define MI_ARB_CACHE_SNOOP_DISABLE (1 << 8) | ||
403 | |||
404 | /* Arbiter time slice for non-isoch streams */ | ||
405 | #define MI_ARB_TIME_SLICE_MASK (7 << 5) | ||
406 | #define MI_ARB_TIME_SLICE_1 (0 << 5) | ||
407 | #define MI_ARB_TIME_SLICE_2 (1 << 5) | ||
408 | #define MI_ARB_TIME_SLICE_4 (2 << 5) | ||
409 | #define MI_ARB_TIME_SLICE_6 (3 << 5) | ||
410 | #define MI_ARB_TIME_SLICE_8 (4 << 5) | ||
411 | #define MI_ARB_TIME_SLICE_10 (5 << 5) | ||
412 | #define MI_ARB_TIME_SLICE_14 (6 << 5) | ||
413 | #define MI_ARB_TIME_SLICE_16 (7 << 5) | ||
414 | |||
415 | /* Low priority grace period page size */ | ||
416 | #define MI_ARB_LOW_PRIORITY_GRACE_4KB (0 << 4) /* default */ | ||
417 | #define MI_ARB_LOW_PRIORITY_GRACE_8KB (1 << 4) | ||
418 | |||
419 | /* Disable display A/B trickle feed */ | ||
420 | #define MI_ARB_DISPLAY_TRICKLE_FEED_DISABLE (1 << 2) | ||
421 | |||
422 | /* Set display plane priority */ | ||
423 | #define MI_ARB_DISPLAY_PRIORITY_A_B (0 << 0) /* display A > display B */ | ||
424 | #define MI_ARB_DISPLAY_PRIORITY_B_A (1 << 0) /* display B > display A */ | ||
425 | |||
362 | #define CACHE_MODE_0 0x02120 /* 915+ only */ | 426 | #define CACHE_MODE_0 0x02120 /* 915+ only */ |
363 | #define CM0_MASK_SHIFT 16 | 427 | #define CM0_MASK_SHIFT 16 |
364 | #define CM0_IZ_OPT_DISABLE (1<<6) | 428 | #define CM0_IZ_OPT_DISABLE (1<<6) |
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index fc924b649195..e492919faf44 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c | |||
@@ -203,36 +203,26 @@ struct methods { | |||
203 | const bool rw; | 203 | const bool rw; |
204 | }; | 204 | }; |
205 | 205 | ||
206 | static struct methods nv04_methods[] = { | 206 | static struct methods shadow_methods[] = { |
207 | { "PROM", load_vbios_prom, false }, | ||
208 | { "PRAMIN", load_vbios_pramin, true }, | ||
209 | { "PCIROM", load_vbios_pci, true }, | ||
210 | }; | ||
211 | |||
212 | static struct methods nv50_methods[] = { | ||
213 | { "ACPI", load_vbios_acpi, true }, | ||
214 | { "PRAMIN", load_vbios_pramin, true }, | 207 | { "PRAMIN", load_vbios_pramin, true }, |
215 | { "PROM", load_vbios_prom, false }, | 208 | { "PROM", load_vbios_prom, false }, |
216 | { "PCIROM", load_vbios_pci, true }, | 209 | { "PCIROM", load_vbios_pci, true }, |
210 | { "ACPI", load_vbios_acpi, true }, | ||
217 | }; | 211 | }; |
218 | 212 | ||
219 | #define METHODCNT 3 | ||
220 | |||
221 | static bool NVShadowVBIOS(struct drm_device *dev, uint8_t *data) | 213 | static bool NVShadowVBIOS(struct drm_device *dev, uint8_t *data) |
222 | { | 214 | { |
223 | struct drm_nouveau_private *dev_priv = dev->dev_private; | 215 | const int nr_methods = ARRAY_SIZE(shadow_methods); |
224 | struct methods *methods; | 216 | struct methods *methods = shadow_methods; |
225 | int i; | ||
226 | int testscore = 3; | 217 | int testscore = 3; |
227 | int scores[METHODCNT]; | 218 | int scores[nr_methods], i; |
228 | 219 | ||
229 | if (nouveau_vbios) { | 220 | if (nouveau_vbios) { |
230 | methods = nv04_methods; | 221 | for (i = 0; i < nr_methods; i++) |
231 | for (i = 0; i < METHODCNT; i++) | ||
232 | if (!strcasecmp(nouveau_vbios, methods[i].desc)) | 222 | if (!strcasecmp(nouveau_vbios, methods[i].desc)) |
233 | break; | 223 | break; |
234 | 224 | ||
235 | if (i < METHODCNT) { | 225 | if (i < nr_methods) { |
236 | NV_INFO(dev, "Attempting to use BIOS image from %s\n", | 226 | NV_INFO(dev, "Attempting to use BIOS image from %s\n", |
237 | methods[i].desc); | 227 | methods[i].desc); |
238 | 228 | ||
@@ -244,12 +234,7 @@ static bool NVShadowVBIOS(struct drm_device *dev, uint8_t *data) | |||
244 | NV_ERROR(dev, "VBIOS source \'%s\' invalid\n", nouveau_vbios); | 234 | NV_ERROR(dev, "VBIOS source \'%s\' invalid\n", nouveau_vbios); |
245 | } | 235 | } |
246 | 236 | ||
247 | if (dev_priv->card_type < NV_50) | 237 | for (i = 0; i < nr_methods; i++) { |
248 | methods = nv04_methods; | ||
249 | else | ||
250 | methods = nv50_methods; | ||
251 | |||
252 | for (i = 0; i < METHODCNT; i++) { | ||
253 | NV_TRACE(dev, "Attempting to load BIOS image from %s\n", | 238 | NV_TRACE(dev, "Attempting to load BIOS image from %s\n", |
254 | methods[i].desc); | 239 | methods[i].desc); |
255 | data[0] = data[1] = 0; /* avoid reuse of previous image */ | 240 | data[0] = data[1] = 0; /* avoid reuse of previous image */ |
@@ -260,7 +245,7 @@ static bool NVShadowVBIOS(struct drm_device *dev, uint8_t *data) | |||
260 | } | 245 | } |
261 | 246 | ||
262 | while (--testscore > 0) { | 247 | while (--testscore > 0) { |
263 | for (i = 0; i < METHODCNT; i++) { | 248 | for (i = 0; i < nr_methods; i++) { |
264 | if (scores[i] == testscore) { | 249 | if (scores[i] == testscore) { |
265 | NV_TRACE(dev, "Using BIOS image from %s\n", | 250 | NV_TRACE(dev, "Using BIOS image from %s\n", |
266 | methods[i].desc); | 251 | methods[i].desc); |
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index c9a4a0d2a115..257ea130ae13 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c | |||
@@ -387,7 +387,8 @@ int nouveau_fbcon_init(struct drm_device *dev) | |||
387 | dev_priv->nfbdev = nfbdev; | 387 | dev_priv->nfbdev = nfbdev; |
388 | nfbdev->helper.funcs = &nouveau_fbcon_helper_funcs; | 388 | nfbdev->helper.funcs = &nouveau_fbcon_helper_funcs; |
389 | 389 | ||
390 | ret = drm_fb_helper_init(dev, &nfbdev->helper, 2, 4); | 390 | ret = drm_fb_helper_init(dev, &nfbdev->helper, |
391 | nv_two_heads(dev) ? 2 : 1, 4); | ||
391 | if (ret) { | 392 | if (ret) { |
392 | kfree(nfbdev); | 393 | kfree(nfbdev); |
393 | return ret; | 394 | return ret; |
diff --git a/drivers/gpu/drm/radeon/evergreen_cs.c b/drivers/gpu/drm/radeon/evergreen_cs.c index 010963d4570f..345a75a03c96 100644 --- a/drivers/gpu/drm/radeon/evergreen_cs.c +++ b/drivers/gpu/drm/radeon/evergreen_cs.c | |||
@@ -333,7 +333,6 @@ static int evergreen_cs_packet_parse_vline(struct radeon_cs_parser *p) | |||
333 | header = radeon_get_ib_value(p, h_idx); | 333 | header = radeon_get_ib_value(p, h_idx); |
334 | crtc_id = radeon_get_ib_value(p, h_idx + 2 + 7 + 1); | 334 | crtc_id = radeon_get_ib_value(p, h_idx + 2 + 7 + 1); |
335 | reg = CP_PACKET0_GET_REG(header); | 335 | reg = CP_PACKET0_GET_REG(header); |
336 | mutex_lock(&p->rdev->ddev->mode_config.mutex); | ||
337 | obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC); | 336 | obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC); |
338 | if (!obj) { | 337 | if (!obj) { |
339 | DRM_ERROR("cannot find crtc %d\n", crtc_id); | 338 | DRM_ERROR("cannot find crtc %d\n", crtc_id); |
@@ -368,7 +367,6 @@ static int evergreen_cs_packet_parse_vline(struct radeon_cs_parser *p) | |||
368 | } | 367 | } |
369 | } | 368 | } |
370 | out: | 369 | out: |
371 | mutex_unlock(&p->rdev->ddev->mode_config.mutex); | ||
372 | return r; | 370 | return r; |
373 | } | 371 | } |
374 | 372 | ||
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c index 3970e62eaab8..a89a15ab524d 100644 --- a/drivers/gpu/drm/radeon/r100.c +++ b/drivers/gpu/drm/radeon/r100.c | |||
@@ -1230,7 +1230,6 @@ int r100_cs_packet_parse_vline(struct radeon_cs_parser *p) | |||
1230 | header = radeon_get_ib_value(p, h_idx); | 1230 | header = radeon_get_ib_value(p, h_idx); |
1231 | crtc_id = radeon_get_ib_value(p, h_idx + 5); | 1231 | crtc_id = radeon_get_ib_value(p, h_idx + 5); |
1232 | reg = CP_PACKET0_GET_REG(header); | 1232 | reg = CP_PACKET0_GET_REG(header); |
1233 | mutex_lock(&p->rdev->ddev->mode_config.mutex); | ||
1234 | obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC); | 1233 | obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC); |
1235 | if (!obj) { | 1234 | if (!obj) { |
1236 | DRM_ERROR("cannot find crtc %d\n", crtc_id); | 1235 | DRM_ERROR("cannot find crtc %d\n", crtc_id); |
@@ -1264,7 +1263,6 @@ int r100_cs_packet_parse_vline(struct radeon_cs_parser *p) | |||
1264 | ib[h_idx + 3] |= RADEON_ENG_DISPLAY_SELECT_CRTC1; | 1263 | ib[h_idx + 3] |= RADEON_ENG_DISPLAY_SELECT_CRTC1; |
1265 | } | 1264 | } |
1266 | out: | 1265 | out: |
1267 | mutex_unlock(&p->rdev->ddev->mode_config.mutex); | ||
1268 | return r; | 1266 | return r; |
1269 | } | 1267 | } |
1270 | 1268 | ||
@@ -2354,6 +2352,7 @@ void r100_mc_init(struct radeon_device *rdev) | |||
2354 | if (rdev->flags & RADEON_IS_IGP) | 2352 | if (rdev->flags & RADEON_IS_IGP) |
2355 | base = (RREG32(RADEON_NB_TOM) & 0xffff) << 16; | 2353 | base = (RREG32(RADEON_NB_TOM) & 0xffff) << 16; |
2356 | radeon_vram_location(rdev, &rdev->mc, base); | 2354 | radeon_vram_location(rdev, &rdev->mc, base); |
2355 | rdev->mc.gtt_base_align = 0; | ||
2357 | if (!(rdev->flags & RADEON_IS_AGP)) | 2356 | if (!(rdev->flags & RADEON_IS_AGP)) |
2358 | radeon_gtt_location(rdev, &rdev->mc); | 2357 | radeon_gtt_location(rdev, &rdev->mc); |
2359 | radeon_update_bandwidth_info(rdev); | 2358 | radeon_update_bandwidth_info(rdev); |
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c index 7e81db5eb804..19a7ef7ee344 100644 --- a/drivers/gpu/drm/radeon/r300.c +++ b/drivers/gpu/drm/radeon/r300.c | |||
@@ -481,6 +481,7 @@ void r300_mc_init(struct radeon_device *rdev) | |||
481 | if (rdev->flags & RADEON_IS_IGP) | 481 | if (rdev->flags & RADEON_IS_IGP) |
482 | base = (RREG32(RADEON_NB_TOM) & 0xffff) << 16; | 482 | base = (RREG32(RADEON_NB_TOM) & 0xffff) << 16; |
483 | radeon_vram_location(rdev, &rdev->mc, base); | 483 | radeon_vram_location(rdev, &rdev->mc, base); |
484 | rdev->mc.gtt_base_align = 0; | ||
484 | if (!(rdev->flags & RADEON_IS_AGP)) | 485 | if (!(rdev->flags & RADEON_IS_AGP)) |
485 | radeon_gtt_location(rdev, &rdev->mc); | 486 | radeon_gtt_location(rdev, &rdev->mc); |
486 | radeon_update_bandwidth_info(rdev); | 487 | radeon_update_bandwidth_info(rdev); |
@@ -1176,6 +1177,8 @@ int r300_cs_parse(struct radeon_cs_parser *p) | |||
1176 | int r; | 1177 | int r; |
1177 | 1178 | ||
1178 | track = kzalloc(sizeof(*track), GFP_KERNEL); | 1179 | track = kzalloc(sizeof(*track), GFP_KERNEL); |
1180 | if (track == NULL) | ||
1181 | return -ENOMEM; | ||
1179 | r100_cs_track_clear(p->rdev, track); | 1182 | r100_cs_track_clear(p->rdev, track); |
1180 | p->track = track; | 1183 | p->track = track; |
1181 | do { | 1184 | do { |
diff --git a/drivers/gpu/drm/radeon/r520.c b/drivers/gpu/drm/radeon/r520.c index 34330df28483..694af7cc23ac 100644 --- a/drivers/gpu/drm/radeon/r520.c +++ b/drivers/gpu/drm/radeon/r520.c | |||
@@ -125,6 +125,7 @@ void r520_mc_init(struct radeon_device *rdev) | |||
125 | r520_vram_get_type(rdev); | 125 | r520_vram_get_type(rdev); |
126 | r100_vram_init_sizes(rdev); | 126 | r100_vram_init_sizes(rdev); |
127 | radeon_vram_location(rdev, &rdev->mc, 0); | 127 | radeon_vram_location(rdev, &rdev->mc, 0); |
128 | rdev->mc.gtt_base_align = 0; | ||
128 | if (!(rdev->flags & RADEON_IS_AGP)) | 129 | if (!(rdev->flags & RADEON_IS_AGP)) |
129 | radeon_gtt_location(rdev, &rdev->mc); | 130 | radeon_gtt_location(rdev, &rdev->mc); |
130 | radeon_update_bandwidth_info(rdev); | 131 | radeon_update_bandwidth_info(rdev); |
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index 3d6645ce2151..e100f69faeec 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
@@ -1179,6 +1179,7 @@ void r600_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc) | |||
1179 | if (rdev->flags & RADEON_IS_IGP) | 1179 | if (rdev->flags & RADEON_IS_IGP) |
1180 | base = (RREG32(MC_VM_FB_LOCATION) & 0xFFFF) << 24; | 1180 | base = (RREG32(MC_VM_FB_LOCATION) & 0xFFFF) << 24; |
1181 | radeon_vram_location(rdev, &rdev->mc, base); | 1181 | radeon_vram_location(rdev, &rdev->mc, base); |
1182 | rdev->mc.gtt_base_align = 0; | ||
1182 | radeon_gtt_location(rdev, mc); | 1183 | radeon_gtt_location(rdev, mc); |
1183 | } | 1184 | } |
1184 | } | 1185 | } |
diff --git a/drivers/gpu/drm/radeon/r600_blit.c b/drivers/gpu/drm/radeon/r600_blit.c index f4fb88ece2bb..ca5c29f70779 100644 --- a/drivers/gpu/drm/radeon/r600_blit.c +++ b/drivers/gpu/drm/radeon/r600_blit.c | |||
@@ -538,9 +538,12 @@ int | |||
538 | r600_prepare_blit_copy(struct drm_device *dev, struct drm_file *file_priv) | 538 | r600_prepare_blit_copy(struct drm_device *dev, struct drm_file *file_priv) |
539 | { | 539 | { |
540 | drm_radeon_private_t *dev_priv = dev->dev_private; | 540 | drm_radeon_private_t *dev_priv = dev->dev_private; |
541 | int ret; | ||
541 | DRM_DEBUG("\n"); | 542 | DRM_DEBUG("\n"); |
542 | 543 | ||
543 | r600_nomm_get_vb(dev); | 544 | ret = r600_nomm_get_vb(dev); |
545 | if (ret) | ||
546 | return ret; | ||
544 | 547 | ||
545 | dev_priv->blit_vb->file_priv = file_priv; | 548 | dev_priv->blit_vb->file_priv = file_priv; |
546 | 549 | ||
diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c index c39c1bc13016..144c32d37136 100644 --- a/drivers/gpu/drm/radeon/r600_cs.c +++ b/drivers/gpu/drm/radeon/r600_cs.c | |||
@@ -585,7 +585,7 @@ static int r600_cs_packet_parse_vline(struct radeon_cs_parser *p) | |||
585 | header = radeon_get_ib_value(p, h_idx); | 585 | header = radeon_get_ib_value(p, h_idx); |
586 | crtc_id = radeon_get_ib_value(p, h_idx + 2 + 7 + 1); | 586 | crtc_id = radeon_get_ib_value(p, h_idx + 2 + 7 + 1); |
587 | reg = CP_PACKET0_GET_REG(header); | 587 | reg = CP_PACKET0_GET_REG(header); |
588 | mutex_lock(&p->rdev->ddev->mode_config.mutex); | 588 | |
589 | obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC); | 589 | obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC); |
590 | if (!obj) { | 590 | if (!obj) { |
591 | DRM_ERROR("cannot find crtc %d\n", crtc_id); | 591 | DRM_ERROR("cannot find crtc %d\n", crtc_id); |
@@ -620,7 +620,6 @@ static int r600_cs_packet_parse_vline(struct radeon_cs_parser *p) | |||
620 | ib[h_idx + 4] = AVIVO_D2MODE_VLINE_STATUS >> 2; | 620 | ib[h_idx + 4] = AVIVO_D2MODE_VLINE_STATUS >> 2; |
621 | } | 621 | } |
622 | out: | 622 | out: |
623 | mutex_unlock(&p->rdev->ddev->mode_config.mutex); | ||
624 | return r; | 623 | return r; |
625 | } | 624 | } |
626 | 625 | ||
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index ab61aaa887bb..2f94dc66c183 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
@@ -351,6 +351,7 @@ struct radeon_mc { | |||
351 | int vram_mtrr; | 351 | int vram_mtrr; |
352 | bool vram_is_ddr; | 352 | bool vram_is_ddr; |
353 | bool igp_sideport_enabled; | 353 | bool igp_sideport_enabled; |
354 | u64 gtt_base_align; | ||
354 | }; | 355 | }; |
355 | 356 | ||
356 | bool radeon_combios_sideport_present(struct radeon_device *rdev); | 357 | bool radeon_combios_sideport_present(struct radeon_device *rdev); |
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index 99bd8a9c56b3..10673ae59cfa 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c | |||
@@ -280,6 +280,15 @@ static bool radeon_atom_apply_quirks(struct drm_device *dev, | |||
280 | } | 280 | } |
281 | } | 281 | } |
282 | 282 | ||
283 | /* ASUS HD 3600 board lists the DVI port as HDMI */ | ||
284 | if ((dev->pdev->device == 0x9598) && | ||
285 | (dev->pdev->subsystem_vendor == 0x1043) && | ||
286 | (dev->pdev->subsystem_device == 0x01e4)) { | ||
287 | if (*connector_type == DRM_MODE_CONNECTOR_HDMIA) { | ||
288 | *connector_type = DRM_MODE_CONNECTOR_DVII; | ||
289 | } | ||
290 | } | ||
291 | |||
283 | /* ASUS HD 3450 board lists the DVI port as HDMI */ | 292 | /* ASUS HD 3450 board lists the DVI port as HDMI */ |
284 | if ((dev->pdev->device == 0x95C5) && | 293 | if ((dev->pdev->device == 0x95C5) && |
285 | (dev->pdev->subsystem_vendor == 0x1043) && | 294 | (dev->pdev->subsystem_vendor == 0x1043) && |
@@ -1029,8 +1038,15 @@ bool radeon_atombios_sideport_present(struct radeon_device *rdev) | |||
1029 | data_offset); | 1038 | data_offset); |
1030 | switch (crev) { | 1039 | switch (crev) { |
1031 | case 1: | 1040 | case 1: |
1032 | if (igp_info->info.ucMemoryType & 0xf0) | 1041 | /* AMD IGPS */ |
1033 | return true; | 1042 | if ((rdev->family == CHIP_RS690) || |
1043 | (rdev->family == CHIP_RS740)) { | ||
1044 | if (igp_info->info.ulBootUpMemoryClock) | ||
1045 | return true; | ||
1046 | } else { | ||
1047 | if (igp_info->info.ucMemoryType & 0xf0) | ||
1048 | return true; | ||
1049 | } | ||
1034 | break; | 1050 | break; |
1035 | case 2: | 1051 | case 2: |
1036 | if (igp_info->info_2.ucMemoryType & 0x0f) | 1052 | if (igp_info->info_2.ucMemoryType & 0x0f) |
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c index d1c1d8dd93ce..2417d7b06fdb 100644 --- a/drivers/gpu/drm/radeon/radeon_combios.c +++ b/drivers/gpu/drm/radeon/radeon_combios.c | |||
@@ -3050,6 +3050,14 @@ void radeon_combios_asic_init(struct drm_device *dev) | |||
3050 | rdev->pdev->subsystem_device == 0x308b) | 3050 | rdev->pdev->subsystem_device == 0x308b) |
3051 | return; | 3051 | return; |
3052 | 3052 | ||
3053 | /* quirk for rs4xx HP dv5000 laptop to make it resume | ||
3054 | * - it hangs on resume inside the dynclk 1 table. | ||
3055 | */ | ||
3056 | if (rdev->family == CHIP_RS480 && | ||
3057 | rdev->pdev->subsystem_vendor == 0x103c && | ||
3058 | rdev->pdev->subsystem_device == 0x30a4) | ||
3059 | return; | ||
3060 | |||
3053 | /* DYN CLK 1 */ | 3061 | /* DYN CLK 1 */ |
3054 | table = combios_get_table_offset(dev, COMBIOS_DYN_CLK_1_TABLE); | 3062 | table = combios_get_table_offset(dev, COMBIOS_DYN_CLK_1_TABLE); |
3055 | if (table) | 3063 | if (table) |
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index f58f8bd8f77b..adccbc2c202c 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c | |||
@@ -771,14 +771,14 @@ static enum drm_connector_status radeon_dvi_detect(struct drm_connector *connect | |||
771 | } else | 771 | } else |
772 | ret = connector_status_connected; | 772 | ret = connector_status_connected; |
773 | 773 | ||
774 | /* multiple connectors on the same encoder with the same ddc line | 774 | /* This gets complicated. We have boards with VGA + HDMI with a |
775 | * This tends to be HDMI and DVI on the same encoder with the | 775 | * shared DDC line and we have boards with DVI-D + HDMI with a shared |
776 | * same ddc line. If the edid says HDMI, consider the HDMI port | 776 | * DDC line. The latter is more complex because with DVI<->HDMI adapters |
777 | * connected and the DVI port disconnected. If the edid doesn't | 777 | * you don't really know what's connected to which port as both are digital. |
778 | * say HDMI, vice versa. | ||
779 | */ | 778 | */ |
780 | if (radeon_connector->shared_ddc && (ret == connector_status_connected)) { | 779 | if (radeon_connector->shared_ddc && (ret == connector_status_connected)) { |
781 | struct drm_device *dev = connector->dev; | 780 | struct drm_device *dev = connector->dev; |
781 | struct radeon_device *rdev = dev->dev_private; | ||
782 | struct drm_connector *list_connector; | 782 | struct drm_connector *list_connector; |
783 | struct radeon_connector *list_radeon_connector; | 783 | struct radeon_connector *list_radeon_connector; |
784 | list_for_each_entry(list_connector, &dev->mode_config.connector_list, head) { | 784 | list_for_each_entry(list_connector, &dev->mode_config.connector_list, head) { |
@@ -788,15 +788,10 @@ static enum drm_connector_status radeon_dvi_detect(struct drm_connector *connect | |||
788 | if (list_radeon_connector->shared_ddc && | 788 | if (list_radeon_connector->shared_ddc && |
789 | (list_radeon_connector->ddc_bus->rec.i2c_id == | 789 | (list_radeon_connector->ddc_bus->rec.i2c_id == |
790 | radeon_connector->ddc_bus->rec.i2c_id)) { | 790 | radeon_connector->ddc_bus->rec.i2c_id)) { |
791 | if (drm_detect_hdmi_monitor(radeon_connector->edid)) { | 791 | /* cases where both connectors are digital */ |
792 | if (connector->connector_type == DRM_MODE_CONNECTOR_DVID) { | 792 | if (list_connector->connector_type != DRM_MODE_CONNECTOR_VGA) { |
793 | kfree(radeon_connector->edid); | 793 | /* hpd is our only option in this case */ |
794 | radeon_connector->edid = NULL; | 794 | if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) { |
795 | ret = connector_status_disconnected; | ||
796 | } | ||
797 | } else { | ||
798 | if ((connector->connector_type == DRM_MODE_CONNECTOR_HDMIA) || | ||
799 | (connector->connector_type == DRM_MODE_CONNECTOR_HDMIB)) { | ||
800 | kfree(radeon_connector->edid); | 795 | kfree(radeon_connector->edid); |
801 | radeon_connector->edid = NULL; | 796 | radeon_connector->edid = NULL; |
802 | ret = connector_status_disconnected; | 797 | ret = connector_status_disconnected; |
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index 5f317317aba2..dd279da90546 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c | |||
@@ -226,20 +226,20 @@ void radeon_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc) | |||
226 | { | 226 | { |
227 | u64 size_af, size_bf; | 227 | u64 size_af, size_bf; |
228 | 228 | ||
229 | size_af = 0xFFFFFFFF - mc->vram_end; | 229 | size_af = ((0xFFFFFFFF - mc->vram_end) + mc->gtt_base_align) & ~mc->gtt_base_align; |
230 | size_bf = mc->vram_start; | 230 | size_bf = mc->vram_start & ~mc->gtt_base_align; |
231 | if (size_bf > size_af) { | 231 | if (size_bf > size_af) { |
232 | if (mc->gtt_size > size_bf) { | 232 | if (mc->gtt_size > size_bf) { |
233 | dev_warn(rdev->dev, "limiting GTT\n"); | 233 | dev_warn(rdev->dev, "limiting GTT\n"); |
234 | mc->gtt_size = size_bf; | 234 | mc->gtt_size = size_bf; |
235 | } | 235 | } |
236 | mc->gtt_start = mc->vram_start - mc->gtt_size; | 236 | mc->gtt_start = (mc->vram_start & ~mc->gtt_base_align) - mc->gtt_size; |
237 | } else { | 237 | } else { |
238 | if (mc->gtt_size > size_af) { | 238 | if (mc->gtt_size > size_af) { |
239 | dev_warn(rdev->dev, "limiting GTT\n"); | 239 | dev_warn(rdev->dev, "limiting GTT\n"); |
240 | mc->gtt_size = size_af; | 240 | mc->gtt_size = size_af; |
241 | } | 241 | } |
242 | mc->gtt_start = mc->vram_end + 1; | 242 | mc->gtt_start = (mc->vram_end + 1 + mc->gtt_base_align) & ~mc->gtt_base_align; |
243 | } | 243 | } |
244 | mc->gtt_end = mc->gtt_start + mc->gtt_size - 1; | 244 | mc->gtt_end = mc->gtt_start + mc->gtt_size - 1; |
245 | dev_info(rdev->dev, "GTT: %lluM 0x%08llX - 0x%08llX\n", | 245 | dev_info(rdev->dev, "GTT: %lluM 0x%08llX - 0x%08llX\n", |
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c index 6a70c0dc7f92..ab389f89fa8d 100644 --- a/drivers/gpu/drm/radeon/radeon_kms.c +++ b/drivers/gpu/drm/radeon/radeon_kms.c | |||
@@ -128,7 +128,8 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) | |||
128 | for (i = 0, found = 0; i < rdev->num_crtc; i++) { | 128 | for (i = 0, found = 0; i < rdev->num_crtc; i++) { |
129 | crtc = (struct drm_crtc *)minfo->crtcs[i]; | 129 | crtc = (struct drm_crtc *)minfo->crtcs[i]; |
130 | if (crtc && crtc->base.id == value) { | 130 | if (crtc && crtc->base.id == value) { |
131 | value = i; | 131 | struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); |
132 | value = radeon_crtc->crtc_id; | ||
132 | found = 1; | 133 | found = 1; |
133 | break; | 134 | break; |
134 | } | 135 | } |
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c index bad77f40a9da..5688a0cf6bbe 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c | |||
@@ -108,6 +108,7 @@ static void radeon_legacy_lvds_dpms(struct drm_encoder *encoder, int mode) | |||
108 | udelay(panel_pwr_delay * 1000); | 108 | udelay(panel_pwr_delay * 1000); |
109 | WREG32(RADEON_LVDS_GEN_CNTL, lvds_gen_cntl); | 109 | WREG32(RADEON_LVDS_GEN_CNTL, lvds_gen_cntl); |
110 | WREG32_PLL(RADEON_PIXCLKS_CNTL, pixclks_cntl); | 110 | WREG32_PLL(RADEON_PIXCLKS_CNTL, pixclks_cntl); |
111 | udelay(panel_pwr_delay * 1000); | ||
111 | break; | 112 | break; |
112 | } | 113 | } |
113 | 114 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_tv.c b/drivers/gpu/drm/radeon/radeon_legacy_tv.c index f2ed27c8055b..032040397743 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_tv.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_tv.c | |||
@@ -642,8 +642,8 @@ void radeon_legacy_tv_mode_set(struct drm_encoder *encoder, | |||
642 | } | 642 | } |
643 | flicker_removal = (tmp + 500) / 1000; | 643 | flicker_removal = (tmp + 500) / 1000; |
644 | 644 | ||
645 | if (flicker_removal < 2) | 645 | if (flicker_removal < 3) |
646 | flicker_removal = 2; | 646 | flicker_removal = 3; |
647 | for (i = 0; i < ARRAY_SIZE(SLOPE_limit); ++i) { | 647 | for (i = 0; i < ARRAY_SIZE(SLOPE_limit); ++i) { |
648 | if (flicker_removal == SLOPE_limit[i]) | 648 | if (flicker_removal == SLOPE_limit[i]) |
649 | break; | 649 | break; |
diff --git a/drivers/gpu/drm/radeon/rs400.c b/drivers/gpu/drm/radeon/rs400.c index 9e4240b3bf0b..f454c9a5e7f2 100644 --- a/drivers/gpu/drm/radeon/rs400.c +++ b/drivers/gpu/drm/radeon/rs400.c | |||
@@ -57,7 +57,9 @@ void rs400_gart_adjust_size(struct radeon_device *rdev) | |||
57 | } | 57 | } |
58 | if (rdev->family == CHIP_RS400 || rdev->family == CHIP_RS480) { | 58 | if (rdev->family == CHIP_RS400 || rdev->family == CHIP_RS480) { |
59 | /* FIXME: RS400 & RS480 seems to have issue with GART size | 59 | /* FIXME: RS400 & RS480 seems to have issue with GART size |
60 | * if 4G of system memory (needs more testing) */ | 60 | * if 4G of system memory (needs more testing) |
61 | */ | ||
62 | /* XXX is this still an issue with proper alignment? */ | ||
61 | rdev->mc.gtt_size = 32 * 1024 * 1024; | 63 | rdev->mc.gtt_size = 32 * 1024 * 1024; |
62 | DRM_ERROR("Forcing to 32M GART size (because of ASIC bug ?)\n"); | 64 | DRM_ERROR("Forcing to 32M GART size (because of ASIC bug ?)\n"); |
63 | } | 65 | } |
@@ -263,6 +265,7 @@ void rs400_mc_init(struct radeon_device *rdev) | |||
263 | r100_vram_init_sizes(rdev); | 265 | r100_vram_init_sizes(rdev); |
264 | base = (RREG32(RADEON_NB_TOM) & 0xffff) << 16; | 266 | base = (RREG32(RADEON_NB_TOM) & 0xffff) << 16; |
265 | radeon_vram_location(rdev, &rdev->mc, base); | 267 | radeon_vram_location(rdev, &rdev->mc, base); |
268 | rdev->mc.gtt_base_align = rdev->mc.gtt_size - 1; | ||
266 | radeon_gtt_location(rdev, &rdev->mc); | 269 | radeon_gtt_location(rdev, &rdev->mc); |
267 | radeon_update_bandwidth_info(rdev); | 270 | radeon_update_bandwidth_info(rdev); |
268 | } | 271 | } |
diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c index 7bb4c3e52f3b..6dc15ea8ba33 100644 --- a/drivers/gpu/drm/radeon/rs600.c +++ b/drivers/gpu/drm/radeon/rs600.c | |||
@@ -698,6 +698,7 @@ void rs600_mc_init(struct radeon_device *rdev) | |||
698 | base = G_000004_MC_FB_START(base) << 16; | 698 | base = G_000004_MC_FB_START(base) << 16; |
699 | rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev); | 699 | rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev); |
700 | radeon_vram_location(rdev, &rdev->mc, base); | 700 | radeon_vram_location(rdev, &rdev->mc, base); |
701 | rdev->mc.gtt_base_align = 0; | ||
701 | radeon_gtt_location(rdev, &rdev->mc); | 702 | radeon_gtt_location(rdev, &rdev->mc); |
702 | radeon_update_bandwidth_info(rdev); | 703 | radeon_update_bandwidth_info(rdev); |
703 | } | 704 | } |
diff --git a/drivers/gpu/drm/radeon/rs690.c b/drivers/gpu/drm/radeon/rs690.c index f4f0a61bcdce..ce4ecbe10816 100644 --- a/drivers/gpu/drm/radeon/rs690.c +++ b/drivers/gpu/drm/radeon/rs690.c | |||
@@ -162,6 +162,7 @@ void rs690_mc_init(struct radeon_device *rdev) | |||
162 | rs690_pm_info(rdev); | 162 | rs690_pm_info(rdev); |
163 | rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev); | 163 | rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev); |
164 | radeon_vram_location(rdev, &rdev->mc, base); | 164 | radeon_vram_location(rdev, &rdev->mc, base); |
165 | rdev->mc.gtt_base_align = rdev->mc.gtt_size - 1; | ||
165 | radeon_gtt_location(rdev, &rdev->mc); | 166 | radeon_gtt_location(rdev, &rdev->mc); |
166 | radeon_update_bandwidth_info(rdev); | 167 | radeon_update_bandwidth_info(rdev); |
167 | } | 168 | } |
diff --git a/drivers/gpu/drm/radeon/rv515.c b/drivers/gpu/drm/radeon/rv515.c index 7d9a7b0a180a..0c9c169a6852 100644 --- a/drivers/gpu/drm/radeon/rv515.c +++ b/drivers/gpu/drm/radeon/rv515.c | |||
@@ -195,6 +195,7 @@ void rv515_mc_init(struct radeon_device *rdev) | |||
195 | rv515_vram_get_type(rdev); | 195 | rv515_vram_get_type(rdev); |
196 | r100_vram_init_sizes(rdev); | 196 | r100_vram_init_sizes(rdev); |
197 | radeon_vram_location(rdev, &rdev->mc, 0); | 197 | radeon_vram_location(rdev, &rdev->mc, 0); |
198 | rdev->mc.gtt_base_align = 0; | ||
198 | if (!(rdev->flags & RADEON_IS_AGP)) | 199 | if (!(rdev->flags & RADEON_IS_AGP)) |
199 | radeon_gtt_location(rdev, &rdev->mc); | 200 | radeon_gtt_location(rdev, &rdev->mc); |
200 | radeon_update_bandwidth_info(rdev); | 201 | radeon_update_bandwidth_info(rdev); |
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index b1d67dc973dc..ca904799f018 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c | |||
@@ -40,11 +40,13 @@ | |||
40 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
41 | 41 | ||
42 | #include <asm/atomic.h> | 42 | #include <asm/atomic.h> |
43 | #include <asm/agp.h> | ||
44 | 43 | ||
45 | #include "ttm/ttm_bo_driver.h" | 44 | #include "ttm/ttm_bo_driver.h" |
46 | #include "ttm/ttm_page_alloc.h" | 45 | #include "ttm/ttm_page_alloc.h" |
47 | 46 | ||
47 | #ifdef TTM_HAS_AGP | ||
48 | #include <asm/agp.h> | ||
49 | #endif | ||
48 | 50 | ||
49 | #define NUM_PAGES_TO_ALLOC (PAGE_SIZE/sizeof(struct page *)) | 51 | #define NUM_PAGES_TO_ALLOC (PAGE_SIZE/sizeof(struct page *)) |
50 | #define SMALL_ALLOCATION 16 | 52 | #define SMALL_ALLOCATION 16 |
@@ -392,7 +394,7 @@ static int ttm_pool_get_num_unused_pages(void) | |||
392 | /** | 394 | /** |
393 | * Callback for mm to request pool to reduce number of page held. | 395 | * Callback for mm to request pool to reduce number of page held. |
394 | */ | 396 | */ |
395 | static int ttm_pool_mm_shrink(int shrink_pages, gfp_t gfp_mask) | 397 | static int ttm_pool_mm_shrink(struct shrinker *shrink, int shrink_pages, gfp_t gfp_mask) |
396 | { | 398 | { |
397 | static atomic_t start_pool = ATOMIC_INIT(0); | 399 | static atomic_t start_pool = ATOMIC_INIT(0); |
398 | unsigned i; | 400 | unsigned i; |
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index f1d626112415..437ac786277a 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | |||
@@ -972,6 +972,7 @@ int vmw_kms_update_layout_ioctl(struct drm_device *dev, void *data, | |||
972 | ret = copy_from_user(rects, user_rects, rects_size); | 972 | ret = copy_from_user(rects, user_rects, rects_size); |
973 | if (unlikely(ret != 0)) { | 973 | if (unlikely(ret != 0)) { |
974 | DRM_ERROR("Failed to get rects.\n"); | 974 | DRM_ERROR("Failed to get rects.\n"); |
975 | ret = -EFAULT; | ||
975 | goto out_free; | 976 | goto out_free; |
976 | } | 977 | } |
977 | 978 | ||
diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c index fbd62abb66f9..0ffaf2c77a19 100644 --- a/drivers/input/joystick/gamecon.c +++ b/drivers/input/joystick/gamecon.c | |||
@@ -89,7 +89,6 @@ struct gc_pad { | |||
89 | struct gc { | 89 | struct gc { |
90 | struct pardevice *pd; | 90 | struct pardevice *pd; |
91 | struct gc_pad pads[GC_MAX_DEVICES]; | 91 | struct gc_pad pads[GC_MAX_DEVICES]; |
92 | struct input_dev *dev[GC_MAX_DEVICES]; | ||
93 | struct timer_list timer; | 92 | struct timer_list timer; |
94 | int pad_count[GC_MAX]; | 93 | int pad_count[GC_MAX]; |
95 | int used; | 94 | int used; |
@@ -387,7 +386,7 @@ static void gc_nes_process_packet(struct gc *gc) | |||
387 | for (i = 0; i < GC_MAX_DEVICES; i++) { | 386 | for (i = 0; i < GC_MAX_DEVICES; i++) { |
388 | 387 | ||
389 | pad = &gc->pads[i]; | 388 | pad = &gc->pads[i]; |
390 | dev = gc->dev[i]; | 389 | dev = pad->dev; |
391 | s = gc_status_bit[i]; | 390 | s = gc_status_bit[i]; |
392 | 391 | ||
393 | switch (pad->type) { | 392 | switch (pad->type) { |
@@ -579,7 +578,7 @@ static void gc_psx_command(struct gc *gc, int b, unsigned char *data) | |||
579 | read = parport_read_status(port) ^ 0x80; | 578 | read = parport_read_status(port) ^ 0x80; |
580 | 579 | ||
581 | for (j = 0; j < GC_MAX_DEVICES; j++) { | 580 | for (j = 0; j < GC_MAX_DEVICES; j++) { |
582 | struct gc_pad *pad = &gc->pads[i]; | 581 | struct gc_pad *pad = &gc->pads[j]; |
583 | 582 | ||
584 | if (pad->type == GC_PSX || pad->type == GC_DDR) | 583 | if (pad->type == GC_PSX || pad->type == GC_DDR) |
585 | data[j] |= (read & gc_status_bit[j]) ? (1 << i) : 0; | 584 | data[j] |= (read & gc_status_bit[j]) ? (1 << i) : 0; |
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index 0f9a4785d798..1ba25145b333 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig | |||
@@ -69,11 +69,11 @@ config KEYBOARD_ATARI | |||
69 | module will be called atakbd. | 69 | module will be called atakbd. |
70 | 70 | ||
71 | config KEYBOARD_ATKBD | 71 | config KEYBOARD_ATKBD |
72 | tristate "AT keyboard" if EMBEDDED || !X86 || X86_MRST | 72 | tristate "AT keyboard" if EMBEDDED || !X86 |
73 | default y | 73 | default y |
74 | select SERIO | 74 | select SERIO |
75 | select SERIO_LIBPS2 | 75 | select SERIO_LIBPS2 |
76 | select SERIO_I8042 if X86 && !X86_MRST | 76 | select SERIO_I8042 if X86 |
77 | select SERIO_GSCPS2 if GSC | 77 | select SERIO_GSCPS2 if GSC |
78 | help | 78 | help |
79 | Say Y here if you want to use a standard AT or PS/2 keyboard. Usually | 79 | Say Y here if you want to use a standard AT or PS/2 keyboard. Usually |
@@ -124,7 +124,7 @@ config KEYBOARD_ATKBD_RDI_KEYCODES | |||
124 | right-hand column will be interpreted as the key shown in the | 124 | right-hand column will be interpreted as the key shown in the |
125 | left-hand column. | 125 | left-hand column. |
126 | 126 | ||
127 | config QT2160 | 127 | config KEYBOARD_QT2160 |
128 | tristate "Atmel AT42QT2160 Touch Sensor Chip" | 128 | tristate "Atmel AT42QT2160 Touch Sensor Chip" |
129 | depends on I2C && EXPERIMENTAL | 129 | depends on I2C && EXPERIMENTAL |
130 | help | 130 | help |
diff --git a/drivers/input/keyboard/twl4030_keypad.c b/drivers/input/keyboard/twl4030_keypad.c index 7aa59e07b689..fb16b5e5ea13 100644 --- a/drivers/input/keyboard/twl4030_keypad.c +++ b/drivers/input/keyboard/twl4030_keypad.c | |||
@@ -51,8 +51,12 @@ | |||
51 | */ | 51 | */ |
52 | #define TWL4030_MAX_ROWS 8 /* TWL4030 hard limit */ | 52 | #define TWL4030_MAX_ROWS 8 /* TWL4030 hard limit */ |
53 | #define TWL4030_MAX_COLS 8 | 53 | #define TWL4030_MAX_COLS 8 |
54 | #define TWL4030_ROW_SHIFT 3 | 54 | /* |
55 | #define TWL4030_KEYMAP_SIZE (TWL4030_MAX_ROWS * TWL4030_MAX_COLS) | 55 | * Note that we add space for an extra column so that we can handle |
56 | * row lines connected to the gnd (see twl4030_col_xlate()). | ||
57 | */ | ||
58 | #define TWL4030_ROW_SHIFT 4 | ||
59 | #define TWL4030_KEYMAP_SIZE (TWL4030_MAX_ROWS << TWL4030_ROW_SHIFT) | ||
56 | 60 | ||
57 | struct twl4030_keypad { | 61 | struct twl4030_keypad { |
58 | unsigned short keymap[TWL4030_KEYMAP_SIZE]; | 62 | unsigned short keymap[TWL4030_KEYMAP_SIZE]; |
@@ -182,7 +186,7 @@ static int twl4030_read_kp_matrix_state(struct twl4030_keypad *kp, u16 *state) | |||
182 | return ret; | 186 | return ret; |
183 | } | 187 | } |
184 | 188 | ||
185 | static int twl4030_is_in_ghost_state(struct twl4030_keypad *kp, u16 *key_state) | 189 | static bool twl4030_is_in_ghost_state(struct twl4030_keypad *kp, u16 *key_state) |
186 | { | 190 | { |
187 | int i; | 191 | int i; |
188 | u16 check = 0; | 192 | u16 check = 0; |
@@ -191,12 +195,12 @@ static int twl4030_is_in_ghost_state(struct twl4030_keypad *kp, u16 *key_state) | |||
191 | u16 col = key_state[i]; | 195 | u16 col = key_state[i]; |
192 | 196 | ||
193 | if ((col & check) && hweight16(col) > 1) | 197 | if ((col & check) && hweight16(col) > 1) |
194 | return 1; | 198 | return true; |
195 | 199 | ||
196 | check |= col; | 200 | check |= col; |
197 | } | 201 | } |
198 | 202 | ||
199 | return 0; | 203 | return false; |
200 | } | 204 | } |
201 | 205 | ||
202 | static void twl4030_kp_scan(struct twl4030_keypad *kp, bool release_all) | 206 | static void twl4030_kp_scan(struct twl4030_keypad *kp, bool release_all) |
@@ -225,7 +229,8 @@ static void twl4030_kp_scan(struct twl4030_keypad *kp, bool release_all) | |||
225 | if (!changed) | 229 | if (!changed) |
226 | continue; | 230 | continue; |
227 | 231 | ||
228 | for (col = 0; col < kp->n_cols; col++) { | 232 | /* Extra column handles "all gnd" rows */ |
233 | for (col = 0; col < kp->n_cols + 1; col++) { | ||
229 | int code; | 234 | int code; |
230 | 235 | ||
231 | if (!(changed & (1 << col))) | 236 | if (!(changed & (1 << col))) |
diff --git a/drivers/input/keyboard/w90p910_keypad.c b/drivers/input/keyboard/w90p910_keypad.c index 4ef764cc493c..ee2bf6bcf291 100644 --- a/drivers/input/keyboard/w90p910_keypad.c +++ b/drivers/input/keyboard/w90p910_keypad.c | |||
@@ -258,7 +258,7 @@ static struct platform_driver w90p910_keypad_driver = { | |||
258 | .probe = w90p910_keypad_probe, | 258 | .probe = w90p910_keypad_probe, |
259 | .remove = __devexit_p(w90p910_keypad_remove), | 259 | .remove = __devexit_p(w90p910_keypad_remove), |
260 | .driver = { | 260 | .driver = { |
261 | .name = "nuc900-keypad", | 261 | .name = "nuc900-kpi", |
262 | .owner = THIS_MODULE, | 262 | .owner = THIS_MODULE, |
263 | }, | 263 | }, |
264 | }; | 264 | }; |
diff --git a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig index eeb58c1cac16..c714ca2407f8 100644 --- a/drivers/input/mouse/Kconfig +++ b/drivers/input/mouse/Kconfig | |||
@@ -17,7 +17,7 @@ config MOUSE_PS2 | |||
17 | default y | 17 | default y |
18 | select SERIO | 18 | select SERIO |
19 | select SERIO_LIBPS2 | 19 | select SERIO_LIBPS2 |
20 | select SERIO_I8042 if X86 && !X86_MRST | 20 | select SERIO_I8042 if X86 |
21 | select SERIO_GSCPS2 if GSC | 21 | select SERIO_GSCPS2 if GSC |
22 | help | 22 | help |
23 | Say Y here if you have a PS/2 mouse connected to your system. This | 23 | Say Y here if you have a PS/2 mouse connected to your system. This |
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 40cea334ad13..705589dc9ac5 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c | |||
@@ -141,8 +141,13 @@ static int synaptics_capability(struct psmouse *psmouse) | |||
141 | priv->capabilities = (cap[0] << 16) | (cap[1] << 8) | cap[2]; | 141 | priv->capabilities = (cap[0] << 16) | (cap[1] << 8) | cap[2]; |
142 | priv->ext_cap = priv->ext_cap_0c = 0; | 142 | priv->ext_cap = priv->ext_cap_0c = 0; |
143 | 143 | ||
144 | if (!SYN_CAP_VALID(priv->capabilities)) | 144 | /* |
145 | * Older firmwares had submodel ID fixed to 0x47 | ||
146 | */ | ||
147 | if (SYN_ID_FULL(priv->identity) < 0x705 && | ||
148 | SYN_CAP_SUBMODEL_ID(priv->capabilities) != 0x47) { | ||
145 | return -1; | 149 | return -1; |
150 | } | ||
146 | 151 | ||
147 | /* | 152 | /* |
148 | * Unless capExtended is set the rest of the flags should be ignored | 153 | * Unless capExtended is set the rest of the flags should be ignored |
@@ -206,6 +211,7 @@ static int synaptics_resolution(struct psmouse *psmouse) | |||
206 | unsigned char max[3]; | 211 | unsigned char max[3]; |
207 | 212 | ||
208 | if (SYN_ID_MAJOR(priv->identity) < 4) | 213 | if (SYN_ID_MAJOR(priv->identity) < 4) |
214 | return 0; | ||
209 | 215 | ||
210 | if (synaptics_send_cmd(psmouse, SYN_QUE_RESOLUTION, res) == 0) { | 216 | if (synaptics_send_cmd(psmouse, SYN_QUE_RESOLUTION, res) == 0) { |
211 | if (res[0] != 0 && (res[1] & 0x80) && res[2] != 0) { | 217 | if (res[0] != 0 && (res[1] & 0x80) && res[2] != 0) { |
diff --git a/drivers/input/mouse/synaptics.h b/drivers/input/mouse/synaptics.h index 7d4d5e12c0df..b6aa7d20d8a3 100644 --- a/drivers/input/mouse/synaptics.h +++ b/drivers/input/mouse/synaptics.h | |||
@@ -47,7 +47,7 @@ | |||
47 | #define SYN_CAP_FOUR_BUTTON(c) ((c) & (1 << 3)) | 47 | #define SYN_CAP_FOUR_BUTTON(c) ((c) & (1 << 3)) |
48 | #define SYN_CAP_MULTIFINGER(c) ((c) & (1 << 1)) | 48 | #define SYN_CAP_MULTIFINGER(c) ((c) & (1 << 1)) |
49 | #define SYN_CAP_PALMDETECT(c) ((c) & (1 << 0)) | 49 | #define SYN_CAP_PALMDETECT(c) ((c) & (1 << 0)) |
50 | #define SYN_CAP_VALID(c) ((((c) & 0x00ff00) >> 8) == 0x47) | 50 | #define SYN_CAP_SUBMODEL_ID(c) (((c) & 0x00ff00) >> 8) |
51 | #define SYN_EXT_CAP_REQUESTS(c) (((c) & 0x700000) >> 20) | 51 | #define SYN_EXT_CAP_REQUESTS(c) (((c) & 0x700000) >> 20) |
52 | #define SYN_CAP_MULTI_BUTTON_NO(ec) (((ec) & 0x00f000) >> 12) | 52 | #define SYN_CAP_MULTI_BUTTON_NO(ec) (((ec) & 0x00f000) >> 12) |
53 | #define SYN_CAP_PRODUCT_ID(ec) (((ec) & 0xff0000) >> 16) | 53 | #define SYN_CAP_PRODUCT_ID(ec) (((ec) & 0xff0000) >> 16) |
@@ -66,6 +66,7 @@ | |||
66 | #define SYN_ID_MODEL(i) (((i) >> 4) & 0x0f) | 66 | #define SYN_ID_MODEL(i) (((i) >> 4) & 0x0f) |
67 | #define SYN_ID_MAJOR(i) ((i) & 0x0f) | 67 | #define SYN_ID_MAJOR(i) ((i) & 0x0f) |
68 | #define SYN_ID_MINOR(i) (((i) >> 16) & 0xff) | 68 | #define SYN_ID_MINOR(i) (((i) >> 16) & 0xff) |
69 | #define SYN_ID_FULL(i) ((SYN_ID_MAJOR(i) << 8) | SYN_ID_MINOR(i)) | ||
69 | #define SYN_ID_IS_SYNAPTICS(i) ((((i) >> 8) & 0xff) == 0x47) | 70 | #define SYN_ID_IS_SYNAPTICS(i) ((((i) >> 8) & 0xff) == 0x47) |
70 | 71 | ||
71 | /* synaptics special commands */ | 72 | /* synaptics special commands */ |
diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig index 256b9e9394dc..3bfe8fafc6ad 100644 --- a/drivers/input/serio/Kconfig +++ b/drivers/input/serio/Kconfig | |||
@@ -22,7 +22,7 @@ config SERIO_I8042 | |||
22 | tristate "i8042 PC Keyboard controller" if EMBEDDED || !X86 | 22 | tristate "i8042 PC Keyboard controller" if EMBEDDED || !X86 |
23 | default y | 23 | default y |
24 | depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && \ | 24 | depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && \ |
25 | (!SUPERH || SH_CAYMAN) && !M68K && !BLACKFIN && !X86_MRST | 25 | (!SUPERH || SH_CAYMAN) && !M68K && !BLACKFIN |
26 | help | 26 | help |
27 | i8042 is the chip over which the standard AT keyboard and PS/2 | 27 | i8042 is the chip over which the standard AT keyboard and PS/2 |
28 | mouse are connected to the computer. If you use these devices, | 28 | mouse are connected to the computer. If you use these devices, |
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index 6168469ad1a6..ed7ad7416b24 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
@@ -7,6 +7,10 @@ | |||
7 | * the Free Software Foundation. | 7 | * the Free Software Foundation. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #ifdef CONFIG_X86 | ||
11 | #include <asm/x86_init.h> | ||
12 | #endif | ||
13 | |||
10 | /* | 14 | /* |
11 | * Names. | 15 | * Names. |
12 | */ | 16 | */ |
@@ -166,6 +170,13 @@ static const struct dmi_system_id __initconst i8042_dmi_noloop_table[] = { | |||
166 | }, | 170 | }, |
167 | }, | 171 | }, |
168 | { | 172 | { |
173 | /* Gigabyte Spring Peak - defines wrong chassis type */ | ||
174 | .matches = { | ||
175 | DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"), | ||
176 | DMI_MATCH(DMI_PRODUCT_NAME, "Spring Peak"), | ||
177 | }, | ||
178 | }, | ||
179 | { | ||
169 | .matches = { | 180 | .matches = { |
170 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | 181 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), |
171 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv9700"), | 182 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv9700"), |
@@ -840,6 +851,12 @@ static int __init i8042_platform_init(void) | |||
840 | { | 851 | { |
841 | int retval; | 852 | int retval; |
842 | 853 | ||
854 | #ifdef CONFIG_X86 | ||
855 | /* Just return if pre-detection shows no i8042 controller exist */ | ||
856 | if (!x86_platform.i8042_detect()) | ||
857 | return -ENODEV; | ||
858 | #endif | ||
859 | |||
843 | /* | 860 | /* |
844 | * On ix86 platforms touching the i8042 data register region can do really | 861 | * On ix86 platforms touching the i8042 data register region can do really |
845 | * bad things. Because of this the region is always reserved on ix86 boxes. | 862 | * bad things. Because of this the region is always reserved on ix86 boxes. |
diff --git a/drivers/input/touchscreen/w90p910_ts.c b/drivers/input/touchscreen/w90p910_ts.c index cc18265be1a8..7a45d68c3516 100644 --- a/drivers/input/touchscreen/w90p910_ts.c +++ b/drivers/input/touchscreen/w90p910_ts.c | |||
@@ -233,7 +233,7 @@ static int __devinit w90x900ts_probe(struct platform_device *pdev) | |||
233 | w90p910_ts->state = TS_IDLE; | 233 | w90p910_ts->state = TS_IDLE; |
234 | spin_lock_init(&w90p910_ts->lock); | 234 | spin_lock_init(&w90p910_ts->lock); |
235 | setup_timer(&w90p910_ts->timer, w90p910_check_pen_up, | 235 | setup_timer(&w90p910_ts->timer, w90p910_check_pen_up, |
236 | (unsigned long)&w90p910_ts); | 236 | (unsigned long)w90p910_ts); |
237 | 237 | ||
238 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 238 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
239 | if (!res) { | 239 | if (!res) { |
diff --git a/drivers/misc/cs5535-mfgpt.c b/drivers/misc/cs5535-mfgpt.c index 9bec24db4d41..2d44b3300104 100644 --- a/drivers/misc/cs5535-mfgpt.c +++ b/drivers/misc/cs5535-mfgpt.c | |||
@@ -366,6 +366,6 @@ static int __init cs5535_mfgpt_init(void) | |||
366 | 366 | ||
367 | module_init(cs5535_mfgpt_init); | 367 | module_init(cs5535_mfgpt_init); |
368 | 368 | ||
369 | MODULE_AUTHOR("Andres Salomon <dilinger@collabora.co.uk>"); | 369 | MODULE_AUTHOR("Andres Salomon <dilinger@queued.net>"); |
370 | MODULE_DESCRIPTION("CS5535/CS5536 MFGPT timer driver"); | 370 | MODULE_DESCRIPTION("CS5535/CS5536 MFGPT timer driver"); |
371 | MODULE_LICENSE("GPL"); | 371 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index af217924a76e..ad30f074ee15 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c | |||
@@ -365,6 +365,26 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev) | |||
365 | 365 | ||
366 | static int __devexit sdhci_s3c_remove(struct platform_device *pdev) | 366 | static int __devexit sdhci_s3c_remove(struct platform_device *pdev) |
367 | { | 367 | { |
368 | struct sdhci_host *host = platform_get_drvdata(pdev); | ||
369 | struct sdhci_s3c *sc = sdhci_priv(host); | ||
370 | int ptr; | ||
371 | |||
372 | sdhci_remove_host(host, 1); | ||
373 | |||
374 | for (ptr = 0; ptr < 3; ptr++) { | ||
375 | clk_disable(sc->clk_bus[ptr]); | ||
376 | clk_put(sc->clk_bus[ptr]); | ||
377 | } | ||
378 | clk_disable(sc->clk_io); | ||
379 | clk_put(sc->clk_io); | ||
380 | |||
381 | iounmap(host->ioaddr); | ||
382 | release_resource(sc->ioarea); | ||
383 | kfree(sc->ioarea); | ||
384 | |||
385 | sdhci_free_host(host); | ||
386 | platform_set_drvdata(pdev, NULL); | ||
387 | |||
368 | return 0; | 388 | return 0; |
369 | } | 389 | } |
370 | 390 | ||
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c index 7acb3edc47ef..2602852cc55a 100644 --- a/drivers/net/ibmveth.c +++ b/drivers/net/ibmveth.c | |||
@@ -677,7 +677,7 @@ static int ibmveth_close(struct net_device *netdev) | |||
677 | if (!adapter->pool_config) | 677 | if (!adapter->pool_config) |
678 | netif_stop_queue(netdev); | 678 | netif_stop_queue(netdev); |
679 | 679 | ||
680 | free_irq(netdev->irq, netdev); | 680 | h_vio_signal(adapter->vdev->unit_address, VIO_IRQ_DISABLE); |
681 | 681 | ||
682 | do { | 682 | do { |
683 | lpar_rc = h_free_logical_lan(adapter->vdev->unit_address); | 683 | lpar_rc = h_free_logical_lan(adapter->vdev->unit_address); |
@@ -689,6 +689,8 @@ static int ibmveth_close(struct net_device *netdev) | |||
689 | lpar_rc); | 689 | lpar_rc); |
690 | } | 690 | } |
691 | 691 | ||
692 | free_irq(netdev->irq, netdev); | ||
693 | |||
692 | adapter->rx_no_buffer = *(u64*)(((char*)adapter->buffer_list_addr) + 4096 - 8); | 694 | adapter->rx_no_buffer = *(u64*)(((char*)adapter->buffer_list_addr) + 4096 - 8); |
693 | 695 | ||
694 | ibmveth_cleanup(adapter); | 696 | ibmveth_cleanup(adapter); |
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index 5b3dfb4ab279..33525bf2a3d3 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
@@ -1168,6 +1168,7 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id) | |||
1168 | int interrupts, nr_serviced = 0, i; | 1168 | int interrupts, nr_serviced = 0, i; |
1169 | struct ei_device *ei_local; | 1169 | struct ei_device *ei_local; |
1170 | int handled = 0; | 1170 | int handled = 0; |
1171 | unsigned long flags; | ||
1171 | 1172 | ||
1172 | e8390_base = dev->base_addr; | 1173 | e8390_base = dev->base_addr; |
1173 | ei_local = netdev_priv(dev); | 1174 | ei_local = netdev_priv(dev); |
@@ -1176,7 +1177,7 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id) | |||
1176 | * Protect the irq test too. | 1177 | * Protect the irq test too. |
1177 | */ | 1178 | */ |
1178 | 1179 | ||
1179 | spin_lock(&ei_local->page_lock); | 1180 | spin_lock_irqsave(&ei_local->page_lock, flags); |
1180 | 1181 | ||
1181 | if (ei_local->irqlock) | 1182 | if (ei_local->irqlock) |
1182 | { | 1183 | { |
@@ -1188,7 +1189,7 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id) | |||
1188 | dev->name, inb_p(e8390_base + EN0_ISR), | 1189 | dev->name, inb_p(e8390_base + EN0_ISR), |
1189 | inb_p(e8390_base + EN0_IMR)); | 1190 | inb_p(e8390_base + EN0_IMR)); |
1190 | #endif | 1191 | #endif |
1191 | spin_unlock(&ei_local->page_lock); | 1192 | spin_unlock_irqrestore(&ei_local->page_lock, flags); |
1192 | return IRQ_NONE; | 1193 | return IRQ_NONE; |
1193 | } | 1194 | } |
1194 | 1195 | ||
@@ -1261,7 +1262,7 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id) | |||
1261 | ei_local->irqlock = 0; | 1262 | ei_local->irqlock = 0; |
1262 | outb_p(ENISR_ALL, e8390_base + EN0_IMR); | 1263 | outb_p(ENISR_ALL, e8390_base + EN0_IMR); |
1263 | 1264 | ||
1264 | spin_unlock(&ei_local->page_lock); | 1265 | spin_unlock_irqrestore(&ei_local->page_lock, flags); |
1265 | return IRQ_RETVAL(handled); | 1266 | return IRQ_RETVAL(handled); |
1266 | } | 1267 | } |
1267 | 1268 | ||
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 96b6cfbf0a3a..cdc6a5c2e70d 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -1316,7 +1316,7 @@ static void rtl8169_get_mac_version(struct rtl8169_private *tp, | |||
1316 | { 0x7c800000, 0x28000000, RTL_GIGA_MAC_VER_26 }, | 1316 | { 0x7c800000, 0x28000000, RTL_GIGA_MAC_VER_26 }, |
1317 | 1317 | ||
1318 | /* 8168C family. */ | 1318 | /* 8168C family. */ |
1319 | { 0x7cf00000, 0x3ca00000, RTL_GIGA_MAC_VER_24 }, | 1319 | { 0x7cf00000, 0x3cb00000, RTL_GIGA_MAC_VER_24 }, |
1320 | { 0x7cf00000, 0x3c900000, RTL_GIGA_MAC_VER_23 }, | 1320 | { 0x7cf00000, 0x3c900000, RTL_GIGA_MAC_VER_23 }, |
1321 | { 0x7cf00000, 0x3c800000, RTL_GIGA_MAC_VER_18 }, | 1321 | { 0x7cf00000, 0x3c800000, RTL_GIGA_MAC_VER_18 }, |
1322 | { 0x7c800000, 0x3c800000, RTL_GIGA_MAC_VER_24 }, | 1322 | { 0x7c800000, 0x3c800000, RTL_GIGA_MAC_VER_24 }, |
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index 77b359162d6c..23c15aa9fbd5 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c | |||
@@ -730,13 +730,17 @@ static int ath9k_hif_usb_alloc_urbs(struct hif_device_usb *hif_dev) | |||
730 | 730 | ||
731 | /* RX */ | 731 | /* RX */ |
732 | if (ath9k_hif_usb_alloc_rx_urbs(hif_dev) < 0) | 732 | if (ath9k_hif_usb_alloc_rx_urbs(hif_dev) < 0) |
733 | goto err; | 733 | goto err_rx; |
734 | 734 | ||
735 | /* Register Read */ | 735 | /* Register Read */ |
736 | if (ath9k_hif_usb_alloc_reg_in_urb(hif_dev) < 0) | 736 | if (ath9k_hif_usb_alloc_reg_in_urb(hif_dev) < 0) |
737 | goto err; | 737 | goto err_reg; |
738 | 738 | ||
739 | return 0; | 739 | return 0; |
740 | err_reg: | ||
741 | ath9k_hif_usb_dealloc_rx_urbs(hif_dev); | ||
742 | err_rx: | ||
743 | ath9k_hif_usb_dealloc_tx_urbs(hif_dev); | ||
740 | err: | 744 | err: |
741 | return -ENOMEM; | 745 | return -ENOMEM; |
742 | } | 746 | } |
diff --git a/drivers/net/wireless/hostap/hostap_pci.c b/drivers/net/wireless/hostap/hostap_pci.c index d24dc7dc0723..972a9c3af39e 100644 --- a/drivers/net/wireless/hostap/hostap_pci.c +++ b/drivers/net/wireless/hostap/hostap_pci.c | |||
@@ -330,6 +330,7 @@ static int prism2_pci_probe(struct pci_dev *pdev, | |||
330 | 330 | ||
331 | dev->irq = pdev->irq; | 331 | dev->irq = pdev->irq; |
332 | hw_priv->mem_start = mem; | 332 | hw_priv->mem_start = mem; |
333 | dev->base_addr = (unsigned long) mem; | ||
333 | 334 | ||
334 | prism2_pci_cor_sreset(local); | 335 | prism2_pci_cor_sreset(local); |
335 | 336 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.h b/drivers/net/wireless/iwlwifi/iwl-sta.h index c2a453a1a991..dc43ebd1f1fd 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.h +++ b/drivers/net/wireless/iwlwifi/iwl-sta.h | |||
@@ -97,6 +97,17 @@ static inline void iwl_clear_driver_stations(struct iwl_priv *priv) | |||
97 | spin_lock_irqsave(&priv->sta_lock, flags); | 97 | spin_lock_irqsave(&priv->sta_lock, flags); |
98 | memset(priv->stations, 0, sizeof(priv->stations)); | 98 | memset(priv->stations, 0, sizeof(priv->stations)); |
99 | priv->num_stations = 0; | 99 | priv->num_stations = 0; |
100 | |||
101 | /* | ||
102 | * Remove all key information that is not stored as part of station | ||
103 | * information since mac80211 may not have had a | ||
104 | * chance to remove all the keys. When device is reconfigured by | ||
105 | * mac80211 after an error all keys will be reconfigured. | ||
106 | */ | ||
107 | priv->ucode_key_table = 0; | ||
108 | priv->key_mapping_key = 0; | ||
109 | memset(priv->wep_keys, 0, sizeof(priv->wep_keys)); | ||
110 | |||
100 | spin_unlock_irqrestore(&priv->sta_lock, flags); | 111 | spin_unlock_irqrestore(&priv->sta_lock, flags); |
101 | } | 112 | } |
102 | 113 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 3ae468c4d760..f20d3eeeea7f 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -854,6 +854,11 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev) | |||
854 | BIT(NL80211_IFTYPE_WDS); | 854 | BIT(NL80211_IFTYPE_WDS); |
855 | 855 | ||
856 | /* | 856 | /* |
857 | * Initialize configuration work. | ||
858 | */ | ||
859 | INIT_WORK(&rt2x00dev->intf_work, rt2x00lib_intf_scheduled); | ||
860 | |||
861 | /* | ||
857 | * Let the driver probe the device to detect the capabilities. | 862 | * Let the driver probe the device to detect the capabilities. |
858 | */ | 863 | */ |
859 | retval = rt2x00dev->ops->lib->probe_hw(rt2x00dev); | 864 | retval = rt2x00dev->ops->lib->probe_hw(rt2x00dev); |
@@ -863,11 +868,6 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev) | |||
863 | } | 868 | } |
864 | 869 | ||
865 | /* | 870 | /* |
866 | * Initialize configuration work. | ||
867 | */ | ||
868 | INIT_WORK(&rt2x00dev->intf_work, rt2x00lib_intf_scheduled); | ||
869 | |||
870 | /* | ||
871 | * Allocate queue array. | 871 | * Allocate queue array. |
872 | */ | 872 | */ |
873 | retval = rt2x00queue_allocate(rt2x00dev); | 873 | retval = rt2x00queue_allocate(rt2x00dev); |
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index c9171be74564..6a5af18faf68 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c | |||
@@ -3698,6 +3698,8 @@ static int intel_iommu_domain_has_cap(struct iommu_domain *domain, | |||
3698 | 3698 | ||
3699 | if (cap == IOMMU_CAP_CACHE_COHERENCY) | 3699 | if (cap == IOMMU_CAP_CACHE_COHERENCY) |
3700 | return dmar_domain->iommu_snooping; | 3700 | return dmar_domain->iommu_snooping; |
3701 | if (cap == IOMMU_CAP_INTR_REMAP) | ||
3702 | return intr_remapping_enabled; | ||
3701 | 3703 | ||
3702 | return 0; | 3704 | return 0; |
3703 | } | 3705 | } |
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c index 92379e2d37e7..2aaa13150de3 100644 --- a/drivers/pci/setup-res.c +++ b/drivers/pci/setup-res.c | |||
@@ -156,6 +156,38 @@ static int __pci_assign_resource(struct pci_bus *bus, struct pci_dev *dev, | |||
156 | pcibios_align_resource, dev); | 156 | pcibios_align_resource, dev); |
157 | } | 157 | } |
158 | 158 | ||
159 | if (ret < 0 && dev->fw_addr[resno]) { | ||
160 | struct resource *root, *conflict; | ||
161 | resource_size_t start, end; | ||
162 | |||
163 | /* | ||
164 | * If we failed to assign anything, let's try the address | ||
165 | * where firmware left it. That at least has a chance of | ||
166 | * working, which is better than just leaving it disabled. | ||
167 | */ | ||
168 | |||
169 | if (res->flags & IORESOURCE_IO) | ||
170 | root = &ioport_resource; | ||
171 | else | ||
172 | root = &iomem_resource; | ||
173 | |||
174 | start = res->start; | ||
175 | end = res->end; | ||
176 | res->start = dev->fw_addr[resno]; | ||
177 | res->end = res->start + size - 1; | ||
178 | dev_info(&dev->dev, "BAR %d: trying firmware assignment %pR\n", | ||
179 | resno, res); | ||
180 | conflict = request_resource_conflict(root, res); | ||
181 | if (conflict) { | ||
182 | dev_info(&dev->dev, | ||
183 | "BAR %d: %pR conflicts with %s %pR\n", resno, | ||
184 | res, conflict->name, conflict); | ||
185 | res->start = start; | ||
186 | res->end = end; | ||
187 | } else | ||
188 | ret = 0; | ||
189 | } | ||
190 | |||
159 | if (!ret) { | 191 | if (!ret) { |
160 | res->flags &= ~IORESOURCE_STARTALIGN; | 192 | res->flags &= ~IORESOURCE_STARTALIGN; |
161 | dev_info(&dev->dev, "BAR %d: assigned %pR\n", resno, res); | 193 | dev_info(&dev->dev, "BAR %d: assigned %pR\n", resno, res); |
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index 29f91fac1dff..a4cd9adfcbc0 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c | |||
@@ -857,8 +857,10 @@ void pcmcia_disable_device(struct pcmcia_device *p_dev) | |||
857 | { | 857 | { |
858 | pcmcia_release_configuration(p_dev); | 858 | pcmcia_release_configuration(p_dev); |
859 | pcmcia_release_io(p_dev, &p_dev->io); | 859 | pcmcia_release_io(p_dev, &p_dev->io); |
860 | if (p_dev->_irq) | 860 | if (p_dev->_irq) { |
861 | free_irq(p_dev->irq, p_dev->priv); | 861 | free_irq(p_dev->irq, p_dev->priv); |
862 | p_dev->_irq = 0; | ||
863 | } | ||
862 | if (p_dev->win) | 864 | if (p_dev->win) |
863 | pcmcia_release_window(p_dev, p_dev->win); | 865 | pcmcia_release_window(p_dev, p_dev->win); |
864 | } | 866 | } |
diff --git a/drivers/platform/x86/intel_scu_ipc.c b/drivers/platform/x86/intel_scu_ipc.c index 40658e3385b4..bb2f1fba637b 100644 --- a/drivers/platform/x86/intel_scu_ipc.c +++ b/drivers/platform/x86/intel_scu_ipc.c | |||
@@ -489,7 +489,7 @@ int intel_scu_ipc_simple_command(int cmd, int sub) | |||
489 | mutex_unlock(&ipclock); | 489 | mutex_unlock(&ipclock); |
490 | return -ENODEV; | 490 | return -ENODEV; |
491 | } | 491 | } |
492 | ipc_command(cmd << 12 | sub); | 492 | ipc_command(sub << 12 | cmd); |
493 | err = busy_loop(); | 493 | err = busy_loop(); |
494 | mutex_unlock(&ipclock); | 494 | mutex_unlock(&ipclock); |
495 | return err; | 495 | return err; |
@@ -501,9 +501,9 @@ EXPORT_SYMBOL(intel_scu_ipc_simple_command); | |||
501 | * @cmd: command | 501 | * @cmd: command |
502 | * @sub: sub type | 502 | * @sub: sub type |
503 | * @in: input data | 503 | * @in: input data |
504 | * @inlen: input length | 504 | * @inlen: input length in dwords |
505 | * @out: output data | 505 | * @out: output data |
506 | * @outlein: output length | 506 | * @outlein: output length in dwords |
507 | * | 507 | * |
508 | * Issue a command to the SCU which involves data transfers. Do the | 508 | * Issue a command to the SCU which involves data transfers. Do the |
509 | * data copies under the lock but leave it for the caller to interpret | 509 | * data copies under the lock but leave it for the caller to interpret |
@@ -524,7 +524,7 @@ int intel_scu_ipc_command(int cmd, int sub, u32 *in, int inlen, | |||
524 | for (i = 0; i < inlen; i++) | 524 | for (i = 0; i < inlen; i++) |
525 | ipc_data_writel(*in++, 4 * i); | 525 | ipc_data_writel(*in++, 4 * i); |
526 | 526 | ||
527 | ipc_command((cmd << 12) | sub | (inlen << 18)); | 527 | ipc_command((sub << 12) | cmd | (inlen << 18)); |
528 | err = busy_loop(); | 528 | err = busy_loop(); |
529 | 529 | ||
530 | for (i = 0; i < outlen; i++) | 530 | for (i = 0; i < outlen; i++) |
@@ -556,6 +556,10 @@ int intel_scu_ipc_i2c_cntrl(u32 addr, u32 *data) | |||
556 | u32 cmd = 0; | 556 | u32 cmd = 0; |
557 | 557 | ||
558 | mutex_lock(&ipclock); | 558 | mutex_lock(&ipclock); |
559 | if (ipcdev.pdev == NULL) { | ||
560 | mutex_unlock(&ipclock); | ||
561 | return -ENODEV; | ||
562 | } | ||
559 | cmd = (addr >> 24) & 0xFF; | 563 | cmd = (addr >> 24) & 0xFF; |
560 | if (cmd == IPC_I2C_READ) { | 564 | if (cmd == IPC_I2C_READ) { |
561 | writel(addr, ipcdev.i2c_base + IPC_I2C_CNTRL_ADDR); | 565 | writel(addr, ipcdev.i2c_base + IPC_I2C_CNTRL_ADDR); |
diff --git a/drivers/power/ds2782_battery.c b/drivers/power/ds2782_battery.c index d762a0cbc6af..2afbeec8b791 100644 --- a/drivers/power/ds2782_battery.c +++ b/drivers/power/ds2782_battery.c | |||
@@ -163,7 +163,7 @@ static int ds2782_get_capacity(struct ds278x_info *info, int *capacity) | |||
163 | if (err) | 163 | if (err) |
164 | return err; | 164 | return err; |
165 | *capacity = raw; | 165 | *capacity = raw; |
166 | return raw; | 166 | return 0; |
167 | } | 167 | } |
168 | 168 | ||
169 | static int ds2786_get_current(struct ds278x_info *info, int *current_uA) | 169 | static int ds2786_get_current(struct ds278x_info *info, int *current_uA) |
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index 34d51dd4c539..bed7b4634ccd 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c | |||
@@ -948,8 +948,10 @@ static ssize_t dasd_alias_show(struct device *dev, | |||
948 | if (device->discipline && device->discipline->get_uid && | 948 | if (device->discipline && device->discipline->get_uid && |
949 | !device->discipline->get_uid(device, &uid)) { | 949 | !device->discipline->get_uid(device, &uid)) { |
950 | if (uid.type == UA_BASE_PAV_ALIAS || | 950 | if (uid.type == UA_BASE_PAV_ALIAS || |
951 | uid.type == UA_HYPER_PAV_ALIAS) | 951 | uid.type == UA_HYPER_PAV_ALIAS) { |
952 | dasd_put_device(device); | ||
952 | return sprintf(buf, "1\n"); | 953 | return sprintf(buf, "1\n"); |
954 | } | ||
953 | } | 955 | } |
954 | dasd_put_device(device); | 956 | dasd_put_device(device); |
955 | 957 | ||
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index ce7cb87479fe..407d0e9adfaf 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c | |||
@@ -713,7 +713,7 @@ int chsc_determine_base_channel_path_desc(struct chp_id chpid, | |||
713 | ret = chsc_determine_channel_path_desc(chpid, 0, 0, 0, 0, chsc_resp); | 713 | ret = chsc_determine_channel_path_desc(chpid, 0, 0, 0, 0, chsc_resp); |
714 | if (ret) | 714 | if (ret) |
715 | goto out_free; | 715 | goto out_free; |
716 | memcpy(desc, &chsc_resp->data, chsc_resp->length); | 716 | memcpy(desc, &chsc_resp->data, sizeof(*desc)); |
717 | out_free: | 717 | out_free: |
718 | kfree(chsc_resp); | 718 | kfree(chsc_resp); |
719 | return ret; | 719 | return ret; |
diff --git a/drivers/sbus/char/openprom.c b/drivers/sbus/char/openprom.c index d53e62ab09da..aacbe14e2e7a 100644 --- a/drivers/sbus/char/openprom.c +++ b/drivers/sbus/char/openprom.c | |||
@@ -554,7 +554,7 @@ static int opiocgetnext(unsigned int cmd, void __user *argp) | |||
554 | static int openprom_bsd_ioctl(struct file * file, | 554 | static int openprom_bsd_ioctl(struct file * file, |
555 | unsigned int cmd, unsigned long arg) | 555 | unsigned int cmd, unsigned long arg) |
556 | { | 556 | { |
557 | DATA *data = (DATA *) file->private_data; | 557 | DATA *data = file->private_data; |
558 | void __user *argp = (void __user *)arg; | 558 | void __user *argp = (void __user *)arg; |
559 | int err; | 559 | int err; |
560 | 560 | ||
@@ -601,7 +601,7 @@ static int openprom_bsd_ioctl(struct file * file, | |||
601 | static long openprom_ioctl(struct file * file, | 601 | static long openprom_ioctl(struct file * file, |
602 | unsigned int cmd, unsigned long arg) | 602 | unsigned int cmd, unsigned long arg) |
603 | { | 603 | { |
604 | DATA *data = (DATA *) file->private_data; | 604 | DATA *data = file->private_data; |
605 | 605 | ||
606 | switch (cmd) { | 606 | switch (cmd) { |
607 | case OPROMGETOPT: | 607 | case OPROMGETOPT: |
diff --git a/drivers/serial/suncore.c b/drivers/serial/suncore.c index ed7d958b0a01..544f2e25d0e5 100644 --- a/drivers/serial/suncore.c +++ b/drivers/serial/suncore.c | |||
@@ -71,7 +71,9 @@ int sunserial_console_match(struct console *con, struct device_node *dp, | |||
71 | 71 | ||
72 | con->index = line; | 72 | con->index = line; |
73 | drv->cons = con; | 73 | drv->cons = con; |
74 | add_preferred_console(con->name, line, NULL); | 74 | |
75 | if (!console_set_on_cmdline) | ||
76 | add_preferred_console(con->name, line, NULL); | ||
75 | 77 | ||
76 | return 1; | 78 | return 1; |
77 | } | 79 | } |
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index 234459c2f012..ffbf4553f665 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c | |||
@@ -1500,20 +1500,25 @@ out_unmap: | |||
1500 | static int __devexit su_remove(struct of_device *op) | 1500 | static int __devexit su_remove(struct of_device *op) |
1501 | { | 1501 | { |
1502 | struct uart_sunsu_port *up = dev_get_drvdata(&op->dev); | 1502 | struct uart_sunsu_port *up = dev_get_drvdata(&op->dev); |
1503 | bool kbdms = false; | ||
1503 | 1504 | ||
1504 | if (up->su_type == SU_PORT_MS || | 1505 | if (up->su_type == SU_PORT_MS || |
1505 | up->su_type == SU_PORT_KBD) { | 1506 | up->su_type == SU_PORT_KBD) |
1507 | kbdms = true; | ||
1508 | |||
1509 | if (kbdms) { | ||
1506 | #ifdef CONFIG_SERIO | 1510 | #ifdef CONFIG_SERIO |
1507 | serio_unregister_port(&up->serio); | 1511 | serio_unregister_port(&up->serio); |
1508 | #endif | 1512 | #endif |
1509 | kfree(up); | 1513 | } else if (up->port.type != PORT_UNKNOWN) |
1510 | } else if (up->port.type != PORT_UNKNOWN) { | ||
1511 | uart_remove_one_port(&sunsu_reg, &up->port); | 1514 | uart_remove_one_port(&sunsu_reg, &up->port); |
1512 | } | ||
1513 | 1515 | ||
1514 | if (up->port.membase) | 1516 | if (up->port.membase) |
1515 | of_iounmap(&op->resource[0], up->port.membase, up->reg_size); | 1517 | of_iounmap(&op->resource[0], up->port.membase, up->reg_size); |
1516 | 1518 | ||
1519 | if (kbdms) | ||
1520 | kfree(up); | ||
1521 | |||
1517 | dev_set_drvdata(&op->dev, NULL); | 1522 | dev_set_drvdata(&op->dev, NULL); |
1518 | 1523 | ||
1519 | return 0; | 1524 | return 0; |
diff --git a/drivers/spi/spi_mpc8xxx.c b/drivers/spi/spi_mpc8xxx.c index ffa111a7e9d4..97ab0a81338a 100644 --- a/drivers/spi/spi_mpc8xxx.c +++ b/drivers/spi/spi_mpc8xxx.c | |||
@@ -66,28 +66,6 @@ struct mpc8xxx_spi_reg { | |||
66 | __be32 receive; | 66 | __be32 receive; |
67 | }; | 67 | }; |
68 | 68 | ||
69 | /* SPI Parameter RAM */ | ||
70 | struct spi_pram { | ||
71 | __be16 rbase; /* Rx Buffer descriptor base address */ | ||
72 | __be16 tbase; /* Tx Buffer descriptor base address */ | ||
73 | u8 rfcr; /* Rx function code */ | ||
74 | u8 tfcr; /* Tx function code */ | ||
75 | __be16 mrblr; /* Max receive buffer length */ | ||
76 | __be32 rstate; /* Internal */ | ||
77 | __be32 rdp; /* Internal */ | ||
78 | __be16 rbptr; /* Internal */ | ||
79 | __be16 rbc; /* Internal */ | ||
80 | __be32 rxtmp; /* Internal */ | ||
81 | __be32 tstate; /* Internal */ | ||
82 | __be32 tdp; /* Internal */ | ||
83 | __be16 tbptr; /* Internal */ | ||
84 | __be16 tbc; /* Internal */ | ||
85 | __be32 txtmp; /* Internal */ | ||
86 | __be32 res; /* Tx temp. */ | ||
87 | __be16 rpbase; /* Relocation pointer (CPM1 only) */ | ||
88 | __be16 res1; /* Reserved */ | ||
89 | }; | ||
90 | |||
91 | /* SPI Controller mode register definitions */ | 69 | /* SPI Controller mode register definitions */ |
92 | #define SPMODE_LOOP (1 << 30) | 70 | #define SPMODE_LOOP (1 << 30) |
93 | #define SPMODE_CI_INACTIVEHIGH (1 << 29) | 71 | #define SPMODE_CI_INACTIVEHIGH (1 << 29) |
diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c index d69eccf5f197..2aaa0f75c6cf 100644 --- a/drivers/usb/gadget/f_fs.c +++ b/drivers/usb/gadget/f_fs.c | |||
@@ -136,7 +136,7 @@ struct ffs_data { | |||
136 | * handling setup requests immidiatelly user space may be so | 136 | * handling setup requests immidiatelly user space may be so |
137 | * slow that another setup will be sent to the gadget but this | 137 | * slow that another setup will be sent to the gadget but this |
138 | * time not to us but another function and then there could be | 138 | * time not to us but another function and then there could be |
139 | * a race. Is taht the case? Or maybe we can use cdev->req | 139 | * a race. Is that the case? Or maybe we can use cdev->req |
140 | * after all, maybe we just need some spinlock for that? */ | 140 | * after all, maybe we just need some spinlock for that? */ |
141 | struct usb_request *ep0req; /* P: mutex */ | 141 | struct usb_request *ep0req; /* P: mutex */ |
142 | struct completion ep0req_completion; /* P: mutex */ | 142 | struct completion ep0req_completion; /* P: mutex */ |
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 57a593c58cf4..d219070fed3d 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c | |||
@@ -177,8 +177,8 @@ static void handle_tx(struct vhost_net *net) | |||
177 | break; | 177 | break; |
178 | } | 178 | } |
179 | if (err != len) | 179 | if (err != len) |
180 | pr_err("Truncated TX packet: " | 180 | pr_debug("Truncated TX packet: " |
181 | " len %d != %zd\n", err, len); | 181 | " len %d != %zd\n", err, len); |
182 | vhost_add_used_and_signal(&net->dev, vq, head, 0); | 182 | vhost_add_used_and_signal(&net->dev, vq, head, 0); |
183 | total_len += len; | 183 | total_len += len; |
184 | if (unlikely(total_len >= VHOST_NET_WEIGHT)) { | 184 | if (unlikely(total_len >= VHOST_NET_WEIGHT)) { |
@@ -275,8 +275,8 @@ static void handle_rx(struct vhost_net *net) | |||
275 | } | 275 | } |
276 | /* TODO: Should check and handle checksum. */ | 276 | /* TODO: Should check and handle checksum. */ |
277 | if (err > len) { | 277 | if (err > len) { |
278 | pr_err("Discarded truncated rx packet: " | 278 | pr_debug("Discarded truncated rx packet: " |
279 | " len %d > %zd\n", err, len); | 279 | " len %d > %zd\n", err, len); |
280 | vhost_discard_vq_desc(vq); | 280 | vhost_discard_vq_desc(vq); |
281 | continue; | 281 | continue; |
282 | } | 282 | } |
@@ -534,11 +534,16 @@ static long vhost_net_set_backend(struct vhost_net *n, unsigned index, int fd) | |||
534 | rcu_assign_pointer(vq->private_data, sock); | 534 | rcu_assign_pointer(vq->private_data, sock); |
535 | vhost_net_enable_vq(n, vq); | 535 | vhost_net_enable_vq(n, vq); |
536 | done: | 536 | done: |
537 | mutex_unlock(&vq->mutex); | ||
538 | |||
537 | if (oldsock) { | 539 | if (oldsock) { |
538 | vhost_net_flush_vq(n, index); | 540 | vhost_net_flush_vq(n, index); |
539 | fput(oldsock->file); | 541 | fput(oldsock->file); |
540 | } | 542 | } |
541 | 543 | ||
544 | mutex_unlock(&n->dev.mutex); | ||
545 | return 0; | ||
546 | |||
542 | err_vq: | 547 | err_vq: |
543 | mutex_unlock(&vq->mutex); | 548 | mutex_unlock(&vq->mutex); |
544 | err: | 549 | err: |
diff --git a/drivers/video/aty/radeon_pm.c b/drivers/video/aty/radeon_pm.c index 515cf1978d19..c4e17642d9c5 100644 --- a/drivers/video/aty/radeon_pm.c +++ b/drivers/video/aty/radeon_pm.c | |||
@@ -2872,7 +2872,7 @@ void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk, int ignore_devlis | |||
2872 | } | 2872 | } |
2873 | 2873 | ||
2874 | #if 0 | 2874 | #if 0 |
2875 | /* Power down TV DAC, taht saves a significant amount of power, | 2875 | /* Power down TV DAC, that saves a significant amount of power, |
2876 | * we'll have something better once we actually have some TVOut | 2876 | * we'll have something better once we actually have some TVOut |
2877 | * support | 2877 | * support |
2878 | */ | 2878 | */ |