Commit Graph

16007 Commits

Author SHA1 Message Date
John Baldwin
397c30a83d Change acpi's handling of suballocating system resources to be a little
simpler.  It now can just use rman_is_region_manager() during
acpi_release_resource() to see if the the resource is suballocated from
a system resource.  Also, the driver no longer needs MD knowledge about
how to setup bus space tags and handles when doing a suballocation, but
can simply rely on bus_activate_resource() in the parent setting all that
up.
2007-03-21 15:39:11 +00:00
Kip Macy
94f7a09823 allocate 9 messages in all cases 2007-03-21 09:16:10 +00:00
Kip Macy
693d746cc1 make MSI-X the default and allocate up to mp_ncpus queues per port
MFC after: 3 days
2007-03-21 07:25:40 +00:00
Sam Leffler
6810ad6f2a Overhaul driver/subsystem api's:
o make all crypto drivers have a device_t; pseudo drivers like the s/w
  crypto driver synthesize one
o change the api between the crypto subsystem and drivers to use kobj;
  cryptodev_if.m defines this api
o use the fact that all crypto drivers now have a device_t to add support
  for specifying which of several potential devices to use when doing
  crypto operations
o add new ioctls that allow user apps to select a specific crypto device
  to use (previous ioctls maintained for compatibility)
o overhaul crypto subsystem code to eliminate lots of cruft and hide
  implementation details from drivers
o bring in numerous fixes from Michale Richardson/hifn; mostly for
  795x parts
o add an optional mechanism for mmap'ing the hifn 795x public key h/w
  to user space for use by openssl (not enabled by default)
o update crypto test tools to use new ioctl's and add cmd line options
  to specify a device to use for tests

These changes will also enable much future work on improving the core
crypto subsystem; including proper load balancing and interposing code
between the core and drivers to dispatch small operations to the s/w
driver as appropriate.

These changes were instigated by the work of Michael Richardson.

Reviewed by:	pjd
Approved by:	re
2007-03-21 03:42:51 +00:00
Yoshihiro Takahashi
41f5bd0f6d Don't call bus_deactivate_resource() explicitly before calling
bus_release_resource().  This is needed for pc98 by upcoming nexus related
change.
2007-03-21 03:38:37 +00:00
Kip Macy
577e9bbe3e Synchronize with version 1.0.071 of Chelsio's common code
(with the notable exception of improvements for using multiple TX queues)

This adds support for the T3B2 ASIC rev

Obtained from: Chelsio
MFC after: 3 days
2007-03-20 21:43:32 +00:00
John Baldwin
ce533e82a2 Tweak the probe/attach order of devices on the x86 nexus devices.
Various BIOS-related psuedo-devices are added at an order of 5.  acpi0 is
added at an order of 10, and legacy0 is added at an order of 11.
2007-03-20 20:21:44 +00:00
Ariff Abdullah
94d36aa276 Put a temporary bandaid to set/reset uncacheable DMA region (affected
on amd64 and i386) until we gain proper BUS_DMA_NOCACHE support.
(in progress).

Tested by:	rafan, infofarmer, Nguyen Tam Chinh <unixvn@gmail.com>
Tested on:	amd64, i386
2007-03-20 11:24:29 +00:00
Kip Macy
77f07749f3 cxgb_stop is only called from cxgb_ioctl so:
- don't acquire port lock, already held in ioctl
- rename to cxgb_stop_locked
- switch callout_drain to callout_stop to avoid a hang from having the port lock held
2007-03-20 06:21:47 +00:00
Nate Lawson
6e141df200 If we got an OBE/IBF event, we failed to re-enable the GPE. This would
cause the EC to stop handling future events because the GPE stayed masked.
Set a flag when queueing a GPE handler since it will ultimately re-enable
the GPE.  In all other cases, re-enable it ourselves.  I reworked the
patch from the submitter.

Submitted by:	Rong-en Fan <grafan@gmail.com>
2007-03-20 00:58:19 +00:00
Jung-uk Kim
9239bab2fe Revert couple of changes from 1.51 and 1.52. Reading link status with BMSR
is okay for most of the chipsets but BCM5701 PHY does not seem to like it.
Set media to IFM_NONE if link is not up instead of the previous value.

