Home | History | Annotate | Download | only in mscp
History log of /src/sys/dev/mscp/mscp_tape.c
RevisionDateAuthorComments
 1.44  11-Jan-2024  mrg mscp(4): add ability for rronline() callback in a workqueue

when an ra(4) disk comes online the hardware interrupt ends up calling
disk_set_info(), which triggers a sleep lock/alloc in this path which
is triggered by LOCKDEBUG.

piggy-back on the existing workqueue for autoconfiguration to handle
this path and run the online completion in the work queue.

this is a little ugly, in that it puts two different types of work
into the one queue, but seems less ugly than creating a second
workqueue for what is likely another one-time event (infact, the other
user may be better handled via config_defer() -- i did not look too
closely.)

with this, LOCKDEBUG kernels work.

tested in simh.
 1.43  25-Jul-2014  dholland Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.42  25-Jul-2014  dholland Add d_discard to all struct bdevsw instances I could find.

I've set them all to nodiscard. Some of them (wd, dk, vnd, ld,
raidframe, maybe cgd) should be implemented for real.
 1.41  16-Mar-2014  dholland branches: 1.41.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.40  25-Oct-2013  martin Eliminate unused variables
 1.39  27-Oct-2012  chs branches: 1.39.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.38  12-May-2009  cegger branches: 1.38.12; 1.38.22;
struct device * -> device_t, no functional changes intended.
 1.37  12-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.36  14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.35  14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.34  11-Jun-2008  drochner branches: 1.34.4; 1.34.10;
use device_lookup_private() to get the softc -- while device/softc
are not split yet, it is better than a typecast
 1.33  08-Apr-2008  cegger branches: 1.33.2; 1.33.4; 1.33.6; 1.33.8;
use aprint_*_dev and device_xname
 1.32  19-Oct-2007  ad branches: 1.32.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.31  29-Jul-2007  ad branches: 1.31.4; 1.31.6; 1.31.10; 1.31.12;
It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
 1.30  04-Mar-2007  christos branches: 1.30.2; 1.30.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.29  29-Mar-2006  thorpej branches: 1.29.14;
Use device_private().
 1.28  25-Mar-2006  thorpej Use device_parent().
 1.27  07-Mar-2006  matt branches: 1.27.2; 1.27.4;
Don't cast lvalue. remove uninitialized reference.
 1.26  11-Dec-2005  christos branches: 1.26.4; 1.26.6; 1.26.8;
merge ktrace-lwp.
 1.25  27-Jun-2005  ragge branches: 1.25.2;
Fixes due to cast-qual addition.
 1.24  27-Feb-2005  perry nuke trailing whitespace
 1.23  04-Feb-2005  perry de-__P
 1.22  31-Oct-2004  he branches: 1.22.4; 1.22.6;
Include the <sys/bufq.h> header to allow these to compile again.
 1.21  23-Oct-2002  jdolecek branches: 1.21.6;
merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.20  02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.19  30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.18  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.17  06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.16  13-Nov-2001  lukem branches: 1.16.8;
add RCSID
 1.15  30-Mar-2000  augustss branches: 1.15.6; 1.15.8; 1.15.10;
Remove register declarations.
 1.14  06-Jun-1999  ragge branches: 1.14.2; 1.14.4;
Bus'ify the mscp code also.
 1.13  29-May-1999  ragge Copied from ../../arch/vax/mscp/mscp_tape.c,v
 1.12  09-Dec-1998  ragge Fix deadlock bug. Pointed out by maximum entropy.
 1.11  05-Nov-1998  ragge EGCS fixes + TU81 fix.
 1.10  21-May-1998  ragge Small Wall fixes.
 1.9  08-Feb-1998  ragge Split out MSCP floppies as a separate device (rx) instead of handling
them as disk drives. It is now also allowed to change floppies without
the system complaining :-)
 1.8  24-Jan-1998  ragge Remove __BROKEN_INDIRECT_CONFIG and change all drivers to use
