Commit Graph

57144 Commits

Author SHA1 Message Date
imp
56aa38e89c Check for 10BaseT media correctly. Before we were confusing
ifm_status and ifm_active.  IFM_10_T gets set in the ifm_active field,
not in the ifm_status field, as far as I can tell.

Note: this was to enable a workaround that's rarely enabled.  I don't know
how to corrupt my eeprom to test it, and would rather not know...
2006-01-04 23:00:01 +00:00
sos
1a03c39e37 Return the proper rmi field in DVDIOCREADSTRUCTURE.
PR:	89650
2006-01-04 21:35:57 +00:00
netchild
24387e86c9 We don't support I386_CPU in 6.0 and later. This file can be cleaned
up some to assume that '#if defined(I486_CPU) || defined(I586_CPU) ||
defined(I686_CPU)' is true.

Suggested by:	jhb
Reviewed by:	jhb
2006-01-04 20:11:04 +00:00
netchild
8852f0af37 Convert the PAGE_SIZE check into a CTASSERT.
Suggested by:	jhb
2006-01-04 19:19:42 +00:00
netchild
fbbb1e238e Prevent divide by zero, use default values in case one of the divisor's
is zero.

Tested by:	Randy Bush <randy@psg.com>
2006-01-04 18:26:54 +00:00
bz
326e376458 Minor whitespace cleanup. 2006-01-04 17:40:54 +00:00
joel
66c9bacd5b Fix minor sorting issue. 2006-01-04 17:19:28 +00:00
joel
1791dd0e3b Remove references to snd_vortex1(4).
Approved by:	tanimura, ariff
2006-01-04 17:05:19 +00:00
ariff
9c6a7e6611 Fix broken capabilities, causing failure during channel reset.
Its min/max speed were off by -/+ 1000.

Reported by:	[1] Ion-Mihai Tetcu <itetcu@people.tecnik93.com>
            	[2] barner
MFC after:	1 day

[1] http://lists.freebsd.org/mailman/htdig/freebsd-multimedia/2005-December/003189.html
[2] http://lists.freebsd.org/mailman/htdig/freebsd-multimedia/2006-January/003422.html
2006-01-04 15:35:55 +00:00
harti
9cca28b4d7 Add a new leaf to the net.link.generic.ifdata.%d sysctl to retrieve
the name and unit number assigned by the driver. This is needed by
SNMP to find interfaces after they have been renamed.

MFC after:	4 weeks
2006-01-04 12:57:09 +00:00
netchild
e426666183 - Make sure the cpu_exthigh variable is initialized (page coloring case). [1]
- Remove a conditional in the AMD cache detection, it's always false. [2]
- Don't try to detect a cache if only compiled for i386.

Analyzed by:	Antoine Brodin <antoine.brodin@laposte.net> [1]
Submitted by:	Antoine Brodin <antoine.brodin@laposte.net> [2]
2006-01-04 12:57:02 +00:00
sos
a4ba4c8368 Fix the promise modesetting for old chips.
Pointy hat to:	sos
2006-01-04 10:23:47 +00:00
phk
3dc6c75d0c Deorbit ttymalloc() in preference for ttyalloc() 2006-01-04 09:59:07 +00:00
phk
44d6de75f9 Use ttyalloc() instead of ttymalloc() 2006-01-04 09:46:20 +00:00
phk
990533856e Use ttyalloc() instead of ttymalloc() 2006-01-04 09:20:41 +00:00
phk
3bbf36cf3f Use ttyalloc() instead of ttymalloc() 2006-01-04 09:09:46 +00:00
phk
527a24856d Use ttyalloc() instead of ttymalloc() 2006-01-04 08:34:23 +00:00
phk
04004b89a1 Use MTX_SYSINIT to set up the tty list mutex. 2006-01-04 08:22:39 +00:00
sos
7f56ef50de Fix promise probe printing. 2006-01-04 08:20:25 +00:00
dds
9a6d7bb900 Fix style bug.
Prompted by:	bde
2006-01-04 07:50:54 +00:00
dds
8943d89662 Replace tv_usec normalization with the return of EINVAL.
This addresses two objections to the previous behavior,
and unbreaks the alpha tinderbox build.

