Age | Commit message (Collapse) | Author |
|
required number of bytes, rather than a full scsi_mode_sense_buf. Some
devices (e.g. my HP SureStore DAT/24) decline to accept such oversized
transfers. Instead, force callers to fill in the data_length field in
the header and use that information to set the size of the transfer.
|
|
revealed it is doing it's own weird stuff not reproduced in new
functions. e.g. it doesn't use mode sense headers. Rather than try to
fix it or figure it out at this time ...
|
|
general block descriptor and the 8 byte direct block descriptor, and
return the correct values for density, block_count and block_size
based on the type of the device. First cut has T_SEQUENTIAL (i.e.
tape devices) as the only device type using general block descriptors,
so the behaviour change is minimal.
|
|
|
|
cd.h. Remove include of cdvar.h from cd.c. cdvar.h becomes expendable.
No functional change.
|
|
Add 'big' parameter to report which mode sense header type is being
returned. Eliminate icky pointer arithmetic, since it won't work if
only block descriptors are returned by the device.
No functional change.
|
|
the scsi_link structure. This is a more general solution than the
current inconsistant copying of fields into _softc structures. The
redundant fields in _softc's will be cleaned up later. The device
field will be used immediately to finish up the new mode sense code.
ok marco@
|
|
block descriptors. Not that we actually use this information anywhere.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scsi_mode_blk_desc_big. Will be needed to move st to new mode sense
function.
Be a bit more careful with types of parameters to scsi_do_mode_sense,
using u_int32_t instead of int.
No functional change.
|
|
Fixes spurious error messages from cdparanoia when using ATAPI CDROM
in USB enclosure.
ok pascoe@.
|
|
going to change anything. From NetBSD.
Fixes playing music cd in ATAPI drive in USB enclosure pascoe@ is
using.
ok pascoe@.
|
|
|
|
cd_atapi into cd since code is now almost identical, and only affects
volume adjusting ioctl's. Minor side effect of allowing
cd_load_unload() attempts to scsi cd's as NetBSD does.
|
|
Lexar Jumpdrive and probably others. Use better structure declaration
idiom, as suggested by drahn@.
|
|
geometry is set even if (as for some USB devices) the MODE SENSE works
but zero values are returned for cylinders/heads/sectors. This fixes
my USB floppy which returns 0/0/0.
|
|
|
|
both 10 byte and 6 byte MODE SENSE commands and just return error
checked values.
Convert sd_scsi.c to use new mechanism for non-optical drives. USB
umass devices will now display actual mode sense info if it is
available via a 10 byte MODE SENSE. Which may mean 0 heads, etc. is
shown until cosmetics are finalized.
ok marco@ 'that is pretty cool' deraadt@
|
|
field to get the blocksize.
ok marco@
|
|
instead.
|
|
scsi_mode_sense[_big] bzero()'s it.
|
|
|
|
|
|
was already done in the SUCCESSFULLY_QUEUED case. Shouldn't happen,
but better safe than sorry if some driver completes it's io
immediately.
Also don't recompute saved flags if the request is retried.
ok marco@
|
|
|
|
atapi_mode_[sense|select](). This will allow the removal of
atapi_base.c and atapi_all.h files, and sets the stage for better usb
mode sense handling amoung other things.
Remove cd_scsibus_[get|set]_mode() and
sd_scsibus_mode_sense() shims in favour of scsi_mode_[sense|select]().
Add zero'ing of reserved length field in scsi_mode_select(). Change
some uchar * type parameters to scsi_mode_header *.
No functional changes. Mostly from NetBSD.
ok dlg@.
|
|
(4/5)' messages in favour of a single SC_DEBUG() message about the mode
sense error. Less useless verbiage.
As this eliminates the only SDEV_NOMODESENSE use in scsi/*, eliminate
all quirks table entries that used only SDEV_NOMODESENSE. Iomega Zip
tested by miod@ to ensure this did not break something.
Finally, only fake a geometry if scsi_size() can determine a disk size
to fake from.
|
|
is checked. Fixes crash during boot when a device has no media
loaded. e.g. a usb card reader with empty slots. From NetBSD. Problem
was introduced by last commit to allow RAW_PART+S_IFCHAR opens to
always succeed.
ok millert@ marco@
|
|
present. A successful open is required for ioctl's to work. Mostly
from NetBSD, partly correcting previous code cleanup error.
From deraadt@, treat MTIOCTOP+MTRETEN as CDIOCCLOSE for cd devices
(i.e. close the cd drawer).
ok deraadt@.
|
|
|
|
try to help equally braindead os's by presenting any inserted media as
LUN 0 until another LUN is used in a command. Trick them by issuing a
gratuitous/harmless INQUIRY to LUN 1 after issuing the LUN 0 INQUIRY
but before any other command. Only umass scsi devices with >1 lun are
affected.
Fixes dlg's reader/writer for one.
Lots of diagnosis and testing by dlg@, ok dlg@, ok marco@.
|
|
full LUN scan on UMASS SCSI targets. UMASS provides reliable max lun
information so we shouldn't waste time. Fixes many x-in-1 card
reader/writers that report identical INQUIRY information for every
slot they provide.
Lots of diagnosis and testing by dlg@, ok dlg@, 'I can live with this'
marco@.
|
|
ok krw@
|
|
|
|
ok miod@
|
|
This file is still a work in progress.
|
|
page 2 (enclosure control page).
|
|
Requested and ok mickey@
|
|
Requested mickey@
|
|
|
|
|
|
ok krw@
|
|
ok deraadt@ tdeval@ henning@ marco@
|
|
|
|
Eliminate some duplicate structures and defines along the way. SCSI CD
drives will now pay attention to the 'flags' parameter for MODE SENSE
and MODE SELECT commands. No other functional change.
ok tdeval@
|