Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#3595 closed bug (fixed)

Problems with FireWare controller on HP Compaq NX7400

Reported by: siarzhuk Owned by: absabs
Priority: normal Milestone: Unscheduled
Component: Drivers/FireWire Version:
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Tested configuration:

1) HP Compaq NX7400 Notebook.

2) Haiku hrev29625.

The Problem description:

Haiku freeze on boot. Captured system log shows that it was stopped during some FireWare stuff tracing. The "int" command in KDL shows extra large amount of handled interrupts at the interrupt line attached to FireWare controller. Removing fireware bus manager "solves" the boot problem and allows Haiku to work normally.

Result of int KDL command in case of failed boot process:

kdebug> int
int   1, enabled 1, handled       27, unhandled        0, ACTIVE
        ps2:ps2_interrupt (0x838e75c0), data 0x00000000
int  10, enabled 7, handled 10160925, unhandled        0
        firewire:fwohci_intr (0x83ad0fcc), data 0x81d29000
        intel_extreme:intel_interrupt_handler__FPv (0x80775d70), data 0x8106a4d0
        ahci:Interrupt__14AHCIControllerPv (0x805b4c70), data 0x80fb90cc
        ehci:InterruptHandler__4EHCIPv (0x805f7b0c), data 0x80fb7440
        uhci:InterruptHandler__4UHCIPv (0x8074d600), data 0x80f936d8
        uhci:InterruptHandler__4UHCIPv (0x8074d600), data 0x80f9336c
        broadcom440x:intr_wrapper (0x807d5a6c), data 0x81048f28
int  11, enabled 2, handled        9, unhandled        0
        uhci:InterruptHandler__4UHCIPv (0x8074d600), data 0x80f935b4
        uhci:InterruptHandler__4UHCIPv (0x8074d600), data 0x80f93490
int  12, enabled 1, handled        9, unhandled        0
        ps2:ps2_interrupt (0x838e75c0), data 0x00000000
int  14, enabled 1, handled       52, unhandled        0
        ide_adapter:ide_adapter_inthand (0x80618a84), data 0x80fb8070
int  15, enabled 1, handled        0, unhandled        0
        ide_adapter:ide_adapter_inthand (0x80618a84), data 0x80fb80a8
int 219, enabled 1, handled    25227, unhandled        0
        kernel_x86:apic_timer_interrupt (0x800d33e8), data 0x00000000
kdebug>

Results of int KDL command in case fireware bus manager module is removed:

kdebug> int
int   1, enabled 1, handled        9, unhandled        0, ACTIVE
	ps2:ps2_interrupt (0x838e75c0), data 0x00000000
int  10, enabled 6, handled    19199, unhandled        0
	intel_extreme:intel_interrupt_handler__FPv (0x80775d70), data 0x8106a4d0
	ahci:Interrupt__14AHCIControllerPv (0x805b4c70), data 0x80fb90cc
	ehci:InterruptHandler__4EHCIPv (0x805f7b0c), data 0x80fb7440
	uhci:InterruptHandler__4UHCIPv (0x8074d600), data 0x80f936d8
	uhci:InterruptHandler__4UHCIPv (0x8074d600), data 0x80f9336c
	broadcom440x:intr_wrapper (0x807d5a6c), data 0x81048f00
int  11, enabled 2, handled     1115, unhandled        0
	uhci:InterruptHandler__4UHCIPv (0x8074d600), data 0x80f935b4
	uhci:InterruptHandler__4UHCIPv (0x8074d600), data 0x80f93490
int  12, enabled 1, handled       66, unhandled        0
	ps2:ps2_interrupt (0x838e75c0), data 0x00000000
int  14, enabled 1, handled      181, unhandled        0
	ide_adapter:ide_adapter_inthand (0x80618a84), data 0x80fb8070
int  15, enabled 1, handled        0, unhandled        0
	ide_adapter:ide_adapter_inthand (0x80618a84), data 0x80fb80a8
int 219, enabled 1, handled    17348, unhandled        0
	kernel_x86:apic_timer_interrupt (0x800d33e8), data 0x00000000
kdebug> continue

