Hey tech-net, (maxv@, skrll@) On 01/05/2018 19:09, Maxime Villard wrote: > Le 30/04/2018 à 15:26, Pierre Pronchery a écrit : >> >> I am currently trying to port umb(4) from OpenBSD: >> >>> The umb driver provides support for USB MBIM devices. >>> MBIM devices establish connections via cellular networks such as >>> GPRS, UMTS, and LTE. They appear as a regular point-to-point network >>> interface, transporting raw IP frames. >> >> This is apparently required to access Internet with USB modems since >> 4G/LTE (at least on my own Sierra Wireless EM7345). >> >> It does not build yet (therefore also not tested) but I am getting >> there. If anyone feels like reviewing it already, it could save me some >> trouble and help getting it to work faster. >> >> This is probably also missing changes to ifconfig(8), if only to set the >> PIN code; this is the user interface that OpenBSD developers have chosen >> for this. Alternative suggestions are welcome! (sysctl...) > > I don't see where sc_tx_buf is initialized, and also the m_copydata looks > highly suspicious to me. You were right about sc_{rx,tx}_buf, thanks. I do not see anything wrong with m_copydata() on my side so far. In the meantime I have made progress, and the driver now builds and matches! It currently crashes when attaching: > vmem_free() > sysctl_createv() > if_percpuq_create() > if_attach() > umb_attach() Any idea what can cause this so early on? I am attaching the current code here. There are still a few #if 0's. @skrll: would you mind having a look at the modifications required in the USB framework there? (I am porting this code from OpenBSD, I am not very familiar with either USB stacks; maybe some are not actually required?) Cheers, -- khorben
Attachment:
patch-umb.diff.gz
Description: application/gzip