From owner-freebsd-drivers@FreeBSD.ORG Thu Jun 21 07:44:55 2007 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C5BE916A41F for ; Thu, 21 Jun 2007 07:44:55 +0000 (UTC) (envelope-from alexander.pohoyda@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 2080213C455 for ; Thu, 21 Jun 2007 07:44:54 +0000 (UTC) (envelope-from alexander.pohoyda@gmx.net) Received: (qmail 30217 invoked by uid 0); 21 Jun 2007 07:18:14 -0000 Received: from 155.56.68.220 by www053.gmx.net with HTTP; Thu, 21 Jun 2007 09:18:14 +0200 (CEST) Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii" Date: Thu, 21 Jun 2007 09:18:14 +0200 From: "Alexander Pohoyda" Message-ID: <20070621071814.271290@gmx.net> MIME-Version: 1.0 To: freebsd-drivers@freebsd.org X-Authenticated: #14602519 X-Flags: 0001 X-Mailer: WWW-Mail 6100 (Global Message Exchange) X-Priority: 3 X-Provags-ID: V01U2FsdGVkX1/Oe6RWDdTO11uErs7HkBrPh76U1AnmBE2TSPV6Qh hEgP6DgV7Bdmk8ZkW+YpcFMTiVYgThgVJ1yA== X-GMX-UID: BRFId81BIydmBDK0qmdrCb9Sa2FkZhX1 Subject: Finally SiS190 NIC driver ported! X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2007 07:44:55 -0000 Hello, Based on the code of SiS900/7016 FreeBSD driver and using SiS190/191 Linux and Solaris drivers as references, I have developed a working FreeBSD driver for the above mentioned SiS190 NIC. It works stable for a few months on my amd64-based FreeBSD-5.4 machine in 64bit mode. I don't know whether it works in 32bit mode. I have also removed the sis_poll() code because I didn't have time to test it. Since this is my first driver ever, I have a few questions open which I would like to clarify. This NIC uses main memory for both receive and transmit descriptor rings but descriptor structures and registers are different from the ones used in SiS900/7016, so I decided to write a separate driver. How should I name this new driver? Is if_sis190.c + if_sis190reg.h right? It could later be extended to support also SiS191 NIC, I suppose. Or should I really merge the code with the sis(4) driver? I do not clearly understand the reason of separating the data into list_data and chain_data structures. It seems unnecessary in my driver. In sis_encap() function I have to always defragment MBUF chain, otherwise big packets (e.g. during SSH connection there are packets consisting of 3 chunks) are broken. When defragmentation is done -- SSH and other protocols work. Is there a well-known mistake that causes this behavior? -- Alexander Pohoyda PGP Key fingerprint: 7F C9 CC 5A 75 CD 89 72 15 54 5F 62 20 23 C6 44