NTWOC(4)
πΈ NTWOC(4) β the synchronous serial interface glow-up β¨
okay bestie, gather round, because we're about to talk about ntwoc β the driver for Riscom/N2, N2pci, and WANic 400 synchronous serial interfaces. no cap, this one's a whole vibe if you're into bit-synchronous serial communication, and honestly? iconic behavior. π
β¨ SYNOPSIS β¨
ntwoc* at pci? dev ? function ? flags 0
ntwoc0 at isa? port 0x300 irq 5 iomem 0xc8000 flags 1
π¦ DESCRIPTION π¦
so the ntwoc device driver is out here supporting bit-synchronous serial communication using Cisco HDLC framing. periodt. these cards can be driven either by the line clock or from an internal baud rate generator β main character energy, truly. π
the devices all use the Hitachi hd64570 serial chip, and ngl that chip is kind of a big deal: it supports 2 asynchronous/byte-synchronous/bit-synchronous serial ports, and it's got a 4-channel DMA controller for loading the serial port FIFOs. obsessed. π₯
now, the ISA Riscom/N2 card has a jumper block to set the IRQ and a DIP switch to set the port address the card will use. the values you program into the card must be specified with the port and irq locators in the kernel configuration line. and listen β the iomem locator must be specified and must occur on a 16k boundary. the driver uses a 16k region of io memory. bit 0 of the flags locator indicates if there is a second serial port available on the card. π
currently, clock source and speed information is specified with the flags locator in the kernel configuration file. the flags field has the following format:
3 2 1
1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+-------------+ +-----+ +-----+ + +---+ +-+ + +---+ +-+ +
tmc tdiv rdiv e1 rxs1 ts1 e0 rxs0 txs0 np(*)
π the flags breakdown, bestie π
tmcβ defines the timer constant. the base clock frequency is divided bytmcto generate the main clock for receiving and sending. further division is possible with thetdivandrdivdivisor options. a value of0is treated as256. π§tdivβ defines the transmit divisor as2^(tdiv). the internal transmit clock frequency is determined by dividing the base clock frequency bytmcand then dividing by2^(tdiv).rdivβ defines the receive divisor as2^(rdiv). the internal receive clock frequency is determined by dividing the base clock frequency bytmcand then dividing by2^(rdiv).e0e1β if true, the internal clock source is used to drive the line clock for port 0 or port 1 respectively. π«rxs0rxs1β specifies which clock source to use for receiving data on port 0 and port 1 respectively. these values are accepted:0β line clock.1β line clock with noise suppression.2β internal clock.
txs0txs1β specifies which clock source to use for transmitting data on port 0 and port 1 respectively. these values are accepted:0β line clock.1β internal clock.2β receive clock.
npβ (for the ISA card only, iykyk) a value of1indicates there is a second serial port present on the card. this is auto-detected on the PCI card and need not be specified. π
π HARDWARE π
cards supported by the ntwoc driver include:
- SDL Communications Riscom/N2
- SDL Communications N2pci
- SDL Communications WANic 400 (untested)
lowkey noting that the WANic 400 is marked untested β just so you know, bestie, no surprises. π
β DIAGNOSTICS β
ntwoc0: TXDMA underrun - fifo depth maxedβ indicates that the serial port's FIFO is being drained faster than DMA can fill it. the driver automatically increases the low-water mark at which to begin DMA transfers when underruns occur. this diagnostic is issued when the low-water mark is maximized (i.e., 1 less than the depth of the FIFO). πntwoc0: RXDMA buffer overflowβ indicates that a frame is being received by the card, but there are no free receive buffers. big yikes.
π«Ά SEE ALSO π«Ά
intro(4), isa(4), pci(4), ifconfig(8)
πΈ HISTORY πΈ
the PCI driver first appeared in NetBSD 1.4. much of the ISA driver was adapted from the FreeBSD sr driver and first appeared in NetBSD 1.5. a true glow-up story. β¨
π BUGS π
use of the flags locator for setting the clock sources and speeds should be replaced with ioctl's and a control program. not me pointing out that this is the ancient way of doing things β but yeah, that's the note. π
and that's the whole page, bestie β go forth and configure those synchronous serial interfaces like the icon you are. mwah. π
this page is from the Debian manual, dated October 2, 1998, and it's the NTWOC(4) kernel interfaces manual. slay. π
π¦ where this page comes from
- nixpkgs unstable: netbsd-source 11.0
- Copyright (c) 2000 Christian E. Hopps
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms