Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/sys/dev
Module Name: src
Committed By: bouyer
Date: Thu Apr 19 17:45:21 UTC 2012
Modified Files:
src/sys/dev/scsipi: atapiconf.c cd.c scsiconf.c scsiconf.h
scsipi_base.c scsipi_ioctl.c scsipiconf.h sd.c st.c st_atapi.c
st_scsi.c
src/sys/dev/usb: umass_scsipi.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/dev/scsipi/atapiconf.c
cvs rdiff -u -r1.306 -r1.307 src/sys/dev/scsipi/cd.c
cvs rdiff -u -r1.265 -r1.266 src/sys/dev/scsipi/scsiconf.c
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/scsipi/scsiconf.h
cvs rdiff -u -r1.157 -r1.158 src/sys/dev/scsipi/scsipi_base.c
cvs rdiff -u -r1.66 -r1.67 src/sys/dev/scsipi/scsipi_ioctl.c
cvs rdiff -u -r1.119 -r1.120 src/sys/dev/scsipi/scsipiconf.h
cvs rdiff -u -r1.297 -r1.298 src/sys/dev/scsipi/sd.c
cvs rdiff -u -r1.220 -r1.221 src/sys/dev/scsipi/st.c
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/scsipi/st_atapi.c
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/scsipi/st_scsi.c
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/usb/umass_scsipi.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index