28059 Commits

Author SHA1 Message Date
emaste
3a7cd99956 MFC r263826: Update EFI framebuffer handoff from loader
Sponsored by:	The FreeBSD Foundation
2014-09-02 18:54:40 +00:00
jfv
14d8fe4506 MFC of 270755, 270772, 270773, 270775, 270799, 270806, 270807, 270820
Enable the build of the Intel XL710 drivers, and fixes for that build.
2014-09-01 07:54:30 +00:00
trasz
0ca40bff6c MFC r270282:
Use proper include paths in kernel iSCSI code.

Sponsored by:	The FreeBSD Foundation
2014-08-31 20:47:10 +00:00
trasz
bd6edcc077 MFC r270279:
Make the iSCSI stack use __FBSDID() properly.

Sponsored by:	The FreeBSD Foundation
2014-08-31 20:21:08 +00:00
kevlo
541ca9866f MFC r270643:
Fix typo: s/mac_rev/mac_ver/

Submitted by:	Stefan Sperling <stsp at openbsd dot org>
2014-08-30 14:24:20 +00:00
delphij
2a1fdab727 MFC r270384:
Update hptnr(4) driver to version 1.0.1 supplied by the vendor.

v1.0.1 2014-8-19
  * Do not retry the command and reset the disk when failed to enable or
    disable spin up feature.
  * Fix up a bug that disk failed to probe if driver failed to access the
    10th LBA.
  * Fix a bug that request timeout but it has been completed in certain
    cases.
  * Support smartmontool for R750.

Many thanks to HighPoint for continued support of FreeBSD!
2014-08-29 13:06:30 +00:00
gjb
3c9f55fa51 MFC r269608:
Add device ID for the Chicony USB 2.0 HD UVC Webcam
  found on the Asus X550LA.

Sponsored by:	The FreeBSD Foundation
2014-08-29 01:40:49 +00:00
bryanv
7cea24544f MFC r267632:
Fix GCC compile warning: Variable(s) can be used uninitialized.

PR:		193076
2014-08-28 04:20:24 +00:00
markj
e3261a6859 MFC r261491 (by ambrisko):
Add a tunable "hw.mfi.mrsas_enable" to allow mfi(4) to drop priority and
allow mrsas(4) from LSI to attach to newer LSI cards that are support by
mrsas(4).  If mrsas(4) is not loaded into the system at boot then mfi(4)
will always attach.  If a modified mrsas(4) is loaded in the system.  That
modification is return "-30" in it's probe since that is between
BUS_PROBE_DEFAULT and BUS_PROBE_LOW_PRIORITY.

This option is controller by a new probe flag "MFI_FLAGS_MRSAS" in mfi_ident
that denotes cards that should work with mrsas(4).  New entries that should
have this option.

This is the first step to get mrsas(4) checked into FreeBSD and to avoid
collision with people that use mrsas(4) from LSI.  Since mfi(4) takes
priority, then mrsas(4) users need to rebuild GENERIC.  Using the
.disabled="1" method doesn't work since that blocks attaching and the
probe gave it to mfi(4).

MFC r267451 (by delphij):
Correct variable for loader tunable variable hw.mfi.mrsas_enable.
2014-08-27 21:11:19 +00:00
hselasky
011ca26231 MFC r270134:
Use the "bSubslotSize" and "bSubFrameSize" fields to obtain the actual
sample size. According to the USB audio frame format specification
from USB.org, the value in the "bBitResolution" field can be less than
the actual sample size, depending on the actual hardware, and should
not be used for this computation.

PR:		192755
2014-08-27 14:22:40 +00:00
jfv
c988cfb907 MFC of the Intel Base driver for the Intel XL710 Ethernet Controller Family
- It was decided to change the driver name to if_ixl for FreeBSD
	- This release adds the VF Driver to the tree, it can be built into
	  the kernel or as the if_ixlv module
	- The VF driver is independent for the first time, this will be
	  desireable when full SRIOV capability is added to the OS.

Submitted by:	jack.vogel@intel.com and eric.joyner@intel.com
2014-08-25 22:04:29 +00:00
kevlo
6dd9cb67cf MFC r270192:
If eapol packets are sent at the lowest rate, key negotiation will
become more reliable.

