Commit Graph

135 Commits

Author SHA1 Message Date
Matt Jacob
937097d9cc Propagate sense data through from SIM (if there) and mark the CTIO
that there's sense to send with status (if the SIM does it), and
then clear any pending contingent allegiance state for this initiator
if the SIM actually did send the sense data.

Widen MAX_INITITATORS to 256- that's still not quite right, but will
accomodate the widest Fibre Channel support in FreeBSD now.

Obtained from:(partially) gibbs@freebsd.org
2000-01-25 17:42:27 +00:00
Matt Jacob
471da22662 Propagate sense data through from SIM (if there) and mark the CTIO
that there's sense to send with status (if the SIM does it).
Reviewed by:	gibbs@freebsd.org
2000-01-25 17:39:09 +00:00
Matt Jacob
366f55288e Go for the gusto and do the full 256 bytes for inquiry data.
Obtained from:gibbs@freebsd.org
2000-01-25 17:37:02 +00:00
Matt Jacob
090fbb8802 Clean up some of the SAF-TE matching code. Add
a few missing newlines in printouts.
2000-01-21 21:14:42 +00:00
Matt Jacob
10b6172afb Do the minor changes needed because of change to ccb_getdev structure.
JKH Trading Stamps applied.

Reviewed by:	gibbs@freebsd.org, ken@freebsd.org
2000-01-17 06:27:37 +00:00
Matt Jacob
ab6eec3ad9 Increase size of the scsi_inquiry_data structure to it's nearly
full size. Define a SHORT_INQUIRY_LENGTH for use during initial
probing (covers the size used previously). Define some SPC-2 related
fields (and define the revision code for SPC-2) which includes some
further SPI-3 defines. Don't go all the way (256 bytes) for the structure-
stop 4 bytes short- because we haven't auditted the source base to find
any u_int8_t potential overflow issues. Add RBC (single byte device)
and OCR (Optical Character Reader) device type codes.

Approved by JKH.

Reviewed by:	gibbs@freebsd.org, ken@freebsd.org
2000-01-17 06:24:35 +00:00
Matt Jacob
8d9e6c80ca Do not propagate the ENCI_SVALID bit for overall enclosure status
to userland apps- they get confused.
2000-01-17 02:02:41 +00:00
Matt Jacob
6da094e967 Add in SAF-TE handling code and do some minor consistency cleanups. 2000-01-17 00:36:28 +00:00
Matt Jacob
982ab0744f buglet fix 2000-01-15 23:05:29 +00:00
Matt Jacob
c8c54c88ae Do a wad of cleanup and put into place at least *one* functional
portion of SES retrieval (native SES itself) and implement all
the appropriate ioctls. Seems to work...
2000-01-15 22:41:27 +00:00
Matt Jacob
92ebdff04b Move the kernel specific stuff into scsi_ses.c. Redo the ioctls
to be more platform independent. Add a ses_hlptxt structure definition
and retrieval ioctl for when we are able to retrieve object help text

SES Objects can have up to 64 KBytes of associated 'help' text- the
Sun A5000 uses this, for example, to give physical location information
(e.g., 'left power supply').
2000-01-15 22:40:04 +00:00
Matt Jacob
121ac7c9a2 add SEND/RECEIVE diagnostic opcodes, SEND is a Mandatory command 2000-01-15 19:05:29 +00:00
Matt Jacob
4092880e7f Remove inclusion of dkbad.h- seems like a bug, but I had a stale
dkbad.h in /usr/include/sys- the local build process shouldn't have
been happy with that, but not finding dkbad.h in ../../sys. Hmm.
2000-01-15 07:39:05 +00:00
Matt Jacob
69ad2fbe7e add functional but stub SES/SAF-TE driver 2000-01-15 07:09:12 +00:00
Matt Jacob
b6fd7c6188 Change error message make sense and add a missing
periph_release on a failed open so that the periph
dtor for it will get called when we deallocate the
instance from targioctl.
1999-12-30 02:32:13 +00:00
Matt Jacob
72c968cec7 Restore this driver to a working state. The control device has
to be created at init time. The unit devices are created at
ctor when new instances are created and bound and destroyed
when that instance is closed. As such, there is just s single
static control dev_t for this driver (the per-unit dev_t's are
still in the softc).

When we have decommissionable periph drivers, a destroy_device
on the control device will have to called.
1999-12-29 22:55:01 +00:00
Peter Wemm
664a31e496 Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot).  This is consistant with the other
BSD's who made this change quite some time ago.  More commits to come.
1999-12-29 04:46:21 +00:00
David E. O'Brien
a5a299e5d7 Add FAST-80 timing to the scsi syncrates table.
Submitted by:	Gerard Roudier <groudier@club-internet.fr>
1999-12-16 16:04:54 +00:00
Kenneth D. Merry
223b7a2363 Quirk all Pioneer changers as changers up front, instead of waiting for the
second LUN to show up.

