From owner-freebsd-questions@FreeBSD.ORG Tue Jan 8 23:13:44 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E4F616A417 for ; Tue, 8 Jan 2008 23:13:44 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.232]) by mx1.freebsd.org (Postfix) with ESMTP id 1C12313C46B for ; Tue, 8 Jan 2008 23:13:43 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: by nz-out-0506.google.com with SMTP id l8so8867nzf.13 for ; Tue, 08 Jan 2008 15:13:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; bh=DBlqKam/4z3MW9ZaDK8NcvARpbG5gPY1qgpJPgpUvUk=; b=nPvha6FeKzFzqyuMAp4svJhJDowQGFHWktM/pDHsZCiYKrTAOlj4bbzLY1JofS3Wap1Mqv4y5yqUzssp9Y1l7hWL6LOS2RXnhKPge6X20Jq/eoB9CivW8AeA1piBBlwHWsDl3k3LlB5iFvi5HY/eFazXcBrQw5J1b091TkCTWsU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=mEuQ1dH3CyVIU+OlB/Vo2oLySpsQcGef8/ZAvoi/jKAYoXQ5vGRpfPWw+BYhQuzzhfqX31AL0e7QINnPkoufHwDdGRAJ9kDQGeqDDOgI3e+Wyf8Cd763u+6o98AaemdsW1fCkwZ0oLtSW1ExDQ2DxvMfdMtB+UZEJ67DhOhjyfQ= Received: by 10.142.245.10 with SMTP id s10mr1413643wfh.186.1199834021869; Tue, 08 Jan 2008 15:13:41 -0800 (PST) Received: by 10.142.172.9 with HTTP; Tue, 8 Jan 2008 15:13:41 -0800 (PST) Message-ID: <539c60b90801081513t58df0ab3vceab838848a6849f@mail.gmail.com> Date: Tue, 8 Jan 2008 16:13:41 -0700 From: "Steve Franks" Sender: bahamasfranks@gmail.com To: "User Questions" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: 3e95c6462f13840a Subject: Re: how to compile and install a new driver [for CP2101] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: stevefranks@ieee.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2008 23:13:44 -0000 I thought a number of people would be interested in my experience with the CP2101 driver on FreeBSD, so here it is: ---------- Forwarded message ---------- From: Steve Franks Date: Dec 25, 2007 4:41 PM Subject: Re: usb/119002: add "ucp" driver support To: bug-followup@freebsd.org, stevefranks@ieee.org Sucess! I have built and proven that the ucp.ko driver works with all my various work and hobby projects using the Silicon Laboratories CP2101, CP2102, and CP2103 devices. There are alot of other off-the-shelf OEM devices using this chipset, which allow for different VID's & PID's (see the patch file) - I was obviously unable to test them as I only have the manufacturer's reference design style hardware, but there is no way to modify the operation of the chipset except for the VID & PID, so I assume they will work fine if FreeBSD recognizes the VID & PID - not a usb expert. Test was performed with Minicom talking to /dev/cuaU0; after kldload ucp, plugging in a CP210x yields "ucom0" in dmesg, and cuaU0 in /dev. I think my earlier problem was due to the patch mucking the system - if run from /usr/src/sys, it doesn't create the modules/ucp folder like it should, don't know why. Here's what I did that worked: 1. /usr/src/sys/dev/usb# patch < ~/ucp-0.01.diff 2. /usr/src/sys/dev/usb# mkdir /usr/src/sys/modules/ucp 3. /usr/src/sys/dev/usb# mv Makefile /usr/src/sys/modules/ucp 3a. Once you have proven it works, you might want to remove the -DEBUG line from this makefile (I did up front, never tested with debug symbols/code on my system) 4. manually edit /usr/src/sys/dev/usb/usbdevs to fix the patch collision and add all the new lines (specifically vendor SILABS 0x10c4 Silicon labs) 5. manually edit /usr/src/sys/modules/Makefile to add the line: ucp \ after the line ucom \ 6. build & install kernel Incidentally, since I cvsup'd to clean up my previous mess, I am now on 6.3-xxx, but I don't think that was a factor in making it work. Also, note that step 5 is not in the diff file at all for some reason, as opposed to step 4 which simply didn't patch in automatically. Best, Steve