Commit Graph

78874 Commits

Author SHA1 Message Date
Warner Losh
253953cd5b On second thought, we need to force 16-bit mode 2010-08-25 02:09:07 +00:00
Warner Losh
e94b9f21a8 Prodded by Yongari, add support for Holtek HT80232. Add the device
ID, plus the ability to force '16-bit mode' which really means NE-2000
mode.  Other open source drivers suggest that the Holtek misbehaves if
you allow the 8-bit probe.  Also, all of the PCI chips emulate
NE-2000ish cards, so always force 16-bit mode for memory transfers.

PR:		84202 (patch not used)
2010-08-25 02:03:48 +00:00
Rick Macklem
12731c317d If the first iteration of the do loop in replay_prune()
succeeded and a subsequent interation failed to find an
entry to prune, it could loop infinitely, since the
"freed" variable wasn't reset to FALSE. This patch moves
setting freed FALSE to inside the loop to fix the problem.

Tested by:	alan.bryan at yahoo.com
MFC after:	2 weeks
2010-08-25 00:35:58 +00:00
Pyun YongHyeon
3ca447da3d Remove unnecessary controller reinitialization.
PR:	kern/87506
2010-08-24 19:41:15 +00:00
Pyun YongHyeon
2bd45735ea Remove unnecessary controller reinitialization.
PR:	kern/87506
2010-08-24 18:52:24 +00:00
Pyun YongHyeon
6a085e6341 vr_init_locked() will stop and reset the controller. Remove
unnecessary vr_stop()/vr_reset() calls.
2010-08-24 18:44:12 +00:00
Pyun YongHyeon
9fb40e0a9b Remove unnecessary controller reinitialization.
CAM filter handling was rewritten long time ago so it should not
require controller reinitialization.

PR:	kern/87506
2010-08-24 18:40:11 +00:00
Pyun YongHyeon
7c45b43651 Add PNP id for Compex RL2000.
I'm not sure whether adding this logical id is correct or not
because Compex RL2000 is in the list of supported hardware list.
I guess the Compex RL2000 could be PCI variant while the controller
in question is ISA controller. It seems PNP compat id didn't match
or it had multiple compat ids so isa_pnp_probe() seemed to return
ENOENT.

PR:	kern/80853
2010-08-24 18:17:40 +00:00
Andriy Gapon
694a0a8717 zfs arc_reclaim_thread: no need to call arc_reclaim_needed when
resetting needfree

needfree is checked at the very start of arc_reclaim_needed.
This change makes code easier to follow and maintain in face of
potential changed in arc_reclaim_needed.

Also, put the whole sub-block under _KERNEL because needfree can be set
only in kernel code.

To do: rename needfree to something else to aovid confusion with
OpenSolaris global variable of the same name which is used in the same
code, but has different meaning (page deficit).

Note: I have an impression that locking around accesses to this variable
as well as mutual notifications between arc_reclaim_thread and
arc_lowmem are not proper.

MFC after:	1 week
2010-08-24 17:48:22 +00:00
Alexander Motin
733cb5ec90 Enable timer interrupt before starting timer. This allows to handle very
short periods without interrupt loss.
2010-08-24 16:08:01 +00:00
Rui Paulo
4fbdc85400 Enable fasttrap and make dtraceall depend on fasttrap when building i386
or amd64.

