From owner-freebsd-drivers@FreeBSD.ORG Sun Feb 18 19:35:26 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 C789116A402 for ; Sun, 18 Feb 2007 19:35:26 +0000 (UTC) (envelope-from anatoli.marinov@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.226]) by mx1.freebsd.org (Postfix) with ESMTP id 83BD213C4A3 for ; Sun, 18 Feb 2007 19:35:26 +0000 (UTC) (envelope-from anatoli.marinov@gmail.com) Received: by nz-out-0506.google.com with SMTP id i11so1693000nzh for ; Sun, 18 Feb 2007 11:35:26 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=kA1wid265wfoaIRb3jRpc8o7qtXHPSyjURXMslnK0FHjRQySNOWvUfmFPf33cbtdtT81fIP3dSU9TE6ycdbkHR8Ih88DLWO1LVnU8SdaPqMjhutzKVznUTYGG5bYoE948MVeE1FKB9A/tZAaPm3hry3PTg2Wlt0wxLVwUcJjBFM= Received: by 10.114.78.1 with SMTP id a1mr2642052wab.1171827325099; Sun, 18 Feb 2007 11:35:25 -0800 (PST) Received: by 10.114.134.3 with HTTP; Sun, 18 Feb 2007 11:35:24 -0800 (PST) Message-ID: Date: Sun, 18 Feb 2007 21:35:24 +0200 From: "Anatoli Marinov" To: freebsd-drivers@freebsd.org In-Reply-To: MIME-Version: 1.0 References: <20070215.141213.78798381.imp@bsdimp.com> <20070215.233553.-861030449.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: problem with rl network card 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: Sun, 18 Feb 2007 19:35:26 -0000 Guys, What should I do with my RTL 8139D NIC. Is there someone who knows how I can use this card with freebsd? Is it possible? Toli 2007/2/16, Anatoli Marinov : > > NIC pictures - RTL8139D > http://snimka.bg/album.php?album_id=105612 > > Is there a driver? :) > > 2007/2/16, M. Warner Losh < imp@bsdimp.com>: > > > > In message: > > > > "Anatoli Marinov" writes: > > : OK. I will. > > > > I could download them, but I stopped the download of the first one > > after 20 minutes and it had only finished 1/3 of the picture... just > > enough to see the RTL8139D on the badge... > > > > Warner > > > > : Thanks > > : > > : 2007/2/15, Warner Losh : > > : > > > : > > I have photos. > > : > > This is the link http://free.bsd-bg.net/NIC/ > > : > > Definitly the chip is RTL8139D. > > : > > > > : > > Is there functional driver for it or not? > > : > > > : > I think that it might be wise for me to snag these pictures and > > mirror > > : > them somewhere. The download time is very very slow. I chose the > > : > smallest image and it is taking a very long time. > > : > > > : > Warner > > : > > > : > > > : > > Toli > > : > > > > : > > 2007/2/15, Anatoli Marinov < anatoli.marinov@gmail.com>: > > : > > > > > : > > > I am going to prepare high resolution photos and will post links > > there > > : > > > > > : > > > 2007/2/14, Warner Losh < imp@bsdimp.com>: > > : > > > > > > : > > > > From: Oliver Fromme > > : > > > > Subject: Re: problem with rl network card > > : > > > > Date: Wed, 14 Feb 2007 22:14:54 +0100 (CET) > > : > > > > > > : > > > > > Anatoli Marinov wrote: > > : > > > > > > Unfortunately the patch with simple new code for vendor > > in .h > > : > file > > : > > > > didnt > > : > > > > > > work. See the attached file. It is verbose dmesg after > > booting. > > : > > > > > > > : > > > > > Thanks. These are the important lines: > > : > > > > > > > : > > > > > > pci2: child re0 requested type 4 for rid 0x10, but the > > BAR says > > : > it > > : > > > > is an memio > > : > > > > > > re0: couldn't map ports/memory > > : > > > > > > pci2: child rl0 requested type 4 for rid 0x10, but the > > BAR says > > : > it > > : > > > > is an memio > > : > > > > > > rl0: couldn't map ports/memory > > : > > > > > > > : > > > > > Uhm, strange, why do both re and rl try to attach? It's > > : > > > > > clearly not an re device. Did you make any other changes > > : > > > > > to the source code, beside the one I told you? Something > > : > > > > > seems to be confused there in the drivers. > > : > > > > > > : > > > > re and rl have attach code that allocates resources and talks > > to the > > : > > > > card to see what revision the card is. That's why he's seeing > > thsoe > > : > > > > lines. > > : > > > > > > : > > > > > However, it seems that the driver cannot alloacte the PCI > > : > > > > > resources correctly. > > : > > > > > > : > > > > This likely means that this card isn't a realtek interface. > > : > > > > > > : > > > > What would be nice is to know what the number of the chip on > > the NIC > > : > > > > card is. And its maker. That would help us a lot to know > > which > > : > > > > drivers to recommend. > > : > > > > > > : > > > > Warner > > : > > > > > > : > > > > > : > > > > > : > > > > > From owner-freebsd-drivers@FreeBSD.ORG Mon Feb 19 12:55:51 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 C40BE16A420 for ; Mon, 19 Feb 2007 12:55:51 +0000 (UTC) (envelope-from groot@kde.org) Received: from poster.science.ru.nl (poster.science.ru.nl [131.174.30.28]) by mx1.freebsd.org (Postfix) with ESMTP id 5D5E413C4AC for ; Mon, 19 Feb 2007 12:55:51 +0000 (UTC) (envelope-from groot@kde.org) Received: from smeltpunt.science.ru.nl [131.174.16.145] (helo=smeltpunt.science.ru.nl) by poster.science.ru.nl (8.13.7/5.11) with ESMTP id l1JChQBu006970 for ; Mon, 19 Feb 2007 13:43:27 +0100 (MET) Received: from n142198.science.ru.nl [131.174.142.198] (helo=n142198.science.ru.nl) by smeltpunt.science.ru.nl (8.13.7/5.11) with ESMTP id l1JChNpd028596; Mon, 19 Feb 2007 13:43:24 +0100 (MET) From: Adriaan de Groot Organization: KDE e.V. To: freebsd-hardware@freebsd.org, freebsd-drivers@freebsd.org Date: Mon, 19 Feb 2007 13:44:04 +0100 User-Agent: KMail/1.9.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200702191344.04383.groot@kde.org> X-Spam-Score: -1.3 () ALL_TRUSTED,BAYES_50 X-Scanned-By: MIMEDefang 2.56 on 131.174.16.145 Cc: Subject: SiI3124 / ATA hw.end_transaction 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: Mon, 19 Feb 2007 12:55:51 -0000 At the beginning of February I posted [1] that I had a SiI3124 (SATA-II, RAID, PCI-X) card (works in PCI slot, too) for testing and that worst-case I would write the driver myself. Since there was no response, I wrote the driver myself. Mostly, anyway. I've written it to be part of the ata driver (long term this does not seem like a good idea, what with PMs pushing the number of devices per SATA channel > 1; having one CAM bus would be doable, I think, since 4 ports * hypothetical 15-port-multiplier is as far as this chipset can go) and so far it handles interrupts and ATA IDENTIFY returns the correct information. So I end up with (paraphrase, the machine I have the hardware in isn't connected today): atapci1: SiI 3124 ata6: .. ata9: ad12: TOSHIBA ... on ata6-master Anyway, I'm having real trouble figuring out how the hw.begin_transaction, hw.end_transaction and hw.status methods interact in struct ata_lowlevel. Commands are issued (like ATA INDENTIFY) and go through begin_transaction. I post the command to the device. On next interrupt for the channel (meaning the command is completed) .. something. This is where I don't understand what is happening or what is supposed to happen. status returns 0 or 1; in ata-chipset.c these are typically documented as "have seen any device action", but I don't know entirely what this is supposed to check. Given the context I may be able to just return 1, but ata_pci_status() returns 0 if the channel is busy (by the taskfile registers). And then there's the end_transaction stuff; this should, presumably, set request->result and request->error and request->status. Here, I'm in the dark as to what values mean what. I've tried just retrieving them from the taskfile (on the assumption that the 3124 updates the FIS after command completion) but all I get for my trouble are request timeouts for SETMODE, ENABLE_WCACHE, ... and the occasional READ_LBA. Booting this way takes a long time, but eventually the ATA system gives up on the disk and boot continues normally -- woe betide if I try dd if=/dev/ad12 though :) So my question is particularly: what are status and end_transaction expected to do? Is there documentation anywhere? dev/ata/* seems very light on how-it-works and design docs -- although the code is clean and usually explains what it is doing, so I've been able to get this far. [1] http://lists.freebsd.org/pipermail/freebsd-hardware/2007-February/004184.html -- Adriaan de Groot KDE Quality Team http://www.englishbreakfastnetwork.org/ SQO-OSS Researcher http://www.sqo-oss.eu/ From owner-freebsd-drivers@FreeBSD.ORG Mon Feb 19 17:54:29 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 E65CA16AFCA for ; Mon, 19 Feb 2007 17:54:29 +0000 (UTC) (envelope-from deathjestr@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.226]) by mx1.freebsd.org (Postfix) with ESMTP id A37AD13C4B5 for ; Mon, 19 Feb 2007 17:54:29 +0000 (UTC) (envelope-from deathjestr@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so2028565wxc for ; Mon, 19 Feb 2007 09:54:29 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=fsqDkMUziQphaE2TNc5n+NGBc6lw6QfjiGUgQeS6GvoFiZ2WGhWKvGn/w2XkDiZqco5R3n0EqL7422jH9J4c9ObT2wInUPpvvm+UuZM4YMwDW5+J3l7PpfxzEe95SIQ2ff1u+d5iNb1LixoLk2hYDuw5jXvbFFX3+x1f4ZZzxFA= Received: by 10.90.98.10 with SMTP id v10mr7366493agb.1171906040379; Mon, 19 Feb 2007 09:27:20 -0800 (PST) Received: by 10.90.96.6 with HTTP; Mon, 19 Feb 2007 09:27:20 -0800 (PST) Message-ID: <44b564930702190927w25047f19v75e5626c0e4065eb@mail.gmail.com> Date: Mon, 19 Feb 2007 12:27:20 -0500 From: "Michael M. Press" To: freebsd-drivers@freebsd.org In-Reply-To: <150997.27592.qm@web8315.mail.in.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <150997.27592.qm@web8315.mail.in.yahoo.com> Cc: aji abraham Subject: Re: Doudts in "softc" and "device_get_softc(dev)" 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: Mon, 19 Feb 2007 17:54:30 -0000 > > sizeof(struct xx_softc ) is 68 > sizeof(struct xx_if_softc ) is 1186 > The softc structures are not, in general, of a fixed size. They may be of different sizes for different types of devices. > > struct xx_softc *sc; > struct xx_if_softc *if_sc; > > sc_if = device_get_softc(dev); > sc = device_get_softc(device_get_parent(dev)); > > sc_if-> ..... > sc-> .... > > Both allocation uses the same function. How it > possible ? can we > access > all structure member ? > device_get_softc returns a pointer to the device's softc structure. This function probably isn't aware of what the softc structure itself looks like, but it doesn't need to be. If it needed to copy the structure it would need to know its size, but it is not copying it, it is only returning a pointer to it. You can access all members of the structure returned to you by device_get_softc. From owner-freebsd-drivers@FreeBSD.ORG Tue Feb 20 08:58:49 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 27E16174BC4 for ; Tue, 20 Feb 2007 08:58:49 +0000 (UTC) (envelope-from telemetria@ukr.net) Received: from ffe1.ukr.net (ffe1.ukr.net [195.214.192.7]) by mx1.freebsd.org (Postfix) with ESMTP id CD7A213C442 for ; Tue, 20 Feb 2007 08:58:48 +0000 (UTC) (envelope-from telemetria@ukr.net) Received: from mail by ffe1.ukr.net with local ID 1HJQZ4-000GDs-V4 ; Tue, 20 Feb 2007 10:41:34 +0200 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="windows-1251" MIME-Version: 1.0 To: freebsd-questions@FreeBSD.org From: "Alex" X-Life: is great, enjoy it! X-Mailer: freemail.ukr.net mPOP 3.3 X-Originating-Ip: 192.168.16.56, 195.114.135.114 via proxy [195.114.135.114] X-Browser: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727) Message-Id: Date: Tue, 20 Feb 2007 10:41:34 +0200 Cc: freebsd-drivers@freebsd.org Subject: VIA VT6421 and CS5536 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: Tue, 20 Feb 2007 08:58:49 -0000 Greeting, I am try use motherboard ETX-LX800(http://emea.kontron.com/index.php?id=226&cat=31&productid=1321) with Freebsd OS. There are AMD Geode CPU, CS5536 motherboard chipset and VIA VT6421. I have problem whith boot from flash card CF which are connected by VT6421. System halt on BTX load. There are problem with USB too. When USB is enabled, system halt on loading USB drivers. There is no problem with booting from CD-ROM when USB disabled. Other OS booting without problem too. How can I use this motherboard and CF? May be system must use only BIOS functions for work with this hardware? How? From owner-freebsd-drivers@FreeBSD.ORG Tue Feb 20 18:20:34 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 2C7F916A4FA for ; Tue, 20 Feb 2007 18:20:34 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id CED7F13C441 for ; Tue, 20 Feb 2007 18:20:33 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l1KIKQUJ086577; Tue, 20 Feb 2007 13:20:31 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-drivers@freebsd.org Date: Tue, 20 Feb 2007 11:31:18 -0500 User-Agent: KMail/1.9.4 References: <150997.27592.qm@web8315.mail.in.yahoo.com> In-Reply-To: <150997.27592.qm@web8315.mail.in.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200702201131.18873.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [192.168.0.1]); Tue, 20 Feb 2007 13:20:32 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2613/Tue Feb 20 11:39:58 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: aji abraham Subject: Re: Doudts in "softc" and "device_get_softc(dev)" 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: Tue, 20 Feb 2007 18:20:34 -0000 On Saturday 17 February 2007 04:41, aji abraham wrote: > hi > > My name is Aji Abraham, now working with device > drivers. the word > "softc" and the function "device_get_softc(dev)" > getting confuse me a > lot. am listing some query below .. pls help me .. A softc is the driver-private "instance" data for each device. The driver tells the kernel how big of a softc it wants and as a convenience the kernel will go ahead and allocate it and zero it for the driver. > Q1 In a free BSD driver Code, there are two device > depended structures > > struct xx_softc { > ....... > ...... > > > }; > > struct xx_if_softc { > ....... > ...... > > > }; > > sizeof(struct xx_softc ) is 68 > sizeof(struct xx_if_softc ) is 1186 > > And in device attach function > > xx_attach(dev){ > > struct xx_softc *sc; > struct xx_if_softc *if_sc; > > sc_if = device_get_softc(dev); > sc = device_get_softc(device_get_parent(dev)); > > sc_if-> ..... > sc-> .... > ....... > ...... > > } > > > Both allocation uses the same function. How it > possible ? It is the same function, but it is getting called with different device_t arguments, so it will return different pointers. > can we > access > all structure member ? Yes. -- John Baldwin