免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2637 | 回复: 0
打印 上一主题 下一主题

USB host controller这样正常启动了么? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-11-25 17:09 |只看该作者 |倒序浏览
20可用积分
int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
    u8 intr = 0;

    printk("pcibios_map_irq: %02x %02x\n", slot, pin);
    /* This should be how its done but our boards are
     * wired a bit different so hardcode the interrupt
     * after this.
     */

    switch(pin)
    {
        case 1: intr = IAD_IV_HI0; break;
        case 2: intr = IAD_IV_HI1; break;
        case 3: intr = IAD_IV_HI2; break;
    }
    /* now for hardwire */
    /* TODO: need to check other boards to make sure all are
     * set to use HI2 intr
     */

    intr = IAD_IV_HI2;

    pci_write_config_byte(dev, PCI_INTERRUPT_LINE, intr);
    return intr;
}

上面是这个程序在开机的时候显示把slot与pin所有组合打印出来了,pci_write_config_byte写入中断线,IAD_IV_HI2的值是0x0B即11,即把所有PCI设备中断号都设置为11??但是我的pci usb host controller的中断线的那个字节是只读的,那这个函数是不是就是对我的设备没有影响了?

mknod /dev/sda  b 8 0
mknod /dev/sda1  b 8 0
insmod usbcore.o
insmod ehci-hcd
insmod scsi_mod
insmod usb-storage
insmod sd_mod
mount -t usbfs none /proc/bus/usb

