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
|
||||
Endpoint *listhead;
|
||||
switch (p->Type()) {
|
||||
case USB_OBJECT_CONTROL_PIPE:
|
||||
if (p->Type() & USB_OBJECT_CONTROL_PIPE)
|
||||
listhead = fDummyControl;
|
||||
break;
|
||||
case USB_OBJECT_BULK_PIPE:
|
||||
else if (p->Type() & USB_OBJECT_BULK_PIPE)
|
||||
listhead = fDummyBulk;
|
||||
break;
|
||||
case USB_OBJECT_ISO_PIPE:
|
||||
else if (p->Type() & USB_OBJECT_ISO_PIPE)
|
||||
listhead = fDummyIsochronous;
|
||||
break;
|
||||
default:
|
||||
else {
|
||||
FreeEndpoint(endpoint);
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
//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
|
||||
endpoint->SetNext(listhead->next);
|
||||
listhead->SetNext(endpoint);
|
||||
|
||||
Reference in New Issue
Block a user