Commit Graph

70 Commits

Author SHA1 Message Date
kan
d7b605c280 Deprecate machine/limits.h in favor of new sys/limits.h.
Change all in-tree consumers to include <sys/limits.h>

Discussed on:	standards@
Partially submitted by: Craig Rodrigues <rodrigc@attbi.com>
2003-04-29 13:36:06 +00:00
peter
a3df8808ca Add tunable "hw.eisa_slots" to allow overriding the default number
of slots (10).
2002-10-31 00:45:49 +00:00
jhb
acaaf5bab6 Argh, isa(4), eisa(4) and mca(4) now attach to legacy(4) instead of
nexus(4) in the case of machines w/o equivalent bridges on a PCI bus.

Reported by:	winter
Pointy hat to:	jhb
2002-09-26 18:40:06 +00:00
mux
603a77e75d - Use the __BUS_ACCESSOR macro for EISA_ACCESSOR instead
of reimplementing it.
- #undef EISA_ACCESSOR after use like we do for other accessors.

Reviewed by:	tmm
2002-08-20 12:32:06 +00:00
phk
1d270f9db2 GC various bits and pieces of USERCONFIG from all over the place. 2002-04-09 11:18:46 +00:00
alfred
ec62a8c79a Remove __P. 2002-03-20 02:08:01 +00:00
joerg
ef594ccbc6 Unbreak EISA. The PCI-EISA bridge bus is named eisab', not isab'.
This mistake seems to have been benign until very recently, probably
until msmith's PCI code reshuffle which cleaned up a lot of things.

Still, my AIC7770 doesn't work again, but it at least probes the
EISA bus now.
2001-02-09 16:33:53 +00:00
phk
8363061cc7 Mechanical change to use <sys/queue.h> macro API instead of
fondling implementation details.

Created with: sed(1)
Reviewed by: md5(1)
2001-02-04 13:13:25 +00:00
dwmalone
418e7e45d7 Convert more malloc+bzero to malloc+M_ZERO.
Submitted by:	josh@zipperup.org
Submitted by:	Robert Drehmel <robd@gmx.net>
2000-12-08 21:51:06 +00:00
jake
5e208b0c18 Back out the previous change to the queue(3) interface.
It was not discussed and should probably not happen.

Requested by:		msmith and others
2000-05-26 02:09:24 +00:00
jake
1d685644e0 Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct.

Suggested by:	phk
Reviewed by:	phk
Approved by:	mdodd
2000-05-23 20:41:01 +00:00
peter
fa1c8882f9 Pre 4.0 tidy up.
Collect together the components of several drivers and export eisa from
the i386-only area (It's not, it's on some alphas too).  The code hasn't
been updated to work on the Alpha yet, but that can come later.

Repository copies were done a while ago.
Moving these now keeps them in consistant place across the 4.x series
as the newbusification progresses.

Submitted by:   mdodd
2000-01-14 07:14:17 +00:00
mdodd
1f6b9e09d0 Remove the 'ivars' arguement to device_add_child() and
device_add_child_ordered().  'ivars' may now be set using the
device_set_ivars() function.

This makes it easier for us to change how arbitrary data structures are
associated with a device_t.  Eventually we won't be modifying device_t
to add additional pointers for ivars, softc data etc.

Despite my best efforts I've probably forgotten something so let me know
if this breaks anything.  I've been running with this change for months
and its been quite involved actually isolating all the changes from
the rest of the local changes in my tree.

Reviewed by:	peter, dfr
1999-12-03 08:41:24 +00:00
peter
b2ad3d87b2 Delete unneeded #include
Submitted by:	 phk
1999-10-11 14:42:33 +00:00
peter
e4b04a2b21 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
mdodd
3617862153 I'm not sure how this wasn't in the last commit but anyhow...
'int irq' -> 'struct irq_node *irq'
1999-08-02 20:01:40 +00:00
mdodd
372e91c674 Move the specification of EDGE/LEVEL triggered interrupts to
eisa_add_intr() which now takes an additional arguement (one of
EISA_TRIGGER_LEVEL or EISA_TRIGGER_EDGE).

