Age | Commit message (Collapse) | Author |
|
commands. Bump limit back to the standard 4, and at the same time eliminate
SDRETRIES and CDRETRIES (both defined to 4) in favour of a new define,
SCSI_RETRIES, also defined to 4.
|
|
errors before issuing INQUIRY. Fixes Sony YE-Data floppy drive and
probably other devices at the cost of possibly breaking some 10 year
old CD-ROM drives. Un-special cases mvme68k which was forcing these
initial TURs.
Now wait for the inevitable weird USB device that breaks to surface.
ok marco@ deraadt@
|
|
debug output shows the xs/command before it's issued rather than
displaying it on command completion. Some commands don't come back
and it would be nice to see their details.
While here nuke invocations of scsi_show* in umass. If you want SCSI
debug output use SCSI debug options.
Only affects SCSI debug output.
ok marco@
|
|
device before issuing scsi commands to it, but it was never implemented,
never used, and no hba actually filled them in. i came along and added
another two function pointers for the same thing.
this cleans up the extra pointers.
ok krw@ marco@ miod@ deraadt@
|
|
the adapter to be notified when a device goes away so it can free any state
it maintains about that device.
ok deraadt@ marco@
|
|
"adapter_softc" is simply a way for the adapter to determine what scsibus
it is now dealing with, not a pointer back to the adapters device struct.
ok deraadt@ marco@
|
|
Tested, tweaked and ok otto@
|
|
|
|
"just :wq and do it" tedu@
|
|
|
|
|
|
using the new NO_CCB result. Currently a no-op since no driver produces
that result.
ok dlg@ marco@ deraadt@
|
|
ok miod@ 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@
|
|
years ago.
|
|
|
|
scsi devices. the midlayer keeps some state for each device that is
attached which needs to be cleaned up on detach, hence this wrapper.
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
grudging ok from deraadt@ so i can move forward. this should be revisited
one day though.
|
|
|
|
|
|
|
|
|
|
become ready. Make verbiage SC_DEBUG().
ok dlg@
|
|
headers; } to just union scsi_mode_sense_buf {}. No functional change.
ok marco@
|
|
field, with reduced_geometry.sectors[0] not being sectors/track. Add
_5btol() to correctly parse entire field. From NetBSD.
|
|
command. Return it in a new parameter to scsi_size.
|
|
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.
|
|
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@
|
|
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.
|
|
|
|
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@
|
|
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@.
|
|
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@.
|
|
|
|
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@
|
|
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@.
|
|
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@
|
|
EJUSTRETURN and ERESTART instead. Delete unused SCSIRET_RETRY define.
From NetBSD.
ok marco@
|
|
chunk of code. It was never executed unless you were debugging a
mvmex8k 'vs' device.
ok miod@ (mvmex8k bits) marco@ deraadt@
|