Age | Commit message (Collapse) | Author |
|
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@
|
|
thumbs up deraadt@
|
|
ok deraadt@ krw@ an earlier diff was ok marco@ too
|
|
otherwise return any error we find during detach of the luns.
|
|
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@
|
|
struct for it and keep it in the midlayer. however, this struct was never
free'd on detach.
since we only do hotplugging of controllers (and the scsibus and devices
get hotplugged as a matter of course), we now walk the list of scsi_link
structs and free them on detach of scsibus.
ok marco@
|
|
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@
|
|
LUNs the driver says targets could have. Don't unconditionally
allocate 8. USB and ATAPI devices have fewer. Fibre Channel devices
can have more.
|
|
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@
|
|
is now a copy in the scsi_link structure so just use that one.
'looks reasonable' beck@ ok dlg@
|
|
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@
|
|
|
|
will be.
|
|
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.
|
|
|
|
zeroref() - just to be on the safe side, should we mess up our ref count.
|
|
is called with a target of -1 and a valid lun. Spotted by Miod.
ok miod@
|
|
Fixes two second system 'freeze' when umass device plugged in. Speeds
up boot by not waiting for a minimum of 2 seconds at each scsi bus.
ok jmc@ pedro@ deraadt@
|
|
|
|
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@
|
|
(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.
|
|
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@.
|
|
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@
|
|
make sync'ing with NetBSD easier. NetBSD has moved on, most of these
sections have not.
ok marco@ deraadt@ grange@ csapuntz@
|
|
will now display correct error value.
Spotted in SCSIDEBUG output from Adrian Close's bizarre USB device.
ok millert@ deraadt@ marco@.
|
|
|
|
reverting to a single (short) INQUIRY command during probe. Compensate in siop
by trying PPR on all targets on SCSI-3 buses and falling back to WDTR/SDTR if
PPR rejected.
Problem found by mickey@. Tested on a wide variety of devices by Marco.
ok marco@ deraadt@.
|
|
instances of bad LUNs and add SCSIFORCELUN_BUSES and
SCSIFORCELUN_TARGETS options.
ok miod@ deraadt@. Tested in the Marco Peereboom torture chamber.
|
|
UMASS_QUIRK_FORCE_SHORT_INQUIRY. Fixes a bunch of USB devices. Based
on work by Mycroft in NetBSD.
ok tdeval@ deraadt@.
|
|
information is available to make the new lun validation logic work.
i.e. don't find phantom luns just because the user asks about them.
Also ensure the lun value given does not exceed the maximum valid lun
for a bus, rather than assuming the maximum valid lun is 7.
ok tdeval@ deraadt@.
|
|
|
|
From art@
|
|
looks ok deraadt@, mickey@, krw@ and art@(but I hate it)
|
|
addition to device targets and luns.
ok deraadt@.
|
|
must still do TUR on mvme68k & mvme88k ssh(4) driver
ok miod krw
|
|
it doesn't grok luns then stop probing.
Speeds up the probe of an empty scsi bus by approx. 30 seconds.
From Marco Peereboom.
Tested by Marco Peereboom, millert@, miod@, Diana Eichart, and a host of
anonymous snapshot users.
ok deraadt@.
|
|
ok tdeval@.
|
|
moreluns field in scsi_link structure. Instead, treat an INQUIRY
result that duplicates the INQUIRY result of LUN 0 as proof the LUN
does not exist. Compensate for lack of SDEV_NOLUNS where necessary by
setting sc_link->luns to 1, which has the same effect. From Marco
Peereboom.
Don't issue Test Unit Ready command before INQUIRY command - not
necessary and potentially harmful to devices with ADEV_NOTUR quirk
since quirks have not been set yet. From mycroft@NetBSD
ok deraadt@, mvme* changes by miod@.
|
|
and pointed out by Nate@. Fixes some <, , > displays for devices that
were not filling the INQUIRY data in correctly. Silences INQUIRY
commands that fail during probe. Treats SID_QUAL_LU_OFFLINE results
the same as SID_QUAL_BAD_LU. Eliminate special treatment for DEC TK30
and DEC TK50 devices.
ok tdeval@.
|
|
|
|
|