Commit Graph

5275 Commits

Author SHA1 Message Date
Takanori Watanabe
7a1d55dfd0 Change Embedded Controller lock to ACPI Global Lock.This is needed for
mutual execution between  BIOS and OS.
2001-01-02 05:22:35 +00:00
Matt Jacob
afd27fce94 Sanity check ptr for legal values so it is less likely
(but not impossible) to get stuck in an infinite loop.

Obtained from:	msmith@freebsd.org
2001-01-01 16:49:31 +00:00
Matt Jacob
91f1caa2d8 Fix problems with incomplete conversions from printf to isp_prt. 2000-12-31 20:50:56 +00:00
Poul-Henning Kamp
8f8def9e2c This is the first snapshot of the new all-singing-and-dancing md(4).
Using the mdconfig(8) program you can now configure memory disks
on malloc(9), swap or a file/vnode.  preloaded md disks also work
as usual.
2000-12-31 13:03:42 +00:00
Matt Jacob
56c6d0d775 Change the modification of what could be a const string. Apparently the
construct:

	char *foo;
	...
	foo = "XXX";
	...
	foo[1] = 'Y';

is wrong. IT blew up on NetBSD-sparc64 because that platform write-protects
constant strings.
2000-12-30 20:09:26 +00:00
Matt Jacob
e9423e211e Add in Bill Sommerfeld's -Wformat stuff. Add a ISP_CFG_NOINIT option
to keep from completing initialization when isp_init is called.
2000-12-29 19:17:18 +00:00
Matt Jacob
8ead30564e Add in Bill Sommerfelds -Wformat changes. Set up default node && port
WWNs correctly (Again!) - this time for the case that we're not going
to fully init the adapter if isp_init is called (with ISP_CFG_NOINIT
set in options). The pupose for this is to bring the adapter up to
almost ready to go, get info out of NVRAM, but to not start it up- leaving
it until later to actually start things up if wanted (and possibly with
different roles selected).
2000-12-29 19:12:44 +00:00
Matt Jacob
f09b192280 Set up to do a local interrupt fielding before calling common code-
allows us to grab lock as we should.
2000-12-29 19:10:16 +00:00
Matt Jacob
c40e096ed6 Make sure we do locking if we call isp_intr.
Make sure we enter Giant for now if we call into cam for completion.
2000-12-29 19:06:32 +00:00
Paul Richards
8fcbbfe4a3 The pci and isa drivers were meant to share the same devclass but
the devclass definitions were all wrong so they had their own private
ones with the same name.

Fix it so they all use the same global devclass.
2000-12-29 11:59:41 +00:00
Paul Richards
7716c31841 Set a lower probe return value for PCI cards so that the pcn driver wins. 2000-12-29 11:41:18 +00:00
Mike Smith
39a8493ac0 Hack in interrupt routing support (using the core $PIR support, not using
ACPICA properly).  This makes it possible to use ACPICA in conjunction with
CardBus before I get around to implementing ACPI/PCI interrupt routing.
2000-12-29 09:42:05 +00:00
Paul Richards
b31d9f17b1 Fix a legacy issue. The offset for reading the MAC address is 0 using
bus space, not iosize which is what it was when using inb().
2000-12-29 04:41:52 +00:00
Matt Jacob
7325560821 add a couple off offset defines for ATIO2s 2000-12-28 23:27:54 +00:00
Matt Jacob
355981d7c6 roll to 2.01.26 level 2000-12-28 23:23:28 +00:00
Matt Jacob
932269b52e remove MAINTAINER file 2000-12-28 23:23:11 +00:00
Mike Smith
0b94a66e3f Major bugfix and minor update. This should resolve the current issues
with the driver locking up under load.

 - Restructure so that we use a static pool of commands/FIBs, rather than
   allocating them in clusters.  The cluster allocation just made things
   more complicated, and allowed us to waste more memory in peak load
   situations.
 - Make queueing macros more like my other drivers.  This adds queue stats
   for free.  Add some debugging to take advantage of this.
 - Reimplement the periodic timeout scan.  Kick the interrupt handler
   and the start routine every scan as well, just to be safe.  Track busy
   commands properly.
 - Bring resource cleanup into line with resource allocation.  We should
   now clean up correctly after a failed probe/unload/etc.
 - Try to start new commands when old ones are completed.  We weren't doing
   this before, which could lead to deadlock when the controller was full.
 - Don't try to build a new command if we have found a deferred command.
   This could cause us to lose the deferred command.
 - Use diskerr() to report I/O errors.
 - Don't bail if the AdapterInfo structure is the wrong size.  Some variation
   seems to be normal.  We need to improve our handing of 2.x firmware sets.
 - Improve some comments in an attempt to try to make things clearer.
 - Restructure to avoid some warnings.
