Commit Graph

25382 Commits

Author SHA1 Message Date
Hans Petter Selasky
3758c66a4f Remove some extra and not needed space characters.
MFC after:	1 week
2013-01-28 10:52:24 +00:00
Hans Petter Selasky
1ef133b390 Add new USB ID.
Submitted by:	Ramil
PR:		usb/175639
MFC after:	1 week
2013-01-28 07:22:44 +00:00
Colin Percival
1c60b24baa Add a loader tunable "hw.broken_txfifo" which enables a workaround for a
bug in old versions of QEMU (and Xen, and other places using QEMU code).
On those buggy emulated UARTs, the "TX idle" interrupt gets lost; with
this workaround, we spinwait for the TX to happen and then send ourselves
the interrupt.  It's ugly but it works, while minimizing the impact on
the code for the !broken_txfifo case.

MFC after:	2 weeks
2013-01-27 23:33:42 +00:00
Hans Petter Selasky
b7b11d00f6 Fix regression issue after r244500 and r244503:
If a BUSDMA load operation results in a single segment which
is greater than the PAGE_SIZE, the USB computed physical
addresses will not be correct. Make sure that the first
segment is unfolded like the sub-sequent segments are into
USB_PAGE_SIZE big ranges.

Found by:	Alexander Nedotsukov
MFC after:	1 week
2013-01-27 18:01:03 +00:00
Konstantin Belousov
5f451cd59b 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
2013-01-27 09:31:11 +00:00
Ian Lepore
af66b223de Add the chip used in recent GlobalScale Technologies *Plug computers
Approved by:	cognet (mentor)
2013-01-27 00:16:36 +00:00
Pedro F. Giffuni
646a7fea0c Clean some 'svn:executable' properties in the tree.
Submitted by:	Christoph Mallon
MFC after:	3 days
2013-01-26 22:08:21 +00:00
Hans Petter Selasky
5a47db4708 Add new USB quirk.
PR:		usb/175599
Submitted by:	Juan J Lopez
MFC after:	1 week
2013-01-26 13:44:24 +00:00
Navdeep Parhar
d92ed49c94 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
2013-01-26 03:23:28 +00:00
Navdeep Parhar
1cdc889916 Force the 404-BT card (4 x 1G) to use the "uwire" configuration file.
MFC after:	3 days
2013-01-26 03:10:28 +00:00
Navdeep Parhar
dfd1b3a02f 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
2013-01-26 03:01:51 +00:00
Navdeep Parhar
7ca5c8632d 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.
2013-01-26 01:06:27 +00:00
Marius Strobl
2ad1b39662 Mention NetLink controllers in the fallback description, too. 2013-01-26 00:41:54 +00:00
Adrian Chadd
f28a552089 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
2013-01-26 00:14:34 +00:00
Marius Strobl
d7acafa1e3 - 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().
2013-01-26 00:11:39 +00:00
Marius Strobl
7c2fdcac02 - 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
2013-01-25 23:44:02 +00:00
Alexander Motin
abd1548c8d 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
2013-01-24 09:33:43 +00:00
Pyun YongHyeon
0aba72dd91 bge_attach() can fail before attaching mii(4). So make sure to check
bge_miibus before detaching mii(4).
2013-01-24 04:54:53 +00:00
Pyun YongHyeon
3fc5fbfb0b For 57765 class controllers, set low watermark max receive frames to 1. 2013-01-24 02:25:43 +00:00
Luigi Rizzo
091fd0ab54 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.
2013-01-23 05:37:45 +00:00
Luigi Rizzo
ae10d1afee control some debugging messages with dev.netmap.verbose
add infrastracture to adapt to changes in number of queues
and buffers at runtime
2013-01-23 03:51:47 +00:00
Brooks Davis
6f1efb0f4b MFP4 change 219820
Add a missing 0 to the mask for byte0 of C_SIZE.

