<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/mmc/card, branch v3.13</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/mmc/card?h=v3.13</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/mmc/card?h=v3.13'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-11-18T22:47:30Z</updated>
<entry>
<title>Merge tag 'mmc-updates-for-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc</title>
<updated>2013-11-18T22:47:30Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-11-18T22:47:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c2ac2ae44d4c32382d001672021116e771bef4c9'/>
<id>urn:sha1:c2ac2ae44d4c32382d001672021116e771bef4c9</id>
<content type='text'>
Pull MMC updates from Chris Ball:
 "MMC highlights for 3.13:

  Core:
   - Improve runtime PM support, remove mmc_{suspend,resume}_host().
   - Add MMC_CAP_RUNTIME_RESUME, for delaying MMC resume until we're
     outside of the resume sequence (in runtime_resume) to decrease
     system resume time.

  Drivers:
   - dw_mmc: Support HS200 mode.
   - sdhci-eshdc-imx: Support SD3.0 SDR clock tuning, DDR on IMX6.
   - sdhci-pci: Add support for Intel Clovertrail and Merrifield"

* tag 'mmc-updates-for-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (108 commits)
  mmc: wbsd: Silence compiler warning
  mmc: core: Silence compiler warning in __mmc_switch
  mmc: sh_mmcif: Convert to clk_prepare|unprepare
  mmc: sh_mmcif: Convert to PM macros when defining dev_pm_ops
  mmc: dw_mmc: exynos: Revert the sdr_timing assignment
  mmc: sdhci: Avoid needless loop while handling SDIO interrupts in sdhci_irq
  mmc: core: Add MMC_CAP_RUNTIME_RESUME to resume at runtime_resume
  mmc: core: Improve runtime PM support during suspend/resume for sd/mmc
  mmc: core: Remove redundant mmc_power_up|off at runtime callbacks
  mmc: Don't force card to active state when entering suspend/shutdown
  MIPS: db1235: Don't use MMC_CLKGATE
  mmc: core: Remove deprecated mmc_suspend|resume_host APIs
  mmc: mmci: Move away from using deprecated APIs
  mmc: via-sdmmc: Move away from using deprecated APIs
  mmc: tmio: Move away from using deprecated APIs
  mmc: sh_mmcif: Move away from using deprecated APIs
  mmc: sdricoh_cs: Move away from using deprecated APIs
  mmc: rtsx: Remove redundant suspend and resume callbacks
  mmc: wbsd: Move away from using deprecated APIs
  mmc: pxamci: Remove redundant suspend and resume callbacks
  ...
</content>
</entry>
<entry>
<title>ARM: 7797/1: mmc: Use dma_max_pfn(dev) helper for bounce_limit calculations</title>
<updated>2013-10-31T14:49:27Z</updated>
<author>
<name>Santosh Shilimkar</name>
<email>santosh.shilimkar@ti.com</email>
</author>
<published>2013-07-29T13:20:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8e0cb8a1f6acf673ef9ab573087020ebafa8da51'/>
<id>urn:sha1:8e0cb8a1f6acf673ef9ab573087020ebafa8da51</id>
<content type='text'>
DMA bounce limit is the maximum direct DMA'able memory beyond which
bounce buffers has to be used to perform dma operations. MMC queue layr
relies on dma_mask but its calculation is based on max_*pfn which
don't have uniform meaning across architectures. So make use of
dma_max_pfn() which is expected to return the DMAable maximum pfn
value across architectures.

Cc: Chris Ball &lt;cjb@laptop.org&gt;
Signed-off-by: Santosh Shilimkar &lt;santosh.shilimkar@ti.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>mmc: Don't force card to active state when entering suspend/shutdown</title>
<updated>2013-10-31T00:28:40Z</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2013-10-02T15:37:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9ec775f7efd6d17084b4f361804d2030d50fca0e'/>
<id>urn:sha1:9ec775f7efd6d17084b4f361804d2030d50fca0e</id>
<content type='text'>
By adding a card state that records if it is suspended or resumed, we
can accept asyncronus suspend/resume requests for the mmc and sd
bus_ops.

