Age | Commit message (Collapse) | Author |
|
0, not NULL.
|
|
for walking the bus and targets, and probing the luns. this removes the
need to use magic numbers to wildcard each of these, which in turn makes
the code a lot easier to read. as a bonus we get some more space to work in
(80 chars isnt that much somtimes).
note that this code wont probe high luns if lun 0 doesnt exist.
ok krw@
|
|
|
|
"becoming ready" - this is done in the exact same way that it
was done for tape in st.c. This commit adds a cd specific interpret_sense
routine to cd.c that will catch the becoming ready case and handle it.
This also removes the need to use crazy timeouts to catch this case.
ok krw@
|
|
ok marco@ krw@
|
|
|
|
ok dlg@
|
|
floppies and cd's were removable, displaying that fact in disklabel
output was unlikely to help. And the display in disklabel was the only
use of D_REMOVABLE in the tree.
ok marco@
|
|
when they need a process context to do something. the most obvious task
that springs to mind is attaches and detaches of devices on scsibus.
ok krw@ marco@ deraadt@
|
|
struct for it and keep it in the midlayer. however, this struct was never
free'd on detach.
since we only do hotplugging of controllers (and the scsibus and devices
get hotplugged as a matter of course), we now walk the list of scsi_link
structs and free them on detach of scsibus.
ok marco@
|
|
when using removable media devices, along with changes to scsi_base to
detect such cases in tapes other devices. This makes tar, dd, and friends
report a semi useful error message instead of nonsense when there is nothing
in the device.
Includes libc minor bump, and will require the corresponding sets change.
ok krw@ deraadt@
|
|
|
|
that specifies the version of SCSI being supported. Even the ANSI part
that we use is complex. 4 means 2, 5 means 3 and 6 means 4. Translate
and use the value correctly. Fixes SCSI5 and SCSI6 in dmesg. And
properly protects SCSI2 devices from getting SCSI3 commands.
"seems like an elegant solution to me" millert@ ok dlg@ marco@
|
|
obtained probe the LUNs given without checking for duplicate INQUIRY
data.
For non-USB, non-ATAPI, devices claiming to be SCSI-3 compliant. And
the target must have something attached at LUN 0.
If REPORT LUNS can't be used or isn't supported, the old scan process
is used.
Fixes Fibre Channel and SCSI enclosure devices that provide identical
INQUIRY data for all LUNs and were thus being misprobed as having
only LUN 0.
Tested by Bob Kitella, dlg@, beck@. Suggestions from deraadt@.
ok dlg@ beck@
|
|
bus. supporting these complicates the midlayer unnecessarily.
ok krw@
|
|
in the CDB for pre-IDENTIFY device LUNs.
|
|
LUNs the driver says targets could have. Don't unconditionally
allocate 8. USB and ATAPI devices have fewer. Fibre Channel devices
can have more.
|
|
valve in case our duplicate LUN checks had to be circumvented. Since
no one has found a need for them, and they were just one more place
trying to shift a bit 255 places to the left could be induced, remove
them.
"i don't think any options like that are worthwhile" deraadt@
|
|
when PWR_RESUME occurs. The drives may have forgotten they were
locked.
Noted and original diff by Alexey Vatchenko.
"I agree with the intent." miod@ "Looks acceptable." deraadt@
|
|
|
|
when we're not allowed to yank things out of them. Instead of returning a
generic EIO and having the kernel printf a scsi sense to the console,
we now return EBUSY to userland and avoid the dmesg spewing.
ok krw@
|
|
is now a copy in the scsi_link structure so just use that one.
'looks reasonable' beck@ ok dlg@
|
|
stored in scsi_link. That's where the value came from anyway. Move 'luns'
field to where 'scsi_version' used to be to preserve alignment.
ok dlg@
|
|
inquiry. this removes the flags member and makes all its users refer to the
whole inquiry now.
ok miod@ krw@
|
|
ok deraadt@
|
|
ok krw@
|
|
|
|
will be.
|
|
|
|
|
|
|
|
grudging ok from deraadt@ so i can move forward. this should be revisited
one day though.
|
|
|
|
diagnostic type printf spew that is useful into #ifdef CHANGER_DEBUG,
removes some that is pretty much useless, and changes one instance
of using kernel printf to indicate the truncation of a result due to the
provided buffer being too small into a return of EINVAL back to the caller.
tested by me and mbalmer@
ok krw@ mbalmer@
|
|
stopen(). This change was misplaced in the st roto-tilling at c2k6.
Noticed by deraadt@.
|
|
ok krw@
|
|
minor numbers having bits 2 or 3 set.
Eliminate the quirks, etc. used to store info on these non-existant modes.
Also eliminate a couple of 'unimplemented' fields in the ioctl request
structure.
ok beck@ deraadt@
|
|
|
|
|
|
and adapted from FreeBSD. This adds the ability for status requests to ask
for the volume tags (usually bar codes, on changers with a bar code reader)
on media inthe library.
ok deraadt@, krw@
|
|
1) Check the return value from st_mount_tape().
2) Always call st_unmount() if the media goes missing.
3) Use the special handling for 'Unit in the process of becoming
ready' for the TEST UNIT READY command in stopen().
4) Don't unmount a tape during stopen() just because it doesn't have
the current default density. Eliminate now unused last_dsty member of
st_softc.
tested & ok beck@
|
|
"Unit Becoming Ready" case, and just like ch, allow the driver to
continue waiting, as long as the unit continues to promise us that
the unit is becoming ready. This avoids the case of slow tape drives
taking forever to bring media online requiring a huge retry count
being set for all commands, and like ch, will wait indefinately
only in this case. All other cases are handled as before.
ok krw@
|
|
unhandled ioctl requests to scsi_do_ioctl() like ch.c does. Previously
only the mythical 'control devices' with certain minor numbers would
pass the requests along.
ok beck@
|
|
that was just accepted by the device, no matter what the minor is.
ok beck@
|
|
in the foreseeable future. Eliminate half-baked, semi-operational code
that tried to handle such devices. People who had stumbled across the
previous control-like behaviour of erstX devices should not be relying
on these semantics.
Suggested by deraadt@.
ok beck@
|
|
a #if notyet/#endif block. It's been 'notyet' since 1995. Eliminate it.
'flense!' beck@
|
|
1) Don't use SCSI_IGNORE_NOT_READY when doing test_unit ready to wait for
the device to come up.
2) use SCSI_IGNORE_ILLEGAL_REQUEST when doing test_unit_ready to wait for
the device to come up (just as is done in st(4))
3) add a ch_interpret_sense routing to perform special handling of
the case where the unit is in the process of becoming ready. Hope springs
eternal, that if the device tells us it is trying to become ready, then
we should wait for it to do so, however long it takes (and on tape library
scans this can take a while - i.e. a few minutes for large libraries).
The custom handler ensures that the retry count is not decremented in
this case and this case only.
ok krw@
|
|
or is waiting to be retried, abort it when a signal interrupts the tsleep().
This fixes what was commited in version 1.92 to work properly.
ok krw@
|
|
thus allowing tape drives more time to become ready.
ok beck@
|
|
control mode device can be opened but does not permit any i/o.
Currently no such devices are created by MAKEDEV. However the previous
code used bits 0 and 1 of the minor being set to indicate a control
device. This conflicted with other uses of device minors to indicate
things like rewind and eject. This behaviour would result in an open
of a newly loaded tape drive failing until the tape was successfully
mounted as a side effect of another command like 'mt status'.
ok beck@
|