For network interface card (NIC) hardware to operate properly, you need a suitable device driver for the NIC hardware. A NIC device driver implements a hardware-independent common interface between the Linux kernel and the NIC, so that packets can be moved between the kernel and the NIC. A PCI device driver is the program that allows a PCI device to function as intended. Different PCI devices use different drivers.
CH1: PCI DEVICE DRIVER AND ITS ROLEUnderstanding the x86 processor bus: PCI
PCI Core & Programming the PCI
Finding & Interacting with a PCI Device
PCI Bus, Device and Function numbers
Registering & Finding a PCI device
Mapping & Accessing the PCI device regions
Accessing the Configuration Space
Accessing the I/O and Memory Regions
Enabling the PCI Device
Hands-On AssignmentsLab1:Registering the driver with the PCI subsystem.
Lab2: Write a module that scans your PCI devices, and gathers information about them.For each found device, read some information from its configuration register.Fields you may wish to obtain could include: PCI_VENDOR_ID, PCI_DEVICE_ID, PCI_REVISION_ID,PCI_INTERRUPT_LINE,PCI_LATENCY_TIMER,PCI_COMMAND.
Lab3: Write a Character based PCI driver to find Information about IRQ Line,Memory region,I/O region,configuration region,prefetchable and non-prefetchable region in BAR.
CH2: MEMORY MAPPING AND DMAWhat memory is DMA'able
DMA addressing limitations
Types of DMA mappings
Hands-On AssignmentsLab1: Write a module that allocates and maps a suitable DMA buffer, and obtains the bus address handle. Do this in three ways: (a)Using dma_alloc_coherent(), (b)Using dma_map_single(), (c)Using a DMA Pool.
CH3: BASIC NETWORK DEVICE DRIVERRegistering the Network Driver
Buffer Management with skbuffs
Packet Transmission & Reception
Reception using interrupt and poll
Start the network interface’s transmit Queue
Other network operations including statistics
Hands-On AssignmentsLab1: Building a Transmitting Network Driver, Module to include a transmission function.
Lab2: Adding Reception, Extend your transmitting device driver to include a reception function.
CH4: ADVANVED NETWORK DEVICE DRIVERRegistering with the Linux low level bus interface subsystem
Allocating interface descriptor block (net_device)
Device specific structure and initializing media specific fields
Getting device specific structure object pointer
Enabling Network interface card
Getting the Device resources (MMIO and PMIO)
Getting device MAC address
Initialization of device methods in the net_device
Registering net_device object with the kernel
Registering the interrupt handler (ISR)
Allocating Rxring and Txring
Initializing the hardware (network interface card)
Hands-On AssignmentsLab3: Writing the PCI based Network Driver for NIC(Network Interface Card). Programming the Network Device Registers, Implementing the Transmission & Reception with the actual device(NIC) and Setting up the network across computers.