From nobody@FreeBSD.org  Mon Aug 25 23:50:01 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A2D99106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 25 Aug 2008 23:50:01 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 82BC58FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 25 Aug 2008 23:50:01 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m7PNo1L0049624
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 25 Aug 2008 23:50:01 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m7PNo0s8049618;
	Mon, 25 Aug 2008 23:50:00 GMT
	(envelope-from nobody)
Message-Id: <200808252350.m7PNo0s8049618@www.freebsd.org>
Date: Mon, 25 Aug 2008 23:50:00 GMT
From: Steve Franks <stevefranks@ieee.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ports/misc/ezload - update: add hardware support for recent usb devices
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: mcampos@bpsw.biz

>Number:         126839
>Category:       ports
>Synopsis:       ports/misc/ezload - update: add hardware support for recent usb devices
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    stefan
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 26 00:00:10 UTC 2008
>Closed-Date:    Tue Oct 21 14:41:04 UTC 2008
>Last-Modified:  Tue Oct 21 14:50:01 UTC 2008
>Originator:     Steve Franks
>Release:        7-stable
>Organization:
>Environment:
applies to all freebsd releases
>Description:
Linux maintains a project, "fxload" which is analagous to ezload in all respects.  Ezload however, has not been updated since 2004, and new hardware has been added to the family with a different ID, necessitating a 1-line change to support it (this is a USB chipset; devices utilizing it include USB-MIDI dongles, and some jtag dongles; it is a very common chipset in my experience).

I have tried to reach the ezload maintainer several times without sucess.  The attatched diff makes ezload work on all my devices.  I suppose an alternative would be to port the linux fxload project from sourceforge, which I tried as well, but am no where near experienced enough to match linux's headers to freebsd's...

Note that ezload is actually two programs, ezdownload and ezupload.  The included patch is actually for ezdownload, and an analagous operation should no doubt be perfomed for ezupload as well.
>How-To-Repeat:
n/a
>Fix:
patch file included

Patch attached with submission follows:

--- ./ezdownload-0.4.0/ezdownload.c	2004-12-23 16:14:43.000000000 -0700
+++ ezdownload.c	2008-04-07 13:49:10.000000000 -0700
@@ -96,7 +96,7 @@
 /* See http://www.anchorchips.com for the
  * EZ-USB Technical Reference Manual (EZUSB_TRM.pdf).
  */
-#define CPUCS 0x7f92
+static unsigned int CPUCS = 0x7f92;
 #define USBSC 0x7fd6
 
 /* This whole reading routine sucks. you could do it in
@@ -340,7 +340,7 @@
 char * progname;
 void usage() 
 {
-	fprintf(stderr, "Syntax: %s [-r] [-v] [-f hexfile] device\n", progname);
+	fprintf(stderr, "Syntax: %s [-r] [-v] [-2] [-f hexfile] device\n", progname);
 	exit(1);
 }
 
@@ -363,7 +363,7 @@
 	progname = argv[0];
 
 	/* handle the arguments */
-	while((ch = getopt(argc, argv, "xrvf:")) != -1) 
+	while((ch = getopt(argc, argv, "2xrvf:")) != -1) 
 		switch (ch) {
 		case 'v':
 			verbose++;
@@ -374,6 +374,9 @@
 		case 'f':
 			hexfile = optarg;
 			break;
+		case '2':
+			CPUCS  = 0xe600;
+			break;
 		case 'x':
 			force = 1;
 			break;


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Tue Aug 26 00:00:20 UTC 2008 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=126839 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: mcampos@bpsw.biz
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/126839: ports/misc/ezload - update: add hardware support for recent usb devices
Date: Tue, 26 Aug 2008 00:00:18 UT

 Maintainer of misc/ezload,
 
 Please note that PR ports/126839 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/126839
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org
Responsible-Changed-From-To: freebsd-ports-bugs->stefan 
Responsible-Changed-By: stefan 
Responsible-Changed-When: Tue Oct 21 14:39:44 UTC 2008 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=126839 
State-Changed-From-To: feedback->closed 
State-Changed-By: stefan 
State-Changed-When: Tue Oct 21 14:40:49 UTC 2008 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=126839 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/126839: commit references a PR
Date: Tue, 21 Oct 2008 14:40:54 +0000 (UTC)

 stefan      2008-10-21 14:40:45 UTC
 
   FreeBSD ports repository
 
   Modified files:
     misc/ezload          Makefile 
   Added files:
     misc/ezload/files    patch-ezdownload-ezdownload.c 
   Log:
   Add hardware support for recent usb devices.
   
   PR:             126839
   Submitted by:   Steve Franks <stevefranks@ieee.org>
   Approved by:    maintainer timeout (2 months)
   
   Revision  Changes    Path
   1.14      +1 -0      ports/misc/ezload/Makefile
   1.1       +39 -0     ports/misc/ezload/files/patch-ezdownload-ezdownload.c (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
