Commit Graph

5257 Commits

Author SHA1 Message Date
Peter Wemm
7020326332 Add the defines for the cardbus extensions for 32 bit addressing. This
gets the cardbus code to compile, and I was successfully able to map
the CIS into high memory and probe/attach a 16 bit pccard.

Jonathan: feel free to replace this with your version if you want -
this is an expedient hack to get things to build and appear to work.
2001-01-07 02:26:40 +00:00
Bosko Milekic
ad4032fe09 *Blush* Fix a dumb typo in previous commit.
Pointed out by: phk
2001-01-06 23:36:42 +00:00
Bosko Milekic
e1a0b830b5 Make sure musycc driver deals with the possibility of any type of mbuf
allocation not succeeding.

In this case, make sure the driver doesn't leak any memory by freeing all
necessary buffers; make sure to loop and free all the previously allocated
mbufs in this routine.

Reviewed by: alfred
2001-01-06 20:44:39 +00:00
Jonathan Chen
0c95c70577 * Better kld support in pccbb/cardbus
- pccbb no longer needs to remember whether a card is inserted.
  - pccbb reissues insertion on load of cardbus/pccard modules.
  - got rid of unnecessary delays in power functions.
  - Cardbus children are no longer deleted if probe/attach fails.
  - non-attached child devices are reprobed at driver_added.

* CARD interface to read CIS
  - added card_cis_read/card_cis_free interface to read arbitrary CIS
    data.  This currently is only implemented in cardbus.

* pccard begins to work
  - pccard can now use higher memory space (and uses it by default).
  - set_memory_offset interface changed.
  - fixed ccr access, which was broken at multiple locations.
  - implement an interrupt handler - pccard can now share interrupts.
  - resource alloc/release/activate/deactivate functions gutted: some
    resources are allocated by the bridge before the child device is
    probed or attached.  Thus the resource "belongs" to the bridge, and
    the pccard_*_resource functions need to fudge the owner/rid.
  - changed some error conditions to panics to speed debugging.

* Mutex fix - Giant is entered at the beginning of thread
2001-01-06 18:04:55 +00:00
Julian Elischer
069154d55f Rewrite of netgraph to start getting ready for SMP.
This version is functional and is aproaching solid..
notice I said APROACHING. There are many node types I cannot test
I have tested: echo hole ppp socket vjc iface tee bpf async tty
The rest compile and "Look" right.  More changes to follow.
DEBUGGING is enabled in this code to help if people have problems.
2001-01-06 00:46:47 +00:00
Justin T. Gibbs
f8838555e8 aic7xxx.c:
aic7xxx.h:
	First pass at big-endian support in the Core.

	Capture state for second channel on TWIN channel adapters
	for suspend and resume.

aic7xxx_freebsd.h:
	Stubs for endian conversion functions.  These will get filled
	out once we get an official kernel api for this kind of thing
	that is something more elegant and efficient than a bunch of
	manual swaps #ifdefed by platform.

aic7xxx_pci.c
	Allow the second channel of motherboard aic7896 chips to be attached.
	It turns out that the encoding of the subdevice id differs between
	PCI cards and MB based controllers and our check to see, via
	the subvendor id, if the second channel was "stuffed" always
	turned out negative.
2001-01-05 19:15:37 +00:00
Nicolas Souchu
c05aa33cb0 Add the VESA S3 linear framebuffer driver. It works on top of VESA by replacing
the video switch by another. Exactly as VESA does on top of VGA.

It adds linear framebuffer to S3 VESA 1.2 cards.

Obtained from:	The original S3 ISA code comes from
                Peter Horton <pdh@colonel-panic.com>
2001-01-05 16:53:10 +00:00
Nicolas Souchu
b3fc615726 Remove vga_pci generic driver.
Approved by:	Mike Smith <msmith@freebsd.org>
2001-01-05 16:40:30 +00:00
Søren Schmidt
f0915b3708 Oops the test in the Acer code should be >= not >. 2001-01-05 15:23:06 +00:00
Nick Hibma
3b980312b4 Bugfix: device_resume should be connected to bus_generic_resume not
*_suspend.

Submitted by:	kazu
2001-01-05 10:25:47 +00:00
John Baldwin
0f32b57ac4 Call mixer_hwinit() when attaching. 2001-01-05 07:07:48 +00:00
John Baldwin
cc486d8061 - Make the 'hwvol_mixer' and 'hwvol_step' variables be specific to a
specific snd_mixer device rather than global across all mixers.
- Add per-mixer mute status and saved mute_level so that the mixer_hwmute()
  function can now toggle the mute state when the mute button is pressed.
- Create a dynamic sysctl tree hw.snd.pcmX when a pcm device is registered.
- Move the hw.snd.hwvol_* sysctl's to hw.snd.pcmX.hwvol_* so that they
  are now properly device-specific.  Eventually when the mixers become
  their own devices these sysctl's will move to live under a mixerX tree.
- Change the interface of the hwvol_mixer sysctl so that it reports the
  name of the current mixer device instead of the number and is settable
  with the name instead of the number.
- Add a new function mixer_hwinit() used to setup the dynamic sysctl's
  needed for the hwvol support that can be called by drivers that support
  hwvol.

