From owner-cvs-sys Sun Apr 23 15:09:24 1995 Return-Path: cvs-sys-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id PAA10494 for cvs-sys-outgoing; Sun, 23 Apr 1995 15:09:24 -0700 Received: (from gibbs@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id PAA10277 ; Sun, 23 Apr 1995 15:07:58 -0700 Date: Sun, 23 Apr 1995 15:07:58 -0700 From: "Justin T. Gibbs" Message-Id: <199504232207.PAA10277@freefall.cdrom.com> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/scsi cd.c pt.c scsi_base.c scsiconf.h sd.c st.c worm.c Sender: cvs-sys-owner@freebsd.org Precedence: bulk gibbs 95/04/23 15:07:57 Modified: sys/i386/isa bt742a.c Log: Don't arbitrarily set SCSI_NOSLEEP. It is now handled correctly by the higher level scsi code. Spls should never be conditionalized, so don't do so here. Restructure the get_ccb routine so that we can't get into an infinite loop if the ccbs are exhausted and we are are called with SCSI_NOSLEEP set. Other driver maintainer's that based their ccb allocation routines on Julian's code should look at these changes and implement them for their driver. Submitted by: John Dyson Modified: sys/i386/scsi aic7xxx.c aic7xxx.h Log: Don't arbitrarily set SCSI_NOSLEEP. It is now handled correctly by the higher level scsi code. Spls should never be conditionalized, so don't do so here. Restructure the get_scb routine so that we can't get into an infinite loop if the ccbs are exhausted and we are are called with SCSI_NOSLEEP set. Other driver maintainer's that based their scb allocation routines on Julian's code should look at these changes and implement them for their driver. The aic7xxx driver inspired these changes because early revs of the aic7770 chips have so few SCBs that you can actually run out. If you have a rev C or aic7770 (as is reported by the driver probe) and had more than 2 drives, you could get into an infinite loop when using up all of the SCBs. Since the driver will only allow two SCBs per device and I only had two devices, I never saw this problem on my Rev C card. Bzero only 19 bytes of the scb instead of 2k (ack!). This was a hold over from when a struct SCB only contained the information downloaded to the board, but we now store kernel driver data in there as well. This greatly lowers the overhead for small transactions (I get ~1MB/sec for dds with a 512 byte block size). Submitted by: John Dyson with the aic7xxx specific optimization by me Modified: sys/scsi cd.c pt.c scsi_base.c scsiconf.h sd.c st.c worm.c Log: Set SCSI_NOSLEEP only when we really need to. This requires an additional flags parameter to all xxstart routines so that the correct information can be passed down into the device specific routines. This is needed to ensure that ccb/scb allocation routines don't hang. Submitted by: John Dyson