Commit Graph

68977 Commits

Author SHA1 Message Date
glebius
eeb206c909 Do not mangle if_oerrors of the underlying interface. This counter
belongs solely to the driver.
  We don't lose any statistics with this change, because in a error
case the drop counter on the interface output queue is always incremented.

Reviewed by:	thompsa
2008-09-30 14:18:38 +00:00
yongari
a635b04c3f Save extended address register prior to switching to 1000BASE-X
only mode and restore original value of extended address register
instead of overwriting it with page 1. There are still instance
information passing issue(e.g configured media type: fiber or
copper) from driver to PHY layer but this change make the selected
PHY work with 88E1112 PHY.

Reported by:	Krzysztof Jedruczyk < beaker <at> hot dot pl >
Tested by:	Krzysztof Jedruczyk < beaker <at> hot dot pl >
2008-09-30 08:18:38 +00:00
yongari
cee43dc76f Add Vitesse VSC8211 PHY which is found on Planex GU-1000T.
HW donated by:	nork
2008-09-30 07:30:05 +00:00
yongari
d19413df9c Explicitly mark IFM_HDX for half-duplex media. 2008-09-30 07:24:20 +00:00
yongari
6b5a450046 Report current link state while auto-negotiation is in progress. 2008-09-30 07:22:02 +00:00
yongari
fcbe6077bf Use mii_anegticks instead of hardcoded MII_ANEGTICKS. 2008-09-30 07:20:26 +00:00
yongari
125f95a1fb Announce link loss right after it happens. 2008-09-30 07:19:01 +00:00
yongari
8468f28e4d If mbuf is not writable get a writable copy before invoking
m_pullup(9).

Tested by:	Garrett Cooper < yanefbsd <at> gmail dot com >
2008-09-30 04:52:30 +00:00
yongari
b708fede3f Always pullup mbuf prior to accessing TCP header.
This should fix occasional Tx checksum corruption issue.

Reported by:	Garrett Cooper < yanefbsd <at> gmail dot com >
Tested by:	Garrett Cooper < yanefbsd <at> gmail dot com >
2008-09-30 04:47:49 +00:00
imp
51dc1b851d Improve support for multiple block read/write. This code is currently
disabled by default because there's problems with it on AT91RM9200,
currently the only host controller in the tree.  I've not had time to
track those problems to ground.  I'm committing because this is
important for other host controllers that are in the pipeline.

Submitted by:	mav@
2008-09-30 02:34:45 +00:00
imp
5a8e6d3572 Properly implement read only. Also, the caps implementation is wrong
here, so I'm backing it out.
2008-09-30 02:32:41 +00:00
kmacy
cc2238d333 vm_fault_hold_user_pages will not return if an address in the range passed in is mapped RO
but an RW mapping exists for the underlying page. This change fixes the bug by using the
page / NULL returned from pmap_extract_and_hold to determine whether or not vm_fault needs
to be called.

The bug was pointed out by alc.

MFC after:	3 days
2008-09-29 22:13:29 +00:00
kib
de9e891748 Move the code for doing out-of-memory grass from vm_pageout_scan()
into the separate function vm_pageout_oom(). Supply a parameter for
vm_pageout_oom() describing a reason for the call.

Call vm_pageout_oom() from the swp_pager_meta_build() when swap zone
is exhausted.

Reviewed by:	alc
Tested by:	pho, jhb
MFC after:	2 weeks
2008-09-29 19:45:12 +00:00
imp
7e5e6d6f27 Make the media size return the block rather than the bytes on the device. 2008-09-29 18:55:45 +00:00
imp
8b764e092e Explicitly set data to NULL rather than relying mmc_wait_for_cmd() to
do it for us.  There may be commands we have to wait for that need to
set data.

Submitted by:	mav@
2008-09-29 18:33:08 +00:00
imp
c6c9e7b65c Minor style fixes from mav@ (with similar problems fixed where I noticed
them):
	#define<tab>
	zero memory when we allocate it
	Put device name in error message.