Reported by:	Goran Lowkrantz (goran dot lowkrantz at ismobile dot com)
2007-03-19 23:17:39 +00:00
Ariff Abdullah
19f018fb83 Destroy channel DMA tag during resource cleanup. 2007-03-19 16:06:26 +00:00
Hidetoshi Shimokawa
06767d306b Poll only while interrupt is disabled.
MFC: 3 days after
2007-03-19 03:41:27 +00:00
Hidetoshi Shimokawa
33662e369c Wait SCLK to be stable after LPS enabled.
This should fix NMI problem in fwphy_rddata().

PR: kern/94146 kern/100356
MFC: after 3 days
2007-03-19 03:35:45 +00:00
Ariff Abdullah
d5304d9e3d Enforce sample size alignment on first direct-copy channel. 2007-03-18 18:26:40 +00:00
Nate Lawson
675e5627d0 Disable burst mode by default. Testing has shown that while it works on
most systems, it causes the EC not to respond for some Acer and Compaq/HP
laptops.  This is the default value for Linux also.  For systems that need
it, burst mode can be enabled via the tunable/sysctl:
	debug.acpi.ec.burst="1"
2007-03-18 01:03:03 +00:00
Ariff Abdullah
d2ea76fe8f Fix (another, more to come) ivar memory leak during driver detach. 2007-03-17 19:37:09 +00:00
Ariff Abdullah
42a3b81e4e Fix long delay closing/syncing issues on mmaped buffer. 2007-03-17 17:07:21 +00:00
Kip Macy
8db477416c move inline function above use so that -O works 2007-03-17 05:23:45 +00:00
Ariff Abdullah
7ab4fa8ee2 [stage: 9/9]
- SWAPLR quirk for (unknown, luckily it is mine) broken uaudio stick.
  Fixing by rewiring is impossible without damaging it. Luckily,
  we can fix it using "other" methods :) .
- Add uaudio_get_vendor(), _product() and _release() in uaudio.c
  (currently used by uaudio_pcm quirk).
- Implement CHANNEL_SETFRAGMENTS().
- Drop channel locking in few places where it is about to sleep
  somewhere. This should help eliminating illegal locking acquisition
  where the current thread is about to sleep, and also few deadlock
  cases. Dropping it right here is quite safe since it is already
  protected by CHN_F_BUSY flag and other threads won't bother to touch it.
  Solving other illegal locking issues are quite tricky without converting
  most usbd_do_request() calls to its equivalent _async() calls,
  which I intend to do it later after getting full test report from
  other people with different uaudio hardwares.
- Fix memory leak issues during detach. This seems common to any drivers
  (notably emu10kx, csapcm?) with bridge functions.
2007-03-16 17:19:03 +00:00
Ariff Abdullah
1042342ad8 [stage: 8/9]
Implement CHANNEL_SETFRAGMENTS() for snd_atiixp, snd_es137x, snd_hda
and snd_via8233. CHANNEL_SETBLOCKSIZE() will basically call
CHANNEL_SETFRAGMENTS() internally using conservative blocksize /
blockcount hints. Other drivers will be converted later.
2007-03-16 17:18:17 +00:00
Ariff Abdullah
7d9022b422 [stage: 7/9]
EWOULDBLOCK -> EAGAIN.
2007-03-16 17:17:25 +00:00
Ariff Abdullah
1324d98beb [stage: 6/9]
- Disable stray buffer management, since sample size aligned buffering
  are pretty much guaranteed through out the entire feeder_* chain
  processes.
- Few style(9) cleanups.
2007-03-16 17:16:56 +00:00
Ariff Abdullah
fd1475d34d [stage: 5/9]
channel.c/channel_if.m:
 - Macros cleanups, prefer inlined min() over MIN().
 - Rework chn_read()/chn_write() for better dead interrupt detection
   policy. Reduce scheduling overhead by doing pure 5 seconds sleep
   before giving up, instead of several cycle of brute micro sleeping.
 - Avoid calling wakeup_one() for non-sleeping channel (for example,
   vchan parent channel).
 - EWOULDBLOCK -> EAGAIN.
 - Fix possible divide-by-zero panic on chn_sync().
 - Re-enforce ^2 blocksize policy, since there are too many broken
   userland apps that blindly assume it without even trying to do
   serious calculations.
 - New channel method - CHANNEL_SETFRAGMENTS(), a refined version of
   CHANNEL_SETBLOCKSIZE(). It accept _both_ blocksize and blockcount
   arguments, so the driver internals will have better hints for
   buffering and timing calculations.
 - Hook FEEDER_SWAPLR into feederchain building process.

