Changeset 38895 in vbox for trunk/src/VBox/HostDrivers/VBoxUSB/solaris
- Timestamp:
- Sep 28, 2011 12:04:39 PM (13 years ago)
- Location:
- trunk/src/VBox/HostDrivers/VBoxUSB/solaris
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxUSB/solaris/VBoxUSB-solaris.c
r38736 r38895 21 21 #define LOG_GROUP LOG_GROUP_USB_DRV 22 22 #ifdef DEBUG_ramshankar 23 # define LOG_ENABLED 23 24 # define LOG_INSTANCE RTLogRelDefaultInstance() 24 25 #endif … … 375 376 int _init(void) 376 377 { 377 LogF lowFunc((DEVICE_NAME ":_init\n"));378 LogFunc((DEVICE_NAME ":_init\n")); 378 379 379 380 /* … … 417 418 int rc; 418 419 419 LogF lowFunc((DEVICE_NAME ":_fini\n"));420 LogFunc((DEVICE_NAME ":_fini\n")); 420 421 421 422 rc = mod_remove(&g_VBoxUSBSolarisModLinkage); … … 432 433 int _info(struct modinfo *pModInfo) 433 434 { 434 LogF lowFunc((DEVICE_NAME ":_info\n"));435 LogFunc((DEVICE_NAME ":_info\n")); 435 436 436 437 return mod_info(&g_VBoxUSBSolarisModLinkage, pModInfo); … … 448 449 int VBoxUSBSolarisAttach(dev_info_t *pDip, ddi_attach_cmd_t enmCmd) 449 450 { 450 LogF lowFunc((DEVICE_NAME ":VBoxUSBSolarisAttach pDip=%p enmCmd=%d\n", pDip, enmCmd));451 LogFunc((DEVICE_NAME ":VBoxUSBSolarisAttach pDip=%p enmCmd=%d\n", pDip, enmCmd)); 451 452 452 453 int rc; … … 511 512 if (rc == USB_SUCCESS) 512 513 { 513 Log Flow((DEVICE_NAME ":VBoxUSBSolarisAttach cbMaxBulkXfer=%d\n", pState->cbMaxBulkXfer));514 Log((DEVICE_NAME ":VBoxUSBSolarisAttach cbMaxBulkXfer=%d\n", pState->cbMaxBulkXfer)); 514 515 515 516 /* … … 617 618 } 618 619 else 619 Log Flow((DEVICE_NAME ":VBoxUSBSolarisAttach not a USB device.\n")); /* This would appear on every boot if it were Rel */620 Log((DEVICE_NAME ":VBoxUSBSolarisAttach not a USB device.\n")); /* This would appear on every boot if it were Rel */ 620 621 } 621 622 else … … 659 660 int VBoxUSBSolarisDetach(dev_info_t *pDip, ddi_detach_cmd_t enmCmd) 660 661 { 661 LogF lowFunc((DEVICE_NAME ":VBoxUSBSolarisDetach pDip=%p enmCmd=%d\n", pDip, enmCmd));662 LogFunc((DEVICE_NAME ":VBoxUSBSolarisDetach pDip=%p enmCmd=%d\n", pDip, enmCmd)); 662 663 663 664 int instance = ddi_get_instance(pDip); … … 784 785 int VBoxUSBSolarisGetInfo(dev_info_t *pDip, ddi_info_cmd_t enmCmd, void *pvArg, void **ppvResult) 785 786 { 786 LogF lowFunc((DEVICE_NAME ":VBoxUSBSolarisGetInfo\n"));787 LogFunc((DEVICE_NAME ":VBoxUSBSolarisGetInfo\n")); 787 788 788 789 vboxusb_state_t *pState = NULL; … … 833 834 LOCAL int vboxUSBSolarisSetConsumerCredentials(RTPROCESS Process, int Instance, void *pvReserved) 834 835 { 835 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisSetConsumerCredentials Process=%u Instance=%d\n", Process, Instance));836 LogFunc((DEVICE_NAME ":vboxUSBSolarisSetConsumerCredentials Process=%u Instance=%d\n", Process, Instance)); 836 837 vboxusb_state_t *pState = ddi_get_soft_state(g_pVBoxUSBSolarisState, Instance); 837 838 if (!pState) … … 860 861 int VBoxUSBSolarisOpen(dev_t *pDev, int fFlag, int fType, cred_t *pCred) 861 862 { 862 LogF lowFunc((DEVICE_NAME ":VBoxUSBSolarisOpen pDev=%p fFlag=%d fType=%d pCred=%p\n", pDev, fFlag, fType, pCred));863 LogFunc((DEVICE_NAME ":VBoxUSBSolarisOpen pDev=%p fFlag=%d fType=%d pCred=%p\n", pDev, fFlag, fType, pCred)); 863 864 864 865 /* … … 908 909 int VBoxUSBSolarisClose(dev_t Dev, int fFlag, int fType, cred_t *pCred) 909 910 { 910 LogF lowFunc((DEVICE_NAME ":VBoxUSBSolarisClose Dev=%d fFlag=%d fType=%d pCred=%p\n", Dev, fFlag, fType, pCred));911 LogFunc((DEVICE_NAME ":VBoxUSBSolarisClose Dev=%d fFlag=%d fType=%d pCred=%p\n", Dev, fFlag, fType, pCred)); 911 912 912 913 int instance = getminor((dev_t)Dev); … … 929 930 int VBoxUSBSolarisRead(dev_t Dev, struct uio *pUio, cred_t *pCred) 930 931 { 931 LogF lowFunc((DEVICE_NAME ":VBoxUSBSolarisRead\n"));932 LogFunc((DEVICE_NAME ":VBoxUSBSolarisRead\n")); 932 933 return ENOTSUP; 933 934 } … … 936 937 int VBoxUSBSolarisWrite(dev_t Dev, struct uio *pUio, cred_t *pCred) 937 938 { 938 LogF lowFunc((DEVICE_NAME ":VBoxUSBSolarisWrite\n"));939 LogFunc((DEVICE_NAME ":VBoxUSBSolarisWrite\n")); 939 940 return ENOTSUP; 940 941 } … … 943 944 int VBoxUSBSolarisPoll(dev_t Dev, short fEvents, int fAnyYet, short *pReqEvents, struct pollhead **ppPollHead) 944 945 { 945 LogF lowFunc((DEVICE_NAME ":VBoxUSBSolarisPoll Dev=%d fEvents=%d fAnyYet=%d pReqEvents=%p\n", Dev, fEvents, fAnyYet, pReqEvents));946 LogFunc((DEVICE_NAME ":VBoxUSBSolarisPoll Dev=%d fEvents=%d fAnyYet=%d pReqEvents=%p\n", Dev, fEvents, fAnyYet, pReqEvents)); 946 947 947 948 /* … … 991 992 int VBoxUSBSolarisPower(dev_info_t *pDip, int Component, int Level) 992 993 { 993 LogF lowFunc((DEVICE_NAME ":VBoxUSBSolarisPower pDip=%p Component=%d Level=%d\n", pDip, Component, Level));994 LogFunc((DEVICE_NAME ":VBoxUSBSolarisPower pDip=%p Component=%d Level=%d\n", pDip, Component, Level)); 994 995 995 996 int instance = ddi_get_instance(pDip); … … 1049 1050 } 1050 1051 else 1051 Log Flow((DEVICE_NAME ":USB_DEV_PWRSTATE_OK failed.\n"));1052 Log((DEVICE_NAME ":USB_DEV_PWRSTATE_OK failed.\n")); 1052 1053 } 1053 1054 else … … 1070 1071 int VBoxUSBSolarisIOCtl(dev_t Dev, int Cmd, intptr_t pArg, int Mode, cred_t *pCred, int *pVal) 1071 1072 { 1072 /* LogF lowFunc((DEVICE_NAME ":VBoxUSBSolarisIOCtl Dev=%d Cmd=%d pArg=%p Mode=%d\n", Dev, Cmd, pArg)); */1073 /* LogFunc((DEVICE_NAME ":VBoxUSBSolarisIOCtl Dev=%d Cmd=%d pArg=%p Mode=%d\n", Dev, Cmd, pArg)); */ 1073 1074 1074 1075 /* … … 1198 1199 LOCAL int vboxUSBSolarisProcessIOCtl(int iFunction, void *pvState, int Mode, PVBOXUSBREQ pUSBReq, void *pvBuf, size_t *pcbDataOut) 1199 1200 { 1200 // LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisProcessIOCtl iFunction=%d pvState=%p pUSBReq=%p\n", iFunction, pvState, pUSBReq));1201 // LogFunc((DEVICE_NAME ":vboxUSBSolarisProcessIOCtl iFunction=%d pvState=%p pUSBReq=%p\n", iFunction, pvState, pUSBReq)); 1201 1202 1202 1203 AssertPtrReturn(pvState, VERR_INVALID_PARAMETER); … … 1229 1230 rc = vboxUSBSolarisSendURB(pState, pUrbReq, Mode); 1230 1231 *pcbDataOut = 0; 1231 Log Flow((DEVICE_NAME ":vboxUSBSolarisProcessIOCtl: SEND_URB returned %d\n", rc));1232 Log((DEVICE_NAME ":vboxUSBSolarisProcessIOCtl: SEND_URB returned %d\n", rc)); 1232 1233 break; 1233 1234 } … … 1240 1241 rc = vboxUSBSolarisReapURB(pState, pUrbReq, Mode); 1241 1242 *pcbDataOut = sizeof(VBOXUSBREQ_URB); 1242 Log Flow((DEVICE_NAME ":vboxUSBSolarisProcessIOCtl: REAP_URB returned %d\n", rc));1243 Log((DEVICE_NAME ":vboxUSBSolarisProcessIOCtl: REAP_URB returned %d\n", rc)); 1243 1244 break; 1244 1245 } … … 1251 1252 rc = vboxUSBSolarisClearEndPoint(pState, pClearEpReq->bEndpoint); 1252 1253 *pcbDataOut = 0; 1253 Log Flow((DEVICE_NAME ":vboxUSBSolarisProcessIOCtl: CLEAR_EP returned %d\n", rc));1254 Log((DEVICE_NAME ":vboxUSBSolarisProcessIOCtl: CLEAR_EP returned %d\n", rc)); 1254 1255 break; 1255 1256 } … … 1262 1263 rc = vboxUSBSolarisSetConfig(pState, pSetCfgReq->bConfigValue); 1263 1264 *pcbDataOut = 0; 1264 Log Flow((DEVICE_NAME ":vboxUSBSolarisProcessIOCtl: SET_CONFIG returned %d\n", rc));1265 Log((DEVICE_NAME ":vboxUSBSolarisProcessIOCtl: SET_CONFIG returned %d\n", rc)); 1265 1266 break; 1266 1267 } … … 1273 1274 rc = vboxUSBSolarisSetInterface(pState, pSetInterfaceReq->bInterface, pSetInterfaceReq->bAlternate); 1274 1275 *pcbDataOut = 0; 1275 Log Flow((DEVICE_NAME ":vboxUSBSolarisProcessIOCtl: SET_INTERFACE returned %d\n", rc));1276 Log((DEVICE_NAME ":vboxUSBSolarisProcessIOCtl: SET_INTERFACE returned %d\n", rc)); 1276 1277 break; 1277 1278 } … … 1284 1285 rc = vboxUSBSolarisCloseDevice(pState, pCloseDeviceReq->ResetLevel); 1285 1286 *pcbDataOut = 0; 1286 Log Flow((DEVICE_NAME ":vboxUSBSolarisProcessIOCtl: CLOSE_DEVICE returned %d\n", rc));1287 Log((DEVICE_NAME ":vboxUSBSolarisProcessIOCtl: CLOSE_DEVICE returned %d\n", rc)); 1287 1288 break; 1288 1289 } … … 1295 1296 rc = vboxUSBSolarisAbortPipe(pState, pAbortPipeReq->bEndpoint); 1296 1297 *pcbDataOut = 0; 1297 Log Flow((DEVICE_NAME ":vboxUSBSolarisProcessIOCtl: ABORT_PIPE returned %d\n", rc));1298 Log((DEVICE_NAME ":vboxUSBSolarisProcessIOCtl: ABORT_PIPE returned %d\n", rc)); 1298 1299 break; 1299 1300 } … … 1306 1307 rc = vboxUSBSolarisGetConfig(pState, &pGetCfgReq->bConfigValue); 1307 1308 *pcbDataOut = sizeof(VBOXUSBREQ_GET_CONFIG); 1308 Log Flow((DEVICE_NAME ":vboxUSBSolarisProcessIOCtl: GET_CONFIG returned %d\n", rc));1309 Log((DEVICE_NAME ":vboxUSBSolarisProcessIOCtl: GET_CONFIG returned %d\n", rc)); 1309 1310 break; 1310 1311 } … … 1319 1320 *pcbDataOut = sizeof(VBOXUSBREQ_GET_VERSION); 1320 1321 rc = VINF_SUCCESS; 1321 Log Flow((DEVICE_NAME ":vboxUSBSolarisProcessIOCtl: GET_VERSION returned %d\n", rc));1322 Log((DEVICE_NAME ":vboxUSBSolarisProcessIOCtl: GET_VERSION returned %d\n", rc)); 1322 1323 break; 1323 1324 } … … 1346 1347 LOCAL int vboxUSBSolarisInitPower(vboxusb_state_t *pState) 1347 1348 { 1348 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisInitPower pState=%p\n", pState));1349 LogFunc((DEVICE_NAME ":vboxUSBSolarisInitPower pState=%p\n", pState)); 1349 1350 1350 1351 int rc = usb_handle_remote_wakeup(pState->pDip, USB_REMOTE_WAKEUP_ENABLE); … … 1376 1377 } 1377 1378 else 1378 Log Flow((DEVICE_NAME ":vboxUSBSolarisInitPower failed to create power components.\n"));1379 Log((DEVICE_NAME ":vboxUSBSolarisInitPower failed to create power components.\n")); 1379 1380 1380 1381 return VINF_SUCCESS; … … 1385 1386 else 1386 1387 { 1387 Log Flow((DEVICE_NAME ":vboxUSBSolarisInitPower failed to enable remote wakeup. No PM.\n"));1388 Log((DEVICE_NAME ":vboxUSBSolarisInitPower failed to enable remote wakeup. No PM.\n")); 1388 1389 rc = VINF_SUCCESS; 1389 1390 } … … 1403 1404 LOCAL void vboxUSBSolarisDestroyPower(vboxusb_state_t *pState) 1404 1405 { 1405 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisDestroyPower pState=%p\n", pState));1406 LogFunc((DEVICE_NAME ":vboxUSBSolarisDestroyPower pState=%p\n", pState)); 1406 1407 1407 1408 if (pState->pPower) … … 1418 1419 rc = pm_raise_power(pState->pDip, 0 /* component */, USB_DEV_OS_FULL_PWR); 1419 1420 if (rc != DDI_SUCCESS) 1420 Log Flow((DEVICE_NAME ":vboxUSBSolarisDestroyPower raising power failed! rc=%d\n", rc));1421 Log((DEVICE_NAME ":vboxUSBSolarisDestroyPower raising power failed! rc=%d\n", rc)); 1421 1422 1422 1423 rc = usb_handle_remote_wakeup(pState->pDip, USB_REMOTE_WAKEUP_DISABLE); 1423 1424 if (rc != DDI_SUCCESS) 1424 Log Flow((DEVICE_NAME ":vboxUSBSolarisDestroyPower failed to disable remote wakeup.\n"));1425 Log((DEVICE_NAME ":vboxUSBSolarisDestroyPower failed to disable remote wakeup.\n")); 1425 1426 } 1426 1427 else … … 1429 1430 rc = pm_lower_power(pState->pDip, 0 /* component */, USB_DEV_OS_PWR_OFF); 1430 1431 if (rc != DDI_SUCCESS) 1431 Log Flow((DEVICE_NAME ":vboxUSBSolarisDestroyPower lowering power failed! rc=%d\n", rc));1432 Log((DEVICE_NAME ":vboxUSBSolarisDestroyPower lowering power failed! rc=%d\n", rc)); 1432 1433 1433 1434 vboxUSBSolarisPowerIdle(pState); … … 1555 1556 while (cCompatible--) 1556 1557 { 1557 Log Flow((DEVICE_NAME ":vboxUSBSolarisIsUSBDevice compatible[%d]=%s\n", cCompatible, ppszCompatible[cCompatible]));1558 Log((DEVICE_NAME ":vboxUSBSolarisIsUSBDevice compatible[%d]=%s\n", cCompatible, ppszCompatible[cCompatible])); 1558 1559 if (!strncmp(ppszCompatible[cCompatible], "usb", 3)) 1559 1560 { 1560 Log Flow((DEVICE_NAME ":vboxUSBSolarisIsUSBDevice verified device as USB. pszCompatible=%s\n", ppszCompatible[cCompatible]));1561 Log((DEVICE_NAME ":vboxUSBSolarisIsUSBDevice verified device as USB. pszCompatible=%s\n", ppszCompatible[cCompatible])); 1561 1562 ddi_prop_free(ppszCompatible); 1562 1563 return true; … … 1568 1569 } 1569 1570 else 1570 Log Flow((DEVICE_NAME ":vboxUSBSolarisIsUSBDevice USB property lookup failed. rc=%d\n", rc));1571 Log((DEVICE_NAME ":vboxUSBSolarisIsUSBDevice USB property lookup failed. rc=%d\n", rc)); 1571 1572 1572 1573 /* … … 1581 1582 while (cCompatible--) 1582 1583 { 1583 Log Flow((DEVICE_NAME ":vboxUSBSolarisIsUSBDevice parent compatible[%d]=%s\n", cCompatible, ppszCompatible[cCompatible]));1584 Log((DEVICE_NAME ":vboxUSBSolarisIsUSBDevice parent compatible[%d]=%s\n", cCompatible, ppszCompatible[cCompatible])); 1584 1585 if (!strncmp(ppszCompatible[cCompatible], "usb", 3)) 1585 1586 { 1586 Log Flow((DEVICE_NAME ":vboxUSBSolarisIsUSBDevice verified device as USB. parent pszCompatible=%s\n",1587 Log((DEVICE_NAME ":vboxUSBSolarisIsUSBDevice verified device as USB. parent pszCompatible=%s\n", 1587 1588 ppszCompatible[cCompatible])); 1588 1589 ddi_prop_free(ppszCompatible); … … 1595 1596 } 1596 1597 else 1597 Log Flow((DEVICE_NAME ":vboxUSBSolarisIsUSBDevice USB parent property lookup failed. rc=%d\n", rc));1598 Log((DEVICE_NAME ":vboxUSBSolarisIsUSBDevice USB parent property lookup failed. rc=%d\n", rc)); 1598 1599 } 1599 1600 else 1600 Log Flow((DEVICE_NAME ":vboxUSBSolarisIsUSBDevice failed to obtain parent device for property lookup.\n"));1601 Log((DEVICE_NAME ":vboxUSBSolarisIsUSBDevice failed to obtain parent device for property lookup.\n")); 1601 1602 1602 1603 return false; … … 1619 1620 AssertPtrReturn(pEp, VERR_INVALID_POINTER); 1620 1621 1621 /* LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisSendUrb pState=%p pUrbReq=%p bEndpoint=%#x[%d] enmDir=%#x enmType=%#x cbData=%d pvData=%p\n",1622 /* LogFunc((DEVICE_NAME ":vboxUSBSolarisSendUrb pState=%p pUrbReq=%p bEndpoint=%#x[%d] enmDir=%#x enmType=%#x cbData=%d pvData=%p\n", 1622 1623 pState, pUrbReq, pUrbReq->bEndpoint, EndPtIndex, pUrbReq->enmDir, pUrbReq->enmType, pUrbReq->cbData, pUrbReq->pvData)); */ 1623 1624 … … 1776 1777 LOCAL int vboxUSBSolarisReapURB(vboxusb_state_t *pState, PVBOXUSBREQ_URB pUrbReq, int Mode) 1777 1778 { 1778 // LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisReapUrb pState=%p pUrbReq=%p\n", pState, pUrbReq));1779 // LogFunc((DEVICE_NAME ":vboxUSBSolarisReapUrb pState=%p pUrbReq=%p\n", pState, pUrbReq)); 1779 1780 1780 1781 AssertPtrReturn(pUrbReq, VERR_INVALID_POINTER); … … 1848 1849 } 1849 1850 1850 Log Flow((DEVICE_NAME ":vboxUSBSolarisReapUrb pvUrbR3=%p pvDataR3=%p cbData=%d\n", pUrbReq->pvUrbR3, pUrbReq->pvData, pUrbReq->cbData));1851 Log((DEVICE_NAME ":vboxUSBSolarisReapUrb pvUrbR3=%p pvDataR3=%p cbData=%d\n", pUrbReq->pvUrbR3, pUrbReq->pvData, pUrbReq->cbData)); 1851 1852 } 1852 1853 else … … 1854 1855 pUrbReq->cbData = 0; 1855 1856 rc = VERR_INVALID_POINTER; 1856 Log Flow((DEVICE_NAME ":vboxUSBSolarisReapUrb missing pvDataR3!!\n"));1857 Log((DEVICE_NAME ":vboxUSBSolarisReapUrb missing pvDataR3!!\n")); 1857 1858 } 1858 1859 … … 1877 1878 else 1878 1879 { 1879 Log Flow((DEVICE_NAME ":vboxUSBSolarisReapUrb missing message.\n"));1880 Log((DEVICE_NAME ":vboxUSBSolarisReapUrb missing message.\n")); 1880 1881 pUrbReq->cbData = 0; 1881 1882 } … … 1926 1927 mutex_exit(&pState->Mtx); 1927 1928 1928 Log Flow((DEVICE_NAME ":vboxUSBSolarisReapUrb returns %d\n", rc));1929 Log((DEVICE_NAME ":vboxUSBSolarisReapUrb returns %d\n", rc)); 1929 1930 return rc; 1930 1931 } … … 1941 1942 LOCAL int vboxUSBSolarisClearEndPoint(vboxusb_state_t *pState, uint8_t bEndpoint) 1942 1943 { 1943 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisClearEndPoint pState=%p bEndpoint=%#x\n", pState, bEndpoint));1944 LogFunc((DEVICE_NAME ":vboxUSBSolarisClearEndPoint pState=%p bEndpoint=%#x\n", pState, bEndpoint)); 1944 1945 1945 1946 /* … … 1979 1980 mutex_enter(&pState->Mtx); 1980 1981 1981 Log Flow((DEVICE_NAME ":vboxUSBSolarisClearEndPoint bEndpoint=%#x[%d] returns %d\n", bEndpoint, EndPtIndex, rc));1982 Log((DEVICE_NAME ":vboxUSBSolarisClearEndPoint bEndpoint=%#x[%d] returns %d\n", bEndpoint, EndPtIndex, rc)); 1982 1983 1983 1984 rc = VINF_SUCCESS; … … 1985 1986 else 1986 1987 { 1987 Log Flow((DEVICE_NAME ":vboxUSBSolarisClearEndPoint not opened to be cleared. Faking success. bEndpoint=%#x.\n", bEndpoint));1988 Log((DEVICE_NAME ":vboxUSBSolarisClearEndPoint not opened to be cleared. Faking success. bEndpoint=%#x.\n", bEndpoint)); 1988 1989 rc = VINF_SUCCESS; 1989 1990 } … … 1996 1997 } 1997 1998 else 1998 Log Flow((DEVICE_NAME ":vboxUSBSolarisClearEndPoint device state=%d not online.\n", pState->DevState));1999 Log((DEVICE_NAME ":vboxUSBSolarisClearEndPoint device state=%d not online.\n", pState->DevState)); 1999 2000 2000 2001 mutex_exit(&pState->Mtx); … … 2013 2014 LOCAL int vboxUSBSolarisSetConfig(vboxusb_state_t *pState, uint8_t bCfgValue) 2014 2015 { 2015 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisSetConfig pState=%p bCfgValue=%#x\n", pState, bCfgValue));2016 LogFunc((DEVICE_NAME ":vboxUSBSolarisSetConfig pState=%p bCfgValue=%#x\n", pState, bCfgValue)); 2016 2017 2017 2018 /* … … 2070 2071 LOCAL int vboxUSBSolarisGetConfig(vboxusb_state_t *pState, uint8_t *pCfgValue) 2071 2072 { 2072 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisGetConfig pState=%p pCfgValue=%p\n", pState, pCfgValue));2073 LogFunc((DEVICE_NAME ":vboxUSBSolarisGetConfig pState=%p pCfgValue=%p\n", pState, pCfgValue)); 2073 2074 AssertPtrReturn(pCfgValue, VERR_INVALID_POINTER); 2074 2075 … … 2085 2086 { 2086 2087 *pCfgValue = pCurrCfg->cfg_descr.bConfigurationValue; 2087 Log Flow((DEVICE_NAME ":vboxUSBSolarisGetConfig cached config returned. CfgValue=%d\n", *pCfgValue));2088 Log((DEVICE_NAME ":vboxUSBSolarisGetConfig cached config returned. CfgValue=%d\n", *pCfgValue)); 2088 2089 return VINF_SUCCESS; 2089 2090 } … … 2106 2107 } 2107 2108 2108 Log Flow((DEVICE_NAME ":vboxUSBSolarisGetConfig returns %d CfgValue=%d\n", rc, *pCfgValue));2109 Log((DEVICE_NAME ":vboxUSBSolarisGetConfig returns %d CfgValue=%d\n", rc, *pCfgValue)); 2109 2110 return rc; 2110 2111 } … … 2122 2123 LOCAL int vboxUSBSolarisSetInterface(vboxusb_state_t *pState, uint8_t uInterface, uint8_t uAlt) 2123 2124 { 2124 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisSetInterface pState=%p uInterface=%#x uAlt=%#x\n", pState, uInterface, uAlt));2125 LogFunc((DEVICE_NAME ":vboxUSBSolarisSetInterface pState=%p uInterface=%#x uAlt=%#x\n", pState, uInterface, uAlt)); 2125 2126 2126 2127 /* … … 2169 2170 LOCAL int vboxUSBSolarisCloseDevice(vboxusb_state_t *pState, VBOXUSB_RESET_LEVEL enmReset) 2170 2171 { 2171 Log Flow((DEVICE_NAME ":vboxUSBSolarisCloseDevice pState=%p enmReset=%d\n", pState, enmReset));2172 Log((DEVICE_NAME ":vboxUSBSolarisCloseDevice pState=%p enmReset=%d\n", pState, enmReset)); 2172 2173 2173 2174 /* … … 2208 2209 } 2209 2210 2210 Log Flow((DEVICE_NAME ":vboxUSBSolarisCloseDevice returns %d\n", rc));2211 Log((DEVICE_NAME ":vboxUSBSolarisCloseDevice returns %d\n", rc)); 2211 2212 return rc; 2212 2213 } … … 2223 2224 LOCAL int vboxUSBSolarisAbortPipe(vboxusb_state_t *pState, uint8_t bEndpoint) 2224 2225 { 2225 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisAbortPipe pState=%p bEndpoint=%#x\n", pState, bEndpoint));2226 LogFunc((DEVICE_NAME ":vboxUSBSolarisAbortPipe pState=%p bEndpoint=%#x\n", pState, bEndpoint)); 2226 2227 2227 2228 /* … … 2268 2269 mutex_enter(&pState->Mtx); 2269 2270 2270 Log Flow((DEVICE_NAME ":usb_pipe_drain_reqs returns %d\n", rc));2271 Log((DEVICE_NAME ":usb_pipe_drain_reqs returns %d\n", rc)); 2271 2272 rc = vboxUSBSolarisToVBoxRC(rc); 2272 2273 } … … 2286 2287 mutex_exit(&pState->Mtx); 2287 2288 2288 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisAbortPipe returns %d\n", rc));2289 LogFunc((DEVICE_NAME ":vboxUSBSolarisAbortPipe returns %d\n", rc)); 2289 2290 return rc; 2290 2291 } … … 2306 2307 uchar_t uInterface, uchar_t uAlt) 2307 2308 { 2308 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisInitEndPoint pState=%p pEpData=%p CfgVal=%d Iface=%d Alt=%d", pState,2309 LogFunc((DEVICE_NAME ":vboxUSBSolarisInitEndPoint pState=%p pEpData=%p CfgVal=%d Iface=%d Alt=%d", pState, 2309 2310 pEpData, uCfgValue, uInterface, uAlt)); 2310 2311 … … 2350 2351 pEp->fInitialized = VBOXUSB_EP_INITIALIZED; 2351 2352 } 2352 Log Flow((DEVICE_NAME ":vboxUSBSolarisInitEndPoint done. %s:[%d] bEndpoint=%#x\n", !pEpData ? "Default " : "Endpoint",2353 Log((DEVICE_NAME ":vboxUSBSolarisInitEndPoint done. %s:[%d] bEndpoint=%#x\n", !pEpData ? "Default " : "Endpoint", 2353 2354 EpIndex, pEp->EpDesc.bEndpointAddress)); 2354 2355 return VINF_SUCCESS; … … 2365 2366 LOCAL int vboxUSBSolarisInitAllEndPoints(vboxusb_state_t *pState) 2366 2367 { 2367 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisInitAllEndPoints pState=%p\n", pState));2368 LogFunc((DEVICE_NAME ":vboxUSBSolarisInitAllEndPoints pState=%p\n", pState)); 2368 2369 2369 2370 /* … … 2404 2405 LOCAL int vboxUSBSolarisInitEndPointsForConfig(vboxusb_state_t *pState, uint8_t uCfgIndex) 2405 2406 { 2406 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisInitEndPointsForConfig pState=%p uCfgIndex=%d\n", pState, uCfgIndex));2407 LogFunc((DEVICE_NAME ":vboxUSBSolarisInitEndPointsForConfig pState=%p uCfgIndex=%d\n", pState, uCfgIndex)); 2407 2408 usb_cfg_data_t *pConfig = &pState->pDevDesc->dev_cfg[uCfgIndex]; 2408 2409 uchar_t uCfgValue = pConfig->cfg_descr.bConfigurationValue; … … 2445 2446 LOCAL int vboxUSBSolarisInitEndPointsForInterfaceAlt(vboxusb_state_t *pState, uint8_t uInterface, uint8_t uAlt) 2446 2447 { 2447 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisInitEndPointsForInterfaceAlt pState=%p uInterface=%d uAlt=%d\n", pState, uInterface, uAlt));2448 LogFunc((DEVICE_NAME ":vboxUSBSolarisInitEndPointsForInterfaceAlt pState=%p uInterface=%d uAlt=%d\n", pState, uInterface, uAlt)); 2448 2449 2449 2450 /* Doesn't hurt to be paranoid */ … … 2489 2490 } 2490 2491 2491 Log Flow((DEVICE_NAME ":vboxUSBSolarisInitEndPointsForInterfaceAlt returns %d\n", rc));2492 Log((DEVICE_NAME ":vboxUSBSolarisInitEndPointsForInterfaceAlt returns %d\n", rc)); 2492 2493 return rc; 2493 2494 } … … 2503 2504 LOCAL void vboxUSBSolarisDestroyAllEndPoints(vboxusb_state_t *pState) 2504 2505 { 2505 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisDestroyAllEndPoints pState=%p\n", pState));2506 LogFunc((DEVICE_NAME ":vboxUSBSolarisDestroyAllEndPoints pState=%p\n", pState)); 2506 2507 for (unsigned i = 0; i < VBOXUSB_MAX_ENDPOINTS; i++) 2507 2508 { … … 2524 2525 LOCAL void vboxUSBSolarisDestroyEndPoint(vboxusb_state_t *pState, vboxusb_ep_t *pEp) 2525 2526 { 2526 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisDestroyEndPoint pState=%p pEp=%p\n", pState, pEp));2527 LogFunc((DEVICE_NAME ":vboxUSBSolarisDestroyEndPoint pState=%p pEp=%p\n", pState, pEp)); 2527 2528 2528 2529 if (pEp->fInitialized == VBOXUSB_EP_INITIALIZED) … … 2563 2564 LOCAL void vboxUSBSolarisCloseAllPipes(vboxusb_state_t *pState, bool fDefault) 2564 2565 { 2565 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisCloseAllPipes pState=%p\n", pState));2566 LogFunc((DEVICE_NAME ":vboxUSBSolarisCloseAllPipes pState=%p\n", pState)); 2566 2567 2567 2568 for (int i = 1; i < VBOXUSB_MAX_ENDPOINTS; i++) … … 2571 2572 && pEp->pPipe) 2572 2573 { 2573 Log Flow((DEVICE_NAME ":vboxUSBSolarisCloseAllPipes closing[%d]\n", i));2574 Log((DEVICE_NAME ":vboxUSBSolarisCloseAllPipes closing[%d]\n", i)); 2574 2575 vboxUSBSolarisClosePipe(pState, pEp); 2575 2576 } … … 2583 2584 { 2584 2585 vboxUSBSolarisClosePipe(pState, pEp); 2585 Log Flow((DEVICE_NAME ":vboxUSBSolarisCloseAllPipes closed default pipe.\n"));2586 Log((DEVICE_NAME ":vboxUSBSolarisCloseAllPipes closed default pipe.\n")); 2586 2587 } 2587 2588 } … … 2597 2598 LOCAL void vboxUSBSolarisCloseInterface(vboxusb_state_t *pState, uint8_t bInterface) 2598 2599 { 2599 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisCloseInterface pState=%p bInterface=%#x\n", pState, bInterface));2600 LogFunc((DEVICE_NAME ":vboxUSBSolarisCloseInterface pState=%p bInterface=%#x\n", pState, bInterface)); 2600 2601 2601 2602 for (int i = 1; i < VBOXUSB_MAX_ENDPOINTS; i++) … … 2606 2607 && pEp->uInterface == bInterface) 2607 2608 { 2608 Log Flow((DEVICE_NAME ":vboxUSBSolarisCloseInterface closing[%d]\n", i));2609 Log((DEVICE_NAME ":vboxUSBSolarisCloseInterface closing[%d]\n", i)); 2609 2610 vboxUSBSolarisClosePipe(pState, pEp); 2610 2611 } … … 2623 2624 LOCAL int vboxUSBSolarisOpenPipe(vboxusb_state_t *pState, vboxusb_ep_t *pEp) 2624 2625 { 2625 // LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisOpenPipe pState=%p pEp=%p\n", pState, pEp));2626 // LogFunc((DEVICE_NAME ":vboxUSBSolarisOpenPipe pState=%p pEp=%p\n", pState, pEp)); 2626 2627 2627 2628 /* … … 2638 2639 pEp->pPipe = pState->pDevDesc->dev_default_ph; 2639 2640 pEp->EpState |= VBOXUSB_EP_STATE_OPENED; 2640 Log Flow((DEVICE_NAME ":vboxUSBSolarisOpenPipe default pipe opened.\n"));2641 Log((DEVICE_NAME ":vboxUSBSolarisOpenPipe default pipe opened.\n")); 2641 2642 return VINF_SUCCESS; 2642 2643 } … … 2672 2673 pEp->cbMaxIsocData = 400 * cbMax * 8; 2673 2674 } 2674 Log Flow((DEVICE_NAME ":vboxUSBSolarisOpenPipe pEp=%p cbMaxIsocData=%u\n", pEp->cbMaxIsocData));2675 Log((DEVICE_NAME ":vboxUSBSolarisOpenPipe pEp=%p cbMaxIsocData=%u\n", pEp->cbMaxIsocData)); 2675 2676 } 2676 2677 … … 2698 2699 LOCAL void vboxUSBSolarisClosePipe(vboxusb_state_t *pState, vboxusb_ep_t *pEp) 2699 2700 { 2700 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisClosePipe pState=%p pEp=%p\n", pState, pEp));2701 LogFunc((DEVICE_NAME ":vboxUSBSolarisClosePipe pState=%p pEp=%p\n", pState, pEp)); 2701 2702 AssertPtr(pEp); 2702 2703 … … 2713 2714 usb_pipe_drain_reqs(pState->pDip, pEp->pPipe, 0, USB_FLAGS_SLEEP, NULL /* callback */, NULL /* callback arg. */); 2714 2715 mutex_enter(&pState->Mtx); 2715 Log Flow((DEVICE_NAME ":vboxUSBSolarisClosePipe closed default pipe\n"));2716 Log((DEVICE_NAME ":vboxUSBSolarisClosePipe closed default pipe\n")); 2716 2717 } 2717 2718 else … … 2731 2732 * Non-default pipe: close it. 2732 2733 */ 2733 Log Flow((DEVICE_NAME ":vboxUSBSolarisClosePipe pipe bmAttributes=%#x bEndpointAddress=%#x\n", pEp->EpDesc.bmAttributes, pEp->EpDesc.bEndpointAddress));2734 Log((DEVICE_NAME ":vboxUSBSolarisClosePipe pipe bmAttributes=%#x bEndpointAddress=%#x\n", pEp->EpDesc.bmAttributes, pEp->EpDesc.bEndpointAddress)); 2734 2735 mutex_exit(&pState->Mtx); 2735 2736 usb_pipe_close(pState->pDip, pEp->pPipe, USB_FLAGS_SLEEP, NULL /* callback */, NULL /* callback arg. */); … … 2742 2743 pEp->pPipe = NULL; 2743 2744 2744 Log Flow((DEVICE_NAME ":vboxUSBSolarisClosePipe successful. pEp=%p\n", pEp));2745 Log((DEVICE_NAME ":vboxUSBSolarisClosePipe successful. pEp=%p\n", pEp)); 2745 2746 } 2746 2747 … … 2758 2759 LOCAL bool vboxUSBSolarisIsAnyPipeOpen(vboxusb_state_t *pState) 2759 2760 { 2760 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisIsAnyPipeOpen pState=%p\n", pState));2761 LogFunc((DEVICE_NAME ":vboxUSBSolarisIsAnyPipeOpen pState=%p\n", pState)); 2761 2762 2762 2763 for (int i = 1; i < VBOXUSB_MAX_ENDPOINTS; i++) … … 2765 2766 if (pEp->pPipe) 2766 2767 { 2767 Log Flow((DEVICE_NAME ":vboxUSBSolarisIsAnyPipeOpen pState=%p pEp=%p returns true.\n", pState, pEp));2768 Log((DEVICE_NAME ":vboxUSBSolarisIsAnyPipeOpen pState=%p pEp=%p returns true.\n", pState, pEp)); 2768 2769 return true; 2769 2770 } 2770 2771 } 2771 2772 2772 Log Flow((DEVICE_NAME ":vboxUSBSolarisIsAnyPipeOpen pState=%p returns false.\n", pState));2773 Log((DEVICE_NAME ":vboxUSBSolarisIsAnyPipeOpen pState=%p returns false.\n", pState)); 2773 2774 return false; 2774 2775 } … … 2852 2853 LOCAL vboxusb_urb_t *vboxUSBSolarisQueueURB(vboxusb_state_t *pState, PVBOXUSBREQ_URB pUrbReq, mblk_t *pMsg) 2853 2854 { 2854 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisQueueURB pState=%p pUrbReq=%p\n", pState, pUrbReq));2855 LogFunc((DEVICE_NAME ":vboxUSBSolarisQueueURB pState=%p pUrbReq=%p\n", pState, pUrbReq)); 2855 2856 2856 2857 mutex_enter(&pState->Mtx); … … 2905 2906 Assert(pUrb->pMsg == NULL); 2906 2907 pUrb->pState = pState; 2907 Log Flow((DEVICE_NAME ":vboxUSBSolarisQueueURB cInflightUrbs=%d\n", pState->cInflightUrbs));2908 Log((DEVICE_NAME ":vboxUSBSolarisQueueURB cInflightUrbs=%d\n", pState->cInflightUrbs)); 2908 2909 2909 2910 if (RT_LIKELY(pUrbReq)) … … 2940 2941 LOCAL inline void vboxUSBSolarisDeQueueURB(vboxusb_urb_t *pUrb, int URBStatus) 2941 2942 { 2942 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisDeQueue pUrb=%p\n", pUrb));2943 LogFunc((DEVICE_NAME ":vboxUSBSolarisDeQueue pUrb=%p\n", pUrb)); 2943 2944 AssertPtrReturnVoid(pUrb); 2944 2945 … … 2963 2964 else 2964 2965 { 2965 Log Flow((DEVICE_NAME ":vboxUSBSolarisDeQueue State Gone.\n"));2966 Log((DEVICE_NAME ":vboxUSBSolarisDeQueue State Gone.\n")); 2966 2967 freemsg(pUrb->pMsg); 2967 2968 pUrb->pMsg = NULL; … … 3044 3045 LOCAL int vboxUSBSolarisCtrlXfer(vboxusb_state_t *pState, vboxusb_ep_t *pEp, vboxusb_urb_t *pUrb) 3045 3046 { 3046 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisCtrlXfer pState=%p pEp=%p pUrb=%p enmDir=%d cbData=%d\n", pState, pEp, pUrb, pUrb->enmDir, pUrb->cbDataR3));3047 LogFunc((DEVICE_NAME ":vboxUSBSolarisCtrlXfer pState=%p pEp=%p pUrb=%p enmDir=%d cbData=%d\n", pState, pEp, pUrb, pUrb->enmDir, pUrb->cbDataR3)); 3047 3048 3048 3049 AssertPtrReturn(pUrb->pMsg, VERR_INVALID_PARAMETER); … … 3092 3093 pReq->ctrl_client_private = (usb_opaque_t)pUrb; 3093 3094 3094 Log Flow((DEVICE_NAME ":vboxUSBSolarisCtrlXfer %.*Rhxd\n", VBOXUSB_CTRL_XFER_SIZE, pSetupData));3095 Log((DEVICE_NAME ":vboxUSBSolarisCtrlXfer %.*Rhxd\n", VBOXUSB_CTRL_XFER_SIZE, pSetupData)); 3095 3096 3096 3097 /* … … 3127 3128 LOCAL void vboxUSBSolarisCtrlXferCompleted(usb_pipe_handle_t pPipe, usb_ctrl_req_t *pReq) 3128 3129 { 3129 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisCtrlXferCompleted pPipe=%p pReq=%p\n", pPipe, pReq));3130 LogFunc((DEVICE_NAME ":vboxUSBSolarisCtrlXferCompleted pPipe=%p pReq=%p\n", pPipe, pReq)); 3130 3131 3131 3132 vboxusb_urb_t *pUrb = (vboxusb_urb_t *)pReq->ctrl_client_private; … … 3158 3159 && pUrb->pMsg->b_cont == NULL) /* Concat succeeded */ 3159 3160 { 3160 Log Flow((DEVICE_NAME ":vboxUSBSolarisCtrlXferCompleted prepended header rc=%d cbData=%d.\n", pReq->ctrl_completion_reason,3161 Log((DEVICE_NAME ":vboxUSBSolarisCtrlXferCompleted prepended header rc=%d cbData=%d.\n", pReq->ctrl_completion_reason, 3161 3162 MBLKL(pUrb->pMsg))); 3162 Log Flow((DEVICE_NAME ":%.*Rhxd\n", MBLKL(pUrb->pMsg), pUrb->pMsg->b_rptr));3163 Log((DEVICE_NAME ":%.*Rhxd\n", MBLKL(pUrb->pMsg), pUrb->pMsg->b_rptr)); 3163 3164 } 3164 3165 #endif … … 3193 3194 LOCAL int vboxUSBSolarisBulkXfer(vboxusb_state_t *pState, vboxusb_ep_t *pEp, vboxusb_urb_t *pUrb) 3194 3195 { 3195 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisBulkXfer pState=%p pEp=%p pUrb=%p enmDir=%d cbData=%d\n", pState, pEp, pUrb, pUrb->enmDir, pUrb->cbDataR3));3196 LogFunc((DEVICE_NAME ":vboxUSBSolarisBulkXfer pState=%p pEp=%p pUrb=%p enmDir=%d cbData=%d\n", pState, pEp, pUrb, pUrb->enmDir, pUrb->cbDataR3)); 3196 3197 3197 3198 /* … … 3258 3259 LOCAL void vboxUSBSolarisBulkXferCompleted(usb_pipe_handle_t pPipe, usb_bulk_req_t *pReq) 3259 3260 { 3260 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisBulkXferCompleted pPipe=%p pReq=%p\n", pPipe, pReq));3261 LogFunc((DEVICE_NAME ":vboxUSBSolarisBulkXferCompleted pPipe=%p pReq=%p\n", pPipe, pReq)); 3261 3262 3262 3263 vboxusb_ep_t *pEp = (vboxusb_ep_t *)usb_pipe_get_private(pPipe); … … 3278 3279 } 3279 3280 3280 Log Flow((DEVICE_NAME ":vboxUSBSolarisBulkXferCompleted %s. rc=%d cbData=%d\n",3281 Log((DEVICE_NAME ":vboxUSBSolarisBulkXferCompleted %s. rc=%d cbData=%d\n", 3281 3282 pReq->bulk_completion_reason != USB_CR_OK ? "failed URB" : "success", 3282 3283 pReq->bulk_completion_reason, pUrb->pMsg ? MBLKL(pUrb->pMsg) : 0)); … … 3293 3294 } 3294 3295 else 3295 Log Flow((DEVICE_NAME ":vboxUSBSolarisBulkXferCompleted Pipe Gone.\n"));3296 Log((DEVICE_NAME ":vboxUSBSolarisBulkXferCompleted Pipe Gone.\n")); 3296 3297 3297 3298 usb_free_bulk_req(pReq); … … 3311 3312 LOCAL int vboxUSBSolarisIntrXfer(vboxusb_state_t *pState, vboxusb_ep_t *pEp, vboxusb_urb_t *pUrb) 3312 3313 { 3313 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisIntrXfer pState=%p pEp=%p pUrb=%p enmDir=%d cbData=%d\n", pState, pEp, pUrb, pUrb->enmDir, pUrb->cbDataR3));3314 LogFunc((DEVICE_NAME ":vboxUSBSolarisIntrXfer pState=%p pEp=%p pUrb=%p enmDir=%d cbData=%d\n", pState, pEp, pUrb, pUrb->enmDir, pUrb->cbDataR3)); 3314 3315 3315 3316 int rc = VINF_SUCCESS; … … 3371 3372 LOCAL void vboxUSBSolarisIntrXferCompleted(usb_pipe_handle_t pPipe, usb_intr_req_t *pReq) 3372 3373 { 3373 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisIntrXferCompleted pPipe=%p pReq=%p\n", pPipe, pReq));3374 LogFunc((DEVICE_NAME ":vboxUSBSolarisIntrXferCompleted pPipe=%p pReq=%p\n", pPipe, pReq)); 3374 3375 3375 3376 vboxusb_ep_t *pEp = (vboxusb_ep_t *)usb_pipe_get_private(pPipe); … … 3390 3391 } 3391 3392 3392 Log Flow((DEVICE_NAME ":vboxUSBSolarisIntrXferCompleted rc=%d pMsg=%p enmDir=%#x\n", pReq->intr_completion_reason, pUrb->pMsg,3393 Log((DEVICE_NAME ":vboxUSBSolarisIntrXferCompleted rc=%d pMsg=%p enmDir=%#x\n", pReq->intr_completion_reason, pUrb->pMsg, 3393 3394 pUrb->enmDir)); 3394 3395 … … 3404 3405 } 3405 3406 else 3406 Log Flow((DEVICE_NAME ":vboxUSBSolarisIntrXferCompleted Pipe Gone.\n"));3407 Log((DEVICE_NAME ":vboxUSBSolarisIntrXferCompleted Pipe Gone.\n")); 3407 3408 3408 3409 usb_free_intr_req(pReq); … … 3422 3423 LOCAL int vboxUSBSolarisIsocXfer(vboxusb_state_t *pState, vboxusb_ep_t *pEp, vboxusb_urb_t *pUrb) 3423 3424 { 3424 // LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisIsocXfer pState=%p pEp=%p pUrb=%p\n", pState, pEp, pUrb));3425 // LogFunc((DEVICE_NAME ":vboxUSBSolarisIsocXfer pState=%p pEp=%p pUrb=%p\n", pState, pEp, pUrb)); 3425 3426 3426 3427 /* … … 3431 3432 if (pUrb->enmDir == VUSBDIRECTION_IN) 3432 3433 { 3433 Log Flow((DEVICE_NAME ":vboxUSBSolarisIsocXfer Isoc. In queueing.\n"));3434 Log((DEVICE_NAME ":vboxUSBSolarisIsocXfer Isoc. In queueing.\n")); 3434 3435 3435 3436 mutex_enter(&pState->Mtx); … … 3442 3443 { 3443 3444 mutex_exit(&pState->Mtx); 3444 Log Flow((DEVICE_NAME ":vboxUSBSolarisIsocXfer Max Isoc. data %d bytes queued\n", pEp->cbMaxIsocData));3445 Log((DEVICE_NAME ":vboxUSBSolarisIsocXfer Max Isoc. data %d bytes queued\n", pEp->cbMaxIsocData)); 3445 3446 return VERR_TOO_MUCH_DATA; 3446 3447 } … … 3457 3458 int rc = VINF_SUCCESS; 3458 3459 usb_isoc_req_t *pReq = usb_alloc_isoc_req(pState->pDip, pUrb->cIsocPkts, cbData, USB_FLAGS_NOSLEEP); 3459 Log Flow((DEVICE_NAME ":vboxUSBSolarisIsocXfer enmDir=%#x cIsocPkts=%d aIsocPkts[0]=%d cbDataR3=%d\n", pUrb->enmDir,3460 Log((DEVICE_NAME ":vboxUSBSolarisIsocXfer enmDir=%#x cIsocPkts=%d aIsocPkts[0]=%d cbDataR3=%d\n", pUrb->enmDir, 3460 3461 pUrb->cIsocPkts, pUrb->aIsocPkts[0].cbPkt, pUrb->cbDataR3)); 3461 3462 if (RT_LIKELY(pReq)) … … 3549 3550 LOCAL void vboxUSBSolarisIsocInXferCompleted(usb_pipe_handle_t pPipe, usb_isoc_req_t *pReq) 3550 3551 { 3551 // LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisIsocInXferCompleted pPipe=%p pReq=%p\n", pPipe, pReq));3552 // LogFunc((DEVICE_NAME ":vboxUSBSolarisIsocInXferCompleted pPipe=%p pReq=%p\n", pPipe, pReq)); 3552 3553 3553 3554 vboxusb_state_t *pState = (vboxusb_state_t *)pReq->isoc_client_private; … … 3564 3565 if (pReq->isoc_error_count == pReq->isoc_pkts_count) 3565 3566 { 3566 Log Flow((DEVICE_NAME ":vboxUSBSolarisIsocInXferCompleted stopping polling! Too many errors.\n"));3567 Log((DEVICE_NAME ":vboxUSBSolarisIsocInXferCompleted stopping polling! Too many errors.\n")); 3567 3568 mutex_exit(&pState->Mtx); 3568 3569 usb_pipe_stop_isoc_polling(pPipe, USB_FLAGS_NOSLEEP); … … 3576 3577 if (RT_LIKELY(pReq->isoc_data)) 3577 3578 { 3578 Log Flow((DEVICE_NAME ":vboxUSBSolarisIsocInXferCompleted cIsocInUrbs=%d cbIsocInLandedReqs=%d\n", pEp->cIsocInUrbs, pEp->cbIsocInLandedReqs));3579 Log((DEVICE_NAME ":vboxUSBSolarisIsocInXferCompleted cIsocInUrbs=%d cbIsocInLandedReqs=%d\n", pEp->cIsocInUrbs, pEp->cbIsocInLandedReqs)); 3579 3580 3580 3581 mutex_enter(&pState->Mtx); … … 3641 3642 * Buffer incoming data if the guest has not yet queued any Input URBs. 3642 3643 */ 3643 Log Flow((DEVICE_NAME ":vboxUSBSolarisIsocInXferCompleted Buffering\n"));3644 Log((DEVICE_NAME ":vboxUSBSolarisIsocInXferCompleted Buffering\n")); 3644 3645 vboxusb_isoc_req_t *pIsocReq = kmem_alloc(sizeof(vboxusb_isoc_req_t), KM_NOSLEEP); 3645 3646 if (RT_LIKELY(pIsocReq)) … … 3723 3724 } 3724 3725 else 3725 Log Flow((DEVICE_NAME ":vboxUSBSolarisIsocInXferCompleted State Gone.\n"));3726 Log((DEVICE_NAME ":vboxUSBSolarisIsocInXferCompleted State Gone.\n")); 3726 3727 3727 3728 usb_free_isoc_req(pReq); … … 3738 3739 LOCAL void vboxUSBSolarisIsocInXferError(usb_pipe_handle_t pPipe, usb_isoc_req_t *pReq) 3739 3740 { 3740 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisIsocInXferError pPipe=%p pReq=%p\n", pPipe, pReq));3741 LogFunc((DEVICE_NAME ":vboxUSBSolarisIsocInXferError pPipe=%p pReq=%p\n", pPipe, pReq)); 3741 3742 3742 3743 vboxusb_state_t *pState = (vboxusb_state_t *)pReq->isoc_client_private; 3743 3744 if (RT_UNLIKELY(!pState)) 3744 3745 { 3745 Log Flow((DEVICE_NAME ":vboxUSBSolarisIsocInXferError State Gone.\n"));3746 Log((DEVICE_NAME ":vboxUSBSolarisIsocInXferError State Gone.\n")); 3746 3747 usb_free_isoc_req(pReq); 3747 3748 return; … … 3752 3753 if (RT_UNLIKELY(!pEp)) 3753 3754 { 3754 Log Flow((DEVICE_NAME ":vboxUSBSolarisIsocInXferError Pipe Gone.\n"));3755 Log((DEVICE_NAME ":vboxUSBSolarisIsocInXferError Pipe Gone.\n")); 3755 3756 mutex_exit(&pState->Mtx); 3756 3757 usb_free_isoc_req(pReq); … … 3768 3769 mutex_exit(&pState->Mtx); 3769 3770 usb_pipe_isoc_xfer(pPipe, pReq, USB_FLAGS_NOSLEEP); 3770 Log Flow((DEVICE_NAME ":vboxUSBSolarisIsocInXferError resubmitted Isoc. IN request due to immediately unavailable resources.\n"));3771 Log((DEVICE_NAME ":vboxUSBSolarisIsocInXferError resubmitted Isoc. IN request due to immediately unavailable resources.\n")); 3771 3772 3772 3773 return; … … 3784 3785 default: 3785 3786 { 3786 Log Flow((DEVICE_NAME ":vboxUSBSolarisIsocInXferError stopping Isoc. In. polling due to rc=%d\n", pReq->isoc_completion_reason));3787 Log((DEVICE_NAME ":vboxUSBSolarisIsocInXferError stopping Isoc. In. polling due to rc=%d\n", pReq->isoc_completion_reason)); 3787 3788 pEp->fIsocPolling = false; 3788 3789 mutex_exit(&pState->Mtx); … … 3801 3802 { 3802 3803 --pEp->cIsocInUrbs; 3803 Log Flow((DEVICE_NAME ":vboxUSBSolarisIsocInXferError Deleting last queued URB as it failed.\n"));3804 Log((DEVICE_NAME ":vboxUSBSolarisIsocInXferError Deleting last queued URB as it failed.\n")); 3804 3805 freemsg(pUrb->pMsg); 3805 3806 RTMemFree(pUrb); … … 3820 3821 LOCAL void vboxUSBSolarisIsocOutXferCompleted(usb_pipe_handle_t pPipe, usb_isoc_req_t *pReq) 3821 3822 { 3822 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisIsocOutXferCompleted pPipe=%p pReq=%p\n", pPipe, pReq));3823 LogFunc((DEVICE_NAME ":vboxUSBSolarisIsocOutXferCompleted pPipe=%p pReq=%p\n", pPipe, pReq)); 3823 3824 3824 3825 vboxusb_ep_t *pEp = (vboxusb_ep_t *)usb_pipe_get_private(pPipe); … … 3836 3837 } 3837 3838 3838 Log Flow((DEVICE_NAME ":vboxUSBSolarisIsocOutXferCompleted cIsocPkts=%d cbData=%d cbActPkt=%d\n", pUrb->cIsocPkts, pUrb->cbDataR3, cbActPkt));3839 Log((DEVICE_NAME ":vboxUSBSolarisIsocOutXferCompleted cIsocPkts=%d cbData=%d cbActPkt=%d\n", pUrb->cIsocPkts, pUrb->cbDataR3, cbActPkt)); 3839 3840 3840 3841 if (pReq->isoc_completion_reason == USB_CR_OK) … … 3859 3860 } 3860 3861 else 3861 Log Flow((DEVICE_NAME ":vboxUSBSolarisIsocOutXferCompleted missing private data!?! Dropping OUT pUrb.\n"));3862 Log((DEVICE_NAME ":vboxUSBSolarisIsocOutXferCompleted missing private data!?! Dropping OUT pUrb.\n")); 3862 3863 } 3863 3864 else 3864 Log Flow((DEVICE_NAME ":vboxUSBSolarisIsocOutXferCompleted Pipe Gone.\n"));3865 Log((DEVICE_NAME ":vboxUSBSolarisIsocOutXferCompleted Pipe Gone.\n")); 3865 3866 3866 3867 usb_free_isoc_req(pReq); … … 3877 3878 LOCAL int vboxUSBSolarisDeviceDisconnected(dev_info_t *pDip) 3878 3879 { 3879 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisDeviceDisconnected pDip=%p\n", pDip));3880 LogFunc((DEVICE_NAME ":vboxUSBSolarisDeviceDisconnected pDip=%p\n", pDip)); 3880 3881 3881 3882 int instance = ddi_get_instance(pDip); … … 3915 3916 LOCAL int vboxUSBSolarisDeviceReconnected(dev_info_t *pDip) 3916 3917 { 3917 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisDeviceReconnected pDip=%p\n", pDip));3918 LogFunc((DEVICE_NAME ":vboxUSBSolarisDeviceReconnected pDip=%p\n", pDip)); 3918 3919 3919 3920 int instance = ddi_get_instance(pDip); … … 3938 3939 LOCAL void vboxUSBSolarisDeviceRestore(vboxusb_state_t *pState) 3939 3940 { 3940 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisDeviceRestore pState=%p\n", pState));3941 LogFunc((DEVICE_NAME ":vboxUSBSolarisDeviceRestore pState=%p\n", pState)); 3941 3942 AssertPtrReturnVoid(pState); 3942 3943 … … 3965 3966 /* Do we need to inform userland here? */ 3966 3967 vboxUSBSolarisPowerIdle(pState); 3967 Log Flow((DEVICE_NAME ":vboxUSBSolarisDeviceRestore not the same device.\n"));3968 Log((DEVICE_NAME ":vboxUSBSolarisDeviceRestore not the same device.\n")); 3968 3969 return; 3969 3970 } … … 3996 3997 LOCAL int vboxUSBSolarisDeviceSuspend(vboxusb_state_t *pState) 3997 3998 { 3998 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisDeviceSuspend pState=%p\n", pState));3999 LogFunc((DEVICE_NAME ":vboxUSBSolarisDeviceSuspend pState=%p\n", pState)); 3999 4000 4000 4001 int rc = VERR_VUSB_DEVICE_IS_SUSPENDED; … … 4061 4062 4062 4063 mutex_exit(&pState->Mtx); 4063 Log Flow((DEVICE_NAME ":vboxUSBSolarisDeviceSuspend returns %d\n", rc));4064 Log((DEVICE_NAME ":vboxUSBSolarisDeviceSuspend returns %d\n", rc)); 4064 4065 return rc; 4065 4066 } … … 4073 4074 LOCAL void vboxUSBSolarisDeviceResume(vboxusb_state_t *pState) 4074 4075 { 4075 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisDeviceResume pState=%p\n", pState));4076 LogFunc((DEVICE_NAME ":vboxUSBSolarisDeviceResume pState=%p\n", pState)); 4076 4077 return vboxUSBSolarisDeviceRestore(pState); 4077 4078 } … … 4085 4086 LOCAL void vboxUSBSolarisPowerBusy(vboxusb_state_t *pState) 4086 4087 { 4087 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisPowerBusy pState=%p\n", pState));4088 LogFunc((DEVICE_NAME ":vboxUSBSolarisPowerBusy pState=%p\n", pState)); 4088 4089 AssertPtrReturnVoid(pState); 4089 4090 … … 4097 4098 if (rc != DDI_SUCCESS) 4098 4099 { 4099 Log Flow((DEVICE_NAME ":vboxUSBSolarisPowerBusy busy component failed! rc=%d\n", rc));4100 Log((DEVICE_NAME ":vboxUSBSolarisPowerBusy busy component failed! rc=%d\n", rc)); 4100 4101 mutex_enter(&pState->Mtx); 4101 4102 pState->pPower->PowerBusy--; … … 4115 4116 LOCAL void vboxUSBSolarisPowerIdle(vboxusb_state_t *pState) 4116 4117 { 4117 LogF lowFunc((DEVICE_NAME ":vboxUSBSolarisPowerIdle pState=%p\n", pState));4118 LogFunc((DEVICE_NAME ":vboxUSBSolarisPowerIdle pState=%p\n", pState)); 4118 4119 AssertPtrReturnVoid(pState); 4119 4120 … … 4129 4130 } 4130 4131 else 4131 Log Flow((DEVICE_NAME ":vboxUSBSolarisPowerIdle idle component failed! rc=%d\n", rc));4132 } 4133 } 4134 4132 Log((DEVICE_NAME ":vboxUSBSolarisPowerIdle idle component failed! rc=%d\n", rc)); 4133 } 4134 } 4135 -
trunk/src/VBox/HostDrivers/VBoxUSB/solaris/VBoxUSBMon-solaris.c
r38736 r38895 21 21 #define LOG_GROUP LOG_GROUP_USB_DRV 22 22 #ifdef DEBUG_ramshankar 23 # define LOG_ENABLED 23 24 # define LOG_INSTANCE RTLogRelDefaultInstance() 24 25 #endif … … 193 194 int rc; 194 195 195 LogF lowFunc((DEVICE_NAME ":_init\n"));196 LogFunc((DEVICE_NAME ":_init\n")); 196 197 197 198 g_pDip = NULL; … … 249 250 int rc; 250 251 251 LogF lowFunc((DEVICE_NAME ":_fini\n"));252 LogFunc((DEVICE_NAME ":_fini\n")); 252 253 253 254 rc = mod_remove(&g_VBoxUSBMonSolarisModLinkage); … … 266 267 int _info(struct modinfo *pModInfo) 267 268 { 268 LogF lowFunc((DEVICE_NAME ":_info\n"));269 LogFunc((DEVICE_NAME ":_info\n")); 269 270 270 271 return mod_info(&g_VBoxUSBMonSolarisModLinkage, pModInfo); … … 282 283 static int VBoxUSBMonSolarisAttach(dev_info_t *pDip, ddi_attach_cmd_t enmCmd) 283 284 { 284 LogF lowFunc((DEVICE_NAME ":VBoxUSBMonSolarisAttach pDip=%p enmCmd=%d\n", pDip, enmCmd));285 LogFunc((DEVICE_NAME ":VBoxUSBMonSolarisAttach pDip=%p enmCmd=%d\n", pDip, enmCmd)); 285 286 switch (enmCmd) 286 287 { … … 329 330 static int VBoxUSBMonSolarisDetach(dev_info_t *pDip, ddi_detach_cmd_t enmCmd) 330 331 { 331 LogF lowFunc((DEVICE_NAME ":VBoxUSBMonSolarisDetach\n"));332 LogFunc((DEVICE_NAME ":VBoxUSBMonSolarisDetach\n")); 332 333 333 334 switch (enmCmd) … … 379 380 int rc = DDI_SUCCESS; 380 381 381 LogF lowFunc((DEVICE_NAME ":VBoxUSBMonSolarisGetInfo\n"));382 LogFunc((DEVICE_NAME ":VBoxUSBMonSolarisGetInfo\n")); 382 383 383 384 switch (enmCmd) … … 404 405 unsigned iOpenInstance; 405 406 406 LogF lowFunc((DEVICE_NAME ":VBoxUSBMonSolarisOpen\n"));407 LogFunc((DEVICE_NAME ":VBoxUSBMonSolarisOpen\n")); 407 408 408 409 /* … … 431 432 return EINVAL; 432 433 } 433 Log Flow((DEVICE_NAME ":Successfully registered election callback with USBA\n"));434 Log((DEVICE_NAME ":Successfully registered election callback with USBA\n")); 434 435 mutex_enter(&g_VBoxUSBMonSolarisMtx); 435 436 } … … 469 470 vboxusbmon_state_t *pState = NULL; 470 471 471 LogF lowFunc((DEVICE_NAME ":VBoxUSBMonSolarisClose\n"));472 LogFunc((DEVICE_NAME ":VBoxUSBMonSolarisClose\n")); 472 473 473 474 pState = ddi_get_soft_state(g_pVBoxUSBMonSolarisState, getminor(Dev)); … … 486 487 mutex_exit(&g_VBoxUSBMonSolarisMtx); 487 488 usb_unregister_dev_driver(g_pDip); 488 Log Flow((DEVICE_NAME ":Successfully deregistered driver election callback\n"));489 Log((DEVICE_NAME ":Successfully deregistered driver election callback\n")); 489 490 } 490 491 else … … 515 516 static int VBoxUSBMonSolarisRead(dev_t Dev, struct uio *pUio, cred_t *pCred) 516 517 { 517 LogF lowFunc((DEVICE_NAME ":VBoxUSBMonSolarisRead\n"));518 LogFunc((DEVICE_NAME ":VBoxUSBMonSolarisRead\n")); 518 519 return 0; 519 520 } … … 522 523 static int VBoxUSBMonSolarisWrite(dev_t Dev, struct uio *pUio, cred_t *pCred) 523 524 { 524 LogF lowFunc((DEVICE_NAME ":VBoxUSBMonSolarisWrite\n"));525 LogFunc((DEVICE_NAME ":VBoxUSBMonSolarisWrite\n")); 525 526 return 0; 526 527 } … … 537 538 static int VBoxUSBMonSolarisIOCtl(dev_t Dev, int Cmd, intptr_t pArg, int Mode, cred_t *pCred, int *pVal) 538 539 { 539 LogF lowFunc((DEVICE_NAME ":VBoxUSBMonSolarisIOCtl Dev=%d Cmd=%d pArg=%p Mode=%d\n", Dev, Cmd, pArg));540 LogFunc((DEVICE_NAME ":VBoxUSBMonSolarisIOCtl Dev=%d Cmd=%d pArg=%p Mode=%d\n", Dev, Cmd, pArg)); 540 541 541 542 /* … … 603 604 return EINVAL; 604 605 } 605 Log Flow((DEVICE_NAME ":VBoxUSBMonSolarisIOCtl: pid=%d.\n", (int)RTProcSelf()));606 Log((DEVICE_NAME ":VBoxUSBMonSolarisIOCtl: pid=%d.\n", (int)RTProcSelf())); 606 607 607 608 /* … … 665 666 static int vboxUSBMonSolarisProcessIOCtl(int iFunction, void *pvState, void *pvData, size_t cbData, size_t *pcbReturnedData) 666 667 { 667 LogF lowFunc((DEVICE_NAME ":solarisUSBProcessIOCtl iFunction=%d pvBuf=%p cbBuf=%zu\n", iFunction, pvData, cbData));668 LogFunc((DEVICE_NAME ":solarisUSBProcessIOCtl iFunction=%d pvBuf=%p cbBuf=%zu\n", iFunction, pvData, cbData)); 668 669 669 670 AssertPtrReturn(pvState, VERR_INVALID_POINTER); … … 695 696 PUSBFILTER pFilter = (PUSBFILTER)&pReq->Filter; 696 697 697 Log Flow(("vboxUSBMonSolarisProcessIOCtl: idVendor=%#x idProduct=%#x bcdDevice=%#x bDeviceClass=%#x bDeviceSubClass=%#x bDeviceProtocol=%#x bBus=%#x bPort=%#x\n",698 Log(("vboxUSBMonSolarisProcessIOCtl: idVendor=%#x idProduct=%#x bcdDevice=%#x bDeviceClass=%#x bDeviceSubClass=%#x bDeviceProtocol=%#x bBus=%#x bPort=%#x\n", 698 699 USBFilterGetNum(pFilter, USBFILTERIDX_VENDOR_ID), 699 700 USBFilterGetNum(pFilter, USBFILTERIDX_PRODUCT_ID), … … 704 705 USBFilterGetNum(pFilter, USBFILTERIDX_BUS), 705 706 USBFilterGetNum(pFilter, USBFILTERIDX_PORT))); 706 Log Flow(("vboxUSBMonSolarisProcessIOCtl: Manufacturer=%s Product=%s Serial=%s\n",707 Log(("vboxUSBMonSolarisProcessIOCtl: Manufacturer=%s Product=%s Serial=%s\n", 707 708 USBFilterGetString(pFilter, USBFILTERIDX_MANUFACTURER_STR) ? USBFilterGetString(pFilter, USBFILTERIDX_MANUFACTURER_STR) : "<null>", 708 709 USBFilterGetString(pFilter, USBFILTERIDX_PRODUCT_STR) ? USBFilterGetString(pFilter, USBFILTERIDX_PRODUCT_STR) : "<null>", … … 713 714 rc = VBoxUSBFilterAdd(pFilter, pState->Process, &pReq->uId); 714 715 *pcbReturnedData = cbData; 715 Log Flow((DEVICE_NAME ":vboxUSBMonSolarisProcessIOCtl: ADD_FILTER (Process:%d) returned %d\n", pState->Process, rc));716 Log((DEVICE_NAME ":vboxUSBMonSolarisProcessIOCtl: ADD_FILTER (Process:%d) returned %d\n", pState->Process, rc)); 716 717 break; 717 718 } … … 724 725 rc = VBoxUSBFilterRemove(pState->Process, (uintptr_t)pReq->uId); 725 726 *pcbReturnedData = 0; 726 Log Flow((DEVICE_NAME ":vboxUSBMonSolarisProcessIOCtl: REMOVE_FILTER (Process:%d) returned %d\n", pState->Process, rc));727 Log((DEVICE_NAME ":vboxUSBMonSolarisProcessIOCtl: REMOVE_FILTER (Process:%d) returned %d\n", pState->Process, rc)); 727 728 break; 728 729 } … … 735 736 rc = vboxUSBMonSolarisResetDevice(pReq->szDevicePath, pReq->fReattach); 736 737 *pcbReturnedData = 0; 737 Log Flow((DEVICE_NAME ":vboxUSBMonSolarisProcessIOCtl: RESET_DEVICE (Process:%d) returned %d\n", pState->Process, rc));738 Log((DEVICE_NAME ":vboxUSBMonSolarisProcessIOCtl: RESET_DEVICE (Process:%d) returned %d\n", pState->Process, rc)); 738 739 break; 739 740 } … … 746 747 rc = vboxUSBMonSolarisClientInfo(pState, pReq); 747 748 *pcbReturnedData = cbData; 748 Log Flow((DEVICE_NAME ":vboxUSBMonSolarisProcessIOCtl: CLIENT_INFO (Process:%d) returned %d\n", pState->Process, rc));749 Log((DEVICE_NAME ":vboxUSBMonSolarisProcessIOCtl: CLIENT_INFO (Process:%d) returned %d\n", pState->Process, rc)); 749 750 break; 750 751 } … … 759 760 *pcbReturnedData = sizeof(VBOXUSBREQ_GET_VERSION); 760 761 rc = VINF_SUCCESS; 761 Log Flow((DEVICE_NAME ":vboxUSBMonSolarisProcessIOCtl: GET_VERSION returned %d\n", rc));762 Log((DEVICE_NAME ":vboxUSBMonSolarisProcessIOCtl: GET_VERSION returned %d\n", rc)); 762 763 break; 763 764 } … … 778 779 int rc = VERR_GENERAL_FAILURE; 779 780 780 LogF lowFunc((DEVICE_NAME ":vboxUSBMonSolarisResetDevice pszDevicePath=%s fReattach=%d\n", pszDevicePath, fReattach));781 LogFunc((DEVICE_NAME ":vboxUSBMonSolarisResetDevice pszDevicePath=%s fReattach=%d\n", pszDevicePath, fReattach)); 781 782 782 783 /* … … 811 812 */ 812 813 rc = usb_reset_device(pDeviceInfo, fReattach ? USB_RESET_LVL_REATTACH : USB_RESET_LVL_DEFAULT); 813 Log Flow((DEVICE_NAME ":usb_reset_device for %s level=%s returned %d\n", pszDevicePath, fReattach ? "ReAttach" : "Default", rc));814 Log((DEVICE_NAME ":usb_reset_device for %s level=%s returned %d\n", pszDevicePath, fReattach ? "ReAttach" : "Default", rc)); 814 815 switch (rc) 815 816 { … … 846 847 static int vboxUSBMonSolarisClientInfo(vboxusbmon_state_t *pState, PVBOXUSB_CLIENT_INFO pClientInfo) 847 848 { 848 LogF lowFunc((DEVICE_NAME ":vboxUSBMonSolarisClientInfo pState=%p pClientInfo=%p\n", pState, pClientInfo));849 LogFunc((DEVICE_NAME ":vboxUSBMonSolarisClientInfo pState=%p pClientInfo=%p\n", pState, pClientInfo)); 849 850 850 851 AssertPtrReturn(pState, VERR_INVALID_POINTER); … … 876 877 mutex_exit(&g_VBoxUSBMonSolarisMtx); 877 878 878 Log Flow((DEVICE_NAME ":vboxUSBMonSolarisClientInfo found. %s rc=%d\n", pClientInfo->szDeviceIdent, rc));879 Log((DEVICE_NAME ":vboxUSBMonSolarisClientInfo found. %s rc=%d\n", pClientInfo->szDeviceIdent, rc)); 879 880 return rc; 880 881 } … … 899 900 int VBoxUSBMonSolarisRegisterClient(dev_info_t *pClientDip, PVBOXUSB_CLIENT_INFO pClientInfo) 900 901 { 901 LogF lowFunc((DEVICE_NAME ":VBoxUSBMonSolarisRegisterClient pClientDip=%p pClientInfo=%p\n", pClientDip, pClientInfo));902 LogFunc((DEVICE_NAME ":VBoxUSBMonSolarisRegisterClient pClientDip=%p pClientInfo=%p\n", pClientDip, pClientInfo)); 902 903 AssertPtrReturn(pClientInfo, VERR_INVALID_PARAMETER); 903 904 … … 918 919 mutex_exit(&g_VBoxUSBMonSolarisMtx); 919 920 920 Log Flow((DEVICE_NAME ":VBoxUSBMonSolarisRegisterClient registered. %d %s %s\n",921 Log((DEVICE_NAME ":VBoxUSBMonSolarisRegisterClient registered. %d %s %s\n", 921 922 pClient->Info.Instance, pClient->Info.szClientPath, pClient->Info.szDeviceIdent)); 922 923 … … 940 941 int VBoxUSBMonSolarisUnregisterClient(dev_info_t *pClientDip) 941 942 { 942 LogF lowFunc((DEVICE_NAME ":VBoxUSBMonSolarisUnregisterClient pClientDip=%p\n", pClientDip));943 LogFunc((DEVICE_NAME ":VBoxUSBMonSolarisUnregisterClient pClientDip=%p\n", pClientDip)); 943 944 AssertReturn(pClientDip, VERR_INVALID_PARAMETER); 944 945 … … 960 961 mutex_exit(&g_VBoxUSBMonSolarisMtx); 961 962 962 Log Flow((DEVICE_NAME ":VBoxUSBMonSolarisUnregisterClient unregistered. %d %s %s\n",963 Log((DEVICE_NAME ":VBoxUSBMonSolarisUnregisterClient unregistered. %d %s %s\n", 963 964 pCur->Info.Instance, pCur->Info.szClientPath, pCur->Info.szDeviceIdent)); 964 965 RTMemFree(pCur); … … 995 996 char **ppszDrv, void *pvReserved) 996 997 { 997 LogF lowFunc((DEVICE_NAME ":VBoxUSBMonSolarisElectDriver pDevDesc=%p pDevStrings=%p pszDevicePath=%s Bus=%d Port=%d\n", pDevDesc,998 LogFunc((DEVICE_NAME ":VBoxUSBMonSolarisElectDriver pDevDesc=%p pDevStrings=%p pszDevicePath=%s Bus=%d Port=%d\n", pDevDesc, 998 999 pDevStrings, pszDevicePath, Bus, Port)); 999 1000 … … 1021 1022 USBFilterSetMustBePresent(&Filter, USBFILTERIDX_BUS, false /* fMustBePresent */); 1022 1023 1023 Log Flow((DEVICE_NAME ":VBoxUSBMonSolarisElectDriver: idVendor=%#x idProduct=%#x bcdDevice=%#x bDeviceClass=%#x bDeviceSubClass=%#x bDeviceProtocol=%#x bBus=%#x bPort=%#x\n",1024 Log((DEVICE_NAME ":VBoxUSBMonSolarisElectDriver: idVendor=%#x idProduct=%#x bcdDevice=%#x bDeviceClass=%#x bDeviceSubClass=%#x bDeviceProtocol=%#x bBus=%#x bPort=%#x\n", 1024 1025 USBFilterGetNum(&Filter, USBFILTERIDX_VENDOR_ID), 1025 1026 USBFilterGetNum(&Filter, USBFILTERIDX_PRODUCT_ID), … … 1030 1031 USBFilterGetNum(&Filter, USBFILTERIDX_BUS), 1031 1032 USBFilterGetNum(&Filter, USBFILTERIDX_PORT))); 1032 Log Flow((DEVICE_NAME ":VBoxUSBMonSolarisElectDriver: Manufacturer=%s Product=%s Serial=%s\n",1033 Log((DEVICE_NAME ":VBoxUSBMonSolarisElectDriver: Manufacturer=%s Product=%s Serial=%s\n", 1033 1034 USBFilterGetString(&Filter, USBFILTERIDX_MANUFACTURER_STR) ? USBFilterGetString(&Filter, USBFILTERIDX_MANUFACTURER_STR) : "<null>", 1034 1035 USBFilterGetString(&Filter, USBFILTERIDX_PRODUCT_STR) ? USBFilterGetString(&Filter, USBFILTERIDX_PRODUCT_STR) : "<null>", … … 1043 1044 if (Owner == NIL_RTPROCESS) 1044 1045 { 1045 Log Flow((DEVICE_NAME ":No matching filters, device %#x:%#x uninteresting.\n", pDevDesc->idVendor, pDevDesc->idProduct));1046 Log((DEVICE_NAME ":No matching filters, device %#x:%#x uninteresting.\n", pDevDesc->idVendor, pDevDesc->idProduct)); 1046 1047 return USB_FAILURE; 1047 1048 }
Note:
See TracChangeset
for help on using the changeset viewer.