2000-12-27 13:14:56 +00:00
Cameron Grant
826737698c change irq handler slightly, get rid of superflous messages 2000-12-27 04:04:36 +00:00
Søren Schmidt
6cf4911dd6 Use M_ZERO flag on malloc when approbiate. 2000-12-26 12:05:49 +00:00
Søren Schmidt
dec35f9164 Update the burncd interface a bit, dont block the ATA channel on
blank & fixate commands and provide a progress interface for the
blank command (for now)
2000-12-26 11:55:44 +00:00
Søren Schmidt
ce3598adfe Use diskerr for printing disk hard/soft errors. 2000-12-26 11:49:57 +00:00
Seigo Tanimura
307afaf3c6 Add OZO8008 - Zoom (33.6k Modem).
PR:		kern/23336
Submitted by:	Paulo Menezes <root@samurai.dee.uc.pt>
2000-12-26 06:52:57 +00:00
Warner Losh
cc9e9343cd Minor newbus/style(9) cleanups.
o Move the ax88190 code to its own function.
o Move all device_method_t, driver_t and DRIVER_MODULE definitions to the
  end of files.
o Wrap a few lines > 80 characters.
o Use the same devclass for all ed drivers.  This allows machines with
  multiple types of cards to have their cards numbered correctly.  Before,
  you could wind up with two ed0's.
o Protect if_edvar.h from multiple includes because I was there.
2000-12-26 06:38:04 +00:00
Cameron Grant
b87eb3b531 move parametric defines and structure definitions from .h to .c 2000-12-25 02:49:28 +00:00
Cameron Grant
a6b5683876 indent debugging printfs, change a couple of messages slightly 2000-12-25 02:21:16 +00:00
Cameron Grant
6a2e12e0dd update to return correct blocksize- these chips have a fixed irq rate, so
block size varies only with format and rate.
2000-12-25 01:42:13 +00:00
Mitsuru IWASAKI
917d44c856 Add ioctls to acpi_cmbat and acpi_acad. These use mike's acpi_register_ioctl().
Fix wrong AML method calling in acpi_cmbat.
2000-12-24 19:12:10 +00:00
Cameron Grant
f0fb042e84 fairly substantial rewrite- seperate out play/record code, implement
setblocksize, simplify resource allocation
2000-12-24 03:56:41 +00:00
Cameron Grant
6a6ee5bb35 compensate for broken codecs that return 0xffff on unimplemented registers
instead of 0.
2000-12-24 03:33:21 +00:00
Cameron Grant
ac083c91f8 implement setblocksize properly 2000-12-23 22:24:43 +00:00
Cameron Grant
f4084c4526 fix a panic if the requested blocksize was greater than the data rate,
resulting in a divide by 0.
2000-12-23 06:09:43 +00:00
Cameron Grant
e246070f8a kill a warning 2000-12-23 05:19:32 +00:00
Cameron Grant
b4f8389d56 fix a typo 2000-12-23 05:16:39 +00:00
Cameron Grant
350a5fafb1 update code dealing with snd_dbuf objects to do so using a functional interface
modify chn_setblocksize() to pick a default soft-blocksize appropriate to the
sample rate and format in use.  it will aim for a power of two size small
enough to generate block sizes of at most 20ms.  it will also set the
hard-blocksize taking into account rate/format conversions in use.

update drivers to implement setblocksize  correctly:
updated, tested: 	sb16, emu10k1, maestro, solo
updated, untested: 	ad1816, ess, mss, sb8, csa
not updated: 		ds1, es137x, fm801, neomagic, t4dwave, via82c686

i lack hardware to test: ad1816, csa, fm801, neomagic
others will be updated/tested in the next few days.
2000-12-23 03:16:13 +00:00
Mike Smith
29e79e51ee Probe generic i960 devices for the old AMI signature as well as the current
one, in order to support adapters with older firmware.

