Commit Graph

53152 Commits

Author SHA1 Message Date
jon
1ba46557a2 NEWCARD/Cardbus -
This commit adds support for Xircom X3201 based cardbus cards.
Support for the TDK 78Q2120 MII is also added.
IBM Etherjet, Intel and Xircom cards uses these chips.

Note that as a result of this commit, some Intel/DEC 21143 based cardbus
cards will also attach, but not get link.  That is being looked at.
2000-10-19 08:34:32 +00:00
jhb
18f874d5c5 Move init_clocks earlier in the system startup so that hardclock and clock
interrupts are started before the device probe.  This allows interrupt
threads to run during the device probe among other things.
2000-10-19 08:16:34 +00:00
msmith
703a356981 Write the routed interrupt back to PCI configuration space. 2000-10-19 08:07:23 +00:00
msmith
29922cc3b2 Call the BIOS to route the selected interrupt. Correctly calculate the
interrupt from the PCI routing table (ffs returns 1 for the rightmost
bit, not 0).
2000-10-19 08:06:50 +00:00
msmith
fabe339dd1 Add PCI BIOS function codes for IRQ routing fetch and route. 2000-10-19 08:02:46 +00:00
rwatson
be06217d29 o Introduce new VOP_ACCESS() flag VADMIN, allowing file systems to perform
"administrative" authorization checks.  In most cases, the VADMIN test
  checks to make sure the credential effective uid is the same as the file
  owner.
o Modify vaccess() to set VADMIN as an available right if the uid is
  appropriate.
o Modify references to uid-based access control operations such that they
  now always invoke VOP_ACCESS() instead of using hard-coded policy checks.
o This allows alternative UFS policies to be implemented by replacing only
  ufs_access() (such as mandatory system policies).
o VOP_ACCESS() requires the caller to hold an exclusive vnode lock on the
  vnode: I believe that new invocations of VOP_ACCESS() are always called
  with the lock held.
o Some direct checks of the uid remain, largely associated with the QUOTA
  and SUIDDIR code.

Reviewed by:	eivind
Obtained from:	TrustedBSD Project
2000-10-19 07:53:59 +00:00
jhb
03a08cfa61 Axe the idle_event eventhandler, and add a MD cpu_idle function used
for things such as halting CPU's, idling CPU's, etc.

Discussed with:	msmith
2000-10-19 07:47:16 +00:00
roger
bd09783654 Add Daniel's name and fix release data 2000-10-19 07:34:18 +00:00
roger
9905561893 Update to driver 2.17
Fixes bugs in devfs when unloading and reloading
Syncs with NetBSD changes

Submitted by:	Alexander Langer <alex@big.endian.de>
Submitted by:	Thomas Klausner <wiz@netbsd.org>
Submitted by:	Daniel O'Connor" <doconnor@gsoft.com.au>
2000-10-19 07:33:28 +00:00
bmah
b15f734c1f ObCommit from BSDCon: Update SMPng note and add an entry for devfs,
which hopefully reflect something of what grog and phk presented in their
talks.
2000-10-18 23:45:31 +00:00
joe
e7408712d4 Make these PICOBSD's compile... well, almost. Still some work to
do on PPP (atm problems.)
2000-10-18 22:02:33 +00:00
joe
13d94c16bd Reference Larry Wall's perlstyle man page, and recommend it's use where
entries in this guide don't override it.

Requested by:	markm

Comment on tabulation style.
2000-10-18 21:57:37 +00:00
des
dda07165ca Trim index lines down to 79 characters, not 80.
Approved by:	jkh
2000-10-18 20:16:26 +00:00
sos
173b42030e Minor changes to the ATA RAID support code, remove some verbosity
and put some under bootverbose..
2000-10-18 18:49:42 +00:00
joe
80592ae498 Use 'unless' instead of 'if (! ... )' where it improves readability. 2000-10-18 18:01:35 +00:00
peter
cdc5e446eb EVENTHANDLER_INVOKE() takes two arguments. 2000-10-18 17:56:06 +00:00
joe
33e1a18d8f Opening braces should be at the end of the controlling line. Else
and elsif belong on the same line as the closing brace for the
previous if or elsif block.

Suggested by:	des
2000-10-18 17:48:10 +00:00
peter
548f92e52d This didn't compile. Fix typo: s/rmang_get_start/rman_get_start/ 2000-10-18 17:45:29 +00:00
joe
b45e13d68b Contract a statement that's too verbose. 2000-10-18 17:34:43 +00:00
joe
542ba1fe32 There are enough examples of using 'my $var = ...' definitions, so remove
one.
2000-10-18 17:32:21 +00:00
joe
4c9afd32c6 All variables should be commented.
Local variables should be separated from function arguments by a
blank line.

