Commit Graph

80178 Commits

Author SHA1 Message Date
Jung-uk Kim
fd7a9ebcca Clean up code a bit to make it more readable. 2010-11-30 16:46:15 +00:00
Gleb Smirnoff
a98c06f1c8 Use time_uptime instead of non-monotonic time_second to drive ARP
timeouts.

Suggested by:	bde
2010-11-30 15:57:00 +00:00
Hans Petter Selasky
02c4024199 We need to define a cdev variable associated with each USB device,
hence existing applications like webcamd are expecting that.
This problem was introduced by SVN change 214221 where cdev=
was replaced by ugen= by accident. Solve this problem by
redefining cdev= in devd notifications.

MFC after 3 days.

Approved by:	thompsa (mentor)
2010-11-30 08:25:57 +00:00
Juli Mallett
074a0a8d57 Run all poll requests through a single function that can either do the generic
link state polling or media-specific ones, while avoidiing changing link state
on interfaces that use miibus; this substantially speeds up link time on
interface (re)initialization.
2010-11-30 07:14:05 +00:00
Warner Losh
5cb51b647c Remove redundant (and bogus) insertion of pnp info when announcing new
and retiring devices.  That's already inserted elsewhere.

Submitted by:	n_hibma
MFC after:	3 days
2010-11-30 05:54:21 +00:00
Juli Mallett
6d903e0c7a Display some Octeon 2 features and a feature for distinguishing between PCIe
implementations.
2010-11-30 01:27:54 +00:00
Jung-uk Kim
82515b4f1f Clean up code a bit to make it more readable. 2010-11-29 22:20:44 +00:00
Jung-uk Kim
0cb06f72d5 Honor font size for the video mode when default fonts are compiled in kernel
and VESA mode is enabled from loader.
2010-11-29 22:19:19 +00:00
Matthew D Fleming
dd6312a7c1 Fix uninitialized variable warning that shows on Tinderbox but not my
setup. (??)

Submitted by:	Michael Butler <imb at protected-networks dot net>
2010-11-29 21:53:21 +00:00
Juli Mallett
b8248487b3 Don't free the work queue entry that we're using to hold the scatter-gather
list on exit from the transmit path.  The scatter-gather list itself can be
asynchronously DMAed to the transmit hardware, and we could actually lock up
the transmitter if any of a number of races around this were lost.

Instead, let the PKO free the scatter-gather list when it is done with it, and
use the "i" bit in each segment of the packet to avoid having them go into the
FPA.

This fixes an unrecoverable transmit stall under transmit load.

MFC after:	3 days
2010-11-29 21:04:00 +00:00
Matthew D Fleming
ccecef29d1 Do not hold the sysctl lock across a call to the handler. This fixes a
general LOR issue where the sysctl lock had no good place in the
hierarchy.  One specific instance is #284 on
http://sources.zabbadoz.net/freebsd/lor.html .

Reviewed by:	jhb
MFC after:	1 month
X-MFC-note:	split oid_refcnt field for oid_running to preserve KBI
2010-11-29 18:18:07 +00:00
Matthew D Fleming
d0bb6f258b Slightly modify the logic in sysctl_find_oid to reduce the indentation.
There should be no functional change.

MFC after:	3 days
2010-11-29 18:18:00 +00:00
Matthew D Fleming
5127ecb89c Use the SYSCTL_CHILDREN macro in kern_sysctl.c to help de-obfuscate the
code.

MFC after:	3 days
2010-11-29 18:17:53 +00:00
MIHIRA Sanpei Yoshiro
54de08a963 Add new device ids.
Buffalo (Melco Inc.) WLI-UC-G

PR:		141777
2010-11-29 15:08:18 +00:00
Bernhard Schmidt
8b57b7eca6 Add a dummy for IoOpenDeviceRegistryKey().
With that change the Atheros 9xxx driver is actually usable and does not
panic anymore.

Submitted by:	Paul B Mahol <onemda at gmail.com>
MFC after:	2 weeks
2010-11-29 10:21:45 +00:00
Bernhard Schmidt
a94ca271e7 Some drivers rely on the existence of certain keys. The Atheros 9xxx
driver for example requests the NetCfgInstanceId but doesn't check the
returned status code and will happily access random memory instead.

