Port-evbmips archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: USB problem with ADM5120 (Edimax BR6104KP)



Hi,
I have Buffalo BBR-4MG router, and it use ADM5120P SoC.
I made the patch for AHCI driver *today*.  :-)
This works on my BBR-4MG, so please try it.

Please note: This patch may not correct logically. Just quick-hacks.
-----------
Index: arch/mips/adm5120/dev/ahci.c
===================================================================
RCS file: /mnt/opt/cvsync/NetBSD.cvs/src/sys/arch/mips/adm5120/dev/ahci.c,v
retrieving revision 1.1
diff -u -r1.1 ahci.c
--- arch/mips/adm5120/dev/ahci.c        20 Mar 2007 08:52:01 -0000      1.1
+++ arch/mips/adm5120/dev/ahci.c        1 Jan 2008 02:18:30 -0000
@@ -1102,7 +1102,18 @@
        printf("speed: %x\n",pipe->device->speed);
        printf("req: %p\n",req);
        printf("dmabuf: %p\n",xfer->dmabuf.block); */
-
+#if 1
+       /* XXX Force enabling port 0 if plugged */
+       if ((REG_READ(ADMHCD_REG_PORTSTATUS0) & (ADMHCD_CCS | ADMHCD_PES))
+           == ADMHCD_CCS) {
+               REG_WRITE(ADMHCD_REG_PORTSTATUS0, ADMHCD_PES);
+       }
+       /* XXX Force enabling port 1 if plugged */
+       if ((REG_READ(ADMHCD_REG_PORTSTATUS1) & (ADMHCD_CCS | ADMHCD_PES))
+           == ADMHCD_CCS) {
+               REG_WRITE(ADMHCD_REG_PORTSTATUS1, ADMHCD_PES);
+       }
+#endif
        isread = req->bmRequestType & UT_READ;
        len = UGETW(req->wLength);

-----------
(After insert an USB device, the controller receives a port reset from
upper USB sublayer. This cause disabling the ports. So, re-enabling it
before controls.)

And, A Happy New Year! :-)
-- 
Eiji Kawauchi



Home | Main Index | Thread Index | Old Index