Commit Graph

4915 Commits

Author SHA1 Message Date
Nick Hibma
0e4b6a048e Regen. 2000-10-07 11:11:12 +00:00
Nick Hibma
43c34ce5bf Sync with NetBSD. More ids, more! 2000-10-07 11:10:53 +00:00
Nick Hibma
6e89fb0ce1 Regen. 2000-10-07 11:02:25 +00:00
Nick Hibma
9c30aace70 Zyxel keyboard Id 2000-10-07 11:01:54 +00:00
Warner Losh
e69d122232 o Implement get_ivars so matching routines will work (this causes
compat probe routines to work).
o Have a null driver_added routines.  We need to be careful about probing
  until after we know we have a card.  For the moment, we do nothing
  (which is safe).  This fixes a panic when a driver is loaded w/o a
  card in the slot.

XXX still need to fix the resource list code.  It is totally busted and
XXX causes a panic in the child printing routine after the probe has
XXX succeeded.
2000-10-07 05:48:51 +00:00
Warner Losh
448d152ae4 Fix arguments to kthread_create (submitted by takawata@freebsd.org).
Remove unnecessary includes
2000-10-07 05:42:43 +00:00
Justin T. Gibbs
580bfdfb00 Fix single character typo in legacy transfer settings function
thereby re-enable tagged queuing.
2000-10-06 19:34:40 +00:00
Justin T. Gibbs
ff0c1daf6b Bring in a slew of fixes that were supposed to be in the last commit.
In ahc_search_qinfifo, the SEARCH_REMOVE case must also handle
an SCB that has been removed from the QINFIFO but not yet been
fully dmaed to the card.

Correct locking for ahc_get_scb() calls.

Set SCB syncrate settings in ahc_execute_scb() to avoid a race
condition that could allow a newly queued SCB to be missed
by ahc_update_pending_syncrates().

When notifying the system of transfer negotiation updates, only
set the valid bits for tagged queuing and disconnection if the
path is fully qualified.  Sync/Wide settins apply to all luns
of a target, but tagged queuing and disconnection may change
on a per-lun basis.