依次执行上面步骤,加载各个模块后kmsg的信息如下,
<7>ehci_hcd 0000:00:05.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:05.2: can't reset
<3>ehci_hcd 0000:00:05.2: init 0000:00:05.2 fail, -145
<4>ehci_hcd: probe of 0000:00:05.2 failed with error -145
<6>ehci_hcd 0000:00:06.2: EHCI Host Controller
<7>ehci_hcd 0000:00:06.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:06.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:06.2: can't reset
<3>ehci_hcd 0000:00:06.2: init 0000:00:06.2 fail, -145
<4>ehci_hcd: probe of 0000:00:06.2 failed with error -145
<6>ehci_hcd 0000:00:07.2: EHCI Host Controller
<7>ehci_hcd 0000:00:07.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:07.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:07.2: can't reset
<3>ehci_hcd 0000:00:07.2: init 0000:00:07.2 fail, -145
<4>ehci_hcd: probe of 0000:00:07.2 failed with error -145
<6>ehci_hcd 0000:00:08.2: EHCI Host Controller
<7>ehci_hcd 0000:00:08.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:08.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:08.2: can't reset
<3>ehci_hcd 0000:00:08.2: init 0000:00:08.2 fail, -145
<4>ehci_hcd: probe of 0000:00:08.2 failed with error -145
<6>ehci_hcd 0000:00:09.2: EHCI Host Controller
<7>ehci_hcd 0000:00:09.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:09.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:09.2: can't reset
<3>ehci_hcd 0000:00:09.2: init 0000:00:09.2 fail, -145
<4>ehci_hcd: probe of 0000:00:09.2 failed with error -145
<6>ehci_hcd 0000:00:0a.2: EHCI Host Controller
<7>ehci_hcd 0000:00:0a.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:0a.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:0a.2: can't reset
<3>ehci_hcd 0000:00:0a.2: init 0000:00:0a.2 fail, -145
<4>ehci_hcd: probe of 0000:00:0a.2 failed with error -145
<6>ehci_hcd 0000:00:0b.2: EHCI Host Controller
<7>ehci_hcd 0000:00:0b.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:0b.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:0b.2: can't reset
<3>ehci_hcd 0000:00:0b.2: init 0000:00:0b.2 fail, -145
<4>ehci_hcd: probe of 0000:00:0b.2 failed with error -145
<6>ehci_hcd 0000:00:0c.2: EHCI Host Controller
<7>ehci_hcd 0000:00:0c.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:0c.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:0c.2: can't reset
<3>ehci_hcd 0000:00:0c.2: init 0000:00:0c.2 fail, -145
<4>ehci_hcd: probe of 0000:00:0c.2 failed with error -145
<6>ehci_hcd 0000:00:0d.2: EHCI Host Controller
<7>ehci_hcd 0000:00:0d.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:0d.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:0d.2: can't reset
<3>ehci_hcd 0000:00:0d.2: init 0000:00:0d.2 fail, -145
<4>ehci_hcd: probe of 0000:00:0d.2 failed with error -145
<6>ehci_hcd 0000:00:0e.2: EHCI Host Controller
<7>ehci_hcd 0000:00:0e.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:0e.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:0e.2: can't reset
<3>ehci_hcd 0000:00:0e.2: init 0000:00:0e.2 fail, -145
<4>ehci_hcd: probe of 0000:00:0e.2 failed with error -145
<6>ehci_hcd 0000:00:0f.2: EHCI Host Controller
<7>ehci_hcd 0000:00:0f.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:0f.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:0f.2: can't reset
<3>ehci_hcd 0000:00:0f.2: init 0000:00:0f.2 fail, -145
<4>ehci_hcd: probe of 0000:00:0f.2 failed with error -145
<6>ehci_hcd 0000:00:10.2: EHCI Host Controller
<7>ehci_hcd 0000:00:10.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:10.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:10.2: can't reset
<3>ehci_hcd 0000:00:10.2: init 0000:00:10.2 fail, -145
<4>ehci_hcd: probe of 0000:00:10.2 failed with error -145
<6>ehci_hcd 0000:00:11.2: EHCI Host Controller
<7>ehci_hcd 0000:00:11.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:11.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:11.2: can't reset
<3>ehci_hcd 0000:00:11.2: init 0000:00:11.2 fail, -145
<4>ehci_hcd: probe of 0000:00:11.2 failed with error -145
<6>ehci_hcd 0000:00:12.2: EHCI Host Controller
<7>ehci_hcd 0000:00:12.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:12.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:12.2: can't reset
<3>ehci_hcd 0000:00:12.2: init 0000:00:12.2 fail, -145
<4>ehci_hcd: probe of 0000:00:12.2 failed with error -145
<6>ehci_hcd 0000:00:13.2: EHCI Host Controller
<7>ehci_hcd 0000:00:13.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:13.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:13.2: can't reset
<3>ehci_hcd 0000:00:13.2: init 0000:00:13.2 fail, -145
<4>ehci_hcd: probe of 0000:00:13.2 failed with error -145
<6>ehci_hcd 0000:00:14.2: EHCI Host Controller
<7>ehci_hcd 0000:00:14.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:14.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:14.2: can't reset
<3>ehci_hcd 0000:00:14.2: init 0000:00:14.2 fail, -145
<4>ehci_hcd: probe of 0000:00:14.2 failed with error -145
<6>ehci_hcd 0000:00:15.2: EHCI Host Controller
<7>ehci_hcd 0000:00:15.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:15.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:15.2: can't reset
<3>ehci_hcd 0000:00:15.2: init 0000:00:15.2 fail, -145
<4>ehci_hcd: probe of 0000:00:15.2 failed with error -145
<6>ehci_hcd 0000:00:16.2: EHCI Host Controller
<7>ehci_hcd 0000:00:16.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:16.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:16.2: can't reset
<3>ehci_hcd 0000:00:16.2: init 0000:00:16.2 fail, -145
<4>ehci_hcd: probe of 0000:00:16.2 failed with error -145
<6>ehci_hcd 0000:00:17.2: EHCI Host Controller
<7>ehci_hcd 0000:00:17.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:17.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:17.2: can't reset
<3>ehci_hcd 0000:00:17.2: init 0000:00:17.2 fail, -145
<4>ehci_hcd: probe of 0000:00:17.2 failed with error -145
<6>ehci_hcd 0000:00:18.2: EHCI Host Controller
<7>ehci_hcd 0000:00:18.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:18.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:18.2: can't reset
<3>ehci_hcd 0000:00:18.2: init 0000:00:18.2 fail, -145
<4>ehci_hcd: probe of 0000:00:18.2 failed with error -145
<6>ehci_hcd 0000:00:19.2: EHCI Host Controller
<7>ehci_hcd 0000:00:19.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:19.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:19.2: can't reset
<3>ehci_hcd 0000:00:19.2: init 0000:00:19.2 fail, -145
<4>ehci_hcd: probe of 0000:00:19.2 failed with error -145
<6>ehci_hcd 0000:00:1a.2: EHCI Host Controller
<7>ehci_hcd 0000:00:1a.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:1a.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:1a.2: can't reset
<3>ehci_hcd 0000:00:1a.2: init 0000:00:1a.2 fail, -145
<4>ehci_hcd: probe of 0000:00:1a.2 failed with error -145
<6>ehci_hcd 0000:00:1b.2: EHCI Host Controller
<7>ehci_hcd 0000:00:1b.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:1b.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:1b.2: can't reset
<3>ehci_hcd 0000:00:1b.2: init 0000:00:1b.2 fail, -145
<4>ehci_hcd: probe of 0000:00:1b.2 failed with error -145
<6>ehci_hcd 0000:00:1c.2: EHCI Host Controller
<7>ehci_hcd 0000:00:1c.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:1c.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:1c.2: can't reset
<3>ehci_hcd 0000:00:1c.2: init 0000:00:1c.2 fail, -145
<4>ehci_hcd: probe of 0000:00:1c.2 failed with error -145
<6>ehci_hcd 0000:00:1d.2: EHCI Host Controller
<7>ehci_hcd 0000:00:1d.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:1d.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:1d.2: can't reset
<3>ehci_hcd 0000:00:1d.2: init 0000:00:1d.2 fail, -145
<4>ehci_hcd: probe of 0000:00:1d.2 failed with error -145
<6>ehci_hcd 0000:00:1e.2: EHCI Host Controller
<7>ehci_hcd 0000:00:1e.2: reset hcs_params 0x2100002 dbg=1 cc=0 pcc=0 ordered !ppc ports=2
<7>ehci_hcd 0000:00:1e.2: reset hcc_params 2100002 thresh 0 uframes 256/512/1024
<3>ehci_hcd 0000:00:1e.2: can't reset
<3>ehci_hcd 0000:00:1e.2: init 0000:00:1e.2 fail, -145
<4>ehci_hcd: probe of 0000:00:1e.2 failed with error -145
<6>ehci_hcd 0000:00:1f.2: EHCI Host Controller
<7>ehci_hcd 0000:00:1f.2: reset hcs_params 0x102204 dbg=1 cc=2 pcc=2 ordered !ppc ports=4
<7>ehci_hcd 0000:00:1f.2: reset hcc_params 6872 thresh 7 uframes 256/512/1024
<7>ehci_hcd 0000:00:1f.2: capability 0001 at 68
<6>ehci_hcd 0000:00:1f.2: irq 10, pci mem 0xa8007a00
<6>ehci_hcd 0000:00:1f.2: new USB bus registered, assigned bus number 1
<7>ehci_hcd 0000:00:1f.2: reset command 08000a (park)=0 ithresh=8 period=256 Reset HALT
<7>ehci_hcd 0000:00:1f.2: init command 400009 (park)=0 ithresh=0 period=256 RUN
<6>ehci_hcd 0000:00:1f.2: USB 2.0 initialized, EHCI 3.00, driver 26 Oct 2004
<7>ehci_hcd 0000:00:1f.2: supports USB remote wakeup
<7>usb usb1: new device strings: Mfr=3, Product=2, SerialNumber=1
<7>usb usb1: default language 0x0409
<6>usb usb1: Product: EHCI Host Controller
<6>usb usb1: Manufacturer: Linux 2.6.10_dev-malta-mips2_fp_le ehci_hcd
<6>usb usb1: SerialNumber: 0000:00:1f.2
<7>usb usb1: hotplug
<7>usb usb1: adding 1-0:1.0 (config #1, interface 0)
<7>usb 1-0:1.0: hotplug
<7>hub 1-0:1.0: usb_probe_interface
<7>hub 1-0:1.0: usb_probe_interface - got id
<6>hub 1-0:1.0: USB hub found
<6>hub 1-0:1.0: 4 ports detected
<7>hub 1-0:1.0: standalone hub
<7>hub 1-0:1.0: ganged power switching
<7>hub 1-0:1.0: individual port over-current protection
<7>hub 1-0:1.0: Single TT
<7>hub 1-0:1.0: TT requires at most 8 FS bit times
<7>hub 1-0:1.0: power on to power good time: 20ms
<7>hub 1-0:1.0: local power source is good
<7>hub 1-0:1.0: enabling power on all ports
<7>hub 1-0:1.0: state 5 ports 4 chg ffff evt ffff
<7>hub 1-0:1.0: port 1, status 0100, change 0000, 12 Mb/s
<7>hub 1-0:1.0: port 2, status 0100, change 0000, 12 Mb/s
<7>hub 1-0:1.0: port 3, status 0100, change 0000, 12 Mb/s
<7>hub 1-0:1.0: port 4, status 0100, change 0000, 12 Mb/s
<5>SCSI subsystem initialized
<6>Initializing USB Mass Storage driver...
<6>usbcore: registered new driver usb-storage
<6>USB Mass Storage support registered.

看这个日志的记录,好像没有什么错误的地方,但是我插个读卡器没有任何反应,mount /dev/sda1 /mnt 显示没有此设备。而读卡器连灯也没有亮,是驱动的问题还是读卡器的问题?
还有附件是手册里的一段话,不是很明白,希望高手讲解

QQ截图未命名.jpg (92.48 KB, 下载次数: 33)

QQ截图未命名.jpg
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP