diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2000-12-18 23:49:56 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2000-12-18 23:49:56 +0000 |
| commit | 430e72ee1c5a0836129d8913a4a6c280fa3b62e1 (patch) | |
| tree | 20d67b297ab870d33924bc1ebadf8798f9278f7a /sys/dev | |
| parent | c928bbcc1c167631fd9f55a281c97e307964df5a (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/wi/if_wi.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c index 0c998835cfff1..3b07877c71f53 100644 --- a/sys/dev/wi/if_wi.c +++ b/sys/dev/wi/if_wi.c @@ -1471,8 +1471,15 @@ static void wi_stop(sc) ifp = &sc->arpcom.ac_if; - CSR_WRITE_2(sc, WI_INT_EN, 0); - wi_cmd(sc, WI_CMD_DISABLE|sc->wi_portnum, 0); + /* + * If the card is gone and the memory port isn't mapped, we will + * (hopefully) get 0xffff back from the status read, which is not + * a valid status value. + */ + if (CSR_READ_2(sc, WI_STATUS) != 0xffff) { + CSR_WRITE_2(sc, WI_INT_EN, 0); + wi_cmd(sc, WI_CMD_DISABLE|sc->wi_portnum, 0); + } untimeout(wi_inquire, sc, sc->wi_stat_ch); |
