]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoProperly quote argument.
Nathan Whitehorn [Sun, 27 Jan 2013 14:49:54 +0000 (14:49 +0000)]
Properly quote argument.

MFC after: 3 days

11 years agoBe conservative and do not try to consume more bytes than was
Konstantin Belousov [Sun, 27 Jan 2013 09:34:25 +0000 (09:34 +0000)]
Be conservative and do not try to consume more bytes than was
requested from the server for the read operation.  Server shall not
reply with too large size, but client should be resilent too.

Reviewed by: rmacklem
MFC after: 1 week

11 years agoFix reversed condition in the logic to wait for the chipset buffers
Konstantin Belousov [Sun, 27 Jan 2013 09:31:11 +0000 (09:31 +0000)]
Fix reversed condition in the logic to wait for the chipset buffers
flush wait on the Gen2 chipsets.  Confirmed by the inspection of the
Linux agp code.

Submitted by: Taku YAMAMOTO <taku@tackymt.homeip.net>
MFC after: 2 weeks

11 years agoRename the run_cmd field to sw_runcmd to make it consistent with the
Mark Johnston [Sun, 27 Jan 2013 06:03:57 +0000 (06:03 +0000)]
Rename the run_cmd field to sw_runcmd to make it consistent with the
other fields in struct sigwork_entry.

Approved by: rstone (co-mentor)
MFC after: 1 week

11 years agoEnsure that newsyslog -n prints the correct message for a rotation rule
Mark Johnston [Sun, 27 Jan 2013 06:02:38 +0000 (06:02 +0000)]
Ensure that newsyslog -n prints the correct message for a rotation rule
that uses the 'R' flag.

Reviewed by: gad
Approved by: rstone (co-mentor)
MFC after: 1 week

11 years agoWhen the 'R' flag is used with a newsyslog.conf entry, some fields of
Mark Johnston [Sun, 27 Jan 2013 06:01:35 +0000 (06:01 +0000)]
When the 'R' flag is used with a newsyslog.conf entry, some fields of
the corresponding struct sigwork_entry were left uninitialized,
potentially causing an early return from do_sigwork(). Ensure that these
fields are initialized, and handle the 'R' flag properly in
do_sigwork().

PR: bin/175330
Reviewed by: gad
Approved by: rstone (co-mentor)
MFC after: 1 week

11 years agoReturn with an error from copy_link(), copy_fifo() and copy_special() if
Mark Johnston [Sun, 27 Jan 2013 05:59:28 +0000 (05:59 +0000)]
Return with an error from copy_link(), copy_fifo() and copy_special() if
the -n option is specified and the destination file exists.

PR: bin/174489
Approved by: rstone (co-mentor)
MFC after: 2 weeks

11 years agotruss: use 'e' flag for fopen instead of fcntl(.., FD_CLOEXEC)
Mateusz Guzik [Sun, 27 Jan 2013 03:17:35 +0000 (03:17 +0000)]
truss: use 'e' flag for fopen instead of fcntl(.., FD_CLOEXEC)

11 years agotruss: if file requested with -o flag could not be opened print the reason
Mateusz Guzik [Sun, 27 Jan 2013 03:14:54 +0000 (03:14 +0000)]
truss: if file requested with -o flag could not be opened print the reason

MFC after: 3 days

11 years agoAdd support for the GlobalScale Technologies DreamPlug computer.
Ian Lepore [Sun, 27 Jan 2013 01:17:37 +0000 (01:17 +0000)]
Add support for the GlobalScale Technologies DreamPlug computer.

This adds support for version 10, revision 01, but it should also work
without changes for the 0901 model, at least until we get drivers for the
two different wifi chips involved.

Many users contributed to and tested the various patchsets floating around
for the past year that have eventually evolved into this checkin, most notably
Richard Neese who provided the bulk of the kernel config file.

Approved by: cognet (mentor)

11 years agoAdd a default do-nothing implementation of fdt_pci_devmap() using a weak alias,
Ian Lepore [Sun, 27 Jan 2013 00:39:02 +0000 (00:39 +0000)]
Add a default do-nothing implementation of fdt_pci_devmap() using a weak alias,
so that we don't need an empty implementation of it for every Marvell platform
that has no PCI.  This allows the removal of the SheevaPlug-specific stub and
config files, and eliminates the need to add similar stubs for future models.

Marvell platforms that do expose PCI are compiled with 'device pci' which
causes the real (non-weak) implementation in dev/fdt/fdt_pci.c to be used.

Approved by: cognet (mentor)

11 years agoAdd the chip used in recent GlobalScale Technologies *Plug computers
Ian Lepore [Sun, 27 Jan 2013 00:16:36 +0000 (00:16 +0000)]
Add the chip used in recent GlobalScale Technologies *Plug computers

Approved by: cognet (mentor)

