summaryrefslogtreecommitdiff
path: root/sys/dev/sdmmc
AgeCommit message (Collapse)Author
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.
2009-02-16Extend the scsi_adapter minphys() callback to take a struct scsi_link *Miod Vallat
as additional argument. This will allow intermediate layers between scsi devices such as sd and scsi host adapters to take appropriate action if necessary.
2009-02-06Fix crash on zaurus when sd memory card plugged by providing an attachmentAlexander Yurchenko
structure that slave devices like sbt expect.
2009-01-21Replace timeout_add(msecs * hz / 1000) with timeout_add_msec(msecs).Alexander Yurchenko
No functional changes. ok krw@ miod@
2009-01-13Trivial lvalue abuse fixes, no binary changes.Alexander Yurchenko
ok millert@ tedu@
2009-01-09Explain that any check pattern will work.Jonathan Gray
Suggested by miod@
2009-01-09Add support for SDHC cards on SDHC capable host controllers.Jonathan Gray
Thanks to everyone who tested in particular jsing@ who found several problems in the initial diffs. ok dlg@ jsing@ miod@
2008-12-02backout: would have been nice if this had been tested, to see that itTheo de Raadt
crashes the moment a card is plugged in.
2008-11-24Rework sdmmc locking to remove recursionBret Lambert
Add SDMMC_ASSERT_LOCKED(), replacing many locking calls, and sprinkling the assertion to make sure that future changes don't catch us out "please commit" uwe@
2008-11-01new workq_create interface. discovered by Vladimir KirillovTed Unangst
2008-02-25Fix broken cast on 64bit platformsUwe Stuehler
2008-02-24Sync sys/netbt with NetBSDUwe Stuehler
ok deraadt@
2007-11-29unbreak the zaurus kernel build by adding a missing headerTodd T. Fries
co-discovered by robert@
2007-10-01More easy bzero() -> M_ZERO. Use 'p = malloc(sizeof(*p) ...' whereKenneth R Westerback
obvious.
2007-09-17Only the most obvious bzero() -> M_ZERO changes. No cast changes, noKenneth R Westerback
MALLOC/FREE, etc. Just adding M_ZERO to malloc() and deleting an immediately adjacent bzero().
2007-09-11KNFGilles Chehade
prompted and "much better" by marco@, ok pyr@
2007-09-10more MALLOC/FREE -> malloc/free and M_ZERO changesGilles Chehade
ok pyr@
2007-09-06Don't try disabling bus power before setting the voltage onJonathan Gray
the buggy ENE controller. Tested by Alexey Suslikov <alexey.suslikov@gmail.com> who pointed out a similiar workaround in Linux. ok miod@, nit and ok kettenis@