--- Net2/arch/i386/isa/bt742a.c 2018/04/24 18:11:57 1.1 +++ Net2/arch/i386/isa/bt742a.c 2018/04/24 18:19:56 1.1.1.2 @@ -12,22 +12,35 @@ * on the understanding that TFS is not responsible for the correct * functioning of this software in any circumstances. * - * - * PATCHES MAGIC LEVEL PATCH THAT GOT US HERE - * -------------------- ----- ---------------------- - * CURRENT PATCH LEVEL: 1 00098 - * -------------------- ----- ---------------------- - * - * 16 Feb 93 Julian Elischer ADDED for SCSI system + * bt742a.c,v 1.8 1993/07/17 11:00:09 deraadt Exp */ /* * HISTORY - * $Log: bt742a.c,v $ - * Revision 1.1 2018/04/24 18:11:57 root - * Initial revision + * bt742a.c,v + * Revision 1.8 1993/07/17 11:00:09 deraadt + * scsi_switch had wrong entries for these controllers... + * + * Revision 1.7 1993/06/09 22:36:49 deraadt + * minor silliness related to two or more controllers + * + * Revision 1.6 1993/05/22 08:01:05 cgd + * add rcsids to everything and clean up headers + * + * Revision 1.5 1993/05/04 08:32:44 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.4 1993/04/15 07:57:54 deraadt + * ioconf changes, see previous cvs's that dumped core + * + * Revision 1.3 1993/04/12 08:17:28 deraadt + * new scsi subsystem. + * changes also in config/mkioconf.c & sys/scsi/* * - * Revision 1.2 1993/04/10 12:05:14 glass + * Revision 1.2 1993/04/10 12:05:14 glass * fixed to be compliant, subservient, and to take advantage of the newly * hacked config(8) * @@ -433,6 +446,7 @@ long int bt_adapter_info(); struct scsi_switch bt_switch = { + "bt", bt_scsi_cmd, btminphys, 0, @@ -639,7 +653,7 @@ struct isa_dev *dev; #endif __386BSD__ btunit++; - return(1); + return(8); } /***********************************************\ @@ -648,28 +662,19 @@ struct isa_dev *dev; btattach(dev) struct isa_dev *dev; { - int unit = dev->dev_unit; - - -#ifdef __386BSD__ - printf(" probing for scsi devices**\n"); -#endif __386BSD__ - - /***********************************************\ - * ask the adapter what subunits are present * - \***********************************************/ - scsi_attachdevs( unit, bt_scsi_dev[unit], &bt_switch); -#if defined(OSF) - bt_attached[unit]=1; -#endif /* defined(OSF) */ - if(!unit) /* only one for all boards */ - { + static int firsttime; + int masunit = dev->id_masunit; + int r; + + r = scsi_attach(masunit, bt_scsi_dev[masunit], &bt_switch, + &dev->id_physid, &dev->id_unit, dev->id_flags); + + /* only one for all boards */ + if(firsttime==0) { + firsttime = 1; bt_timeout(0); } -#ifdef __386BSD__ - printf("bt%d",unit); -#endif __386BSD__ - return; + return r; } /***********************************************\