Submitted by:	"Prasanth S." <prasanths@ami.co.in>
2000-12-22 22:23:56 +00:00
Takanori Watanabe
d8c616aedc Add ACPI AC adaptor and ACPI Control Method Battery.
And install notify handler for thermal zone .
2000-12-22 14:41:55 +00:00
Bosko Milekic
2a0c503e7a * Rename M_WAIT mbuf subsystem flag to M_TRYWAIT.
This is because calls with M_WAIT (now M_TRYWAIT) may not wait
  forever when nothing is available for allocation, and may end up
  returning NULL. Hopefully we now communicate more of the right thing
  to developers and make it very clear that it's necessary to check whether
  calls with M_(TRY)WAIT also resulted in a failed allocation.
  M_TRYWAIT basically means "try harder, block if necessary, but don't
  necessarily wait forever." The time spent blocking is tunable with
  the kern.ipc.mbuf_wait sysctl.
  M_WAIT is now deprecated but still defined for the next little while.

* Fix a typo in a comment in mbuf.h

* Fix some code that was actually passing the mbuf subsystem's M_WAIT to
  malloc(). Made it pass M_WAITOK instead. If we were ever to redefine the
  value of the M_WAIT flag, this could have became a big problem.
2000-12-21 21:44:31 +00:00
Takanori Watanabe
e3c6e05e3c Re-Enable OSD_PRIORITY_GPE. Now 20001215 has been commited. 2000-12-21 07:47:43 +00:00
Mitsuru IWASAKI
441a762864 Disable my previous committed code for a moment.
Note to myself: this needs to be enabled again when newer version of
ACPI is imported.
2000-12-20 20:22:47 +00:00
Mitsuru IWASAKI
912c8c65d2 Add task priority definition for OSD_PRIORITY_GPE in AcpiOsQueueForExecution().
This is needed to next ACPICA import.
2000-12-20 19:15:38 +00:00
Toshihiko ARAI
eb13a47275 Fix my previous commit. Remove ed_get_Linksys() function prototypes. 2000-12-20 17:10:28 +00:00
Takanori Watanabe
b37c9b907b Change priority of procedure queueing.
This is needed to next ACPICA import.
2000-12-20 17:00:33 +00:00
Justin T. Gibbs
98f89aa0a9 Add PCIR_CAP_PTR as a define for the location of the capability
pointer of type 0 devices.  This is required by my last aic7xxx change.
2000-12-20 14:36:52 +00:00
Dag-Erling Smørgrav
a8513d6f69 Re-commit revision 1.32, which grog incorrectly backed out in revision 1.33. 2000-12-20 11:17:09 +00:00
Nick Hibma
ad979802f6 Initialise rcmdlen.
Submitted by:	Ian Dowse <iedowse@maths.tcd.ie>
2000-12-20 09:37:35 +00:00
Cameron Grant
688ca063da fix a debugging leftover (min speed=48khz) 2000-12-20 05:21:17 +00:00
Greg Lehey
7509f91aba revive_block: Don't go beyond the end of the stripe when reviving
striped plexes.

Submitted by:   des

Don't lock buffers before calls to sdio, sdio does it by itself.

Submitted by:	tegge

parityops:	Use correct casts when returning error information.
2000-12-20 05:18:58 +00:00
Greg Lehey
06694e9333 build_rq_buffer: Note which buffer headers we lock.
sdio: Unlock the buffer if we fail.

Submitted by:	tegge
2000-12-20 05:18:09 +00:00
Greg Lehey
e8c0649946 Rearrange #includes to make more sense. This is still not the reform
that bde is waiting to see, but at least it works.
2000-12-20 05:17:29 +00:00
Greg Lehey
3daf911efe Rename detached plexes and subdisks correctly (off by one error)
Submitted by:	Terry Glanfield <Terry.Glanfield@program-products.co.uk>
2000-12-20 05:16:46 +00:00
Greg Lehey
ed4963f8e1 open_drive: Add support for more than 32 devices of a particular kind.
Requested by:	Bernd Walter <ticso@cicely8.cicely.de>
		Cor Bosman <cor@xs4all.net>
		Kai Storbeck <kai@xs4all.net>
		Joe Greco <jgreco@ns.sol.net>

	     Add support for Compaq SMART-2 RAID (idad) as storage
	     device for Vinum subdisks.

Reported by:	Aaron Hill <hillaa@hotmail.com>
2000-12-20 05:15:50 +00:00
Greg Lehey
e872ce018e give_plex_to_volume: Recalculate volume size after attaching.
Cosmetics.
2000-12-20 05:13:26 +00:00
Greg Lehey
4fd45755c5 Add flag XFR_BUFLOCKED to identify buffers which have been locked.
Part of fix to ensure that we unlock buffers we lock.