feeder_fmt.c:
- Unified version of various filters, avoiding duplications.
- malloc()less feeder_fmt. Informations can be retrieved dynamically
  by doing table lookup on static data. For cases such as converting
  from stereo to mono or reducing bit depth where input data is larger
  than output, cycle remaining available free space until it has been
  exhausted and start kicking 8 bytes reservoir space from there to
  complete the remaining requested count.
- Introduce FEEDER_SWAPLR. Few super broken hardwares (found on several
  extremely cheap uaudio stick, possibly others) mistakenly wired left
  and right channels wrongly, screwing output or input.
2007-03-16 17:16:24 +00:00
Ariff Abdullah
c30ec7427a [stage: 4/9]
- Rearrange FEEDER_* constants starting from 0 to 31, so the future
  additions will be much easier and consistent.
- Introduce FEEDER_SWAPLR. Few super broken hardwares (found on several
  extremely cheap uaudio stick, possibly others) mistakenly wired left
  and right channels wrongly, screwing output or input.
2007-03-16 17:15:33 +00:00
Ariff Abdullah
e956c4e11f [stage: 3.2/9]
malloc()less feeder_vchan. Informations can be retrieved dynamically
by doing table lookup on static data. Reduce mixing overhead by
doing direct copy on first channel. Mixing process will begin starting
from second channel onwards.
2007-03-16 17:14:41 +00:00
Ariff Abdullah
3e3981e8a0 [stage: 3.1/9]
malloc()less feeder_volume. Informations can be retrieved dynamically
by doing table lookup on static data. Increase resolution from 6bit
to PCM_FXSHIFT (8bit) for better resolution and finer volume changes.
2007-03-16 17:14:19 +00:00
Ariff Abdullah
4dfcb0573f [stage: 2/9]
Use inlined min() rather than MIN() macross.
2007-03-16 17:13:44 +00:00
Ariff Abdullah
dd83f3b6cf [stage: 1/9]
- Convert sx lock to plain mutex. Since the access of /dev/sndstat
  is pretty much exclusive and protected by toggling sndstat_isopen,
  plain mutex is more than enough.
- Enable SBUF_AUTOEXTEND to avoid buffer truncation.
2007-03-16 17:13:12 +00:00
Hidetoshi Shimokawa
801167a869 Replace xfer->act.hand with xfer->hand. 2007-03-16 05:39:33 +00:00
Hidetoshi Shimokawa
f7cb7d5dd0 Remove retry_count. 2007-03-16 05:17:23 +00:00
Hidetoshi Shimokawa
976c8eadc9 * Remove xfer->retry_req.
It is unnecessary because retry is done by OHCI.
   Further retry should be done by applications.
2007-03-16 05:11:42 +00:00
Hidetoshi Shimokawa
ac44778260 Less verbose debug messages. 2007-03-16 04:26:58 +00:00
Hidetoshi Shimokawa
d0581de84e Detect cycle lost. 2007-03-16 04:25:02 +00:00
Hidetoshi Shimokawa
c6c2738201 Print warning for large DFLTPHYS. 2007-03-16 02:29:36 +00:00
Ariff Abdullah
d90a1cd318 Fix support for ASUS A7T ALC882 laptop (gpio0 quirk).
Reported/Tested by:	cognet
2007-03-16 01:44:21 +00:00
Hidetoshi Shimokawa
319222274a Support MAXPHYS up to 512KB
- We need at least two OCBs with indirect pointers allocated in a 4KB page.
- SBP_MAXPHYS can increase to 1MB once we separate management OCB/ORB
  which usually does not need indirect pointers.
- We have to increase SBP_DMA_SIZE for MAXPHYS larger than 1MB.

