Date: Tue, 18 Oct 2005 03:26:56 -0500 From: "Yong Ma" <mayong@mail.com> To: freebsd-drivers@freebsd.org Subject: Some Questions Message-ID: <200510180826.j9I8Quw26871@cal1-1.us4.outblaze.com>
next in thread | raw e-mail | index | archive | help
Hi everybody: =20 I'm new here,nice to meet you all! I'm also aFreeBSD_device_driver newbie, = and now I'm enaged in writting a driverfor a cryptographic accelerator card= .As a preparation I read thesections of device driver in "FreeBSD Architect= ure Handbook",andexercised the example driver in the book.now I have severa= l questions(maybeeasy for you but most useful for me): 1)Some drivers declares the device_open() as int device_open(dev_t dev,...)= ,and some declare it as int device_open(struct cdev *dev,...),sometimes the first one couldn't be compliedsuccessfully,what's t= he difference? 2) if (pci_get_vendor(dev) =3D=3D 0x11c1) { ... ~~~~~~~~how to get this number if I don't kno= w it? 3)Could the device on PCI slot be listed by /pciconf -l /without driver. 4)The printf() seems not work under XWindow mode in functions like deviec_p= rob or device_attach,how to make it work? 5)If only the pseudo-device in /dev can be destroyed with destroy_dev(sc->d= ev0) in detach() function in a KLD driver? I can't do that! Thanks=20 Ma --=20 ___________________________________________________ Play 100s of games for FREE! http://games.mail.com/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510180826.j9I8Quw26871>