Add missing ahc_unlock() calls in ahc_timeout() for the target
mode case.
2000-10-06 04:01:06 +00:00
John Baldwin
511652767f During a verbose boot, call the null device 'null' rather than 'null0' to
be more consistent with the rest of the kernel.
2000-10-06 00:46:29 +00:00
Archie Cobbs
3c5656bf03 Driver for the Intel 82801AA (ICH) SMBus controller and compatibles.
Obtained from:	Whistle source tree
2000-10-06 00:09:46 +00:00
Nick Hibma
9aafd69b2f Regen. 2000-10-05 23:11:13 +00:00
John Baldwin
1931cf940a - Heavyweight interrupt threads on the alpha for device I/O interrupts.
- Make softinterrupts (SWI's) almost completely MI, and divorce them
  completely from the x86 hardware interrupt code.
  - The ihandlers array is now gone.  Instead, there is a MI shandlers array
    that just contains SWI handlers.
  - Most of the former machine/ipl.h files have moved to a new sys/ipl.h.
- Stub out all the spl*() functions on all architectures.

Submitted by:	dfr
2000-10-05 23:09:57 +00:00
Nick Hibma
4614ea8720 Additional Ids 2000-10-05 23:09:48 +00:00
Bill Paul
5c1cfac46e Add support for parsing the media blocks from the SROM on 21143
adapters. This is necessary in order to make this driver work with
the built-in ethernet on the alpha Miata machines. These systems
have a 21143-PC chip on-board and optional daughtercards with either
a 10/100 MII transceiver or a 10baseT/10base2 transceiver. In both
cases, you need to twiddle the GPIO bits on the controller in order
to turn the transceivers on, and you have to read the media info
from the SROM in order to find out what bits to twiddle.
2000-10-05 17:36:14 +00:00
Søren Schmidt
11b944d47a Cleanup the chipset specific interrupt code a bit. 2000-10-05 08:28:06 +00:00
Justin T. Gibbs
b1721cfbfd Correct pedantic errors in arrays generated by the assembler (trailing
comma in array declarations).

Output a constant indicating the number of critical section entries
in the firmware.
2000-10-05 04:25:42 +00:00
Justin T. Gibbs
a49630ac82 Convert the driver to use a single DMA for fetching new commands instead
of two (one to access the circular input fifo, the other to get the SCB).
This costs us a command slot so the driver can now only queue 254
simultaneous commands.

Have the kernel driver honor critical sections in sequencer code.

When prefetching S/G segments only pull a cacheline's worth but
never less than two elements.  This reduces the impact of the
prefetch on the main data transfer when compared to the 128
byte fetches the driver used to do.

Add "bootverbose" logging for transfer negotiations.

Correct a bug in ahc_set_syncrate() that would prevent an update
of the sync parameters if only the ppr_options had changed.

Correct locking for calls to ahc_free_scb().  ahc_free_scb() is no
longer protected internally to simplify ports to other platforms.

Make sure we unfreeze our SIMQ if a resource shortage has occurred
and an SCB is been freed.

ahc_pci.c:
	Turn on cacheline streaming for all controllers that support it.

	Clarify diagnostic messages about PCI interrupts.
2000-10-05 04:24:14 +00:00
Søren Schmidt
9b09a33635 Fix the MASTERDEV breakage the caused the PIIX controllers to get
missed in the probe. This might break the CMD chips again, more
testing is needed on that, but we need the mainstream chips to
work again ...
2000-10-04 08:28:37 +00:00
Jason Evans
a18b1f1d4d Convert lockmgr locks from using simple locks to using mutexes.
Add lockdestroy() and appropriate invocations, which corresponds to
lockinit() and must be called to clean up after a lockmgr lock is no
longer needed.
2000-10-04 01:29:17 +00:00
Søren Schmidt
162080b465 Add support for ServerWorks ROSB4 ATA33 chipset.
Add support for CMD 648 ATA66 & CMD 649 ATA100 chipsets.

Fix the "resource already allocated" panic with the CMD and other
braindead controllers.

Add options ATA_ENABLE_TAGS, without this option tagged queuing will
not be attempted.
2000-10-03 13:12:36 +00:00
Yoshihiro Takahashi
10d5f4e72e Don't use bus_get_resource() and bus_get_resource_start() functions if
bus_alloc_resource() failed. So, error messages are changed more simply.

Suggested by:	"Matthew N. Dodd" <winter@jurai.net>
2000-10-03 11:47:34 +00:00
Mike Smith
84ad14e4a6 Fix up some more comments that were reversed.
Submitted by:	Niklas Hallqvist <niklas@appli.se>
2000-10-03 10:26:29 +00:00
Mike Smith
0791663f57 Fix reversed comments re: OISR/OIMR
Submitted by:	Niklas Hallqvist <niklas@appli.se>
2000-10-03 08:28:04 +00:00
John Baldwin
005b841fd6 Move sys/dev/nulldev to sys/dev/null to be more consistent with naming
under sys/dev.
2000-10-02 20:16:37 +00:00
Yoshihiro Takahashi
0a917604f0 Added NEC PC-9801-83, 84, PC-9801-103, 104, PC-9801N-25 and PC-9801N-J02R
support which use National Semiconductor DP8393X (SONIC) as ethernet
controller. Currently, this driver is used on only PC-98.

Submitted by:	Motomichi Matsuzaki <mzaki@e-mail.ne.jp>
Obtained from:	NetBSD/pc98
2000-10-02 14:27:20 +00:00
Mitsuru IWASAKI
6a8954b084 Fix StallOp implementaion. I've noticed that StallOp corresponds to
OsdSleepUsec(), SleepOp corresponds to OsdSleep() by reading ACPICA
source code.
 - Add OsdSleepUsec() which uses DELAY() simply.
 - Change unit of acpi_sleep() argument; microseconds to milliseconds.
2000-10-02 08:58:50 +00:00
Archie Cobbs
645d61ffeb Add definition for PCIS_SERIALBUS_SMBUS PCI device subclass.
Remove cut & paste leftovers.
2000-10-02 00:41:43 +00:00
Justin T. Gibbs
155c0683c7 ahc_set_transaction_status() takes an SCB. This makes it difficult to
use this helper function to report an error when SCB allocation fails.
2000-10-01 20:56:44 +00:00
Mitsuru IWASAKI
3ffcacc9d8 Remove ACPI_NO_OSDFUNC_INLINE option from kernel configuration. Now
that it's enabled in acpireg.h only if DIAGNOSTIC option is specified.
ACPICA OSD functions will be compiled in machine/acpi_machdep.c again
tentatively (if DIAGNOSTIC option is specified).
# Should we have acpica_osd.c ?
2000-10-01 08:17:47 +00:00
Mitsuru IWASAKI
3ea2027588 - Add acpi_disable_events() and set it with EVENTHANDLER_REGISTER in order to
avoid power on again problem after acpi_soft_off() calling.
 - Implement SleepOp/StallOp in AML interpreter.  Also provide ACPICA
   compatibility.
 - Minor changes on __inline function declaration in acpica_osd.h
   (obtained from NetBSD porting).
2000-09-30 22:37:24 +00:00
Mike Smith
96f5284585 More updates to the ACPI code:
- Move all register I/O into acpi_io.c
 - Move event handling into acpi_event.c
 - Reorganise headers into acpivar/acpireg/acpiio
 - Move find-RSDT and find-ACPI-owned-memory into acpi_machdep
 - Allocate all resources (except those detailed only by AML)
   as real resources.  Add infrastructure that will make adding
   resource support to AML code easy.
 - Remove all ACPI #ifdefs in non-ACPI code
 - Removed unnecessary includes
 - Minor style and commenting fixes

Reviewed by:	iwasaki
2000-09-30 20:12:27 +00:00
Scott Long
bb9f4664e2 Fix compiling with AAC_DEBUG. 2000-09-30 13:41:04 +00:00
Doug Rabson
f6174366bf Make the alpha hacks dependant on __alpha__ instead of !__i386__. 2000-09-29 16:50:31 +00:00
Warner Losh
0e6d3195bc Add support for pccard attachments of the ex driver. It supports the
Olicom OC-2220 card, and maybe others.

Submitted by: iwasaki
Reviewed by: mdodd
2000-09-29 03:58:06 +00:00
Nick Sayer
04c24efdc1 Add suspend/resume hooks.
Submitted by: sean@stat.duke.edu
2000-09-28 14:02:49 +00:00
Warner Losh
109c00c9ee Implement sn_pccard_match. The match routines are the compromise
matching methods so that we can run the same driver on both NEWCARD
and OLDCARD.  Also set the device description to the card that we
found, if any.

The sn driver should be ready when the NEWCARD catches up.  There's a
config activation issue as well as a kernel thread issue to resolve
first.
2000-09-28 07:35:06 +00:00
Peter Wemm
b6c8407840 Get out the roto-rooter and clean up the abuse of nexus ivars by the
i386/isa/pcibus.c.  This gets -current running again on multiple host->pci
machines after the most recent nexus commits.  I had discussed this with
Mike Smith, but ended up doing it slightly differently to what we
discussed as it turned out cleaner this way.  Mike was suggesting creating
a new resource (SYS_RES_PCIBUS) or something and using *_[gs]et_resource(),
but IMHO that wasn't ideal as SYS_RES_* is meant to be a global platform
property, not a quirk of a given implementation.  This does use the ivar
methods but does so properly.  It also now prints the physical pci bus that
a host->pci bridge (pcib) corresponds to.
2000-09-28 00:37:32 +00:00
Mike Smith
13b19f6885 Whitespace, spelling and comments cleanup. Try to bring this a little
closer to a consistent style without going totally overboard.  Preserve
the 8-space indents even though I loathe them.
2000-09-27 05:43:54 +00:00
Mike Smith
81a324e8b0 Shut up some debugging messages that appear to have been left on by
default.

Fix the identify/probe/attach cycle somewhat.  Now in acpi_identify we
parse enough of the RSDT/FACP to find the communications port and
interrupt so that we can establish these as resources on the acpi device.

Pass the softc to acpi_queue_event so that it doesn't dereference NULL
when acpi_intr is invoked in the attach routine (because devclass_get_softc
isn't going to work yet).

Account for our allocated resources properly so that we can free them
if required.
2000-09-27 01:40:47 +00:00
Mitsuru IWASAKI
d4c2a7c9ac Add code for device wake capability during sleeping state.
- Add acpi_gpe_enable_bit() to manipulate GPE enable registers based
  on _PRW objects.
 - Add acpi_set_device_wakecap().  This will manipulate related
   PowerResource objects and execute _PSW method of the device.
 - Cleanup and some small fixes.

This code was implemented based on 7.2.1 _PRW in spec mainly.
2000-09-26 20:21:19 +00:00
Poul-Henning Kamp
355b0652dd Call make_dev() with the correct minor number.
(no, this driver still doesn't play ball with DEVFS)
2000-09-26 19:09:44 +00:00
Mitsuru IWASAKI
72d5eef642 Add struct proc *acpi_thread in acpi_softc. 2000-09-26 17:42:34 +00:00
Takanori Watanabe
e126cbaaca Clear intrrupt before kthread gets ready.
Submitted by:	iwasaki
2000-09-26 12:39:37 +00:00
Takanori Watanabe
0aaa98f3a5 Add event queueing kernel thread and GPE related code. 2000-09-26 12:09:57 +00:00
Justin T. Gibbs
1c1c47a3e9 Correct a logic mistake introduced in a recent cleanup of
ahc_build_transfer_msg() that would cause use to fail to send the
DT_REQ ppr_option in a PPR message for periods where DT transfers
are required.
2000-09-25 21:56:19 +00:00
Poul-Henning Kamp
93ce5ab049 GC some old no longer supported options. 2000-09-25 12:38:55 +00:00
Seigo Tanimura
0593938b26 Allocate memory resource to access the attribute memory of a card.
Reviewed by:	imp
2000-09-25 06:01:42 +00:00
Søren Schmidt
511e9e7251 Fix the breakage that snatched the ioports from the fdc device.
Fix promise support.
2000-09-24 18:19:43 +00:00
Cameron Grant
c9c6ba09e4 prepare for adding a rate conversion feeder.
move format conversion feeders to feeder_fmt.c - no pertinent history so no
repo-copy.
2000-09-23 22:11:32 +00:00
Cameron Grant
33c878f034 only probe mandatory channels on known bad codecs 2000-09-23 22:00:09 +00:00
John Baldwin
1204fd85a4 Enable the snd_maestro module and have the snd_driver module depend on it.
Approved by:	cg
2000-09-23 17:35:37 +00:00
Jason Evans
9a02e8c68f Don't #include <sys/proc.h>, since machine/mutex.h does it now. 2000-09-23 00:01:37 +00:00
Justin T. Gibbs
083d01f20d Add Perforce RCSIDs for easy revision correlation to my local tree.
Add support for constructing a table of critical section regions in
the firmware image.  The kernel driver will soon have support for
single stepping the sequencer outside of a critical region prior
to starting exception handling.
2000-09-22 22:19:55 +00:00
Justin T. Gibbs
c498406d58 Add Perforce RCSIDs for easy revision correlation to my local tree.
ahc_pci.c:
	Bring back the AHC_ALLOW_MEMIO option at least until the
	memory mapped I/O problem on the SuperMicro 370DR3 is
	better understood.

aic7xxx.c:
	If we see a spurious SCSI interrupt, attempt to clear it and
	continue by unpausing the sequencer.

	Change the interface to ahc_send_async().  Some async messages
	need to be broadcast to all the luns of a target or all the
	targets of a bus.  This is easier to achieve by passing explicit
	channel, target, and lun parameters instead of attempting to
	construct a device info struct to match.

	Filter the sync parameters for the PPR message in exactly the
	same way we do for an old fashioned SDTR message.

	Correct some typos and correct a panic message.

	Handle rejected PPR messages.

	In ahc_handle_msg_reject(), let ahc_build_transfer_msg() build
	any additional transfer messages instead of doing this inline.

aic7xxx.h:
	Increase the size of both msgout_buf and msgin_buf to
	better accomodate PPR messages.

aic7xxx_freebsd.c:
	Update for change in ahc_send_async() parameters.

aic7xxx_freebsd.h
	Update for change in ahc_send_async() parameters.

	Honor AHC_ALLOW_MEMIO.

aic7xxx_pci.c:
	Check the error register before going into full blown PCI
	interrupt handling.  This avoids a few costly PCI configuration
	space reads when we run our PCI interrupt handler because another
	device sharing our interrupt line is more active than we are.

	Also unpause the sequencer after processing a PCI interrupt.
2000-09-22 22:18:05 +00:00
Justin T. Gibbs
ea6487b395 Use quoted includes instead of full path references inside the aic7xxx
sequencer files.  Different platforms place the included files in different
locations and it is easier to modify the include path passed as arguments
to the assembler than adding #ifdef support to the assembler.

Remove a spurious 'nop' instruction.
2000-09-22 22:06:44 +00:00
Bill Paul
7d326fa793 Tweak the aue driver so that the homePNA PHYs will be detected and
attached by the pnaphy driver. This seems to work fine with my sample
ADMtek adapter (which has both 10/100 ethernet and homePNA connectors
and hardware).
2000-09-22 18:53:05 +00:00
Yoshihiro Takahashi
12ad26560f Removed unneeded include files.
Submitted by:	phk
2000-09-22 09:59:23 +00:00
John Baldwin
e268a9aae5 - Wrap functions and variables that aren't used in the alpha console probe
with #ifndef __alpha__/#endif
- Add function prototypes for functions used during the alpha console
  probe and gdb port setup inside of #ifdef __alpha__/#endif.
2000-09-22 08:42:30 +00:00
John Baldwin
86ab18a705 Fix several 64-bit-ism warnings due to sizeof(int) != sizeof(void *) on
the alpha.
2000-09-22 08:40:05 +00:00
Warner Losh
8456e16e24 o Merge in changes to the NetBSD sources:
pcmciavar.h	1.9->1.12
		1.12, enami, minor coding nits
		1.11, augustss, (pcmcia_devinfo NRFB)
		1.10, cgd, add generic lookup routines
	pcmcia.c	1.14->1.23
		1.23, drochner, (probe code printing, NRFB)
		1.22, augustss, KNF
		1.21, uch, (hpcmips tweaks NRFB)
		1.20, chopps, remove bogus debug
		1.19, enami, minor coding nits
		1.18, augustss, (pcmcia_devinfo NRFB)
		1.17, nathanw, LP64 printf fixes
		1.16, cgd, add generic lookup routines
		1.15, aymeric, printf fixes
	NRFB == not relevant to freebsd
o Expand the pccard matching routines to include the ability to match
  against the CIS strings since our current driver database is based on
  that.
o Add lots more ivars to get the information necessary to snag these values.
2000-09-22 01:15:26 +00:00
Mike Smith
e3c457130c Fix a race in ASR_ccbAdd and ASR_ccbRemove, which were both manipulating
the ccb queue without masking interrupts.

Submitted by:	Petr Lampa <lampa@fee.vutbr.cz>
2000-09-21 20:21:30 +00:00
Matt Jacob
aa57fd6fa5 some copyright cleanups 2000-09-21 20:16:04 +00:00
Bill Paul
b2f5cb03e7 Add the PCI device ID for the on-board ethernet controllers on the
Intel 815E motherboard, which I believe is an i82562. Seems to work
just fine with the fxp driver.
2000-09-21 20:01:57 +00:00
Matt Jacob
c0cfc79790 Inintialize the queue index stuff from what the f/w sends back- just
in case it's insane enough to not do what you tell it to.

Print out (LOGINFO level) initiator ID.
2000-09-21 17:06:45 +00:00
Matt Jacob
d33f5e590e remove unneeded includes
(obtained from phk@freebsd.org)
2000-09-21 16:32:38 +00:00
Mitsuru IWASAKI
fe44e2ea94 Fix LINT breakage by options ACPI_NO_OSDFUNC_INLINE.
Also space/tab-fix in NOTE.
Grrr, my bad.

Pointed-out by:	eivind
2000-09-21 13:01:19 +00:00
Mark Murray
4a8612fd41 Remove unneeded includes.
Submitted by:	phk
2000-09-21 06:23:16 +00:00
Mitsuru IWASAKI
80d92dc27e Add new function in AML interpreter; aml_invoke_method().
Also remove unneeded includes in aml_obj.c and aml_parse.c.

This new function takes 'struct aml_name *' as a argument rather than
'char *' where aml_invoke_method_by_name() does.  It's worth to have
these two interfaces in many cases.
2000-09-20 22:53:39 +00:00
Warner Losh
4d678f2674 remove 5 unnecessary includes, per phk's script 2000-09-20 19:34:17 +00:00
Warner Losh
07dad7e607 Remove 7 unnecessary includes frmo phk's script 2000-09-20 19:31:37 +00:00
Warner Losh
baebc9fa44 Remove 8 unnecessary includes from phk's script 2000-09-20 19:05:32 +00:00
Bill Paul
b54acb744c Add a homePNA PHY driver. This is really only a stub: MII-based homePNA
PHYs tend to look like 10mbps PHYs with no autonegotiation. This allows
us to display the proper media type and link status however.
2000-09-20 17:04:30 +00:00
Bill Paul
337771f919 regenerate 2000-09-20 17:02:32 +00:00
Bill Paul
9d960ff86d Add the ID for the built-in homePNA PHY in the AMD 79C798 controller. 2000-09-20 17:02:16 +00:00
Søren Schmidt
c50cf4ac06 Remove unneeded includes
Pointed out by: phk
2000-09-20 07:00:24 +00:00
Justin T. Gibbs
dfd86f14c0 Remove the last two uses of ahc->unit in the FreeBSD version of the driver.
ahc->unit is depricated and will be going away as soon as the Linux
driver catches up.  In the FreeBSD case, it is always initialized to 0
and this caused some strangeness in registering multiple ahc controllers
with CAM.

Noticed by:	Tor.Egge@fast.no
2000-09-20 04:46:15 +00:00
Mitsuru IWASAKI
d9e2f78b50 Ignore power button and sleep button events for 5 sec.
Wakeup event is generated by power button and/or sleep button on some
laptops but this also generates SCI interrupt, and shutdown the system
as result.  So this kind of mechanism is introduced so that acpi
driver ignore given events for certain period.
2000-09-20 01:53:11 +00:00
Mitsuru IWASAKI
c369b3b021 Improve region I/O sub-routines by re-writing most of low level part
of AML interpreter.
 - Delete and cleanup a lot of almost duplicated code in kernel/userland.
 - Add new common functions for kernel/userland code.
      aml_adjust_readvalue(), aml_adjust_updatevalue(),
      aml_region_handle_alloc(), aml_region_handle_free() and
      aml_region_io().
 - Add primitive functions for both versions of kernel/userland in order to
   have shared code as much as possible.
      aml_region_read_simple(), aml_region_write_simple(),
      aml_region_prompt_read(), aml_region_prompt_write() and
      aml_region_prompt_update_value().
 - Consider update rule and access type in field flags. Also add a lot of
   definitions for the flags.
 - Fix bugs on bit manipulation for read/write operations.
 - Fix bugs on IndexField I/O part.  Also add workaround for temporary
   object corruption during StoreOp interpretation.
2000-09-20 01:01:32 +00:00
Bill Paul
857fd445c3 If this is a Davicom DM9102A and we're enabling the homePNA link, force
dc_link to 1 and don't activate the tick routine. Without this, dc_start()
always thinks the link is down and never transmits in homePNA mode.
2000-09-20 00:59:17 +00:00
Søren Schmidt
8563f77dc9 Add support for tagged queuing on ATA drives. There is only support for
IBM's DPTA and DTLA series of drives (no other disk vendors are known
to support this) on non-Promise controllers (promise controllers lockup
when given the tagged queuing specific commands).
It gives especially master/slave comboes about 5% better performance.

Add support for the Promise ATA100 OEM chip (pdc20265)

Add support for the Cyrix 5530

Change the way status is read from the drives, use the alternate
status reg when possible.

Better support for DEVFS, the acdXtY devices are now created when needed.

Lots of little cleanups.
2000-09-19 11:08:39 +00:00
Warner Losh
2276cee521 Implement indirection in the pccard probe/attach. This should make it
possible to have different probe/attach semantics between the two
systems and yet still use the same driver for both.

Compatibility methods for OLDCARD drivers.  We use these routines to make
it possible to call the OLDCARD driver's probe routine in the context that
it expects.  For OLDCARD these are implemented as pass throughs to the
device_{probe,attach} routines.  For NEWCARD they are implemented such
such that probe becomes strictly a matching routine and attach does both
the old probe and old attach.

compat devices should use the following:

	/* Device interface */
	DEVMETHOD(device_probe),	pccard_compat_probe),
	DEVMETHOD(device_attach),	pccard_compat_attach),
	/* Card interface */
	DEVMETHOD(card_compat_match,	foo_match),	/* newly written */
	DEVMETHOD(card_compat_probe,	foo_probe),	/* old probe */
	DEVMETHOD(card_compat_attach,	foo_attach),	/* old attach */

