Bug #13599
closedahci(7d) requires alias for HP AHCI SATA controller
100%
Description
Per Gary Mills,
https://openindiana.org/pipermail/openindiana-discuss/2021-March/024088.html
/etc/driver_aliases requires
ahci "pci8086,2822.103c.1309.0"
Updated by Robert Mustacchi over 1 year ago
Generally speaking Intel has two device IDs for their SATA controllers based on whether the BIOS has it in ahci mode or in RAID mode. In this case, the controller is not advertising that it supports the AHCI class code so I'm not really sure that it's correct that we should be adding this alias.
Updated by Toomas Soome over 1 year ago
Robert Mustacchi wrote in #note-1:
Generally speaking Intel has two device IDs for their SATA controllers based on whether the BIOS has it in ahci mode or in RAID mode. In this case, the controller is not advertising that it supports the AHCI class code so I'm not really sure that it's correct that we should be adding this alias.
FreeBSD seems to have it in https://grok.dragonflybsd.org/xref/freebsd/sys/dev/ahci/ahci_pci.c?r=4bc1e136#108
Linux seems to have it in https://github.com/torvalds/linux/blob/master/drivers/ata/ahci.c#L261
Updated by Gary Mills over 1 year ago
This particular disk controller does not have separate AHCI and RAID modes. Instead, it has an AHCI+RAID mode. I've been using it for several years with the ahci driver, with no problems. Here's how it looks with scanpci -v:
pci bus 0x0000 cardnum 0x1f function 0x02: vendor 0x8086 device 0x2822 Intel Corporation SATA Controller [RAID mode] CardVendor 0x103c card 0x1309 (Hewlett-Packard Company, Card unknown) STATUS 0x02b0 COMMAND 0x0047 CLASS 0x01 0x04 0x00 REVISION 0x00 BIST 0x00 HEADER 0x00 LATENCY 0x00 CACHE 0x00 BASE0 0x0000d100 SIZE 8 I/O BASE1 0x0000d110 SIZE 4 I/O BASE2 0x0000d108 SIZE 8 I/O BASE3 0x0000d114 SIZE 4 I/O BASE4 0x0000d0c0 SIZE 32 I/O BASE5 0xf6004000 SIZE 2048 MEM MAX_LAT 0x00 MIN_GNT 0x00 INT_PIN 0x02 INT_LINE 0x07
Updated by Robert Mustacchi over 1 year ago
Yes, it was the different class code that concerned me in this case. In general, when a device doesn't use the class code it's not safe to assume that, which is why I was uncertain here. Looking at the ICH8 datasheet, it does appear that it'll still end up with an ahci based device and we're probably fine because there is no Intel Matrix Storage Manager RAID Option ROM. I guess there'll have to be a different device that the Intel driver would attach to if it were present, so we can probably add 8086,2822 in general here and perhaps the mobile variant 282a as indicated by the spec update which is in a similar boat. I guess I'll put something together.
Updated by Robert Mustacchi over 1 year ago
- Category set to driver - device drivers
- Assignee set to Robert Mustacchi
- % Done changed from 0 to 50
- Difficulty changed from Medium to Bite-size
Updated by Robert Mustacchi over 1 year ago
Gary, John, does one of you want to test this and make sure that I've gotten this right upstream?
Updated by Gary Mills over 1 year ago
Yes, I'd be happy to test this fix. How do I do this when I've already made the change manually?
Updated by Robert Mustacchi over 1 year ago
There are a couple of different ways. One is to create a new boot environment and just edit the /etc/aliases to include the new entries as opposed to your old one. Another would be to build illumos-gate with the assosciated change and use onu.
Updated by Gary Mills over 1 year ago
The first way sounds easy to me.
Where do I find your new entries?
Updated by Robert Mustacchi over 1 year ago
You can find them in the review linked from here (https://code.illumos.org/c/illumos-gate/+/1306/1/usr/src/pkg/manifests/driver-storage-ahci.mf). Effectively they are:
- pci8086,2822,p
- pci8086,282a,p
Updated by Gary Mills over 1 year ago
Thanks for the link. Putting those two entries in /etc/driver_aliases does work. I got a normal boot of the new BE after I did that.
Updated by Robert Mustacchi over 1 year ago
Great, thanks for testing that Gary!
Updated by Electric Monk over 1 year ago
- Status changed from New to Closed
- % Done changed from 50 to 100
git commit b2761fb273089c452ca34297d7ab4a1d1c1f1012
commit b2761fb273089c452ca34297d7ab4a1d1c1f1012 Author: Robert Mustacchi <rm@fingolfin.org> Date: 2021-03-17T14:22:21.000Z 13599 ahci(7d) requires alias for HP AHCI SATA controller Reviewed by: Dan McDonald <danmcd@joyent.com> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Gordon Ross <gordon.w.ross@gmail.com>