Commit Graph

70 Commits

Author SHA1 Message Date
tsutsui 8caedfaab4 Make this compile on ports with __HAVE_OLD_DISKLABEL
(though currently no such ports which have mscp).
Noticed by PR kern/41862.
2009-09-12 18:01:50 +00:00
cegger 99747a8099 struct device * -> device_t, no functional changes intended. 2009-05-12 14:28:22 +00:00
cegger d16a259fe3 struct cfdata * -> cfdata_t, no functional changes intended. 2009-05-12 13:15:24 +00:00
tsutsui d779b85d3e Remove extra whitespace added by a stupid tool.
XXX: more in src/sys/arch
2009-04-18 14:58:02 +00:00
cegger e2cb85904d bcopy -> memcpy 2009-03-18 17:06:41 +00:00
cegger c363a9cb62 bzero -> memset 2009-03-18 16:00:08 +00:00
dsl 82357f6d42 ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
2009-03-14 21:04:01 +00:00
dsl 454af1c0e8 Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
2009-03-14 15:35:58 +00:00
cegger f907d9477d buildfix: re-adapt to major() return a 32bit value again. 2009-01-22 17:32:20 +00:00
mjf a3ff3b0296 mscp(4) was being a bad monkey! It's not OK to call config_found() from
interrupt context, as my vax kernel with DIAGNOSTIC told me. Instead, we
defer the work and get it to run in thread context via a workqueue(9).

Thanks to matt@ for the review.
2009-01-19 19:15:07 +00:00
yamt 70de973662 g/c BUFQ_FOO() macros and use bufq_foo() directly. 2009-01-13 13:33:58 +00:00
cegger 942939bc67 use PRIu64 format to printf major() value 2009-01-12 08:30:38 +00:00
drochner a39050eb5f use device_lookup_private() to get the softc -- while device/softc
are not split yet, it is better than a typecast
2008-06-11 17:32:30 +00:00
cegger cf417aad7e use aprint_*_dev and device_xname 2008-04-08 20:08:49 +00:00
ad f142225fa0 B_BAD has done nothing for a long time. 2008-01-04 21:48:05 +00:00
ad a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
ad 2af68666da Merge disk init changes from the vmlocking branch. These seperate init /
destroy of 'struct disk' from attach / detach.
2007-10-08 16:41:05 +00:00
ad 66fefd117b It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
2007-07-29 12:15:35 +00:00
ad b5a9ff06f1 Replace some uses of lockmgr(). 2007-07-21 19:51:47 +00:00
msaitoh 8ce1f4fff2 fix typos 2007-04-29 20:23:34 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
thorpej 838ee1e0d9 Use device_private(). 2006-03-29 06:51:47 +00:00
thorpej 9dfa94e2e6 Don't sleep on &rx->ra_dev.dv_unit -- sleep on &rx->ra_state instead. 2006-03-29 04:47:13 +00:00
thorpej 39cd836ee1 Use device_unit(). 2006-03-28 17:38:24 +00:00
thorpej 6e53f1366a Use device_parent(). 2006-03-25 23:14:58 +00:00
matt 319869c477 Don't cast lvalue. remove uninitialized reference. 2006-03-07 04:45:52 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
yamt aec75b1cc6 - change the way to specify a bufq strategy. (by string rather than by number)
- rather than embedding bufq_state in driver softc,
  have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
  from sys/bufq.h to sys/bufq_impl.h.
  (is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c.  (not tested)
2005-10-15 17:29:10 +00:00
ragge a4a700a791 Fixes due to cast-qual addition. 2005-06-27 11:05:24 +00:00
perry f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
perry 18db93c7f6 de-__P 2005-02-04 02:10:35 +00:00
matt 1e9fedba3e Make sure to get the right softc in rriodone. 2005-01-04 19:36:48 +00:00
he 6ef865c900 Include the <sys/bufq.h> header to allow these to compile again. 2004-10-31 12:52:55 +00:00
yamt 05f25dcc2a move buffer queue related stuffs from buf.h to their own header, bufq.h. 2004-10-28 07:07:35 +00:00
thorpej aae3f1ca07 Add wedges support to the MSCP disk driver. 2004-09-25 16:44:30 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
thorpej e43fecb228 Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself.  This paves the way for some future changes.
2003-05-10 23:12:28 +00:00
dsl d91455ce26 Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
2003-05-02 08:45:10 +00:00
he 6098c9ba7f Change SBSIZE to SBLOCKSIZE to make this compile after UFS2 was brought
in.  OK'ed by ragge.
2003-04-02 20:32:01 +00:00
matt 7c49a58fcd Fix wrong argument to free due to malloc_type changes. While there,
spot blatant bug by inspection and fix that as well.  (do not compare
scaled value against unscaled value).
2003-02-04 13:20:45 +00:00
thorpej 72a7af27b0 Use aprint_normal() in cfprint routines. 2003-01-01 00:10:15 +00:00
mrg 603098b9b5 implement separate read/write disk statistics:
- disk_unbusy() gets a new parameter to tell the IO direction.
	- struct disk_sysctl gets 4 new members for read/write bytes/transfers.
	when processing hw.diskstats, add the read&write bytes/transfers for
	the old combined stats to attempt to keep backwards compatibility.

unfortunately, due to multiple bugs, this will cause new kernels and old
vmstat/iostat/systat programs to fail.  however, the next time this is
change it will not fail again.

this is just the kernel portion.
2002-11-01 11:31:50 +00:00
jdolecek e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
thorpej c9b3657ce9 Add trailing ; to CFATTACH_DECL. 2002-10-02 16:33:28 +00:00
thorpej 71adb76f75 Use CFATTACH_DECL(). 2002-09-30 21:57:46 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
ragge 535e154ac7 Correct ra disk instrumentation. From Johnny Billquist. 2002-07-25 12:13:03 +00:00
hannken bfc31ebc74 Convert to new device buffer queue interface.
Approved by: Anders Magnusson <ragge@netbsd.org>
2002-07-22 21:48:36 +00:00
simonb 64c7743a05 Don't "extern int cold;" - this is in <sys/kernel.h>. 2002-03-04 02:19:07 +00:00