MFC after: 3 days
2007-03-16 01:23:36 +00:00
Ariff Abdullah
4beb77e673 Spring cleanup on irrelevant NULL checking over M_WAITOK allocations. 2007-03-15 18:19:01 +00:00
Ariff Abdullah
12828031ac - Put some sanity break statement in few missing places.
- Remove NULL checking on snd_mtxcreate() (M_WAITOK) .
2007-03-15 17:35:04 +00:00
Ariff Abdullah
82199c9255 NOOP (for now) for hdac_dma_nocache(). It is a wrong way to enforce
cache coherency, besides of causing train wreck in other places
(especially on amd64, possibly on i386).

Discussed with:	kib@, rafan@
Tested by:	rafan@
2007-03-15 17:23:38 +00:00
Ariff Abdullah
4582b3a100 Fix severe out-of-bound mtx "type" pointer, causing WITNESS refcount
confusions and panic provided that the following conditions are met:

  1) WITNESS is enabled (watch/trace).
  2) Using modules, instead of statically linked (Not a strict
     requirement, but easier to reproduce this way).
  3) 2 or more modules share the same mtx type ("sound softc").
     - They might share the same name (strcmp() == 0), but it always
       point to different address.
  4) Repetitive kldunload/load on any module that shares the same mtx
     type (Not a strict requirement, but easier to reproduce this way).

     Consider module A and module B:
     - From enroll() - subr_witness.c:
       * Load module A. Everything seems fine right now.
         wA-w_refcount == 1 ; wA-w_name = "sound softc"
       * Load module B.
       * w->w_name == description will always fail.
         ("sound softc" from A and B point to different address).
       * wA->w_refcount > 0 && strcmp(description, wA->w_name) == 0
       * enroll() will return wA instead of returning (possibly unique)
         wB.
         wA->w_refcount++ , == 2.
       * Unload module A, mtx_destroy(), wA->w_name become invalid,
         but wA->w_refcount-- become 1 instead of 0. wA will not be
         removed from witness list.
       * Some other places call mtx_init(), iterating witness list,
         found wA, failed on wA->w_name == description
       * wA->w_refcount > 0 && strcmp(description, wA->w_name)
       * Panic on strcmp() since wA->w_name no longer point to valid
         address.

Note that this could happened in other places as well, not just sound
(eg. consider lots of drivers that share simmilar MTX_NETWORK_LOCK).

Solutions (for sound case):
  1) Provide unique mtx type string for each mutex creation (chosen)
  or
  2) Put "sound softc" global variable somewhere and use it.
