]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
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

15 years agoProvide convenient definition of the union descriptor, similar to the
Konstantin Belousov [Wed, 1 Apr 2009 12:31:04 +0000 (12:31 +0000)]
Provide convenient definition of the union descriptor, similar to the
i386 one. Fully enumerate system segments and gate types.

In collaboration with: pho
Reviewed by: jhb

15 years agoUse the real removal date for fla(4), put the entry with
Tom Rhodes [Wed, 1 Apr 2009 09:37:00 +0000 (09:37 +0000)]
Use the real removal date for fla(4), put the entry with
other 2004* entries.

15 years agoAdd an entry for fla.4.
Tom Rhodes [Wed, 1 Apr 2009 09:27:45 +0000 (09:27 +0000)]
Add an entry for fla.4.

15 years agoRemove the fla.4 manual page, the driver was nuked
Tom Rhodes [Wed, 1 Apr 2009 09:22:25 +0000 (09:22 +0000)]
Remove the fla.4 manual page, the driver was nuked
over four years ago.

Noticed by: rene
Prodded by: brueffer

15 years agoFix punctuation.
Tom Rhodes [Wed, 1 Apr 2009 08:33:54 +0000 (08:33 +0000)]
Fix punctuation.

PR: 132834
Submitted by: "Alan R. S. Bueno" <alan.bsd@gmail.com>

15 years agoOn second thought, remove the comma too.
Tom Rhodes [Wed, 1 Apr 2009 08:08:25 +0000 (08:08 +0000)]
On second thought, remove the comma too.

15 years agoRemove KSE bits, cross reference libthr.3.
Tom Rhodes [Wed, 1 Apr 2009 07:13:21 +0000 (07:13 +0000)]
Remove KSE bits, cross reference libthr.3.

PR: 132392
Submitted by: Niclas Zeising <niclas.zeising@gmail.com> (original version)

15 years agoEliminate dead code.
Alan Cox [Wed, 1 Apr 2009 04:36:37 +0000 (04:36 +0000)]
Eliminate dead code.

Reviewed by: jhb

15 years agoFix the userland, RAS, version of atomic_fetchadd_32 :
Olivier Houchard [Tue, 31 Mar 2009 23:47:18 +0000 (23:47 +0000)]
Fix the userland, RAS, version of atomic_fetchadd_32 :
return the correct value, and do not store the wrong one in the supplied
pointer.

Submitted by: Mark Tinguely <tinguely casselton net>

15 years agoUse Oxf0000000 instead of 0xff000000 to guess the physical address, relative
Olivier Houchard [Tue, 31 Mar 2009 23:06:20 +0000 (23:06 +0000)]
Use Oxf0000000 instead of 0xff000000 to guess the physical address, relative
to the virtual one. I may had a reason at some point to use the later, but
can't remember which, and it can leads to issues.

Reported by: Guillaume Ballet <gballet gmail com>

15 years agoUse RTF_LLDATA.
Olivier Houchard [Tue, 31 Mar 2009 23:02:51 +0000 (23:02 +0000)]
Use RTF_LLDATA.

15 years agoFix an uninitialized variable from the previous commit.
Jung-uk Kim [Tue, 31 Mar 2009 21:14:05 +0000 (21:14 +0000)]
Fix an uninitialized variable from the previous commit.

15 years agoProbe size of installed memory modules from loader and display it
Jung-uk Kim [Tue, 31 Mar 2009 21:02:55 +0000 (21:02 +0000)]
Probe size of installed memory modules from loader and display it
as 'real memory' instead of Maxmem if the value is available.
Note amd64 displayed physmem as 'usable memory' since machdep.c r1.640
to unconfuse users.  Now it is consistent across amd64 and i386 again.
While I am here, clean up smbios.c a bit and update copyright date.

Reviewed by: jhb

15 years agoAdd additional data on the MIIBUS WTF that I committed earlier.
Warner Losh [Tue, 31 Mar 2009 19:23:59 +0000 (19:23 +0000)]
Add additional data on the MIIBUS WTF that I committed earlier.

15 years agoIt turns out that the initialization is required since it sets up the
Warner Losh [Tue, 31 Mar 2009 19:20:03 +0000 (19:20 +0000)]
It turns out that the initialization is required since it sets up the
readout of the MAC address.
The 10ms delay was really needed.  Ooops.

15 years agoo Minor tweaks to the AX88x90 probe routine, mostly related to comments.
Warner Losh [Tue, 31 Mar 2009 18:25:09 +0000 (18:25 +0000)]
o Minor tweaks to the AX88x90 probe routine, mostly related to comments.
o Don't run through the register initialization in the read mac routine
  for the AX88x90.  It duplicates other stuff that we do.
o Eliminate the 10ms delay after we reset the AX88x90.  We already wait for
  the appropriate bits to indicate reset is done.

