aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* Unbreak build.Attilio Rao2009-05-303-9/+15
| | | | | | | Pointy hat to: attilio Notes: svn path=/head/; revision=193105
* Fix return values appropriately.Attilio Rao2009-05-301-2/+2
| | | | | | | Tested by: zec Notes: svn path=/head/; revision=193103
* s/rk_npkts/rx_npktsAttilio Rao2009-05-301-1/+1
| | | | | | | Reported by: zec Notes: svn path=/head/; revision=193100
* When user_frac in the polling subsystem is low it is going to busy theAttilio Rao2009-05-3020-136/+246
| | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=193096
* fix typoSam Leffler2009-05-301-2/+2
| | | | Notes: svn path=/head/; revision=193079
* Revert the size_t part of the last commit for the moment, this blows up theAndrew Thompson2009-05-3024-94/+98
| | | | | | | USB_ADD_BYTES macro. Notes: svn path=/head/; revision=193074
* validate tx rate(s) in the raw xmit pathSam Leffler2009-05-295-11/+30
| | | | | | | Tested by: "Paul B. Mahol" <onemda@gmail.com> (rum, bwi) Notes: svn path=/head/; revision=193073
* Fix function arguments were previously they matched the typedef by accident.Andrew Thompson2009-05-291-3/+3
| | | | Notes: svn path=/head/; revision=193068
* Place hostnames and similar information fully under the prison system.Jamie Gritton2009-05-292-6/+9
| | | | | | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=193066
* s/usb2_/usb_/ on all typedefs for the USB stack.Andrew Thompson2009-05-2997-1027/+1019
| | | | Notes: svn path=/head/; revision=193045
* Free device strings.Andrew Thompson2009-05-291-0/+3
| | | | | | | Spotted by: HPS Notes: svn path=/head/; revision=193042
* adds new device IDs.Weongyo Jeong2009-05-292-1/+6
| | | | | | | | PR: usb/135009 Submitted by: Bill Squire <billsf at 2600.COM> Notes: svn path=/head/; revision=193029
* Last minute TTY API change: remove mutex argument from tty_alloc().Ed Schouten2009-05-2911-12/+12
| | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=193018
* s/usb2_/usb_/ on all C structs for the USB stack.Andrew Thompson2009-05-28126-3788/+3679
| | | | Notes: svn path=/head/; revision=192984
* Allocate the usb serial, manufacturer and product strings rather than use charAndrew Thompson2009-05-276-124/+51
| | | | | | | arrays in the usb_device struct. This also eliminates USB_HAVE_STRINGS. Notes: svn path=/head/; revision=192938
* Rework interrupt bringup and teardown.George V. Neville-Neil2009-05-271-131/+124
| | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=192933
* Provide a workaround for USB devices that do not support mono or stereoAndrew Thompson2009-05-271-3/+5
| | | | | | | | | | operation by overriding the channel count. Submitted by: Hans Petter Selasky Reported by: MIHIRA Sanpei Yoshiro Notes: svn path=/head/; revision=192929
* Delete useless #ifdef; make it more obvious if setting TSO fails.Adrian Chadd2009-05-271-4/+1
| | | | Notes: svn path=/head/; revision=192927
* Add support for the Apple MacBook Pro keyboardAndrew Thompson2009-05-272-43/+154
| | | | | | | | | | | - 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 Notes: svn path=/head/; revision=192925
* Slightly adjust copyright text.Joel Dahl2009-05-271-1/+1
| | | | | | | Approved by: Hannu Savolainen <hannu@opensound.com> Notes: svn path=/head/; revision=192921
* Slightly adjust copyright text.Joel Dahl2009-05-271-1/+1
| | | | | | | Approved by: luigi Notes: svn path=/head/; revision=192920
* Separate comments from the license text.Joel Dahl2009-05-273-3/+9
| | | | Notes: svn path=/head/; revision=192919
* Remove empty dir.Andrew Thompson2009-05-271-18/+0
| | | | Notes: svn path=/head/; revision=192910
* move ng_ubt_var.h back to its original placeAndrew Thompson2009-05-271-131/+0
| | | | Notes: svn path=/head/; revision=192907
* move ng_ubt.c back to its original placeAndrew Thompson2009-05-271-1722/+0
| | | | Notes: svn path=/head/; revision=192906
* move ubtbcmfw.c back to its original placeAndrew Thompson2009-05-271-427/+0
| | | | Notes: svn path=/head/; revision=192905
* Change from using vm_map_delete() to vm_map_remove().Stacey Son2009-05-271-16/+2
| | | | | | | | Approved by: gnn (mentor) Obtained from: kib Notes: svn path=/head/; revision=192902
* Clear IFF_DRV_OACTIVE if at least one TX xen/mbuf ring slot has been freed.Adrian Chadd2009-05-271-1/+2
| | | | Notes: svn path=/head/; revision=192894
* Enforce that there are actually enough xenbus TX ring descriptors availableAdrian Chadd2009-05-271-3/+13
| | | | | | | before attempting to queue the packet. Notes: svn path=/head/; revision=192876
* Comment tidyup; comment where the next explicit check shouldAdrian Chadd2009-05-271-11/+23
| | | | | | | appear. Notes: svn path=/head/; revision=192875
* ports urtw(4) for USB2. Additionally it supports a 8187B chipset weaklyWeongyo Jeong2009-05-273-0/+4718
| | | | | | | that it needs more stabilization. Notes: svn path=/head/; revision=192873
* Ensure that there are enough TX mbuf ring slots available before beginningAdrian Chadd2009-05-271-1/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=192871
* Do the invariant check before the mbuf is dereferenced.Adrian Chadd2009-05-271-2/+2
| | | | Notes: svn path=/head/; revision=192870
* Flesh out some inline documentation which hopefully reflect the intendedAdrian Chadd2009-05-271-0/+23
| | | | | | | reality of these functions. Notes: svn path=/head/; revision=192869
* Add in some INVARIANT checks in the TX mbuf descriptor "freelist" management ↵Adrian Chadd2009-05-271-0/+2
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=192868
* Add the ksyms(4) pseudo driver. The ksyms driver allows a process toStacey Son2009-05-261-0/+678
| | | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=192859
* Unifdef __NetBSD__ here, the usb stack as a whole doesnt support NetBSD and itAndrew Thompson2009-05-262-418/+2
| | | | | | | obsfucates the code. Notes: svn path=/head/; revision=192857
* Do not forcefully close the write transfer when closing the tty, it needs toAndrew Thompson2009-05-262-21/+7
| | | | | | | run to completion and drain the tty queue. Notes: svn path=/head/; revision=192820
* Unbreak bktr(4).Ed Schouten2009-05-261-1/+1
| | | | Notes: svn path=/head/; revision=192805
* Free the memory correctly in the error caseBenjamin Close2009-05-261-1/+1
| | | | | | | | | Submitted by: frtzkatz at yahoo.com Approved by: sam MFC after: 1 month Notes: svn path=/head/; revision=192784
* There is rubbish hereMark Murray2009-05-252-11/+8
| | | | | | | | It is time to take it out Now it is cleaner Notes: svn path=/head/; revision=192774
* Correct controller description for 88E8035, 88E8036, 88E8038 andPyun YongHyeon2009-05-251-4/+4
| | | | | | | 88E8039. These are fast ethernet controllers. Notes: svn path=/head/; revision=192742
* Simplify SIOCSIFFLAGS handler.Pyun YongHyeon2009-05-251-12/+8
| | | | Notes: svn path=/head/; revision=192740
* Be consistent with other capability checking.Pyun YongHyeon2009-05-251-7/+8
| | | | Notes: svn path=/head/; revision=192739
* Don't reinitialize controller when interface is already running.Pyun YongHyeon2009-05-251-1/+9
| | | | Notes: svn path=/head/; revision=192738
* If interface is not UP, don't return media status.Pyun YongHyeon2009-05-251-0/+4
| | | | Notes: svn path=/head/; revision=192737
* Add device ids for Yukon FE+(88E8040, 88E8040T, 88E8048 and 88E8070).Pyun YongHyeon2009-05-252-1/+13
| | | | Notes: svn path=/head/; revision=192736
* Add workaround for Yukon FE+ A0. This controller is known to havePyun YongHyeon2009-05-252-11/+52
| | | | | | | | | | | | | | | | | | | | severe silicon bugs that can't handle VLAN hardware tagging as well as status LE writeback bug. The status LE writeback bug is so critical we can't trust status word of received frame. To accept frames on Yukon FE+ A0 msk(4) just do minimal check for received frames and pass them to upper stack. This means msk(4) can pass corrupted frames to upper layer. You have been warned! Also I supposed RX_GMF_FL_THR to be 32bits register but Linux driver treated it as 16bit register so follow their leads. At least this does not seem to break msk(4) on Yukon FE+. Tested by: bz, Tanguy Bouzeloc ( the.zauron <> gmail dot com ) Bruce Cran ( bruce <> cran dot org dot uk ) Michael Reifenberger ( mike <> reifenberger dot com ) Stephen Montgomery-Smith ( stephen <> missouri dot edu ) Notes: svn path=/head/; revision=192735
* Add preliminary Yukon FE+ support and register definitions.Pyun YongHyeon2009-05-252-4/+20
| | | | | | | | | | | | | | | | | Yukon FE+ is fast ethernet controller and uses new descriptor format. Since I don't have this controller, the support code was written from guess and various feedback from enthusiastic users. Thanks to all users who patiently tested my initial patches. Special thanks to Tanguy Bouzeloc who fixed critical bug of initial patch. Tested by: bz, Tanguy Bouzeloc ( the.zauron <> gmail dot com ) Bruce Cran ( bruce <> cran dot org dot uk ) Michael Reifenberger ( mike <> reifenberger dot com ) Stephen Montgomery-Smith ( stephen <> missouri dot edu ) Notes: svn path=/head/; revision=192734
* Explicitly reset GMAC Controls and initialize GM_GP_CTRL register.Pyun YongHyeon2009-05-251-10/+8
| | | | | | | | | | The GM_GP_CTRL register may have stale content from previous link information so clearing it will make hardware update the register correctly when it established a valid link. While I'm here remove stale comment. Notes: svn path=/head/; revision=192731