Age | Commit message (Collapse) | Author |
|
ok deraadt@ krw@
|
|
|
|
history, nuke all mentions of XS_NO_CCB and the #define.
2006 - 2017. R.I.P.
ok kettenis@ inferred ok dlg@
|
|
the random subsystem as entropy. This value is pretty much unknown,
and anyways our entropy input ring does not saturate from knowns.
ok mikeb djm
|
|
'sc_link'. 'sc_link' is a field in the various device *_softc
structures, where the sc_ prefix was for 'softc'. Reduces potential
mental confusion. Newer code from down under was already using
'link'.
No functional change.
Prompted by bluhm@'s adventures in scsi. ok dlg@ jmatthew@
|
|
|
|
|
|
ok mpi@ kspillner@
|
|
after discussions with beck deraadt kettenis.
|
|
variables. Some random whitespace/knf repairs encountered on the way.
ok miod@ on inspection, feedback & more suggestions from millert@
|
|
|
|
to cd.c and call it cd_size(), like sd_size() lives in sd.c.
Tweak some daddr_t variables to u_int64_t on the way, when they are
for disk sector numbers, not 512-byte block numbers.
|
|
'secno'. This is what sddump() already does and consistant is good.
No function change.
|
|
repeated handrolling of same code. Use daddr_t variable to
calculate daddr_t return values, and u_int64_t variables to
calculate disk sector values.
No functional change.
|
|
test period; i think 3 years ago the last bugs fell out.
ok otto beck others
|
|
that they're implemented consistently in bounds_check_with_label().
Also, per krw's request, change bounds_check_with_label() to return 0
if the checks succeed, and change the drivers to test == -1 instead of
<= 0. (Man page update to follow; intentionally omitting
arch/vax/mba/hp.c from this commit because it doesn't even build
currently and miod@ promises to kill it soon.)
ok krw@
|
|
that's ever used it, and it's long since been changed to use
DVACT_{QUIESCE,SUSPEND,RESUME} instead.
ok deraadt@, dlg@; miod@ also agreed with this idea when I brought it
up a few weeks ago
|
|
subr_disk.c. For now just the MI disk drivers.
ok deraadt@, krw@; jsing@ liked the approach too
|
|
be interrupted.
ok matthew
|
|
rather than using various wrappings. Convert vnd to using the sc_dk
rwlock instead of using one of its own.
ok matthew
|
|
wd(4). They haven't been used for 10+ years, since the drivers were
switched to use disk_lock() and disk_unlock() instead.
No binary change.
|
|
of silly flag twiddling code in various disk drivers.
ok deraadt@, miod@
N.B., users will need a -current disklabel(8) to be able to write new
disklabels to disk now.
|
|
never done anything in OpenBSD and just clutters disk drivers with
silly flag handling.
More cleanup to follow.
ok deraadt@, millert@; no objections krw@
|
|
to return EBUSY if the user tries to modify an open partition's offset
or size. Only sadness can result if a user tries this, and rejecting
it prevents a race between sdstart() and sdstrategy().
Curiously, there was already code in the kernel and in disklabel(8) to
detect/handle this, but it was effectively disabled because the disk
drivers always used something like "/* sc->sc_dk.dk_openmask */ 0",
and this commented out code has existed since even r1.1 in NetBSD.
I had no problems building a release and messing around with
disklabel(8) for a bit with this diff. Canarying the more common MI
disk drivers until we gain confidence that there aren't any
regressions, then we can switch the remaining drivers.
"I am surprised you got me convinced that this stuff is safe" deraadt@
ok krw@
|
|
to be in the right address space.
help from matthew and krw
|
|
cd(4) did not believe any T_FIXED device was its responsibility.
Thus when a USB CD forgot to mention that it is T_REMOV, it appeared
as uk(4).
Make cd(4) accept even T_FIXED devices that claim to be T_CDROM or
T_WORM.
Noticed and fix tested by Rene Maroufi. Closes PR #6513.
|
|
automatic reading of disklabel on attach.
ok deraadt@ miod@ krw@
|
|
no point in keeping it around.
"i like this" thib@ (a while back); ok krw@ and oga@; reminder to
update the man page and tweaks jmc@
|
|
about the device rather than the contents of whichever disklabel
was read. Tweak whitespace in sd.c to make the code appearance
consistant.
|
|
to deactivate transactions we are currently doing.
ok dlg
|
|
same change as sd.c r1.212. matthew@ pointed out that cd(4) and
st(4) would need the same change.
|
|
rather than 'sc_params'. No change to .o file.
|
|
512 == DEV_BSIZE units and variable-sized physical device 'sectors'.
I hope this reduces confusion a bit more. No change to .o files.
ok for intent miod@, with tweak.
|
|
verifying that the resulting device is present on the disklist. This
avoids a race whereby the disk driver can be accessed as soon as the
softc has been allocated, but before the disk has completed
initialisation and has called disk_attach() (up until this point
dk_label is still a null pointer).
Cut cd(4), sd(4) and wd(4) across to disk_lookup(). All callers of
disk_attach() need to be tested and cut over in due course.
ok deraadt@ krw@
|
|
disk_attach() is called by the device driver. We will be building on
this shortly.
ok deraadt@ krw@
|
|
traversal code to suspend/resume
ok oga kettenis blambert
|
|
(which creates a potential race against cd detach)
discussed with krw and dlg seperately
|
|
rather than it being a pointer to something that needs to be allocated
at attach. since all these devices need a bufq to operate, it makes
sense to have it allocated as part of the softc and get bufq_init
to just initialise all its fields. it also gets rid of the possibility
that you wont be able to allocate the bufq struct during attach,
which is something you dont want to happen.
secondly, it consistently implements a split between wrapper functions
and the per discipline implementation of the bufq handlers. it
consistently does the locking in the wrappers rather than doing
half in the wrappers and the other half in the implementations.
it also consistently handles the outstanding bufq bq pointer in the
wrappers.
this hides most of the implementation inside kern_bufq.c. the only
stuff left in buf.h is for the bits each implementation needs to
put inside struct buf.
tested by thib@ krw@ and me
ok thib@ matthew@
no objection from krw@
|
|
There is a bit of concern that this workq can race against a detach
happening... any solutions from the peanut gallery?
|
|
cmd->opcode through the type casted command pointer rather than
through xs->cmd->opcode.
Requested by deraadt@; ok krw@.
|
|
ok miod@; "please go ahead" jsing@
|
|
xs->datalen and reset xs->data to NULL. This prevents a spurious
attempt to setup (dma map, etc) and possibly attempt data tranfser.
In line with what Linux and FreeBSD do as far as I can tell.
Reduces the delay before my DVD starts playing its movie.
Idea to also set xs->data to NULL from matthew@.
"No objection" matthew@
|
|
confusion. Fixes at least my usb DVD reader and The Blue Tick.
|
|
Symptoms noted by oga@. actual bug spotted by dlg@
|
|
-Wuninitialized.
Silly typo in my first diff noticed by oga@ and krw@; ok krw@
|
|
dvd_auth command. Fixes regression from scsi_scsi_cmd() removal.
ok dlg@
|
|
last bastardized sync and buf call through scsi_scsi_cmd(). Flatten
code to call scsi_xs_sync() directly for all commands.
Airplane typos shaken out by various.
ok dlg@ matthew@ deraadt@
|
|
to interpret sense errors. This is initialized to the basic
interpretation routine, and specific scsi drivers (sd/st/cd) can
replace this with their own. While here kill EJUSTRETURN dance and
make more specialized interpretation routines directly call the
basic routine if desired.
Fixes by matthew@ to my first diff. Most original work by dlg@.
ok matthew@ marco@ dlg@
|
|
ok miod@, krw@
|
|
to better handle detaching.
ok deraadt@
|