11 years agoClean some 'svn:executable' properties in the tree.
Pedro F. Giffuni [Sat, 26 Jan 2013 22:08:21 +0000 (22:08 +0000)]
Clean some 'svn:executable' properties in the tree.

Submitted by: Christoph Mallon
MFC after: 3 days

11 years agoRevert accidental regression to previous misspelling.
Ian Lepore [Sat, 26 Jan 2013 22:02:40 +0000 (22:02 +0000)]
Revert accidental regression to previous misspelling.

Approved by: cognet (mentor)

11 years agoCosmetical off-by-one
Pedro F. Giffuni [Sat, 26 Jan 2013 21:50:52 +0000 (21:50 +0000)]
Cosmetical off-by-one

Technically, the case when all the blocks are released
is not a sanity check.
Move further the comment while here.

Suggested by: bde
MFC after: 3 days

11 years agoReduce watchdogd's memory footprint when running daemonized.
Ian Lepore [Sat, 26 Jan 2013 21:29:45 +0000 (21:29 +0000)]
Reduce watchdogd's memory footprint when running daemonized.

This uses the recently-added jemalloc(3) feature of setting the lg_chunk
tuning option to zero to request that memory be allocated in the smallest
chunks possible.  Without this option, the default is to initally map 8MB,
and then the mlockall() call wires that entire allocation even though the
program only uses a few Kbytes of it at runtime.

PR: bin/173332
Approved by: cognet (mentor)

11 years agoFix a buffer overrun while pre-formatting the names array, perpetrated in
Ian Lepore [Sat, 26 Jan 2013 20:16:58 +0000 (20:16 +0000)]
Fix a buffer overrun while pre-formatting the names array, perpetrated in
the prior commit.  Use essentially the same sprintf() statement for both
formatting and pre-formatting, and use a format string which eliminates the
need for an extra temporary buffer when formatting the name.

Noted by:      Christoph Mallon
Pointy hat to:   ian
Approved by:   cognet (mentor)

11 years agoAdd new USB quirk.
Hans Petter Selasky [Sat, 26 Jan 2013 13:44:24 +0000 (13:44 +0000)]
Add new USB quirk.

PR: usb/175599
Submitted by: Juan J Lopez
MFC after: 1 week

11 years agog_mirror: g_getattr() failure should not be fatal
Andriy Gapon [Sat, 26 Jan 2013 10:50:04 +0000 (10:50 +0000)]
g_mirror: g_getattr() failure should not be fatal

This allows to use gmirror e.g. on top of ZVOLs.

PR: kern/175323
Submitted by: Alexei.Volkov@softlynx.ru, mav
Reported by: Alexei.Volkov@softlynx.ru
Tested by: Alexei.Volkov@softlynx.ru
Reviewed by: ae, mav, pjd
MFC after: 1 week

11 years agospa_generate_rootconf: add support for old vdev labels
Andriy Gapon [Sat, 26 Jan 2013 10:34:17 +0000 (10:34 +0000)]
spa_generate_rootconf: add support for old vdev labels

It seems that old ZFS versions (v15) completely omit "vdev_children"
property when there is a single child.

Reported by: jase
Tested by: jase
MFC after: 1 week

11 years agoAlign td_frame as it will be placed into the sp register which must be
Andrew Turner [Sat, 26 Jan 2013 08:55:04 +0000 (08:55 +0000)]
Align td_frame as it will be placed into the sp register which must be
8 byte aligned on ARM EABI.

11 years agoInstall an extra hold on the newly allocated synq entry so that it
Navdeep Parhar [Sat, 26 Jan 2013 03:23:28 +0000 (03:23 +0000)]
Install an extra hold on the newly allocated synq entry so that it
cannot be freed while do_pass_accept_req is running.  This closes a race
where do_pass_establish on another CPU (the driver chose a different
queue for the new tid) expands the synq entry into a full PCB and then
releases the only hold on it, all while do_pass_accept_req is still
running.

MFC after: 3 days

11 years agoForce the 404-BT card (4 x 1G) to use the "uwire" configuration file.
Navdeep Parhar [Sat, 26 Jan 2013 03:10:28 +0000 (03:10 +0000)]
Force the 404-BT card (4 x 1G) to use the "uwire" configuration file.

MFC after: 3 days

11 years agoAdd a couple of missing error codes. Treat CPL_ERR_KEEPALV_NEG_ADVICE as
Navdeep Parhar [Sat, 26 Jan 2013 03:01:51 +0000 (03:01 +0000)]
Add a couple of missing error codes.  Treat CPL_ERR_KEEPALV_NEG_ADVICE as
negative advice and not a fatal error.

MFC after: 3 days

11 years agoAdd checks for SO_NO_OFFLOAD in a couple of places that I missed earlier
Navdeep Parhar [Sat, 26 Jan 2013 01:41:42 +0000 (01:41 +0000)]
Add checks for SO_NO_OFFLOAD in a couple of places that I missed earlier
in r245915.