In principle submitted by: tegge
2000-12-20 05:10:08 +00:00
Justin T. Gibbs
56a7c4a852 ahc_eisa.c:
ahc_pci.c:
		Add detach support.

		Make use of soft allocated on our behalf by newbus.

		For PCI devices, disable the mapping type we aren't
		using for extra protection from rogue code.

	aic7xxx_93cx6.c:
	aic7xxx_93cx6.h:
		Sync perforce IDs.

	aic7xxx_freebsd.c:
		Capture the eventhandle returned by EVENTHANDER_REGISTER
		so we can kill the handler off during detach.

		Use AHC_* constants instead of hard coded numbers in a
		few more places.

		Test PPR option state when deciding to "really" negotiate
		when the CAM_NEGOTIATE flag is passed in a CCB.

		Make use of core "ahc_pause_and_flushwork" routine in our
		timeout handler rather than re-inventing this code.

		Cleanup all of our resources (really!) in ahc_platform_free().
		We should be all set to become a module now.

		Implement the core ahc_detach() routine shared by all of
		the FreeBSD front-ends.

	aic7xxx_freebsd.h:
		Softc storage for our event handler.

		Null implementation for the ahc_platform_flushwork() OSM
		callback.  FreeBSD doesn't need this as XPT callbacks are
		safe from all contexts and are done directly in ahc_done().

	aic7xxx_inline.h:
		Implement new lazy interrupt scheme.  To avoid an extra
		PCI bus read, we first check our completion queues to
		see if any work has completed.  If work is available, we
		assume that this is the source of the interrupt and skip
		reading INTSTAT.  Any remaining interrupt status will be
		cleared by a second call to the interrupt handler should
		the interrupt line still be asserted.  This drops the
		interrupt handler down to a single PCI bus read in the
		common case of I/O completion.  This is the same overhead
		as in the not so distant past, but the extra sanity of
		perforning a PCI read after clearing the command complete
		interrupt and before running the completion queue to avoid
		missing command complete interrupts added a cycle.

	aic7xxx.c:
		During initialization, be sure to initialize all scratch
		ram locations before they are read to avoid parity errors.
		In this case, we use a new function, ahc_unbusy_tcl() to
		initialize the scratch ram busy target table.

		Replace instances of ahc_index_busy_tcl() used to unbusy
		a tcl without looking at the old value with ahc_unbusy_tcl().

		Modify ahc_sent_msg so that it can find single byte messages.
		ahc_sent_msg is now used to determine if a transfer negotiation
		attempt resulted in a bus free.

		Be more careful in filtering out only the SCSI interrupts
		of interest in ahc_handle_scsiint.

		Rearrange interrupt clearing code to ensure that at least
		one PCI transaction occurrs after hitting CLRSINT1 and
		writting to CLRINT.  CLRSINT1 writes take a bit to
		take effect, and the re-arrangement provides sufficient
		delay to ensure the write to CLRINT is effective.  The
		old code might report a spurious interrupt on some "fast"
		chipsets.

		export ahc-update_target_msg_request for use by OSM code.

		If a target does not respond to our ATN request, clear
		it once we move to a non-message phase.  This avoids
		sending a MSG_NOOP in some later message out phase.

		Use max lun and max target constants instead of
		hard-coded values.

		Use softc storage built into our device_t under FreeBSD.

		Fix a bug in ahc_free() that caused us to delete
		resources that were not allocated.

		Clean up any tstate/lstate info in ahc_free().

		Clear the powerdown state in ahc_reset() so that
		registers can be accessed.

		Add a preliminary function for pausing the chip and
		processing any posted work.

		Add a preliminary suspend and resume functions.

	aic7xxx.h:
		Limit the number of supported luns to 64.  We don't
		support information unit transfers, so this is the
		maximum that makes sense for these chips.

		Add a new flag AHC_ALL_INTERRUPTS that forces the
		processing of all interrupt state in a single invokation
		of ahc_intr().  When the flag is not set, we use the
		lazy interrupt handling scheme.

		Add data structures to store controller state while
		we are suspended.

		Use constants instead of hard coded values where appropriate.

		Correct some harmless "unsigned/signed" conflicts.

	aic7xxx.seq:
		Only perform the SCSIBUSL fix on ULTRA2 or newer controllers.
		Older controllers seem to be confused by this.

		In target mode, ignore PHASEMIS during data phases.
		This bit seems to be flakey on U160 controllers acting
		in target mode.

	aic7xxx_pci.c:
		Add support for the 29160C CPCI adapter.

		Add definitions for subvendor ID information
		available for devices with the "9005" vendor id.
		We currently use this information to determine
		if a multi-function device doesn't have the second
		channel hooked up on a board.

		Add rudimentary power mode code so we can put the
		controller into the D0 state.  In the future this
		will be an OSM callback so that in FreeBSD we don't
		duplicate functionality provided by the PCI code.
		The powerstate code was added after I'd completed
		my regression tests on this code.

		Only capture "left over BIOS state" if the POWRDN
		setting is not set in HCNTRL.

		In target mode, don't bother sending incremental
		CRC data.
