]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoMFp4 //depot/projects/usb@159926
Andrew Thompson [Sun, 5 Apr 2009 18:21:08 +0000 (18:21 +0000)]
MFp4 //depot/projects/usb@159926

Minor code factorisation in atmegadci.c

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159925
Andrew Thompson [Sun, 5 Apr 2009 18:20:58 +0000 (18:20 +0000)]
MFp4 //depot/projects/usb@159925

Cast variables properly for non-32-bit platforms.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159922
Andrew Thompson [Sun, 5 Apr 2009 18:20:49 +0000 (18:20 +0000)]
MFp4 //depot/projects/usb@159922

Refactor how we interface with the root HUB. This cuts around 1200 lines of
code totally and saves one thread per USB bus.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159909
Andrew Thompson [Sun, 5 Apr 2009 18:20:38 +0000 (18:20 +0000)]
MFp4 //depot/projects/usb@159909

- make usb2_power_mask_t 16-bit
- remove "usb2_config_sub" structure from "usb2_config". To compensate for this
  "usb2_config" has a new field called "usb_mode" which select for which mode
  the current xfer entry is active. Options are: a) Device mode only b) Host
  mode only (default-by-zero) c) Both modes.  This change was scripted using
  the following sed script: "s/\.mh\././g".
- the standard packet size table in "usb_transfer.c" is now a function, hence
  the code for the function uses less memory than the table itself.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159908
Andrew Thompson [Sun, 5 Apr 2009 18:20:24 +0000 (18:20 +0000)]
MFp4 //depot/projects/usb@159908

Reduce the amount of memory used by better sizing buffer arrays.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159897
Andrew Thompson [Sun, 5 Apr 2009 18:20:13 +0000 (18:20 +0000)]
MFp4 //depot/projects/usb@159897

Add new endpoint direction values for use with usb2_config

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159871
Andrew Thompson [Sun, 5 Apr 2009 18:20:03 +0000 (18:20 +0000)]
MFp4 //depot/projects/usb@159871

- bugfixes after the memory usage reduction patch
- Use "udev->pipes_max" instead of USB_EP_MAX
- Use correct "bmRequestType" for getting the config descriptor.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159866
Andrew Thompson [Sun, 5 Apr 2009 18:19:52 +0000 (18:19 +0000)]
MFp4 //depot/projects/usb@159866

- memory usage reduction by only allocating the required USB pipes and USB
  interfaces.
- cleanup some USB parsing functions to be more flexible.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159864
Andrew Thompson [Sun, 5 Apr 2009 18:19:42 +0000 (18:19 +0000)]
MFp4 //depot/projects/usb@159864

Fix possible deadlock with UGEN at detach.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159863
Andrew Thompson [Sun, 5 Apr 2009 18:19:30 +0000 (18:19 +0000)]
MFp4 //depot/projects/usb@159863

Speed up the endpoint descriptor search

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159811
Andrew Thompson [Sun, 5 Apr 2009 18:19:19 +0000 (18:19 +0000)]
MFp4 //depot/projects/usb@159811

First patch in a series of memory save patches.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159806
Andrew Thompson [Sun, 5 Apr 2009 18:19:10 +0000 (18:19 +0000)]
MFp4 //depot/projects/usb@159806

Properly name usb2_uref_location() so that it is not confused with
usb2_unref_location() .

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159797
Andrew Thompson [Sun, 5 Apr 2009 18:19:00 +0000 (18:19 +0000)]
MFp4 //depot/projects/usb@159797

Remove unused field in "struct usb2_pipe".

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159700
Andrew Thompson [Sun, 5 Apr 2009 18:18:47 +0000 (18:18 +0000)]
MFp4 //depot/projects/usb@159700

Get rid of the last CALLOUT_RETURNUNLOCKED reference.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159677
Andrew Thompson [Sun, 5 Apr 2009 18:18:36 +0000 (18:18 +0000)]
MFp4 //depot/projects/usb@159677

Remove redundant locking.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159674
Andrew Thompson [Sun, 5 Apr 2009 18:18:25 +0000 (18:18 +0000)]
MFp4 //depot/projects/usb@159674

Fix more corner cases around reception of SETUP packets.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159673
Andrew Thompson [Sun, 5 Apr 2009 18:18:16 +0000 (18:18 +0000)]
MFp4 //depot/projects/usb@159673

Fix a corner case around stalling SETUP packets in device side mode.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159671
Andrew Thompson [Sun, 5 Apr 2009 18:18:07 +0000 (18:18 +0000)]
MFp4 //depot/projects/usb@159671

Fix interrupt register setting on the atmegadci controller.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159562
Andrew Thompson [Sun, 5 Apr 2009 18:18:01 +0000 (18:18 +0000)]
MFp4 //depot/projects/usb@159562

Reapply r190173 with compilation fixed on 64bit arches.

Submitted by: Hans Petter Selasky

15 years agoAdd some consts, remove some unused stuff and other attempts to calm
Poul-Henning Kamp [Sun, 5 Apr 2009 17:33:07 +0000 (17:33 +0000)]
Add some consts, remove some unused stuff and other attempts to calm
FlexeLint down.

15 years agoFix casts which are not by definition safe, but which malloc(3)
Poul-Henning Kamp [Sun, 5 Apr 2009 17:12:13 +0000 (17:12 +0000)]
Fix casts which are not by definition safe, but which malloc(3)
makes safe for us.

15 years agoSome constifications
Poul-Henning Kamp [Sun, 5 Apr 2009 16:01:56 +0000 (16:01 +0000)]
Some constifications

15 years agoModernize prototypes (ie: no extern)
Poul-Henning Kamp [Sun, 5 Apr 2009 15:55:09 +0000 (15:55 +0000)]
Modernize prototypes (ie: no extern)

Make lots of stuff static.

15 years agoImprove a bit reass documentation:
Paolo Pisati [Sun, 5 Apr 2009 15:24:27 +0000 (15:24 +0000)]
Improve a bit reass documentation:

-document fragment handling sysctls
-mention some caveats about fragments handling (and to deal with it)

15 years agoConvert list of remote interfaces to LIST_* macros
Poul-Henning Kamp [Sun, 5 Apr 2009 15:06:02 +0000 (15:06 +0000)]
Convert list of remote interfaces to LIST_* macros

15 years agoKick WARNS level up to 6 by fixing various trivial warnings.
Poul-Henning Kamp [Sun, 5 Apr 2009 14:15:05 +0000 (14:15 +0000)]
Kick WARNS level up to 6 by fixing various trivial warnings.

15 years agoUse <sys/queue.h> to manage the interface list.
Poul-Henning Kamp [Sun, 5 Apr 2009 14:01:39 +0000 (14:01 +0000)]
Use <sys/queue.h> to manage the interface list.

15 years agoRemove newlines from string argument of __COPYRIGHT(), it results in
Poul-Henning Kamp [Sun, 5 Apr 2009 13:48:06 +0000 (13:48 +0000)]
Remove newlines from string argument of __COPYRIGHT(), it results in
assembler warning messages.

15 years agoSend multicast on p2p interfaces if they can and are not prohibited
Poul-Henning Kamp [Sun, 5 Apr 2009 12:41:59 +0000 (12:41 +0000)]
Send multicast on p2p interfaces if they can and are not prohibited
from doing so with no_rip_mcast in /etc/gateways.

This allows routed(8) to work with the way ports/security/openvpn
employs the tun(4) interface.

15 years agoFix KBI breakage by r190520 which affects older linux.ko binaries:
Dmitry Chagin [Sun, 5 Apr 2009 09:27:19 +0000 (09:27 +0000)]
Fix KBI breakage by r190520 which affects older linux.ko binaries:

1) Move the new field (brand_note) to the end of the Brandinfo structure.
2) Add a new flag BI_BRAND_NOTE that indicates that the brand_note pointer
   is valid.
3) Use the brand_note field if the flag BI_BRAND_NOTE is set and as old
   modules won't have the flag set, so the new field brand_note would be
   ignored.

Suggested by: jhb
Reviewed by: jhb
Approved by: kib (mentor)
MFC after: 6 days

15 years agoRevert c190007 at the request of Ruslan. It was not correct because
Warner Losh [Sun, 5 Apr 2009 00:24:49 +0000 (00:24 +0000)]
Revert c190007 at the request of Ruslan.  It was not correct because
ar had been moved from cross tools to bootstrap tools when bsd ar was
introduced.

Submitted by: ru@

15 years agoRetire VM_PROT_READ_IS_EXEC. It was intended to be a micro-optimization,
Alan Cox [Sat, 4 Apr 2009 23:12:14 +0000 (23:12 +0000)]
Retire VM_PROT_READ_IS_EXEC.  It was intended to be a micro-optimization,
but I see no benefit from it today.

