LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Question about usb storage device and device driver (http://www.linuxquestions.org/questions/linux-hardware-18/question-about-usb-storage-device-and-device-driver-770625/)

balteo 11-21-2009 09:37 AM

Question about usb storage device and device driver
 
Hello,

I am new to device drivers and I would like to understand the following points:

-When say a usb storage device is inserted into the usb port, I presume the kernel uses the drivers/usb/storage driver automatically. Is the following information used at all: Bus 001 Device 006: ID 13fe:1a20 Kingston Technology Company Inc.(as provided by a lsusb)?

-It so happens I own a Kingston usb key that has the behaviour of showing two icons on the desktop upon insertion into the usb port. What determines why such usb device will exhibit this behaviour whereas another will not?

-What .c file in drivers/usb/storage is relevant to the above device (Bus 001 Device 006: ID 13fe:1a20 Kingston Technology Company Inc.) ?

Any clue welcome,

Julien.

allend 11-21-2009 10:29 AM

The usb key probably has two disk partitions.
Plug the device and look at the output of 'dmesg | tail'. Look for the line like:
Quote:

sd 9:0:0:0: [sdc] Attached SCSI removable disk
Then (as root) 'fdisk -l /dev/sdc' (or whatever sdX) will show how the usb key is formatted.

balteo 11-21-2009 10:37 AM

thanks,

Actually i have just repartitioned the usb drive and an fdisk shows:
Code:

Disque /dev/sdb: 1027 Mo, 1027080192 octets
255 têtes, 63 secteurs/piste, 124 cylindres
Unités = cylindres de 16065 * 512 = 8225280 octets
Identifiant de disque : 0x3d19ffdc

Périphérique Amorce  Début        Fin      Blocs    Id  Système
/dev/sdb1              1        124      995998+  83  Linux

J.


All times are GMT -5. The time now is 11:19 PM.