Skip site navigation (1)Skip section navigation (2)
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>

index | next in thread | raw e-mail

Hi everybody:
 

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 Architecture Handbook",andexercised the example driver in the book.now I have several 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 the difference?

2) if (pci_get_vendor(dev) == 0x11c1) { ...
                              ~~~~~~~~how to get this number if I don't know 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_prob or device_attach,how to make it work?

5)If only the pseudo-device in /dev can be destroyed with destroy_dev(sc->dev0) in detach() function in a KLD driver? I can't do that!

Thanks 
Ma

-- 
___________________________________________________
Play 100s of games for FREE! http://games.mail.com/



home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510180826.j9I8Quw26871>