2007-03-15 16:41:27 +00:00
Ariff Abdullah
7a5897d4d9 Remove NULL allocation checking since malloc() is allow to wait.
(I'll fix other places later..)
2007-03-15 15:06:54 +00:00
Ariff Abdullah
8c0a77e3d3 NULL instead of 0 in mtx_init() . 2007-03-15 14:57:54 +00:00
Hidetoshi Shimokawa
4813ecc362 Don't mess with PCIM_CMD_SERRESPEN and PCIM_CMD_PERRESPEN.
This will fix 'NMI RAM parity error' while booting on some machines.

PR: kern/95077
MFC after: 3 days
2007-03-15 14:11:46 +00:00
Nate Lawson
929a5cf650 Only enter the debugger on a Fatal op if this is a debug build of the
acpi module.  Also clean up print of args a little.

This was accidentally committed as 1.9.2.3 in the stable branch.  Since it
is harmless, I will let the "insta-MFC" stand unless there is a problem.
2007-03-14 19:56:10 +00:00
Kip Macy
c8411d871a #define L1_CACHE_BYTES for non-x86 2007-03-14 16:18:51 +00:00
Kip Macy
58bcd3238c define prefetch as a no-op macro for non-x86 arches 2007-03-14 16:05:39 +00:00
Kip Macy
f467efb7b5 play it safe for now and go back to kicking off tx cleaning from the tx path 2007-03-14 07:57:59 +00:00
Kip Macy
bede276b07 #define memory barrier macros for the non-i386 && non-amd64 case 2007-03-14 06:40:46 +00:00
Kip Macy
4f199f0379 remove unused code for recycling descriptors
kick tx cleaner from credit update function
2007-03-14 06:36:58 +00:00
Kip Macy
7d9ca96411 add cxgb_config.h to define values that are defined in the Makefile when compiled as a
module

move prefetch out of cxgb_sge.c into header under arch conditional compilation
2007-03-14 06:35:38 +00:00
Kip Macy
1940bc694e move taskqueue_enqueue of tx clean operation out of the start path 2007-03-14 06:34:10 +00:00
Kip Macy
b9d6bc3b79 make desc_reclaimable macro safe to arbitrary arguments 2007-03-14 06:33:28 +00:00
Matt Jacob
f6a6ae8f5c Don't call isp_intr from isp_start- this seems to, in rare cases,
cause confusion with at least the 23XX chipsets where the output
queue index pointer just gets a bit whacko.

MFC after:	1 day
2007-03-14 05:58:07 +00:00
Kip Macy
cc57017c60 Add firmware for cxgb 2007-03-14 02:44:48 +00:00
Kip Macy
b6d90eb779 First of several commits for driver support for the Chelsio T3B 10 Gigabit
Ethernet adapter.

Reviewed by: scottl, sam

For those interested in the preliminary performance work see below.

Plots of mxge vs. cxgb running netpipe:

blocksize vs. bandwidth:
http://www.fsmware.com/chelsio.random/bsvsbw.gif

blocksize vs. RTT:
First of several commits for driver support for the Chelsio T3B 10 Gigabit
Ethernet adapter.

Reviewed by: scottl, sam

For those interested in the preliminary performance work see below.

Plots of mxge vs. cxgb running netpipe:

blocksize vs. bandwidth:
http://www.fsmware.com/chelsio.random/bsvsbw.gif

blocksize vs. RTT:
http://www.fsmware.com/chelsio.random/bsvstime.gif

blocksize vs. RTT for block sizes <= 10kb:
http://www.fsmware.com/chelsio.random/bsvstime_10kb.gif
http://www.fsmware.com/chelsio.random/bsvstime_10kb3.gif
2007-03-14 02:37:44 +00:00
Kevin Lo
dc0a8e318e Make it compile 2007-03-14 01:59:00 +00:00
Thomas Quinot
c9b9952154 (atapi_action): Improve error reporting by removing ATA_R_QUIET flag
from ATAPI requests. If CAM debugging is enabled, also mark ATAPI
 requests with ATA_R_DEBUG flag.

(atapi_cb): Report ATAPI timeouts to the CAM layer.
 Fix incorrect debugging traces in the presence of ATAPI errors.

PR:		kern/103602
MFC after:	2 weeks
2007-03-13 20:42:49 +00:00
Thomas Quinot
8810211656 (reinit_bus): When the ATAPI bus is reset, do not schedule an automated
CAM rescan if the ATAPI device entries have not changed.

The ATAPI bus may be reset for a variety of reasons, including any time an
ATAPI request times out. It is not necessary to rescan at the CAM level
in such a case, unless a device has appeared or disappeared, or has
otherwise changed.

PR:		kern/103602
MFC after:	2 weeks
2007-03-13 20:38:16 +00:00
Thomas Quinot
3a5f6750df (ata_completed): When REQUEST SENSE is automatically issued after a failed
ATAPI request, do not clear the ATA_R_DEBUG flag. This allows a request
 marked as requiring debug traces to produce these traces also during
 the completion of the autosense processing.

Reviewed by:	sos
MFC after:	2 weeks
2007-03-13 20:31:56 +00:00
Nick Hibma
07cc71882a In one of the previous commits I accidentally removed the enabling of the
watchdog chip.

Noticed by:	Mike Tancsa
Tested by:	Mike Tancsa
MFC after:	1 week
2007-03-13 15:54:26 +00:00
Ariff Abdullah
0585c315b7 Add AC97 inverted external amplifier quirk for ASUS A6R laptop.
PR:		kern/110244
MFC after:	3 days
2007-03-13 15:20:33 +00:00
Matt Jacob
6a7d12e1a8 Move bus_space_tag and bus_space_handle register access
tokens into the common isp_osinfo structure instead of being
in bus specific structures. This allows us to implement
a SYNC_REG MEMORYBARRIER call (using bus_space_barrier)
and also reduce the amount of bus specific wrapper structure
usages in isp_pci && isp_sbus.

MFC after:	3 days
2007-03-13 06:46:08 +00:00
Matt Jacob
9418a60cb0 Restore optr if you trash it for 24XX target mode.
MFC after:	3 days
2007-03-13 06:44:07 +00:00
Scott Long
06e83c7e86 Fix some OID names and minor style as per feedback from various people.
Also, apparently quad support is broken in the sysctl infrastructure, so don't
pretend that it works.

Submitted by: ru, bde
2007-03-13 00:41:55 +00:00
Søren Schmidt
9642d2661b Fix writes on siiprb type chips. 2007-03-12 15:34:08 +00:00
Scott Long
763757b2a4 Add MAC, RX, and TX stats reporting via sysctl. 2007-03-12 09:25:57 +00:00
Søren Schmidt
e9827ac415 Fix support for the VIA8237A SATA part.
HW sponsored by: Bob Bishop
2007-03-12 09:13:13 +00:00
Matt Jacob
46a7789ea6 Forced commit to note that the previous CVS comment is
incorrect. The MODULE_DEPENDS lines were put in (by me)
in 1.14 and removed in 1.15. The facts should be correctly
reported.
2007-03-12 05:10:29 +00:00
Scott Long
d3cf342ddb Add back in MODULE_DEPEND() lines that were lost in the rev 13 update. 2007-03-12 05:02:42 +00:00
Matt Jacob
70273f9064 Fix compilation issues found in RELENG_4 port and merge the
diffs back to -current to keep versions identical.
2007-03-12 04:54:30 +00:00
Sam Leffler
fa393cd523 allow net80211 to fillin rate sets
MFC after:	2 weeks
2007-03-11 22:43:35 +00:00
Sam Leffler
6dbd16f1cc change ic_modecaps to a bit vector and use setbit, et. al. 2007-03-11 22:37:32 +00:00
Ariff Abdullah
c0dc2ab241 Fix analog CD connectivity. HP decided to screw pinconfig settings in
their latest Compaq V3000 BIOS (revision F.22). As a result, analog CD
connectivity is gone to the oblivion. Even if they decide to fix it in
future revisions, the damage has been done.
2007-03-11 15:26:49 +00:00
Christian Brueffer
cc249a3fce my(4) doesn't need miibus(4).
Approved by:	rwatson (mentor)
Obtained from:	DragonFly
MFC after:	1 week
2007-03-11 15:20:04 +00:00
Matt Jacob
fa80feee0e feedback from RELENG_5 port 2007-03-11 01:59:44 +00:00
Matt Jacob
e48b2487a0 Fix some stupid copyright mistakes that have been there for quite some time. 2007-03-10 02:39:54 +00:00
Søren Schmidt
b9842b47e6 Add support for the Silicon Image SiI 3124 and SiI 3132.
HW donated by: Adriaan de Groot
2007-03-09 22:23:39 +00:00
Søren Schmidt
031fcf925c More SATA phy/reset cleanup and simplification.
Fix a long standing bogon in the sii_reset code.
2007-03-09 18:45:45 +00:00
Ariff Abdullah
018b991e1d Fix long standing multi playback/recording issues, caused by
excessive interrupt clock timer reset, screwing interrupt generation
for already active channels. Track moving DMA pointer and call buffer
interrupt on each blocksize boundary.

PR:		kern/109791
MFC after:	3 days
2007-03-09 05:35:20 +00:00
Jung-uk Kim
0c4a1ef8dc Add more chipset revision IDs.
Obtained from:	OpenBSD
2007-03-09 01:30:23 +00:00
Søren Schmidt
f449d80b7c Refine ahci_status to be more simple. 2007-03-08 20:21:42 +00:00
Andrew Gallatin
21b49cfcaa Update mxge's firmware from a fairly old version (1.4.6) to the most
recent version (1.4.12).

Firmware changelogs are available on Myricom's web site at:
http://www.myri.com/scs/CHANGES/CHANGES.myri10ge-firmware

Sponsored by: Myricom Inc.
2007-03-08 17:49:06 +00:00
Søren Schmidt
895671548e Cleanup the channel/phy reset code. 2007-03-08 16:39:25 +00:00
Jung-uk Kim
39153c5a23 Use correct bits to stop firmware when ASF mode is enabled. 2007-03-08 00:49:26 +00:00
Jung-uk Kim
0c8aa4eacd Fix more style(9) bugs.
- Remove some excessive parentheses around shift operators.
- Use macro instead of magic number where it is applicable.
- Change lower-case hexdecimals to upper cases to match wpaul's style.
- Revert some unnecessary line wraps and changes from the previous commit.

Pointed out by:	bde
2007-03-08 00:29:18 +00:00
Marius Strobl
33368e9fe8 Rototill the sparc64 nexus(4) (actually this brings in the code the
sun4v nexus(4) in turn is based on):
o Change nexus(4) to manage the resources of its children so the
  respective device drivers don't need to figure them out of OFW
  themselves.
o Change nexus(4) to provide the ofw_bus KOBJ interface instead of
  using IVARs for supplying the OFW node and the subset of standard
  properties of its children. Together with the previous change this
  also allows to fully take advantage of newbus in that drivers like
  fhc(4), which attach on multiple parent busses, no longer require
  different bus front-ends as obtaining the OFW node and properties
  as well as resource allocation works the same for all supported
  busses. As such this change also is part 4/4 of allowing creator(4)
  to work in USIII-based machines as it allows this driver to attach
  on both nexus(4) and upa(4). On the other hand removing these IVARs
  breaks API compatibility with the powerpc nexus(4) but which isn't
  that bad as a) sparc64 currently doesn't share any device driver
  hanging off of nexus(4) with powerpc and b) they were no longer
  compatible regarding OFW-related extensions at the pci(4) level
  since quite some time.
