Age | Commit message (Collapse) | Author |
|
when workqs were introduced, we provided a second argument so you
could pass a thing and some context to work on it in. there were
very few things that took advantage of the second argument, so when
i introduced pools i suggested removing it. since tasks were meant
to replace workqs, it was requested that we keep the second argument
to make porting from workqs to tasks easier.
now that workqs are gone, i had a look at the use of the second
argument again and found only one good use of it (vdsp(4) on sparc64
if you're interested) and a tiny handful of questionable uses. the
vast majority of tasks only used a single argument. i have since
modified all tasks that used two args to only use one, so now we
can remove the second argument.
so this is a mechanical change. all tasks only passed NULL as their
second argument, so we can just remove it.
ok krw@
|
|
ok deraadt@ tedu@
|
|
ok mpi@ kspillner@
|
|
after discussions with beck deraadt kettenis.
|
|
|
|
ok miod@, deraadt@, tedu@
|
|
so its now reliable.
|
|
by passing a start/length in the HIB_INIT op. Then rebase all
hibernate-time block offsets to be relative to the start of that partition.
This simplifies things a lot.
ok mlarkin
|
|
wdsize() return value.
|
|
variable and not (usually) an int.
ok miod@
|
|
of sectors to write by one value and increment the address
the next i/o will start at by a different amount.
|
|
|
|
address by using the DL_BLKTOSEC() and DL_SECTOBLK() defines rather
than handrolling the equivalent. Fixes current addition of a 512-byte
block value (b_blkno) to a disk hardware address (DL_GETPOFFSET()).
Tested on real wd(4) hardware by guenther@.
|
|
test period; i think 3 years ago the last bugs fell out.
ok otto beck others
|
|
IO to the disk, DVACT_RESUME the controller back to normal operation. That
allows us to do the full DVACT_POWERDOWN sequence afterwards.
ok mlarkin
|
|
paths are reflexive. It is now possible to fail part-way through a
suspend sequence, and recover along the resume code path.
Split DVACT_SUSPEND by adding a new DVACT_POWERDOWN method is used
after hibernate (and suspend too) to finish the job. Some drivers
must be converted at the same time to use this instead of shutdown hooks
(the others will follow at a later time)
ok kettenis mlarkin
|
|
from Tobias Ulmer (tobiasu at tmux.org); ok jmc@, krw@
|
|
instead of 1.
|
|
ahci_hibernate_io, a skeleton of which is also provided in this diff.
This code is from deraadt@. Tested on a few wd machines to ensure it works
there as well.
|
|
groundwork for *_hibernate_io functions other than wd_hibernate_io
These changes were sent to me by deraadt@
|
|
for talking to the disk driver snuck in.
ok mlarkin
|
|
unmap handling.
|
|
is causing problems when trying to boot sparc64 from an isp(4).
Verified to fix the sparc64/isp(4) regression by krw@; ok deraadt@
|
|
errata for the Serverworks SATA chipset found on the macppc xserve G5.
ok jmc
|
|
support via the thin provisioning page.
this emul is a bit unreliable since atascsi needs to allocate memory for
the TRIM command to use, but we figure that the world wont end if we lose
a TRIM unlink real io.
ok matthew@
|
|
adapter_buswidth to sc_targets): gdt(4) and atascsi(4) still used it
in other ways.
Apply appropriate fixes; tested on ahci(4).
ok krw@
|
|
saa_luns instead of adapter_buswidth and luns in the prototype link.
ok dlg@, miod@
|
|
device signature so i left it blank, and the identify is the cached copy
in the port structure.
i filled the SAT vendor stuff in as "OpenBSD", "atascsi", osrelease.
|
|
to do WRITE SAME 16 for now (which is all we do).
|
|
|
|
use less magic numbers when check the block limits for trim. fill in the
block limits vpd page with some conservative numbers about how much
unmap we can do at a time (~32MB over 64 descriptors).
|
|
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@
|
|
into DSM/TRIM commands.
found by tedu
|
|
subr_disk.c. For now just the MI disk drivers.
ok deraadt@, krw@; jsing@ liked the approach too
|
|
ata_get_parms or wdc_ata_get_parms.
|
|
longer detects his OCZ Vertex 3 after atascsi.c r1.104. For some
reason, the first IDENTIFY command issued silently fails without any
notification. In lieu of a better fix, workaround this for now by
allowing IDENTIFY to be reissued a second time for non-PMP disks.
Discussed with jmatthew@ and dlg@; ok dlg@
|
|
logic.
|
|
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@
|
|
ATA_F_PIO or ATA_F_READ.
ok dlg@
|
|
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@
|
|
kernel without the former. Also, eliminate two dead stores in
wdcattach().
ok dlg@
|
|
to have a non-changing function pointer be part of an object rather
than it's virtual method table.
ok dlg@; tested on ahci(4) by Mattieu Baptiste, jasper@, and Jason
Crawford; no sili(4) testers, but identical changes to ahci(4)
|
|
attached devices as in the pre-port-multiplier code. (Devices
attached via port multipliers still get multiple attempts though.)
Also don't bother sleeping after the last iteration if all attempts
failed.
Discussed with dlg@ and Jonathan Matthew; ok dlg@
|
|
ok dlg@
|
|
this probably means the controller is dead -- as in, a hot plug eject
event. in that case, mark the driver dead and try harder to return -1
in the interrupt handler.
tested by many
ok dlg, miod did not object
|
|
argument to wdcreset(), to have it skip waiting until active channels see
their BUSY bit clear in the status register.
Use this feature in the resume path, during the first reset operation. The
first reset is supposed to only wake up the controller, and the disks don't
come back until the second reset is issued, therefore waiting for them to
report themselves as ready after the first reset, but before the second, is
moot - and as a matter of fact some controllers, such as the AMD 754 and
clones/offspring (e.g. Geode) keep the BUSY bit asserted after the first
reset.
Last, but not least, make sure wd@ata invokes wd_get_params() again before
returning from the resume code, as we will still be using polled transfers
for a short while.
This causes the Lemote Yeelong to resume within less than one second, instead
of the lousy 30 seconds wait between the two resets; and the wd_get_params()
voodoo prevents it from getting spurious ide interrupts afterwards.
wd_get_params() magic from dlg; rest of the work by yours truly after enough
prodding by dlg@ and pirofti@, among others. ok deraadt@ dlg@
|