OpenBSD CVS

CVS log for src/sys/scsi/ch.c


[BACK] Up to [local] / src / sys / scsi

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.72 / (download) - annotate - [select for diffs], Tue Apr 11 00:45:09 2023 UTC (14 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.71: +3 -3 lines
Diff to previous 1.71 (colored)

fix double words in comments
feedback and ok jmc@ miod, ok millert@

Revision 1.71 / (download) - annotate - [select for diffs], Tue Jan 11 23:10:11 2022 UTC (2 years, 4 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.70: +3 -3 lines
Diff to previous 1.70 (colored)

spelling

Revision 1.70 / (download) - annotate - [select for diffs], Sun Oct 24 16:57:30 2021 UTC (2 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.69: +2 -2 lines
Diff to previous 1.69 (colored)

Constify struct cfattach.

ok visa@ a long time ago, ok krw@

Revision 1.69 / (download) - annotate - [select for diffs], Tue Aug 31 05:29:55 2021 UTC (2 years, 9 months ago) by robert
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.68: +45 -3 lines
Diff to previous 1.68 (colored)

add support for obtaining sense status and source slot of a media

this fixes a bug in bacula where the catalog was not properly kept
up-to-date if a tape was in a drive becuse its source slot was
unknown

based on code from FreeBSD; ok krw@

picker 0:  sense: <0x00/0x00> voltag: <:0> avoltag: <:0> source: <>
slot 0: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1168L1:0> avoltag: <:0> source: <slot 0>
slot 1: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1187L1:0> avoltag: <:0> source: <slot 1>
slot 2: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1184L1:0> avoltag: <:0> source: <slot 2>
slot 3: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1195L1:0> avoltag: <:0> source: <slot 3>
slot 4: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1037L1:0> avoltag: <:0> source: <slot 4>
slot 5: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1038L1:0> avoltag: <:0> source: <slot 5>
slot 6: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1166L1:0> avoltag: <:0> source: <slot 6>
slot 7: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1167L1:0> avoltag: <:0> source: <slot 7>
slot 8: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1180L1:0> avoltag: <:0> source: <slot 8>
slot 9: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1186L1:0> avoltag: <:0> source: <slot 9>
slot 10: <ACCESS> sense: <0x00/0x00> voltag: <:0> avoltag: <:0> source: <picker 0>
slot 11: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1182L1:0> avoltag: <:0> source: <slot 11>
slot 12: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1181L1:0> avoltag: <:0> source: <slot 12>
slot 13: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1196L1:0> avoltag: <:0> source: <slot 13>
slot 14: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1169L1:0> avoltag: <:0> source: <slot 14>
slot 15: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1197L1:0> avoltag: <:0> source: <slot 15>
slot 16: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1165L1:0> avoltag: <:0> source: <slot 16>
slot 17: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1199L1:0> avoltag: <:0> source: <slot 17>
slot 18: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1189L1:0> avoltag: <:0> source: <slot 18>
slot 19: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1185L1:0> avoltag: <:0> source: <slot 19>
slot 20: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1198L1:0> avoltag: <:0> source: <slot 20>
slot 21: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1039L1:0> avoltag: <:0> source: <slot 21>
slot 22: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1035L1:0> avoltag: <:0> source: <slot 22>
slot 23: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1188L1:0> avoltag: <:0> source: <slot 23>
drive 0: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1183L1:0> avoltag: <:0> source: <slot 10>

Revision 1.68 / (download) - annotate - [select for diffs], Fri Mar 12 10:22:46 2021 UTC (3 years, 3 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.67: +2 -2 lines
Diff to previous 1.67 (colored)

spelling

Revision 1.67 / (download) - annotate - [select for diffs], Tue Sep 22 19:32:53 2020 UTC (3 years, 8 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.66: +5 -5 lines
Diff to previous 1.66 (colored)

Since dlg@'s 2009 scsi midlayer refactoring the 'struct scsi_generic *cmd'
member of 'struct scsi_xfer' has always been pointed at the 'struct scsi_generic
cmdstore' member of the same instance. So nuke 'cmdstore' and remove the '*'
from cmd. Take the address of cmd as required by the various casts.

No intentional functional change.

luna88k test by aoyama@, sparc64 test by jmatthew@

Identification of 2009's last *cmd use and ok jmatthew@

Revision 1.66 / (download) - annotate - [select for diffs], Tue Aug 11 15:23:57 2020 UTC (3 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.65: +2 -1 lines
Diff to previous 1.65 (colored)

Explicitly #include <scsi/scsi_debug.h> rather than assuming scsiconf.h will do
it.

Prepares for removal of #include <scsi/scsi_debug.h> from scsiconf.h as soon as
the alpha tester digs out from hurricane to compile last untested files.

Revision 1.65 / (download) - annotate - [select for diffs], Tue Jun 30 18:43:37 2020 UTC (3 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.64: +4 -5 lines
Diff to previous 1.64 (colored)

Nuke unneeded 'sa_inqbuf' member of struct scsi_attach_args. It always
points to the inquiry data contained in the struct scsi_link pointed
to by the other member, sa_sc_link.

Revision 1.64 / (download) - annotate - [select for diffs], Fri Dec 6 16:57:24 2019 UTC (4 years, 6 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.63: +108 -103 lines
Diff to previous 1.63 (colored)

Various cleanup tweaks. 'return' is not a function. KNF. Whitespace,
Comment fixes.

Revision 1.63 / (download) - annotate - [select for diffs], Thu Dec 5 18:42:14 2019 UTC (4 years, 6 months ago) by krw
Branch: MAIN
Changes since 1.62: +3 -3 lines
Diff to previous 1.62 (colored)

Shrink scsi_mode_do_sense() parameter list by eliminating the three
pointers returning possible block descriptor values for block size,
block count and density. Most calls were passing "NULL, NULL, NULL"
since they did not care.

Call scsi_parse_blkdesc() directly in those few cases where one or
more of the values is of interest.

No intentional functional change.

Revision 1.62 / (download) - annotate - [select for diffs], Sun Dec 1 15:41:43 2019 UTC (4 years, 6 months ago) by krw
Branch: MAIN
Changes since 1.61: +2 -2 lines
Diff to previous 1.61 (colored)

Don't overwrite original error returned by scsi_do_mode_sense().

Revision 1.61 / (download) - annotate - [select for diffs], Fri Nov 29 14:06:21 2019 UTC (4 years, 6 months ago) by krw
Branch: MAIN
Changes since 1.60: +3 -3 lines
Diff to previous 1.60 (colored)

Add defines for changer mode page codes. Move AUDIO_PAGE define to
nestle amoung its friends.

Revision 1.60 / (download) - annotate - [select for diffs], Thu Nov 28 16:27:35 2019 UTC (4 years, 6 months ago) by krw
Branch: MAIN
Changes since 1.59: +4 -4 lines
Diff to previous 1.59 (colored)

Always pass a pointer to 'big' to scsi_do_mode_sense().

Sets up some simplifications.

Revision 1.59 / (download) - annotate - [select for diffs], Sat Nov 23 17:10:13 2019 UTC (4 years, 6 months ago) by krw
Branch: MAIN
Changes since 1.58: +8 -8 lines
Diff to previous 1.58 (colored)

Consistently use ISSET() to check for set flags.

Revision 1.58 / (download) - annotate - [select for diffs], Sat Nov 23 12:27:32 2019 UTC (4 years, 6 months ago) by krw
Branch: MAIN
Changes since 1.57: +3 -3 lines
Diff to previous 1.57 (colored)

Consistently use !ISSET() to check for unset flags.

Revision 1.57 / (download) - annotate - [select for diffs], Sat Nov 23 01:16:05 2019 UTC (4 years, 6 months ago) by krw
Branch: MAIN
Changes since 1.56: +8 -8 lines
Diff to previous 1.56 (colored)

Consistently use SET() to set bits.

Revision 1.56 / (download) - annotate - [select for diffs], Fri Nov 22 15:34:29 2019 UTC (4 years, 6 months ago) by krw
Branch: MAIN
Changes since 1.55: +3 -3 lines
Diff to previous 1.55 (colored)

Be consistent and always use CLR() to clear flags.

Revision 1.55 / (download) - annotate - [select for diffs], Thu Nov 21 23:22:14 2019 UTC (4 years, 6 months ago) by krw
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored)

Be consistent and always use [!]ISSET() to test flags in xs->flags.

Revision 1.54 / (download) - annotate - [select for diffs], Fri Sep 27 17:22:31 2019 UTC (4 years, 8 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.53: +3 -3 lines
Diff to previous 1.53 (colored)

Add/tweak #endif comments to make spelunking via grep more rewarding.

Revision 1.53 / (download) - annotate - [select for diffs], Sun Jan 20 20:28:37 2019 UTC (5 years, 4 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.52: +3 -3 lines
Diff to previous 1.52 (colored)

No leading space(s) before labels.

Prodded by guenther@

Revision 1.52 / (download) - annotate - [select for diffs], Sat Mar 12 15:16:04 2016 UTC (8 years, 3 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.51: +4 -4 lines
Diff to previous 1.51 (colored)

Standardize on calling local scsi_link variables 'link' instead of
'sc_link'. 'sc_link' is a field in the various device *_softc
structures, where the sc_ prefix was for 'softc'. Reduces potential
mental confusion. Newer code from down under was already using
'link'.

No functional change.

Prompted by bluhm@'s adventures in scsi. ok dlg@ jmatthew@

Revision 1.51 / (download) - annotate - [select for diffs], Sun Aug 23 01:55:39 2015 UTC (8 years, 9 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.50: +2 -2 lines
Diff to previous 1.50 (colored)

add some sizes to free. looked over by deraadt

Revision 1.50 / (download) - annotate - [select for diffs], Sat Mar 14 03:38:52 2015 UTC (9 years, 3 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.49: +1 -2 lines
Diff to previous 1.49 (colored)

Remove some includes include-what-you-use claims don't
have any direct symbols used.  Tested for indirect use by compiling
amd64/i386/sparc64 kernels.

ok tedu@ deraadt@

Revision 1.49 / (download) - annotate - [select for diffs], Sun Sep 14 14:17:26 2014 UTC (9 years, 8 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.48: +1 -2 lines
Diff to previous 1.48 (colored)

remove uneeded proc.h includes
ok mpi@ kspillner@

Revision 1.48 / (download) - annotate - [select for diffs], Sun Jul 13 17:34:25 2014 UTC (9 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.47: +4 -3 lines
Diff to previous 1.47 (colored)

use mallocarray where arguments are multiplied; ok tedu

Revision 1.47 / (download) - annotate - [select for diffs], Sat Jul 12 18:50:25 2014 UTC (9 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored)

add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.

Revision 1.46 / (download) - annotate - [select for diffs], Fri Jun 17 00:00:51 2011 UTC (12 years, 11 months ago) by matthew
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.45: +16 -48 lines
Diff to previous 1.45 (colored)

Update ch(4) to use ISO C style function definitions to avoid
confusing Coccinelle.

No binary change.
ok dlg@

Revision 1.45 / (download) - annotate - [select for diffs], Thu Mar 31 18:42:48 2011 UTC (13 years, 2 months ago) by jasper
Branch: MAIN
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored)

- use nitems(); no binary change.

ok krw@

Revision 1.44 / (download) - annotate - [select for diffs], Thu Mar 17 21:30:24 2011 UTC (13 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.43: +15 -13 lines
Diff to previous 1.43 (colored)

use dma_alloc/dma_free instead of malloc to allocate buffers which need
to be in the right address space.
help from matthew and krw

Revision 1.43 / (download) - annotate - [select for diffs], Mon Aug 30 02:47:56 2010 UTC (13 years, 9 months ago) by matthew
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.42: +5 -5 lines
Diff to previous 1.42 (colored)

Avoid possible aliasing-related compiler issues by always writing to
cmd->opcode through the type casted command pointer rather than
through xs->cmd->opcode.

Requested by deraadt@; ok krw@.

Revision 1.42 / (download) - annotate - [select for diffs], Thu Jul 22 15:59:47 2010 UTC (13 years, 10 months ago) by matthew
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.41: +4 -1 lines
Diff to previous 1.41 (colored)

Fix a few more scsi_scsi_cmd() removal regressions, caught by
-Wuninitialized.

Silly typo in my first diff noticed by oga@ and krw@; ok krw@

Revision 1.41 / (download) - annotate - [select for diffs], Thu Jul 22 00:31:06 2010 UTC (13 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.40: +81 -52 lines
Diff to previous 1.40 (colored)

Eliminate scsi_scsi_cmd() now that ss(4) is gone and with it the
last bastardized sync and buf call through scsi_scsi_cmd(). Flatten
code to call scsi_xs_sync() directly for all commands.

Airplane typos shaken out by various.

ok dlg@ matthew@ deraadt@

Revision 1.40 / (download) - annotate - [select for diffs], Thu Jul 1 05:11:18 2010 UTC (13 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.39: +5 -13 lines
Diff to previous 1.39 (colored)

Die struct scsi_device! Die! Instead, save a pointer to the routine
to interpret sense errors. This is initialized to the basic
interpretation routine, and specific scsi drivers (sd/st/cd) can
replace this with their own. While here kill EJUSTRETURN dance and
make more specialized interpretation routines directly call the
basic routine if desired.

Fixes by matthew@ to my first diff. Most original work by dlg@.

ok matthew@ marco@ dlg@

Revision 1.39 / (download) - annotate - [select for diffs], Sat Jun 26 23:24:45 2010 UTC (13 years, 11 months ago) by guenther
Branch: MAIN
Changes since 1.38: +1 -2 lines
Diff to previous 1.38 (colored)

Don't #include <sys/user.h> into files that don't need the stuff
it defines.  In some cases, this means pulling in uvm.h or pcb.h
instead, but most of the inclusions were just noise.  Tested on
alpha, amd64, armish, hppa, i386, macpcc, sgi, sparc64, and vax,
mostly by krw and naddy.
ok krw@

Revision 1.38 / (download) - annotate - [select for diffs], Tue Jun 15 04:11:34 2010 UTC (13 years, 11 months ago) by dlg
Branch: MAIN
Changes since 1.37: +2 -3 lines
Diff to previous 1.37 (colored)

dont pass the dev_t from the scsi device drivers into the midlayer for
ioctl requests, and dont pass the proc pointers around for any ioctl
requests in scsi land at all. neither were used, so trim the fat.

ok krw@ marco@

Revision 1.37 / (download) - annotate - [select for diffs], Sat Jan 10 21:36:49 2009 UTC (15 years, 5 months ago) by beck
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.36: +10 -14 lines
Diff to previous 1.36 (colored)

Get rid of eye-bleeding horror of casting pointers to u_long to add
a size to them, because the original author of this stuff obviously
didn't grok pointer arithmatic.
ok krw@, tedu@, marco@, kettenis@

Revision 1.36 / (download) - annotate - [select for diffs], Sat Jan 10 00:15:54 2009 UTC (15 years, 5 months ago) by jsg
Branch: MAIN
Changes since 1.35: +3 -2 lines
Diff to previous 1.35 (colored)

Don't try to cast an lvalue which is forbidden and something pcc, lint,
and newer versions of gcc all object to.

ok miod@ krw@ beck@

Revision 1.35 / (download) - annotate - [select for diffs], Sun Jun 22 16:32:05 2008 UTC (15 years, 11 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.34: +3 -2 lines
Diff to previous 1.34 (colored)

Replace MUSTEK_RETRIES, SCANJET_RETRIES and ST_RETRIES with SCSI_RETRIES,
all defined to 4. Replace some magic number 4's with SCSI_RETRIES. Fix a
few lines that were now too long.

Revision 1.34 / (download) - annotate - [select for diffs], Sun Sep 16 01:30:24 2007 UTC (16 years, 8 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored)

MALLOC/FREE -> malloc/free, M_ZERO, extraneous casts,
extraneous #include <malloc.h>

Revision 1.33 / (download) - annotate - [select for diffs], Fri Sep 7 16:15:49 2007 UTC (16 years, 9 months ago) by krw
Branch: MAIN
Changes since 1.32: +2 -3 lines
Diff to previous 1.32 (colored)

The obvious bzero/memset -> M_ZERO changes.

Revision 1.32 / (download) - annotate - [select for diffs], Tue Nov 28 16:56:50 2006 UTC (17 years, 6 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)

rename scsibus_attach_args to scsi_attach_args. this can help avoid
confusing when trying to attach scsibus to a hba, since it is really meant
for attaching scsi devices to scsibus.

ok deraadt@ marco@

Revision 1.31 / (download) - annotate - [select for diffs], Mon Nov 27 23:14:22 2006 UTC (17 years, 6 months ago) by beck
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

more magic removal
ok miod@, deraadt@

Revision 1.30 / (download) - annotate - [select for diffs], Mon Nov 27 18:24:43 2006 UTC (17 years, 6 months ago) by beck
Branch: MAIN
Changes since 1.29: +8 -15 lines
Diff to previous 1.29 (colored)

rework asc/ascq handling to get rid of "magic" 0x values in the code, changes
asc/ascq handling to deal with the pair together rather than seperately, since
modern scsi has long since polluted the "categories" of asc enough that you
pretty much need to always look as ascq.

ok krw@ deraadt@, dlg@

Revision 1.29 / (download) - annotate - [select for diffs], Sat Oct 7 23:40:07 2006 UTC (17 years, 8 months ago) by beck
Branch: MAIN
Changes since 1.28: +2 -3 lines
Diff to previous 1.28 (colored)

make cd-roms retry forever while the device indicates that it is
"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@

Revision 1.28 / (download) - annotate - [select for diffs], Thu Jun 15 15:02:31 2006 UTC (18 years ago) by beck
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.27: +11 -8 lines
Diff to previous 1.27 (colored)

	Quell dmesg spewage from ch(4) - this diff moves much of the
diagnostic type printf spew that is useful into #ifdef CHANGER_DEBUG,
removes some that is pretty much useless, and changes one instance
of using kernel printf to indicate the truncation of a result due to the
provided buffer being too small into a return of EINVAL back to the caller.

tested by me and mbalmer@
ok krw@ mbalmer@

Revision 1.27 / (download) - annotate - [select for diffs], Wed May 31 03:38:01 2006 UTC (18 years ago) by deraadt
Branch: MAIN
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

fix tree

Revision 1.26 / (download) - annotate - [select for diffs], Wed May 31 03:01:44 2006 UTC (18 years ago) by beck
Branch: MAIN
Changes since 1.25: +74 -22 lines
Diff to previous 1.25 (colored)


	Add support for primary and alternate volume tags to ch(4) - borrowed
and adapted from FreeBSD. This adds the ability for status requests to ask
for the volume tags (usually bar codes, on changers with a bar code reader)
on media inthe library.

ok deraadt@, krw@

Revision 1.25 / (download) - annotate - [select for diffs], Sun May 28 17:24:43 2006 UTC (18 years ago) by beck
Branch: MAIN
Changes since 1.24: +73 -11 lines
Diff to previous 1.24 (colored)


Fix open(2) semantics for ch(4) to not be completely on fresh minty crack:

1) Don't use SCSI_IGNORE_NOT_READY when doing test_unit ready to wait for
the device to come up.

2) use SCSI_IGNORE_ILLEGAL_REQUEST when doing test_unit_ready to wait for
the device to come up (just as is done in st(4))

3) add a ch_interpret_sense routing to perform special handling of
the case where the unit is in the process of becoming ready. Hope springs
eternal, that if the device tells us it is trying to become ready, then
we should wait for it to do so, however long it takes (and on tape library
scans this can take a while - i.e. a few minutes for large libraries).
The custom handler ensures that the retry count is not decremented in
this case and this case only.

ok krw@

Revision 1.24 / (download) - annotate - [select for diffs], Thu May 11 00:45:59 2006 UTC (18 years, 1 month ago) by krw
Branch: MAIN
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

Zap trailing whitespace.

Revision 1.23 / (download) - annotate - [select for diffs], Sun Sep 11 17:34:27 2005 UTC (18 years, 9 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

Simplify code by changing struct scsi_mode_sense_buf{ union {}
headers; } to just union scsi_mode_sense_buf {}. No functional change.

ok marco@

Revision 1.22 / (download) - annotate - [select for diffs], Tue Aug 23 23:38:00 2005 UTC (18 years, 9 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.21: +12 -5 lines
Diff to previous 1.21 (colored)

Move uses of struct scsi_mode_sense_buf (255 bytes each) from the
stack into malloc'd memory.

ok deraadt@

Revision 1.21 / (download) - annotate - [select for diffs], Sat Aug 13 17:56:34 2005 UTC (18 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.20: +25 -28 lines
Diff to previous 1.20 (colored)

Use scsi_do_mode_sense(). Testing on beck@'s new LTO changer.

ok tdeval@ deraadt@

Revision 1.20 / (download) - annotate - [select for diffs], Mon May 23 07:06:16 2005 UTC (19 years ago) by krw
Branch: MAIN
Changes since 1.19: +1 -3 lines
Diff to previous 1.19 (colored)

Don't bzero() data before calling scsi_mode_sense[_big]() since
scsi_mode_sense[_big] bzero()'s it.

Revision 1.19 / (download) - annotate - [select for diffs], Sat May 14 00:20:43 2005 UTC (19 years, 1 month ago) by krw
Branch: MAIN
Changes since 1.18: +7 -3 lines
Diff to previous 1.18 (colored)

Add scsi_mode_[sense|select]_big() and use it instead of
atapi_mode_[sense|select](). This will allow the removal of
atapi_base.c and atapi_all.h files, and sets the stage for better usb
mode sense handling amoung other things.

Remove cd_scsibus_[get|set]_mode() and
sd_scsibus_mode_sense() shims in favour of scsi_mode_[sense|select]().
Add zero'ing of reserved length field in scsi_mode_select(). Change
some uchar * type parameters to scsi_mode_header *.

No functional changes. Mostly from NetBSD.

ok dlg@.

Revision 1.18 / (download) - annotate - [select for diffs], Tue Apr 5 12:13:16 2005 UTC (19 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.17: +9 -24 lines
Diff to previous 1.17 (colored)

Factor out scsi_mode_sense() and scsi_mode_select() like NetBSD does.
Eliminate some duplicate structures and defines along the way. SCSI CD
drives will now pay attention to the 'flags' parameter for MODE SENSE
and MODE SELECT commands. No other functional change.

ok tdeval@

Revision 1.17 / (download) - annotate - [select for diffs], Tue Nov 30 19:28:36 2004 UTC (19 years, 6 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

No longer require write permission for read-only SCSI commands
submitted via ioctl. Eliminate scsi_do_safeioctl(), thus permitting
ch, ss and st devices to submit SCSI commands. Return EPERM rather
than EBADF when permissions are inadequate.

Allows more programs to run with fewer permissions. Problem diagnosed
by Nikolay Sturm in mplayer port.

Tested by Nikolay, ok deraadt@.

Revision 1.8.10.6 / (download) - annotate - [select for diffs], Sat Jun 7 11:07:44 2003 UTC (21 years ago) by ho
Branch: SMP
Changes since 1.8.10.5: +5 -5 lines
Diff to previous 1.8.10.5 (colored) to branchpoint 1.8 (colored) next main 1.9 (colored)

Sync SMP branch to -current

Revision 1.11.4.3 / (download) - annotate - [select for diffs], Mon May 19 22:28:21 2003 UTC (21 years ago) by tedu
Branch: UBC
Changes since 1.11.4.2: +2 -11 lines
Diff to previous 1.11.4.2 (colored) to branchpoint 1.11 (colored) next main 1.12 (colored)

sync

Revision 1.16 / (download) - annotate - [select for diffs], Sun May 18 16:06:35 2003 UTC (21 years ago) by mickey
Branch: MAIN
CVS Tags: SMP_SYNC_B, SMP_SYNC_A, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.15: +5 -5 lines
Diff to previous 1.15 (colored)

constify the quirck tables and fix the scsi_inqmatch() proto accordingly; krw@ ok

Revision 1.8.10.5 / (download) - annotate - [select for diffs], Tue May 13 19:36:57 2003 UTC (21 years, 1 month ago) by ho
Branch: SMP
Changes since 1.8.10.4: +1 -11 lines
Diff to previous 1.8.10.4 (colored) to branchpoint 1.8 (colored)

Sync the SMP branch to -current. This includes moving to ELF.

Revision 1.15 / (download) - annotate - [select for diffs], Fri Mar 28 11:42:28 2003 UTC (21 years, 2 months ago) by mickey
Branch: MAIN
CVS Tags: UBC_SYNC_A
Changes since 1.14: +1 -11 lines
Diff to previous 1.14 (colored)

OCHIO* dies horrible death by dd; as per renaming done before

Revision 1.8.10.4 / (download) - annotate - [select for diffs], Fri Mar 28 00:08:47 2003 UTC (21 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.8.10.3: +11 -0 lines
Diff to previous 1.8.10.3 (colored) to branchpoint 1.8 (colored)

Sync the SMP branch with 3.3

Revision 1.14 / (download) - annotate - [select for diffs], Mon Dec 30 21:50:28 2002 UTC (21 years, 5 months ago) by grange
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.13: +2 -1 lines
Diff to previous 1.13 (colored)

Add new parameter to scsi_test_unit_ready(): retries number.
Use increased retries number and don't ignore SCSI_IGNORE_NOT_READY
when call scsi_test_unit_ready() for cd-rom, this makes system wait
if drive is loading media.
Tested by millert@ and fgsch@; some input and ok from krw@.
Problem reported by The lord of the CD-writers
Igor Grabin <violent@death.kiev.ua>.

Revision 1.11.4.2 / (download) - annotate - [select for diffs], Tue Oct 29 00:36:49 2002 UTC (21 years, 7 months ago) by art
Branch: UBC
Changes since 1.11.4.1: +11 -1 lines
Diff to previous 1.11.4.1 (colored) to branchpoint 1.11 (colored)

sync to -current

Revision 1.13 / (download) - annotate - [select for diffs], Thu Oct 17 17:47:24 2002 UTC (21 years, 7 months ago) by mickey
Branch: MAIN
CVS Tags: UBC_SYNC_B
Changes since 1.12: +11 -1 lines
Diff to previous 1.12 (colored)

renumber the CHIO* since they clash w/ the CDIO, keep the old ones as OCHIO, EOL set to post 3.3

Revision 1.11.4.1 / (download) - annotate - [select for diffs], Tue Jun 11 03:32:13 2002 UTC (22 years ago) by art
Branch: UBC
Changes since 1.11: +10 -10 lines
Diff to previous 1.11 (colored)

Sync UBC branch to -current

Revision 1.8.10.3 / (download) - annotate - [select for diffs], Thu Mar 28 14:52:01 2002 UTC (22 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.8.10.2: +10 -10 lines
Diff to previous 1.8.10.2 (colored) to branchpoint 1.8 (colored)

Merge in -current from roughly a week ago

Revision 1.12 / (download) - annotate - [select for diffs], Thu Mar 14 01:27:13 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.11: +10 -10 lines
Diff to previous 1.11 (colored)

First round of __P removal in sys

Revision 1.8.10.2 / (download) - annotate - [select for diffs], Wed Jul 4 11:00:01 2001 UTC (22 years, 11 months ago) by niklas
Branch: SMP
Changes since 1.8.10.1: +4 -4 lines
Diff to previous 1.8.10.1 (colored) to branchpoint 1.8 (colored)

Merge in -current from two days ago in the SMP branch.
As usual with merges, they do not indicate progress, so do not hold
your breath for working SMP, and do not mail me and ask about the
state of it.  It has not changed.  There is work ongoing, but very, very
slowly.  The commit is done in parts as to not lock up the tree in too
big chunks at a time.

Revision 1.11 / (download) - annotate - [select for diffs], Fri Jun 22 14:35:42 2001 UTC (22 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: UBC_BASE, OPENBSD_3_0_BASE, OPENBSD_3_0
Branch point for: UBC
Changes since 1.10: +4 -4 lines
Diff to previous 1.10 (colored)

KNF

Revision 1.8.10.1 / (download) - annotate - [select for diffs], Mon May 14 22:44:59 2001 UTC (23 years, 1 month ago) by niklas
Branch: SMP
Changes since 1.8: +43 -45 lines
Diff to previous 1.8 (colored)

merge in approximately 2.9 into SMP branch

Revision 1.10 / (download) - annotate - [select for diffs], Thu Mar 15 20:08:43 2001 UTC (23 years, 3 months ago) by mjacob
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.9: +43 -45 lines
Diff to previous 1.9 (colored)

Move status reads to chopen- there's no need to hang up the boot
process finding out the changer parameters.

Print out changer parameters only if they're changed from the last
read of changer parameters. This works for the first time, and for
99.9% of all other cases will be silent ever after. The only time
this will then be chatty afterwards is if you change something
within the changer (add a drive, etc.).

Revision 1.9 / (download) - annotate - [select for diffs], Sat Apr 8 19:19:33 2000 UTC (24 years, 2 months ago) by csapuntz
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)



These days, attach can occur outside the tsleep-restricted world of
BSD autoconf.

Don't use POLL & NOSLEEP mode if attaching after autoconf

Revision 1.8 / (download) - annotate - [select for diffs], Sun Mar 22 20:19:59 1998 UTC (26 years, 2 months ago) by tholo
Branch: MAIN
CVS Tags: kame_19991208, SMP_BASE, OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3
Branch point for: SMP
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

Tell the SCSI driver that we expect data in from the changer device when we
request status; makes it work properly on NCR controllers (and probably on
some others as well).

Revision 1.7 / (download) - annotate - [select for diffs], Mon Apr 14 04:09:05 1997 UTC (27 years, 2 months ago) by downsj
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2, OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.6: +81 -14 lines
Diff to previous 1.6 (colored)

Merge in various pieces of current NetBSD scsi code, including but not limited
to:

* New changer driver.
* Better optical support.
* Different `done' semantics.
* New quirks for SCSI QIC tape driver, SCSI floppy drives.
* Better support for SCSI-I devices.

Everybody needs to test this.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Aug 12 10:21:41 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.5: +2 -1 lines
Diff to previous 1.5 (colored)

safe ioctl only

Revision 1.5 / (download) - annotate - [select for diffs], Thu May 2 13:17:50 1996 UTC (28 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.4: +16 -11 lines
Diff to previous 1.4 (colored)

no sys/cpu.h, fix bugs in ch

Revision 1.4 / (download) - annotate - [select for diffs], Sun Apr 21 22:30:45 1996 UTC (28 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.3: +495 -338 lines
Diff to previous 1.3 (colored)

partial sync with netbsd 960418, more to come

Revision 1.3 / (download) - annotate - [select for diffs], Fri Apr 19 16:10:12 1996 UTC (28 years, 1 month ago) by niklas
Branch: MAIN
Changes since 1.2: +6 -3 lines
Diff to previous 1.2 (colored)

NetBSD 960317 merge

Revision 1.2 / (download) - annotate - [select for diffs], Tue Feb 20 01:42:01 1996 UTC (28 years, 3 months ago) by briggs
Branch: MAIN
Changes since 1.1: +25 -14 lines
Diff to previous 1.1 (colored)

Sync w/ NetBSD: scsi prototypes.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:53:24 1995 UTC (28 years, 8 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:53:24 1995 UTC (28 years, 8 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.