Commit Graph

5501 Commits

Author SHA1 Message Date
Warner Losh
887e2e5d65 Fix memory leaks with dev_get_children().
Submitted by: Jeroen Ruigrok/Asmodai <asmodai@wxs.nl>
2001-02-08 21:47:45 +00:00
Jeroen Ruigrok van der Werven
58d8a85e29 Fix typos: initalise -> initialise.
Initalise is not an english word.
2001-02-08 20:28:57 +00:00
John Baldwin
393c26a080 - Check if the ccb_infos in the softc is NULL before trying to free it in
adv_free() as the ISA probe routine doesn't malloc() ccb_infos but does
  call adv_free().
- Release the ISA-only overrun DMA tags, bufs, and maps if the probe fails.

Tested by:	rwatson
2001-02-08 00:00:12 +00:00
Semen Ustimenko
e8288d7f9c Oops... I knew i shouldn't use arrows in vi. Fix a typo causing errors in
compilation.
2001-02-07 22:34:15 +00:00
Cameron Grant
d55a14469f back out rev 1.49, looks like i committed it from the wrong tree.
include the changes 1.49 was supposed to have.

Noticed by:	peter
2001-02-07 20:45:40 +00:00
Semen Ustimenko
67a9752835 Add support for SMC9432FTX card, possibly othe fiber optic SMC9432 family
cards will work too.
2001-02-07 20:11:02 +00:00
Semen Ustimenko
9526a692c6 Add QS6612, AC101 and LXT970 personal drivers and register definitions.
Obtained from:	NetBSD/OpenBSD
2001-02-07 19:57:40 +00:00
Poul-Henning Kamp
ee613f9cb8 Use correct index when counting short errors. 2001-02-07 08:44:42 +00:00
Cameron Grant
9d7227e565 conditionalize "hwptr went backwards" messages
modify default buffer size heuristic to not max out at 4k.  mpg123 should now
behave better under load.
2001-02-07 06:48:28 +00:00
Søren Schmidt
b17f7a1aa5 Introduce busspace instead of the good old in/out instructions.
Not pretty but it works (I hope)...
2001-02-06 16:44:25 +00:00
Nick Hibma
785fe81a71 Regen. 2001-02-06 14:59:28 +00:00
Nick Hibma
483f8be664 Add a comment about the fact that adding an ID doesn't actually do anything. 2001-02-06 14:59:03 +00:00
Søren Schmidt
dbb5bf4bf6 Damn! that was the wrong patch! get it right this time.... 2001-02-06 12:49:33 +00:00
Søren Schmidt
06a519dfc9 Fix the clone functionality in atapi-cd, it didn't work for
devs other than the first, and allowed to clone a nonexistent
device..
2001-02-06 12:41:53 +00:00
Jeroen Ruigrok van der Werven
2fa72ea7d4 Fix typo: compatability -> compatibility.
Compatability is not an existing english word.
2001-02-06 12:05:58 +00:00
Jeroen Ruigrok van der Werven
1a6e52d0e9 Fix typo: seperate -> separate.
Seperate does not exist in the english language.
2001-02-06 11:21:58 +00:00
Jeroen Ruigrok van der Werven
4539e1344f Fix typo: depricated -> deprecated. 2001-02-06 10:22:22 +00:00
Poul-Henning Kamp
6817526d14 Convert if_multiaddrs from LIST to TAILQ so that it can be traversed
backwards in the three drivers which want to do that.

