From owner-freebsd-bugs@FreeBSD.ORG Sat May 29 14:01:05 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9321016A4CE for ; Sat, 29 May 2004 14:01:05 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8226D43D41 for ; Sat, 29 May 2004 14:01:05 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i4TL0lJx020852 for ; Sat, 29 May 2004 14:00:47 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i4TL0lu8020835; Sat, 29 May 2004 14:00:47 -0700 (PDT) (envelope-from gnats) Resent-Date: Sat, 29 May 2004 14:00:47 -0700 (PDT) Resent-Message-Id: <200405292100.i4TL0lu8020835@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Mike Durian Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 22A7E16A4CE for ; Sat, 29 May 2004 13:50:52 -0700 (PDT) Received: from fever.boogie.com (cpe-66-87-52-132.co.sprintbbd.net [66.87.52.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5635443D41 for ; Sat, 29 May 2004 13:50:51 -0700 (PDT) (envelope-from durian@boogie.com) Received: from man.boogie.com (man.boogie.com [192.168.1.3]) by fever.boogie.com (8.12.11/8.12.11) with ESMTP id i4TKoZwT071935 for ; Sat, 29 May 2004 14:50:35 -0600 (MDT) (envelope-from durian@fever.boogie.com) Received: from man.boogie.com (localhost [127.0.0.1]) by man.boogie.com (8.12.11/8.12.11) with ESMTP id i4TKoYSD001323 for ; Sat, 29 May 2004 14:50:34 -0600 (MDT) (envelope-from durian@man.boogie.com) Received: (from durian@localhost) by man.boogie.com (8.12.11/8.12.11/Submit) id i4TKoY8G001322; Sat, 29 May 2004 14:50:34 -0600 (MDT) (envelope-from durian) Message-Id: <200405292050.i4TKoY8G001322@man.boogie.com> Date: Sat, 29 May 2004 14:50:34 -0600 (MDT) From: Mike Durian To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/67357: Patch for uftdi to support Intrepidcs.com's vehicle bus interfaces X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Mike Durian List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 May 2004 21:01:05 -0000 >Number: 67357 >Category: kern >Synopsis: Patch for uftdi to support Intrepidcs.com's vehicle bus interfaces >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat May 29 14:00:47 PDT 2004 >Closed-Date: >Last-Modified: >Originator: Mike Durian >Release: FreeBSD 5.2-CURRENT i386 >Organization: >Environment: System: FreeBSD man.boogie.com 5.2-CURRENT FreeBSD 5.2-CURRENT #6: Thu May 27 16:56:56 MDT 2004 root@man.boogie.com:/disk2/obj/disk2/src/sys/BOOGIE i386 >Description: This patch adds support to the uftdi driver for Intrepid Control Systems' vehicle bus interfaces. These interfaces use the FTDI chipset with different Vendor and Product IDs. I also addd two additional baud rate enumerations. The vehicle bus interfaces use a baud rate of 2000000. I also added 3000000 since it is the other FTDI baud divisor special case. A better fix would be to calculate the divisors on the fly for any arbitrary baud rate (+ the two 2M and 3M special cases). >How-To-Repeat: >Fix: --- usbdevs.orig Thu May 20 19:36:48 2004 +++ usbdevs Sat May 29 14:42:55 2004 @@ -316,6 +316,7 @@ vendor BIOMETRIC 0x0929 American Biometric Company vendor TOSHIBA 0x0930 Toshiba Corporation vendor PLEXTOR 0x093b Plextor Corp. +vendor INTREPIDCS 0x093c Intrepid Control Systems vendor YANO 0x094f Yano vendor KINGSTON 0x0951 Kingston Technology vendor BLUEWATER 0x0956 BlueWater Systems @@ -793,6 +794,10 @@ /* Intersil products */ product INTERSIL PRISM_2X 0x3642 Prism2.x or Atmel WLAN + +/* Interpid Control Systems products */ +product INTREPIDCS VALUECAN 0x0601 ValueCAN CAN bus interface +product INTREPIDCS NEOVI 0x0701 NeoVI Blue vehicle bus interface /* I/O DATA products */ product IODATA USBETT 0x0901 USB ETT --- uftdi.c.orig Wed Mar 17 18:02:46 2004 +++ uftdi.c Sat May 29 14:44:21 2004 @@ -164,6 +164,15 @@ uaa->product == USB_PRODUCT_FTDI_LK204)) return (UMATCH_VENDOR_PRODUCT); + /* + * The Intrepid Control Systems' ValueCAN and NeoVI vehicle + * bus interfaces use the FTDI interface. + */ + if (uaa->vendor == USB_VENDOR_INTREPIDCS && + (uaa->product == USB_PRODUCT_INTREPIDCS_VALUECAN || + uaa->product == USB_PRODUCT_INTREPIDCS_NEOVI)) + return (UMATCH_VENDOR_PRODUCT); + return (UMATCH_NONE); } @@ -223,6 +232,8 @@ case USB_PRODUCT_FTDI_MX4_5: case USB_PRODUCT_FTDI_LK202: case USB_PRODUCT_FTDI_LK204: + case USB_PRODUCT_INTREPIDCS_VALUECAN: + case USB_PRODUCT_INTREPIDCS_NEOVI: sc->sc_type = UFTDI_TYPE_8U232AM; sc->sc_hdrlen = 0; break; @@ -499,6 +510,8 @@ case 230400: rate = ftdi_8u232am_b230400; break; case 460800: rate = ftdi_8u232am_b460800; break; case 921600: rate = ftdi_8u232am_b921600; break; + case 2000000: rate = ftdi_8u232am_b2000000; break; + case 3000000: rate = ftdi_8u232am_b3000000; break; default: return (EINVAL); } --- uftdireg.h.orig Sat May 29 09:55:02 2004 +++ uftdireg.h Sat May 29 09:56:20 2004 @@ -104,7 +104,9 @@ ftdi_8u232am_b115200 = 0x001a, ftdi_8u232am_b230400 = 0x000d, ftdi_8u232am_b460800 = 0x4006, - ftdi_8u232am_b921600 = 0x8003 + ftdi_8u232am_b921600 = 0x8003, + ftdi_8u232am_b2000000 = 0x0001, /* special case for 2M baud */ + ftdi_8u232am_b3000000 = 0x0000 /* special case for 3M baud */ }; /* >Release-Note: >Audit-Trail: >Unformatted: