- Add a note describing the new bus_*() functions that take a struct
resource * and thus don't need the bus tag and handle in the softc
that are in FreeBSD 7.0 and later.
- Minor fixups in return values and a compile nit in mypci.c.
- Split the first section into sub-sections instead of just paragraphs.
- Include a makefile for a kernel module for the sample driver and explain
how to use 'make', 'make load', and 'make unload'.
- Use 'struct cdev *' rather than 'dev_t'.
- Add missing d_version to cdevsw.
- Explain how to use si_drv1 in struct cdev to get from a cdev back to the
softc.
- Add a softc and move the cdev pointer into the softc. Given the cdev
a unique name and minor number for each device.
- Use better comments in several places.
- Actually call device_set_desc() in probe, and use BUS_PROBE_DEFAULT
rather than 0.
- Add missing call to destroy_dev() in detach.
- Use DEFINE_CLASS_0.
PR: docs/90830
Submitted by: Marius Nuennerich marius dot nuennerich at gmx dot net
be any content changes involved in this commit, however, localization
teams are encouraged to catch up with this change.
Requested by: intron at intron ac
Reviewed by: Niclas Zeising <lothrandil at n00b apagnu se>
Glanced by: simon
- Clean up the paragraph on tearing down interrupt handlers:
- Fix typos and misspellings.
- Correct function name.
- Clarify locking warning to be more stern. bus_teardown_intr() can
sleep, so you can't hold mutexes when calling it period.
Reported by: Lukas Ertl (10
driver only works if you compile it as a module because uprintf panics
the system if there's no controlling terminal (at least in some versions
of FreeBSD). Also, make things a little more style(9)ish.
1) Use the new c99 initialization in the pci driver example. Also,
don't claim this device is a tty.
2) Add notes about caution needed during detach routine wrt interrupts
and locking.
3) Add note that vtophys is deprecated and to use busdma instead.
Since the busdma API isn't completely settled for 5.x yet,
don't document it. I'll leave that to others when the API is
done being frobbed.
* Use ftp.hostname.com/directory rather than
ftp.hostname.com:directory.
* s/freebsd.org/FreeBSD.org/
* Use relative links for FreeBSD.org documents
PR: 31447
Submitted by: Cyrille Lefevre
Found by: linbot