11 years agocxgbe/tom: List IFCAP_TOE6 as supported now that all the required pieces
Navdeep Parhar [Sat, 26 Jan 2013 01:06:27 +0000 (01:06 +0000)]
cxgbe/tom: List IFCAP_TOE6 as supported now that all the required pieces
are in place.  You still have to enable it explicitly, after loading the
t4_tom KLD.

11 years agoTeach toe_l2_resolve to resolve IPv6 destinations too.
Navdeep Parhar [Sat, 26 Jan 2013 00:57:29 +0000 (00:57 +0000)]
Teach toe_l2_resolve to resolve IPv6 destinations too.

Reviewed by: bz@

11 years agoMention NetLink controllers in the fallback description, too.
Marius Strobl [Sat, 26 Jan 2013 00:41:54 +0000 (00:41 +0000)]
Mention NetLink controllers in the fallback description, too.

11 years agoInitial cut at making IBSS support 802.11n aware.
Adrian Chadd [Sat, 26 Jan 2013 00:37:54 +0000 (00:37 +0000)]
Initial cut at making IBSS support 802.11n aware.

* Add HTINFO field decoding to ieee80211_ies_expand() - it's likely not
  100% correct as it's not looking at the draft 11n HTINFO location,
  but I don't think anyone will care.

* When doing an IBSS join make sure the 11n channel configuration
  is used - otherwise the 11a/11bg channel will be used
  and there won't be any chance for an upgrade to 11n.

* When creating an IBSS network, ensure the channel is updated to an
  11n channel so other 11n nodes can see it and speak to it with MCS
  rates.

* Add a bit of code that's disabled for now which handles the HT
  field updating.  This won't work out very well with lots of adhoc
  nodes as we'd end up ping-ponging between the HT configuration for
  each node.  Instead, we should likely only pay attention to the
  "master" node we initially associated against and then ensure we
  propagate that information forward in our subsequent beacons.  However,
  due to the nature of IBSS (ie, there's no specific "master" node in
  the specification) it's unclear which node we should lift the HT
  parameters from.

  So for now this assumes the HT parameters are squirreled away in the
  initial beacon/probe response.

So there's some trickiness here.

With ap/sta pairing, the probe response just populates a legacy node
and the association request/response is what is used for negotiation
11n-ness (and upgrading things as needed.)

With ibss networks, the pairing is done with probe request/response,
with discovery being done by creating nodes when new beacons in the
IBSS / BSSID are heard.  There's no assoc request/response frames going on.

So the trick here has been to figure out where to upgrade things.
I don't like how I just taught ieee80211_sta_join() to "speak" HT -
I'd rather there be an upgrade path when an IBSS node joins and there
are HT parameters present.  Once I've done that, I'll kill this
HT special casing that's going on in ieee80211_sta_join().

Tested:

* AR9280, AR5416, AR5212 - basic iperf and ping interoperability tests
  whilst in a non-encrypted adhoc network.

TODO:

* Fix up the HT upgrade path for IBSS nodes rather than adding code
  in ieee80211_sta_join(), then remove my code from there.

* When associating, there's a concept of a "master" node in the IBSS
  which is the node you first joined the network through.  It's possible
  the correct thing to do is to listen to HT updates and configure WME
  parameters from that node.  However, once that node goes away, which
  node(s) should be listened to for configuration changes?

  For things like HT channel width, it's likely going to be ok to
  just associate as HT40 and then use the per-neighbor rate control
  and HTINFO/HTCAP fields to figure out which rates and configuration
  to speak.  Ie, for a 20MHz 11n node, just speak 20MHz rates to
  it.  It shouldn't "change", like what goes on in AP/STA configurations.

11 years agoMigrate the TX sending code out from under the ath0 taskq and into
Adrian Chadd [Sat, 26 Jan 2013 00:14:34 +0000 (00:14 +0000)]
Migrate the TX sending code out from under the ath0 taskq and into
the separate ath0 TX taskq.

Whilst here, make sure that the TX software scheduler is also
running out of the TX task, rather than the ath0 taskqueue.

Make sure that the tx taskqueue is blocked/unblocked as necessary.

This allows for a little more parallelism on multi-core machines,
as well as (eventually) supporting a higher task priority for TX
tasks, allowing said TX task to preempt an already running RX or
TX completion task.

Tested:

* AR5416, AR9280 hostap and STA modes

11 years ago- Improve some comments.
Marius Strobl [Sat, 26 Jan 2013 00:11:39 +0000 (00:11 +0000)]
- Improve some comments.
- Make bge_lookup_{rev,vendor}() static.
- Factor out chip identification rather than duplicating the code.
- Sanitize bge_probe() a bit (don't hardcode buffer sizes, allow
  bge_lookup_vendor() to return NULL so the excessive panic() three
  can be removed there, etc.) and return BUS_PROBE_DEFAULT rather than
  hardcoding 0.
- According to the Linux tg3 driver, BCM57791 and BCM57795 aren't
  capable of Gigabit Ethernet.
