ahci: set controller id
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 9 Dec 2010 07:39:48 +0000 (08:39 +0100)
committerKevin O'Connor <kevin@koconnor.net>
Sun, 12 Dec 2010 19:02:23 +0000 (14:02 -0500)
Fill the controller id in the drive struct with the port number so we
get a sane boot menu ordering with multiple hard disks attached.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
src/ahci.c

index 4ccee86b1cbdb50b1d7936d209e37537d9b5f553..e2b2dbf59ba1468ea41c395e133219b5254b2df9 100644 (file)
@@ -345,6 +345,7 @@ ahci_port_init(struct ahci_ctrl_s *ctrl, u32 pnr)
     }
 
     port->drive.type = DTYPE_AHCI;
+    port->drive.cntl_id = pnr;
     port->drive.removable = (buffer[0] & 0x80) ? 1 : 0;
     port->drive.desc = malloc_tmp(MAXDESCSIZE);
     if (!port->drive.desc) {