This will allow a single driver binary image to be used for both
OLDCARD and NEWCARD.

Drivers wishing to not retain OLDCARD compatibility needn't do this.

ep driver minorly updated.

sn driver updated more than minorly.  Add module dependencies to allow
module to load.  Also change name to if_sn.  Add some debugging code.
attempt to fix the cannot allocate memory problem I'd been seeing.
Minor formatting nits.
2000-09-19 04:39:20 +00:00
Mike Smith
30d57611e8 Include <sys/proc.h> so that we can dereference something in the proc
structure.  Looks like someone removed a nested include somewhere else.

Submitted by:	gallatin, dg
2000-09-19 00:35:03 +00:00
David Greenman
9492779067 Removed NetBSD support, which bit-rotted long ago.
Changed new SMP locking macros given the new situation.
2000-09-18 21:12:19 +00:00
Robert Watson
c4ff4a8467 Include <sys/proc.h> to silence suser() compiler warning.
Approved by:	markm
2000-09-18 20:42:04 +00:00
Søren Schmidt
53d07b1ebb Only read to the end of the select track. 2000-09-18 12:13:32 +00:00
Seigo Tanimura
c74c29ca6b Since the unit number of a midi/sequencer device is expressed in 4
bits, we can configure only up to 16 units.
2000-09-18 10:17:38 +00:00
Cameron Grant
341f16cc60 dynamify- probe codec for supported channels
add channel mappings for mixer
2000-09-17 23:51:00 +00:00
Cameron Grant
7dfc932548 fix warnings 2000-09-17 23:46:32 +00:00
David Greenman
7d854d93af Added a couple more missing FXP_SPLVAR()'s. 2000-09-17 23:23:22 +00:00
David Greenman
b184b38e2b As a minor optimization, do suspended checking more like it was originally
in the PR - before the while loop.
2000-09-17 23:04:57 +00:00
David Greenman
04ea20fcf4 Added missing FXP_SPLVAR() to fxp_intr(). 2000-09-17 22:59:58 +00:00
David Greenman
2053b07d7e Attempt to replicate the new fxp SMP locking in the changes committed
in the previous (APM suspend/resume) commit.
2000-09-17 22:20:33 +00:00
David Greenman
7dced78a28 Added support for APM suspend/resume.
PR:		18756
Submitted by:	mike ryan <msr@elision.org>, with modifications by me.
2000-09-17 22:12:12 +00:00
Chuck Paterson
87807fded9 Add include of proc.h to make compile without SMP defined. This
change is likely interm, the include happens automagically
when SMP is defined.