The previous mask (0xc) worked except that the last 0-1536K of the disk
could not be accessed since we were shifting the (wrong) bits we did
mask off the right edge.
2013-01-22 18:51:14 +00:00
Brooks Davis
9f9f029919 MFP4 change 219819
Remove a duplicate computation of C_SIZE_MULT.  Once is sufficient.

Sponsored by:	DARPA, AFRL
2013-01-22 18:48:45 +00:00
Xin LI
8ec81e3926 - Don't include date and time the driver is built, this is useful for
generating binary diffs.
 - Constify a few strings used in the driver.
 - Style changes to make the driver compile with default clang settings.

Approved by:	HighPoint Technologies
MFC after:	3 days
2013-01-22 05:41:34 +00:00
Oleksandr Tymoshenko
10b7c3bf45 Fix highest voltage detection
Submitted by:	Daisuke Aoyama <aoyama at peach.ne.jp>
Approved by:	imp@
2013-01-21 23:24:16 +00:00
Adrian Chadd
f74d878fda Fix this routine to acutally break out and not set clrdmask if any
of the TIDs are currently marked as "filtered."
2013-01-21 07:50:38 +00:00
Hans Petter Selasky
a9216e0b16 Add new quirk and correct old one.
PR:		usb/175454
MFC after:	1 week
2013-01-21 07:02:41 +00:00
Adrian Chadd
4f25ddbbe6 Migrate CLRDMASK to be a per-node flag, rather than a per-TID flag.
This is easily possible now that the TX is protected by a single
lock, rather than a per-TXQ (and thus per-TID) lock.

Only set CLRDMASK if none of the destinations are filtered.
This likely will need some tuning when it comes time to do UASPD/PS-POLL
TX, however at that point it should be manually set anyway.

Tested:

* AR9280, STA mode

TODO:

* More thorough testing in AP mode
* test other chipsets, just to be safe/sure.
2013-01-21 04:06:04 +00:00
Neel Natu
c458fc1ed4 Merge projects/bhyve to head.
'bhyve' was developed by grehan@ and myself at NetApp (thanks!).

Special thanks to Peter Snyder, Joe Caradonna and Michael Dexter for their
support and encouragement.

Obtained from:	NetApp
2013-01-19 04:18:52 +00:00
Alexander Kabaev
e15f85e71c Do not pretend to have autosense data when no such data is available.
Make umass return an error code if SCSI sense retrieval request
has failed. Make sure scsi_error_action honors SF_NO_RETRY and
SF_NO_RECOVERY in all cases, even if it cannot parse sense bytes.

Reviewed by: hselasky (umass), scottl (cam)
2013-01-19 03:19:39 +00:00
Jung-uk Kim
efcc2a3054 Merge ACPICA 20130117. 2013-01-17 23:56:43 +00:00
Luigi Rizzo
70ca194a4c remove the old memory allocator, not useful anymore 2013-01-17 23:14:17 +00:00
Luigi Rizzo
1dce924d25 add some definition and driver changes in preparation for
two upcoming features:

semi-transparent mode:
    when a device is opened in this mode, the
    user program will be able to mark slots that must be forwarded
    to the "other" side (i.e. from NIC to host stack, or viceversa),
    and the forwarding will occur automatically at the next netmap syscall.
    This saves the need to open another file descriptor and do
    the forwarding manually.

direct-forwarding mode:
    when operating with a VALE port, the user can specify in the slot
    the actual destination port, overriding the forwarding decision
    made by a lookup of the destination MAC. This can be useful to
    implement packet dispatchers.

No API changes will be introduced.
No new functionality in this patch yet.
2013-01-17 22:14:58 +00:00
Luigi Rizzo
e814dcebf3 remove an incorrect comment and debugging code 2013-01-17 19:27:12 +00:00
Neel Natu
9ad6525193 IFC @ r245542 2013-01-17 19:08:20 +00:00
Navdeep Parhar
e13fe79820 cxgbe: Make the for_each macros safer to use by turning them
into a single statement each.

