Commit graph

5216 commits

Author SHA1 Message Date
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