glebius [Wed, 6 Oct 2010 14:29:00 +0000 (14:29 +0000)]
Add support to Alcatel/TCTMobile X080S USB 3G modem. The device needs
special eject command to reappear as modem. It also requires DIR_IN flag
in the command message, so we supply some dummy data along with the command.
Feedback from X080S owners appreciated. I have not a pure Alcatel/TCTMobile
device, but another one under "Svyaznoy" (Связной) brand, and I didn't yet
managed to get it working. It is successfully recognized, it responds to
AT commands, but it shuts up right after successfull CONNECT response.
jchandra [Wed, 6 Oct 2010 08:15:28 +0000 (08:15 +0000)]
XLR/XLS network driver (nlge) updates:
- nlge_ioctl handles IFF_UP and IFF_PROMISC flags
- Translate table code, to enable flow based CPU assignment added
disabled by default (can be enabled by a tunable).
- Changed signature of nlge_port_disable to make it consistent with nlge_port_enable
- Removed TXCSUM and VLAN_HW_TAGGING from i/f capabilities.
Submitted by: Sriram Gorti (srgorti at netlogicmicro dot com)
gordon [Wed, 6 Oct 2010 07:22:56 +0000 (07:22 +0000)]
If LANG/LC_CTYPE/LC_ALL is set and the localized man page contains a page
also in the base set, the man utility when invoked with -a would display
pages for each locale in the same tree:
$ LANG=en_GB.ISO8859-15 man -wa man
/usr/share/man/en.ISO8859-15/man1/man.1.gz
/usr/share/man/man1/man.1.gz
/usr/share/man/en.ISO8859-15/man7/man.7.gz
/usr/share/man/man7/man.7.gz
Use continue to break out of the loop for the current locale. This results
in behavior more closely matching the old GNU man implementation:
$ LANG=en_GB.ISO8859-15 man -wa man
/usr/share/man/en.ISO8859-15/man1/man.1.gz
/usr/share/man/en.ISO8859-15/man7/man.7.gz
This will still search for a copy of the file in other manual path
locations. If there was a /usr/local/man/man1/man.1.gz file, it would still
be displayed. This is also consistent with the GNU man implementation.
yongari [Tue, 5 Oct 2010 23:03:48 +0000 (23:03 +0000)]
Separate common flags into controller specific and PHY related
flags. There should be no functional changes. This change will make
it easy to add more quirk/flags in future.
nwhitehorn [Tue, 5 Oct 2010 18:08:07 +0000 (18:08 +0000)]
Handle vector assist traps without a kernel panic, by setting denormalized
values to zero. A correct solution would involve emulating vector
operations on denormalized values, but this has little effect on accuracy
and is much less complicated for now.
jchandra [Tue, 5 Oct 2010 06:44:47 +0000 (06:44 +0000)]
Clear any pending interrupts after disabling FMN interrupts. Add debugging
sysctl and counters for message ring threads (intial version). Update
watermark values, and and decrease the maximum threads to 3 (this will leave
a few CPUs for other processes)
yongari [Mon, 4 Oct 2010 23:25:38 +0000 (23:25 +0000)]
RX buffer allocation failure is not an input error. Controller
successfully received a frame but we failed to pass it to upper
stack due to lack of resources. So update if_iqdrops counter
instead of updating if_ierrors counter.
hselasky [Mon, 4 Oct 2010 23:18:05 +0000 (23:18 +0000)]
This commit adds full support for USB 3.0 devices in host and device
mode in the USB core. The patch mostly consists of updating the USB
HUB code to support USB 3.0 HUBs. This patch also add some more USB
controller methods to support more active-alike USB controllers like
the XHCI which needs to be informed about various device state events.
USB 3.0 HUBs are not tested yet, due to lack of hardware, but are
believed to work.
After this update the initial device descriptor is only read twice
when we know that the bMaxPacketSize is too small for a single packet
transfer of this descriptor.
hselasky [Mon, 4 Oct 2010 22:21:30 +0000 (22:21 +0000)]
Serialise USB re-enumeration with the USB explore thread.
This patch can solve problems when multiple USB devices are
re-enumerated at the same time on the same bus.
yongari [Mon, 4 Oct 2010 20:49:38 +0000 (20:49 +0000)]
Move updating TX packet counter to the inside of send loop. axe(4)
controllers combine multiple TX requests into single one if there
is room in TX buffer of controller. Updating TX packet counter at
the end of TX completion resulted in incorrect TX packet counter as
axe(4) thought it sent 1 packet. There is no easy way to know how
many combined TX were completed in the callback.
Because this change updates TX packet counter before actual
transmission, it may not be ideal one. But I believe it's better
than showing fake 8kpps under high TX load. With this change, TX
shows 221kpps on Linksus USB200M.
dim [Mon, 4 Oct 2010 18:16:38 +0000 (18:16 +0000)]
Change libvgl's set4pixels() and set2lines() functions from plain
'inline' to 'static inline'. Otherwise, a C99 compiler (such as clang)
will output an undefined symbol for those functions in the resulting
object file. (Even gcc will do this, when you use "-std=c99".)
This should fix the "undefined reference to `set4pixels'" errors that
some people were seeing during ports building, when their world was
compiled with clang.
yongari [Mon, 4 Oct 2010 18:09:01 +0000 (18:09 +0000)]
Enable fix for read DMA FIFO overruns on controllers that have this
fix. Note, we still need workaround for controllers that lacks this
fix and it needs more work in RX BD updating.
yongari [Mon, 4 Oct 2010 18:01:23 +0000 (18:01 +0000)]
Consistently use ifHCOutOctets/ifHCInOctets instead of Octets as
these names are used in data sheet. Also use UnicastPkts,
MulticastPkts and BroadcastPkts instead of UcastPkts, McastPkts
and BcastPkts to clarify its meaning.
alc [Mon, 4 Oct 2010 16:49:40 +0000 (16:49 +0000)]
If vm_map_find() is asked to allocate a superpage-aligned region of virtual
addresses that is greater than a superpage in size but not a multiple of
the superpage size, then vm_map_find() is not always expanding the kernel
pmap to support the last few small pages being allocated. These failures
are not commonplace, so this was first noticed by someone porting FreeBSD
to a new architecture. Previously, we grew the kernel page table in
vm_map_findspace() when we found the first available virtual address.
This works most of the time because we always grow the kernel pmap or page
table by an amount that is a multiple of the superpage size. Now, instead,
we defer the call to pmap_growkernel() until we are committed to a range
of virtual addresses in vm_map_insert(). In general, there is another
reason to prefer calling pmap_growkernel() in vm_map_insert(). It makes
it possible for someone to do the equivalent of an mmap(MAP_FIXED) on the
kernel map.
nwhitehorn [Mon, 4 Oct 2010 16:02:11 +0000 (16:02 +0000)]
Fix two subtle problems in PPC32 RTLD. The first is a concurrency issue
where long PLT calls in multi-threaded environments could end up with
incorrect jmptab values. The second is that, after the addition of extended
PLT support, I forgot to update the PLT icache synchronization code to cover
the extended PLT instead of just the basic PLT.
phk [Mon, 4 Oct 2010 10:48:47 +0000 (10:48 +0000)]
Certain static code analysis tools (FlexeLint being one) are very
suspicious about 'l' and '1' being confused in numeric constants.
The fear being that some old fart programmer might still think that
he is using a Remmington Noiseless as input terminal device.
An easy way to placate this fear is to use capital 'L' or to put
the 'u' in unsigned constants in front of the 'l'.
nwhitehorn [Sun, 3 Oct 2010 17:50:43 +0000 (17:50 +0000)]
Extend sysinstall to handle powerpc64 by teaching it that powerpc64 has
a lib32 distribution, and that the GENERIC kernel is named GENERIC64.
More modifications will be required later for installations from ftp due
to the shared platform name with 32-bit powerpc, but this is enough for
snapshot CDs to work.
nwhitehorn [Sun, 3 Oct 2010 16:02:53 +0000 (16:02 +0000)]
Add a memory-range interface to /dev/mem on PowerPC using PAT attributes.
Unlike actual MTRR, this only controls the mapping attributes for
subsequent mmap() of /dev/mem. Nonetheless, the support is sufficiently
MTRR-like that Xorg can use it, which translates into an enormous increase
in graphics performance on PowerPC.
kib [Sun, 3 Oct 2010 13:52:17 +0000 (13:52 +0000)]
The makectx() function, used by kdb_trap() to reconstruct pcb from
trap frame when trap initiated kdb entry, incorrectly calculated the
value of %rsp for trapped thread.
According to Intel(R) 64 and IA-32 Architectures Software Developer's Manual
Volume 3A: System Programming Guide, Part 1, rev. 035, 6.14.2 64-Bit Mode
Stack Frame, "64-bit mode ... pushes SS:RSP unconditionally, rather than
only on a CPL change."
Even assuming the conditional push of the %ss:%rsp, the calculation
was still wrong because sizeof(tf_ss) + sizeof(tf_rsp) == 16 on amd64.
Always use the tf_rsp from trap frame. The change supposedly fixes
stepping when using kgdb backend for kdb.
hselasky [Sun, 3 Oct 2010 08:12:17 +0000 (08:12 +0000)]
Commit initial version of new XHCI driver which was written from
scratch. This driver adds support for USB3.0 devices. The XHCI
interface is also backwards compatible to USB2.0 and USB1.0 and will
evntually replace the OHCI/UHCI and EHCI drivers.
There will be follow-up commits during the coming week to link the
driver into the default kernel build and add missing USB3.0
functionality in the USB core. Currently only the driver files are
committed.
jchandra [Sun, 3 Oct 2010 04:33:58 +0000 (04:33 +0000)]
Update message ring handling code for XLR/XLS
- Wakeup multiple threads per core using message ring watermark interrupts.
- Update message ring handler registration, use the real device station id
for registering interrupts.
- rge/nlge: update for the new message ring registration code.
- rge/nlge: use 2 message ring stations for incoming packets, this will
allow more messages to be queued.
- nlge: comment fixes, remove unused variable
- style and whitespace fixes
marcel [Sat, 2 Oct 2010 19:44:13 +0000 (19:44 +0000)]
Split the root mount logic from the (generic) mount code and move
it (the root mount code) into a new file called vfs_mountroot.c
The split is almost trivial, as the code is almost perfectly
non-intertwined. The only adjustment needed was to move the UMA
zone allocation out of vfs_mountroot() [in vfs_mountroot.c] and
into vfs_mount.c, where it had to be done as a SYSINIT [see
vfs_mount_init()].
marius [Sat, 2 Oct 2010 18:53:12 +0000 (18:53 +0000)]
- In the spirit of previous simplifications factor out the checks for a
different PHY instance being selected and isolation out into the wrappers
around the service methods rather than duplicating them over and over
again (besides, a PHY driver shouldn't need to care about which instance
it actually is).
- Centralize the check for the need to isolate a non-zero PHY instance not
supporting isolation in mii_mediachg() and just ignore it rather than
panicing, which should sufficient given that a) things are likely to
just work anyway if one doesn't plug in more than one port at a time and
b) refusing to attach in this case just leaves us in a unknown but most
likely also not exactly correct configuration (besides several drivers
setting MIIF_NOISOLATE didn't care about these anyway, probably due to
setting this flag for no real reason).
- Minor fixes like removing unnecessary setting of sc->mii_anegticks,
using sc->mii_anegticks instead of hardcoded values etc.
kib [Sat, 2 Oct 2010 16:04:50 +0000 (16:04 +0000)]
Release the vnode lock and close the linker file vnode earlier in
the linker_load_file methods. The change is that the consequent
linker_file_unload() call is not under the vnode lock anymore.
This prevents the LOR between kernel linker sx xlock and vnode lock,
because linker_file_unload() relocks kernel linker lock.
jmallett [Sat, 2 Oct 2010 05:43:17 +0000 (05:43 +0000)]
o) Allow devices to override the MDIO read and write functions presented to
the miibus attached to octe interfaces.
o) Add an SMI/MDIO interface to the MV88E61XX and use it for the switch PHY on
the Lanner MR-320. An actual driver for the switch PHY will come later.
Note that for now it intercepts and fakes MII_BMSR reads to prevent the
miibus from talking to anything but the switch itself.
jmallett [Sat, 2 Oct 2010 05:38:45 +0000 (05:38 +0000)]
Rather than shifting offsets by three, set register offset to 3. All our
bus interface does that's special here now is to use a 64-bit register size.
In theory, uart(4) ought to support a regsz as well as regshft and support
64-bit registers directly.
Also use the UART class's range rather than a hand-coded 1024 for the address
range.
jmallett [Sat, 2 Oct 2010 01:24:20 +0000 (01:24 +0000)]
Make the OCTEON1 configuration look like a normal GENERIC configuration. In
particular, add PCI and USB buses and most devices. Also move to using ULE,
adding INET6, turning on WITNESS by default, etc.
dim [Fri, 1 Oct 2010 20:14:36 +0000 (20:14 +0000)]
Use __FBSDID() instead of RCSID() in most .S files under lib/msun/i386,
and one under lib/msun/amd64. This avoids adding the identifiers to the
.text section, and moves them to the .comment section instead.
nwhitehorn [Fri, 1 Oct 2010 19:02:31 +0000 (19:02 +0000)]
Map the Open Firmware framebuffer console with write combining turned on,
and set memory attributes appropriately for mmap() calls on /dev/console.
Xorg no longer uses /dev/console to mmap the framebuffer, so framebuffer
write combining support in X will arrive in the next patch.
nwhitehorn [Fri, 1 Oct 2010 18:59:30 +0000 (18:59 +0000)]
Fix pmap_page_set_memattr() behavior in the presence of fictitious pages
by just caching the mode for later use by pmap_enter(), following amd64.
While here, correct some mismerges from mmu_oea64 -> mmu_oea and clean
up some dead code found while fixing the fictitious page behavior.
jilles [Fri, 1 Oct 2010 13:10:11 +0000 (13:10 +0000)]
libc: Remove the i386 assembler version of strlen(3).
On anything modern, the C version, which processes a word at a time, is much
faster. The Intel optimization manual explicitly warns against using REP
prefixes with SCAS or CMPS, which is exactly what the assembler version
does.
A simple test on a Phenom II showed the C version, compiled with -O2, to be
about twice as fast determining the length of 100000 strings between 0 and
255 bytes long.