Obtained from:	Jason Evans.
2000-09-17 22:01:21 +00:00
Chuck Paterson
0f4dc94cfc Add locking to make able to run without the Giant lock being held. This
is enabling as all entries are still called with Giant being held.
Maintaining compatability with NetBSD makes what should be very simple
kinda ugly.

Reviewed by:	Jason Evans
2000-09-17 13:26:25 +00:00
Justin T. Gibbs
f175cbb663 Today is just not my day. Really get the right file. 2000-09-16 21:55:31 +00:00
Justin T. Gibbs
ae7c64e466 Pull the correct file over to freefall. 2000-09-16 20:59:12 +00:00
Justin T. Gibbs
cb4d93cdbf Add PCIM_CMD_MWRICEN, the bit in the command register in PCI space
that enables memory write and invalidate cycles on a bus master.
2000-09-16 20:06:13 +00:00
Justin T. Gibbs
32da3127a3 Move aicasm to its own subdirectory. 2000-09-16 20:02:39 +00:00
Justin T. Gibbs
717d424718 Move aicasm to its own subdirectory.
Separate our platform independent hooks from core driver functionality
shared between platforms (FreeBSD and Linux at this time).

Add sequencer workarounds for several chip->chipset interactions.

Correct external SCB corruption problem on aic7895 based cards (3940AUW).