VM_PROT_READ_IS_EXEC was only intended for use on processors that do not
distinguish between read and execute permission.  On an mmap(2) or
mprotect(2), it automatically added execute permission if the caller
specified permissions included read permission.  The hope was that this
would reduce the number of vm map entries needed to implement an address
space because there would be fewer neighboring vm map entries that differed
only in the presence or absence of VM_PROT_EXECUTE.  (See vm/vm_mmap.c
revision 1.56.)

Today, I don't see any real applications that benefit from
VM_PROT_READ_IS_EXEC.  In any case, vm map entries are now organized
as a self-adjusting binary search tree instead of an ordered list.  So,
the need for coalescing vm map entries is not as great as it once was.

15 years agoPerform a dummy stwcx. when we switch contexts. The context
Marcel Moolenaar [Sat, 4 Apr 2009 22:23:03 +0000 (22:23 +0000)]
Perform a dummy stwcx. when we switch contexts. The context
being switched out may hold a reservation. The stwcx. will
clear the reservation. This is architecturally recommended.

The scenario this addresses is as follows:
1. Thread 1 performs a lwarx and as such holds a reservation.
2. Thread 1 gets switched out (before doing the matching
   stwcx.) and thread 2 is switched in.
3. Thread 2 performs a stwcx. to the same reservation granule.
   This will succeed because the processor has the reservation
   even though thread 2 didn't do the lwarx.

Note that on some processors the address given the stwcx. is
not checked. On these processors the mere condition of having
a reservation would cause the stwcx. to succeed, irrespective
of whether the addresses are the same. The dummy stwcx. is
especially important for those processors.

15 years agoAdd sysarch.h. It's included by drm(4).
Marcel Moolenaar [Sat, 4 Apr 2009 22:05:36 +0000 (22:05 +0000)]
Add sysarch.h. It's included by drm(4).

15 years agoFirst round of cleanups. There's a lot of NetBSDism in this header.
Marcel Moolenaar [Sat, 4 Apr 2009 22:03:19 +0000 (22:03 +0000)]
First round of cleanups. There's a lot of NetBSDism in this header.

15 years agoImplement kernel core dump support for Book-E processors.
Marcel Moolenaar [Sat, 4 Apr 2009 22:01:43 +0000 (22:01 +0000)]
Implement kernel core dump support for Book-E processors.
Both raw physical memory dumps and virtual minidumps are
supported. The default being minidumps.

Obtained from: Juniper Networks

15 years agoFixup the parameters to audit_submit(3) the order is errno then return
Christian S.J. Peron [Sat, 4 Apr 2009 20:58:18 +0000 (20:58 +0000)]
Fixup the parameters to audit_submit(3) the order is errno then return
value.  This bug went un-noticed for so long because EPERM == 1

MFC after: 1 week
Spotted by: sson, rwatson

15 years agoTemporary hack to unbreak user/group lookups;
Tim Kientzle [Sat, 4 Apr 2009 20:08:08 +0000 (20:08 +0000)]
Temporary hack to unbreak user/group lookups;
use a larger buffer for getpwuid_r/getgrgid_r.
This needs to be dynamically sized.

15 years agoDon't let trailing empty lines overwrite the result of the last command with 0.
Stefan Farfeleder [Sat, 4 Apr 2009 19:06:52 +0000 (19:06 +0000)]
Don't let trailing empty lines overwrite the result of the last command with 0.
This affects the built-ins eval, fc, and trap and also the string passed to sh
with the -c option.

Submitted by: Jilles Tjoelker

15 years agoRevert change 190655 temporarily. It breaks many setups where nullfs is
Alexander Kabaev [Sat, 4 Apr 2009 17:48:38 +0000 (17:48 +0000)]
Revert change 190655 temporarily. It breaks many setups where nullfs is
used and needs to be revisited.

15 years agoModularize the Macintosh built-in ATA along the lines of the rest of the
Nathan Whitehorn [Sat, 4 Apr 2009 17:05:17 +0000 (17:05 +0000)]
Modularize the Macintosh built-in ATA along the lines of the rest of the
ATA system as an optional atamacio device.

PR:             powerpc/133161
Submitted by:   Bruce Cran

15 years ago- Add the support for the Asus A3F and A3E device
Attilio Rao [Sat, 4 Apr 2009 17:01:32 +0000 (17:01 +0000)]
- Add the support for the Asus A3F and A3E device
- Fix style for A3N and for a comment

