From owner-freebsd-current@FreeBSD.ORG Fri Mar 18 07:35:38 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64C46106564A for ; Fri, 18 Mar 2011 07:35:38 +0000 (UTC) (envelope-from sergey.dyatko@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id E441E8FC13 for ; Fri, 18 Mar 2011 07:35:35 +0000 (UTC) Received: by fxm11 with SMTP id 11so3989572fxm.13 for ; Fri, 18 Mar 2011 00:35:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:from:to:cc:subject:message-id:in-reply-to :references:x-mailer:mime-version:content-type :content-transfer-encoding; bh=TtnaAOCRBp84QXz3Nwa+m/0goDrPLAK3GwfqukLaXV4=; b=e4cPK+Dz8DM/uW12L9JQHfQNziTB+U7oiG2fWbToUR8fAvIEReJw9cR84jB3scF8SU k5sdtK8CjMVZo4H7+tuIozVJQktx+rw9uPq5cChTXMTOo6+rt/srbgHQSRteK/pIyjTp ISGrmTKO4RDf+veg289RsoA+zhIzSzbpF0wcA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=WkI2zk5PzB5r2iZrYIsOrvp2Gv5mMiwML0fk4JdJ0hs+fLiFwt3Okl+PhoBnhLF3s5 b7ieCM60sl5SdLpGkoHApJb493WebQkOM2G4PW3CeZshzDjvipbr9yQ02BNLUwHlyH9i J+w9zyTUZHYmwKpVS5h4cEo+ILZJP3FXd6td8= Received: by 10.223.1.73 with SMTP id 9mr869997fae.44.1300433684602; Fri, 18 Mar 2011 00:34:44 -0700 (PDT) Received: from localhost (minsk.agava.net [212.98.174.157]) by mx.google.com with ESMTPS id j13sm234059faa.3.2011.03.18.00.34.42 (version=SSLv3 cipher=OTHER); Fri, 18 Mar 2011 00:34:42 -0700 (PDT) Date: Fri, 18 Mar 2011 09:34:56 +0200 From: "Sergey V. Dyatko" To: Aleksandr Rybalko Message-ID: <20110318093456.6e9311ac@gmail.com> In-Reply-To: <20110317175321.eb942d05.ray@dlink.ua> References: <20110314162936.d3f8fd5b.ray@dlink.ua> <4D80EE33.7010703@janh.de> <20110316204405.9308757d.ray@ddteam.net> <20110317132616.444fd733.ray@dlink.ua> <20110317171717.00a46365@gmail.com> <20110317175321.eb942d05.ray@dlink.ua> X-Mailer: Claws Mail 3.7.8 (GTK+ 2.22.1; i386-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: current-list freebsd Subject: Re: [CFR]rt2860 driver with kld module X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Mar 2011 07:35:38 -0000 On Thu, 17 Mar 2011 17:53:21 +0200 Aleksandr Rybalko wrote: > On Thu, 17 Mar 2011 17:17:17 +0200 > "Sergey V. Dyatko" wrote: > > >> On Thu, 17 Mar 2011 13:26:16 +0200 > >> Aleksandr Rybalko wrote: > >> > >> > Hi again! > >> > > >> > On Wed, 16 Mar 2011 20:44:05 +0200 > >> > Aleksandr Rybalko wrote: > >> > > >> > >> Hi, > >> > >> > >> > >> On Wed, 16 Mar 2011 18:06:59 +0100 > >> > >> Jan Henrik Sylvester wrote: > >> > >> > >> > >> > Hello! > >> > >> > > >> > >> > On 01/-10/-28163 20:59, Aleksandr Rybalko wrote: > >> > >> > > 3. RT2860 802.11n controller authors Damien Bergamini and > >> > >> > > Alexander Egorenkov > >> > >> > > http://my.ddteam.net/files/2011-03-14_rt2860.patch only > >> > >> > > modification to work with RT2872 (embedded to RT305[02] F) > >> > >> > > wrote by me. > >> > >> > > >> > >> > Is this supposed to work on its own bringing support for > >> > >> > Ralink 2860 to FreeBSD? (The one in the Asus EeePC > >> > >> > 901/1000H according to http://wiki.freebsd.org/AsusEee .) > >> > >> > > >> > >> > > Remaining issues: > >> > >> > > RT2860 support only Open(no crypto) mode for > >> > >> > > RT305[02]F > >> > >> > > >> > >> > Does this mean WPA should work for RT2860? (Just not for the > >> > >> > chips you added support for?) > >> > >> > >> > >> As I know this driver support WPA, but best place to read/ask > >> > >> about this on this thread > >> > >> http://forums.freebsd.org/showthread.php?t=7010 > >> > >> > >> > >> > > >> > >> > If this is supposed to bring RT2860 support to FreeBSD in > >> > >> > general: > >> > >> > > >> > >> > - Should it work on amd64 and i386? > >> > >> > - Should it work on 8.2-RELEASE? > >> > >> > - Should it work as a module? > >> > >> > > >> > >> > In case this is all supposed to work: I tried to create a > >> > >> > module on 8.2-RELEASE/amd64 by adding a simple > >> > >> > sys/modules/rt2860/Makefile (as I did not want to modify my > >> > >> > stock 8.2-RELEASE kernel). I only got to: > >> > >> > > >> > >> > In file included from > >> > >> > /usr/src/sys/modules/rt2860/../../dev/rt2860/rt2860.c:19: > >> > >> > @/dev/rt2860/rt2860_softc.h:52:24: error: opt_rt2860.h: No > >> > >> > such file or directory > >> > >> > > >> > >> > I do not find opt_rt2860.h anywhere in your patches. > >> > >> > Assuming it was optional, I have commented it out only to > >> > >> > get to: > >> > >> > > >> > >> > cc1: warnings being treated as errors > >> > >> > /usr/src/sys/modules/rt2860/../../dev/rt2860/rt2860_pci.c:63: > >> > >> > warning: 'rt2860_pci_detach' declared 'static' but never > >> > >> > defined > >> > >> > > >> > >> > Probably, I am doing something unsupported here (especially > >> > >> > as there is no if_rt2860_pci.c, which I would expect). > >> > >> > >> > >> No, it's me. Too much data, so I a little confused here. > >> > >> Patch targeting to start support RT3052F/RT3050F System on > >> > >> Chip. Which main part for embedded systems like routers, AP > >> > >> etc. > >> > >> > >> > >> To get it compiled need remove 'rt2860_pci_detach' > >> > >> declaration, because pci and obio interfaces have same detach > >> > >> device methods (rt2860_detach in rt2860.c) > >> > >> > >> > >> And opt_rt2860.h must be defined in sys/conf/options > >> > >> > >> > >> # options for the Ralink RT286x driver (rt2860) > >> > >> RT2860_DEBUG opt_rt2860.h > >> > >> > >> > >> > >> > >> > > >> > >> > Cheers, > >> > >> > Jan Henrik > >> > >> > >> > >> I will remake patch tomorrow. > >> > > >> > Fixed patch here > >> > http://my.ddteam.net/files/2011-03-17_rt2860.patch > >> > > >> include "opt_rt2860.h" still here (rt2860_softc.h), I removed it, > >> write simple Makefile: > >> > >> laptop# cat Makefile > >> # $FreeBSD$ > >> > >> .PATH: ${.CURDIR}/../../dev/rt2860 > >> > >> KMOD= if_rt2860 > >> SRCS= rt2860.c > >> SRCS+= device_if.h bus_if.h pci_if.h > >> .include > >> > >> laptop# pwd > >> /usr/src/sys/modules/rt2860 > >> laptop# make > >> Warning: Object directory not changed from > >> original /usr/src/sys/modules/rt2860 @ -> /usr/src/sys > >> machine -> /usr/src/sys/i386/include > >> x86 -> /usr/src/sys/x86/include > >> awk -f @/tools/makeobjops.awk @/kern/device_if.m -h > >> awk -f @/tools/makeobjops.awk @/kern/bus_if.m -h > >> awk -f @/tools/makeobjops.awk @/dev/pci/pci_if.m -h > >> cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE > >> -nostdinc -I. -I@ -I@/contrib/altq -finline-limit=8000 --param > >> inline-unit-growth=100 --param large-function-growth=1000 > >> -fno-common -mno-align-long-strings -mpreferred-stack-boundary=2 > >> -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float > >> -ffreestanding -fstack-protector -std=iso9899:1999 > >> -fstack-protector -Wall -Wredundant-decls -Wnested-externs > >> -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline > >> -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions > >> -c /usr/src/sys/modules/rt2860/../../dev/rt2860/rt2860.c ld -d > >> -warn-common -r -d -o if_rt2860.kld rt2860.o :> export_syms awk > >> -f /usr/src/sys/modules/rt2860/../../conf/kmod_syms.awk > >> if_rt2860.kld export_syms | xargs -J% objcopy % if_rt2860.kld ld > >> -Bshareable -d -warn-common -o if_rt2860.ko if_rt2860.kld objcopy > >> --strip-debug if_rt2860.ko > >> laptop# kldload ./if_rt2860.ko > >> kldload: can't load ./if_rt2860.ko: No such file or directory > >> > >> dmesg: link_elf: symbol rt2860_io_mac_write undefined > > Yeah, this is because you don't expect what driver have more than one > source file. > > > >> > >> p.s. let me know if you need any additional information > >> > >> > >> > >> > >> Thanks for your report and questions? > >> > >> > >> > >> -- > >> > >> Aleksandr Rybalko > >> > > >> > Many thanks for help. > >> > > >> > >> > > new patch with kld support > http://my.ddteam.net/files/2011-03-17_1_rt2860.patch > > I don't expect so much interest for this device on a PCI bus. And > forget to include useful parts like kld Makefile. Seems now this can > compile and work :) > panic: http://tiger.ipfw.ru/files/core_rt2860.txt > Thank you. > -- wbr, tiger