From owner-freebsd-hackers Sun Aug 17 13:41:21 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id NAA20696 for hackers-outgoing; Sun, 17 Aug 1997 13:41:21 -0700 (PDT) Received: from verdi.nethelp.no (verdi.nethelp.no [195.1.171.130]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id NAA20673 for ; Sun, 17 Aug 1997 13:41:15 -0700 (PDT) From: sthaug@nethelp.no Received: (qmail 500 invoked by uid 1001); 17 Aug 1997 20:41:10 +0000 (GMT) To: hackers@freebsd.org Subject: Problems detecting ATAPI CDROM in 2.2-970801-RELENG X-Mailer: Mew version 1.05+ on Emacs 19.28.2 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Date: Sun, 17 Aug 1997 22:41:10 +0200 Message-ID: <498.871850470@verdi.nethelp.no> Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I recently upgraded a machine here from 2.2-BETA (as of 961226) to 2.2-970801-RELENG. This broke the detection of an ATAPI CDROM on wdc1. Further checking (by adding kernel printf's to sys/i386/isa/wd.c) showed that the problem is in wdprobe(). If I add a printf just before line 340 of wd.c (version 1.119.2.6): printf("XXX %s%d get errstatus\n", dvp->id_driver->name, unit); du->dk_error = inb(du->dk_port + wd_error); the CDROM is detected just fine. If I revert to the original wd.c, the CDROM is not detected. Obviously there's a timing issue here, and the printf adds enough of a delay that the detection works. However, as far as I can see both wdprobe and wdcommand (which is called just before my printf) are exactly the same in 2.2-BETA and 2.2-970801-RELENG. Any good ideas? Steinar Haug, Nethelp consulting, sthaug@nethelp.no