15 years agoSimplify the radeon microcode loading.
Robert Noland [Tue, 31 Mar 2009 17:52:05 +0000 (17:52 +0000)]
Simplify the radeon microcode loading.

Submitted by: Christoph Mallon
MFC after: 3 days

15 years agoFix an off-by-one buffer overflow in ngets().
John Baldwin [Tue, 31 Mar 2009 14:30:46 +0000 (14:30 +0000)]
Fix an off-by-one buffer overflow in ngets().

Submitted by: Bruce Can
MFC after: 1 month

15 years agoRemove a dangling extern "C" declaration that was missed during the
Rui Paulo [Tue, 31 Mar 2009 11:04:51 +0000 (11:04 +0000)]
Remove a dangling extern "C" declaration that was missed during the
merge. Fixes C++ ports using libpcap (nmap, for example).

Submitted by: Daniel Roethlisberger <daniel at roe.ch>

15 years agofix a bug that it passed a incorrect flag BUS_DMA_ALLOCNOW to create
Weongyo Jeong [Tue, 31 Mar 2009 10:34:54 +0000 (10:34 +0000)]
fix a bug that it passed a incorrect flag BUS_DMA_ALLOCNOW to create
a device specific DMA tag.  On amd64 it could exhaust all of bounce
pages when bus_dma_tag_create(9) is called at malo_pci_attach() then as
result in next turn it returns ENOMEM.  This fix a attach fail on amd64.

Pointed by: yongari
Tested by: dchagin
MFC after: 3 days

15 years agoAdd another rum(4) device found in
Kevin Lo [Tue, 31 Mar 2009 07:40:36 +0000 (07:40 +0000)]
Add another rum(4) device found in
http://www.fit-pc.com/new/whats-new.html

15 years agoPartial revert r185756.
Pyun YongHyeon [Tue, 31 Mar 2009 03:29:05 +0000 (03:29 +0000)]
Partial revert r185756.
It seems that RTL8168D and RTL8102EL requires additional settle
time to complete RL_PHYAR register write. Accessing RL_PHYAR
register right after the write causes errors for subsequent PHY
register accesses.

Tested by: george at luckytele dot com,
Steve Wills < STEVE at stevenwills dot com >

15 years agoGo back to filtering all PHY addresses above 16 since at least two
Warner Losh [Tue, 31 Mar 2009 02:50:41 +0000 (02:50 +0000)]
Go back to filtering all PHY addresses above 16 since at least two
cards still have issues with them.  Maybe this is a silicon rev?  In
any case, doing the filtering only for the AX88790 for the moment.

15 years agoTurn on nodelete linker flag because libthr can not be unloaded safely,
David Xu [Tue, 31 Mar 2009 02:50:18 +0000 (02:50 +0000)]
Turn on nodelete linker flag because libthr can not be unloaded safely,
it does hook on to libc.

15 years agoHmmmm... This can't be right... But it looks like the DL100xx chips
Warner Losh [Tue, 31 Mar 2009 01:59:47 +0000 (01:59 +0000)]
Hmmmm...  This can't be right...  But it looks like the DL100xx chips
don't have one of the clock cycles (the turn cycle) that the AX88x90
chips have.  Make this conditional.  But this seems totally crazy and
can't possibly be right.  Commit the fix for the moment until I can
explore this mystery more deeply.

On the plus side, the DL10022-based cards I have (D-Link DEF-670TXD
and SMC8040TX) work after this fix.

15 years agoIntegrate user/mav/ata branch:
Alexander Motin [Mon, 30 Mar 2009 22:18:38 +0000 (22:18 +0000)]
Integrate user/mav/ata branch:

Add ch_suspend/ch_resume methods for PCI controllers and implement them
for AHCI. Refactor AHCI channel initialization according to it.

Fix Port Multipliers operation. It is far from perfect yet, but works now.
Tested with JMicron JMB363 AHCI + SiI 3726 PMP pair.
Previous version was also tested with SiI 4726 PMP.

Hardware sponsored by: Vitsch Electronics / VEHosting.nl

15 years agorevert unintended change
Sam Leffler [Mon, 30 Mar 2009 21:54:39 +0000 (21:54 +0000)]
revert unintended change

15 years agoHoist 802.11 encapsulation up into net80211:
Sam Leffler [Mon, 30 Mar 2009 21:53:27 +0000 (21:53 +0000)]
Hoist 802.11 encapsulation up into net80211:
o call ieee80211_encap in ieee80211_start so frames passed down to drivers
  are already encapsulated
o remove ieee80211_encap calls in drivers
o fixup wi so it recreates the 802.3 head it requires from the 802.11
  header contents
o move fast-frame aggregation from ath to net80211 (conditional on
  IEEE80211_SUPPORT_SUPERG):
  - aggregation is now done in ieee80211_start; it is enabled when the
    packets/sec exceeds ieee80211_ffppsmin (net.wlan.ffppsmin) and frames
    are held on a staging queue according to ieee80211_ffagemax
    (net.wlan.ffagemax) to wait for a frame to combine with
  - drivers must call back to age/flush the staging queue (ath does this
    on tx done, at swba, and on rx according to the state of the tx queues
    and/or the contents of the staging queue)
  - remove fast-frame-related data structures from ath
  - add ieee80211_ff_node_init and ieee80211_ff_node_cleanup to handle
    per-node fast-frames state (we reuse 11n tx ampdu state)
o change ieee80211_encap calling convention to include an explicit vap
  so frames coming through a WDS vap are recognized w/o setting M_WDS

With these changes any device able to tx/rx 3Kbyte+ frames can use fast-frames.

Reviewed by: thompsa, rpaulo, avatar, imp, sephe

15 years agoFix typo in comment.
Rui Paulo [Mon, 30 Mar 2009 21:46:50 +0000 (21:46 +0000)]
Fix typo in comment.

15 years agoMFP mesh11s:
Rui Paulo [Mon, 30 Mar 2009 21:41:06 +0000 (21:41 +0000)]
MFP mesh11s:
  Add mesh debugging bit replacing the now deprecated RADKEYS.

15 years ago- Add ipfw_nat to the list of required modules if "firewall_nat_enable"
Maksim Yevmenkin [Mon, 30 Mar 2009 21:31:52 +0000 (21:31 +0000)]
- Add ipfw_nat to the list of required modules if "firewall_nat_enable"
  is set and "natd_enable" is NOT set;

- Accept and pass firewall type to the external firewall script.

Submitted by: Yuri Kurenkov < y -dot- kurenkov -at- init -dot- ru >
MFC after: 3 days
No response from: freebsd-rc

15 years agofake the association id so packets are not rejected in the tx path
Sam Leffler [Mon, 30 Mar 2009 21:29:25 +0000 (21:29 +0000)]
fake the association id so packets are not rejected in the tx path

15 years agoRemove pseudocode from VOP_* manual pages. It was out of date anyway.
Edward Tomasz Napierala [Mon, 30 Mar 2009 20:56:37 +0000 (20:56 +0000)]
Remove pseudocode from VOP_* manual pages.  It was out of date anyway.

Reviewed by: scottl
Approved by: rwatson (mentor)

15 years agoRemove ATH_SUPPORT_TDMA and use IEEE80211_SUPPORT_TDMA instead. It
Sam Leffler [Mon, 30 Mar 2009 19:23:49 +0000 (19:23 +0000)]
Remove ATH_SUPPORT_TDMA and use IEEE80211_SUPPORT_TDMA instead.  It
doesn't make much sense to configure driver support w/o net80211.
Note this means ath now depends on opt_wlan.h.

15 years agoWe don't know what these pages are going to be used for, they should be
Robert Noland [Mon, 30 Mar 2009 18:01:42 +0000 (18:01 +0000)]
We don't know what these pages are going to be used for, they should be
un-cached.  This got lost somewhere with all the bus_dma fixups.

MFC after: 3 days

15 years agoAdd a simple manage for the refcount(9) API.
John Baldwin [Mon, 30 Mar 2009 18:01:12 +0000 (18:01 +0000)]
Add a simple manage for the refcount(9) API.

Requested by: rwatson

15 years agoLoad the right microcode for RS780.
Robert Noland [Mon, 30 Mar 2009 17:49:21 +0000 (17:49 +0000)]
Load the right microcode for RS780.

MFC after: 3 days

15 years agoTwo fixes:
Warner Losh [Mon, 30 Mar 2009 17:25:56 +0000 (17:25 +0000)]
Two fixes:
(1) Delete all children when detaching to keep from adding a phy each
    driver reload.
(2) All AX88x90 chips have the RST issue.

15 years agoThis is a major reworking of the AX88x90 support.
Warner Losh [Mon, 30 Mar 2009 16:15:06 +0000 (16:15 +0000)]
This is a major reworking of the AX88x90 support.

o Introduce new chip_type AX88790.  There's a few places we need to know the
  exact chip for workaronds.
o Explain the AX88190 workaround for the ISR bits being stuck, and don't
  apply them to the AX88790.  The datasheet says the bits are fixed, and
  experience confirms.
o Fix mii bit-bang read code to read and discard the 'floating' bit.
o Remove empty ed_pccard_ax88x90_mii_reset routine
o Report error from mii_phy_probe
o Don't use ed_probe_Novel_generic for ax88x90 chips.  It puts them into
  an odd state sometimes.  Instead, use a more stream-lined version that
  avoids the trouble spots.  This was copied and tweaked from the original.
