1. 23 Feb, 2014 5 commits
    • Ulf Hansson's avatar
      mmc: core: Fixup busy detection for mmc switch operations · b9ec2616
      Ulf Hansson authored
      If the host controller supports busy detection in HW, we expect the
      MMC_CAP_WAIT_WHILE_BUSY to be set. Likewise the corresponding
      host->max_busy_timeout should reflect the maximum busy detection
      timeout supported by the host.
      
      Previously we expected a host that supported MMC_CAP_WAIT_WHILE_BUSY to
      cope with any timeout, which just isn't feasible due to HW limitations.
      
      For most switch operations, R1B responses are expected and thus we need
      to check for busy detection completion. To cope with cases where the
      requested busy detection timeout is greater than what the host are able
      to support, we fallback to use a R1 response instead. This will prevent
      the host from doing HW busy detection.
      
      In those cases, busy detection completion is handled by polling the for
      the card's status using CMD13. This is the same mechanism used when the
      host doesn't support MMC_CAP_WAIT_WHILE_BUSY.
      
      Do note, a host->max_busy_timeout set to zero, is interpreted by the
      mmc core as it don't know what the host supports. It will then provide
      the host with whatever timeout the mmc core finds suitable.
      
      For some cases the mmc core has unfurtunate no clue of what timeout to
      use. In these cases we provide the host with a timeout value of zero,
      which the host may interpret as use whatever timeout it finds suitable.
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: default avatarChris Ball <chris@printf.net>
      b9ec2616
    • Ulf Hansson's avatar
      mmc: core: Minor simplifications to __mmc_switch · 636bd13c
      Ulf Hansson authored
      Instead of using several references to card->host, let's use a local
      variable. That means we can remove the BUG_ON verifications for the
      same pointers.
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: default avatarChris Ball <chris@printf.net>
      636bd13c
    • Ulf Hansson's avatar
      mmc: core: Add ignore_crc flag to __mmc_switch · 4509f847
      Ulf Hansson authored
      Instead of handle specific adaptations, releated to certain switch
      operations, inside __mmc_switch, push this to be handled by the caller
      instead.
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: default avatarChris Ball <chris@printf.net>
      4509f847
    • Ulf Hansson's avatar
      mmc: core: Rename cmd_timeout_ms to busy_timeout · 1d4d7744
      Ulf Hansson authored
      To better reflect that the cmd_timeout_ms is directly related to the
      busy detection timeout, let's rename it.
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: default avatarChris Ball <chris@printf.net>
      1d4d7744
    • Ulf Hansson's avatar
      mmc: core: Rename max_discard_to to max_busy_timeout · 68eb80e0
      Ulf Hansson authored
      Rename host->max_discard_to to host->max_busy_timeout, to reflect that
      it tells the mmc core layer about the maximum supported busy detection
      timeout by the host.
      
      This timeout is at the moment only applicable to erase/trim/discard
      commands. By the renaming we provide the option of make use of it for
      other commands that cares about busy detection. In other words, those
      commands that wants an R1B response, like for example the mmc switch
      command.
      
      Do note that the max_busy_timeout is supposed to be specified only by
      hosts supporting MMC_CAP_WAIT_WHILE_BUSY.
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: default avatarChris Ball <chris@printf.net>
      68eb80e0
  2. 22 Feb, 2014 20 commits
  3. 14 Feb, 2014 10 commits
  4. 10 Feb, 2014 4 commits
  5. 09 Feb, 2014 1 commit
    • Al Viro's avatar
      fix a kmap leak in virtio_console · c9efe511
      Al Viro authored
      While we are at it, don't do kmap() under kmap_atomic(), *especially*
      for a page we'd allocated with GFP_KERNEL.  It's spelled "page_address",
      and had that been more than that, we'd have a real trouble - kmap_high()
      can block, and doing that while holding kmap_atomic() is a Bad Idea(tm).
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      c9efe511