Submitted by: Akira Funahashi <funa@funa.org>
Tested by: Marcin Nowak <marcin.nowak@simplusnet.pl>,
Diego Sardina <diego.sardina@gmx.com>
PR: kern/128634

15 years ago- Style: size_t can't be negative.
Ruslan Ermilov [Sat, 4 Apr 2009 16:03:28 +0000 (16:03 +0000)]
- Style: size_t can't be negative.

- Don't exit with a zero status code when no jails are configured
  on a system.

- Style: simplify some code constructs.

- If a single jail cannot be found, let the caller print a nicer
  diagnostic message.

Reviewed by: bz
MFC after: 3 days

15 years agoFixed NAME section.
Ruslan Ermilov [Sat, 4 Apr 2009 15:48:09 +0000 (15:48 +0000)]
Fixed NAME section.

15 years agoFix mbuf chain layout pessimization:
Bruce M Simpson [Sat, 4 Apr 2009 15:32:23 +0000 (15:32 +0000)]
Fix mbuf chain layout pessimization:
 in the case where a single mbuf is allocated due to
 m_getcl() returning NULL, we already call MH_ALIGN,
 so do not increment m->m_data in this case.

Found during MLDv2 port.

15 years agoDo not obliterate QQI with MAXRESP.
Bruce M Simpson [Sat, 4 Apr 2009 15:26:32 +0000 (15:26 +0000)]
Do not obliterate QQI with MAXRESP.

Found during MLDv2 port.

15 years agoWhen removing or renaming snaphost, do not delve into request_cleanup().
Konstantin Belousov [Sat, 4 Apr 2009 12:19:52 +0000 (12:19 +0000)]
When removing or renaming snaphost, do not delve into request_cleanup().
The later may need blocks from the underlying device that belongs
to normal files, that should not be locked while snap lock is held.

Reported and tested by: pho
MFC after: 1 month

15 years agoMany bug fixes (from the IETF hack-fest):
Randall Stewart [Sat, 4 Apr 2009 11:43:32 +0000 (11:43 +0000)]
Many bug fixes (from the IETF hack-fest):
- PR-SCTP had major issues when skipping through a multi-part message.
  o Did not look at socket buffer.
  o Did not properly handle the reassmebly queue.
  o The MARKED segments could interfere and un-skip a chunk causing
    a problem with the proper FWD-TSN.
  o No FR of FWD-TSN's was being done.
- NR-Sack code was basically disabled. It needed fixes that
  never got into the real code.
- CMT code had issues when the two paths were NOT the same b/w. We
  found a few small bugs, but also the critcal one here was not
  dividing the rwnd amongst the paths.

Obtained from: Michael Tuexen and myself at the IETF hack-fest ;-)

15 years agoAdd uath(4) wireless USB driver for Atheros AR5005UG and AR5005UX
Weongyo Jeong [Sat, 4 Apr 2009 11:23:00 +0000 (11:23 +0000)]
Add uath(4) wireless USB driver for Atheros AR5005UG and AR5005UX
chipsets.

Reviewed by: sam

15 years agoPowerPC, meet kernel core dumps. The support is based
Marcel Moolenaar [Sat, 4 Apr 2009 02:12:37 +0000 (02:12 +0000)]
PowerPC, meet kernel core dumps. The support is based
on a generic dumper that creates an ELF core file and
uses PMAP functions to scan and iterate over memory
chunks, as well as handle memory mappings used during
dumping.
the PMAP layer can choose to return physical memory
chunks or virtual memory chunks. For minidumps, the
chunks should be virtual.

The default MMU I/F implementation for the scan_md()
method returns NULL. Thus, when a PMAP implementation
does not implement the required methods, an empty
core file is created. Here, empty means having an ELF
header only.

Obtained from: Juniper Networks

15 years agoThe Serverworks SATA chipsets used in Apple G5 systems require requiring
Nathan Whitehorn [Sat, 4 Apr 2009 00:26:01 +0000 (00:26 +0000)]
The Serverworks SATA chipsets used in Apple G5 systems require requiring
the ATA status register with a 4-byte read request. This updates it, and
subsequent 1-byte reads will return the correct result.

This commit adds a hack to do this, which is currently ifdef'd powerpc,
although Linux and Darwin do this unconditionally on all platforms.