Submitted by:	Christoph Mallon <christoph dot mallon at gmx dot de>
MFC after:	1 week
2013-01-17 18:52:49 +00:00
Adrian Chadd
a74ebfe59e Fix hangs (exposed by spectral scan activity) in STA mode when the
chip hangs.

* Always do a reset in ath_bmiss_proc(), regardless of whether the
  hardware is "hung" or not.  Specifically, for spectral scan, there's
  likely a whole bunch of potential hangs that we don't (yet) recognise
  in the HAL.  So to avoid staying RX deaf persisting until the station
  disassociates, just do a no-loss reset.

* Set sc_beacons=1 in STA mode.  During a reset, the beacon programming
  isn't done.  (It's likely I need to set sc_syncbeacons during a hang
  reset, but I digress.)  Thus after a reset, there's no beacon timer
  programming to send a BMISS interrupt if beacons aren't heard ..
  thus if the AP disappears, you won't get notified and you'll have to
  reset your interface.

This hasn't yet fixed all of the hangs that I've seen when debugging
spectral scan, but it's certainly reduced the hang frequency and it
should improve general STA stability in very noisy environments.

Tested:

* AR9280, STA mode, spectral scan off/on

PR:		kern/175227
2013-01-17 16:43:59 +00:00
Adrian Chadd
61cd9692bb Add a quick work-around if ath_beacon_config() to not die if it's called
when an interface is going down.

Right now it's quite possible (but very unlikely!) that ath_reset()
or similar is called, leading to a beacon config call, in parallel with
the last VAP being destroyed.

This likely should be fixed by making sure the bmiss/bstuck/watchdog
taskqueues are canceled whenever the last VAP is destroyed.
2013-01-17 16:26:40 +00:00
Neel Natu
c2217b9848 IFC @ r245509 2013-01-17 07:04:37 +00:00
Navdeep Parhar
601fce8879 cxgbe: Do a more thorough job in the CLEAR_STATS ioctl.
MFC after:	3 days
2013-01-16 23:49:55 +00:00
Navdeep Parhar
5bb17208d7 cxgbe: Fix the for_each_foo macros -- the last argument should not share
its name with any member of struct sge.

MFC after:	3 days
2013-01-16 23:48:55 +00:00
John Baldwin
323e149ade Do not require a filter-only interrupt handler for puc ports that are not
serial devices (such as printer ports).  This allows ppc devices attached
to puc to correctly setup an interrupt handler and work.

Tested by:	Andre Albsmeier  Andre.Albsmeier@siemens.com
MFC after:	1 week
2013-01-15 20:13:25 +00:00
Navdeep Parhar
c995301b2d cxgbe/tom: Add support for fully offloaded TCP/IPv6 connections (passive open).
MFC after:	1 week
2013-01-15 18:50:40 +00:00
Navdeep Parhar
8be0815671 cxgbe/tom: Add support for fully offloaded TCP/IPv6 connections (active open).
MFC after:	1 week
2013-01-15 18:38:51 +00:00
Adrian Chadd
c5239edb98 Implement frame (data) transmission using if_transmit(), rather than
if_start().

This removes the overlapping data path TX from occuring, which
solves quite a number of the potential TX queue races in ath(4).
It doesn't fix the net80211 layer TX queue races and it doesn't
fix the raw TX path yet, but it's an important step towards this.

This hasn't dropped the TX performance in my testing; primarily
because now the TX path can quickly queue frames and continue
along processing.

This involves a few rather deep changes:

* Use the ath_buf as a queue placeholder for now, as we need to be
  able to support queuing a list of mbufs (ie, when transmitting
  fragments) and m_nextpkt can't be used here (because it's what is
  joining the fragments together)

* if_transmit() now simply allocates the ath_buf and queues it to
  a driver TX staging queue.

* TX is now moved into a taskqueue function.

* The TX taskqueue function now dequeues and transmits frames.

* Fragments are handled correctly here - as the current API passes
  the fragment list as one mbuf list (joined with m_nextpkt) through
  to the driver if_transmit().

* For the couple of places where ath_start() may be called (mostly
  from net80211 when starting the VAP up again), just reimplement
  it using the new enqueue and taskqueue methods.