2000-12-20 01:11:37 +00:00
Nicolas Souchu
1afd1f9956 Fix the PR. Getting a dma channel equal to 0 remains a problem though.
PR:		i386/22568
2000-12-19 21:28:17 +00:00
Mitsuru IWASAKI
5f3e417548 Fix testing reboot howto flags in acpi_shutdown_final().
This sould make the system power-off correctly where the howto had
more bits set than RB_POWEROFF, e.g. RB_NOSYNC.

Submitted by:	Peter Pentchev <roam@orbitel.bg>
2000-12-19 15:45:11 +00:00
Søren Schmidt
43a181118f Proberly back down DMA modes on the Acer Aladdin. 2000-12-19 10:37:03 +00:00
Assar Westerlund
315a164546 un-staticize M_AGP so that it can be used in agp*.c 2000-12-19 08:32:37 +00:00
John Baldwin
6d0006c203 Convert the sio driver to use a spin mutex instead of a s_lock. This is
going to hurt sio(4) performance for the time being.  As we get closer to
release and have more of the kernel unlocked we can come back to doing
arcane optimizations to workaround the limitations of the sio hardware.
2000-12-18 23:56:16 +00:00
John Baldwin
430e72ee1c Attempt to read and verify the card's status in wi_stop() before sending it
the disable command.  On some systems, writing to the card after it has
been ejected causes the machine to hang.

Reviewed by:	wpaul
2000-12-18 23:49:56 +00:00
Bill Paul
8d79969459 Add power state manipulation to the fxp driver. Some people have
claimed that their Intel NIC is comatose after a warm boot from Windoze.
This is most likely due to the card getting put in the D3 state. This
should bring it back to life.
2000-12-18 22:06:12 +00:00
Bill Paul
14a00c6c68 Use pci_get_powerstate()/pci_set_powerstate() which now exists in the
PCI code. This saves each driver from having to grovel around looking
for the right registers to twiddle.

