Fix bug in last change.

This commit is contained in:
mycroft 1994-03-12 04:10:03 +00:00
parent 15d758c39a
commit 15d0f84500
11 changed files with 33 additions and 22 deletions

View File

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

View File

@ -12,7 +12,7 @@
* on the understanding that TFS is not responsible for the correct * on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances. * functioning of this software in any circumstances.
* *
* $Id: aha1542.c,v 1.21 1994/03/12 03:34:02 mycroft Exp $ * $Id: aha1542.c,v 1.22 1994/03/12 04:10:03 mycroft Exp $
*/ */
/* /*
@ -483,11 +483,12 @@ ahaattach(struct isa_device *dev)
static int firsttime; static int firsttime;
static int firstswitch[NAHA]; static int firstswitch[NAHA];
static u_long speedprint; /* max 32 aha controllers */ static u_long speedprint; /* max 32 aha controllers */
int masunit = dev->id_parent->id_unit; int masunit;
int r; int r;
if (!dev->id_parent) if (!dev->id_parent)
return 1; return 1;
masunit = dev->id_parent->id_unit;
if (!firstswitch[masunit]) { if (!firstswitch[masunit]) {
firstswitch[masunit] = 1; firstswitch[masunit] = 1;

View File

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

View File

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

View File

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

View File

@ -16,7 +16,7 @@
* scatter gather is done by the board, then look at one of the Adaptec * scatter gather is done by the board, then look at one of the Adaptec
* drivers to finish off the job.. * drivers to finish off the job..
* *
* $Id: wd7000.c,v 1.14 1994/03/12 03:34:10 mycroft Exp $ * $Id: wd7000.c,v 1.15 1994/03/12 04:10:33 mycroft Exp $
*/ */
#include "wds.h" #include "wds.h"
#if NWDS > 0 #if NWDS > 0
@ -580,13 +580,14 @@ wds_getvers(int unit)
int int
wdsattach(struct isa_device *dev) wdsattach(struct isa_device *dev)
{ {
int masunit = dev->id_parent->id_unit; int masunit;
static int firstswitch[NWDS]; static int firstswitch[NWDS];
static u_long versprobe /* max 32 controllers */ static u_long versprobe /* max 32 controllers */
int r; int r;
if (!dev->id_parent) if (!dev->id_parent)
return 1; return 1;
masunit = dev->id_parent->id_unit;
if( !(versprobe & (1<<masunit))) { if( !(versprobe & (1<<masunit))) {
versprobe |= (1<<masunit); versprobe |= (1<<masunit);

View File

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

View File

@ -12,7 +12,7 @@
* on the understanding that TFS is not responsible for the correct * on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances. * functioning of this software in any circumstances.
* *
* $Id: aha1542.c,v 1.21 1994/03/12 03:34:02 mycroft Exp $ * $Id: aha1542.c,v 1.22 1994/03/12 04:10:03 mycroft Exp $
*/ */
/* /*
@ -483,11 +483,12 @@ ahaattach(struct isa_device *dev)
static int firsttime; static int firsttime;
static int firstswitch[NAHA]; static int firstswitch[NAHA];
static u_long speedprint; /* max 32 aha controllers */ static u_long speedprint; /* max 32 aha controllers */
int masunit = dev->id_parent->id_unit; int masunit;
int r; int r;
if (!dev->id_parent) if (!dev->id_parent)
return 1; return 1;
masunit = dev->id_parent->id_unit;
if (!firstswitch[masunit]) { if (!firstswitch[masunit]) {
firstswitch[masunit] = 1; firstswitch[masunit] = 1;

View File

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

View File

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

View File

@ -16,7 +16,7 @@
* scatter gather is done by the board, then look at one of the Adaptec * scatter gather is done by the board, then look at one of the Adaptec
* drivers to finish off the job.. * drivers to finish off the job..
* *
* $Id: wd7000.c,v 1.14 1994/03/12 03:34:10 mycroft Exp $ * $Id: wd7000.c,v 1.15 1994/03/12 04:10:33 mycroft Exp $
*/ */
#include "wds.h" #include "wds.h"
#if NWDS > 0 #if NWDS > 0
@ -580,13 +580,14 @@ wds_getvers(int unit)
int int
wdsattach(struct isa_device *dev) wdsattach(struct isa_device *dev)
{ {
int masunit = dev->id_parent->id_unit; int masunit;
static int firstswitch[NWDS]; static int firstswitch[NWDS];
static u_long versprobe /* max 32 controllers */ static u_long versprobe /* max 32 controllers */
int r; int r;
if (!dev->id_parent) if (!dev->id_parent)
return 1; return 1;
masunit = dev->id_parent->id_unit;
if( !(versprobe & (1<<masunit))) { if( !(versprobe & (1<<masunit))) {
versprobe |= (1<<masunit); versprobe |= (1<<masunit);