Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.
This commit is contained in:
parent
b6e07e719a
commit
65d06f3f0e
@ -1,4 +1,4 @@
|
||||
# $NetBSD: mi,v 1.2252 2019/01/24 21:51:15 mrg Exp $
|
||||
# $NetBSD: mi,v 1.2253 2019/01/27 08:53:28 maxv Exp $
|
||||
#
|
||||
# Note: don't delete entries from here - mark them as "obsolete" instead.
|
||||
./etc/mtree/set.comp comp-sys-root
|
||||
@ -583,7 +583,7 @@
|
||||
./usr/include/dev/isa/pcppireg.h comp-obsolete obsolete
|
||||
./usr/include/dev/isa/pcppivar.h comp-obsolete obsolete
|
||||
./usr/include/dev/isa/pssreg.h comp-obsolete obsolete
|
||||
./usr/include/dev/isa/satlinkio.h comp-c-include
|
||||
./usr/include/dev/isa/satlinkio.h comp-obsolete obsolete
|
||||
./usr/include/dev/isa/satlinkreg.h comp-obsolete obsolete
|
||||
./usr/include/dev/isa/sbdspvar.h comp-obsolete obsolete
|
||||
./usr/include/dev/isa/sbreg.h comp-obsolete obsolete
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh -
|
||||
# $NetBSD: MAKEDEV.tmpl,v 1.196 2018/11/07 07:43:07 maxv Exp $
|
||||
# $NetBSD: MAKEDEV.tmpl,v 1.197 2019/01/27 08:53:28 maxv Exp $
|
||||
#
|
||||
# Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
@ -268,7 +268,6 @@
|
||||
# radio* radio devices
|
||||
# random Random number generator
|
||||
# rtc* RealTimeClock
|
||||
# satlink* PlanetConnect satellite receiver driver
|
||||
# scsibus* SCSI busses
|
||||
# se* SCSI Ethernet
|
||||
# ses* SES/SAF-TE SCSI Devices
|
||||
@ -1601,11 +1600,6 @@ apm)
|
||||
mkdev apmctl c %apmdev_chr% 8 644
|
||||
;;
|
||||
|
||||
satlink[0-9]*)
|
||||
unit=${i#satlink}
|
||||
mkdev satlink$unit c %satlink_chr% $unit 444
|
||||
;;
|
||||
|
||||
random)
|
||||
mkdev random c %rnd_chr% 0 444
|
||||
mkdev urandom c %rnd_chr% 1 644
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: MAKEDEV.conf,v 1.6 2018/09/23 09:20:57 maxv Exp $
|
||||
# $NetBSD: MAKEDEV.conf,v 1.7 2019/01/27 08:53:28 maxv Exp $
|
||||
|
||||
all_md)
|
||||
makedev wscons sd0 sd1 sd2 sd3 sd4
|
||||
@ -7,7 +7,7 @@ all_md)
|
||||
makedev ld0 ld1 ld2 ld3
|
||||
makedev ttyC0 ttyC1
|
||||
makedev lpa0 lpt0 audio speaker wd0 wd1 fd0 fd1
|
||||
makedev satlink0 speaker mlx0
|
||||
makedev speaker mlx0
|
||||
makedev scsibus0 scsibus1 scsibus2 scsibus3
|
||||
makedev ses0 ses1 ses2 ses3
|
||||
makedev usbs
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: MAKEDEV.conf,v 1.12 2018/09/23 09:20:57 maxv Exp $
|
||||
# $NetBSD: MAKEDEV.conf,v 1.13 2019/01/27 08:53:28 maxv Exp $
|
||||
|
||||
all_md)
|
||||
makedev wscons stic0 sd0 sd1 sd2 sd3 sd4
|
||||
@ -7,7 +7,7 @@ all_md)
|
||||
makedev ld0 ld1 ld2 ld3
|
||||
makedev ttyB0 ttyB1 ttyC0 ttyC1
|
||||
makedev lpa0 lpt0 audio wd0 wd1 fd0 fd1
|
||||
makedev satlink0 speaker mlx0
|
||||
makedev speaker mlx0
|
||||
makedev scsibus0 scsibus1 scsibus2 scsibus3
|
||||
makedev ses0 ses1 ses2 ses3
|
||||
makedev sysmon
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: MAKEDEV.conf,v 1.26 2018/12/23 12:18:30 maxv Exp $
|
||||
# $NetBSD: MAKEDEV.conf,v 1.27 2019/01/27 08:53:28 maxv Exp $
|
||||
|
||||
# As of 2003-04-17, the "init" case must not create more than 890 entries.
|
||||
all_md)
|
||||
@ -26,7 +26,6 @@ all_md)
|
||||
makedev lpt0 lpt1 lpt2
|
||||
makedev ss0 uk0 uk1
|
||||
makedev speaker joy0 joy1
|
||||
makedev satlink0
|
||||
makedev audio
|
||||
makedev radio
|
||||
makedev music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: MAKEDEV.conf,v 1.9 2018/09/23 09:20:58 maxv Exp $
|
||||
# $NetBSD: MAKEDEV.conf,v 1.10 2019/01/27 08:53:28 maxv Exp $
|
||||
|
||||
all_md)
|
||||
makedev wt0 fd0 fd1 wd0 wd1 wd2 wd3 sd0 sd1 sd2 sd3 sd4
|
||||
@ -6,7 +6,7 @@ all_md)
|
||||
makedev st0 st1 ch0 cd0 cd1 lpa0 lpa1 lpa2
|
||||
makedev lpt0 lpt1 lpt2 ttyv0 tun0 tun1
|
||||
makedev ss0 ch0 uk0 uk1 ttyCY0
|
||||
makedev speaker audio joy0 joy1 satlink0
|
||||
makedev speaker audio joy0 joy1
|
||||
makedev ttyv0 wscons
|
||||
makedev scsibus0 scsibus1 scsibus2 scsibus3
|
||||
makedev ses0 ses1 ses2 ses3
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: MAKEDEV.conf,v 1.9 2018/09/23 09:20:58 maxv Exp $
|
||||
# $NetBSD: MAKEDEV.conf,v 1.10 2019/01/27 08:53:29 maxv Exp $
|
||||
|
||||
# When creating a /dev file system on MFS, init makes a FS that leaves
|
||||
# only 890 (or so) inodes free. Therefore the "init" case (used by
|
||||
@ -25,7 +25,7 @@ all_md)
|
||||
makedev ld0 ld1 ld2 ld3
|
||||
makedev tty00 tty01
|
||||
makedev lpa0 lpt0 audio wd0 wd1 wd2 wd3 fd0 fd1
|
||||
makedev satlink0 speaker mlx0
|
||||
makedev speaker mlx0
|
||||
makedev scsibus0 scsibus1 scsibus2 scsibus3
|
||||
makedev ses0 ses1 ses2 ses3
|
||||
makedev usbs
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: MAKEDEV.conf,v 1.28 2018/11/27 14:55:56 msaitoh Exp $
|
||||
# $NetBSD: MAKEDEV.conf,v 1.29 2019/01/27 08:53:29 maxv Exp $
|
||||
|
||||
# As of 2005-03-15, the "init" case must not create more than 1024 entries.
|
||||
all_md)
|
||||
@ -27,7 +27,7 @@ all_md)
|
||||
makedev lpt0 lpt1 lpt2
|
||||
makedev ss0 uk0 uk1
|
||||
makedev speaker joy0 joy1
|
||||
makedev apm satlink0
|
||||
makedev apm
|
||||
makedev cmos
|
||||
makedev audio
|
||||
makedev radio
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: MAKEDEV.conf,v 1.2 2018/09/23 09:20:59 maxv Exp $
|
||||
# $NetBSD: MAKEDEV.conf,v 1.3 2019/01/27 08:53:29 maxv Exp $
|
||||
|
||||
# As of 2005-03-15, the "init" case must not create more than 1024 entries.
|
||||
all_md)
|
||||
@ -23,7 +23,7 @@ all_md)
|
||||
makedev lpt0 lpt1 lpt2
|
||||
makedev ss0 uk0 uk1
|
||||
makedev speaker joy0 joy1
|
||||
makedev apm satlink0
|
||||
makedev apm
|
||||
makedev cmos
|
||||
makedev audio
|
||||
makedev radio
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: MAKEDEV.conf,v 1.10 2018/09/23 09:20:59 maxv Exp $
|
||||
# $NetBSD: MAKEDEV.conf,v 1.11 2019/01/27 08:53:29 maxv Exp $
|
||||
|
||||
all_md)
|
||||
makedev wscons sd0 sd1 sd2 st0 st1 cd0 cd1 wd0 wd1 fd0 fd1
|
||||
@ -13,7 +13,7 @@ all_md)
|
||||
makedev pci0 pci1 pci2 pci3 pci4 pci5 pci6 pci7
|
||||
makedev altq sysmon bktr radio kttcp
|
||||
makedev lpt0 lpt1 lpt2 tun0 tun1
|
||||
makedev speaker joy0 joy1 satlink0
|
||||
makedev speaker joy0 joy1
|
||||
makedev xlcom0
|
||||
makedev cfs
|
||||
;;
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: MAKEDEV.conf,v 1.5 2018/09/23 09:21:00 maxv Exp $
|
||||
# $NetBSD: MAKEDEV.conf,v 1.6 2019/01/27 08:53:29 maxv Exp $
|
||||
|
||||
# When creating a /dev file system on MFS, init makes a FS that leaves
|
||||
# only 890 (or so) inodes free. Therefore the "init" case (used by
|
||||
@ -23,7 +23,7 @@ all_md)
|
||||
makedev ss0 ss1 uk0 uk1
|
||||
makedev ld0 ld1 ld2 ld3
|
||||
makedev tty00 tty01
|
||||
makedev satlink0 mlx0
|
||||
makedev mlx0
|
||||
makedev scsibus0 scsibus1 scsibus2 scsibus3
|
||||
makedev usbs
|
||||
makedev ttyCZ0 ttyCY0
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: ioctl.9,v 1.33 2018/09/23 09:21:00 maxv Exp $
|
||||
.\" $NetBSD: ioctl.9,v 1.34 2019/01/27 08:53:29 maxv Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -27,7 +27,7 @@
|
||||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
.\" POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd September 23, 2018
|
||||
.Dd January 27, 2019
|
||||
.Dt IOCTL 9
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -184,8 +184,6 @@ the routing subsystem
|
||||
.Xr rnd 4
|
||||
.It 's'
|
||||
the socket layer
|
||||
.It 's'
|
||||
satlink devices
|
||||
.It 'S'
|
||||
SCSI disks (arc, hp300, pmax)
|
||||
.It 'S'
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: majors.algor,v 1.24 2018/09/23 09:21:01 maxv Exp $
|
||||
# $NetBSD: majors.algor,v 1.25 2019/01/27 08:53:29 maxv Exp $
|
||||
#
|
||||
# Device majors for algor
|
||||
#
|
||||
@ -34,7 +34,6 @@ device-major fd char 34 block 0 fdc
|
||||
device-major ipl char 35 ipfilter
|
||||
device-major wd char 36 block 4 wd
|
||||
device-major se char 37 se
|
||||
device-major satlink char 38 satlink
|
||||
device-major rnd char 39 rnd
|
||||
|
||||
device-major scsibus char 42 scsibus
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: GENERIC,v 1.387 2019/01/27 02:08:37 pgoyette Exp $
|
||||
# $NetBSD: GENERIC,v 1.388 2019/01/27 08:53:29 maxv Exp $
|
||||
#
|
||||
# This machine description file is used to generate the default NetBSD
|
||||
# kernel.
|
||||
@ -19,7 +19,7 @@ include "arch/alpha/conf/std.alpha"
|
||||
|
||||
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
|
||||
|
||||
ident "GENERIC-$Revision: 1.387 $"
|
||||
ident "GENERIC-$Revision: 1.388 $"
|
||||
|
||||
maxusers 32
|
||||
|
||||
@ -457,7 +457,6 @@ uha* at isa? port 0x334 irq ? drq ? # UltraStor [13]4f SCSI (unt.)
|
||||
pcic0 at isa? port 0x3e0 iomem 0xd0000 iosiz 0x10000
|
||||
pcic1 at isa? port 0x3e2 iomem 0xcc000 iosiz 0x10000
|
||||
pcmcia* at pcic? controller ? socket ?
|
||||
#satlink0 at isa? port 0x300 drq 1 # PlanetConnect Satellite receiver.
|
||||
|
||||
# EISA devices
|
||||
ahb* at eisa? slot ? # Adaptec 174[024] SCSI (unt.)
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: majors.alpha,v 1.31 2018/09/23 09:21:01 maxv Exp $
|
||||
# $NetBSD: majors.alpha,v 1.32 2019/01/27 08:53:29 maxv Exp $
|
||||
#
|
||||
# Device majors for alpha
|
||||
#
|
||||
@ -35,7 +35,6 @@ device-major fd char 34 block 0 fdc
|
||||
device-major ipl char 35 ipfilter
|
||||
device-major wd char 36 block 4 wd
|
||||
device-major se char 37 se
|
||||
device-major satlink char 38 satlink
|
||||
device-major rnd char 39 rnd
|
||||
#device-major obsolete char 40 obsolete
|
||||
device-major scsibus char 42 scsibus
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: ALL,v 1.113 2018/12/29 11:30:11 maxv Exp $
|
||||
# $NetBSD: ALL,v 1.114 2019/01/27 08:53:29 maxv Exp $
|
||||
# From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
|
||||
#
|
||||
# ALL machine description file
|
||||
@ -17,7 +17,7 @@ include "arch/amd64/conf/std.amd64"
|
||||
|
||||
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
|
||||
|
||||
#ident "ALL-$Revision: 1.113 $"
|
||||
#ident "ALL-$Revision: 1.114 $"
|
||||
|
||||
maxusers 64 # estimated number of users
|
||||
|
||||
@ -1548,10 +1548,6 @@ joy* at eso? # ESS Solo-1 on-board joystick
|
||||
# ISA joysticks. Probe is a little strange; add only if you have one.
|
||||
joy0 at isa? port 0x201
|
||||
|
||||
|
||||
# Planetconnect Satellite receiver driver.
|
||||
satlink0 at isa? port 0x300 drq 1
|
||||
|
||||
# Middle Digital, Inc. PCI-Weasel serial console board control
|
||||
# devices (watchdog timer, etc.)
|
||||
weasel* at pci?
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: majors.amd64,v 1.29 2018/12/19 13:57:45 maxv Exp $
|
||||
# $NetBSD: majors.amd64,v 1.30 2019/01/27 08:53:29 maxv Exp $
|
||||
#
|
||||
# Device majors for amd64
|
||||
#
|
||||
@ -35,7 +35,6 @@ device-major tun char 40 tun
|
||||
device-major vnd char 41 block 14 vnd
|
||||
device-major audio char 42 audio
|
||||
device-major ipl char 44 ipfilter
|
||||
device-major satlink char 45 satlink
|
||||
device-major rnd char 46 rnd
|
||||
device-major wsdisplay char 47 wsdisplay
|
||||
device-major wskbd char 48 wskbd
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: majors.bebox,v 1.28 2018/12/19 13:57:46 maxv Exp $
|
||||
# $NetBSD: majors.bebox,v 1.29 2019/01/27 08:53:29 maxv Exp $
|
||||
#
|
||||
# Device majors for bebox
|
||||
#
|
||||
@ -40,7 +40,6 @@ device-major tun char 40 tun
|
||||
device-major vnd char 41 block 14 vnd
|
||||
device-major audio char 42 audio
|
||||
device-major ipl char 44 ipfilter
|
||||
device-major satlink char 45 satlink
|
||||
device-major rnd char 46 rnd
|
||||
device-major wsdisplay char 47 wsdisplay
|
||||
device-major wskbd char 48 wskbd
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: majors.evbmips,v 1.31 2018/09/23 09:21:02 maxv Exp $
|
||||
# $NetBSD: majors.evbmips,v 1.32 2019/01/27 08:53:29 maxv Exp $
|
||||
#
|
||||
# Device majors for evbmips
|
||||
#
|
||||
@ -36,7 +36,6 @@ device-major fd char 34 block 0 fdc
|
||||
device-major ipl char 35 ipfilter
|
||||
device-major wd char 36 block 4 wd
|
||||
device-major se char 37 se
|
||||
device-major satlink char 38 satlink
|
||||
device-major rnd char 39 rnd
|
||||
|
||||
device-major scsibus char 42 scsibus
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: ALL,v 1.461 2018/12/29 11:30:11 maxv Exp $
|
||||
# $NetBSD: ALL,v 1.462 2019/01/27 08:53:30 maxv Exp $
|
||||
# From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
|
||||
#
|
||||
# ALL machine description file
|
||||
@ -17,7 +17,7 @@ include "arch/i386/conf/std.i386"
|
||||
|
||||
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
|
||||
|
||||
#ident "ALL-$Revision: 1.461 $"
|
||||
#ident "ALL-$Revision: 1.462 $"
|
||||
|
||||
maxusers 64 # estimated number of users
|
||||
|
||||
@ -1689,9 +1689,6 @@ geodegcb* at pci? dev ? function ? # Geode GCB area
|
||||
geodewdog* at geodegcb? # AMD Geode SC1100 watchdog timer
|
||||
geodecntr* at geodegcb? # AMD Geode SC1100 high res. counter
|
||||
|
||||
# Planetconnect Satellite receiver driver.
|
||||
satlink0 at isa? port 0x300 drq 1
|
||||
|
||||
# Middle Digital, Inc. PCI-Weasel serial console board control
|
||||
# devices (watchdog timer, etc.)
|
||||
weasel* at pci?
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: GENERIC,v 1.1199 2018/12/25 11:56:14 mlelstv Exp $
|
||||
# $NetBSD: GENERIC,v 1.1200 2019/01/27 08:53:30 maxv Exp $
|
||||
#
|
||||
# GENERIC machine description file
|
||||
#
|
||||
@ -22,7 +22,7 @@ include "arch/i386/conf/std.i386"
|
||||
|
||||
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
|
||||
|
||||
#ident "GENERIC-$Revision: 1.1199 $"
|
||||
#ident "GENERIC-$Revision: 1.1200 $"
|
||||
|
||||
maxusers 64 # estimated number of users
|
||||
|
||||
@ -1408,9 +1408,6 @@ geodegcb* at pci? dev ? function ? # Geode GCB area
|
||||
geodewdog* at geodegcb? # AMD Geode SC1100 watchdog timer
|
||||
geodecntr* at geodegcb? # AMD Geode SC1100 high res. counter
|
||||
|
||||
# Planetconnect Satellite receiver driver.
|
||||
#satlink0 at isa? port 0x300 drq 1
|
||||
|
||||
# Middle Digital, Inc. PCI-Weasel serial console board control
|
||||
# devices (watchdog timer, etc.)
|
||||
weasel* at pci?
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: GENERIC_TINY,v 1.161 2018/10/23 19:58:52 jdolecek Exp $
|
||||
# $NetBSD: GENERIC_TINY,v 1.162 2019/01/27 08:53:30 maxv Exp $
|
||||
#
|
||||
# GENERIC_TINY -- suitable default for 4M machines
|
||||
# No EISA, PCI, or SCSI.
|
||||
@ -495,13 +495,6 @@ we1 at isa? port 0x300 iomem 0xcc000 irq 10
|
||||
# ISA joysticks. Probe is a little strange; add only if you have one.
|
||||
#joy0 at isa? port 0x201
|
||||
|
||||
|
||||
# Miscellaneous Devices
|
||||
|
||||
# Planetconnect Satellite receiver driver.
|
||||
#satlink0 at isa? port 0x300 drq 1
|
||||
|
||||
|
||||
# Pull in optional local configuration
|
||||
cinclude "arch/i386/conf/GENERIC.local"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: INSTALL_FLOPPY,v 1.47 2018/12/12 06:29:37 maxv Exp $
|
||||
# $NetBSD: INSTALL_FLOPPY,v 1.48 2019/01/27 08:53:30 maxv Exp $
|
||||
#
|
||||
# INSTALL - Installation kernel.
|
||||
#
|
||||
@ -717,9 +717,6 @@ url* at uhub? port ? # Realtek RTL8150L based adapters
|
||||
|
||||
# Miscellaneous Devices
|
||||
|
||||
# Planetconnect Satellite receiver driver.
|
||||
#satlink0 at isa? port 0x300 drq 1
|
||||
|
||||
# Virtio devices
|
||||
virtio* at pci? dev ? function ? # Virtio PCI device
|
||||
viomb* at virtio? # Virtio memory balloon device
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: INSTALL_TINY,v 1.158 2018/09/06 05:36:50 maxv Exp $
|
||||
# $NetBSD: INSTALL_TINY,v 1.159 2019/01/27 08:53:30 maxv Exp $
|
||||
#
|
||||
# This kernel should be derived from INSTALL (which is derived
|
||||
# from GENERIC) with some features commented out.
|
||||
@ -463,17 +463,9 @@ we1 at isa? port 0x300 iomem 0xcc000 irq 10
|
||||
# ISA joysticks. Probe is a little strange; add only if you have one.
|
||||
#joy0 at isa? port 0x201
|
||||
|
||||
|
||||
# Miscellaneous Devices
|
||||
|
||||
# Planetconnect Satellite receiver driver.
|
||||
#satlink0 at isa? port 0x300 drq 1
|
||||
|
||||
|
||||
# Pull in optional local configuration
|
||||
cinclude "arch/i386/conf/INSTALL.local"
|
||||
|
||||
|
||||
# Pseudo-Devices
|
||||
|
||||
# disk/mass storage pseudo-devices
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: majors.i386,v 1.48 2018/12/19 13:57:47 maxv Exp $
|
||||
# $NetBSD: majors.i386,v 1.49 2019/01/27 08:53:30 maxv Exp $
|
||||
#
|
||||
# Device majors for i386
|
||||
#
|
||||
@ -41,7 +41,6 @@ device-major tun char 40 tun
|
||||
device-major vnd char 41 block 14 vnd vector=8:8
|
||||
device-major audio char 42 audio
|
||||
device-major ipl char 44 ipfilter
|
||||
device-major satlink char 45 satlink
|
||||
device-major rnd char 46 rnd
|
||||
device-major wsdisplay char 47 wsdisplay
|
||||
device-major wskbd char 48 wskbd
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: majors.ia64,v 1.14 2018/12/19 13:57:47 maxv Exp $
|
||||
# $NetBSD: majors.ia64,v 1.15 2019/01/27 08:53:30 maxv Exp $
|
||||
#
|
||||
# Device majors for ia64
|
||||
#
|
||||
@ -41,7 +41,6 @@ device-major tun char 40 tun
|
||||
device-major vnd char 41 block 14 vnd
|
||||
device-major audio char 42 audio
|
||||
device-major ipl char 44 ipfilter
|
||||
device-major satlink char 45 satlink
|
||||
device-major rnd char 46 rnd
|
||||
device-major wsdisplay char 47 wsdisplay
|
||||
device-major wskbd char 48 wskbd
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: majors.ibmnws,v 1.16 2018/12/19 13:57:47 maxv Exp $
|
||||
# $NetBSD: majors.ibmnws,v 1.17 2019/01/27 08:53:30 maxv Exp $
|
||||
#
|
||||
# Device majors for ibmnws
|
||||
#
|
||||
@ -31,7 +31,6 @@ device-major tun char 40 tun
|
||||
device-major vnd char 41 block 14 vnd
|
||||
device-major audio char 42 audio
|
||||
device-major ipl char 44 ipfilter
|
||||
device-major satlink char 45 satlink
|
||||
device-major rnd char 46 rnd
|
||||
device-major wsdisplay char 47 wsdisplay
|
||||
device-major wskbd char 48 wskbd
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: majors.mvmeppc,v 1.22 2018/12/19 13:57:49 maxv Exp $
|
||||
# $NetBSD: majors.mvmeppc,v 1.23 2019/01/27 08:53:30 maxv Exp $
|
||||
#
|
||||
# Device majors for mvmeppc
|
||||
#
|
||||
@ -31,7 +31,6 @@ device-major tun char 40 tun
|
||||
device-major vnd char 41 block 14 vnd
|
||||
|
||||
device-major ipl char 44 ipfilter
|
||||
device-major satlink char 45 satlink
|
||||
device-major rnd char 46 rnd
|
||||
|
||||
device-major scsibus char 50 scsibus
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: majors.powerpc,v 1.11 2018/09/23 09:21:02 maxv Exp $
|
||||
# $NetBSD: majors.powerpc,v 1.12 2019/01/27 08:53:30 maxv Exp $
|
||||
#
|
||||
# Device majors for shared PowerPC
|
||||
#
|
||||
@ -80,7 +80,6 @@ device-major altq char 77 altq
|
||||
device-major joy char 78 joy
|
||||
|
||||
device-major gtmpsc char 80 gtmpsc
|
||||
device-major satlink char 81 satlink
|
||||
|
||||
device-major nsmb char 98 nsmb
|
||||
device-major xlcom char 99 xlcom
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: majors.prep,v 1.24 2018/09/23 09:21:03 maxv Exp $
|
||||
# $NetBSD: majors.prep,v 1.25 2019/01/27 08:53:30 maxv Exp $
|
||||
#
|
||||
# Device majors for prep
|
||||
#
|
||||
@ -40,7 +40,6 @@ device-major vnd char 41 block 14 vnd
|
||||
device-major audio char 42 audio
|
||||
|
||||
device-major ipl char 44 ipfilter
|
||||
device-major satlink char 45 satlink
|
||||
device-major rnd char 46 rnd
|
||||
device-major wsdisplay char 47 wsdisplay
|
||||
device-major wskbd char 48 wskbd
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: majors.riscv,v 1.3 2018/09/23 09:21:03 maxv Exp $
|
||||
# $NetBSD: majors.riscv,v 1.4 2019/01/27 08:53:30 maxv Exp $
|
||||
#
|
||||
# Device majors for evbmips
|
||||
#
|
||||
@ -10,7 +10,6 @@ device-major audio char 24 audio
|
||||
device-major com char 26 com
|
||||
device-major lpt char 31 lpt
|
||||
device-major ipl char 35 ipfilter
|
||||
device-major satlink char 38 satlink
|
||||
|
||||
device-major esh char 44 esh
|
||||
device-major midi char 49 midi
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: DEVNAMES,v 1.319 2018/12/12 07:04:05 maxv Exp $
|
||||
# $NetBSD: DEVNAMES,v 1.320 2019/01/27 08:53:30 maxv Exp $
|
||||
#
|
||||
# This file contains all used device names and defined attributes in
|
||||
# alphabetical order. New devices added to the system somewhere should first
|
||||
@ -1180,7 +1180,6 @@ sacpcic hpcarm
|
||||
saip hpcarm
|
||||
saost hpcarm
|
||||
satalink MI
|
||||
satlink MI
|
||||
satmgr sandpoint
|
||||
sb MI
|
||||
sbc mac68k
|
||||
|
@ -1,8 +1,8 @@
|
||||
# $NetBSD: Makefile,v 1.10 2016/12/09 06:04:06 christos Exp $
|
||||
# $NetBSD: Makefile,v 1.11 2019/01/27 08:53:30 maxv Exp $
|
||||
|
||||
INCSDIR= /usr/include/dev/isa
|
||||
|
||||
# Only install includes which are used by userland
|
||||
INCS= isvio.h satlinkio.h spkrio.h wtreg.h
|
||||
INCS= isvio.h spkrio.h wtreg.h
|
||||
|
||||
.include <bsd.kinc.mk>
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: files.isa,v 1.171 2018/09/22 16:22:23 maxv Exp $
|
||||
# $NetBSD: files.isa,v 1.172 2019/01/27 08:53:30 maxv Exp $
|
||||
#
|
||||
# Config file and device description for machine-independent ISA code.
|
||||
# Included by ports that need it. Requires that the SCSI files be
|
||||
@ -370,13 +370,6 @@ device cms: midibus
|
||||
attach cms at isa
|
||||
file dev/isa/cms.c cms
|
||||
|
||||
#
|
||||
# PlanetConnect satellite receiver driver.
|
||||
#
|
||||
device satlink: isadma
|
||||
attach satlink at isa
|
||||
file dev/isa/satlink.c satlink needs-flag
|
||||
|
||||
# ISA PC keyboard controller
|
||||
defflag opt_pckbc.h PCKBCNOTEST
|
||||
attach pckbc at isa with pckbc_isa
|
||||
|
@ -1,541 +0,0 @@
|
||||
/* $NetBSD: satlink.c,v 1.46 2017/10/25 08:12:38 maya Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Canada Connect Corp.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Device driver for SatLink interface.
|
||||
*
|
||||
* This thing is really simple. We essentially DMA into a ring buffer
|
||||
* which the user then reads from, and provide an ioctl interface to
|
||||
* reset the card, etc.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: satlink.c,v 1.46 2017/10/25 08:12:38 maya Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/callout.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/device.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/poll.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/tty.h>
|
||||
|
||||
#include <sys/cpu.h>
|
||||
#include <sys/bus.h>
|
||||
#include <sys/intr.h>
|
||||
|
||||
#include <dev/isa/isareg.h>
|
||||
#include <dev/isa/isavar.h>
|
||||
#include <dev/isa/isadmavar.h>
|
||||
|
||||
#include <dev/isa/satlinkreg.h>
|
||||
#include <dev/isa/satlinkio.h>
|
||||
|
||||
struct satlink_softc {
|
||||
bus_space_tag_t sc_iot; /* space tag */
|
||||
bus_space_handle_t sc_ioh; /* space handle */
|
||||
isa_chipset_tag_t sc_ic; /* ISA chipset info */
|
||||
int sc_drq; /* the DRQ we're using */
|
||||
bus_size_t sc_bufsize; /* DMA buffer size */
|
||||
void * sc_buf; /* ring buffer for incoming data */
|
||||
int sc_uptr; /* user index into ring buffer */
|
||||
int sc_sptr; /* satlink index into ring buffer */
|
||||
int sc_flags; /* misc. flags. */
|
||||
int sc_lastresid; /* residual */
|
||||
struct selinfo sc_selq; /* our select/poll queue */
|
||||
struct satlink_id sc_id; /* ID cached at attach time */
|
||||
callout_t sc_ch; /* callout pseudo-interrupt */
|
||||
};
|
||||
|
||||
/* sc_flags */
|
||||
#define SATF_ISOPEN 0x01 /* device is open */
|
||||
#define SATF_DATA 0x02 /* waiting for data */
|
||||
|
||||
/*
|
||||
* Our pseudo-interrupt. Since up to 328 bytes can arrive in 1/100 of
|
||||
* a second, this gives us 3280 bytes per timeout.
|
||||
*/
|
||||
#define SATLINK_TIMEOUT (hz/10)
|
||||
|
||||
int satlinkprobe(device_t, cfdata_t, void *);
|
||||
void satlinkattach(device_t, device_t, void *);
|
||||
void satlinktimeout(void *);
|
||||
|
||||
CFATTACH_DECL_NEW(satlink, sizeof(struct satlink_softc),
|
||||
satlinkprobe, satlinkattach, NULL, NULL);
|
||||
|
||||
extern struct cfdriver satlink_cd;
|
||||
|
||||
dev_type_open(satlinkopen);
|
||||
dev_type_close(satlinkclose);
|
||||
dev_type_read(satlinkread);
|
||||
dev_type_ioctl(satlinkioctl);
|
||||
dev_type_poll(satlinkpoll);
|
||||
dev_type_kqfilter(satlinkkqfilter);
|
||||
|
||||
const struct cdevsw satlink_cdevsw = {
|
||||
.d_open = satlinkopen,
|
||||
.d_close = satlinkclose,
|
||||
.d_read = satlinkread,
|
||||
.d_write = nowrite,
|
||||
.d_ioctl = satlinkioctl,
|
||||
.d_stop = nostop,
|
||||
.d_tty = notty,
|
||||
.d_poll = satlinkpoll,
|
||||
.d_mmap = nommap,
|
||||
.d_kqfilter = satlinkkqfilter,
|
||||
.d_discard = nodiscard,
|
||||
.d_flag = D_OTHER
|
||||
};
|
||||
|
||||
int
|
||||
satlinkprobe(device_t parent, cfdata_t match, void *aux)
|
||||
{
|
||||
struct isa_attach_args *ia = aux;
|
||||
bus_space_tag_t iot = ia->ia_iot;
|
||||
bus_space_handle_t ioh;
|
||||
int rv = 0;
|
||||
|
||||
if (ia->ia_nio < 1)
|
||||
return (0);
|
||||
if (ia->ia_ndrq < 1)
|
||||
return (0);
|
||||
|
||||
if (ISA_DIRECT_CONFIG(ia))
|
||||
return (0);
|
||||
|
||||
/* Don't allow wildcarding of iobase or drq. */
|
||||
if (ia->ia_io[0].ir_addr == ISA_UNKNOWN_PORT)
|
||||
return (0);
|
||||
if (ia->ia_drq[0].ir_drq == ISA_UNKNOWN_DRQ)
|
||||
return (0);
|
||||
|
||||
if (bus_space_map(iot, ia->ia_io[0].ir_addr, SATLINK_IOSIZE, 0, &ioh))
|
||||
return (0);
|
||||
|
||||
/*
|
||||
* XXX Should check manufacturer ID here, or something.
|
||||
*/
|
||||
|
||||
rv = 1;
|
||||
|
||||
ia->ia_nio = 1;
|
||||
ia->ia_io[0].ir_size = SATLINK_IOSIZE;
|
||||
|
||||
ia->ia_ndrq = 1;
|
||||
|
||||
ia->ia_nirq = 0;
|
||||
ia->ia_niomem = 0;
|
||||
|
||||
bus_space_unmap(iot, ioh, SATLINK_IOSIZE);
|
||||
return (rv);
|
||||
}
|
||||
|
||||
void
|
||||
satlinkattach(device_t parent, device_t self, void *aux)
|
||||
{
|
||||
struct satlink_softc *sc = device_private(self);
|
||||
struct isa_attach_args *ia = aux;
|
||||
bus_space_tag_t iot = ia->ia_iot;
|
||||
bus_space_handle_t ioh;
|
||||
bus_addr_t ringaddr;
|
||||
|
||||
printf("\n");
|
||||
|
||||
/* Map the card. */
|
||||
if (bus_space_map(iot, ia->ia_io[0].ir_addr, SATLINK_IOSIZE, 0, &ioh)) {
|
||||
aprint_error_dev(self, "can't map i/o space\n");
|
||||
return;
|
||||
}
|
||||
|
||||
sc->sc_iot = iot;
|
||||
sc->sc_ioh = ioh;
|
||||
sc->sc_ic = ia->ia_ic;
|
||||
sc->sc_drq = ia->ia_drq[0].ir_drq;
|
||||
|
||||
/* Reset the card. */
|
||||
bus_space_write_1(iot, ioh, SATLINK_COMMAND, SATLINK_CMD_RESET);
|
||||
|
||||
/* Read ID from the card. */
|
||||
sc->sc_id.sid_mfrid =
|
||||
bus_space_read_1(iot, ioh, SATLINK_MFRID_L) |
|
||||
(bus_space_read_1(iot, ioh, SATLINK_MFRID_H) << 8);
|
||||
sc->sc_id.sid_grpid = bus_space_read_1(iot, ioh, SATLINK_GRPID);
|
||||
sc->sc_id.sid_userid =
|
||||
bus_space_read_1(iot, ioh, SATLINK_USERID_L) |
|
||||
(bus_space_read_1(iot, ioh, SATLINK_USERID_H) << 8);
|
||||
sc->sc_id.sid_serial =
|
||||
bus_space_read_1(iot, ioh, SATLINK_SER_L) |
|
||||
(bus_space_read_1(iot, ioh, SATLINK_SER_M0) << 8) |
|
||||
(bus_space_read_1(iot, ioh, SATLINK_SER_M1) << 16) |
|
||||
(bus_space_read_1(iot, ioh, SATLINK_SER_H) << 24);
|
||||
|
||||
printf("%s: mfrid 0x%x, grpid 0x%x, userid 0x%x, serial %d\n",
|
||||
device_xname(self), sc->sc_id.sid_mfrid,
|
||||
sc->sc_id.sid_grpid, sc->sc_id.sid_userid,
|
||||
sc->sc_id.sid_serial);
|
||||
|
||||
callout_init(&sc->sc_ch, 0);
|
||||
selinit(&sc->sc_selq);
|
||||
|
||||
sc->sc_bufsize = isa_dmamaxsize(sc->sc_ic, sc->sc_drq);
|
||||
|
||||
/* Allocate and map the ring buffer. */
|
||||
if (isa_dmamem_alloc(sc->sc_ic, sc->sc_drq, sc->sc_bufsize,
|
||||
&ringaddr, BUS_DMA_NOWAIT)) {
|
||||
aprint_error_dev(self, "can't allocate ring buffer\n");
|
||||
return;
|
||||
}
|
||||
if (isa_dmamem_map(sc->sc_ic, sc->sc_drq, ringaddr, sc->sc_bufsize,
|
||||
&sc->sc_buf, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) {
|
||||
aprint_error_dev(self, "can't map ring buffer\n");
|
||||
isa_dmamem_free(sc->sc_ic, sc->sc_drq, ringaddr,
|
||||
sc->sc_bufsize);
|
||||
return;
|
||||
}
|
||||
|
||||
if (isa_drq_alloc(sc->sc_ic, sc->sc_drq) != 0) {
|
||||
aprint_error_dev(self, "can't reserve drq %d\n",
|
||||
sc->sc_drq);
|
||||
isa_dmamem_unmap(sc->sc_ic, sc->sc_drq, sc->sc_buf,
|
||||
sc->sc_bufsize);
|
||||
isa_dmamem_free(sc->sc_ic, sc->sc_drq, ringaddr,
|
||||
sc->sc_bufsize);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Create the DMA map. */
|
||||
if (isa_dmamap_create(sc->sc_ic, sc->sc_drq, sc->sc_bufsize,
|
||||
BUS_DMA_NOWAIT|BUS_DMA_ALLOCNOW)) {
|
||||
aprint_error_dev(self, "can't create DMA map\n");
|
||||
isa_dmamem_unmap(sc->sc_ic, sc->sc_drq, sc->sc_buf,
|
||||
sc->sc_bufsize);
|
||||
isa_dmamem_free(sc->sc_ic, sc->sc_drq, ringaddr,
|
||||
sc->sc_bufsize);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
satlinkopen(dev_t dev, int flags, int fmt,
|
||||
struct lwp *l)
|
||||
{
|
||||
struct satlink_softc *sc;
|
||||
int error;
|
||||
|
||||
sc = device_lookup_private(&satlink_cd, minor(dev));
|
||||
|
||||
if (sc == NULL)
|
||||
return (ENXIO);
|
||||
|
||||
if (sc->sc_flags & SATF_ISOPEN)
|
||||
return (EBUSY);
|
||||
|
||||
bus_space_write_1(sc->sc_iot, sc->sc_ioh, SATLINK_COMMAND,
|
||||
SATLINK_CMD_RESET);
|
||||
|
||||
/* Reset the ring buffer, and start the DMA loop. */
|
||||
sc->sc_uptr = 0;
|
||||
sc->sc_sptr = 0;
|
||||
sc->sc_lastresid = sc->sc_bufsize;
|
||||
memset(sc->sc_buf, 0, sc->sc_bufsize);
|
||||
error = isa_dmastart(sc->sc_ic, sc->sc_drq, sc->sc_buf,
|
||||
sc->sc_bufsize, NULL, DMAMODE_READ|DMAMODE_LOOP, BUS_DMA_WAITOK);
|
||||
if (error)
|
||||
return (error);
|
||||
|
||||
sc->sc_flags |= SATF_ISOPEN;
|
||||
|
||||
callout_reset(&sc->sc_ch, SATLINK_TIMEOUT, satlinktimeout, sc);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
satlinkclose(dev_t dev, int flags, int fmt,
|
||||
struct lwp *l)
|
||||
{
|
||||
struct satlink_softc *sc;
|
||||
int s;
|
||||
|
||||
sc = device_lookup_private(&satlink_cd, minor(dev));
|
||||
|
||||
s = splsoftclock();
|
||||
sc->sc_flags &= ~SATF_ISOPEN;
|
||||
splx(s);
|
||||
|
||||
isa_dmaabort(sc->sc_ic, sc->sc_drq);
|
||||
callout_stop(&sc->sc_ch);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
satlinkread(dev_t dev, struct uio *uio, int flags)
|
||||
{
|
||||
struct satlink_softc *sc;
|
||||
int error, s, count, sptr;
|
||||
int wrapcnt, oresid;
|
||||
|
||||
sc = device_lookup_private(&satlink_cd, minor(dev));
|
||||
|
||||
s = splsoftclock();
|
||||
|
||||
/* Wait for data to be available. */
|
||||
while (sc->sc_sptr == sc->sc_uptr) {
|
||||
if (flags & O_NONBLOCK) {
|
||||
splx(s);
|
||||
return (EWOULDBLOCK);
|
||||
}
|
||||
sc->sc_flags |= SATF_DATA;
|
||||
if ((error = tsleep(sc, TTIPRI | PCATCH, "satio", 0)) != 0) {
|
||||
splx(s);
|
||||
return (error);
|
||||
}
|
||||
}
|
||||
|
||||
sptr = sc->sc_sptr;
|
||||
splx(s);
|
||||
|
||||
/* Compute number of readable bytes. */
|
||||
if (sptr > sc->sc_uptr)
|
||||
count = sptr - sc->sc_uptr;
|
||||
else
|
||||
count = sc->sc_bufsize - sc->sc_uptr + sptr;
|
||||
|
||||
if (count > uio->uio_resid)
|
||||
count = uio->uio_resid;
|
||||
|
||||
/* Send data out to user. */
|
||||
if (sptr > sc->sc_uptr) {
|
||||
/*
|
||||
* Easy case - no wrap-around.
|
||||
*/
|
||||
error = uiomove((char *)sc->sc_buf + sc->sc_uptr, count, uio);
|
||||
if (error == 0) {
|
||||
sc->sc_uptr += count;
|
||||
if (sc->sc_uptr == sc->sc_bufsize)
|
||||
sc->sc_uptr = 0;
|
||||
}
|
||||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* We wrap around. Copy to the end of the ring...
|
||||
*/
|
||||
wrapcnt = sc->sc_bufsize - sc->sc_uptr;
|
||||
oresid = uio->uio_resid;
|
||||
if (wrapcnt > uio->uio_resid)
|
||||
wrapcnt = uio->uio_resid;
|
||||
error = uiomove((char *)sc->sc_buf + sc->sc_uptr, wrapcnt, uio);
|
||||
sc->sc_uptr = 0;
|
||||
if (error != 0 || wrapcnt == oresid)
|
||||
return (error);
|
||||
|
||||
/* ...and the rest. */
|
||||
count -= wrapcnt;
|
||||
error = uiomove(sc->sc_buf, count, uio);
|
||||
sc->sc_uptr += count;
|
||||
if (sc->sc_uptr == sc->sc_bufsize)
|
||||
sc->sc_uptr = 0;
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
int
|
||||
satlinkioctl(dev_t dev, u_long cmd, void *data, int flags,
|
||||
struct lwp *l)
|
||||
{
|
||||
struct satlink_softc *sc;
|
||||
|
||||
sc = device_lookup_private(&satlink_cd, minor(dev));
|
||||
|
||||
switch (cmd) {
|
||||
case SATIORESET:
|
||||
bus_space_write_1(sc->sc_iot, sc->sc_ioh, SATLINK_COMMAND,
|
||||
SATLINK_CMD_RESET);
|
||||
sc->sc_uptr = isa_dmacount(sc->sc_ic, sc->sc_drq);
|
||||
sc->sc_sptr = sc->sc_uptr;
|
||||
break;
|
||||
|
||||
case SATIOGID:
|
||||
memcpy(data, &sc->sc_id, sizeof(sc->sc_id));
|
||||
break;
|
||||
|
||||
default:
|
||||
return (ENOTTY);
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
satlinkpoll(dev_t dev, int events, struct lwp *l)
|
||||
{
|
||||
struct satlink_softc *sc;
|
||||
int s, revents;
|
||||
|
||||
sc = device_lookup_private(&satlink_cd, minor(dev));
|
||||
|
||||
revents = events & (POLLOUT | POLLWRNORM);
|
||||
|
||||
/* Attempt to save some work. */
|
||||
if ((events & (POLLIN | POLLRDNORM)) == 0)
|
||||
return (revents);
|
||||
|
||||
/* We're timeout-driven, so must block the clock. */
|
||||
s = splsoftclock();
|
||||
if (sc->sc_uptr != sc->sc_sptr)
|
||||
revents |= events & (POLLIN | POLLRDNORM);
|
||||
else
|
||||
selrecord(l, &sc->sc_selq);
|
||||
splx(s);
|
||||
|
||||
return (revents);
|
||||
}
|
||||
|
||||
static void
|
||||
filt_satlinkrdetach(struct knote *kn)
|
||||
{
|
||||
struct satlink_softc *sc = kn->kn_hook;
|
||||
int s;
|
||||
|
||||
s = splsoftclock();
|
||||
SLIST_REMOVE(&sc->sc_selq.sel_klist, kn, knote, kn_selnext);
|
||||
splx(s);
|
||||
}
|
||||
|
||||
static int
|
||||
filt_satlinkread(struct knote *kn, long hint)
|
||||
{
|
||||
struct satlink_softc *sc = kn->kn_hook;
|
||||
|
||||
if (sc->sc_uptr == sc->sc_sptr)
|
||||
return (0);
|
||||
|
||||
if (sc->sc_sptr > sc->sc_uptr)
|
||||
kn->kn_data = sc->sc_sptr - sc->sc_uptr;
|
||||
else
|
||||
kn->kn_data = (sc->sc_bufsize - sc->sc_uptr) +
|
||||
sc->sc_sptr;
|
||||
return (1);
|
||||
}
|
||||
|
||||
static const struct filterops satlinkread_filtops = {
|
||||
.f_isfd = 1,
|
||||
.f_attach = NULL,
|
||||
.f_detach = filt_satlinkrdetach,
|
||||
.f_event = filt_satlinkread,
|
||||
};
|
||||
|
||||
static const struct filterops satlink_seltrue_filtops = {
|
||||
.f_isfd = 1,
|
||||
.f_attach = NULL,
|
||||
.f_detach = filt_satlinkrdetach,
|
||||
.f_event = filt_seltrue,
|
||||
};
|
||||
|
||||
int
|
||||
satlinkkqfilter(dev_t dev, struct knote *kn)
|
||||
{
|
||||
struct satlink_softc *sc;
|
||||
struct klist *klist;
|
||||
int s;
|
||||
|
||||
sc = device_lookup_private(&satlink_cd, minor(dev));
|
||||
|
||||
switch (kn->kn_filter) {
|
||||
case EVFILT_READ:
|
||||
klist = &sc->sc_selq.sel_klist;
|
||||
kn->kn_fop = &satlinkread_filtops;
|
||||
break;
|
||||
|
||||
case EVFILT_WRITE:
|
||||
klist = &sc->sc_selq.sel_klist;
|
||||
kn->kn_fop = &satlink_seltrue_filtops;
|
||||
break;
|
||||
|
||||
default:
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
kn->kn_hook = sc;
|
||||
|
||||
s = splsoftclock();
|
||||
SLIST_INSERT_HEAD(klist, kn, kn_selnext);
|
||||
splx(s);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
satlinktimeout(void *arg)
|
||||
{
|
||||
struct satlink_softc *sc = arg;
|
||||
bus_size_t resid;
|
||||
int newidx;
|
||||
|
||||
if ((sc->sc_flags & SATF_ISOPEN) == 0)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Get the current residual count from the DMA controller
|
||||
* and compute the satlink's index into the ring buffer.
|
||||
*/
|
||||
resid = isa_dmacount(sc->sc_ic, sc->sc_drq);
|
||||
newidx = sc->sc_bufsize - resid;
|
||||
if (newidx == sc->sc_bufsize)
|
||||
newidx = 0;
|
||||
|
||||
if (newidx == sc->sc_sptr)
|
||||
goto out;
|
||||
|
||||
sc->sc_sptr = newidx;
|
||||
|
||||
/* Wake up anyone blocked in read... */
|
||||
if (sc->sc_flags & SATF_DATA) {
|
||||
sc->sc_flags &= ~SATF_DATA;
|
||||
wakeup(sc);
|
||||
}
|
||||
|
||||
/* Wake up anyone blocked in poll... */
|
||||
selnotify(&sc->sc_selq, 0, 0);
|
||||
|
||||
out:
|
||||
callout_reset(&sc->sc_ch, SATLINK_TIMEOUT, satlinktimeout, sc);
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
/* $NetBSD: satlinkio.h,v 1.4 2015/09/06 06:01:00 dholland Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Canada Connect Corp.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _DEV_ISA_SATLINKIO_H_
|
||||
#define _DEV_ISA_SATLINKIO_H_
|
||||
|
||||
/*
|
||||
* ioctl definitions for SatLink interface.
|
||||
*/
|
||||
|
||||
#include <sys/ioccom.h>
|
||||
|
||||
struct satlink_id {
|
||||
u_int16_t sid_mfrid; /* manufacturer ID */
|
||||
u_int8_t sid_grpid; /* group ID */
|
||||
u_int16_t sid_userid; /* user ID */
|
||||
u_int32_t sid_serial; /* serial number */
|
||||
};
|
||||
|
||||
#define SATIORESET _IO('s', 0) /* reset interface */
|
||||
#define SATIOGID _IOR('s', 1, struct satlink_id) /* read ID */
|
||||
#define SATIOSBUFSIZE _IOW('s', 2, int) /* set buffer size */
|
||||
|
||||
#endif /* _DEV_ISA_SATLINKIO_H_ */
|
@ -1,53 +0,0 @@
|
||||
/* $NetBSD: satlinkreg.h,v 1.3 2008/04/28 20:23:52 martin Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Canada Connect Corp.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _DEV_ISA_SATLINKREG_H_
|
||||
#define _DEV_ISA_SATLINKREG_H_
|
||||
|
||||
/*
|
||||
* Register definitions for the SatLink interface.
|
||||
*/
|
||||
|
||||
#define SATLINK_IOSIZE 0x20
|
||||
|
||||
#define SATLINK_COMMAND 0x00 /* command register */
|
||||
#define SATLINK_MFRID_L 0x1c /* Manufacturer ID (low) */
|
||||
#define SATLINK_MFRID_H 0x1b /* (high) */
|
||||
#define SATLINK_GRPID 0x1d /* Group ID */
|
||||
#define SATLINK_USERID_L 0x1f /* User ID (low) */
|
||||
#define SATLINK_USERID_H 0x1e /* (high) */
|
||||
#define SATLINK_SER_L 0x10 /* Serial number (low) */
|
||||
#define SATLINK_SER_M0 0x11 /* . */
|
||||
#define SATLINK_SER_M1 0x12 /* . */
|
||||
#define SATLINK_SER_H 0x13 /* (high) */
|
||||
|
||||
#define SATLINK_CMD_RESET 0x0c /* reset card */
|
||||
|
||||
#endif /* _DEV_ISA_SATLINKREG_H_ */
|
@ -74,7 +74,6 @@ struct devsw_conv devsw_conv0[] = {
|
||||
{ "vnd", 14, 41, DEVNODE_VECTOR, 0, { 2, 8 }},
|
||||
{ "audio", -1, 42, DEVNODE_DONTBOTHER, 0, { 0, 0 }},
|
||||
{ "ipl", -1, 44, DEVNODE_DONTBOTHER, 0, { 0, 0 }},
|
||||
{ "satlink", -1, 45, DEVNODE_DONTBOTHER, 0, { 0, 0 }},
|
||||
{ "rnd", -1, 46, DEVNODE_DONTBOTHER, 0, { 0, 0 }},
|
||||
{ "wsdisplay", -1, 47, DEVNODE_DONTBOTHER, 0, { 0, 0 }},
|
||||
{ "wskbd", -1, 48, DEVNODE_DONTBOTHER, 0, { 0, 0 }},
|
||||
|
Loading…
Reference in New Issue
Block a user