summaryrefslogtreecommitdiffstats
path: root/sys/dev/sdmmc (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* Extend the scsi_adapter minphys() callback to take a struct scsi_link *miod2009-02-161-3/+3
| | | | | | as additional argument. This will allow intermediate layers between scsi devices such as sd and scsi host adapters to take appropriate action if necessary.
* Fix crash on zaurus when sd memory card plugged by providing an attachmentgrange2009-02-062-5/+5
| | | | structure that slave devices like sbt expect.
* Replace timeout_add(msecs * hz / 1000) with timeout_add_msec(msecs).grange2009-01-211-2/+2
| | | | | | No functional changes. ok krw@ miod@
* Trivial lvalue abuse fixes, no binary changes.grange2009-01-131-2/+3
| | | | ok millert@ tedu@
* Explain that any check pattern will work.jsg2009-01-091-2/+2
| | | | Suggested by miod@
* Add support for SDHC cards on SDHC capable host controllers.jsg2009-01-094-9/+64
| | | | | | | Thanks to everyone who tested in particular jsing@ who found several problems in the initial diffs. ok dlg@ jsing@ miod@
* backout: would have been nice if this had been tested, to see that itderaadt2008-12-025-46/+20
| | | | crashes the moment a card is plugged in.
* Rework sdmmc locking to remove recursionblambert2008-11-245-20/+46
| | | | | | | 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@
* new workq_create interface. discovered by Vladimir Kirillovtedu2008-11-011-2/+2
|
* Fix broken cast on 64bit platformsuwe2008-02-251-3/+3
|
* Sync sys/netbt with NetBSDuwe2008-02-241-49/+150
| | | | ok deraadt@
* unbreak the zaurus kernel build by adding a missing headertodd2007-11-291-1/+2
| | | | co-discovered by robert@
* More easy bzero() -> M_ZERO. Use 'p = malloc(sizeof(*p) ...' wherekrw2007-10-011-4/+2
| | | | obvious.
* Only the most obvious bzero() -> M_ZERO changes. No cast changes, nokrw2007-09-171-3/+2
| | | | | MALLOC/FREE, etc. Just adding M_ZERO to malloc() and deleting an immediately adjacent bzero().
* KNFgilles2007-09-112-5/+5
| | | | prompted and "much better" by marco@, ok pyr@
* more MALLOC/FREE -> malloc/free and M_ZERO changesgilles2007-09-103-18/+14
| | | | ok pyr@