Date: Tue, 11 Dec 2007 10:27:11 +0900 From: Pyun YongHyeon <pyunyh@gmail.com> To: Alexander Pohoyda <alexander.pohoyda@gmx.net> Cc: freebsd-drivers@freebsd.org Subject: Re: SiS 190 NIC driver Message-ID: <20071211012711.GB64299@cdnetworks.co.kr> In-Reply-To: <200712102046.27504.alexander.pohoyda@gmx.net> References: <200712102046.27504.alexander.pohoyda@gmx.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 10, 2007 at 08:46:27PM +0100, Alexander Pohoyda wrote: > Hello! > > Attached is a driver for the SiS 190 NIC found in some Shuttle XPS boxes. I > have developed it based on the code of SiS 900 BSD driver using hints and > enums from Linux and Solaris drivers. > > It is developed and tested to be working on FreeBSD 5.4 amd64. Please bear in > mind that this is my first driver ever. The driver surely needs some > corrections and more work (collision handling, polling mode, etc) but I'm not > able to do this right now becasue of the missing documentation. > > Please review the code and add it into the source with any corrections you > dimi necessary. > > Thank you! > Great work! I've looked over the driver code and I guess the driver is not for RELENG_6/RELENG_7/CURRENT. Would you make it work for CURRENT? Some conmments: - I guess SiS 190 is a gigabit controller but the probe message just shows 10/100TX message. Does this driver supports 1Gbps? - The usage of bus_dma(9) KPI seems to be incorrect. For example there should be no reason to set BUS_DMA_ALLOCNOW flag in bus_dma_tag_create. You can also use bus_dmamap_load_mbuf_sg(9) for newer FreeBSD which make it possible to remove book-keepings needed to pass/get to/from callback. Please check other network drivers for correct usage of bus_dma(9). - It seems that Tx/Rx ring have alignment restrictions, probably 16 bytes or larger. Would you please check it? - Descriptor counter 64 seems to be small for gigabit controllers. I guess 256 or higher would be more reasonable one. - I'm not sure SiS 190 can't handle DMA gathering in Tx path but it seems that Linux doesn't use multiple Tx descriptors at all in Tx path(NETIF_F_SG flag is absent in Linux) So I guess you can simplify sis_encap() function. - It seems the driver name sis19x looks odd. How about sge(SiS Gigabit Ethernet)? - Missing Makefile and man page. - style(9) cleanup. I don't have SiS 190 hardware to test the driver. So it's hard for me to make it work on CURRENT. Feel free to contact to me if you have any questions. -- Regards, Pyun YongHyeon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071211012711.GB64299>