Note the count of handled interrupts for line 10 in both cases.

Note:

This notebook will be available for full testing until 10 April 2009.

Attachments (4)

HPCompaq.nx7400-FireWareProblem.log (57.0 KB ) - added by siarzhuk 16 years ago.
Serial debug log captured during freezed boot of Haiku
patch (613 bytes ) - added by absabs 16 years ago.
patch
HWCompaqNX7400-successfull.log (78.7 KB ) - added by siarzhuk 16 years ago.
The log of successful booting with proposed changes.
patch_fix (551 bytes ) - added by absabs 16 years ago.
expected to fix this bug

Download all attachments as: .zip

Change History (17)

by siarzhuk, 16 years ago

Serial debug log captured during freezed boot of Haiku

comment:1 by korli, 16 years ago

Maybe we should make use of the flag B_NO_HANDLED_INFO as done in hrev29242 for freebsd compat layer.

by absabs, 16 years ago

Attachment: patch added

patch

in reply to:  1 comment:2 by absabs, 16 years ago

Thank korli. The patch according this is attached. siarzhuk,would you please apply the patch and test? Thanks in advance

comment:3 by siarzhuk, 16 years ago

This patch doesn't help. Count of handled interrupts on this line increase not so quickly but the freezing on boot is still observed. :-(

Are there any #define to activate for extra debug tracing in fireware bus manager?

comment:4 by korli, 16 years ago

Seems the broadcom440x driver uses also the flag B_NO_HANDLED_INFO which explains why it wouldn't help in your case.

comment:5 by absabs, 16 years ago

Would you please remove the broadcom440x driver module and doesn't apply the patch to test again. It's better to also show the result of int command under KDL again. I want to know which cause such many interrupt

comment:6 by siarzhuk, 16 years ago

I'm sorry, but still no good news here. :-( The same situation is observed. I have step by step disabled network, video and ahci drivers - freezing at boot is still observed. Cutout of syslog with firewire initialization and results of KDL int command is below:

: fw_module_init
vendor=104c, device=803a, revision = 0
firewire: found 1 cards
firewire: latency timer 40 -> 40.
firewire: cache size 10 -> 10.
firewire: IRQ 10
firewire: hardware register address f4101000
firewire: mapping physical address 0xf4101000 with 2048 bytes for fw ohci register
firewire: physical = 0xf4101000, virtual = 0x8062a000, offset = 0, phyadr = 0xf4101000, mapadr = 0x8062a000, size = 4096, area = 0x00000ea7
firewire: mapped registers to 0x8062a000
firewire:OHCI version 1.10 (ROM=0)
firewire:No. of Isochronous channels is 4.
firewire: allocating 3076 bytes for fwohci config etc. buf
firewire: area = 3752, size = 4096, virt = 0x8062b000, phy = 0x00125000
firewire: allocating 4096 bytes for fw multi dma buf
firewire: area = 3753, size = 4096, virt = 0x8062c000, phy = 0x00126000
firewire: allocating 4096 bytes for fw multi dma buf
firewire: area = 3754, size = 4096, virt = 0x80640000, phy = 0x00127000
firewire: allocating 16384 bytes for fw multi dma buf
firewire: area = 3755, size = 16384, virt = 0x80792000, phy = 0x00128000
firewire: allocating 4096 bytes for fw multi dma buf
firewire: area = 3756, size = 4096, virt = 0x80641000, phy = 0x0012c000
firewire:EUI64 00:02:3f:ff:ff:ff:ff:ff
firewire:resetting OHCI...done (loop=0)
firewire:fwphy_rddata: 0x2 loop=0, retry=0
firewire:fwphy_rddata: 0x3 loop=0, retry=0
firewire:Phy 1394a available S400, 3 ports.
firewire:fwphy_rddata: 0x5 loop=0, retry=0
firewire:Enable 1394a Enhancements
firewire:fwphy_rddata: 0x5 loop=0, retry=0
firewire:fwphy_rddata: 0x2 loop=0, retry=0
firewire:fwphy_rddata: 0x4 loop=0, retry=0
Last message repeated 2 times.
firewire:Link S400, max_rec 2048 bytes.
firewire:BUS_OPT 0xa002 -> 0xf800a002
firewire: allocating 524288 bytes for fw rx Area
firewire: area = 3758, size = 524288, virt = 0x80d01000, phy = 0x00263000
firewire: allocating 262144 bytes for fw rx Area
firewire: area = 3759, size = 262144, virt = 0x8079a000, phy = 0x02fc6000
firewire:fwohci_set_intr: 1
PANIC: keyboard requested halt.

Welcome to Kernel Debugging Land...
Thread 103 "ps2 service" running on CPU 0
kdebug> int
int   1, enabled 1, handled        1, unhandled        0, ACTIVE
	ps2:ps2_interrupt (0x806115c0), data 0x00000000
int  10, enabled 4, handled  6953053, unhandled        0
	firewire:fwohci_intr (0x80787fd8), data 0x81d1c000
	ehci:InterruptHandler__4EHCIPv (0x805eab0c), data 0x80faa440
	uhci:InterruptHandler__4UHCIPv (0x80740600), data 0x80f866d8
	uhci:InterruptHandler__4UHCIPv (0x80740600), data 0x80f8636c
int  11, enabled 2, handled        0, unhandled        0
	uhci:InterruptHandler__4UHCIPv (0x80740600), data 0x80f865b4
	uhci:InterruptHandler__4UHCIPv (0x80740600), data 0x80f86490
int  12, enabled 1, handled        9, unhandled        0
	ps2:ps2_interrupt (0x806115c0), data 0x00000000
int  14, enabled 1, handled       49, unhandled        0
	ide_adapter:ide_adapter_inthand (0x8060ba84), data 0x80fab070
int  15, enabled 1, handled        0, unhandled        0
	ide_adapter:ide_adapter_inthand (0x8060ba84), data 0x80fab0a8
int 219, enabled 1, handled    17462, unhandled        0
	kernel_x86:apic_timer_interrupt (0x800d3ce8), data 0x00000000
kdebug> reboot

comment:7 by absabs, 16 years ago

siarzhuk, I have update the firewire stack, after svn up, please add OWRITE(sc, FWOHCI_INTSTATCLR, ~0); after sc->intmask |= OHCI_INT_CYC_LOST | OHCI_INT_PHY_INT; in line 582 in src/add-ons/kernel/bus_managers/firewire/fwohci.c

would you please help recompile and test it.

comment:8 by absabs, 16 years ago

siarzhuk, one tip from luroh, "if the HP NX7400 notebook in ticket 3595 has a "PnP OS = No" option in BIOS, should try that"

in reply to:  7 comment:9 by siarzhuk, 16 years ago

Replying to absabs:

siarzhuk, I have update the firewire stack, after svn up, please add OWRITE(sc, FWOHCI_INTSTATCLR, ~0); after sc->intmask |= OHCI_INT_CYC_LOST | OHCI_INT_PHY_INT; in line 582 in src/add-ons/kernel/bus_managers/firewire/fwohci.c

would you please help recompile and test it.

Looks like this help a bit. ;-) No more boot hangups observed. Corresponding successful log is attached. Note that count of handled interrupts is also looks more reasonable now.

PS: This Notebook has no "PnP OS" BIOS configuration. :-|

by siarzhuk, 16 years ago

The log of successful booting with proposed changes.

comment:10 by absabs, 16 years ago

Resolution: fixed
Status: newclosed

thank sizrzhuk. Now the patch fix this bug is attached. I set this ticket fixed. If hang again, just reopen it.

by absabs, 16 years ago

Attachment: patch_fix added

expected to fix this bug

comment:11 by absabs, 16 years ago

From the log, is there something wrong with pci-ps2?

in reply to:  11 comment:12 by siarzhuk, 16 years ago

Replying to absabs:

From the log, is there something wrong with pci-ps2?

yes. Look into bug #3594. :-)

comment:13 by leavengood, 15 years ago

For future reference, the patch supplied by absabs in this ticket was applied in hrev29770 on March 29, 2009.

Note: See TracTickets for help on using tickets.