diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2006-01-03 10:58:53 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-03 10:58:53 -0500 |
commit | a18ceba7b40e24a9da87249bd74f16ea5abd6894 (patch) | |
tree | 5ce615d345e720ddabf95c46fb62287ee763ad4e /drivers | |
parent | aaadff81195056c7c14e0d834b3318c624c0fd78 (diff) | |
parent | 88026842b0a760145aa71d69e74fbc9ec118ca44 (diff) |
Merge branch 'master'
Diffstat (limited to 'drivers')
61 files changed, 522 insertions, 541 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 5f51057518b0..807b0df308f1 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -274,8 +274,6 @@ static void acpi_processor_idle(void) | |||
274 | } | 274 | } |
275 | } | 275 | } |
276 | 276 | ||
277 | cx->usage++; | ||
278 | |||
279 | #ifdef CONFIG_HOTPLUG_CPU | 277 | #ifdef CONFIG_HOTPLUG_CPU |
280 | /* | 278 | /* |
281 | * Check for P_LVL2_UP flag before entering C2 and above on | 279 | * Check for P_LVL2_UP flag before entering C2 and above on |
@@ -283,9 +281,12 @@ static void acpi_processor_idle(void) | |||
283 | * detection phase, to work cleanly with logical CPU hotplug. | 281 | * detection phase, to work cleanly with logical CPU hotplug. |
284 | */ | 282 | */ |
285 | if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) && | 283 | if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) && |
286 | !pr->flags.has_cst && acpi_fadt.plvl2_up) | 284 | !pr->flags.has_cst && !acpi_fadt.plvl2_up) |
287 | cx->type = ACPI_STATE_C1; | 285 | cx = &pr->power.states[ACPI_STATE_C1]; |
288 | #endif | 286 | #endif |
287 | |||
288 | cx->usage++; | ||
289 | |||
289 | /* | 290 | /* |
290 | * Sleep: | 291 | * Sleep: |
291 | * ------ | 292 | * ------ |
@@ -386,6 +387,15 @@ static void acpi_processor_idle(void) | |||
386 | 387 | ||
387 | next_state = pr->power.state; | 388 | next_state = pr->power.state; |
388 | 389 | ||
390 | #ifdef CONFIG_HOTPLUG_CPU | ||
391 | /* Don't do promotion/demotion */ | ||
392 | if ((cx->type == ACPI_STATE_C1) && (num_online_cpus() > 1) && | ||
393 | !pr->flags.has_cst && !acpi_fadt.plvl2_up) { | ||
394 | next_state = cx; | ||
395 | goto end; | ||
396 | } | ||
397 | #endif | ||
398 | |||
389 | /* | 399 | /* |
390 | * Promotion? | 400 | * Promotion? |
391 | * ---------- | 401 | * ---------- |
@@ -557,7 +567,7 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) | |||
557 | * Check for P_LVL2_UP flag before entering C2 and above on | 567 | * Check for P_LVL2_UP flag before entering C2 and above on |
558 | * an SMP system. | 568 | * an SMP system. |
559 | */ | 569 | */ |
560 | if ((num_online_cpus() > 1) && acpi_fadt.plvl2_up) | 570 | if ((num_online_cpus() > 1) && !acpi_fadt.plvl2_up) |
561 | return_VALUE(-ENODEV); | 571 | return_VALUE(-ENODEV); |
562 | #endif | 572 | #endif |
563 | 573 | ||
diff --git a/drivers/acpi/processor_thermal.c b/drivers/acpi/processor_thermal.c index f37584015324..dc9817cfb882 100644 --- a/drivers/acpi/processor_thermal.c +++ b/drivers/acpi/processor_thermal.c | |||
@@ -102,8 +102,8 @@ static int cpu_has_cpufreq(unsigned int cpu) | |||
102 | { | 102 | { |
103 | struct cpufreq_policy policy; | 103 | struct cpufreq_policy policy; |
104 | if (!acpi_thermal_cpufreq_is_init || cpufreq_get_policy(&policy, cpu)) | 104 | if (!acpi_thermal_cpufreq_is_init || cpufreq_get_policy(&policy, cpu)) |
105 | return -ENODEV; | 105 | return 0; |
106 | return 0; | 106 | return 1; |
107 | } | 107 | } |
108 | 108 | ||
109 | static int acpi_thermal_cpufreq_increase(unsigned int cpu) | 109 | static int acpi_thermal_cpufreq_increase(unsigned int cpu) |
diff --git a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c index 0c5abc536c7a..2ce872d75890 100644 --- a/drivers/acpi/utilities/utmisc.c +++ b/drivers/acpi/utilities/utmisc.c | |||
@@ -84,14 +84,14 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id) | |||
84 | 84 | ||
85 | /* Find a free owner ID */ | 85 | /* Find a free owner ID */ |
86 | 86 | ||
87 | for (i = 0; i < 32; i++) { | 87 | for (i = 0; i < 64; i++) { |
88 | if (!(acpi_gbl_owner_id_mask & (1 << i))) { | 88 | if (!(acpi_gbl_owner_id_mask & (1ULL << i))) { |
89 | ACPI_DEBUG_PRINT((ACPI_DB_VALUES, | 89 | ACPI_DEBUG_PRINT((ACPI_DB_VALUES, |
90 | "Current owner_id mask: %8.8X New ID: %2.2X\n", | 90 | "Current owner_id mask: %16.16LX New ID: %2.2X\n", |
91 | acpi_gbl_owner_id_mask, | 91 | acpi_gbl_owner_id_mask, |
92 | (unsigned int)(i + 1))); | 92 | (unsigned int)(i + 1))); |
93 | 93 | ||
94 | acpi_gbl_owner_id_mask |= (1 << i); | 94 | acpi_gbl_owner_id_mask |= (1ULL << i); |
95 | *owner_id = (acpi_owner_id) (i + 1); | 95 | *owner_id = (acpi_owner_id) (i + 1); |
96 | goto exit; | 96 | goto exit; |
97 | } | 97 | } |
@@ -106,7 +106,7 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id) | |||
106 | */ | 106 | */ |
107 | *owner_id = 0; | 107 | *owner_id = 0; |
108 | status = AE_OWNER_ID_LIMIT; | 108 | status = AE_OWNER_ID_LIMIT; |
109 | ACPI_REPORT_ERROR(("Could not allocate new owner_id (32 max), AE_OWNER_ID_LIMIT\n")); | 109 | ACPI_REPORT_ERROR(("Could not allocate new owner_id (64 max), AE_OWNER_ID_LIMIT\n")); |
110 | 110 | ||
111 | exit: | 111 | exit: |
112 | (void)acpi_ut_release_mutex(ACPI_MTX_CACHES); | 112 | (void)acpi_ut_release_mutex(ACPI_MTX_CACHES); |
@@ -123,7 +123,7 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id) | |||
123 | * control method or unloading a table. Either way, we would | 123 | * control method or unloading a table. Either way, we would |
124 | * ignore any error anyway. | 124 | * ignore any error anyway. |
125 | * | 125 | * |
126 | * DESCRIPTION: Release a table or method owner ID. Valid IDs are 1 - 32 | 126 | * DESCRIPTION: Release a table or method owner ID. Valid IDs are 1 - 64 |
127 | * | 127 | * |
128 | ******************************************************************************/ | 128 | ******************************************************************************/ |
129 | 129 | ||
@@ -140,7 +140,7 @@ void acpi_ut_release_owner_id(acpi_owner_id * owner_id_ptr) | |||
140 | 140 | ||
141 | /* Zero is not a valid owner_iD */ | 141 | /* Zero is not a valid owner_iD */ |
142 | 142 | ||
143 | if ((owner_id == 0) || (owner_id > 32)) { | 143 | if ((owner_id == 0) || (owner_id > 64)) { |
144 | ACPI_REPORT_ERROR(("Invalid owner_id: %2.2X\n", owner_id)); | 144 | ACPI_REPORT_ERROR(("Invalid owner_id: %2.2X\n", owner_id)); |
145 | return_VOID; | 145 | return_VOID; |
146 | } | 146 | } |
@@ -158,8 +158,8 @@ void acpi_ut_release_owner_id(acpi_owner_id * owner_id_ptr) | |||
158 | 158 | ||
159 | /* Free the owner ID only if it is valid */ | 159 | /* Free the owner ID only if it is valid */ |
160 | 160 | ||
161 | if (acpi_gbl_owner_id_mask & (1 << owner_id)) { | 161 | if (acpi_gbl_owner_id_mask & (1ULL << owner_id)) { |
162 | acpi_gbl_owner_id_mask ^= (1 << owner_id); | 162 | acpi_gbl_owner_id_mask ^= (1ULL << owner_id); |
163 | } | 163 | } |
164 | 164 | ||
165 | (void)acpi_ut_release_mutex(ACPI_MTX_CACHES); | 165 | (void)acpi_ut_release_mutex(ACPI_MTX_CACHES); |
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index b46a72d782d6..84e68cdd451b 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig | |||
@@ -687,7 +687,7 @@ config NVRAM | |||
687 | 687 | ||
688 | config RTC | 688 | config RTC |
689 | tristate "Enhanced Real Time Clock Support" | 689 | tristate "Enhanced Real Time Clock Support" |
690 | depends on !PPC32 && !PARISC && !IA64 && !M68K | 690 | depends on !PPC32 && !PARISC && !IA64 && !M68K && (!SPARC || PCI) |
691 | ---help--- | 691 | ---help--- |
692 | If you say Y here and create a character special file /dev/rtc with | 692 | If you say Y here and create a character special file /dev/rtc with |
693 | major number 10 and minor number 135 using mknod ("man mknod"), you | 693 | major number 10 and minor number 135 using mknod ("man mknod"), you |
@@ -735,7 +735,7 @@ config SGI_IP27_RTC | |||
735 | 735 | ||
736 | config GEN_RTC | 736 | config GEN_RTC |
737 | tristate "Generic /dev/rtc emulation" | 737 | tristate "Generic /dev/rtc emulation" |
738 | depends on RTC!=y && !IA64 && !ARM && !M32R && !SPARC32 && !SPARC64 | 738 | depends on RTC!=y && !IA64 && !ARM && !M32R && !SPARC |
739 | ---help--- | 739 | ---help--- |
740 | If you say Y here and create a character special file /dev/rtc with | 740 | If you say Y here and create a character special file /dev/rtc with |
741 | major number 10 and minor number 135 using mknod ("man mknod"), you | 741 | major number 10 and minor number 135 using mknod ("man mknod"), you |
diff --git a/drivers/char/drm/radeon_cp.c b/drivers/char/drm/radeon_cp.c index 501e557cbc86..342302d46743 100644 --- a/drivers/char/drm/radeon_cp.c +++ b/drivers/char/drm/radeon_cp.c | |||
@@ -1312,8 +1312,6 @@ static void radeon_set_pcigart(drm_radeon_private_t * dev_priv, int on) | |||
1312 | static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init) | 1312 | static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init) |
1313 | { | 1313 | { |
1314 | drm_radeon_private_t *dev_priv = dev->dev_private; | 1314 | drm_radeon_private_t *dev_priv = dev->dev_private; |
1315 | unsigned int mem_size; | ||
1316 | |||
1317 | DRM_DEBUG("\n"); | 1315 | DRM_DEBUG("\n"); |
1318 | 1316 | ||
1319 | dev_priv->is_pci = init->is_pci; | 1317 | dev_priv->is_pci = init->is_pci; |
@@ -1523,11 +1521,8 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init) | |||
1523 | + dev_priv->fb_location) >> 10)); | 1521 | + dev_priv->fb_location) >> 10)); |
1524 | 1522 | ||
1525 | dev_priv->gart_size = init->gart_size; | 1523 | dev_priv->gart_size = init->gart_size; |
1526 | 1524 | dev_priv->gart_vm_start = dev_priv->fb_location | |
1527 | mem_size = RADEON_READ(RADEON_CONFIG_MEMSIZE); | 1525 | + RADEON_READ(RADEON_CONFIG_APER_SIZE); |
1528 | if (mem_size == 0) | ||
1529 | mem_size = 0x800000; | ||
1530 | dev_priv->gart_vm_start = dev_priv->fb_location + mem_size; | ||
1531 | 1526 | ||
1532 | #if __OS_HAS_AGP | 1527 | #if __OS_HAS_AGP |
1533 | if (!dev_priv->is_pci) | 1528 | if (!dev_priv->is_pci) |
diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c index 449d029ad4f4..8b603b2d1c42 100644 --- a/drivers/char/keyboard.c +++ b/drivers/char/keyboard.c | |||
@@ -930,8 +930,8 @@ static void kbd_refresh_leds(struct input_handle *handle) | |||
930 | } | 930 | } |
931 | 931 | ||
932 | #if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_ALPHA) ||\ | 932 | #if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_ALPHA) ||\ |
933 | defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC32) ||\ | 933 | defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC) ||\ |
934 | defined(CONFIG_SPARC64) || defined(CONFIG_PARISC) || defined(CONFIG_SUPERH) ||\ | 934 | defined(CONFIG_PARISC) || defined(CONFIG_SUPERH) ||\ |
935 | (defined(CONFIG_ARM) && defined(CONFIG_KEYBOARD_ATKBD) && !defined(CONFIG_ARCH_RPC)) | 935 | (defined(CONFIG_ARM) && defined(CONFIG_KEYBOARD_ATKBD) && !defined(CONFIG_ARCH_RPC)) |
936 | 936 | ||
937 | #define HW_RAW(dev) (test_bit(EV_MSC, dev->evbit) && test_bit(MSC_RAW, dev->mscbit) &&\ | 937 | #define HW_RAW(dev) (test_bit(EV_MSC, dev->evbit) && test_bit(MSC_RAW, dev->mscbit) &&\ |
@@ -958,7 +958,7 @@ static unsigned short x86_keycodes[256] = | |||
958 | extern int mac_hid_mouse_emulate_buttons(int, int, int); | 958 | extern int mac_hid_mouse_emulate_buttons(int, int, int); |
959 | #endif /* CONFIG_MAC_EMUMOUSEBTN */ | 959 | #endif /* CONFIG_MAC_EMUMOUSEBTN */ |
960 | 960 | ||
961 | #if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) | 961 | #ifdef CONFIG_SPARC |
962 | static int sparc_l1_a_state = 0; | 962 | static int sparc_l1_a_state = 0; |
963 | extern void sun_do_break(void); | 963 | extern void sun_do_break(void); |
964 | #endif | 964 | #endif |
@@ -1045,7 +1045,7 @@ static void kbd_keycode(unsigned int keycode, int down, | |||
1045 | 1045 | ||
1046 | if (keycode == KEY_LEFTALT || keycode == KEY_RIGHTALT) | 1046 | if (keycode == KEY_LEFTALT || keycode == KEY_RIGHTALT) |
1047 | sysrq_alt = down; | 1047 | sysrq_alt = down; |
1048 | #if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) | 1048 | #ifdef CONFIG_SPARC |
1049 | if (keycode == KEY_STOP) | 1049 | if (keycode == KEY_STOP) |
1050 | sparc_l1_a_state = down; | 1050 | sparc_l1_a_state = down; |
1051 | #endif | 1051 | #endif |
@@ -1072,7 +1072,7 @@ static void kbd_keycode(unsigned int keycode, int down, | |||
1072 | return; | 1072 | return; |
1073 | } | 1073 | } |
1074 | #endif | 1074 | #endif |
1075 | #if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) | 1075 | #ifdef CONFIG_SPARC |
1076 | if (keycode == KEY_A && sparc_l1_a_state) { | 1076 | if (keycode == KEY_A && sparc_l1_a_state) { |
1077 | sparc_l1_a_state = 0; | 1077 | sparc_l1_a_state = 0; |
1078 | sun_do_break(); | 1078 | sun_do_break(); |
diff --git a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c index f66c7ad6fd38..3c1dafaa3441 100644 --- a/drivers/char/vc_screen.c +++ b/drivers/char/vc_screen.c | |||
@@ -419,7 +419,7 @@ vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) | |||
419 | while (this_round > 1) { | 419 | while (this_round > 1) { |
420 | unsigned short w; | 420 | unsigned short w; |
421 | 421 | ||
422 | w = get_unaligned(((const unsigned short *)con_buf0)); | 422 | w = get_unaligned(((unsigned short *)con_buf0)); |
423 | vcs_scr_writew(vc, w, org++); | 423 | vcs_scr_writew(vc, w, org++); |
424 | con_buf0 += 2; | 424 | con_buf0 += 2; |
425 | this_round -= 2; | 425 | this_round -= 2; |
diff --git a/drivers/fc4/Kconfig b/drivers/fc4/Kconfig index f00c02a13ed6..345dbe6f10df 100644 --- a/drivers/fc4/Kconfig +++ b/drivers/fc4/Kconfig | |||
@@ -26,7 +26,7 @@ comment "FC4 drivers" | |||
26 | 26 | ||
27 | config FC4_SOC | 27 | config FC4_SOC |
28 | tristate "Sun SOC/Sbus" | 28 | tristate "Sun SOC/Sbus" |
29 | depends on FC4!=n && (SPARC32 || SPARC64) | 29 | depends on FC4!=n && SPARC |
30 | help | 30 | help |
31 | Serial Optical Channel is an interface card with one or two Fibre | 31 | Serial Optical Channel is an interface card with one or two Fibre |
32 | Optic ports, each of which can be connected to a disk array. Note | 32 | Optic ports, each of which can be connected to a disk array. Note |
@@ -38,7 +38,7 @@ config FC4_SOC | |||
38 | 38 | ||
39 | config FC4_SOCAL | 39 | config FC4_SOCAL |
40 | tristate "Sun SOC+ (aka SOCAL)" | 40 | tristate "Sun SOC+ (aka SOCAL)" |
41 | depends on FC4!=n && (SPARC32 || SPARC64) | 41 | depends on FC4!=n && SPARC |
42 | ---help--- | 42 | ---help--- |
43 | Serial Optical Channel Plus is an interface card with up to two | 43 | Serial Optical Channel Plus is an interface card with up to two |
44 | Fibre Optic ports. This card supports FC Arbitrated Loop (usually | 44 | Fibre Optic ports. This card supports FC Arbitrated Loop (usually |
@@ -62,7 +62,7 @@ config SCSI_PLUTO | |||
62 | be called pluto. | 62 | be called pluto. |
63 | 63 | ||
64 | config SCSI_FCAL | 64 | config SCSI_FCAL |
65 | tristate "Sun Enterprise Network Array (A5000 and EX500)" if SPARC32 || SPARC64 | 65 | tristate "Sun Enterprise Network Array (A5000 and EX500)" if SPARC |
66 | depends on FC4!=n && SCSI | 66 | depends on FC4!=n && SCSI |
67 | help | 67 | help |
68 | This driver drives FC-AL disks connected through a Fibre Channel | 68 | This driver drives FC-AL disks connected through a Fibre Channel |
@@ -75,7 +75,7 @@ config SCSI_FCAL | |||
75 | 75 | ||
76 | config SCSI_FCAL | 76 | config SCSI_FCAL |
77 | prompt "Generic FC-AL disk driver" | 77 | prompt "Generic FC-AL disk driver" |
78 | depends on FC4!=n && SCSI && !SPARC32 && !SPARC64 | 78 | depends on FC4!=n && SCSI && !SPARC |
79 | 79 | ||
80 | endmenu | 80 | endmenu |
81 | 81 | ||
diff --git a/drivers/input/joystick/warrior.c b/drivers/input/joystick/warrior.c index 99a642d2a1fe..1849b176cf18 100644 --- a/drivers/input/joystick/warrior.c +++ b/drivers/input/joystick/warrior.c | |||
@@ -172,7 +172,7 @@ static int warrior_connect(struct serio *serio, struct serio_driver *drv) | |||
172 | input_set_abs_params(input_dev, ABS_Y, -64, 64, 0, 8); | 172 | input_set_abs_params(input_dev, ABS_Y, -64, 64, 0, 8); |
173 | input_set_abs_params(input_dev, ABS_THROTTLE, -112, 112, 0, 0); | 173 | input_set_abs_params(input_dev, ABS_THROTTLE, -112, 112, 0, 0); |
174 | input_set_abs_params(input_dev, ABS_HAT0X, -1, 1, 0, 0); | 174 | input_set_abs_params(input_dev, ABS_HAT0X, -1, 1, 0, 0); |
175 | input_set_abs_params(input_dev, ABS_HAT0X, -1, 1, 0, 0); | 175 | input_set_abs_params(input_dev, ABS_HAT0Y, -1, 1, 0, 0); |
176 | 176 | ||
177 | serio_set_drvdata(serio, warrior); | 177 | serio_set_drvdata(serio, warrior); |
178 | 178 | ||
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 07813fc0523f..e08dbe08f46d 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig | |||
@@ -26,7 +26,7 @@ config INPUT_PCSPKR | |||
26 | 26 | ||
27 | config INPUT_SPARCSPKR | 27 | config INPUT_SPARCSPKR |
28 | tristate "SPARC Speaker support" | 28 | tristate "SPARC Speaker support" |
29 | depends on PCI && (SPARC32 || SPARC64) | 29 | depends on PCI && SPARC |
30 | help | 30 | help |
31 | Say Y here if you want the standard Speaker on Sparc PCI systems | 31 | Say Y here if you want the standard Speaker on Sparc PCI systems |
32 | to be used for bells and whistles. | 32 | to be used for bells and whistles. |
diff --git a/drivers/input/mouse/sermouse.c b/drivers/input/mouse/sermouse.c index 4bf584364d28..2f9a04ae725f 100644 --- a/drivers/input/mouse/sermouse.c +++ b/drivers/input/mouse/sermouse.c | |||
@@ -95,7 +95,7 @@ static void sermouse_process_msc(struct sermouse *sermouse, signed char data, st | |||
95 | 95 | ||
96 | input_sync(dev); | 96 | input_sync(dev); |
97 | 97 | ||
98 | if (++sermouse->count == (5 - ((sermouse->type == SERIO_SUN) << 1))) | 98 | if (++sermouse->count == 5) |
99 | sermouse->count = 0; | 99 | sermouse->count = 0; |
100 | } | 100 | } |
101 | 101 | ||
diff --git a/drivers/input/serio/i8042.h b/drivers/input/serio/i8042.h index 13835039a2a7..cbbf3842da5b 100644 --- a/drivers/input/serio/i8042.h +++ b/drivers/input/serio/i8042.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #include "i8042-ip22io.h" | 21 | #include "i8042-ip22io.h" |
22 | #elif defined(CONFIG_PPC) | 22 | #elif defined(CONFIG_PPC) |
23 | #include "i8042-ppcio.h" | 23 | #include "i8042-ppcio.h" |
24 | #elif defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) | 24 | #elif defined(CONFIG_SPARC) |
25 | #include "i8042-sparcio.h" | 25 | #include "i8042-sparcio.h" |
26 | #elif defined(CONFIG_X86) || defined(CONFIG_IA64) | 26 | #elif defined(CONFIG_X86) || defined(CONFIG_IA64) |
27 | #include "i8042-x86ia64io.h" | 27 | #include "i8042-x86ia64io.h" |
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c index 3fc8cdd94c3d..190878eef990 100644 --- a/drivers/macintosh/therm_pm72.c +++ b/drivers/macintosh/therm_pm72.c | |||
@@ -923,7 +923,7 @@ static void do_monitor_cpu_combined(void) | |||
923 | if (temp_combi >= ((state0->mpu.tmax + 8) << 16)) { | 923 | if (temp_combi >= ((state0->mpu.tmax + 8) << 16)) { |
924 | printk(KERN_WARNING "Warning ! Temperature way above maximum (%d) !\n", | 924 | printk(KERN_WARNING "Warning ! Temperature way above maximum (%d) !\n", |
925 | temp_combi >> 16); | 925 | temp_combi >> 16); |
926 | state0->overtemp = CPU_MAX_OVERTEMP; | 926 | state0->overtemp += CPU_MAX_OVERTEMP / 4; |
927 | } else if (temp_combi > (state0->mpu.tmax << 16)) | 927 | } else if (temp_combi > (state0->mpu.tmax << 16)) |
928 | state0->overtemp++; | 928 | state0->overtemp++; |
929 | else | 929 | else |
@@ -933,7 +933,7 @@ static void do_monitor_cpu_combined(void) | |||
933 | if (state0->overtemp > 0) { | 933 | if (state0->overtemp > 0) { |
934 | state0->rpm = state0->mpu.rmaxn_exhaust_fan; | 934 | state0->rpm = state0->mpu.rmaxn_exhaust_fan; |
935 | state0->intake_rpm = intake = state0->mpu.rmaxn_intake_fan; | 935 | state0->intake_rpm = intake = state0->mpu.rmaxn_intake_fan; |
936 | pump = state0->pump_min; | 936 | pump = state0->pump_max; |
937 | goto do_set_fans; | 937 | goto do_set_fans; |
938 | } | 938 | } |
939 | 939 | ||
@@ -998,7 +998,7 @@ static void do_monitor_cpu_split(struct cpu_pid_state *state) | |||
998 | printk(KERN_WARNING "Warning ! CPU %d temperature way above maximum" | 998 | printk(KERN_WARNING "Warning ! CPU %d temperature way above maximum" |
999 | " (%d) !\n", | 999 | " (%d) !\n", |
1000 | state->index, temp >> 16); | 1000 | state->index, temp >> 16); |
1001 | state->overtemp = CPU_MAX_OVERTEMP; | 1001 | state->overtemp += CPU_MAX_OVERTEMP / 4; |
1002 | } else if (temp > (state->mpu.tmax << 16)) | 1002 | } else if (temp > (state->mpu.tmax << 16)) |
1003 | state->overtemp++; | 1003 | state->overtemp++; |
1004 | else | 1004 | else |
@@ -1060,7 +1060,7 @@ static void do_monitor_cpu_rack(struct cpu_pid_state *state) | |||
1060 | printk(KERN_WARNING "Warning ! CPU %d temperature way above maximum" | 1060 | printk(KERN_WARNING "Warning ! CPU %d temperature way above maximum" |
1061 | " (%d) !\n", | 1061 | " (%d) !\n", |
1062 | state->index, temp >> 16); | 1062 | state->index, temp >> 16); |
1063 | state->overtemp = CPU_MAX_OVERTEMP; | 1063 | state->overtemp = CPU_MAX_OVERTEMP / 4; |
1064 | } else if (temp > (state->mpu.tmax << 16)) | 1064 | } else if (temp > (state->mpu.tmax << 16)) |
1065 | state->overtemp++; | 1065 | state->overtemp++; |
1066 | else | 1066 | else |
diff --git a/drivers/md/md.c b/drivers/md/md.c index cd12fca73b0d..8175a2a222da 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -1729,7 +1729,7 @@ level_show(mddev_t *mddev, char *page) | |||
1729 | if (p == NULL && mddev->raid_disks == 0) | 1729 | if (p == NULL && mddev->raid_disks == 0) |
1730 | return 0; | 1730 | return 0; |
1731 | if (mddev->level >= 0) | 1731 | if (mddev->level >= 0) |
1732 | return sprintf(page, "RAID-%d\n", mddev->level); | 1732 | return sprintf(page, "raid%d\n", mddev->level); |
1733 | else | 1733 | else |
1734 | return sprintf(page, "%s\n", p->name); | 1734 | return sprintf(page, "%s\n", p->name); |
1735 | } | 1735 | } |
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index 992be0be6b1e..7dae91e5863c 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c | |||
@@ -176,6 +176,9 @@ static void init_av7110_av(struct av7110 *av7110) | |||
176 | } | 176 | } |
177 | } | 177 | } |
178 | 178 | ||
179 | if (dev->pci->subsystem_vendor == 0x13c2 && dev->pci->subsystem_device == 0x000e) | ||
180 | av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, SpdifSwitch, 1, 0); // SPDIF on | ||
181 | |||
179 | ret = av7110_set_volume(av7110, av7110->mixer.volume_left, av7110->mixer.volume_right); | 182 | ret = av7110_set_volume(av7110, av7110->mixer.volume_left, av7110->mixer.volume_right); |
180 | if (ret < 0) | 183 | if (ret < 0) |
181 | printk("dvb-ttpci:cannot set volume :%d\n",ret); | 184 | printk("dvb-ttpci:cannot set volume :%d\n",ret); |
diff --git a/drivers/media/dvb/ttpci/av7110_hw.h b/drivers/media/dvb/ttpci/av7110_hw.h index fedd20f9815d..2a5e87ba1052 100644 --- a/drivers/media/dvb/ttpci/av7110_hw.h +++ b/drivers/media/dvb/ttpci/av7110_hw.h | |||
@@ -143,7 +143,8 @@ enum av7110_audio_command { | |||
143 | MainSwitch, | 143 | MainSwitch, |
144 | ADSwitch, | 144 | ADSwitch, |
145 | SendDiSEqC, | 145 | SendDiSEqC, |
146 | SetRegister | 146 | SetRegister, |
147 | SpdifSwitch | ||
147 | }; | 148 | }; |
148 | 149 | ||
149 | enum av7110_request_command { | 150 | enum av7110_request_command { |
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index aea3f038cff6..5b93723a1768 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c | |||
@@ -333,24 +333,30 @@ static int set_input(struct i2c_client *client, enum cx25840_input input) | |||
333 | 333 | ||
334 | static int set_v4lstd(struct i2c_client *client, v4l2_std_id std) | 334 | static int set_v4lstd(struct i2c_client *client, v4l2_std_id std) |
335 | { | 335 | { |
336 | u8 fmt; | 336 | u8 fmt=0; /* zero is autodetect */ |
337 | 337 | ||
338 | switch (std) { | 338 | /* First tests should be against specific std */ |
339 | /* zero is autodetect */ | 339 | if (std & V4L2_STD_NTSC_M_JP) { |
340 | case 0: fmt = 0x0; break; | 340 | fmt=0x2; |
341 | /* default ntsc to ntsc-m */ | 341 | } else if (std & V4L2_STD_NTSC_443) { |
342 | case V4L2_STD_NTSC: | 342 | fmt=0x3; |
343 | case V4L2_STD_NTSC_M: fmt = 0x1; break; | 343 | } else if (std & V4L2_STD_PAL_M) { |
344 | case V4L2_STD_NTSC_M_JP: fmt = 0x2; break; | 344 | fmt=0x5; |
345 | case V4L2_STD_NTSC_443: fmt = 0x3; break; | 345 | } else if (std & V4L2_STD_PAL_N) { |
346 | case V4L2_STD_PAL: fmt = 0x4; break; | 346 | fmt=0x6; |
347 | case V4L2_STD_PAL_M: fmt = 0x5; break; | 347 | } else if (std & V4L2_STD_PAL_Nc) { |
348 | case V4L2_STD_PAL_N: fmt = 0x6; break; | 348 | fmt=0x7; |
349 | case V4L2_STD_PAL_Nc: fmt = 0x7; break; | 349 | } else if (std & V4L2_STD_PAL_60) { |
350 | case V4L2_STD_PAL_60: fmt = 0x8; break; | 350 | fmt=0x8; |
351 | case V4L2_STD_SECAM: fmt = 0xc; break; | 351 | } else { |
352 | default: | 352 | /* Then, test against generic ones */ |
353 | return -ERANGE; | 353 | if (std & V4L2_STD_NTSC) { |
354 | fmt=0x1; | ||
355 | } else if (std & V4L2_STD_PAL) { | ||
356 | fmt=0x4; | ||
357 | } else if (std & V4L2_STD_SECAM) { | ||
358 | fmt=0xc; | ||
359 | } | ||
354 | } | 360 | } |
355 | 361 | ||
356 | cx25840_and_or(client, 0x400, ~0xf, fmt); | 362 | cx25840_and_or(client, 0x400, ~0xf, fmt); |
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c index ec11619f8ea9..0cfe75416ec6 100644 --- a/drivers/media/video/em28xx/em28xx-core.c +++ b/drivers/media/video/em28xx/em28xx-core.c | |||
@@ -39,7 +39,7 @@ MODULE_PARM_DESC(core_debug,"enable debug messages [core]"); | |||
39 | #define em28xx_coredbg(fmt, arg...) do {\ | 39 | #define em28xx_coredbg(fmt, arg...) do {\ |
40 | if (core_debug) \ | 40 | if (core_debug) \ |
41 | printk(KERN_INFO "%s %s :"fmt, \ | 41 | printk(KERN_INFO "%s %s :"fmt, \ |
42 | dev->name, __FUNCTION__, ##arg); } while (0) | 42 | dev->name, __FUNCTION__ , ##arg); } while (0) |
43 | 43 | ||
44 | static unsigned int reg_debug; | 44 | static unsigned int reg_debug; |
45 | module_param(reg_debug,int,0644); | 45 | module_param(reg_debug,int,0644); |
@@ -48,7 +48,7 @@ MODULE_PARM_DESC(reg_debug,"enable debug messages [URB reg]"); | |||
48 | #define em28xx_regdbg(fmt, arg...) do {\ | 48 | #define em28xx_regdbg(fmt, arg...) do {\ |
49 | if (reg_debug) \ | 49 | if (reg_debug) \ |
50 | printk(KERN_INFO "%s %s :"fmt, \ | 50 | printk(KERN_INFO "%s %s :"fmt, \ |
51 | dev->name, __FUNCTION__, ##arg); } while (0) | 51 | dev->name, __FUNCTION__ , ##arg); } while (0) |
52 | 52 | ||
53 | static unsigned int isoc_debug; | 53 | static unsigned int isoc_debug; |
54 | module_param(isoc_debug,int,0644); | 54 | module_param(isoc_debug,int,0644); |
@@ -57,7 +57,7 @@ MODULE_PARM_DESC(isoc_debug,"enable debug messages [isoc transfers]"); | |||
57 | #define em28xx_isocdbg(fmt, arg...) do {\ | 57 | #define em28xx_isocdbg(fmt, arg...) do {\ |
58 | if (isoc_debug) \ | 58 | if (isoc_debug) \ |
59 | printk(KERN_INFO "%s %s :"fmt, \ | 59 | printk(KERN_INFO "%s %s :"fmt, \ |
60 | dev->name, __FUNCTION__, ##arg); } while (0) | 60 | dev->name, __FUNCTION__ , ##arg); } while (0) |
61 | 61 | ||
62 | static int alt = EM28XX_PINOUT; | 62 | static int alt = EM28XX_PINOUT; |
63 | module_param(alt, int, 0644); | 63 | module_param(alt, int, 0644); |
diff --git a/drivers/media/video/em28xx/em28xx-i2c.c b/drivers/media/video/em28xx/em28xx-i2c.c index 29e21ad187cc..7f5603054f02 100644 --- a/drivers/media/video/em28xx/em28xx-i2c.c +++ b/drivers/media/video/em28xx/em28xx-i2c.c | |||
@@ -44,7 +44,7 @@ MODULE_PARM_DESC(i2c_debug, "enable debug messages [i2c]"); | |||
44 | printk(fmt, ##args); } while (0) | 44 | printk(fmt, ##args); } while (0) |
45 | #define dprintk2(lvl,fmt, args...) if (i2c_debug>=lvl) do{ \ | 45 | #define dprintk2(lvl,fmt, args...) if (i2c_debug>=lvl) do{ \ |
46 | printk(KERN_DEBUG "%s at %s: " fmt, \ | 46 | printk(KERN_DEBUG "%s at %s: " fmt, \ |
47 | dev->name, __FUNCTION__, ##args); } while (0) | 47 | dev->name, __FUNCTION__ , ##args); } while (0) |
48 | 48 | ||
49 | /* | 49 | /* |
50 | * em2800_i2c_send_max4() | 50 | * em2800_i2c_send_max4() |
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index 8ecaa0803e08..06d76879bde2 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c | |||
@@ -45,7 +45,7 @@ | |||
45 | #define em28xx_videodbg(fmt, arg...) do {\ | 45 | #define em28xx_videodbg(fmt, arg...) do {\ |
46 | if (video_debug) \ | 46 | if (video_debug) \ |
47 | printk(KERN_INFO "%s %s :"fmt, \ | 47 | printk(KERN_INFO "%s %s :"fmt, \ |
48 | dev->name, __FUNCTION__, ##arg); } while (0) | 48 | dev->name, __FUNCTION__ , ##arg); } while (0) |
49 | 49 | ||
50 | MODULE_AUTHOR(DRIVER_AUTHOR); | 50 | MODULE_AUTHOR(DRIVER_AUTHOR); |
51 | MODULE_DESCRIPTION(DRIVER_DESC); | 51 | MODULE_DESCRIPTION(DRIVER_DESC); |
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index 1e2ee43db394..5c7a41ce69f3 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h | |||
@@ -392,18 +392,18 @@ extern const unsigned int em28xx_bcount; | |||
392 | /* printk macros */ | 392 | /* printk macros */ |
393 | 393 | ||
394 | #define em28xx_err(fmt, arg...) do {\ | 394 | #define em28xx_err(fmt, arg...) do {\ |
395 | printk(KERN_ERR fmt, ##arg); } while (0) | 395 | printk(KERN_ERR fmt , ##arg); } while (0) |
396 | 396 | ||
397 | #define em28xx_errdev(fmt, arg...) do {\ | 397 | #define em28xx_errdev(fmt, arg...) do {\ |
398 | printk(KERN_ERR "%s: "fmt,\ | 398 | printk(KERN_ERR "%s: "fmt,\ |
399 | dev->name, ##arg); } while (0) | 399 | dev->name , ##arg); } while (0) |
400 | 400 | ||
401 | #define em28xx_info(fmt, arg...) do {\ | 401 | #define em28xx_info(fmt, arg...) do {\ |
402 | printk(KERN_INFO "%s: "fmt,\ | 402 | printk(KERN_INFO "%s: "fmt,\ |
403 | dev->name, ##arg); } while (0) | 403 | dev->name , ##arg); } while (0) |
404 | #define em28xx_warn(fmt, arg...) do {\ | 404 | #define em28xx_warn(fmt, arg...) do {\ |
405 | printk(KERN_WARNING "%s: "fmt,\ | 405 | printk(KERN_WARNING "%s: "fmt,\ |
406 | dev->name, ##arg); } while (0) | 406 | dev->name , ##arg); } while (0) |
407 | 407 | ||
408 | inline static int em28xx_audio_source(struct em28xx *dev, int input) | 408 | inline static int em28xx_audio_source(struct em28xx *dev, int input) |
409 | { | 409 | { |
diff --git a/drivers/media/video/saa7127.c b/drivers/media/video/saa7127.c index 3428e1ed0032..c36f014f1fdf 100644 --- a/drivers/media/video/saa7127.c +++ b/drivers/media/video/saa7127.c | |||
@@ -389,7 +389,7 @@ static int saa7127_set_vps(struct i2c_client *client, struct v4l2_sliced_vbi_dat | |||
389 | static int saa7127_set_cc(struct i2c_client *client, struct v4l2_sliced_vbi_data *data) | 389 | static int saa7127_set_cc(struct i2c_client *client, struct v4l2_sliced_vbi_data *data) |
390 | { | 390 | { |
391 | struct saa7127_state *state = i2c_get_clientdata(client); | 391 | struct saa7127_state *state = i2c_get_clientdata(client); |
392 | u16 cc = data->data[0] << 8 | data->data[1]; | 392 | u16 cc = data->data[1] << 8 | data->data[0]; |
393 | int enable = (data->line != 0); | 393 | int enable = (data->line != 0); |
394 | 394 | ||
395 | if (enable && (data->field != 0 || data->line != 21)) | 395 | if (enable && (data->field != 0 || data->line != 21)) |
@@ -397,7 +397,7 @@ static int saa7127_set_cc(struct i2c_client *client, struct v4l2_sliced_vbi_data | |||
397 | if (state->cc_enable != enable) { | 397 | if (state->cc_enable != enable) { |
398 | saa7127_dbg("Turn CC %s\n", enable ? "on" : "off"); | 398 | saa7127_dbg("Turn CC %s\n", enable ? "on" : "off"); |
399 | saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, | 399 | saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, |
400 | (enable << 6) | 0x11); | 400 | (state->xds_enable << 7) | (enable << 6) | 0x11); |
401 | state->cc_enable = enable; | 401 | state->cc_enable = enable; |
402 | } | 402 | } |
403 | if (!enable) | 403 | if (!enable) |
@@ -423,7 +423,7 @@ static int saa7127_set_xds(struct i2c_client *client, struct v4l2_sliced_vbi_dat | |||
423 | if (state->xds_enable != enable) { | 423 | if (state->xds_enable != enable) { |
424 | saa7127_dbg("Turn XDS %s\n", enable ? "on" : "off"); | 424 | saa7127_dbg("Turn XDS %s\n", enable ? "on" : "off"); |
425 | saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, | 425 | saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, |
426 | (enable << 7) | 0x11); | 426 | (enable << 7) | (state->cc_enable << 6) | 0x11); |
427 | state->xds_enable = enable; | 427 | state->xds_enable = enable; |
428 | } | 428 | } |
429 | if (!enable) | 429 | if (!enable) |
diff --git a/drivers/media/video/saa7134/Kconfig b/drivers/media/video/saa7134/Kconfig index c512c4411b38..8a5c3e71b37d 100644 --- a/drivers/media/video/saa7134/Kconfig +++ b/drivers/media/video/saa7134/Kconfig | |||
@@ -1,11 +1,10 @@ | |||
1 | config VIDEO_SAA7134 | 1 | config VIDEO_SAA7134 |
2 | tristate "Philips SAA7134 support" | 2 | tristate "Philips SAA7134 support" |
3 | depends on VIDEO_DEV && PCI && I2C && SOUND && SND | 3 | depends on VIDEO_DEV && PCI && I2C |
4 | select VIDEO_BUF | 4 | select VIDEO_BUF |
5 | select VIDEO_IR | 5 | select VIDEO_IR |
6 | select VIDEO_TUNER | 6 | select VIDEO_TUNER |
7 | select CRC32 | 7 | select CRC32 |
8 | select SND_PCM_OSS | ||
9 | ---help--- | 8 | ---help--- |
10 | This is a video4linux driver for Philips SAA713x based | 9 | This is a video4linux driver for Philips SAA713x based |
11 | TV cards. | 10 | TV cards. |
@@ -13,6 +12,29 @@ config VIDEO_SAA7134 | |||
13 | To compile this driver as a module, choose M here: the | 12 | To compile this driver as a module, choose M here: the |
14 | module will be called saa7134. | 13 | module will be called saa7134. |
15 | 14 | ||
15 | config VIDEO_SAA7134_ALSA | ||
16 | tristate "Philips SAA7134 DMA audio support" | ||
17 | depends on VIDEO_SAA7134 && SND | ||
18 | select SND_PCM_OSS | ||
19 | ---help--- | ||
20 | This is a video4linux driver for direct (DMA) audio in | ||
21 | Philips SAA713x based TV cards using ALSA | ||
22 | |||
23 | To compile this driver as a module, choose M here: the | ||
24 | module will be called saa7134-alsa. | ||
25 | |||
26 | config VIDEO_SAA7134_OSS | ||
27 | tristate "Philips SAA7134 DMA audio support (OSS, DEPRECATED)" | ||
28 | depends on VIDEO_SAA7134 && SOUND_PRIME && !VIDEO_SAA7134_ALSA | ||
29 | ---help--- | ||
30 | This is a video4linux driver for direct (DMA) audio in | ||
31 | Philips SAA713x based TV cards using OSS | ||
32 | |||
33 | This is deprecated in favor of the ALSA module | ||
34 | |||
35 | To compile this driver as a module, choose M here: the | ||
36 | module will be called saa7134-oss. | ||
37 | |||
16 | config VIDEO_SAA7134_DVB | 38 | config VIDEO_SAA7134_DVB |
17 | tristate "DVB/ATSC Support for saa7134 based TV cards" | 39 | tristate "DVB/ATSC Support for saa7134 based TV cards" |
18 | depends on VIDEO_SAA7134 && DVB_CORE | 40 | depends on VIDEO_SAA7134 && DVB_CORE |
diff --git a/drivers/media/video/saa7134/Makefile b/drivers/media/video/saa7134/Makefile index 134f83a96218..1ba998424bbd 100644 --- a/drivers/media/video/saa7134/Makefile +++ b/drivers/media/video/saa7134/Makefile | |||
@@ -4,8 +4,11 @@ saa7134-objs := saa7134-cards.o saa7134-core.o saa7134-i2c.o \ | |||
4 | saa7134-video.o saa7134-input.o | 4 | saa7134-video.o saa7134-input.o |
5 | 5 | ||
6 | obj-$(CONFIG_VIDEO_SAA7134) += saa7134.o saa7134-empress.o \ | 6 | obj-$(CONFIG_VIDEO_SAA7134) += saa7134.o saa7134-empress.o \ |
7 | saa6752hs.o saa7134-alsa.o \ | 7 | saa6752hs.o |
8 | saa7134-oss.o | 8 | |
9 | obj-$(CONFIG_VIDEO_SAA7134_ALSA) += saa7134-alsa.o | ||
10 | obj-$(CONFIG_VIDEO_SAA7134_OSS) += saa7134-oss.o | ||
11 | |||
9 | obj-$(CONFIG_VIDEO_SAA7134_DVB) += saa7134-dvb.o | 12 | obj-$(CONFIG_VIDEO_SAA7134_DVB) += saa7134-dvb.o |
10 | 13 | ||
11 | EXTRA_CFLAGS += -I$(src)/.. | 14 | EXTRA_CFLAGS += -I$(src)/.. |
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c index b24a26b065c2..ade05f75fdb0 100644 --- a/drivers/media/video/saa7134/saa7134-alsa.c +++ b/drivers/media/video/saa7134/saa7134-alsa.c | |||
@@ -60,7 +60,7 @@ module_param_array(index, int, NULL, 0444); | |||
60 | MODULE_PARM_DESC(index, "Index value for SAA7134 capture interface(s)."); | 60 | MODULE_PARM_DESC(index, "Index value for SAA7134 capture interface(s)."); |
61 | 61 | ||
62 | #define dprintk(fmt, arg...) if (debug) \ | 62 | #define dprintk(fmt, arg...) if (debug) \ |
63 | printk(KERN_DEBUG "%s/alsa: " fmt, dev->name, ## arg) | 63 | printk(KERN_DEBUG "%s/alsa: " fmt, dev->name , ##arg) |
64 | 64 | ||
65 | 65 | ||
66 | 66 | ||
@@ -989,6 +989,14 @@ static int saa7134_alsa_init(void) | |||
989 | struct saa7134_dev *dev = NULL; | 989 | struct saa7134_dev *dev = NULL; |
990 | struct list_head *list; | 990 | struct list_head *list; |
991 | 991 | ||
992 | if (!dmasound_init && !dmasound_exit) { | ||
993 | dmasound_init = alsa_device_init; | ||
994 | dmasound_exit = alsa_device_exit; | ||
995 | } else { | ||
996 | printk(KERN_WARNING "saa7134 ALSA: can't load, DMA sound handler already assigned (probably to OSS)\n"); | ||
997 | return -EBUSY; | ||
998 | } | ||
999 | |||
992 | printk(KERN_INFO "saa7134 ALSA driver for DMA sound loaded\n"); | 1000 | printk(KERN_INFO "saa7134 ALSA driver for DMA sound loaded\n"); |
993 | 1001 | ||
994 | list_for_each(list,&saa7134_devlist) { | 1002 | list_for_each(list,&saa7134_devlist) { |
@@ -1001,9 +1009,6 @@ static int saa7134_alsa_init(void) | |||
1001 | } | 1009 | } |
1002 | } | 1010 | } |
1003 | 1011 | ||
1004 | dmasound_init = alsa_device_init; | ||
1005 | dmasound_exit = alsa_device_exit; | ||
1006 | |||
1007 | if (dev == NULL) | 1012 | if (dev == NULL) |
1008 | printk(KERN_INFO "saa7134 ALSA: no saa7134 cards found\n"); | 1013 | printk(KERN_INFO "saa7134 ALSA: no saa7134 cards found\n"); |
1009 | 1014 | ||
@@ -1023,12 +1028,15 @@ static void saa7134_alsa_exit(void) | |||
1023 | snd_card_free(snd_saa7134_cards[idx]); | 1028 | snd_card_free(snd_saa7134_cards[idx]); |
1024 | } | 1029 | } |
1025 | 1030 | ||
1031 | dmasound_init = NULL; | ||
1032 | dmasound_exit = NULL; | ||
1026 | printk(KERN_INFO "saa7134 ALSA driver for DMA sound unloaded\n"); | 1033 | printk(KERN_INFO "saa7134 ALSA driver for DMA sound unloaded\n"); |
1027 | 1034 | ||
1028 | return; | 1035 | return; |
1029 | } | 1036 | } |
1030 | 1037 | ||
1031 | module_init(saa7134_alsa_init); | 1038 | /* We initialize this late, to make sure the sound system is up and running */ |
1039 | late_initcall(saa7134_alsa_init); | ||
1032 | module_exit(saa7134_alsa_exit); | 1040 | module_exit(saa7134_alsa_exit); |
1033 | MODULE_LICENSE("GPL"); | 1041 | MODULE_LICENSE("GPL"); |
1034 | MODULE_AUTHOR("Ricardo Cerqueira"); | 1042 | MODULE_AUTHOR("Ricardo Cerqueira"); |
diff --git a/drivers/media/video/saa7134/saa7134-oss.c b/drivers/media/video/saa7134/saa7134-oss.c index 513a699a6df2..8badd2a9cb2f 100644 --- a/drivers/media/video/saa7134/saa7134-oss.c +++ b/drivers/media/video/saa7134/saa7134-oss.c | |||
@@ -959,8 +959,17 @@ static int saa7134_oss_init(void) | |||
959 | struct saa7134_dev *dev = NULL; | 959 | struct saa7134_dev *dev = NULL; |
960 | struct list_head *list; | 960 | struct list_head *list; |
961 | 961 | ||
962 | if (!dmasound_init && !dmasound_exit) { | ||
963 | dmasound_init = oss_device_init; | ||
964 | dmasound_exit = oss_device_exit; | ||
965 | } else { | ||
966 | printk(KERN_WARNING "saa7134 OSS: can't load, DMA sound handler already assigned (probably to ALSA)\n"); | ||
967 | return -EBUSY; | ||
968 | } | ||
969 | |||
962 | printk(KERN_INFO "saa7134 OSS driver for DMA sound loaded\n"); | 970 | printk(KERN_INFO "saa7134 OSS driver for DMA sound loaded\n"); |
963 | 971 | ||
972 | |||
964 | list_for_each(list,&saa7134_devlist) { | 973 | list_for_each(list,&saa7134_devlist) { |
965 | dev = list_entry(list, struct saa7134_dev, devlist); | 974 | dev = list_entry(list, struct saa7134_dev, devlist); |
966 | if (dev->dmasound.priv_data == NULL) { | 975 | if (dev->dmasound.priv_data == NULL) { |
@@ -974,9 +983,6 @@ static int saa7134_oss_init(void) | |||
974 | if (dev == NULL) | 983 | if (dev == NULL) |
975 | printk(KERN_INFO "saa7134 OSS: no saa7134 cards found\n"); | 984 | printk(KERN_INFO "saa7134 OSS: no saa7134 cards found\n"); |
976 | 985 | ||
977 | dmasound_init = oss_device_init; | ||
978 | dmasound_exit = oss_device_exit; | ||
979 | |||
980 | return 0; | 986 | return 0; |
981 | 987 | ||
982 | } | 988 | } |
@@ -997,12 +1003,16 @@ static void saa7134_oss_exit(void) | |||
997 | 1003 | ||
998 | } | 1004 | } |
999 | 1005 | ||
1006 | dmasound_init = NULL; | ||
1007 | dmasound_exit = NULL; | ||
1008 | |||
1000 | printk(KERN_INFO "saa7134 OSS driver for DMA sound unloaded\n"); | 1009 | printk(KERN_INFO "saa7134 OSS driver for DMA sound unloaded\n"); |
1001 | 1010 | ||
1002 | return; | 1011 | return; |
1003 | } | 1012 | } |
1004 | 1013 | ||
1005 | module_init(saa7134_oss_init); | 1014 | /* We initialize this late, to make sure the sound system is up and running */ |
1015 | late_initcall(saa7134_oss_init); | ||
1006 | module_exit(saa7134_oss_exit); | 1016 | module_exit(saa7134_oss_exit); |
1007 | MODULE_LICENSE("GPL"); | 1017 | MODULE_LICENSE("GPL"); |
1008 | MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); | 1018 | MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); |
diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c index cd7cf1bd12b4..5ac235365dd8 100644 --- a/drivers/media/video/tveeprom.c +++ b/drivers/media/video/tveeprom.c | |||
@@ -206,7 +206,7 @@ hauppauge_tuner[] = | |||
206 | { TUNER_ABSENT, "TCL 2002MI_3H"}, | 206 | { TUNER_ABSENT, "TCL 2002MI_3H"}, |
207 | { TUNER_TCL_2002N, "TCL 2002N 5H"}, | 207 | { TUNER_TCL_2002N, "TCL 2002N 5H"}, |
208 | /* 100-109 */ | 208 | /* 100-109 */ |
209 | { TUNER_ABSENT, "Philips FMD1216ME"}, | 209 | { TUNER_PHILIPS_FMD1216ME_MK3, "Philips FMD1216ME"}, |
210 | { TUNER_TEA5767, "Philips TEA5768HL FM Radio"}, | 210 | { TUNER_TEA5767, "Philips TEA5768HL FM Radio"}, |
211 | { TUNER_ABSENT, "Panasonic ENV57H12D5"}, | 211 | { TUNER_ABSENT, "Panasonic ENV57H12D5"}, |
212 | { TUNER_PHILIPS_FM1236_MK3, "TCL MFNM05-4"}, | 212 | { TUNER_PHILIPS_FM1236_MK3, "TCL MFNM05-4"}, |
diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c index d91fcf7c3178..abcf19116d70 100644 --- a/drivers/mmc/mmc_block.c +++ b/drivers/mmc/mmc_block.c | |||
@@ -359,7 +359,12 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card) | |||
359 | md->block_bits = card->csd.read_blkbits; | 359 | md->block_bits = card->csd.read_blkbits; |
360 | 360 | ||
361 | blk_queue_hardsect_size(md->queue.queue, 1 << md->block_bits); | 361 | blk_queue_hardsect_size(md->queue.queue, 1 << md->block_bits); |
362 | set_capacity(md->disk, card->csd.capacity); | 362 | |
363 | /* | ||
364 | * The CSD capacity field is in units of read_blkbits. | ||
365 | * set_capacity takes units of 512 bytes. | ||
366 | */ | ||
367 | set_capacity(md->disk, card->csd.capacity << (card->csd.read_blkbits - 9)); | ||
363 | } | 368 | } |
364 | out: | 369 | out: |
365 | return md; | 370 | return md; |
@@ -373,7 +378,7 @@ mmc_blk_set_blksize(struct mmc_blk_data *md, struct mmc_card *card) | |||
373 | 378 | ||
374 | mmc_card_claim_host(card); | 379 | mmc_card_claim_host(card); |
375 | cmd.opcode = MMC_SET_BLOCKLEN; | 380 | cmd.opcode = MMC_SET_BLOCKLEN; |
376 | cmd.arg = 1 << card->csd.read_blkbits; | 381 | cmd.arg = 1 << md->block_bits; |
377 | cmd.flags = MMC_RSP_R1; | 382 | cmd.flags = MMC_RSP_R1; |
378 | err = mmc_wait_for_cmd(card->host, &cmd, 5); | 383 | err = mmc_wait_for_cmd(card->host, &cmd, 5); |
379 | mmc_card_release_host(card); | 384 | mmc_card_release_host(card); |
@@ -412,10 +417,9 @@ static int mmc_blk_probe(struct mmc_card *card) | |||
412 | if (err) | 417 | if (err) |
413 | goto out; | 418 | goto out; |
414 | 419 | ||
415 | printk(KERN_INFO "%s: %s %s %dKiB %s\n", | 420 | printk(KERN_INFO "%s: %s %s %luKiB %s\n", |
416 | md->disk->disk_name, mmc_card_id(card), mmc_card_name(card), | 421 | md->disk->disk_name, mmc_card_id(card), mmc_card_name(card), |
417 | (card->csd.capacity << card->csd.read_blkbits) / 1024, | 422 | get_capacity(md->disk) >> 1, mmc_blk_readonly(card)?"(ro)":""); |
418 | mmc_blk_readonly(card)?"(ro)":""); | ||
419 | 423 | ||
420 | mmc_set_drvdata(card, md); | 424 | mmc_set_drvdata(card, md); |
421 | add_disk(md->disk); | 425 | add_disk(md->disk); |
diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig index 452ccd5037c3..b9b77cf39a18 100644 --- a/drivers/mtd/maps/Kconfig +++ b/drivers/mtd/maps/Kconfig | |||
@@ -62,7 +62,7 @@ config MTD_PHYSMAP_BANKWIDTH | |||
62 | 62 | ||
63 | config MTD_SUN_UFLASH | 63 | config MTD_SUN_UFLASH |
64 | tristate "Sun Microsystems userflash support" | 64 | tristate "Sun Microsystems userflash support" |
65 | depends on (SPARC32 || SPARC64) && MTD_CFI | 65 | depends on SPARC && MTD_CFI |
66 | help | 66 | help |
67 | This provides a 'mapping' driver which supports the way in | 67 | This provides a 'mapping' driver which supports the way in |
68 | which user-programmable flash chips are connected on various | 68 | which user-programmable flash chips are connected on various |
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 525624fc03b4..c39344adecce 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -10,7 +10,7 @@ | |||
10 | * trademarks of NVIDIA Corporation in the United States and other | 10 | * trademarks of NVIDIA Corporation in the United States and other |
11 | * countries. | 11 | * countries. |
12 | * | 12 | * |
13 | * Copyright (C) 2003,4 Manfred Spraul | 13 | * Copyright (C) 2003,4,5 Manfred Spraul |
14 | * Copyright (C) 2004 Andrew de Quincey (wol support) | 14 | * Copyright (C) 2004 Andrew de Quincey (wol support) |
15 | * Copyright (C) 2004 Carl-Daniel Hailfinger (invalid MAC handling, insane | 15 | * Copyright (C) 2004 Carl-Daniel Hailfinger (invalid MAC handling, insane |
16 | * IRQ rate fixes, bigendian fixes, cleanups, verification) | 16 | * IRQ rate fixes, bigendian fixes, cleanups, verification) |
@@ -100,6 +100,7 @@ | |||
100 | * 0.45: 18 Sep 2005: Remove nv_stop/start_rx from every link check | 100 | * 0.45: 18 Sep 2005: Remove nv_stop/start_rx from every link check |
101 | * 0.46: 20 Oct 2005: Add irq optimization modes. | 101 | * 0.46: 20 Oct 2005: Add irq optimization modes. |
102 | * 0.47: 26 Oct 2005: Add phyaddr 0 in phy scan. | 102 | * 0.47: 26 Oct 2005: Add phyaddr 0 in phy scan. |
103 | * 0.48: 24 Dec 2005: Disable TSO, bugfix for pci_map_single | ||
103 | * | 104 | * |
104 | * Known bugs: | 105 | * Known bugs: |
105 | * We suspect that on some hardware no TX done interrupts are generated. | 106 | * We suspect that on some hardware no TX done interrupts are generated. |
@@ -111,7 +112,7 @@ | |||
111 | * DEV_NEED_TIMERIRQ will not harm you on sane hardware, only generating a few | 112 | * DEV_NEED_TIMERIRQ will not harm you on sane hardware, only generating a few |
112 | * superfluous timer interrupts from the nic. | 113 | * superfluous timer interrupts from the nic. |
113 | */ | 114 | */ |
114 | #define FORCEDETH_VERSION "0.47" | 115 | #define FORCEDETH_VERSION "0.48" |
115 | #define DRV_NAME "forcedeth" | 116 | #define DRV_NAME "forcedeth" |
116 | 117 | ||
117 | #include <linux/module.h> | 118 | #include <linux/module.h> |
@@ -871,8 +872,8 @@ static int nv_alloc_rx(struct net_device *dev) | |||
871 | } else { | 872 | } else { |
872 | skb = np->rx_skbuff[nr]; | 873 | skb = np->rx_skbuff[nr]; |
873 | } | 874 | } |
874 | np->rx_dma[nr] = pci_map_single(np->pci_dev, skb->data, skb->len, | 875 | np->rx_dma[nr] = pci_map_single(np->pci_dev, skb->data, |
875 | PCI_DMA_FROMDEVICE); | 876 | skb->end-skb->data, PCI_DMA_FROMDEVICE); |
876 | if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) { | 877 | if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) { |
877 | np->rx_ring.orig[nr].PacketBuffer = cpu_to_le32(np->rx_dma[nr]); | 878 | np->rx_ring.orig[nr].PacketBuffer = cpu_to_le32(np->rx_dma[nr]); |
878 | wmb(); | 879 | wmb(); |
@@ -999,7 +1000,7 @@ static void nv_drain_rx(struct net_device *dev) | |||
999 | wmb(); | 1000 | wmb(); |
1000 | if (np->rx_skbuff[i]) { | 1001 | if (np->rx_skbuff[i]) { |
1001 | pci_unmap_single(np->pci_dev, np->rx_dma[i], | 1002 | pci_unmap_single(np->pci_dev, np->rx_dma[i], |
1002 | np->rx_skbuff[i]->len, | 1003 | np->rx_skbuff[i]->end-np->rx_skbuff[i]->data, |
1003 | PCI_DMA_FROMDEVICE); | 1004 | PCI_DMA_FROMDEVICE); |
1004 | dev_kfree_skb(np->rx_skbuff[i]); | 1005 | dev_kfree_skb(np->rx_skbuff[i]); |
1005 | np->rx_skbuff[i] = NULL; | 1006 | np->rx_skbuff[i] = NULL; |
@@ -1334,7 +1335,7 @@ static void nv_rx_process(struct net_device *dev) | |||
1334 | * the performance. | 1335 | * the performance. |
1335 | */ | 1336 | */ |
1336 | pci_unmap_single(np->pci_dev, np->rx_dma[i], | 1337 | pci_unmap_single(np->pci_dev, np->rx_dma[i], |
1337 | np->rx_skbuff[i]->len, | 1338 | np->rx_skbuff[i]->end-np->rx_skbuff[i]->data, |
1338 | PCI_DMA_FROMDEVICE); | 1339 | PCI_DMA_FROMDEVICE); |
1339 | 1340 | ||
1340 | { | 1341 | { |
@@ -2455,7 +2456,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i | |||
2455 | np->txrxctl_bits |= NVREG_TXRXCTL_RXCHECK; | 2456 | np->txrxctl_bits |= NVREG_TXRXCTL_RXCHECK; |
2456 | dev->features |= NETIF_F_HW_CSUM | NETIF_F_SG; | 2457 | dev->features |= NETIF_F_HW_CSUM | NETIF_F_SG; |
2457 | #ifdef NETIF_F_TSO | 2458 | #ifdef NETIF_F_TSO |
2458 | dev->features |= NETIF_F_TSO; | 2459 | /* disabled dev->features |= NETIF_F_TSO; */ |
2459 | #endif | 2460 | #endif |
2460 | } | 2461 | } |
2461 | 2462 | ||
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 16bebe7a7ce1..7da0e3dd5fe3 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
@@ -38,6 +38,10 @@ | |||
38 | #include <asm/irq.h> | 38 | #include <asm/irq.h> |
39 | #include <asm/uaccess.h> | 39 | #include <asm/uaccess.h> |
40 | 40 | ||
41 | MODULE_DESCRIPTION("PHY library"); | ||
42 | MODULE_AUTHOR("Andy Fleming"); | ||
43 | MODULE_LICENSE("GPL"); | ||
44 | |||
41 | static struct phy_driver genphy_driver; | 45 | static struct phy_driver genphy_driver; |
42 | extern int mdio_bus_init(void); | 46 | extern int mdio_bus_init(void); |
43 | extern void mdio_bus_exit(void); | 47 | extern void mdio_bus_exit(void); |
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index 50430f79f8cf..1c6d328165bb 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c | |||
@@ -524,9 +524,6 @@ static int get_filter(void __user *arg, struct sock_filter **p) | |||
524 | if (copy_from_user(&uprog, arg, sizeof(uprog))) | 524 | if (copy_from_user(&uprog, arg, sizeof(uprog))) |
525 | return -EFAULT; | 525 | return -EFAULT; |
526 | 526 | ||
527 | if (uprog.len > BPF_MAXINSNS) | ||
528 | return -EINVAL; | ||
529 | |||
530 | if (!uprog.len) { | 527 | if (!uprog.len) { |
531 | *p = NULL; | 528 | *p = NULL; |
532 | return 0; | 529 | return 0; |
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index 081717d01374..28ce47a02408 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -2907,7 +2907,7 @@ static int __devinit gem_get_device_address(struct gem *gp) | |||
2907 | return 0; | 2907 | return 0; |
2908 | } | 2908 | } |
2909 | 2909 | ||
2910 | static void __devexit gem_remove_one(struct pci_dev *pdev) | 2910 | static void gem_remove_one(struct pci_dev *pdev) |
2911 | { | 2911 | { |
2912 | struct net_device *dev = pci_get_drvdata(pdev); | 2912 | struct net_device *dev = pci_get_drvdata(pdev); |
2913 | 2913 | ||
@@ -3181,7 +3181,7 @@ static struct pci_driver gem_driver = { | |||
3181 | .name = GEM_MODULE_NAME, | 3181 | .name = GEM_MODULE_NAME, |
3182 | .id_table = gem_pci_tbl, | 3182 | .id_table = gem_pci_tbl, |
3183 | .probe = gem_init_one, | 3183 | .probe = gem_init_one, |
3184 | .remove = __devexit_p(gem_remove_one), | 3184 | .remove = gem_remove_one, |
3185 | #ifdef CONFIG_PM | 3185 | #ifdef CONFIG_PM |
3186 | .suspend = gem_suspend, | 3186 | .suspend = gem_suspend, |
3187 | .resume = gem_resume, | 3187 | .resume = gem_resume, |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index a23ed28a72b8..2fc9893d69e1 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -68,8 +68,8 @@ | |||
68 | 68 | ||
69 | #define DRV_MODULE_NAME "tg3" | 69 | #define DRV_MODULE_NAME "tg3" |
70 | #define PFX DRV_MODULE_NAME ": " | 70 | #define PFX DRV_MODULE_NAME ": " |
71 | #define DRV_MODULE_VERSION "3.45" | 71 | #define DRV_MODULE_VERSION "3.47" |
72 | #define DRV_MODULE_RELDATE "Dec 13, 2005" | 72 | #define DRV_MODULE_RELDATE "Dec 28, 2005" |
73 | 73 | ||
74 | #define TG3_DEF_MAC_MODE 0 | 74 | #define TG3_DEF_MAC_MODE 0 |
75 | #define TG3_DEF_RX_MODE 0 | 75 | #define TG3_DEF_RX_MODE 0 |
@@ -341,6 +341,16 @@ static struct { | |||
341 | { "interrupt test (offline)" }, | 341 | { "interrupt test (offline)" }, |
342 | }; | 342 | }; |
343 | 343 | ||
344 | static void tg3_write32(struct tg3 *tp, u32 off, u32 val) | ||
345 | { | ||
346 | writel(val, tp->regs + off); | ||
347 | } | ||
348 | |||
349 | static u32 tg3_read32(struct tg3 *tp, u32 off) | ||
350 | { | ||
351 | return (readl(tp->regs + off)); | ||
352 | } | ||
353 | |||
344 | static void tg3_write_indirect_reg32(struct tg3 *tp, u32 off, u32 val) | 354 | static void tg3_write_indirect_reg32(struct tg3 *tp, u32 off, u32 val) |
345 | { | 355 | { |
346 | unsigned long flags; | 356 | unsigned long flags; |
@@ -411,13 +421,29 @@ static u32 tg3_read_indirect_mbox(struct tg3 *tp, u32 off) | |||
411 | return val; | 421 | return val; |
412 | } | 422 | } |
413 | 423 | ||
414 | static void _tw32_flush(struct tg3 *tp, u32 off, u32 val) | 424 | /* usec_wait specifies the wait time in usec when writing to certain registers |
425 | * where it is unsafe to read back the register without some delay. | ||
426 | * GRC_LOCAL_CTRL is one example if the GPIOs are toggled to switch power. | ||
427 | * TG3PCI_CLOCK_CTRL is another example if the clock frequencies are changed. | ||
428 | */ | ||
429 | static void _tw32_flush(struct tg3 *tp, u32 off, u32 val, u32 usec_wait) | ||
415 | { | 430 | { |
416 | tp->write32(tp, off, val); | 431 | if ((tp->tg3_flags & TG3_FLAG_PCIX_TARGET_HWBUG) || |
417 | if (!(tp->tg3_flags & TG3_FLAG_PCIX_TARGET_HWBUG) && | 432 | (tp->tg3_flags2 & TG3_FLG2_ICH_WORKAROUND)) |
418 | !(tp->tg3_flags & TG3_FLAG_5701_REG_WRITE_BUG) && | 433 | /* Non-posted methods */ |
419 | !(tp->tg3_flags2 & TG3_FLG2_ICH_WORKAROUND)) | 434 | tp->write32(tp, off, val); |
420 | tp->read32(tp, off); /* flush */ | 435 | else { |
436 | /* Posted method */ | ||
437 | tg3_write32(tp, off, val); | ||
438 | if (usec_wait) | ||
439 | udelay(usec_wait); | ||
440 | tp->read32(tp, off); | ||
441 | } | ||
442 | /* Wait again after the read for the posted method to guarantee that | ||
443 | * the wait time is met. | ||
444 | */ | ||
445 | if (usec_wait) | ||
446 | udelay(usec_wait); | ||
421 | } | 447 | } |
422 | 448 | ||
423 | static inline void tw32_mailbox_flush(struct tg3 *tp, u32 off, u32 val) | 449 | static inline void tw32_mailbox_flush(struct tg3 *tp, u32 off, u32 val) |
@@ -438,16 +464,6 @@ static void tg3_write32_tx_mbox(struct tg3 *tp, u32 off, u32 val) | |||
438 | readl(mbox); | 464 | readl(mbox); |
439 | } | 465 | } |
440 | 466 | ||
441 | static void tg3_write32(struct tg3 *tp, u32 off, u32 val) | ||
442 | { | ||
443 | writel(val, tp->regs + off); | ||
444 | } | ||
445 | |||
446 | static u32 tg3_read32(struct tg3 *tp, u32 off) | ||
447 | { | ||
448 | return (readl(tp->regs + off)); | ||
449 | } | ||
450 | |||
451 | #define tw32_mailbox(reg, val) tp->write32_mbox(tp, reg, val) | 467 | #define tw32_mailbox(reg, val) tp->write32_mbox(tp, reg, val) |
452 | #define tw32_mailbox_f(reg, val) tw32_mailbox_flush(tp, (reg), (val)) | 468 | #define tw32_mailbox_f(reg, val) tw32_mailbox_flush(tp, (reg), (val)) |
453 | #define tw32_rx_mbox(reg, val) tp->write32_rx_mbox(tp, reg, val) | 469 | #define tw32_rx_mbox(reg, val) tp->write32_rx_mbox(tp, reg, val) |
@@ -455,7 +471,8 @@ static u32 tg3_read32(struct tg3 *tp, u32 off) | |||
455 | #define tr32_mailbox(reg) tp->read32_mbox(tp, reg) | 471 | #define tr32_mailbox(reg) tp->read32_mbox(tp, reg) |
456 | 472 | ||
457 | #define tw32(reg,val) tp->write32(tp, reg, val) | 473 | #define tw32(reg,val) tp->write32(tp, reg, val) |
458 | #define tw32_f(reg,val) _tw32_flush(tp,(reg),(val)) | 474 | #define tw32_f(reg,val) _tw32_flush(tp,(reg),(val), 0) |
475 | #define tw32_wait_f(reg,val,us) _tw32_flush(tp,(reg),(val), (us)) | ||
459 | #define tr32(reg) tp->read32(tp, reg) | 476 | #define tr32(reg) tp->read32(tp, reg) |
460 | 477 | ||
461 | static void tg3_write_mem(struct tg3 *tp, u32 off, u32 val) | 478 | static void tg3_write_mem(struct tg3 *tp, u32 off, u32 val) |
@@ -595,21 +612,19 @@ static void tg3_switch_clocks(struct tg3 *tp) | |||
595 | 612 | ||
596 | if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) { | 613 | if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) { |
597 | if (orig_clock_ctrl & CLOCK_CTRL_625_CORE) { | 614 | if (orig_clock_ctrl & CLOCK_CTRL_625_CORE) { |
598 | tw32_f(TG3PCI_CLOCK_CTRL, | 615 | tw32_wait_f(TG3PCI_CLOCK_CTRL, |
599 | clock_ctrl | CLOCK_CTRL_625_CORE); | 616 | clock_ctrl | CLOCK_CTRL_625_CORE, 40); |
600 | udelay(40); | ||
601 | } | 617 | } |
602 | } else if ((orig_clock_ctrl & CLOCK_CTRL_44MHZ_CORE) != 0) { | 618 | } else if ((orig_clock_ctrl & CLOCK_CTRL_44MHZ_CORE) != 0) { |
603 | tw32_f(TG3PCI_CLOCK_CTRL, | 619 | tw32_wait_f(TG3PCI_CLOCK_CTRL, |
604 | clock_ctrl | | 620 | clock_ctrl | |
605 | (CLOCK_CTRL_44MHZ_CORE | CLOCK_CTRL_ALTCLK)); | 621 | (CLOCK_CTRL_44MHZ_CORE | CLOCK_CTRL_ALTCLK), |
606 | udelay(40); | 622 | 40); |
607 | tw32_f(TG3PCI_CLOCK_CTRL, | 623 | tw32_wait_f(TG3PCI_CLOCK_CTRL, |
608 | clock_ctrl | (CLOCK_CTRL_ALTCLK)); | 624 | clock_ctrl | (CLOCK_CTRL_ALTCLK), |
609 | udelay(40); | 625 | 40); |
610 | } | 626 | } |
611 | tw32_f(TG3PCI_CLOCK_CTRL, clock_ctrl); | 627 | tw32_wait_f(TG3PCI_CLOCK_CTRL, clock_ctrl, 40); |
612 | udelay(40); | ||
613 | } | 628 | } |
614 | 629 | ||
615 | #define PHY_BUSY_LOOPS 5000 | 630 | #define PHY_BUSY_LOOPS 5000 |
@@ -1017,39 +1032,50 @@ static void tg3_frob_aux_power(struct tg3 *tp) | |||
1017 | if ((tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT) != 0) | 1032 | if ((tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT) != 0) |
1018 | return; | 1033 | return; |
1019 | 1034 | ||
1020 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) { | 1035 | if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || |
1021 | tp_peer = pci_get_drvdata(tp->pdev_peer); | 1036 | (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5714)) { |
1022 | if (!tp_peer) | 1037 | struct net_device *dev_peer; |
1038 | |||
1039 | dev_peer = pci_get_drvdata(tp->pdev_peer); | ||
1040 | if (!dev_peer) | ||
1023 | BUG(); | 1041 | BUG(); |
1042 | tp_peer = netdev_priv(dev_peer); | ||
1024 | } | 1043 | } |
1025 | 1044 | ||
1026 | |||
1027 | if ((tp->tg3_flags & TG3_FLAG_WOL_ENABLE) != 0 || | 1045 | if ((tp->tg3_flags & TG3_FLAG_WOL_ENABLE) != 0 || |
1028 | (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0 || | 1046 | (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0 || |
1029 | (tp_peer->tg3_flags & TG3_FLAG_WOL_ENABLE) != 0 || | 1047 | (tp_peer->tg3_flags & TG3_FLAG_WOL_ENABLE) != 0 || |
1030 | (tp_peer->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0) { | 1048 | (tp_peer->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0) { |
1031 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 || | 1049 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 || |
1032 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701) { | 1050 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701) { |
1033 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | | 1051 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | |
1034 | (GRC_LCLCTRL_GPIO_OE0 | | 1052 | (GRC_LCLCTRL_GPIO_OE0 | |
1035 | GRC_LCLCTRL_GPIO_OE1 | | 1053 | GRC_LCLCTRL_GPIO_OE1 | |
1036 | GRC_LCLCTRL_GPIO_OE2 | | 1054 | GRC_LCLCTRL_GPIO_OE2 | |
1037 | GRC_LCLCTRL_GPIO_OUTPUT0 | | 1055 | GRC_LCLCTRL_GPIO_OUTPUT0 | |
1038 | GRC_LCLCTRL_GPIO_OUTPUT1)); | 1056 | GRC_LCLCTRL_GPIO_OUTPUT1), |
1039 | udelay(100); | 1057 | 100); |
1040 | } else { | 1058 | } else { |
1041 | u32 no_gpio2; | 1059 | u32 no_gpio2; |
1042 | u32 grc_local_ctrl; | 1060 | u32 grc_local_ctrl = 0; |
1043 | 1061 | ||
1044 | if (tp_peer != tp && | 1062 | if (tp_peer != tp && |
1045 | (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0) | 1063 | (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0) |
1046 | return; | 1064 | return; |
1047 | 1065 | ||
1066 | /* Workaround to prevent overdrawing Amps. */ | ||
1067 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == | ||
1068 | ASIC_REV_5714) { | ||
1069 | grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE3; | ||
1070 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | | ||
1071 | grc_local_ctrl, 100); | ||
1072 | } | ||
1073 | |||
1048 | /* On 5753 and variants, GPIO2 cannot be used. */ | 1074 | /* On 5753 and variants, GPIO2 cannot be used. */ |
1049 | no_gpio2 = tp->nic_sram_data_cfg & | 1075 | no_gpio2 = tp->nic_sram_data_cfg & |
1050 | NIC_SRAM_DATA_CFG_NO_GPIO2; | 1076 | NIC_SRAM_DATA_CFG_NO_GPIO2; |
1051 | 1077 | ||
1052 | grc_local_ctrl = GRC_LCLCTRL_GPIO_OE0 | | 1078 | grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE0 | |
1053 | GRC_LCLCTRL_GPIO_OE1 | | 1079 | GRC_LCLCTRL_GPIO_OE1 | |
1054 | GRC_LCLCTRL_GPIO_OE2 | | 1080 | GRC_LCLCTRL_GPIO_OE2 | |
1055 | GRC_LCLCTRL_GPIO_OUTPUT1 | | 1081 | GRC_LCLCTRL_GPIO_OUTPUT1 | |
@@ -1058,21 +1084,18 @@ static void tg3_frob_aux_power(struct tg3 *tp) | |||
1058 | grc_local_ctrl &= ~(GRC_LCLCTRL_GPIO_OE2 | | 1084 | grc_local_ctrl &= ~(GRC_LCLCTRL_GPIO_OE2 | |
1059 | GRC_LCLCTRL_GPIO_OUTPUT2); | 1085 | GRC_LCLCTRL_GPIO_OUTPUT2); |
1060 | } | 1086 | } |
1061 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | | 1087 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | |
1062 | grc_local_ctrl); | 1088 | grc_local_ctrl, 100); |
1063 | udelay(100); | ||
1064 | 1089 | ||
1065 | grc_local_ctrl |= GRC_LCLCTRL_GPIO_OUTPUT0; | 1090 | grc_local_ctrl |= GRC_LCLCTRL_GPIO_OUTPUT0; |
1066 | 1091 | ||
1067 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | | 1092 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | |
1068 | grc_local_ctrl); | 1093 | grc_local_ctrl, 100); |
1069 | udelay(100); | ||
1070 | 1094 | ||
1071 | if (!no_gpio2) { | 1095 | if (!no_gpio2) { |
1072 | grc_local_ctrl &= ~GRC_LCLCTRL_GPIO_OUTPUT2; | 1096 | grc_local_ctrl &= ~GRC_LCLCTRL_GPIO_OUTPUT2; |
1073 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | | 1097 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | |
1074 | grc_local_ctrl); | 1098 | grc_local_ctrl, 100); |
1075 | udelay(100); | ||
1076 | } | 1099 | } |
1077 | } | 1100 | } |
1078 | } else { | 1101 | } else { |
@@ -1082,19 +1105,16 @@ static void tg3_frob_aux_power(struct tg3 *tp) | |||
1082 | (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0) | 1105 | (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0) |
1083 | return; | 1106 | return; |
1084 | 1107 | ||
1085 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | | 1108 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | |
1086 | (GRC_LCLCTRL_GPIO_OE1 | | 1109 | (GRC_LCLCTRL_GPIO_OE1 | |
1087 | GRC_LCLCTRL_GPIO_OUTPUT1)); | 1110 | GRC_LCLCTRL_GPIO_OUTPUT1), 100); |
1088 | udelay(100); | ||
1089 | 1111 | ||
1090 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | | 1112 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | |
1091 | (GRC_LCLCTRL_GPIO_OE1)); | 1113 | GRC_LCLCTRL_GPIO_OE1, 100); |
1092 | udelay(100); | ||
1093 | 1114 | ||
1094 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | | 1115 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | |
1095 | (GRC_LCLCTRL_GPIO_OE1 | | 1116 | (GRC_LCLCTRL_GPIO_OE1 | |
1096 | GRC_LCLCTRL_GPIO_OUTPUT1)); | 1117 | GRC_LCLCTRL_GPIO_OUTPUT1), 100); |
1097 | udelay(100); | ||
1098 | } | 1118 | } |
1099 | } | 1119 | } |
1100 | } | 1120 | } |
@@ -1137,10 +1157,8 @@ static int tg3_set_power_state(struct tg3 *tp, int state) | |||
1137 | udelay(100); /* Delay after power state change */ | 1157 | udelay(100); /* Delay after power state change */ |
1138 | 1158 | ||
1139 | /* Switch out of Vaux if it is not a LOM */ | 1159 | /* Switch out of Vaux if it is not a LOM */ |
1140 | if (!(tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT)) { | 1160 | if (!(tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT)) |
1141 | tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl); | 1161 | tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl, 100); |
1142 | udelay(100); | ||
1143 | } | ||
1144 | 1162 | ||
1145 | return 0; | 1163 | return 0; |
1146 | 1164 | ||
@@ -1239,10 +1257,8 @@ static int tg3_set_power_state(struct tg3 *tp, int state) | |||
1239 | base_val |= (CLOCK_CTRL_RXCLK_DISABLE | | 1257 | base_val |= (CLOCK_CTRL_RXCLK_DISABLE | |
1240 | CLOCK_CTRL_TXCLK_DISABLE); | 1258 | CLOCK_CTRL_TXCLK_DISABLE); |
1241 | 1259 | ||
1242 | tw32_f(TG3PCI_CLOCK_CTRL, base_val | | 1260 | tw32_wait_f(TG3PCI_CLOCK_CTRL, base_val | CLOCK_CTRL_ALTCLK | |
1243 | CLOCK_CTRL_ALTCLK | | 1261 | CLOCK_CTRL_PWRDOWN_PLL133, 40); |
1244 | CLOCK_CTRL_PWRDOWN_PLL133); | ||
1245 | udelay(40); | ||
1246 | } else if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) { | 1262 | } else if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) { |
1247 | /* do nothing */ | 1263 | /* do nothing */ |
1248 | } else if (!((tp->tg3_flags2 & TG3_FLG2_5750_PLUS) && | 1264 | } else if (!((tp->tg3_flags2 & TG3_FLG2_5750_PLUS) && |
@@ -1263,11 +1279,11 @@ static int tg3_set_power_state(struct tg3 *tp, int state) | |||
1263 | newbits2 = newbits1 | CLOCK_CTRL_44MHZ_CORE; | 1279 | newbits2 = newbits1 | CLOCK_CTRL_44MHZ_CORE; |
1264 | } | 1280 | } |
1265 | 1281 | ||
1266 | tw32_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits1); | 1282 | tw32_wait_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits1, |
1267 | udelay(40); | 1283 | 40); |
1268 | 1284 | ||
1269 | tw32_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits2); | 1285 | tw32_wait_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits2, |
1270 | udelay(40); | 1286 | 40); |
1271 | 1287 | ||
1272 | if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) { | 1288 | if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) { |
1273 | u32 newbits3; | 1289 | u32 newbits3; |
@@ -1281,9 +1297,8 @@ static int tg3_set_power_state(struct tg3 *tp, int state) | |||
1281 | newbits3 = CLOCK_CTRL_44MHZ_CORE; | 1297 | newbits3 = CLOCK_CTRL_44MHZ_CORE; |
1282 | } | 1298 | } |
1283 | 1299 | ||
1284 | tw32_f(TG3PCI_CLOCK_CTRL, | 1300 | tw32_wait_f(TG3PCI_CLOCK_CTRL, |
1285 | tp->pci_clock_ctrl | newbits3); | 1301 | tp->pci_clock_ctrl | newbits3, 40); |
1286 | udelay(40); | ||
1287 | } | 1302 | } |
1288 | } | 1303 | } |
1289 | 1304 | ||
@@ -1294,7 +1309,8 @@ static int tg3_set_power_state(struct tg3 *tp, int state) | |||
1294 | tg3_writephy(tp, MII_TG3_EXT_CTRL, | 1309 | tg3_writephy(tp, MII_TG3_EXT_CTRL, |
1295 | MII_TG3_EXT_CTRL_FORCE_LED_OFF); | 1310 | MII_TG3_EXT_CTRL_FORCE_LED_OFF); |
1296 | tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x01b2); | 1311 | tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x01b2); |
1297 | tg3_writephy(tp, MII_BMCR, BMCR_PDOWN); | 1312 | if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700) |
1313 | tg3_writephy(tp, MII_BMCR, BMCR_PDOWN); | ||
1298 | } | 1314 | } |
1299 | } | 1315 | } |
1300 | 1316 | ||
@@ -7135,8 +7151,13 @@ do { p = (u32 *)(orig_p + (reg)); \ | |||
7135 | GET_REG32_LOOP(BUFMGR_MODE, 0x58); | 7151 | GET_REG32_LOOP(BUFMGR_MODE, 0x58); |
7136 | GET_REG32_LOOP(RDMAC_MODE, 0x08); | 7152 | GET_REG32_LOOP(RDMAC_MODE, 0x08); |
7137 | GET_REG32_LOOP(WDMAC_MODE, 0x08); | 7153 | GET_REG32_LOOP(WDMAC_MODE, 0x08); |
7138 | GET_REG32_LOOP(RX_CPU_BASE, 0x280); | 7154 | GET_REG32_1(RX_CPU_MODE); |
7139 | GET_REG32_LOOP(TX_CPU_BASE, 0x280); | 7155 | GET_REG32_1(RX_CPU_STATE); |
7156 | GET_REG32_1(RX_CPU_PGMCTR); | ||
7157 | GET_REG32_1(RX_CPU_HWBKPT); | ||
7158 | GET_REG32_1(TX_CPU_MODE); | ||
7159 | GET_REG32_1(TX_CPU_STATE); | ||
7160 | GET_REG32_1(TX_CPU_PGMCTR); | ||
7140 | GET_REG32_LOOP(GRCMBOX_INTERRUPT_0, 0x110); | 7161 | GET_REG32_LOOP(GRCMBOX_INTERRUPT_0, 0x110); |
7141 | GET_REG32_LOOP(FTQ_RESET, 0x120); | 7162 | GET_REG32_LOOP(FTQ_RESET, 0x120); |
7142 | GET_REG32_LOOP(MSGINT_MODE, 0x0c); | 7163 | GET_REG32_LOOP(MSGINT_MODE, 0x0c); |
@@ -7959,13 +7980,12 @@ static int tg3_test_memory(struct tg3 *tp) | |||
7959 | u32 offset; | 7980 | u32 offset; |
7960 | u32 len; | 7981 | u32 len; |
7961 | } mem_tbl_570x[] = { | 7982 | } mem_tbl_570x[] = { |
7962 | { 0x00000000, 0x01000}, | 7983 | { 0x00000000, 0x00b50}, |
7963 | { 0x00002000, 0x1c000}, | 7984 | { 0x00002000, 0x1c000}, |
7964 | { 0xffffffff, 0x00000} | 7985 | { 0xffffffff, 0x00000} |
7965 | }, mem_tbl_5705[] = { | 7986 | }, mem_tbl_5705[] = { |
7966 | { 0x00000100, 0x0000c}, | 7987 | { 0x00000100, 0x0000c}, |
7967 | { 0x00000200, 0x00008}, | 7988 | { 0x00000200, 0x00008}, |
7968 | { 0x00000b50, 0x00400}, | ||
7969 | { 0x00004000, 0x00800}, | 7989 | { 0x00004000, 0x00800}, |
7970 | { 0x00006000, 0x01000}, | 7990 | { 0x00006000, 0x01000}, |
7971 | { 0x00008000, 0x02000}, | 7991 | { 0x00008000, 0x02000}, |
@@ -10466,7 +10486,7 @@ static char * __devinit tg3_bus_string(struct tg3 *tp, char *str) | |||
10466 | return str; | 10486 | return str; |
10467 | } | 10487 | } |
10468 | 10488 | ||
10469 | static struct pci_dev * __devinit tg3_find_5704_peer(struct tg3 *tp) | 10489 | static struct pci_dev * __devinit tg3_find_peer(struct tg3 *tp) |
10470 | { | 10490 | { |
10471 | struct pci_dev *peer; | 10491 | struct pci_dev *peer; |
10472 | unsigned int func, devnr = tp->pdev->devfn & ~7; | 10492 | unsigned int func, devnr = tp->pdev->devfn & ~7; |
@@ -10719,8 +10739,9 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
10719 | tp->rx_pending = 63; | 10739 | tp->rx_pending = 63; |
10720 | } | 10740 | } |
10721 | 10741 | ||
10722 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) | 10742 | if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || |
10723 | tp->pdev_peer = tg3_find_5704_peer(tp); | 10743 | (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5714)) |
10744 | tp->pdev_peer = tg3_find_peer(tp); | ||
10724 | 10745 | ||
10725 | err = tg3_get_device_address(tp); | 10746 | err = tg3_get_device_address(tp); |
10726 | if (err) { | 10747 | if (err) { |
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index 94dbcf3537ec..890e1635996b 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -1124,7 +1124,14 @@ | |||
1124 | /* 0x280 --> 0x400 unused */ | 1124 | /* 0x280 --> 0x400 unused */ |
1125 | 1125 | ||
1126 | #define RX_CPU_BASE 0x00005000 | 1126 | #define RX_CPU_BASE 0x00005000 |
1127 | #define RX_CPU_MODE 0x00005000 | ||
1128 | #define RX_CPU_STATE 0x00005004 | ||
1129 | #define RX_CPU_PGMCTR 0x0000501c | ||
1130 | #define RX_CPU_HWBKPT 0x00005034 | ||
1127 | #define TX_CPU_BASE 0x00005400 | 1131 | #define TX_CPU_BASE 0x00005400 |
1132 | #define TX_CPU_MODE 0x00005400 | ||
1133 | #define TX_CPU_STATE 0x00005404 | ||
1134 | #define TX_CPU_PGMCTR 0x0000541c | ||
1128 | 1135 | ||
1129 | /* Mailboxes */ | 1136 | /* Mailboxes */ |
1130 | #define GRCMBOX_INTERRUPT_0 0x00005800 /* 64-bit */ | 1137 | #define GRCMBOX_INTERRUPT_0 0x00005800 /* 64-bit */ |
diff --git a/drivers/net/wireless/orinoco_nortel.c b/drivers/net/wireless/orinoco_nortel.c index d8afd51ff8a5..d1a670b35338 100644 --- a/drivers/net/wireless/orinoco_nortel.c +++ b/drivers/net/wireless/orinoco_nortel.c | |||
@@ -1,6 +1,8 @@ | |||
1 | /* orinoco_nortel.c | 1 | /* orinoco_nortel.c |
2 | * | 2 | * |
3 | * Driver for Prism II devices which would usually be driven by orinoco_cs, | 3 | * Driver for Prism II devices which would usually be driven by orinoco_cs, |
4 | * but are connected to the PCI bus by a PCI-to-PCMCIA adapter used in | ||
5 | * Nortel emobility, Symbol LA-4113 and Symbol LA-4123. | ||
4 | * but are connected to the PCI bus by a Nortel PCI-PCMCIA-Adapter. | 6 | * but are connected to the PCI bus by a Nortel PCI-PCMCIA-Adapter. |
5 | * | 7 | * |
6 | * Copyright (C) 2002 Tobias Hoffmann | 8 | * Copyright (C) 2002 Tobias Hoffmann |
@@ -165,7 +167,7 @@ static int nortel_pci_init_one(struct pci_dev *pdev, | |||
165 | goto fail_resources; | 167 | goto fail_resources; |
166 | } | 168 | } |
167 | 169 | ||
168 | iomem = pci_iomap(pdev, 3, 0); | 170 | iomem = pci_iomap(pdev, 2, 0); |
169 | if (!iomem) { | 171 | if (!iomem) { |
170 | err = -ENOMEM; | 172 | err = -ENOMEM; |
171 | goto fail_map_io; | 173 | goto fail_map_io; |
@@ -265,6 +267,8 @@ static void __devexit nortel_pci_remove_one(struct pci_dev *pdev) | |||
265 | static struct pci_device_id nortel_pci_id_table[] = { | 267 | static struct pci_device_id nortel_pci_id_table[] = { |
266 | /* Nortel emobility PCI */ | 268 | /* Nortel emobility PCI */ |
267 | {0x126c, 0x8030, PCI_ANY_ID, PCI_ANY_ID,}, | 269 | {0x126c, 0x8030, PCI_ANY_ID, PCI_ANY_ID,}, |
270 | /* Symbol LA-4123 PCI */ | ||
271 | {0x1562, 0x0001, PCI_ANY_ID, PCI_ANY_ID,}, | ||
268 | {0,}, | 272 | {0,}, |
269 | }; | 273 | }; |
270 | 274 | ||
diff --git a/drivers/s390/net/qeth_eddp.c b/drivers/s390/net/qeth_eddp.c index 011915d5e243..f94f1f25eec6 100644 --- a/drivers/s390/net/qeth_eddp.c +++ b/drivers/s390/net/qeth_eddp.c | |||
@@ -62,7 +62,8 @@ qeth_eddp_free_context(struct qeth_eddp_context *ctx) | |||
62 | for (i = 0; i < ctx->num_pages; ++i) | 62 | for (i = 0; i < ctx->num_pages; ++i) |
63 | free_page((unsigned long)ctx->pages[i]); | 63 | free_page((unsigned long)ctx->pages[i]); |
64 | kfree(ctx->pages); | 64 | kfree(ctx->pages); |
65 | kfree(ctx->elements); | 65 | if (ctx->elements != NULL) |
66 | kfree(ctx->elements); | ||
66 | kfree(ctx); | 67 | kfree(ctx); |
67 | } | 68 | } |
68 | 69 | ||
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 99cceb242ec4..f8f55cc468ba 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * | 2 | * |
3 | * linux/drivers/s390/net/qeth_main.c ($Revision: 1.242 $) | 3 | * linux/drivers/s390/net/qeth_main.c ($Revision: 1.251 $) |
4 | * | 4 | * |
5 | * Linux on zSeries OSA Express and HiperSockets support | 5 | * Linux on zSeries OSA Express and HiperSockets support |
6 | * | 6 | * |
@@ -12,7 +12,7 @@ | |||
12 | * Frank Pavlic (fpavlic@de.ibm.com) and | 12 | * Frank Pavlic (fpavlic@de.ibm.com) and |
13 | * Thomas Spatzier <tspat@de.ibm.com> | 13 | * Thomas Spatzier <tspat@de.ibm.com> |
14 | * | 14 | * |
15 | * $Revision: 1.242 $ $Date: 2005/05/04 20:19:18 $ | 15 | * $Revision: 1.251 $ $Date: 2005/05/04 20:19:18 $ |
16 | * | 16 | * |
17 | * This program is free software; you can redistribute it and/or modify | 17 | * This program is free software; you can redistribute it and/or modify |
18 | * it under the terms of the GNU General Public License as published by | 18 | * it under the terms of the GNU General Public License as published by |
@@ -72,7 +72,7 @@ | |||
72 | #include "qeth_eddp.h" | 72 | #include "qeth_eddp.h" |
73 | #include "qeth_tso.h" | 73 | #include "qeth_tso.h" |
74 | 74 | ||
75 | #define VERSION_QETH_C "$Revision: 1.242 $" | 75 | #define VERSION_QETH_C "$Revision: 1.251 $" |
76 | static const char *version = "qeth S/390 OSA-Express driver"; | 76 | static const char *version = "qeth S/390 OSA-Express driver"; |
77 | 77 | ||
78 | /** | 78 | /** |
@@ -518,7 +518,8 @@ __qeth_set_offline(struct ccwgroup_device *cgdev, int recovery_mode) | |||
518 | 518 | ||
519 | QETH_DBF_TEXT(setup, 3, "setoffl"); | 519 | QETH_DBF_TEXT(setup, 3, "setoffl"); |
520 | QETH_DBF_HEX(setup, 3, &card, sizeof(void *)); | 520 | QETH_DBF_HEX(setup, 3, &card, sizeof(void *)); |
521 | 521 | ||
522 | netif_carrier_off(card->dev); | ||
522 | recover_flag = card->state; | 523 | recover_flag = card->state; |
523 | if (qeth_stop_card(card, recovery_mode) == -ERESTARTSYS){ | 524 | if (qeth_stop_card(card, recovery_mode) == -ERESTARTSYS){ |
524 | PRINT_WARN("Stopping card %s interrupted by user!\n", | 525 | PRINT_WARN("Stopping card %s interrupted by user!\n", |
@@ -1020,7 +1021,6 @@ void | |||
1020 | qeth_schedule_recovery(struct qeth_card *card) | 1021 | qeth_schedule_recovery(struct qeth_card *card) |
1021 | { | 1022 | { |
1022 | QETH_DBF_TEXT(trace,2,"startrec"); | 1023 | QETH_DBF_TEXT(trace,2,"startrec"); |
1023 | |||
1024 | if (qeth_set_thread_start_bit(card, QETH_RECOVER_THREAD) == 0) | 1024 | if (qeth_set_thread_start_bit(card, QETH_RECOVER_THREAD) == 0) |
1025 | schedule_work(&card->kernel_thread_starter); | 1025 | schedule_work(&card->kernel_thread_starter); |
1026 | } | 1026 | } |
@@ -1710,7 +1710,6 @@ qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob) | |||
1710 | "IP address reset.\n", | 1710 | "IP address reset.\n", |
1711 | QETH_CARD_IFNAME(card), | 1711 | QETH_CARD_IFNAME(card), |
1712 | card->info.chpid); | 1712 | card->info.chpid); |
1713 | netif_carrier_on(card->dev); | ||
1714 | qeth_schedule_recovery(card); | 1713 | qeth_schedule_recovery(card); |
1715 | return NULL; | 1714 | return NULL; |
1716 | case IPA_CMD_MODCCID: | 1715 | case IPA_CMD_MODCCID: |
@@ -1959,7 +1958,7 @@ qeth_osn_send_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob, | |||
1959 | { | 1958 | { |
1960 | u16 s1, s2; | 1959 | u16 s1, s2; |
1961 | 1960 | ||
1962 | QETH_DBF_TEXT(trace,4,"osndipa"); | 1961 | QETH_DBF_TEXT(trace,4,"osndipa"); |
1963 | 1962 | ||
1964 | qeth_prepare_ipa_cmd(card, iob, QETH_PROT_OSN2); | 1963 | qeth_prepare_ipa_cmd(card, iob, QETH_PROT_OSN2); |
1965 | s1 = (u16)(IPA_PDU_HEADER_SIZE + data_len); | 1964 | s1 = (u16)(IPA_PDU_HEADER_SIZE + data_len); |
@@ -2203,24 +2202,21 @@ qeth_ulp_setup(struct qeth_card *card) | |||
2203 | } | 2202 | } |
2204 | 2203 | ||
2205 | static inline int | 2204 | static inline int |
2206 | qeth_check_for_inbound_error(struct qeth_qdio_buffer *buf, | 2205 | qeth_check_qdio_errors(struct qdio_buffer *buf, unsigned int qdio_error, |
2207 | unsigned int qdio_error, | 2206 | unsigned int siga_error, const char *dbftext) |
2208 | unsigned int siga_error) | ||
2209 | { | 2207 | { |
2210 | int rc = 0; | ||
2211 | |||
2212 | if (qdio_error || siga_error) { | 2208 | if (qdio_error || siga_error) { |
2213 | QETH_DBF_TEXT(trace, 2, "qdinerr"); | 2209 | QETH_DBF_TEXT(trace, 2, dbftext); |
2214 | QETH_DBF_TEXT(qerr, 2, "qdinerr"); | 2210 | QETH_DBF_TEXT(qerr, 2, dbftext); |
2215 | QETH_DBF_TEXT_(qerr, 2, " F15=%02X", | 2211 | QETH_DBF_TEXT_(qerr, 2, " F15=%02X", |
2216 | buf->buffer->element[15].flags & 0xff); | 2212 | buf->element[15].flags & 0xff); |
2217 | QETH_DBF_TEXT_(qerr, 2, " F14=%02X", | 2213 | QETH_DBF_TEXT_(qerr, 2, " F14=%02X", |
2218 | buf->buffer->element[14].flags & 0xff); | 2214 | buf->element[14].flags & 0xff); |
2219 | QETH_DBF_TEXT_(qerr, 2, " qerr=%X", qdio_error); | 2215 | QETH_DBF_TEXT_(qerr, 2, " qerr=%X", qdio_error); |
2220 | QETH_DBF_TEXT_(qerr, 2, " serr=%X", siga_error); | 2216 | QETH_DBF_TEXT_(qerr, 2, " serr=%X", siga_error); |
2221 | rc = 1; | 2217 | return 1; |
2222 | } | 2218 | } |
2223 | return rc; | 2219 | return 0; |
2224 | } | 2220 | } |
2225 | 2221 | ||
2226 | static inline struct sk_buff * | 2222 | static inline struct sk_buff * |
@@ -2769,8 +2765,9 @@ qeth_qdio_input_handler(struct ccw_device * ccwdev, unsigned int status, | |||
2769 | for (i = first_element; i < (first_element + count); ++i) { | 2765 | for (i = first_element; i < (first_element + count); ++i) { |
2770 | index = i % QDIO_MAX_BUFFERS_PER_Q; | 2766 | index = i % QDIO_MAX_BUFFERS_PER_Q; |
2771 | buffer = &card->qdio.in_q->bufs[index]; | 2767 | buffer = &card->qdio.in_q->bufs[index]; |
2772 | if (!((status == QDIO_STATUS_LOOK_FOR_ERROR) && | 2768 | if (!((status & QDIO_STATUS_LOOK_FOR_ERROR) && |
2773 | qeth_check_for_inbound_error(buffer, qdio_err, siga_err))) | 2769 | qeth_check_qdio_errors(buffer->buffer, |
2770 | qdio_err, siga_err,"qinerr"))) | ||
2774 | qeth_process_inbound_buffer(card, buffer, index); | 2771 | qeth_process_inbound_buffer(card, buffer, index); |
2775 | /* clear buffer and give back to hardware */ | 2772 | /* clear buffer and give back to hardware */ |
2776 | qeth_put_buffer_pool_entry(card, buffer->pool_entry); | 2773 | qeth_put_buffer_pool_entry(card, buffer->pool_entry); |
@@ -2785,12 +2782,13 @@ qeth_qdio_input_handler(struct ccw_device * ccwdev, unsigned int status, | |||
2785 | static inline int | 2782 | static inline int |
2786 | qeth_handle_send_error(struct qeth_card *card, | 2783 | qeth_handle_send_error(struct qeth_card *card, |
2787 | struct qeth_qdio_out_buffer *buffer, | 2784 | struct qeth_qdio_out_buffer *buffer, |
2788 | int qdio_err, int siga_err) | 2785 | unsigned int qdio_err, unsigned int siga_err) |
2789 | { | 2786 | { |
2790 | int sbalf15 = buffer->buffer->element[15].flags & 0xff; | 2787 | int sbalf15 = buffer->buffer->element[15].flags & 0xff; |
2791 | int cc = siga_err & 3; | 2788 | int cc = siga_err & 3; |
2792 | 2789 | ||
2793 | QETH_DBF_TEXT(trace, 6, "hdsnderr"); | 2790 | QETH_DBF_TEXT(trace, 6, "hdsnderr"); |
2791 | qeth_check_qdio_errors(buffer->buffer, qdio_err, siga_err, "qouterr"); | ||
2794 | switch (cc) { | 2792 | switch (cc) { |
2795 | case 0: | 2793 | case 0: |
2796 | if (qdio_err){ | 2794 | if (qdio_err){ |
@@ -3047,7 +3045,8 @@ qeth_qdio_output_handler(struct ccw_device * ccwdev, unsigned int status, | |||
3047 | for(i = first_element; i < (first_element + count); ++i){ | 3045 | for(i = first_element; i < (first_element + count); ++i){ |
3048 | buffer = &queue->bufs[i % QDIO_MAX_BUFFERS_PER_Q]; | 3046 | buffer = &queue->bufs[i % QDIO_MAX_BUFFERS_PER_Q]; |
3049 | /*we only handle the KICK_IT error by doing a recovery */ | 3047 | /*we only handle the KICK_IT error by doing a recovery */ |
3050 | if (qeth_handle_send_error(card, buffer, qdio_error, siga_error) | 3048 | if (qeth_handle_send_error(card, buffer, |
3049 | qdio_error, siga_error) | ||
3051 | == QETH_SEND_ERROR_KICK_IT){ | 3050 | == QETH_SEND_ERROR_KICK_IT){ |
3052 | netif_stop_queue(card->dev); | 3051 | netif_stop_queue(card->dev); |
3053 | qeth_schedule_recovery(card); | 3052 | qeth_schedule_recovery(card); |
@@ -3289,7 +3288,6 @@ qeth_init_qdio_info(struct qeth_card *card) | |||
3289 | card->qdio.in_buf_pool.buf_count = card->qdio.init_pool.buf_count; | 3288 | card->qdio.in_buf_pool.buf_count = card->qdio.init_pool.buf_count; |
3290 | INIT_LIST_HEAD(&card->qdio.in_buf_pool.entry_list); | 3289 | INIT_LIST_HEAD(&card->qdio.in_buf_pool.entry_list); |
3291 | INIT_LIST_HEAD(&card->qdio.init_pool.entry_list); | 3290 | INIT_LIST_HEAD(&card->qdio.init_pool.entry_list); |
3292 | /* outbound */ | ||
3293 | } | 3291 | } |
3294 | 3292 | ||
3295 | static int | 3293 | static int |
@@ -3731,6 +3729,9 @@ qeth_verify_vlan_dev(struct net_device *dev, struct qeth_card *card) | |||
3731 | break; | 3729 | break; |
3732 | } | 3730 | } |
3733 | } | 3731 | } |
3732 | if (rc && !(VLAN_DEV_INFO(dev)->real_dev->priv == (void *)card)) | ||
3733 | return 0; | ||
3734 | |||
3734 | #endif | 3735 | #endif |
3735 | return rc; | 3736 | return rc; |
3736 | } | 3737 | } |
@@ -3807,10 +3808,8 @@ qeth_open(struct net_device *dev) | |||
3807 | card->data.state = CH_STATE_UP; | 3808 | card->data.state = CH_STATE_UP; |
3808 | card->state = CARD_STATE_UP; | 3809 | card->state = CARD_STATE_UP; |
3809 | 3810 | ||
3810 | if (!card->lan_online){ | 3811 | if (!card->lan_online && netif_carrier_ok(dev)) |
3811 | if (netif_carrier_ok(dev)) | 3812 | netif_carrier_off(dev); |
3812 | netif_carrier_off(dev); | ||
3813 | } | ||
3814 | return 0; | 3813 | return 0; |
3815 | } | 3814 | } |
3816 | 3815 | ||
@@ -5870,10 +5869,8 @@ qeth_add_multicast_ipv6(struct qeth_card *card) | |||
5870 | struct inet6_dev *in6_dev; | 5869 | struct inet6_dev *in6_dev; |
5871 | 5870 | ||
5872 | QETH_DBF_TEXT(trace,4,"chkmcv6"); | 5871 | QETH_DBF_TEXT(trace,4,"chkmcv6"); |
5873 | if ((card->options.layer2 == 0) && | 5872 | if (!qeth_is_supported(card, IPA_IPV6)) |
5874 | (!qeth_is_supported(card, IPA_IPV6)) ) | ||
5875 | return ; | 5873 | return ; |
5876 | |||
5877 | in6_dev = in6_dev_get(card->dev); | 5874 | in6_dev = in6_dev_get(card->dev); |
5878 | if (in6_dev == NULL) | 5875 | if (in6_dev == NULL) |
5879 | return; | 5876 | return; |
@@ -7936,8 +7933,8 @@ __qeth_set_online(struct ccwgroup_device *gdev, int recovery_mode) | |||
7936 | QETH_DBF_TEXT_(setup, 2, "6err%d", rc); | 7933 | QETH_DBF_TEXT_(setup, 2, "6err%d", rc); |
7937 | goto out_remove; | 7934 | goto out_remove; |
7938 | } | 7935 | } |
7939 | /*maybe it was set offline without ifconfig down | 7936 | netif_carrier_on(card->dev); |
7940 | * we can also use this state for recovery purposes*/ | 7937 | |
7941 | qeth_set_allowed_threads(card, 0xffffffff, 0); | 7938 | qeth_set_allowed_threads(card, 0xffffffff, 0); |
7942 | if (recover_flag == CARD_STATE_RECOVER) | 7939 | if (recover_flag == CARD_STATE_RECOVER) |
7943 | qeth_start_again(card, recovery_mode); | 7940 | qeth_start_again(card, recovery_mode); |
diff --git a/drivers/s390/net/qeth_mpc.c b/drivers/s390/net/qeth_mpc.c index f0a080a9e515..5f8754addc14 100644 --- a/drivers/s390/net/qeth_mpc.c +++ b/drivers/s390/net/qeth_mpc.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <asm/cio.h> | 11 | #include <asm/cio.h> |
12 | #include "qeth_mpc.h" | 12 | #include "qeth_mpc.h" |
13 | 13 | ||
14 | const char *VERSION_QETH_MPC_C = "$Revision: 1.12 $"; | 14 | const char *VERSION_QETH_MPC_C = "$Revision: 1.13 $"; |
15 | 15 | ||
16 | unsigned char IDX_ACTIVATE_READ[]={ | 16 | unsigned char IDX_ACTIVATE_READ[]={ |
17 | 0x00,0x00,0x80,0x00, 0x00,0x00,0x00,0x00, | 17 | 0x00,0x00,0x80,0x00, 0x00,0x00,0x00,0x00, |
diff --git a/drivers/s390/net/qeth_mpc.h b/drivers/s390/net/qeth_mpc.h index 5f71486e708c..864cec5f6c62 100644 --- a/drivers/s390/net/qeth_mpc.h +++ b/drivers/s390/net/qeth_mpc.h | |||
@@ -14,14 +14,14 @@ | |||
14 | 14 | ||
15 | #include <asm/qeth.h> | 15 | #include <asm/qeth.h> |
16 | 16 | ||
17 | #define VERSION_QETH_MPC_H "$Revision: 1.44 $" | 17 | #define VERSION_QETH_MPC_H "$Revision: 1.46 $" |
18 | 18 | ||
19 | extern const char *VERSION_QETH_MPC_C; | 19 | extern const char *VERSION_QETH_MPC_C; |
20 | 20 | ||
21 | #define IPA_PDU_HEADER_SIZE 0x40 | 21 | #define IPA_PDU_HEADER_SIZE 0x40 |
22 | #define QETH_IPA_PDU_LEN_TOTAL(buffer) (buffer+0x0e) | 22 | #define QETH_IPA_PDU_LEN_TOTAL(buffer) (buffer+0x0e) |
23 | #define QETH_IPA_PDU_LEN_PDU1(buffer) (buffer+0x26) | 23 | #define QETH_IPA_PDU_LEN_PDU1(buffer) (buffer+0x26) |
24 | #define QETH_IPA_PDU_LEN_PDU2(buffer) (buffer+0x2a) | 24 | #define QETH_IPA_PDU_LEN_PDU2(buffer) (buffer+0x29) |
25 | #define QETH_IPA_PDU_LEN_PDU3(buffer) (buffer+0x3a) | 25 | #define QETH_IPA_PDU_LEN_PDU3(buffer) (buffer+0x3a) |
26 | 26 | ||
27 | extern unsigned char IPA_PDU_HEADER[]; | 27 | extern unsigned char IPA_PDU_HEADER[]; |
diff --git a/drivers/s390/net/qeth_proc.c b/drivers/s390/net/qeth_proc.c index f2ccfea8fdb8..7bf35098831e 100644 --- a/drivers/s390/net/qeth_proc.c +++ b/drivers/s390/net/qeth_proc.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * | 2 | * |
3 | * linux/drivers/s390/net/qeth_fs.c ($Revision: 1.13 $) | 3 | * linux/drivers/s390/net/qeth_fs.c ($Revision: 1.16 $) |
4 | * | 4 | * |
5 | * Linux on zSeries OSA Express and HiperSockets support | 5 | * Linux on zSeries OSA Express and HiperSockets support |
6 | * This file contains code related to procfs. | 6 | * This file contains code related to procfs. |
@@ -21,7 +21,7 @@ | |||
21 | #include "qeth_mpc.h" | 21 | #include "qeth_mpc.h" |
22 | #include "qeth_fs.h" | 22 | #include "qeth_fs.h" |
23 | 23 | ||
24 | const char *VERSION_QETH_PROC_C = "$Revision: 1.13 $"; | 24 | const char *VERSION_QETH_PROC_C = "$Revision: 1.16 $"; |
25 | 25 | ||
26 | /***** /proc/qeth *****/ | 26 | /***** /proc/qeth *****/ |
27 | #define QETH_PROCFILE_NAME "qeth" | 27 | #define QETH_PROCFILE_NAME "qeth" |
@@ -30,30 +30,26 @@ static struct proc_dir_entry *qeth_procfile; | |||
30 | static int | 30 | static int |
31 | qeth_procfile_seq_match(struct device *dev, void *data) | 31 | qeth_procfile_seq_match(struct device *dev, void *data) |
32 | { | 32 | { |
33 | return 1; | 33 | return(dev ? 1 : 0); |
34 | } | 34 | } |
35 | 35 | ||
36 | static void * | 36 | static void * |
37 | qeth_procfile_seq_start(struct seq_file *s, loff_t *offset) | 37 | qeth_procfile_seq_start(struct seq_file *s, loff_t *offset) |
38 | { | 38 | { |
39 | struct device *dev; | 39 | struct device *dev = NULL; |
40 | loff_t nr; | 40 | loff_t nr = 0; |
41 | 41 | ||
42 | down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); | 42 | down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); |
43 | 43 | if (*offset == 0) | |
44 | nr = *offset; | ||
45 | if (nr == 0) | ||
46 | return SEQ_START_TOKEN; | 44 | return SEQ_START_TOKEN; |
47 | 45 | while (1) { | |
48 | dev = driver_find_device(&qeth_ccwgroup_driver.driver, NULL, | ||
49 | NULL, qeth_procfile_seq_match); | ||
50 | |||
51 | /* get card at pos *offset */ | ||
52 | nr = *offset; | ||
53 | while (nr-- > 1 && dev) | ||
54 | dev = driver_find_device(&qeth_ccwgroup_driver.driver, dev, | 46 | dev = driver_find_device(&qeth_ccwgroup_driver.driver, dev, |
55 | NULL, qeth_procfile_seq_match); | 47 | NULL, qeth_procfile_seq_match); |
56 | return (void *) dev; | 48 | if (++nr == *offset) |
49 | break; | ||
50 | put_device(dev); | ||
51 | } | ||
52 | return dev; | ||
57 | } | 53 | } |
58 | 54 | ||
59 | static void | 55 | static void |
@@ -66,19 +62,14 @@ static void * | |||
66 | qeth_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset) | 62 | qeth_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset) |
67 | { | 63 | { |
68 | struct device *prev, *next; | 64 | struct device *prev, *next; |
69 | 65 | ||
70 | if (it == SEQ_START_TOKEN) { | 66 | if (it == SEQ_START_TOKEN) |
71 | next = driver_find_device(&qeth_ccwgroup_driver.driver, | 67 | prev = NULL; |
72 | NULL, NULL, qeth_procfile_seq_match); | 68 | else |
73 | if (next) | 69 | prev = (struct device *) it; |
74 | (*offset)++; | ||
75 | return (void *) next; | ||
76 | } | ||
77 | prev = (struct device *) it; | ||
78 | next = driver_find_device(&qeth_ccwgroup_driver.driver, | 70 | next = driver_find_device(&qeth_ccwgroup_driver.driver, |
79 | prev, NULL, qeth_procfile_seq_match); | 71 | prev, NULL, qeth_procfile_seq_match); |
80 | if (next) | 72 | (*offset)++; |
81 | (*offset)++; | ||
82 | return (void *) next; | 73 | return (void *) next; |
83 | } | 74 | } |
84 | 75 | ||
@@ -87,7 +78,7 @@ qeth_get_router_str(struct qeth_card *card, int ipv) | |||
87 | { | 78 | { |
88 | int routing_type = 0; | 79 | int routing_type = 0; |
89 | 80 | ||
90 | if (ipv == 4){ | 81 | if (ipv == 4) { |
91 | routing_type = card->options.route4.type; | 82 | routing_type = card->options.route4.type; |
92 | } else { | 83 | } else { |
93 | #ifdef CONFIG_QETH_IPV6 | 84 | #ifdef CONFIG_QETH_IPV6 |
@@ -154,6 +145,7 @@ qeth_procfile_seq_show(struct seq_file *s, void *it) | |||
154 | card->qdio.in_buf_pool.buf_count); | 145 | card->qdio.in_buf_pool.buf_count); |
155 | else | 146 | else |
156 | seq_printf(s, " +++ LAN OFFLINE +++\n"); | 147 | seq_printf(s, " +++ LAN OFFLINE +++\n"); |
148 | put_device(device); | ||
157 | } | 149 | } |
158 | return 0; | 150 | return 0; |
159 | } | 151 | } |
@@ -184,51 +176,16 @@ static struct file_operations qeth_procfile_fops = { | |||
184 | static struct proc_dir_entry *qeth_perf_procfile; | 176 | static struct proc_dir_entry *qeth_perf_procfile; |
185 | 177 | ||
186 | #ifdef CONFIG_QETH_PERF_STATS | 178 | #ifdef CONFIG_QETH_PERF_STATS |
187 | |||
188 | static void * | ||
189 | qeth_perf_procfile_seq_start(struct seq_file *s, loff_t *offset) | ||
190 | { | ||
191 | struct device *dev = NULL; | ||
192 | int nr; | ||
193 | |||
194 | down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); | ||
195 | /* get card at pos *offset */ | ||
196 | dev = driver_find_device(&qeth_ccwgroup_driver.driver, NULL, NULL, | ||
197 | qeth_procfile_seq_match); | ||
198 | |||
199 | /* get card at pos *offset */ | ||
200 | nr = *offset; | ||
201 | while (nr-- > 1 && dev) | ||
202 | dev = driver_find_device(&qeth_ccwgroup_driver.driver, dev, | ||
203 | NULL, qeth_procfile_seq_match); | ||
204 | return (void *) dev; | ||
205 | } | ||
206 | |||
207 | static void | ||
208 | qeth_perf_procfile_seq_stop(struct seq_file *s, void* it) | ||
209 | { | ||
210 | up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); | ||
211 | } | ||
212 | |||
213 | static void * | ||
214 | qeth_perf_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset) | ||
215 | { | ||
216 | struct device *prev, *next; | ||
217 | |||
218 | prev = (struct device *) it; | ||
219 | next = driver_find_device(&qeth_ccwgroup_driver.driver, prev, | ||
220 | NULL, qeth_procfile_seq_match); | ||
221 | if (next) | ||
222 | (*offset)++; | ||
223 | return (void *) next; | ||
224 | } | ||
225 | |||
226 | static int | 179 | static int |
227 | qeth_perf_procfile_seq_show(struct seq_file *s, void *it) | 180 | qeth_perf_procfile_seq_show(struct seq_file *s, void *it) |
228 | { | 181 | { |
229 | struct device *device; | 182 | struct device *device; |
230 | struct qeth_card *card; | 183 | struct qeth_card *card; |
231 | 184 | ||
185 | |||
186 | if (it == SEQ_START_TOKEN) | ||
187 | return 0; | ||
188 | |||
232 | device = (struct device *) it; | 189 | device = (struct device *) it; |
233 | card = device->driver_data; | 190 | card = device->driver_data; |
234 | seq_printf(s, "For card with devnos %s/%s/%s (%s):\n", | 191 | seq_printf(s, "For card with devnos %s/%s/%s (%s):\n", |
@@ -295,13 +252,14 @@ qeth_perf_procfile_seq_show(struct seq_file *s, void *it) | |||
295 | card->perf_stats.outbound_do_qdio_time, | 252 | card->perf_stats.outbound_do_qdio_time, |
296 | card->perf_stats.outbound_do_qdio_cnt | 253 | card->perf_stats.outbound_do_qdio_cnt |
297 | ); | 254 | ); |
255 | put_device(device); | ||
298 | return 0; | 256 | return 0; |
299 | } | 257 | } |
300 | 258 | ||
301 | static struct seq_operations qeth_perf_procfile_seq_ops = { | 259 | static struct seq_operations qeth_perf_procfile_seq_ops = { |
302 | .start = qeth_perf_procfile_seq_start, | 260 | .start = qeth_procfile_seq_start, |
303 | .stop = qeth_perf_procfile_seq_stop, | 261 | .stop = qeth_procfile_seq_stop, |
304 | .next = qeth_perf_procfile_seq_next, | 262 | .next = qeth_procfile_seq_next, |
305 | .show = qeth_perf_procfile_seq_show, | 263 | .show = qeth_perf_procfile_seq_show, |
306 | }; | 264 | }; |
307 | 265 | ||
@@ -324,93 +282,6 @@ static struct file_operations qeth_perf_procfile_fops = { | |||
324 | #define qeth_perf_procfile_created 1 | 282 | #define qeth_perf_procfile_created 1 |
325 | #endif /* CONFIG_QETH_PERF_STATS */ | 283 | #endif /* CONFIG_QETH_PERF_STATS */ |
326 | 284 | ||
327 | /***** /proc/qeth_ipa_takeover *****/ | ||
328 | #define QETH_IPATO_PROCFILE_NAME "qeth_ipa_takeover" | ||
329 | static struct proc_dir_entry *qeth_ipato_procfile; | ||
330 | |||
331 | static void * | ||
332 | qeth_ipato_procfile_seq_start(struct seq_file *s, loff_t *offset) | ||
333 | { | ||
334 | struct device *dev; | ||
335 | loff_t nr; | ||
336 | |||
337 | down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); | ||
338 | /* TODO: finish this */ | ||
339 | /* | ||
340 | * maybe SEQ_SATRT_TOKEN can be returned for offset 0 | ||
341 | * output driver settings then; | ||
342 | * else output setting for respective card | ||
343 | */ | ||
344 | |||
345 | dev = driver_find_device(&qeth_ccwgroup_driver.driver, NULL, NULL, | ||
346 | qeth_procfile_seq_match); | ||
347 | |||
348 | /* get card at pos *offset */ | ||
349 | nr = *offset; | ||
350 | while (nr-- > 1 && dev) | ||
351 | dev = driver_find_device(&qeth_ccwgroup_driver.driver, dev, | ||
352 | NULL, qeth_procfile_seq_match); | ||
353 | return (void *) dev; | ||
354 | } | ||
355 | |||
356 | static void | ||
357 | qeth_ipato_procfile_seq_stop(struct seq_file *s, void* it) | ||
358 | { | ||
359 | up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); | ||
360 | } | ||
361 | |||
362 | static void * | ||
363 | qeth_ipato_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset) | ||
364 | { | ||
365 | struct device *prev, *next; | ||
366 | |||
367 | prev = (struct device *) it; | ||
368 | next = driver_find_device(&qeth_ccwgroup_driver.driver, prev, | ||
369 | NULL, qeth_procfile_seq_match); | ||
370 | if (next) | ||
371 | (*offset)++; | ||
372 | return (void *) next; | ||
373 | } | ||
374 | |||
375 | static int | ||
376 | qeth_ipato_procfile_seq_show(struct seq_file *s, void *it) | ||
377 | { | ||
378 | struct device *device; | ||
379 | struct qeth_card *card; | ||
380 | |||
381 | /* TODO: finish this */ | ||
382 | /* | ||
383 | * maybe SEQ_SATRT_TOKEN can be returned for offset 0 | ||
384 | * output driver settings then; | ||
385 | * else output setting for respective card | ||
386 | */ | ||
387 | device = (struct device *) it; | ||
388 | card = device->driver_data; | ||
389 | |||
390 | return 0; | ||
391 | } | ||
392 | |||
393 | static struct seq_operations qeth_ipato_procfile_seq_ops = { | ||
394 | .start = qeth_ipato_procfile_seq_start, | ||
395 | .stop = qeth_ipato_procfile_seq_stop, | ||
396 | .next = qeth_ipato_procfile_seq_next, | ||
397 | .show = qeth_ipato_procfile_seq_show, | ||
398 | }; | ||
399 | |||
400 | static int | ||
401 | qeth_ipato_procfile_open(struct inode *inode, struct file *file) | ||
402 | { | ||
403 | return seq_open(file, &qeth_ipato_procfile_seq_ops); | ||
404 | } | ||
405 | |||
406 | static struct file_operations qeth_ipato_procfile_fops = { | ||
407 | .owner = THIS_MODULE, | ||
408 | .open = qeth_ipato_procfile_open, | ||
409 | .read = seq_read, | ||
410 | .llseek = seq_lseek, | ||
411 | .release = seq_release, | ||
412 | }; | ||
413 | |||
414 | int __init | 285 | int __init |
415 | qeth_create_procfs_entries(void) | 286 | qeth_create_procfs_entries(void) |
416 | { | 287 | { |
@@ -426,13 +297,7 @@ qeth_create_procfs_entries(void) | |||
426 | qeth_perf_procfile->proc_fops = &qeth_perf_procfile_fops; | 297 | qeth_perf_procfile->proc_fops = &qeth_perf_procfile_fops; |
427 | #endif /* CONFIG_QETH_PERF_STATS */ | 298 | #endif /* CONFIG_QETH_PERF_STATS */ |
428 | 299 | ||
429 | qeth_ipato_procfile = create_proc_entry(QETH_IPATO_PROCFILE_NAME, | ||
430 | S_IFREG | 0444, NULL); | ||
431 | if (qeth_ipato_procfile) | ||
432 | qeth_ipato_procfile->proc_fops = &qeth_ipato_procfile_fops; | ||
433 | |||
434 | if (qeth_procfile && | 300 | if (qeth_procfile && |
435 | qeth_ipato_procfile && | ||
436 | qeth_perf_procfile_created) | 301 | qeth_perf_procfile_created) |
437 | return 0; | 302 | return 0; |
438 | else | 303 | else |
@@ -446,62 +311,5 @@ qeth_remove_procfs_entries(void) | |||
446 | remove_proc_entry(QETH_PROCFILE_NAME, NULL); | 311 | remove_proc_entry(QETH_PROCFILE_NAME, NULL); |
447 | if (qeth_perf_procfile) | 312 | if (qeth_perf_procfile) |
448 | remove_proc_entry(QETH_PERF_PROCFILE_NAME, NULL); | 313 | remove_proc_entry(QETH_PERF_PROCFILE_NAME, NULL); |
449 | if (qeth_ipato_procfile) | ||
450 | remove_proc_entry(QETH_IPATO_PROCFILE_NAME, NULL); | ||
451 | } | 314 | } |
452 | 315 | ||
453 | |||
454 | /* ONLY FOR DEVELOPMENT! -> make it as module */ | ||
455 | /* | ||
456 | static void | ||
457 | qeth_create_sysfs_entries(void) | ||
458 | { | ||
459 | struct device *dev; | ||
460 | |||
461 | down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); | ||
462 | |||
463 | list_for_each_entry(dev, &qeth_ccwgroup_driver.driver.devices, | ||
464 | driver_list) | ||
465 | qeth_create_device_attributes(dev); | ||
466 | |||
467 | up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); | ||
468 | } | ||
469 | |||
470 | static void | ||
471 | qeth_remove_sysfs_entries(void) | ||
472 | { | ||
473 | struct device *dev; | ||
474 | |||
475 | down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); | ||
476 | |||
477 | list_for_each_entry(dev, &qeth_ccwgroup_driver.driver.devices, | ||
478 | driver_list) | ||
479 | qeth_remove_device_attributes(dev); | ||
480 | |||
481 | up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); | ||
482 | } | ||
483 | |||
484 | static int __init | ||
485 | qeth_fs_init(void) | ||
486 | { | ||
487 | printk(KERN_INFO "qeth_fs_init\n"); | ||
488 | qeth_create_procfs_entries(); | ||
489 | qeth_create_sysfs_entries(); | ||
490 | |||
491 | return 0; | ||
492 | } | ||
493 | |||
494 | static void __exit | ||
495 | qeth_fs_exit(void) | ||
496 | { | ||
497 | printk(KERN_INFO "qeth_fs_exit\n"); | ||
498 | qeth_remove_procfs_entries(); | ||
499 | qeth_remove_sysfs_entries(); | ||
500 | } | ||
501 | |||
502 | |||
503 | module_init(qeth_fs_init); | ||
504 | module_exit(qeth_fs_exit); | ||
505 | |||
506 | MODULE_LICENSE("GPL"); | ||
507 | */ | ||
diff --git a/drivers/s390/net/qeth_sys.c b/drivers/s390/net/qeth_sys.c index ddd6019ba092..0ea185f70f75 100644 --- a/drivers/s390/net/qeth_sys.c +++ b/drivers/s390/net/qeth_sys.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * | 2 | * |
3 | * linux/drivers/s390/net/qeth_sys.c ($Revision: 1.58 $) | 3 | * linux/drivers/s390/net/qeth_sys.c ($Revision: 1.60 $) |
4 | * | 4 | * |
5 | * Linux on zSeries OSA Express and HiperSockets support | 5 | * Linux on zSeries OSA Express and HiperSockets support |
6 | * This file contains code related to sysfs. | 6 | * This file contains code related to sysfs. |
@@ -20,7 +20,7 @@ | |||
20 | #include "qeth_mpc.h" | 20 | #include "qeth_mpc.h" |
21 | #include "qeth_fs.h" | 21 | #include "qeth_fs.h" |
22 | 22 | ||
23 | const char *VERSION_QETH_SYS_C = "$Revision: 1.58 $"; | 23 | const char *VERSION_QETH_SYS_C = "$Revision: 1.60 $"; |
24 | 24 | ||
25 | /*****************************************************************************/ | 25 | /*****************************************************************************/ |
26 | /* */ | 26 | /* */ |
@@ -160,7 +160,7 @@ qeth_dev_portname_store(struct device *dev, struct device_attribute *attr, const | |||
160 | return -EPERM; | 160 | return -EPERM; |
161 | 161 | ||
162 | tmp = strsep((char **) &buf, "\n"); | 162 | tmp = strsep((char **) &buf, "\n"); |
163 | if ((strlen(tmp) > 8) || (strlen(tmp) < 2)) | 163 | if ((strlen(tmp) > 8) || (strlen(tmp) == 0)) |
164 | return -EINVAL; | 164 | return -EINVAL; |
165 | 165 | ||
166 | card->info.portname[0] = strlen(tmp); | 166 | card->info.portname[0] = strlen(tmp); |
diff --git a/drivers/s390/net/qeth_tso.h b/drivers/s390/net/qeth_tso.h index e245af3c4cbd..3c50b6f24f51 100644 --- a/drivers/s390/net/qeth_tso.h +++ b/drivers/s390/net/qeth_tso.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/s390/net/qeth_tso.h ($Revision: 1.7 $) | 2 | * linux/drivers/s390/net/qeth_tso.h ($Revision: 1.8 $) |
3 | * | 3 | * |
4 | * Header file for qeth TCP Segmentation Offload support. | 4 | * Header file for qeth TCP Segmentation Offload support. |
5 | * | 5 | * |
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Author(s): Frank Pavlic <fpavlic@de.ibm.com> | 8 | * Author(s): Frank Pavlic <fpavlic@de.ibm.com> |
9 | * | 9 | * |
10 | * $Revision: 1.7 $ $Date: 2005/05/04 20:19:18 $ | 10 | * $Revision: 1.8 $ $Date: 2005/05/04 20:19:18 $ |
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | #ifndef __QETH_TSO_H__ | 13 | #ifndef __QETH_TSO_H__ |
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index f286a6f1c0db..e0439be4b573 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c | |||
@@ -2046,7 +2046,7 @@ static int atapi_qc_complete(struct ata_queued_cmd *qc) | |||
2046 | else { | 2046 | else { |
2047 | u8 *scsicmd = cmd->cmnd; | 2047 | u8 *scsicmd = cmd->cmnd; |
2048 | 2048 | ||
2049 | if (scsicmd[0] == INQUIRY) { | 2049 | if ((scsicmd[0] == INQUIRY) && ((scsicmd[1] & 0x03) == 0)) { |
2050 | u8 *buf = NULL; | 2050 | u8 *buf = NULL; |
2051 | unsigned int buflen; | 2051 | unsigned int buflen; |
2052 | 2052 | ||
@@ -2060,9 +2060,6 @@ static int atapi_qc_complete(struct ata_queued_cmd *qc) | |||
2060 | * device. 2) Ensure response data format / ATAPI information | 2060 | * device. 2) Ensure response data format / ATAPI information |
2061 | * are always correct. | 2061 | * are always correct. |
2062 | */ | 2062 | */ |
2063 | /* FIXME: do we ever override EVPD pages and the like, with | ||
2064 | * this code? | ||
2065 | */ | ||
2066 | if (buf[2] == 0) { | 2063 | if (buf[2] == 0) { |
2067 | buf[2] = 0x5; | 2064 | buf[2] = 0x5; |
2068 | buf[3] = 0x32; | 2065 | buf[3] = 0x32; |
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 94e5167f260d..4e6709f448e1 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
@@ -400,6 +400,36 @@ static struct scsi_target *scsi_alloc_target(struct device *parent, | |||
400 | return found_target; | 400 | return found_target; |
401 | } | 401 | } |
402 | 402 | ||
403 | struct work_queue_wrapper { | ||
404 | struct work_struct work; | ||
405 | struct scsi_target *starget; | ||
406 | }; | ||
407 | |||
408 | static void scsi_target_reap_work(void *data) { | ||
409 | struct work_queue_wrapper *wqw = (struct work_queue_wrapper *)data; | ||
410 | struct scsi_target *starget = wqw->starget; | ||
411 | struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); | ||
412 | unsigned long flags; | ||
413 | |||
414 | kfree(wqw); | ||
415 | |||
416 | spin_lock_irqsave(shost->host_lock, flags); | ||
417 | |||
418 | if (--starget->reap_ref == 0 && list_empty(&starget->devices)) { | ||
419 | list_del_init(&starget->siblings); | ||
420 | spin_unlock_irqrestore(shost->host_lock, flags); | ||
421 | transport_remove_device(&starget->dev); | ||
422 | device_del(&starget->dev); | ||
423 | transport_destroy_device(&starget->dev); | ||
424 | put_device(&starget->dev); | ||
425 | return; | ||
426 | |||
427 | } | ||
428 | spin_unlock_irqrestore(shost->host_lock, flags); | ||
429 | |||
430 | return; | ||
431 | } | ||
432 | |||
403 | /** | 433 | /** |
404 | * scsi_target_reap - check to see if target is in use and destroy if not | 434 | * scsi_target_reap - check to see if target is in use and destroy if not |
405 | * | 435 | * |
@@ -411,19 +441,18 @@ static struct scsi_target *scsi_alloc_target(struct device *parent, | |||
411 | */ | 441 | */ |
412 | void scsi_target_reap(struct scsi_target *starget) | 442 | void scsi_target_reap(struct scsi_target *starget) |
413 | { | 443 | { |
414 | struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); | 444 | struct work_queue_wrapper *wqw = |
415 | unsigned long flags; | 445 | kzalloc(sizeof(struct work_queue_wrapper), GFP_ATOMIC); |
416 | spin_lock_irqsave(shost->host_lock, flags); | ||
417 | 446 | ||
418 | if (--starget->reap_ref == 0 && list_empty(&starget->devices)) { | 447 | if (!wqw) { |
419 | list_del_init(&starget->siblings); | 448 | starget_printk(KERN_ERR, starget, |
420 | spin_unlock_irqrestore(shost->host_lock, flags); | 449 | "Failed to allocate memory in scsi_reap_target()\n"); |
421 | device_del(&starget->dev); | ||
422 | transport_unregister_device(&starget->dev); | ||
423 | put_device(&starget->dev); | ||
424 | return; | 450 | return; |
425 | } | 451 | } |
426 | spin_unlock_irqrestore(shost->host_lock, flags); | 452 | |
453 | INIT_WORK(&wqw->work, scsi_target_reap_work, wqw); | ||
454 | wqw->starget = starget; | ||
455 | schedule_work(&wqw->work); | ||
427 | } | 456 | } |
428 | 457 | ||
429 | /** | 458 | /** |
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index 6cd5931d9a54..2a1a99a2ef56 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c | |||
@@ -105,6 +105,7 @@ static struct { | |||
105 | { FC_PORTSTATE_LINKDOWN, "Linkdown" }, | 105 | { FC_PORTSTATE_LINKDOWN, "Linkdown" }, |
106 | { FC_PORTSTATE_ERROR, "Error" }, | 106 | { FC_PORTSTATE_ERROR, "Error" }, |
107 | { FC_PORTSTATE_LOOPBACK, "Loopback" }, | 107 | { FC_PORTSTATE_LOOPBACK, "Loopback" }, |
108 | { FC_PORTSTATE_DELETED, "Deleted" }, | ||
108 | }; | 109 | }; |
109 | fc_enum_name_search(port_state, fc_port_state, fc_port_state_names) | 110 | fc_enum_name_search(port_state, fc_port_state, fc_port_state_names) |
110 | #define FC_PORTSTATE_MAX_NAMELEN 20 | 111 | #define FC_PORTSTATE_MAX_NAMELEN 20 |
@@ -211,6 +212,7 @@ fc_bitfield_name_search(remote_port_roles, fc_remote_port_role_names) | |||
211 | #define FC_MGMTSRVR_PORTID 0x00000a | 212 | #define FC_MGMTSRVR_PORTID 0x00000a |
212 | 213 | ||
213 | 214 | ||
215 | static void fc_shost_remove_rports(void *data); | ||
214 | static void fc_timeout_deleted_rport(void *data); | 216 | static void fc_timeout_deleted_rport(void *data); |
215 | static void fc_scsi_scan_rport(void *data); | 217 | static void fc_scsi_scan_rport(void *data); |
216 | static void fc_rport_terminate(struct fc_rport *rport); | 218 | static void fc_rport_terminate(struct fc_rport *rport); |
@@ -318,6 +320,8 @@ static int fc_host_setup(struct transport_container *tc, struct device *dev, | |||
318 | fc_host_next_rport_number(shost) = 0; | 320 | fc_host_next_rport_number(shost) = 0; |
319 | fc_host_next_target_id(shost) = 0; | 321 | fc_host_next_target_id(shost) = 0; |
320 | 322 | ||
323 | fc_host_flags(shost) = 0; | ||
324 | INIT_WORK(&fc_host_rport_del_work(shost), fc_shost_remove_rports, shost); | ||
321 | return 0; | 325 | return 0; |
322 | } | 326 | } |
323 | 327 | ||
@@ -387,6 +391,7 @@ show_fc_rport_##field (struct class_device *cdev, char *buf) \ | |||
387 | struct fc_internal *i = to_fc_internal(shost->transportt); \ | 391 | struct fc_internal *i = to_fc_internal(shost->transportt); \ |
388 | if ((i->f->get_rport_##field) && \ | 392 | if ((i->f->get_rport_##field) && \ |
389 | !((rport->port_state == FC_PORTSTATE_BLOCKED) || \ | 393 | !((rport->port_state == FC_PORTSTATE_BLOCKED) || \ |
394 | (rport->port_state == FC_PORTSTATE_DELETED) || \ | ||
390 | (rport->port_state == FC_PORTSTATE_NOTPRESENT))) \ | 395 | (rport->port_state == FC_PORTSTATE_NOTPRESENT))) \ |
391 | i->f->get_rport_##field(rport); \ | 396 | i->f->get_rport_##field(rport); \ |
392 | return snprintf(buf, sz, format_string, cast rport->field); \ | 397 | return snprintf(buf, sz, format_string, cast rport->field); \ |
@@ -402,6 +407,7 @@ store_fc_rport_##field(struct class_device *cdev, const char *buf, \ | |||
402 | struct Scsi_Host *shost = rport_to_shost(rport); \ | 407 | struct Scsi_Host *shost = rport_to_shost(rport); \ |
403 | struct fc_internal *i = to_fc_internal(shost->transportt); \ | 408 | struct fc_internal *i = to_fc_internal(shost->transportt); \ |
404 | if ((rport->port_state == FC_PORTSTATE_BLOCKED) || \ | 409 | if ((rport->port_state == FC_PORTSTATE_BLOCKED) || \ |
410 | (rport->port_state == FC_PORTSTATE_DELETED) || \ | ||
405 | (rport->port_state == FC_PORTSTATE_NOTPRESENT)) \ | 411 | (rport->port_state == FC_PORTSTATE_NOTPRESENT)) \ |
406 | return -EBUSY; \ | 412 | return -EBUSY; \ |
407 | val = simple_strtoul(buf, NULL, 0); \ | 413 | val = simple_strtoul(buf, NULL, 0); \ |
@@ -519,6 +525,7 @@ store_fc_rport_dev_loss_tmo(struct class_device *cdev, const char *buf, | |||
519 | struct Scsi_Host *shost = rport_to_shost(rport); | 525 | struct Scsi_Host *shost = rport_to_shost(rport); |
520 | struct fc_internal *i = to_fc_internal(shost->transportt); | 526 | struct fc_internal *i = to_fc_internal(shost->transportt); |
521 | if ((rport->port_state == FC_PORTSTATE_BLOCKED) || | 527 | if ((rport->port_state == FC_PORTSTATE_BLOCKED) || |
528 | (rport->port_state == FC_PORTSTATE_DELETED) || | ||
522 | (rport->port_state == FC_PORTSTATE_NOTPRESENT)) | 529 | (rport->port_state == FC_PORTSTATE_NOTPRESENT)) |
523 | return -EBUSY; | 530 | return -EBUSY; |
524 | val = simple_strtoul(buf, NULL, 0); | 531 | val = simple_strtoul(buf, NULL, 0); |
@@ -1769,7 +1776,7 @@ fc_timeout_deleted_rport(void *data) | |||
1769 | rport->maxframe_size = -1; | 1776 | rport->maxframe_size = -1; |
1770 | rport->supported_classes = FC_COS_UNSPECIFIED; | 1777 | rport->supported_classes = FC_COS_UNSPECIFIED; |
1771 | rport->roles = FC_RPORT_ROLE_UNKNOWN; | 1778 | rport->roles = FC_RPORT_ROLE_UNKNOWN; |
1772 | rport->port_state = FC_PORTSTATE_NOTPRESENT; | 1779 | rport->port_state = FC_PORTSTATE_DELETED; |
1773 | 1780 | ||
1774 | /* remove the identifiers that aren't used in the consisting binding */ | 1781 | /* remove the identifiers that aren't used in the consisting binding */ |
1775 | switch (fc_host_tgtid_bind_type(shost)) { | 1782 | switch (fc_host_tgtid_bind_type(shost)) { |
@@ -1789,14 +1796,23 @@ fc_timeout_deleted_rport(void *data) | |||
1789 | break; | 1796 | break; |
1790 | } | 1797 | } |
1791 | 1798 | ||
1792 | spin_unlock_irqrestore(shost->host_lock, flags); | ||
1793 | |||
1794 | /* | 1799 | /* |
1795 | * As this only occurs if the remote port (scsi target) | 1800 | * As this only occurs if the remote port (scsi target) |
1796 | * went away and didn't come back - we'll remove | 1801 | * went away and didn't come back - we'll remove |
1797 | * all attached scsi devices. | 1802 | * all attached scsi devices. |
1803 | * | ||
1804 | * We'll schedule the shost work item to perform the actual removal | ||
1805 | * to avoid recursion in the different flush calls if we perform | ||
1806 | * the removal in each target - and there are lots of targets | ||
1807 | * whose timeouts fire at the same time. | ||
1798 | */ | 1808 | */ |
1799 | fc_rport_tgt_remove(rport); | 1809 | |
1810 | if ( !(fc_host_flags(shost) & FC_SHOST_RPORT_DEL_SCHEDULED)) { | ||
1811 | fc_host_flags(shost) |= FC_SHOST_RPORT_DEL_SCHEDULED; | ||
1812 | scsi_queue_work(shost, &fc_host_rport_del_work(shost)); | ||
1813 | } | ||
1814 | |||
1815 | spin_unlock_irqrestore(shost->host_lock, flags); | ||
1800 | } | 1816 | } |
1801 | 1817 | ||
1802 | /** | 1818 | /** |
@@ -1818,6 +1834,41 @@ fc_scsi_scan_rport(void *data) | |||
1818 | } | 1834 | } |
1819 | 1835 | ||
1820 | 1836 | ||
1837 | /** | ||
1838 | * fc_shost_remove_rports - called to remove all rports that are marked | ||
1839 | * as in a deleted (not connected) state. | ||
1840 | * | ||
1841 | * @data: shost whose rports are to be looked at | ||
1842 | **/ | ||
1843 | static void | ||
1844 | fc_shost_remove_rports(void *data) | ||
1845 | { | ||
1846 | struct Scsi_Host *shost = (struct Scsi_Host *)data; | ||
1847 | struct fc_rport *rport, *next_rport; | ||
1848 | unsigned long flags; | ||
1849 | |||
1850 | spin_lock_irqsave(shost->host_lock, flags); | ||
1851 | while (fc_host_flags(shost) & FC_SHOST_RPORT_DEL_SCHEDULED) { | ||
1852 | |||
1853 | fc_host_flags(shost) &= ~FC_SHOST_RPORT_DEL_SCHEDULED; | ||
1854 | |||
1855 | restart_search: | ||
1856 | list_for_each_entry_safe(rport, next_rport, | ||
1857 | &fc_host_rport_bindings(shost), peers) { | ||
1858 | if (rport->port_state == FC_PORTSTATE_DELETED) { | ||
1859 | rport->port_state = FC_PORTSTATE_NOTPRESENT; | ||
1860 | spin_unlock_irqrestore(shost->host_lock, flags); | ||
1861 | fc_rport_tgt_remove(rport); | ||
1862 | spin_lock_irqsave(shost->host_lock, flags); | ||
1863 | goto restart_search; | ||
1864 | } | ||
1865 | } | ||
1866 | |||
1867 | } | ||
1868 | spin_unlock_irqrestore(shost->host_lock, flags); | ||
1869 | } | ||
1870 | |||
1871 | |||
1821 | MODULE_AUTHOR("Martin Hicks"); | 1872 | MODULE_AUTHOR("Martin Hicks"); |
1822 | MODULE_DESCRIPTION("FC Transport Attributes"); | 1873 | MODULE_DESCRIPTION("FC Transport Attributes"); |
1823 | MODULE_LICENSE("GPL"); | 1874 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index ad47c1b84c3f..812bae62c8ec 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig | |||
@@ -10,7 +10,7 @@ menu "Serial drivers" | |||
10 | # The new 8250/16550 serial drivers | 10 | # The new 8250/16550 serial drivers |
11 | config SERIAL_8250 | 11 | config SERIAL_8250 |
12 | tristate "8250/16550 and compatible serial support" | 12 | tristate "8250/16550 and compatible serial support" |
13 | depends on (BROKEN || !(SPARC64 || SPARC32)) | 13 | depends on (BROKEN || !SPARC) |
14 | select SERIAL_CORE | 14 | select SERIAL_CORE |
15 | ---help--- | 15 | ---help--- |
16 | This selects whether you want to include the driver for the standard | 16 | This selects whether you want to include the driver for the standard |
@@ -469,14 +469,14 @@ config SERIAL_IMX_CONSOLE | |||
469 | 469 | ||
470 | config SERIAL_SUNCORE | 470 | config SERIAL_SUNCORE |
471 | bool | 471 | bool |
472 | depends on SPARC32 || SPARC64 | 472 | depends on SPARC |
473 | select SERIAL_CORE | 473 | select SERIAL_CORE |
474 | select SERIAL_CORE_CONSOLE | 474 | select SERIAL_CORE_CONSOLE |
475 | default y | 475 | default y |
476 | 476 | ||
477 | config SERIAL_SUNZILOG | 477 | config SERIAL_SUNZILOG |
478 | tristate "Sun Zilog8530 serial support" | 478 | tristate "Sun Zilog8530 serial support" |
479 | depends on SPARC32 || SPARC64 | 479 | depends on SPARC |
480 | help | 480 | help |
481 | This driver supports the Zilog8530 serial ports found on many Sparc | 481 | This driver supports the Zilog8530 serial ports found on many Sparc |
482 | systems. Say Y or M if you want to be able to these serial ports. | 482 | systems. Say Y or M if you want to be able to these serial ports. |
@@ -491,7 +491,7 @@ config SERIAL_SUNZILOG_CONSOLE | |||
491 | 491 | ||
492 | config SERIAL_SUNSU | 492 | config SERIAL_SUNSU |
493 | tristate "Sun SU serial support" | 493 | tristate "Sun SU serial support" |
494 | depends on (SPARC32 || SPARC64) && PCI | 494 | depends on SPARC && PCI |
495 | help | 495 | help |
496 | This driver supports the 8250 serial ports that run the keyboard and | 496 | This driver supports the 8250 serial ports that run the keyboard and |
497 | mouse on (PCI) UltraSPARC systems. Say Y or M if you want to be able | 497 | mouse on (PCI) UltraSPARC systems. Say Y or M if you want to be able |
@@ -547,7 +547,7 @@ config PDC_CONSOLE | |||
547 | 547 | ||
548 | config SERIAL_SUNSAB | 548 | config SERIAL_SUNSAB |
549 | tristate "Sun Siemens SAB82532 serial support" | 549 | tristate "Sun Siemens SAB82532 serial support" |
550 | depends on (SPARC32 || SPARC64) && PCI | 550 | depends on SPARC && PCI |
551 | help | 551 | help |
552 | This driver supports the Siemens SAB82532 DUSCC serial ports on newer | 552 | This driver supports the Siemens SAB82532 DUSCC serial ports on newer |
553 | (PCI) UltraSPARC systems. Say Y or M if you want to be able to these | 553 | (PCI) UltraSPARC systems. Say Y or M if you want to be able to these |
diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c index 89d7bd3eaee3..d84476ee6592 100644 --- a/drivers/serial/amba-pl011.c +++ b/drivers/serial/amba-pl011.c | |||
@@ -160,7 +160,7 @@ pl011_rx_chars(struct uart_amba_port *uap) | |||
160 | flag = TTY_FRAME; | 160 | flag = TTY_FRAME; |
161 | } | 161 | } |
162 | 162 | ||
163 | if (uart_handle_sysrq_char(&uap->port, ch, regs)) | 163 | if (uart_handle_sysrq_char(&uap->port, ch & 255, regs)) |
164 | goto ignore_char; | 164 | goto ignore_char; |
165 | 165 | ||
166 | uart_insert_char(&uap->port, ch, UART011_DR_OE, ch, flag); | 166 | uart_insert_char(&uap->port, ch, UART011_DR_OE, ch, flag); |
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c index ff5e6309d682..cc998b99a19f 100644 --- a/drivers/serial/pxa.c +++ b/drivers/serial/pxa.c | |||
@@ -361,7 +361,7 @@ static int serial_pxa_startup(struct uart_port *port) | |||
361 | if (port->line == 3) /* HWUART */ | 361 | if (port->line == 3) /* HWUART */ |
362 | up->mcr |= UART_MCR_AFE; | 362 | up->mcr |= UART_MCR_AFE; |
363 | else | 363 | else |
364 | up->mcr = 0; | 364 | up->mcr = 0; |
365 | 365 | ||
366 | /* | 366 | /* |
367 | * Allocate the IRQ | 367 | * Allocate the IRQ |
@@ -641,7 +641,7 @@ serial_pxa_console_write(struct console *co, const char *s, unsigned int count) | |||
641 | int i; | 641 | int i; |
642 | 642 | ||
643 | /* | 643 | /* |
644 | * First save the UER then disable the interrupts | 644 | * First save the IER then disable the interrupts |
645 | */ | 645 | */ |
646 | ier = serial_in(up, UART_IER); | 646 | ier = serial_in(up, UART_IER); |
647 | serial_out(up, UART_IER, UART_IER_UUE); | 647 | serial_out(up, UART_IER, UART_IER_UUE); |
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index e197ce9353de..e80ef9467825 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c | |||
@@ -1432,7 +1432,8 @@ static int usb_generic_suspend(struct device *dev, pm_message_t message) | |||
1432 | mark_quiesced(intf); | 1432 | mark_quiesced(intf); |
1433 | } else { | 1433 | } else { |
1434 | // FIXME else if there's no suspend method, disconnect... | 1434 | // FIXME else if there's no suspend method, disconnect... |
1435 | dev_warn(dev, "no %s?\n", "suspend"); | 1435 | dev_warn(dev, "no suspend for driver %s?\n", driver->name); |
1436 | mark_quiesced(intf); | ||
1436 | status = 0; | 1437 | status = 0; |
1437 | } | 1438 | } |
1438 | return status; | 1439 | return status; |
@@ -1460,8 +1461,10 @@ static int usb_generic_resume(struct device *dev) | |||
1460 | } | 1461 | } |
1461 | 1462 | ||
1462 | if ((dev->driver == NULL) || | 1463 | if ((dev->driver == NULL) || |
1463 | (dev->driver_data == &usb_generic_driver_data)) | 1464 | (dev->driver_data == &usb_generic_driver_data)) { |
1465 | dev->power.power_state.event = PM_EVENT_FREEZE; | ||
1464 | return 0; | 1466 | return 0; |
1467 | } | ||
1465 | 1468 | ||
1466 | intf = to_usb_interface(dev); | 1469 | intf = to_usb_interface(dev); |
1467 | driver = to_usb_driver(dev->driver); | 1470 | driver = to_usb_driver(dev->driver); |
@@ -1481,7 +1484,7 @@ static int usb_generic_resume(struct device *dev) | |||
1481 | mark_quiesced(intf); | 1484 | mark_quiesced(intf); |
1482 | } | 1485 | } |
1483 | } else | 1486 | } else |
1484 | dev_warn(dev, "no %s?\n", "resume"); | 1487 | dev_warn(dev, "no resume for driver %s?\n", driver->name); |
1485 | return 0; | 1488 | return 0; |
1486 | } | 1489 | } |
1487 | 1490 | ||
diff --git a/drivers/usb/input/aiptek.c b/drivers/usb/input/aiptek.c index 1c3b472a3bca..0e2505c073db 100644 --- a/drivers/usb/input/aiptek.c +++ b/drivers/usb/input/aiptek.c | |||
@@ -2103,7 +2103,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
2103 | * values. | 2103 | * values. |
2104 | */ | 2104 | */ |
2105 | input_set_abs_params(inputdev, ABS_X, 0, 2999, 0, 0); | 2105 | input_set_abs_params(inputdev, ABS_X, 0, 2999, 0, 0); |
2106 | input_set_abs_params(inputdev, ABS_X, 0, 2249, 0, 0); | 2106 | input_set_abs_params(inputdev, ABS_Y, 0, 2249, 0, 0); |
2107 | input_set_abs_params(inputdev, ABS_PRESSURE, 0, 511, 0, 0); | 2107 | input_set_abs_params(inputdev, ABS_PRESSURE, 0, 511, 0, 0); |
2108 | input_set_abs_params(inputdev, ABS_TILT_X, AIPTEK_TILT_MIN, AIPTEK_TILT_MAX, 0, 0); | 2108 | input_set_abs_params(inputdev, ABS_TILT_X, AIPTEK_TILT_MIN, AIPTEK_TILT_MAX, 0, 0); |
2109 | input_set_abs_params(inputdev, ABS_TILT_Y, AIPTEK_TILT_MIN, AIPTEK_TILT_MAX, 0, 0); | 2109 | input_set_abs_params(inputdev, ABS_TILT_Y, AIPTEK_TILT_MIN, AIPTEK_TILT_MAX, 0, 0); |
diff --git a/drivers/usb/input/kbtab.c b/drivers/usb/input/kbtab.c index a248664b5d1d..fd48e74e78ed 100644 --- a/drivers/usb/input/kbtab.c +++ b/drivers/usb/input/kbtab.c | |||
@@ -159,7 +159,7 @@ static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *i | |||
159 | input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH); | 159 | input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH); |
160 | input_dev->mscbit[0] |= BIT(MSC_SERIAL); | 160 | input_dev->mscbit[0] |= BIT(MSC_SERIAL); |
161 | input_set_abs_params(input_dev, ABS_X, 0, 0x2000, 4, 0); | 161 | input_set_abs_params(input_dev, ABS_X, 0, 0x2000, 4, 0); |
162 | input_set_abs_params(input_dev, ABS_X, 0, 0x1750, 4, 0); | 162 | input_set_abs_params(input_dev, ABS_Y, 0, 0x1750, 4, 0); |
163 | input_set_abs_params(input_dev, ABS_PRESSURE, 0, 0xff, 0, 0); | 163 | input_set_abs_params(input_dev, ABS_PRESSURE, 0, 0xff, 0, 0); |
164 | 164 | ||
165 | endpoint = &intf->cur_altsetting->endpoint[0].desc; | 165 | endpoint = &intf->cur_altsetting->endpoint[0].desc; |
diff --git a/drivers/usb/input/wacom.c b/drivers/usb/input/wacom.c index aea1cfae34cc..dc099bbe12bf 100644 --- a/drivers/usb/input/wacom.c +++ b/drivers/usb/input/wacom.c | |||
@@ -854,7 +854,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i | |||
854 | 854 | ||
855 | input_dev->evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS); | 855 | input_dev->evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS); |
856 | input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH) | BIT(BTN_STYLUS); | 856 | input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH) | BIT(BTN_STYLUS); |
857 | input_set_abs_params(input_dev, ABS_X, 0, wacom->features->y_max, 4, 0); | 857 | input_set_abs_params(input_dev, ABS_X, 0, wacom->features->x_max, 4, 0); |
858 | input_set_abs_params(input_dev, ABS_Y, 0, wacom->features->y_max, 4, 0); | 858 | input_set_abs_params(input_dev, ABS_Y, 0, wacom->features->y_max, 4, 0); |
859 | input_set_abs_params(input_dev, ABS_PRESSURE, 0, wacom->features->pressure_max, 0, 0); | 859 | input_set_abs_params(input_dev, ABS_PRESSURE, 0, wacom->features->pressure_max, 0, 0); |
860 | 860 | ||
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index 4837524eada7..4ef5527028c5 100644 --- a/drivers/usb/storage/scsiglue.c +++ b/drivers/usb/storage/scsiglue.c | |||
@@ -109,7 +109,7 @@ static int slave_configure(struct scsi_device *sdev) | |||
109 | * data comes from. | 109 | * data comes from. |
110 | */ | 110 | */ |
111 | if (sdev->scsi_level < SCSI_2) | 111 | if (sdev->scsi_level < SCSI_2) |
112 | sdev->scsi_level = SCSI_2; | 112 | sdev->scsi_level = sdev->sdev_target->scsi_level = SCSI_2; |
113 | 113 | ||
114 | /* According to the technical support people at Genesys Logic, | 114 | /* According to the technical support people at Genesys Logic, |
115 | * devices using their chips have problems transferring more than | 115 | * devices using their chips have problems transferring more than |
@@ -162,7 +162,7 @@ static int slave_configure(struct scsi_device *sdev) | |||
162 | * a Get-Max-LUN request, we won't lose much by setting the | 162 | * a Get-Max-LUN request, we won't lose much by setting the |
163 | * revision level down to 2. The only devices that would be | 163 | * revision level down to 2. The only devices that would be |
164 | * affected are those with sparse LUNs. */ | 164 | * affected are those with sparse LUNs. */ |
165 | sdev->scsi_level = SCSI_2; | 165 | sdev->scsi_level = sdev->sdev_target->scsi_level = SCSI_2; |
166 | 166 | ||
167 | /* USB-IDE bridges tend to report SK = 0x04 (Non-recoverable | 167 | /* USB-IDE bridges tend to report SK = 0x04 (Non-recoverable |
168 | * Hardware Error) when any low-level error occurs, | 168 | * Hardware Error) when any low-level error occurs, |
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 3e470c8b4193..cc8e3bf5001b 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -536,13 +536,13 @@ config FB_SUN3 | |||
536 | 536 | ||
537 | config FB_SBUS | 537 | config FB_SBUS |
538 | bool "SBUS and UPA framebuffers" | 538 | bool "SBUS and UPA framebuffers" |
539 | depends on (FB = y) && (SPARC32 || SPARC64) | 539 | depends on (FB = y) && SPARC |
540 | help | 540 | help |
541 | Say Y if you want support for SBUS or UPA based frame buffer device. | 541 | Say Y if you want support for SBUS or UPA based frame buffer device. |
542 | 542 | ||
543 | config FB_BW2 | 543 | config FB_BW2 |
544 | bool "BWtwo support" | 544 | bool "BWtwo support" |
545 | depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) | 545 | depends on (FB = y) && (SPARC && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) |
546 | select FB_CFB_FILLRECT | 546 | select FB_CFB_FILLRECT |
547 | select FB_CFB_COPYAREA | 547 | select FB_CFB_COPYAREA |
548 | select FB_CFB_IMAGEBLIT | 548 | select FB_CFB_IMAGEBLIT |
@@ -551,7 +551,7 @@ config FB_BW2 | |||
551 | 551 | ||
552 | config FB_CG3 | 552 | config FB_CG3 |
553 | bool "CGthree support" | 553 | bool "CGthree support" |
554 | depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) | 554 | depends on (FB = y) && (SPARC && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) |
555 | select FB_CFB_FILLRECT | 555 | select FB_CFB_FILLRECT |
556 | select FB_CFB_COPYAREA | 556 | select FB_CFB_COPYAREA |
557 | select FB_CFB_IMAGEBLIT | 557 | select FB_CFB_IMAGEBLIT |
@@ -560,7 +560,7 @@ config FB_CG3 | |||
560 | 560 | ||
561 | config FB_CG6 | 561 | config FB_CG6 |
562 | bool "CGsix (GX,TurboGX) support" | 562 | bool "CGsix (GX,TurboGX) support" |
563 | depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) | 563 | depends on (FB = y) && (SPARC && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) |
564 | select FB_CFB_COPYAREA | 564 | select FB_CFB_COPYAREA |
565 | select FB_CFB_IMAGEBLIT | 565 | select FB_CFB_IMAGEBLIT |
566 | help | 566 | help |
@@ -1268,7 +1268,7 @@ config FB_LEO | |||
1268 | 1268 | ||
1269 | config FB_PCI | 1269 | config FB_PCI |
1270 | bool "PCI framebuffers" | 1270 | bool "PCI framebuffers" |
1271 | depends on (FB = y) && PCI && (SPARC64 || SPARC32) | 1271 | depends on (FB = y) && PCI && SPARC |
1272 | 1272 | ||
1273 | config FB_IGA | 1273 | config FB_IGA |
1274 | bool "IGA 168x display support" | 1274 | bool "IGA 168x display support" |
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig index 5f74df993406..a5d09e159cd1 100644 --- a/drivers/video/console/Kconfig +++ b/drivers/video/console/Kconfig | |||
@@ -6,7 +6,7 @@ menu "Console display driver support" | |||
6 | 6 | ||
7 | config VGA_CONSOLE | 7 | config VGA_CONSOLE |
8 | bool "VGA text console" if EMBEDDED || !X86 | 8 | bool "VGA text console" if EMBEDDED || !X86 |
9 | depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC32 && !SPARC64 && !M68K && !PARISC && !ARCH_VERSATILE | 9 | depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC && !M68K && !PARISC && !ARCH_VERSATILE |
10 | default y | 10 | default y |
11 | help | 11 | help |
12 | Saying Y here will allow you to use Linux in text mode through a | 12 | Saying Y here will allow you to use Linux in text mode through a |
@@ -68,7 +68,7 @@ config SGI_NEWPORT_CONSOLE | |||
68 | 68 | ||
69 | config PROM_CONSOLE | 69 | config PROM_CONSOLE |
70 | bool "PROM console" | 70 | bool "PROM console" |
71 | depends on SPARC32 || SPARC64 | 71 | depends on SPARC |
72 | help | 72 | help |
73 | Say Y to build a console driver for Sun machines that uses the | 73 | Say Y to build a console driver for Sun machines that uses the |
74 | terminal emulation built into their console PROMS. | 74 | terminal emulation built into their console PROMS. |
@@ -136,7 +136,7 @@ config FONTS | |||
136 | config FONT_8x8 | 136 | config FONT_8x8 |
137 | bool "VGA 8x8 font" if FONTS | 137 | bool "VGA 8x8 font" if FONTS |
138 | depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE | 138 | depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE |
139 | default y if !SPARC32 && !SPARC64 && !FONTS | 139 | default y if !SPARC && !FONTS |
140 | help | 140 | help |
141 | This is the "high resolution" font for the VGA frame buffer (the one | 141 | This is the "high resolution" font for the VGA frame buffer (the one |
142 | provided by the text console 80x50 (and higher) modes). | 142 | provided by the text console 80x50 (and higher) modes). |
@@ -150,7 +150,7 @@ config FONT_8x8 | |||
150 | config FONT_8x16 | 150 | config FONT_8x16 |
151 | bool "VGA 8x16 font" if FONTS | 151 | bool "VGA 8x16 font" if FONTS |
152 | depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE=y || STI_CONSOLE || USB_SISUSBVGA_CON | 152 | depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE=y || STI_CONSOLE || USB_SISUSBVGA_CON |
153 | default y if !SPARC32 && !SPARC64 && !FONTS | 153 | default y if !SPARC && !FONTS |
154 | help | 154 | help |
155 | This is the "high resolution" font for the VGA frame buffer (the one | 155 | This is the "high resolution" font for the VGA frame buffer (the one |
156 | provided by the VGA text console 80x25 mode. | 156 | provided by the VGA text console 80x25 mode. |
@@ -160,7 +160,7 @@ config FONT_8x16 | |||
160 | config FONT_6x11 | 160 | config FONT_6x11 |
161 | bool "Mac console 6x11 font (not supported by all drivers)" if FONTS | 161 | bool "Mac console 6x11 font (not supported by all drivers)" if FONTS |
162 | depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE | 162 | depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE |
163 | default y if !SPARC32 && !SPARC64 && !FONTS && MAC | 163 | default y if !SPARC && !FONTS && MAC |
164 | help | 164 | help |
165 | Small console font with Macintosh-style high-half glyphs. Some Mac | 165 | Small console font with Macintosh-style high-half glyphs. Some Mac |
166 | framebuffer drivers don't support this one at all. | 166 | framebuffer drivers don't support this one at all. |
@@ -176,7 +176,7 @@ config FONT_7x14 | |||
176 | config FONT_PEARL_8x8 | 176 | config FONT_PEARL_8x8 |
177 | bool "Pearl (old m68k) console 8x8 font" if FONTS | 177 | bool "Pearl (old m68k) console 8x8 font" if FONTS |
178 | depends on FRAMEBUFFER_CONSOLE | 178 | depends on FRAMEBUFFER_CONSOLE |
179 | default y if !SPARC32 && !SPARC64 && !FONTS && AMIGA | 179 | default y if !SPARC && !FONTS && AMIGA |
180 | help | 180 | help |
181 | Small console font with PC-style control-character and high-half | 181 | Small console font with PC-style control-character and high-half |
182 | glyphs. | 182 | glyphs. |
@@ -184,24 +184,24 @@ config FONT_PEARL_8x8 | |||
184 | config FONT_ACORN_8x8 | 184 | config FONT_ACORN_8x8 |
185 | bool "Acorn console 8x8 font" if FONTS | 185 | bool "Acorn console 8x8 font" if FONTS |
186 | depends on FRAMEBUFFER_CONSOLE | 186 | depends on FRAMEBUFFER_CONSOLE |
187 | default y if !SPARC32 && !SPARC64 && !FONTS && ARM && ARCH_ACORN | 187 | default y if !SPARC && !FONTS && ARM && ARCH_ACORN |
188 | help | 188 | help |
189 | Small console font with PC-style control characters and high-half | 189 | Small console font with PC-style control characters and high-half |
190 | glyphs. | 190 | glyphs. |
191 | 191 | ||
192 | config FONT_MINI_4x6 | 192 | config FONT_MINI_4x6 |
193 | bool "Mini 4x6 font" | 193 | bool "Mini 4x6 font" |
194 | depends on !SPARC32 && !SPARC64 && FONTS | 194 | depends on !SPARC && FONTS |
195 | 195 | ||
196 | config FONT_SUN8x16 | 196 | config FONT_SUN8x16 |
197 | bool "Sparc console 8x16 font" | 197 | bool "Sparc console 8x16 font" |
198 | depends on FRAMEBUFFER_CONSOLE && (!SPARC32 && !SPARC64 && FONTS || SPARC32 || SPARC64) | 198 | depends on FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC) |
199 | help | 199 | help |
200 | This is the high resolution console font for Sun machines. Say Y. | 200 | This is the high resolution console font for Sun machines. Say Y. |
201 | 201 | ||
202 | config FONT_SUN12x22 | 202 | config FONT_SUN12x22 |
203 | bool "Sparc console 12x22 font (not supported by all drivers)" | 203 | bool "Sparc console 12x22 font (not supported by all drivers)" |
204 | depends on FRAMEBUFFER_CONSOLE && (!SPARC32 && !SPARC64 && FONTS || SPARC32 || SPARC64) | 204 | depends on FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC) |
205 | help | 205 | help |
206 | This is the high resolution console font for Sun machines with very | 206 | This is the high resolution console font for Sun machines with very |
207 | big letters (like the letters used in the SPARC PROM). If the | 207 | big letters (like the letters used in the SPARC PROM). If the |
diff --git a/drivers/video/console/fbcon_ud.c b/drivers/video/console/fbcon_ud.c index c4d7c89212b4..9dd059e8b645 100644 --- a/drivers/video/console/fbcon_ud.c +++ b/drivers/video/console/fbcon_ud.c | |||
@@ -420,13 +420,15 @@ static void ud_cursor(struct vc_data *vc, struct fb_info *info, | |||
420 | int ud_update_start(struct fb_info *info) | 420 | int ud_update_start(struct fb_info *info) |
421 | { | 421 | { |
422 | struct fbcon_ops *ops = info->fbcon_par; | 422 | struct fbcon_ops *ops = info->fbcon_par; |
423 | u32 xoffset, yoffset; | 423 | int xoffset, yoffset; |
424 | u32 vyres = GETVYRES(ops->p->scrollmode, info); | 424 | u32 vyres = GETVYRES(ops->p->scrollmode, info); |
425 | u32 vxres = GETVXRES(ops->p->scrollmode, info); | 425 | u32 vxres = GETVXRES(ops->p->scrollmode, info); |
426 | int err; | 426 | int err; |
427 | 427 | ||
428 | xoffset = (vxres - info->var.xres) - ops->var.xoffset; | 428 | xoffset = vxres - info->var.xres - ops->var.xoffset; |
429 | yoffset = (vyres - info->var.yres) - ops->var.yoffset; | 429 | yoffset = vyres - info->var.yres - ops->var.yoffset; |
430 | if (yoffset < 0) | ||
431 | yoffset += vyres; | ||
430 | ops->var.xoffset = xoffset; | 432 | ops->var.xoffset = xoffset; |
431 | ops->var.yoffset = yoffset; | 433 | ops->var.yoffset = yoffset; |
432 | err = fb_pan_display(info, &ops->var); | 434 | err = fb_pan_display(info, &ops->var); |
diff --git a/drivers/video/intelfb/intelfb.h b/drivers/video/intelfb/intelfb.h index f077ca34faba..da29d007f215 100644 --- a/drivers/video/intelfb/intelfb.h +++ b/drivers/video/intelfb/intelfb.h | |||
@@ -41,6 +41,10 @@ | |||
41 | 41 | ||
42 | /*** hw-related values ***/ | 42 | /*** hw-related values ***/ |
43 | 43 | ||
44 | /* Resource Allocation */ | ||
45 | #define INTELFB_FB_ACQUIRED 1 | ||
46 | #define INTELFB_MMIO_ACQUIRED 2 | ||
47 | |||
44 | /* PCI ids for supported devices */ | 48 | /* PCI ids for supported devices */ |
45 | #define PCI_DEVICE_ID_INTEL_830M 0x3577 | 49 | #define PCI_DEVICE_ID_INTEL_830M 0x3577 |
46 | #define PCI_DEVICE_ID_INTEL_845G 0x2562 | 50 | #define PCI_DEVICE_ID_INTEL_845G 0x2562 |
@@ -257,6 +261,7 @@ struct intelfb_info { | |||
257 | int hwcursor; | 261 | int hwcursor; |
258 | int fixed_mode; | 262 | int fixed_mode; |
259 | int ring_active; | 263 | int ring_active; |
264 | int flag; | ||
260 | 265 | ||
261 | /* hw cursor */ | 266 | /* hw cursor */ |
262 | int cursor_on; | 267 | int cursor_on; |
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c index 427689e584da..0090544842f5 100644 --- a/drivers/video/intelfb/intelfbdrv.c +++ b/drivers/video/intelfb/intelfbdrv.c | |||
@@ -135,9 +135,6 @@ | |||
135 | static void __devinit get_initial_mode(struct intelfb_info *dinfo); | 135 | static void __devinit get_initial_mode(struct intelfb_info *dinfo); |
136 | static void update_dinfo(struct intelfb_info *dinfo, | 136 | static void update_dinfo(struct intelfb_info *dinfo, |
137 | struct fb_var_screeninfo *var); | 137 | struct fb_var_screeninfo *var); |
138 | static int intelfb_get_fix(struct fb_fix_screeninfo *fix, | ||
139 | struct fb_info *info); | ||
140 | |||
141 | static int intelfb_check_var(struct fb_var_screeninfo *var, | 138 | static int intelfb_check_var(struct fb_var_screeninfo *var, |
142 | struct fb_info *info); | 139 | struct fb_info *info); |
143 | static int intelfb_set_par(struct fb_info *info); | 140 | static int intelfb_set_par(struct fb_info *info); |
@@ -473,9 +470,9 @@ cleanup(struct intelfb_info *dinfo) | |||
473 | if (dinfo->aperture.virtual) | 470 | if (dinfo->aperture.virtual) |
474 | iounmap((void __iomem *)dinfo->aperture.virtual); | 471 | iounmap((void __iomem *)dinfo->aperture.virtual); |
475 | 472 | ||
476 | if (dinfo->mmio_base_phys) | 473 | if (dinfo->flag & INTELFB_MMIO_ACQUIRED) |
477 | release_mem_region(dinfo->mmio_base_phys, INTEL_REG_SIZE); | 474 | release_mem_region(dinfo->mmio_base_phys, INTEL_REG_SIZE); |
478 | if (dinfo->aperture.physical) | 475 | if (dinfo->flag & INTELFB_FB_ACQUIRED) |
479 | release_mem_region(dinfo->aperture.physical, | 476 | release_mem_region(dinfo->aperture.physical, |
480 | dinfo->aperture.size); | 477 | dinfo->aperture.size); |
481 | framebuffer_release(dinfo->info); | 478 | framebuffer_release(dinfo->info); |
@@ -572,6 +569,9 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
572 | cleanup(dinfo); | 569 | cleanup(dinfo); |
573 | return -ENODEV; | 570 | return -ENODEV; |
574 | } | 571 | } |
572 | |||
573 | dinfo->flag |= INTELFB_FB_ACQUIRED; | ||
574 | |||
575 | if (!request_mem_region(dinfo->mmio_base_phys, | 575 | if (!request_mem_region(dinfo->mmio_base_phys, |
576 | INTEL_REG_SIZE, | 576 | INTEL_REG_SIZE, |
577 | INTELFB_MODULE_NAME)) { | 577 | INTELFB_MODULE_NAME)) { |
@@ -580,6 +580,8 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
580 | return -ENODEV; | 580 | return -ENODEV; |
581 | } | 581 | } |
582 | 582 | ||
583 | dinfo->flag |= INTELFB_MMIO_ACQUIRED; | ||
584 | |||
583 | /* Get the chipset info. */ | 585 | /* Get the chipset info. */ |
584 | dinfo->pci_chipset = pdev->device; | 586 | dinfo->pci_chipset = pdev->device; |
585 | 587 | ||
@@ -1091,7 +1093,17 @@ intelfb_set_fbinfo(struct intelfb_info *dinfo) | |||
1091 | return 1; | 1093 | return 1; |
1092 | 1094 | ||
1093 | info->pixmap.scan_align = 1; | 1095 | info->pixmap.scan_align = 1; |
1094 | 1096 | strcpy(info->fix.id, dinfo->name); | |
1097 | info->fix.smem_start = dinfo->fb.physical; | ||
1098 | info->fix.smem_len = dinfo->fb.size; | ||
1099 | info->fix.type = FB_TYPE_PACKED_PIXELS; | ||
1100 | info->fix.type_aux = 0; | ||
1101 | info->fix.xpanstep = 8; | ||
1102 | info->fix.ypanstep = 1; | ||
1103 | info->fix.ywrapstep = 0; | ||
1104 | info->fix.mmio_start = dinfo->mmio_base_phys; | ||
1105 | info->fix.mmio_len = INTEL_REG_SIZE; | ||
1106 | info->fix.accel = FB_ACCEL_I830; | ||
1095 | update_dinfo(dinfo, &info->var); | 1107 | update_dinfo(dinfo, &info->var); |
1096 | 1108 | ||
1097 | return 0; | 1109 | return 0; |
@@ -1109,7 +1121,8 @@ update_dinfo(struct intelfb_info *dinfo, struct fb_var_screeninfo *var) | |||
1109 | dinfo->yres = var->xres; | 1121 | dinfo->yres = var->xres; |
1110 | dinfo->pixclock = var->pixclock; | 1122 | dinfo->pixclock = var->pixclock; |
1111 | 1123 | ||
1112 | intelfb_get_fix(&dinfo->info->fix, dinfo->info); | 1124 | dinfo->info->fix.visual = dinfo->visual; |
1125 | dinfo->info->fix.line_length = dinfo->pitch; | ||
1113 | 1126 | ||
1114 | switch (dinfo->bpp) { | 1127 | switch (dinfo->bpp) { |
1115 | case 8: | 1128 | case 8: |
@@ -1139,30 +1152,6 @@ update_dinfo(struct intelfb_info *dinfo, struct fb_var_screeninfo *var) | |||
1139 | 1152 | ||
1140 | /* fbops functions */ | 1153 | /* fbops functions */ |
1141 | 1154 | ||
1142 | static int | ||
1143 | intelfb_get_fix(struct fb_fix_screeninfo *fix, struct fb_info *info) | ||
1144 | { | ||
1145 | struct intelfb_info *dinfo = GET_DINFO(info); | ||
1146 | |||
1147 | DBG_MSG("intelfb_get_fix\n"); | ||
1148 | |||
1149 | memset(fix, 0, sizeof(*fix)); | ||
1150 | strcpy(fix->id, dinfo->name); | ||
1151 | fix->smem_start = dinfo->fb.physical; | ||
1152 | fix->smem_len = dinfo->fb.size; | ||
1153 | fix->type = FB_TYPE_PACKED_PIXELS; | ||
1154 | fix->type_aux = 0; | ||
1155 | fix->visual = dinfo->visual; | ||
1156 | fix->xpanstep = 8; | ||
1157 | fix->ypanstep = 1; | ||
1158 | fix->ywrapstep = 0; | ||
1159 | fix->line_length = dinfo->pitch; | ||
1160 | fix->mmio_start = dinfo->mmio_base_phys; | ||
1161 | fix->mmio_len = INTEL_REG_SIZE; | ||
1162 | fix->accel = FB_ACCEL_I830; | ||
1163 | return 0; | ||
1164 | } | ||
1165 | |||
1166 | /*************************************************************** | 1155 | /*************************************************************** |
1167 | * fbdev interface * | 1156 | * fbdev interface * |
1168 | ***************************************************************/ | 1157 | ***************************************************************/ |
diff --git a/drivers/video/logo/Kconfig b/drivers/video/logo/Kconfig index 8cb7fb4db441..f0e6512c87ff 100644 --- a/drivers/video/logo/Kconfig +++ b/drivers/video/logo/Kconfig | |||
@@ -47,7 +47,7 @@ config LOGO_SGI_CLUT224 | |||
47 | 47 | ||
48 | config LOGO_SUN_CLUT224 | 48 | config LOGO_SUN_CLUT224 |
49 | bool "224-color Sun Linux logo" | 49 | bool "224-color Sun Linux logo" |
50 | depends on LOGO && (SPARC32 || SPARC64) | 50 | depends on LOGO && SPARC |
51 | default y | 51 | default y |
52 | 52 | ||
53 | config LOGO_SUPERH_MONO | 53 | config LOGO_SUPERH_MONO |
diff --git a/drivers/video/sbuslib.c b/drivers/video/sbuslib.c index 646c43f921c5..3a74a63dd4f2 100644 --- a/drivers/video/sbuslib.c +++ b/drivers/video/sbuslib.c | |||
@@ -46,6 +46,9 @@ int sbusfb_mmap_helper(struct sbus_mmap_map *map, | |||
46 | unsigned long off; | 46 | unsigned long off; |
47 | int i; | 47 | int i; |
48 | 48 | ||
49 | if (!(vma->vm_flags & (VM_SHARED | VM_MAYSHARE))) | ||
50 | return -EINVAL; | ||
51 | |||
49 | size = vma->vm_end - vma->vm_start; | 52 | size = vma->vm_end - vma->vm_start; |
50 | if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) | 53 | if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) |
51 | return -EINVAL; | 54 | return -EINVAL; |