History log of /netbsd-current/sbin/scsictl/scsictl.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.40 21-Aug-2022 mlelstv

Add REPORT_LUNS command.


Revision tags: netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.39 19-Nov-2016 flxd

Add "getrealloc" and "setrealloc" commands to get/set automatic reallocation
parameters/enables for error recovery, similar to {get,set}cache.
Many old SCSI disks shipped with reallocation disabled, albeit supporting it.
Minor (cosmetic) fixup of scsi_disk_pages while there.
Based upon code in PR bin/29165 by Greg A. Woods.
OK christos@


Revision tags: pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.38 18-Oct-2014 snj

branches: 1.38.2;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 tls-maxphys-base
# 1.37 12-Jan-2013 jakllsch

branches: 1.37.8; 1.37.12;
We supply data with the FORMAT UNIT command, so tell the kernel which
direction it is to go (write).


# 1.36 12-Jan-2013 jakllsch

take sizeof actual symbol we are memsetting


Revision tags: yamt-pagecache-base7
# 1.35 03-Nov-2012 jakllsch

make a bunch of globals static


# 1.34 03-Nov-2012 jakllsch

drop write-only variable


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.33 29-Aug-2011 joerg

branches: 1.33.2; 1.33.4; 1.33.8;
Use __dead


Revision tags: cherry-xenmp-base
# 1.32 24-May-2011 joerg

Decide on printing an int as int and not as short.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 wrstuden-revivesa-base mjf-devfs2-base
# 1.31 28-Apr-2008 martin

Remove clause 3 and 4 from TNF licenses


Revision tags: yamt-pf42-baseX yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase mjf-devfs-base hpcarm-cleanup-base
# 1.30 02-Feb-2008 christos

branches: 1.30.4; 1.30.6;
PR/37932: Yakovetsky Vladimir: build distribution with USE_FORT fails
fix buffer overflow


Revision tags: matt-armv6-prevmlocking cube-autoconf-base matt-armv6-base matt-mips64-base
# 1.29 22-Jan-2007 bouyer

branches: 1.29.4; 1.29.6;
Kimura Fuyuki, bin/35216: add a setspeed command, to set the highest speed
that the optical drive should use for reading data.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.28 02-Jun-2005 lukem

Ensure that "setcache <mode>" doesn't use random data for "byte2"
("setcache <mode> save" DTRT).
Found by gcc -Wuninitialized.

Appease other -Wuninitialized warnings.


Revision tags: netbsd-3-base
# 1.27 21-Feb-2005 thorpej

branches: 1.27.2;
Part 1 of a cleanup pass over the SCSI subsystem. The aim is to name
everything "scsi_*", since we really are talking about the SCSI command
set, ATAPI transport not withstanding. Improve the names of many structures,
and prepend "SCSI_" onto all SCSI command opcodes. Place items described
by the SCSI Primary Commands document into scsi_spc.h.


# 1.26 05-Feb-2005 xtraeme

Kill __P(), use ANSI function declarations; WARNS=3.


# 1.25 07-Jan-2005 ginsbach

Add command to read the defect data from a direct access device.


# 1.24 01-Jun-2004 fair

Increase the SCSI command timeout for device start & stop from 10
to 30 seconds, per PR 25734. I've seen this problem myself. I think
that scsictl should:

1. accept a timeout flag/parameter to set the timeout to an arbitrary
value other than the default.

2. support a verbose mode that would report the timeout value before
the command is started, and then report how long the command actually
took to complete, though I suppose the latter could also be done
by using time(1).


Revision tags: netbsd-2-0-base
# 1.23 05-Jan-2004 jmmv

branches: 1.23.2;
Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.


# 1.22 01-Sep-2003 mycroft

Add prevent/allow commands.


# 1.21 01-Sep-2003 mycroft

Add a flushcache command -- I need it for my DVD+RW.


# 1.20 23-Jun-2003 agc

Add NetBSD RCS Ids.


Revision tags: fvdl_fs64_base
# 1.19 26-Sep-2002 petrov

Added debug command to support SCIOCDEBUG.


# 1.18 03-Sep-2002 thorpej

* Add "getcache" and "setcache" commands to get/set basic cache
parameters (enables, really).
* Fix an error in the manpage.
* Shuffle some code to group things together better.


# 1.17 20-Jul-2002 grant

sweep of errx/warnx, remove unnecessary trailing \n


# 1.16 26-Jun-2002 mjacob

Add a bunch of stuff from Bob Nestor that fixes format to allow one to
specify device logical blocksize.

