Fixed wrong usage of object types in OHCI. The types are bitmasks, not values.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19900 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -617,23 +617,19 @@ OHCI::InsertEndpointForPipe(Pipe *p)
|
|||||||
|
|
||||||
//Check which list we need to add the endpoint in
|
//Check which list we need to add the endpoint in
|
||||||
Endpoint *listhead;
|
Endpoint *listhead;
|
||||||
switch (p->Type()) {
|
if (p->Type() & USB_OBJECT_CONTROL_PIPE)
|
||||||
case USB_OBJECT_CONTROL_PIPE:
|
|
||||||
listhead = fDummyControl;
|
listhead = fDummyControl;
|
||||||
break;
|
else if (p->Type() & USB_OBJECT_BULK_PIPE)
|
||||||
case USB_OBJECT_BULK_PIPE:
|
|
||||||
listhead = fDummyBulk;
|
listhead = fDummyBulk;
|
||||||
break;
|
else if (p->Type() & USB_OBJECT_ISO_PIPE)
|
||||||
case USB_OBJECT_ISO_PIPE:
|
|
||||||
listhead = fDummyIsochronous;
|
listhead = fDummyIsochronous;
|
||||||
break;
|
else {
|
||||||
default:
|
|
||||||
FreeEndpoint(endpoint);
|
FreeEndpoint(endpoint);
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Add the endpoint to the queues
|
//Add the endpoint to the queues
|
||||||
if (p->Type() != USB_OBJECT_ISO_PIPE) {
|
if ((p->Type() & USB_OBJECT_ISO_PIPE) == 0) {
|
||||||
//Link the endpoint into the head of the list
|
//Link the endpoint into the head of the list
|
||||||
endpoint->SetNext(listhead->next);
|
endpoint->SetNext(listhead->next);
|
||||||
listhead->SetNext(endpoint);
|
listhead->SetNext(endpoint);
|
||||||
|
|||||||
Reference in New Issue
Block a user