config_search instead.
 1.7  12-Jan-1998  thorpej Update for changes to config.
 1.6  17-Jul-1997  jtk use locator defines in "locators.h" to index cf_loc[]
 1.5  04-Jul-1997  ragge Bugfix to mscp tape code; so that weof/eot works correctly.
 1.4  11-Jan-1997  ragge Many minor bug fixes; mscp subsystem seems to work rather stable now.
 1.3  13-Oct-1996  christos backout previous kprintf change
 1.2  11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.1  10-Jul-1996  ragge Add support for tape drives. More extensive error checking.
 1.14.4.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.14.2.1  21-Jun-1999  thorpej Sync w/ -current.
 1.15.10.1  10-Oct-2001  fvdl Convert all remaining devices.
 1.15.8.2  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.15.8.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.15.6.4  11-Nov-2002  nathanw Catch up to -current
 1.15.6.3  18-Oct-2002  nathanw Catch up to -current.
 1.15.6.2  17-Sep-2002  nathanw Catch up to -current.
 1.15.6.1  14-Nov-2001  nathanw Catch up to -current.
 1.16.8.2  08-Jun-2002  gehenna fix wrong # of arguments.
fix typo
 1.16.8.1  16-May-2002  gehenna Add the block/character device switches.
Fix type of arguments.
 1.21.6.7  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.21.6.6  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.21.6.5  04-Feb-2005  skrll Sync with HEAD.
 1.21.6.4  02-Nov-2004  skrll Sync with HEAD.
 1.21.6.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.21.6.2  18-Sep-2004  skrll Sync with HEAD.
 1.21.6.1  12-Aug-2004  skrll Adapt to new world order.

Vax GENERIC compiles.
 1.22.6.2  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.22.6.1  12-Feb-2005  yamt sync with head.
 1.22.4.1  29-Apr-2005  kent sync with -current
 1.25.2.3  27-Oct-2007  yamt sync with head.
 1.25.2.2  03-Sep-2007  yamt sync with head.
 1.25.2.1  21-Jun-2006  yamt sync with head.
 1.26.8.2  01-Apr-2006  yamt sync with head.
 1.26.8.1  13-Mar-2006  yamt sync with head.
 1.26.6.1  22-Apr-2006  simonb Sync with head.
 1.26.4.1  09-Sep-2006  rpaulo sync with head
 1.27.4.2  31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.27.4.1  28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.27.2.2  19-Apr-2006  elad sync with head.
 1.27.2.1  07-Mar-2006  elad file mscp_tape.c was added on branch elad-kernelauth on 2006-04-19 03:25:24 +0000
 1.29.14.1  12-Mar-2007  rmind Sync with HEAD.
 1.30.10.1  15-Aug-2007  skrll Sync with HEAD.
 1.30.2.2  23-Oct-2007  ad Sync with head.
 1.30.2.1  19-Aug-2007  ad - Back out the biodone() changes.
- Eliminate B_ERROR (from HEAD).
 1.31.12.2  29-Jul-2007  ad It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
 1.31.12.1  29-Jul-2007  ad file mscp_tape.c was added on branch matt-mips64 on 2007-07-29 12:15:44 +0000
 1.31.10.1  25-Oct-2007  bouyer Sync with HEAD.
 1.31.6.1  06-Nov-2007  matt sync with HEAD
 1.31.4.1  26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.32.16.2  29-Jun-2008  mjf Sync with HEAD.
 1.32.16.1  02-Jun-2008  mjf Sync with HEAD.
 1.33.8.1  18-Jun-2008  simonb Sync with head.
 1.33.6.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.33.4.2  16-May-2009  yamt sync with head
 1.33.4.1  04-May-2009  yamt sync with head.
 1.33.2.1  17-Jun-2008  yamt sync with head.
 1.34.10.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.34.4.1  28-Apr-2009  skrll Sync with HEAD.
 1.38.22.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.38.22.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.38.12.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.38.12.1  30-Oct-2012  yamt sync with head
 1.39.2.1  18-May-2014  rmind sync with head
 1.41.2.1  10-Aug-2014  tls Rebase.

RSS XML Feed