Furthermore, it also adds an 'immediate' option, which then sends more modern
devices into formatting in the background. scsictl still waits around and
sends a TEST UNIT READY every 10 seconds and, based upon the sense data
it gets back after the invariable CHECK CONDITION, prints out a progress
indicator (based upon SKSV progress in the sense data).

While we're at it, add a 'tur', 'reserve', 'release', 'start' and 'stop'
functions to the device commands.

Fix a long standing bug in scsi_command- the value in retsts is an integral
value- not a bitmask.


Revision tags: netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.15 14-Apr-2002 tsutsui

branches: 1.15.2;
21600000 -> 6*60*60*1000 (timeout in six hours for format command)


# 1.14 18-Jul-2001 bouyer

Add and document a 'detach' command.


# 1.13 15-May-2001 bouyer

Adapt for MODE SENSE/SELECT changes in kernel.


# 1.12 01-Apr-2001 ad

Remove superfluous newlines in calls to errx().


# 1.11 19-Feb-2001 cgd

convert to use getprogname()


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
# 1.10 27-Oct-1999 mycroft

Increase the format timeout to 6 hours.


# 1.9 04-Oct-1999 mycroft

Make `reassign' actually work.


# 1.8 28-Sep-1999 ad

Make `all' a synonym for the `any' keyword.


# 1.7 13-Aug-1999 mjl

branches: 1.7.2;
Clarify usage message.


# 1.6 30-Jul-1999 hubertf

Collect all little usage-messages spread around into one place,
and as a side effect, print the available commands (and their
usage) if no command is given on the command line.

Approved by Jason Thorpe.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.5 24-Feb-1999 jwise

Code to check if a cooked device was specified was failing even if the
cooked device was opened successfully. Also fix a typo.

Fixes second part of PR bin/6883 for Soren S. Jorvang <soren@t.dk>


# 1.4 12-Nov-1998 thorpej

Simple support for formatting a SCSI disk. This will be enhanced in
the near future.


# 1.3 17-Oct-1998 thorpej

Fix a thinko in the device opening code.


# 1.2 15-Oct-1998 thorpej

Fix a couple of usage strings.


# 1.1 15-Oct-1998 thorpej

scsictl(8) - a program to manipulate SCSI devices and busses. Currently
supports:

Devices: identify, reassign blocks, reset

Busses: reset, scan for devices

Coming soon, device formatting, mode page editing, device freeze/thaw, etc.


# 1.39 19-Nov-2016 flxd

Add "getrealloc" and "setrealloc" commands to get/set automatic reallocation
parameters/enables for error recovery, similar to {get,set}cache.
Many old SCSI disks shipped with reallocation disabled, albeit supporting it.
Minor (cosmetic) fixup of scsi_disk_pages while there.
Based upon code in PR bin/29165 by Greg A. Woods.
OK christos@


Revision tags: pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.38 18-Oct-2014 snj

src is too big these days to tolerate superfluous apostrophes. It's
"its", people!


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 tls-maxphys-base
# 1.37 12-Jan-2013 jakllsch

branches: 1.37.8;
We supply data with the FORMAT UNIT command, so tell the kernel which
direction it is to go (write).


# 1.36 12-Jan-2013 jakllsch

take sizeof actual symbol we are memsetting


Revision tags: yamt-pagecache-base7
# 1.35 03-Nov-2012 jakllsch

make a bunch of globals static


# 1.34 03-Nov-2012 jakllsch

drop write-only variable


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.33 29-Aug-2011 joerg

branches: 1.33.2; 1.33.8;
Use __dead


Revision tags: cherry-xenmp-base
# 1.32 24-May-2011 joerg

Decide on printing an int as int and not as short.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 wrstuden-revivesa-base mjf-devfs2-base
# 1.31 28-Apr-2008 martin

Remove clause 3 and 4 from TNF licenses


Revision tags: yamt-pf42-baseX yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase mjf-devfs-base hpcarm-cleanup-base
# 1.30 02-Feb-2008 christos

branches: 1.30.4; 1.30.6;
PR/37932: Yakovetsky Vladimir: build distribution with USE_FORT fails
fix buffer overflow


Revision tags: matt-armv6-prevmlocking cube-autoconf-base matt-armv6-base matt-mips64-base
# 1.29 22-Jan-2007 bouyer

branches: 1.29.4; 1.29.6;
Kimura Fuyuki, bin/35216: add a setspeed command, to set the highest speed
that the optical drive should use for reading data.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.28 02-Jun-2005 lukem

Ensure that "setcache <mode>" doesn't use random data for "byte2"
("setcache <mode> save" DTRT).
Found by gcc -Wuninitialized.

