Age | Commit message (Collapse) | Author |
|
|
|
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@
|
|
Analogous to what sd does for the raw partition. Eliminates useless
error messages and premature command completion. e.g. 'mt status' will
wait for media to to finish loading.
ok beck@
|
|
information that doesn't have anything to do with the device. We don't
say 'cd drive empty or not ready."
ok beck@
|
|
|
|
|
|
prevents the issuing of sizing inquiries to non-existant or non-responsive
devices like empty slots on a USB card reader.
Also try to avoid *extremely* unlikely loop of scsi_start() commands, by
not using sd_interpret_sense() until after the disk is spinning.
ok dlg@
|
|
Fix the display of the device info for umass devices at lun 0 by
passing the correct inquiry data to config_attach. i.e. not the
inquiry data for lun 1, which we gratuitously probe to prevent USB
card readers from 'helpfully' lying about who is where, but the
inquiry data for lun 0 we have saved in sc_link->inqdata.
|
|
in hex. This makes it consistant with the display of the same value in
other messages.
|
|
|
|
|
|
SENSE BIG command even if no page data was returned. Just accept the
fact that the device does not have any such page data.
This is more in line with the spec, and unbreaks devices (like the
Neodio 8-in-1 USB Card Reader donated by Manuel Pata) which freak out
when getting a MODE SENSE BIG.
Should not break any 'working' device.
ok pedro@ dlg@ marco@ 'Looks correct.' miod@
|
|
|
|
order reversed, wrong modifiers. ok deraadt@ marco@ mickey@
|
|
|
|
ok miod@ marco@
|
|
|
|
|
|
zeroref() - just to be on the safe side, should we mess up our ref count.
|
|
sensor_add()/sensor_del() so that sensors can be attached
and detached dynamicaly.
ok kettenis@ deraadt@ dlg@
|
|
is called with a target of -1 and a valid lun. Spotted by Miod.
ok miod@
|
|
|
|
cdminphys().
|
|
information in the TOC. The partition info is just overwritten or
rendered incomplete by readdisklabel().
Just examine the TOC to determine if the cd is audio only, i.e. it has
a valid TOC but no data tracks. In this case don't call
readdisklabel(). Much simpler code. No functional change for single
data track CD's like the install media.
ok pedro@.
|
|
requested by deraadt@
|
|
noticed by miod@
|
|
1) Using cd_load_toc() instead of replicating code.
2) Using struct cd_toc and betoh32() like other parts of cd.c.
3) Restoring pre-Sept. 26 behaviour of trying to read usable disklabel
info if there is no TOC. i.e. avoid readdisklabel() only when it is an
audio-only CD. Stop abusing spoofonly.
Tested by mjc@
|
|
Add a check for ending_track < starting_track before calculating size
of TOC to read.
Tested by mjc@
|
|
bzero() all malloc'ed cd_toc structs because cd_read_toc() will only
zero as much as it is trying to read.
malloc M_TEMP memory instead of M_DEVBUF memory for the cd_toc
structs.
ok deraadt@
|
|
used.
|
|
ok kettenis@ deraadt@ pedro@ miod@
|
|
is not useful. Check the value about to be subtracted.
Spotted by lint.
|
|
so we must start to use u_int; ok cloder
|
|
so we must start to use u_int; ok cloder
|
|
broken. Eliminate an unneeded variable and potential conversion issues
in SCIOCCOMMAND code before calling physio.
Similar to what NetBSD does.
Fixes cdda2wav vs "Billie Holiday - Songs for Distingue Lovers"
problem noted by Alexandre Ratchov. Tested by Alexandre.
ok marco@ pedro@ deraadt@ mickey@
|
|
|
|
ok dlg@
|
|
|
|
of panics and bugfixes. Access curproc directly, do not expect a process
pointer as an argument. Should fix many "process context required" bugs.
Incentive and okay millert@, okay marc@. Various testing, thanks.
|
|
|