Commit Graph

20244 Commits

Author SHA1 Message Date
jhb
0247ab91bf Adjust some comments. 2009-06-01 20:27:14 +00:00
gallatin
427620ee06 Set an rx jumbo cluster to the correct size before
using bus_dmamap_load_mbuf_sg() on it. This
prevents data corruption when the mxge MTU is
between 4076 and 8172 on machines with 4KB
pages and MXGE_VIRT_JUMBOS is in use (which it
isn't, in -current or -stable)
2009-06-01 19:16:57 +00:00
delphij
76a0fffb3a Revert the WARNS change for now, need some time to fix the real problem. 2009-06-01 19:06:08 +00:00
delphij
367f75d5d5 Mark as WARNS=6. 2009-06-01 18:43:33 +00:00
delphij
f2c56eb8fa Code cleanups to make this WARNS=6 clean.
PR:		bin/96128
2009-06-01 18:42:16 +00:00
sam
f0cca176f4 driver for Marvell 88W8363 Wireless LAN controller 2009-06-01 18:07:01 +00:00
imp
ec844753ab Move the unlock to after the ifdef (maybe the right fix is to remove
the ifdef) since it calls bwi_start_locked, which expects to the lock
to be held...
2009-06-01 16:29:03 +00:00
imp
a7b978eee4 Make sure that we drain the LED blinking callout on detach.
Submitted by:	Paul B. Mahol
2009-06-01 16:27:13 +00:00
imp
36075f2a9a Add a comment about what may be happening when we get certain
messages.  No change to actual code.
2009-06-01 16:22:01 +00:00
mav
960d9e52b8 Comment out old Realtek ALC883 quirk, that was disabling phantop power on
mic inputs. I have no idea what for it was made that time, but now I have
several reports that it should be removed to make microphones work. If
this quirk is still required for some systems then they should be identified
and specified explicitly.
2009-06-01 13:13:47 +00:00
delphij
3bd950dbc3 According to Intel documentation (307013), 3Gbps mode is supported on
Desktop chipsets only for ICH7 series, so mark all ICH7M as ATA_SA150
instead of ATA_SA300.
2009-06-01 07:05:52 +00:00
weongyo
a255b208fd ZyXEL G-202 has zd1211b chipset, not zd1211.
Tested by:	Samuel Boivie <samuel at boivie.org>
2009-06-01 01:51:37 +00:00
ed
d5a70a77bc Restore support for bell pitch/duration.
Because we only support a single argument to tf_param, use 16 bits for
the pitch and 16 bits for the duration. While there, make the argument
unsigned. There isn't a single param call that needs a signed integer.

Submitted by:	danfe (modified)
2009-05-31 19:35:41 +00:00
deischen
30a553aba0 Add a NO_SYNCHRONIZE_CACHE quirk for an AIPTEK2
part identified as Sunplus Technology Inc.  This
happens to sit in a Rosewill RX81U-ES-25A 2.5" SATA
to USB 2.0 external enclosure.

Reviewed by:    Hans Petter Selasky
2009-05-31 14:48:51 +00:00
attilio
30dba4157f Unbreak build.
Pointy hat to:	attilio
2009-05-30 18:39:22 +00:00
attilio
02893c6547 Fix return values appropriately.
Tested by:	zec
2009-05-30 17:56:19 +00:00
attilio
53bcf177da s/rk_npkts/rx_npkts
Reported by:	zec
2009-05-30 17:25:14 +00:00
attilio
b523608331 When user_frac in the polling subsystem is low it is going to busy the
CPU for too long period than necessary.  Additively, interfaces are kept
polled (in the tick) even if no more packets are available.
In order to avoid such situations a new generic mechanism can be
implemented in proactive way, keeping track of the time spent on any
packet and fragmenting the time for any tick, stopping the processing
as soon as possible.

In order to implement such mechanism, the polling handler needs to
change, returning the number of packets processed.
While the intended logic is not part of this patch, the polling KPI is
broken by this commit, adding an int return value and the new flag
IFCAP_POLLING_NOCOUNT (which will signal that the return value is
meaningless for the installed handler and checking should be skipped).

Bump __FreeBSD_version in order to signal such situation.

Reviewed by:	emaste
Sponsored by:	Sandvine Incorporated
2009-05-30 15:14:44 +00:00
sam
b54272d1c3 fix typo 2009-05-30 01:33:05 +00:00
thompsa
b064d23a53 Revert the size_t part of the last commit for the moment, this blows up the
USB_ADD_BYTES macro.
2009-05-30 00:22:57 +00:00
sam
36bf6c9b02 validate tx rate(s) in the raw xmit path
Tested by:	"Paul B. Mahol" <onemda@gmail.com> (rum, bwi)
2009-05-29 23:41:31 +00:00
thompsa
d5497c5f03 Fix function arguments were previously they matched the typedef by accident. 2009-05-29 22:11:22 +00:00
jamie
572db1408a Place hostnames and similar information fully under the prison system.
The system hostname is now stored in prison0, and the global variable
"hostname" has been removed, as has the hostname_mtx mutex.  Jails may
have their own host information, or they may inherit it from the
parent/system.  The proper way to read the hostname is via
getcredhostname(), which will copy either the hostname associated with
the passed cred, or the system hostname if you pass NULL.  The system
hostname can still be accessed directly (and without locking) at
prison0.pr_host, but that should be avoided where possible.

The "similar information" referred to is domainname, hostid, and
hostuuid, which have also become prison parameters and had their
associated global variables removed.

Approved by:	bz (mentor)
2009-05-29 21:27:12 +00:00
thompsa
44c17bdf07 s/usb2_/usb_/ on all typedefs for the USB stack. 2009-05-29 18:46:57 +00:00
thompsa
7411c6484b Free device strings.
Spotted by:	HPS
2009-05-29 16:15:56 +00:00
weongyo
be2772a684 adds new device IDs.
PR:		usb/135009
Submitted by:	Bill Squire <billsf at 2600.COM>
2009-05-29 10:10:23 +00:00
ed
8d73adc757 Last minute TTY API change: remove mutex argument from tty_alloc().
I don't want people to override the mutex when allocating a TTY. It has
to be there, to keep drivers like syscons happy. So I'm creating a
tty_alloc_mutex() which can be used in those cases. tty_alloc_mutex()
should eventually be removed.

The advantage of this approach, is that we can just remove a function,
without breaking the regular API in the future.
2009-05-29 06:41:23 +00:00
thompsa
af6fb4f3d2 s/usb2_/usb_/ on all C structs for the USB stack. 2009-05-28 17:36:36 +00:00
thompsa
3d7b880e84 Allocate the usb serial, manufacturer and product strings rather than use char
arrays in the usb_device struct. This also eliminates USB_HAVE_STRINGS.
2009-05-27 23:12:02 +00:00
gnn
7cc11d24d8 Rework interrupt bringup and teardown.
Calculate the exact number of vectors we'll use before calling
pci_alloc_msix.  Don't grab nine all the time.

Call cxgb_setup_interrupts once per T3, not once per port.  Ditto
for cxgb_teardown_interrupts.

Don't leak resources when interrupt setup fails in the middle.

Obtained from:	Navdeep Parhar
MFC after:	10 days
2009-05-27 20:13:36 +00:00
thompsa
b36d17c973 Provide a workaround for USB devices that do not support mono or stereo
operation by overriding the channel count.

Submitted by:	Hans Petter Selasky
Reported by:	MIHIRA Sanpei Yoshiro
2009-05-27 19:45:04 +00:00
adrian
6c6591677c Delete useless #ifdef; make it more obvious if setting TSO fails. 2009-05-27 19:31:50 +00:00
thompsa
9fc2aafa82 Add support for the Apple MacBook Pro keyboard
- add key mappings for fn keys
- byte swapping for certain models
- Fix leds for keyboards which require an ID byte for the HID output structures

Submitted by:	Hans Petter Selasky
2009-05-27 19:27:29 +00:00
joel
3fb43873ed Slightly adjust copyright text.
Approved by:	Hannu Savolainen <hannu@opensound.com>
2009-05-27 18:17:58 +00:00
joel
0bcd1e27c7 Slightly adjust copyright text.
Approved by:	luigi
2009-05-27 18:16:53 +00:00
joel
9150148ab8 Separate comments from the license text. 2009-05-27 18:13:15 +00:00
thompsa
f9be7478fe Remove empty dir. 2009-05-27 16:44:43 +00:00
thompsa
f5ce731edd move ng_ubt_var.h back to its original place 2009-05-27 16:34:08 +00:00
thompsa
97718a5597 move ng_ubt.c back to its original place 2009-05-27 16:33:08 +00:00
thompsa
b60849b714 move ubtbcmfw.c back to its original place 2009-05-27 16:32:05 +00:00
sson
896c73926f Change from using vm_map_delete() to vm_map_remove().
Approved by:	gnn (mentor)
Obtained from:	kib
2009-05-27 16:20:46 +00:00
adrian
6e53147404 Clear IFF_DRV_OACTIVE if at least one TX xen/mbuf ring slot has been freed. 2009-05-27 13:59:17 +00:00
adrian
b0f73e19e7 Enforce that there are actually enough xenbus TX ring descriptors available
before attempting to queue the packet.
2009-05-27 06:04:38 +00:00
adrian
5923b72e4e Comment tidyup; comment where the next explicit check should
appear.
2009-05-27 05:37:04 +00:00
weongyo
c6ef0a3a39 ports urtw(4) for USB2. Additionally it supports a 8187B chipset weakly
that it needs more stabilization.
2009-05-27 03:57:38 +00:00
adrian
8e9cac6f75 Ensure that there are enough TX mbuf ring slots available before beginning
to dequeue a packet.

The tx path was trying to ensure that enough Xenbus TX ring slots existed but
it didn't check to see whether the mbuf TX ring slots were also available.
They get freed in xn_txeof() which occurs after transmission, rather than earlier
on in the process. (The same happens under Linux too.)

Due to whatever reason (CPU use, scheduling, memory constraints, whatever) the
mbuf TX ring may not have enough slots free and would allocate slot 0. This is
used as the freelist head pointer to represent "free" mbuf TX ring slots; setting
this to an actual mbuf value rather than an id crashes the code.

This commit introduces some basic code to track the TX mbuf ring use and then
(hopefully!) ensures that enough slots are free in said TX mbuf ring before it
enters the actual work loop.

A few notes:

* Similar logic needs to be introduced to check there are enough actual slots
  available in the xenbuf TX ring. There's some logic which is invoked earlier
  but it doesn't hard-check against the number of available ring slots.
  Its trivial to do; I'll do it in a subsequent commit.

* As I've now commented in the source, it is likely possible to deadlock the
  driver under certain conditions where the rings aren't receiving any changes
  (which I should enumerate) and thus Xen doesn't send any further software
  interrupts. I need to make sure that the timer(s) are running right and
  the queues are periodically kicked.

PR:		134926
2009-05-27 02:49:08 +00:00
adrian
6732387afd Do the invariant check before the mbuf is dereferenced. 2009-05-27 01:56:37 +00:00
adrian
fc20aee93b Flesh out some inline documentation which hopefully reflect the intended
reality of these functions.
2009-05-27 01:54:26 +00:00
adrian
712491866f Add in some INVARIANT checks in the TX mbuf descriptor "freelist" management code.
Slot 0 must always remain "free" and be a pointer to the first free entry in the
mbuf descriptor list. It is thus an error to have code allocate or push slot 0
back into the list.
2009-05-27 01:45:23 +00:00
sson
527dd57555 Add the ksyms(4) pseudo driver. The ksyms driver allows a process to
get a quick snapshot of the kernel's symbol table including the symbols
from any loaded modules (the symbols are all merged into one symbol
table).  Unlike like other implementations, this ksyms driver maps
memory in the process memory space to store the snapshot at the time
/dev/ksyms is opened.  It also checks to see if the process has already
a snapshot open and won't allow it to open /dev/ksyms it again until it
closes first.  This prevents kernel and process memory from being
exhausted.  Note that /dev/ksyms is used by the lockstat(1) command.

Reviewed by:	gallatin kib (freebsd-arch)
Approved by:	gnn (mentor)
2009-05-26 21:39:09 +00:00