aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/cy
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>2004-04-05 07:43:18 +0000
committerBruce Evans <bde@FreeBSD.org>2004-04-05 07:43:18 +0000
commit740a734c33ea72e0469ff82da1e4276483fa969c (patch)
treecc7c7d5f055d427ebf5ab297784099813b68cd30 /sys/dev/cy
parent3a0ad2fe749cb43189098b2411e94fd964d4fd6c (diff)
Notes
Diffstat (limited to 'sys/dev/cy')
-rw-r--r--sys/dev/cy/cy.c12
-rw-r--r--sys/dev/cy/cy_isa.c12
2 files changed, 12 insertions, 12 deletions
diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c
index 7207846b6380..218f57fa9f39 100644
--- a/sys/dev/cy/cy.c
+++ b/sys/dev/cy/cy.c
@@ -428,12 +428,6 @@ sioprobe(dev)
{
cy_addr iobase;
- while (sio_inited != 2)
- if (atomic_cmpset_int(&sio_inited, 0, 1)) {
- mtx_init(&sio_lock, driver_name, NULL, MTX_SPIN);
- atomic_store_rel_int(&sio_inited, 2);
- }
-
iobase = (cy_addr)dev->id_maddr;
/* Cyclom-16Y hardware reset (Cyclom-8Ys don't care) */
@@ -538,6 +532,12 @@ cyattach_common(cy_iobase, cy_align)
int ncyu;
int unit;
+ while (sio_inited != 2)
+ if (atomic_cmpset_int(&sio_inited, 0, 1)) {
+ mtx_init(&sio_lock, driver_name, NULL, MTX_SPIN);
+ atomic_store_rel_int(&sio_inited, 2);
+ }
+
adapter = cy_total_devices;
if ((u_int)adapter >= NCY) {
printf(
diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c
index 7207846b6380..218f57fa9f39 100644
--- a/sys/dev/cy/cy_isa.c
+++ b/sys/dev/cy/cy_isa.c
@@ -428,12 +428,6 @@ sioprobe(dev)
{
cy_addr iobase;
- while (sio_inited != 2)
- if (atomic_cmpset_int(&sio_inited, 0, 1)) {
- mtx_init(&sio_lock, driver_name, NULL, MTX_SPIN);
- atomic_store_rel_int(&sio_inited, 2);
- }
-
iobase = (cy_addr)dev->id_maddr;
/* Cyclom-16Y hardware reset (Cyclom-8Ys don't care) */
@@ -538,6 +532,12 @@ cyattach_common(cy_iobase, cy_align)
int ncyu;
int unit;
+ while (sio_inited != 2)
+ if (atomic_cmpset_int(&sio_inited, 0, 1)) {
+ mtx_init(&sio_lock, driver_name, NULL, MTX_SPIN);
+ atomic_store_rel_int(&sio_inited, 2);
+ }
+
adapter = cy_total_devices;
if ((u_int)adapter >= NCY) {
printf(