Commit Graph

80 Commits

Author SHA1 Message Date
Warner Losh
049d6489ab Make the eisa probe messages just like all the others in the system.
Make the eisa no match printf closer to pci.
2005-08-01 07:09:15 +00:00
Warner Losh
3c964602bd Now that the Adaptec 2842 has its own probe routine, no need to have
a comment saying its probe routine needs to be fixed.
2005-03-17 17:36:07 +00:00
Warner Losh
f9f5f61140 Style(9) pass before some planned larger changes.
o return (foo);
o if (a == NULL) in preference to if (!a)
o () and {} reduction
o minor indentation fixes
2005-03-17 17:33:52 +00:00
Warner Losh
098ca2bda9 Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
Justin T. Gibbs
fc838bef65 Remove outb to "prime" the EISA ID registers of each slot. This was
only required to support probing of the Adaptec 284X VLB SCSI controller
which becomes visible in EISA space if you perform these writes.  284X
probing is moving to an ISA attachment.
2004-08-16 22:05:53 +00:00
Nate Lawson
2c8509577d Use the slot, not an otherwise unused index variable as the probe offset.
This passed testing because the variable happened to be 0 in most cases.

Compile warning found by: David Syphers <dsyphers AT u.washington.edu>
2004-08-03 06:48:36 +00:00
Nate Lawson
37e783a63e Change EISA probing to be less invasive. Instead of probing all slots
unconditionally, stop after the first one (system board) if no EISA hardware
is detected.  This fixes a boot hang (i.e. Thinkpad) when ACPI is disabled.
Also, split the probe code into a separate function and do some style cleanup.

Note that the Adaptec 2842 VLB controller probe is broken by this change
and will fail to probe.  It should be fixed separately.
2004-08-03 00:41:47 +00:00
Warner Losh
09f3862add When adding files to the repo, it is very important to not forget
the cvs add function.
2004-06-09 16:56:22 +00:00
Warner Losh
6732641e0a Step 1 in moving EISA devices to kobj/newbus. Use kobj methods for
all of the interface between the driver and the bus.  This will enable
us to stop special casing eisa bus attachments in modules and treat them
like we treat all other busses.

In the longer run, we need to eliminate much (all?) of these interfaces
and switch to using the standard bus_alloc_resource(), but that's not
done right now.

# I've not updated the modules to include eisa, etc, just yet

Tested on: Compaq Proliant 3000/333 purchased for eisa work
2004-06-09 16:08:20 +00:00
David E. O'Brien
aad970f1fe Use __FBSDID().
Also some minor style cleanups.
2003-08-24 17:55:58 +00:00
Alexander Kabaev
104a9b7e3e 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 Wemm
700f053192 Add tunable "hw.eisa_slots" to allow overriding the default number
of slots (10).
2002-10-31 00:45:49 +00:00
John Baldwin
c1e309b38b 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
Maxime Henrion
6527574b75 - 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
Poul-Henning Kamp
2ce7d7a033 GC various bits and pieces of USERCONFIG from all over the place. 2002-04-09 11:18:46 +00:00
Alfred Perlstein
e51a25f850 Remove __P. 2002-03-20 02:08:01 +00:00
Joerg Wunsch
a9623898b8 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
Poul-Henning Kamp
fc2ffbe604 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
David Malone
7cc0979fd6 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 Burkholder
e39756439c 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 Burkholder
740a1973a6 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 Wemm
c5191a983c 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
Matthew N. Dodd
fe0d408987 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 Wemm
07bee188eb Delete unneeded #include
Submitted by:	 phk
1999-10-11 14:42:33 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Matthew N. Dodd
dfc196bf2a 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
Matthew N. Dodd
0d6ab4a16a 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
Matthew N. Dodd
24116fdd0a 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
Matthew N. Dodd
15317dd875 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
Doug Rabson
ca7036d8cb 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 Wemm
8d5481c633 Handle suspend/resume methods
Obtained from: Warner Losh <imp@freebsd.org>
1999-06-22 09:44:00 +00:00
Peter Wemm
578de0426e 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 Wemm
ab25d374b2 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
Doug Rabson
566643e39e 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 Wemm
5e80440b17 Use consistant function definitions which also silences a warning. 1999-05-06 22:17:26 +00:00
Peter Wemm
896de22812 GC some now unused (and #if 0) code. 1999-04-19 13:34:25 +00:00
Peter Wemm
e51d99dc81 EISA can (or will) be a child of the i386 nexus on non-PCI systems. 1999-04-19 07:58:34 +00:00
Peter Wemm
bed56f7f4d Set the bus description for EISA, like it is for ISA. 1999-04-19 06:57:33 +00:00
Peter Wemm
a49a3d4433 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
John Polstra
0ec81012da 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 Cobbs
2127f26023 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
Justin T. Gibbs
c3f80129dc Fix list corruption and memory leak that could occur when
releasing EISA irqs.
1998-05-14 19:47:38 +00:00
Eivind Eklund
303b270b0a Staticize. 1998-02-09 06:11:36 +00:00
Poul-Henning Kamp
4a11ca4e29 Remove a bunch of variables which were unused both in GENERIC and LINT.
Found by:	-Wunused
1997-11-07 08:53:44 +00:00
Bruce Evans
55b211e3af Removed unused #includes. 1997-10-28 15:59:26 +00:00
Justin T. Gibbs
953ba64df7 Add shared EISA interrupt support.
Clean up the match routines so that they return const char *
1997-09-21 21:35:24 +00:00
Bruce Evans
b1037dcd53 #include <machine/limits.h> explicitly in the few places that it is required. 1997-08-21 20:33:42 +00:00
Steve Passe
21197eb230 Add several casts and include several header files to eliminate compiler
warnings.
1997-08-21 07:36:44 +00:00
Bruce Evans
8f0169c8a8 Removed unused #includes. 1997-07-20 06:31:09 +00:00
Joerg Wunsch
5cf816c239 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