X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=ppcskel.git;a=blobdiff_plain;f=usb%2Fhost%2Fohci.c;h=db83e0f90e5f55609e9ae7edc82f147626c81d5a;hp=f18785ce5d4ced424db6d6ddc2f859ba327de487;hb=f508d39c0a2c145a5a9e0ee8aab63b7b5bcd61c7;hpb=a160aa2f4d9d2df95e051e49de2a0235efa62c3b diff --git a/usb/host/ohci.c b/usb/host/ohci.c index f18785c..db83e0f 100644 --- a/usb/host/ohci.c +++ b/usb/host/ohci.c @@ -314,8 +314,12 @@ u8 hcdi_enqueue(const struct usb_transfer_descriptor *td) { memset(edhead, 0, sizeof(struct endpoint_descriptor)); edhead->flags = LE(OHCI_ENDPOINT_GENERAL_FORMAT); edhead->headp = edhead->tailp = edhead->nexted = LE(0); - edhead->flags |= LE(OHCI_ENDPOINT_LOW_SPEED | - OHCI_ENDPOINT_SET_DEVICE_ADDRESS(td->devaddress) | + if(td->fullspeed) { + edhead->flags |= LE(OHCI_ENDPOINT_FULL_SPEED); + } else { + edhead->flags |= LE(OHCI_ENDPOINT_LOW_SPEED); + } + edhead->flags |= LE(OHCI_ENDPOINT_SET_DEVICE_ADDRESS(td->devaddress) | OHCI_ENDPOINT_SET_ENDPOINT_NUMBER(td->endpoint) | OHCI_ENDPOINT_SET_MAX_PACKET_SIZE(td->maxp)); edhead->tdcount = 0; @@ -479,7 +483,8 @@ static void setup_port(u32 reg, u8 from_init) printf("loop done\n"); #endif - (void) usb_add_device(); + /* returns usb_device struct */ + (void) usb_add_device((read32(reg) & RH_PS_LSDA) >> 8); } }