Quote:
Originally Posted by pan64
that is called device driver. The kernel sends a unified message to the driver, and the driver will translate it and forward it to the device.
|
To put it another way, the device driver presents Linux with a
generic abstraction of the device. "It's a network card." Linux calls the driver's various subroutines, also handing it the device-table entry. It's the responsibility of the
(vendor and device-specific) driver to implement each call – to actually "push the buttons and flip the switches in the hardware" to make a particular device do its thing.
Devices uniquely self-identify themselves, so that drivers can be sure they're talking to a compatible device and so that Linux knows what driver to associate with each device.
(Which beats the hell out of fiddling with DIP-switches like we had to do in the bad old days!)