- Check the return value of taskqueue_start_threads().

11 years agoGenerate lle_event in the IPv6 neighbor discovery code too.
Navdeep Parhar [Sat, 26 Jan 2013 00:05:22 +0000 (00:05 +0000)]
Generate lle_event in the IPv6 neighbor discovery code too.

Reviewed by: bz@

11 years agoMove lle_event to if_llatbl.h
Navdeep Parhar [Fri, 25 Jan 2013 23:58:21 +0000 (23:58 +0000)]
Move lle_event to if_llatbl.h

lle_event replaced arp_update_event after the ARP rewrite and ended up
in if_ether.h simply because arp_update_event used to be there too.
IPv6 neighbor discovery is going to grow lle_event support and this is a
good time to move it to if_llatbl.h.

The two in-tree consumers of this event - OFED and toecore - are not
affected.

Reviewed by: bz@

11 years ago- Check the return value of taskqueue_start_threads().
Marius Strobl [Fri, 25 Jan 2013 23:44:02 +0000 (23:44 +0000)]
- Check the return value of taskqueue_start_threads().
- At least the Saturn chips of 501-6738 cards need a delay after freezing
  the external GMII pins before the internal PHY is accessible again. So
  wait a bit after (un)freezing these. Also don't touch the other bits of
  that configuration register. [1]
- Take advantage of nitems().

Reported and tested by: Paul Keusemann [1]

MFC after: 3 days

