Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Sep 1997 23:26:37 +0200 (MET DST)
From:      Wilko Bulte <wilko@yedi.iaf.nl>
To:        jmattson@wco.com (Jim Mattson)
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Patch for small annoyance in st driver
Message-ID:  <199709012126.XAA02739@yedi.iaf.nl>
In-Reply-To: <199709011918.MAA00247@denali.campbell.ca.us> from "Jim Mattson" at Sep 1, 97 12:17:59 pm

next in thread | previous in thread | raw e-mail | index | archive | help
As Jim Mattson wrote...

> With 2.2.2-RELEASE, I get the following error on every open of my tape
> device:
> 
>   st0(ahc0:4:0): ILLEGAL REQUEST asc:20,0 Invalid command operation code

Whether this happens depends on the device at hand. Some devices (the
smarter ones) simply accept and ignore the command when they cannot 
act on the PREVENT MEDIUM REMOVAL (think it's called that). 

> 
> I've tracked this down to the call to scsi_prevent() in st_open().
> Given the pre-existing comment, the following change seems justified.
> (Oh, and it gets rid of the annoying message too!)
> 
> *** st.c	1997/09/01 18:39:49	1.1
> --- st.c	1997/09/01 18:58:17
> ***************
> *** 433,439 ****
>   	if ((flags & O_ACCMODE) == FWRITE)
>   		st->flags |= ST_WRITTEN;
>   
> ! 	scsi_prevent(sc_link, PR_PREVENT, 0);	/* who cares if it fails? */
>   
>   	SC_DEBUG(sc_link, SDEV_DB2, ("Open complete\n"));
>   
> --- 433,439 ----
>   	if ((flags & O_ACCMODE) == FWRITE)
>   		st->flags |= ST_WRITTEN;
>   
> ! 	scsi_prevent(sc_link, PR_PREVENT, SCSI_SILENT | SCSI_ERR_OK);	/* who cares if it fails? */
>   
>   	SC_DEBUG(sc_link, SDEV_DB2, ("Open complete\n"));

Looks OK in my humble view.

_     ____________________________________________________________________
 |   / o / /  _  Bulte  email: wilko@yedi.iaf.nl http://www.tcja.nl/~wilko
 |/|/ / / /( (_) Arnhem, The Netherlands - Do, or do not. There is no 'try'
----------------------------------------------------------------------Yoda



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