Submitted by:	Paul B Mahol <onemda at gmail.com>
MFC after:	2 weeks
2010-11-29 10:10:56 +00:00
Gavin Atkinson
f6fa0b2b95 Support the Falcom Twist USB GSM/GPRS modem in uftdi(4)
PR:		usb/151862
Submitted by:	Alessandro de Manzano <demanzano dqmicro.it>
MFC after:	1 week
2010-11-29 08:17:44 +00:00
Colin Percival
d42446149f Fix bug introduced by r194784: Under XEN, the page(s) allocated to dpcpu
for CPU #0 weren't being properly reserved.  Under VM pressure this would
cause problems when the dpcpu structures were overwritten by arbitrary
data; the most common symptom was a panic when netisr attempted to lock a
mutex.

For some reason the XEN code keeps track of the start of available memory
in the variables 'first', 'physfree', and 'init_first'; as far as I can
tell, we always have first == physfree == init_first * PAGE_SIZE.  The
earlier commit adjusted 'first' (which, on !XEN, is the only variable
which tracks this value) but not the other two variables.

Exercise for reader: Eliminate two of these three variables.
2010-11-29 06:50:30 +00:00
Bjoern A. Zeeb
e6950476b9 Plug well observed races on la_hold entries with the callout handler.
Call the handler function with the lock held, return unlocked as we
might free the entry.  Rework functions later in the call graph to be
either called with the lock held or, only if needed, unlocked.

Place asserts to document and tighten assumptions on various lle locking,
which were not always true before.

We call nd6_ns_output() unlocked and the assignment of ip6->ip6_src was
decentralized to minimize possible complexity introduced with the formerly
missing locking there.  This also resulted in a push down of local
variable scopes into smaller blocks.

Reported by:	many
PR:		kern/148857
Submitted by:	Dmitrij Tejblum (tejblum yandex-team.ru) (original version)
MFC After:	4 days
2010-11-29 00:04:08 +00:00
Max Khon
311e93395e Define VM_KMEM_SIZE_MAX on sparc64. Otherwise kernel built with
DEBUG_MEMGUARD panics early in kmeminit() with the message
"kmem_suballoc: bad status return of 1" because of zero "size" argument
passed to kmem_suballoc() due to "vm_kmem_size_max" being zero.

The problem also exists on ia64.
2010-11-28 19:26:20 +00:00
Marius Strobl
1510a2b019 Several chipset drivers alter parameters relevant for the DMA tag creation,
i.e. alignment, max_address, max_iosize and segsize (only max_address is
thought to have an negative impact regarding this issue though), after
calling ata_dmainit() either directly or indirectly so these values have
no effect or at least no effect on the DMA tags and the defaults are used
for the latter instead. So change the drivers to set these parameters
up-front and ata_dmainit() to honor them.

Reviewd by:	mav
MFC after:	1 month
2010-11-28 18:53:29 +00:00
Konstantin Belousov
c6fb218c3c Calling fill_fpregs() for curthread is legitimate, and ELF coredump
does this.

Reported and tested by:	pho
MFC after:	5 days
2010-11-28 17:56:34 +00:00
Juli Mallett
04b6fa8330 Merge Cavium Octeon SDK 2.0 Simple Executive; this brings some fixes and new
facilities as well as support for the Octeon 2 family of SoCs.

XXX Note that with our antediluvian assembler, we can't support some Octeon 2
    instructions and fall back to using the old ones instead.
2010-11-28 08:18:16 +00:00
Oleksandr Tymoshenko
006d0f38be - Add watchdog driver for Cavium Octeon. At the moment only
UP systems are supported.
2010-11-28 08:11:05 +00:00
Juli Mallett
962cf8e521 Bump up MIPS limits once again; the new Cavium Octeon SDK requires even higher
limits.  I'd rather disable the warning and keep the limits at a sane level,
but for now they'll be ridiculously-high.
2010-11-28 08:09:20 +00:00
Juli Mallett
34e3f53b7c o) Remove some commented out or unimplemented code.
o) Remove some options that are configurable on Linux but not FreeBSD.
o) Centralize open/poll/stop routines for XAUI and SGMII and use the common
   uninit routine directly rather than providing a wrapper for it.  The init
   functions for these interfaces are now identical and the common init routine
   could merge in setting those function pointers except that some hardware
   seems to use no open/poll/stop method?
2010-11-28 05:57:24 +00:00
Jayachandran C.
aa54636620 Fix issue noted by alc while reviewing r215938:
The current implementation of vm_page_alloc_freelist() does not handle
order > 0 correctly. Remove order parameter to the function and use it
only for order 0 pages.