Submitted by:	mav@
2008-09-29 18:17:23 +00:00
imp
8a3e9c9a9d Conform to style(9) for return (foo); The files were a mix before.
Submitted by:	mav@
2008-09-29 18:05:26 +00:00
rwatson
a38eb03a4c Expand comments relating various detach/free/drop inpcb routines.
MFC after:	3 days
2008-09-29 13:50:17 +00:00
rwatson
402e931839 Fix typo in comment.
MFC after:	3 days
2008-09-29 13:48:48 +00:00
marcel
1fe9adfff0 Return G_PART_PROBE_PRI_HIGH instead of G_PART_PROBE_PRI_NORM
if the probe succeeds. This guarantees that the BSD scheme
wins over the MBR scheme when MBR gets to probe first. Build-
or link-time conditions can cause schemes to end up in the
linker set in a different order. Normally BSD is before MBR
in the linker set and as such get to probe first. But typically
when the kernel gets rebuild or relinked, this can change.
2008-09-29 02:48:22 +00:00
marcel
8e1dbe3531 Insert the null scheme at the head. This does not change any
functionality, but creates an invariant: the first element
on the list is always the null scheme.
2008-09-29 02:39:02 +00:00
imp
10320dbb60 Convert all C++ comments to C style. There's lots of folks that don't
like them and they don't add enough to be worth standing out.
2008-09-29 01:32:21 +00:00
imp
ba2b227bfc The parameters to the MMCBR_ACQUIRE_HOST and MMCBR_RELEAES_HOST were
the device in question, rather than the bus doing the requesting.  Fix
it so that it is the bus.

Submitted by:	mav@
2008-09-29 01:28:30 +00:00
imp
3808bd172d Implement MMCBR_IVAR_CAPS for AT91 MCI device.
Submitted by:	mav@ (well, not this one, but the base impl was)
2008-09-28 23:37:56 +00:00
imp
c737e2ef82 Add "caps" word to host bridge. 2008-09-28 23:37:06 +00:00
imp
24e5e160a7 Implement power down, and power down the bus on detach.
Submitted by:	mav@
2008-09-28 23:24:52 +00:00
imp
83045cd47b When a device is read only, fail all non-read BIO requests.
Submitted by:	mav@
2008-09-28 22:42:29 +00:00
imp
0de91f430b Propigate read-only status of cards. Right now it is read only at
device attach time.  We may need to read this more often in the
future, but for now simplicity of implementation wins.

Submitted by:	mav@
2008-09-28 22:40:11 +00:00
imp
db3715c928 The OCR register defines both acceptable voltage bits, as well as bits
for other things.  Mask out the voltage only bits when returning the
Vdd mask for voltage computation.

Submitted by:	mav@
2008-09-28 22:27:29 +00:00
imp
bc9f965b27 Other busses on the system use the official capitalization for the
technology.  Make mmc conform to that.

Submitted by:	mav@
2008-09-28 22:23:06 +00:00
imp
21506de7c8 Fix line continuation whitespace.
Submitted by:	mav@
2008-09-28 22:21:53 +00:00
imp
954d43d968 Catch up with svn r96606 (cvs rev 1.127 2002/05/14 20:35:29) of
sys/param.h and move the MI numbers out of here.  Also move the MI
defines.  Also remove a couple defines not in use (not sure if it is
age, or OpenBSD origins for thse).  Note the current values that are
overrides that appear to be odd in some way.

More cleanup could be done here: NBPG appears to be spelled PAGE_SIZE
these days.  There's new ways to spell PGOFSET and PGSHIFT too, I
think.  These constants duplicate the MI constants and are sprinkled
into the mips code only.  Further investigation is needed.
2008-09-28 19:44:38 +00:00
marius
a1ec700ce8 Remove ipi_all() and ipi_self() as the former hasn't been used at
all to date and the latter also is only used in ia64 and powerpc
code which no longer serves a real purpose after bring-up and just
can be removed as well. Note that architectures like sun4u also
provide no means of implementing IPI'ing a CPU itself natively
in the first place.

Suggested by:	jhb
Reviewed by:	arch, grehan, jhb
2008-09-28 18:34:14 +00:00
nwhitehorn
5b4acc89f4 Unbreak support for G4s without an L3 cache. L3 cache support was introduced
with, and limited to, the Motorola/Freescale 745x family.