15 years agoAdd support for 64-bit PowerPC CPUs operating in the 64-bit bridge mode
Nathan Whitehorn [Sat, 4 Apr 2009 00:22:44 +0000 (00:22 +0000)]
Add support for 64-bit PowerPC CPUs operating in the 64-bit bridge mode
provided, for example, on the PowerPC 970 (G5), as well as on related CPUs
like the POWER3 and POWER4.

This also adds support for various built-in hardware found on Apple G5
hardware (e.g. the IBM CPC925 northbridge).

Reviewed by:    grehan

15 years agoCatch up with recent locking changes.
Tom Rhodes [Fri, 3 Apr 2009 23:52:47 +0000 (23:52 +0000)]
Catch up with recent locking changes.

PR: 132546
Submitted by: pluknet <pluknet@gmail.com>
Reviewed by: alc

15 years agoSet SO_NOSIGPIPE on sockets used by phttpget. Without this, if
Colin Percival [Fri, 3 Apr 2009 21:13:18 +0000 (21:13 +0000)]
Set SO_NOSIGPIPE on sockets used by phttpget.  Without this, if
(1) phttpget is attempting to download enough files that it can't send
all the requests at once, and
(2) the remote server forcibly closes the connection, resulting in RST
packets being sent,
phttpget will receive a SIGPIPE and terminate without downloading all
of the files.

This is probably responsible for a number of hard-to-reproduce errors
with portsnap and freebsd-update.

MFC after: 3 days

15 years agofix whitespace
Sam Leffler [Fri, 3 Apr 2009 20:46:32 +0000 (20:46 +0000)]
fix whitespace

15 years agoAdd interleaving root hold tokens from the CAM probe to disk_create and geom
Andrew Thompson [Fri, 3 Apr 2009 19:49:33 +0000 (19:49 +0000)]
Add interleaving root hold tokens from the CAM probe to disk_create and geom
provider tasting. This is needed for disk attachments that happen after threads
are running in the boot process.

Tested by: rnoland

15 years agoAdd a how argument to root_mount_hold() so it can be passed NOWAIT and be called
Andrew Thompson [Fri, 3 Apr 2009 19:46:12 +0000 (19:46 +0000)]
Add a how argument to root_mount_hold() so it can be passed NOWAIT and be called
in situations where sleeping isnt allowed.

15 years agoAdd support for RV790 (HD 4890) asics
Robert Noland [Fri, 3 Apr 2009 19:23:14 +0000 (19:23 +0000)]
Add support for RV790 (HD 4890) asics

MFC after: 3 days

15 years agoA little more cleanup from AMD, if we don't have the right microcode
Robert Noland [Fri, 3 Apr 2009 19:21:39 +0000 (19:21 +0000)]
A little more cleanup from AMD, if we don't have the right microcode
there is no reason to mess with the chip.

MFC after: 3 days

15 years agoAllow the NULL, RTLD_SELF and RTLD_NEXT handles to work with dlfunc(3).
Konstantin Belousov [Fri, 3 Apr 2009 19:17:23 +0000 (19:17 +0000)]
Allow the NULL, RTLD_SELF and RTLD_NEXT handles to work with dlfunc(3).
dlfunc() called dlsym() to do the work, and dlsym() determines the dso
that originating the call by the return address. Due to this, dlfunc()
operated as if the caller is always the libc.

To fix this, move the dlfunc() to rtld, where it can call the internal
implementation of dlsym, and still correctly fetch return address.
Provide usual weak stub for the symbol from libc for static binaries.
dlfunc is put to FBSD_1.0 symver namespace in the ld.so export to
override dlfunc@FBSD_1.0 weak symbol, exported by libc.

Reported, analyzed and tested by: Tijl Coosemans <tijl ulyssis org>
PR: standards/133339
Reviewed by: kan

15 years agoo update dwds mcast handling after hoisting ieee80211_encap: frames need
Sam Leffler [Fri, 3 Apr 2009 18:00:19 +0000 (18:00 +0000)]
o update dwds mcast handling after hoisting ieee80211_encap: frames need
  to be encapsulated before dispatching to the driver
o eliminate M_WDS now that we call ieee80211_encap directly and can supply
  the wds vap to indicate a 4-address frame should be created

15 years ago- Fix spacing in the comment.
Stanislav Sedov [Fri, 3 Apr 2009 13:35:54 +0000 (13:35 +0000)]
- Fix spacing in the comment.

Reported by: jhb

15 years ago- Correct the comment.
Stanislav Sedov [Fri, 3 Apr 2009 10:15:00 +0000 (10:15 +0000)]
- Correct the comment.

