]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoDisable updating InputDiscards counter for BCM5717, BCM5718,
yongari [Fri, 28 Oct 2011 01:10:59 +0000 (01:10 +0000)]
Disable updating InputDiscards counter for BCM5717, BCM5718,
BCM5719 A0 and BCM5720 A0 and add comment why driver does not try
to read it.

12 years agoAdd initial BCM5720 support.
yongari [Fri, 28 Oct 2011 01:04:40 +0000 (01:04 +0000)]
Add initial BCM5720 support.
Many thanks to Broadcom for continuing support of FreeBSD.

Submitted by: Geans Pin at Broadcom (initial version)
H/W donated by: Broadcom

12 years agoRecognize BCM5720C PHY.
yongari [Fri, 28 Oct 2011 00:40:19 +0000 (00:40 +0000)]
Recognize BCM5720C PHY.

12 years agoWhen add a new remote address using sctp_add_remote_addr(),
tuexen [Thu, 27 Oct 2011 22:38:48 +0000 (22:38 +0000)]
When add a new remote address using sctp_add_remote_addr(),
return the correct net if requested.

MFC after: 3 days.

12 years agoSend out control chunks which have no specific destination.
tuexen [Thu, 27 Oct 2011 22:37:59 +0000 (22:37 +0000)]
Send out control chunks which have no specific destination.

MFC after: 3 days.

12 years agoDefine BGE_FW_HB_TIMEOUT_SEC and remove one more magic value.
yongari [Thu, 27 Oct 2011 22:10:52 +0000 (22:10 +0000)]
Define BGE_FW_HB_TIMEOUT_SEC and remove one more magic value.
bge(4) sends BGE_FW_CMD_DRV_ALIVE command to firmware every 2
seconds.  BGE_FW_CMD_DRV_ALIVE command requires 4 bytes data.  This
data contains timeout value in seconds until the next
BGE_FW_CMD_DRV_ALIVE command.
Broadcom recommends driver set the value 3 times longer than the
interval that it sends BGE_FW_CMD_DRV_ALIVE.  Currently bge(4) uses
3 seconds so probably we have to increase it in future and use
different ALIVE command(e.g. BGE_FW_CMD_DRV_ALIVE3).

No functional changes.

12 years agoRename hard-coded value 1 << 14 with BGE_RX_CPU_DRV_EVENT.
yongari [Thu, 27 Oct 2011 21:27:37 +0000 (21:27 +0000)]
Rename hard-coded value 1 << 14 with BGE_RX_CPU_DRV_EVENT.
This bit(SW event 7 in publicly available data sheet) is used to
make RX CPU handle a firmware command and the bit is automatically
cleared after RX CPU completed the command.
Generally firmware command takes the following steps.
 1. Write BGE_SRAM_FW_CMD_MB with a command.
 2. Write BGE_SRAM_FW_CMD_LEN_MB with the length of the command in bytes.
 3. Write BGE_SRAM_FW_CMD_DATA_MB with actual command data.
 4. Generate BGE_RX_CPU_EVENT and let firmware handle the command.
 5. Wait for the ACK of the firmware command.

No functional changes.

12 years agoIncrease default scrub threshold from 30 days to 5 weeks. Using
delphij [Thu, 27 Oct 2011 21:25:41 +0000 (21:25 +0000)]
Increase default scrub threshold from 30 days to 5 weeks.  Using
whole weeks makes it easier to predicate when the scrub would
happen.

MFC after: 1 week

12 years agoRename BGE_FW_DRV_ALIVE/BGE_FW_PAUSE to BGE_FW_CMD_DRV_ALIVE/BGE_FW_CMD_PAUSE.
yongari [Thu, 27 Oct 2011 20:54:53 +0000 (20:54 +0000)]
Rename BGE_FW_DRV_ALIVE/BGE_FW_PAUSE to BGE_FW_CMD_DRV_ALIVE/BGE_FW_CMD_PAUSE.
Also add more firmware commands(not used yet).
No functional changes.

