usb-storageの認識に時間がかかる

「usb-storageの認識に時間がかかる」の編集履歴(バックアップ)一覧はこちら

usb-storageの認識に時間がかかる」(2007/06/21 (木) 20:59:35) の最新版変更点

追加された行は緑色になります。

削除された行は赤色になります。

*usb-storageの認識に時間がかかる@CentOS5 CentOS5でUSBメモリを接続すると認識が完了するまでに5秒位かかるようになった >May 25 17:31:03 localhost kernel: usb 3-2: new high speed USB device using ehci_hcd and address 19 >May 25 17:31:03 localhost kernel: usb 3-2: configuration #1 chosen from 1 choice >May 25 17:31:03 localhost kernel: scsi18 : SCSI emulation for USB Mass Storage devices >May 25 17:31:09 localhost kernel: Vendor: XXX Model: XXX R/W Rev: 2.00 >May 25 17:31:09 localhost kernel: Type: Direct-Access ANSI SCSI revision: 00 >May 25 17:31:09 localhost kernel: SCSI device sdb: 235776 512-byte hdwr sectors (121 MB) >May 25 17:31:09 localhost kernel: sdb: Write Protect is off >May 25 17:31:09 localhost kernel: sdb: assuming drive cache: write through >May 25 17:31:09 localhost kernel: SCSI device sdb: 235776 512-byte hdwr sectors (121 MB) >May 25 17:31:09 localhost kernel: sdb: Write Protect is off >May 25 17:31:09 localhost kernel: sdb: assuming drive cache: write through >May 25 17:31:09 localhost kernel: sdb: sdb1 sdb2 >May 25 17:31:09 localhost kernel: sd 18:0:0:0: Attached scsi removable disk sdb >May 25 17:31:09 localhost kernel: sd 18:0:0:0: Attached scsi generic sg1 type 0 原因が解らずudevルールを削ったりしたが変わらず ふと思いついてsyslogにdebugメッセージも出してみると >May 25 18:48:11 localhost kernel: usb-storage: device found at 24 >May 25 18:48:11 localhost kernel: usb-storage: waiting for device to settle before scanning >May 25 18:48:16 localhost kernel: sdb: Mode Sense: 4b 00 00 08 >May 25 18:48:16 localhost kernel: sdb: Mode Sense: 4b 00 00 08 >May 25 18:48:16 localhost kernel: usb-storage: device scan complete 犯人はusb-storageらしい "waiting for device to settle before scanning"でソースをgrepしてみると >/kernel-2.6.18/linux->2.6.18.i686/drivers/usb/storage/usb.c >static int usb_stor_scan_thread(void * __us) >{ >    struct us_data *us = (struct us_data *)__us; > >    printk(KERN_DEBUG >        "usb-storage: device found at %d\n", us->pusb_dev->devnum); > >    /* Wait for the timeout to expire or for a disconnect */ >    if (delay_use > 0) { >        printk(KERN_DEBUG "usb-storage: waiting for device " >                "to settle before scanning\n"); >retry: >    wait_event_interruptible_timeout(us->delay_wait, >                test_bit(US_FLIDX_DISCONNECTING, &us->flags), >                delay_use * HZ); >        if (try_to_freeze()) >            goto retry; >    } 急に抜き差しされた場合におかしくならないようにwaitしているらしい delay_use = 5でdefineされていたので5秒waitしている >static unsigned int delay_use = 5; >module_param(delay_use, uint, S_IRUGO | S_IWUSR); module_paramとして定義されているので、insmod時に時間指定できるようだ ># insmod usb-storage.ko delay_use=0 これでwait時間無しにデバイスが認識された

表示オプション

横に並べて表示:
変化行の前後のみ表示:
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。