The flag RR_SHAREABLE has no effect when passed to
bus_alloc_resource(dev, SYS_RES_IRQ, ...) in an EISA device context as
the eisa_alloc_resource() call (bus_alloc_resource method) now deals
with this flag directly, depending on the device ivars.

This change does nothing more than move all the 'shared = inb(foo + iobsse)'
nonesense to the device probe methods rather than the device attach.

Also, print out 'edge' or 'level' in the IRQ announcement message.

Reviewed by: dfr
1999-08-01 22:57:09 +00:00
mdodd
2d90e71a63 Restore the pre-new_bus behavior of printing out the reserved resources
during device announcement. (irq, ioport, maddr)

Reviewed by: dfr, peter
1999-07-30 13:54:00 +00:00
mdodd
7eab73ecf5 Alter the behavior of sys/kern/subr_bus.c:device_print_child()
- device_print_child() either lets the BUS_PRINT_CHILD
	  method produce the entire device announcement message or
	  it prints "foo0: not found\n"

Alter sys/kern/subr_bus.c:bus_generic_print_child() to take on
the previous behavior of device_print_child() (printing the
"foo0: <FooDevice 1.1>" bit of the announce message.)

Provide bus_print_child_header() and bus_print_child_footer()
to actually print the output for bus_generic_print_child().
These functions should be used whenever possible (unless you can
just use bus_generic_print_child())

The BUS_PRINT_CHILD method now returns int instead of void.

Modify everything else that defines or uses a BUS_PRINT_CHILD
method to comply with the above changes.

	- Devices are 'on' a bus, not 'at' it.
	- If a custom BUS_PRINT_CHILD method does the same thing
	  as bus_generic_print_child(), use bus_generic_print_child()
	- Use device_get_nameunit() instead of both
	  device_get_name() and device_get_unit()
	- All BUS_PRINT_CHILD methods return the number of
	  characters output.

Reviewed by: dfr, peter
1999-07-29 01:03:04 +00:00
dfr
134234b30b Add a hook for a bus to detect child devices which didn't find drivers.
This allows the bus to print an informative message about unknown devices.

Submitted by: Matthew N. Dodd <winter@jurai.net>
1999-07-11 13:42:37 +00:00
peter
4de3a92dd5 Handle suspend/resume methods
Obtained from: Warner Losh <imp@freebsd.org>
1999-06-22 09:44:00 +00:00
peter
986bb6361a Fix a [start,end] vs [start,count] botch that corrupted the resource
manager and prevented IOPort allocation beyond the first EISA slot from
working.  subr_rman.c should have trapped this on the way into the system
rather than tripping over the wreckage.

Head banged into wall repeatedly by:  "Matthew N. Dodd" <winter@jurai.net>
1999-05-24 03:08:46 +00:00
peter
2f58f5a9a9 Don't detect an EISA bus unless we see a "card" there somewhere. An EISA
motherboard will have a card for the "motherboard" on slot 0.
 eisa0: <EISA bus> on motherboard
 mainboard0: <ASU5101 (System Board)> at slot 0 on eisa0
