9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] Porting RTL8111 (ether8169) driver to bcm64
@ 2021-11-13 21:57 Mack Wallace
  2021-11-14  5:31 ` cinap_lenrek
  2021-11-14  5:57 ` cinap_lenrek
  0 siblings, 2 replies; 6+ messages in thread
From: Mack Wallace @ 2021-11-13 21:57 UTC (permalink / raw)
  To: 9front

Hi all,

I have a Raspberry Pi Compute Module 4 (CM4) with a DFRobot mini router board (https://www.dfrobot.com/product-2242.html) for which I would like to use the second NIC.

The second NIC is a RTL8111 connected to the Pi through its PCIe interface. 

I’ve looked at the code in front that should support the RTL8111, (ether8169.c,) in the pc directory. For better or worse this driver makes use of inb, outb, ins, outs, inl and outl which are architecture specific to x86. I wasn’t able to find equivalent calls in 9fromt. Trying to find the equivalent calls for arm (bcm64) architecture, I found equivalents in the linux kernel which (after a few wrappers) wrap inline assembly. Looking at the driver from Realtek, they use different calls depending on pre-compiler directives - including the readb/l/w and writeb/l/w calls that wrap the assembly in linux. So I would think this could be done to the ether8169.c driver. 

My questions:

Are there already similar calls in 9front and I’ve (stupidly) overlooked them? 

Should it be as simple as adding the platform dependent calls in the driver to get it to work on the Pi, or is there more work that needs to be done to the bcm64 PCIe interface?


Regards,

mackbw

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-12-07 22:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-13 21:57 [9front] Porting RTL8111 (ether8169) driver to bcm64 Mack Wallace
2021-11-14  5:31 ` cinap_lenrek
2021-11-14  5:57 ` cinap_lenrek
2021-11-22 22:01   ` Mack Wallace
2021-11-24 11:41     ` cinap_lenrek
2021-12-07 20:41       ` Mack Wallace

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).