MFC after: 3 days

15 years agoThe 9 bytes immediately prior to the partition table can contain
Marcel Moolenaar [Fri, 3 Apr 2009 05:54:49 +0000 (05:54 +0000)]
The 9 bytes immediately prior to the partition table can contain
signatures or disk serial numbers. Don't assume those to be zero
in all cases. This fixes a false negative.

Tested by: avatar@mmlab.cse.yzu.edu.tw

15 years agoRemove more debug...
Warner Losh [Fri, 3 Apr 2009 02:28:11 +0000 (02:28 +0000)]
Remove more debug...

15 years agoProperly handle malloc() failures.
Xin LI [Thu, 2 Apr 2009 22:17:02 +0000 (22:17 +0000)]
Properly handle malloc() failures.

PR: bin/83338

15 years agoRemove a warning which is supposed to have been removed on 20030301.
Xin LI [Thu, 2 Apr 2009 21:51:54 +0000 (21:51 +0000)]
Remove a warning which is supposed to have been removed on 20030301.

15 years agoSigned/unsigned fixes, should be WARNS=2 clean now.
Xin LI [Thu, 2 Apr 2009 21:44:55 +0000 (21:44 +0000)]
Signed/unsigned fixes, should be WARNS=2 clean now.

15 years agoDon't crash when we have an invalid count number.
Xin LI [Thu, 2 Apr 2009 21:23:04 +0000 (21:23 +0000)]
Don't crash when we have an invalid count number.

PR: bin/32686
Submitted by: Jaakko Heinonen <jh saunalahti.fi>
MFC after: 1 week

15 years agovn_vptocnp() unlocks the name cache and forgets to re-lock it before
Peter Wemm [Thu, 2 Apr 2009 21:16:20 +0000 (21:16 +0000)]
vn_vptocnp() unlocks the name cache and forgets to re-lock it before
returning in one error case, and mistakenly unlocks it for the
umount -f case.

15 years agoRetire two flags that haven't been used since OLDCARD was retired
Warner Losh [Thu, 2 Apr 2009 19:27:56 +0000 (19:27 +0000)]
Retire two flags that haven't been used since OLDCARD was retired
(well, since before OLDCARD was retired, since I removed their use
somewhat before that).

15 years agoKill debug that crept in.
Warner Losh [Thu, 2 Apr 2009 18:11:21 +0000 (18:11 +0000)]
Kill debug that crept in.

15 years agoMinor tweaks in the names to match the chips more closely.
Warner Losh [Thu, 2 Apr 2009 18:02:00 +0000 (18:02 +0000)]
Minor tweaks in the names to match the chips more closely.

15 years agoBail out when memory allocation is failed, rather than referencing
Xin LI [Thu, 2 Apr 2009 17:16:39 +0000 (17:16 +0000)]
Bail out when memory allocation is failed, rather than referencing
a NULL pointer.

PR: kern/94480
Submitted by: Michiel Pelt <m.pelt xs4all nl>

15 years agoMinor DLINK DL100xx support tweaks:
Warner Losh [Thu, 2 Apr 2009 17:15:49 +0000 (17:15 +0000)]
Minor DLINK DL100xx support tweaks:

The DIROUT bit difference between the 19 and 22 is annoying.  We can
set both bits on both parts without ill effect.  Use this trick to
simplify the code.

The DELAYS in the MII bus bit-bang code for the DL100xx parts aren't
needed.  Eliminate them.

15 years agoThe AX88190 has 64k of external SRAM, of which 62k can be used for
Warner Losh [Thu, 2 Apr 2009 17:08:54 +0000 (17:08 +0000)]
The AX88190 has 64k of external SRAM, of which 62k can be used for
packet data.  However, the AX88190A moves this on-chip and reduces it
to the more traditional 16k from 16k-32k.  The AX88790 follows the
'190A.  Probe memory above 32k to see which flavor of the '190 we have
and use the extra memory if we have it.

Eliminate the kludgy read eeprom for the ID code.  It really is just a
memory read at location 0x400, so just use that instead.  Makes the
code easier to understand as well as eliminates some magic numbers.

15 years agoForce an autonegotiation at attach time for all the attached PHYs for
Warner Losh [Thu, 2 Apr 2009 16:58:45 +0000 (16:58 +0000)]
Force an autonegotiation at attach time for all the attached PHYs for
ed cards.  There's a number of minor nits in a lot of the PHYs on the
PC Cards that use the Axis AX88190 or DLink DL10019 and DL10022 chips.
Forcing the autonegotiation doesn't seem to cause problems on the
cards that have sane PHYs, but makes several cards I have work without
further workarounds.