Submitted by:	alc
2010-11-28 05:51:31 +00:00
Juli Mallett
2a89829bde Set MACHINE_ARCH based on ABI and endianness.
Reviewed by:	imp
2010-11-28 04:07:45 +00:00
Pyun YongHyeon
45b0a3494d Add initial AX88772A support.
H/W donated by:	Derrick Brashear (shadow <> gmail dot com)
2010-11-28 01:56:44 +00:00
Pyun YongHyeon
8c09fbe458 Introduce new macro AXE_IS_178_FAMILY and AXE_IS_772. Include
AX88772A and AX88772B for future extension. While here add TX
buffer size for 178 family controllers.
2010-11-28 01:43:28 +00:00
Pyun YongHyeon
ff5fbbc49b Do full controller initialization in axe_reset() for controllers
that require special configuration from EEPROM. This will put
controllers into known sane state.
2010-11-28 01:16:37 +00:00
Pyun YongHyeon
d743bdd2f6 Make sure to change to currently selected media. 2010-11-28 01:03:06 +00:00
Pyun YongHyeon
0369b60472 Do not reinitialize controller if it's already running. 2010-11-28 01:00:39 +00:00
Pyun YongHyeon
675c1ae83d Move axe_reset() to axe_init(). 2010-11-28 00:57:48 +00:00
Pyun YongHyeon
6dd81ec722 Apply GPIO configuration for all CICADA PHYs.
While I'm here show selected phymode to ease of debugging.
2010-11-28 00:52:02 +00:00
Juli Mallett
ed11b5abe1 Remove unused and broken code to implement POW send and POW-only devices; a
separate POW driver makes more sense, generally.
2010-11-28 00:26:08 +00:00
Juli Mallett
25b0900026 Use if_transmit to avoid ifq locking in transmit path. 2010-11-27 22:42:41 +00:00
Rebecca Cran
6d79f3f6ae Fix more continuous/contiguous typos (cf. r215955) 2010-11-27 21:51:39 +00:00
Matt Jacob
15f0f9525c Add ISP_INTERNAL_TARGET as an option for isp(4). 2010-11-27 20:38:26 +00:00
Matt Jacob
c4f65bca0b Partially revert 208119. We were overwriting tunable settings.
Obtained from:	Oleg Sharoyko
MFC after:	1 week
2010-11-27 20:33:08 +00:00
Peter Holm
bcc5c95b6b First step in fixing the handle_workitem_freeblocks panic.
In collaboration with:	 kib
2010-11-27 20:27:07 +00:00
Konstantin Belousov
17ca6d98e1 Remove DEBUG sections.
MFC after:	3 days
2010-11-27 15:41:44 +00:00
Jayachandran C.
1e8b029539 Use if_transmit method instead of if_start, this avoids the interface queue lock.
Use the hardware IP checksum verification on receive.

Submitted by:	Sriram Gorti (srgorti at netlogicmicro dot com)
2010-11-27 13:35:19 +00:00
Alexander Motin
8a1d183fb7 Do hard reset before soft reset for SATA channels. Soft reset reported to be
not enough to restore device readiness in some situations.

Tested by: 	Roger Hammerstein <cheeky.m@live.com> on ServerWorks HT1000.
2010-11-27 07:03:31 +00:00
Jack F Vogel
f0fe67b43c Interrupt handler, and stats changes from Michael Tuexen,
thanks Michael!
2010-11-27 01:34:09 +00:00
Marius Strobl
12d314a661 Allow pause support advertisement to be turned off again.
Submitted by:	yongari (ip1000phy(4))
2010-11-27 01:26:59 +00:00
Ed Maste
84fe19c742 Fix build by correcting function name. Pointed out by dougb. 2010-11-27 00:26:19 +00:00
Jack F Vogel
38104ecc27 and the header... 2010-11-27 00:00:33 +00:00
Jack F Vogel
aa26851c4f A couple fixes got clobbered, putting them back. 2010-11-26 23:57:13 +00:00
Jack F Vogel
1a4e34498c Update ixgbe driver to verion 2.3.6
- This adds a VM SRIOV interface, ixv, it is however
	  transparent to the user, it links with the ixgbe.ko,
	  but when ixgbe is loaded in a virtualized guest with
	  SRIOV configured this will be detected.
	- Sync shared code to latest
	- Many bug fixes and improvements, thanks to everyone
	  who has been using the driver and reporting issues.
2010-11-26 22:46:32 +00:00