summaryrefslogtreecommitdiff
path: root/sys/dev/sdmmc
AgeCommit message (Collapse)Author
2015-04-22Init error to 0 for sdmmc_mem_single_{read,write}_blockJonathan Gray
otherwise the value would be uninitialised in the unlikely case of being called with length 0.
2015-03-14Remove some includes include-what-you-use claims don'tJonathan Gray
have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
2015-02-16Memory leak if copyin() or copyout() fails; found by Maxime VillardMiod Vallat
max@M00nBSD.net's code scanner; ok doug@ jca@
2014-12-09More malloc() -> mallocarray() in the kernel.Doug Hogan
ok deraadt@ tedu@
2014-11-01fix the build when SDMMC_DEBUG is definedJonathan Gray
2014-09-23Fix high capacity (> 2GB) eMMC support.Raphael Graf
Based on a diff by Cedric Tessier, nezetic at gmail dot com, thanks! Discussed with and ok jsg@
2014-09-14remove uneeded proc.h includesJonathan Gray
ok mpi@ kspillner@
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2014-07-11"It's not the years, honey; it's the mileage."Ted Unangst
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.
2014-03-05Raise the delay before initializing sdmmc. Still a hack so the XXX stays,Stuart Henderson
but at least lets the reader on X220 work pretty reliably, rather than about 1/4 of the time. ok stsp@
2014-01-23if cold, do not use tsleep, but use the delay path.Theo de Raadt
Such as during DVACT_RESUME... ok guenther kettenis
2013-12-21rearrange DVACT_RESUME chunk to avoid implying something ridiculousTheo de Raadt
ok stsp
2013-12-06Add a DVACT_WAKEUP op to the *_activate() API. This is called after theTheo de Raadt
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
2013-11-18simplify kthread_create(). no more stdargTheo de Raadt
ok matthew guenther mikeb
2013-10-22Add code for SMC_CAPS_SINGLE_ONLY capability.Sylvestre Gallon
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@
2013-09-12Add basic support for eMMC memory.Raphael Graf
Heavily based on netbsd. Tested by dlg@, bcallah@ (sdhc), stsp@ (rstx) and me (ommmc). ok patrick@
2013-05-31Correct sequencing in ca_activate function. Some operations were in theTheo de Raadt
wrong order, and depth traversal was not gauranteed. ok stsp (tested too)
2012-10-08Revamp the sequences for suspend/hibernate -> resume so that the codeTheo de Raadt
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
2011-11-14local variable not needed in sdmmc_activateTheo de Raadt
2011-11-10Fixed config_pending calls in sdmmc(4)Uwe Stuehler
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@
2011-07-31Add support for the Ricoh 5U823 SD/MMC controller found on the x220.Mark Kettenis
ok deraadt@, phessler@
2011-07-17Backout a bunch of my SCSI commits from c2k11. At least one of theseMatthew Dempsky
is causing problems when trying to boot sparc64 from an isp(4). Verified to fix the sparc64/isp(4) regression by krw@; ok deraadt@
2011-07-09Simplify sdmmc_scsi by using SCSI_NO_ADAPTER_TARGET.Matthew Dempsky
Tested by drahn@
2011-07-09Kludge around sdmmc(4)'s poor design: replace "struct scsi_link *"Matthew Dempsky
with "struct scsibus_attach_args" in sdmmc_attach_args. ok krw@
2011-06-16dont respond to VPD inquiries with standard inquiry data. add aDavid Gwynne
check to make sure cmdlen is correct while there. ok miod@
2010-10-25Iopoolification. Tested by mcbride@, dlg@, and Gabriel Kihlman on tech@.Kenneth R Westerback
ok dlg@
2010-09-07remove the powerhook code. All architectures now use the ca_activate treeTheo de Raadt
traversal code to suspend/resume ok oga kettenis blambert
2010-08-31Add DVACT_QUIECE support. This is called before splhigh() and beforeTheo de Raadt
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.
2010-08-31activate function should return result of config_activate_childrenTheo de Raadt
2010-08-27Improve sdhc_activate, and make sdhc_powerhook a simple wrapper aroundTheo de Raadt
it for now ok kettenis
2010-08-27kill PWR_STANDBY (apm can use PWR_SUSPEND instead). While here, renumberTheo de Raadt
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
2010-08-24lockmgr -> rwlock conversionBret Lambert
and with this, my adventure in sdmmc-land is over bikeshed is still banana-shaped ok oga@
2010-08-19- fold several occurences of DEVNAME() into one located in sdmmcvar.h.Jasper Lievisse Adriaanse
making DEVNAME() usage a lot more consistent. ok krw@
2010-07-02One transition was wrong: Suspending without a card, and then resuming withTheo de Raadt
was doing an attach, detach, and re-attach. Repair the state transitions.
2010-07-02On resume, detach and then force a re-attach of the card, since we don'tTheo de Raadt
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
2010-07-02m_copyback can fail to allocate memory, but is a void fucntion so gymnasticsBret Lambert
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@
2010-06-20Don't use and maintain a function pointer that is only ever set to oneMichael Knudsen
function. Just call the function where needed. ok krw dlg
2010-05-20New scsi code seems to be stable. Pluck previously identifiedKenneth R Westerback
low-hanging splbio/splx pairs that are no longer needed and see if this reveals any hidden scsi flaws. ok dlg@
2010-03-23Change the scsi_cmd function member of scsi_adapter from int toKenneth R Westerback
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@
2010-02-11No need for M_CANFAIL if M_NOWAIT is used. Found by Gleydson Soares.Claudio Jeker
OK mk@
2010-02-10Only allow the common voltages of the card and the host when writing the OCRDale Rahn
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@
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@
2009-11-11fixup of locking issues with sdmmc, which were causingJasper Lievisse Adriaanse
"locking against myself" panics as found the hard way by several. diff by blamert@ with input from oga@, committing bret's behalf. ok todd@
2009-10-03Add missing <sys/device.h>.Mark Kettenis
ok deraadt@, miod@
2009-09-05scsi_done before COMPLETEDavid Gwynne
2009-07-15In sdmmc_intr_establish(), don't duplicate the `name' parameter.Michael Knudsen
Instead, just use the pointer, and don't free the pointer during sdmmc_intr_disestablish(). ok miod.
2009-06-29In sdmmc_intr_establish(), copy the entire name parameter instead ofMichael Knudsen
dumping the last byte. Input from otto@ and peter@. ok on an earlier diff from miod (and krw IIRC).
2009-04-07Remove recursion from the sdmmc locking regime.Bret Lambert
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@
2009-03-24Remove redundant casts.Mark Kettenis
2009-02-20Let the sdmmc adapters tell the sdmmc layer how much sectors they canMiod Vallat
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.