For the entire USB-storage module, the usb_stor_init () function is its start. However, for the USB flash drive, the function that actually drives the USB flash drive starts with the storage_probe () function.
As long as the two parallel lines overlap, it is doomed to start
-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
introduce it later.
Our story is based on the drivers/usb/storage directory. In fact, the code here clearly shows how the USB flash drive we frequently access is working and how it is driven. But the code in this directory does not live in a paradise. They are always closely related to the outside world. You can continue to see:
Lfg1:/usr/src/linux-2.6.22/driv
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
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
The following describes the usb_stor_control_thread () function. What wakes up is the up ( (us-> sema) from the queuecommand, and us-> 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 (). Row 3: As mentioned earlier, we have to look at the dev_mutex lock from a higher perspective after reading the entire module.
Line 3: If us_fw.x_disconnecting is set,
The following describes the usb_stor_control_thread () function. What wakes up is the up ( (US-> SEMA) from the queuecommand, and us-> 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 (). Row 3: As mentioned earlier, we have to look at the dev_mutex lock from a higher perspective after reading the entire module.
Line 3: If us_fw.x_disconnecting is set,
. To this end, the program must be modified. One idea is to open a thread and run the Recv. It doesn't matter if you stop it. The other idea is to change the sock to non-blocking. For details about the changes, see. red lines in the H file!
Int flags = fcntl (hotplug_sock, f_getfl, 0 );Fcntl (hotplug_sock, f_setfl, flags | o_nonblock );
When the kernel has no message, the Buf after Recv () is empty. After cross-compilation, the program runs well in tiny210!
Previous:
Unfortunately, the industry
U disk system maintenance tools (such as Tian Yi U disk Maintenance System 2013), etc., see the http://www.winpe.cc/
B) Partition. After making the partition, use the maintenance USB flash drive to start WinPE and run DiskGenius to partition the mobile hard disk. If the hard disk is a common hard disk, partition it as needed,
4 K alignment is required for solid state disks, as shown in figure: (some people
flash disk, it is unnecessary for a USB flash disk that has an old peach or similar tool that can be directly started from the ISO file of the USB flash disk)2. Copy the iso file to the USB flash drive/ISOS directory.4. Insert the USB flash
The file system read-only problem occurs on the USB flash drive under Ubuntu. The problem is that existing files in the USB flash drive cannot be deleted and new files cannot be copied to the USB flash drive. But I don't know why.
disk, it is unnecessary for a USB flash disk that has an old peach or similar tool that can be directly started from the ISO file of the USB flash disk) 2. Copy the iso file to the USB flash drive/ISOS directory. 4. Insert the USB flash
Linux2.6 kernel USB Gadget drive porting
Before writing a little bit of the knowledge of USB slave end
In the kernel 2.4 version, the embedded USB drive is in the Kernel/arch/arm directory ep0.c ep**.c, when debugging USB driver
. At this time, UItral So will automatically set syslinux. cfg file box ldlinux. the sys file is generated on the USB flash drive, and other files are copied to the USB flash drive. cfg can be deleted and copied to the root directory.
Note: The files not introduced in the USB
(this hard disk is displayed as 'hda 'in the partition management program of the Ubuntu installation program '). My external USB hard drive is Seagate, 40 GB in size, and movable; I bought it for $120 at wolma.
Tip: before installing the system, you 'd better set the CDROM as the first boot disk and the USB device
When many friends install Fedora17 with a USB flash drive, the screen displays the following prompt: ERROR: couldnotinsert 'floppy ': large... dracutWarning: UnabletoprocessinitqueuedracutWarning:/dev/disk/by-label/Fedorax201
When many of my friends use a USB flash drive to install Fedora 17, the screen displays the fo
Today, ready to install Ubuntu14.04 run Docker, go to the official website to download a good image, using the Chinese cabbage iOS mode directly burned on the U disk.Boot into the BIOS, set up a USB flash drive, go in after all the way smoothly, but chose the language and keyboard mode, always hint that the CD-ROM can not read, whether retry?The solution to this problem is:Copy the system image of the iOS f
similar other tools have been supported from the USB flash drive ISO file directly start, there is no need to do so!2. Copy the ISO file to the USB stick/isos directory.4. Insert the USB stick into the machine that needs to install the system, boot, enter BIOS, set USB boot
directory is the SD card mount directory, the files in this directory will be the SD card file nameSTEP4: Mount the SD card.Execute command: $ mount-t vfat/dev/mmcblk0p1/udiskSTEP5: Enter the SD card directory to view the data on the SD card$ cd/path/udisk$ ls-l/* Displays data from the USB drive directory */Reference: http://blog.csdn.net/leo115/article/details
1. Command: su
Enter the administrator password for password authentication.
2. Command: mkdir/mnt/USB
Create a USB folder under the MNT directory.
3. Command: fdisk-l
View the disk partitions before and after the USB flash disk is inserted, and obtain the partition where the USB flash disk is located.
4. Command
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.