Commit graph

22 commits

Author SHA1 Message Date
John Baldwin
74a685c1af - Set si_drv1 in mypci_attach().
- 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.
2006-04-18 15:39:51 +00:00
John Baldwin
d5cc81900b Various and sundry cleanups to the sample PCI driver:
- 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
2006-01-06 21:29:52 +00:00
Xin LI
e140896ec8 Escape <, >, &'s, plus some cleanups against the SGML. There should not
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
2006-01-05 20:03:39 +00:00
Murray Stokely
c8495b0052 Add indexterms and more descriptive markup (<literal>, <errorname>, etc..) 2005-05-04 23:21:38 +00:00
John Baldwin
2280ac5560 - Remove an extraneous struct.
- 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
2003-12-31 19:10:46 +00:00
John Baldwin
769b737e04 Trim trailing whitespace. 2003-12-31 18:33:37 +00:00
John Baldwin
35704cd4a6 Clean up whitespace in the example code to be style(9), esp. with regards
to indentation in the functions.
2003-12-31 18:32:36 +00:00
John Baldwin
dff04d611f - Use d_thread_t rather than struct thread directly.
- Use the PCIR_BAR() macro rather than hardcoding the offsets of BAR
  registers in PCI config space.
2003-12-31 18:21:58 +00:00
John Baldwin
96ffa091d2 Clean up includes including a style(9) fix and replace proc pointers with
thread pointers to catch up to 5.x.

PR:		docs/60107
Submitted by:	Lukas Ertl <l.ertl@univie.ac.at>
2003-12-31 18:16:34 +00:00
Warner Losh
d615529c6b uprintf is really really dangerous to use in drivers. This example
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.
2003-12-21 05:06:52 +00:00
Ceri Davies
f62ed2d8ef Grammar police: "setup" is not a verb. 2003-11-05 10:50:51 +00:00
Warner Losh
6891feb81d Three content changes:
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.
2003-07-03 22:30:10 +00:00
Marc Fonvieille
ace2db0de6 Fix a typo.
Submitted by:	Craig Rodrigues <rodrigc@attbi.com>
2003-02-02 09:14:16 +00:00
Peter Pentchev
1f359cbbab /tmp/msg 2003-01-12 18:20:55 +00:00
Giorgos Keramidas
c4d8816e3d Remove whitespace right before punctuation marks in running text. 2002-02-14 13:59:44 +00:00
Giorgos Keramidas
b1def32fd6 Expand all contractions in the developer's handbook. 2001-12-08 10:48:58 +00:00
Giorgos Keramidas
1867e747e4 Remove redundant EOF whitespace. 2001-12-08 10:42:00 +00:00
Chern Lee
fb68848e50 Spelling Fixes:
* loadded -> loaded
 * useability -> usability
 * idealogy -> ideology
 * manpages -> man pages
 * fucntion -> function
 * useable -> usable
 * nowehere -> nowhere
 * loger -> longer
 * mechanisim -> mechanism
 * staticly -> statically
 * seperatly -> separately
 * initilized -> initialized
 * priorites -> priorities
 * funtions -> functions
 * predeclard -> predeclared
 * fuction -> function
 * signalled -> signaled
 * keypresses -> key presses
 * devicere -> device
 * programing -> programming
 * begining -> beginning
 * hardcoding -> hard coding
 * outputing -> outputting
 * siginificant -> significant

And many other "theword" -> "the word" whitespace fixes in the usb chapter.
2001-11-01 00:22:20 +00:00
Murray Stokely
bc83273cff * Correct some links
* 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
2001-10-23 21:54:19 +00:00
Murray Stokely
53f5f0487c Add PCI resource allocation section for (BARs, IRQs, DMA) 2001-04-09 08:26:38 +00:00
Dima Dorfman
caa6994914 DocBook police: open and close tags for <programlisting> should cuddle
up to the contents within.

Approved by:	nik
2001-04-09 00:33:58 +00:00
Jeroen Ruigrok van der Werven
e1fe303667 Split off PCI chapter.
Submitted by:	murray
2000-11-28 19:07:46 +00:00