- 論壇徽章:
- 0
|
回復(fù) #11 nhuczp 的帖子
我如樓上高手說(shuō)的那樣做了,我把該pci驅(qū)動(dòng)的probe函數(shù)改了一下,加載改模塊后用udevinfo 可以看到以下信息:
----------------------------------------------------------------
udevinfo starts with the device the node belongs to and then walks up the
device chain, to print for every device found, all possibly useful attributes
in the udev key format.
Only attributes within one device section may be used together in one rule,
to match the device for which the node will be created.
device '/sys/class/pnx1700/pnx1700' has major:minor 253:0
looking at class device '/sys/class/pnx1700/pnx1700':
SUBSYSTEM="pnx1700"
SYSFS{dev}="253:0"
----------------------------------------------------------------
加了一條udev規(guī)則:SUBSYSTEM="pnx1700", NAME="pnx1700"
運(yùn)行udevstart就能在/dev下看到/dev/pnx1700設(shè)備節(jié)點(diǎn)了。但是udevinfo信息里面還是沒有看到KERNEL=...這一項(xiàng),總感覺驅(qū)動(dòng)里還有些問(wèn)題,但不知在什么地方???
還有一個(gè)問(wèn)題:加載驅(qū)動(dòng)后,在/sys/bus/pci/drivers里面有我做的驅(qū)動(dòng),但是在在/sys/bus/pci/devices里面有只有2個(gè)pci設(shè)備信息:0000:00:0e.0 0000:00:10.0
用udevinfo查看都不是我做的這個(gè)pci設(shè)備的,我覺得應(yīng)該是3個(gè),第3個(gè)是我做的這個(gè)pci設(shè)備,不知問(wèn)題出在哪里? |
|