diff options
| author | joostmnl@gmail.com <none@none> | 2010-04-17 01:01:09 -0700 |
|---|---|---|
| committer | joostmnl@gmail.com <none@none> | 2010-04-17 01:01:09 -0700 |
| commit | 5815e35bec16e886bfd73f1badb4cc85ddcda92e (patch) | |
| tree | c451fb21c9ca4d9ee6e6c66bebe7b97ae5d46d68 /usr/src | |
| parent | 23d9e5ac1800241d2b06a5418bd3fdc6ec3b48b5 (diff) | |
| download | illumos-joyent-5815e35bec16e886bfd73f1badb4cc85ddcda92e.tar.gz | |
6936304 vr causes a panic when a stopped device is interrupted.
Diffstat (limited to 'usr/src')
| -rw-r--r-- | usr/src/uts/common/io/vr/vr.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/usr/src/uts/common/io/vr/vr.c b/usr/src/uts/common/io/vr/vr.c index 4a756212ea..4447b85622 100644 --- a/usr/src/uts/common/io/vr/vr.c +++ b/usr/src/uts/common/io/vr/vr.c @@ -85,7 +85,7 @@ static void vr_prt(const char *fmt, ...); #define VR_DEBUG(args) do ; _NOTE(CONSTANTCONDITION) while (0) #endif -static char vr_ident[] = "VIA Rhine Ethernet v1.42"; +static char vr_ident[] = "VIA Rhine Ethernet"; /* * Attributes for accessing registers and memory descriptors for this device. @@ -1194,11 +1194,20 @@ vr_intr(caddr_t arg1, caddr_t arg2) vrp = (void *)arg1; _NOTE(ARGUNUSED(arg2)) + mutex_enter(&vrp->intrlock); + /* + * If the driver is not in running state it is not our interrupt. + * Shared interrupts can end up here without us being started. + */ + if (vrp->chip.state != CHIPSTATE_RUNNING) { + mutex_exit(&vrp->intrlock); + return (DDI_INTR_UNCLAIMED); + } + /* * Read the status register to see if the interrupt is from our device * This read also ensures that posted writes are brought to main memory. */ - mutex_enter(&vrp->intrlock); status = VR_GET16(vrp->acc_reg, VR_ISR0) & VR_ICR0_CFG; if (status == 0) { /* |