I'm not 100% sure that kicking the PHY and resetting them is the right
thing to do on the media change callback.  Other NICs seem to need
this and do similar things.

15 years agoProperly update the shm_open/shm_unlink symbol versioning metadata after
John Baldwin [Thu, 2 Apr 2009 15:53:29 +0000 (15:53 +0000)]
Properly update the shm_open/shm_unlink symbol versioning metadata after
these functions were moved into the kernel:
- Move the version entries from gen/ to sys/.  Since the ABI of the actual
  routines did not change, I'm still exporting them as FBSD 1.0 on purpose.
- Add FBSD-private versions for the _ and __sys_ variants.

15 years agoRestore local change to include <sys/bpf.h> inside pcap.h. This fixes
Rui Paulo [Thu, 2 Apr 2009 13:04:17 +0000 (13:04 +0000)]
Restore local change to include <sys/bpf.h> inside pcap.h. This fixes
remaining ports build problems.

15 years agoSync DLTs with latest libpcap version.
Rui Paulo [Thu, 2 Apr 2009 13:02:12 +0000 (13:02 +0000)]
Sync DLTs with latest libpcap version.

15 years agoReduce code duplcations from r190620. While I am here, tweak a comment.
Jung-uk Kim [Thu, 2 Apr 2009 01:46:57 +0000 (01:46 +0000)]
Reduce code duplcations from r190620.  While I am here, tweak a comment.

15 years agoChase GDT layout changes and unbreak suspend/resume on amd64.
Jung-uk Kim [Thu, 2 Apr 2009 00:23:56 +0000 (00:23 +0000)]
Chase GDT layout changes and unbreak suspend/resume on amd64.

15 years agoRemove some pointless mergeinfo that is the result of doing a local
John Baldwin [Wed, 1 Apr 2009 21:14:01 +0000 (21:14 +0000)]
Remove some pointless mergeinfo that is the result of doing a local
'svn cp' and having svn create empty mergeinfo for the file.

15 years agoImplement an ipfw action to reassemble ip packets: reass.
Paolo Pisati [Wed, 1 Apr 2009 20:23:47 +0000 (20:23 +0000)]
Implement an ipfw action to reassemble ip packets: reass.

15 years agoUnconditionally build wrappers for i386_get_ioperm(), i386_set_ioperm(),
Konstantin Belousov [Wed, 1 Apr 2009 19:23:46 +0000 (19:23 +0000)]
Unconditionally build wrappers for i386_get_ioperm(), i386_set_ioperm(),
i386_get_ldt() and i386_set_ldt().

In collaboration with: pho
Reviewed by: jhb

15 years agoAdd trivial implementation for the freebsd32_sysarch on ia64.
Konstantin Belousov [Wed, 1 Apr 2009 19:23:07 +0000 (19:23 +0000)]
Add trivial implementation for the freebsd32_sysarch on ia64.
Fix comapt32 and LINT build on ia64.

Discussed with: jhb

15 years agoAdd some more logic for AD1986A codec input tracing. Use mic preamplifier
Alexander Motin [Wed, 1 Apr 2009 18:55:08 +0000 (18:55 +0000)]
Add some more logic for AD1986A codec input tracing. Use mic preamplifier
only for mic-type inputs. This gives better chances to use it.

Change default configuration for some AD1986A codec based ASUS boards,
use it also for ASUS P5PL2 board. This makes front mic preamplifier working.

Tested by: Vadim Frolov <frolov@frolov.ck.ua>

15 years agoGarbage collect unused MSR_GSBASE since r190620.
Jung-uk Kim [Wed, 1 Apr 2009 18:36:34 +0000 (18:36 +0000)]
Garbage collect unused MSR_GSBASE since r190620.

The only consumer was exception.S and specialreg.h is directly included now.
Note no md5 changes were observed for all assym.s consumers with this.

15 years agoAdd a new world named 'mips' to our universe.
Bjoern A. Zeeb [Wed, 1 Apr 2009 17:11:50 +0000 (17:11 +0000)]
Add a new world named 'mips' to our universe.

Discussed with: imp

15 years agoFix the Xen build for i386 PV mode.
Doug Rabson [Wed, 1 Apr 2009 17:06:28 +0000 (17:06 +0000)]
Fix the Xen build for i386 PV mode.

