summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2014-04-29Finally plug the public xfer leak #1 in our USB stack.Martin Pieuchot
Every call to usbd_abort_pipe() on an interrupt pipe would simply reset the intrxfer pointer, which would prevent usbd_close_pipe() to free it. Since we abort pipes in a lot of situations: when a device is detached, when a USB-to-serial adapter is closed, when an error occurs, when the machine is suspended, etc, this would result in hundreds of leaked xfers in most of my machines. xhci(4) is not affected, but you can't enable it right now since the stack is not ready :) While here put a KASSERT() to make sure drivers are only calling the interrupt abort method for intrxfer, if that's not the case, please let met know.
2014-04-29regenRyan Thomas McBride
2014-04-29Add Microsoft Wireless Mobile Mouse 3500 and Wireless Arc Mouse.Ryan Thomas McBride
ok mpi
2014-04-29Make sure to call uhidev_close() upon detach, plug another xfer leak.Martin Pieuchot
2014-04-29Plug an xfer leak.Martin Pieuchot
2014-04-29Get rid of the per-softc freelist of transfer descriptors and use aMartin Pieuchot
per-driver pool(9) instead. With inputs from mikeb@
2014-04-29If you plan to write an obfuscated-by-design kernel / userlandMartin Pieuchot
interface, I suggest you have a look at the link-layer sockaddr interface: /* * A Link-Level Sockaddr may specify the interface in one of two * ways: either by means of a system-provided index number (computed * anew and possibly differently on every reboot), or by a human-readable * string such as "il0" (for managerial convenience). [...] */ ifa_ifwithnet() was not only checking for the sdl_index in order to get the corresponding ifp for AF_LINK sockaddr, it was also iterating over all the addresses on your system! But in this case, the `address' field of "struct sockaddr_dl" is an interface name set by link_addr(3). How can this work? Well because the kernel allocates an empty `netmask' field for each interface's lladdr, so that you can abuse a network comparison function to reimplement strcmp(3)... So when the userland does not specify an interface index, try harder to see if it passed an ifp name, but at least be explicit and use ifunit(). Found the hard way by/ok sthen@
2014-04-29Replace 1 << PAGE_SHIFT with PAGE_SIZE.Mark Kettenis
ok beck@, miod@
2014-04-29Fix typo: d_addrt -> daddr_tDavid Coppa
ok bmercer@
2014-04-29Remove device white-listing as matching method, relies on on usage idAndre de Oliveira
versus supported sensors table filtering. discussed with and ok mpi@
2014-04-28Remove bogus semicolon.Brad Smith
Pointed out by LLVM. fd.c:1378:29: error: if statement has empty body [-Werror,-Wempty-body] ok miod@
2014-04-28sync bzero => memset that was done for ip_divert.c before.Reyk Floeter
ok tedu@
2014-04-28Move an opening brace so a loop that delays while waitingJonathan Gray
for hardware to set a ready bit actually delays. ok krw@ deraadt@ 'sounds correct' miod@
2014-04-27Add PME_STATUS and PME_EN bitmasks for the PCI PMCSR register.Stefan Sperling
ok kettenis@
2014-04-27Start de-obfuscating the HC drivers.Martin Pieuchot
Since pipe methods have an xfer argument, always use it to get acces to various data structure (pipe, bus, device) instead of having a different way to get a pointer to these descriptors in every function. Also kill the {E,U}XFER() macro and use a consistent name accross all the methods for {e,u}hci_xfer.
2014-04-27Do not let the bluetooth HID device, present in Apple machines with USB,Martin Pieuchot
grab the console. This makes ddb(4) usable with any simple wired USB keyboard on G3/G4 machines that do not have adb(4) input devices, on G5s and certainly on some MacBooks too. ok andre@, miod@
2014-04-27transplant hotplug code over from qle(4)Jonathan Matthew
2014-04-27When the firmware has already allocated the handle we want to use to log inJonathan Matthew
to a port, restart the update process to keep things in sync. Domain controller logins get special handling here because they don't show up in the list of logged in ports.
2014-04-26Get rid of duplication of the global lock code. Allow recursion in allMark Kettenis
code paths. ok pirofti@
2014-04-26Do not pass a NULL argument to OF_getprop(), even if it's fine for theMartin Pieuchot
moment since we use an intermediate buffer and we specify a length of 0, there's no need for an exception here. Noticied while playing with the virtual-mode client interface of firmware.
2014-04-26Allow to compile with DEBUG_PMAP defined.Martin Pieuchot
2014-04-26remove a duplicate break statementJonathan Gray
2014-04-26Perform MAXPHYS-sized reads for the chunktable instead of PAGE_SIZE-sizedMike Larkin
reads. Also fix a VA leak in the chunktable read error path.
2014-04-25Defer the free of the hibernate structures until later, when it is safe toMike Larkin
do so. Freeing the hibernate structures too early leads to inadvertent calls into splx when we aren't ready for them yet. Found when trapping splx calls in the resume path. discussed with deraadt@ at m2k14
2014-04-25regenMartin Pieuchot
2014-04-25Add a bunch of GeForce GT{,X} chips listed in nvidia's 334.21 driver.Martin Pieuchot
This includes the GeForce GT 740M submitted by Rafael Neves on tech@, thanks!
2014-04-25Remove rti_ifp from rt_addrinfo, one less ifp pointer, say yay!Martin Pieuchot
This pointer was only needed by rt_getifa() to find an address, so turn it into a local variable. ok henning@, bluhm@
2014-04-25Do no reprobe for a supported protocol when enabling a pointingMartin Pieuchot
device of type PMS_STANDARD, probing during autoconf(9) is enough!. In such case, the device can be a simple PS/2 mouse, a unsupported touchpad or a downgraded touchpad if something bad happened. But it is very unlikely that reprobing will improve the situation and transform a standard mouse into a multitouch-aware touchpad ;) This fixes the 12 seconds delay seen on various Dell laptops (E4310 and Latitude D630) when starting Xorg, reported by Kārlis Miķelsons on bugs@. ok stsp@, dcoppa@, shadchin@
2014-04-25test dt_min for invalid minute values instead of testing dt_sec twiceJonathan Gray
ok bmercer@
2014-04-25Kill in_localaddr(), one less usage of the global list of IPv4 addresses.Martin Pieuchot
This function is used only once in our tree to optimize the size of the MSS if the forward address correspond to a host on one of our subnets, but only if ip.mutdisc is disable, which is not the default! While here get rid of the "#ifdef RTV_MTU", it is here. ok henning@, mikeb@, bluhm@
2014-04-25don't access a pointer till after the null checkJonathan Gray
ok mikeb@
2014-04-24no need to check for default_chip_map twice in one if statementJonathan Gray
2014-04-24ewps... repair qid assignmentHenning Brauer
2014-04-24Change the usbd_*_report() family of functions to take a usbd_deviceMartin Pieuchot
and a infaceno argument instead of an iface pointer. While here, remove some unused functions and inlined usbd_read_report_desc since it is used only once. This is part of plumbing required to convert the various USB HID devices to handle multiples report IDs. ok andre@
2014-04-24match some more intel sata devices in ide modeJonathan Gray
2014-04-24regenJonathan Gray
2014-04-24add some more intel sata devices in ide modeJonathan Gray
2014-04-23No need for vargs here.Florian Obser
While there move declaration of divert{,6}_output() to .c as it's a private function. Also switch first two args to make it more like similar functions (both suggested by mpi@). Input/OK mpi@, OK lteo@
2014-04-23Document RTS5227 support in rtsx(4).Stefan Sperling
2014-04-23Don't use varargs for udp_output() and sync the argument order withMartin Pieuchot
udp6_output(). ok henning@, reyk@, jca@
2014-04-23Don't attempt to deal with link types supported by no drivers in theJeremie Courreges-Anglas
tree. ok henning@
2014-04-23You don't want to use ifa_ifwithroute(), it exists for to the routingMartin Pieuchot
crazyness only.
2014-04-23rename some hardware revisions to match FreeBSDJonathan Gray
2014-04-23add support for RTL8168EPJonathan Gray
From Edward O'Callaghan via FreeBSD
2014-04-23While we always mask the revision with 0x7c800000 linux uses a tableJonathan Gray
that masks with either 0x7c800000 or 0x7cf00000 depending on the chip. Some of the hardware revisions I previously added can't be matched with the current mask, these are already handled by other revision defines so remove them. When masking the revision defines with 0x7c800000: RL_HWREV_8106E_SPIN1 is the same as RL_HWREV_8106E RL_HWREV_8168G_SPIN1 is the same as RL_HWREV_8168G RL_HWREV_8168G_SPIN2 is the same as RL_HWREV_8168GU
2014-04-23Add support for RTL8168GUJonathan Gray
from Rafael Neves
2014-04-22Unify the model name to LUNA-88K{,2}, that is considered theKenji Aoyama
`official' name. ok jmc@ miod@
2014-04-22Fix issue where we could jump into getdirtybuf without splbio() on a retryBob Beck
that probably crashed espie. ok tedu@
2014-04-22Remove RX checksum offloading support. The chip is too limited, andChristian Weisgerber
examining higher protocol layers to adjust the checksum and calculate the pseudo-header in the driver is too complex to be worthwhile. ok henning@
2014-04-22Remove some altq tentacles.Martin Pieuchot
ok pelikan@, henning@