From jfh@jfh00.fernuni-hagen.de  Mon Jan 17 00:57:36 2000
Return-Path: <jfh@jfh00.fernuni-hagen.de>
Received: from jfh00.fernuni-hagen.de (jfh00.fernuni-hagen.de [132.176.7.6])
	by hub.freebsd.org (Postfix) with ESMTP id CC82D14CA0
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Jan 2000 00:57:30 -0800 (PST)
	(envelope-from jfh@jfh00.fernuni-hagen.de)
Received: (from jfh@localhost)
	by jfh00.fernuni-hagen.de (8.9.3/8.9.3) id JAA63985;
	Mon, 17 Jan 2000 09:57:26 +0100 (CET)
	(envelope-from jfh)
Message-Id: <200001170857.JAA63985@jfh00.fernuni-hagen.de>
Date: Mon, 17 Jan 2000 09:57:26 +0100 (CET)
From: Fritz Heinrichmeyer <jfh@jfh00.fernuni-hagen.de>
Reply-To: jfh@jfh00.fernuni-hagen.de
To: FreeBSD-gnats-submit@freebsd.org
Subject: no more parallel port zip drive
X-Send-Pr-Version: 3.2

>Number:         16153
>Category:       kern
>Synopsis:       no more parallel port zip drive
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    n_hibma
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 17 01:00:01 PST 2000
>Closed-Date:    Sun Aug 13 05:24:53 PDT 2000
>Last-Modified:  Sun Aug 13 05:26:23 PDT 2000
>Originator:     Fritz Heinrichmeyer
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
FernUni Hagen 
>Environment:

	

ide-harddisk, parallel port zip drive

CPU: AMD-K6(tm) 3D processor (262.36-MHz 586-class CPU)
  Origin = "AuthenticAMD"  Id = 0x58c  Stepping = 12
  Features=0x8021bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,PGE,MMX>
  AMD Features=0x80000800<SYSCALL,3DNow!>
real memory  = 33554432 (32768K bytes)
avail memory = 29876224 (29176K bytes)
Preloaded elf kernel "kernel" at 0xc02bf000.
md0: Malloc disk
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Host to PCI bridge> on motherboard
pci0: <PCI bus> on pcib0
isab0: <SiS 85c503 PCI-ISA bridge> at device 1.0 on pci0
isa0: <ISA bus> on isab0
ata-pci0: <SiS 5591 ATA-33 controller> port
0x4000-0x400f,0x2000-0x2003,0x80400000-0x80400007,0xcc880a4-0xcc880a7,0x2143200-0x2143207
irq 0 at device 1.1 on pci0
ata-pci0: Busmastering DMA supported
ata0 at 0x01f0 irq 14 on ata-pci0

>Description:

no contact to zip drive any more 
dmesg says:

ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
pps0: <Pulse per second Timing Interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
vpo0: <Iomega VPI0 Parallel to SCSI interface> on ppbus0
vpo0: EPP 1.9 mode
vpo0: VP0 error/timeout (5)
vpo0: VP0 error/timeout (2)
vpo0: VP0 error/timeout (5)
vpo0: VP0 error/timeout (2)
vpo0: VP0 error/timeout (5)

	

>How-To-Repeat:
	reboot

	

>Fix:
	no fix
	


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: asmodai 
Responsible-Changed-When: Tue Feb 1 07:45:01 PST 2000 
Responsible-Changed-Why:  
Misfiled. 

From: Nick Hibma <n_hibma@calcaphon.com>
To: freebsd-gnats-submit@FreeBSD.org, jfh@jfh00.fernuni-hagen.de
Cc:  
Subject: Re: kern/16153: no more parallel port zip drive
Date: Tue, 04 Apr 2000 22:21:20 +0000

 I've spent some time trying to track this down, but failed
 unfortunately.
 
 As far as I can see the problem is somewhere in the inner
 core of the
 ppbus. The drive responds fairly normally and returns the 36
 bytes CAM
 requested (INQUIRY command). But then ppbus/vpo bails out
 with a 
 DATA_OVERFLOW error '...error/timeout (5)'.
 
 Nick
 

