Randall Stewart [Sat, 18 Oct 2008 15:53:31 +0000 (15:53 +0000)]
Reported by Yehuda Weinraub (yehudasa@gamil.com) - CRC32C algorithm
uses incorrect init_bytes value. It SHOULD have the number
of bytes to get to a 4 byte boundary.
Bjoern A. Zeeb [Fri, 17 Oct 2008 16:26:16 +0000 (16:26 +0000)]
Add cr_canseeinpcb() doing checks using the cached socket
credentials from inp_cred which is also available after the
socket is gone.
Switch cr_canseesocket consumers to cr_canseeinpcb.
This removes an extra acquisition of the socket lock.
John Baldwin [Fri, 17 Oct 2008 16:03:37 +0000 (16:03 +0000)]
- For chipsets that can't do 64k transfers, fall back to 32k transfers
(still a power of 2) rather than 63k transfers. Even with 63k transfers
some machines (such as Dell SC1435's) were experiencing chronic data
corruption.
- Use the MIO method to talk to the Serverworks HT1000_S1 SATA controller
like all the other SATA controllers rather than the compat PATA
method. This lets the controller see all 4 SATA ports and also
matches the behavior of the Linux driver.
Brooks Davis [Fri, 17 Oct 2008 14:37:58 +0000 (14:37 +0000)]
Wireless Mouse device of Sony VGP-WRC1 mouse/keyboard receiver has the
same program interface as Microsoft Wireless Notebook Optical Mouse and
needs a quirk.
Pyun YongHyeon [Fri, 17 Oct 2008 05:26:51 +0000 (05:26 +0000)]
Some 88E1149 PHY's page select is initialized to point to other
bank instead of copper/fiber bank which in turn resulted in
wrong registers were accessed during PHY operation. It is
believed that page 0 should be used for copper PHY so reinitialize
E1000_EADR to select default copper PHY.
This fixes link establishment issue of nfe(4) on Sun Fire X4140.
OpenBSD also has similimar patch but they just reset the E1000_EADR
register to page 0. However some Marvell PHYs((88E3082, 88E1000)
don't have the extended address register and the meaning of the
register is quite different for each PHY model. So selecting copper
PHY is limited to 88E1149 PHY which seems to be the only one that
exhibits link establishment problem. If parent device know the type
of PHY(either copper or fiber) that information should be notified
to PHY driver but there is no good way to pass this information yet.
Attilio Rao [Thu, 16 Oct 2008 12:42:56 +0000 (12:42 +0000)]
- Fix a race in witness_checkorder() where, between the PCPU_GET() and
PCPU_PTR() curthread can migrate on another CPU and get incorrect
results.
- Fix a similar race into witness_warn().
- Fix the interlock's checks bypassing by correctly using the appropriate
children even when the lock_list chunk to be explored is not the first
one.
- Allow witness_warn() to work with spinlocks too.
Bugs found by: tegge
Submitted by: jhb, tegge
Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
Nick Hibma [Wed, 15 Oct 2008 21:25:11 +0000 (21:25 +0000)]
Rewrite the driver to better support the Huawei devices. It should now support
the Sierra and Novatel devices, ignore all umass devices and hide the umass
devices that represent the CD ROM devices (but not the SD card slot in the
Huawei Mobile dongle).
Note: This driver in FBSD7 seems to suffer from memory corruption when used
with an Option GT Quad. The E220 however works flawlessly.
Also add the ID for the Option GTMaxHSUPA, provided by Olivier Fromme.
Bjoern A. Zeeb [Wed, 15 Oct 2008 19:24:18 +0000 (19:24 +0000)]
Check that the mbuf len is positive (like we do in the v4 case).
Read the other way round this means that even with the checks
the m_len turned negative in some cases which led to panics.
The reason to my understanding seems to be that the checks are wrong
(also for v4) ignoring possible padding when checking cmsg_len or
padding after data when adjusting the mbuf.
Doing proper cheks seems to break applications like named so
further investigation and regression tests are needed.
Ed Schouten [Wed, 15 Oct 2008 16:58:35 +0000 (16:58 +0000)]
Import some improvements to the TTY code from the MPSAFE TTY branch.
- Change the ddb(4) commands to be more useful (by thompsa@):
- `show ttys' is now called `show all ttys'. This command will now
also display the address where the TTY data structure resides.
- Add `show tty <addr>', which dumps the TTY in a readable form.
- Place an upper bound on the TTY buffer sizes. Some drivers do not want
to care about baud rates. Protect these drivers by preventing the TTY
buffers from getting enormous. Right now we'll just clamp it to 64K,
which is pretty high, taking into account that these buffers are only
used by the built-in discipline.
- Only call ttydev_leave() when needed. Back in April/May the TTY
reference counting mechanism was a little different, which required us
to call ttydev_leave() each time we finished a cdev operation.
Nowadays we only need to call ttydev_leave() when we really mark it as
being closed.
- Improve return codes of read() and write() on TTY device nodes.
- Make sure we really wake up all blocked threads when the driver calls
tty_rel_gone(). There were some possible code paths where we didn't
properly wake up any readers/writers.
- Add extra assertions to prevent sleeping on a TTY that has been
abandoned by the driver.
- Use ttydev_cdevsw as a more reliable method to figure out whether a
device node is a real TTY device node.
Ken Smith [Wed, 15 Oct 2008 15:54:33 +0000 (15:54 +0000)]
Package installation is handled by starting off with the list of packages
the user selected and then recursively installing their dependencies, finally
installing the ones the user selected after the recursion unwinds. Since
users often select "high-level" packages that are on a higher numbered
disc for the multi-volume release CDROMS this resulted in excessive disc
swapping while installing things like kde, gnome, etc.
Cut down on disc swapping by iterating through the disc volumes one at a
time if we notice the package set is on multiple volumes. If a package
is on a higher volume don't install it yet, but still "process it" so we
get its dependencies installed. Because of the way the package sets for
releases get assembled we're guaranteed dependencies will be on the same
volume or lower.
David Xu [Wed, 15 Oct 2008 06:31:37 +0000 (06:31 +0000)]
Move per-thread userland debugging flags into seperated field,
this eliminates some problems of locking, e.g, a thread lock is needed
but can not be used at that time. Only the process lock is needed now
for new field.
Rewrite Synaptics touchpads support with the following goals in mind:
o better quality of the movement smoothing
o more features such as tap-hold and virtual scrolling
Support must still be enabled with this line in your /boot/loader.conf:
hw.psm.synaptics_support="1"
The following sysctls were removed:
hw.psm.synaptics.low_speed_threshold
hw.psm.synaptics.min_movement
hw.psm.synaptics.squelch_level
An overview of this new driver and a short documentation about the added
sysctls is available on the wiki:
http://wiki.freebsd.org/SynapticsTouchpad
Nathan Whitehorn [Tue, 14 Oct 2008 14:54:14 +0000 (14:54 +0000)]
Convert PowerPC AIM PCI and nexus busses to standard OFW bus interface. This
simplifies certain device attachments (Kauai ATA, for instance), and makes
possible others on new hardware.
On G5 systems, there are several otherwise standard PCI devices
(Serverworks SATA) that will not allow their interrupt properties to be
written, so this information must be supplied directly from Open Firmware.
Rafal Jaworowski [Tue, 14 Oct 2008 10:11:14 +0000 (10:11 +0000)]
Initial support of loader(8) for ARM machines running U-Boot.
This uses the common U-Boot support lib (sys/boot/uboot, already used on
FreeBSD/powerpc), and assumes the underlying firmware has the modern API for
stand-alone apps enabled in the config (CONFIG_API).
Make robust futexes work on linux32/amd64. Use PTRIN to read
user-mode pointers. Change types used in the structures definitions to
properly-sized architecture-specific types.
Nick Hibma [Tue, 14 Oct 2008 07:45:11 +0000 (07:45 +0000)]
- Fix the naming of the MC950D device.
- Remove the (unimplemented) U3GFL_EJECT quirk as this won't be implemented in
the u3g driver anyway (most probably as an entry in devd.conf)
Rafal Jaworowski [Tue, 14 Oct 2008 07:24:18 +0000 (07:24 +0000)]
Marvell Gigabit Ethernet controller driver.
This supports 1Gbps Ethernet engine found on ARM-based SOCs (Orion, Kirkwood,
Discovery), as well as on system controllers for PowerPC processors (MV64430,
MV6446x).
Edwin Groothuis [Tue, 14 Oct 2008 03:38:02 +0000 (03:38 +0000)]
MFV of r183861:
Vendor import of tzdata2008h
- Minor update for Mauritius (which I don't understand)
- Syria goes to DST at 1 November instead of 1 October.
- Niue is now located at the right side of the equator.
Nathan Whitehorn [Tue, 14 Oct 2008 03:32:41 +0000 (03:32 +0000)]
Add a simple HFS boot block implementation for booting PowerPC macs. It creates
a small HFS filesystem with a CHRP boot script and an early-stage bootloader
derived from the sparc64 boot block.
Edwin Groothuis [Tue, 14 Oct 2008 03:21:36 +0000 (03:21 +0000)]
Vendor import of tzdata2008h.
- Minor update for Mauritius (which I don't understand)
- Syria goes to DST at 1 November instead of 1 October.
- Niue is now located at the right side of the equator.
Ken Smith [Tue, 14 Oct 2008 02:13:12 +0000 (02:13 +0000)]
The thought of making more than one DVD image for a release really
freaks me out. But it turns out we might be able to generalize
a few of the other things RE uses to assemble the package trees
for releases if the DVDs use a naming theme close to what is used
for the CDROMS (disc1, disc2, etc). So change the name to dvd1.
Hopefully this way src/release/scripts/{package-split.py,package-trees.sh}
can be generalized instead of copied-and-hacked.
Pyun YongHyeon [Tue, 14 Oct 2008 00:54:15 +0000 (00:54 +0000)]
Make sure to read the last byte of EEPROM descriptor. Previously
the last byte of the ethernet address was not read which in turn
resulted in getting 5 out of the 6 bytes of ethernet address and
always returned ENOENT. I did not notice the bug on FPGA version
because of additional configuration data in EEPROM.
Nick Hibma [Mon, 13 Oct 2008 20:41:11 +0000 (20:41 +0000)]
- Add better support for Huawei cards, by attaching as an interface driver.
- Be bold and add Novatel cards to the list of supported devices. One person
reported success with the Novatal U950D.
Nick Hibma [Mon, 13 Oct 2008 20:38:33 +0000 (20:38 +0000)]
- Only refuse to attach to the first interface on the Huawei cards as for
example the Huawei Mobile has an SD card slot on the second interface.
- Do not attach to Qualcomm and Novatel cards. If ignored these cards will
switch to modem mode automatically it seems.
- Reduce the priority on generic attachment to the appropriate level.
Note: A better solution is to send an eject command straightaway, but that can
be left till later.
The above families of SOCs are built around CPU cores compliant with ARMv5TE
instruction set architecture definition. They share a number of integrated
peripherals. This commit brings support for the following basic elements:
Rafal Jaworowski [Mon, 13 Oct 2008 18:42:25 +0000 (18:42 +0000)]
Do not use cached page for temporary mapping in pmap_zero_page_generic()
The physical page which we clear is accessed via additional temp kernel
mapping for the period of zeroing operation. However in systems with virtual
d-cache (most ARMs) when write-allocate feature is enabled, we can have
modified but unflushed content pertaining to this physical page still in the
d-cache due to its primary (pre-existing) mapping. In such scenario that
cached content upon flush is likely to overwrite [portions of] the physical
page we want to zero here..
This is a general problem with multiple virtual mappings covering the same
physical page with write-allocate and virtual d-cache: there is inherent
potential for corruptions of this kind, which are not easily resolved; it is
best policy that such multiple mappings be not allowed.
Robert Noland [Mon, 13 Oct 2008 18:03:27 +0000 (18:03 +0000)]
Rework memory allocation to allocate memory with different type names. This
will ease the identification of memory leaks as the OS will be able to track
allocations for us by malloc type. vmstat -m will show all of the
allocations.
Convert the calls to drm_alloc() and friends, which are used in shared code
to static __inline__ while we are here.
Robert Noland [Mon, 13 Oct 2008 17:52:41 +0000 (17:52 +0000)]
The linux list compat code had an error which prevented list_for_each_safe()
from operating on a list with a single item. This code is used much more by
the i915 driver with xorg-7.4. Correct it to match the actual linux
implementation.
Robert Noland [Mon, 13 Oct 2008 17:43:39 +0000 (17:43 +0000)]
Several of the newer radeon cards have moved around the registers for enabling
busmastering support. This also adds register definitions for MSI support,
which we will be using shortly.
Nathan Whitehorn [Mon, 13 Oct 2008 17:33:55 +0000 (17:33 +0000)]
Change the way we enable the BMAC cell in macio. Instead of calling the
macio's enable-enet word, which apparently does nothing on some machines,
open an OF instance of the ethernet controller. This fixes cold booting
from disk on my Blue & White G3.
Sync up summary information for cylinder groups while data is already
in memory during snapshot creation. This improves the results of the
background fsck.
Background fsck applies twice some summary totals changes. The next
background fsck on the same file system might then print negative
numbers for reclaimed directories/files/fragments.
Address the issue in a limited degree, by using old summary data for
cg when bgfsck is performed.
check_maps() in /usr/src/sbin/fsck_ffs/pass5.c seems to be limited to file
systems less than 1 TB, due to using 32-bits integers for file system block
numbers. This also causes incorrect error reporting for foreground fsck.
Bruce M Simpson [Mon, 13 Oct 2008 06:07:58 +0000 (06:07 +0000)]
Fix the CFE ldscript after the cutover to tradmips.
Diff minimization against ldscript.mips.
Note: CFE will not load PT_DYNAMIC segments, therefore the dynamic
sections have been placed in a PT_LOAD segment for now. This is not
too efficient in terms of memory use, they should probably get
placed in the text segment.
Pyun YongHyeon [Mon, 13 Oct 2008 01:11:28 +0000 (01:11 +0000)]
Read PCI device id instead of PCI revision id. Also checks the read
device id is JMC260 family. Previously it just verified the deivce
is JMC260 Rev A0. This will make it easy for newer JMC2xx support.