From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 21 07:35:57 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C50CE16A41F for ; Wed, 21 Sep 2005 07:35:57 +0000 (GMT) (envelope-from nsrashmi@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 59E3143D45 for ; Wed, 21 Sep 2005 07:35:57 +0000 (GMT) (envelope-from nsrashmi@gmail.com) Received: by xproxy.gmail.com with SMTP id t12so113150wxc for ; Wed, 21 Sep 2005 00:35:56 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=XNWAS0lTqxsGWU+XveB+SqlbUk3CI5EoGogLSp3Cmrgb+1aTKcyKBEy+o4x+qGFX2jmJ8XVJgCsRxv1NPRLl753zZaD0tl5GPJpJ2fhMQqEvomCgYQ+T9psHp1F/dxUl9UDLMhFqvFT3sRkXrjseCSK/Hx6TlN/BZauLwwoGD4M= Received: by 10.70.47.13 with SMTP id u13mr2306967wxu; Wed, 21 Sep 2005 00:35:56 -0700 (PDT) Received: by 10.70.15.12 with HTTP; Wed, 21 Sep 2005 00:35:56 -0700 (PDT) Message-ID: <9f99931605092100357f3e004@mail.gmail.com> Date: Wed, 21 Sep 2005 13:05:56 +0530 From: rashmi ns To: bugi@lists.redbrick.dcu.ie, freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Cc: Subject: help required on writing Network device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: nsrashmi@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2005 07:35:57 -0000 Hello All, Regarding the details of the device for which i'm trying to write a driver is a hdlc controller This is the output of pciconf for that device hdlc0@pci1:11:0: class=3D0x028000 card=3D0x00000000 chip=3D0x313413e= a rev=3D0x01 hdr=3D0x00 vendor =3D 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' device =3D 'DS3134/31256 Chateau/Envoy 256 Channel HDLC Controller' class =3D network none1@pci1:11:1: class=3D0x068000 card=3D0x00000000 chip=3D0x313413e= a rev=3D0x01 hdr=3D0x00 vendor =3D 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' device =3D 'DS3134/31256 Chateau/Envoy 256 Channel HDLC Controller' class =3D bridge subclass =3D PCI-unknown Currently we are writing drivers only for function 0 and in probe we are probing only for function zero based on the classid . so in general i have to write a network driver . In the transmit side the device the device has transmit FIFO OF SIZE 16kb and the host writes the pending queue to inform the dma that a particular channel has data to be transferred associated with each pending queue descriptor is linked list of one or more transmit packet desc that describe the packet data .each of this Tx packet descriptor also has a pointer to tx data buffer which actually contains the data payload As the hdlc controller processes transmit pending queue descriptor entries it creates transmit done queue descriptorqueue entries. The DMA will write to the done queue when it has completed transmitting either a complete packet or data buffer depending on how the hdlc controller is configured. Via these done queue descriptors, the DMA informs the host about the status of the outgoing packet data. information. Kindly let me know how do we really create dma tags to all of these descriptors that is for transmit_packet_desc , pending_q_desc,done_q_desc tx data Thanks in Advance, Rashmi.N.S