diff options
| author | mycroft <mycroft@NetBSD.org> | 1993-08-01 19:22:24 +0000 |
|---|---|---|
| committer | mycroft <mycroft@NetBSD.org> | 1993-08-01 19:22:24 +0000 |
| commit | 4862b84c92d0bfcf45cba8b3c42670ce6364cf72 (patch) | |
| tree | 7002d2eaae48d735e31c734e7c3f633959dc6f0c /sys/dev | |
| parent | a579b792cea21df7472ef48a505bf5faaef7e641 (diff) | |
Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ata/wd.c | 19 | ||||
| -rw-r--r-- | sys/dev/cons.h | 5 | ||||
| -rw-r--r-- | sys/dev/isa/aha1542.c | 61 | ||||
| -rw-r--r-- | sys/dev/isa/if_ed.c | 8 | ||||
| -rw-r--r-- | sys/dev/isa/if_edreg.h | 3 | ||||
| -rw-r--r-- | sys/dev/isa/wd.c | 19 | ||||
| -rw-r--r-- | sys/dev/scsipi/cd.c | 7 | ||||
| -rw-r--r-- | sys/dev/scsipi/ch.c | 6 | ||||
| -rw-r--r-- | sys/dev/scsipi/sd.c | 6 | ||||
| -rw-r--r-- | sys/dev/scsipi/st.c | 6 |
10 files changed, 54 insertions, 86 deletions
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c index b70865ad26f..7b1be043b28 100644 --- a/sys/dev/ata/wd.c +++ b/sys/dev/ata/wd.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)wd.c 7.2 (Berkeley) 5/9/91 - * $Id: wd.c,v 1.25 1993/07/28 02:21:37 cgd Exp $ + * $Id: wd.c,v 1.26 1993/08/01 19:25:45 mycroft Exp $ */ /* Note: This code heavily modified by tih@barsoom.nhh.no; use at own risk! */ @@ -258,6 +258,8 @@ wdattach(struct isa_device *dvp) du->dk_dd.d_nsectors); for (i=blank=0; i<sizeof(du->dk_params.wdp_model); i++) { char c = du->dk_params.wdp_model[i]; + if (!c) + break; if (blank && c == ' ') continue; if (blank && c != ' ') { @@ -1130,7 +1132,7 @@ wdgetctlr(int u, struct disk *du) x = splbio(); /* not called from intr level ... */ wdc = du->dk_port; #ifdef TIPCAT - for (timeout=0; (inb(wdc+wd_status) & WDCS_READY) == 0; ) { + for (timeout=0; (inb(wdc+wd_status) & WDCS_BUSY); ) { DELAY(WDCDELAY); if(++timeout > WDCNDELAY) { splx(x); @@ -1143,6 +1145,19 @@ wdgetctlr(int u, struct disk *du) #endif #endif outb(wdc+wd_sdh, WDSD_IBM | (u << 4)); +#ifdef TIPCAT + for (timeout=0; (inb(wdc+wd_status) & WDCS_READY) == 0; ) { + DELAY(WDCDELAY); + if(++timeout > WDCNDELAY) { + splx(x); + return -1; + } + } +#ifdef WDCNDELAY_DEBUG + if(timeout>WDCNDELAY_DEBUG) + printf("wdc%d: timeout took %dus\n", du->dk_ctrlr, WDCDELAY * timeout); +#endif +#endif stat = wdcommand(du, WDCC_READP); #ifdef TIPCAT for (timeout=0; (inb(wdc+wd_status) & WDCS_READY) == 0; ) { diff --git a/sys/dev/cons.h b/sys/dev/cons.h index e254cfd4db9..53b0318d839 100644 --- a/sys/dev/cons.h +++ b/sys/dev/cons.h @@ -35,10 +35,9 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * from: Utah $Hdr: cons.h 1.1 90/07/09$ - * + * from: Utah Hdr: cons.h 1.1 90/07/09 * from: @(#)cons.h 7.3 (Berkeley) 11/2/90 - * $Id: cons.h,v 1.3 1993/07/07 11:13:08 deraadt Exp $ + * $Id: cons.h,v 1.4 1993/08/01 19:24:42 mycroft Exp $ */ struct consdev { diff --git a/sys/dev/isa/aha1542.c b/sys/dev/isa/aha1542.c index 207b71b8d81..5ff600b2f52 100644 --- a/sys/dev/isa/aha1542.c +++ b/sys/dev/isa/aha1542.c @@ -12,65 +12,7 @@ * on the understanding that TFS is not responsible for the correct * functioning of this software in any circumstances. * - * $Id: aha1542.c,v 1.12 1993/07/06 06:06:26 deraadt Exp $ - */ - -/* - * HISTORY - * $Log: aha1542.c,v $ - * Revision 1.12 1993/07/06 06:06:26 deraadt - * clean up code for timeout/untimeout/wakeup prototypes. - * - * Revision 1.11 1993/06/14 04:16:03 andrew - * Reduced bus-on time from the default of 11ms -> 9ms, to prevent floppy from - * becoming data-starved during simultaneous fd & scsi activity. - * - * Revision 1.10 1993/06/09 22:36:40 deraadt - * minor silliness related to two or more controllers - * - * Revision 1.9 1993/05/22 08:00:56 cgd - * add rcsids to everything and clean up headers - * - * Revision 1.8 1993/05/04 08:32:40 deraadt - * support for making dev->id_alive be set, this is for iostat to - * find disk devices. wee bit of a kludge. sub-device attach() - * routines must now return 1 for successful attach(), 0 otherwise. - * Other bsd's do this too.. - * - * Revision 1.7 1993/04/19 06:02:16 mycroft - * Fix subtle word-size error. - * - * Revision 1.6 1993/04/15 07:57:50 deraadt - * ioconf changes, see previous cvs's that dumped core - * - * Revision 1.4 1993/04/12 08:17:23 deraadt - * new scsi subsystem. - * changes also in config/mkioconf.c & sys/scsi/* - * - * Revision 1.1 1993/03/21 18:09:54 cgd - * after 0.2.2 "stable" patches applied - * - * Revision 1.6 1992/08/24 21:01:58 jason - * many changes and bugfixes for osf1 - * - * Revision 1.5 1992/07/31 01:22:03 julian - * support improved scsi.h layout - * - * Revision 1.4 1992/07/25 03:11:26 julian - * check each request fro sane flags. - * - * Revision 1.3 1992/07/24 00:52:45 julian - * improved timeout handling. - * added support for two arguments to the sd_done (or equiv) call so that - * they can pre-queue several arguments. - * slightly clean up error handling - * - * Revision 1.2 1992/07/17 22:03:54 julian - * upgraded the timeout code. - * added support for UIO-based i/o (as used for pmem operations) - * - * Revision 1.1 1992/05/27 00:51:12 balsup - * machkern/cor merge + * $Id: aha1542.c,v 1.13 1993/08/01 19:25:38 mycroft Exp $ */ /* @@ -544,6 +486,7 @@ ahaattach(struct isa_device *dev) int r; if(!(speedprint & (1<<masunit))) { + DELAY(1000000); speedprint |= (1<<masunit); printf("aha%d: bus speed %dns\n", masunit, speed[masunit]); } diff --git a/sys/dev/isa/if_ed.c b/sys/dev/isa/if_ed.c index 37021d573dc..7f806f5263a 100644 --- a/sys/dev/isa/if_ed.c +++ b/sys/dev/isa/if_ed.c @@ -11,10 +11,8 @@ * * Currently supports the Western Digital/SMC 8003 and 8013 series * and the 3Com 3c503 - */ - -/* - * $Id: if_ed.c,v 1.3 1993/07/28 02:21:17 cgd Exp $ + * + * $Id: if_ed.c,v 1.4 1993/08/01 19:25:42 mycroft Exp $ */ #include "ed.h" @@ -22,8 +20,6 @@ #include "bpfilter.h" #include "param.h" -#include "systm.h" -#include "select.h" #include "errno.h" #include "ioctl.h" #include "mbuf.h" diff --git a/sys/dev/isa/if_edreg.h b/sys/dev/isa/if_edreg.h index b6d1583df83..49ff969d729 100644 --- a/sys/dev/isa/if_edreg.h +++ b/sys/dev/isa/if_edreg.h @@ -1,8 +1,7 @@ /* * National Semiconductor DS8390 NIC register definitions * - * $Id: if_edreg.h,v 1.2 1993/07/28 02:21:23 cgd Exp $ - * + * $Id: if_edreg.h,v 1.3 1993/08/01 19:25:43 mycroft Exp $ */ /* diff --git a/sys/dev/isa/wd.c b/sys/dev/isa/wd.c index b70865ad26f..7b1be043b28 100644 --- a/sys/dev/isa/wd.c +++ b/sys/dev/isa/wd.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)wd.c 7.2 (Berkeley) 5/9/91 - * $Id: wd.c,v 1.25 1993/07/28 02:21:37 cgd Exp $ + * $Id: wd.c,v 1.26 1993/08/01 19:25:45 mycroft Exp $ */ /* Note: This code heavily modified by tih@barsoom.nhh.no; use at own risk! */ @@ -258,6 +258,8 @@ wdattach(struct isa_device *dvp) du->dk_dd.d_nsectors); for (i=blank=0; i<sizeof(du->dk_params.wdp_model); i++) { char c = du->dk_params.wdp_model[i]; + if (!c) + break; if (blank && c == ' ') continue; if (blank && c != ' ') { @@ -1130,7 +1132,7 @@ wdgetctlr(int u, struct disk *du) x = splbio(); /* not called from intr level ... */ wdc = du->dk_port; #ifdef TIPCAT - for (timeout=0; (inb(wdc+wd_status) & WDCS_READY) == 0; ) { + for (timeout=0; (inb(wdc+wd_status) & WDCS_BUSY); ) { DELAY(WDCDELAY); if(++timeout > WDCNDELAY) { splx(x); @@ -1143,6 +1145,19 @@ wdgetctlr(int u, struct disk *du) #endif #endif outb(wdc+wd_sdh, WDSD_IBM | (u << 4)); +#ifdef TIPCAT + for (timeout=0; (inb(wdc+wd_status) & WDCS_READY) == 0; ) { + DELAY(WDCDELAY); + if(++timeout > WDCNDELAY) { + splx(x); + return -1; + } + } +#ifdef WDCNDELAY_DEBUG + if(timeout>WDCNDELAY_DEBUG) + printf("wdc%d: timeout took %dus\n", du->dk_ctrlr, WDCDELAY * timeout); +#endif +#endif stat = wdcommand(du, WDCC_READP); #ifdef TIPCAT for (timeout=0; (inb(wdc+wd_status) & WDCS_READY) == 0; ) { diff --git a/sys/dev/scsipi/cd.c b/sys/dev/scsipi/cd.c index 50c248a3030..0d86b96e5aa 100644 --- a/sys/dev/scsipi/cd.c +++ b/sys/dev/scsipi/cd.c @@ -13,7 +13,7 @@ * on the understanding that TFS is not responsible for the correct * functioning of this software in any circumstances. * - * $Id: cd.c,v 1.15 1993/07/19 11:30:49 cgd Exp $ + * $Id: cd.c,v 1.16 1993/08/01 19:26:17 mycroft Exp $ */ #define SPLCD splbio @@ -273,7 +273,8 @@ int unit; while (!(xs = cd_free_xfer[unit])) { cd_xfer_block_wait[unit]++; /* someone waiting! */ - sleep((caddr_t)&cd_free_xfer[unit], PRIBIO+1); + tsleep((caddr_t)&cd_free_xfer[unit], PRIBIO+1, + "cd_get_xs", 0); cd_xfer_block_wait[unit]--; } cd_free_xfer[unit] = xs->next; @@ -1426,7 +1427,7 @@ retry: xs->error = XS_NOERROR; case SUCCESSFULLY_QUEUED: s = splbio(); while(!(xs->flags & ITSDONE)) - sleep((caddr_t)xs,PRIBIO+1); + tsleep((caddr_t)xs,PRIBIO+1, "cd_cmd", 0); splx(s); case HAD_ERROR: diff --git a/sys/dev/scsipi/ch.c b/sys/dev/scsipi/ch.c index c83dc7302aa..090f1766ed8 100644 --- a/sys/dev/scsipi/ch.c +++ b/sys/dev/scsipi/ch.c @@ -1,5 +1,5 @@ /* - * $Id: ch.c,v 1.3 1993/05/20 03:46:22 cgd Exp $ + * $Id: ch.c,v 1.4 1993/08/01 19:26:19 mycroft Exp $ */ #include <sys/types.h> @@ -635,7 +635,7 @@ int datalen; ch_xfer_block_wait[unit]++; /* there is someone waiting */ while (xs->flags & INUSE) { - sleep(&ch_xfer_block_wait[unit],PRIBIO+1); + tsleep(&ch_xfer_block_wait[unit],PRIBIO+1,"cd_cmd1",0); } ch_xfer_block_wait[unit]--; xs->flags = INUSE; @@ -669,7 +669,7 @@ retry: xs->error = XS_NOERROR; { case SUCCESSFULLY_QUEUED: while(!(xs->flags & ITSDONE)) - sleep(xs,PRIBIO+1); + tsleep(xs,PRIBIO+1,"cd_cmd2",0); case HAD_ERROR: case COMPLETE: diff --git a/sys/dev/scsipi/sd.c b/sys/dev/scsipi/sd.c index 6d7d95eee08..614255b9b48 100644 --- a/sys/dev/scsipi/sd.c +++ b/sys/dev/scsipi/sd.c @@ -13,7 +13,7 @@ * on the understanding that TFS is not responsible for the correct * functioning of this software in any circumstances. * - * $Id: sd.c,v 1.17 1993/07/19 11:30:52 cgd Exp $ + * $Id: sd.c,v 1.18 1993/08/01 19:26:21 mycroft Exp $ */ #include "sd.h" @@ -285,7 +285,7 @@ sd_get_xs(int unit, int flags) s = SPLSD(); while (!(xs = sd->freexfer)) { sd->blockwait++; /* someone waiting! */ - sleep((caddr_t)&sd->freexfer, PRIBIO+1); + tsleep((caddr_t)&sd->freexfer, PRIBIO+1, "sd_get_xs",0); sd->blockwait--; } sd->freexfer = xs->next; @@ -1083,7 +1083,7 @@ retry: case SUCCESSFULLY_QUEUED: s = splbio(); while(!(xs->flags & ITSDONE)) - sleep((caddr_t)xs, PRIBIO+1); + tsleep((caddr_t)xs, PRIBIO+1, "sd_cmd", 0); splx(s); case HAD_ERROR: /*printf("err = %d ", xs->error);*/ diff --git a/sys/dev/scsipi/st.c b/sys/dev/scsipi/st.c index 5e761d6c053..111a0846942 100644 --- a/sys/dev/scsipi/st.c +++ b/sys/dev/scsipi/st.c @@ -13,7 +13,7 @@ * on the understanding that TFS is not responsible for the correct * functioning of this software in any circumstances. * - * $Id: st.c,v 1.15 1993/07/28 02:22:41 cgd Exp $ + * $Id: st.c,v 1.16 1993/08/01 19:26:22 mycroft Exp $ */ /* @@ -1113,7 +1113,7 @@ st_scsi_cmd(int unit, struct scsi_generic *scsi_cmd, int cmdlen, s = splbio(); st->blockwait++; /* there is someone waiting */ while (xs->flags & INUSE) - sleep((caddr_t)&st->blockwait, PRIBIO+1); + tsleep((caddr_t)&st->blockwait, PRIBIO+1, "st_cmd1", 0); st->blockwait--; xs->flags = INUSE; if(!(flags & SCSI_NOMASK)) @@ -1144,7 +1144,7 @@ retry: case SUCCESSFULLY_QUEUED: s = splbio(); while(!(xs->flags & ITSDONE)) - sleep((caddr_t)xs,PRIBIO+1); + tsleep((caddr_t)xs,PRIBIO+1, "st_cmd2", 0); splx(s); case HAD_ERROR: case COMPLETE: |
