当前位置: 技术问答>linux和unix
请教:linux中usb驱动中sd_open()的系统调用是怎么触发的
来源: 互联网 发布时间:2016-10-26
本文导语: trace如下: [ 1828.731377] sd_open-629 [ 1828.731385] Pid: 3591, comm: hald-addon-stor Not tainted 2.6.27.42 #11 [ 1828.731390] [] ? printk+0x18/0x1d [ 1828.731406] [] sd_open+0x39/0x210 [ 1828.731413] [] do_open+0x1f9/0x2c0 [ 1828.731419] [] ? pat...
trace如下:
[ 1828.731377] sd_open-629
[ 1828.731385] Pid: 3591, comm: hald-addon-stor Not tainted 2.6.27.42 #11
[ 1828.731390] [] ? printk+0x18/0x1d
[ 1828.731406] [] sd_open+0x39/0x210
[ 1828.731413] [] do_open+0x1f9/0x2c0
[ 1828.731419] [] ? path_walk+0xa2/0xb0
[ 1828.731425] [] blkdev_open+0x33/0x70
[ 1828.731430] [] __dentry_open+0xb7/0x260
[ 1828.731436] [] nameidata_to_filp+0x47/0x60
[ 1828.731442] [] ? blkdev_open+0x0/0x70
[ 1828.731448] [] do_filp_open+0x1b5/0x780
[ 1828.731453] [] ? scsi_device_put+0x30/0x50
[ 1828.731459] [] ? sd_release+0x6a/0x110
[ 1828.731464] [] ? iput+0x20/0x60
[ 1828.731469] [] ? mntput_no_expire+0x1d/0x120
[ 1828.731474] [] ? alloc_fd+0xe0/0x100
[ 1828.731479] [] do_sys_open+0x5d/0xf0
[ 1828.731483] [] ? copy_to_user+0x36/0x120
[ 1828.731489] [] sys_open+0x29/0x40
[ 1828.731494] [] sysenter_do_call+0x12/0x2f
[ 1828.731499] =======================
[ 1828.731502] scsi_disk_get-347
[ 1828.731504] __scsi_disk_get-332
[ 1828.731509] sd_media_changed-824
[ 1828.731710] sd_prep_fn-606
[ 1828.748590] usb_stor_control_thread() line-322 loop times 968
[ 1828.748593]
[ 1828.748646] sd_media_changed-885
[ 1828.748661] sd_release-706
[ 1828.748664] scsi_disk_put-370
插上usb的时候,dmesg看到的都是这样的轮询,sysenter_do_call这个函数是怎么触发的?
[ 1828.731377] sd_open-629
[ 1828.731385] Pid: 3591, comm: hald-addon-stor Not tainted 2.6.27.42 #11
[ 1828.731390] [] ? printk+0x18/0x1d
[ 1828.731406] [] sd_open+0x39/0x210
[ 1828.731413] [] do_open+0x1f9/0x2c0
[ 1828.731419] [] ? path_walk+0xa2/0xb0
[ 1828.731425] [] blkdev_open+0x33/0x70
[ 1828.731430] [] __dentry_open+0xb7/0x260
[ 1828.731436] [] nameidata_to_filp+0x47/0x60
[ 1828.731442] [] ? blkdev_open+0x0/0x70
[ 1828.731448] [] do_filp_open+0x1b5/0x780
[ 1828.731453] [] ? scsi_device_put+0x30/0x50
[ 1828.731459] [] ? sd_release+0x6a/0x110
[ 1828.731464] [] ? iput+0x20/0x60
[ 1828.731469] [] ? mntput_no_expire+0x1d/0x120
[ 1828.731474] [] ? alloc_fd+0xe0/0x100
[ 1828.731479] [] do_sys_open+0x5d/0xf0
[ 1828.731483] [] ? copy_to_user+0x36/0x120
[ 1828.731489] [] sys_open+0x29/0x40
[ 1828.731494] [] sysenter_do_call+0x12/0x2f
[ 1828.731499] =======================
[ 1828.731502] scsi_disk_get-347
[ 1828.731504] __scsi_disk_get-332
[ 1828.731509] sd_media_changed-824
[ 1828.731710] sd_prep_fn-606
[ 1828.748590] usb_stor_control_thread() line-322 loop times 968
[ 1828.748593]
[ 1828.748646] sd_media_changed-885
[ 1828.748661] sd_release-706
[ 1828.748664] scsi_disk_put-370
插上usb的时候,dmesg看到的都是这样的轮询,sysenter_do_call这个函数是怎么触发的?
|