Lots of cleanups resulting from the port to another OS.
2000-09-16 20:02:28 +00:00
Poul-Henning Kamp
2404c3f99d Make LINT link.
cy driver is broken post SMPng.
2000-09-16 19:04:24 +00:00
Poul-Henning Kamp
3045b21279 Make LINT compile. 2000-09-16 18:48:11 +00:00
Poul-Henning Kamp
574abd2926 Make LINT compile again. 2000-09-16 18:46:05 +00:00
Warner Losh
45713b37cd Change the interface to pccard_function_init. The interface is such
that it looks for an acceptible one.  Once it finds it, it should set
the resources for the device.  I say "should" because I've not written
that.  Also set an ivar for the child of pccard.  Minor fix to the
attach message printed, we lose the slot number, which I'll have to
restore later.  Adjust the pccard ivar so that we can save the
function that corresponds to this driver so we can enable and disable
it more easily.  Save a pointer to the function so we know what we're
dealing with.

There should be some way for the driver to specify which cfg it wants
to activate.  For now the pccard_function_init function just picks
one, but we'll have to revisit this going forward.  I'm not doing it
now because I'd need some way to activate the card many times and I'm
not sure that is desirable or even safe with some cards.
2000-09-16 06:52:20 +00:00
John Baldwin
3c63a78388 Use driver_intr_t instead of the now defunct inthand2_t. 2000-09-15 19:09:15 +00:00
Mitsuru IWASAKI
32d817d227 Add acpi_send_pm_event() to inform all devices that the system is
going to sleep and back from sleep.
Also re-enabling some acpi registers on wakeup.
2000-09-14 23:29:37 +00:00
John Baldwin
606f8eb27a Remove the mtx_t, witness_t, and witness_blessed_t types. Instead, just
use struct mtx, struct witness, and struct witness_blessed.

