From: Bernhard Urban Date: Wed, 23 Sep 2009 04:04:48 +0000 (+0200) Subject: wtf, for some devices {s,g}et_configuration works: X-Git-Tag: demo0~9 X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=ppcskel.git;a=commitdiff_plain;h=68091cca4f474d6385f0cb3387c8d731b0f308f5 wtf, for some devices {s,g}et_configuration works: o internal usb bluetooth dongle o "Driving Force Pro" from Logitech o USB RF Remote Receiver do not work: o Compaq USB Keyboard o Gameport to USB adaptor o Logitech USB mouse o 2 various USB sticks o Hercules DJ Control MP3 o Hauppauge Nova-T DVB-T stick a Microsoft Sidewinder Wheel also don't work, but the Endpoint will halt and output this: >>>>>>>> usb_set_configuration(ret: 0): 1 halted! n: 0x800D6890 n(after) hexdump (32) @ 0x800D6890: 00000000 00 00 ec 03 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ **************** dbg_td_flag: 0x03EC0000 *************** CC: 0 should be 0, see page 32 (ohci spec) EC: 0 see page 20 (ohci spec) T: 3 DI: 7 DP: 1 R: 1 ******************************************************** prev: 0x800D6860 prev(after) hexdump (32) @ 0x800D6860: 00000000 00 00 f4 40 30 6e 01 00 20 68 0d 00 33 6e 01 00 ...@0n.. h..3n.. 00000010 80 01 6e 30 00 00 00 04 00 00 00 00 00 00 00 00 ..n0............ prev->bufaddr(after) hexdump (4) @ 0x80016E30: 00000000 80 08 00 00 .... **************** dbg_td_flag: 0x40F40000 *************** CC: 4 should be 0, see page 32 (ohci spec) EC: 0 see page 20 (ohci spec) T: 0 DI: 7 DP: 2 R: 1 ******************************************************** halted end! ============= after usb_get_configuration: 00000000 80 . ============= usb_get_configuration: 128 <<<<<<<< where CC=4 means "DataOverrun". However, I don't think this information is useful :/ --- diff --git a/main.c b/main.c index e9dc207..e2a51e9 100644 --- a/main.c +++ b/main.c @@ -88,7 +88,10 @@ int main(void) irq_initialize(); irq_bw_enable(BW_PI_IRQ_RESET); irq_bw_enable(BW_PI_IRQ_HW); //hollywood pic + /* external ohci */ irq_hw_enable(IRQ_OHCI0); + /* internal ohci */ + //irq_hw_enable(IRQ_OHCI1); ipc_initialize(); ipc_slowping(); @@ -114,8 +117,10 @@ int main(void) ; // better ideas welcome! } + /* external ohci */ usb_init(OHCI0_REG_BASE); - usb_init(OHCI1_REG_BASE); + /* internal ohci */ + //usb_init(OHCI1_REG_BASE); /* print_str_noscroll(112, 112, "ohai, world!\n"); diff --git a/usb/core/core.c b/usb/core/core.c index 34a8537..be99b29 100644 --- a/usb/core/core.c +++ b/usb/core/core.c @@ -112,7 +112,7 @@ struct usb_device *usb_add_device(u8 lowspeed, u32 reg) return (void*) -1; } -//#define WTF +#define WTF #ifdef WTF printf("lololololool PADDING WTF :O lolololololo \n"); printf("lololololool PADDING WTF :O lolololololo \n"); @@ -160,12 +160,10 @@ struct usb_device *usb_add_device(u8 lowspeed, u32 reg) /* print device info */ lsusb(dev); -#if 0 /* select configuration */ ret = usb_set_configuration(dev, dev->conf->bConfigurationValue); - printf("=============\nusb_set_configuration(ret: %d) %d\n", ret, dev->conf->bConfigurationValue); + printf("=============\nusb_set_configuration(ret: %d): %d\n", ret, dev->conf->bConfigurationValue); printf("=============\nusb_get_configuration: %d\n", usb_get_configuration(dev)); -#endif #if 0 u8 buf[8];