From owner-freebsd-hackers Mon Sep 1 12:18:14 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA16067 for hackers-outgoing; Mon, 1 Sep 1997 12:18:14 -0700 (PDT) Received: from shell.wco.com (root@shell.wco.com [199.4.94.16]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id MAA16062 for ; Mon, 1 Sep 1997 12:18:10 -0700 (PDT) Received: from denali.campbell.ca.us (root@serpens205.wco.com [207.48.88.205]) by shell.wco.com (8.8.5/8.8.5/WCO-18jul97) with ESMTP id MAA12415 for ; Mon, 1 Sep 1997 12:18:06 -0700 (PDT) Received: from denali (jmattson@localhost [127.0.0.1]) by denali.campbell.ca.us (8.8.5/8.8.5) with ESMTP id MAA00247 for ; Mon, 1 Sep 1997 12:18:00 -0700 (PDT) Message-Id: <199709011918.MAA00247@denali.campbell.ca.us> To: freebsd-hackers@freebsd.org Subject: Patch for small annoyance in st driver Date: Mon, 01 Sep 1997 12:17:59 -0700 From: Jim Mattson Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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 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")); [The line is the same in FreeBSD-current.] Thanks, --jim