mjacob's change (which is correct) in rev 1.21 of cam_periph.c to elminiate
infinite retries of the SCSI busy status bit seems to have broken probing
of Pioneer changers that aren't already quirked.

The right way to fix this is probably to change things around so we can
guarantee 100% sequential probing of LUN-based changers even if they aren't
quirked.  This should fix things for now, though.
1999-12-11 23:00:44 +00:00
Kenneth D. Merry
86b2c8466d Revamp the devstat priority system. All disks now have the same priority.
The same goes for CD drivers and tape drivers.  In systems with mixed IDE
and SCSI, devices in the same priority class will be sorted in attach
order.

Also, the 'CCD' priority is now the 'ARRAY' priority, and a number of
drivers have been modified to use that priority.

This includes the necessary changes to all drivers, except the ATA drivers.
Soren will modify those separately.

This does not include and does not require any change in the devstat
version number, since no known userland applications use the priority
enumerations.

Reviewed by:	msmith, sos, phk, jlemon, mjacob, bde
1999-12-08 04:45:23 +00:00
Kenneth D. Merry
aa11587317 Recognize the Pioneer CD-ROM DRM-6324X as a changer.
PR:		kern/15198
Submitted by:	Don Lewis <truckman@FreeBSD.org>
1999-12-07 04:14:56 +00:00
Matt Jacob
6af65c6902 Add back in a prefatory TUR when the tape is *not* mounted. This seems
to help with some older tape drives.
1999-12-04 01:13:59 +00:00
Matt Jacob
160f42cca4 Correct some botched timeout defines. Allocate only 8KB for the test read
in samount. Make things a lot quieter in samount (and other places). Fix
ridiculous and not so ridiculous bugs in compression related code in both
sagetparams and sasetparams.
1999-12-03 23:14:11 +00:00
Matt Jacob
ddc83e8523 Don't clear the SA_FLAG_TAPE_LOCKED prior to calling
saprevent when we're doing an OFFLINE ioctl- saprevent
won't unlock the door, which then causes the unload to
fail on some units.

If we've already unloaded the tape, don't try and rewind and
unload in saclose. This is a slightly riskier change because
we're now going to depend on SA_FLAG_TAPE_MOUNTED to say whether
we've really unloaded the tape. This involved changing the
setting in sadone for tape errors to SA_FLAG_TAPE_FROZEN (which
is more accurate anyway-if you get an EIO you've probably lost
tape position anyway) where it used to just clear the mounted
flag.
1999-11-21 20:23:58 +00:00
Matt Jacob
2728bfbd9e Add make_dev functions. Tested with only one changer (sigh- all my others
are broken).
Submitted by:	ken@freebsd.org
1999-11-21 19:17:47 +00:00
Matt Jacob
44198f294c Fix a couple of boo-boos in the last delta. 1999-11-17 17:11:21 +00:00
Matt Jacob
387c08f0e8 Fix for 11815 (at mount time do a throwaway read of the front of the
tape to force the drive to do a media access so it knows what media
may be inserted).

Also Ken's make_dev patches- relatively untested.
1999-11-17 06:05:09 +00:00
Kenneth D. Merry
73d2691976 Convert the xpt, pass, pt and target drivers to use the new
make_dev()/destroy_dev() interface.
1999-11-17 04:59:09 +00:00
Poul-Henning Kamp
923502ff91 useracc() the prequel:
Merge the contents (less some trivial bordering the silly comments)
of <vm/vm_prot.h> and <vm/vm_inherit.h> into <vm/vm.h>.  This puts
the #defines for the vm_inherit_t and vm_prot_t types next to their
typedefs.

This paves the road for the commit to follow shortly: change
useracc() to use VM_PROT_{READ|WRITE} rather than B_{READ|WRITE}
as argument.
1999-10-29 18:09:36 +00:00
Matt Jacob
66a9bb81f6 Mark path for deallocation only *after* you've successfully allocated it. 1999-10-27 21:49:36 +00:00
Matt Jacob
f219e08f02 Another 1FM@EOD quirk (from mike@sentex.net for a Seagate STT20000),
and add a config option that allows one to default to 1FM@EOD for tapes
otherwise unquirked or unknown as to which to prefer. Note that tcopy
will be broken for these tapes until tcopy is fixed.
1999-10-02 20:17:16 +00:00
Poul-Henning Kamp
779b1b3d5b Introduce the disk mini-layer and devstat_end_transaction_buf() in cam/scsi.
Somewhat reviewed by:   ken
1999-10-01 09:34:10 +00:00
Matt Jacob
a8dafb4d99 Ooops- forgot to commit this.
PR:		14009
Submitted by:	jreynold@primenet.com
1999-09-28 05:14:52 +00:00
Poul-Henning Kamp
d6a0e38a1b Remove five now unused fields from struct cdevsw. They should never
have been there in the first place.  A GENERIC kernel shrinks almost 1k.

