在《debian下使用dynamic printk分析usb转串口驱动执行流程》中使用了usb转串口,当前例子使用usb网卡分析驱动(dm9601芯片)。

仍然需要使能dynamic printk,可以参考《debian下配置dynamic printk以及重新编译内核》配置并重新编译内核。

此处使用的usb网卡是从京东购买的沐阳 Jp1081。

未插入usb网卡时,查看usb信息:

  1. $ lsusb
  2. Bus Device : ID 1d6b: Linux Foundation 2.0 root hub
  3. Bus Device : ID 1d6b: Linux Foundation 3.0 root hub
  4. Bus Device : ID 1d6b: Linux Foundation 2.0 root hub
  5. Bus Device : ID 1d6b: Linux Foundation 2.0 root hub
  6. Bus Device : ID 174f:114f Syntek
  7. Bus Device : ID : Intel Corp. Integrated Rate Matching Hub
  8. Bus Device : ID : Intel Corp. Integrated Rate Matching Hub
  9. Bus Device : ID 105b:e065
  10. Bus Device : ID 0bda: Realtek Semiconductor Corp.

插入usb网卡,查看usb信息:

  1. $ lsusb
  2. Bus Device : ID 1d6b: Linux Foundation 2.0 root hub
  3. Bus Device : ID 1d6b: Linux Foundation 3.0 root hub
  4. Bus Device : ID 1d6b: Linux Foundation 2.0 root hub
  5. Bus Device : ID 1d6b: Linux Foundation 2.0 root hub
  6. Bus Device : ID 174f:114f Syntek
  7. Bus Device : ID : Intel Corp. Integrated Rate Matching Hub
  8. Bus Device : ID : Intel Corp. Integrated Rate Matching Hub
  9. Bus Device : ID 105b:e065
  10. Bus Device : ID 0bda: Realtek Semiconductor Corp.
  11. Bus 001 Device 074: ID 0fe6:9700 Kontron (Industrial Computer Source / ICS Advent) DM9601 Fast Ethernet Adapter

可以看到多出一行输出信息,其核心芯片是DM9601。

查看dm9601驱动信息:

  1. $ sudo modinfo dm9601
  2. [sudo] password for host:
  3. filename: /lib/modules/3.2./kernel/drivers/net/usb/dm9601.ko
  4. license: GPL
  5. description: Davicom DM9601 USB 1.1 ethernet devices
  6. author: Peter Korsgaard <jacmet@sunsite.dk>
  7. alias: usb:v0A46p9000d*dc*dsc*dp*ic*isc*ip*
  8. alias: usb:v0FE6p9700d*dc*dsc*dp*ic*isc*ip*
  9. alias: usb:v0FE6p8101d*dc*dsc*dp*ic*isc*ip*
  10. alias: usb:v0A47p9601d*dc*dsc*dp*ic*isc*ip*
  11. alias: usb:v0A46p8515d*dc*dsc*dp*ic*isc*ip*
  12. alias: usb:v0A46p0268d*dc*dsc*dp*ic*isc*ip*
  13. alias: usb:v0A46p6688d*dc*dsc*dp*ic*isc*ip*
  14. alias: usb:v0A46p9601d*dc*dsc*dp*ic*isc*ip*
  15. alias: usb:v07AAp9601d*dc*dsc*dp*ic*isc*ip*
  16. depends: usbnet,usbcore,mii
  17. intree: Y
  18. vermagic: 3.2. SMP mod_unload modversions

其中depends:一行后面的内容表示dm9601依赖于usbnet和usbcore和mii这三个驱动模块,

可以继续用modinfo查看其他模块的依赖关系,还有usbcore依赖于usb-common模块。

所以dm9601芯片依赖于dm9601、usbnet、mii、usbcore和usb-common这五个驱动程序。

查看drivers/net/usbMakefile,可以知道:

dm9601驱动由drivers/net/usb/dm9601.c生成的

usbnet驱动是由drivers/net/usb/usbnet.c生成的。

查看drivers/net/Makefile,可以知道:

mii驱动是由drivers/net/mii.c生成的。

查看drivers/usb/Makefile,可以知道:

usb-common驱动是由drivers/usb/usb-common.c生成的。

查看drivers/usb/core/Makefile,可以知道:

usbcore是由由drivers/usb/core/下面的usb.c hub.c hcd.c urb.c message.c driver.c config.c file.c buffer.c sysfs.c endpoint.c devio.c

