Update to match config(8).

This commit is contained in:
mycroft 1994-03-12 03:34:02 +00:00
parent d72e576cfb
commit d884f7c425
15 changed files with 64 additions and 73 deletions

View File

@ -12,7 +12,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
* $Id: aha1742.c,v 1.19 1994/03/10 20:52:12 mycroft Exp $
* $Id: aha1742.c,v 1.20 1994/03/12 03:34:04 mycroft Exp $
*/
#include "ahb.h"
@ -391,7 +391,7 @@ ahbprobe(struct isa_device *dev)
int port;
u_char byte1,byte2,byte3;
if (dev->id_masunit != -1)
if (dev->id_parent)
return 1;
ahb_slot++;
@ -456,10 +456,10 @@ ahb_attach(struct isa_device *dev)
{
static int firsttime;
static int firstswitch[NAHB];
int masunit = dev->id_masunit;
int masunit = dev->id_parent->id_unit;
int r;
if (masunit == -1)
if (!dev->id_parent)
return 1;
if (!firstswitch[masunit]) {

View File

@ -12,7 +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.20 1994/03/10 20:52:09 mycroft Exp $
* $Id: aha1542.c,v 1.21 1994/03/12 03:34:02 mycroft Exp $
*/
/*
@ -448,7 +448,7 @@ ahaprobe(struct isa_device *dev)
{
int unit;
if (dev->id_masunit != -1)
if (dev->id_parent)
return 1;
dev->id_unit = unit = ahaunit;
@ -483,10 +483,10 @@ ahaattach(struct isa_device *dev)
static int firsttime;
static int firstswitch[NAHA];
static u_long speedprint; /* max 32 aha controllers */
int masunit = dev->id_masunit;
int masunit = dev->id_parent->id_unit;
int r;
if (masunit == -1)
if (!dev->id_parent)
return 1;
if (!firstswitch[masunit]) {

View File

@ -12,7 +12,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
* $Id: aha1742.c,v 1.19 1994/03/10 20:52:12 mycroft Exp $
* $Id: aha1742.c,v 1.20 1994/03/12 03:34:04 mycroft Exp $
*/
#include "ahb.h"
@ -391,7 +391,7 @@ ahbprobe(struct isa_device *dev)
int port;
u_char byte1,byte2,byte3;
if (dev->id_masunit != -1)
if (dev->id_parent)
return 1;
ahb_slot++;
@ -456,10 +456,10 @@ ahb_attach(struct isa_device *dev)
{
static int firsttime;
static int firstswitch[NAHB];
int masunit = dev->id_masunit;
int masunit = dev->id_parent->id_unit;
int r;
if (masunit == -1)
if (!dev->id_parent)
return 1;
if (!firstswitch[masunit]) {

View File

@ -12,7 +12,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
* $Id: bt742a.c,v 1.17 1994/03/10 20:52:14 mycroft Exp $
* $Id: bt742a.c,v 1.18 1994/03/12 03:34:06 mycroft Exp $
*/
/*
@ -460,7 +460,7 @@ btprobe(dev)
int unit;
struct bt_data *bt;
if (dev->id_masunit != -1)
if (dev->id_parent)
return 1;
dev->id_unit = unit = btunit;
@ -495,10 +495,10 @@ btattach(dev)
{
static int firsttime;
static int firstswitch[NBT];
int masunit = dev->id_masunit;
int masunit = dev->id_parent->id_unit;
int r;
if (masunit == -1)
if (!dev->id_parent)
return 1;
if (!firstswitch[masunit]) {

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
* $Id: fd.c,v 1.32 1994/03/10 22:30:06 mycroft Exp $
* $Id: fd.c,v 1.33 1994/03/12 03:39:00 mycroft Exp $
*
* Largely rewritten to handle multiple controllers and drives
* By Julian Elischer, Sun Apr 4 16:34:33 WST 1993
@ -266,22 +266,22 @@ struct isa_device *dev;
{
unsigned fdt=0,st0, cyl;
fdu_t fdu = dev->id_unit;
fdcu_t fdcu = dev->id_masunit;
fdc_p fdc = &fdc_data[dev->id_masunit];
fd_p fd = &fd_data[dev->id_unit];
fdcu_t fdcu = dev->id_parent->id_unit;
fdc_p fdc = &fdc_data[fdcu];
fd_p fd = &fd_data[fdu];
int fdsu = dev->id_physid;
if(dev->id_physid < 0 || dev->id_physid > 1) {
if(fdsu < 0 || fdsu > 1) {
printf("fdc%d: cannot support physical unit %d\n",
dev->id_masunit, dev->id_physid);
fdcu, fdsu);
return 0;
}
if(dev->id_masunit==0)
if(fdcu==0)
fdt = rtcin(RTC_FDISKETTE);
else
fdt = 0xff; /* cmos only knows two floppies */
if(dev->id_physid == 1)
if(fdsu == 1)
fdt <<= 4;
#ifdef notyet
@ -306,32 +306,32 @@ struct isa_device *dev;
switch(fdt & 0xf0) {
case RTCFDT_NONE:
/*printf("fd%d at fdc%d targ %d: nonexistant device\n",
dev->id_unit, dev->id_masunit, dev->id_physid);*/
fdu, fdcu, fdsu);*/
return 0;
break;
case RTCFDT_12M:
printf("fd%d at fdc%d targ %d: 1.2MB 80 cyl, 2 head, 15 sec\n",
dev->id_unit, dev->id_masunit, dev->id_physid);
fdu, fdcu, fdsu);
fd->type = 1;
break;
case RTCFDT_144M:
printf("fd%d at fdc%d targ %d: 1.44MB 80 cyl, 2 head, 18 sec\n",
dev->id_unit, dev->id_masunit, dev->id_physid);
fdu, fdcu, fdsu);
fd->type = 0;
break;
case RTCFDT_360K:
printf("fd%d at fdc%d targ %d: 360KB 40 cyl, 2 head, 9 sec\n",
dev->id_unit, dev->id_masunit, dev->id_physid);
fdu, fdcu, fdsu);
fd->type = 3;
break;
case RTCFDT_720K:
printf("fd%d at fdc%d targ %d: 720KB 80 cyl, 2 head, 9 sec\n",
dev->id_unit, dev->id_masunit, dev->id_physid);
fdu, fdcu, fdsu);
fd->type = 4;
break;
default:
printf("fd%d at fdc%d targ %d: unknown device type 0x%x\n",
dev->id_unit, dev->id_masunit, dev->id_physid,
fdu, fdcu, fdsu,
fdt & 0xf0);
return 0;
break;

View File

@ -15,7 +15,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
* $Id: ultra14f.c,v 1.20 1994/03/10 20:52:17 mycroft Exp $
* $Id: ultra14f.c,v 1.21 1994/03/12 03:34:08 mycroft Exp $
*/
#include <sys/types.h>
@ -396,7 +396,7 @@ struct isa_device *dev;
{
int unit;
if (dev->id_masunit != -1)
if (dev->id_parent)
return 1;
dev->id_unit = unit = uha_unit;
@ -430,10 +430,10 @@ struct isa_device *dev;
{
static int firsttime;
static int firstswitch[NUHA];
int masunit = dev->id_masunit;
int masunit = dev->id_parent->id_unit;
int r;
if (masunit == -1)
if (!dev->id_parent)
return 1;
if (!firstswitch[masunit]) {

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
* $Id: wd.c,v 1.69 1994/03/11 23:29:12 mycroft Exp $
* $Id: wd.c,v 1.70 1994/03/12 03:41:13 mycroft Exp $
*/
#define INSTRUMENT /* instrumentation stuff by Brad Parker */
@ -265,9 +265,6 @@ wdattach(dev)
struct wdc_softc *wdc;
int i, blank;
if (dev->id_masunit >= NWDC)
return 0;
lunit = dev->id_unit;
if (lunit == -1) {
printf("%s: cannot support unit ?\n", wdc->sc_dev.dv_xname);
@ -276,7 +273,7 @@ wdattach(dev)
if (lunit >= NWD)
return 0;
wdc = &wdc_softc[dev->id_masunit];
wdc = &wdc_softc[dev->id_parent->id_unit];
wd_softc[lunit] = wd =
(void *)malloc(sizeof(struct wd_softc), M_TEMP, M_NOWAIT);

View File

@ -16,7 +16,7 @@
* scatter gather is done by the board, then look at one of the Adaptec
* drivers to finish off the job..
*
* $Id: wd7000.c,v 1.13 1994/03/10 20:52:18 mycroft Exp $
* $Id: wd7000.c,v 1.14 1994/03/12 03:34:10 mycroft Exp $
*/
#include "wds.h"
#if NWDS > 0
@ -220,7 +220,7 @@ wdsprobe(struct isa_device *dev)
/*scsi_debug = PRINTROUTINES | TRACEOPENS | TRACEINTERRUPTS |
SHOWREQUESTS | SHOWSCATGATH | SHOWINQUIRY | SHOWCOMMANDS;*/
if (dev->id_masunit != -1)
if (dev->id_parent)
return 1;
if(wdsunit > NWDS)
@ -580,12 +580,12 @@ wds_getvers(int unit)
int
wdsattach(struct isa_device *dev)
{
int masunit = dev->id_masunit;
int masunit = dev->id_parent->id_unit;
static int firstswitch[NWDS];
static u_long versprobe /* max 32 controllers */
int r;
if (masunit == -1)
if (!dev->id_parent)
return 1;
if( !(versprobe & (1<<masunit))) {

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
* $Id: wd.c,v 1.69 1994/03/11 23:29:12 mycroft Exp $
* $Id: wd.c,v 1.70 1994/03/12 03:41:13 mycroft Exp $
*/
#define INSTRUMENT /* instrumentation stuff by Brad Parker */
@ -265,9 +265,6 @@ wdattach(dev)
struct wdc_softc *wdc;
int i, blank;
if (dev->id_masunit >= NWDC)
return 0;
lunit = dev->id_unit;
if (lunit == -1) {
printf("%s: cannot support unit ?\n", wdc->sc_dev.dv_xname);
@ -276,7 +273,7 @@ wdattach(dev)
if (lunit >= NWD)
return 0;
wdc = &wdc_softc[dev->id_masunit];
wdc = &wdc_softc[dev->id_parent->id_unit];
wd_softc[lunit] = wd =
(void *)malloc(sizeof(struct wd_softc), M_TEMP, M_NOWAIT);

View File

@ -12,7 +12,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
* $Id: aha1742.c,v 1.19 1994/03/10 20:52:12 mycroft Exp $
* $Id: aha1742.c,v 1.20 1994/03/12 03:34:04 mycroft Exp $
*/
#include "ahb.h"
@ -391,7 +391,7 @@ ahbprobe(struct isa_device *dev)
int port;
u_char byte1,byte2,byte3;
if (dev->id_masunit != -1)
if (dev->id_parent)
return 1;
ahb_slot++;
@ -456,10 +456,10 @@ ahb_attach(struct isa_device *dev)
{
static int firsttime;
static int firstswitch[NAHB];
int masunit = dev->id_masunit;
int masunit = dev->id_parent->id_unit;
int r;
if (masunit == -1)
if (!dev->id_parent)
return 1;
if (!firstswitch[masunit]) {

View File

@ -12,7 +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.20 1994/03/10 20:52:09 mycroft Exp $
* $Id: aha1542.c,v 1.21 1994/03/12 03:34:02 mycroft Exp $
*/
/*
@ -448,7 +448,7 @@ ahaprobe(struct isa_device *dev)
{
int unit;
if (dev->id_masunit != -1)
if (dev->id_parent)
return 1;
dev->id_unit = unit = ahaunit;
@ -483,10 +483,10 @@ ahaattach(struct isa_device *dev)
static int firsttime;
static int firstswitch[NAHA];
static u_long speedprint; /* max 32 aha controllers */
int masunit = dev->id_masunit;
int masunit = dev->id_parent->id_unit;
int r;
if (masunit == -1)
if (!dev->id_parent)
return 1;
if (!firstswitch[masunit]) {

View File

@ -12,7 +12,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
* $Id: bt742a.c,v 1.17 1994/03/10 20:52:14 mycroft Exp $
* $Id: bt742a.c,v 1.18 1994/03/12 03:34:06 mycroft Exp $
*/
/*
@ -460,7 +460,7 @@ btprobe(dev)
int unit;
struct bt_data *bt;
if (dev->id_masunit != -1)
if (dev->id_parent)
return 1;
dev->id_unit = unit = btunit;
@ -495,10 +495,10 @@ btattach(dev)
{
static int firsttime;
static int firstswitch[NBT];
int masunit = dev->id_masunit;
int masunit = dev->id_parent->id_unit;
int r;
if (masunit == -1)
if (!dev->id_parent)
return 1;
if (!firstswitch[masunit]) {

View File

@ -15,7 +15,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
* $Id: ultra14f.c,v 1.20 1994/03/10 20:52:17 mycroft Exp $
* $Id: ultra14f.c,v 1.21 1994/03/12 03:34:08 mycroft Exp $
*/
#include <sys/types.h>
@ -396,7 +396,7 @@ struct isa_device *dev;
{
int unit;
if (dev->id_masunit != -1)
if (dev->id_parent)
return 1;
dev->id_unit = unit = uha_unit;
@ -430,10 +430,10 @@ struct isa_device *dev;
{
static int firsttime;
static int firstswitch[NUHA];
int masunit = dev->id_masunit;
int masunit = dev->id_parent->id_unit;
int r;
if (masunit == -1)
if (!dev->id_parent)
return 1;
if (!firstswitch[masunit]) {

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
* $Id: wd.c,v 1.69 1994/03/11 23:29:12 mycroft Exp $
* $Id: wd.c,v 1.70 1994/03/12 03:41:13 mycroft Exp $
*/
#define INSTRUMENT /* instrumentation stuff by Brad Parker */
@ -265,9 +265,6 @@ wdattach(dev)
struct wdc_softc *wdc;
int i, blank;
if (dev->id_masunit >= NWDC)
return 0;
lunit = dev->id_unit;
if (lunit == -1) {
printf("%s: cannot support unit ?\n", wdc->sc_dev.dv_xname);
@ -276,7 +273,7 @@ wdattach(dev)
if (lunit >= NWD)
return 0;
wdc = &wdc_softc[dev->id_masunit];
wdc = &wdc_softc[dev->id_parent->id_unit];
wd_softc[lunit] = wd =
(void *)malloc(sizeof(struct wd_softc), M_TEMP, M_NOWAIT);

View File

@ -16,7 +16,7 @@
* scatter gather is done by the board, then look at one of the Adaptec
* drivers to finish off the job..
*
* $Id: wd7000.c,v 1.13 1994/03/10 20:52:18 mycroft Exp $
* $Id: wd7000.c,v 1.14 1994/03/12 03:34:10 mycroft Exp $
*/
#include "wds.h"
#if NWDS > 0
@ -220,7 +220,7 @@ wdsprobe(struct isa_device *dev)
/*scsi_debug = PRINTROUTINES | TRACEOPENS | TRACEINTERRUPTS |
SHOWREQUESTS | SHOWSCATGATH | SHOWINQUIRY | SHOWCOMMANDS;*/
if (dev->id_masunit != -1)
if (dev->id_parent)
return 1;
if(wdsunit > NWDS)
@ -580,12 +580,12 @@ wds_getvers(int unit)
int
wdsattach(struct isa_device *dev)
{
int masunit = dev->id_masunit;
int masunit = dev->id_parent->id_unit;
static int firstswitch[NWDS];
static u_long versprobe /* max 32 controllers */
int r;
if (masunit == -1)
if (!dev->id_parent)
return 1;
if( !(versprobe & (1<<masunit))) {