Changeset 33203 in vbox
- Timestamp:
- Oct 18, 2010 2:55:53 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevPciIch9.cpp
r33142 r33203 1880 1880 "piix3ide", 31, 1 /* IDE controller */ 1881 1881 }, 1882 #if 0 1882 /* Disable, if we may wish to have multiple AHCI controllers */ 1883 #if 1 1883 1884 { 1884 1885 "ahci", 31, 2 /* SATA controller */ … … 1889 1890 }, 1890 1891 { 1892 "usb-ohci", 31, 4 /* OHCI USB controller */ 1893 }, 1894 { 1895 "usb-ehci", 31, 5 /* EHCI USB controller */ 1896 }, 1897 { 1891 1898 "thermal", 31, 6 /* Thermal controller */ 1892 1899 }, 1893 1900 }; 1894 1901 1895 static int assignPosition(PPCIBUS pBus, PPCIDEVICE pPciDev, const char *pszName )1902 static int assignPosition(PPCIBUS pBus, PPCIDEVICE pPciDev, const char *pszName, int iDevFn) 1896 1903 { 1897 1904 /* Hardcoded slots/functions, per chipset spec */ … … 1904 1911 } 1905 1912 } 1913 1914 if (iDevFn >=0 && iDevFn < (int)RT_ELEMENTS(pBus->apDevices)) 1915 return iDevFn; 1906 1916 1907 1917 /* Otherwise when assigning a slot, we need to make sure all its functions are available */ … … 1945 1955 * Find device position 1946 1956 */ 1947 if (iDev < 0 || !strcmp(pszName, "piix3ide")) 1948 { 1949 iDev = assignPosition(pBus, pPciDev, pszName); 1950 if (iDev < 0) 1951 { 1952 AssertMsgFailed(("Couldn't find free spot!\n")); 1953 return VERR_PDM_TOO_PCI_MANY_DEVICES; 1954 } 1957 iDev = assignPosition(pBus, pPciDev, pszName, iDev); 1958 if (iDev < 0) 1959 { 1960 AssertMsgFailed(("Couldn't find free spot!\n")); 1961 return VERR_PDM_TOO_PCI_MANY_DEVICES; 1955 1962 } 1956 1963 … … 1971 1978 { 1972 1979 /* if we got here, we shall (and usually can) relocate the device */ 1973 int iRelDev = assignPosition(pBus, pBus->apDevices[iDev], pBus->apDevices[iDev]->name );1980 int iRelDev = assignPosition(pBus, pBus->apDevices[iDev], pBus->apDevices[iDev]->name, -1); 1974 1981 if (iRelDev < 0 || iRelDev == iDev) 1975 1982 {
Note:
See TracChangeset
for help on using the changeset viewer.