1 From ak@suse.de Mon Oct 6 01:11:13 2003
2 Date: 03 Oct 2003 10:24:23 +0200
3 From: Andi Kleen <ak@suse.de>
4 To: Sylvain Pasche <sylvain_pasche@yahoo.fr>
5 Cc: linux-kernel@vger.kernel.org
6 Subject: Re: 2.4.22 ACPI power off via sysrq not working
8 Sylvain Pasche <sylvain_pasche@yahoo.fr> writes:
12 > If I want to halt the system using sys-rq - o key, I get an oops instead
14 > Inside pm.c:159, there is:
19 > But if we look at the trace, we are in the interrupt of the keyboard
21 > One fix would be to comment out the BUG line, but there's certainly "a
22 > better way to do it".
26 diff -u linux/drivers/acpi/system.c-o linux/drivers/acpi/system.c
27 --- linux/drivers/acpi/system.c-o 2003-09-07 16:20:44.000000000 +0200
28 +++ linux/drivers/acpi/system.c 2003-09-08 21:04:46.000000000 +0200
29 @@ -1192,11 +1192,21 @@
31 #if defined(CONFIG_MAGIC_SYSRQ) && defined(CONFIG_PM)
33 +static int po_cb_active;
35 +static void acpi_po_tramp(void *x)
40 /* Simple wrapper calling power down function. */
41 static void acpi_sysrq_power_off(int key, struct pt_regs *pt_regs,
42 struct kbd_struct *kbd, struct tty_struct *tty)
46 + static struct tq_struct tq = { .routine = acpi_po_tramp };
52 struct sysrq_key_op sysrq_acpi_poweroff_op = {
59 To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
60 the body of a message to majordomo@vger.kernel.org
61 More majordomo info at http://vger.kernel.org/majordomo-info.html
62 Please read the FAQ at http://www.tux.org/lkml/
63 From zzz@anda.ru Tue Oct 7 09:07:20 2003
64 Date: Fri, 3 Oct 2003 00:50:16 +0600
65 From: Denis Zaitsev <zzz@anda.ru>
66 To: linux-scsi@vger.kernel.org
67 Cc: linux-kernel@vger.kernel.org, gibbs@scsiguy.com, dledford@redhat.com,
68 marcelo@conectiva.com.br
69 Subject: [PATCH][TRIVIAL] (2.4.22) Allow aic7xxx_osm.c to be compiled
72 This is the trivial #ifdef patch for CONFIG_PCI/EISA. In my case it
73 allows the Adaptec SCSI driver (the "new" one) to be compiled for
74 non-PCI (EISA) system. Else there are an <undefined symbol> errors.
75 The 2.6 branch needs the same patch, as I understand.
77 Please, apply it. (I don't know who is the maintainer for now!)
80 --- linux-2.4.22.orig/drivers/scsi/aic7xxx/aic7xxx_osm.c Mon Aug 25 05:44:42 2003
81 +++ linux-2.4.22/drivers/scsi/aic7xxx/aic7xxx_osm.c Mon Oct 6 01:05:04 2003
84 /* Still equal. Sort by BIOS address, ioport, or bus/slot/func. */
97 if ((rahc->flags & AHC_BIOS_ENABLED) != 0) {
98 value = rahc->platform_data->bios_address
105 panic("ahc_softc_sort: invalid bus type");
108 To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
109 the body of a message to majordomo@vger.kernel.org
110 More majordomo info at http://vger.kernel.org/majordomo-info.html
111 Please read the FAQ at http://www.tux.org/lkml/
112 [PATCH] Compile fix for ACPI in 2.4.22/x86-64
114 Marcelo unfortunately added an last minute ACPI update that changed
115 ACPI interfaces and broke x86-64 compilation. I didn't catch it in
116 time, so 2.4.22 does not compile out of the box for AMD64.
119 You'll have to apply it when compiling 2.4.22 for x86-64
123 All diffs for ChangeSet 1.1074
125 diff -Nru a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c
127 --- a/arch/x86_64/kernel/io_apic.c Tue Jun 24 13:45:14 2003
128 +++ b/arch/x86_64/kernel/io_apic.c Fri Aug 22 03:38:16 2003
129 @@ -1762,7 +1762,7 @@
133 -int io_apic_set_pci_routing (int ioapic, int pin, int irq)
134 +int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level ,int active_high_low)
136 struct IO_APIC_route_entry entry;
138 @@ -1785,18 +1785,21 @@
139 entry.dest_mode = INT_DELIVERY_MODE;
140 entry.dest.logical.logical_dest = TARGET_CPUS;
141 entry.mask = 1; /* Disabled (masked) */
142 - entry.trigger = 1; /* Level sensitive */
143 - entry.polarity = 1; /* Low active */
144 + entry.trigger = edge_level;
145 + entry.polarity = active_high_low;
147 add_pin_to_irq(irq, ioapic, pin);
149 entry.vector = assign_irq_vector(irq);
151 printk(KERN_DEBUG "IOAPIC[%d]: Set PCI routing entry (%d-%d -> 0x%x -> "
152 - "IRQ %d)\n", ioapic,
153 - mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq);
154 + "IRQ %d) Mode:%i Active:%i\n", ioapic,
155 + mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq, edge_level, active_high_low);
157 - irq_desc[irq].handler = &ioapic_level_irq_type;
159 + irq_desc[irq].handler = &ioapic_level_irq_type;
161 + irq_desc[irq].handler = &ioapic_edge_irq_type;
163 set_intr_gate(entry.vector, interrupt[irq]);
165 diff -Nru a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c
167 --- a/arch/x86_64/kernel/mpparse.c Tue Jun 24 14:01:06 2003
168 +++ b/arch/x86_64/kernel/mpparse.c Fri Aug 22 03:29:25 2003
171 ioapic_pin = irq - mp_ioapic_routing[ioapic].irq_start;
173 - io_apic_set_pci_routing(ioapic, ioapic_pin, irq);
174 + io_apic_set_pci_routing(ioapic, ioapic_pin, irq, 1, 1);
177 #endif /*CONFIG_ACPI_HT_ONLY*/
182 + int edge_level = 0;
183 + int active_high_low = 0;
186 * Parsing through the PCI Interrupt Routing Table (PRT) and program
187 @@ -949,11 +951,14 @@
189 /* Need to get irq for dynamic entry */
190 if (entry->link.handle) {
191 - irq = acpi_pci_link_get_irq(entry->link.handle, entry->link.index);
192 + irq = acpi_pci_link_get_irq(entry->link.handle, entry->link.index, &edge_level, &active_high_low);
198 + active_high_low = 1;
199 irq = entry->link.index;
202 irq = entry->link.index;
203 ioapic = mp_find_ioapic(irq);
206 mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit);
208 - vector = io_apic_set_pci_routing(ioapic, ioapic_pin, irq);
209 + vector = io_apic_set_pci_routing(ioapic, ioapic_pin, irq, edge_level, active_high_low);
213 diff -Nru a/include/asm-x86_64/io_apic.h b/include/asm-x86_64/io_apic.h
215 --- a/include/asm-x86_64/io_apic.h Sat Aug 9 13:32:28 2003
216 +++ b/include/asm-x86_64/io_apic.h Fri Aug 22 03:29:25 2003
218 extern int io_apic_get_unique_id (int ioapic, int apic_id);
219 extern int io_apic_get_version (int ioapic);
220 extern int io_apic_get_redir_entries (int ioapic);
221 -extern int io_apic_set_pci_routing (int ioapic, int pin, int irq);
222 +extern int io_apic_set_pci_routing (int ioapic, int pin, int irq, int, int);
226 <http://www.bitkeeper.com>
228 ChangeSet@1.1065.1.36 03-08-25 13:58:04-03:00 willy@ods.org
231 [PATCH] Fix amd67x_pm.c crash with no chipsets / CONFIG_HOTPLUG
233 amd76x_pm.c will crash if no chipsets are found and CONFIG_HOTPLUG is
234 turned on. This patch makes it return with a failure instead.
236 <patch@1.1065.1.36??nav=index.html|ChangeSet@-3d|cset@1.1065.1.36>
238 diff -Nru a/drivers/char/amd76x_pm.c b/drivers/char/amd76x_pm.c
240 --- a/drivers/char/amd76x_pm.c Mon Aug 25 09:51:20 2003
241 +++ b/drivers/char/amd76x_pm.c Mon Aug 25 04:22:01 2003
242 @@ -577,16 +577,18 @@
245 /* Find northbridge */
246 - found = pci_module_init(&amd_nb_driver);
248 + found = pci_register_driver(&amd_nb_driver);
250 printk(KERN_ERR "amd76x_pm: Could not find northbridge\n");
251 + pci_unregister_driver(&amd_nb_driver);
255 /* Find southbridge */
256 - found = pci_module_init(&amd_sb_driver);
258 + found = pci_register_driver(&amd_sb_driver);
260 printk(KERN_ERR "amd76x_pm: Could not find southbridge\n");
261 + pci_unregister_driver(&amd_sb_driver);
262 pci_unregister_driver(&amd_nb_driver);
267 if (!amd76x_pm_cfg.curr_idle) {
268 printk(KERN_ERR "amd76x_pm: Idle function not changed\n");
269 + pci_unregister_driver(&amd_nb_driver);
270 + pci_unregister_driver(&amd_sb_driver);
275 <http://www.bitkeeper.com>
277 From chas@cmf.nrl.navy.mil Sat Aug 30 01:03:00 2003
278 Date: Thu, 28 Aug 2003 16:03:23 -0400
279 From: chas williams <chas@cmf.nrl.navy.mil>
280 To: Krzysztof Sierota <krzysiek@mediaone.pl>
281 Cc: linux-kernel@vger.kernel.org, linux-atm@vger.rutgers.edu
282 Subject: Re: 2.4.22 oops in ATM 2.4.21 works fine
284 >the 2.4.22 kernel is oopsing at start scripts, machine stays alive, but A=
286 >does not work. 2.4.21 works just fine.
290 --- linux-2.4.22/net/atm/common.c.000 Tue Aug 26 10:40:30 2003
291 +++ linux-2.4.22/net/atm/common.c Tue Aug 26 13:12:35 2003
294 if (try_atm_clip_ops()) {
295 ret_val = atm_clip_ops->clip_create(arg);
296 - __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
297 + if (atm_clip_ops->owner)
298 + __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
304 if (try_atm_clip_ops()) {
305 error = atm_clip_ops->atm_init_atmarp(vcc);
306 - __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
307 + if (atm_clip_ops->owner)
308 + __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
310 sock->state = SS_CONNECTED;
314 if (try_atm_clip_ops()) {
315 ret_val = atm_clip_ops->clip_mkip(vcc, arg);
316 - __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
317 + if (atm_clip_ops->owner)
318 + __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
324 if (try_atm_clip_ops()) {
325 ret_val = atm_clip_ops->clip_setentry(vcc, arg);
326 - __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
327 + if (atm_clip_ops->owner)
328 + __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
334 if (try_atm_clip_ops()) {
335 ret_val = atm_clip_ops->clip_encap(vcc, arg);
336 - __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
337 + if (atm_clip_ops->owner)
338 + __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
342 --- linux-2.4.22/net/atm/proc.c.000 Tue Aug 26 13:30:23 2003
343 +++ linux-2.4.22/net/atm/proc.c Tue Aug 26 13:31:58 2003
345 spin_unlock_irqrestore(&dev->lock, flags);
346 spin_unlock(&atm_dev_lock);
347 #if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE)
349 + if (clip_info && atm_clip_ops->owner)
350 __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
355 spin_unlock(&atm_dev_lock);
356 #if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE)
358 - __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
359 + if (clip_info && atm_clip_ops->owner)
360 + __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
365 if (--count) continue;
366 atmarp_info(n->dev,entry,NULL,buf);
367 read_unlock_bh(&clip_tbl_hook->lock);
368 - __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
369 + if (atm_clip_ops->owner)
370 + __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
373 for (vcc = entry->vccs; vcc;
374 @@ -466,12 +467,14 @@
375 if (--count) continue;
376 atmarp_info(n->dev,entry,vcc,buf);
377 read_unlock_bh(&clip_tbl_hook->lock);
378 - __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
379 + if (atm_clip_ops->owner)
380 + __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
384 read_unlock_bh(&clip_tbl_hook->lock);
385 - __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
386 + if (atm_clip_ops->owner)
387 + __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
392 To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
393 the body of a message to majordomo@vger.kernel.org
394 More majordomo info at http://vger.kernel.org/majordomo-info.html
395 Please read the FAQ at http://www.tux.org/lkml/
396 From linux-kernel@vger.kernel.org Wed Aug 27 15:59:09 2003
397 Date: Wed, 27 Aug 2003 14:07:03 +0000
398 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
399 To: bk-commits-24@vger.kernel.org
400 Subject: Fix possible IRQ handling SMP race: Kudos to TeJun Huh
402 ChangeSet 1.1084, 2003/08/27 11:07:03-03:00, marcelo@logos.cnet
404 Fix possible IRQ handling SMP race: Kudos to TeJun Huh
407 # This patch includes the following deltas:
408 # ChangeSet 1.1083 -> 1.1084
409 # include/asm-i386/hardirq.h 1.4 -> 1.5
413 1 files changed, 2 insertions(+)
416 diff -Nru a/include/asm-i386/hardirq.h b/include/asm-i386/hardirq.h
417 --- a/include/asm-i386/hardirq.h Wed Aug 27 08:02:39 2003
418 +++ b/include/asm-i386/hardirq.h Wed Aug 27 08:02:39 2003
421 ++local_irq_count(cpu);
425 while (test_bit(0,&global_irq_lock)) {
429 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
430 the body of a message to majordomo@vger.kernel.org
431 More majordomo info at http://vger.kernel.org/majordomo-info.html
432 [PATCH] Fix initrd with netboot
434 From "Martin Persson"
436 we've encountered a problem when trying to netboot 2.4.21 and above. After
437 /linuxrc has been executed and the kernel tries to remount the root, it
438 panics with the all too well known message "Unable to mount root fs on ...".
440 The kernel bugs out in mount_block_root in the file init/do_mounts.c, to be
441 more precise in the for-loop. What happens is that it tries to mount the
442 file system as type ext2 (which happens to be first in the list in our
443 case), but instead of returning -EINVAL it returns -EBUSY, the loop exits
444 instead of trying the next (correct) fs-type and the kernel panics.
446 In -wolk for some time and maybe others.
448 All diffs for ChangeSet 1.1065.1.42
450 diff -Nru a/init/do_mounts.c b/init/do_mounts.c
452 --- a/init/do_mounts.c Mon Jul 21 13:13:12 2003
453 +++ b/init/do_mounts.c Thu Jul 10 06:46:36 2003
463 <http://www.bitkeeper.com>
465 pcwd.c: fix oops on unload
467 From Arkadiusz Miskiewicz <arekm@pld-linux.org>
469 This patch is from Alan Cox and fixes problems when pcwd driver is loaded
470 while there is no pcwd hardware installed.
471 No idea why it was not feeded to you.
472 Problem is described here
473 http://www.ussg.iu.edu/hypermail/linux/kernel/0308.1/0178.html and tracked
474 down in private conversation with Cox.
477 <patch@1.1065.1.38??nav=index.html|ChangeSet@-3d|cset@1.1065.1.38>
479 diff -Nru a/drivers/char/pcwd.c b/drivers/char/pcwd.c
481 --- a/drivers/char/pcwd.c Sun Sep 29 12:29:59 2002
482 +++ b/drivers/char/pcwd.c Mon Aug 25 10:20:56 2003
485 release_region (pcwd_info.io_addr, pcwd_info.card_info->io_size);
487 - if (pcwd_info.flags & PCWD_PCI_REG)
488 - pci_unregister_driver (&pcwd_driver);
489 + pci_unregister_driver (&pcwd_driver);
494 <http://www.bitkeeper.com>
496 From greg@kroah.com Tue Sep 16 23:06:43 2003
497 Date: Fri, 5 Sep 2003 08:24:36 -0700
498 From: Greg KH <greg@kroah.com>
499 To: Ingo Oeser <ingo@oeser-vu.de>
500 Cc: linux-kernel@vger.kernel.org
501 Subject: Re: [OOPS] 2.4.22, USB visor module crashing on HotSync.
503 On Fri, Sep 05, 2003 at 01:30:22PM +0200, Ingo Oeser wrote:
506 > there seems to be a problem with the visor module and usb_serial.
508 > Please look at __serial_close() and usb_disconnect() calling it
509 > in line 1406 vs. line 1408. I would suggest removing 1408 or
510 > folding it into __serial_close().
512 > Formal Bug-Reporting follows:
514 > [1.] One line summary of the problem:
516 > USB visor module and usb_serial crashing on HotSync in usb_disconnect
518 > [2.] Full description of the problem/report:
520 > usb_disconnect calls __serial_close() which sets the tty = NULL
521 > and afterwards trys to set tty->private_data = NULL
524 Nice, someone else reported this yesterday for the ftdi_sio driver.
526 Can you test the patch below and let me know if this fixes it?
533 --- a/drivers/usb/serial/usbserial.c Sat Aug 30 23:27:18 2003
534 +++ b/drivers/usb/serial/usbserial.c Thu Sep 4 13:48:45 2003
537 generic_close(port, filp);
538 port->open_count = 0;
541 + port->tty->driver_data = NULL;
546 if (port->serial->type->owner)
547 @@ -1401,12 +1404,9 @@
548 for (i = 0; i < serial->num_ports; ++i) {
549 port = &serial->port[i];
551 - if (port->tty != NULL) {
552 - while (port->open_count > 0) {
553 + if (port->tty != NULL)
554 + while (port->open_count > 0)
555 __serial_close(port, NULL);
557 - port->tty->driver_data = NULL;
563 To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
564 the body of a message to majordomo@vger.kernel.org
565 More majordomo info at http://vger.kernel.org/majordomo-info.html
566 Please read the FAQ at http://www.tux.org/lkml/