Age | Commit message (Collapse) | Author |
|
'transfer', 'tranfered' -> 'transferred'.
|
|
using the new NO_CCB result. Currently a no-op since no driver produces
that result.
ok dlg@ marco@ deraadt@
|
|
confusing when trying to attach scsibus to a hba, since it is really meant
for attaching scsi devices to scsibus.
ok deraadt@ marco@
|
|
ok miod@, deraadt@
|
|
ok marco@, deraadt@
|
|
"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@
|
|
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@
|
|
bus. supporting these complicates the midlayer unnecessarily.
ok krw@
|
|
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@
|
|
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@
|
|
|
|
|
|
ok miod@ marco@
|
|
|
|
zeroref() - just to be on the safe side, should we mess up our ref count.
|
|
|
|
spoofed sd disklabels. Sectors are the partition size units used and
documented everywhere else in the tree. sd ensures a sector will
always be a multiple of 512.
Fixes disklabel(8) error messages and partition size display for sd
devices that have no OpenBSD disklabel and a sectorsize > 512. Noted
by Robert Szasz on his Sony Hi-MD device.
ok pedro@ marco@
|
|
after being opened. Use SC_DEBUG() to suppress some verbiage during
spin up. Return actual errors encountered during attempt to spin up,
rather than always returning EIO.
ok dlg@
|
|
become ready. Make verbiage SC_DEBUG().
ok dlg@
|
|
for a raw partition like we suppress errors for the other operations on raw
partitions. Replace 'could not get size' with more specific and informative
SC_DEBUG() output. Silences a usb card reader that fgsch@ found. Now attach
message is only 'sdX: drive offline'.
Tested & ok fgsch@
|
|
|
|
functional change.
ok dlg@
|
|
headers; } to just union scsi_mode_sense_buf {}. No functional change.
ok marco@
|
|
Some blow up if buffer length is not 0. Just fake geometry for all
UMASS devices since it's almost always fictitious anyway. One step on
the road to eliminate geometry entirely.
Fixes Ed Wandasiewicz's 2nd gen iPod mini and Sebastiaan Indesteege's
UBest Technology device.
ok marco@
|
|
before free()'ing buf in sd_get_parms(). Tweak code so there is only
one free(buf, ...) to worry about.
ok deraadt@.
|
|
SCSI_IGNORE_ILLEGAL_REQUEST and SCSI_IGNORE_MEDIA_CHANGE flags to
scsi_test_unit_ready() and scsi_start() during sdopen(). Re-enables
use of devices that don't support START_STOP or TEST_UNIT_READY
commands.
Noted by and fix tested by Jason Crawford on VMWare disks.
ok dlg@ henning@, supportive comments from miod@.
|
|
ok deraadt@
|
|
stack into malloc'd memory.
ok deraadt@
|
|
Use consistant scsi_autoconf and SCSI_SILENT flags in
scsi_test_unit()/scsi_start() pairs.
Fixes some hppa, vax, sparc systems that do not spin up disks
automatically. Keeps USB card readers and such reasonably quiet.
Noted by millert@ (hppa), henning@ (sparc) and hshoexer@ (vax).
ok deraadt@
|
|
have. Some devices return four bytes less information than requested
for the PAGE_RIGID_GEOMETRY page. Put the two together and older
Conner drives don't work because we rejected the short page and asked
for the PAGE_FLEX_GEOMETY page. Noted by hshoexer@ and kettenis@.
Also should fix the problems with a device miod@ reported that did a
similar short PAGE_FLEX_GEOMETRY.
ok deraadt@
|
|
device that returns any other value via READ CAPACITY or MODE SENSE
will be marked 'drive offline'. Prevents divide by zero when
calculating disk size in MB, amoung other interesting possibilities.
ok mickey@ dlg@ deraadt@ millert@ marco@
|
|
ensure they are the ones requested. No functional change unless
garbage was being returned.
ok marco@
|
|
union declaration to allow pointers to individual page types. Simplify
sd.c code by using individual page type pointers. No functional
change.
ok tdeval@
|
|
other values as was intended. As opposed to overwriting it with
scsi_do_mode_sense() calls.
May help PR4313.
ok tdeval@
|
|
copy of the vendor/product/revision fields in sd_softc. Just use the
INQUIRY data to build the disklabel 'label' when required. No
functional change.
|
|
scsi_link to determine device type, rather than keeping a copy in
sd_softc.type. Remove unused sd_softc.type field.
|
|
|
|
devices. Use READ CAPACITY like NetBSD, FreeBSD, Linux and OpenSolaris
do. Well, NetBSD keeps READ FORMAT CAPACITIES as a backup. Fixes
problems with devices (such as my IBM USB Memory Key) which return
block counts that are off by one for READ FORMAT CAPACITIES.
This eliminates the significant difference between sd_atapi.c and
sd_scsi.c so merge sd_scsi.c into sd.c and just be careful to mark
ATAPI removable devices as both SDEV_NOSYNCCACHE and unable to return
MODE SENSE page 4 info.
All geometry faking is now in one place. Where it can be 'improved'.
sd_scsi.c, sd_atapi.c and atapi_disk.h will be removed as a result.
|
|
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@.
|
|
|
|
quiet if raw partition access tried. Be more careful with
SDEV_MEDIA_LOADED. Inspired by some NetBSD changes.
ok marco@
|
|
|
|
support, don't penalize devices that don't support it. May help some
usb devices.
ok marco@
|
|
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@.
|
|
NetBSD. Try to limit special handling of sense errors in sd and st to
a minimum.
ok marco@
|
|
EJUSTRETURN and ERESTART instead. Delete unused SCSIRET_RETRY define.
From NetBSD.
ok marco@
|
|
SC_DEBUG() spacing tweaks.
ok deraadt@
|
|
UMASS_QUIRK_FORCE_SHORT_INQUIRY. Fixes a bunch of USB devices. Based
on work by Mycroft in NetBSD.
ok tdeval@ deraadt@.
|