I should eventually convert the other PCI drivers to do this; for now,
these three are ones which I know need power state handling.
2000-12-18 21:53:05 +00:00
Julian Elischer
589f6ed8ce Divorce the kernel binary ABI version number from the message
format version number. (userland programs should not need to be
recompiled when the netgraph kernel internal ABI is changed.

Also fix modules that don;t handle the fact that a caller may not supply
a return message pointer. (benign at the moment because the calling code
checks, but that will change)
2000-12-18 20:03:32 +00:00
Toshihiko ARAI
d556784aa3 Linksys Fast Ethernet PCCARD cards supported by the ed driver now
require the addition of flag 0x80000 to their config line in
pccard.conf(5).  This flag is not optional.  These Linksys cards will
not be recognized without it.

Reviewed by:    imp, iwasaki
2000-12-18 15:28:53 +00:00
Cameron Grant
0f55ac6c1a kobjify.
this gives us several benefits, including:

* easier extensibility- new optional methods can be added to
  ac97/mixer/channel classes without having to fixup every driver.

* forward compatibility for drivers, provided no new mandatory methods are
  added.
2000-12-18 01:36:41 +00:00
Warner Losh
95b2cbbc17 Call ed_probe_Novel in the AX88190 case as well.
Remove stary blank line.

Submitted by:	Seigo Tanimura <tanimura@r.dl.itc.u-tokyo.ac.jp>
2000-12-17 18:15:15 +00:00
Poul-Henning Kamp
b600010a5b Add a cloning function to vn(4) which triggers on "vn%d.ctl". Give the
.ctl devices their own cdevsw since no I/O can or should be done on them.

Vn(4) is still not entirely DEVFS friendly since it only creates vn%d
nodes.
2000-12-16 16:06:03 +00:00
Paul Richards
d4dc2d4d0f Switch off some debugging code. 2000-12-16 03:29:27 +00:00
Paul Richards
3a173aeeb3 Fixup some problems with the merged code of the previous commit. 2000-12-16 01:41:14 +00:00
Paul Richards
232b06012c Newbusify.
Temporarily disable PC98 until I bring it up to date.
2000-12-16 01:33:28 +00:00
Bill Paul
163369c243 Apply some contributed patches to reduce number of tx buffer allocation
failures and add some support for WEP on Prism II chip.

Submitted by: YAMAMOTO Shigeru <shigeru@iij.ad.jp>
2000-12-15 23:34:13 +00:00
Poul-Henning Kamp
e0913a2c44 Enforce disk unit numbers upper limit in cloning. 2000-12-15 16:42:38 +00:00
Takanori Watanabe
874d21b468 Fix with debugging option.
Submitted by:	haro@tk.kubota.co.jp
2000-12-15 09:18:11 +00:00
Takanori Watanabe
c07572e7ad Make Embedded Controller driver interrupt driven. 2000-12-14 12:43:22 +00:00
Marcel Moolenaar
75a1da1e7a Fix include directories for crossbuilding.
aicasm is run on the build machine and therefore needs to be
compiled and linked against the headers and libraries (resp)
of the build machine. Since normally the default include
directories are search after any specified on the command
line, make sure we don't accidentally pick up machine
dependent headers from the kernel compile directory by
specifying /usr/include first.

This solves the (cross) build problem for ia64.

Approved by: gibbs
2000-12-13 23:15:12 +00:00
Seigo Tanimura
5dfa801a91 Include vm/vm_zone.h prior to vm/swap_pager.h.
Noticed by:	Michael Harnois <mdharnois@home.com>
Submitted by:	assar
2000-12-13 17:36:03 +00:00
Warner Losh
727928f866 Remove unnecessary includes found by phk's script. I've been building
these locally for ages.
2000-12-13 06:28:37 +00:00
Warner Losh
3a68d6087a Fix problem with ax88190 based cards trying to probe further after
matching the ax88190.
2000-12-13 06:27:23 +00:00
Warner Losh
b76f687a7e Remove unnecessary includes found by phk's script a long time ago. 2000-12-13 06:25:22 +00:00
Warner Losh
b66fd62112 Add module dependencies on CAM module.
Submitted by:	Michael Reifenberger
2000-12-13 05:46:23 +00:00
Mike Smith
70b5f189c9 Remove a redundant prototype. 2000-12-13 04:22:04 +00:00
Mike Smith
3742d6ca91 Don't try to free the now-nonexistent hdrspec field. This one snuck by
me in the previous round of patches.  Oops.
2000-12-13 02:45:03 +00:00
Warner Losh
6763347475 Add isa support:
o write isa driver routines.
o factor detach routine in sn_detach.
2000-12-13 01:47:19 +00:00
Mike Smith
84c6b37d74 Updates to match changes elsewhere in the PCI subsystem:
- Remove redundant header-type-specific support in the cardbus pcibus
   clone.  The bridges don't need this anymore.
 - Use pcib_get_bus instead of the deprecated pci_get_secondarybus.
 - Implement read/write ivar support for the pccbb, and teach it how
   to report its secondary bus number.  Save the subsidiary bus number
   as well, although we don't use it yet.
2000-12-13 01:28:00 +00:00
Mike Smith
8983cfbf27 Next round of PCI subsystem updates:
- Break out the /dev/pci driver into a separate file.
 - Kill the COMPAT_OLDPCI support.
 - Make the EISA bridge attach a bit more like the old code; explicitly
   check for the existence of eisa0/isa0 and only attach if they don't
   already exist.  Only make one bus_generic_attach() pass over the
   bridge, once both busses are attached.  Note that the stupid Intel
   bridge's class is entirely unpredictable.
 - Add prototypes and re-layout the core PCI modules in line with
   current coding standards (not a major whitespace change, just moving
   the module data to the top of the file).
 - Remove redundant type-2 bridge support from the core PCI code; the
   PCI-CardBus code does this itself internally.  Remove the now
   entirely redundant header-class-specific support, as well as the
   secondary and subordinate bus number fields.  These are bridge
   attributes now.
 - Add support for PCI Extended Capabilities.
 - Add support for PCI Power Management.  The interface currently
   allows a driver to query and set the power state of a device.
 - Add helper functions to allow drivers to enable/disable busmastering
   and the decoding of I/O and memory ranges.
 - Use PCI_SLOTMAX and PCI_FUNCMAX rather than magic numbers in some
   places.
 - Make the PCI-PCI bridge code a little more paranoid about valid
   I/O and memory decodes.
 - Add some more PCI register definitions for the command and status
   registers.  Correct another bogus definition for type-1 bridges.
2000-12-13 01:25:11 +00:00
Mike Smith
01282c87e3 Remove a couple of leftover unused variables. 2000-12-13 01:06:54 +00:00
Julian Elischer
1b3335af6a Another mismatch found by Gcc:
This is what happenss when you let the patches pile up too long without
committing them.. brain rot..
2000-12-12 23:56:16 +00:00
Julian Elischer
c4e30752ba remove unused variable 2000-12-12 23:50:51 +00:00
Julian Elischer
d00a91423d I always forget this file. It's netgraph, but not one of mine..... 2000-12-12 23:05:19 +00:00
John Baldwin
1639f08b45 Add a missing include of <sys/proc.h>. 2000-12-12 20:24:36 +00:00
Bill Paul
34da0ef197 Grrrrr. That last commit was supposed to be to the head, not to -stable
(even though I want the fixes in -stable anyway). I'm sure I'm going
to get flamed now for committing to -stable and -current too quickly.
*sigh*
2000-12-12 19:31:14 +00:00
Julian Elischer
859a4d166c Reviewed by: Archie@freebsd.org
This clears out my outstanding netgraph changes.
There is a netgraph change of design in the offing and this is to some
extent a superset of soem of the new functionality and some of the old
functionality that may be removed.

This code works as before, but allows some new features that I want to
work with and evaluate. It is the basis for a version of netgraph
with integral locking for SMP use.

This is running on my test machine with no new problems :-)
2000-12-12 18:52:14 +00:00
Mitsuru IWASAKI
b2c9c0dab2 Catch up with the recent conversion the per-eventhandler list mutex to
a lockmgr lock.
2000-12-12 14:20:27 +00:00
Mike Smith
4fa59183f1 - We have access to our own device_t here, so use pci_read_config
rather than finding our parent pcib and using its PCI_READ_CONFIG
   method.

 - Fix the defines for the 32-bit I/O decode registers, and properly
   process the 16-bit versions.  Now we will correctly check that I/O
   resources behind the bridge are going to be decoded.

 - Bring the quirk for the Orion PCI:PCI bridge in here (since it
   seems to want to set the secondary/supplementary bus numbers).

 - Use PCI_SLOTMAX rather than a magic number.
