From owner-cvs-all Tue Oct 6 19:58:21 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA12912 for cvs-all-outgoing; Tue, 6 Oct 1998 19:58:21 -0700 (PDT) (envelope-from owner-cvs-all) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA12827; Tue, 6 Oct 1998 19:57:59 -0700 (PDT) (envelope-from ken@FreeBSD.org) From: Kenneth Merry Received: (from ken@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id TAA00471; Tue, 6 Oct 1998 19:57:58 -0700 (PDT) Date: Tue, 6 Oct 1998 19:57:58 -0700 (PDT) Message-Id: <199810070257.TAA00471@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: cvs commit: src/sys/cam/scsi scsi_cd.c scsi_da.c Sender: owner-cvs-all@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk ken 1998/10/06 19:57:58 PDT Modified files: sys/cam/scsi scsi_cd.c scsi_da.c Log: Some fixes for the CD and DA drivers from bde. (and some of my own as well) Among them: [ cd driver ] 1. Old labeling code was still there. 2. Error handling for dsopen() was broken (no test for the `error' returned by dsopen(); bogus test of an `error' that is known to be 0). 3. cdopen() closed the physical device after certain errors although there may still be open partitions on it. 4. cdclose() closed the physical device although there may still be open partitions on it. 5. Some printf format fixes was incomplete or missing. 6. cdioctl() truncated unit numbers mod 256. 7. cdioctl() was missing locking. [ da driver ] 1. daclose() closed the physical device although there may still be open partitions on it. This was fixed many years ago in sd.c rev.1.57. 2. A minor optimization (the dk_slices != NULL test) in sdopen() became uglier in daopen(). It is not worth doing. da only regressed compared with od and my version of sd, since I never committed the change to sd. daopen() should probably do less if some partition is already open. This is not addressed by the diffs. [ ... ] 5. "opt_hw_wdog.h" was not included, so the HW_WDOG code was unreachable. - Added a getdev CCB call in the cdopen() and daopen() calls so that the vendor name and device name are available for the disklabel. (suggested by bde) - Removed vestigal devfs support in both drivers, since we can't properly work with devfs yet. (ask bde for details on this) - Cleaned up the probe code in both drivers in the failure cases. There were a number of things wrong here. The peripheral driver instances weren't getting properly cleaned up. Sometimes the wrong probe message would get printed out (with the failure message appended), so it wasn't very clear that we failed to attach. SCSI sense information was printed, even when the error in question wasn't a SCSI error. I put similar fixes into the changer driver in revision 1.2 of scsi_ch.c. Reviewed by: gibbs Submitted by: bde (partially) Revision Changes Path 1.5 +97 -136 src/sys/cam/scsi/scsi_cd.c 1.6 +50 -63 src/sys/cam/scsi/scsi_da.c