TODO: update the utimes(2) man page.
2006-01-04 00:47:13 +00:00
scottl
ec6ef2133d Shuffle some definitions so that this can be included from userland. 2006-01-03 23:03:39 +00:00
scottl
3ab605dcda Add some more data structures and definitions for communicating with the
ServeRAID firmware.
2006-01-03 23:03:15 +00:00
dds
e209052111 Normalize the tv_usec part of the utimes(2) arguments to ensure
that a file's atime and mtime are only set to correct fractional
second values (0-999999000ns with the current interface).
Prior to this change users could create files with values outside
that range.  Moreover, on 32-bit machines tv_usec offsets larger than
4.3s would result in an unnormalized AND wrong timestamp value,
due to overflow.

MFC after:	1 week
2006-01-03 21:58:21 +00:00
jhb
9a6ec66269 Fix a couple of issues with the ibcs2 module event handler. First, return
success instead of EOPNOTSUPP when being loaded.  Secondly, if there are no
ibcs2 processes running when a MOD_UNLOAD request is made, break out to
return success instead of falling through into the default case which
returns EOPNOTSUPP.  With these fixes, I can now kldload and subsequently
kldunload the ibcs2 module.

PR:		kern/82026 (and several duplicates)
Reported by:	lots of folks
MFC after:	1 week
2006-01-03 20:39:38 +00:00
jkim
dc23cee8b8 Correctly check the filter length. I committed the wrong version.
Pointy hat to me.
2006-01-03 20:34:41 +00:00
jkim
ae104d9814 - Explicitly validate an empty filter to match bpf_filter() comment[1].
- Do not use BPF JIT compiler for an empty filter.

[1] Pointed out by:	darrenr
2006-01-03 20:26:03 +00:00
jhb
d339804fc1 Release the pci_link acpi serial lock if a link device has no actual links.
MFC after:	3 days
2006-01-03 20:19:34 +00:00
brian
435383325d This signal handling code is worse than a no-op. If a
signal is received during the msleep, the msleep is retried
indefinitely as it just keeps returning ERESTART because of
the pending signal.

Instead, just don't PCATCH - the signal can wait.

Sponsored by:	Sophos/ActiveState
2006-01-03 17:01:43 +00:00
rwatson
428f554873 When returning EIO from DEVFSIO_RADD ioctl, drop the exclusive rule
lock.  Otherwise the system comes to a rather sudden and grinding
halt.

MFC after:	1 week
2006-01-03 09:49:10 +00:00
yongari
d2cea5305f - Tx side bus_dmamap_load_mbuf_sg(9) support. This reduces bookkeeping
requiried to keep consistent softc state before/after callback function
  invocation and supposed to be sligntly faster than previous one as it
  wouldn't incur callback overhead. With this change callback function
  was gone.
- Decrease TI_MAXTXSEGS to 32 from 128. It seems that most mbuf chain
  length is less than 32 and it would be re-packed with m_defrag(9) if
  its chain length is larger than TI_MAXTXSEGS. This would protect ti(4)
  against possible kernel stack overflow when txsegs[] is put on stack.
  Alternatively, we can embed the txsegs[] into softc. However, that
  would waste memory and make Tx/Rx speration hard when we want to
  sperate Tx/Rx handlers to optimize locking.
- Fix dma map tracking used in Tx path. Previously it used the dma map
  of the last mbuf chain in ti_txeof() which was incorrect as ti(4)
  used dma map of the first mbuf chain when it loads a mbuf chain with
  bus_dmamap_load_mbuf(9). Correct the bug by introducing queues that
  keep track of active/inactive dma maps/mbuf chain.
- Use ti_txcnt to check whether driver need to set watchdog timer instead
  of blidnly clearing the timer in ti_txeof().
- Remove the 3rd arg. of ti_encap(). Since ti(4) now caches the last
  descriptor index(ti_tx_saved_prodidx) used in Tx there is no need to
  pass it as a fuction arg.
- Change data type of producer/consumer index to int from u_int16_t in
  order to remove implicit type conversions in Tx/Rx handlers.
- Check interface queue before getting a mbuf chain to reduce locking
  overhead.