Submitted by:	Akinori Furukoshi <moonlightakkiy at yahoo dot ca>
2014-08-25 03:02:38 +00:00
kevlo
6cf3eca6e9 MFC r270165,r270191:
- Sort ASUS section and add USB device ID of ASUS USB-AC51.
- Add the D-Link DWA-125 rev D1.
2014-08-25 02:59:58 +00:00
bryanv
9bce6fcf54 MFC r270063 (vtnet)
The vtnet changes were not originally merged in r270252 since
r268480 and r268481 had not been MFC'ed.
2014-08-24 19:31:26 +00:00
bryanv
df42e806cb MFC r268481:
Rework when the Tx queue completion interrupt is enabled

  The Tx interrupt is now kept disabled in the common case, only
  enabled when the number of free descriptors in the queue falls
  below a threshold. Transmitted frames are cleared from the VQ
  before subsequent transmit, or in the watchdog timer.

  This was a very big performance improvement for an experimental
  Netmap bhyve backend.
2014-08-22 15:12:20 +00:00
np
77ec212e10 MFC r270253:
Change netmap's global lock to sx instead of a mutex.
2014-08-21 19:58:46 +00:00
np
9e6f3aa5f7 MFC r266571, r266757, r268536, r269076, r269364, r269366, r269411,
r269413, r269428, r269440, r269537, r269644, r269731, and the cxgbe
portion of r270063.

r266571:
cxgbe(4): Remove stray if_up from the code that creates the tracing ifnet.

r266757:
cxgbe(4): netmap support for Terminator 5 (T5) based 10G/40G cards.
Netmap gets its own hardware-assisted virtual interface and won't take
over or disrupt the "normal" interface in any way.  You can use both
simultaneously.

For kernels with DEV_NETMAP, cxgbe(4) carves out an ncxl<N> interface
(note the 'n' prefix) in the hardware to accompany each cxl<N>
interface.  These two ifnet's per port share the same wire but really
are separate interfaces in the hardware and software.  Each gets its own
L2 MAC addresses (unicast and multicast), MTU, checksum caps, etc.  You
should run netmap on the 'n' interfaces only, that's what they are for.

With this, pkt-gen is able to transmit > 45Mpps out of a single 40G port
of a T580 card.  2 port tx is at ~56Mpps total (28M + 28M) as of now.
Single port receive is at 33Mpps but this is very much a work in
progress.  I expect it to be closer to 40Mpps once done.  In any case
the current effort can already saturate multiple 10G ports of a T5 card
at the smallest legal packet size.  T4 gear is totally untested.

trantor:~# ./pkt-gen -i ncxl0 -f tx -D 00:07:43🆎cd:ef
881.952141 main [1621] interface is ncxl0
881.952250 extract_ip_range [275] range is 10.0.0.1:0 to 10.0.0.1:0
881.952253 extract_ip_range [275] range is 10.1.0.1:0 to 10.1.0.1:0
881.962540 main [1804] mapped 334980KB at 0x801dff000
Sending on netmap:ncxl0: 4 queues, 1 threads and 1 cpus.
10.0.0.1 -> 10.1.0.1 (00:00:00:00:00:00 -> 00:07:43🆎cd:ef)
881.962562 main [1882] Sending 512 packets every  0.000000000 s
881.962563 main [1884] Wait 2 secs for phy reset
884.088516 main [1886] Ready...
884.088535 nm_open [457] overriding ifname ncxl0 ringid 0x0 flags 0x1
884.088607 sender_body [996] start
884.093246 sender_body [1064] drop copy
885.090435 main_thread [1418] 45206353 pps (45289533 pkts in 1001840 usec)
886.091600 main_thread [1418] 45322792 pps (45375593 pkts in 1001165 usec)
887.092435 main_thread [1418] 45313992 pps (45351784 pkts in 1000834 usec)
888.094434 main_thread [1418] 45315765 pps (45406397 pkts in 1002000 usec)
889.095434 main_thread [1418] 45333218 pps (45378551 pkts in 1001000 usec)
890.097434 main_thread [1418] 45315247 pps (45405877 pkts in 1002000 usec)
891.099434 main_thread [1418] 45326515 pps (45417168 pkts in 1002000 usec)
892.101434 main_thread [1418] 45333039 pps (45423705 pkts in 1002000 usec)
893.103434 main_thread [1418] 45324105 pps (45414708 pkts in 1001999 usec)
894.105434 main_thread [1418] 45318042 pps (45408723 pkts in 1002001 usec)
895.106434 main_thread [1418] 45332430 pps (45377762 pkts in 1001000 usec)
896.107434 main_thread [1418] 45338072 pps (45383410 pkts in 1001000 usec)
...

r268536:
cxgbe(4): Add an iSCSI softc to the adapter structure.

