Add set of chip IDs, known to support AHCI.
This commit is contained in:
Alexander Motin 2009-11-11 10:44:09 +00:00
parent d80a1e6c1b
commit 8e57bf8357

View File

@ -96,23 +96,154 @@ static void ahcipoll(struct cam_sim *sim);
MALLOC_DEFINE(M_AHCI, "AHCI driver", "AHCI driver data buffers");
/*
* AHCI v1.x compliant SATA chipset support functions
*/
static struct {
uint32_t id;
const char *name;
int flags;
} ahci_ids[] = {
{0x43801002, "ATI IXP600", 0},
{0x43901002, "ATI IXP700", 0},
{0x43911002, "ATI IXP700", 0},
{0x43921002, "ATI IXP700", 0},
{0x43931002, "ATI IXP700", 0},
{0x43941002, "ATI IXP800", 0},
{0x43951002, "ATI IXP800", 0},
{0x26528086, "Intel ICH6", 0},
{0x26538086, "Intel ICH6M", 0},
{0x26818086, "Intel ESB2", 0},
{0x26828086, "Intel ESB2", 0},
{0x26838086, "Intel ESB2", 0},
{0x27c18086, "Intel ICH7", 0},
{0x27c38086, "Intel ICH7", 0},
{0x27c58086, "Intel ICH7M", 0},
{0x27c68086, "Intel ICH7M", 0},
{0x28218086, "Intel ICH8", 0},
{0x28228086, "Intel ICH8", 0},
{0x28248086, "Intel ICH8", 0},
{0x28298086, "Intel ICH8M", 0},
{0x282a8086, "Intel ICH8M", 0},
{0x29228086, "Intel ICH9", 0},
{0x29238086, "Intel ICH9", 0},
{0x29248086, "Intel ICH9", 0},
{0x29258086, "Intel ICH9", 0},
{0x29278086, "Intel ICH9", 0},
{0x29298086, "Intel ICH9M", 0},
{0x292a8086, "Intel ICH9M", 0},
{0x292b8086, "Intel ICH9M", 0},
{0x292c8086, "Intel ICH9M", 0},
{0x292f8086, "Intel ICH9M", 0},
{0x294d8086, "Intel ICH9", 0},
{0x294e8086, "Intel ICH9M", 0},
{0x3a058086, "Intel ICH10", 0},
{0x3a228086, "Intel ICH10", 0},
{0x3a258086, "Intel ICH10", 0},
{0x3b228086, "Intel PCH", 0},
{0x3b238086, "Intel PCH", 0},
{0x3b248086, "Intel PCH", 0},
{0x3b258086, "Intel PCH", 0},
{0x3b298086, "Intel PCH", 0},
{0x3b2b8086, "Intel PCH", 0},
{0x3b2c8086, "Intel PCH", 0},
{0x3b2f8086, "Intel PCH", 0},
{0x044c10de, "NVIDIA MCP65", 0},
{0x044d10de, "NVIDIA MCP65", 0},
{0x044e10de, "NVIDIA MCP65", 0},
{0x044f10de, "NVIDIA MCP65", 0},
{0x045c10de, "NVIDIA MCP65", 0},
{0x045d10de, "NVIDIA MCP65", 0},
{0x045e10de, "NVIDIA MCP65", 0},
{0x045f10de, "NVIDIA MCP65", 0},
{0x055010de, "NVIDIA MCP67", 0},
{0x055110de, "NVIDIA MCP67", 0},
{0x055210de, "NVIDIA MCP67", 0},
{0x055310de, "NVIDIA MCP67", 0},
{0x055410de, "NVIDIA MCP67", 0},
{0x055510de, "NVIDIA MCP67", 0},
{0x055610de, "NVIDIA MCP67", 0},
{0x055710de, "NVIDIA MCP67", 0},
{0x055810de, "NVIDIA MCP67", 0},
{0x055910de, "NVIDIA MCP67", 0},
{0x055A10de, "NVIDIA MCP67", 0},
{0x055B10de, "NVIDIA MCP67", 0},
{0x058410de, "NVIDIA MCP67", 0},
{0x07f010de, "NVIDIA MCP73", 0},
{0x07f110de, "NVIDIA MCP73", 0},
{0x07f210de, "NVIDIA MCP73", 0},
{0x07f310de, "NVIDIA MCP73", 0},
{0x07f410de, "NVIDIA MCP73", 0},
{0x07f510de, "NVIDIA MCP73", 0},
{0x07f610de, "NVIDIA MCP73", 0},
{0x07f710de, "NVIDIA MCP73", 0},
{0x07f810de, "NVIDIA MCP73", 0},
{0x07f910de, "NVIDIA MCP73", 0},
{0x07fa10de, "NVIDIA MCP73", 0},
{0x07fb10de, "NVIDIA MCP73", 0},
{0x0ad010de, "NVIDIA MCP77", 0},
{0x0ad110de, "NVIDIA MCP77", 0},
{0x0ad210de, "NVIDIA MCP77", 0},
{0x0ad310de, "NVIDIA MCP77", 0},
{0x0ad410de, "NVIDIA MCP77", 0},
{0x0ad510de, "NVIDIA MCP77", 0},
{0x0ad610de, "NVIDIA MCP77", 0},
{0x0ad710de, "NVIDIA MCP77", 0},
{0x0ad810de, "NVIDIA MCP77", 0},
{0x0ad910de, "NVIDIA MCP77", 0},
{0x0ada10de, "NVIDIA MCP77", 0},
{0x0adb10de, "NVIDIA MCP77", 0},
{0x0ab410de, "NVIDIA MCP79", 0},
{0x0ab510de, "NVIDIA MCP79", 0},
{0x0ab610de, "NVIDIA MCP79", 0},
{0x0ab710de, "NVIDIA MCP79", 0},
{0x0ab810de, "NVIDIA MCP79", 0},
{0x0ab910de, "NVIDIA MCP79", 0},
{0x0aba10de, "NVIDIA MCP79", 0},
{0x0abb10de, "NVIDIA MCP79", 0},
{0x0abc10de, "NVIDIA MCP79", 0},
{0x0abd10de, "NVIDIA MCP79", 0},
{0x0abe10de, "NVIDIA MCP79", 0},
{0x0abf10de, "NVIDIA MCP79", 0},
{0x0d8410de, "NVIDIA MCP89", 0},
{0x0d8510de, "NVIDIA MCP89", 0},
{0x0d8610de, "NVIDIA MCP89", 0},
{0x0d8710de, "NVIDIA MCP89", 0},
{0x0d8810de, "NVIDIA MCP89", 0},
{0x0d8910de, "NVIDIA MCP89", 0},
{0x0d8a10de, "NVIDIA MCP89", 0},
{0x0d8b10de, "NVIDIA MCP89", 0},
{0x0d8c10de, "NVIDIA MCP89", 0},
{0x0d8d10de, "NVIDIA MCP89", 0},
{0x0d8e10de, "NVIDIA MCP89", 0},
{0x0d8f10de, "NVIDIA MCP89", 0},
{0x33491106, "VIA VT8251", 0},
{0x62871106, "VIA VT8251", 0},
{0x11841039, "SiS 966", 0},
{0x11851039, "SiS 968", 0},
{0x01861039, "SiS 968", 0},
{0, NULL, 0}
};
static int
ahci_probe(device_t dev)
{
char buf[64];
int i;
uint32_t devid = pci_get_devid(dev);
/* is this a possible AHCI candidate ? */
/* Is this a known AHCI chip? */
for (i = 0; ahci_ids[i].id != 0; i++) {
if (ahci_ids[i].id == devid) {
snprintf(buf, sizeof(buf), "%s AHCI SATA controller",
ahci_ids[i].name);
device_set_desc_copy(dev, buf);
return (BUS_PROBE_VENDOR);
}
}
/* Is this a possible AHCI candidate? */
if (pci_get_class(dev) != PCIC_STORAGE ||
pci_get_subclass(dev) != PCIS_STORAGE_SATA)
pci_get_subclass(dev) != PCIS_STORAGE_SATA ||
pci_get_progif(dev) != PCIP_STORAGE_SATA_AHCI_1_0)
return (ENXIO);
/* is this PCI device flagged as an AHCI compliant chip ? */
if (pci_get_progif(dev) != PCIP_STORAGE_SATA_AHCI_1_0)
return (ENXIO);
device_set_desc_copy(dev, "AHCI controller");
device_set_desc_copy(dev, "AHCI SATA controller");
return (BUS_PROBE_VENDOR);
}