Opened 9 years ago

Closed 2 months ago

Last modified 2 months 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:
Has a Patch: no 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 9 years ago.
syslog (167.6 KB) - added by Grey 9 years ago.
ahci.patch (431 bytes) - added by Grey 9 years ago.

Download all attachments as: .zip

Change History (11)

Changed 9 years ago by Grey

Attachment: lspci.txt added

Changed 9 years ago by Grey

Attachment: syslog added

Changed 9 years ago by Grey

Attachment: ahci.patch added

comment:1 Changed 9 years ago by anevilyak

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

comment:2 Changed 9 years ago by 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.

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 Changed 9 years ago by marcusoverhagen

is 0x00400040 => is 0x00000040

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

comment:4 in reply to:  2 Changed 9 years ago by Grey

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 Changed 7 years ago by scottmc

Blocking: 7665 added

comment:6 Changed 16 months ago by waddlesplash

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

comment:7 Changed 2 months ago by waddlesplash

Resolution: invalid
Status: newclosed

comment:8 Changed 2 months ago by waddlesplash

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