Reviewed by:    mikeh
2001-02-06 10:12:15 +00:00
Jeroen Ruigrok van der Werven
f09deb6962 Fix typo: wierd -> weird.
There is no such thing as wierd in the english language.
2001-02-06 09:25:10 +00:00
Nick Hibma
6e76a6951d Regen. 2001-02-05 11:03:21 +00:00
Nick Hibma
0462c572a5 Add some ids from NetBSD. 2001-02-05 11:02:50 +00:00
Nick Hibma
e0fdc93431 Regen. 2001-02-05 11:00:35 +00:00
Nick Hibma
d4c317748d * Correct a broken entry
* Add the id for the Rio 800 USB.
Submitted by:	Wesley Morgan <morganw@chemikals.org>
2001-02-05 11:00:13 +00:00
Cameron Grant
17e401f8a9 add driver for CS4281 sound chips
Submitted by:   Orion Hodson <O.Hodson@cs.ucl.ac.uk>
2001-02-04 19:23:35 +00:00
Cameron Grant
ebbb717721 add driver for CMedia CMI8338/CMI8738 sound chips
Submitted by:   Orion Hodson <O.Hodson@cs.ucl.ac.uk>
2001-02-04 19:13:40 +00:00
Warner Losh
1bd4d86275 Remove NAHA, NAHATOT and aha_softcs and related code. It was unused
except for setting it.  Also remove count from aha and replace it with
optional.

Also add commented out pccard lines for all the old card drivers.
They have to be commented out until they are converted because it
causes problems in NEWCARD.
2001-02-04 16:45:39 +00:00
Poul-Henning Kamp
37d4006626 Another round of the <sys/queue.h> FOREACH transmogriffer.
Created with:   sed(1)
Reviewed by:    md5(1)
2001-02-04 16:08:18 +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
Poul-Henning Kamp
78d82c8c59 Use LIST_FOREACH() to traverse ifp->if_multiaddrs list, instead of
<sys/queue.h> implementation details.

Created with:   /usr/sbin/sed
Reviewed with:  /sbin/md5
2001-02-03 16:29:10 +00:00
Cameron Grant
d60a6a8e0c quieten the esscontrol device 2001-02-02 16:41:06 +00:00
Greg Lehey
2a1735da45 Allocate lock table and mutex not only for parity plexes, but also for
striped plexes.  This prevents various panics introduced in the last
rewrite of the locking code.

Suffered by:   "Niels Chr. Bank-Pedersen" <ncbp@bank-pedersen.dk>
2001-02-02 07:14:13 +00:00
Scott Long
a5108eaebf Driver for the ESS Maestro3 and Allegro sound chips. Note that due to the
amount of GPL'd firmware in the driver, it will only be built as a module.