12 years agoFix svnversion for svn 1.7.x by not looking for .svn in ${SYSDIR} (since
dougb [Thu, 27 Oct 2011 20:44:28 +0000 (20:44 +0000)]
Fix svnversion for svn 1.7.x by not looking for .svn in ${SYSDIR} (since
it no longer exists). Instead, run svnversion if we can find the binary
and test that the output looks like a version string.

Reviewed by: discussion on -current@
Tested by: rodrigc for non-svn case (thanks!)

12 years agoRemove example for linking /dev/vga to /dev/ttyv0, this hasn't been
gavin [Thu, 27 Oct 2011 20:39:20 +0000 (20:39 +0000)]
Remove example for linking /dev/vga to /dev/ttyv0, this hasn't been
required since X version 4.3.0.

PR: conf/161847
Submitted by: eadler
MFC after: 2 weeks

12 years agoRemove redundant space.
pjd [Thu, 27 Oct 2011 20:36:35 +0000 (20:36 +0000)]
Remove redundant space.

MFC after: 3 days

12 years agoUpdate the example rules in devfs.conf to reflect the changes since ATA_CAM.
gavin [Thu, 27 Oct 2011 20:35:21 +0000 (20:35 +0000)]
Update the example rules in devfs.conf to reflect the changes since ATA_CAM.
While here, add another example rule, as many applications these days
expect to find /dev/dvd instead.

MFC after: 3 days

12 years agoImplement 'async' mode for HAST.
pjd [Thu, 27 Oct 2011 20:32:57 +0000 (20:32 +0000)]
Implement 'async' mode for HAST.

MFC after: 3 days

12 years agoMinor cleanups.
pjd [Thu, 27 Oct 2011 20:15:37 +0000 (20:15 +0000)]
Minor cleanups.

MFC after: 3 days

12 years agoReduce indentation.
pjd [Thu, 27 Oct 2011 20:13:39 +0000 (20:13 +0000)]
Reduce indentation.

MFC after: 3 days

12 years agoImprove comment so it doesn't suggest race is possible, but that we handle
pjd [Thu, 27 Oct 2011 20:10:21 +0000 (20:10 +0000)]
Improve comment so it doesn't suggest race is possible, but that we handle
the race.

MFC after: 3 days

12 years ago- Eliminate the need for hio_nv.
pjd [Thu, 27 Oct 2011 20:01:23 +0000 (20:01 +0000)]
- Eliminate the need for hio_nv.
- Introduce hio_clear() function for clearing hio before returning it
  onto free queue.

MFC after: 3 days

12 years agoMonor cleanups.
pjd [Thu, 27 Oct 2011 18:49:16 +0000 (18:49 +0000)]
Monor cleanups.

MFC after: 3 days

12 years agoDelay resuid generation until first connection to secondary, not until first
pjd [Thu, 27 Oct 2011 18:45:01 +0000 (18:45 +0000)]
Delay resuid generation until first connection to secondary, not until first
write. This way on first connection we will synchronize only the extents that
were modified during the lifetime of primary node, not entire GEOM provider.

MFC after: 3 days

12 years agoSort function prototypes.
jhb [Thu, 27 Oct 2011 17:44:51 +0000 (17:44 +0000)]
Sort function prototypes.

12 years agoWhitespace fix.
jhb [Thu, 27 Oct 2011 17:43:36 +0000 (17:43 +0000)]
Whitespace fix.

12 years agoTidy up the comment at the head of vm_page_alloc, and mention that the
alc [Thu, 27 Oct 2011 17:29:19 +0000 (17:29 +0000)]
Tidy up the comment at the head of vm_page_alloc, and mention that the
returned page has the flag VPO_BUSY set.

12 years agoDon't forget to kick the man page date.
ed [Thu, 27 Oct 2011 17:21:41 +0000 (17:21 +0000)]
Don't forget to kick the man page date.

12 years agoMake our utmpx more like System V.
ed [Thu, 27 Oct 2011 17:05:18 +0000 (17:05 +0000)]
Make our utmpx more like System V.

When booting the system, truncate the utx.active file, but do write the
BOOT_TIME record into it afterwards. This allows one to obtain the boot
time of the system as follows:

struct utmpx u1 = { .ut_type = BOOT_TIME }, *u2;

setutxent();
u2 = getutxid(&u1);

Now, the boot time is stored in u2->ut_tv, just like on Linux and other
systems.

We don't open the utx.active file with O_EXLOCK. It's rather unlikely
that other applications use this database at the same time and I want to
prevent the possibility of deadlocks in init(8).

Discussed with: pluknet

12 years agoEliminate vestiges of page coloring in VM_ALLOC_NOOBJ calls to
alc [Thu, 27 Oct 2011 16:39:17 +0000 (16:39 +0000)]
Eliminate vestiges of page coloring in VM_ALLOC_NOOBJ calls to
vm_page_alloc().  While I'm here, for the sake of consistency, always
specify the allocation class, such as VM_ALLOC_NORMAL, as the first of
the flags.

12 years agoCorrect comments.
pjd [Thu, 27 Oct 2011 16:22:17 +0000 (16:22 +0000)]
Correct comments.

MFC after: 3 days

12 years agoPrint INIT_PROCESS and LOGIN_PROCESS entries as well.
ed [Thu, 27 Oct 2011 16:20:29 +0000 (16:20 +0000)]
Print INIT_PROCESS and LOGIN_PROCESS entries as well.

Even though our implementation of utmpx never emits these types of
records, they are part of POSIX. Do print them when they show up in the
database files.

While there, also print the type number of unsupported records.

12 years agoBefore this change when GELI detected hardware crypto acceleration it will
pjd [Thu, 27 Oct 2011 16:12:25 +0000 (16:12 +0000)]
Before this change when GELI detected hardware crypto acceleration it will
start only one worker thread. For software crypto it will start by default
N worker threads where N is the number of available CPUs.

This is not optimal if hardware crypto is AES-NI, which uses CPU for AES
calculations.

Change that to always start one worker thread for every available CPU.
Number of worker threads per GELI provider can be easly reduced with
kern.geom.eli.threads sysctl/tunable and even for software crypto it
should be reduced when using more providers.

While here, when number of threads exceeds number of CPUs avilable don't
reduce this number, assume the user knows what he is doing.

Reported by: Yuri Karaban <dev@dev97.com>
MFC after: 3 days

12 years agoUpdate Copyright.
pjd [Thu, 27 Oct 2011 14:15:26 +0000 (14:15 +0000)]
Update Copyright.

MFC after: 3 days

12 years agoImprove AES-NI performance for AES-XTS:
pjd [Thu, 27 Oct 2011 14:07:57 +0000 (14:07 +0000)]
Improve AES-NI performance for AES-XTS:
- Operate on uint64_t types when doing XORing, etc. instead of uint8_t.
- Don't bzero() temporary block for every AES block. Do it once for entire
  data block.
- AES-NI is available only on little endian architectures. Simplify code
  that takes block number from IV.

Benchmarks:

Memory-backed md(4) device, software AES-XTS, 4kB sector:

# dd if=/dev/md0.eli bs=1m
59.61MB/s

Memory-backed md(4) device, old AES-NI AES-XTS, 4kB sector:

# dd if=/dev/md0.eli bs=1m
97.29MB/s

Memory-backed md(4) device, new AES-NI AES-XTS, 4kB sector:

# dd if=/dev/md0.eli bs=1m
221.26MB/s

127% performance improvement between old and new code.

Harddisk, raw speed:

# dd if=/dev/ada0 bs=1m
137.63MB/s

Harddisk, software AES-XTS, 4kB sector:

# dd if=/dev/ada0.eli bs=1m
47.83MB/s (34% of raw disk speed)

Harddisk, old AES-NI AES-XTS, 4kB sector:

# dd if=/dev/ada0.eli bs=1m
68.33MB/s (49% of raw disk speed)

Harddisk, new AES-NI AES-XTS, 4kB sector:

# dd if=/dev/ada0.eli bs=1m
108.35MB/s (78% of raw disk speed)

58% performance improvement between old and new code.

As a side-note, GELI with AES-NI using AES-CBC can achive native disk speed.

MFC after: 3 days

12 years agoFix the manual section number for a cross-reference to open(2) and sort it.
pluknet [Thu, 27 Oct 2011 13:17:42 +0000 (13:17 +0000)]
Fix the manual section number for a cross-reference to open(2) and sort it.

Reviewed by: ed
MFC after: 3 days

12 years agoAdjust the debugger options slightly. This should help me do the right
kensmith [Thu, 27 Oct 2011 13:07:49 +0000 (13:07 +0000)]
Adjust the debugger options slightly.  This should help me do the right
thing when changing the debugging options as part of head becoming a new
stable branch.  It may also help people who for one reason or another want
to run head but don't want it slowed down by the debugging support.

Reviewed by: kib

12 years agoRemove the long reprecated ``/stand/sysinstall'' from the init_path.
pluknet [Thu, 27 Oct 2011 10:25:11 +0000 (10:25 +0000)]
Remove the long reprecated ``/stand/sysinstall'' from the init_path.

It can be put back using the INIT_PATH config option or init_path
loader variable, if still needed (which I doubt).

MFC after: 1 week

12 years agoCheck the return value of BUS_SETUP_INTR()
kevlo [Thu, 27 Oct 2011 10:21:40 +0000 (10:21 +0000)]
Check the return value of BUS_SETUP_INTR()

Reviewed by: imp

12 years agoUtilize new IF_DEQUEUE_ALL(ifq, m) macro in pfsyncintr() to reduce
glebius [Thu, 27 Oct 2011 09:47:00 +0000 (09:47 +0000)]
Utilize new IF_DEQUEUE_ALL(ifq, m) macro in pfsyncintr() to reduce
contention on ifqueue lock.

12 years agoAdd macro IF_DEQUEUE_ALL(ifq, m), that takes the entire mbuf chain off
glebius [Thu, 27 Oct 2011 09:45:12 +0000 (09:45 +0000)]
Add macro IF_DEQUEUE_ALL(ifq, m), that takes the entire mbuf chain off
the queue. It can be utilized in queue processing to avoid multiple
locking/unlocking.

12 years ago- If KDB & NETGRAPH_DEBUG are on, print traces on discovered failed
glebius [Thu, 27 Oct 2011 09:43:25 +0000 (09:43 +0000)]
- If KDB & NETGRAPH_DEBUG are on, print traces on discovered failed
  invariants.
- Reduce tautology in NETGRAPH_DEBUG output.

12 years agoFix a memory leak in tzload().
trociny [Thu, 27 Oct 2011 08:44:07 +0000 (08:44 +0000)]
Fix a memory leak in tzload().

Reported by: valgrind
Reviewed by: kib
MFC after: 3 days

12 years agocontigmalloc(9) and contigfree(9) are now implemented in terms of other
alc [Thu, 27 Oct 2011 02:52:24 +0000 (02:52 +0000)]
contigmalloc(9) and contigfree(9) are now implemented in terms of other
more general VM system interfaces.  So, their implementation can now
reside in kern_malloc.c alongside the other functions that are declared
in malloc.h.

12 years agoSRAM offset 0x0C04 is used by driver to inform the IPMI/ASF firmware
yongari [Wed, 26 Oct 2011 23:52:02 +0000 (23:52 +0000)]
SRAM offset 0x0C04 is used by driver to inform the IPMI/ASF firmware
about the various driver events like load, unload, reset, suspend,
restart, and ioctl operations.
Define driver's event rather than using hard-coded values.  We don't
still send suspend/resume event to firmware.

Previously bge(4) used BGE_SDI_STATUS to send events. Because driver
has to access firmware mail box to inform current state, using
BGE_SDI_STATUS register was wrong. The end result was the same as
BGE_SDI_STATUS is 0x0C04.

No functional changes.

12 years agoOffset 0x6810 is RX-RISC event register. Rename BGE_CPU_EVENT with
yongari [Wed, 26 Oct 2011 23:22:32 +0000 (23:22 +0000)]
Offset 0x6810 is RX-RISC event register. Rename BGE_CPU_EVENT with
BGE_RX_CPU_EVENT for readability.
Additionally define BGE_TX_CPU_EVENT for TX-RSIC event register(BCM570[0-4] only).

12 years agoMove the debugging support to its own section. This matches what is
kensmith [Wed, 26 Oct 2011 22:28:28 +0000 (22:28 +0000)]
Move the debugging support to its own section.  This matches what is
in the other architectures' GENERIC and makes removing it at the point
we're creating a new stable branch a bit easier.

Discussed with: marcel

12 years agoClarify disks/volumes above 2TiB support in geom_raid:
mav [Wed, 26 Oct 2011 21:50:10 +0000 (21:50 +0000)]
Clarify disks/volumes above 2TiB support in geom_raid:
 - add support for volumes above 2TiB with Promise metadata format;
 - enforse and document other limitations:
   - Intel and Promise metadata formats do not support disks above 2TiB;
   - NVIDIA metadata format does not support volumes above 2TiB.

Sponsored by: iXsystems, Inc.
MFC after: 2 weeks

12 years agoDefine MAC address mail box and use it instead of using
yongari [Wed, 26 Oct 2011 21:11:40 +0000 (21:11 +0000)]
Define MAC address mail box and use it instead of using
hard-coded value.

12 years agoRename definition of BGE_SOFTWARE_GENCOMM_* to more readable ones.
yongari [Wed, 26 Oct 2011 21:05:45 +0000 (21:05 +0000)]
Rename definition of BGE_SOFTWARE_GENCOMM_* to more readable ones.
The origin of GENCOMM seems to come from Alteon Tigon Host/NIC
interface definition where it defines general communications region
which is active when firmware is loaded and running.  This region
was used in communication between the host and processor internal
to the Tigon chip.
Broadcom data sheet also defines the region as 'Software Gencomm'
in NetXtreme memory map but lacks detailed description of its
interface so it was hard to know which ones are used for which
interface.
This change shall slightly enhance readability.

No functional changes.

12 years agoAdd libkern/ucmpdi2.c
cognet [Wed, 26 Oct 2011 19:07:36 +0000 (19:07 +0000)]
Add libkern/ucmpdi2.c

12 years agoBCM5719 cannot handle DMA requests for DMA segments that have
yongari [Wed, 26 Oct 2011 18:37:02 +0000 (18:37 +0000)]
BCM5719 cannot handle DMA requests for DMA segments that have
larger than 4KB in size.  However the maximum DMA segment size
created in DMA tag is 4KB, so we wouldn't encounter the issue here.
Just record this issue such that let developers not to create a DMA
segment that is larger than 4KB for BCM5719. It's possible to split
a DMA segment into multiple smaller ones in run time but I believe
it's not worth to implement that.

12 years agoBroadcom says BCM5755 or higher and BCM5906 have short DMA bug.
yongari [Wed, 26 Oct 2011 18:27:01 +0000 (18:27 +0000)]
Broadcom says BCM5755 or higher and BCM5906 have short DMA bug.
Apply workaround to these controllers.

12 years agoIt is known that all Broadcom controllers have 4GB boundary DMA
yongari [Wed, 26 Oct 2011 18:19:50 +0000 (18:19 +0000)]
It is known that all Broadcom controllers have 4GB boundary DMA
bug.  Apply workaround to all controllers.

12 years agoMake CPMU handle GPHY power down control on controllers that have
yongari [Wed, 26 Oct 2011 18:05:46 +0000 (18:05 +0000)]
Make CPMU handle GPHY power down control on controllers that have
CPMU capability.

12 years agoFix suspend and resume of FULL and HIGH speed USB devices
hselasky [Wed, 26 Oct 2011 17:43:27 +0000 (17:43 +0000)]
Fix suspend and resume of FULL and HIGH speed USB devices
in the generic XHCI driver. There appears to be some minor
logic missing for this feature to work.

MFC after: 3 days

12 years agoRevert r226665 untill the issues with this change have been resolved.
rmh [Wed, 26 Oct 2011 17:26:38 +0000 (17:26 +0000)]
Revert r226665 untill the issues with this change have been resolved.

Approved by: kib (mentor)

12 years agoBring over the new aggregate statistics from the 11n branch.
adrian [Wed, 26 Oct 2011 16:11:49 +0000 (16:11 +0000)]
Bring over the new aggregate statistics from the 11n branch.

Some of these values are currently updated by the driver (the 11n
RX related statistics) so they are immediately useful.

12 years agoAs a prelude to bringing over the 11n work, include some extra statistics fields.
adrian [Wed, 26 Oct 2011 16:09:05 +0000 (16:09 +0000)]
As a prelude to bringing over the 11n work, include some extra statistics fields.

12 years ago- Fixup filenames in a few more places where they are used.
jhb [Wed, 26 Oct 2011 15:17:42 +0000 (15:17 +0000)]
- Fixup filenames in a few more places where they are used.
- Some whitespace fixes.

12 years agoFix typo in timer_getoverrun cross-reference.
pluknet [Wed, 26 Oct 2011 14:26:10 +0000 (14:26 +0000)]
Fix typo in timer_getoverrun cross-reference.

MFC after: 3 days

12 years agoAttempt to fix build logic for gensnmptree.
ed [Wed, 26 Oct 2011 07:49:47 +0000 (07:49 +0000)]
Attempt to fix build logic for gensnmptree.

There are two problems with the existing logic. It builds gensnmptree
on <700018, even if WITHOUT_BSNMP is set, but more importantly, we must
not forget to build gensnmptree on systems that have originally been
built without. This causes a buildworld on those systems to fail.

MFC after: 1 week

12 years ago- Add support for a "!" character in regex matching in devd(8). It inverts
hrs [Wed, 26 Oct 2011 02:11:28 +0000 (02:11 +0000)]
- Add support for a "!" character in regex matching in devd(8).  It inverts
  the logic (true/false) of the matching.

- Add "!usbus[0-9]+" to IFNET ATTACH notification handler in the default
  devd.conf to prevent rc.d/netif from running when usbus[0-9]+ is attached.

Reviewed by: imp

12 years agoFix breakage in tzsetup:
edwin [Wed, 26 Oct 2011 01:56:22 +0000 (01:56 +0000)]
Fix breakage in tzsetup:
MD      +4700+02850     Europe/Chisinau most locations

12 years agoFix long standing bge_sysctl_debug_info() issues.
yongari [Wed, 26 Oct 2011 01:03:53 +0000 (01:03 +0000)]
Fix long standing bge_sysctl_debug_info() issues.
 o Protect bge(4) status block access and register dump with driver lock.
 o Add missing bus_dmamap_sync() before dumping status block.
 o Use minimum status block size, 32 bytes, for status block dump on most
   controllers except BCM5700 AX/BX.
While I'm here, make the handler show 5717 Plus in hardware flags.

12 years agoAdd in some more 11n related HAL methods.
adrian [Tue, 25 Oct 2011 23:33:54 +0000 (23:33 +0000)]
Add in some more 11n related HAL methods.

12 years agoThe AR5413 datasheet specifies that AR_TxIntrReq should be set consistently
adrian [Tue, 25 Oct 2011 23:28:16 +0000 (23:28 +0000)]
The AR5413 datasheet specifies that AR_TxIntrReq should be set consistently
for all frames, so do so.

12 years agoAdd some fixes to the 11n aggregation HAL calls:
adrian [Tue, 25 Oct 2011 23:24:05 +0000 (23:24 +0000)]
Add some fixes to the 11n aggregation HAL calls:

* preserve AR_TxIntrReq on every descriptor in an aggregate chain,
  not just the first descriptor;
* always blank out the descriptor in ar5416ChainTxDesc() when forming
  aggregates - the way I'm using this in the 11n branch is to first
  chain aggregates together, then use the other HAL calls to fill in
  the details.

12 years agoCorrect/complete a partially-disabled TX interrupt mitigation configuration.
adrian [Tue, 25 Oct 2011 23:17:53 +0000 (23:17 +0000)]
Correct/complete a partially-disabled TX interrupt mitigation configuration.

Although a previous commit disabled TX interrupt mitigation handling and
configuration, the mask register bits weren't setup correctly.

12 years agoFix an incorrect flag.
adrian [Tue, 25 Oct 2011 23:14:40 +0000 (23:14 +0000)]
Fix an incorrect flag.

Obtained from: Atheros

12 years agoSave and restore the association ID across interface resets.
adrian [Tue, 25 Oct 2011 23:13:36 +0000 (23:13 +0000)]
Save and restore the association ID across interface resets.

Obtained from: Atheros
MFC after: 1 week

12 years agoAdd some 11n bits from the if_ath_tx 11n branch:
adrian [Tue, 25 Oct 2011 23:09:07 +0000 (23:09 +0000)]
Add some 11n bits from the if_ath_tx 11n branch:

* Add the TID field in the TX status descriptor;
* Add in the 11n first/middle/last functions for fiddling
  with the descriptors. These are from the Linux and the
  reference driver, but I'm not (currently) using them.
* Add further AR_ISR_S5 register definitions.

Obtained from: Linux ath9k, Atheros

12 years agoReduce the NF wait timeout. When doing heavy 11n RX loads, this can actually
adrian [Tue, 25 Oct 2011 23:01:53 +0000 (23:01 +0000)]
Reduce the NF wait timeout. When doing heavy 11n RX loads, this can actually
interfere with traffic, as the NF load can take quite a while and poking the
AGC every 10uS is just a bit silly.

Instead, just leave the baseband NF calibration where it is and just read it
back next time a longcal interval happens.

12 years agoMFV of r226750, tzdata2011m
edwin [Tue, 25 Oct 2011 21:53:43 +0000 (21:53 +0000)]
MFV of r226750, tzdata2011m

Europe:
- Pridnestrovian Moldavian Republic (PMR, also known as
  "Pridnestrovie") has abolished seasonal clock change (no transition
  to the Winter Time).
- The recent change to the Ukranian time zone (Europe/Kiev) to
  introduce permanent daylight saving time (similar to Russia) was
  reverted.

South America:
- Bahia: The President signed a decree that includes Bahia in summer
  time.

zone.tab:
- Add Europe/Tiraspol Pridnestrovie

Obtained from:  ftp://ftp.iana.org/tz/releases/

12 years agoWhitespace nits.
yongari [Tue, 25 Oct 2011 20:45:14 +0000 (20:45 +0000)]
Whitespace nits.

12 years ago- Add a new header for the x86 boot code that defines various structures
jhb [Tue, 25 Oct 2011 19:54:06 +0000 (19:54 +0000)]
- Add a new header for the x86 boot code that defines various structures
  and constants related to the BIOS Enhanced Disk Drive Specification.
- Use this header instead of magic numbers and various duplicate structure
  definitions for doing I/O.
- Use an actual structure for the request to fetch drive parameters in
  drvsize() rather than a gross hack of a char array with some magic
  size.  While here, change drvsize() to only pass the 1.1 version of
  the structure and not request device path information.  If we want
  device path information you have to set the length of the device
  path information as an input (along with probably checking the actual
  EDD version to see which size one should use as the device path
  information is variable-length).  This fixes data smashing problems
  from passing an EDD 3 structure to BIOSes supporting EDD 4.

Reviewed by: avg
Tested by: Dennis Koegel  dk neveragain.de
MFC after: 1 week

12 years agoConsolidate duplicate definitions of V86_CY() and V86_ZR() which check for
jhb [Tue, 25 Oct 2011 19:45:12 +0000 (19:45 +0000)]
Consolidate duplicate definitions of V86_CY() and V86_ZR() which check for
the carry and zero flags being set, respectively, in <btxv86.h> and use
them throughout the x86 boot code.

12 years agoaxe(4) got VLAN over-sized frame support.
yongari [Tue, 25 Oct 2011 19:10:10 +0000 (19:10 +0000)]
axe(4) got VLAN over-sized frame support.
Add axe(4) to the list of interfaces that support VLAN over-sized frame.

12 years agoAX88178/AX88772A/AX88772B supports VLAN over-sized frame.
yongari [Tue, 25 Oct 2011 19:04:56 +0000 (19:04 +0000)]
AX88178/AX88772A/AX88772B supports VLAN over-sized frame.
Xr vlan.

12 years agoImplement TX/RX checksum offloading support for ASIX AX88772B
yongari [Tue, 25 Oct 2011 18:36:18 +0000 (18:36 +0000)]
Implement TX/RX checksum offloading support for ASIX AX88772B
controller.

AX88772B data sheet does not show detailed information about
checksum offloading related things. It seems the controller has
lots of options to support checksum offloading but I failed to
understand why this feature requires so much complex controller
configuration and status bits.
One of major difference between AX88772B and its predecessor is
AX88772B uses a new RX header format when RX checksum offloading is
enabled.  It also requires the received length of a frame should be
multiple of 4.  Controller will pad necessary bytes to make the
length of received frame to be multiple of 4.  It is driver's
responsibility to offset this pad bytes.
Note, AX88772B could be configured to get partial checksum value in
in RX header. This mode uses different RX header format and
currently we don't use that fature.

This change makes axe(4) use driver specific MII attach handler to
override uether(9)'s default MII attach and announce flow-control
capability for AX88178/AX88772A/AX88772B to PHY drivers.  It seems
original AX88772 also supports flow-control but I didn't enable it
due to lack of test/access to the controller.  The flow-control
threshold parameter is loaded from EEPROM and there is no way to
override this value without reprogramming EEPROM. For AX88772B,
TX/RX IP/TCP/UDP checksum offloading is announced to network stack.
IPv6 and PPPoE checksum offloading is also supported by controller
but we have no way to take advantage of these features.
Driver already knows PHY address so make PHY driver know that
information and remove unnecessary PHY address check used in
miibus_readreg/miibus_writereg callbacks.  Also announce AX88178,
AX88772A and AX88772B support VLAN over-sized frame.

While I'm here clean up headers and remove axe_start() in
axe_init() because the link wouldn't be available right after media
change.

12 years agoBuild swapon with WARNS=6.
ed [Tue, 25 Oct 2011 17:10:15 +0000 (17:10 +0000)]
Build swapon with WARNS=6.

Don't use a variable called stat, because it collides with stat(2).

12 years agoProvide an error message and error handling if there are no network
nwhitehorn [Tue, 25 Oct 2011 16:35:48 +0000 (16:35 +0000)]
Provide an error message and error handling if there are no network
interfaces in the system. This is a non-fatal error except when doing a
network installation.

PR: bin/161950
MFC after: 3 days

12 years agoSpeed up vm_page_cache() and vm_page_remove() by checking for a few
alc [Tue, 25 Oct 2011 16:35:08 +0000 (16:35 +0000)]
Speed up vm_page_cache() and vm_page_remove() by checking for a few
common cases that can be handled in constant time.  The insight being
that a page's parent in the vm object's tree is very often its
predecessor or successor in the vm object's ordered memq.

Tested by: jhb
MFC after: 10 days

12 years agoProvide an error message instead of silent failure if no disks are present
nwhitehorn [Tue, 25 Oct 2011 16:30:16 +0000 (16:30 +0000)]
Provide an error message instead of silent failure if no disks are present
in the system.

PR: bin/161950
MFC after: 3 days

12 years agoDon't look for includes in userland directories. There is no need for it
pjd [Tue, 25 Oct 2011 16:22:43 +0000 (16:22 +0000)]
Don't look for includes in userland directories. There is no need for it
and it breaks building the kernel without userland sources.

Reported by: andre, imp
MFC after: 3 days

12 years agoAllow upper layers to discover than BIO_DELETE and/or BIO_FLUSH is not
pjd [Tue, 25 Oct 2011 14:07:17 +0000 (14:07 +0000)]
Allow upper layers to discover than BIO_DELETE and/or BIO_FLUSH is not
supported by returning EOPNOTSUPP instead of 0 or ENODEV.

MFC after: 3 days

12 years agoImprove style a bit.
pjd [Tue, 25 Oct 2011 14:05:39 +0000 (14:05 +0000)]
Improve style a bit.

MFC after: 3 days

12 years agoSimplify disk_alloc().
pjd [Tue, 25 Oct 2011 14:04:59 +0000 (14:04 +0000)]
Simplify disk_alloc().

MFC after: 3 days

12 years agoThe v_data field is a pointer, so set it to NULL, not 0.
pjd [Tue, 25 Oct 2011 14:01:17 +0000 (14:01 +0000)]
The v_data field is a pointer, so set it to NULL, not 0.

MFC after: 3 days

12 years agoAdd support for creating GELI devices with older metadata version for use
pjd [Tue, 25 Oct 2011 13:57:50 +0000 (13:57 +0000)]
Add support for creating GELI devices with older metadata version for use
with older FreeBSD versions:
- Add -V option to 'geli init' to specify version number. If no -V is given
  the most recent version is used.
- If -V is given don't allow to use features not supported by this version.
- Print version in 'geli list' output.
- Update manual page and add table describing which GELI version is
  supported by which FreeBSD version, so one can use it when preparing GELI
  device for older FreeBSD version.

Inspired by: Garrett Cooper <yanegomi@gmail.com>
MFC after: 3 days

12 years agoFix typo in copyright notice introduced in r226724
mm [Tue, 25 Oct 2011 13:52:38 +0000 (13:52 +0000)]
Fix typo in copyright notice introduced in r226724
(missing character in e-mail adress)

Reported by: pjd
MFC after: 3 days

12 years agoRevert r226726. The line was not duplicated.
pjd [Tue, 25 Oct 2011 13:49:48 +0000 (13:49 +0000)]
Revert r226726. The line was not duplicated.

Spotted by: pluknet
MFC after: 3 days

12 years agoWhen decoding metadata, check magic string, so we know this is not GELI device
pjd [Tue, 25 Oct 2011 13:44:23 +0000 (13:44 +0000)]
When decoding metadata, check magic string, so we know this is not GELI device
before we check its version. We don't want to report that some garbage is
unsupported version if this is not even GELI provider.

MFC after: 3 days

12 years agoFix resize regressions tests - we need to destroy BSDlabel before we can
pjd [Tue, 25 Oct 2011 13:41:12 +0000 (13:41 +0000)]
Fix resize regressions tests - we need to destroy BSDlabel before we can
create GPT.

MFC after: 3 days

12 years agoPrefer G_ELI_VERSION_* defines for version numbers over plain digits.
pjd [Tue, 25 Oct 2011 13:09:22 +0000 (13:09 +0000)]
Prefer G_ELI_VERSION_* defines for version numbers over plain digits.

MFC after: 3 days

12 years agoFit lines into 80 chars.
pjd [Tue, 25 Oct 2011 13:08:03 +0000 (13:08 +0000)]
Fit lines into 80 chars.

MFC after: 3 days

12 years agoRemove duplicated line.
pjd [Tue, 25 Oct 2011 12:26:19 +0000 (12:26 +0000)]
Remove duplicated line.

MFC after: 3 days

12 years agoProtect NIS server with madvise(2) since this daemon is required
glebius [Tue, 25 Oct 2011 10:33:26 +0000 (10:33 +0000)]
Protect NIS server with madvise(2) since this daemon is required
for succesful authentication of users.

12 years agoUpdate copyright information in several ZFS files, as the clause 3.3
mm [Tue, 25 Oct 2011 08:35:30 +0000 (08:35 +0000)]
Update copyright information in several ZFS files, as the clause 3.3
of the CDDL licence explicitly requires every Contributor to add
a copyright notice.

This also reflects the copyright notices for the changes recently
added by Illumos.

MFC after: 3 days

12 years agoAdd 'geli version' subcommand, which will print GELI metadata version of each
pjd [Tue, 25 Oct 2011 08:03:51 +0000 (08:03 +0000)]
Add 'geli version' subcommand, which will print GELI metadata version of each
given GEOM provider or if not providers are given it will print versions
supported by userland geli(8) utility and by ELI GEOM class.

MFC after: 3 days

12 years agoWhen we detect GELI metadata version that is newer than the highest we
pjd [Tue, 25 Oct 2011 07:56:27 +0000 (07:56 +0000)]
When we detect GELI metadata version that is newer than the highest we
support, inform the user about that instead of 'MD5 hash mismatch'.

Suggested by: Garrett Cooper <yanegomi@gmail.com>
MFC after: 3 days

12 years agoWhen metadata is at newer version than the highest supported, return
pjd [Tue, 25 Oct 2011 07:48:53 +0000 (07:48 +0000)]
When metadata is at newer version than the highest supported, return
EOPNOTSUPP when decoding.

MFC after: 3 days

12 years agoSimplify eli_resize() function.
pjd [Tue, 25 Oct 2011 07:44:10 +0000 (07:44 +0000)]
Simplify eli_resize() function.

MFC after: 3 days

12 years agoSimplify eli_dump() function and allow to dump metadata stored in backup file.
pjd [Tue, 25 Oct 2011 07:37:02 +0000 (07:37 +0000)]
Simplify eli_dump() function and allow to dump metadata stored in backup file.

MFC after: 3 days