o Move chip reset into its own routine.
o Minor code optimiation on getting MAC address
o Add code for coping with AX88790 cards that are in power down state and
  need to be kicked before the PHY registers for the internal phy read right.
o Remove ugly cap of PHYs at 17.
o For AX88790, we need to set a special bit for accessig phy 16 (the internal
  phy) and clear it for all others according to a chip erratum.
o streamline the bit-bang code for AX88x90: the delays aren't needed according
  to the datasheet timing diagrams and also the Linux driver
o Fix minor bit definition for direction bit.
o Generally: Some comments reformatted
o Only try the toshiba probe on cards labelled as toshiba

# From another Akihabara card (this one from a few years ago from a
# friend in Japan).  Fix the Corega FEther II PCC-TXD.  This one is
# still on sale new, as of a few weeks ago.  should fix all other AX88x90
# based cards, but I have some testing left to finish on my collection...

15 years agoNew PHY driver for the internal PHY found in the AX88790. There's a
Warner Losh [Mon, 30 Mar 2009 16:01:09 +0000 (16:01 +0000)]
New PHY driver for the internal PHY found in the AX88790.  There's a
number of quirks for this device, and this implements just the basics.
The 2.5s powerdown recommended in the datasheet will be next...

15 years agoFix memory leak in semunload().
Christian Brueffer [Mon, 30 Mar 2009 15:01:29 +0000 (15:01 +0000)]
Fix memory leak in semunload().

PR: 133064
Submitted by: Mateusz Guzik <mjguzik@gmail.com>
MFC after: 1 week

15 years agowhen it failed to inform rx/tx dma setup it should clean up allocated
Weongyo Jeong [Mon, 30 Mar 2009 11:51:05 +0000 (11:51 +0000)]
when it failed to inform rx/tx dma setup it should clean up allocated
dma-related buffers and tags.

MFC after: 3 days

15 years agocorrects a error message.
Weongyo Jeong [Mon, 30 Mar 2009 11:23:14 +0000 (11:23 +0000)]
corrects a error message.

15 years agohandles more exceptional cases when the driver failed to attach.
Weongyo Jeong [Mon, 30 Mar 2009 08:48:33 +0000 (08:48 +0000)]
handles more exceptional cases when the driver failed to attach.

MFC after: 3 days

15 years agoImplement support for RTLD_NODELETE flag for dlopen() and -z nodelete
Konstantin Belousov [Mon, 30 Mar 2009 08:47:28 +0000 (08:47 +0000)]
Implement support for RTLD_NODELETE flag for dlopen() and -z nodelete
static linker option. Do it by incrementing reference count on the loaded
object and its dependencies.

Reviewed by: davidxu, kan

15 years agofix a bug of uses after free.
Weongyo Jeong [Mon, 30 Mar 2009 08:39:42 +0000 (08:39 +0000)]
fix a bug of uses after free.

Pointed by: dchagin
MFC after: 3 days

15 years agoFurther rate limit the root wait status, it will be printed once per
Andrew Thompson [Mon, 30 Mar 2009 05:57:55 +0000 (05:57 +0000)]
Further rate limit the root wait status, it will be printed once per
root_mount_rel() wakeup.

15 years agoAdd PHY entry for the ASIX 88x90 internal PHYs.
Warner Losh [Mon, 30 Mar 2009 01:47:32 +0000 (01:47 +0000)]
Add PHY entry for the ASIX 88x90 internal PHYs.

15 years agoSharpen the saw:
Marcel Moolenaar [Mon, 30 Mar 2009 01:03:58 +0000 (01:03 +0000)]
Sharpen the saw:
o  PC98 uses 32-bit block numbers. Limit the scheme to 2^32-1
   blocks when the media is larger. The 32-bit block numbers
   are implicit (16-bit cylinder * 8-bit head * 8-bit sector).

15 years agoSharpen the saw:
Marcel Moolenaar [Mon, 30 Mar 2009 00:53:46 +0000 (00:53 +0000)]
Sharpen the saw:
o  MBR uses 32-bit block numbers. Limit the scheme to 2^32-1
   blocks when the media is larger.

15 years agoSharpen the saw:
Marcel Moolenaar [Mon, 30 Mar 2009 00:48:42 +0000 (00:48 +0000)]
Sharpen the saw:
o  EBR uses 32-bit block numbers. Limit the scheme to 2^32-1
   blocks when the media is larger.
o  Calculate the number of entries based on the rounded media
   size, rather than the raw media size.

15 years agoSharpen the saw:
Marcel Moolenaar [Mon, 30 Mar 2009 00:33:43 +0000 (00:33 +0000)]
Sharpen the saw:
o  Don't create a GPT scheme underneath another scheme when
   the probe doesn't allow it.