r269076:
Some hooks in cxgbe(4) for the offloaded iSCSI driver.

r269364:
Improve compliance with style.Makefile(5).

r269366:
List one file per line in the Makefiles.  This makes it easier to read
diffs when a file is added or removed.

r269411:
cxgbe(4): minor optimizations in ingress queue processing.

Reorganize struct sge_iq.  Make the iq entry size a compile time
constant.  While here, eliminate RX_FL_ESIZE and use EQ_ESIZE directly.

r269413:
cxgbe(4):  Fix an off by one error when looking for the BAR2 doorbell
address of an egress queue.

r269428:
cxgbe(4):  some optimizations in freelist handling.

r269440:
cxgbe(4): Remove an unused version of t4_enable_vi.

r269537:
cxgbe(4): Do not run any sleepable code in the SIOCSIFFLAGS handler when
IFF_PROMISC or IFF_ALLMULTI is being flipped.  bpf(4) holds its global
mutex around ifpromisc in at least the bpf_dtor path.

r269644:
cxgbe(4):  Let caller specify whether it's ok to sleep in
t4_sched_config and t4_sched_params.

r269731:
cxgbe(4): Do not poke T4-only registers on a T5 (and vice versa).

Relnotes:	Yes (native netmap support for Chelsio T4/T5 cards)
2014-08-21 19:54:02 +00:00
ian
b7f4763aaf MFC r260401
Remove aicasm as a build dependency.  It made sense when the ahc and ahd
  drivers and their firmware were under active development, but those days
  have passed.  The firmware now exists in pre-compiled form, no longer
  dependent on it's sources or on aicasm.  If you wish to rebuild the
  firmware from source, the glue still exists under the 'make firmware'
  target in sys/modules/aic7xxx.

  This also fixes the problem introduced with r257777 et al with building
  kernels the old fashioned way in sys/$arch/compile/$CONFIG when the
  ahc/ahd drivers were included.
2014-08-21 17:18:21 +00:00
ian
febf3f5203 MFC r257637, r257730, r257734, r257777, r257825, r257838, r257873:
Changes to how the aicasm tool is built.  This series of changes results
in the aicasm tool being built as part of the tools stages of world and
kernel builds.

Most of these changes will ultimately be undone when r260401 is MFC'd,
but it will leave in place the new kernel-build-tool machinery (KTMAKE
stuff) in case a new special kernel tool ever comes along.
2014-08-21 14:56:57 +00:00
bryanv
1f2df2de02 MFC r268480:
Add accessor to get the number of free descriptors in the virtqueue
2014-08-21 13:27:05 +00:00
dumbbell
9ac8060e57 vt(4): Colors are indexed against a console palette, not a VGA palette
Rename vt_generate_vga_palette() to vt_generate_cons_palette() and
change it to build a palette where the color index is the same than in
terminal escape codes, not the VGA index. That's what TCHAR_CREATE()
uses and passes to vt(4).

The main differences between both orders are:
    o  Blue and red are swapped (1 <-> 4)
    o  Yellow and cyan are swapped (3 <-> 6)

The problem remained unnoticed, because the RGB bit indexes passed to
vt_generate_vga_palette() were reversed. This inversion was cancelled
by the colors inversions in the generated palette. For instance, red
(0xff0000) and blue (0x0000ff) have bytes in opposite order, but were
swapped in the palette. But after changing the value of blue (see last
paragraph), the modified color was in fact the red one.

While here, tune the palette to better match console colors and improve
the readability (especially the dark blue).

This is an MFC of r269783 and r269791.
2014-08-21 10:18:42 +00:00
luigi
223d76dc50 MFC 270063: update of netmap code
(vtnet and cxgbe not merged yet because we need some other mfc first)
2014-08-20 23:34:36 +00:00
slm
b63e85f63f MFC r269314 and r269316
r269314:
Bring in LSI's phase16 - phase18 changes
* Implements Start Stop Unit for SATA direct-attach devices in IR mode to avoid
  data corruption.
* Use CAM_DEV_NOT_THERE instead of CAM_SEL_TIMEOUT and CAM_TID_INVALID

r269316:
Bring in LSI's phase19 changes
* Removed unused mpssas_discovery_timeout function.
* Don't alter mapping boundaries if not raid firmware.
* Check free_busaddr instead of post_busaddr (diff minimisation really)