Appease other -Wuninitialized warnings.


Revision tags: netbsd-3-base
# 1.27 21-Feb-2005 thorpej

branches: 1.27.2;
Part 1 of a cleanup pass over the SCSI subsystem. The aim is to name
everything "scsi_*", since we really are talking about the SCSI command
set, ATAPI transport not withstanding. Improve the names of many structures,
and prepend "SCSI_" onto all SCSI command opcodes. Place items described
by the SCSI Primary Commands document into scsi_spc.h.


# 1.26 05-Feb-2005 xtraeme

Kill __P(), use ANSI function declarations; WARNS=3.


# 1.25 07-Jan-2005 ginsbach

Add command to read the defect data from a direct access device.


# 1.24 01-Jun-2004 fair

Increase the SCSI command timeout for device start & stop from 10
to 30 seconds, per PR 25734. I've seen this problem myself. I think
that scsictl should:

1. accept a timeout flag/parameter to set the timeout to an arbitrary
value other than the default.

2. support a verbose mode that would report the timeout value before
the command is started, and then report how long the command actually
took to complete, though I suppose the latter could also be done
by using time(1).


Revision tags: netbsd-2-0-base
# 1.23 05-Jan-2004 jmmv

branches: 1.23.2;
Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.


# 1.22 01-Sep-2003 mycroft

Add prevent/allow commands.


# 1.21 01-Sep-2003 mycroft

Add a flushcache command -- I need it for my DVD+RW.


# 1.20 23-Jun-2003 agc

Add NetBSD RCS Ids.


Revision tags: fvdl_fs64_base
# 1.19 26-Sep-2002 petrov

Added debug command to support SCIOCDEBUG.


# 1.18 03-Sep-2002 thorpej

* Add "getcache" and "setcache" commands to get/set basic cache
parameters (enables, really).
* Fix an error in the manpage.
* Shuffle some code to group things together better.


# 1.17 20-Jul-2002 grant

sweep of errx/warnx, remove unnecessary trailing \n


# 1.16 26-Jun-2002 mjacob

Add a bunch of stuff from Bob Nestor that fixes format to allow one to
specify device logical blocksize.

Furthermore, it also adds an 'immediate' option, which then sends more modern
devices into formatting in the background. scsictl still waits around and
sends a TEST UNIT READY every 10 seconds and, based upon the sense data
it gets back after the invariable CHECK CONDITION, prints out a progress
indicator (based upon SKSV progress in the sense data).

While we're at it, add a 'tur', 'reserve', 'release', 'start' and 'stop'
functions to the device commands.

Fix a long standing bug in scsi_command- the value in retsts is an integral
value- not a bitmask.


Revision tags: netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.15 14-Apr-2002 tsutsui

branches: 1.15.2;
21600000 -> 6*60*60*1000 (timeout in six hours for format command)


# 1.14 18-Jul-2001 bouyer

Add and document a 'detach' command.


# 1.13 15-May-2001 bouyer

Adapt for MODE SENSE/SELECT changes in kernel.


# 1.12 01-Apr-2001 ad

Remove superfluous newlines in calls to errx().


# 1.11 19-Feb-2001 cgd

convert to use getprogname()


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
# 1.10 27-Oct-1999 mycroft

Increase the format timeout to 6 hours.


# 1.9 04-Oct-1999 mycroft

Make `reassign' actually work.


# 1.8 28-Sep-1999 ad

Make `all' a synonym for the `any' keyword.


# 1.7 13-Aug-1999 mjl

branches: 1.7.2;
Clarify usage message.


# 1.6 30-Jul-1999 hubertf

Collect all little usage-messages spread around into one place,
and as a side effect, print the available commands (and their
usage) if no command is given on the command line.

Approved by Jason Thorpe.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.5 24-Feb-1999 jwise

Code to check if a cooked device was specified was failing even if the
cooked device was opened successfully. Also fix a typo.

Fixes second part of PR bin/6883 for Soren S. Jorvang <soren@t.dk>


# 1.4 12-Nov-1998 thorpej

Simple support for formatting a SCSI disk. This will be enhanced in
the near future.


# 1.3 17-Oct-1998 thorpej

Fix a thinko in the device opening code.


# 1.2 15-Oct-1998 thorpej

Fix a couple of usage strings.


# 1.1 15-Oct-1998 thorpej

scsictl(8) - a program to manipulate SCSI devices and busses. Currently
supports:

Devices: identify, reassign blocks, reset

Busses: reset, scan for devices

Coming soon, device formatting, mode page editing, device freeze/thaw, etc.