summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2010-04-12Some of the line disciplines want to check for suser. Better to pass themTed Unangst
a process instead of using curproc. ok deraadt
2010-04-12dont need to call scsi_done with splbio. the midlayer protectsDavid Gwynne
itself now, its not the adapters responsibility anymore.
2010-04-12i snuck fine grained locking into the midlayer as part of all theDavid Gwynne
other stuff ive been doing in here. everything that needs protection inside the midlayer and the scsi device drivers (sd, cd, etc) uses mutexes now. this pushes splbio out of the midlayer. splbio is only taken before biodone is called now. ok beck@ marco@ krw@ deraadt@. theyre all terrified, but they all say if we're going to do then now is the right stage of the dev cycle.
2010-04-11In sys_ioctl(), change the type of stkbuf to u_long to make sure it isMark Kettenis
properly aligned. Otherwise we lose on strict alignment architectures if the compiler happens to give it a smaller alignment. Fixes another gcc4 problem on sparc64. ok miod@
2010-04-11Send "STANDBY IMMEDIATE" command to ATA disks upon suspend. For this to work,Mark Kettenis
pciide(4) needs to formward DVACT_SUSPEND and DVACT_RESUME events to its children, so do that. Gets rid of the nasty "click" sound from the disk on many laptops. ok marco@, jsg@
2010-04-11Make gcc4 happy. From NetBSD. Probably reported to me before by jsg@ orMark Kettenis
robert@.
2010-04-10fix athn_stop_tx_dmaDamien Bergamini
2010-04-10grrr var names in protosMarco Peereboom
2010-04-10sprinkle some bus_dmamap_sync around frame access.Marco Peereboom
prompted by oga
2010-04-10Remove a bunch of if 0ed out code that used vtophys. it hasn't been usedOwain Ainsworth
by now, probably won't be in the future. ok krw. "Correctski" from miod@ after I put back another chunk he wanted to remain.
2010-04-10Make this compile with gcc4. Cleanup some debug code while I'm there.Mark Kettenis
2010-04-10Add radeon 4850; from Sviatoslav Chagaev (slava at zb dot lv), ta.Owain Ainsworth
2010-04-10pmap_extract() does the equivalent of vtophys if pmap_kernel(), so instead ofOwain Ainsworth
doing if (p != NULL) pmap_extract() else vtophys() in a loop, just do pmap_extract unconditionally. ok miod@ (he found a typo, all hail miod!)
2010-04-10The statement c != '\0' != 0 doesn't make an awful lot of sense, so drop theMark Kettenis
!= 0 bit. Makes GCC 4.2.1 happy.
2010-04-10some frees that were forgottenMarco Peereboom
2010-04-10always do a full reset when changing the channel on AR5008 devices,Damien Bergamini
until i figure out why TX sometimes gets stucked. a full reset was already necessary on AR9280 devices, so there is no change for these devices.
2010-04-10Intel Centrino Advanced-N 6200 G2 adapters have their own hardwareDamien Bergamini
revision type.
2010-04-10regenDamien Bergamini
2010-04-10new Intel Centrino Advanced-N 6200 G2 idDamien Bergamini
2010-04-10enable debug mode for >=RT3090Damien Bergamini
add a wait flag to rt2860_mcu_cmd to wait for command completion more RT3090 RF initialization code
2010-04-09make more bettah. instead of doing:Owain Ainsworth
switch(type) { case VREG: /*something */ break; case VLNK: /* something */ break; default: panic("wtf?"); } do_something_that_doesn't_change_type(); switch(type) { case VREG: /* nowt */ break; case VLNK: n = 0; break; default: panic("wtf?"); } be a bit less silly and replace the second switch with: if (type == VLNK) n = 0; ok beck@, blambert@
2010-04-09In the nfs bio functions, instead of looking at an invalid vnode type,Owain Ainsworth
deciding to do nothing, printing about it and continuing along our merry way without even erroring the sodding buffer, just panic. by this point we are liked very fucked up anyway. found in either edmonton or stockholm then forgotten. ok beck@, blambert@
2010-04-09Attach to BCM5481, BCM5482. From Brad.Stuart Henderson
2010-04-09encif is a global variable and thus pre-zeroed, don't bother bzero()ingOwain Ainsworth
it after the fact. ok henning@, claudio@
2010-04-09replace pool_get(), memset(,0,) with pool_get(,PR_ZERO) as $DEITYOwain Ainsworth
intended. ok claudio@, henning@
2010-04-09- add and enable pgs(4), a driver for the Programmers Switch found onJasper Lievisse Adriaanse
recent-ish macs with macgpio(4). Basically dropping one to DDB when pushed. ...and not to be confused by the "reset" button ;-) feedback and ok drahn@
2010-04-09Prevent an interrupt from causing recursion while holding the pmap hash lock,Dale Rahn
Otherwise a pmap_remove from a completed I/O may deadlock.
2010-04-09- don't use memset() where we should use bzero()Jasper Lievisse Adriaanse
* no binary change ok drahn@
2010-04-09oopsie, misplaced {Marco Peereboom
2010-04-09- event handling rewrite (while preserving original logic);Marco Peereboom
- support additional volume events; - track volume rebuild progress; - support for drive hotplug; - log when volume state changes and when we start to resync; - mpii_device handling rewrite (r/b tree is no more); - improvements in mpii_ioctl_* functions; - use internal disk_phys_num again as phy port number based scheme was proven to be unreliable; - fixup ioc_status check in mpii_scsi_cmd_done; - change Offline state to Invalid when drive is gone; - fixup recognition of the rebuilding state; - don't leak ccb if poll fails; - make use of the MPII_F_RAID flag and register with bio only if there are RAID capabilities (idea from mpi); - EVENT_UNMASK macro improvement from Kai Doernemann; - use proper endianness when setting ccb_dev_handle; - lower a polling delay in the mpii_complete; - improve readability and debugging output in several places; - change semantics of the SAS discovery event handler; - start of the event cleanup; - start of the whitespace cleanup; - start of the KNF cleanup; from Mike Belopuhov <mkb@crypt.org.ru>
2010-04-09fix double free in an error path. the midlayer gets the ccb for scsi ioDavid Gwynne
now, so it not our job to free it.
2010-04-08Since we only start doing tlb shootdowns after setting the CPUF_RUNNING flag,Mark Kettenis
flush the TLB immediately after doing so, to make sure there are no stale TLB entries. Suggested by art@ ok art@, oga@, deraadt@, weingart@
2010-04-08DRM memory management for inteldrm(4) using the Graphics ExecutionOwain Ainsworth
Manager api. This is currently disabled by default under ifdef INTELDRM_GEM (option INTELDRM_GEM in a kernel config or a patch to i915_drv.h needed to enable), mostly because the intel X driver currently in tree does not always play well with GEM and needs to be switched to UXA accelmethod (which is the only option on later drivers). While based on the intel drm code in the linux kernel this has come cleanups and some obvious behaviour changes: 1) mmap through the GTT is entirely coherent with the gpu cache, removing mappings whenever the cache dirties so you can not race with userland to write to memory at the same time as the gpu. 2) pread/pwrite access is tiling-correct, so userland does not need to tile manually (mesa has already been fixed for this a while ago). The straw that broke the camels back here was the bit17 swizzling stuff on some mobile gpus meansing that while userland did the swizzle itself, the kernel had to do *extra* swizzling, this was frankly retarded so the option was dropped. 3) there is no option to map via the cpu from userland, again due to coherency issues. 4) additional integer overflow checking in some areas. 5) we only support the newer EXECBUFFER2 command submission ioctl. the old one is not supported at all (libdrm was fixed WRT over a week ago). now the TODOs: 1) the locking is funky and is only correct due to biglock. it does however work due to that. This will be fixed in tree, the design in formulating in my head as I type. 2) there are currently no memory limits on drm memory, this needs to be changed. 3) we really need PAT support for the machines where MTRRs are useless, else drm uses quite a lot of cpu (this is a bug that continues from the older code though, nothing new). 4) gpu resetting support on other than 965 is not written yet. 5) currently a lot of the code is in inteldrm, when memory management comes to other chipset common code will be factored out into the drm midlayer. Tested on: 855 (x40), GM965 and 915 by me. 945 by armani@ and jkmeuser@, gm45 by armani@ and marco@. More testing is needed before I enable this by default though. Others also provided testing by what they tested escapes me right now. In order to test this enable INTELDRM_GEM in a kernel and add the following line to the driver section in xorg.conf (I am working on a patch to autodetect the X stuff): Option "AccelMethod" "UXA"
2010-04-08remove unneeded variable. ratchov@ okFederico G. Schwindt
2010-04-08Fill in the bus_dma_sync for intagp to use clflush instead of wbinvd()Owain Ainsworth
if supported. When we do memory management on intel this would lead to a LOT of wbinvd() to deal with gpu->cpu incoherency. no one wants that. Needed for sanity of inteldrm memory management which is coming up next.
2010-04-08On amd64, move the bus_dma buftype stuff that is only used by sg_dmaOwain Ainsworth
into the sg_dma code instead of main bus_dma. Add identical code to i386 since this will be used in the next commit. ok kettenis@ back in december.
2010-04-08these files don't need to include proc.h anymore. ok oga for agpTed Unangst
2010-04-07- add my shantou DM9601 (UQ_NO_STRINGS).Jasper Lievisse Adriaanse
ok sthen@
2010-04-07Add Velleman K8055 USB experimenter kit (from Jens Teglhus Moller)Stuart Henderson
and Belkin F6C120 UPS, both UQ_BAD_HID.
2010-04-07syncStuart Henderson
2010-04-07Add Velleman K8055 USB experimenter kit (from Jens Teglhus Moller)Stuart Henderson
and Belkin F6C120 UPS.
2010-04-07Move UQ_BAD_HIDs together and line up columns better.Stuart Henderson
ok deraadt@, earlier version ok jasper@, feedback halex@
2010-04-07Move descriptive comments right onto the line with the definitionStuart Henderson
to ease grepping, rewording them slightly to mostly fit onto 1 line and to clarify UQ_EHCI_NEEDTO_DISOWN. ok deraadt@
2010-04-07Make intagp restore pgtbl_ctl and the scratch page to the gtt on resume.Owain Ainsworth
When we move more towards kms we'll need to save/restore what is bound to the aperture, but right now this is not needed (since we always unbind everything before we go down anyway). "can not hurt" deraadt@. tested by halex, deraadt and maybe some others.
2010-04-07Correctly initialize cursor attribute when this display is a console device;Miod Vallat
tested by marco@
2010-04-07If we have done a wsdisplay_suspend(), and ACPI decides it does not want toTheo de Raadt
suspend, we must roll back by calling wsdisplay_resume() or the virtual console switching will be locked forever ok oga
2010-04-07txq->lastds is only valid when txq is not empty.Damien Bergamini
Check for emptiness of the TX queue instead of lastds != NULL. I have a feeling this might fix the "device timeout" issues reported by Rivo Nurges on his AR5418 unveiled by athn.c r1.28 commit, though he is not around to confirm. This is a candidate for -stable.
2010-04-07update initvals and TX gains for AR9285 >=1.2Damien Bergamini
check result of carrier leakage calibration and redo calibration if needed add support for newer AR9285 chips (AR9285 XE 2.0). tested for non-regression on a DNXA-95 "Still seems to work here" kettenis@
2010-04-07Make suspend/resume work on MP machines (running an MP kernel). Joint workMark Kettenis
from mlarkin@ and me, with some amd64 fixes thrown in by deraadt@ ok marco@, deraadt@, pirofti@, mlarkin@
2010-04-06update a random sampling of drivers after the proc.h -> systm.h moveTed Unangst