2000-12-12 13:20:35 +00:00
Mike Smith
52daea05c5 Don't try to fix up the Orion here; the interface we use is wrong for the
new code (and about to disappear too).
2000-12-12 13:11:42 +00:00
Nick Hibma
040639a0aa make sure we tear down the devnodes for the endpoints 1 and above
when switching configuration.
2000-12-12 10:19:19 +00:00
Mike Smith
fed8edf563 - Don't return early from the PCI:EISA bridge attachment, or we will lose
the ISA bus.
 - Don't expect that a PCI:ISA bridge will have a correct class value;
   if we're checking PCI IDs, only depend on these.

This should fix the loss of ISA on machines with PCI:EISA bridges like the
AS4100.
2000-12-12 03:33:02 +00:00
Hajimu UMEMOTO
39715b6a8a fix problem with vmware DAD. reported by many, tested @ IETF49 with
help from Florent Parent <Florent.Parent@viagenie.qc.ca>.

Obtained from:	KAME
2000-12-11 18:53:40 +00:00
MIHIRA Sanpei Yoshiro
23f344f985 add PNPID for PnP PCMCIA, SCM SwapBox Classic X2P.
PR:		kern/23344 (Kaho Toshikazu <kaho@elam.kais.kyoto-u.ac.jp>)
2000-12-11 15:02:50 +00:00
Mike Smith
e620c314df It looks like we can't count on these devices always having a consistent
class/subclass, so give up trying to cull the list.  Instead, complain
in the bootverbose case, but otherwise just accept that we will have to
carry this list of device IDs around.
2000-12-11 10:04:01 +00:00