| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Approved by: re (rwatson, blanket)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Submitted by: Vitaliy Skakun vit dot ska at gmail dot com
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
preference to some random negative number to allow other drivers a
bite at the apple.
|
| |
|
|
|
|
|
| |
Device names {cua,tty}R%r[.init,.lock] clashes with pty(4) driver
and allows for only 32 ports. This should probably be revisited.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Move dtrwait logic to the generic TTY level.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Bump __FreeBSD_version accordingly.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
linesw[] directly to using the ttyld...() functions
The ttyld...() functions ar inline so there is no performance hit.
|
|
|
|
| |
the linedisc directly.
|
|
|
|
| |
->l_close() did it and ttyclose certainly will.
|
| |
|
|
|
|
|
| |
Submitted by: Mark Santcroos <marks@ripe.net>
Reviewed by: imp, dfr, bde
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Also some minor style cleanups.
|
|
|
|
|
| |
tree for two or more years now), except in a few places where there's
code to be compatible with older versions of FreeBSD.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
| |
to wrong location in RxBuf and written from wrong location in TxBuf.
|
|
|
|
| |
Spotted by: FlexeLint.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
make the driver work on alpha
approved by: tanimura
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
the bit-bucket.
|
|
|
|
|
| |
Submitted by: josh@zipperup.org
Submitted by: Robert Drehmel <robd@gmx.net>
|
|
|
|
|
|
|
|
|
| |
<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>.
|
| |
|
| |
|
|
|
|
|
|
|
| |
- Comment out deftermios. Termioschars() will give the default
value.
Pointed out by: bde
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
COMPAT_ISA_DRIVER() so that we can get rid of the evil isa_compat.h table.
|
| |
|