o Provide bus_get_dma_tag methods in nexus(4) and its children in
  order to handle DMA tags in a hierarchical way and get rid of the
  sparc64_root_dma_tag kludge. Together with the previous two items
  this changes also allows to completely get rid of the nexus(4)
  IVAR interface. It also includes:
  - pushing the constraints previously specified by the nexus_dmatag
    down into the DMA tags of psycho(4) and sbus(4) as it's their
    IOMMUs which induce these restrictions (and nothing at the
    nexus(4) or anything that would warrant specifying them there),
  - fixing some obviously wrong constraints of the psycho(4) and
    sbus(4) DMA tags, which happened to not actually be used with
    the sparc64_root_dma_tag kludge in place and therefore didn't
    cause problems so far,
  - replacing magic constants for constraints with macros as far
    as it is obvious as to where they come from.
  This doesn't include taking advantage of the newbus way to get
  the parent DMA tags implemented by this change in order to divorce
  the IOTSBs of the PCI and SBus IOMMUs or for implementing the
  workaround for the DMA sync bug in Sabre (and Tomatillo) bridges,
  yet, though.
o Get rid of the notion that nexus(4) (mostly) reflects an UPA bus
  by replacing ofw_upa.h and with ofw_nexus.h (which was repo-copied
  from ofw_upa.h) and renaming its content, which actually applies to
  all of Fireplane/Safari, JBus and UPA (in the host bus case), as
  appropriate.
