我寫了一個程序,它在裝載的USB
設備上創建一個文件。這可以通過RS232
連接使用基於文本的UI完成。然而,似乎有些事情是關閉的。在5次1,寫入USB
設備的全過程失敗,我得到如下: Linux USB恐怖
顯然發生I/O錯誤和內核決定卸載設備,並重新檢測它。任何想法可能是什麼問題? 此錯誤不依賴於正在使用的USB
設備,因爲我能夠使用多個不同的USB
設備重現此錯誤。
P.S .:我不確定這個問題是否屬於stackoverflow
。如果沒有,請隨時移動它。
編輯:有問題的設備上運行Linux 2.6.24.6
編輯:
我剛剛發現一個非常有趣的現象。我連接USB棒的設備和創建使用命令大型目錄的焦油:
tar -cvf test.tar ./test_directory
該目錄是SD卡,即完全不同的文件系統上。然而,在創建歸檔,多個USB斷開& USB連接的事件發生:
--> start creating archive
/tmp #
[74901.704258] usb 2-1: new high speed USB device using fsl-ehci and address 18
[74901.914427] usb 2-1: configuration #1 chosen from 1 choice
[74902.020174] scsi18 : SCSI emulation for USB Mass Storage devices
[74904.147779] usb 2-1: USB disconnect, address 18
[74904.573424] usb 2-1: new high speed USB device using fsl-ehci and address 19
[74904.785303] usb 2-1: configuration #1 chosen from 1 choice
[74904.891860] scsi19 : SCSI emulation for USB Mass Storage devices
[74907.748285] usb 2-1: USB disconnect, address 19
[74908.063438] usb 2-1: new high speed USB device using fsl-ehci and address 20
[74908.264751] usb 2-1: configuration #1 chosen from 1 choice
[74908.311019] scsi20 : SCSI emulation for USB Mass Storage devices
[74909.470917] usb 2-1: USB disconnect, address 20
[74909.783331] usb 2-1: new high speed USB device using fsl-ehci and address 21
[74909.983410] usb 2-1: configuration #1 chosen from 1 choice
[74910.031500] scsi21 : SCSI emulation for USB Mass Storage devices
[74915.106340] scsi 21:0:0:0: Direct-Access Generic Flash Disk 8.07 PQ: 0 ANSI: 2
[74915.184964] sd 21:0:0:0: [sda] 7884800 512-byte hardware sectors (4037 MB)
[74915.235993] sd 21:0:0:0: [sda] Write Protect is off
[74915.275597] sd 21:0:0:0: [sda] Assuming drive cache: write through
[74915.330972] sd 21:0:0:0: [sda] 7884800 512-byte hardware sectors (4037 MB)
[74915.379568] sd 21:0:0:0: [sda] Write Protect is off
[74915.411428] sd 21:0:0:0: [sda] Assuming drive cache: write through
[74915.457712] sda: sda1
[74915.771348] sd 21:0:0:0: [sda] Attached SCSI removable disk
[74915.805114] sd 21:0:0:0: Attached scsi generic sg0 type 0
[74923.462332] usb 2-1: USB disconnect, address 21
[74924.484001] usb 2-1: new high speed USB device using fsl-ehci and address 22
[74924.702678] usb 2-1: configuration #1 chosen from 1 choice
[74924.798064] scsi22 : SCSI emulation for USB Mass Storage devices
[74929.855161] scsi 22:0:0:0: Direct-Access Generic Flash Disk 8.07 PQ: 0 ANSI: 2
[74929.951158] sd 22:0:0:0: [sda] 7884800 512-byte hardware sectors (4037 MB)
[74930.001646] sd 22:0:0:0: [sda] Write Protect is off
[74930.034424] sd 22:0:0:0: [sda] Assuming drive cache: write through
[74930.077218] sd 22:0:0:0: [sda] 7884800 512-byte hardware sectors (4037 MB)
[74930.131909] sd 22:0:0:0: [sda] Write Protect is off
[74930.166881] sd 22:0:0:0: [sda] Assuming drive cache: write through
[74930.208044] sda: sda1
[74930.260520] sd 22:0:0:0: [sda] Attached SCSI removable disk
[74930.303588] sd 22:0:0:0: Attached scsi generic sg0 type 0
[74931.951336] usb 2-1: USB disconnect, address 22
[74932.272609] usb 2-1: new high speed USB device using fsl-ehci and address 23
[74932.483821] usb 2-1: configuration #1 chosen from 1 choice
[74932.569866] scsi23 : SCSI emulation for USB Mass Storage devices
[74936.434380] usb 2-1: USB disconnect, address 23
[74936.754210] usb 2-1: new high speed USB device using fsl-ehci and address 24
[74937.751966] usb 2-1: configuration #1 chosen from 1 choice
[74937.820607] scsi24 : SCSI emulation for USB Mass Storage devices
[74942.887336] scsi 24:0:0:0: Direct-Access Generic Flash Disk 8.07 PQ: 0 ANSI: 2
[74942.958666] sd 24:0:0:0: [sda] 7884800 512-byte hardware sectors (4037 MB)
[74943.004909] sd 24:0:0:0: [sda] Write Protect is off
[74943.044027] sd 24:0:0:0: [sda] Assuming drive cache: write through
[74943.101958] sd 24:0:0:0: [sda] 7884800 512-byte hardware sectors (4037 MB)
[74943.147503] sd 24:0:0:0: [sda] Write Protect is off
[74943.190786] sd 24:0:0:0: [sda] Assuming drive cache: write through
[74943.230368] sda: sda1
[74943.258203] sd 24:0:0:0: [sda] Attached SCSI removable disk
[74943.314301] sd 24:0:0:0: Attached scsi generic sg0 type 0
我要創建一個新的線程這個問題!
有沒有可能在那裏更新內核? – 0andriy 2015-02-09 13:19:58
@AndyShevchenko我讀過某個地方,這個特定的內核版本可能與USB設備有問題。我不確定我們是否能夠更新它 – 2015-02-09 13:22:43
@AndyShevchenko更新整個內核是不可能的。但我們可以更新一些驅動程序。 – 2015-02-09 13:28:56