<div dir="ltr">This message is just FYI. I just wanted to document some of the tests I ran on the Pi with Deval's last GSOC rtems-libbsd branch for the Raspberry Pi. <div><a href="https://github.com/deval-maker/rtems-libbsd/tree/RPi_USB_Ethernet">https://github.com/deval-maker/rtems-libbsd/tree/RPi_USB_Ethernet</a></div><div><div><br></div><div>There are definitely some timing issues.. When I run ping01, I need a delay between the rtems_bsd_initialize call and the default_network_ifconfig_hwif0. Without the delay, the network device will not be initialized before the ifconfig call is made. Sebastian had mentioned earlier the need to use an event based initialization. </div><div>Even with the delay, the ifconfig call ends up waiting for USB messages and never returns. </div><div><br></div><div>Another thing I noticed: If I plug in a USB flash drive into the USB port of the Pi, the ethernet interface will be recognized, and the mac, and phy seems to be setup. Without the drive plugged in, the ethernet device will not fully be initialized. ( see logs below ). This must be a timing issue as well. I guess having the extra USB drive plugged in causes a delay that allows the ethernet device to initialize?</div><div><br></div><div>The flash drives are recognized, but I'm not sure how close we are to actually being able to read data from them. </div><div><br></div><div>Here are the logs:</div><div>1. Running media01 test on the Raspberry Pi Model B with ethernet and 2 USB flash drives plugged in to the USB ports. Note that I added  <span style="color:rgb(0,0,0);font-size:13px">#define RTEMS_BSD_CONFIG_BSP_CONFIG</span></div><div><font color="#000000">in default-init.h in the test suite to get the media01 test to recognize the Raspberry Pi USB devices. This define was in the default-network-init.h </font></div><div>There are extra debug printfs below, as I was trying to figure out how far the code was getting, and I don't have a debug solution for the Raspberry Pi yet. </div><div>---</div><div><br></div><div><div>*** LIBBSD MEDIA 1 TEST ***</div><div>nexus0: <RTEMS Nexus device></div><div>bcm283x_dwcotg0: <DWC OTG 2.0 integrated USB controller (bcm283x)> on nexus0</div><div>usbus0 on bcm283x_dwcotg0</div><div>usbus0: 480Mbps High Speed USB v2.0</div><div>uhub0: <DWCOTG OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0</div><div>uhub0: 1 port with 1 removable, self powered</div><div> in usb_proc_mwait -- </div><div> in usb_proc_mwait -- else clause - while loop</div><div> in usb_proc_mwait -- </div><div> in usb_proc_mwait -- else clause - while loop</div><div>uhub1: <vendor 0x0424 product 0x9514, class 9/0, rev 2.00/2.00, addr 2> on usbus0</div><div>uhub1: MTT enabled</div><div>uhub1: 5 ports with 4 removable, self powered</div><div> in usb_proc_mwait -- </div><div> in usb_proc_mwait -- else clause - while loop</div><div> in usb_proc_mwait -- </div><div> in usb_proc_mwait -- else clause - while loop</div><div>smsc0: <vendor 0x0424 product 0xec00, rev 2.00/2.00, addr 3> on usbus0</div><div>in ue_queue_command</div><div>in ue_queue_command -- calling task? usb_proc_msignal</div><div>in ue_queue_command -- setup callback and self pointers</div><div>in ue_queue_command --returning </div><div>smsc0: chip 0xec00, rev. 0002</div><div>miibus0: <MII bus> on smsc0</div><div>ukphy0: <Generic IEEE 802.3u media interface> PHY 1 on miibus0</div><div>ukphy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto</div><div>ue0: <USB Ethernet> on smsc0</div><div>ue0: Ethernet address: 5a:ee:60:74:67:92</div><div> in usb_proc_mwait -- </div><div> in usb_proc_mwait -- else clause - while loop</div><div> in usb_proc_mwait --                                            </div><div> in usb_proc_mwait -- else clause - while loop                   </div><div>umass0: <SanDisk Cruzer Fit, class 0/0, rev 2.00/1.27, addr 4> on usbus0</div><div>umass0:  SCSI over Bulk-Only; quirks = 0x0000                    </div><div>media listener: event = DISK ATTACH, state = INQUIRY, src = umass-sim</div><div>rtems_bsd_sim_attach_worker: OOPS: inquiry failed</div><div> in usb_proc_mwait -- </div><div> in usb_proc_mwait -- else clause - while loop</div><div> in usb_proc_mwait -- </div><div> in usb_proc_mwait -- else clause - while loop</div><div>umass1: <SMI Corporation USB DISK, class 0/0, rev 2.00/11.00, addr 5> on usbus0</div><div>umass1:  SCSI over Bulk-Only; quirks = 0x4000</div><div>err: ftpd: Error binding control socket: Address not available</div><div>info: ftpd: FTP daemon started (4 sessions max)</div><div>info: /dev/pty0../dev/pty4 (5) pseudo-terminals registered.</div><div>telnetd:bind: Address not available</div><div>telnetd started with stacksize = 32768 and priority = 100</div><div><br></div><div>RTEMS Shell on /dev/console. Use 'help' to list commands.</div><div>[/] # rtems_bsd_sim_attach_worker: OOPS: test unit ready failed</div><div>rtems_bsd_sim_attach_worker: OOPS: read capacity failed</div><div>media listener: event = DISK ATTACH, state = FAILED, src = umass-sim</div><div>media listener: event = DISK ATTACH, state = INQUIRY, src = umass-sim</div><div>rtems_bsd_sim_attach_worker: OOPS: inquiry failed</div><div>rtems_bsd_sim_attach_worker: OOPS: test unit ready failed</div><div>rtems_bsd_sim_attach_worker: OOPS: read capacity failed</div><div>media listener: event = DISK ATTACH, state = FAILED, src = umass-sim</div></div><div><br></div><div>----</div><div><br></div><div>2. Same test as above ( media01 ) but without USB flash drives plugged into the USB ports. See how the ethernet is detected, but not as complete as in the previous test:</div><div><div>*** LIBBSD MEDIA 1 TEST ***</div><div>nexus0: <RTEMS Nexus device></div><div>bcm283x_dwcotg0: <DWC OTG 2.0 integrated USB controller (bcm283x)> on nexus0</div><div>usbus0 on bcm283x_dwcotg0</div><div>usbus0: 480Mbps High Speed USB v2.0</div><div>uhub0: <DWCOTG OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0</div><div>uhub0: 1 port with 1 removable, self powered</div><div> in usb_proc_mwait -- </div><div> in usb_proc_mwait -- else clause - while loop</div><div> in usb_proc_mwait -- </div><div> in usb_proc_mwait -- else clause - while loop</div><div>uhub1: <vendor 0x0424 product 0x9514, class 9/0, rev 2.00/2.00, addr 2> on usbus0</div><div>uhub1: MTT enabled</div><div>uhub1: 5 ports with 4 removable, self powered</div><div> in usb_proc_mwait -- </div><div> in usb_proc_mwait -- else clause - while loop</div><div> in usb_proc_mwait -- </div><div> in usb_proc_mwait -- else clause - while loop</div><div>smsc0: <vendor 0x0424 product 0xec00, rev 2.00/2.00, addr 3> on usbus0</div><div>in ue_queue_command</div><div>in ue_queue_command -- calling task? usb_proc_msignal</div><div>in ue_queue_command -- setup callback and self pointers</div><div>in ue_queue_command --returning </div><div><br></div></div><div>---</div><div>3. media01 test on the Raspberry Pi Zero with a single USB flash drive plugged in. The Pi Zero just has a single USB port without the hub and USB/Ethernet device:</div><div><br></div><div><div>*** LIBBSD MEDIA 1 TEST ***</div><div>nexus0: <RTEMS Nexus device></div><div>bcm283x_dwcotg0: <DWC OTG 2.0 integrated USB controller (bcm283x)> on nexus0</div><div>usbus0 on bcm283x_dwcotg0</div><div>usbus0: 480Mbps High Speed USB v2.0</div><div>uhub0: <DWCOTG OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0</div><div>uhub0: 1 port with 1 removable, self powered</div><div> in usb_proc_mwait -- </div><div> in usb_proc_mwait -- else clause - while loop</div><div> in usb_proc_mwait -- </div><div> in usb_proc_mwait -- else clause - while loop</div><div>umass0: <SMI Corporation USB DISK, class 0/0, rev 2.00/11.00, addr 2> on usbus0</div><div>umass0:  SCSI over Bulk-Only; quirks = 0x4000</div><div>media listener: event = DISK ATTACH, state = INQUIRY, src = umass-sim</div><div>rtems_bsd_sim_attach_worker: OOPS: inquiry failed</div><div><br></div></div></div></div>