o Just use M_DEVBUF instead of a separate M_NEXUS malloc type for
  allocating the device info for the children of nexus(4). This is
  done in order to not need to export M_NEXUS when deriving drivers
  for subordinate busses from the nexus(4) class.
o Use the DEFINE_CLASS_0() macro to declare the nexus(4) driver so
  we can derive subclasses from it.
o Const'ify the nexus_excl_name and nexus_excl_type arrays as well
  as add 'associations' and 'rsc', which are pseudo-devices without
  resources and therefore of no real interest for nexus(4), to the
  former.
o Let the nexus(4) device memory rman manage the entire 64-bit address
  space instead of just the UPA_MEMSTART to UPA_MEMEND subregion as
  Fireplane/Safari- and JBus-based machines use multiple ranges,
  which can't be as easily divided as in the case of UPA (limiting
  the address space only served for sanity checking anyway).
o Use M_WAITOK instead of M_NOWAIT when allocating the device info
  for children of nexus(4) in order to give one less opportunity
  for adding devices to nexus(4) to fail.
o While adapting the drivers affected by the above nexus(4) changes,
  change them to take advantage of rman_get_rid() instead of caching
  the RIDs assigned to allocated resources, now that the RIDs of
  resources are correctly set.
o In iommu(4) and nexus(4) replace hard-coded functions names, which
  actually became outdated in several places, in panic strings and
  status massages with __func__. [1]
