summaryrefslogtreecommitdiff
path: root/sys/dev
AgeCommit message (Collapse)Author
2010-01-13Change M_WAITOK --> M_WAITOK | M_CANFAILCharles Longeau
With input from oga@ While there, remove dead assignment and newly created unused variable (found by LLVM/Clang Static Analyzer) ok oga@ krw@
2010-01-12Fix for a legacy free PC, where the keyboard controller doesn't behave.Dale Rahn
Clues on how to fix it from miod. ok miod@, Sure deraadt@
2010-01-12Do not check malloc return value against NULL, as M_WAITOK is used.Charles Longeau
ok miod@
2010-01-12Remove dead assignment and newly created unused variable.Charles Longeau
Found by LLVM/Clang Static Analyzer. ok grange@ krw@
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-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-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-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-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-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-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-10Set XL_FLAG_FUNCREG for "cyclone" variants. This makes them see interruptsMark Kettenis
such that they actually work. ok jsg@
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-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-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-09Remove typo and magic numbers from #if 0'd block, from Brad.Stuart Henderson
2010-01-07Rename _rxfilter functions to _iff for consistency. From Brad, ok kevlo@Stuart Henderson
2010-01-07dont use the xs in the scsi_cmd routines after calling ciss_cmd, it mightDavid Gwynne
have been completed. the xs was used to figure out if we should return COMPLETED or SUCCESFULLY_QUEUED. the return value doesnt mean anything anymore, so just return COMPLETE.
2010-01-07CISS_UNLOCK before returning from the scsi_cmd handler when we hit NO_CCB.David Gwynne
this should solve problems like this: WARNING: SPL NOT LOWERED ON SYSCALL 16384 8 EXIT dae4560 6 Stopped at Xsyscall+0x1eb: movl $0,%gs:0x3d4 ddb{3}>
2010-01-06syncStuart Henderson
2010-01-06Add Canon PowerShot SX100, Linksys WUSB600N v2 (new version of RT2870). From ↵Stuart Henderson
Brad.
2010-01-06syncStuart Henderson
2010-01-06New Broadcom nics, from Linux driver via Brad.Stuart Henderson
2010-01-05dont need to end statements with two semicolons. one is enough.David Gwynne
pointed out by miod@ and claudio@
2010-01-05atapiscsi didnt call scsi_done when the xfer had SCSI_POLL set. this isDavid Gwynne
Bad. this sort of worked before because the midlayer would sleep on the ITSDONE flag in the scsi_xfer, which atapiscsi does set. however, with the introduction of scsi_xs_sync, it now sleeps on a condition that is only cleared if the adapter properly and correctly calls scsi_done when it is in fact done with the xfer. sorry guys. ok krw@
2010-01-04remove dead assignment and newly created unused variable.Charles Longeau
Found by LLVM/Clang Static Analyzer. ok krw@ dlg@
2010-01-04turn off verboseTheo de Raadt
2010-01-04rename ccb_xs to ccb_cookie and change its type from a scsi_xfer * to aDavid Gwynne
void *. this lets us pass things other than scsi_xfers to ccb completion handlers.
2010-01-04protect the ccb free queue with a mutex rather than splbioDavid Gwynne
2010-01-04Add a few missing scsi_done()'s before returning COMPLETE. AlsoKenneth R Westerback
return COMPLETE and not CMD_COMPLETE in one case. Tested by kettenis@ and myself on Blade1000's. ok dlg@
2010-01-03delete unused variableTheo de Raadt
2010-01-03change M_WAITOK --> M_WAITOK|M_CANFAILCharles Longeau
with input from marco@ ok marco@ krw@ this was ok looooooooong time ago but lost in my mailbox
2010-01-03oops, get the order of args right for the header request inDavid Gwynne
mpi_bio_get_pg0_raid. the sensor updates dont poll at all now.
2010-01-03mpi_bio_get_pg0_raid is only called from a process context. let the cfgDavid Gwynne
requests sleep rather than poll for completion.
2010-01-03oops, forgot to set the ccb_cookie in mpi_wait. mpi_wait_done would faultDavid Gwynne
when it used the uninitialized cookie.
2010-01-03get rid of the last internal user of splbio. waiting for the completion ofDavid Gwynne
a ccb can now be done with mpi_wait. this switches the cfg page handlers over from their own tsleep stuff to mpi_wait.
2010-01-03rename ccb_xs to ccb_cookie, and switch it from a struct scsi_xfer * to aDavid Gwynne
void *. this will let me stash things other than scsi xfers in the ccb for ccb_done handlers to use.
2010-01-03dont leak a ccb if we fail to get a reply in portenableDavid Gwynne
2010-01-03when getting a reply from the hw, only sync the dmamem for that one replyDavid Gwynne
rather than all the replies.
2010-01-03switch mpi from using splbio to protect itself over to mutexes.David Gwynne
mpi only needs two mutexes, one for the list of free ccbs, and another to protect the reply doorbell. the latter is necessary to allow polling for command completion to work in smp systems. tested on sas and fc hbas. this diff was written over 2 years ago now with surprisingly few tweaks to handle changes that have occurred since then.
2010-01-02When finding certain novatel devices in mass storage modeJonathan Gray
we need to do scsi ejects. One reported/tested by lahrcm@hotmail.com another suggested by David Coppa based on what FreeBSD does.
2009-12-31syncTheo de Raadt