Lines Matching refs:aDev2

933  * @param   aDev2   Device 2.
935 * @returns < 0 if this should come before aDev2.
936 * @returns 0 if this and aDev2 are equal.
937 * @returns > 0 if this should come after aDev2.
941 int HostUSBDevice::i_compare(PCUSBDEVICE aDev2)
945 return i_compare(mUsb, aDev2,
954 * @param aDev2 Device 2.
958 * @returns < 0 if aDev1 should come before aDev2.
959 * @returns 0 if aDev1 and aDev2 are equal.
960 * @returns > 0 if aDev1 should come after aDev2.
963 int HostUSBDevice::i_compare(PCUSBDEVICE aDev1, PCUSBDEVICE aDev2, bool aIsAwaitingReAttach /*= false */)
972 int iDiff = aDev1->idVendor - aDev2->idVendor;
976 iDiff = aDev1->idProduct - aDev2->idProduct;
980 iDiff = aDev1->bcdDevice - aDev2->bcdDevice;
983 //Log3(("compare: bcdDevice: %#x != %#x\n", aDev1->bcdDevice, aDev2->bcdDevice));
988 if ( aDev1->u64SerialHash != aDev2->u64SerialHash
990 || (aDev2->pszSerialNumber && *aDev2->pszSerialNumber)
991 || (aDev2->pszManufacturer && *aDev2->pszManufacturer)
992 || (aDev2->pszProduct && *aDev2->pszProduct))
995 if (aDev1->u64SerialHash != aDev2->u64SerialHash)
998 //Log3(("compare: u64SerialHash: %#llx != %#llx\n", aDev1->u64SerialHash, aDev2->u64SerialHash));
999 return aDev1->u64SerialHash < aDev2->u64SerialHash ? -1 : 1;
1004 iDiff = strcmp(aDev1->pszHubName, aDev2->pszHubName);
1007 //Log3(("compare: HubName: %s != %s\n", aDev1->pszHubName, aDev2->pszHubName));
1011 iDiff = aDev1->bBus - aDev2->bBus;
1014 //Log3(("compare: bBus: %#x != %#x\n", aDev1->bBus, aDev2->bBus));
1019 iDiff = aDev1->bPort - aDev2->bPort; /* shouldn't change anywhere and help pinpoint it very accurately. */
1022 //Log3(("compare: bPort: %#x != %#x\n", aDev1->bPort, aDev2->bPort));
1034 //Log3(("aDev1=%p == aDev2=%p\n", aDev1, aDev2));
1038 return strcmp(aDev1->pszAddress, aDev2->pszAddress);