summaryrefslogtreecommitdiffstats
path: root/sys/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/if_rl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c
index 4ffe7a3..e5dc0be 100644
--- a/sys/pci/if_rl.c
+++ b/sys/pci/if_rl.c
@@ -1380,6 +1380,8 @@ rl_poll (struct ifnet *ifp, enum poll_cmd cmd, int count)
u_int16_t status;
status = CSR_READ_2(sc, RL_ISR);
+ if (status == 0xffff)
+ goto done;
if (status)
CSR_WRITE_2(sc, RL_ISR, status);
@@ -1426,6 +1428,9 @@ static void rl_intr(arg)
for (;;) {
status = CSR_READ_2(sc, RL_ISR);
+ /* If the card has gone away the read returns 0xffff. */
+ if (status == 0xffff)
+ break;
if (status)
CSR_WRITE_2(sc, RL_ISR, status);
OpenPOWER on IntegriCloud