Commit Graph

78 Commits

Author SHA1 Message Date
martin
e86421c373 Fix device_t split glitch 2013-03-26 23:29:11 +00:00
chs
cbab9cadce split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
2012-10-27 17:17:22 +00:00
abs
fc7aa49f55 - Unconditionally initialise tp to avoid a warning
- Use DK_CLOSED rather than CLOSED (no functional change)
2012-07-11 16:41:16 +00:00
abs
bf81cf870b revert unwanted part of previous MSCP commit 2012-07-10 22:34:37 +00:00
abs
77b8a6dc83 Adjust MSCP attach routines. The current code worked fine on simh-vax, but
unfortunately failed on at least one 'real' SCSI MSCP adaptor.
In the updated code mscp_attach() still iterates over each unit on a bus,
but mscp_dorsp() now detects if we have reached the last unit and does not
return a bogus additional unit. It also loses a few gotos and handles
noncontiguous unit numbers better.
2012-07-10 22:30:23 +00:00
abs
58d7a6eeb1 Adjust MSCP attach routines. The current code worked fine on simh-vax, but
unfortunately failed on at least one 'real' SCSI MSCP adaptor.
In the updated code
mscp_dorsp()
2012-07-10 22:30:22 +00:00
abs
d8a3d8c395 Adjust MSCP attach routines. The current code worked fine on simh-vax, but
unfortunately failed on at least one 'real' SCSI MSCP adaptor.
In the updated code mscp_attach() still iterates over each unit on a bus,
but mscp_dorsp() now detects if we have reached the last unit and does not
return a bogus additional unit. It also loses a few gotos and handles
noncontiguous unit numbers better.
2012-07-10 22:30:22 +00:00
abs
351c7b5d8f - Add racd* devices for MSCP based CD-ROM drives (RRD40s), as opposed
to mixing them in with the ra* disks, modelled loosely on how MSCP
  rx* floppies are handled
- racd* defaults to the same single iso9660 partition as cd*
- Cleanup config option handling slightly so any combination of ra*,
  rx* (and now raccd*) can be defined without build errors.
- Avoid ugly printf when disks have all zero disklabel magic number
2012-06-22 20:42:22 +00:00
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