MMC_CAP_AGGRESSIVE_PM, will at request inactivity through the runtime
bus_ops callbacks, execute a suspend of the the card. In the state were
this has been done, we can receive a suspend request for the mmc bus,
which for sd and mmc forced the card to active state by a
pm_runtime_get_sync. In other words, the card was resumed and then
immediately suspended again, completely unnecessary.

Since the suspend/resume bus_ops callbacks for sd and mmc are now
capable of handling asynchronous requests, we no longer need to force
the card to active state before executing suspend. Evidently preventing
the above sequence for MMC_CAP_AGGRESSIVE_PM.

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
</content>
</entry>
<entry>
<title>mmc: fix null pointer use in mmc_blk_remove_req</title>
<updated>2013-08-25T03:22:04Z</updated>
<author>
<name>Franck Jullien</name>
<email>franck.jullien@gmail.com</email>
</author>
<published>2013-07-24T13:17:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8efb83a2f8518a6ffcc074177f8d659c5165ef37'/>
<id>urn:sha1:8efb83a2f8518a6ffcc074177f8d659c5165ef37</id>
<content type='text'>
A previous commit (fdfa20c1631210d0) reordered the shutdown sequence
in mmc_blk_remove_req. However, mmc_cleanup_queue is now called before
we get the card pointer, and mmc_cleanup_queue sets mq-&gt;card to NULL.

This patch moves the card pointer assignment before mmc_cleanup_queue.

Signed-off-by: Franck Jullien &lt;franck.jullien@gmail.com&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
</content>
</entry>
<entry>
<title>mmc: mmc_test: replace strict_strtol() with kstrtol_from_user()</title>
<updated>2013-08-25T03:19:05Z</updated>
<author>
<name>Jingoo Han</name>
<email>jg1.han@samsung.com</email>
</author>
<published>2013-07-19T07:02:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4be7085f744be070d327ed258d6ceb79b7323f6d'/>
<id>urn:sha1:4be7085f744be070d327ed258d6ceb79b7323f6d</id>
<content type='text'>
The usage of strict_strtol() is not preferred, because
strict_strtol() is obsolete. Thus, kstrtol() should be used.

Also, both kstrtol() and copy_from_user() can be replaced
with kstrtol_from_user() to make the code simpler.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
</content>
</entry>
<entry>
<title>mmc: block: fix a bug of error handling in MMC driver</title>
<updated>2013-08-25T02:13:22Z</updated>
<author>
<name>KOBAYASHI Yoshitake</name>
<email>yoshitake.kobayashi@toshiba.co.jp</email>
</author>
<published>2013-07-06T22:35:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c8760069627ad3b0dbbea170f0c4c58b16e18d3d'/>
<id>urn:sha1:c8760069627ad3b0dbbea170f0c4c58b16e18d3d</id>
<content type='text'>
Current MMC driver doesn't handle generic error (bit19 of device
status) in write sequence. As a result, write data gets lost when
generic error occurs. For example, a generic error when updating a
filesystem management information causes a loss of write data and
corrupts the filesystem. In the worst case, the system will never
boot.

This patch includes the following functionality:
  1. To enable error checking for the response of CMD12 and CMD13
     in write command sequence
  2. To retry write sequence when a generic error occurs

Messages are added for v2 to show what occurs.

Signed-off-by: KOBAYASHI Yoshitake &lt;yoshitake.kobayashi@toshiba.co.jp&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
</content>
</entry>
<entry>
<title>mmc: core: Handle card shutdown from mmc_bus</title>
<updated>2013-06-27T16:39:18Z</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2013-06-10T15:03:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7628774851751e55362ec7d9d57c9334e656a655'/>
<id>urn:sha1:7628774851751e55362ec7d9d57c9334e656a655</id>
<content type='text'>
Considering shutdown of the card, the responsibility to initate this
sequence shall be driven from the mmc_bus.