Suggested by:	des
2000-10-18 17:25:59 +00:00
joe
af23edfcd0 Make subroutine prototypes mandatory.
The main code should be wrapped in a MAIN:{ ... } declaration.

Suggested by:	des
2000-10-18 17:21:54 +00:00
joe
8a5338b675 Fix the places that I missed last commit: 'vars' not 'var'. 2000-10-18 17:12:07 +00:00
kato
364f567078 Converted da' and wd' into rda' and rwd', respectively.
Submitted by:	MURAMATSU Atsushi <amura@ma3.seikyou.ne.jp>
2000-10-18 15:28:10 +00:00
ru
65e7901536 If we do not byte-swap the ip_id in the first place, don't do it in
the second.  NetBSD (from where I've taken this originally) needs
to fix this too.
2000-10-18 11:36:09 +00:00
peter
aff3298f1d Attempt to fix the random read blocking. The old code slept at
priority "0" and without PCATCH, so it was uninterruptable.  And
even when it did wake up after entropy arrived, it exited after the
wakeup without actually reading the freshly arrived entropy.  I
sent this to Mark before but it seems he is in transit.
Mark: feel free to replace this if it gets in your way.
2000-10-18 10:39:18 +00:00
jhb
c5a2ee8e05 Add in a simple API for memory barriers to machine/bus.h:
- barrier_read() enforces a memory read barrier
- barrier_write() enforces a memory write barrier
- barrier_rw() enforces a memory read/write barrier
2000-10-18 10:30:12 +00:00
imp
206b8e7135 Go ahead and disable the legacy mapping of the pcic registers on the
RF5C47x.  Before the code would only do this on the RF5C46x bridges.

Submitted by: Jonathan Chen
2000-10-18 09:55:39 +00:00
hm
dce11759a5 Add ifpnp driver to list of i4b hardware drivers. 2000-10-18 09:16:30 +00:00
kato
7df684211a Merged from sys/i386/i386/machdep.c revision 1.416. 2000-10-18 09:05:09 +00:00
hm
a0d9532dd8 Add a debug flag bit for a new driver. 2000-10-18 08:39:24 +00:00
jhb
a8ef58e07a Don't needlessly pass the diagnostic counter to the idle_event event
handlers.
2000-10-18 08:10:25 +00:00
jwd
51ce6f700c Use dd to better block the data being sent to /dev/random.
Note: I am not redirecting stdout so that the amount of
      data being transferred can be seen (22k and 576k currently).
2000-10-18 05:29:26 +00:00
mdodd
252f2ec727 Add new bus method 'GET_RESOURCE_LIST' and appropriate generic
implementation.

Add bus_generic_rl_{get,set,delete,release,alloc}_resource() functions
which provide generic operations for devices using resource list style
resource management.

This should simplify a number of bus drivers.  Further commits to follow.
2000-10-18 05:15:40 +00:00
jon
e7a48a62d9 Initial commit of NEWCARD cardbus side (that actually compiles and works)
Files:
	dev/cardbus/cardbus.c
	dev/cardbus/cardbusreg.h
	dev/cardbus/cardbusvar.h
	dev/cardbus/cardbus_cis.c
	dev/cardbus/cardbus_cis.h
	dev/pccbb/pccbb.c
	dev/pccbb/pccbbreg.h
	dev/pccbb/pccbbvar.h
	dev/pccbb/pccbb_if.m

This should support:
  - cardbus controllers:
    * TI 113X
    * TI 12XX
    * TI 14XX
    * Ricoh 47X
    * Ricoh 46X
    * ToPIC 95
    * ToPIC 97
    * ToPIC 100
    * Cirrus Logic CLPD683x
  - cardbus cards
    * 3c575BT
    * 3c575CT
    * Xircom X3201 (includes IBM, Xircom and, Intel cards)
    [ 3com support already in kernel, Xircom will be committed real soon now]

This doesn't work with 16bit pccards under NEWCARD.

Enable in your config by having "device pccbb" and "device cardbus".
(A "device pccard" will attach a pccard bus, but it means you system have
a high chance of panicing when a 16bit card is inserted)

It should be fairly simple to make a driver attach to cardbus under
NEWCARD -- simply add an entry for attaching to cardbus on a new
DRIVER_MODULE and add new device IDs as necessary.  You should also make
sure the card can be detached nicely without the interrupt routine doing
something weird, like going into an infinite loop.  Usually that should
entail adding an additional check when a pci register or the bus space is
read to check if it equals 0xffffffff.

Any problems, please let me know.

Reviewed by: imp
2000-10-18 03:37:21 +00:00
jon
2ea68e4cbc Initial commit of NEWCARD cardbus side (that actually compiles and works)
Files:
	dev/cardbus/cardbus.c
	dev/cardbus/cardbusreg.h
	dev/cardbus/cardbusvar.h
	dev/cardbus/cardbus_cis.c
	dev/cardbus/cardbus_cis.h
	dev/pccbb/pccbb.c
	dev/pccbb/pccbbreg.h
	dev/pccbb/pccbbvar.h
	dev/pccbb/pccbb_if.m

This should support:
  - cardbus controllers:
    * TI 113X
    * TI 12XX
    * TI 14XX
    * Ricoh 47X
    * Ricoh 46X
    * ToPIC 95
    * ToPIC 97
    * ToPIC 100
    * Cirrus Logic CLPD683x
  - cardbus cards
    * 3c575BT
    * 3c575CT
    * Xircom X3201 (includes IBM, Xircom and, Intel cards)
    [ 3com support already in kernel, Xircom will be committed real soon now]

This doesn't work with 16bit pccards under NEWCARD.

Enable in your config by having "device pccbb" and "device cardbus".
(A "device pccard" will attach a pccard bus, but it means you system have
a high chance of panicing when a 16bit card is inserted)

It should be fairly simple to make a driver attach to cardbus under
NEWCARD -- simply add an entry for attaching to cardbus on a new
DRIVER_MODULE and add new device IDs as necessary.  You should also make
sure the card can be detached nicely without the interrupt routine doing
something weird, like going into an infinite loop.  Usually that should
entail adding an additional check when a pci register or the bus space is
read to check if it equals 0xffffffff.

Any problems, please let me know.

Reviewed by: imp
2000-10-18 03:25:13 +00:00
imp
9b522ccacd Move auto doesn't work comment closer to config line 2000-10-18 03:14:37 +00:00
imp
f45f7b6f57 Remove some silly debug writes and code that we don't need 2000-10-18 02:22:39 +00:00
imp
eb655d4978 o Remove a boatload of debugging printfs.
o Report function number and config index on probe line
o Activate the resources (I hope) when RF_ACTIVE is set on those resources
  I'm allocating on behalf of my children.
o Always enable interrupts on multifunction cards in the multifunction
  register.
2000-10-18 02:21:00 +00:00
mdodd
7135780218 Use appropriate resource management accessors instead of directly
referencing structure members.

Use rman_get_size() instead of end - start + 1.
2000-10-18 00:09:26 +00:00
mdodd
c1ff60fd33 Add rman_get_size(), which does what you would expect.
Further commits to make use of this will follow.
2000-10-17 23:45:28 +00:00
jhb
e491d25442 - Wrap the sanity checks for staying in the idle loop for absurdly long
amounts of time in #ifdef DIAGNOSTIC
- Call vm_page_zero_idle() during the idle loop.
2000-10-17 23:12:37 +00:00
jhb
db38903b38 - Catch up to moving headers, machine/ipl.h -> sys/ipl.h
- Fix some whitespace bogons.

Submitted by:	bde (2)
2000-10-17 23:10:23 +00:00
des
06aa71d007 Work much harder at obtaining a correct device node. If what devname(3)
returns doesn't exist, or doesn't match the desired device, fall back to
scanning /dev for a matching node, and as a last resort, if that fails,
try to create the node ourselves as /dev/dump.

Add comments to several variables and functions.

Clean up syslog(3) usage; use %m instead of strerror(3).

Other minor cleanup.
2000-10-17 22:43:41 +00:00
imp
7db4385f89 Add a bunch of wireless cards from Japan. Shigeru YAMAMOTO-san
brought them to BSDcon and gratiously allowed me to test each one with
the wireless setup here.  In addition, support another CF card which
YAMAMOTO-san also brought.

Also add a Lexar CF card which didn't work with auto on many laptops.
2000-10-17 22:31:27 +00:00
jkh
771d6e6872 Remove random from boot floppy on advice of Mark Murray 2000-10-17 22:16:15 +00:00
imp
94d59b513e Implement resource alignment as discussed in arch@ a long time ago.
This was implemented by Shigeru YAMAMOTO-san and Jonathan Chen.  I've
cleaned them up somewhat and they seem to work well enough to boot
current (but given current's state it can be hard to tell).  Doug
Rabson also reviewed the design and signed off on it.
2000-10-17 22:08:03 +00:00
bmah
bec1b99956 Clarify the location of the kernel and modules.
Submitted by:	dcs
2000-10-17 20:32:04 +00:00
des
3152d59307 Argh! Fix passive mode selection (again) 2000-10-17 19:01:18 +00:00
mjacob
999bbf2509 Roll minor revision- for once we'll use this because.... if revision >= 5.4,
compile time will build in mutex locks, otherwise the old locking (splcam/splx
with a recursion counter) will be compiled in.

We still depend on config_intr_hook to tell us when it's okay to call
msleep instead of polling. It'd be real nice if we could do this early
enough to not hang up a machine struggling with a bad Fibre Channel loop,
but that's still to come.
2000-10-17 18:18:14 +00:00