o Use driver_filter_t in prototypes where appropriate.
o Add my copyright to creator(4), fhc(4), nexus(4), psycho(4) and
  sbus(4) as I changed considerable amounts of these drivers as well
  as added a bunch of new features, workarounds for silicon bugs etc.
o Fix some white space nits.

Due to lack of access to Exx00 hardware, these changes, i.e. central(4)
and fhc(4), couldn't be runtime tested on such a machine. Exx00 are
currently reported to panic before trying to attach nexus(4) anyway
though.

PR:		76052 [1]
Approved by:	re (kensmith)
2007-03-07 21:13:51 +00:00
Kevin Lo
32d6c6993c Use M_NOWAIT instead of M_WAITOK to cause malloc() to return NULL. 2007-03-07 05:28:42 +00:00
Marcel Moolenaar
233c5a5d6d Remove zs(4). Its functionality has been superseded by uart(4) for
a while now; including on PowerPC.
2007-03-07 00:39:13 +00:00
Jung-uk Kim
6098821ce7 Fix style(9) and consistency. 2007-03-06 20:14:48 +00:00
Jung-uk Kim
4e35d186f1 Pollute bge(4) with #if's and #ifdef's to make MFC easier.
MFC after:	3 days
2007-03-06 19:15:16 +00:00
Paolo Pisati
ec383c971f Remove a useless cast from void * to struct ppb_device *. 2007-03-06 11:44:11 +00:00
Paolo Pisati
72565ac3e8 o Wrap ppc_setup_intr() at 80.
o Fix a bit the indentation.
2007-03-06 11:36:33 +00:00
Ariff Abdullah
f0c4d27278 Enable tone / 3D controls for YAMAHA YMF743, 753 and 752 (partially).
PR:		kern/109599
Submitted by:	Watanabe Kazuhiro <CQG00620@nifty.ne.jp>
2007-03-06 02:36:54 +00:00
Scott Long
dc3a205bc4 Better fix for the errors under high load. Returning CAM_SCSI_BUSY is almost
never correct as CAM has no real understanding of it, and will just immediately
retry the command.  This leads to undesirable cycling of the camisr as well as
a high possibility for the command to exhaust its retries before the driver
can get around to servicing it.

The better fix, as demonstrated here, is to freeze the simq and mark the
command as needing to be tried.  Then when driver can service the command,
the simq gets unfrozen.  This is correct, and documented here to help reduce
the mystery.  However, it also points out a shortcoming in CAM error handling
that makes writing drivers harder.

Submitted by: Erich Chen
2007-03-06 01:12:15 +00:00
Sam Leffler
1fba0fdc15 Change mtx's to use the formulated name as type so witness does not
complain on nested tx q lock acquisitions when processing the cab q.

MFC after:	2 weeks
2007-03-05 21:56:33 +00:00
Sam Leffler
cd196bb2d5 Kick tx after processing rx'd frames; this fixes latency issues
for processing frames from the power save queue when operating
in ap mode.  This is especially noticeable for realtime data going
to devices like voip phones.

Submitted by:	"J.R. Oldroyd" <jr@opal.com>
MFC after:	2 weeks
2007-03-05 21:53:49 +00:00
Nate Lawson
4d44d81742 Check the _TMP value for sanity also. On some systems (HP NX laptops), the
EC occasionally times out and provides bogus values (3000C).  This change
prevents those systems from prematurely shutting down while we work on the
underlying problem.  Also, bump the sanity value to 0...200C from 0...150C.
2007-03-05 21:39:53 +00:00
Thomas Quinot
1471588a2f Fix typo in comment. 2007-03-05 21:21:03 +00:00
John Baldwin
d8a4c26cde - Use constants for VPD capability register offsets.
- Add missing ()'s around return values.
2007-03-05 16:21:59 +00:00