Skip site navigation (1)Skip section navigation (2)
Date:      9 Jun 1999 11:28:29 -0000
From:      jedgar@fxp.org
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/12095: [PATCH] Buggy ATAPI Zip Drive is not detected properly
Message-ID:  <19990609112829.36640.qmail@pawn.primelocation.net>

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

>Number:         12095
>Category:       kern
>Synopsis:       [PATCH] Buggy ATAPI Zip Drive is not detected properly
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun  9 04:30:00 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Chris D. Faulhaber
>Release:        FreeBSD 3.2-STABLE i386
>Organization:
>Environment:

FreeBSD [....] 3.2-STABLE FreeBSD 3.2-STABLE #22: Mon Jun  7 12:08:27
EDT 1999 root@[....]:/usr/src/sys/compile/EARTH  i386

>Description:

The current revision of /usr/src/sys/i386/isa/wfd.c does not properly
detect all buggy ATAPI Zip Drive firmware revisions.  Currently, the
driver checks to see if the drive is a Zip Drive using:
   if (!strcmp(ap->model, "IOMEGA  ZIP 100       ATAPI")) {
then sets t->maxblks = 64.  I own an OEM Zip Drive (NEC) whose inquiry
is: <IOMEGA  ZIP 100       ATAPI       Floppy/12.A>.  Since this drive
is not detected as a Zip Drive using the current method, and has buggy
firmware, it will lock up when t->maxblks is > 64.

>How-To-Repeat:

1) Attach an ATAPI Zip Drive to the system with an inquiry string slightly
different than what is currently tested for, such as:
     <IOMEGA  ZIP 100       ATAPI       Floppy/12.A>
versus a 'normal' Zip Drive:
     <IOMEGA  ZIP 100       ATAPI/13.A>

>Fix:
	
Apply the following patch.  This patch limits the test for a Zip Drive,
to the first 11 characters using strncmp; same as Soren Schmidt's test
in the new atapi-fd drivers.  This patch applies to /sys/i386/isa/wfd.c
revision:    $Id: wfd.c,v 1.17.2.1 1999/02/18 22:06:08 ken Exp $


--- /sys/i386/isa/wfd.c.orig	Thu Feb 18 17:06:08 1999
+++ /sys/i386/isa/wfd.c	Tue Jun  8 07:25:20 1999
@@ -247,7 +247,7 @@
 	 * is known to lock up if transfers > 64 blocks are
 	 * requested.
 	 */
-	if (!strcmp(ap->model, "IOMEGA  ZIP 100       ATAPI")) {
+	if (!strncmp(ap->model, "IOMEGA  ZIP", 11)) {
 		printf("wfd%d: buggy Zip drive, 64-block transfer limit set\n",
 		       t->lun);
 		t->maxblks = 64;


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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