Requested by:	bde
2000-09-14 20:15:16 +00:00
Yoshihiro Takahashi
b14d7dac8a - Newbus'ify and bus_space'ify.
- Separate bus dependent part and independent part.
- Moved source files to sys/dev/fe (repo copied).
- Fixed some comments by chi@bd.mbn.or.jp (Chiharu Shibata)

Tested by:	bsd-nomads@clave.gr.jp and
		FreeBSD98-testers@jp.freebsd.org
2000-09-14 12:02:07 +00:00
John Baldwin
9a94c9c5c3 - Remove the inthand2_t type and use the equivalent driver_intr_t type from
newbus for referencing device interrupt handlers.
- Move the 'struct intrec' type which describes interrupt sources into
  sys/interrupt.h instead of making it just be a x86 structure.
- Don't create 'ithd' and 'intrec' typedefs, instead, just use 'struct ithd'
  and 'struct intrec'
- Move the code to translate new-bus interrupt flags into an interrupt thread
  priority out of the x86 nexus code and into a MI ithread_priority()
  function in sys/kern/kern_intr.c.
- Remove now-uneeded x86-specific headers from sys/dev/ata/ata-all.c and
  sys/pci/pci_compat.c.
2000-09-13 18:33:25 +00:00
Warner Losh
4bae64510b Add ID for 3C1. It is a etherlink iii in a CompactFlash form factor.
It doesn't seem to work, but at least is identified correctly.  Minor
tree housekeeping on my part.
2000-09-13 03:57:37 +00:00
Mike Smith
358637397e A new driver for PCI:SCSI RAID controllers based on the Adaptec FSA
design.  This includes integrated Dell RAID controllers, the Dell
PERC 2/QC and the HP NetRAID-4M.
2000-09-13 03:20:35 +00:00
Mark Murray
d0d519348d The "struct proc" argument to read_random was ill-conceived, and a
hangover from previous experimentation. Remove it. This will clean
up gratuitous needs for forward references and other namespace
pollution.
Moaned about by:	bde
Brought to my attention by:	bp
2000-09-12 13:13:22 +00:00
Paul Saab
6004db96ae Move the detection of Linksys PCMCIA cards from attach to probe.
This should solve the problems people were seeing with this driver.

