Date: Mon, 13 Apr 1998 11:48:43 +0900 From: Satoh Junichi <junichi@astec.co.jp> To: jeays@statcan.ca Cc: freebsd-stable@FreeBSD.ORG, junichi@astec.co.jp Subject: Re: ATAPI Zip drive Message-ID: <199804130248.LAA01315@kamui.astec.co.jp> In-Reply-To: Your message of "Tue, 31 Mar 1998 17:32:21 %2B0900" References: <199803310832.RAA24379@tamtam.astec.co.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
> > When I attempt to mount either the CD-ROM or the ZIP drive, mount
> > hangs, and I have to interrupt it with ctrl-C. If I do this
> > a second time, the system crashes. (X stops. Attempts to
> > log on through another tty don't work - characters entered after
> > the login prompt just get echoed to the screen. It is big red
> > switch time!)
>
> Hmm... I don't know why.
I tested some combination of ATAPI devices, CD-ROM, ZIP and LS-120, on
an IDE channel. I found the kernel is down by combination of the 'accel'
and the 'intr' devices. For example, MATSUSHITA x24 CD-ROM drive and
IOMEGA ZIP drive:
===========================================================================
wdc1: unit 0 (atapi): <MATSHITA CR-587/7S13>, removable, accel, dma, iordis
^^^^^
wdc1: unit 1 (atapi): <IOMEGA ZIP 100 ATAPI/23.D>, removable, intr,
^^^^
===========================================================================
Now, when one device supports the 'intr', the atapi driver also supports
it. It's not correct. The driver should *NOT* support it when the other
device doesn't support it.
I made a patch against the 2.2.6R atapi driver. After apply it, any
combinations are acceptable.
---
Junichi
[-- Attachment #2 --]
diff -r -c isa.ORG/atapi.c isa/atapi.c
*** isa.ORG/atapi.c Sat Jan 17 07:28:42 1998
--- isa/atapi.c Sun Apr 12 17:10:54 1998
***************
*** 218,229 ****
switch (ap->drqtype) {
case AT_DRQT_MPROC: ata->slow = 1; break;
case AT_DRQT_INTR: printf (", intr"); ata->intrcmd = 1; break;
! case AT_DRQT_ACCEL: printf (", accel"); break;
default: printf (", drq%d", ap->drqtype);
}
/* When 'slow' is set, clear 'intrcmd' */
if (ata->slow)
ata->intrcmd = 0;
/* overlap operation supported */
if (ap->ovlapflag)
--- 218,235 ----
switch (ap->drqtype) {
case AT_DRQT_MPROC: ata->slow = 1; break;
case AT_DRQT_INTR: printf (", intr"); ata->intrcmd = 1; break;
! case AT_DRQT_ACCEL: printf (", accel"); ata->accel = 1; break;
default: printf (", drq%d", ap->drqtype);
}
/* When 'slow' is set, clear 'intrcmd' */
if (ata->slow)
ata->intrcmd = 0;
+
+ /* When 'accel' and 'intrcmd' are set, clear 'intrcmd' and set 'slow' */
+ if (ata->accel && ata->intrcmd) {
+ ata->intrcmd = 0;
+ ata->slow = 1;
+ }
/* overlap operation supported */
if (ap->ovlapflag)
diff -r -c isa.ORG/atapi.h isa/atapi.h
*** isa.ORG/atapi.h Sat Jan 17 07:28:42 1998
--- isa/atapi.h Sun Apr 12 17:12:37 1998
***************
*** 234,239 ****
--- 234,240 ----
u_char cmd16 : 1; /* 16-byte command flag */
u_char intrcmd : 1; /* interrupt before cmd flag */
u_char slow : 1; /* slow reaction device */
+ u_char accel : 1; /* accell reaction device */
u_char attached[2]; /* units are attached to subdrivers */
struct atapi_params *params[2]; /* params for units 0,1 */
struct atapicmd *queue; /* queue of commands to perform */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804130248.LAA01315>
