Linux Kernel Architecture
Chapter 6: Device Drivers 6.4 Character Device Operations The hardware of character devices is usually very simple, and, not sur ...
Chapter 6: Device Drivers With thecdevinstance for the device in hand, the kernel also has access to the device-specific file_op ...
Chapter 6: Device Drivers memory-related device files. The function pointers are then refined even further depending on the mino ...
Chapter 6: Device Drivers 6.4.3 Reading and Writing The actual work of reading from and writing to character device files is not ...
Chapter 6: Device Drivers ❑ Accesses to block devices are massively cached; that is, read data are kept in memory and are access ...
Chapter 6: Device Drivers Inode Userspace application File operations VFS Gen- Disk Block Device Operations I/O Ports Submitting ...
Chapter 6: Device Drivers ❑ Characteristic data such as sector and block size or device capacity. ❑ Thegeneric hard diskabstract ...
Chapter 6: Device Drivers ❑ The device number for the block device is stored inbd_dev.^7 ❑ A link back to the inode that represe ...
Chapter 6: Device Drivers When a block device is opened for usingblkdev_openand exclusive use is requested as dis- cussed in Sec ...
Chapter 6: Device Drivers ❑ fopsis a pointer to device-specific functions that perform various low-level tasks. I discuss these ...
Chapter 6: Device Drivers Connectingthe Pieces The previously introduced data structures —struct block_device,struct gendisk,and ...
Chapter 6: Device Drivers Partitions represented bystruct hd_structalso contain an embeddedkobject. Conceptually, partitions are ...
Chapter 6: Device Drivers RequestQueues Read and write requests to block devices are placed on a queue known as arequest queue.T ...
Chapter 6: Device Drivers queue_headis the central list head used to construct a doubly linked list of requests — each element i ...
Chapter 6: Device Drivers ❑ unplug_fnis used to unplug a block device. A plugged device does not execute requests but collects t ...
Chapter 6: Device Drivers Table 6-2: Hardware Characteristics of a Request Queue. Element Meaning max_sectors Specifies the maxi ...
Chapter 6: Device Drivers Adding the new object withkobject_addmakes it a member of the block subsystem, and consequently, the s ...
Chapter 6: Device Drivers blkdev_open bd_acquire do_open get_gendisk disk->fops->open flag 0_EXCL set? bd_claim Figure 6-1 ...
Chapter 6: Device Drivers ❑ disk->fops->openinvokes the appropriateopenfunction for the file to perform hardware- specific ...
Chapter 6: Device Drivers enum rq_cmd_type_bits cmd_type; ... sector_t sector; /* next sector to submit */ sector_t hard_sector; ...
«
18
19
20
21
22
23
24
25
26
27
»
Free download pdf