This should stop the probe "detecting" an EISA bus everywhere that has
a 'controller eisa0' line regardless of whether it's really there.
1999-05-18 21:03:30 +00:00
dfr
5229d3887a Move the declaration of the interrupt type from the driver structure
to the BUS_SETUP_INTR call.
1999-05-08 21:59:43 +00:00
peter
0190d89761 Use consistant function definitions which also silences a warning. 1999-05-06 22:17:26 +00:00
peter
6e2ae9a7a7 GC some now unused (and #if 0) code. 1999-04-19 13:34:25 +00:00
peter
715f7f0d75 EISA can (or will) be a child of the i386 nexus on non-PCI systems. 1999-04-19 07:58:34 +00:00
peter
ae4ce8b340 Set the bus description for EISA, like it is for ISA. 1999-04-19 06:57:33 +00:00
peter
5268478dd1 Implement an EISA new-bus framework. The old driver probe mechanism
had a quirk that made a shim rather hard to implement properly and it was
just easier to convert the drivers in one go.  The changes to the
buslogic driver go beyond just this - the whole driver was new-bus'ed
including pci and isa.  I have only tested the EISA part of this so far.

Submitted by:	 Doug Rabson <dfr@nlsystems.com>
1999-04-18 15:50:35 +00:00
jdp
505ae30dab Replace includes of <sys/kernel.h> with includes of
<sys/linker_set.h> in those files that use only the linker set
definitions.
1999-01-14 06:22:10 +00:00
archie
dcdc1187e3 Examine all occurrences of sprintf(), strcat(), and str[n]cpy()
for possible buffer overflow problems. Replaced most sprintf()'s
with snprintf(); for others cases, added terminating NUL bytes where
appropriate, replaced constants like "16" with sizeof(), etc.

These changes include several bug fixes, but most changes are for
maintainability's sake. Any instance where it wasn't "immediately
obvious" that a buffer overflow could not occur was made safer.

Reviewed by:	Bruce Evans <bde@zeta.org.au>
Reviewed by:	Matthew Dillon <dillon@apollo.backplane.com>
Reviewed by:	Mike Spengler <mks@networkcs.com>
1998-12-04 22:54:57 +00:00
gibbs
371d0dd23e Fix list corruption and memory leak that could occur when
releasing EISA irqs.
1998-05-14 19:47:38 +00:00
eivind
86354cd8fc Staticize. 1998-02-09 06:11:36 +00:00
phk
0f7586cd71 Remove a bunch of variables which were unused both in GENERIC and LINT.
Found by:	-Wunused
1997-11-07 08:53:44 +00:00
bde
0ba390293e Removed unused #includes. 1997-10-28 15:59:26 +00:00
gibbs
5b3cc11c7d Add shared EISA interrupt support.
Clean up the match routines so that they return const char *
1997-09-21 21:35:24 +00:00
bde
d9011cba0b #include <machine/limits.h> explicitly in the few places that it is required. 1997-08-21 20:33:42 +00:00
fsmp
b5f418f903 Add several casts and include several header files to eliminate compiler
warnings.
1997-08-21 07:36:44 +00:00
bde
21d8bbe363 Removed unused #includes. 1997-07-20 06:31:09 +00:00
joerg
a784c01497 Various stylistic improvements regarding num_eisa_slots & co.:
. properly declare the variable in in a .h file, as opposed to
  using a private extern declaration in userconfig.c;
. move the definition of EISA_SLOTS and therefore the inclusion of
  opt_eisa.h into eisaconf.c.
1997-03-13 18:04:05 +00:00
joerg
af2729975a Since i don't see that anybody is implementing a more correct EISA
probing anytime soon, make EISA_SLOTS a fully supported option.  It's
required for the HP NetServer LC series machines.

Next stop: make dset(8) aware of it as well.
1997-03-12 17:41:35 +00:00
peter
c8dcd04895 Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not
ready for it yet.
1997-02-22 09:48:43 +00:00
jkh
9c0cd3f9df Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
joerg
12eaf39da7 Add a small hack to UserConfig that allows to override the number of
EISA slots to probe.  This is mainly intended to allow installing the
system on an HP Netserver with an on-board AIC7xxx EISA SCSI
controller, that is sitting on EISA slot # 11.

Documentation updates explaining this hack will follow shortly.

Note that this can go away again as soon as the EISA device probing
is more intelligent about the address space clash with the PCI address
space.

2.2 candidate.

Not objected by:	freebsd-core :)
1996-12-14 18:07:17 +00:00
bde
ae35a628bb Removed more devconf leftovers. 1996-09-10 23:31:13 +00:00
phk
d614fd226a Various cleanups for remanents of devconf. 1996-09-08 10:44:18 +00:00
phk
6eb6a7debf Remove devconf, it never grew up to be of any use. 1996-09-06 23:09:20 +00:00
bde
357511715d Don't depend in the kernel on the gcc feature of doing arithmetic on
pointers of type `void *'.  Warn about this in future.
1996-08-31 14:48:13 +00:00
gpalmer
b7df1cd597 Clean up -Wunused warnings.
Reviewed by:		bde
1996-06-12 05:11:41 +00:00
gibbs
ebf575c4fc Turn on SCB paging for aic7770 chips rev E or greater.
Update my copyrights.
1996-04-20 21:21:50 +00:00