notify.c generic.c quirks.c devices.c hcd-pci.c inode.c这些文件生成的。

编译一个配置脚本来配置dynamic printk,内容如下:

  1. #!/bin/sh
  2.  
  3. DYNAMIC_CONTROL=/sys/kernel/debug/dynamic_debug/control
  4.  
  5. #usbcore
  6. echo 'file drivers/usb/core/usb.c +flmpt' > $DYNAMIC_CONTROL
  7. echo 'file drivers/usb/core/hub.c +flmpt' > $DYNAMIC_CONTROL
  8. echo 'file drivers/usb/core/hcd.c +flmpt' > $DYNAMIC_CONTROL
  9. echo 'file drivers/usb/core/urb.c +flmpt' > $DYNAMIC_CONTROL
  10. echo 'file drivers/usb/core/message.c +flmpt' > $DYNAMIC_CONTROL
  11. echo 'file drivers/usb/core/driver.c +flmpt' > $DYNAMIC_CONTROL
  12. echo 'file drivers/usb/core/config.c +flmpt' > $DYNAMIC_CONTROL
  13. echo 'file drivers/usb/core/file.c +flmpt' > $DYNAMIC_CONTROL
  14. echo 'file drivers/usb/core/buffer.c +flmpt' > $DYNAMIC_CONTROL
  15. echo 'file drivers/usb/core/sysfs.c +flmpt' > $DYNAMIC_CONTROL
  16. echo 'file drivers/usb/core/endpoint.c +flmpt' > $DYNAMIC_CONTROL
  17. echo 'file drivers/usb/core/device.c +flmpt' > $DYNAMIC_CONTROL
  18. echo 'file drivers/usb/core/notify.c +flmpt' > $DYNAMIC_CONTROL
  19. echo 'file drivers/usb/core/generic.c +flmpt' > $DYNAMIC_CONTROL
  20. echo 'file drivers/usb/core/quirks.c +flmpt' > $DYNAMIC_CONTROL
  21. echo 'file drivers/usb/core/devices.c +flmpt' > $DYNAMIC_CONTROL
  22. echo 'file drivers/usb/core/hci-pci.c +flmpt' > $DYNAMIC_CONTROL
  23. echo 'file drivers/usb/core/inode.c +flmpt' > $DYNAMIC_CONTROL
  24.  
  25. #drivers/base files
  26. echo 'file drivers/base/core.c +flmpt' > $DYNAMIC_CONTROL
  27. echo 'file drivers/base/sys.c +flmpt' > $DYNAMIC_CONTROL
  28. echo 'file drivers/base/bus.c +flmpt' > $DYNAMIC_CONTROL
  29. echo 'file drivers/base/dd.c +flmpt' > $DYNAMIC_CONTROL
  30. echo 'file drivers/base/syscore.c +flmpt' > $DYNAMIC_CONTROL
  31. echo 'file drivers/base/driver.c +flmpt' > $DYNAMIC_CONTROL
  32. echo 'file drivers/base/class.c +flmpt' > $DYNAMIC_CONTROL
  33. echo 'file drivers/base/platform.c +flmpt' > $DYNAMIC_CONTROL
  34. echo 'file drivers/base/cpu.c +flmpt' > $DYNAMIC_CONTROL
  35. echo 'file drivers/base/firmware.c +flmpt' > $DYNAMIC_CONTROL
  36. echo 'file drivers/base/init.c +flmpt' > $DYNAMIC_CONTROL
  37. echo 'file drivers/base/map.c +flmpt' > $DYNAMIC_CONTROL
  38. echo 'file drivers/base/devres.c +flmpt' > $DYNAMIC_CONTROL
  39. echo 'file drivers/base/attribute_container.c +flmpt' > $DYNAMIC_CONTROL
  40. echo 'file drivers/base/transport_class.c +flmpt' > $DYNAMIC_CONTROL
  41. echo 'file drivers/base/topology.c +flmpt' > $DYNAMIC_CONTROL
  42.  
  43. #usb-common
  44. echo 'file drivers/usb/usb-common.c +flmpt' > $DYNAMIC_CONTROL
  45.  
  46. #mii
  47. echo 'file drivers/net/mii.c +flmpt' > $DYNAMIC_CONTROL
  48.  
  49. #usbnet
  50. echo 'file drivers/net/usbnet.c +flmpt' > $DYNAMIC_CONTROL
  51.  
  52. #dm9601
  53. echo 'file drivers/net/dm9601.c +flmpt' > $DYNAMIC_CONTROL

