Improvement and Optimization of USB Mass Storage Driver on Linux Operating System

Author
LiuChao
Advisor
HanZhen
School
Beijing Jiaotong University
Major
linux drivers
Classification
TP311.11 Programming method
Degree
Master's thesis
Year
2008
Downloads
373
Citations
7

Request the full text

Abstract

Accompany with the progress of embedding technology, embedded products such as intelligence mobile phone, PDA palm, digital camera, and mp4 emerged in a surprising speed. At the same time, the user requirement for the data transfer speed of storage device becomes higher and higher. Embedded product commonly adopts USB interface to communicate with PC. How to improve the transfer speed of mass storage device with USB interface is a pending problem in front of us.As Linux possesses merits such as small kernel, high efficiency, open source and etc, it becomes the preferred operating system of many embedded system. Started from analyzing Linux device mode, SD card driver, Linux kernel 2.6 realization for SCSI protocol, USB protocol, combining mass storage device driver on host and USB mass storage gadget driver on device, the paper figures out the concrete flow that data IO between device and host experience in Linux operating system, we find out that a IO request will be handled by file system, generi block layer, IO scheduler layer, SD card driver and etc, which lead the system expense is huge and slow transfer speed. Based on the analysis result mentioned above, the paper proposed an optimization scheme for USB mass storage device driver on Linux operating system. The main design is: when IO request reach the device, USB mass storage driver makes the IO dealing process skips file system, generi block layer and IO scheduler layer, directly mounting the IO request on the request queue of SD card driver, simplify the IO handle flow. Besides, based on the realization of this optimization, continually test and improvement, the paper enhanced read speed from the original 2MB/s to 10MB/s, improved the write speed from the original 1MB/s to 8MB/s on the full speed mode.

Table of contents

Acknowledgements 5-6 Chinese Abstract 6-7 ABSTRACT 7-10 1 Introduction 10-15 1.1 Background topics 10-12 the significance 1.2 issues raised 1.3 topics mainly work 12-13 The main structure of 1.4 papers 13-15 2 Systems Analysis 15-34 2.1 Linux device model analysis 15-24 2.1.1 sysfs file system 15 the 2.1.2 Kobjects, the kset and subsystems 15-17 2.1.3 device model components 17-20 2.1.4 to add or delete a device model components 20-24 2.2 block device I / O request processing 24-25 2.3 Linux SCSI subsystem 25-31 2.3.1 SCSI system structure 26-27 2.3.2 SCSI subsystem and kernel upper interactive 27 2.3.3 Linux SCSI subsystem hierarchy 27-28 2.3.4 using this three-the IO request process 28-29 2.3.5 SCSI upper SD module 29 2.3.6 SCSI middle layer 29-30 2.3.7 the SCSI lower drive module 30-31 2.4 Linux USB subsystem 31-32 2.4.1 USB protocol design thinking 31 2.4.2 LINUX USB subsystem architecture 31-32 2.5 time the IO data transmission processes and problems of 32-34 2.5.1 time the IO data transmission process 32-33 2.5.2 exist 33-34 3 system to improve the design 34-46 3.1 system to optimize the system diagram 34-35 3.2 SD card device driver 35-39 3.2.1 SD card device hardware structure 35-36 3.2.2 Linux platforms MMC implementation 36-39 3.3 USB mass storage class 39-45 3.3.1 Bulk-Only Transport Protocol 40-43 3.3.2 USB high-capacity storage class device works 43-45 the the 3.4 optimized design ideology 45-46 4 system to achieve 46-72 4.1 hardware framework 46 4.2 USB driver 46-53 4.2.1 driver support which devices 47-48 4.2.2 Registered USB driver 48-49 4.2.3 to detect and disconnect the details 49-52 4.2.4 submission and control urb 52-53 4.3 USB device configuration and management process 53-55 4.4 USB host-side mass storage device driver analysis 55-60 4.4.1 structure us_data 55-57 4.4.2 driver support which devices 57 4.4.3 Registered USB driver 57-58 4.4.4 storage driver detection function storage_probe 58-59 4.4.5 USB high-capacity block device driver IO process 59-60 4.5 USB device capacity storage device driver implementation and optimization 60-72 4.5.1 USB device driver architecture 60-61 4.5.2 Gadget related structures 61-65 4.5.3 how to behave as a USB mass storage device part 65-66 4.5.4 SCSI protocol processing part 66-69 the of 4.5.5 SC_READ_10 and SC_WRITE_10 specific realization 69-72 5 transfer speed test 72-74 6 Conclusion 74-76 6.1 Full Summary 74-75 6.2 the next step of the work 75-76 the References 76-78 of resume The 78-80 the Dissertation datasets 80

Related dissertations

  1. Design and Implementation of the Telecom Billing System in Panzhihua City
  2. The Design&Implementation of Low Power Consumption Embedded Network Management System and Usb Mass Storage Device
  3. Research for IPv6 Network Management and Realization Based on Linux
    SunYuan ·Jilin University ·2004 ·Master's thesis
  4. Research and Implementation of Network Packet Sniffing System Based on the OS Linux
    JiaJing ·Shanghai Jiaotong University ·2007 ·Master's thesis
  5. Cluster System Load Balancing Research and Implementation Based on Linux OS
  6. OTG USB2.0 IP core device controller and Implementation
  7. USB Wireless Connector Design and Implementation
  8. The Design and Implement of Distributed Fuel Cell UPS Monitoring System
    GaoZuChang ·Southwest Jiaotong University ·2009 ·Master's thesis
  9. Design and Implementation of USB mass storage devices in embedded systems