diff -u -r linux-2.5.44-ac3/drivers/ide/setup-pci.c linux-2.5.44-ac3-idefix/drivers/ide/setup-pci.c --- linux-2.5.44-ac3/drivers/ide/setup-pci.c 2002-10-18 23:01:49.000000000 -0500 +++ linux-2.5.44-ac3-idefix/drivers/ide/setup-pci.c 2002-10-25 10:54:30.000000000 -0500 @@ -472,6 +472,16 @@ hwif->mate = mate; mate->mate = hwif; } + else if(port){ + // if mate is NULL and port is 1 + // then we have a secondary without a primary + // which can happen on some bioses + // to avoid a null exception later in the code + // we populate mate with itself. + // Worst case is it says the controller is already + // initialized later. + hwif->mate = hwif; + } return hwif; }