summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2010-01-11Make the detach function handle the case of a partial attach, and make sureMark Kettenis
we also free the additional mapped BAR on "cyclone" chips. ok deraadt@
2010-01-11Increase/decrease the per-CPU interrupt depth variable around APIC interruptsMark Kettenis
like we do for PIC interrupts. ok art@, deraadt@, oga@
2010-01-11dlg@ lost the SCSI_IGNORE_ILLEGAL_REQUEST flag on all SYNCHRONIZE_CACHEKenneth R Westerback
commands. Noticed & fix tested by halex@. ok dlg@
2010-01-11Add PIPEX option, disabled by default for now.Ryan Thomas McBride
ok deraadt yasuoka
2010-01-11Bring mutex protections to ststart, cdstart and ssstart, as alreadyKenneth R Westerback
done in sd. Make names consistant across all three. ok dlg@ tested (cd) & ok beck@
2010-01-11Pull in fix from kif via FreeBSD r1.114 to properly initializeKenneth R Westerback
uio_off. Prevents crap being passed as the starting offset to getdirentries(), which could lead to various kinds of confusion when trying to process cd9660 directory entries. Problem seen by jsg@, who also found the fix in FreeBSD. ok beck@
2010-01-11Negative offset or negative size in a buf is invalid. Treat just like otherKenneth R Westerback
invalid offsets and sizes: reject the i/o. ok deraadt@ beck@
2010-01-11When mapping CarBus memory BARs, enforce a minimum alignment of 0x1000. ThisMark Kettenis
is the granularity of the windows provided by the CardBus bridge. A smaller alignment may result in those windows covering address space used by other PCI devices in the machines. Fixes CardBus xl(4) n naddy's X40.
2010-01-11"final" leak in state creation: in pf_state_key_setup, if we actuallyHenning Brauer
need two state keys (NAT case), and we succeed allocating the first one but fail getting the second we'd leak the first one. obvious and thus ok'd by dlg ryan and theo within seconds
2010-01-11fix a bug in pf_create_state that was a major source of amusement for meHenning Brauer
over the last couple of weeks (ever since I found it): when we are out of memory for the state keys we leak the state. oh the irony. instead of just fixing that one case rework the error handling in the entire function. verified painfully by yours truly by forcefully exercising each and every error path in there. ryan ok
2010-01-11rework the polling code to use the semantic krw@ proposed.David Gwynne
intercept the ccb_done handling so polled commands set a flag that mpi_poll tests on. when ccb_done sets the variable, the poll loop breaks and mpi_poll runs the original ccb_done handler for the ccb completion. this is a lot simpler than the previous implementation and removes a mutex. ok beck@
2010-01-11Initial import PIPEX. PIPEX(Pppac IP EXtension) is a IP forwardingYASUOKA Masahiko
acceleration for PPP access concentrator. ok mcbride@ dlg@ deraadt@ reyk@.
2010-01-11Enable IP checksum offloading in ix(4).Reyk Floeter
Note: it did not work before because the checksum offloading was taking care about TCP and UDP but forgot about IP fragments and other IP protocols. We need to take care that IP fragments are handled correctly when we do IP/TCP/UDP offloading. ok jsg@ deraadt@, discussed with others
2010-01-11Be as careful with sd/cd buf queue manipulations as was found necessary forKenneth R Westerback
st's queue manipulations. i.e. ensure b_actb is correctly updated as the queue becomes empty or has an i/o requeued on it. Tested on claudio@'s backup crashing box. ok dlg@ beck@
2010-01-11remove some debug code that snuck in somehow.David Gwynne
2010-01-11Add mutex around work consuming loop in sdstart - this ensures that onlyBob Beck
one thread will be grabbing xs's at a time and dequeuing work, but avoids a race between notification there is work to do and exiting the loop releasing the xs's. Fixes problem noticed by claudio where usb disks would hang with the new minty dlg midlayer. ok krw@, dlg@, tested by claudio@
2010-01-11Don't check ITSDONE since we know it is set in scsi_done(). EliminatesKenneth R Westerback
possible references to xs which has been recycled. Slight tweak to dlg's previous fix for atapiscsi. ok dlg@ 'looks safe' miod@
2010-01-10replace a pad in the pfsync subheader with a length field. it stores theDavid Gwynne
length of its message in dwords. multiply that by the count of the messages to figure out how to skip to the next subheader. "old" code still thinks the len field is a pad, which it doesnt look at, so new messages with a filled in len are still parsed correctly by "old" code. input and ok mcbride@ sounds good! Simon Perreault
2010-01-10Restore delay on XS_BUSY result, just in case it is needed somewhere. PolishKenneth R Westerback
logic to eliminate FALLTHROUGH craziness. ok marco@ dlg@
2010-01-10ATI AHCI seems not to put slot number into the command registerAlexander Yurchenko
on error as the spec requires. This triggers kernel assertion error because zero is read from the register and wrong ccb is picked from the queue. To cope with it if there's only one outstanding command get its slot number from the active commands mask, otherwise fail all active commands. ok krw@ dlg@
2010-01-10Make sure END() matches the *{LEAF,ENTRY}() function names.Miod Vallat
2010-01-10Fix two bugs in IPsec/HMAC-SHA2:Markus Friedl
(1) use correct (message) block size of 128 byte (instead of 64 bytes) for HMAC-SHA512/384 (RFC4634). (2) RFC4868 specifies that HMAC-SHA-{256,384,512} is truncated to nnn/2 bits, while we still use 96 bits. 96 bits have been specified in draft-ietf-ipsec-ciph-sha-256-00 while draft-ietf-ipsec-ciph-sha-256-01 changed it to 128 bits. WARNING: this change makes IPsec with SHA-256 (the default) incompatible with older OpenBSD versions and other IPsec-implementations that share this bug. ok+tests naddy, fries; requested by reyk/deraadt
2010-01-10GCC doesn't respect the aligned attribute for automatic variables. SoMark Kettenis
having mutexes on the stack, like dlg@ added recently to the scsi code, doesn't work on hppa. So instead of relying on mutexes being properly alligned just reserve 4 words and use the one that has the proper alignment. ok miod@
2010-01-10Set XL_FLAG_FUNCREG for "cyclone" variants. This makes them see interruptsMark Kettenis
such that they actually work. ok jsg@
2010-01-10Reimplement kvm_getproc2()'s support for reading crash dumps andPhilip Guenthe
/dev/mem to be direct instead of going through kvm_getprocs(), as that function is going to get more an more broken as we move stuff from struct proc to struct process for rthreads. To minimize the code copying, put the common logic of filling in a kinfo_proc2 structure into a macro FILL_KPROC2() in <sys/sysctl.h> for use from both the kernel and user-space. This also hides the KERN_PROC #define behind "#if defined(_KERNEL)||defined(_LIBKVM)", as it's deprecated. Positive feedback from millert and blambert; so committing to unblock further rthreads work.
2010-01-10My mistake. There was one more driver paranoid enough to checkKenneth R Westerback
ITSDONE on getting the xs to execute. And optimistic enough to think simply restting the flag would be a good thing. Chill out like everyone else, reducing ITSDONE noise some more.
2010-01-10A couple of missed ITSDONE setting before scsi_done().Kenneth R Westerback
seagate/trm/aha1742 were the only drivers paranoid enough to check ITSDONE on getting the xs to execute. And optimistic enough to think simply restting the flag would be a good thing. Have them chill out like everyone else, reducing ITSDONE noise some more.
2010-01-10Set ITSDONE in scsi_done() and zap trivial instances of setting itKenneth R Westerback
in the drivers just before calling scsi_done(). ok dlg@ beck@
2010-01-10Do not try to reevaluate the current RX production index on eachChristian Weisgerber
loop iteration as it can be updated by the card while we process the RX ring, forcing us to process RX descriptors for which DMA synchronisation has not been performed. This fixes a bug where bge(4) will drop packets packets under heavy load. Adapted from FreeBSD by Brad.
2010-01-09L2 cache line is at least 64 bytes long on r10k, so use 64 byte increments toMiod Vallat
flush L2 in Mips10k_SyncCache().
2010-01-09Make interrupt depth counters per-cpu.Miod Vallat
2010-01-09Move more R5000 code behind proper #ifdef stanzas.Miod Vallat
2010-01-09Move cache information from global variables to per-cpu_info fields; thisMiod Vallat
allows processors with different cache sizes to be used. Cache management routines now take a struct cpu_info * as first parameter.
2010-01-09Zap all setting of ITSDONE in drivers that don't look at it. NobodyKenneth R Westerback
else cares so it's just noise. Drivers that actually look at ITSDONE are unchanged. ok marco@ (for his files) dlg@ beck@
2010-01-09a lot of knf loving. hudge diff, no binary change.Dariusz Swiderski
ok claudio@
2010-01-09panic with a nice message if scsi_xs_sync_done gets called twiceDavid Gwynne
rather than generating a fluffy printf.
2010-01-09dont try to prevent multiple concurrent runs of a devices start routineDavid Gwynne
by setting flags around the loop. there is a race which can prevent necessary work being completed by any of the currently running instances of xxstart. the caveat with the removal of this code is because multiple xxstarts can be running at the same time they can cause io reordering, but that is less of a problem than no io. found by and fix tested by claudio@ debugged with krw@ claudio@ beck@ deraadt@
2010-01-09always try to restart io on a device when an opening is made available fromDavid Gwynne
scsi_xs_put.
2010-01-09Define struct cpu_hwinfo, to hold hardware specific information about eachMiod Vallat
processor (instead of sys_config.cpu[]), and pass it in the attach_args when attaching cpu devices. This allows per-cpu information to be gathered late in the bootstrap process, and not be limited by an arbitrary MAX_CPUS limit; this will suit IP27 and IP35 systems better. While there, use this information to make sure delay() uses the speed information from the cpu it is invoked on.
2010-01-09No need to call bpfdetach() in mpe_clone_destroy() since this is done inClaudio Jeker
if_detach() which is called right afterwards. Found by Gleydson Soares (gleydson (at) trusted.com.br)
2010-01-09Correctly check /dev/kmem offsets within directly translated segments (XKPHYSMiod Vallat
or CKSEG) against the actual physical memory segments, instead of assuming contiguous physical memory starting from zero, as this is utterly wrong on Octane (and a bit less wrong on other systems (-: )
2010-01-09workaround for a HW bug (does not affect 4965AGN) that may sporadicallyDamien Bergamini
affect latency under some rare circumstances. from a similar commit to iwlwifi.
2010-01-09Avoid mulitple calls to scsi_done() on the same xs by havingKenneth R Westerback
ciss_cmd() call scsi_done() in the one case where ciss_done() was not calling ciss_done() before erroring out, and not calling scsi_done() after ciss_cmd() errors out. Okan's box can now boot. And work fine afterwards. Tested by okan@. ok dlg@ beck@
2010-01-09Add support for the Broadcom BCM57765 ASIC and newer BroadcomChristian Weisgerber
BCM577xx chipsets. From Brad.
2010-01-09replace an #ifdef IX_CSUM_OFFLOAD with an IFCAP_CSUM_IPv4 capability check,Reyk Floeter
this allows to enable/disable checksum offloading at one point in the driver without the need to care about stupid #defines. no functional change.
2010-01-09Explicitly turn on mii/gmii/rgmii for the 178/gigabit devicesJonathan Gray
from FreeBSD and confirmed with the datasheet.
2010-01-09Fix the IP ckecksum offloading logic that disables and breakes offloadingReyk Floeter
if the packet is neither TCP nor UDP because of an erroneous "default" case. No functional change in the default build because IP checksum offloading is currently disabled in ix(4). ok jsg@
2010-01-09Add code to stop scheduling processes on CPUs, effectively halting that CPU.Mark Kettenis
Use this to do a shutdown with only the boot processor running. This should avoid nasty races during shutdown. help from art@, ok deraadt@, miod@
2010-01-09Remove typo and magic numbers from #if 0'd block, from Brad.Stuart Henderson
2010-01-08During "ifconfig $if -inet6" remove v6 addresses even if theStefan Sperling
interface is marked down, and wrap interface detach/attach in splnet(). ok henning@ todd@, "I like the idea" deraadt@