This patch enables the mmc_bus to handle this sequence properly. A new
.shutdown callback is added in the mmc_driver struct which is used to
shutdown the blk device.

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
</content>
</entry>
<entry>
<title>mmc: card: fixing an false identification of SANITIZE command</title>
<updated>2013-06-27T15:28:18Z</updated>
<author>
<name>Yaniv Gardi</name>
<email>ygardi@codeaurora.org</email>
</author>
<published>2013-06-05T11:13:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a82e484e2480583b17be6253b985fa6f582ad20d'/>
<id>urn:sha1:a82e484e2480583b17be6253b985fa6f582ad20d</id>
<content type='text'>
Inside the routine mmc_blk_ioctl_cmd() the sanitize command is
identified according to the value of bits 16-23 of the argument.

but what happens if a different command is sent, and only by
chance, bits 16-23 contain the value of SANITIZE command ?
In that case a SANITIZE command will be falsely identified.
In order to prevent such a case, the condition is expanded and
now it also checks the opcode itself, and verifies that it is an
MMC_SWITCH opcode.

Signed-off-by: Yaniv Gardi &lt;ygardi@codeaurora.org&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
</content>
</entry>
<entry>
<title>mmc: reordered shutdown sequence in mmc_bld_remove_req</title>
<updated>2013-06-27T15:23:15Z</updated>
<author>
<name>Paul Taysom</name>
<email>taysom@chromium.org</email>
</author>
<published>2013-06-04T21:42:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fdfa20c1631210d0ca218689204682ea80e170e3'/>
<id>urn:sha1:fdfa20c1631210d0ca218689204682ea80e170e3</id>
<content type='text'>
We had a multi-partition SD-Card with two ext2 file systems. The partition
table was getting overwritten by a race between the card removal and
the unmount of the 2nd ext2 partition.

What was observed:
1. Suspend/resume would call to remove the device. The clearing
   of the device information is done asynchronously.
2. A request is made to unmount the file system (this is called
   after the removal has started).
3. The remapping table was cleared by the asynchronous part of
   the device removal.
4. A write request to the super block (block 0 of the partition)
   was sent down and instead of being remapped to the partition
   offset, it was remapped to block 0 of the device which is where
   the partition table is located.
5. Write was queued and written resulting in the overwriting
   of the partition table with the ext2 super block.
6. The mmc_queue is cleaned up.

The mmc card device driver used to access SD cards, was calling del_gendisk
before calling mmc_cleanup-queue. The comment in the mmc_blk_remove_req
code indicated that it expected del_gendisk to block all further requests
from being queued but it doesn't. The mmc driver uses the presences of the
mmc_queue to determine if the request should be queued.

The fix was to clean up the mmc_queue before the rest of the
the delete partition code is called.

This prevents the overwriting of the partition table.

However, the umount gets an error trying to write the super block.
The umount should be issued before the device is removed but that
is not always possible. The umount is still needed to cleanup other
data structures.

Addresses the problem described in http://crbug.com/240815

Signed-off-by: Paul Taysom &lt;taysom@chromium.org&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
</content>
</entry>
<entry>
<title>mmc: block: Enable runtime pm for mmc blkdevice</title>
<updated>2013-05-26T18:23:16Z</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2013-05-02T12:02:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e94cfef698aae6b209d8918dd319312e4b02118d'/>
<id>urn:sha1:e94cfef698aae6b209d8918dd319312e4b02118d</id>
<content type='text'>
Once the mmc blkdevice is being probed, runtime pm will be enabled.
By using runtime autosuspend, the power save operations can be done
when request inactivity occurs for a certain time. Right now the
selected timeout value is set to 3 s. Obviously this value will likely
need to be configurable somehow since it needs to be trimmed depending
on the power save algorithm.

For SD-combo cards, we are still leaving the enablement of runtime PM
to the SDIO init sequence since it depends on the capabilities of the
SDIO func driver.

Moreover, when the blk device is being suspended, we make sure the device
will be runtime resumed. The reason for doing this is that we want the
host suspend sequence to be unaware of any runtime power save operations
done for the card in this phase. Thus it can just handle the suspend as
the card is fully powered from a runtime perspective.

Finally, this patch prepares to make it possible to move BKOPS handling
into the runtime callbacks for the mmc bus_ops. Thus IDLE BKOPS can be
accomplished.

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
</content>
</entry>
</feed>
