#12295 closed enhancement (fixed)
Enhancement to the ahci driver
Reported by: | Anarchos | Owned by: | axeld |
---|---|---|---|
Priority: | low | Milestone: | Unscheduled |
Component: | Drivers/Disk/ATA | Version: | R1/Development |
Keywords: | ahci sata | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
I added some documentation, and made the code a bit clearer. Anyway i am not sure of the following points :
- endianness issues and order of the fields in the scontrol struct.
- "0x%04" B_PRIx16 format string.
- "0x%02" B_PRIx8 format string.
- coding style
Attachments (3)
Change History (12)
by , 9 years ago
Attachment: | ahci.patch added |
---|
comment:1 by , 9 years ago
patch: | 0 → 1 |
---|
by , 9 years ago
Attachment: | ahci_irq_storm.patch added |
---|
comment:2 by , 9 years ago
The ahci_irq_storm.patch is the same as the ahci.patch I added code and specification documentation for the dealing of the "Port Connect Change" IRQ storm. Same uncertainties remain as before (endianness, format string, coding/doc style)
comment:3 by , 9 years ago
I think it could solve #9275, and other tickets related to boot failures with AMD IXP700 sata controller.
comment:4 by , 9 years ago
By waddlesplah advice, i must add that this patch solved my boot problem.
comment:5 by , 9 years ago
From IRC:
1:12 PM <axeld> One thing that should be resolved is the TODO comments 1:13 PM <axeld> Another thing is that it should be enough to refer to the spec instead of quoting it 1:13 PM <axeld> Excessive comments usually aren't helpful in reading source code 1:14 PM <axeld> Anarchos: Other than that, I would have to actually read the specs to be able to comment more :-)
by , 9 years ago
Attachment: | 0001-AHCI-Fix-boot-failures-due-to-Port-Connect-Change-IR.patch added |
---|
Cleaned-up Git-patch version of Anarchos' changes.
comment:6 by , 9 years ago
The order of the fields in a bitfield is implementation defined, I don't think it is a good idea to map them to the hardware this way. This should use some endian-aware solution - we probably have macros borrowed from FreeBSD to manage this somewhere.
I can't comment on the functional changes, since I don't know the ATA spec much.
comment:7 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → in-progress |
comment:8 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | in-progress → closed |
Applied in hrev49590. Unfortunately, the scontrol structure changed the access to a 32 bit field to 8 bits which broke some HW, and I didn't notice that.
Apart from that, I cleaned it up a little, and added a check for the ST flag in the command register as the specification suggests.
Solving boot failures due to "Port Connect Change" IRQ storm.