summaryrefslogtreecommitdiffstats
path: root/sys/dev/rp
Commit message (Collapse)AuthorAgeFilesLines
* Replace all calls to minor() with dev2unit().ed2008-09-271-1/+1
| | | | | | | | | | | | | | | After I removed all the unit2minor()/minor2unit() calls from the kernel yesterday, I realised calling minor() everywhere is quite confusing. Character devices now only have the ability to store a unit number, not a minor number. Remove the confusion by using dev2unit() everywhere. This commit could also be considered as a bug fix. A lot of drivers call minor(), while they should actually be calling dev2unit(). In -CURRENT this isn't a problem, but it turns out we never had any problem reports related to that issue in the past. I suspect not many people connect more than 256 pieces of the same hardware. Reviewed by: kib
* Initialize DWBuf[3].peter2007-07-051-0/+1
| | | | Approved by: re (rwatson, blanket)
* Fix Rocketport so that it does not crash the system when a device pointerremko2007-06-261-2/+12
| | | | | | | | | | | | | | | | | | | changes for example: (From Craig Leres): tip to a rocketport line run "/etc/rc.d/devfs restart" exit tip (wait for the system to reboot) Thanks to Robert Watson for poking me to fix this. PR: kern/109152 Approved by: imp (mentor) Approved by: re (kensmith) Reviewed by: jhb Submitted by: Craig Leres <leres@ee dot lbl dot gov>
* - Make rp(4) 64-bit- and endian-clean as well as work on strict alignmentmarius2006-11-203-74/+70
| | | | | | | | | | archs. [1] - Instead of bus_space_{read,write}*(rman_get_bustag(), rman_get_bushandle()) use bus_{read,write}*() for efficiency. Reported by: Peter Losher [1] Tested on: i386, sparc64 MFC after: 2 weeks
* The UPCI 32 rp(4) card uses BAR 2 like the UPCI 80 card.jhb2006-01-251-0/+2
| | | | | Submitted by: Vitaliy Skakun vit dot ska at gmail dot com MFC after: 3 days
* Fix -Wundef from compiling the amd64 LINT.ru2005-12-044-5/+5
|
* Fix support for multiple RocketPort cards in the same machine by includingjhb2005-11-081-1/+1
| | | | | | | the RocketPort unit number in the name of the devices. This means that unit 0 device names will change from ttyR0 .. ttyRf to ttyR00 .. ttyR0f. Reviewed by: phk
* we know it is called rpclose() so call it directly.phk2005-10-161-1/+1
|
* Eliminate two unused arguments to ttycreate().phk2005-10-161-1/+1
|
* - Use pci_get_device() and pci_get_vendor() when we only want one partjhb2005-03-251-3/+11
| | | | | | | | | of the device id. - Use BAR2 rather than BAR0 for the Rocketport UPCI 8O card. I suspect that other UPCI cards might need to use BAR2 as well. Tested by: wsk at gddsn dot org dot cn MFC after: 1 week
* Use BUS_PROBE_DEFAULT in preference to 0 and BUS_PROBE_LOW_PRIORITY inimp2005-03-011-1/+1
| | | | | preference to some random negative number to allow other drivers a bite at the apple.
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-064-4/+4
|
* Use tty layer generic code instead of local copy.phk2004-10-042-538/+110
| | | | | Device names {cua,tty}R%r[.init,.lock] clashes with pty(4) driver and allows for only 32 ports. This should probably be revisited.
* Use ttyalloc() instead of ttymalloc(NULL)phk2004-09-171-1/+1
|
* Preparation commit for the tty cleanups that will follow in the nearphk2004-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.
* Introduce ttygone() which indicates that the hardware is detached.phk2004-07-112-17/+4
| | | | Move dtrwait logic to the generic TTY level.
* Put the pre FreeBSD-2.x tty compat code under BURN_BRIDGES.phk2004-06-211-0/+4
|
* Prevent the rp driver from panic'ing on first access and make atgallatin2004-06-213-29/+33
| | | | | | | | | | | | | | | | | | | least the pci device unloadable - Use ttymalloc() rather than a plain malloc to allocate the rp->rp_tty ttys. This is now required due to the recent locking changes to ttys and prevents a panic due to locking an unitialized t_mtx. - Allow the pci driver to be unloaded. This involved moving the call rp_releaseresource() to the end of rp_pcireleaseresource(), since rp_pcireleaseresource() uses ctlp->dev, which is freed by rp_releaseresource(). - Allow the generic part of the driver to be unattached by providing a hook to cancel timeouts. Glanced at by: obrien
* Do the dreaded s/dev_t/struct cdev */phk2004-06-162-6/+6
| | | | Bump __FreeBSD_version accordingly.
* Deorbit COMPAT_SUNOS.phk2004-06-111-2/+2
| | | | | 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.
* Centralize the line discipline optimization determination in a functionphk2004-06-041-21/+4
| | | | | | | | | 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.
* Machine generated patch which changes linedisc calls from accessingphk2004-06-041-10/+10
| | | | | | linesw[] directly to using the ttyld...() functions The ttyld...() functions ar inline so there is no performance hit.
* Make the remaining serial drivers call ttyioctl() rather than callingphk2004-06-041-10/+3
| | | | the linedisc directly.
* There is no need to explicitly call the stop function. In all likelyhoodphk2004-06-011-1/+0
| | | | ->l_close() did it and ttyclose certainly will.
* Add missing <sys/module.h> includesphk2004-05-302-0/+2
|
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-1/+2
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Device megapatch 4/6:phk2004-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.
* Device megapatch 3/6:phk2004-02-211-2/+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.
* Device megapatch 1/6:phk2004-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.
* Use __FBSDID().obrien2003-08-243-5/+10
| | | | Also some minor style cleanups.
* Prefer new location of pci include files (which have only been in theimp2003-08-221-2/+2
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* Undo single-intance inlining which is way above the comfort limit for GCC.phk2003-07-231-3/+2
|
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-031-13/+9
| | | | | | | | | | | | | 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)
* Remove #include <sys/dkstat.h>phk2003-02-161-1/+0
|
* Fix data corruption caused by last byte in oddly sized transfers being readtegge2002-10-201-2/+3
| | | | to wrong location in RxBuf and written from wrong location in TxBuf.
* Be consistent about functions being static.phk2002-10-163-5/+5
| | | | Spotted by: FlexeLint.
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-011-3/+3
| | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@
* Remove __P.alfred2002-03-201-5/+5
|
* #include "opt_compat.h" so that the support for old ioctls can actuallybde2002-02-151-0/+6
| | | | | | | | | | | | be compiled. Old tty ioctls are still used (possibly ifdef'ed) in at least the following programs in the src tree: atc des ee fontedit gdb gdbserver lock ntp perl5 tcsh telnet top vttest rp.c: Unremoved used variables so that the support for old ioctls actually compiles. Not tested at runtime by: bde
* Force the RxBuf and TxBuf arrays to be aligned on 16-bit boundaries togallatin2001-11-052-3/+3
| | | | | | make the driver work on alpha approved by: tanimura
* KSE Milestone 2julian2001-09-121-10/+10
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-261-1/+0
| | | | the bit-bucket.
* Convert more malloc+bzero to malloc+M_ZERO.dwmalone2000-12-083-14/+8
| | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
* Move suser() and suser_xxx() prototypes and a related #define fromphk2000-10-291-1/+0
| | | | | | | | | <sys/proc.h> to <sys/systm.h>. Correctly document the #includes needed in the manpage. Add one now needed #include of <sys/systm.h>. Remove the consequent 48 unused #includes of <sys/proc.h>.
* Remove unneeded #include <sys/proc.h> lines.phk2000-10-292-2/+0
|
* Fix a bug upon initialization. (_INDX_ADDR -> _INDX_DATA)tanimura2000-08-211-5/+6
|
* - Eliminate rpread(). Call generic ttyread(). (cf rev 1.33)tanimura2000-06-122-26/+7
| | | | | | | - Comment out deftermios. Termioschars() will give the default value. Pointed out by: bde
* 1. Update Comtrol RocketPort driver(rp) to version 3.02.tanimura2000-06-115-794/+1349
| | | | | | | | | | | | | | | | | | 2. Newbusify the driver. 3. Build as a module. 4. Use correct minor numbers when creating device files. 5. Correctly lock control characters. 6. Return ENXIO when device not configured. Submitted by: Tor Egge <Tor.Egge@fast.no> 7. Fix the baud_table. Submitted by: Elliot Dierksen <ebd@oau.org> Note: - the old driver still lives in src/sys/i386/isa, so that you can revert to it if something goes wrong. - The module does not detach very well. Attaching works fine.
* Mass update of isa drivers using compatability shims to usepeter2000-05-281-3/+8
| | | | COMPAT_ISA_DRIVER() so that we can get rid of the evil isa_compat.h table.
* Add $FreeBSD$peter2000-05-012-0/+4
|
OpenPOWER on IntegriCloud