Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Dec 2007 08:45:09 +0100
From:      "Alexander Pohoyda" <alexander.pohoyda@gmx.net>
To:        freebsd-drivers@freebsd.org
Subject:   Re: SiS 190 NIC driver
Message-ID:  <20071211074509.281710@gmx.net>
In-Reply-To: <20071211012711.GB64299@cdnetworks.co.kr>
References:  <200712102046.27504.alexander.pohoyda@gmx.net> <20071211012711.GB64299@cdnetworks.co.kr>

next in thread | previous in thread | raw e-mail | index | archive | help
>  > Attached is a driver for the SiS 190 NIC found in some Shuttle XPS

> 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?

I would like to, but neither RELENG_6, nor RELENG_7 boots on my Shuttle box.  I have reported this in -current mailing list some time ago, but got no usable suggestion.  Maybe I should try a recent CURRENT, but I don't have much time to play around with it.


> - I guess SiS 190 is a gigabit controller but the probe message just
>   shows 10/100TX message. Does this driver supports 1Gbps?

I don't know for sure, but SiS website <http://www.sis.com/download/agreement.php?id=155880>; mentions: SiS191 Gigabit LAN & SiS190 LAN Driver(v2.03)

Other websites have it wrong, I guess, e.g.: <http://www.dirfile.com/sis_190_gigabit_lan__sis_191_lan_driver_v_1_03b.htm>; SiS 190 Gigabit LAN & SiS 191 LAN Driver v 1.03b

However, I will have a look at this.


> - 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.

This code is left from the original sis driver and it works.  Moreover, the Architecture Handbook <http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/isa-driver-busmem.html>; does not mention bus_dmamap_load_mbuf_sg(9) and once again, newer FreeBSD releases do not start on this box at all, so if this new bus_dma API is not available in RELENG_5, I cannot use it.


>   needed to pass/get to/from callback. Please check other network
>   drivers for correct usage of bus_dma(9).

The existing sis driver does no use bus_dmamap_load_mbuf_sg either.


> - It seems that Tx/Rx ring have alignment restrictions, probably
>   16 bytes or larger. Would you please check it?

I do not understand, please elaborate.


> - Descriptor counter 64 seems to be small for gigabit controllers.
>   I guess 256 or higher would be more reasonable one.

Do you mean that:
    int            sis_tx_cnt;
should rather be:
    u_int256_t        sis_tx_cnt;

If not, please elaborate.


> - 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.

Please offer your version of a function and I will test it.  Or explain how you mean to simplify it.  Is there an existing driver with a simplified variant?


> - It seems the driver name sis19x looks odd. How about sge(SiS
>   Gigabit Ethernet)?

Yes, I would like sge better, but see above.


> - Missing Makefile and man page.

Sorry, cannot provide a man page other than a standard sis(4), but a Makefile is not a problem, will do.


> - style(9) cleanup.

I tried to stick to style(9), do you have any specific complaints?


> 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.

Thank you very much for useful comments!  Please send me code snippets and I will test them!

-- 
Alexander Pohoyda <alexander.pohoyda@gmx.net>
PGP Key fingerprint:
7F C9 CC 5A 75 CD 89 72  15 54 5F 62 20 23 C6 44





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071211074509.281710>