aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/si
Commit message (Collapse)AuthorAgeFilesLines
* Remove the si(4) driver and sicontrol(8) for Specialix serial cards.John Baldwin2016-08-199-6681/+0
| | | | | | | | | | | | | The si(4) driver supported multiport serial adapters for ISA, EISA, and PCI buses. This driver does not use bus_space, instead it depends on direct use of the pointer returned by rman_get_virtual(). It is also still locked by Giant and calls for patch testing to convert it to use bus_space were unanswered. Relnotes: yes Notes: svn path=/head/; revision=304502
* sys/dev: minor spelling fixes.Pedro F. Giffuni2016-05-032-2/+2
| | | | | | | Most affect comments, very few have user-visible effects. Notes: svn path=/head/; revision=298955
* Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere().Justin Hibbits2016-02-271-3/+3
| | | | | | | | | | | Most calls to bus_alloc_resource() use "anywhere" as the range, with a given count. Migrate these to use the new bus_alloc_resource_anywhere() API. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D5370 Notes: svn path=/head/; revision=296137
* Fix build of si(4) and enable it in LINT on amd64 and i386.John Baldwin2014-08-201-3/+3
| | | | Notes: svn path=/head/; revision=270224
* Pull in r267961 and r267973 again. Fix for issues reported will follow.Hans Petter Selasky2014-06-281-2/+1
| | | | Notes: svn path=/head/; revision=267992
* Revert r267961, r267973:Glen Barber2014-06-271-1/+2
| | | | | | | | | | | | | These changes prevent sysctl(8) from returning proper output, such as: 1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1) truss: can not get etype: Cannot allocate memory Notes: svn path=/head/; revision=267985
* Extend the meaning of the CTLFLAG_TUN flag to automatically check ifHans Petter Selasky2014-06-271-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there is an environment variable which shall initialize the SYSCTL during early boot. This works for all SYSCTL types both statically and dynamically created ones, except for the SYSCTL NODE type and SYSCTLs which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to be used in the case a tunable sysctl has a custom initialisation function allowing the sysctl to still be marked as a tunable. The kernel SYSCTL API is mostly the same, with a few exceptions for some special operations like iterating childrens of a static/extern SYSCTL node. This operation should probably be made into a factored out common macro, hence some device drivers use this. The reason for changing the SYSCTL API was the need for a SYSCTL parent OID pointer and not only the SYSCTL parent OID list pointer in order to quickly generate the sysctl path. The motivation behind this patch is to avoid parameter loading cludges inside the OFED driver subsystem. Instead of adding special code to the OFED driver subsystem to post-load tunables into dynamically created sysctls, we generalize this in the kernel. Other changes: - Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask" to "hw.pcic.intr_mask". - Removed redundant TUNABLE statements throughout the kernel. - Some minor code rewrites in connection to removing not needed TUNABLE statements. - Added a missing SYSCTL_DECL(). - Wrapped two very long lines. - Avoid malloc()/free() inside sysctl string handling, in case it is called to initialize a sysctl from a tunable, hence malloc()/free() is not ready when sysctls from the sysctl dataset are registered. - Bumped FreeBSD version to indicate SYSCTL API change. MFC after: 2 weeks Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=267961
* Remove incorrect comment about splsoftclock.Warner Losh2013-02-211-1/+0
| | | | Notes: svn path=/head/; revision=247089
* Last minute TTY API change: remove mutex argument from tty_alloc().Ed Schouten2009-05-291-1/+1
| | | | | | | | | | | | | I don't want people to override the mutex when allocating a TTY. It has to be there, to keep drivers like syscons happy. So I'm creating a tty_alloc_mutex() which can be used in those cases. tty_alloc_mutex() should eventually be removed. The advantage of this approach, is that we can just remove a function, without breaking the regular API in the future. Notes: svn path=/head/; revision=193018
* si_cmdname() is defined only when SI_DEBUG is enabled, thusWojciech A. Koszek2009-02-071-2/+2
| | | | | | | | using this function in simple printf() causes compile-time problems. Use conditionally enabled DPRINT() macro instead. Notes: svn path=/head/; revision=188266
* Pass 1 of mpsafetty-ifying si(4). It compiles and has basic functionality,Peter Wemm2008-09-081-179/+165
| | | | | | | | | | but needs a lot more work. In particular, it has no flow control and has a tendency to race when giving commands. It still uses Giant for the tty and driver lock, but this is a keep-it-simple feature for now. Some of the [temporary] proliferation of messages lines are way too long. Notes: svn path=/head/; revision=182871
* Remove sicontrol(8)'s "ttystat".Ed Schouten2008-06-092-6/+0
| | | | | | | | | | | | | | | | | | | | In the FreeBSD base system, there are only two utilities that use struct tty, namely pstat and sicontrol. The sicontrol utility calls the TCSI_TTY ioctl(), which copies struct tty back to userspace. sicontrol should not have this functionality. The same data is already provided by pstat. If we really want to be able to export these numbers through a file descriptor to userspace, we can export struct xtty, which should provide a better abstraction. The ttystat option was only used as a debugging aid. This makes sicontrol compile in the mpsafetty branch. Reviewed by: peter Approved by: philip (mentor) Notes: svn path=/head/; revision=179668
* Checkpoint what I've been running for the last year. Tidy up aPeter Wemm2008-06-062-73/+82
| | | | | | | bunch of loose ends that "can't happen" any more, if they ever could. Notes: svn path=/head/; revision=179589
* Based in info gleaned from the web and other drivers (including the LinuxPeter Wemm2007-12-011-0/+23
| | | | | | | | | sx driver), change a magic value in the PLX bridge chip. Apparently later builds of the PCI cards had corrected values in the configuration eeprom. This change supposedly fixes some pci bus problems. Notes: svn path=/head/; revision=174136
* o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati2007-02-231-1/+1
| | | | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Approved by: re (implicit?) Notes: svn path=/head/; revision=166923
* Catchup with filtersWarner Losh2007-02-232-2/+2
| | | | Notes: svn path=/head/; revision=166914
* Wrap the EISA-specific parts of the dpt(4) and si(4) back-ends inMarius Strobl2007-01-181-0/+9
| | | | | | | | | | the newly added DEV_EISA. This is done so that these back-ends can be compiled on platforms not providing in{b,w,l}()/out{b,w,l}() and friends (but may wish to use them together with bus front-ends other than the EISA one). Notes: svn path=/head/; revision=166091
* Sweep kernel replacing suser(9) calls with priv(9) calls, assigningRobert Watson2006-11-061-1/+2
| | | | | | | | | | | | | | | | specific privilege names to a broad range of privileges. These may require some future tweaking. Sponsored by: nCircle Network Security, Inc. Obtained from: TrustedBSD Project Discussed on: arch@ Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri, Alex Lyashkov <umka at sevcity dot net>, Skip Ford <skip dot ford at verizon dot net>, Antoine Brodin <antoine dot brodin at laposte dot net> Notes: svn path=/head/; revision=164033
* - Update copyright years from the Specialix SDK.John Baldwin2006-01-061-2/+2
| | | | | | | | - Update comment as this firmware is not used for the SX cards, they use the si3_t225 firmware instead. Notes: svn path=/head/; revision=154087
* Update the firmware image used for the SIJET cards to the latest availableJohn Baldwin2006-01-061-2267/+2438
| | | | | | | | | | in the SDK from Specialix/Perle. The prior version was JET.BIN Version 3.0.6 Beta I and the new version is JET__.BIN Version 4.0.1. MFC after: 1 week Notes: svn path=/head/; revision=154082
* - Fix cards with multiple modules. Prior to this, the ports on the variousJohn Baldwin2006-01-061-3/+7
| | | | | | | | | | | | modules would have overlapping names. - Only create /dev/si_control for unit 0. Tested by: Joerg Lehners Joerg dot Lehners at informatik dot uni-oldenburg dot de (on 6.x) MFC after: 1 week Notes: svn path=/head/; revision=154081
* Add #nclude <dev/pci/pcireg.h> to pick up definitions for PCIR_BAR andCraig Rodrigues2005-11-081-0/+1
| | | | | | | PCIR_SUBVEND_0. Notes: svn path=/head/; revision=152175
* Use PCIR_xxx constants for PCI config space header registers rather thanJohn Baldwin2005-11-071-3/+3
| | | | | | | magic numbers. Notes: svn path=/head/; revision=152172
* Eliminate two unused arguments to ttycreate().Poul-Henning Kamp2005-10-161-1/+1
| | | | Notes: svn path=/head/; revision=151383
* Use BUS_PROBE_DEFAULT in preference to 0 and BUS_PROBE_LOW_PRIORITY inWarner Losh2005-03-011-1/+1
| | | | | | | | preference to some random negative number to allow other drivers a bite at the apple. Notes: svn path=/head/; revision=142890
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-068-8/+8
| | | | Notes: svn path=/head/; revision=139749
* Add #ifdef _KERNEL which allows sicontrol(8) to include this filePoul-Henning Kamp2004-10-021-0/+3
| | | | | | | from userland to get the debugging definitions. Notes: svn path=/head/; revision=136062
* Use generic device/tty adaptation code.Poul-Henning Kamp2004-10-023-648/+83
| | | | | | | | | | | | | | New device names are "{tty|cua}A$(card)$(port)[.init|.lock]" Put a portname in the port structure if SI_DEBUG is defined to avoid need to inspect minor number to construct name.. Constify some strings. Remove duplicated DBG_ #defines. Notes: svn path=/head/; revision=136058
* Use ttyalloc() instead of ttymalloc(NULL)Poul-Henning Kamp2004-09-171-1/+1
| | | | Notes: svn path=/head/; revision=135367
* Avoid casts as lvalues.Alexander Kabaev2004-07-281-4/+18
| | | | Notes: svn path=/head/; revision=132771
* Preparation commit for the tty cleanups that will follow in the nearPoul-Henning Kamp2004-07-151-1/+1
| | | | | | | | | | | | future: rename ttyopen() -> tty_open() and ttyclose() -> tty_close(). We need the ttyopen() and ttyclose() for the new generic cdevsw functions for tty devices in order to have consistent naming. Notes: svn path=/head/; revision=132226
* Introduce ttygone() which indicates that the hardware is detached.Poul-Henning Kamp2004-07-112-42/+4
| | | | | | | Move dtrwait logic to the generic TTY level. Notes: svn path=/head/; revision=131981
* Pick the hotchar out of the tty structure instead of caching privatePoul-Henning Kamp2004-06-262-3/+2
| | | | | | | | | | | copies. No current line disciplines have a dynamically changing hotchar, and expecting to receive anything sensible during a change in ldisc is insane so no locking of the hotchar field is necessary. Notes: svn path=/head/; revision=131134
* Put the pre FreeBSD-2.x tty compat code under BURN_BRIDGES.Poul-Henning Kamp2004-06-211-0/+8
| | | | Notes: svn path=/head/; revision=130892
* Do the dreaded s/dev_t/struct cdev */Poul-Henning Kamp2004-06-161-6/+6
| | | | | | | Bump __FreeBSD_version accordingly. Notes: svn path=/head/; revision=130585
* Deorbit COMPAT_SUNOS.Poul-Henning Kamp2004-06-111-1/+1
| | | | | | | | We inherited this from the sparc32 port of BSD4.4-Lite1. We have neither a sparc32 port nor a SunOS4.x compatibility desire these days. Notes: svn path=/head/; revision=130344
* Centralize the line discipline optimization determination in a functionPoul-Henning Kamp2004-06-041-26/+2
| | | | | | | | | | | | called ttyldoptim(). Use this function from all the relevant drivers. I belive no drivers finger linesw[] directly anymore, paving the way for locking and refcounting. Notes: svn path=/head/; revision=130096
* Machine generated patch which changes linedisc calls from accessingPoul-Henning Kamp2004-06-041-10/+10
| | | | | | | | | linesw[] directly to using the ttyld...() functions The ttyld...() functions ar inline so there is no performance hit. Notes: svn path=/head/; revision=130077
* Make the remaining serial drivers call ttyioctl() rather than callingPoul-Henning Kamp2004-06-041-9/+3
| | | | | | | the linedisc directly. Notes: svn path=/head/; revision=130057
* There is no need to explicitly call the stop function. In all likelyhoodPoul-Henning Kamp2004-06-011-2/+0
| | | | | | | ->l_close() did it and ttyclose certainly will. Notes: svn path=/head/; revision=129939
* Add missing <sys/module.h> includesPoul-Henning Kamp2004-05-303-0/+3
| | | | Notes: svn path=/head/; revision=129879
* Convert callers to the new bus_alloc_resource_any(9) API.Nate Lawson2004-03-173-18/+19
| | | | | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde Notes: svn path=/head/; revision=127135
* Device megapatch 4/6:Poul-Henning Kamp2004-02-211-1/+2
| | | | | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags. Notes: svn path=/head/; revision=126080
* Device megapatch 3/6:Poul-Henning Kamp2004-02-211-3/+0
| | | | | | | | | | | | | | | Add missing D_TTY flags to various drivers. Complete asserts that dev_t's passed to ttyread(), ttywrite(), ttypoll() and ttykqwrite() have (d_flags & D_TTY) and a struct tty pointer. Make ttyread(), ttywrite(), ttypoll() and ttykqwrite() the default cdevsw methods for D_TTY drivers and remove the explicit initializations in various drivers cdevsw structures. Notes: svn path=/head/; revision=126078
* Device megapatch 1/6:Poul-Henning Kamp2004-02-211-2/+0
| | | | | | | | | | Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number. Notes: svn path=/head/; revision=126076
* Use __FBSDID().David E. O'Brien2003-08-246-8/+19
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119419
* Prefer new location of pci include files (which have only been in theWarner Losh2003-08-221-1/+1
| | | | | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD. Notes: svn path=/head/; revision=119287
* Make TTYHOG tunable.David Schultz2003-03-051-0/+1
| | | | | | | Reviewed by: mike (mentor) Notes: svn path=/head/; revision=111899
* Make nokqfilter() return the correct return value.Poul-Henning Kamp2003-03-031-1/+1
| | | | | | | Ditch the D_KQFILTER flag which was used to prevent calling NULL pointers. Notes: svn path=/head/; revision=111821
* Gigacommit to improve device-driver source compatibility betweenPoul-Henning Kamp2003-03-031-14/+10
| | | | | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl) Notes: svn path=/head/; revision=111815