Age | Commit message (Collapse) | Author |
|
|
|
The ATA spec seems to suggest it may take up to 30s. This seems a little bit
long. To quote Theo: "by that time some drives have probably parked their own
heads in boredom". But it shouldn't hurt unless your drive is seriously
broken. Makes some laptops suspend much better.
ok deraadt@
|
|
resets separated by a small delay (a delay intended to offend jsg who will
definitely want to fix it by checking for RDY instead)
Tested on a variety of amd and i386 hardware by myself and deraadt@
ok deraadt
|
|
disk is now ready to handle I/O.
ok krw@ dlg@
|
|
breaks at least socppc and armish
|
|
comments from dlg@.
No need for a separate bufq.h, keep all of in buf.h; As requested by kittens
and deraadt.
Only sd(4) and wd(4) for now. The rest of the drivers will be converted soon,
also other goodies like heuristics for sd(4) for selecting the bufq type and
the death of disksort() are forthcoming.
Tested on: i386, amd64, sparc64, macppc, loongson and alpha by myself and
phessler.
OK art@, beck@, kettenis@, oga@
|
|
ok krw@, marco@
|
|
many laptops when powering them down.
ok jsg@, oga@, krw@
|
|
gets rid of #include <sys/dkio.h> in sys/ioctl.h and adds #include
<sys/dkio.h> to the places that actually want and use the disk
ioctls.
this became an issue when krw@'s X build failed when he was testing
a change to dkio.h.
tested by krw@
help from and ok miod@
|
|
identifier, allowing the disk to be identified without relying on the
device name.
ok deraadt@ krw@ beck@ marco@ todd@
|
|
pciide(4) needs to formward DVACT_SUSPEND and DVACT_RESUME events to its
children, so do that.
Gets rid of the nasty "click" sound from the disk on many laptops.
ok marco@, jsg@
|
|
This is needed for the addition of further suspend/resume actions.
Okay deraadt@, marco@.
|
|
errnos. Note that the error strings are being ignored, since we long ago
decided to not spam the console, and there is no other nice way to use the
errors (without changing the ioctls to pass it back)
The errno is now useful, since we can pass b_error from failing IO up, and
the drive can decide how to use that
ok miod
|
|
have been going on. this appears to bring us back to stable state.
lots of testing by oga and ariane and my self.
|
|
one by tedu@. It doesn't do anything smart yet, it just uses
plain old disksort. we also keep the old method of queueing bufs
since some miods have crazy MD drivers that need some love.
ok beck@, art@
tested by many on many archs.
|
|
Found by LLVM/Clang Static Analyzer.
ok krw@
|
|
Really just the low-hanging fruit of (hopefully) forthcoming timeout
conversions.
ok art@, krw@
|
|
OK deraadt@ and millert@
|
|
RAW_PART will always be 0 -> disksize, so the bounds check will always
pass for i/o's to valid addresses. Now the i/o will be properly truncated
if it goes past the end of the device. This prevents various adverse
impacts of issuing i/o's for data past the end of the device.
Repeatedly requested by todd@.
ok weingart@ deraadt@
|
|
from NetBSD
ok krw thib henning, tested by many
|
|
them to be properly polled.
Fixes previously problematic machines of form and ckuethe.
ok marco@
|
|
the disk rather than depending on the disk to have it on.
A bunch of people have suggested this should go in.
|
|
cpu_disklabel can go away, since nothing anymore needs to use it; ok miod
|
|
|
|
|
|
OK deraadt.
|
|
type of all variables to daddr64_t. this includes the APIs for XXsize()
and XXdump(), all range checks inside bio drivers, internal variables
for disklabel handling, and even uvm's swap offsets. re-read numerous
times by otto, miod, krw, thib to look for errors
|
|
to size. tested on almost all machines, double checked by miod and krw
next comes the type handling surrounding these values
|
|
readdisklabel(), since all readdisklabel()'s do that already.
ok deraadt@
|
|
into using DOS geometry by calling it twice. And don't ignore the
drive state if readdisklabel() returns a non-NULL value.
ok weingart@ grange@
|
|
number (wd.c), and the uses are to find the minimum minor to be
detached.
|
|
ones. No change to wd.o.
ok deraadt@ marco@
|
|
geometry in the disklabel when there is a BIOS geometry to provide.
This removes the option to set a disklabel to 'BIOS' geometry via the
'g b' command in the editor.
Makes reported geometry more consistant and moves MD code to MD land
where it should be.
Doc help from jmc@, Feedback from millert@, marco@, weingart@,
kettenis@.
ok deraadt@
|
|
was right. There is another path that ends up avoiding the disk_unbusy
call I inserted.... tested by robert too
|
|
it should not; ok dlg
problem spotted using zaurus soft-drive-led diff which is pending
i think i convinced jsg now that this fix is better than putting it
in wdrestart
|
|
need the debug info uncomment the printf's you need. Crude but
effective way to suppress 'no disklabel' errors that pop up at the
most innconvenient times to frighten users. More elegant method,
DPRINTF-like constructs or something, later.
"Yay!" marco@ ok deraadt@
|
|
From Bret Lambert.
|
|
a disk rather than accepting the cylinder count provided by the disk
or controller. This cylinder count will be '16383' for any disk >8.4G
according to the ATA spec. CPU_BIOS on i386/amd64 has magic to deal
with this, but other archs do not need to be restricted by the needs
of PC BIOS.
Fixes the default MBR OpenBSD partition size and disklabel on non-CPU_BIOS
archtitectures.
No change to behaviour on i386/amd64 machines.
Noted by Stuart Henderson on his Thecus.
Testing by various, including 'old i386 machines' nick@
ok tom@ pedro@ weingart@ deraadt@
|
|
a few obsolete and easily replaced disk models. And didn't work anyway
according to Bob, who has tried.
ok beck@
|
|
use. Easier to read and eliminates a potentially confusing unused call
to wdgetdisklabel(). No change to object files.
ok brad@ dlg@ grange@ deraadt@ marco@
|
|
setting RAW_PART's p_size to d_secperunit * (d_secsize / DEV_BSIZE) is
a waste of a few ops. And p_size should be in sectors anyway.
Just set RAW_PART's p_size to d_secperunit to make usage consistant
across the tree.
Should be a no-op.
|
|
ok marco@
|
|
zeroref() - just to be on the safe side, should we mess up our ref count.
|
|
"looks sane" grange@; tested by niall@ krw@ jmc@ jolan@
|
|
which can happen if the integrated microdrive's DRQ is not clear. This
fixes the drive geometry in the default disklabel.
Help from weingart@ and grange@; "mention `grange and i will fix this
better after 3.8 or we will be flailed'" deraadt@
|
|
they are presented to the rest of the system to stop
a password being set that could deny access to the disk.
ok grange@ deraadt@
|
|
First noticed by christos@netbsd (iirc) a long time ago.
Tested by canacar@ and krw@.
|
|
particularly vile because it looks like a typo (i.e., looks like one "f" is
missing), but it's really not. I happened to notice this myself, but the fix
is inspired by NetBSD in the interest of keeping the code similar.
deraadt@ ok
|
|
|
|
looked at by various, testing henning@ mcbride@ dan weeks
mostly from netbsd via Pedro Martelletto <pbastos@rdc.puc-rio.br>
|