Add a slightly different safetybelt under nostop for tty drivers.

Add some missing FreeBSD tags
1999-09-25 18:24:47 +00:00
Poul-Henning Kamp
c4da3dcc64 Remove unneeded disk-related includes. 1999-09-12 08:23:21 +00:00
Poul-Henning Kamp
a35de5c8a7 Don't register a block major for tapes.
Reviewed by:	mjacob
1999-09-08 17:01:41 +00:00
Poul-Henning Kamp
10af1a2b5f We don't need to pass the diskname argument all over the diskslice/label
code, we can find the name from any convenient dev_t
1999-08-28 14:33:44 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Bruce Evans
1195ae1843 Cast pointers to uintptr_t instead of casting them to u_long. Don't
depend on gcc's feature of casting lvalues.  Cosmetic.
1999-08-24 00:04:45 +00:00
Poul-Henning Kamp
9dcbe2404a Convert DEVFS hooks in (most) drivers to make_dev().
Diskslice/label code not yet handled.

Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers)

Add the correct hook for devfs to kern_conf.c

The net result of this excercise is that a lot less files depends on DEVFS,
and devtoname() gets more sensible output in many cases.

A few drivers had minor additional cleanups performed relating to cdevsw
registration.

A few drivers don't register a cdevsw{} anymore, but only use make_dev().
1999-08-23 20:59:21 +00:00
Bruce Evans
d918320517 Use devtoname() to print dev_t's instead of casting them to long or u_long
for misprinting in %lx format.
1999-08-23 20:35:21 +00:00
Mike Smith
fcb893a801 Implement a new generic mechanism for attaching handler functions to
events, in order to pave the way for removing a number of the ad-hoc
implementations currently in use.

Retire the at_shutdown family of functions and replace them with
new event handler lists.

Rework kern_shutdown.c to take greater advantage of the use of event
handlers.

Reviewed by:	green
1999-08-21 06:24:40 +00:00
Kenneth D. Merry
3ece1bd296 Fix short timeout problems with the pt(4) driver:
- increase the default timeout from 10 seconds to 60 seconds
- add a new kernel option, SCSI_PT_DEFAULT_TIMEOUT, that lets users specify
  the default timeout for the pt driver to use
- add two new ioctls, one to get the timeout for a given pt device, the
  other to set the timeout for a given pt device.  The idea is that
  userland applications using the device can set the timeout to suit their
  purposes.  The ioctls are defined in a new header file, sys/ptio.h

PR:		10266
Reviewed by:	gibbs, joerg
1999-08-20 03:48:11 +00:00
Bill Fumerola
b8e49f681b Welcome devtoname(), to most likely be used when printing information
about a dev_t.

printf("%x", dev) now becomes printf("%s", devtoname(dev)) because
printing actual information about the device is much more useful then
printing a pointer to an address that would never help the developer debug.

Submitted by:	phk, bde
1999-08-17 20:25:50 +00:00
Justin T. Gibbs
0e5f60747c Checkpoint work on handling error conditions.
Handle errors reported through immediate notify ccbs.  This includes
bus resets, BDR messages, and abort messages.

Properly setup CA conditions for errors such as uncorectable parity
in data phases, reselection failure, and IDE message received.

Add a mechanism for stalling the queue of transactions to a particular
initiator while a CA is in progress.  Since we don't yet support
tagged I/O, this is largely just for show right now.

Properly bzero our softc at init time (oops).

Add more documentation on what all of the queues in our softc do.
1999-08-16 22:39:25 +00:00
Matt Jacob
6ba823115e Move initialization of announce_buf up to make
sure it is initialized in all cases.
1999-08-15 23:34:40 +00:00
Poul-Henning Kamp
49ff4debd3 Spring cleaning around strategy and disklabels/slices:
Introduce BUF_STRATEGY(struct buf *, int flag) macro, and use it throughout.
please see comment in sys/conf.h about the flag argument.

Remove strategy argument from all the diskslice/label/bad144
implementations, it should be found from the dev_t.

Remove bogus and unused strategy1 routines.

Remove open/close arguments from dssize().  Pick them up from dev_t.

Remove unused and unfinished setgeom support from diskslice/label/bad144 code.
1999-08-14 11:40:51 +00:00
Poul-Henning Kamp
ce9edcf5b5 Merge the cons.c and cons.h to the best of my ability. alpha may or
may not compile, I can't test it.
1999-08-09 10:35:05 +00:00
Matt Jacob
be74589b43 Fix my complete botch. I hope. Tested this time 1999-07-07 18:14:01 +00:00
Matt Jacob
473ac4479f suggestions from bde to clean up last checkin slighty 1999-07-06 01:40:03 +00:00