11 years agoAvoid NULL dereference in nd6_storelladdr when no mbuf is provided. It
Navdeep Parhar [Fri, 25 Jan 2013 23:11:13 +0000 (23:11 +0000)]
Avoid NULL dereference in nd6_storelladdr when no mbuf is provided.  It
is called this way from a couple of places in the OFED code.  (toecore
calls it too but that's going to change shortly).

Reviewed by: bz@

11 years agoThere is no need to call into the TOE driver twice in pru_rcvd (tod_rcvd
Navdeep Parhar [Fri, 25 Jan 2013 22:50:52 +0000 (22:50 +0000)]
There is no need to call into the TOE driver twice in pru_rcvd (tod_rcvd
and then tod_output right after that).

Reviewed by: bz@

11 years agoImprove correctness of rtc register implementation.
Peter Grehan [Fri, 25 Jan 2013 22:43:20 +0000 (22:43 +0000)]
Improve correctness of rtc register implementation.

Submitted by: tycho nightingale at pluribusnetworks com

11 years agoAdd TCP_OFFLOAD hook in syncache_respond for IPv6 too, just like the one
Navdeep Parhar [Fri, 25 Jan 2013 22:16:35 +0000 (22:16 +0000)]
Add TCP_OFFLOAD hook in syncache_respond for IPv6 too, just like the one
that exists for IPv4.

Reviewed by: bz@

11 years agoFix update method (s/SUP/CVS) warning.
Glen Barber [Fri, 25 Jan 2013 21:44:45 +0000 (21:44 +0000)]
Fix update method (s/SUP/CVS) warning.

Submitted by: Ryan Stone
MFC after: 1 day

11 years agoAlways allow access to the sysenter cs/esp/eip MSRs since they
Peter Grehan [Fri, 25 Jan 2013 21:38:31 +0000 (21:38 +0000)]
Always allow access to the sysenter cs/esp/eip MSRs since they
are automatically saved and restored in the VMCS.

Reviewed by: neel
Obtained from: NetApp

11 years agoTeach toe_4tuple_check() to deal with IPv6 4-tuples too.
Navdeep Parhar [Fri, 25 Jan 2013 20:45:24 +0000 (20:45 +0000)]
Teach toe_4tuple_check() to deal with IPv6 4-tuples too.

Reviewed by: bz@

11 years agoHeed SO_NO_OFFLOAD.
Navdeep Parhar [Fri, 25 Jan 2013 20:23:33 +0000 (20:23 +0000)]
Heed SO_NO_OFFLOAD.

MFC after: 1 week

11 years agoRemove redundant test, we know inp_lport is 0.
Navdeep Parhar [Fri, 25 Jan 2013 20:14:27 +0000 (20:14 +0000)]
Remove redundant test, we know inp_lport is 0.

MFC after: 1 week

11 years agoDon't time travel back and use a present date.
Xin LI [Fri, 25 Jan 2013 18:47:16 +0000 (18:47 +0000)]
Don't time travel back and use a present date.

Noticed by: mckusick

11 years agoMK_* variable should be compared to "no" not "NO".
Brooks Davis [Fri, 25 Jan 2013 17:40:10 +0000 (17:40 +0000)]
MK_* variable should be compared to "no" not "NO".

Submitted by: "b.f." <bf1783@googlemail.com>

11 years agoExpand description of how gptboot and gptzfsboot choose a partition for
Warren Block [Fri, 25 Jan 2013 16:33:00 +0000 (16:33 +0000)]
Expand description of how gptboot and gptzfsboot choose a partition for
booting.

Reviewed by: ae
MFC after: 1 week

11 years agoFurther cleanups to use of timestamps in NFS:
John Baldwin [Fri, 25 Jan 2013 15:25:24 +0000 (15:25 +0000)]
Further cleanups to use of timestamps in NFS:
- Use NFSD_MONOSEC (which maps to time_uptime) instead of the seconds
  portion of wall-time stamps to manage timeouts on events.
- Remove unused nd_starttime from the per-request structure in the new
  NFS server.
- Use nanotime() for the modification time on a delegation to get as
  precise a time as possible.
- Use time_second instead of extracting the second from a call to
  getmicrotime().

Submitted by: bde (3)
Reviewed by: bde, rmacklem
MFC after: 2 weeks

11 years agoArithmetic on pointers takes into account the size of the type. Properly cast the...
Dmitry Chagin [Fri, 25 Jan 2013 14:40:54 +0000 (14:40 +0000)]
Arithmetic on pointers takes into account the size of the type. Properly cast the pointer to avoid incorrect pointer scaling.

MFC after: 1 Week

11 years agoIn mbuf(9) API length is always integer. Thus, cast mbuf length
Gleb Smirnoff [Fri, 25 Jan 2013 11:52:56 +0000 (11:52 +0000)]
In mbuf(9) API length is always integer. Thus, cast mbuf length
constants to be integers.

Reviewed by: bde

11 years agoFix style nit in dtc man page: sentences should start on new lines.
David Chisnall [Fri, 25 Jan 2013 08:34:38 +0000 (08:34 +0000)]
Fix style nit in dtc man page: sentences should start on new lines.

Reported By: joel

11 years agoFix method of naming compatible string to follow
Ganbold Tsagaankhuu [Fri, 25 Jan 2013 07:21:22 +0000 (07:21 +0000)]
Fix method of naming compatible string to follow
"<manufacturer>,<model>" as described in
http://www.devicetree.org/Device_Tree_Usage

Reviewed by: andrew@
Approved by: gonzo@

11 years agoUse the correct type (uint64_t) to retrieve sysctl machdep.tsc_freq.
Neel Natu [Fri, 25 Jan 2013 06:27:03 +0000 (06:27 +0000)]
Use the correct type (uint64_t) to retrieve sysctl machdep.tsc_freq.

Simplify the function a bit by falling through after initialization and
return via the normal code path.

Reviewed by: grehan
Obtained from: NetApp

11 years agobsd.own.mk needs to be included before Makefil.inc so MK_ARM_EABI is defined
Andrew Turner [Fri, 25 Jan 2013 06:18:49 +0000 (06:18 +0000)]
bsd.own.mk needs to be included before Makefil.inc so MK_ARM_EABI is defined

11 years agoUpdate and clarify comments regarding VFS op table initialization
Sergey Kandaurov [Thu, 24 Jan 2013 23:11:51 +0000 (23:11 +0000)]
Update and clarify comments regarding VFS op table initialization
in the man page and its header counterpart.

Submitted by: Christoph Mallon <christoph.mallon@gmx.de> (initial version)
Reviewed and further improved by: bde (previous version)
All bugs are: mine

11 years agoUse = not == in test arguments.
Brooks Davis [Thu, 24 Jan 2013 20:47:37 +0000 (20:47 +0000)]
Use = not == in test arguments.

Submitted by: Christoph Mallon <christoph.mallon@gmx.de>

11 years agoSanitize the element descriptor string before using it as a device name.
Jaakko Heinonen [Thu, 24 Jan 2013 17:28:39 +0000 (17:28 +0000)]
Sanitize the element descriptor string before using it as a device name.

Reported and tested by: Vitalij Satanivskij
Reviewed by: gibbs, mav

11 years agoStrip any trailing slash off of the -D argument to install to support the
Brooks Davis [Thu, 24 Jan 2013 17:12:02 +0000 (17:12 +0000)]
Strip any trailing slash off of the -D argument to install to support the
rather fragile destdir stripping in the metalog.

11 years agoDon't link two different things to the same paths. As tiebreaker I've
Brooks Davis [Thu, 24 Jan 2013 17:00:11 +0000 (17:00 +0000)]
Don't link two different things to the same paths.  As tiebreaker I've
picked the link that was installed last so as to not change the behavior.
The one exception is sr_YU.ISO8859-2/LC_MONETARY where a file was being
replaced by a link.

11 years agoInstall the NLS catalog in the C directory rather than en_US.US-ASCII
Brooks Davis [Thu, 24 Jan 2013 16:53:35 +0000 (16:53 +0000)]
Install the NLS catalog in the C directory rather than en_US.US-ASCII
which is a link to C.  This allow the makefs mtree manifest mode to find
the file.

11 years agoOnly install manpages and html documentation in the ncurses/*w (wchar)
Brooks Davis [Thu, 24 Jan 2013 16:38:47 +0000 (16:38 +0000)]
Only install manpages and html documentation in the ncurses/*w (wchar)
builds so that it is only installed once.  This is consistent with the
existing decision to only install headers in the that case.

11 years agoDon't install telnet.h if it will be installed by libtelnet.
Brooks Davis [Thu, 24 Jan 2013 16:28:37 +0000 (16:28 +0000)]
Don't install telnet.h if it will be installed by libtelnet.

11 years agoDon't declare an dependency on _maninstall when LIBRARIES_ONLY is set.
Brooks Davis [Thu, 24 Jan 2013 15:55:24 +0000 (15:55 +0000)]
Don't declare an dependency on _maninstall when LIBRARIES_ONLY is set.
It doesn't exist.

11 years agoLittle-endian and other fixes for Broadcom XLP network driver
Jayachandran C. [Thu, 24 Jan 2013 15:49:47 +0000 (15:49 +0000)]
Little-endian and other fixes for Broadcom XLP network driver

The changes are:
 - the microcore code loaded into the NAE has to be byteswapped
   in LE
 - the descriptors in memory for a P2P NAE descriptor has to be
   byteswapped in LE
 - the m_data pointer is already cacheline aligned, so the
   unnecessary m_adj to cacheline size can be removed
 - fix mask used to obtain physical address from the Tx freeback
   descriptor
 - fix a compile error in code under #ifdef

Obtained from: Venkatesh J V <venkatesh.vivekanandan@broadcom.com>

11 years agoFix credit configuration on Broadcom XLP CMS
Jayachandran C. [Thu, 24 Jan 2013 15:23:01 +0000 (15:23 +0000)]
Fix credit configuration on Broadcom XLP CMS

The CMS output queue credit configuration register is 64 bit, so use
a 64 bit variable while updating it.
Obtained from: Venkatesh J V <venkatesh.vivekanandan@broadcom.com>

11 years agoReorder so that NO_MAN is declared before bsd.own.mk is included and thus
Brooks Davis [Thu, 24 Jan 2013 15:18:41 +0000 (15:18 +0000)]
Reorder so that NO_MAN is declared before bsd.own.mk is included and thus
has an effect (not installed a g++.1 manpage over the g++.1(.gz) link
created in ../cc).

11 years agoBroadcom XLP network driver update for XLP 8xx B1 rev
Jayachandran C. [Thu, 24 Jan 2013 15:14:22 +0000 (15:14 +0000)]
Broadcom XLP network driver update for XLP 8xx B1 rev

Update MDIO reset code to support Broadcom XLP B1 revisions.
Update nlm_xlpge_ioctl, nlm_xlpge_port_enable need not be
called after nlm_xlpge_init.

Obtained from: Venkatesh J V <venkatesh.vivekanandan@broadcom.com>

11 years agoMinor updates to the Broadcom XLP NAE driver
Jayachandran C. [Thu, 24 Jan 2013 14:42:58 +0000 (14:42 +0000)]
Minor updates to the Broadcom XLP NAE driver

Remove unnecessary SGMII initialization code from nae.c. While there
clean up some prints and whitespace.

11 years agoBroadcom XLP updates for the new firmware
Jayachandran C. [Thu, 24 Jan 2013 14:33:25 +0000 (14:33 +0000)]
Broadcom XLP updates for the new firmware

Support few more versions of board firmware.  In case the security
block is disabled, enable it at boot. Also increase the excluded
memory region to cover the area used by the firmware to initialize
devices.

11 years ago- Utilize m_get2(), accidentially fixing some signedness bugs.
Gleb Smirnoff [Thu, 24 Jan 2013 14:29:31 +0000 (14:29 +0000)]
- Utilize m_get2(), accidentially fixing some signedness bugs.
- Return EMSGSIZE in both cases if uio_resid is oversized or undersized.
- No need to clear rcvif.

11 years agoLittle-endian fix for PCI on Broadcom XLP.
Jayachandran C. [Thu, 24 Jan 2013 11:42:16 +0000 (11:42 +0000)]
Little-endian fix for PCI on Broadcom XLP.

Update the function xlp_pcib_hardware_swap_enable() to do nothing
when BYTE_ORDER is not BIG_ENDIAN. PCIe hardware swap is not requred
in little-endian mode as the endianness matches that of CPU.

11 years agoFix timer to support oneshot and periodic mode
Ganbold Tsagaankhuu [Thu, 24 Jan 2013 09:36:50 +0000 (09:36 +0000)]
Fix timer to support oneshot and periodic mode
Use 64 bit high and low counter for timecounter and delay

Reviewed by: mav@, ian@
Approved by: gonzo@

11 years agoDisable MSI interrupts for SB600 chipset. According to the report they are
Alexander Motin [Thu, 24 Jan 2013 09:33:43 +0000 (09:33 +0000)]
Disable MSI interrupts for SB600 chipset.  According to the report they are
not functional.

PR: kern/174880, kern/174985, kern/175002
MFC after: 1 week

11 years agostyle(9)
Gleb Smirnoff [Thu, 24 Jan 2013 09:30:42 +0000 (09:30 +0000)]
style(9)

Reviewed by: bde

11 years ago- Move large functions m_getjcl() and m_get2() to kern/uipc_mbuf.c
Gleb Smirnoff [Thu, 24 Jan 2013 09:29:41 +0000 (09:29 +0000)]
- Move large functions m_getjcl() and m_get2() to kern/uipc_mbuf.c
- style(9) fixes to mbuf.h

Reviewed by: bde

11 years agoIndicate a bunch of new hardware support.
Eitan Adler [Thu, 24 Jan 2013 06:30:56 +0000 (06:30 +0000)]
Indicate a bunch of new hardware support.

PR: docs/173893
Submitted by: Mathieu Simon <mathieu.sim@gmail.com>
Approved by: bcr (mentor)

11 years ago - Wrap long line;
Xin LI [Thu, 24 Jan 2013 05:36:37 +0000 (05:36 +0000)]
 - Wrap long line;
 - Add -, to SYNOPSIS section.

MFC after: 2 weeks

11 years agobge_attach() can fail before attaching mii(4). So make sure to check
Pyun YongHyeon [Thu, 24 Jan 2013 04:54:53 +0000 (04:54 +0000)]
bge_attach() can fail before attaching mii(4). So make sure to check
bge_miibus before detaching mii(4).

11 years agoUpdate list of ports required for importing jemalloc.
Jason Evans [Thu, 24 Jan 2013 03:33:15 +0000 (03:33 +0000)]
Update list of ports required for importing jemalloc.

11 years agoImport jemalloc 3.3.0. This reduces zeroed memory validation overhead for
Jason Evans [Thu, 24 Jan 2013 03:08:37 +0000 (03:08 +0000)]
Import jemalloc 3.3.0.  This reduces zeroed memory validation overhead for
non-MALLOC_PRODUCTION builds.

11 years agoFor 57765 class controllers, set low watermark max receive frames to 1.
Pyun YongHyeon [Thu, 24 Jan 2013 02:25:43 +0000 (02:25 +0000)]
For 57765 class controllers, set low watermark max receive frames to 1.

11 years agoRemove several MLINKS that were listed twice.
Brooks Davis [Wed, 23 Jan 2013 23:53:26 +0000 (23:53 +0000)]
Remove several MLINKS that were listed twice.

11 years agomanctl is conditionally added to SUBDIRS later on. Don't unconditionally
Brooks Davis [Wed, 23 Jan 2013 23:51:44 +0000 (23:51 +0000)]
manctl is conditionally added to SUBDIRS later on.  Don't unconditionally
include in the main list.

11 years agoOnly try to install one link at each path.
Brooks Davis [Wed, 23 Jan 2013 23:49:35 +0000 (23:49 +0000)]
Only try to install one link at each path.

Don't install verify_krb5_conf.8.  It is installed in
kerberos5/usr.bin/verify_krb5_conf.

11 years agoRevert the part of r239864 which removed obtaining the SMP mutex around
Marius Strobl [Wed, 23 Jan 2013 22:52:20 +0000 (22:52 +0000)]
Revert the part of r239864 which removed obtaining the SMP mutex around
reading registers from other CPUs. As it turns out, the hardware doesn't
really like concurrent IPI'ing causing adverse effects. Also the thought
deadlock when using this spin lock here and the targeted CPU(s) are also
holding or in case of nested locks can't actually happen. This is due to
the fact that on sparc64, spinlock_enter() only raises the PIL but doesn't
disable interrupts completely. Thus direct cross calls as used for the
register reading (and all other MD IPI needs) still will be executed by
the targeted CPU(s) in that case.

MFC after: 3 days

11 years agoDon't assume that all Linux TCP-level socket options are identical to
John Baldwin [Wed, 23 Jan 2013 21:44:48 +0000 (21:44 +0000)]
Don't assume that all Linux TCP-level socket options are identical to
FreeBSD TCP-level socket options (only the first two are).  Instead,
using a mapping function and fail unsupported options as we do for other
socket option levels.

MFC after: 2 weeks

11 years agoAlways update the hw.uart.console hint anytime a change is made to the
John Baldwin [Wed, 23 Jan 2013 18:34:21 +0000 (18:34 +0000)]
Always update the hw.uart.console hint anytime a change is made to the
comconsole setup.  Previously the hint would be set when if you set a
custom port, but it would not be updated if you later set a custom speed.

Also, leave the hw.uart.console hint mutable so it can be overridden or
unset by the user if needed.

Reviewed by: kib (earlier version)
MFC after: 1 week

11 years agoFix a typo.
John Baldwin [Wed, 23 Jan 2013 14:37:05 +0000 (14:37 +0000)]
Fix a typo.

11 years agoext2fs: fix a check for negative block numbers.
Pedro F. Giffuni [Wed, 23 Jan 2013 14:29:29 +0000 (14:29 +0000)]
ext2fs: fix a check for negative block numbers.

The previous change accidentally left the substraction we
were trying to avoid in case that i_blocks could become
negative.

Reported by: bde
MFC after: 4 days

11 years agoposix_fadvise(2) first appeared in FreeBSD 9.1
Gleb Smirnoff [Wed, 23 Jan 2013 10:50:52 +0000 (10:50 +0000)]
posix_fadvise(2) first appeared in FreeBSD 9.1

11 years agoAdd __aeabi_ulcmp to allow building of the LINT kernel.
Andrew Turner [Wed, 23 Jan 2013 09:18:18 +0000 (09:18 +0000)]
Add __aeabi_ulcmp to allow building of the LINT kernel.

11 years agoExplicitly include headers that are implicitly included by libstdc++. Fixes
David Chisnall [Wed, 23 Jan 2013 08:54:34 +0000 (08:54 +0000)]
Explicitly include headers that are implicitly included by libstdc++.  Fixes
building dtc with libc++.

11 years agoDon't build the kernel with Thumb interworking as we don't support Thumb.
Andrew Turner [Wed, 23 Jan 2013 07:27:38 +0000 (07:27 +0000)]
Don't build the kernel with Thumb interworking as we don't support Thumb.

11 years agoFix compilation errors.
Jason Evans [Wed, 23 Jan 2013 07:22:33 +0000 (07:22 +0000)]
Fix compilation errors.

11 years agoAdd support for transparent mode while in netmap.
Luigi Rizzo [Wed, 23 Jan 2013 05:37:45 +0000 (05:37 +0000)]
Add support for transparent mode while in netmap.

By setting dev.netmap.fwd=1 (or enabling the feature with a per-ring flag),
packets are forwarded between the NIC and the host stack unless the
netmap client clears the NS_FORWARD flag on the individual descriptors.

This feature greatly simplifies applications where some traffic
(think of ARP, control traffic, ssh sessions...) must be processed
by the host stack, whereas the bulk is handled by the netmap process
which simply (un)marks packets that should not be forwarded.
The default is chosen so that now a netmap receiver operates
in a mode very similar to bpf.

Of course there is no free lunch: traffic to/from the host stack
still operates at OS speed (or less, as there is one extra copy in
one direction).
HOWEVER, since traffic goes to the user process before being
reinjected, and reinjection occurs in a user context, you get some
form of livelock protection for free.

11 years agocontrol some debugging messages with dev.netmap.verbose
Luigi Rizzo [Wed, 23 Jan 2013 03:51:47 +0000 (03:51 +0000)]
control some debugging messages with dev.netmap.verbose

add infrastracture to adapt to changes in number of queues
and buffers at runtime

11 years agoleftover from r245579... flags for semi transparent mode and direct
Luigi Rizzo [Wed, 23 Jan 2013 03:49:48 +0000 (03:49 +0000)]
leftover from r245579... flags for semi transparent mode and direct
forwarding through a VALE switch

11 years agoReturn "failure" as we do for 'cp -i' and a "n" answer.
David E. O'Brien [Wed, 23 Jan 2013 02:06:20 +0000 (02:06 +0000)]
Return "failure" as we do for 'cp -i' and a "n" answer.

Otherwise with '-v' we print out the file name as if it was copied:
   /tmp/2gb-card/M0132.CTG not overwritten
   /mnt/DCIM/CANONMSC/M0132.CTG -> /tmp/2gb-card/M0132.CTG

11 years agoUse snprintf instead of strc* functions and add bounds checking when creating
Baptiste Daroussin [Tue, 22 Jan 2013 22:41:12 +0000 (22:41 +0000)]
Use snprintf instead of strc* functions and add bounds checking when creating
pkgngpath

Submitted by: sbz, gahr

11 years agoIntroduce a new option -DNO_ROOT that allows install and distribution
Brooks Davis [Tue, 22 Jan 2013 21:10:03 +0000 (21:10 +0000)]
Introduce a new option -DNO_ROOT that allows install and distribution
targets to be run without root privilege.

Information about ownership, group, flags, and suid bits are stored in
the file specified by METALOG which defaults to ${DESTDIR}/METALOG.
This file can be used in conjunction with bsdtar or makefs to generate
archives or file system images with correct permissions.

The packageworld target has been altered to use this metadata allowing
non-root releases (subject to further changes in release/Makefile.)

Sponsored by: DARPA, AFRL
Reviewed by: ian, ray

11 years agoSimilar to r245823, use decimal constants for UNIX domain socket options.
John Baldwin [Tue, 22 Jan 2013 20:37:31 +0000 (20:37 +0000)]
Similar to r245823, use decimal constants for UNIX domain socket options.

MFC after: 1 week