Approved by:	ken (co-mentor) and smh
2014-08-20 23:09:27 +00:00
loos
5bf7922115 MFC r266923:
Ignore IIC_ENOADDR from iicbus_reset() as it only means we have a
  master-only controller.

  This fixes the iic bus scan with i2c(8) (on supported controllers).

  Tested with gpioiic(4).

MFC r267009:

  Remove the unnecessary i2c slave address assignment.

  The ti_i2c controller only works in the master mode and the i2c address
  passed on iicbus_reset() is used to set the controller slave address when
  operating as an i2c slave (which isn't currently supported).

  When talking to a slave, the slave address is correctly provided to
  ti_i2c_tranfer().
2014-08-20 19:12:19 +00:00
loos
86cfba48f8 MFC r266922:
Add a bounds verification to the SCL and SDA pin values.

  At attach, print the SCL and SDA pin numbers.

  Remove a stray blank line.

  Remove the GPIOBUS locking from gpioiic_reset(), it is already called with
  this lock held.  This fixes a crash when you try to scan the iicbus with
  i2c(8).
2014-08-20 17:39:53 +00:00
luigi
b2918a5219 MFC 259907 (dates back to december)
use the correct netmap <-> nic slot mapping on the transmit ring for 'lem'.
This bug would manifest only in netmap mode and on packets transmitted after
a NIC reset while netmap mode is active.
2014-08-20 17:33:32 +00:00
dumbbell
7daa04d352 vt(4): Add vtbuf_dirty*_locked() to lock vtbuf once, not twice
In several functions, vtbuf_putchar() in particular, the lock on vtbuf
is acquired twice:
    1. once by the said functions;
    2. once in vtbuf_dirty().

Now, vtbuf_dirty_locked() and vtbuf_dirty_cell_locked() allow to
acquire that lock only once.

This improves the input speed of vt(4). To measure the gain, a
50,000-lines file was displayed on the console using cat(1). The time
taken by cat(1) is reported below:
    o  On amd64, with vt_vga:
        - before: 1.0"
        - after:  0.5"
    o  On sparc64, with creator_vt:
        - before: 13.6"
        - after:  10.5"

This is an MFC of r269780.
2014-08-19 20:53:28 +00:00
royger
b8303841b8 MFC r269814:
blkfront: add support for unmapped IO

Sponsored by:	Citrix Systems R&D
Tested by:	robak
PR:		191173
2014-08-18 08:50:05 +00:00
ian
504042caa3 MFC r269769, r269770:
Use a separate variable for resource id, because 'i' may increment at a
  rate greater than 1 on each iteration.

  Handle various ways that interrupt config data can be malformed by
  warning and assuming more or less reasonable values.
2014-08-17 01:59:54 +00:00
ian
2cc6abb7fb MFC r269594, r269596, r269597, r269598, r269605, r269606:
Set ofwbus and simplebus to attach during BUS_PASS_BUS.

  Define names that drivers can use to adjust their position relative to
  other drivers within a BUS_PASS

  Adjust ofwbus and simplebus to attach at BUS_PASS_ORDER_MIDDLE, so that
  a platform can attach some other bus first if necessary.

  Set the pl310 L2 cache driver to attach during the middle of BUS_PASS_CPU.

  Attach arm generic interrupt and timer drivers in the middle of
  BUS_PASS_INTERRUPT and BUS_PASS_TIMER, respectively.

  Add an arm option, ARM_DEVICE_MULTIPASS, used to opt-in to multi-pass
  device attachment on arm platforms.  If this is defined, nexus attaches
  early in BUS_PASS_BUS, and other busses and devices attach later, in the
  pass number they are set up for.  Without it defined, nexus attaches in
  BUS_PASS_DEFAULT and thus so does everything else, which is status quo.
2014-08-17 01:28:03 +00:00
bz
fe69d82910 MFC r264601,264646,265766,267918,267919,267920:
Merge if_nf10bmac(4), a driver to support an NetFPGA-10G Embedded
 CPU Ethernet Core.

 The current version operates on a simple PIO based interface connected
 to a NetFPGA-10G port.

 To avoid confusion: this driver operates on a CPU running on the FPGA,
 e.g. BERI/mips, and is not suited for the PCI host interface.

 Adjust the register layout to allow for 64bit registers in the
 future for nf10bmac(4).  Also, add support for and enable RX interrupts.

 Allow switching between 32bit and 64bit bus width data access at compile
 time by setting NF10BMAC_64BIT and using a REGWTYPE #define to set correct
 variable and return value widths.

 Adjust comments to indicate the 32 or 64bit register widths.

Relnotes:	yes
Sponsored by:	DARPA/AFRL
2014-08-16 14:30:46 +00:00
bz
62c1685fc5 MFC r264542:
Use ETHER_ALIGN as argument to m_adj() to offset the beginning of packet
 rather than the magic number 2.

 While here fix a typo in a comment.

 No functional changes.

Sponsored by:	DARPA/AFRL
2014-08-16 14:17:09 +00:00
bz
6f5b0b94bc MFC r266596:
Move the tcp_fields_to_host() and tcp_fields_to_net() (inline)
 functions to the tcp_var.h header file in order to avoid further
 duplication with upcoming commits.

 Reviewed by:	np
2014-08-16 13:50:15 +00:00
bz
10ac38c809 MFC r259886:
Bite the bullet and start removing the first compile time warnings
 by removing unsued file local functions and then unused callees.
 A lot more warnings to resolve but someone had to break the ice.

 X-Comment:	I am not the new maintainer; chime in, it's ours.
2014-08-16 13:23:23 +00:00
smh
5c82afaaa3 Make the ixgbe tunables now match their sysctl counterparts.
Previously the tunables and sysctls had different names for example:
hw.ixgbe.enable_aim => hw.ix.enable_aim

Anyone using ixgbe tunables should ensure they update /boot/loader.conf.

This is a direct commit to stable as the changes to sysctls in head
already fix this issue in a different way.

Sponsored by:	Multiplay
2014-08-14 14:07:05 +00:00
trasz
fd8b4675b0 MFC r269197:
Fix potential double free that could happen after connection error.
2014-08-13 11:11:27 +00:00
hselasky
0f8aee9425 MFC r269567:
Add new USB phone descriptor template for USB device side mode.
2014-08-13 08:21:52 +00:00
hselasky
96ae0a8bad MFC r269565:
Rename driver name a bit to avoid unit number confusion in dmesg.
2014-08-13 07:13:42 +00:00
hselasky
65b6c4f29b MFC r269566:
Fix for deadlock in USB device side mode.
2014-08-13 07:02:23 +00:00
hselasky
1f00e71a08 MFC r269604:
- Implement fast interrupt handler to save CPU usage.
- Cleanup some register reads and writes to use existing register
  access macros.
- Ensure code which only applies to the control endpoint is not run
  for other endpoints in the data transfer path.
2014-08-13 06:59:40 +00:00
hselasky
9320d65920 MFC r257594:
Add description of two EHCI PCI IDs.
2014-08-12 12:22:39 +00:00
ian
6ffbefa108 MFC r269341: Populate disk->d_ident with the sd or mmc card's serial number. 2014-08-11 01:22:10 +00:00
sbruno
d996016e87 MFC r268954
Merge change from upstream linux kernel submitted by OpenBSD:

drm/radeon: fix-up some float to fixed conversion thinkos

Remove #ifdef DUMBBELL_WIP in favor of upstream fix.
2014-08-10 21:45:58 +00:00
joerg
cbab32ad75 Merge r269470:
Avoid a divide-by-zero panic when setting the baudrate to 0.
2014-08-08 14:48:26 +00:00
markj
7e5599557d MFC r268584:
Add a headphone redirection quirk for the Lenovo G580.
2014-08-05 01:03:10 +00:00
kib
db3e0174c3 MFC r269190:
For md(4), posix shm(3) and tmpfs(5), free swap space used by paged in
dirty page, which is written by the process.
2014-08-04 01:14:27 +00:00
hselasky
b766e5260f MFC r269139:
Split the XHCI TRB allocations into smaller parts, so that we don't
end up allocating contiguous busdma buffers above PAGE_SIZE bytes.
2014-08-02 21:01:58 +00:00
np
072ac2f2da MFC r268971 and r269032.
r268971:
Simplify r267600, there's no need to distinguish between allocated and
inlined mbufs.

r269032:
cxgbe(4):  Keep track of the clusters that have to be freed by the
custom free routine (rxb_free) in the driver.  Fail MOD_UNLOAD with
EBUSY if any such cluster has been handed up to the kernel but hasn't
been freed yet.  This prevents a panic later when the cluster finally
needs to be freed but rxb_free is gone from the kernel.
2014-07-31 23:04:41 +00:00
hselasky
4f201ea793 MFC r268929:
Add new device ID.

PR:		191959
2014-07-29 22:05:33 +00:00
hselasky
74a1368a59 MFC r269127:
Fix for division by zero.
2014-07-29 21:59:24 +00:00