From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 15473 invoked from network); 13 Nov 2021 22:07:44 -0000 Received: from 4ess.inri.net (216.126.196.42) by inbox.vuxu.org with ESMTPUTF8; 13 Nov 2021 22:07:44 -0000 Received: from a10-18.smtp-out.amazonses.com ([54.240.10.18]) by 4ess; Sat Nov 13 17:03:40 -0500 2021 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=a4tryept6ew4kp6pdupzhtikhmwphypy; d=mapinternet.com; t=1636840650; h=From:Content-Type:Content-Transfer-Encoding:Mime-Version:Subject:Message-Id:Date:To; bh=B6a+8iOPsGYh12x06vhk6fe+YQeGekG9c7/3/idpPfc=; b=hXmvu3vliU4q/uMcHSGWFIIVrculeOyDbq3A7mAwOwBcfMolfSvbkUl98E0T+ypp NTkrYBlp6vAlfhP6XvjDBM5c2EdWwK+CVOmuvxSGgT86avmefiBYwqiHGkjzSs2jEN2 8dHkc0Mz7JhXtCYF1j+fq5hoGMszYk1sWlGLkpXY= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug; d=amazonses.com; t=1636840650; h=From:Content-Type:Content-Transfer-Encoding:Mime-Version:Subject:Message-Id:Date:To:Feedback-ID; bh=B6a+8iOPsGYh12x06vhk6fe+YQeGekG9c7/3/idpPfc=; b=WYUi58TV8t8zLPml3jF60B20HF/sHq3K03wv4PJ4MaeYtsD63m5iiFnyjJLDMI9+ UzRBNMyf9sFYcmeZRK9ZnKgOKZkOROVoYpvwDFNFBqfaXM1QtzlI1j8UPsqW9vbaGlR 1diNqZC2BLZxFdpNsCe1xSx9q7cjOX+LUCes8mnU= X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=107.107.61.28; envelope-from=; From: Mack Wallace Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Message-ID: <0100017d1b4e37b3-3803a9cc-799e-4bbc-bd38-539fad5e750c-000000@email.amazonses.com> Date: Sat, 13 Nov 2021 21:57:30 +0000 To: 9front@9front.org X-Mailer: Apple Mail (2.3608.120.23.2.1) X-Authenticated-User: mackbw@mapinternet.com Feedback-ID: 1.us-east-1.X+xhoL9JiEQ8K0gzGjV36WZnSewOzOs8YCWuakKsLBY=:AmazonSES X-SES-Outgoing: 2021.11.13-54.240.10.18 List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: map/reduce method cache cache polling package Subject: [9front] Porting RTL8111 (ether8169) driver to bcm64 Reply-To: 9front@9front.org Precedence: bulk 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.=20 I=E2=80=99ve 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=E2=80=99t 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.=20 My questions: Are there already similar calls in 9front and I=E2=80=99ve (stupidly) = overlooked them?=20 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=