Lines Matching refs:session
136 interfacePool->session = NULL;
192 struct UsbSession *session = NULL;
195 if (interfacePool == NULL || interfacePool->session == NULL) {
200 session = interfacePool->session;
201 if (DListIsEmpty(&session->ifacePoolList)) {
207 interfacePoolPos, interfacePoolTemp, &session->ifacePoolList, struct UsbInterfacePool, object.entry) {
380 const struct UsbSession *session, struct UsbPoolQueryPara queryPara, bool refCountFlag)
387 if (session == NULL) {
388 HDF_LOGE("%{public}s:%{public}d session is null", __func__, __LINE__);
392 OsalMutexLock((struct OsalMutex *)&session->lock);
393 ifacePoolList = (struct DListHead *)&session->ifacePoolList;
395 OsalMutexUnlock((struct OsalMutex *)&session->lock);
402 OsalMutexUnlock((struct OsalMutex *)&session->lock);
419 OsalMutexUnlock((struct OsalMutex *)&session->lock);
750 static int32_t IfDestoryDevice(const struct UsbSession *session, const struct UsbInterfacePool *interfacePool,
755 if (session == NULL || interfacePool == NULL || devHandle == NULL) {
760 OsalMutexLock((struct OsalMutex *)&session->lock);
766 OsalMutexUnlock((struct OsalMutex *)&session->lock);
773 OsalMutexUnlock((struct OsalMutex *)&session->lock);
776 OsalMutexUnlock((struct OsalMutex *)&session->lock);
936 const struct UsbSession *session, uint8_t busNum, uint8_t devAddr, struct UsbInterfacePool **interfacePool)
963 OsalMutexLock((struct OsalMutex *)&session->lock);
964 DListInsertTail(&interfacePoolTemp->object.entry, (struct DListHead *)&session->ifacePoolList);
965 OsalMutexUnlock((struct OsalMutex *)&session->lock);
972 int32_t UsbInitHostSdk(struct UsbSession **session)
974 return RawInit(session);
977 int32_t UsbExitHostSdk(const struct UsbSession *session)
979 return RawExit(session);
989 int32_t UsbGetDeviceMemMapFd(const struct UsbSession *session, uint8_t busNum, uint8_t usbAddr)
992 struct UsbSession *realSession = RawGetSession(session);
1013 const struct UsbSession *session, uint8_t busNum, uint8_t usbAddr, uint8_t interfaceIndex, bool force)
1020 struct UsbSession *realSession = RawGetSession(session);
1062 interfaceObj->session = realSession;
1071 const struct UsbSession *session, uint8_t busNum, uint8_t usbAddr, uint8_t interfaceIndex, bool disable)
1078 struct UsbSession *realSession = RawGetSession(session);
1117 interfaceObj->session = realSession;
1126 const struct UsbSession *session, uint8_t busNum, uint8_t usbAddr, uint8_t interfaceIndex)
1128 struct UsbInterface *interfaceObj = ClaimInterface(session, busNum, usbAddr, interfaceIndex, false);
1146 const struct UsbSession *session, uint8_t busNum, uint8_t usbAddr, uint8_t interfaceIndex)
1148 return ClaimInterface(session, busNum, usbAddr, interfaceIndex, true);
1164 if (interfaceSdk == NULL || interfaceSdk->session == NULL) {
1172 struct UsbInterfacePool *interfacePool = IfFindInterfacePool(interfaceSdk->session, queryPara, false);
1173 if (interfacePool == NULL || interfacePool->session == NULL) {
1193 return IfDestoryDevice(interfacePool->session, interfacePool, devHandle, true);
1196 int32_t UsbAddOrRemoveInterface(const struct UsbSession *session, uint8_t busNum, uint8_t usbAddr,
1206 struct UsbSession *realSession = RawGetSession(session);
1263 if (interfaceSdk->session == NULL || interfaceSdk->status == USB_INTERFACE_STATUS_REMOVE) {
1272 struct UsbInterfacePool *interfacePool = IfFindInterfacePool(interfaceSdk->session, poolQueryPara, false);
1316 if (interfaceSdk->session == NULL || interfaceSdk->status == USB_INTERFACE_STATUS_REMOVE) {
1325 struct UsbInterfacePool *interfacePool = IfFindInterfacePool(interfaceSdk->session, poolQueryPara, false);
1515 interfaceTemp->session = interfacePool->session;
1963 const struct UsbSession *session, uint8_t busNum, uint8_t usbAddr, uint8_t interfaceIndex)
1970 struct UsbSession *realSession = RawGetSession(session);