Commit Graph

142350 Commits

Author SHA1 Message Date
Bjoern A. Zeeb
37ee72936b Add mac_inpcb_check_visible MAC Framework entry point, which is similar
to mac_socket_check_visible but operates on the inpcb.

Reviewed by:	rwatson
MFC after:	3 months (set timer, decide then)
2008-10-17 12:54:28 +00:00
Bjoern A. Zeeb
4a5216a6dc Use the label from the socket credential rather than the
solabel which was not set by the mac_partition policy.

Spotted by:	rwatson
Reviewed by:	rwatson
MFC after:	3 days
2008-10-17 08:58:33 +00:00
Alexander Leidinger
1455fd2638 MTC r183949:
Allow to define MALLOC_PRODUCTION with a make variable instead of polluting
 the global CFLAGS.

Reviewed by:	jasone
2008-10-17 08:30:20 +00:00
Kip Macy
9762ac4204 Track number of packets transmitted and number of packets received
PR:	125806
MFC after:	3 days
2008-10-17 07:04:29 +00:00
Pyun YongHyeon
b435227b7d 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.

Reported by:	thompsa
Reviewed by:	thompsa
2008-10-17 05:26:51 +00:00
Kip Macy
5a1760fc92 make sure that SO_NO_DDP and SO_NO_OFFLOAD get passed in correctly
PR:		127360
MFC after:	3 days
2008-10-17 01:25:45 +00:00
Poul-Henning Kamp
65a9b18218 Free old arrays if we increase them.
Pointed out by:	mlaier
2008-10-16 20:56:09 +00:00
Poul-Henning Kamp
c4f431a628 Make ministat(1) vastly faster on huge datasets. 2008-10-16 20:39:02 +00:00
Rafal Jaworowski
df38b76405 Eliminate flushing of L2 cache in ARM context switch routines.
With VIPT L2 cache such syncing not only is redundant, but also a performance
penalty.

Pointed out by:	cognet
2008-10-16 19:06:24 +00:00
David E. O'Brien
ee81baecd8 Document what the sed trick is for.
Remove an embedded <TAB>, and use same style for both files.
2008-10-16 18:09:27 +00:00
Attilio Rao
ac0dd8886d - 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>
2008-10-16 12:42:56 +00:00
Marko Zec
3ff0b2135b Remove a useless global static variable.
Approved by:	bz (ad-hoc mentor)
2008-10-16 12:31:03 +00:00
David Xu
ffdc5a34ed Restore code wrongly removed in SVN revision 173004, it causes threaded
process to be stuck in execv().

Noticed by: delphij
2008-10-16 04:17:17 +00:00
Nick Hibma
c3fed0bbc1 Comment on the umass CD ROM devices in the UMTS modems. 2008-10-15 21:47:01 +00:00
Nick Hibma
4f68abd1cb 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.
2008-10-15 21:25:11 +00:00
Bjoern A. Zeeb
6f4da20196 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.

PR:		kern/119123
Tested by:	Ashish Shukla  wahjava gmail.com
MFC after:	3 days
2008-10-15 19:24:18 +00:00
Ed Schouten
f6dd5c15fd 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.

Obtained from:	//depot/projects/mpsafetty/...
Reviewed by:	thompsa
2008-10-15 16:58:35 +00:00
Ken Smith
b739742ca9 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.

Reviewed by:	jhb
MFC after:	1 week
2008-10-15 15:54:33 +00:00
Edwin Groothuis
9059646545 The timezone information databases has been updated to tzdata2008h. 2008-10-15 12:02:32 +00:00
David Xu
904c5ec4e3 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.
2008-10-15 06:31:37 +00:00
Nathan Whitehorn
fc7a9640c7 Prevent the OF syscons module from trying to attach to real devices on the
nexus by only attaching to a device with no OF node.
2008-10-15 03:38:03 +00:00
Marius Strobl
c00cf72245 Use bus_{read,write}_4(9) instead of bus_space_{read,write}_4(9)
in order to get rid of the bus space handle and tag in the softc.

MFC after:	1 month
2008-10-14 20:28:42 +00:00
Marius Strobl
1675bf71ae Use xpt_register_async() in order to remove code duplication.
MFC after:	1 month
2008-10-14 20:18:57 +00:00
Alexander Motin
7be3ed1dfe Add all Sigmatel/IDT codecs I could find.
Add IDT and Intel unknown codecs.

