<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p><span>Hi Christian Mauderer,</span></p>
<p><span>1. I haven't put these change in my git repo yet.</span></p>
<p><span>2.Yes, i verified that by the console output , the <span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">below</span> snapshot :</span></p>
<p><span><br>
</span></p>
<p>including some debug info. just forget it.</p>
<p><br>
</p>
<p><span><img size="45265" contenttype="image/png" id="img520470" crossorigin="anonymous" tabindex="-1" style="max-width: 99.9%; user-select: none;" customtabindex="0" src="cid:4fb54908-2ff4-4098-9f94-6f2aa529babf"><br>
</span></p>
<p><span><br>
</span></p>
<p><span>3.The application i use is testsuite/usb01, i debug it, and it loop at the <span>uhub_explore function in usb_hub.c, and didn't reach the umass_probe function.</span></span></p>
<p><span><span><br>
</span></span></p>
<p>4. I noticed that the pin USB1_DRVVBUS and <span>USBx_VBUSIN is always low, so i think it can't detect the new device.</span></p>
<p><span><br>
</span></p>
<p><span><span>Best Regards</span></span></p>
<p><span><span>Sichen Zhao</span></span></p>
<p><span><br>
</span></p>
<p><span><br>
</span></p>
<p><span><br>
</span></p>
<p><span><br>
</span></p>
<p><span><br>
</span></p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<br>
</div>
</div>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<div>
<hr style="display:inline-block; width:98%" tabindex="-1">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Christian Mauderer <christian.mauderer@embedded-brains.de><br>
<b>Sent:</b> Wednesday, April 19, 2017 8:36 PM<br>
<b>To:</b> RTEMS; 赵 思晨<br>
<b>Subject:</b> Re: GSOC 2017 RTEMS-libbsd issue</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Hello Sichen Zhao,<br>
<br>
Sorry for the delayed response. Somehow the mail must have been lost.<br>
I only received it through the answer from Kevin Kirspel. I slightly<br>
changed my mailing list settings so the next time it will (hopefully)<br>
work.<br>
<br>
> <br>
> Hi Christian Mauderer, Hi all,<br>
> <br>
>  <br>
> <br>
> I understand what you mean, i will update my RTEMS-libbsd to the newest<br>
> branch.<br>
> <br>
<br>
Good.<br>
<br>
> I already pull over the host controller driver files(am335x_musb.c<br>
> am335x_usbss.c umass.c)from freebsd and make them compilable in<br>
> rtems-libbsd. The umass.c is driver for storage device.<br>
> <br>
> And i already add the host controller and driver to<br>
> nexus-devices.h(RTEMS_BSD_DEFINE_NEXUS_DEVICE(musbotg,0 ,<br>
> RTEMS_ARRAY_SIZE(musbotg_res), &musbotg_res[0]);).<br>
><br>
<br>
Sounds good. Did you put these changes on some working branch in your<br>
github repository so it would be possible to have a look?<br>
<br>
>  <br>
> <br>
> Now uhub usbus and musbotg can mount on nexus bus.<br>
> <br>
<br>
OK. Sounds good. I expect you have verified that by some console output?<br>
<br>
> the issue is: it can not find the new device(such as U disk)<br>
> <br>
<br>
Which application did you use to test this. Do you have some kind of<br>
debugger so you could check whether the code reaches the umass_probe<br>
function?<br>
<br>
> So i compare with the FreeBSD boot log info, and the only difference is<br>
> FreeBSD enable the USB_HAVE_UGEN, so i guess if it is necessary<br>
> <br>
> to enable the macro USB_HAVE_UGEN.<br>
><br>
<br>
As far as I can tell neither the am335x_musb nor the umass driver does<br>
something different based on this macro. And till now, the macro hasn't<br>
been necessary for supporting mass storage devices. It is possible that<br>
something changed and that this specific host needs USB_HAVE_UGEN for<br>
some reason to support any device but I would think it is rather unlikely.<br>
<br>
@Kevin Kirspel: It seems that you need UGEN for keyboards. Does a USB<br>
mass storage work on your target without UGEN? This might could give a<br>
hint whether the dependency is device-specific or host-specific.<br>
<br>
I'm currently not sure if any other USB device (like a hub) produces any<br>
messages on the console. But it might would be worth a try. If you have<br>
upgraded to the last libbsd, you could also try some USB-wifi-dongles. I<br>
tested with a rtl8192 based one and that did put some messages on the<br>
console. For this wifi dongle You would have to add the following<br>
drivers in nexus-devices.h:<br>
<br>
  SYSINIT_MODULE_REFERENCE(wlan_ratectl_none);<br>
  SYSINIT_MODULE_REFERENCE(wlan_sta);<br>
  SYSINIT_MODULE_REFERENCE(wlan_amrr);<br>
  SYSINIT_DRIVER_REFERENCE(rtwn_usb, uhub);<br>
  SYSINIT_REFERENCE(rtwn_rtl8192cfwT);<br>
<br>
Kind regards<br>
<br>
Christian<br>
<br>
>  <br>
> <br>
> Thank you for your suggestions.<br>
> <br>
>  <br>
> <br>
> Best regards<br>
> <br>
> Sichen Zhao<br>
> <br>
<br>
-- <br>
--------------------------------------------<br>
embedded brains GmbH<br>
Christian Mauderer<br>
Dornierstr. 4<br>
D-82178 Puchheim<br>
Germany<br>
email: christian.mauderer@embedded-brains.de<br>
Phone: +49-89-18 94 741 - 18<br>
Fax:   +49-89-18 94 741 - 08<br>
PGP: Public key available on request.<br>
<br>
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
</div>
</span></font></div>
</div>
</body>
</html>