From owner-freebsd-drivers@FreeBSD.ORG Sun Nov 26 13:44:21 2006 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 C0E7B16A407 for ; Sun, 26 Nov 2006 13:44:21 +0000 (UTC) (envelope-from freebsd@yelloworb.com) Received: from mail.yelloworb.com (user12.85-195-15.netatonce.net [85.195.15.12]) by mx1.FreeBSD.org (Postfix) with SMTP id 6595C43D82 for ; Sun, 26 Nov 2006 13:43:21 +0000 (GMT) (envelope-from freebsd@yelloworb.com) Received: (qmail 51547 invoked by uid 1010); 26 Nov 2006 13:44:14 -0000 Received: from gammaverse.priv.yelloworb.com (HELO ?127.0.0.1?) (karl-petter@yelloworb.com@192.168.132.11) by mail.yelloworb.com with SMTP; 26 Nov 2006 13:44:14 -0000 Message-ID: <45699A22.4050109@yelloworb.com> Date: Sun, 26 Nov 2006 14:44:02 +0100 From: =?ISO-8859-1?Q?Karl-Petter_=C5kesson?= User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: freebsd-drivers@freebsd.org, freebsd-hardware@freebsd.org, freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Driver for Agere 131x ? 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, 26 Nov 2006 13:44:21 -0000 Hi, I wanted a third network card in my BSD machine and since I have a PCI-E 1x port free I thought it could be good to buy a card for that since I wouldnt plug much anything else in there. The local computer shop had a Agere card which costed about 25$ so I just bought it. Though when I got home and started to search for a driver I realized no driver existed for FreeBSD, atleast what I could find. There exists one for Linux which I have found some links to: http://dadams1969.googlepages.com/et131xkernelmodule http://sourceforge.net/projects/et131x/ I have no experience of writing a driver for BSD nor trying to port one though have extensive programming experience so my question is; Is it very hard to do a port from Linux? Anyone got any good tips or references on how to start? Agere has datasheets for chip which would make it easier as well to create a driver. http://www.agere.com/entnet/doks/DS06_153_ET1310_7-11-06FINAL.pdf /Kalle From owner-freebsd-drivers@FreeBSD.ORG Mon Nov 27 14:37:42 2006 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 AE23316A4D4 for ; Mon, 27 Nov 2006 14:37:42 +0000 (UTC) (envelope-from v.sri.sai.ganesh@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id E900743D9B for ; Mon, 27 Nov 2006 14:36:15 +0000 (GMT) (envelope-from v.sri.sai.ganesh@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so1057241uge for ; Mon, 27 Nov 2006 06:37:14 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=BiBittV0ciLWXTZiECf7b+MxfH+5ut5ZJAKgmImd/oyl1BeLpMTsf0LVG63EYzfkPSAxfAc4dVE4sV1+y6shFA1FZ8ZO8KJCZH8AsBQZp46sGagjho2F74hyccfdSe4GSnl5KRhXlmtZXzrvVIi7zibK790kP85RDB77uY2SsWk= Received: by 10.67.100.17 with SMTP id c17mr12623792ugm.1164638234230; Mon, 27 Nov 2006 06:37:14 -0800 (PST) Received: by 10.67.90.9 with HTTP; Mon, 27 Nov 2006 06:37:13 -0800 (PST) Message-ID: <35586460611270637q18567951y71f6eb6c3cad5836@mail.gmail.com> Date: Mon, 27 Nov 2006 20:07:13 +0530 From: "V.SriSaiGanesh Venkataramani" To: freebsd-scsi@freebsd.org, freebsd-drivers@freebsd.org, Freebsd-users@uk.freebsd.org, freebsd-stable@freebsd.org, freebsd-standards@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: Regarding Multiple RAID controller support with FreeBSD 4.11 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, 27 Nov 2006 14:37:42 -0000 Hello, I have enabled the support for LSI SAS1068 controller with 4.11 Release, and i compiled the kernel with chnages, it compiles with some work arounds. When booting it successfully detects the LSI controller. I will tell my system config My system is HP Proliant DL380G4, and i have one internal SCSI embedded 6i card, to which i have connected my FreeBSD boot harddisk, and all of my freebsd slices lies there. I have connected two more controllers. One is Smart Array 642 controller, with no drives connected, and LSI SAS 1068 controller with two physical drive connected. Now i didnt create any LUNs with this controller, LSI SAS 1068, Smart Array 6i,Smart Array 642 controllers are connected in PCI slot 1, 3, and 6. I have selected 6i card as the boot Controller in BIOS stage, so initially when the system is powered on, it starts booting from my 6i controller. Without the LSI SAS driver, 6i controller's LUN's slices are mapped with /dev/da0s1a-/dev/da0s1f(with /dev/da0s1a as root partition). When i installed the system the root partition's slice was da0s1a. Now when i compiled the kernel with the support of LSI SAS driver, and i booted it, the LSI card first gets detected and the raw drives connected to LSI controller becomes da0, da1. Then my boot 6i gets detected and the LUN present in this conroller gets da2. When my new kernel tries to mount the root, it always sees the root in da0s1a. So it tells mount failed, and it gives me mountroot> prompt. I dont know how to give the root partition option as boot arguments in freebsd boot line, Or is there anything in config file, while we are compiling. How to allocate these device strings dynamically, or how to make our kernel takes the root parition dynamically. I need help regarding this issue. Help me out in figuring out the problem. I have tries disabling the SCSI BIOS in LSI's firrmware config utility, the firmware what am using does not have that support. Thanks and Regards, SaiGanesh From owner-freebsd-drivers@FreeBSD.ORG Mon Nov 27 18:17:48 2006 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 B4E2B16A403 for ; Mon, 27 Nov 2006 18:17:48 +0000 (UTC) (envelope-from sebastien.bourdeauducq@gmail.com) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC08043DA4 for ; Mon, 27 Nov 2006 17:45:12 +0000 (GMT) (envelope-from sebastien.bourdeauducq@gmail.com) Received: by nz-out-0102.google.com with SMTP id i11so684304nzh for ; Mon, 27 Nov 2006 09:46:13 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=YGwrk/MQQ7+093O8vBBjZXn0l3jAqDlowjDYNX7bYpqRbWDIhjRnKv1Lpp0YFMtC4Jh+roLbqdhYKAusdRhdqHNIcimvbPqhu+HpxsLpAVYLAOqVHj2h++ttW6HAEerjjWi7JLBxhGuQfdPjeVsB/kaVpTOtjpYCnVQPoPkuRok= Received: by 10.64.156.1 with SMTP id d1mr18245421qbe.1164649573350; Mon, 27 Nov 2006 09:46:13 -0800 (PST) Received: by 10.64.249.15 with HTTP; Mon, 27 Nov 2006 09:46:13 -0800 (PST) Message-ID: <3a947d1d0611270946yd9ef5ffna1b4232f8adde1ec@mail.gmail.com> Date: Mon, 27 Nov 2006 18:46:13 +0100 From: "Sebastien Bourdeauducq" To: freebsd-drivers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Garbage inserted in DMA transmission 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, 27 Nov 2006 18:17:48 -0000 Hello, I'm trying to send data to a device over PCI DMA. I set up the buffer and the map as follows : pci_enable_busmaster(dev); bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, sizeof(struct isl38xx_cb), 1, sizeof(struct isl38xx_cb), 0, NULL, NULL, &sc->bus.pci.cb_tag); bus_dmamem_alloc(sc->bus.pci.cb_tag, (void **)&sc->bus.pci.cb, BUS_DMA_NOWAIT|BUS_DMA_ZERO|BUS_DMA_COHERENT, &sc->bus.pci.cb_map); bus_dmamap_load(sc->bus.pci.cb_tag, sc->bus.pci.cb_map, &sc->bus.pci.cb, sizeof(struct isl38xx_cb), p54u_dma_map_addr, &sc->bus.pci.cb_dma_addr, BUS_DMA_NOWAIT); The callback function of bus_dmamap_load is : static void p54u_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error) { uint32_t *paddr; if(error) return; paddr = arg; *paddr = segs->ds_addr; } Then, I write data to sc->bus.pci.cb, issue a PRE_WRITE sync request and make the device download the frame. However, where the device should read 0 ; 1 ; 0 ; 0 ; 0 ; 0 ; 0 ; ... (32-bit words) it instead gets : 0000: c2c23800 00000000 038c9020 00000001 0010: c4690c00 00000000 c2bcf100 c4727d00 0020: 00000000 c4727d40 00000000 c47398c0 0030: 00000000 c4739b00 00000000 c4727cc0 0040: 00000000 c474fb00 00000000 c474fac0 0050: 00000000 c474fa80 00000000 c474fa40 .... When reading sc->bus.pci.cb from the host, I get the good values, not those strange words. 038c9020 is the PCI address of the mapping, I don't know what the other weird values are (c2c23800, c4690c00 ...). Any idea ? Looks like the device is reading data from the wrong place and gets some PCI configuration stuff instead... Full source code of the driver is at http://svnweb.tuxfamily.org/listing.php?repname=p54u+%28prism54%29&path=%2F&sc=0 See p54u.c, function p54u_attach(), and transport.c, function p54u_pci_dma_submit(). Regards, Sebastien From owner-freebsd-drivers@FreeBSD.ORG Tue Nov 28 11:06:06 2006 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 1B12916A4A0 for ; Tue, 28 Nov 2006 11:06:06 +0000 (UTC) (envelope-from gabelu@parsonskellogg.com) Received: from eatcake.ca (ALyon-254-1-81-153.w86-202.abo.wanadoo.fr [86.202.192.153]) by mx1.FreeBSD.org (Postfix) with SMTP id B144F43C9F for ; Tue, 28 Nov 2006 11:06:02 +0000 (GMT) (envelope-from gabelu@parsonskellogg.com) Message-ID: <000001c712dc$8049e520$f630a8c0@tkoswh> From: "Polina Slattery" To: freebsd-drivers@freebsd.org Date: Tue, 28 Nov 2006 03:01:05 -0800 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: ischemi X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polina Slattery List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Nov 2006 11:06:06 -0000 Hi, =20 VjAGRA_eq_$1,78 CjALiS_eh_$3,00 LEVjTRA_cu_$3,33 =20 www [dot] rx44 [dot] info _____ =20 understand us. From owner-freebsd-drivers@FreeBSD.ORG Tue Nov 28 20:32:54 2006 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 B0F7F16A415 for ; Tue, 28 Nov 2006 20:32:54 +0000 (UTC) (envelope-from sebastien.bourdeauducq@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id C172043CA9 for ; Tue, 28 Nov 2006 20:32:03 +0000 (GMT) (envelope-from sebastien.bourdeauducq@gmail.com) Received: by nf-out-0910.google.com with SMTP id x37so2533116nfc for ; Tue, 28 Nov 2006 12:31:42 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=ZPcHPSiaQCHdGbE3UvNYJkbHhdK3+LeEVSExm4k07tpqT/2tQqN0ygPkMQlX2Rn8Dagi+iBX1gUrU9ZBZwCpQecmGTbdpR3zwfZpTj1ARkdS7I4ramshObNSpUuFv9HyJxkZs9nVNZRD0frqaivwFI6OJyadUIU/dJHt/2UEpnY= Received: by 10.49.80.12 with SMTP id h12mr5155084nfl.1164745466900; Tue, 28 Nov 2006 12:24:26 -0800 (PST) Received: from ?193.48.225.133? ( [193.48.225.133]) by mx.google.com with ESMTP id n23sm16506476nfc.2006.11.28.12.24.25; Tue, 28 Nov 2006 12:24:25 -0800 (PST) Message-ID: <456C9B62.9090008@gmail.com> Date: Tue, 28 Nov 2006 21:26:10 +0100 From: Sebastien B User-Agent: Icedove 1.5.0.8 (X11/20061116) MIME-Version: 1.0 To: freebsd-drivers@freebsd.org References: <3a947d1d0611270946yd9ef5ffna1b4232f8adde1ec@mail.gmail.com> In-Reply-To: <3a947d1d0611270946yd9ef5ffna1b4232f8adde1ec@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Garbage inserted in DMA transmission 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, 28 Nov 2006 20:32:54 -0000 I fixed it. The line bus_dmamap_load(sc->bus.pci.cb_tag, sc->bus.pci.cb_map, &sc->bus.pci.cb, sizeof(struct isl38xx_cb), p54u_dma_map_addr, &sc->bus.pci.cb_dma_addr, BUS_DMA_NOWAIT); had to be replaced with bus_dmamap_load(sc->bus.pci.cb_tag, sc->bus.pci.cb_map, sc->bus.pci.cb, sizeof(struct isl38xx_cb), p54u_dma_map_addr, &sc->bus.pci.cb_dma_addr, BUS_DMA_NOWAIT); What a stupid bug. From owner-freebsd-drivers@FreeBSD.ORG Fri Dec 1 18:14:42 2006 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 5BE3F16A403; Fri, 1 Dec 2006 18:14:42 +0000 (UTC) (envelope-from freebsd@sopwith.solgatos.com) Received: from schitzo.solgatos.com (pool-71-245-104-192.ptldor.fios.verizon.net [71.245.104.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE67443CB4; Fri, 1 Dec 2006 18:14:24 +0000 (GMT) (envelope-from freebsd@sopwith.solgatos.com) Received: from schitzo.solgatos.com (localhost.home.localnet [127.0.0.1]) by schitzo.solgatos.com (8.13.8/8.13.6) with ESMTP id kB1IEdo4031252; Fri, 1 Dec 2006 10:14:39 -0800 Received: from sopwith.solgatos.com (uucp@localhost) by schitzo.solgatos.com (8.13.8/8.13.4/Submit) with UUCP id kB1IEd1q031249; Fri, 1 Dec 2006 10:14:39 -0800 Received: from localhost by sopwith.solgatos.com (8.8.8/6.24) id SAA07107; Fri, 1 Dec 2006 18:13:17 GMT Message-Id: <200612011813.SAA07107@sopwith.solgatos.com> To: freebsd-amd64@freebsd.org, freebsd-drivers@freebsd.org Date: Fri, 01 Dec 2006 10:13:17 +0000 From: Dieter Cc: Subject: nforce4 disk I/O X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd@sopwith.solgatos.com List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Dec 2006 18:14:42 -0000 I thought I tested disk I/O in the past and got full write speed to 4 drives at once, but now I get a slowdown if writing to more than one disk at once. FreeBSD 6.0 FFS with soft updates nvidia nforce 4 ultra 4 SATA drives 1 PATA drive 1 PATA CD/DVD (idle) Doing dd from /dev/zero to 1 drive, I get about 7 MB/s. Doing dd from /dev/zero to 2 drives, I get about 8 MB/s total. Doing dd from /dev/zero to 3 drives, I get about 8-9 MB/s total. Reading from one drive doesn't hurt the read or write speed to a second drive. I'm also getting things like one process that is I/O bound writing to a disk will significantly slow down a CPU bound process writing to a different disk, and the CPU becomes over 50% idle. I wonder if there is contention for a lock that only happens when writing? Does the driver hold a lock while waiting for the disk to say "yes I wrote that sector" ? atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xe000-0xe00f at device 6.0 on pci0 ata0: on atapci0 ata1: on atapci0 atapci1: port 0x9f0-0x9f7,0xbf0-0xbf3,0x970-0x977,0xb70-0xb73,0xcc00-0xcc0f mem 0xfebfb000-0xfebfbfff irq 10 at device 7.0 on pci0 ata2: on atapci1 ata3: on atapci1 atapci2: port 0x9e0-0x9e7,0xbe0-0xbe3,0x960-0x967,0xb60-0xb63,0xb800-0xb80f mem 0xfebfa000-0xfebfafff irq 11 at device 8.0 on pci0 ata4: on atapci2 ata5: on atapci2 acd0: DVDR at ata0-master UDMA66 ad2: 305245MB at ata1-master UDMA100 ad4: 238475MB at ata2-master SATA150 ad6: 238475MB at ata3-master SATA150 ad8: 238475MB at ata4-master SATA150 ad10: 305245MB at ata5-master SATA150 cd0 at ata0 bus 0 target 0 lun 0