- Check number of available Tx descriptores to be 16 or higher in
  ti_start(). This wouldn't protect Tx descriptor shortage but it would
  reduce number of bus_dmamap_unload(9) calls in ti_encap() when we are
  about to running out of Tx descriptors.
- Command NIC to send packets ony when the driver really has packets
  enqueued. Previously it always set TI_MB_SENDPROD_IDX which would
  command NIC to DMA Tx descriptors into NIC local memory regardless
  of Tx descriptor changes.

Reviewed by:	scottl
2006-01-03 06:14:07 +00:00
imp
be8db3dd12 Use the child to allocate the resource rather than bridge, since we're
allocating a resource that's in the card itself.

Remove more now-redundant resource_list_add, and now-redunant code
that lives in the pci layer.

# This fixes the atheros card that I have which had its CIS in one of
# the BARs.  Don't know yet if this fixes the amd64 issues reported.
2006-01-03 03:36:17 +00:00
imp
6b55862c50 Minor style(9) hacking, plus use a macro in place of (struct resource *)~0UL
(what the heck does that mean?).
2006-01-03 03:16:53 +00:00
thompsa
a09bf7ddac Fix a brain-o in the last commit, the conditional was always false. 2006-01-02 23:02:43 +00:00
thompsa
8c50d249a2 Reorganise bridge_rtupdate slightly to reduce duplication. 2006-01-02 22:44:54 +00:00
thompsa
a81b11ae21 Reset the route expiry time on each update rather than always letting them get
GC'd and recreated.
2006-01-02 22:29:41 +00:00
thompsa
28b37041d3 It is better to use time_uptime here since it is monotonic.
Pointed out by:	glebius
2006-01-02 22:23:03 +00:00
sam
e115c4ac0d enable "aggressive mode" only when operating in ap or station mode; in
particular this fixes use of wme in adhoc demo mode, it wasn't possible
to set the txop limit because the aggressive mode logic would override

Reviewed by:	apatti
MFC after:	2 weeks
2006-01-02 17:16:27 +00:00
sam
f48869decc update erp information element in the beacon frame to reflect
changes in the bss

Reviewed by:	avatar
Obtained from:	atheros
MFC after:	2 weeks
2006-01-02 16:57:20 +00:00
thompsa
488cd36dae Minor whitespace cleanup. 2006-01-02 09:50:34 +00:00
thompsa
84096d5a14 Read time_second directly rather than calling getmicrotime().
Obtained from:	DragonflyBSD
2006-01-02 09:36:53 +00:00
scottl
61f8277718 Use the correct units when handling the hw.physmem tunable. 2006-01-01 22:52:21 +00:00
imp
6643030861 Use __HAVE_ACPI and __PCI_REROUTE_INTERRUPT as appropriate rather than
the complicated #ifdefs.
2006-01-01 21:04:31 +00:00
imp
8d9b67a0e3 Define __HAVE_ACPI and/or __PCI_REROUTE_INTERRUPT, as appropriate for
each platform.  These will be used in the pci code in preference to
the complicated #ifdefs we have there now.
2006-01-01 20:59:28 +00:00
imp
12d4e274cb Remove left-over #ifdef alpha routines. They aren't used by any of
our drivers, and don't appear to be necessary for GENERIC and LINT on
the alpha.  They don't belong in a MI header anyway...
2006-01-01 20:40:08 +00:00
ariff
a50f13bf11 Fix another xruns counting logic, this time, for recording. 2006-01-01 18:16:13 +00:00
imp
d3a57d50d3 Remove stray debug from p4 integration. 2006-01-01 08:26:39 +00:00
netchild
ad47558c96 Unbreak kernel build.
A happy new year to all.

Submitted by:	Goran Gajic <ggajic@afrodita.rcub.bg.ac.yu>, bz
Pointy hat to:	netchild
Appologies to:	all
2006-01-01 05:35:57 +00:00
imp
9b3f1c28eb Remove extra debugging that crept in with the integration from p4. 2005-12-31 20:04:39 +00:00
imp
d62ad0c807 Remove K&R vestige. It is no longer necessary to concatenate strings
using /**/.  A simple space will do.
2005-12-31 20:00:12 +00:00