Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 May 2004 14:50:34 -0600 (MDT)
From:      Mike Durian <durian@shadetreesoftware.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/67357: Patch for uftdi to support Intrepidcs.com's vehicle bus interfaces
Message-ID:  <200405292050.i4TKoY8G001322@man.boogie.com>
Resent-Message-ID: <200405292100.i4TL0lu8020835@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405292050.i4TKoY8G001322>