summaryrefslogtreecommitdiffstats
path: root/sys/dev/sdmmc (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Init error to 0 for sdmmc_mem_single_{read,write}_blockjsg2015-04-221-3/+3
| | | | | otherwise the value would be uninitialised in the unlikely case of being called with length 0.
* Remove some includes include-what-you-use claims don'tjsg2015-03-144-8/+4
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* Memory leak if copyin() or copyout() fails; found by Maxime Villardmiod2015-02-161-8/+11
| | | | max@M00nBSD.net's code scanner; ok doug@ jca@
* More malloc() -> mallocarray() in the kernel.doug2014-12-091-2/+2
| | | | ok deraadt@ tedu@
* fix the build when SDMMC_DEBUG is definedjsg2014-11-012-3/+4
|
* Fix high capacity (> 2GB) eMMC support.rapha2014-09-232-12/+18
| | | | | | Based on a diff by Cedric Tessier, nezetic at gmail dot com, thanks! Discussed with and ok jsg@
* remove uneeded proc.h includesjsg2014-09-143-6/+3
| | | | ok mpi@ kspillner@
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-125-15/+15
| | | | after discussions with beck deraadt kettenis.
* "It's not the years, honey; it's the mileage."tedu2014-07-112-588/+1
| | | | | | bluetooth support doesn't work and isn't going anywhere. the current design is a dead end, and should not be the basis for any future support. general consensus says to whack it so as to not mislead the unwary.
* Raise the delay before initializing sdmmc. Still a hack so the XXX stays,sthen2014-03-051-2/+2
| | | | | but at least lets the reader on X220 work pretty reliably, rather than about 1/4 of the time. ok stsp@
* if cold, do not use tsleep, but use the delay path.deraadt2014-01-231-2/+2
| | | | | Such as during DVACT_RESUME... ok guenther kettenis
* rearrange DVACT_RESUME chunk to avoid implying something ridiculousderaadt2013-12-211-2/+2
| | | | ok stsp
* Add a DVACT_WAKEUP op to the *_activate() API. This is called after thederaadt2013-12-062-15/+12
| | | | | | | | kernel resumes normal (non-cold, able to run processes, etc) operation. Previously we were relying on specific DVACT_RESUME op's in drivers creating callback/threads themselves, but that has become too common, indicating the need for a built-in mechanism. ok dlg kettenis, tested by a sufficient amount of people
* simplify kthread_create(). no more stdargderaadt2013-11-181-2/+2
| | | | ok matthew guenther mikeb
* Add code for SMC_CAPS_SINGLE_ONLY capability.syl2013-10-221-8/+83
| | | | | | | | | This capability force the sdmmc stack to only issue single blocks transfers. tested by rapha@ and I on ommmc(4). tested by rapha@ on pxammc(4). ok rapha@
* Add basic support for eMMC memory.rapha2013-09-125-11/+214
| | | | | | | | Heavily based on netbsd. Tested by dlg@, bcallah@ (sdhc), stsp@ (rstx) and me (ommmc). ok patrick@
* Correct sequencing in ca_activate function. Some operations were in thederaadt2013-05-312-6/+13
| | | | | wrong order, and depth traversal was not gauranteed. ok stsp (tested too)
* Revamp the sequences for suspend/hibernate -> resume so that the codederaadt2012-10-081-1/+5
| | | | | | | | | | paths are reflexive. It is now possible to fail part-way through a suspend sequence, and recover along the resume code path. Split DVACT_SUSPEND by adding a new DVACT_POWERDOWN method is used after hibernate (and suspend too) to finish the job. Some drivers must be converted at the same time to use this instead of shutdown hooks (the others will follow at a later time) ok kettenis mlarkin
* local variable not needed in sdmmc_activatederaadt2011-11-141-3/+2
|
* Fixed config_pending calls in sdmmc(4)uwe2011-11-102-8/+11
| | | | | | | | Root on SD/MMC card did not work reliably because the config_pending state was cleared too early. This change will clear config_pending only after the card discovery has actually completed once. ok deraadt@ drahn@
* Add support for the Ricoh 5U823 SD/MMC controller found on the x220.kettenis2011-07-312-6/+6
| | | | ok deraadt@, phessler@
* Backout a bunch of my SCSI commits from c2k11. At least one of thesematthew2011-07-172-13/+14
| | | | | | is causing problems when trying to boot sparc64 from an isp(4). Verified to fix the sparc64/isp(4) regression by krw@; ok deraadt@
* Simplify sdmmc_scsi by using SCSI_NO_ADAPTER_TARGET.matthew2011-07-091-10/+9
| | | | Tested by drahn@
* Kludge around sdmmc(4)'s poor design: replace "struct scsi_link *"matthew2011-07-092-5/+5
| | | | | | with "struct scsibus_attach_args" in sdmmc_attach_args. ok krw@
* dont respond to VPD inquiries with standard inquiry data. add adlg2011-06-161-13/+36
| | | | | | check to make sure cmdlen is correct while there. ok miod@
* Iopoolification. Tested by mcbride@, dlg@, and Gabriel Kihlman on tech@.krw2010-10-251-25/+25
| | | | ok dlg@
* remove the powerhook code. All architectures now use the ca_activate treederaadt2010-09-072-9/+2
| | | | | traversal code to suspend/resume ok oga kettenis blambert
* Add DVACT_QUIECE support. This is called before splhigh() and beforederaadt2010-08-311-1/+4
| | | | | | | | DVACT_SUSPEND, therefore DVACT_QUIECE can do standard sleeping operations to get ready. Discussed quite a while back with kettenis and jakemsr, oga suddenly needed it as well and wrote half of it, so it was time to finish it. proofread by miod.
* activate function should return result of config_activate_childrenderaadt2010-08-311-5/+5
|
* Improve sdhc_activate, and make sdhc_powerhook a simple wrapper aroundderaadt2010-08-272-17/+19
| | | | | it for now ok kettenis
* kill PWR_STANDBY (apm can use PWR_SUSPEND instead). While here, renumberderaadt2010-08-271-2/+1
| | | | | | | PWR_{SUSPEND,RESUME} so that they match the values of DAVCT_{SUSPEND,RESUME} so that we can eventually (many more steps...) kill the powerhook garbage and use the activate mechanism. no objections
* lockmgr -> rwlock conversionblambert2010-08-247-85/+84
| | | | | | | and with this, my adventure in sdmmc-land is over bikeshed is still banana-shaped ok oga@
* - fold several occurences of DEVNAME() into one located in sdmmcvar.h.jasper2010-08-198-60/+52
| | | | | | making DEVNAME() usage a lot more consistent. ok krw@
* One transition was wrong: Suspending without a card, and then resuming withderaadt2010-07-022-3/+9
| | | | was doing an attach, detach, and re-attach. Repair the state transitions.
* On resume, detach and then force a re-attach of the card, since we don'tderaadt2010-07-022-3/+33
| | | | | | know if it is the same card or if it got modified while we were not paying attention. Tested on x40 under apm, and some acpi machines. ok mlarkin kettenis
* m_copyback can fail to allocate memory, but is a void fucntion so gymnasticsblambert2010-07-021-2/+2
| | | | | | | | | are required to detect that. Change the function to take a wait argument (used in nfs server, but M_NOWAIT everywhere else for now) and to return an error ok claudio@ henning@ krw@
* Don't use and maintain a function pointer that is only ever set to onemk2010-06-201-7/+3
| | | | | | function. Just call the function where needed. ok krw dlg
* New scsi code seems to be stable. Pluck previously identifiedkrw2010-05-201-16/+1
| | | | | | | low-hanging splbio/splx pairs that are no longer needed and see if this reveals any hidden scsi flaws. ok dlg@
* Change the scsi_cmd function member of scsi_adapter from int tokrw2010-03-231-15/+14
| | | | | | | | | | | | | void. Use XS_NO_CCB error in the scsi command (xs) to report the NO_CCB condition. Eliminates all SUCCESSFULLY_QUEUED and COMPLETE confusion and untangles the midlayer from the adapter a bit more. Eyes and some fixes by miod@ There may be some compile issues on little used (i.e. I don't have any) drivers but the change is mechanical and thus easy to remedy. ok dlg@
* No need for M_CANFAIL if M_NOWAIT is used. Found by Gleydson Soares.claudio2010-02-111-2/+2
| | | | OK mk@
* Only allow the common voltages of the card and the host when writing the OCRdrahn2010-02-101-1/+3
| | | | | back to the card. fixes a problem where the controller supported lower voltages than the card. With variable name change requested miod, ok miod@ krw@
* Zap all setting of ITSDONE in drivers that don't look at it. Nobodykrw2010-01-091-3/+1
| | | | | | | else cares so it's just noise. Drivers that actually look at ITSDONE are unchanged. ok marco@ (for his files) dlg@ beck@
* fixup of locking issues with sdmmc, which were causingjasper2009-11-113-8/+43
| | | | | | | | "locking against myself" panics as found the hard way by several. diff by blamert@ with input from oga@, committing bret's behalf. ok todd@
* Add missing <sys/device.h>.kettenis2009-10-034-4/+8
| | | | ok deraadt@, miod@
* scsi_done before COMPLETEdlg2009-09-051-1/+4
|
* In sdmmc_intr_establish(), don't duplicate the `name' parameter.mk2009-07-151-11/+3
| | | | | | | Instead, just use the pointer, and don't free the pointer during sdmmc_intr_disestablish(). ok miod.
* In sdmmc_intr_establish(), copy the entire name parameter instead ofmk2009-06-291-3/+5
| | | | | | | | dumping the last byte. Input from otto@ and peter@. ok on an earlier diff from miod (and krw IIRC).
* Remove recursion from the sdmmc locking regime.blambert2009-04-075-19/+66
| | | | | | | | | In snaps for a while. Originally hacked on phessler@'s couch. Testing by many, input from jsg@ "I'm tired of seeing the Ms" deraadt@
* Remove redundant casts.kettenis2009-03-241-4/+3
|
* Let the sdmmc adapters tell the sdmmc layer how much sectors they canmiod2009-02-205-16/+25
| | | | | | | | transfer with one command. Build on this and the recent minphys() changes in the sdmmc layer to crank transfers at the maximum possible size instead of a sad DEV_BSIZE. Depending on your controller, this can speed up sdmmc I/O up to 2.5 times.