切换到root账户:

  1. su

下面命令都是使用root账户执行:

挂载debugfs:

  1. mount -t debugfs none /sys/kernel/debug

拔掉usb网卡,删除dm9601、usbnet和mii驱动(usbcore和usb_common无法删除,也应该删除):

  1. # modprobe -r dm9601 usbnet mii

然后执行上面配置dynamic printk的脚本。

然后插入usb网卡,得到下面信息(使用dmesg):

  1. [38737.680241] [] usbcore:usb_remote_wakeup:: usb usb1: usb wakeup-resume
  2. [38737.680254] [] usbcore:hcd_bus_resume:: usb usb1: usb auto-resume
  3. [38737.693461] [] usbcore:hub_resume:: hub -:1.0: hub_resume
  4. [38737.693488] [] usbcore:hub_activate:: hub -:1.0: port : status change
  5. [38737.693504] [] usbcore:hub_activate:: hub -:1.0: port : status change
  6. [38737.797310] [] usbcore:hub_events:: hub -:1.0: state ports chg evt
  7. [38737.797343] [] usbcore:hub_port_connect_change:: hub -:1.0: port , status , change , Mb/s
  8. [38737.925150] [] usbcore:hub_port_debounce:: hub -:1.0: debounce: port : total 100ms stable 100ms status 0x101
  9. [38738.036986] usb -: new full-speed USB device number using xhci_hcd
  10. [38738.053846] [] usbcore:usb_get_langid:: usb -: default language 0x0409
  11. [38738.054100] [] usbcore:usb_new_device:: usb -: udev , busnum , minor =
  12. [38738.054108] usb -: New USB device found, idVendor=0fe6, idProduct=
  13. [38738.054112] usb -: New USB device strings: Mfr=, Product=, SerialNumber=
  14. [38738.054116] usb -: Product: USB 2.0 /100M Ethernet Adaptor
  15. [38738.054125] [] core:device_add:: device: '1-2': device_add
  16. [38738.054287] [] bus:bus_add_device:: bus: 'usb': add device -
  17. [38738.054364] [] dd:driver_probe_device:: bus: 'usb': driver_probe_device: matched device - with driver usb
  18. [38738.054375] [] dd:really_probe:: bus: 'usb': really_probe: probing driver usb with device -
  19. [38738.054395] [] usbcore:usb_probe_device:: usb -: usb_probe_device
  20. [38738.054407] [] usbcore:usb_choose_configuration:: usb -: configuration # chosen from choice
  21. [38738.054669] [] usbcore:usb_set_configuration:: usb -: adding -:1.0 (config #, interface )
  22. [38738.054684] [] core:device_add:: device: '1-2:1.0': device_add
  23. [38738.054720] [] bus:bus_add_device:: bus: 'usb': add device -:1.0
  24. [38738.054802] [] dd:driver_probe_device:: bus: 'usb': driver_probe_device: matched device -:1.0 with driver usbserial_generic
  25. [38738.054814] [] dd:really_probe:: bus: 'usb': really_probe: probing driver usbserial_generic with device -:1.0
  26. [38738.054837] [] usbcore:usb_probe_interface:: usbserial_generic -:1.0: usb_probe_interface
  27. [38738.054851] [] usbcore:usb_probe_interface:: usbserial_generic -:1.0: usb_probe_interface - got id
  28. [38738.054877] [] dd:really_probe:: usbserial_generic: probe of -:1.0 rejects match -
  29. [38738.054916] [] core:device_add:: device: 'ep_81': device_add
  30. [38738.054975] [] core:device_add:: device: 'ep_02': device_add
  31. [38738.055022] [] core:device_add:: device: 'ep_83': device_add
  32. [38738.055079] [] dd:driver_bound:: driver: '1-2': driver_bound: bound to device 'usb'
  33. [38738.055088] [] dd:really_probe:: bus: 'usb': really_probe: bound device - to driver usb
  34. [38738.055101] [] core:device_add:: device: 'ep_00': device_add
  35. [38738.079351] [] bus:bus_add_driver:: bus: 'usb': add driver dm9601
  36. [38738.079374] [] dd:driver_probe_device:: bus: 'usb': driver_probe_device: matched device -:1.0 with driver dm9601
  37. [38738.079382] [] dd:really_probe:: bus: 'usb': really_probe: probing driver dm9601 with device -:1.0
  38. [38738.079392] [] usbcore:usb_probe_interface:: dm9601 -:1.0: usb_probe_interface
  39. [38738.079399] [] usbcore:usb_probe_interface:: dm9601 -:1.0: usb_probe_interface - got id
  40. [38738.092443] [] core:device_add:: device: 'eth0': device_add
  41. [38738.093442] dm9601 -:1.0: eth0: register 'dm9601' at usb-::14.0-, Davicom DM9601 USB Ethernet, :e0:4c:::
  42. [38738.093482] [] dd:driver_bound:: driver: '1-2:1.0': driver_bound: bound to device 'dm9601'
  43. [38738.093497] [] dd:really_probe:: bus: 'usb': really_probe: bound device -:1.0 to driver dm9601
  44. [38738.093586] usbcore: registered new interface driver dm9601
  45. [38738.101169] [] core:device_rename:: device: 'eth0': device_rename: renaming to 'eth1'
  46. [38738.137651] udevd[]: renamed network interface eth0 to eth1
  47. [38738.188557] dm9601 -:1.0: eth1: link up, 100Mbps, full-duplex, lpa 0xFFFF
  48. [38748.657111] eth1: no IPv6 routers present

前面大部分输出信息跟使用usb转串口类似,都是使用usbcore检测设备信息以及设备驱动,最终检测到dm9601驱动

usb中有个remote wakeup功能,usb hcd(host controller driver)中默认remote wakeup功能就是调用hcd_resume_work实现,

该函数会调用usb_remote_wakeup,就产生了输出信息:

  1. [38737.680241] [] usbcore:usb_remote_wakeup:: usb usb1: usb wakeup-resume

在usb子系统初始化之时,执行usb_init函数,该函数调用了usb_register_device_driver(&usb_generic_driver, THIS_MODULE).

默认情况下找到usb设备都是先调用usb_generic_driver的相关函数。此处执行resume功能就调用usb.generic_driver的resume功能,

即generic_resume函数。

在执行generic_resume时,调用了hcd_bus_resume函数,输出了下面信息:

  1. [38737.680254] [] usbcore:hcd_bus_resume:: usb usb1: usb auto-resume

接着调用hub的resume功能,即hub_resume函数,输出下面信息:

  1. [38737.693461] [] usbcore:hub_resume:: hub -:1.0: hub_resume

hub_resume中还执行hub_activate(hub,HUB_RESUME),在hub_activate中检查每一个port是否状态发生了改变,并输出信息,

产生下面两行输出:

  1. [38737.693488] [] usbcore:hub_activate:: hub -:1.0: port : status change
  2. [38737.693504] [] usbcore:hub_activate:: hub -:1.0: port : status change

在usb hub初始化时,创建了一个内核线程(名为khubd),线程执行函数是hub_thread.

在hub_thread函数中循环执行hub_events函数,hub_events中循环检测是否port状态发生了改变,并根据其改变状态执行功能。

hub_events函数中如果hub_event_list不空,那么就获取从hub_event_list获取对应的事件,根据该事件得到hub,再根据hub得到对应的hub_dev。

然后输出事件信息:

[38737.797310] [164] usbcore:hub_events:3592: hub 1-0:1.0: state 7 ports 4 chg 0004 evt

hub_events中检测到port连接状态发生了改变,会调用hub_port_connect_change函数,该函数开头输出信息:

  1. [38737.797343] [] usbcore:hub_port_connect_change:: hub -:1.0: port , status , change , Mb/s

在hub_port_connect_change函数中执行hub_port_debounce函数,输出下面信息:

  1. [38737.925150] [] usbcore:hub_port_debounce:: hub -:1.0: debounce: port : total 100ms stable 100ms status 0x101

接着执行hub_port_init函数,在hub_port_init中输出下面信息:

  1. [38738.036986] usb -: new full-speed USB device number using xhci_hcd

接着执行usb_new_device函数,调用usb_enumerate_device函数,usb_enumerate_device调用usb_cache_string,

usb_cache_string调用usb_string,usb_string调用usb_get_langid,输出下面信息:

  1. [38738.053846] [] usbcore:usb_get_langid:: usb -: default language 0x0409

之后usb_new_device输出下面信息:

  1. [38738.054100] [] usbcore:usb_new_device:: usb -: udev , busnum , minor =

在usb_new_device中调用announce_device函数,输出下面信息:

  1. [38738.054108] usb -: New USB device found, idVendor=0fe6, idProduct=
  2. [38738.054112] usb -: New USB device strings: Mfr=, Product=, SerialNumber=
  3. [38738.054116] usb -: Product: USB 2.0 /100M Ethernet Adaptor

usb_new_device接着调用device_add。

在device_add中输出信息:

  1. [38738.054125] [] core:device_add:: device: '1-2': device_add

device_add中接着调用bus_add_device。

bus_add_device中输出信息:

  1. [38738.054287] [] bus:bus_add_device:: bus: 'usb': add device -

device_add中接着调用bus_probe_device,bus_probe_device中执行device_attach.

在device_attach中对其bus上的每一个驱动都调用__device_attach函数。

在__device_attach中对调用driver_match_device来对驱动和设备来进行匹配,如果匹配成功,则调用driver_probe_device,否则直接返回0.

此处将设备和驱动匹配成功,所以执行driver_probe_device函数。

在执行driver_probe_device时输出下面信息:

  1. [38738.054364] [] dd:driver_probe_device:: bus: 'usb': driver_probe_device: matched device - with driver usb

driver_probe_device继续执行really_probe函数,输出下面信息:

  1. [38738.054375] [] dd:really_probe:: bus: 'usb': really_probe: probing driver usb with device -

driver_probe_device会执行其驱动的probe函数。之前在对usb subsys初始化时调用了usb_init,usb_init调用了

usb_register_device_driver(&usb_generic_driver, THIS_MODULE),然后usb_register_device_driver中设置了驱动的probe函数是usb_probe_device.
所以这里执行usb_probe_device函数,在此函数中输出下面信息:

  1. [38738.054395] [] usbcore:usb_probe_device:: usb -: usb_probe_device

usb_probe_device还会执行usb_device_driver的probe函数,而usb_generic_driver定义时就将其probe设置成了generic_probe.

所以这里会调用generic_probe函数。在generic_probe中会调用usb_choose_configuration,从而输出下面信息:

  1. [38738.054407] [] usbcore:usb_choose_configuration:: usb -: configuration # chosen from choice

generic_probe中接下来调用usb_set_configuration.

usb_set_configuration中对usb接口输出下面信息:

  1. [38738.054669] [] usbcore:usb_set_configuration:: usb -: adding -:1.0 (config #, interface )

在usb_set_configuration中调用device_add函数添加该usb接口设备。

device_add中输出下面信息:

  1. [38738.054684] [] core:device_add:: device: '1-2:1.0': device_add

device_add中调用bus_add_device,输出下面信息:

  1. [38738.054720] [] bus:bus_add_device:: bus: 'usb': add device -:1.0

device_add接下来调用bus_probe_device,跟前面类似,仍然对总线上所有驱动和设备来进行匹配,如果匹配成功,

就执行这个驱动。此处匹配usbserial-generic驱动成功,执行driver_probe_device,输出下面信息:

  1. [38738.054802] [] dd:driver_probe_device:: bus: 'usb': driver_probe_device: matched device -:1.0 with driver usbserial_generic

driver_probe_device中调用really_probe,在really_probe中输出信息:

  1. [38738.054814] [] dd:really_probe:: bus: 'usb': really_probe: probing driver usbserial_generic with device -:1.0

跟前面类似,调用驱动的probe函数,即usb_probe_interface函数。

usb_probe_interface中输出下面信息:

  1. [38738.054837] [] usbcore:usb_probe_interface:: usbserial_generic -:1.0: usb_probe_interface
  2. [38738.054851] [] usbcore:usb_probe_interface:: usbserial_generic -:1.0: usb_probe_interface - got id

该函数执行失败,在回到really_probe函数后输出下面信息:

  1. [38738.054877] [] dd:really_probe:: usbserial_generic: probe of -:1.0 rejects match -

接下来三行输出信息不知道是哪部分代码产生的:

  1. [38738.054916] [] core:device_add:: device: 'ep_81': device_add
  2. [38738.054975] [] core:device_add:: device: 'ep_02': device_add
  3. [38738.055022] [] core:device_add:: device: 'ep_83': device_add

此时返回到上一个执行的really_probe,执行driver_bound,输出信息:

  1. [38738.055079] [] dd:driver_bound:: driver: '1-2': driver_bound: bound to device 'usb'

然后在really_probe中输出下面信息:

  1. [38738.055079] [] dd:driver_bound:: driver: '1-2': driver_bound: bound to device 'usb'

下面一行输出信息页不知道是那部分代码产生的(可能和当前代码执行流程无关?):

  1. [38738.055101] [] core:device_add:: device: 'ep_00': device_add

接下来加载dm9601驱动,调用dm9601_init,dm9601_init调用usb_register(&dm9601_driver).

usb_register中调用bus_add_driver。

在bus_add_driver中输出下面信息:

  1. [38738.079351] [] bus:bus_add_driver:: bus: 'usb': add driver dm9601

bus_add_driver中调用driver_attach,driver_attach中对于总线上每个设备执行__driver_attach.

__driver_attach中对设备和驱动进行匹配,如果匹配成功,则执行driver_probe_device.

此处匹配成功,执行driver_probe_device函数,输出下面信息:

  1. [38738.079374] [] dd:driver_probe_device:: bus: 'usb': driver_probe_device: matched device -:1.0 with driver dm9601

driver_probe_device中执行really_probe函数,然后调用驱动的probe函数,即usb_probe_interface函数,

usb_probe_interface中输出下面信息:

  1. [38738.079392] [] usbcore:usb_probe_interface:: dm9601 -:1.0: usb_probe_interface
  2. [38738.079399] [] usbcore:usb_probe_interface:: dm9601 -:1.0: usb_probe_interface - got id

usb_probe_interface中调用driver->probe,dm9601_driver定义中其probe函数即usbnet_probe函数。

usbnet_probe函数中调用register_netdev,register_netdev调用register_netdevice,register_netdevice调用netdev_register_kobject,

netdev_register_kobject将设备名称设置成eth0,然后调用device_add,在device_add中输出下面信息:

  1. [38738.092443] [] core:device_add:: device: 'eth0': device_add

usbnet_probe继续执行,输出下面信息:

  1. [38738.093442] dm9601 -:1.0: eth0: register 'dm9601' at usb-::14.0-, Davicom DM9601 USB Ethernet, :e0:4c:::

回到really_probe继续执行,调用driver_bound,在driver_bound中输出下面信息:

  1. [38738.093482] [] dd:driver_bound:: driver: '1-2:1.0': driver_bound: bound to device 'dm9601'

然后在really_probe中输出下面信息:

  1. [38738.093497] [] dd:really_probe:: bus: 'usb': really_probe: bound device -:1.0 to driver dm9601

回到前面的usb_register_driver,输出下面信息:

  1. [38738.093586] usbcore: registered new interface driver dm9601

我的系统中udev规则(/etc/udev/rules.d/70-persistent-net.rules)中有下面内容:

  1. # USB device 0x:0x (dm9601)
  2. SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:e0:4c:53:44:58", ATTR{dev_id}=="0x0", ATTR{type}=="", KERNEL== "eth*", NAME="eth1"

所以在添加usb网卡时会将eth0改成eth1,产生下面输出:

  1. [38738.101169] [] core:device_rename:: device: 'eth0': device_rename: renaming to 'eth1'
  2. [38738.137651] udevd[]: renamed network interface eth0 to eth1

dm9601驱动还会调用dm9601_link_reset,dm9601_link_reset调用mii_check_media,mii_check_media中产生下面输出:

  1. [38738.188557] dm9601 -:1.0: eth1: link up, 100Mbps, full-duplex, lpa 0xFFFF

最后一行信息是在addr_rs_timer函数中输出的,该函数被配置成ipv6接口的定时器函数,过一段时间都会调用该函数。

到这里整个usb网卡检测过程就完成了,其他的网卡相关函数还需要看看书后再来分析。

debian下使用dynamic printk分析usb网卡驱动的更多相关文章

  1. debian下使用dynamic printk分析usb转串口驱动执行流程

    看了一篇文章<debug by printing>,文中提到了多种通过printk来调试驱动的方法,其中最有用的就是"Dynamic debugging". “Dyna ...

  2. debian下配置dynamic printk以及重新编译内核

    在以前的一篇博文<编译debian内核>已经提过了重新编译内核的方法,但是整个过程花费时间较长,并且生成deb包. 这里我采用稍微简单一些的方法,因为我并没有对内核或者驱动代码做任何修改, ...

  3. VMware ESXi 7.0 U2 SLIC & Unlocker USB 网卡驱动集成镜像 202109更新

    2021.08.31 更新:集成 "vmkusb-nic-fling"."net-community" 和 "nvme-community" ...

  4. 【Vbox】centos虚拟机安装usb网卡驱动

    前面安装增强pack之后 usb设备是可以识别了,但是无法正常使用,应该是无线网卡驱动没有的原因. 查看usb设备 os:centos6.6 内核:2.6.32-504.el6.x86_64 [roo ...

  5. linux下usb转串口驱动分析【转】

    转自:http://blog.csdn.net/txxm520/article/details/8934706 首先说一下linux的风格,个人理解 1. linux大小结构体其实是面向对象的方法,( ...

  6. linux设备驱动之USB主机控制器驱动分析 【转】

    转自:http://blog.chinaunix.net/uid-20543183-id-1930831.html   ---------------------------------------- ...

  7. USB键盘驱动分析

    简介 本文介绍USB驱动程序编写的流程,分析一个键盘的USB程序,基于linux-2.6.39 USB驱动概要 分层 主机层面的USB驱动的整体架构可以分成4层,自顶到下依次是 1.USB设备驱动:本 ...

  8. C8815 用 USB网卡(Asix AX88772 )上网

    C8815 用 USB网卡(Asix AX88772 )上网 C8815不支持给USB外设供电,不过可以使用自供电的OTG线带动USB设备 C8815最新固件中没有Asix AX88772驱动,需要自 ...

  9. linux下安装编译网卡驱动的方法

    安装linux操作系统后发现没有网卡驱动,表现为 system → Administration → Network下Hardware列表为空. 以下为安装编译网卡驱动的过程,本人是菜鸟,以下是我从网 ...

随机推荐

  1. hdu 4587(割点的应用)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4587 思路:题目的意思很简单,就是删除任意2个节点以及关联的边,求图的最大连通分量数.我们知道删除割点 ...

  2. package-cleanup用法

    今天升级时候遇到"you could try using package-cleanup --problems to work around the problem ...", 本 ...

  3. Apache thrift - 使用,内部实现及构建一个可扩展的RPC框架

    本文首先介绍了什么是Apache Thrift,接着介绍了Thrift的安装部署及如何利用Thrift来实现一个简单的RPC应用,并简单的探究了一下Thrift的内部实现原理,最后给出一个基于Thri ...

  4. @Resource 注解

    @Resource 注解被用来激活一个命名资源(named resource)的依赖注入,在JavaEE应用程序中,该注解被典型地转换为绑定于JNDI context中的一个对象. Spring确实支 ...

  5. Kotlin——中级篇(五):枚举类(Enum)、接口类(Interface)详解

    在上一章节中,详细的类(class)做了一个实例讲解,提到了类(class)的实例化.构造函数.声明.实现方式.和Java中类的区别等.但是对于Kotlin中的类的使用还远远不止那些.并且在上文中提到 ...

  6. 《从零开始学Swift》学习笔记(Day 35)——会使用下标吗?

    原创文章,欢迎转载.转载请注明:关东升的博客 看下面的示例代码是不是使用过: var studentList: String[] = ["张三","李四",&q ...

  7. 单片机教程4.C语言基础以及流水灯的实现

    单片机教程4.C语言基础以及流水灯的实现 C语言,没接触过计算机编程语言的人会把它看的很神秘,感觉非常的难,而在我看来,C语言的逻辑和运算,就是小学水平,所以大家不要怕它,我尽可能的从小学数学逻辑方式 ...

  8. 如何理解docker镜像build中的上下文

    参考:https://yeasy.gitbooks.io/docker_practice/content/image/build.html 理解上线文概念非常重要,不然可能碰到一些奇怪的问题. 构建镜 ...

  9. 详解jquery插件中(function ( $, window, document, undefined )的作用。

    1.(function(window,undefined){})(window); Q:(function(window,undefined){})(window);中为什么要将window和unde ...

  10. .net 取得类的属性、方法、成员及通过属性名取得属性值

    //自定义的类 model m = new model();   //取得类的Type实例 //Type t = typeof(model);    //取得m的Type实例 Type t = m.G ...