272461 |
03-Oct-2014 |
gjb |
Copy stable/10@r272459 to releng/10.1 as part of the 10.1-RELEASE process.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
256281 |
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
254263 |
12-Aug-2013 |
scottl |
Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCI command register. The lazy BAR allocation code in FreeBSD sometimes disables this bit when it detects a range conflict, and will re-enable it on demand when a driver allocates the BAR. Thus, the bit is no longer a reliable indication of capability, and should not be checked. This results in the elimination of a lot of code from drivers, and also gives the opportunity to simplify a lot of drivers to use a helper API to set the busmaster enable bit.
This changes fixes some recent reports of disk controllers and their associated drives/enclosures disappearing during boot.
Submitted by: jhb Reviewed by: jfv, marius, achadd, achim MFC after: 1 day
|
196858 |
05-Sep-2009 |
imp |
These checks against BUSY aren't needed: the newbus layer does this already with the appropriate locks held... There's no need to do it here, so just delete the checks.
|
196403 |
20-Aug-2009 |
jhb |
Temporarily revert the new-bus locking for 8.0 release. It will be reintroduced after HEAD is reopened for commits by re@.
Approved by: re (kib), attilio
|
196037 |
02-Aug-2009 |
attilio |
Make the newbus subsystem Giant free by adding the new newbus sxlock. The newbus lock is responsible for protecting newbus internIal structures, device states and devclass flags. It is necessary to hold it when all such datas are accessed. For the other operations, softc locking should ensure enough protection to avoid races.
Newbus lock is automatically held when virtual operations on the device and bus are invoked when loading the driver or when the suspend/resume take place. For other 'spourious' operations trying to access/modify the newbus topology, newbus lock needs to be automatically acquired and dropped.
For the moment Giant is also acquired in some key point (modules subsystem) in order to avoid problems before the 8.0 release as module handlers could make assumptions about it. This Giant locking should go just after the release happens.
Please keep in mind that the public interface can be expanded in order to provide more support, if there are really necessities at some point and also some bugs could arise as long as the patch needs a bit of further testing.
Bump __FreeBSD_version in order to reflect the newbus lock introduction.
Reviewed by: ed, hps, jhb, imp, mav, scottl No answer by: ariff, thompsa, yongari Tested by: pho, G. Trematerra <giovanni dot trematerra at gmail dot com>, Brandon Gooch <jamesbrandongooch at gmail dot com> Sponsored by: Yahoo! Incorporated Approved by: re (ksmith)
|
193018 |
29-May-2009 |
ed |
Last minute TTY API change: remove mutex argument from tty_alloc().
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.
|
191563 |
27-Apr-2009 |
ambrisko |
Start to convert this over to the new tty layer. These changes allow this driver to compile and limp along with the new layer. These changes do not deal with proper locking around access to the HW. This is only a starting point. I have not tested modem control but tip seems to work okay and I can send and receive characters which I needed for one of my -current boxes. I have not tied this driver back up to the build since I don't want people to think it is ready for prime time. If anyone else has some cycles to work on this feel free to!
Also add support for a 16 port PCI interface I have at work.
Glanced at by: ed
|
183397 |
27-Sep-2008 |
ed |
Replace all calls to minor() with dev2unit().
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
|
171236 |
05-Jul-2007 |
peter |
Initialize DWBuf[3].
Approved by: re (rwatson, blanket)
|
171045 |
26-Jun-2007 |
remko |
Fix Rocketport so that it does not crash the system when a device pointer 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>
|
164439 |
20-Nov-2006 |
marius |
- Make rp(4) 64-bit- and endian-clean as well as work on strict alignment 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
|
154817 |
25-Jan-2006 |
jhb |
The UPCI 32 rp(4) card uses BAR 2 like the UPCI 80 card.
Submitted by: Vitaliy Skakun vit dot ska at gmail dot com MFC after: 3 days
|
153084 |
04-Dec-2005 |
ru |
Fix -Wundef from compiling the amd64 LINT.
|
152190 |
08-Nov-2005 |
jhb |
Fix support for multiple RocketPort cards in the same machine by including 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
|
151384 |
16-Oct-2005 |
phk |
we know it is called rpclose() so call it directly.
|
151383 |
16-Oct-2005 |
phk |
Eliminate two unused arguments to ttycreate().
|
144090 |
25-Mar-2005 |
jhb |
- Use pci_get_device() and pci_get_vendor() when we only want one part 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
|
142890 |
01-Mar-2005 |
imp |
Use BUS_PROBE_DEFAULT in preference to 0 and BUS_PROBE_LOW_PRIORITY in preference to some random negative number to allow other drivers a bite at the apple.
|
139749 |
06-Jan-2005 |
imp |
Start each of the license/copyright comments with /*-, minor shuffle of lines
|
136111 |
04-Oct-2004 |
phk |
Use tty layer generic code instead of local copy.
Device names {cua,tty}R%r[.init,.lock] clashes with pty(4) driver and allows for only 32 ports. This should probably be revisited.
|
135367 |
17-Sep-2004 |
phk |
Use ttyalloc() instead of ttymalloc(NULL)
|
132226 |
15-Jul-2004 |
phk |
Preparation commit for the tty cleanups that will follow in the near 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.
|
131981 |
11-Jul-2004 |
phk |
Introduce ttygone() which indicates that the hardware is detached.
Move dtrwait logic to the generic TTY level.
|
130892 |
21-Jun-2004 |
phk |
Put the pre FreeBSD-2.x tty compat code under BURN_BRIDGES.
|
130841 |
21-Jun-2004 |
gallatin |
Prevent the rp driver from panic'ing on first access and make at 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
|
130585 |
16-Jun-2004 |
phk |
Do the dreaded s/dev_t/struct cdev */ Bump __FreeBSD_version accordingly.
|
130344 |
11-Jun-2004 |
phk |
Deorbit COMPAT_SUNOS.
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.
|
130096 |
04-Jun-2004 |
phk |
Centralize the line discipline optimization determination in a function 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.
|
130077 |
04-Jun-2004 |
phk |
Machine generated patch which changes linedisc calls from accessing linesw[] directly to using the ttyld...() functions
The ttyld...() functions ar inline so there is no performance hit.
|
130057 |
04-Jun-2004 |
phk |
Make the remaining serial drivers call ttyioctl() rather than calling the linedisc directly.
|
129939 |
01-Jun-2004 |
phk |
There is no need to explicitly call the stop function. In all likelyhood ->l_close() did it and ttyclose certainly will.
|
129879 |
30-May-2004 |
phk |
Add missing <sys/module.h> includes
|
127135 |
17-Mar-2004 |
njl |
Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
|
126080 |
21-Feb-2004 |
phk |
Device megapatch 4/6:
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.
|
126078 |
21-Feb-2004 |
phk |
Device megapatch 3/6:
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.
|
126076 |
21-Feb-2004 |
phk |
Device megapatch 1/6:
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.
|
119418 |
24-Aug-2003 |
obrien |
Use __FBSDID(). Also some minor style cleanups.
|
119285 |
22-Aug-2003 |
imp |
Prefer new location of pci include files (which have only been in the tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
|
117926 |
23-Jul-2003 |
phk |
Undo single-intance inlining which is way above the comfort limit for GCC.
|
111815 |
03-Mar-2003 |
phk |
Gigacommit to improve device-driver source compatibility between 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)
|
111002 |
16-Feb-2003 |
phk |
Remove #include <sys/dkstat.h>
|
105538 |
20-Oct-2002 |
tegge |
Fix data corruption caused by last byte in oddly sized transfers being read to wrong location in RxBuf and written from wrong location in TxBuf.
|
105215 |
16-Oct-2002 |
phk |
Be consistent about functions being static.
Spotted by: FlexeLint.
|
93593 |
01-Apr-2002 |
jhb |
Change the suser() API to take advantage of td_ucred as well as do a 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@
|
92739 |
20-Mar-2002 |
alfred |
Remove __P.
|
90684 |
15-Feb-2002 |
bde |
#include "opt_compat.h" so that the support for old ioctls can actually 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
|
86082 |
05-Nov-2001 |
gallatin |
Force the RxBuf and TxBuf arrays to be aligned on 16-bit boundaries to make the driver work on alpha
approved by: tanimura
|
83366 |
12-Sep-2001 |
julian |
KSE Milestone 2 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
|
74810 |
26-Mar-2001 |
phk |
Send the remains (such as I have located) of "block major numbers" to the bit-bucket.
|
69781 |
08-Dec-2000 |
dwmalone |
Convert more malloc+bzero to malloc+M_ZERO.
Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
|
67893 |
29-Oct-2000 |
phk |
Move suser() and suser_xxx() prototypes and a related #define from <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>.
|
67882 |
29-Oct-2000 |
phk |
Remove unneeded #include <sys/proc.h> lines.
|
64890 |
21-Aug-2000 |
tanimura |
Fix a bug upon initialization. (_INDX_ADDR -> _INDX_DATA)
|
61581 |
12-Jun-2000 |
tanimura |
- Eliminate rpread(). Call generic ttyread(). (cf rev 1.33) - Comment out deftermios. Termioschars() will give the default value.
Pointed out by: bde
|
61541 |
11-Jun-2000 |
tanimura |
1. Update Comtrol RocketPort driver(rp) to version 3.02. 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.
|
61011 |
28-May-2000 |
peter |
Mass update of isa drivers using compatability shims to use COMPAT_ISA_DRIVER() so that we can get rid of the evil isa_compat.h table.
|
59874 |
01-May-2000 |
peter |
Add $FreeBSD$
|
51756 |
28-Sep-1999 |
phk |
Introduce ttyread() and ttywrite() which do the canonical thing.
Use them in many tty drivers.
Reviewed by: julian, bde
|
51658 |
25-Sep-1999 |
phk |
Remove five now unused fields from struct cdevsw. They should never have been there in the first place. A GENERIC kernel shrinks almost 1k.
Add a slightly different safetybelt under nostop for tty drivers.
Add some missing FreeBSD tags
|
51654 |
25-Sep-1999 |
phk |
This patch clears the way for removing a number of tty related fields in struct cdevsw:
d_stop moved to struct tty. d_reset already unused. d_devtotty linkage now provided by dev_t->si_tty.
These fields will be removed from struct cdevsw together with d_params and d_maxio Real Soon Now.
The changes in this patch consist of:
initialize dev->si_tty in *_open() initialize tty->t_stop remove devtotty functions rename ttpoll to ttypoll a few adjustments to these changes in the generic code a bump of __FreeBSD_version add a couple of FreeBSD tags
|
50477 |
28-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
50254 |
23-Aug-1999 |
phk |
Convert DEVFS hooks in (most) drivers to make_dev().
Diskslice/label code not yet handled.
Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers)
Add the correct hook for devfs to kern_conf.c
The net result of this excercise is that a lot less files depends on DEVFS, and devtoname() gets more sensible output in many cases.
A few drivers had minor additional cleanups performed relating to cdevsw registration.
A few drivers don't register a cdevsw{} anymore, but only use make_dev().
|
47640 |
31-May-1999 |
phk |
Simplify cdevsw registration.
The cdevsw_add() function now finds the major number(s) in the struct cdevsw passed to it. cdevsw_add_generic() is no longer needed, cdevsw_add() does the same thing.
cdevsw_add() will print an message if the d_maj field looks bogus.
Remove nblkdev and nchrdev variables. Most places they were used bogusly. Instead check a dev_t for validity by seeing if devsw() or bdevsw() returns NULL.
Move bdevsw() and devsw() functions to kern/kern_conf.c
Bump __FreeBSD_version to 400006
This commit removes: 72 bogus makedev() calls 26 bogus SYSINIT functions
if_xe.c bogusly accessed cdevsw[], author/maintainer please fix.
I4b and vinum not changed. Patches emailed to authors. LINT probably broken until they catch up.
|
47625 |
30-May-1999 |
phk |
This commit should be a extensive NO-OP:
Reformat and initialize correctly all "struct cdevsw".
Initialize the d_maj and d_bmaj fields.
The d_reset field was not removed, although it is never used.
I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way.
Vinum and i4b not modified, patches emailed to respective authors.
|
46813 |
09-May-1999 |
peter |
Simplify the COMPAT_PCI_DRIVER/DATA_SET hack. We can add: #define COMPAT_PCI_DRIVER(name,data) DATA_SET(pcidevice_set,data) .. to 2.2.x and 3.x if people think it's worth it. Driver writers can do this if it's not defined. (The reason for this is that I'm trying to progressively eliminate use of linker_sets where it hurts modularity and runtime load capability, and these DATA_SET's keep getting in the way.)
|
46571 |
06-May-1999 |
peter |
Fix up a few easy 'assignment used as truth value' and 'suggest parens around && within ||' type warnings. I'm pretty sure I have not masked any problems here, I've committed real problem fixes seperately.
|
46112 |
27-Apr-1999 |
phk |
Suser() simplification:
1: s/suser/suser_xxx/
2: Add new function: suser(struct proc *), prototyped in <sys/proc.h>.
3: s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/
The remaining suser_xxx() calls will be scrutinized and dealt with later.
There may be some unneeded #include <sys/cred.h>, but they are left as an exercise for Bruce.
More changes to the suser() API will come along with the "jail" code.
|
46027 |
24-Apr-1999 |
billf |
Add $Id: $
|
46024 |
24-Apr-1999 |
peter |
Use COMPAT_PCI_DRIVER() for registration if it exists. This shouldn't hurt the driver portability to 3.x too much for where drivers are shared.
|
45820 |
19-Apr-1999 |
peter |
Fix a braino from last commit.
|
45720 |
16-Apr-1999 |
peter |
Bring the 'new-bus' to the i386. This extensively changes the way the i386 platform boots, it is no longer ISA-centric, and is fully dynamic. Most old drivers compile and run without modification via 'compatability shims' to enable a smoother transition. eisa, isapnp and pccard* are not yet using the new resource manager. Once fully converted, all drivers will be loadable, including PCI and ISA.
(Some other changes appear to have snuck in, including a port of Soren's ATA driver to the Alpha. Soren, back this out if you need to.)
This is a checkpoint of work-in-progress, but is quite functional.
The bulk of the work was done over the last few years by Doug Rabson and Garrett Wollman.
Approved by: core
|
43425 |
30-Jan-1999 |
phk |
Use suser() to check for super user rather than examining cr_uid directly. Use TTYDEF_SPEED rather than 9600 a couple of places.
Reviewed by: bde, with a few grumbles.
|
42546 |
12-Jan-1999 |
eivind |
Silence warnings.
|
41591 |
07-Dec-1998 |
archie |
The "easy" fixes for compiling the kernel -Wunused: remove unreferenced static and local variables, goto labels, and functions declared but not defined.
|
38485 |
23-Aug-1998 |
bde |
Added D_TTY to the cdevswitch flags for all tty drivers. This is required for the Lite2 fix for always returning EIO in dead_read().
Cleaned up the cdevswitch initializers for all tty drivers.
Removed explicit calls to ttsetwater() from all (tty) drivers. ttsetwater() is now called centrally for opens, not just for parameter changes.
|
37683 |
15-Jul-1998 |
bde |
Changed %n to %r in devfs name format strings. %n has almost gone away.
|
36735 |
07-Jun-1998 |
dfr |
This commit fixes various 64bit portability problems required for FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change.
The prototype FreeBSD/alpha machdep will follow in a couple of days time.
|
35256 |
17-Apr-1998 |
des |
Seventy-odd "its" / "it's" typos in comments fixed as per kern/6108.
|
35210 |
15-Apr-1998 |
bde |
Support compiling with `gcc -ansi'.
|
33481 |
17-Feb-1998 |
jkh |
Support for >32 ports.
PR: 5765 Submitted by: Steve Gericke <steveg@comtrol.com>
|
33181 |
09-Feb-1998 |
eivind |
Staticize.
|
32043 |
28-Dec-1997 |
bde |
Removed unnecessary (and broken) wakeup code in rpstart(). There is no need to do it directly, since ttwwakeup() is always called just before returning from rpstart(). The brokenness was waking up the wrong address after clearing TS_SO_OLOWAT. It's not clear how processes waiting for output to drain below low water ever got woken up.
Found by: when I fixed longstanding warts in output watermark handling, this was the only driver that knew too much (anything) about the watermarks
|
32007 |
26-Dec-1997 |
jkh |
Change major number to match the one actually used (whoops!). Submitted by: Steve Gericke <steveg@comtrol.com>
|
31778 |
16-Dec-1997 |
eivind |
Make COMPAT_43 and COMPAT_SUNOS new-style options.
|
31577 |
06-Dec-1997 |
bde |
Use ENOIOCTL instead of -1 (= ERESTART) for tty ioctls that are not handled at a particular level. This fixes mainly restarting of interrupted TIOCDRAINs and TIOCSETA{W,F}s.
|
30354 |
12-Oct-1997 |
phk |
Last major round (Unless Bruce thinks of somthing :-) of malloc changes.
Distribute all but the most fundamental malloc types. This time I also remembered the trick to making things static: Put "static" in front of them.
A couple of finer points by: bde
|
29368 |
14-Sep-1997 |
peter |
Update select -> poll in drivers.
|
28987 |
01-Sep-1997 |
bde |
Removed unused #includes.
|
28986 |
01-Sep-1997 |
bde |
Fixed absolute pathnames in #includes.
|
28875 |
28-Aug-1997 |
jkh |
Patch for 3.0: #include <sys/fcntl.h> instead of <sys/ioctl.h>
|
28868 |
28-Aug-1997 |
jkh |
ISA driver for Comtrol Rocketport serial cards. No PCI probe stub was submitted to me. Submitted by: Amir Farah <amir@comtrol.com>
|