Re: Re: another must-fix: major PS/2 mouse problem
Donald Becker <[email protected]> Mon, 11 Aug 2003 10:32:52 -0400 (EDT)
| Newsgroups | gmane.linux.drivers.vortex.devel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 11 Aug 2003, Chris Friesen wrote: > Donald Becker wrote: > > On Tue, 29 Jul 2003, Chris Friesen wrote: > > >>You might want to bump that up a little bit. Querying carrier signal on > >>a tulip chip is 100usecs with interrupts off. > > > My drivers, include the Tulip, don't read serial MII registers in the > > interrupt service during noraml operation. That would be a Very Bad ... > > Serial MII management operations should only be done during timer ticks > > and user-level ioctl() operations. > > Yep, this is from user-level. Basically we were querying the driver > through ioctl() to check whether the card has carrier or not. The board > manufacturer didn't bother hooking up the interrupt line on the phy so > we had to poll the phy for carrier loss detection. As part of the > ioctl() the normal code turned off interrupts while doing the MII stuff. > We didn't like that very much, so I made use of the fact that the clock > pulse for the MII connection was user-driven (and hence not > timing-sensitive) to allow interrupts to be on while querying the > carrier. Seems to work fine. Ahhh, yes, interrupts are disabled with a spin_lock_irqsave() in mdio_read(), rather than being blocked by doing mdio_read() in the interrupt service routine. This is a relatively recently change to the driver. Originally the driver took care to not lock mdio_read(), but this was the easist way to avoid problems on SMP machines. There are better ways, but they depend on the kernel version / SMP semanatics that have changed over time. -- Donald Becker [email protected] Scyld Computing Corporation http://www.scyld.com 914 Bay Ridge Road, Suite 220 Scyld Beowulf cluster system Annapolis MD 21403 410-990-9993 _______________________________________________ vortex mailing list [email protected] http://www.scyld.com/mailman/listinfo/vortex