Commit Graph

30 Commits

Author SHA1 Message Date
Julian Elischer
3745c395ec Rename the kthread_xxx (e.g. kthread_create()) calls
to kproc_xxx as they actually make whole processes.
Thos makes way for us to add REAL kthread_create() and friends
that actually make theads. it turns out that most of these
calls actually end up being moved back to the thread version
when it's added. but we need to make this cosmetic change first.

I'd LOVE to do this rename in 7.0  so that we can eventually MFC the
new kthread_xxx() calls.
2007-10-20 23:23:23 +00:00
Scott Long
b50569b71d Prepare for future integration between CAM and newbus. xpt_bus_register
now takes a device_t to be the parent of the bus that is being created.
Most SIMs have been updated with a reasonable argument, but a few exceptions
just pass NULL for now.  This argument isn't used yet and the newbus
integration likely won't be ready until after 7.0-RELEASE.
2007-06-17 05:55:54 +00:00
Matt Jacob
b8fdb7f911 Perhaps a better fix- make the called function do the (possible never reached)
initialization. Do a token amount of style cleanup.

Poked by: bde
2007-05-21 09:26:47 +00:00
Matt Jacob
6c7d0cff3f Make gcc 4.2 happy by initiatlizing controller && channel prior
to a call to a function which *might* then initialize them.

MFC after:	3 days
2007-05-20 16:49:09 +00:00
Scott Long
2b83592fdc Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will
use to synchornize and protect all data objects that are used for that
SIM.  Drivers that are not yet MPSAFE register Giant and operate as
usual.  RIght now, no drivers are MPSAFE, though a few will be changed
in the coming week as this work settles down.

The driver API has changed, so all CAM drivers will need to be recompiled.
The userland API has not changed, so tools like camcontrol do not need to
be recompiled.
2007-04-15 08:49:19 +00:00
John Baldwin
4d70511ac3 Use pause() rather than tsleep() on stack variables and function pointers. 2007-02-27 17:23:29 +00:00
Paolo Pisati
ef544f6312 o break newbus api: add a new argument of type driver_filter_t to
bus_setup_intr()

o add an int return code to all fast handlers

o retire INTR_FAST/IH_FAST

For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current

Reviewed by: many
Approved by: re@
2007-02-23 12:19:07 +00:00
John Baldwin
4ed23cf283 - Use a regular mutex rather than a spin mutex. This driver doesn't need
a spin mutex since it doesn't have an INTR_FAST interrupt handler.
  Beyond that the driver is still under Giant anyway.
- Remove unneeded locking during attach across operations that can't be
  called with locks held (such as bus_dma_tag_create()).

MFC after:		1 week
Not objected to by:	scottl
2007-01-04 20:28:17 +00:00
Poul-Henning Kamp
c40da00ca3 Since DELAY() was moved, most <machine/clock.h> #includes have been
unnecessary.
2006-05-16 14:37:58 +00:00
Scott Long
648b922789 Remove some header polution. 2006-04-30 16:44:41 +00:00
Ruslan Ermilov
f4e9888107 Fix -Wundef. 2005-12-04 02:12:43 +00:00
Jens Schweikhardt
b49a9e5bab Don't augment the DRIVER_VERSION "v1.12" with __DATE__ and __TIME__.
This is the only file of > 1700 files in a buildkernel here doing that.
It makes reproducible builds (same source => same binary) impossible.

Spotted by:	devel/ccache
2005-11-13 10:13:31 +00:00
Scott Long
e1ab829ad2 Fix a typo that broke LINT. 2005-09-08 14:13:36 +00:00
Scott Long
d2bd3ab995 Import new version of the HPTMV driver from Highpoint. The major change
here is the support for amd64, as well as possible support for PAE.  Many
thanks to Highpoint for continuing to support FreeBSD.

Obtained from:  Steve Chang @ Highpoint
MFC After: 3 days.
2005-09-07 23:33:26 +00:00
Yoshihiro Takahashi
d4fcf3cba5 Remove bus_{mem,p}io.h and related code for a micro-optimization on i386
and amd64.  The optimization is a trivial on recent machines.

Reviewed by:	-arch (imp, marcel, dfr)
2005-05-29 04:42:30 +00:00
Sam Leffler
6e3a31bd67 check copyin return value (and while we're at it copyout too)
Noticed by:	Coverity Prevent analysis tool
2005-03-31 05:15:27 +00:00
Sam Leffler
72bd2eaecb plug resource leak
Noticed by:	Coverity Prevent analysis tool
2005-03-29 01:46:25 +00:00
David Schultz
14f1a8cc08 Don't read past the end of pVDevice[]. (Previously, we would iterate
twice as many times as there were entries in the array.)

Spotted by:	Ted Unangst using the Coverity Prevent static analysis tool
Reviewed by:	scottl
2005-03-18 05:43:34 +00:00
David Schultz
844b51308e Don't write past the end of the VendorId field (and into the ProductId
field).

Spotted by:	Ted Unangst using the Coverity Prevent static analysis tool
Reviewed by:	scottl
2005-03-18 05:43:31 +00:00
Scott Long
f7f3900b9f Clean up the botching of the previous repo-copy. Reference the included
headers from the correct location.

Submitted by: Tai-hwa Liang
2005-03-02 15:13:37 +00:00
Scott Long
d38d9c9e5e Move all of the hptmv files to /sys/dev/hptmv so that they won't be mistaken
for being on a CVS vendor branch.  The files were moved via a repo-copy.
2005-03-02 05:14:28 +00:00
David E. O'Brien
bb4e63066a Add FreeBSD ID. 2005-02-28 00:53:29 +00:00
Sam Leffler
c01f36ef0c avoid sneaky double free
Noticed by:	Coverity Prevent analysis tool
Reviewed by:	scottl
2005-02-25 00:16:53 +00:00
Sam Leffler
183551b925 plug resource leak
Noticed by:	Coverity Prevent analysis tool
Reviewed by:	scottl
2005-02-24 02:24:24 +00:00
Warner Losh
098ca2bda9 Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
Nate Lawson
6e0e5d3623 Move launching the worker thread from a SYSINIT to the first device's
attach.  This fixes the previous behavior where systems without hptmv
hardware always had a worker thread running.
2004-12-19 19:42:54 +00:00
Scott Long
7d9aed9c4c Fix some warnings that only triggered in LINT. 2004-10-24 09:23:07 +00:00
Scott Long
f01be89133 Embed the correct name. 2004-10-24 08:48:32 +00:00
Scott Long
b953df2a33 Clean up some messy Makefile stuff so that this can be built into the
kernel.
2004-10-24 08:38:29 +00:00
Scott Long
1713e81b9c Import the HighPoint RocketRAID 182x driver. Thanks to HighPoint for
providing the original driver, and thanks to IronSystems for providing
hardware for testing.
2004-10-24 05:37:23 +00:00