PR:		kern/125822
2008-10-14 19:58:26 +00:00
Andrew Thompson
657197c42e Remove the 'old' Novatel MC950D entry which was slightly incorrect, NetBSD has
already picked up the new name so run with it.
2008-10-14 18:24:40 +00:00
Maxim Konovalov
20e58023f4 o Remove a debug code and restore an accidentally deleted code
in a previous commit.
2008-10-14 17:59:39 +00:00
Maxim Konovalov
92531c02e6 o Do nothing in show_nat() for a test mode (-n). This prevents
show_nat() from endless loop and makes work ipfw -n nat <...>.

PR:		bin/128064
Submitted by:	sem
MFC after:	1 month
2008-10-14 17:53:26 +00:00
Jean-Sébastien Pédron
19ff29fb35 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
2008-10-14 17:48:36 +00:00
Maxim Konovalov
0279bb29a0 o Remove unnecessary parentheses and restore identation.
Prodded by:	mlaier
2008-10-14 17:47:29 +00:00
Sam Leffler
0c7b0d4568 correct sizeof calculation
PR:		arm/128095
Submitted by:	Henning Petersen
MFC after:	1 week
2008-10-14 16:27:52 +00:00
Nick Hibma
e7b0147d7e Correct the name of the device. 2008-10-14 15:30:17 +00:00
Nick Hibma
5d4bf57eea Add back in the (incorrect) entry for the MC950D, as requested by Andrew
Thompson. They should not be removed in support of 3rd party software.
2008-10-14 15:19:02 +00:00
Nathan Whitehorn
51d163d3e9 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.

Obtained from:	sparc64
2008-10-14 14:54:14 +00:00
Maxim Konovalov
8e6c0f8cfd o Reformat ipfw nat get|setsockopt code to look it more
style(9) compliant.  No functional changes.
2008-10-14 12:26:55 +00:00
Rafal Jaworowski
0ed948780c 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).

Only netbooting is supported at the moment.

Obtained from:	Marvell, Semihalf
2008-10-14 10:11:14 +00:00
Rafal Jaworowski
4d25037efd Let libstand(3) build on ARM.
This is a pre-requisite for loader(8) + U-Boot support library on this arch.
2008-10-14 09:53:47 +00:00
Nick Hibma
c0fb8e1476 Move all the hacks for the Huawei, Novatel and Qualcomm cards into a stub
driver.

This stub also hides the devices until they are ready to be used to avoid
confusion (commented out for now).
2008-10-14 08:41:54 +00:00
Rafal Jaworowski
d0ee9aab8e Add kernel config files for Marvell development boards.
FreeBSD 8-CURRENT was tested and run successfully on the following eval
boards and devices :

  * DB-88F5182, DB-88F5281 (Orion based)

  * DB-88F6281, RD-88F6281 (Kirkwood based)

  * DB-78100 (Discovery based)

For more detailed info on build instructions and other examples please refer
to http://wiki.freebsd.org/FreeBSDMarvell

Obtained from:	Marvell, Semihalf
2008-10-14 08:18:27 +00:00
Konstantin Belousov
175c6c319b 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.

Submitted by:	dchagin
MFC after:	1 week
2008-10-14 07:59:23 +00:00
Nick Hibma
84fc65da9f Fix a comment.
Submitted by:	Nick Mann
2008-10-14 07:52:47 +00:00
Nick Hibma
caae4b7f29 - 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)
2008-10-14 07:45:11 +00:00
Rafal Jaworowski
9f55f5f5cf 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).

The following advanced features are supported:

  - multicast
  - VLAN tagging
  - IP/TCP/UDP checksum calculation offloading
  - polling
  - interrupt coalescing

Obtained from:	Marvell, Semihalf
2008-10-14 07:24:18 +00:00
Rafal Jaworowski
f7ef7369fa Mbus attachment for USB EHCI integrated controller on Marvell chips.
This includes workarounds required for the ehci(4) to handle some non-standard
behaviour of these devices.

Obtained from:	Marvell, Semihalf
2008-10-14 07:05:20 +00:00
Edwin Groothuis
4d3caeacf3 update the manual on how to import and MFV new tzdata releases 2008-10-14 04:09:33 +00:00
Edwin Groothuis
0e8b352552 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.
2008-10-14 03:38:02 +00:00
Nathan Whitehorn
5f7ec695e9 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.

Obtained from:  sparc64
2008-10-14 03:32:41 +00:00
Edwin Groothuis
018582a953 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.
2008-10-14 03:21:36 +00:00
Ken Smith
89811440d5 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.

MFC after:	5 days
2008-10-14 02:13:12 +00:00
Pyun YongHyeon
08c23fcaae 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.

Pointed out by:	bouyer at NetBSD
2008-10-14 00:54:15 +00:00
Xin LI
1b0fa6fa40 ANSIfy, plus constify interfaces where possible. 2008-10-13 23:10:19 +00:00