Reviewed by:	cg
2001-01-05 07:07:03 +00:00
Sergey Babkin
e3fc8aba7f Changed the copyright notice to BSD-style. The original GPL copyright
was used due to confusion. Now this code should be moved out of the
gnu ghetto subdirectory.
2001-01-05 02:12:02 +00:00
John Baldwin
6d97297a6a The 'maxchans' count is one more than the number of channels, so
'chancount' never got up to equaling 'maxchans'.  As a result,
pcm_makelinks() was never called, and one always had to set the sysctl to
get the /dev/mixer and other symlinks generated in the DEVFS case.  Instead,
change the test in pcm_addchan() to call pcm_makelinks() after the first
channel is initialized, since the aliases are linked to channel 0.

Reviewed by:	cg
2001-01-04 23:49:00 +00:00
Warner Losh
94648ce60d Add the ES1681, as found in my Digital HiNote UltraII. It works with
the ES18xx DSP code and is now my MP3 juke box engine.

Reviewed by:	cg
2001-01-04 17:12:57 +00:00
Søren Schmidt
b4de9f62a4 Add support for using BurnProff(tm) on drives that support it.
This is experimental as I dont have such a drive, reports welcome!!
2001-01-04 12:43:39 +00:00
Nick Hibma
1458cde760 Readd the id removed by sheldon in the previous commit to uscanner.c.
Change the ID in if_aue.c to match the new name in usbdevs.h.
2001-01-04 11:55:24 +00:00
Nick Hibma
95e5d98749 UMASS_DEBUG implemented panic(9).
PR:		24044
Submitted by:	Mike Bristow <mike@urgle.com>
2001-01-04 11:27:41 +00:00
Nick Hibma
5a5b0c4efa Regen.
(Sorry for forgetting that).
2001-01-04 11:23:21 +00:00
Sheldon Hearn
63ccc06ffe Revert rev 1.8, which broke the installkernel target. 2001-01-04 11:12:15 +00:00
Søren Schmidt
6ddc41c034 Proberly calculate the RAID structure on the Promise Fasttrak. 2001-01-04 09:11:00 +00:00
Nick Hibma
7b58790dbf Add the Id of the Epson 1640 scanner.
Submitted by:	Chris Shenton <chris@shenton.org>
2001-01-03 11:46:09 +00:00
Nick Hibma
801a3c8a40 Add a few Ids. From NetBSD. 2001-01-03 11:45:03 +00:00
John Baldwin
fa465e99e0 Rename the loader tunable from hw.sndunit to hw.snd.unit.
Submitted by:	cg
2001-01-03 02:09:31 +00:00
John Baldwin
1b40801722 - When acknowledging interrupts, write the value 0xff to the interrupt
status register rather than 0.  Without this, a single hardware volume
  event triggers an interrupt storm.
- Implement hardware volume control for the Maestro chips.  This version
  only handles the case where both channels are adjusted at the same time.

Reviewed by:	cg
2001-01-03 01:32:57 +00:00
John Baldwin
d0d4e34743 Add a new API for soundcards that have hardware volume control:
- The mixer_hwmute() function can be called when a soundcard receives a
  mute request.
- The mixer_hwstep() function can be used to adjust the volume of one or
  both channels.
- The 'hw.snd.hwvol_step' sysctl determines the amount that mixer_hwstep()
  adjusts the volume by on each call.
- The 'hw.snd.hwvol_mixer' sysctl specifies the mixer device to adjust the
  volume on for both functions.  The values used correspond to the
  SOUNDCARD_MIXER_* constants.
2001-01-03 01:29:47 +00:00
John Baldwin
b3b7ccfe38 Create a new sysctl node 'hw.snd' and move 'hw.sndunit' to
'hw.snd.unit'.

Reviewed by:	cg
2001-01-03 01:25:26 +00:00
Nicolas Souchu
adb50a3799 Cleanup and improve mode detection. Now, you should get what you actually
want according to the modes set with the ppc(4) flags. Especially, it
should fix some problems with mode detection of parallel chipsets
configured to EPP but which have timing troubles with the drives. In such
a case, the driver should now fall back to slower modes (PS2, NIBBLE).
2001-01-02 21:29:06 +00:00
Duncan Barclay
2ae2c42c38 Tidy up if_init routine so that it does not return an error. 2001-01-02 20:29:25 +00:00
Noriaki Mitsunaga
925c0d6804 Remove conflicts between unsinged char *s and int s.
It was possible cause of kernel panic.

Pointed Out by: phk@FreeBSD.ORG
2001-01-02 10:41:50 +00:00
Poul-Henning Kamp
637f671a3d Either cvs(1) or I forgot this file in my last commit.
Please see commit log for rev 1.4 of src/sbin/mdconfig/mdconfig.c
2001-01-02 09:42:47 +00:00
Peter Wemm
e6de111aca Newbusify the PCI PDQ (fddi) attachment. This isn't as clean as
the EISA attachment and has not been tested (no hardware!), but at least
it stands a chance at working.  At least it compiles now.
2001-01-02 09:30:48 +00:00
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