, here, the usb_class_mass_storage macro is defined in include/Linux/USB/ch9.h, and its value is 8.
Let's take 1,477th rows as an example.
1477 usual_dev (us_ SC _rb, us_pr_cb, usb_us_type_stor ),
Expand this macro, that is, define such a usb_device_id struct variable, its match_flags = struct, and binterfaceclass = usb_class_mass_storage, binterfacesubclass = us_ SC _rb, and binterfaceprotocol = us_pr_cb.
Usb_class_mass_storage does not need to be
unsigned int delay_use = 5;
111 module_param (delay_use, uint, s_irugo | s_iwusr );
112 module_parm_desc (delay_use, "seconds todelay before using a new device ");
Set delay_use to 5, while module_param is a macro provided by Linux kernel 2.6, so that delay_use can be set when the module is loaded. (If this parameter is not set, the value 5 indicates that a new device is waiting for a delay of 5 seconds .) Why latency? When the inserted USB flash
-storage: devicescan complete \ n ");
936
937/* shocould we unbind if no devices weredetected? */
938}
939
940 scsi_host_put (us_to_host (us ));
941 complete_and_exit ( threads_gone, 0 );
942}
Row 3, where does delay_use come from? In the same file, a static variable is defined at the beginning:
110 static unsigned int delay_use = 5;
111 module_param (delay_use, uint, S_IRUGO | S_IWUSR );
112 MODULE_PARM_DESC (delay_use, "seconds todelay before using a new device ");
Set delay_use to
One day, I used a USB flash drive on the company's computer and copied the photos to the hard disk. As I was in a hurry to go out, I just pulled out the USB flash drive when I shut down the computer. This operation should be no different from pulling out the USB flash
-2.6.22/drivers # cd usb/
Lfg1:/usr/src/linux-2.6.22/drivers/usb # ls
Kconfig Makefile README atm class core gadget host image misc mon
Serial storage usb-skeleton.c
Note that each directory contains a Kconfig file and Makefile, which is very important. We will introduce it later.
Our story is based on the drivers/usb
Create a USB flash drive and a UEFI boot drive for Chinese Cabbage
Make a USB flash drive for UEFI.
Download and install the brand new cabbage UEFI Version 7.3 from the official Chinese cabbage website.
Insert the USB fl
Teach you how to make OS X Lion boot USB drive and install system using USB stick
[Tutorial] No terminal, dot mouse, fool-made OS X 10.7~10.9 versions install USB--diskmaker xHttp://bbs.feng.com/read-htm-tid-7883207.htmlMake OS X Mountain Lion 10.8.5 12f37/mavericks 10.9.4 in Windows or OS XHttp://bbs.f
We followed storage_probe () almost completely, and it seems that everything is about to end, but do you think you haven't understood how the device works so far? USB flash disks, not just USB devices or disks, must comply with the USB massstorage protocol and...
We followed storage_probe () almost completely, and it seems that everything is about to end, but do
The following describes the usb_stor_control_thread () function. The wake-up command is the up ( amp; (us- gt; sema) from queuecommand, and the us- gt; sulfate is assigned to the server load balancer, in contrast, the server load balancer is a parameter passed in when the SCSI core layer calls the queuecommand. Focus on usb_stor_control_thread ()
The following describes the usb_stor_control_thread () function. What wakes up is the up ( (us-> sema) from the queuecommand, and us-> sulfate is assi
In January 29, 2013, 360 security guard posted a message on its official microblog about 360 emergency drive 1.0Beta, attracting thousands of forwards instantly.
According to reports, the 360 emergency drive is a portable operating system that can be created in less than MB of U disk space. When the system crashes and cannot be started, the 360 first-aid disk can help you rescue files, store important data,
Now that you know how to write the module, writing the device driver is naturally not difficult. I believe that no one who writes a module will find it difficult to write a device driver. Really, I'm not telling you the truth. writing a driver is not difficult. you can say with confidence that you can already write a device drive... Info nbsp
Now that you know how to write the module, writing the device driver is naturally not difficult. I believe th
Mount the USB flash drive another day and mount the dvd and mobile hard drive. 1. before inserting the USB flash drive, # cat/proc/tartitions2, insert the USB flash drive, # cat/proc/ta
1. Right-click "computer"-"device manager" on the desktop on the computer, and click "menu bar-> view-> sort devices by connection" on the displayed page:2. As shown in the figure above, the device should be a usb storage device, and then go to the directory:, find a folder starting with usb Stor, copy and download the folder, and paste it on the desktop, as shown in the figure
transmission. Which of the four types of transmission a device can support is the property of the device itself, which is determined during hardware design. For example, a pure USB flash drive must support batch transmission and control transmission. Different transmission requirements have different endpoints, so for a USB flash
Now that you know how to write the module, writing the device driver is naturally not difficult. I believe that no one who writes a module will find it difficult to write a device driver.Really, it's not difficult for me to write a driver. You can say with confidence that you can write a device driver. Yes, that's right. "Rejoice, so confident ."As mentioned above, every module starts with module_init and ends with module_exit. Let's take a look at the U dri
We followed storage_probe () almost completely, and it seems that everything is about to end, but do you think you haven't understood how the device works so far? USB flash drives are not only USB devices but also "disks". They also need to comply with the USB Mass Storage protocol and Transparent SCSI specifications. From the driver's perspective, it is similar
In the absence of a physical optical drive, the use of the USB flash drive in the PE installation XP original image of the steps as follows:
Tools needed: WinXP original system ISO image + start u disk PC shop U disk making tool
WinXP original system ISO image download address: Chinese version of Thunder Download (or electric donkey) | English version Thunder d
Rome was not built in one day. Before making the USB flash drive work, we actually made a lot of preparations for the driver. We continue to follow our feelings. storage_probe (), 972 to 975 rows, and a series of functions named init _ * are called at the moment. here some lock mechanisms and wait mechanisms are involved, but...
Rome was not built in one day. Before making the
Read the code, model and sub-position of the serial number of the USB HDD (USB removable hard drive).Compiled successfully with Visual Studio 2010.The code uses the relevant code in code SMARTATA.C in Crystaldiskinfo:The following connection explains why the use of SCSI-related code requires the data conversion of the USB
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.