15 years agoGarbage collect unused stack segment since r190620.
Jung-uk Kim [Wed, 1 Apr 2009 16:24:24 +0000 (16:24 +0000)]
Garbage collect unused stack segment since r190620.

15 years agoDocument RTLD_NODELETE, -z nodelete and -z origin support.
Konstantin Belousov [Wed, 1 Apr 2009 14:38:20 +0000 (14:38 +0000)]
Document RTLD_NODELETE, -z nodelete and -z origin support.

15 years agoSync definitions for struct sigcontext for i386 and amd64 architectures
Konstantin Belousov [Wed, 1 Apr 2009 13:44:28 +0000 (13:44 +0000)]
Sync definitions for struct sigcontext for i386 and amd64 architectures
to struct mcontext.

15 years agoRegen
Konstantin Belousov [Wed, 1 Apr 2009 13:12:40 +0000 (13:12 +0000)]
Regen

15 years agoRename implementation function for freebsd32 sysarch(2) to allow for
Konstantin Belousov [Wed, 1 Apr 2009 13:11:50 +0000 (13:11 +0000)]
Rename implementation function for freebsd32 sysarch(2) to allow for
the arguments translations. Provide ABI-compatible definition of the
struct i386_ldt_args for freebsd32 compat layer.

In collaboration with: pho
Reviewed by: jhb

15 years agoSave and restore segment registers on amd64 when entering and leaving
Konstantin Belousov [Wed, 1 Apr 2009 13:09:26 +0000 (13:09 +0000)]
Save and restore segment registers on amd64 when entering and leaving
the kernel on amd64. Fill and read segment registers for mcontext and
signals. Handle traps caused by restoration of the
invalidated selectors.

Implement user-mode creation and manipulation of the process-specific
LDT descriptors for amd64, see sysarch(2).

Implement support for TSS i/o port access permission bitmap for amd64.

Context-switch LDT and TSS. Do not save and restore segment registers on
the context switch, that is handled by kernel enter/leave trampolines
now. Remove segment restore code from the signal trampolines for
freebsd/amd64, freebsd/ia32 and linux/i386 for the same reason.

Implement amd64-specific compat shims for sysarch.

Linuxolator (temporary ?) switched to use gsbase for thread_area pointer.

TODO:
Currently, gdb is not adapted to show segment registers from struct reg.
Also, no machine-depended ptrace command is added to set segment
registers for debugged process.

In collaboration with: pho
Discussed with: peter
Reviewed by: jhb
Linuxolator tested by: dchagin

15 years agoAdd separate gdt descriptors for %fs and %gs on amd64.
Konstantin Belousov [Wed, 1 Apr 2009 12:53:01 +0000 (12:53 +0000)]
Add separate gdt descriptors for %fs and %gs on amd64.
Reorder amd64 gdt descriptors so that user-accessible selectors are the
same as on i386. At least Wine hard-codes this into the binary.

In collaboration with: pho
Reviewed by: jhb

15 years agoFully enumerate all i386 sysarch commands an amd64 include file.
Konstantin Belousov [Wed, 1 Apr 2009 12:48:17 +0000 (12:48 +0000)]
Fully enumerate all i386 sysarch commands an amd64 include file.

Provides i386/freebsd API-compatible definitions for the argument
structures of the above sysarch commands. struct i386_ioperm_args
definition is ABI-compatible.

In collaboration with: pho
Reviewed by: jhb

15 years agoFill the fsbase and gsbase fields of the mcontext structure on i386.
Konstantin Belousov [Wed, 1 Apr 2009 12:46:05 +0000 (12:46 +0000)]
Fill the fsbase and gsbase fields of the mcontext structure on i386.

In collaboration with: pho
Discussed with: peter
Reviewed by: jhb

15 years agoAdd all segment registers for the amd64 CPU to struct reg and mcontext.
Konstantin Belousov [Wed, 1 Apr 2009 12:44:17 +0000 (12:44 +0000)]
Add all segment registers for the amd64 CPU to struct reg and mcontext.
To keep these structures ABI-compatible, half the size of r_trapno,
r_err, mc_trapno, mc_flags.

Add fsbase and gsbase to mcontext on both amd64 and i386.
Add flags to amd64 mcontext to indicate that it contains valid segments
or bases.

In collaboration with: pho
Discussed with: peter
Reviewed by: jhb