CS(4)

πŸ’– cs β€” Ethernet device driver πŸ’–

okay bestie, gather round, because today we're talking about cs β€” your friendly neighborhood Ethernet device driver, living its life over in the i386 Kernel Interfaces Manual. yes, that manual. she's iconic, she's deprecated, she's giving vintage network card energy, and we're gonna get into ALL of it. no skimming, no skipping, we eat the whole page. πŸ“


✨ SYNOPSIS ✨

so if you wanna compile this driver into the kernel (the committed relationship option πŸ’), you drop this line into your kernel configuration file:

device cs

or, if you'd rather load the driver as a module at boot time (the situationship option πŸ¦‹), you put this into loader.conf(5):

if_cs_load="YES"

and then, in /boot/device.hints, you're gonna want:

hint.cs.0.at="isa"
hint.cs.0.port="0x300"
hint.cs.0.irq="10"
hint.cs.0.maddr="0xd000"

that's the whole vibe check right there. periodt.


🚨 DEPRECATION NOTICE 🚨

bestie. I need you to sit down for this one. The cs driver is not present in FreeBSD 13.0 and later. she's gone, she's retired, she's living on a farm upstate. if you want the full tea, go read:

https://github.com/freebsd/fcp/blob/master/fcp-0101.md

ngl that link is doing the heavy lifting here. 😭


🌸 DESCRIPTION 🌸

okay so here's the lore. the cs driver provides support for ISA Ethernet adapters based on the Crystal Semiconductor CS8900 and CS8920 NICs. these little guys show up on the IBM EtherJet ISA adapters and in so many embedded applications, where the high integration, small size and low cost of the CS89x0 family genuinely compensate for their drawbacks. like yeah she has flaws but she's also tiny and cheap and built-in, so. πŸ’…

now, how does cs figure out what it's working with? it will obtain configuration parameters either from /boot/device.hints or straight from the card itself. at least the I/O port number must be specified β€” that one is non-negotiable, bestie, it's the bare minimum. other parameters you throw into /boot/device.hints will be used if present; the card may be soft-configured, so these may be any valid value. and adapters based on the CS8920 normally offer PnP configuration, meaning the driver will detect the IBM EtherJet and the CSC6040 adapters automatically. she's got good instincts. πŸ‘‘

one thing you need to know: the CS8900 is limited to 4 IRQ values; these are normally implemented as 5, 10, 11 and 12. the CS8920 has no such limitation. she's flexible like that. ✨

memory-mapped and DMA operation are not supported at this time. not her era, not her problem. πŸ™ˆ

and plot twist β€” in addition to the ISA devices, the PC Card devices based on the CS889x0 family are also supported. the IBM EtherJet PCMCIA Card is the only known device based on this chip. the PC Card support does not need the above specific ISA hints to work. however β€” the PC Card support may not work for 10base2 (thinnet) connections and may bogusly claim to support 10base5 (there are no known cards that have an AUI necessary for 10base5 support on their dongles). so, like, read that twice, bestie. she's a little dramatic about it. πŸ’€


πŸ” DIAGNOSTICS πŸ”

here's the group chat of error messages, and what each one is actually trying to tell you:

  • cs%d: full/half duplex negotiation timeout β€” the attempt to negotiate duplex settings with the hub timed out. this may indicate a cabling problem or a faulty or incompatible hub. it's giving "we tried to talk, nobody picked up." πŸ“ž
  • cs%d: failed to enable <media> β€” the CS89x0 failed to select the nominated media, either because it is not present or not operating correctly.
  • cs%d: No EEPROM, assuming defaults β€” the CS89x0 does not have an EEPROM, or the EEPROM is hopelessly damaged. operation will only be successful if the configuration entry lists suitable values for the adapter. so like, you're gonna need to help her out here. 🫢
  • cs%d: Invalid irq β€” the IRQ specified in the configuration entry is not valid for the adapter.
  • cs%d: Could not allocate memory for NIC β€” there is a critical memory shortage. the adapter will not function. harsh but true.
  • cs%d: Adapter has no media β€” the adapter is not configured for a specific media type. the media type will have to be manually set.
  • This is a %s, but LDN %d is disabled β€” the PnP probe code found a recognised adapter, but the adapter is disabled. she sees you, but she can't reach you. 😭
  • failed to read pnp parms β€” a PnP adapter was found, but configuration parameters for it could not be read.
  • failed to pnp card parameters β€” the parameters obtained via PnP were not accepted by the driver. the adapter may not function.

πŸ‘€ SEE ALSO πŸ‘€

go read these next, iykyk:


πŸ’œ AUTHORS πŸ’œ

the cs device driver was written by Maxim Bolotin and Oleg Sharoiko. and this manpage was written by Michael Smith. legends, honestly. πŸ™Œ


⚠️ CAVEATS ⚠️

okay so the CS89x0 family of adapters have a very small RAM buffer (4K). that's it. that's the whole buffer. this may cause problems with extremely high network loads or bursty network traffic. and in particular, NFS operations should be limited to 1k read/write transactions in order to avoid overruns. no cap, don't push her past her limits. she's doing her best. πŸ₯Ί

treat her gently, bestie. 4K is not a lot of room to breathe.

okay and one last thing, the little sign-off at the bottom of the page says this is the Debian edition from October 24 2018, and yes, she's filed under CS(4). love her, respect her, go check your device.hints before you ping me. bye bestie!! πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from