Opened 14 years ago

Closed 6 years ago

Last modified 6 years ago

#5162 closed enhancement (invalid)

[PATCH] ahci boot failure

Reported by: Grey Owned by: marcusoverhagen
Priority: normal Milestone: R1
Component: Drivers/Disk Version: R1/alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Fist of all - bug description: On my notebook ThinkPad T400 Haiku loading sometimes hangs (probability of failure - 20-30%). Only if BIOS SATA mode - AHCI. In case of BIOS SATA mode - Compatible, no problem to boot Haiku.
When Haiku booting hangs, simple call debuger and continue execution (Press SysReq Alt+D, then type "co" and press Enter). There are good chance, that "magic" will continue Haiku loading. If not, try this "calm" again and again...
There are no similar problems for Win and Linux on this computer.
lspci and syslog attached. Syslog contain two loading - bad and good.
Suggested solution: patch for ahci_port.cpp
Test it, please.
IMHO, this patch can be a solution for tickets: #4718, #4699, #3444 and #4004.

Attachments (3)

lspci.txt (1.8 KB ) - added by Grey 14 years ago.
syslog (167.6 KB ) - added by Grey 14 years ago.
ahci.patch (431 bytes ) - added by Grey 14 years ago.

Download all attachments as: .zip

Change History (11)

by Grey, 14 years ago

Attachment: lspci.txt added

by Grey, 14 years ago

Attachment: syslog added

by Grey, 14 years ago

Attachment: ahci.patch added

comment:1 by anevilyak, 14 years ago

Component: - GeneralDrivers/Disk
Owner: changed from nobody to marcusoverhagen

comment:2 by marcusoverhagen, 14 years ago

Your proposed patch is no valid solution. The initial port reset is required to ensure that device signature is readable. Your patch removes this reset. But the same problem can also be triggered by hotswap of sata device.

We seem to have a problem handling the PhyReady Change / Port Connect Change interrupts.

Unfortunately hrev31014 completely changed the reset handling. The device is also no longer reset before executing a command when a reset request is pending as result of an error interrupt.

Does reverting hrev31014 help?

comment:3 by marcusoverhagen, 14 years ago

is 0x00400040 => is 0x00000040

serr 0x04050000 => serr 0x04010000 => serr 0x04000000 

in reply to:  2 comment:4 by Grey, 14 years ago

Replying to marcusoverhagen:

Your proposed patch is no valid solution. The initial port reset is required to ensure that device signature is readable. Your patch removes this reset. But the same problem can also be triggered by hotswap of sata device.

But the patch solve problem on my notebook. And patch working ok on 4 different computers that I tested. IMHO, it's very strange to reset device after init.

We seem to have a problem handling the PhyReady Change / Port Connect Change interrupts.

Yes, simultaneous interrupts.

Unfortunately hrev31014 completely changed the reset handling. The device is also no longer reset before executing a command when a reset request is pending as result of an error interrupt.

Does reverting hrev31014 help?

No. Same problem for haiku-pre-alpha-gcc4-hrev30935-raw.

comment:5 by scottmc, 13 years ago

Blocking: 7665 added

comment:6 by waddlesplash, 7 years ago

There have been a lot of fixes to the AHCI controller in the last 7 years. Could you please retest?

comment:7 by waddlesplash, 6 years ago

Resolution: invalid
Status: newclosed

comment:8 by waddlesplash, 6 years ago

Blocking: 7665 removed
Note: See TracTickets for help on using tickets.