--- Net2/arch/i386/isa/ultra14f.c 2018/04/24 18:11:59 1.1 +++ Net2/arch/i386/isa/ultra14f.c 2018/04/24 18:20:00 1.1.1.2 @@ -15,14 +15,7 @@ * 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 - * commenced: Sun Sep 27 18:14:01 PDT 1992 + * ultra14f.c,v 1.12.2.1 1993/07/22 10:06:59 cgd Exp */ #include @@ -66,13 +59,11 @@ /* */ -#ifdef __386BSD__ -#ifdef DDB -int Debugger(); -#else -#define Debugger() panic("should call debugger here") -#endif /*!DDB*/ -#endif __386BSD__ +#ifdef DDB +int Debugger(); +#else DDB +#define Debugger() panic("should call debugger here") +#endif /* DDB */ #ifdef MACH int Debugger(); @@ -302,6 +293,7 @@ int uha_debug = 0; struct scsi_switch uha_switch = { + "uha", uha_scsi_cmd, uhaminphys, 0, @@ -318,7 +310,7 @@ uha_send_mbox( int unit ,struct mscp *mscp) { int port = uha_data[unit].baseport; - int spincount = FUDGE(delaycount) * 1; /* 1ms should be enough */ + int spincount = FUDGE(delaycount) * 1000; /* 1s should be enough */ int s = splbio(); while( ((inb(port + UHA_LINT) & (UHA_LDIP)) @@ -436,7 +428,7 @@ struct isa_dev *dev; uha_unit ++; -return(1); + return(8); } /***********************************************\ @@ -445,26 +437,19 @@ return(1); uha_attach(dev) struct isa_dev *dev; { - int unit = dev->dev_unit; - - -#ifdef __386BSD__ - printf("uha%d: probing for scsi devices..", unit); -#endif __386BSD__ - - /***********************************************\ - * ask the adapter what subunits are present * - \***********************************************/ - scsi_attachdevs( unit, uha_data[unit].our_id, &uha_switch); - -#if defined(OSF) - uha_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, uha_data[masunit].our_id, &uha_switch, + &dev->id_physid, &dev->id_unit, dev->id_flags); + + /* only one for all boards */ + if(firsttime==0) { + firsttime = 1; uha_timeout(0); } - return; + return r; } /***********************************************\