Sponsored by:	The FreeBSD Foundation
2010-08-24 13:21:05 +00:00
Rui Paulo
8a8d8fa3d1 Add two DTrace trap type values. Used by fasttrap.
Sponsored by:	The FreeBSD Foundation
2010-08-24 13:13:24 +00:00
Rui Paulo
12f48a53f9 Add a trap code for DTrace induced traps.
Sponsored by:	The FreeBSD Foundation
2010-08-24 13:11:24 +00:00
Rui Paulo
f5a5c5653a Replace structure assignments with explicity memcpy calls. This allows
Clang to compile this file: it was using the builtin memcpy and we want
to use the memcpy defined in gptboot.c. (Clang can't compile boot2 yet).

Submitted by:	Dimitry Andric <dimitry at andric.com>
Reviewed by:	jhb
2010-08-24 12:56:45 +00:00
Rui Paulo
4873b1ac4d Update for the recent location of the fasttrap code.
Sponsored by:	The FreeBSD Foundation
2010-08-24 12:18:39 +00:00
Rui Paulo
5caab9d4cd Replace a pksignal() call with tdksignal().
Pointed out by:	kib
2010-08-24 12:12:03 +00:00
Rui Paulo
625564de63 MD fasttrap implementation.
Sponsored by:	The FreeBSD Foundation
2010-08-24 12:05:58 +00:00
Konstantin Belousov
4b8c3ea4ba Use preferred spelling for the __attribute__.
MFC after:	3 days
2010-08-24 11:53:30 +00:00
Rui Paulo
8605d1ae99 Port the fasttrap provider to FreeBSD. This provider is responsible for
injecting debugging probes in the userland programs and is the basis for
the pid provider and the usdt provider.

Sponsored by:	The FreeBSD Foundation
2010-08-24 11:11:58 +00:00
David Xu
3586381d50 Bump __FreeBSD_version for revision 211732.
Noticed by: thompa
2010-08-24 08:09:30 +00:00
David Xu
2961a78226 Optimize thr_suspend, if timeout is zero, don't call msleep, just
return immediately.
2010-08-24 07:29:55 +00:00
David Xu
baf28b69f4 - According to specification, SI_USER code should only be generated by
standard kill(). On other systems, SI_LWP is generated by lwp_kill().
  This will allow conforming applications to differentiate between
  signals generated by standard events and those generated by other
  implementation events in a manner compatible with existing practice.
- Bump __FreeBSD_version
2010-08-24 07:22:24 +00:00
Warner Losh
25faff346c MFtbemd:
Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.
2010-08-23 22:24:11 +00:00
Pyun YongHyeon
820b53e152 Fix a possible unaligned access to savebyte array.
PR:	kern/122195
2010-08-23 21:40:03 +00:00
Pyun YongHyeon
9ae11bbaa6 Implement basic WOL support. Note, not all xl(4) controllers
support WOL. Some controllers require additional 3-wire auxiliary
remote wakeup connector to draw power. More recent xl(4)
controllers may not need the wakeup connector though.
2010-08-23 19:18:50 +00:00
Pyun YongHyeon
ac68109179 Move xl_reset() to xl_init_locked(). This will make driver
initialize controller from a known good state. Previously driver
used to issue controller reset while TX/RX DMA are in progress.
I guess resetting controller in active TX/RX DMA cycle is to ensure
stopping I/Os in xl_shutdown(). I remember some buggy controllers
didn't respond with stop command if controller is under high
network load at the time of shutdown so resetting controller was
the only safe way to stop the I/Os. However, from my experiments,
controller always responded with stop command under high network
load so I think it's okay to remove the xl_reset() in
device_shutdown handler.
Resetting controller also will clear configured RX filter which
in turn will make WOL support hard because driver have to reprogram
RX filter in WOL handler as well as setting station address.
2010-08-23 18:51:31 +00:00
Konstantin Belousov
e048186a62 Introduce implementation-private rtld interface _rtld_addr_phdr, which
fills struct dl_phdr_info for the shared object that contains the
specified address, if any.

Idea and reviewed by:	kan
MFC after:	3 weeks
2010-08-23 15:27:03 +00:00
Gabor Kovesdan
6608cc579e - Change default grep back to GNU version. BSD grep can be built with the
WITH_BSD_GREP knob.
- Bump __FreeBSD_version

Requested by:   dougb
Approved by:    delphij (mentor)
2010-08-23 10:04:26 +00:00
Warner Losh
b3cdb67393 This should really be MACHINE not MACHINE_ARCH, and is this Makefile even used? 2010-08-23 06:22:35 +00:00
Warner Losh
c09808d0d6 MFtbemd:
Use MACHINE_CPUARCH in preference to MACHINE_ARCH.  The former is the
source code location of the machine, the latter the binary output.  In
general, we want to use MACHINE_CPUARCH instead of MACHINE_ARCH unless
we're tesitng for a specific target.  The isn't even moot for
i386/amd64 where there's momemntum towards a MACHINE_CPUARCH == x86,
although a specific cleanup for that likely would be needed...
2010-08-23 06:13:29 +00:00
Brian Somers
90db41b62b uio_resid isn't updated by VOP_READDIR for nfs filesystems. Use
the uio_offset adjustment instead to calculate a correct *len.

Without this change, we run off the end of the directory data
we're reading and panic horribly for nfs filesystems.

MFC after:	1 week
2010-08-23 05:33:31 +00:00
Warner Losh
f0e82e0b01 MF tbemd: Minor tweaks, prefer MACHINE_CPUARCH generally to MACHINE_ARCH (which simplifies some powerpc/powerpc64 ifs) 2010-08-23 01:50:34 +00:00
Warner Losh
99a4fb6cbc MF tbemd: move to using specific architecture makefiles 2010-08-23 01:48:07 +00:00
Warner Losh
343bc19749 MF tbemd: Minor tweaks, prefer MACHINE_CPUARCH generally to MACHINE_ARCH (which simplifies some powerpc/powerpc64 ifs) 2010-08-23 01:43:47 +00:00
Warner Losh
5aae6977bc MF tbemd: Minor tweaks, prefer MACHINE_CPUARCH generally to MACHINE_ARCH 2010-08-23 01:42:09 +00:00
Warner Losh
e8120f3d4e It turns out that the OUTPUT_FORMAT should do the right thing for both endians... 2010-08-23 01:37:55 +00:00
Warner Losh
ee0b65d9d0 MF tbemd: differentiate between arm and armeb 2010-08-23 01:33:27 +00:00
Pyun YongHyeon
27b031a9ad Remove unnecessary controller reinitialization by checking
IFF_DRV_RUNNING flag.
2010-08-23 00:31:55 +00:00
Pyun YongHyeon
a3835274a4 Clean up SIOCSIFCAP handler and allow RX checksum offloading could
be controlled by user.
2010-08-23 00:24:12 +00:00
Pyun YongHyeon
c6a3d2bb77 It seems some newer RTL8139 controllers provides only memory space
register mapping. I'm not sure whether it comes from the fact that
controllers live behind certain PCI brdge(PLX PCI 6152 33BC) and
the bridge has some issues in handling I/O space register mapping.
Unfortunately it's not possible to narrow down to an exact
controller that shows this issue because RealTek used the same PCI
device/revision id again. In theory, it's possible to check parent
PCI bridge device and change rl(4) to use memory space register
mapping if the parent PCI bridge is PLX PCI 6152. But I didn't try
to do that and we wouldn't get much benefit with added complexity.

Blindly switching to use memory space register mapping for rl(4)
may make most old controllers not to work. At least, I don't want
to take potential risk from such change. So use I/O space register
mapping by default but give users chance to override it via a
tunable. The tunable to use memory space register mapping would be
given by adding the following line to /boot/loader.conf file.

dev.rl.%d.prefer_iomap="0"

This change makes P811B quad-port work with this tunable.

Tested by:	Nikola Kalpazanov ( n.kalpazanov <> gmail dot com )
MFC after:	1 week
2010-08-22 21:26:35 +00:00
Jaakko Heinonen
0f6bb099ae Introduce and use devfs_populate_vp() to unlock a vnode before calling
devfs_populate(). This is a prerequisite for the automatic removal of
empty directories which will be committed in the future.

Reviewed by:	kib (previous version)
2010-08-22 16:08:12 +00:00
Rui Paulo
4e41f3537a Port this to FreeBSD. We miss some suword functions, so we use copyout.
Sponsored by:	The FreeBSD Foundation
2010-08-22 11:41:06 +00:00
Rui Paulo
b3d354c9ce Call the systrace_probe_func() when the error value.
Sponsored by:	The FreeBSD Foundation
2010-08-22 11:30:49 +00:00
Rui Paulo
79856499bd Add an extra comment to the SDT probes definition. This allows us to get
use '-' in probe names, matching the probe names in Solaris.[1]

Add userland SDT probes definitions to sys/sdt.h.

Sponsored by:	The FreeBSD Foundation
Discussed with:	rwaston [1]
2010-08-22 11:18:57 +00:00
Rui Paulo
5b5779d000 Remove an elif and add an or-clause.
Sponsored by:	The FreeBSD Foundation
2010-08-22 11:12:07 +00:00
Rui Paulo
258f5a255e Bump KDTRACE_THREAD_ZERO and use M_ZERO as a malloc flag instead of
calling bzero.

Sponsored by:	The FreeBSD Foundation
2010-08-22 11:09:53 +00:00
Rui Paulo
9f3a1843ed Fix style issues.
Sponsored by:	The FreeBSD Foundation
2010-08-22 11:08:18 +00:00
Rui Paulo
de788cde7b Destroy the helper device when unloading.
Sponsored by:	The FreeBSD Foundation
2010-08-22 11:05:37 +00:00
Rui Paulo
6c44520886 Add more compatibility structure members needed by the upcoming fasttrap
DTrace device.

Sponsored by:	The FreeBSD Foundation
2010-08-22 11:04:43 +00:00
Rui Paulo
c6f5742f90 Kernel DTrace support for:
o uregs  (sson@)
o ustack (sson@)
o /dev/dtrace/helper device (needed for USDT probes)

The work done by me was:
Sponsored by:	The FreeBSD Foundation
2010-08-22 10:53:32 +00:00