What I don't like (about this work and the TX code in general):

* I'm using the same lock for the staging TX queue management and the
  actual TX.  This isn't required; I'm just being slack.

* I haven't yet moved TX to a separate taskqueue (but the taskqueue is
  created); it's easy enough to do this later if necessary.  I just need
  to make sure it's a higher priority queue, so TX has the same
  behaviour as it used to (where it would preempt existing RX..)

* I need to re-review the TX path a little more and make sure that
  ieee80211_node_*() functions aren't called within the TX lock.
  When queueing, I should just push failed frames into a queue and
  when I'm wrapping up the TX code, unlock the TX lock and
  call ieee80211_node_free() on each.

* It would be nice if I could hold the TX lock for the entire
  TX and TX completion, rather than this release/re-acquire behaviour.
  But that requires that I shuffle around the TX completion code
  to handle actual ath_buf free and net80211 callback/free outside
  of the TX lock.  That's one of my next projects.

* the ic_raw_xmit() path doesn't use this yet - so it still has
  sequencing problems with parallel, overlapping calls to the
  data path.  I'll fix this later.

Tested:

* Hostap - AR9280, AR9220
* STA - AR5212, AR9280, AR5416
2013-01-15 18:01:23 +00:00
Sean Bruno
e3edca225f Satisfy the intent of kern/151564: [ciss] ciss(4) should increase
CISS_MAX_LOGICAL to 107

Submitter wanted to increase the number of logical disks supported by ciss(4)
by simply raising the CISS_MAX_LOGICAL value even higher.  Instead, consult
the documentation for the raid controller (OPENCISS) and poke the controller
bits to ask it for how many logical/physical disks it can handle.

Revert svn R242089 that raised CISS_MAX_LOGICAL to 64 for all controllers.

For older controllers that don't support this mechanism, fallback to the old
value of 16 logical disks.  Tested on P420, P410, P400 and 6i model ciss(4)
controllers.

This should will be MFC'd back to stable/9 stable/8 and stable/7 after the MFC
period.

PR:		kern/151564
Reviewed by:	scottl@freebsd.org
MFC after:	2 weeks
2013-01-15 14:35:35 +00:00
Navdeep Parhar
87aa6825ff cxgbe/tom: Basic CLIP table management.
This is the Compressed Local IPv6 table on the chip.  To save space, the
chip uses an index into this table instead of a full IPv6 address in
some of its hardware data structures.

For now the driver fills this table with all the local IPv6 addresses
that it sees at the time the table is initialized.  I'll improve this
later so that the table is updated whenever new IPv6 addresses are
configured or existing ones deleted.

MFC after:	1 week
2013-01-15 07:07:29 +00:00
Alexander Motin
14b5a2cd6b In case somebody still use it, fix legacy ataraid(4) to work on combined
PATA+AHCI controllers, such as JMicron JMB363.

PR:		kern/159271
MFC after:	1 week
2013-01-15 02:18:04 +00:00
Navdeep Parhar
7f441ef267 cxgbe/tom: Miscellaneous updates for TOE+IPv6 support (more to follow).
- Teach find_best_mtu_idx() to deal with IPv6 endpoints.

- Install correct protosw in offloaded TCP/IPv6 sockets when DDP is
  enabled.

- Move set_tcp_ddp_ulp_mode to t4_tom.c so that t4_tom.h can be included
  without having to drag in t4_msg.h too.  This was bothering the iWARP
  driver for some reason.

MFC after:	1 week
2013-01-15 00:24:01 +00:00
Navdeep Parhar
0a0a697c73 cxgbe(4): Updates to the hardware L2 table management code.
- Add full support for IPv6 addresses.

- Read the size of the L2 table during attach.  Do not assume that PCIe
  physical function 4 of the card has all of the table to itself.

- Use FNV instead of Jenkins to hash L3 addresses and drop the private
  copy of jhash.h from the driver.

MFC after:	1 week
2013-01-14 20:36:22 +00:00