root@sdaok.UUCP (Super user) (02/07/90)
I'm in need of a good method/model under which to implement a fully reentrant character driver of constantly variable "synchronousness". The device is a smart "realtime serial control protocol" interface running at roughly 30KB (typical mapping: CTRL, STAT, DATA), and as such, many data expected by this interface (xx_write()) simply cannot be anticipated prior to knowing what it wants next (xx_read()). However, certain sequences of TYPES of data can be anticipated, allowing for the driver be asynchronous under many states, even if it means multiple-queueing likely candidate data streams (or templates) for immediate access by xx_intr(). The target system is SCO Xenix/Unix 386 2.3.2 and higher. While the device DOES generate interrupts at all logical points, the driver MUST be able to guarantee an acceptable response to any and all data requests at full bandwidth. Buffering on the device itself is limited to several data, and the serial control protocol offers absolutely NO type of flow control or error detection/correction. So. Under the premise that the driver MUST meet its obligations: 1) Are there similar current driver models available for study? 2) Is it wise to include a substantial amount of logic in xx_intr()? 3) Is it possible to realistically assume that a driver could be designed to allow more than one user full access to this interface? 4) Any good one-liners to fend off the WP and Lotus-jockey-type people if I have to go fully synchronous? --Dsc--