From owner-freebsd-drivers@FreeBSD.ORG Fri Jun 1 12:06:44 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 C0D1F16A41F for ; Fri, 1 Jun 2007 12:06:44 +0000 (UTC) (envelope-from e.petenev@arcor.de) Received: from mail-in-03.arcor-online.net (mail-in-03.arcor-online.net [151.189.21.43]) by mx1.freebsd.org (Postfix) with ESMTP id 8264E13C4CA for ; Fri, 1 Jun 2007 12:06:44 +0000 (UTC) (envelope-from e.petenev@arcor.de) Received: from mail-in-04-z2.arcor-online.net (mail-in-04-z2.arcor-online.net [151.189.8.16]) by mail-in-03.arcor-online.net (Postfix) with ESMTP id 346B42CB4F6 for ; Fri, 1 Jun 2007 14:06:43 +0200 (CEST) Received: from mail-in-13.arcor-online.net (mail-in-13.arcor-online.net [151.189.21.53]) by mail-in-04-z2.arcor-online.net (Postfix) with ESMTP id 1D172AC44E for ; Fri, 1 Jun 2007 14:06:43 +0200 (CEST) Received: from bigtower (dslb-088-070-048-068.pools.arcor-ip.net [88.70.48.68]) by mail-in-13.arcor-online.net (Postfix) with ESMTP id E6E19225129 for ; Fri, 1 Jun 2007 14:06:42 +0200 (CEST) From: "Evgeny Petenev" Cc: Date: Fri, 1 Jun 2007 14:06:30 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcecsbcxFdhIB7mdTpyukc97GhGgzgAWoB+wAeDuQBAAACz64A== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 Message-Id: <20070601120642.E6E19225129@mail-in-13.arcor-online.net> Subject: WG: AW: Ricoh R5C843 Card bus Controller on FreeBSD 6.2 Release 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: Fri, 01 Jun 2007 12:06:44 -0000 -----Urspr=FCngliche Nachricht----- Von: Warner Losh [mailto:imp@bsdimp.com]=20 Gesendet: Dienstag, 22. Mai 2007 13:40 An: e.petenev@arcor.de Cc: freebsd-drivers@freebsd.org Betreff: Re: AW: Ricoh R5C843 Card bus Controller on FreeBSD 6.2 Release = OK. This sounds like the bus numbering issue. Can you send 'devinfo -v' to me next and I'll send what I think might be a workaround for you? Warner Ok, here is output of devinfo -v: -------------------------------------------------------------------------= --- Hi, So do you have any Idea what I can do to bring my WirelessNIC up? I've tried 7.0-Current but get the same result. So I need your help. Best regard, Evgeny Petenev From owner-freebsd-drivers@FreeBSD.ORG Fri Jun 1 12:10: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 3D4B816A421 for ; Fri, 1 Jun 2007 12:10:55 +0000 (UTC) (envelope-from e.petenev@arcor.de) Received: from mail-in-10.arcor-online.net (mail-in-10.arcor-online.net [151.189.21.50]) by mx1.freebsd.org (Postfix) with ESMTP id A8DD813C44B for ; Fri, 1 Jun 2007 12:10:54 +0000 (UTC) (envelope-from e.petenev@arcor.de) Received: from mail-in-13-z2.arcor-online.net (mail-in-13-z2.arcor-online.net [151.189.8.30]) by mail-in-10.arcor-online.net (Postfix) with ESMTP id 0C82D26D9F8 for ; Fri, 1 Jun 2007 14:10:53 +0200 (CEST) Received: from mail-in-08.arcor-online.net (mail-in-08.arcor-online.net [151.189.21.48]) by mail-in-13-z2.arcor-online.net (Postfix) with ESMTP id 213001B8E5C for ; Fri, 1 Jun 2007 14:10:53 +0200 (CEST) Received: from bigtower (dslb-088-070-048-068.pools.arcor-ip.net [88.70.48.68]) by mail-in-08.arcor-online.net (Postfix) with ESMTP id 8F3862D2987 for ; Fri, 1 Jun 2007 14:10:52 +0200 (CEST) From: "Evgeny Petenev" Cc: Date: Fri, 1 Jun 2007 14:10:40 -0700 MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcekkU6wnnZlQWYlSo2zY8/iO194Uw== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 Message-Id: <20070601121052.8F3862D2987@mail-in-08.arcor-online.net> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: AW: Ricoh R5C843 Card bus Controller on FreeBSD 6.2 Release 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: Fri, 01 Jun 2007 12:10:55 -0000 =20 =20 =20 -----Urspr=FCngliche Nachricht----- Von: Warner Losh [ mailto:imp@bsdimp.com] Gesendet: Dienstag, 22. Mai 2007 13:40 An: e.petenev@arcor.de Cc: freebsd-drivers@freebsd.org Betreff: Re: AW: Ricoh R5C843 Card bus Controller on FreeBSD 6.2 Release = =20 OK. This sounds like the bus numbering issue. Can you send 'devinfo = -v' to me next and I'll send what I think might be a workaround for you? =20 Warner =20 Ok, here is output of devinfo -v: =20 -------------------------------------------------------------------------= --- =20 Hi, So do you have any Idea what I can do to bring my WirelessNIC up? I've tried 7.0-Current but get the same result. So I need your help. =20 Best regard, Evgeny Petenev =20 =20 From owner-freebsd-drivers@FreeBSD.ORG Fri Jun 1 14:09:59 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 A97B616A506 for ; Fri, 1 Jun 2007 14:09:59 +0000 (UTC) (envelope-from die.gestalt@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.231]) by mx1.freebsd.org (Postfix) with ESMTP id 659DA13C457 for ; Fri, 1 Jun 2007 14:09:59 +0000 (UTC) (envelope-from die.gestalt@gmail.com) Received: by nz-out-0506.google.com with SMTP id 14so466553nzn for ; Fri, 01 Jun 2007 07:09:58 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=jXZ35c1+W2BiJGtenoO6Gcss0aVTcTXmKV6MsDomh1jmF4BUmc+LvIDP6Q8SLcf2XfNCU2PXHjNofNWY0HbHBjpTESupuMOBTUvyRvuSOI2sTKULZxJqSvhtUh+yYLvapNRyS1r5m9iRUxWr50cyDHe0sdHCVqYPGQPfoj9qZ0E= 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=RFdVldk62pjGA5GRY1vWNwtS6TNnpL7MT2GbGilMjvDk8hyYjK9X8xGXIQn/Z7AqCB2PoOpbHsS75oR53DFSWTjZuHu+FfWtXESPAkqgrWqkrkVzRwQGq+6WPS3ejVe/6GOS1hl6RAXWht1YcEXCAg1NsjMSPoZjPSnPcE+9O2M= Received: by 10.65.237.15 with SMTP id o15mr3198091qbr.1180706998708; Fri, 01 Jun 2007 07:09:58 -0700 (PDT) Received: by 10.64.181.10 with HTTP; Fri, 1 Jun 2007 07:09:58 -0700 (PDT) Message-ID: <5bf3e10d0706010709yab08f21s256cb894118d3bf4@mail.gmail.com> Date: Fri, 1 Jun 2007 16:09:58 +0200 From: "Die Gestalt" To: freebsd-drivers@freebsd.org In-Reply-To: <5bf3e10d0705241345t11e739we0b896bab868fec6@mail.gmail.com> MIME-Version: 1.0 References: <5bf3e10d0705150724q3f0fd25fq89094bd02d8f9d29@mail.gmail.com> <86veetgnk4.fsf@dwp.des.no> <5bf3e10d0705210744s119d1c5cpc20ab1036e9f98ff@mail.gmail.com> <5bf3e10d0705221130t222b80b5w64a4e446b04d6029@mail.gmail.com> <863b1nvqqa.fsf@dwp.des.no> <5bf3e10d0705230314w3038a532uf0d8c0ed18a5d05f@mail.gmail.com> <5bf3e10d0705240839x17792a96hf17e6eebfa5a83da@mail.gmail.com> <5bf3e10d0705241345t11e739we0b896bab868fec6@mail.gmail.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: Generic int 13h driver 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: Fri, 01 Jun 2007 14:09:59 -0000 Hi me again... ;) Well now I correctly hook the interrupts, they are correctly reflected back to the BIOS and I can write to the disk without a problem. When DMA is on, however, reading fails (it works when DMA is off in the BIOS). This is obviously a DMA problem and for some reason the machine does not read the correct page value. The problem is that the Virtual 8086 monitor makes an "invalidate page" call when the operation is finished and my buffers are loaded into a DMA mapping and I do the proper pre/post synchronization, I've even tried with reversed sync in case I got it wrong. I think the problem is a lack of understanding on my side about how DMA works in FreeBSD. What I do is I have a parent tag and two child tags (one for reading the other for writing), I do : bus_dma_tag_create -> bus_dmamap_create Later I do contigmalloc of my buffer and I load this buffer with bus_dmamap_load. I do bus_dmamap_sync before and after the call the BIOS. The writes are succesfull but the read buffer is left untouched. What do I do wrong? What is the exact use of the callback? Thanks for any hint.