Age | Commit message (Collapse) | Author |
|
geometry. it doesnt matter waht the value there is cos rigid will be NULL,
but this is clearer.
|
|
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
|
|
need to calculate and save. Not used anywhere in tree.
|
|
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.
|
|
a device thats now gone, or from being on the list of pending io when
the device is actually detached.
found and fix tested by jakemsr@
"go for it" jakemsr@
|
|
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@
|
|
|
|
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@
|
|
can expect to be used
|
|
ok miod@; "please go ahead" jsing@
|
|
breaks at least one previously working device, as discovered by
naddy@. dlg@ confirmed other kernels also avoid attempting this
operation on usb disks.
ok dlg@ deraadt@
|
|
wasn't ok deraadt & dlg.
|
|
Tested by lots of people during c2k10
ok phessler krw thib
|
|
click upon suspend that my laptop with ahci(4) has.
ok dlg@, ok marco@ on an earlier iteration of this diff
|
|
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@
|
|
ok krw@, marco@
|
|
disk is now ready to handle I/O.
ok krw@ dlg@
|
|
SCSI_NOSLEEP flag on the xs when setting extra flags by oring them in
rather than assigning them.
from matthew dempsky
|
|
NULL'ness of the pointer to the actual page data. Fixes a NULL deref
when trying to set caching on my ASUS eeePC 1000HE's SD slot.
ok dlg@
|
|
requested by deraadt@
ok krw@ marco@
|
|
ioctl requests, and dont pass the proc pointers around for any ioctl
requests in scsi land at all. neither were used, so trim the fat.
ok krw@ marco@
|
|
in the great re-write. If the scsi device *_interpret_sense()
function returns 0 that means there was no error.
Fixes restore(8) problems seen on certain tape drives.
Found and fix tested by Percey Piper. Suggestions from Matthew
Dempsky. Thanks!
ok dlg@
|
|
NO_CCB.
if sd_buf_done is told that the adapter has no more ccbs via NO_CCB, this
sets a flag so sdstart doesnt try and queue more io straight away.
this fixes the lockups on ciss that halex and okan were experiencing after
the iopools code went in. it will fix any other hba that returns NO_CCB
too.
tested by me@, okan@, and halex@
ok krw@ okan@ halex@
|
|
Reintroduce bufqs. A few changes since it was backed out after some good
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@
|
|
No functional change.
ok dlg@
|
|
|
|
caches, and implement handling of these ioctls on vanilla scsi disks.
discussed with krw@, marco@, miod@, kettenis@.
krw@ has a diff to make the sd.c code prettier coming shortly.
|
|
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@
|
|
discovered by oga@
|
|
identifier, allowing the disk to be identified without relying on the
device name.
ok deraadt@ krw@ beck@ marco@ todd@
|
|
other stuff ive been doing in here. everything that needs protection
inside the midlayer and the scsi device drivers (sd, cd, etc) uses
mutexes now.
this pushes splbio out of the midlayer. splbio is only taken before
biodone is called now.
ok beck@ marco@ krw@ deraadt@. theyre all terrified, but they all
say if we're going to do then now is the right stage of the dev
cycle.
|
|
the disk as soon as it gets any from the block layer, this now registers
a callback for when a resource becomes available on the bus.
ok krw@ beck@ marco@
tested by many including krw@ beck@ mk@ okan@ todd@
|
|
one place for easier debugging and maintenance. No intended functional
changes.
ok dlg@
|
|
ok dlg@
|
|
us to loop forever.
follow sdstart through to to an adapters scsi_cmd handler and assume that
handler returns NO_CCB to enjoy the bug in full.
ok kettenis@ krw@ beck@
|
|
commands.
Noticed & fix tested by halex@.
ok dlg@
|
|
st's queue manipulations. i.e. ensure b_actb is correctly updated as the
queue becomes empty or has an i/o requeued on it.
Tested on claudio@'s backup crashing box.
ok dlg@ beck@
|
|
one thread will be grabbing xs's at a time and dequeuing work, but avoids
a race between notification there is work to do and exiting the loop
releasing the xs's.
Fixes problem noticed by claudio where usb disks would hang with the new
minty dlg midlayer.
ok krw@, dlg@, tested by claudio@
|
|
by setting flags around the loop. there is a race which can prevent
necessary work being completed by any of the currently running instances
of xxstart.
the caveat with the removal of this code is because multiple xxstarts can
be running at the same time they can cause io reordering, but that is less
of a problem than no io.
found by and fix tested by claudio@
debugged with krw@ claudio@ beck@ deraadt@
|
|
it when we hit NO_CCB). retried io would call unbusy twice before this
change.
noticed by deraadt@
|
|
and do the appropriate sleeps, retries, error processing, and finally
returns an errno style value to the caller.
this cuts scsi_scsi_cmd, the ioctl code, sd_flush, and scsi_inquiry over
to scsi_xs_sync.
ok krw@
|
|
from dlg@, tweaking by me to make it compile.
ok dlg@
|
|
was to try to play dangerous games with tagged queuing.
ok marco@
|
|
|
|
|
|
down to the disk while a process is doing the same thing. this will avoid
some relatively minor io reordering from occurring.
discovered by krw@ during his long dark trek through the code. requested
by marco@
|