Age | Commit message (Collapse) | Author |
|
|
|
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@
|
|
quiet if raw partition access tried. Be more careful with
SDEV_MEDIA_LOADED. Inspired by some NetBSD changes.
ok marco@
|
|
condition is going to clear up, which speeds up boot by avoiding
delays in disk matching. Return ENODEV if media is not present, which
avoids trying to spin up disks that are not present. Use ENODEV in
amd64/i386 dkcsum.c to filter failure reports.
Mostly from NetBSD.
ok marco@
|
|
|
|
support, don't penalize devices that don't support it. May help some
usb devices.
ok marco@
|
|
report 0xffffffff and print a message. READ CAPACITY(16) is needed to
get the actual size in this case.
ok tdeval@ (a while ago) marco@
|
|
Mainly remove space between locators parens, replace spaces with tabs
where appropriate and consistently align dependencies.
|
|
exactly as is done in sdopen(). This improves the chances of getting
valid geometry/size and avoiding 'drive offline' errors, without
subjecting the device to anything it won't see anyway.
No impact on devices that already work. Fixes problem with Jim Rees'
Hitachi DK23DA in an Archos Multimedia Jukebox. Without adding quirks!
Tested by Jim Rees. ok marco@.
|
|
|
|
no change in compiler assembly output.
|
|
command information unit 'Task Management Flags' defines. From FreeBSD
with a few tweaks. For ahd.
ok tdeval@ marco@.
|
|
submitted via ioctl. Eliminate scsi_do_safeioctl(), thus permitting
ch, ss and st devices to submit SCSI commands. Return EPERM rather
than EBADF when permissions are inadequate.
Allows more programs to run with fewer permissions. Problem diagnosed
by Nikolay Sturm in mplayer port.
Tested by Nikolay, ok deraadt@.
|
|
to eliminate some magic numbers.
ok marco@
|
|
(1024).' errors in restore(1).
Check for SDEV_OPEN in sc_link->flags (where it lives) rather than
sense->flags (where it doesn't).
Problem noted by John Danks on misc@ and reinforced by Otto & Hugh.
ok marco@ hugh@.
|
|
|
|
the tape device stuffed with data and therefore it rewinds less often to reposition.
ok krw@
|
|
in the tree is #ifdef'd out and is fundamentally wrong anyway - it
tries to force *all* devices to SCSI-2. Also recent SCSI specs seem to
have marked the command as obsolete. Bonus - eliminates another
undocumented option (SCSI_2_DEF).
Found in a list of unused kernel functions posted to tech-kern@netbsd
by Krister Walfridsson in 2002.
ok marco@ tdeval@
|
|
More informative failure message and silence "already open" message.
ok krw@
|