From: Nick Hibma <n_hibma@calcaphon.com>
To: freebsd-gnats-submit@FreeBSD.org, jfh@jfh00.fernuni-hagen.de
Cc:  
Subject: Re: kern/16153: no more parallel port zip drive
Date: Tue, 04 Apr 2000 22:46:50 +0000

 FYI, a piece of log file to show that the bug must be lower
 down and most probably is not the drives fault:
 
 vpo0: XPT_SCSI_IO (0x12) request
 count = 0, r = 0xa8
 count = 1, r = 0xa8
 count = 2, r = 0xa8
 ....
 count = 35, r = 0xa8
 count = 36, r = 0xa8
 vpo_do_scsi = 0, status = 0x0, count = 36, vpo_error = 5
 12 0 0 0 24 0
 vpo0: VP0 error/timeout (5)
 vpo0: XPT_SCSI_IO (0x12) request
 vpo_do_scsi = 0, status = 0x0, count = 36, vpo_error = 2
 12 0 0 0 24 0
 vpo0: VP0 error/timeout (2)
 vpo0: XPT_SCSI_IO (0x12) request
 vpo_do_scsi = 0, status = 0x0, count = 36, vpo_error = 2
 12 0 0 0 24 0
 count = 36, r = 0xa8
 vpo_do_scsi = 0, status = 0x0, count = 36, vpo_error = 5
 12 0 0 0 24 0
 vpo0: VP0 error/timeout (5)
 vpo0: XPT_SCSI_IO (0x12) request
 vpo_do_scsi = 0, status = 0x0, count = 36, vpo_error = 2
 12 0 0 0 24 0
 vpo0: VP0 error/timeout (2)
 
 The last error is most probably caused by the fact that the
 drive is confused.
 
 When count = 36, r should have been 0xb8.
 
 Nick
 

From: Nick Hibma <n_hibma@calcaphon.com>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: kern/16153: no more parallel port zip drive
Date: Wed, 05 Apr 2000 10:35:23 +0000

 I've seen reports of this problem happening with EPP
 and "PS/2" mode on the parallel port (I have no idea
 what "PS/2" mode on a parallel port would be though).
 

From: nsouch@FreeBSD.org
To: freebsd-gnats-submit@FreeBSD.org, jfh@jfh00.fernuni-hagen.de
Cc: ALTEN.SOUCHU@lanceurs.aeromatra.fr
Subject: Re: kern/16153: no more parallel port zip drive
Date: Thu, 20 Apr 2000 23:31:54 +0200 (CEST)

 The error is due to the mode of the parallel port.
 
 ppc driver detects NIBBLE (also called compatible) but the ZIP driver
 thinks the parallel port is in EPP mode. The ZIP protocol is
 completly different from one to another.
 
 So I guess that NIBBLE is right and EPP false.
 
 The problem comes certainly from one of the functions in the ppbus
 framework that returns the available modes of the parallel port to
 the zip driver.
 
 Either the ppc didn't initialize the info. correctly or the ppbus
 functions interpret it incorrectly.
 
 Nicholas
 
 nsouch@freebsd.org
 
State-Changed-From-To: open->feedback 
State-Changed-By: n_hibma 
State-Changed-When: Sun Aug 6 14:46:10 PDT 2000 
State-Changed-Why:  
Feedback requested (in previous submission to PR) 

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

From: Nick Hibma <n_hibma@calcaphon.com>
To: freebsd-gnats-submit@FreeBSD.org, jfh@jfh00.fernuni-hagen.de
Cc:  
Subject: Re: kern/16153: no more parallel port zip drive
Date: Sun, 06 Aug 2000 22:46:14 +0100

 A patch has been committed to CURRENT (rev. 1.10 of
 dev/ppbus/ppb_base.c) and STABLE (rev. 1.10.2.1 of same file). Diff
 attached below.
 
 Let me know if that fixed the problem for you.
 
 Nick
 
 ===================================================================
 RCS file: /home/ncvs/src/sys/dev/ppbus/ppb_base.c,v
 retrieving revision 1.10.2.1
 retrieving revision 1.10
 diff -wu -r1.10.2.1 -r1.10
 --- src/sys/dev/ppbus/ppb_base.c        2000/08/01 23:26:26     1.10.2.1
 +++ /home/ncvs/src/sys/dev/ppbus/ppb_base.c     2000/01/14 00:17:54    
 1.10
 @@ -131,11 +131,10 @@
         struct ppb_data *ppb = DEVTOSOFTC(bus);
         int old_mode = ppb_get_mode(bus);
  
 -       if (PPBUS_SETMODE(device_get_parent(bus), mode))
 -               return -1;
 -
 +       if (!PPBUS_SETMODE(device_get_parent(bus), mode)) {
                 /* XXX yet device mode = ppbus mode = chipset mode */
                 ppb->mode = (mode & PPB_MASK);
 +       }
  
         return (old_mode);
  }
 -- 
 Work: n_hibma@qubesoft.com             Personal: n_hibma@webweaving.org
 
Responsible-Changed-From-To: freebsd-bugs->n_hibma 
Responsible-Changed-By: n_hibma 
Responsible-Changed-When: Sun Aug 6 14:56:13 PDT 2000 
Responsible-Changed-Why:  
Remind me to close this PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=16153 
State-Changed-From-To: feedback->closed 
State-Changed-By: n_hibma 
State-Changed-When: Sun Aug 13 05:24:53 PDT 2000 
State-Changed-Why:  
The stated fix has been MFC-ed into 4.1STABLE 


http://www.freebsd.org/cgi/query-pr.cgi?pr=16153 
>Unformatted:
