History log of /src/sys/dev/scsipi/scsiconf.h |
Revision | | Date | Author | Comments |
1.58 |
| 20-Apr-2012 |
bouyer | Add a bustype_async_event_xfer_mode() callback to scsipi_bustype (which can be NULL), so that transport-specific details of transfer mode setting/printing can be handled more easily. Move scsipi_async_event_xfer_mode() and scsipi_print_xfer_mode() to scsi_base.c and split in parallel scsi and FC/SAS parts. size of struct scsipi_bustype has changed, welcome to 6.99.5
|
1.57 |
| 19-Apr-2012 |
bouyer | Expand struct scsipi_bustype {} in a ABI-backward-compatible way to pass more informations about the bus: - bustype_type has 2 different bytes, one holding the existing SCSIPI_BUSTYPE_* (scsi, atapi, ata), and one for a per-SCSIPI_BUSTYPE_* subtype. Introduce macros to build or extract bustype_type. - for SCSIPI_BUSTYPE_SCSI, define subtypes for parallel SCSI, Fibre Channel, SAS and USB, to specify the transport method. SCSIPI_BUSTYPE_SCSI_PSCSI is 0 so that bustype_type value doesn't change for existing code - for non-SCSIPI_BUSTYPE_SCSI busses there's no defined subtype yet, so the bustype_type value doesn't change. - provide scsi_fc_bustype, scsi_sas_bustype and scsi_usb_bustype along with scsi_bustype to be used by bus driver where appropriate - scsipi_print_xfer_mode(): more existing code under a (SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_PSCSI) case, as sync/wide parameters only make sense for parallel SCSI. For (SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_FC) and (SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_SAS), only print tagged queing status if enabled. Just be silent for other bustypes.
This change is prompted by this problem: right now, FC (e.g. isp(4)) and SAS (e.g. mfi(4)) don't do anything for ADAPTER_REQ_SET_XFER_MODE, and especially never call scsipi_async_event(ASYNC_EVENT_XFER_MODE), so sd(4) always runs untagged. Doing a scsipi_async_event(ASYNC_EVENT_XFER_MODE) with appropriate parameters is enough to enable tagged queuing, but then scsipi will print: sd0: async, 8-bit transfers, tagged queueing which is harmless (async, 8-bit transfers doens't make sense on SAS anyway) but will confuse users. With this change scsipi will only print: sd0: tagged queueing which is correct.
In the long run, knowning the underlying transport in scsipi will allow better handling of device which are not parallel SCSI.
Another change adding an extra callback to struct scsipi_bustype {} will come (so that scsipi_print_xfer_mode(), which is SCSI-specific, can be moved out of scsipi_base, and split into per-subtype callback), but this will break kernel ABI and so is not suitable for netbsd-6, so will be commmited later. The above is enough to get tagged queuing on FC and SAS in netbsd-6.
|
1.56 |
| 16-Jul-2008 |
drochner | branches: 1.56.28; 1.56.32; 1.56.34; split device/softc for scsibus
|
1.55 |
| 28-Apr-2008 |
martin | branches: 1.55.2; 1.55.4; 1.55.6; Remove clause 3 and 4 from TNF licenses
|
1.54 |
| 11-Dec-2005 |
christos | branches: 1.54.70; 1.54.72; 1.54.74; merge ktrace-lwp.
|
1.53 |
| 17-Sep-2004 |
mycroft | Change the way bustype_cmd is used. Rather than having it be responsible for calling scsipi_make_xs() and scsipi_execute_xs(), instead push these into scsipi_command. Make bustype_cmd and PHOLD/PRELE be called from scsipi_execute_xs(). This allows us to create a xfer structure -- possibly on the stack -- and call scsipi_execute_xs() directly.
|
1.52 |
| 09-Sep-2004 |
bouyer | Make the xxstart() functions reentrant again, as some drivers HBA can call scsipi_done() from their scsipi_request(). For this, add a struct scsipi_xfer * argument to scsipi_command(). If not NULL scsipi_command() will use this to enqueue this xfer, otherwise it'll try to allocate a new one. This scsipi_xfer has to be allocated and initialised by scsipi_make_xs() or equivalent. In xxstart(), allocate a scsipi_xfer using scsipi_make_xs(), and if not NULL, dequeue the buffer before calling scsipi_command(). This makes sure that scsipi_command() will not fail, and also makes sure that xxstart() won't be called again between the BUFQ_PEEK() and BUFQ_GET().
Fix "dequeued wrong buf" panics reported by Juergen Hannken-Illjes in private mail and Andreas Wrede on current-users@. Thanks to Jason Thorpe and Chuck Silver for review, and Andreas Wrede for testing the patch.
|
1.51 |
| 21-Aug-2004 |
thorpej | - De-__P. - Use ANSI function decls.
|
1.50 |
| 06-Jan-2003 |
matt | branches: 1.50.2; 1.50.4; Add multiple inclusion protection.
|
1.49 |
| 25-Apr-2001 |
bouyer | Pull up the thorpej_scsipi branch to main branch. This is a completely rewritten scsipi_xfer execution engine, and the associated changes to HBA drivers. Overview of changes & features: - All xfers are queued in the mid-layer, rather than doing so in an ad-hoc fashion in individual adapter drivers. - Adapter/channel resource management in the mid-layer, avoids even trying to start running an xfer if the adapter/channel doesn't have the resources. - Better communication between the mid-layer and the adapters. - Asynchronous event notification mechanism from adapter to mid-layer and peripherals. - Better peripheral queue management: freeze/thaw, sorted requeueing during recovery, etc. - Clean separation of peripherals, adapters, and adapter channels (no more scsipi_link). - Kernel thread for each scsipi_channel makes error recovery much easier (no more dealing with interrupt context when recovering from an error). - Mid-layer support for tagged queueing: commands can have the tag type set explicitly, tag IDs are allocated in the mid-layer (thus eliminating the need to use buggy tag ID allocation schemes in many adapter drivers). - support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command will be requeued, or a REQUEST SENSE will be sent as appropriate.
Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
|
1.48 |
| 20-Oct-1999 |
enami | branches: 1.48.8; Cancel active transfers on aic/wdc detach. Also makes LS-120 drive works for me again.
|
1.47 |
| 05-Dec-1998 |
mjacob | branches: 1.47.10; 1.47.12; 1.47.14; Eliminate the moreluns entry as it makes no sense for fat SCSI busses (e.g, FC loops). Change the semantics of scsi_probedev so that it returns 1 if you should continue probing at this target, else 0 for not.
Replace the blanket use of '7' with the use of the new sc_maxlun property that is now gathered from HBAs. Allocate scsipi_link arrays based upon this. Fix a really nasty and silly bug that has been there for a while where the number of first level scsipi_link structures was one less than it needed to be.
|
1.46 |
| 17-Nov-1998 |
bouyer | Rename scsi_interpret_sense() to scsipi_interpret_sense() and move it from scsi_base.c to scsipi_base.c. Rename the functions from scsi_verbose.c too, and rename the file itself. Cleaup includes too (scsi_*.h should not be #included in scsipi_*.h files, which are supposed to be common to atapi and scsi).
|
1.45 |
| 20-Oct-1998 |
thorpej | Fix a sight open flags buglet pointed out by Matthias Scheler.
|
1.44 |
| 17-Aug-1998 |
mycroft | Assign my copyrights to TNF.
|
1.43 |
| 15-Aug-1998 |
mycroft | Make copyright notices with my name consistent.
|
1.42 |
| 28-Mar-1998 |
christos | Split out the verbose printing of scsi messages, so that user programs can use the printing routines.
|
1.41 |
| 13-Feb-1998 |
enami | Backout previous change, and rather, remove all protection but the one actually currently required. Suggested by Charles M. Hannum.
|
1.40 |
| 13-Feb-1998 |
enami | Fix or add protection for mutiple inclusion.
|
1.39 |
| 01-Oct-1997 |
enami | Cosmetic changes to keep coding style consistency in this directory;
- Indent with tab of width 8. - Use four column to indent continuation line. - Fold long line if possible. - Use return (xx) instead of return xx. - Compare pointer against NULL instead of testing like boolean. - Delete whitespace at the end of line. - Delete whitespace in front of function call operator. - Delete whitespace after cast. - Dereference a pointer to function explicitly. - Add an empty line after local variable declaration. - Use NULL instead of (char *)0. - Dont use block for single statement.
|
1.38 |
| 27-Aug-1997 |
bouyer | branches: 1.38.2; Merge scsipi branch in the mainline. This add support for ATAPI devices (currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2 busses to which devices can attach (scsibus and atapibus). This needed to change some include files and structure names in the low level scsi drivers.
|
1.37 |
| 20-Aug-1997 |
mjacob | Add in prototype for routine to print SCSI errors in detail.
|
1.36 |
| 07-Jul-1997 |
cgd | branches: 1.36.2; mark prototypes for static inline functions as possibly unused (with __attribute__ ((unused))), to avoid generating warnings when compiling without optimization but with most ports' default warning flags.
|
1.35 |
| 02-Apr-1997 |
mycroft | Push the buffer cleanup code into scsi_done(), and split it so that biodone() is called *after* the driver `done' routine. This fixes disk I/O statistics on SCSI devices.
Also, calling the `done' routine with a `complete' argument of 0 and actually having it do anything meaningful loses in at least 3 ways, so just nuke the argument altogether and don't call it this way. If the driver needs to do some error handling, that's what `err_handler' is for.
|
1.34 |
| 10-Dec-1996 |
thorpej | Add a "max_target" member to struct scsi_link, which is filled in by host adapter drivers, indicating the highest SCSI target they can address. Use this value to dynamically allocate data structures, rather than hard-coding 8 targets.
These changes allow targets > 7 to be addressed on wide SCSI busses.
Fixes PRs #1674 and #2892.
|
1.33 |
| 23-Oct-1996 |
matthias | * At least the Teac FC-1 Shugart-SCSI bridgeboard does motor on/off management by itself. But when it gets a start unit request, it keeps the floppy motor running all the time. This adds code for dealing with yet another quirk (SDEV_NOSTARTUNIT) that prevents sd.c from sending start unit requests. A entry for the Teac FC-1 is added to the quirk table.
|
1.32 |
| 03-Sep-1996 |
thorpej | Store the SCSI version in the scsi_link, and set the LUN in the CDB if the version is <= SCSI-2. This should help some older SCSI devices that previously needed the "NOLUNS" quirk. While this is not strictly necessary on SCSI-2 devices, the spec allows it, so we set it for SCSI-2 devices "just in case". See section 7.2.2 of Draft X3T9.2 Rev 10L for details.
|
1.31 |
| 28-Aug-1996 |
cgd | (1) add a 'channel' field to scsi_link. (2) in scsibusmatch, match channel as appropriate. (3) add a scsiprint() function, to do the "scsibus at..." and channel (if not SCSI_CHANNEL_ONLY_ONE) printing, i.e. the common functionality that all SCSI drivers currently should be doing.
|
1.30 |
| 05-Jul-1996 |
christos | - Apply PR/2535: Add support for flex scsi disks. - Add a quirk called SCSI_NOMODESENSE for drives like the iomega jaz, that don't support mode sense.
|
1.29 |
| 19-Mar-1996 |
mycroft | branches: 1.29.4; Define a full set of [234][bl]tol() and lto[234][bl]() conversion functions, inlined. Use sized types in protocol structures. Make the definition of scsi_sense_data less ugly.
|
1.28 |
| 18-Feb-1996 |
mycroft | Add SCSI scanner support by Kenneth Stailey and Joachim Koenig-Baltes, hacked a bit. Needs more work.
|
1.27 |
| 14-Feb-1996 |
christos | scsi prototypes
|
1.26 |
| 12-Jan-1996 |
thorpej | Handle cases like the following: - controller calls scsi_done() with error XS_TIMEOUT - scsi_done() calls sddone() - sddone() calls disk_unbusy() - scsi_done() calls controller to retry command (missing the call to disk_busy()) - controller calls scsi_done() - scsi_done() calls sddone() - sddone() calls disk_busy(), which panics because of the imbalance. Bug noticed by Leo Weppleman, who also suggested this fix; pass an additional boolean argument ("complete") to the device's "done" routine, with a value of `0' passed from the previous call to "done", and add an additional call to "done" when the xfer resources are freed.
|
1.25 |
| 12-Aug-1995 |
mycroft | minphys() functions really should return void.
|
1.24 |
| 24-Jul-1995 |
cgd | restore a deleted semicolon
|
1.23 |
| 24-Jul-1995 |
cgd | kill structure offest comments in non-fixed-size structures. In some of our worlds, pointers just Aren't 4 bytes.
|
1.22 |
| 24-Jul-1995 |
cgd | update SCSI minphys routines' definitions to match standard minphys() definition and usage.
|
1.21 |
| 12-Jul-1995 |
cgd | add a SDEV_FORCELUNS flag, as suggested by Jason Thorpe, to force the SCSI code to look for LUNs on prehistoric (pre-SCSI 1) drives & controllers, where normally it would not.
|
1.20 |
| 26-Jan-1995 |
mycroft | Update copyrights.
|
1.19 |
| 26-Jan-1995 |
mycroft | Redo the `wait for spin up' code. The Mach 3 method clearly doesn't work. Also, rearrange the first open sequences a bit; SDEV_OPEN is no longer magic.
|
1.18 |
| 30-Dec-1994 |
mycroft | Fix some oversights in the debugging code.
|
1.17 |
| 28-Dec-1994 |
mycroft | Numerous changes. Many bugs fixed, better autoconfig, a few new features.
|
1.16 |
| 21-Nov-1994 |
mycroft | Replace dev_unit with device_softc in scsi_link. Change argument to foostart() to void*.
|
1.15 |
| 03-Nov-1994 |
mycroft | Always use direct configuration for SCSI devices.
|
1.14 |
| 03-Nov-1994 |
mycroft | Remove a couple of i386-specific hacks, and make a couple of others #ifdef CONFIG_INDIRECT instead.
|
1.13 |
| 30-Oct-1994 |
cgd | be more careful with types, also pull in headers where necessary.
|
1.12 |
| 20-Oct-1994 |
mycroft | First cut at making user-level SCSI commands work. This is untested. Partly from John Brezak.
|
1.11 |
| 29-Jun-1994 |
cgd | New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD'
|
1.10 |
| 12-May-1994 |
mycroft | Nuke some junk in scsi_link, as pointed out by Gordon.
|
1.9 |
| 20-Apr-1994 |
mycroft | Maintain the xs free list with LIST_*().
|
1.8 |
| 11-Apr-1994 |
mycroft | Fix various types. Remove some outdated flags.
|
1.7 |
| 11-Apr-1994 |
mycroft | Combine scsi_start_unit() and scsi_stop_unit(), and increase the start timeout (again).
|
1.6 |
| 29-Mar-1994 |
mycroft | New SCSI system, based on Julian's more recent work.
|
1.5 |
| 25-Mar-1994 |
mycroft | Put controller target in scsi_switch.
|
1.4 |
| 20-May-1993 |
cgd | branches: 1.4.3; add rcsids and clean up file headers
|
1.3 |
| 04-May-1993 |
deraadt | support for making dev->id_alive be set, this is for iostat to find disk devices. wee bit of a kludge. sub-device attach() routines must now return 1 for successful attach(), 0 otherwise. Other bsd's do this too..
|
1.2 |
| 12-Apr-1993 |
deraadt | new scsi subsystem. changes also in config/mkioconf.c i386/isa/wd.c, fd.c, and all scsi drivers.
|
1.1 |
| 21-Mar-1993 |
cgd | after 0.2.2 "stable" patches applied
|
1.4.3.5 |
| 01-Feb-1994 |
mycroft | Add scsi_stop_unit(), from Mac code. Other minor nits.
|
1.4.3.4 |
| 28-Nov-1993 |
mycroft | Correct some function return types.
|
1.4.3.3 |
| 24-Nov-1993 |
mycroft | More construction...
|
1.4.3.2 |
| 24-Nov-1993 |
mycroft | Still under construction...
|
1.4.3.1 |
| 24-Nov-1993 |
mycroft | Under construction...
|
1.29.4.1 |
| 04-Mar-1997 |
mycroft | Pull up support for fetching geometry info on optical disks.
|
1.36.2.1 |
| 23-Aug-1997 |
thorpej | Update marc-pcmcia branch from trunk.
|
1.38.2.3 |
| 14-Oct-1997 |
thorpej | Update marc-pcmcia branch from trunk.
|
1.38.2.2 |
| 27-Aug-1997 |
thorpej | Update marc-pcmcia branch from trunk.
|
1.38.2.1 |
| 27-Aug-1997 |
thorpej | file scsiconf.h was added on branch marc-pcmcia on 1997-08-27 23:33:21 +0000
|
1.47.14.1 |
| 27-Dec-1999 |
wrstuden | Pull up to last week's -current.
|
1.47.12.1 |
| 15-Nov-1999 |
fvdl | Sync with -current
|
1.47.10.2 |
| 20-Oct-1999 |
thorpej | Sync w/ trunk.
|
1.47.10.1 |
| 19-Oct-1999 |
thorpej | Completely rewritten scsipi_xfer execution engine: - All xfers are queued in the mid-layer, rather than doing so in an ad-hoc fashion in individual adapter drivers. - Adapter/channel resource management in the mid-layer, avoids even trying to start running an xfer if the adapter/channel doesn't have the resources. - Better communication between the mid-layer and the adapters. - Asynchronous event notification mechanism from adapter to mid-layer and peripherals. - Better peripheral queue management: freeze/thaw, sorted requeueing during recovery, etc. - Clean separation of peripherals, adapters, and adapter channels (no more scsipi_link). - Kernel thread for each scsipi_channel makes error recovery much easier (no more dealing with interrupt context when recovering from an error). - Mid-layer support for tagged queueing: commands can have the tag type set explicitly, tag IDs are allocated in the mid-layer (thus eliminating the need to use buggy tag ID allocation schemes in many adapter drivers).
There is a lot more work to do, but this correctly functions for the most part on several file servers I run.
|
1.48.8.2 |
| 07-Jan-2003 |
thorpej | Sync with HEAD.
|
1.48.8.1 |
| 21-Jun-2001 |
nathanw | Catch up to -current.
|
1.50.4.1 |
| 11-Sep-2004 |
he | Pull up revision 1.52 (via patch, requested by bouyer in ticket #837): Improve handling of memory shortage, to fix problems like: sd3(mpt0:0:1:0): unable to allocate scsipi_xfer sd3: not queued, error 12 The theory is that other consumers of pool memory is causing this memory shortage in certain somewhat hard to reproduce situations. This is done by giving scsipi_command an extra argument to optionally pass a preallocated scsipi_xfer, and allocating a scsipi_xfer before dequeueing a buffer in the various *start() functions. If the allocation of a scsipi_xfer fails, schedule a callout for delayed invocation of the start function. Also reserve one page for scsipi_xfer structs, to ensure that we will eventually have some available once pending commands complete. Should fix PR#25670.
|
1.50.2.3 |
| 21-Sep-2004 |
skrll | Fix the sync with head I botched.
|
1.50.2.2 |
| 18-Sep-2004 |
skrll | Sync with HEAD.
|
1.50.2.1 |
| 25-Aug-2004 |
skrll | Sync with HEAD.
|
1.54.74.2 |
| 04-May-2009 |
yamt | sync with head.
|
1.54.74.1 |
| 16-May-2008 |
yamt | sync with head.
|
1.54.72.1 |
| 18-May-2008 |
yamt | sync with head.
|
1.54.70.2 |
| 28-Sep-2008 |
mjf | Sync with HEAD.
|
1.54.70.1 |
| 02-Jun-2008 |
mjf | Sync with HEAD.
|
1.55.6.1 |
| 19-Oct-2008 |
haad | Sync with HEAD.
|
1.55.4.1 |
| 18-Jul-2008 |
simonb | Sync with head.
|
1.55.2.1 |
| 18-Sep-2008 |
wrstuden | Sync with wrstuden-revivesa-base-2.
|
1.56.34.1 |
| 23-Apr-2012 |
riz | Pull up following revision(s) (requested by bouyer in ticket #192): sys/dev/scsipi/cd.c: revision 1.307 sys/dev/scsipi/scsiconf.c: revision 1.266 sys/dev/scsipi/sd.c: revision 1.298 sys/dev/scsipi/st_scsi.c: revision 1.35 sys/dev/scsipi/atapiconf.c: revision 1.85 sys/dev/scsipi/scsipiconf.h: revision 1.120 sys/dev/usb/umass_scsipi.c: revision 1.44 sys/dev/scsipi/scsiconf.h: revision 1.57 sys/dev/scsipi/st_atapi.c: revision 1.29 sys/dev/scsipi/scsipi_base.c: revision 1.158 sys/dev/scsipi/st.c: revision 1.221 sys/dev/scsipi/scsipi_ioctl.c: revision 1.67 Expand struct scsipi_bustype {} in a ABI-backward-compatible way to pass more informations about the bus: - bustype_type has 2 different bytes, one holding the existing SCSIPI_BUSTYPE_* (scsi, atapi, ata), and one for a per-SCSIPI_BUSTYPE_* subtype. Introduce macros to build or extract bustype_type. - for SCSIPI_BUSTYPE_SCSI, define subtypes for parallel SCSI, Fibre Channel, SAS and USB, to specify the transport method. SCSIPI_BUSTYPE_SCSI_PSCSI is 0 so that bustype_type value doesn't change for existing code - for non-SCSIPI_BUSTYPE_SCSI busses there's no defined subtype yet, so the bustype_type value doesn't change. - provide scsi_fc_bustype, scsi_sas_bustype and scsi_usb_bustype along with scsi_bustype to be used by bus driver where appropriate - scsipi_print_xfer_mode(): more existing code under a (SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_PSCSI) case, as sync/wide parameters only make sense for parallel SCSI. For (SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_FC) and (SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_SAS), only print tagged queing status if enabled. Just be silent for other bustypes. This change is prompted by this problem: right now, FC (e.g. isp(4)) and SAS (e.g. mfi(4)) don't do anything for ADAPTER_REQ_SET_XFER_MODE, and especially never call scsipi_async_event(ASYNC_EVENT_XFER_MODE), so sd(4) always runs untagged. Doing a scsipi_async_event(ASYNC_EVENT_XFER_MODE) with appropriate parameters is enough to enable tagged queuing, but then scsipi will print: sd0: async, 8-bit transfers, tagged queueing which is harmless (async, 8-bit transfers doens't make sense on SAS anyway) but will confuse users. With this change scsipi will only print: sd0: tagged queueing which is correct. In the long run, knowning the underlying transport in scsipi will allow better handling of device which are not parallel SCSI. Another change adding an extra callback to struct scsipi_bustype {} will come (so that scsipi_print_xfer_mode(), which is SCSI-specific, can be moved out of scsipi_base, and split into per-subtype callback), but this will break kernel ABI and so is not suitable for netbsd-6, so will be commmited later. The above is enough to get tagged queuing on FC and SAS in netbsd-6.
|
1.56.32.1 |
| 29-Apr-2012 |
mrg | sync to latest -current.
|
1.56.28.1 |
| 23-May-2012 |
yamt | sync with head.
|