Reported by:	Marco Trillo
2008-09-28 15:12:43 +00:00
jkoshy
61b05e7813 Add new PMC classes and CPU types. 2008-09-28 14:11:34 +00:00
jkoshy
9978d5667c Update a comment. 2008-09-28 14:05:12 +00:00
imp
87f884a91b White space nit. 2008-09-28 05:36:25 +00:00
imp
381676d275 Fix comments to relate to FreeBSD's current interrupt blocking
functionality, as opposed to the legacy spl means.
2008-09-28 03:50:34 +00:00
imp
5d0b4cf983 Fix comment about needing to call something from splnet, which doesn't
exist in freebsd.
2008-09-28 03:48:15 +00:00
imp
820a0a48cd Remove stale comment. splhigh -> critical_enter transition happend
some time ago, and no longer needs special attention.
2008-09-28 03:47:24 +00:00
imp
eaeae65ffc Change while (cond)\n\t\t; to while (cond)\n\t\tcontinue; since the
former more explicitly tells the compiler that you want an empty loop.
There are some lint programs that use this hint to avoid generating
warnings.

No functional change...
2008-09-28 03:33:01 +00:00
marius
67a928c072 Add a driver for Schizo' Fireplane/Safari to PCI 2.1 and Tomatillo'
JBus to PCI 2.2 bridges. In theory, this driver should also handle
`XMITS' Fireplane/Safari to PCI-X bridges but due to lack of access
to such hardware, support for these hasn't be fleshed out, yet.
2008-09-28 00:07:05 +00:00
sam
ab8d709f77 guard against adhoc_pick_channel returning a NULL channel; this can
happen after a scan cache flush (e.g. in response to ifconfig wlan bssid -)
2008-09-27 21:18:40 +00:00
marcel
42ef15f1c4 Export the partition name in the conftxt and confxml output.
The conftxt output is used by libdisk, and the confxml
output is used by gpart itself (gpart show -l).

Submitted by:	nyan@
2008-09-27 19:58:11 +00:00
marcel
0cc6ca46af Hold the root mount while we're tasting. It is possible
that a nested partition (typically the BSD disklabel)
is not done tasting while the root file system is being
mounted. While this is rare, it's still possible.
2008-09-27 19:29:52 +00:00
rwatson
ee0f3b34dd When an inpcb doesn't have a socket but the inpcb is passed to ipfw
in the transmit path, such as TCPS_TIMEWAIT, fail the credential
extraction immediately rather than acquiring locks and looking up
the inpcb on the global lists in order to reach the conclusion that
the credential extraction has failed.

This is more efficient, but more importantly, it avoids lock
recursion on the inpcbinfo, which is no longer allowed with rwlocks.
This appears to have been responsible for at least two reported
panics.

MFC after:	3 days
Reported by:	ganbold
2008-09-27 19:28:28 +00:00
jb
82b3ad7e97 Disable use of the user credentials until there is code to set the levels
that DTrace uses.

This fixes a bug that would have affected kernels built with MAC and all
kernels built after the mpsafetty integration.

The bug will be apparent in RELENG7 on MAC kernels.

Reported by: kan
2008-09-27 17:52:48 +00:00
kib
e6297afce2 Frames created by the Xcpustop, Xrendezvous, Xipi_intr_bitmap_handler
and Xlazypmap differ from the frame for Xtimerint. The Xtimerint puts
pointer to the frame between return address and frame body, while rest
of the functions listed above do not. Correct offset calculation to
allow the ddb backtrace to step over such frames.

Noted and reviewed by:	tegge
Tested by:	pho
MFC after:	1 week
2008-09-27 15:54:04 +00:00
kib
1fb31bd167 If the panic thread is preempted after setting panicstr but before
setting TDF_INPANIC then it will never be rescheduled again. Wrap
setting the panic condition with the critical section.

Noted and reviewed by:	tegge
MFC after:	1 week
2008-09-27 15:45:54 +00:00
nwhitehorn
e873cabccd Expand the DBDMA API to allow setting device-dependent control bits. While
here, clean up and document this a little.

Submitted by:	Marco Trillo
MFC after:	1 week
2008-09-27 15:41:16 +00:00