summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authormycroft <mycroft@NetBSD.org>1995-07-28 22:49:56 +0000
committermycroft <mycroft@NetBSD.org>1995-07-28 22:49:56 +0000
commita4fcbe857d17ea15bcbc88c760847ac115243301 (patch)
treed7b5f8bee3a6f83bc663414f510f4809c63f26c0 /sys/dev
parentdad0b0a94cf5081e22c3da94d20b5cee74997849 (diff)
Don't loop if we're out of CCBs/SCBs/MSCPs.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/isa/aha1542.c8
-rw-r--r--sys/dev/isa/bt742a.c8
-rw-r--r--sys/dev/isa/seagate.c8
-rw-r--r--sys/dev/isa/ultra14f.c8
4 files changed, 17 insertions, 15 deletions
diff --git a/sys/dev/isa/aha1542.c b/sys/dev/isa/aha1542.c
index f849a3308b4..1a3590aca4f 100644
--- a/sys/dev/isa/aha1542.c
+++ b/sys/dev/isa/aha1542.c
@@ -1,4 +1,4 @@
-/* $NetBSD: aha1542.c,v 1.45 1995/07/27 01:00:11 mycroft Exp $ */
+/* $NetBSD: aha1542.c,v 1.46 1995/07/28 22:49:56 mycroft Exp $ */
/*
* Copyright (c) 1994 Charles Hannum. All rights reserved.
@@ -778,10 +778,10 @@ aha_get_ccb(aha, flags)
aha->sc_dev.dv_xname);
}
break;
- } else {
- if ((flags & SCSI_NOSLEEP) == 0)
- tsleep(&aha->free_ccb, PRIBIO, "ahaccb", 0);
}
+ if ((flags & SCSI_NOSLEEP) != 0)
+ break;
+ tsleep(&aha->free_ccb, PRIBIO, "ahaccb", 0);
}
splx(opri);
diff --git a/sys/dev/isa/bt742a.c b/sys/dev/isa/bt742a.c
index fcdd6d6692d..4e5a43d5ee5 100644
--- a/sys/dev/isa/bt742a.c
+++ b/sys/dev/isa/bt742a.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bt742a.c,v 1.42 1995/07/27 01:00:14 mycroft Exp $ */
+/* $NetBSD: bt742a.c,v 1.43 1995/07/28 22:49:59 mycroft Exp $ */
/*
* Copyright (c) 1994 Charles Hannum. All rights reserved.
@@ -808,10 +808,10 @@ bt_get_ccb(bt, flags)
bt->sc_dev.dv_xname);
}
break;
- } else {
- if ((flags & SCSI_NOSLEEP) == 0)
- tsleep(&bt->free_ccb, PRIBIO, "btccb", 0);
}
+ if ((flags & SCSI_NOSLEEP) != 0)
+ break;
+ tsleep(&bt->free_ccb, PRIBIO, "btccb", 0);
}
splx(opri);
diff --git a/sys/dev/isa/seagate.c b/sys/dev/isa/seagate.c
index 063b53641c3..d7b5110e053 100644
--- a/sys/dev/isa/seagate.c
+++ b/sys/dev/isa/seagate.c
@@ -377,8 +377,10 @@ seaprobe(parent, match, aux)
(void *) (((u_char *)sea->maddr) + 0x1e00);
break;
default:
+#ifdef DIAGNOSTIC
printf("%s: board type unknown at address 0x%lx\n",
sea->sc_dev.dv_xname, sea->maddr);
+#endif
return 0;
}
@@ -625,10 +627,10 @@ sea_get_scb(sea, flags)
printf("%s: can't malloc scb\n",
sea->sc_dev.dv_xname);
break;
- } else {
- if ((flags & SCSI_NOSLEEP) == 0)
- tsleep(&sea->free_list, PRIBIO, "seascb", 0);
}
+ if ((flags & SCSI_NOSLEEP) != 0)
+ break;
+ tsleep(&sea->free_list, PRIBIO, "seascb", 0);
}
splx(s);
diff --git a/sys/dev/isa/ultra14f.c b/sys/dev/isa/ultra14f.c
index ce9ff5d6247..b6a5963398d 100644
--- a/sys/dev/isa/ultra14f.c
+++ b/sys/dev/isa/ultra14f.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ultra14f.c,v 1.50 1995/07/24 07:17:29 cgd Exp $ */
+/* $NetBSD: ultra14f.c,v 1.51 1995/07/28 22:50:05 mycroft Exp $ */
/*
* Copyright (c) 1994 Charles Hannum. All rights reserved.
@@ -848,10 +848,10 @@ uha_get_mscp(uha, flags)
uha->sc_dev.dv_xname);
}
break;
- } else {
- if ((flags & SCSI_NOSLEEP) == 0)
- tsleep(&uha->free_mscp, PRIBIO, "uhamsc", 0);
}
+ if ((flags & SCSI_NOSLEEP) != 0)
+ break;
+ tsleep(&uha->free_mscp, PRIBIO, "uhamsc", 0);
}
splx(opri);