Reported by:	phk & others.
2000-09-12 11:03:12 +00:00
Mike Smith
4bf9a87a4c Whoops. The AMR_QUARTZ_GOFASTER option is meant to disable, not enable
this check.  It looks like it doesn't work on at least the 466 controllers.
2000-09-11 23:19:13 +00:00
David Malone
1c06ce6197 Add the ability to define a "shutdown" and "shutdown and poweroff" key
to syscons. I have a man page to follow describing the format of the
kbdmap file.

PR:		19273
Reviewed by:	sheldonh
2000-09-11 20:37:42 +00:00
John Baldwin
ecbcd538a4 Move the prototypes for random_set_wakeup* from yarrow.c to yarrow.h so that
both yarrow.c and harvest.c can use them.

Approved by:	markm
2000-09-11 19:31:28 +00:00
Roger Hardiman
26d8b8af6f Make MOD_UNLOAD return EBUSY to prevent it being unloaded automatically when we
unload the bktr driver.
Change the sub-section from SI_SUB_PSEDUO to SI_SUB_DRIVERS to make
sure the module initialises before the bktr module
2000-09-11 12:23:50 +00:00
Roger Hardiman
403cbdd892 Change to SI_ORDER_FIRST to make sure this module runs before
the bktr module if both are loaded at the same time (eg in the boot
loader)
2000-09-11 10:37:27 +00:00
Roger Hardiman
5c8dc2dd0d Add MODULE_VERSION and MODULE_DEPENDS to make the bktr module load the
bktr_mem module
2000-09-11 07:14:43 +00:00
John Baldwin
a0e1678488 Add a nasty hack to get remote kernel gdb working from ddb. ddb would
complain before that a suitable gdb port had not been setup because gdbdev
was NULL.  This abuses the fact that the gdb port is hard-coded to the
address normally assigned to sio1 and thus hard-codes in sio1 as the gdb
port.  Yuck.
2000-09-11 04:33:36 +00:00
John Baldwin
2ed0f9191a - Use RFHIGHPID when creating the kthread to get a more sensible pid.
- Don't fake walking a tailq.  Instead, use a while loop that pulls items
  off the head of the queue while the queue is not empty.
2000-09-11 04:09:08 +00:00
Roger Hardiman
dd11af6637 Update to driver 2.15.
Main change is the addition of the bktr_mem module.

This holds onto the bktr driver's contiguously allocated memory
when the bktr driver is unloaded and reloaded.

This has to be done because it is virtually impossible to get
contiguous memory once a system is running.

Also tidied up the use of SMBUS, added a new Hauppauge tuner type (0x2c)
and a new Flyvideo vendor ID.
2000-09-10 14:34:08 +00:00
Mark Murray
22566d9dd5 Harvest mouse events for the entropy device in a better place. In the
new location, all mouse events are harvested, not just the ones being
written out to moused(8). This means that mouse entropy is harvested
at the consoles as well as in X.
2000-09-10 14:27:17 +00:00
Mark Murray
4d87a031c0 Large upgrade to the entropy device; mainly inspired by feedback
from many folk.

o The reseed process is now a kthread. With SMPng, kthreads are
  pre-emptive, so the annoying jerkiness of the mouse is gone.

o The data structures are protected by mutexes now, not splfoo()/splx().

o The cryptographic routines are broken out into their own subroutines.
  this facilitates review, and possible replacement if that is ever
  found necessary.