Approved by:	cg
2001-02-01 20:29:16 +00:00
Bruce Evans
c1ac98a632 Converted to new-bus.
Reviewed by:	imp
2001-02-01 09:49:57 +00:00
Peter Wemm
8ab109d131 Remove count for NSIO. The only places it was used it were incorrect.
(alpha-gdbstub.c got sync'ed up a bit with the i386 version)
2001-01-31 10:54:45 +00:00
Mike Smith
9453136d44 Add some debugging.
Turn off semaphores.  Nobody else implements them, and there is lots of
AML out there which does totally absurd things with them, meaning that
if we try to do the right thing we are guaranteed to fail.
2001-01-31 09:35:50 +00:00
Mike Smith
b2e6de72d4 Add some debugging statements. 2001-01-31 09:34:54 +00:00
Mike Smith
5d131f355f Tidy up.
Don't print temperatures at attach time - they're usually wrong.

Use acpi_EvaluateInteger instead of doing things the hard way.
2001-01-31 09:33:51 +00:00
Mike Smith
42f6d122ed Add some debugging.
Use acpi_EvaluateInteger where possible.

Use FuncName rather than &FuncName when passing function addresses.

Don't evaluate the _REG method when we attach to an address space -
AcpiInstallAddressSpaceHandler does it for us.
2001-01-31 09:32:44 +00:00
Mike Smith
91467fc61d ACPI_NUMBER becomes ACPI_INTEGER. acpi_EvaluateNumber becomes
acpi_EvaluateInteger.

Use acpi_EvaluateInteger instead of doing things the hard way where
possible.

AcpiSetSystemSleepState (unofficial) becomes AcpiEnterSleepState.

Use the AcpiGbl_FADT pointer rather than searching for the FADT.
2001-01-31 09:30:57 +00:00
Peter Wemm
2b12097485 Exterminate the use of PSEUDO_SET() with extreme prejudice. 2001-01-31 07:58:58 +00:00
Bruce Evans
a89bda90b1 Added used include of <sys/mutex.h>. The SMP case was broken by
incompletely converting simplelocks to mutexes (COM_LOCK() is supposed
to hide the SMP locking internals, but it now depends on mutex interfaces
being visible).
2001-01-30 17:05:58 +00:00
John Hay
1a3d993a0b Newbusify the sr device and move it to its new location. 2001-01-30 10:02:10 +00:00
John Hay
59b7f2afcd Update include files to reflect the new location of the ar device. 2001-01-30 10:01:15 +00:00
Søren Schmidt
6fe4e0a915 Add option ATA_ENABLE_WC for enabling write caching (now off by default). 2001-01-29 18:00:35 +00:00
Peter Wemm
920c17857f Stop counting sppp interfaces, we were just testing its presence to give
a warning if it was missing.
2001-01-29 12:27:46 +00:00
Peter Wemm
93cd41f72d Zap silly #if NPCI > 0 and the hoops that we jump through for the module
case.  Use an 'and' case in conf/files so that it only gets compiled if
pci is present.
2001-01-29 11:38:39 +00:00
Peter Wemm
2eedcf55e9 Remove unused #include "lnc.h" 2001-01-29 11:19:30 +00:00
Peter Wemm
c83abe02aa Remove unused #include "snp.h" 2001-01-29 10:06:22 +00:00
Peter Wemm
358f1800c0 Convert ata and atapi #if NATA* > 0 to options instead. Stop config
trying to count the number of ata* devs since they were not used anyway.
2001-01-29 10:01:11 +00:00
Peter Wemm
03927d3c33 Send "#if NISA > 0" to the bit-bucket and replace it with an option.
These were compile-time "is the isa code present?" tests and not
'how many isa busses' tests.
2001-01-29 09:38:39 +00:00
Poul-Henning Kamp
896dba5a0c Fix a braino in ccd's clone routine.
Submitted by:	tegge
2001-01-29 06:18:14 +00:00
Poul-Henning Kamp
c93849206e Remove devstat entries in mddelete()
Spotted:	tegge
2001-01-28 20:55:55 +00:00
Gerard Roudier
3c9013e257 A couple of chip errata work-arounds refined:
- When used on a 33MHz PCI BUS, the 53C1010-66 revision 0
  requires extra clocks to be inserted in data out phase.
  Revision 1 is fixed.
- The 53C1010-33 revision 1 requires internal cycles to be
  disabled due to possible contentions on IO registers.
  Revision 2 is fixed.
Fix:
- The probing of HVD from GPIO3 bit by the driver was reversed.
  The driver could misprobe the bus mode of a 825 or 875 chip
  that was not previously initialized (no BIOS for example).
2001-01-28 19:58:21 +00:00
Justin T. Gibbs
64a3876fef Update Copyright notices for new year. (should have been in last commit). 2001-01-27 20:54:24 +00:00
John Baldwin
ba88dfc733 Back out proc locking to protect p_ucred for obtaining additional
references along with the actual obtaining of additional references.
2001-01-27 00:01:31 +00:00
John Baldwin
21bd1ed3bf - Don't pass in MTX_NORECURSE, as that is only used with spin mutexes and
is going away soon anyways.  Instead, don't pass MTX_RECURSE to mtx_init,
  so that WITNESS will panic if the driver mutex is recursed on.
- Use MTX_DEF in mtx_init() instead of assuming that it will be 0.
2001-01-26 03:18:17 +00:00
Nicolas Souchu
a138e28335 Discard extra status information if -1. This has been breaking the
PS/2 mode for ZIP+ drives for a long time. Thanks Jonathon.

Submitted by:	j mckitrick <jcm@FreeBSD-uk.eu.org>
2001-01-25 13:07:55 +00:00
Nicolas Souchu
c264e80fb7 Consider that the chipset may be in ECP mode (from BIOS settings)
even if mode PS/2 is forced with bootflags. As a matter of fact,
chipsets needs some extra configuration for accessing PS/2 mode
from ECP. The current patch is only relevant for generic chipsets
since specific code is supposed to deal with this during detection.
2001-01-25 10:51:41 +00:00
Yoshihiro Takahashi
ba4c5e6950 Added necessary include for pc98. 2001-01-25 09:56:04 +00:00
Peter Wemm
d42df83312 Disable cy - it is now completely broken and needs non-trivial work. 2001-01-25 01:56:27 +00:00
John Hay
b2952b0aa4 Newbusify ar(4). 2001-01-24 18:45:29 +00:00
John Baldwin
e7d904a13a - Proc locking around the vinumdaemon dinking with its flags.
- P_INMEM -> PS_INMEM.
2001-01-24 10:28:19 +00:00
Cameron Grant
1a8de399e7 don't grope around inside snd_dbuf structures as they will change in future 2001-01-24 01:36:15 +00:00
Cameron Grant
2707da0758 fix certain cards failing to attach
Submitted by:	Russell Cattelan <cattelan@thebarn.com>
2001-01-24 01:27:31 +00:00
Cameron Grant
03d18442f6 fix blocksizing for playback, implement blocksizing for record 2001-01-24 01:22:53 +00:00
Cameron Grant
7ed9700b1f some cosmetics, changed channel setup and revamped irq handling - ignore
repeated interrupts
2001-01-24 01:20:04 +00:00
Cameron Grant
6e64c174bd prevent excessively small buffer sizes resulting in hundreds of irqs per
second
2001-01-24 01:15:50 +00:00
Matt Jacob
9fa6ccfb5e Allow fxp to configure in I/O space if the user wants it and specifies
an override as a loader settable variable (fxp_iomap). fxp_iomap is
a bitmap of fxp units that should be configured to use PCI I/O space
in stead of PCI Memory space.

Reviewed by:	Kees Jan Koster <dutchman@tccn.cs.kun.nl>, dg@freebsd.org
2001-01-23 23:22:17 +00:00
John Baldwin
1c827e2d15 Tag unused functions with __unused. 2001-01-23 22:24:26 +00:00
John Baldwin
0e9f2d667c Proc locking to protect p_ucred while we obtain another reference to it. 2001-01-23 22:23:25 +00:00
John Baldwin
4957d1b4cb Use suser(9) instead of checking p->p_ucred->cr_uid directly. 2001-01-23 22:22:25 +00:00
John Baldwin
6db2e28142 Remove a prototype for an unused and undefined debugging function. 2001-01-23 22:21:14 +00:00
John Baldwin
399fde35e8 Tag unused functions with __unused. 2001-01-23 22:18:41 +00:00
John Baldwin
b787813727 - Move stg_card_intr()'s prototype and definition inside appropriate
#ifdef's as it is is only used on older versions of FreeBSD.
- #ifdef a local variable only used on older versions of FreeBSD.
2001-01-23 22:18:07 +00:00
Justin T. Gibbs
98ba52eadc When flipping the first entry in the qinfifo with the "next queued SCB",
we must also inform the card of this change.  Otherwise the sequencer
will traverse a corrupt list of SCBS.  The side effects of this problem
were unknown SCBs completing in the qoutfifo or worse yet, panics due
to sequencer interrupts that referenced what, to the kernel, were invalid
SCB ids.
2001-01-23 22:17:03 +00:00
John Baldwin
4a08af58fe Relocate the 'hwfuncs' functions below the inlined functions they attempt
to call so that the other functions can actually be inlined.
2001-01-23 22:16:18 +00:00
John Baldwin
f5f7ddc668 Move nsp_card_intr()'s prototype and definition inside the appropriate
#ifdef's as it is only used in older versions of FreeBSD.
2001-01-23 22:09:04 +00:00
John Baldwin
acf5cad5aa Move the definition of nsp_start_timer() earlier in the file before it is
called so that it can be inlined.
2001-01-23 22:08:21 +00:00
John Baldwin
32c98125c9 The ncv_card_intr function is only used in older versions of FreeBSD, so
move its prototype and definition inside the appropriate #ifdef's.
2001-01-23 22:06:10 +00:00
John Baldwin
5d3e8edac4 Use the 'slp' local variable that was otherwise unused instead of casting
the driver softc under the assumption that the first part of it was a
struct scsi_low_softc.
2001-01-23 22:05:07 +00:00
John Baldwin
5928fa5cc7 #if 0 out local variables only used in #if 0'd code and remove unused
local variables.
2001-01-23 22:02:08 +00:00
John Baldwin
e54e93e21a Add curly braces ({}) around each struct speedtab to quiet warnings. 2001-01-23 22:00:05 +00:00
John Baldwin
14c3599a2d Proc locking in the form of using the proc lock to protect p_ucred while
we obtain another reference to it for vnode operations.
2001-01-23 21:58:44 +00:00
John Baldwin
d1a147af8b Axe unused local variable. 2001-01-23 21:53:44 +00:00
John Baldwin
4cd9657860 - Mark an unused function with __unused.
- Temporarily #if 0 some unused local variables.
2001-01-23 21:52:34 +00:00
John Baldwin
705a513a29 Axe an unused static softc. 2001-01-23 21:51:26 +00:00
John Baldwin
9697124fc8 Move a temporary #ifdef of code (just the #ifdef part) up so that it is
above the local variable declaration to quiet warnings about unused
variables.
2001-01-23 21:45:05 +00:00
John Baldwin
65baa27ce6 Kill a warning by marking an unused function with __unused. 2001-01-23 21:43:47 +00:00
John Baldwin
f843c385b1 - Add necessary proc locking.
- Use proper atomic operations to make the run time initialization
  controlled by svr_str_initialized be MP safe.
- Use appropriate queue(3) macros where needed.
2001-01-23 21:06:30 +00:00
Peter Wemm
9f3e2250ca In answer to the comment: /* XXX is it OK to block here? */, the answer
is definately NO! as we are in interrupt context and malloc() does a
KASSERT() to be sure.
2001-01-23 09:43:23 +00:00
David Malone
d2db050252 Free the kbd pointer when it isn't NULL, as opposed to when it is.
This was a typo in the M_ZERO patches.

Submitted by:	Mike Silbersack <silby@silby.com>
2001-01-22 22:54:02 +00:00
Justin T. Gibbs
a5847d5c27 ahc_eisa.c:
Initialize rid to 0.  This doesn't seem to make any difference
	(the driver doesn't care what rid it gets and no-one seems to
	check rid's value), but follows standard conventions.

	Pass in our device_t to ahc_alloc().  We now use device_T
	softc storage, so passing NULL results in a panic.

	Set the unit number in our softc so that the driver core
	can retrieve it.

ahc_pci.c:
	Set the unit number in our softc so that the driver core
	can retrieve it.

aic7770.c:
	Insert our softc into the list of softcs when initialization
	is successful.

aic7xxx.c:
	Remove a workaround for an aic7895 bug we will never trigger.

	Add additional diagnostic info to ahc_dump_card_state().

	Always panic the system if a sequencer assertion fails.

	AHC_SCB_BTT is a "flag" not a "feature".  Check the right
	field in the softc.

	Replace a hard coded number with a constant.

	Guard against looping forever in ahc_pause_and_flushwork().
	A hot eject or card failure may make the intstat register
	return 0xFF, so limit the number of interrupts we'll process.

	Correct the code in ahc_search_qinfifo() that guarantees that
	the sequencer will see an abort collision if the qinfifo is
	modified when a DMA is in progress.  We now do this fixup
	after modifying the queue.  This guarantees that the HSCB
	we place at the head of the queue is not the same as the
	old head.  Using "next hscb" (guaranteed not to be the
	same as the first SCB) before clearing the queue could free
	up the original head hscb to be used during a remove operation
	placing it again at the head of the qinfifo.

aic7xxx.h:
	Reduce the maximum number of outstanding commands to 253 from
	254.  To handle our output queue correctly on machines that only
	support 32bit stores, we must clear the array 4 bytes at a
	time.  To avoid colliding with a DMA write from the sequencer,
	we must be sure that 4 slots are empty when we write to clear
	the queue.  This reduces us to 253 SCBs: 1 that just completed
	and the known three additional empty slots in the queue that
	preceed it.  Yahoo was able to force this race on one of their
	systems.  Interrupts were disabled for such a time that the
	entire output queue was filled (254 entries complete without
	any processing), and our 32bit write to clear the status clobbered
	one entry.

	Add a feature tag for devices that are removable.

aic7xxx.reg:
	Never use the sequencer interrupt value of 0xF0.  We need
	to guanrantee that an INTSTAT value of 0xFF can only occur
	during card failure or a hot-eject.

	Align the busy targets table with the begining of scratch
	space.  This seems to appease a chip bug in the aic7895.

aic7xxx.seq:
	Be sure to disable select-out after a bus free event that occurs
	early in a selection.  If we don't disable select-out, we will
	believe that it is enabled even though a new selection will never
	occur.

	Move the clearing of SELDI to just before a jump.  This appeases
	another chip bug of the aic7895.

	Make the target mode command loop a bit more efficient.

	AHC_SCB_BTT is a "flag" not a "feature".  Check the right
	field in the softc.

	Properly cleanup the last SCB we tested against should we
	fail to properly find an SCB for a reselection.

	Add some additional sequencer debugging code.

aic7xxx_freebsd.c:
	Limit the driver to 253 outstanding commands per adapter.

	Guard against overflow in timeout handling.

aic7xxx_inline.h:
	AHC_SCB_BTT is a "flag" not a "feature".  Check the right
	field in the softc.

aic7xxx_pci.c:
	Set the removable feature for the apa1480 cardbus and the 29160C
	Compact PCI card.

	Don't report high byte termination information for narrow cards.

	Use a PCI read rather than a questionable delay when fetching/setting
	termination settings.
2001-01-22 21:03:48 +00:00
Yoshihiro Takahashi
5069714534 Added PC-98 apm support.
Submitted by:	MURAMATSU Atsushi <amura@ma3.seikyou.ne.jp>
2001-01-22 11:27:25 +00:00
Mike Smith
0c645db4c0 Plug a memory leak in AcpiOsDeleteSemaphore where the mutex is not properly
destroyed.

Submitted by:	bmilekic
2001-01-22 05:33:36 +00:00
Poul-Henning Kamp
96b6a55f97 General cleanup. 2001-01-21 22:57:56 +00:00
Poul-Henning Kamp
18d5982009 Update these netgraph drivers in current so that these changes can be
MFC'ed i due time.  I can't test it under current right now because
netgraph seems to do unethical things with mutexes.

musycc:
	Add status per channel.
	Reduce printf chattyness
	Keep error counters line if_mn does.
	Increase descriptor count.

if_mn:
	Support experimental unframed E1 lines.

These two drivers should share more code relating to framed channelized
TDM media in general (T1/E1/E3/T3, Sonet).  Anyone interested email me.
2001-01-21 22:16:20 +00:00
Jake Burkholder
a448b62ac9 Make intr_nesting_level per-process, rather than per-cpu. Setup
interrupt threads to run with it always >= 1, so that malloc can
detect M_WAITOK from "interrupt" context.  This is also necessary
in order to context switch from sched_ithd() directly.

Reviewed By:	peter
2001-01-21 19:25:07 +00:00
Warner Losh
96b15e09d9 wi has been converted to NEWCARD, so included it when pccard is
included.

Also, I forgot to update this to the new cis[] structure last night,
mainly due to the above omission.
2001-01-21 18:10:38 +00:00
Søren Schmidt
98e1287686 Correct botchup in last commit that made older VIA chips fail... 2001-01-21 16:13:03 +00:00
Warner Losh
012b895034 Add a bunch of entries from NetBSD's if_ne_pcmcia.c v1.67. We still
need to verify that all the entries in pccard.conf are present in this
table.
2001-01-21 08:20:23 +00:00