summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2020-09-09 22:54:09 +0000
committerWarner Losh <imp@FreeBSD.org>2020-09-09 22:54:09 +0000
commit470538bad3cd053a4b9d499f298033f996d0c839 (patch)
treec260c740f0a9164e6b7d1eb6475900236bc5ab7b /sys/dev
parentecefcbbd633146b7011b2a2d290fb33bba3ab4e6 (diff)
downloadsrc-test2-470538bad3cd053a4b9d499f298033f996d0c839.tar.gz
src-test2-470538bad3cd053a4b9d499f298033f996d0c839.zip
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/an/if_an_pccard.c2
-rw-r--r--sys/dev/ata/ata-card.c1
-rw-r--r--sys/dev/cmx/cmx_pccard.c2
-rw-r--r--sys/dev/fdc/fdc_pccard.c5
-rw-r--r--sys/dev/if_ndis/if_ndis_pccard.c2
-rw-r--r--sys/dev/puc/puc_pccard.c13
-rw-r--r--sys/dev/uart/uart_bus_pccard.c1
-rw-r--r--sys/dev/wi/if_wi_pccard.c1
8 files changed, 23 insertions, 4 deletions
diff --git a/sys/dev/an/if_an_pccard.c b/sys/dev/an/if_an_pccard.c
index 4c9f94350ec9..568e80b5fd53 100644
--- a/sys/dev/an/if_an_pccard.c
+++ b/sys/dev/an/if_an_pccard.c
@@ -156,5 +156,7 @@ an_pccard_attach(device_t dev)
fail:
if (error)
an_release_resources(dev);
+ else
+ gone_in_dev(dev, 13, "pccard removed");
return (error);
}
diff --git a/sys/dev/ata/ata-card.c b/sys/dev/ata/ata-card.c
index 14a47c5f6842..aa688338558c 100644
--- a/sys/dev/ata/ata-card.c
+++ b/sys/dev/ata/ata-card.c
@@ -144,6 +144,7 @@ ata_pccard_attach(device_t dev)
err = ata_probe(dev);
if (err > 0)
return (err);
+ gone_in_dev(dev, 13, "pccard removed");
return (ata_attach(dev));
}
diff --git a/sys/dev/cmx/cmx_pccard.c b/sys/dev/cmx/cmx_pccard.c
index 43215fd6df94..b7f7a749c82a 100644
--- a/sys/dev/cmx/cmx_pccard.c
+++ b/sys/dev/cmx/cmx_pccard.c
@@ -95,7 +95,7 @@ cmx_pccard_attach(device_t dev)
return rv;
}
- device_printf(dev, "attached\n");
+ gone_in_dev(dev, 13, "pccard removed");
return 0;
}
diff --git a/sys/dev/fdc/fdc_pccard.c b/sys/dev/fdc/fdc_pccard.c
index 2b7a3196f2af..d5c235450c2a 100644
--- a/sys/dev/fdc/fdc_pccard.c
+++ b/sys/dev/fdc/fdc_pccard.c
@@ -111,9 +111,10 @@ fdc_pccard_attach(device_t dev)
device_set_flags(child, 0x24);
error = bus_generic_attach(dev);
}
- if (error == 0)
+ if (error == 0) {
+ gone_in_dev(dev, 13, "pccard removed");
fdc_start_worker(dev);
- else
+ } else
fdc_release_resources(fdc);
return (error);
}
diff --git a/sys/dev/if_ndis/if_ndis_pccard.c b/sys/dev/if_ndis/if_ndis_pccard.c
index ee4e174ae3ef..aa9735eba1ea 100644
--- a/sys/dev/if_ndis/if_ndis_pccard.c
+++ b/sys/dev/if_ndis/if_ndis_pccard.c
@@ -303,6 +303,8 @@ ndis_attach_pccard(dev)
}
error = ndis_attach(dev);
+ if (error == 0)
+ gone_in_dev(dev, 13, "pccard removed");
fail:
return(error);
diff --git a/sys/dev/puc/puc_pccard.c b/sys/dev/puc/puc_pccard.c
index 6aa115ed583f..1b26b034dfa5 100644
--- a/sys/dev/puc/puc_pccard.c
+++ b/sys/dev/puc/puc_pccard.c
@@ -73,10 +73,21 @@ puc_pccard_probe(device_t dev)
return (ENXIO);
}
+static int
+puc_pccard_attach(device_t dev)
+{
+ int error;
+
+ error = puc_bfe_attach(dev);
+ if (error == 0)
+ gone_in_dev(dev, 13, "pccard removed");
+ return (error);
+}
+
static device_method_t puc_pccard_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, puc_pccard_probe),
- DEVMETHOD(device_attach, puc_bfe_attach),
+ DEVMETHOD(device_attach, puc_pccard_attach),
DEVMETHOD(device_detach, puc_bfe_detach),
DEVMETHOD(bus_alloc_resource, puc_bus_alloc_resource),
diff --git a/sys/dev/uart/uart_bus_pccard.c b/sys/dev/uart/uart_bus_pccard.c
index 8b672ebeadb0..c61d75da7da8 100644
--- a/sys/dev/uart/uart_bus_pccard.c
+++ b/sys/dev/uart/uart_bus_pccard.c
@@ -98,6 +98,7 @@ uart_pccard_attach(device_t dev)
error = uart_bus_probe(dev, 0, 0, 0, 0, 0, 0);
if (error > 0)
return (error);
+ gone_in_dev(dev, 13, "pccard removed");
return (uart_bus_attach(dev));
}
diff --git a/sys/dev/wi/if_wi_pccard.c b/sys/dev/wi/if_wi_pccard.c
index 22bd0d6f8dfa..f3905bbecfff 100644
--- a/sys/dev/wi/if_wi_pccard.c
+++ b/sys/dev/wi/if_wi_pccard.c
@@ -200,6 +200,7 @@ wi_pccard_attach(device_t dev)
error = wi_attach(dev);
if (error != 0)
wi_free(dev);
+ gone_in_dev(dev, 13, "pccard removed");
}
return error;
}