Thanks to:		kris, green, peter, jasone, grog, jhb
Forgotten to thank:	You know who you are; no offense intended.
2000-09-10 13:52:19 +00:00
Cameron Grant
0a1fe8922f disable 16bit mono support- this will be handled by software conversion to
stereo as hardware mono is very noisy
2000-09-09 21:31:06 +00:00
Cameron Grant
58359dc594 add 16bit mono/stereo conversion feeder
prefer feeder chains of length 1 over length 2
2000-09-09 21:24:03 +00:00
Cameron Grant
306f91b60b detach support
remove un-needed setdir functions
add bus_teardown_intr calls where necessary
destroy our dma tags where necessary
destroy ac97 before releasing resources
2000-09-09 19:21:04 +00:00
John Baldwin
9c25701692 Back out my previous commit as well as some SMPng changes to revert the
siosetwater() function to its previous behavior of always disabling
interrupts and obtaining the com_lock before returning.

Requested by:	bde (in principle)
2000-09-08 08:50:25 +00:00
Greg Lehey
e45e88e8aa siointr1: Schedule soft interrupt when needed. This fixes the "no
interrupt" problem people had seen with SMPng.

Approved by:       jasone
Tested by:         bp
2000-09-08 06:58:58 +00:00
John Baldwin
60ee19d500 Fix a problem where we would recursively try to get the com lock within
comparam when calling siosetwater().

Noticed by:	bp
2000-09-08 00:35:46 +00:00
Matt Jacob
e11a1ee870 Per msmith's request, don't attach to Qlogic 12160 id'd cards that have
a certain SubVendorID.
2000-09-07 20:27:40 +00:00
Bill Paul
78999dd117 Special-case the LED twiddling code so that it doesn't do anything
on the NEC VersaPro NoteBook PC. This 21143 implementation has no LEDs,
and flipping the LED control bits somehow stops it from establishing
a link. We check the subsystem ID and don't flip the LED control
bits for the NEC NIC.
2000-09-07 18:51:04 +00:00
Bill Paul
2705f23073 Close PR #20963. Do not pass encryption keys back to the caller via
wi_ioctl() unless they're the superuser.
2000-09-07 17:05:12 +00:00
Jason Evans
0384fff8c5 Major update to the way synchronization is done in the kernel. Highlights
include:

* Mutual exclusion is used instead of spl*().  See mutex(9).  (Note: The
  alpha port is still in transition and currently uses both.)

* Per-CPU idle processes.

* Interrupts are run in their own separate kernel threads and can be
  preempted (i386 only).

Partially contributed by:	BSDi (BSD/OS)
Submissions by (at least):	cp, dfr, dillon, grog, jake, jhb, sheldonh
2000-09-07 01:33:02 +00:00
Cameron Grant
7d60928719 ess maestro driver - not enabled by default
Submitted by:   Taku YAMAMOTO <taku@cent.saitama-u.ac.jp>
2000-09-06 20:10:55 +00:00
Bill Paul
46f1212df0 Add support for D-Link DSB-650 USB ethernet adapter. 2000-09-06 19:35:01 +00:00
Bill Paul
d5b5ec1bcf Regenerate. 2000-09-06 19:28:47 +00:00
Bill Paul
349b8c9813 Add new device ID for the D-Link DSB-650 USB ethernet adapter. This is
a pegasus device, which has product ID 0xABC1. I'm not sure why they
changed it; there's already an entry for a DSB-650TX.
2000-09-06 19:28:27 +00:00
Cameron Grant
cd2c103ae0 initial support for multiple ac97 codecs 2000-09-05 21:08:01 +00:00
Cameron Grant
c02f3f7aee add detach support 2000-09-05 21:06:11 +00:00
Cameron Grant
85a6a5dce4 allow a null setdir implementation 2000-09-05 21:00:45 +00:00
Cameron Grant
c9b53085be be more verbose about failed unload attempts 2000-09-05 20:58:51 +00:00
Cameron Grant
37ab02c0ed tidy up a little, add a mask for 32bit formats 2000-09-05 20:56:31 +00:00
Warner Losh
f245fa0e59 MFNetBSD:
1.6 2000/04/12 21:07:55 scw
	Add support for the SOHOware PCMCIA Ethernet card, model ND5100-E.
	This seems to be a re-badged NDC (National Datacomms. Corp) card.
	It needs a quirk entry due to lack of manufacturer tuple in the CIS.
	For some reason, the 'Tx/Rx' LED on the connector module is inverted
	such that it is off during network activity...
2000-09-05 18:25:49 +00:00
Masahide MAEKAWA
d762e7af21 Regen. 2000-09-05 16:01:34 +00:00
Masahide MAEKAWA
a892b1899f Add product ID (Prolific ATAPI-4 Bridge Controller).
Reported by: "K.Sumitani" <sumitani@bd2.hnes.nec.co.jp>
2000-09-05 16:00:55 +00:00
Nick Hibma
361e87effa Regen. 2000-09-05 12:28:33 +00:00
Nick Hibma
b8a22e4b74 Fix typo's 2000-09-05 12:26:37 +00:00
Nick Hibma
5e1f755037 Loads of scanner Ids. 2000-09-05 12:24:05 +00:00
Sheldon Hearn
bade5944c9 Add ZTIA001 - Zoom Internal V90 Faxmodem.
PR:		21028
Submitted by:	Glenn Johnson <glennpj@charter.net>
2000-09-05 09:42:47 +00:00