1. 25 8月, 2013 3 次提交
  2. 28 6月, 2013 1 次提交
  3. 27 6月, 2013 2 次提交
    • Y
      mmc: card: fixing an false identification of SANITIZE command · a82e484e
      Yaniv Gardi 提交于
      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: NYaniv Gardi <ygardi@codeaurora.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      a82e484e
    • P
      mmc: reordered shutdown sequence in mmc_bld_remove_req · fdfa20c1
      Paul Taysom 提交于
      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/240815Signed-off-by: NPaul Taysom <taysom@chromium.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      fdfa20c1
  4. 27 5月, 2013 2 次提交
    • U
      mmc: block: Enable runtime pm for mmc blkdevice · e94cfef6
      Ulf Hansson 提交于
      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: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      e94cfef6
    • M
      mmc: card: Adding support for sanitize in eMMC 4.5 · 775a9362
      Maya Erez 提交于
      The sanitize support is added as a user-app ioctl call, and
      was removed from the block-device request, since its purpose is
      to be invoked not via File-System but by a user.
      
      This feature deletes the unmap memory region of the eMMC card,
      by writing to a specific register in the EXT_CSD.
      
      unmap region is the memory region that was previously deleted
      (by erase, trim or discard operation).
      
      In order to avoid timeout when sanitizing large-scale cards,
      the timeout for sanitize operation is 240 seconds.
      Signed-off-by: NYaniv Gardi <ygardi@codeaurora.org>
      Signed-off-by: NMaya Erez <merez@codeaurora.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      775a9362
  5. 07 5月, 2013 1 次提交
  6. 23 3月, 2013 1 次提交
    • S
      mmc: block: fix the host's claim-release in special request · ef3a69c7
      Seungwon Jeon 提交于
      For normal request mmc_blk_issue_rq is called twice with asynchronous
      transfer(cur and prev). Host's claim and release can be done in each
      mmc_blk_issue_rq. However, Special request is currently excluded in
      asynchronous transfer. After special request is finished, if there is
      no new request, mmc_release_host won't be called in mmc_blk_issue_rq.
      The problem is founded during mmc_suspend.
      
      [<c0541124>] (__schedule+0x0/0x78c) from [<c05419e8>] (schedule+0x38/0x78)
      [<c05419b0>] (schedule+0x0/0x78) from [<c03a843c>] (__mmc_claim_host+0xac/0x1b4)
      [<c03a8390>] (__mmc_claim_host+0x0/0x1b4) from [<c03ac98c>] (mmc_suspend+0x28/0x9c)
      [<c03ac964>] (mmc_suspend+0x0/0x9c) from [<c03aad24>] (mmc_suspend_host+0xb4/0x194)
      ...
      Reported-by: NJohan Rudholm <jrudholm@gmail.com>
      Signed-off-by: NSeungwon Jeon <tgih.jun@samsung.com>
      Tested-by: NJohan Rudholm <johan.rudholm@stericsson.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      ef3a69c7
  7. 19 3月, 2013 1 次提交
  8. 25 2月, 2013 2 次提交
  9. 12 2月, 2013 2 次提交
  10. 28 1月, 2013 2 次提交
  11. 19 1月, 2013 1 次提交
    • J
      tty: Added a CONFIG_TTY option to allow removal of TTY · 4f73bc4d
      Joe Millenbach 提交于
      The option allows you to remove TTY and compile without errors. This
      saves space on systems that won't support TTY interfaces anyway.
      bloat-o-meter output is below.
      
      The bulk of this patch consists of Kconfig changes adding "depends on
      TTY" to various serial devices and similar drivers that require the TTY
      layer.  Ideally, these dependencies would occur on a common intermediate
      symbol such as SERIO, but most drivers "select SERIO" rather than
      "depends on SERIO", and "select" does not respect dependencies.
      
      bloat-o-meter output comparing our previous minimal to new minimal by
      removing TTY.  The list is filtered to not show removed entries with awk
      '$3 != "-"' as the list was very long.
      
      add/remove: 0/226 grow/shrink: 2/14 up/down: 6/-35356 (-35350)
      function                                     old     new   delta
      chr_dev_init                                 166     170      +4
      allow_signal                                  80      82      +2
      static.__warned                              143     142      -1
      disallow_signal                               63      62      -1
      __set_special_pids                            95      94      -1
      unregister_console                           126     121      -5
      start_kernel                                 546     541      -5
      register_console                             593     588      -5
      copy_from_user                                45      40      -5
      sys_setsid                                   128     120      -8
      sys_vhangup                                   32      19     -13
      do_exit                                     1543    1526     -17
      bitmap_zero                                   60      40     -20
      arch_local_irq_save                          137     117     -20
      release_task                                 674     652     -22
      static.spin_unlock_irqrestore                308     260     -48
      Signed-off-by: NJoe Millenbach <jmillenbach@gmail.com>
      Reviewed-by: NJamey Sharp <jamey@minilop.net>
      Reviewed-by: NJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4f73bc4d
  12. 16 1月, 2013 2 次提交
    • J
      TTY: switch tty_flip_buffer_push · 2e124b4a
      Jiri Slaby 提交于
      Now, we start converting tty buffer functions to actually use
      tty_port. This will allow us to get rid of the need of tty in many
      call sites. Only tty_port will needed and hence no more
      tty_port_tty_get in those paths.
      
      Now, the one where most of tty_port_tty_get gets removed:
      tty_flip_buffer_push.
      
      IOW we also closed all the races in drivers not using tty_port_tty_get
      at all yet.
      
      Also we move tty_flip_buffer_push declaration from include/linux/tty.h
      to include/linux/tty_flip.h to all others while we are changing it
      anyway.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2e124b4a
    • J
      TTY: switch tty_insert_flip_char · 92a19f9c
      Jiri Slaby 提交于
      Now, we start converting tty buffer functions to actually use
      tty_port. This will allow us to get rid of the need of tty in many
      call sites. Only tty_port will needed and hence no more
      tty_port_tty_get in those paths.
      
      tty_insert_flip_char is the next one to proceed. This one is used all
      over the code, so the patch is huge.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      92a19f9c
  13. 07 12月, 2012 4 次提交
  14. 16 11月, 2012 2 次提交
  15. 05 9月, 2012 1 次提交
  16. 14 8月, 2012 1 次提交
    • J
      TTY: use tty_port_register_device · 734cc178
      Jiri Slaby 提交于
      Currently we have no way to assign tty->port while performing tty
      installation. There are two ways to provide the link tty_struct =>
      tty_port. Either by calling tty_port_install from tty->ops->install or
      tty_port_register_device called instead of tty_register_device when
      the device is being set up after connected.
      
      In this patch we modify most of the drivers to do the latter. When the
      drivers use tty_register_device and we have tty_port already, we
      switch to tty_port_register_device. So we have the tty_struct =>
      tty_port link for free for those.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      734cc178
  17. 17 7月, 2012 1 次提交
  18. 11 7月, 2012 1 次提交
    • S
      mmc: block: replace __blk_end_request() with blk_end_request() · ecf8b5d0
      Subhash Jadavani 提交于
      For completing any block request, MMC block driver is calling:
      	spin_lock_irq(queue)
      	__blk_end_request()
      	spin_unlock_irq(queue)
      
      But if we analyze the sources of latency in kernel using ftrace,
      __blk_end_request() function at times may take up to 6.5ms with
      spinlock held and irq disabled.
      
      __blk_end_request() calls couple of functions and ftrace output
      shows that blk_update_bidi_request() function is almost taking 6ms.
      There are 2 function to end the current request: ___blk_end_request()
      and blk_end_request(). Both these functions do same thing except
      that blk_end_request() function doesn't take up the spinlock
      while calling the blk_update_bidi_request().
      
      This patch replaces all __blk_end_request() calls with
      blk_end_request() and __blk_end_request_all() calls with
      blk_end_request_all().
      
      Testing done: 20 process concurrent read/write on sd card
      and eMMC. Ran this test for almost a day on multicore system
      and no errors observed.
      
      This change is not meant for improving MMC throughput; it's basically
      about becoming fair to other threads/interrupts in the system. By
      holding spin lock and interrupts disabled for longer duration, we
      won't allow other threads/interrupts to run at all.  Actually slight
      performance degradation at file system level can be expected as we
      are not holding the spin lock during blk_update_bidi_request() which
      means our mmcqd thread may get preempted for other high priority
      thread or any interrupt in the system.
      
      These are performance numbers (100MB file write) with eMMC running
      in DDR mode:
      
      Without this patch:
      	Name of the Test   Value   Unit
      	LMDD Read Test     53.79   MBPS
      	LMDD Write Test    18.86   MBPS
      	IOZONE  Read Test  51.65   MBPS
      	IOZONE  Write Test 24.36   MBPS
      
      With this patch:
      	Name of the Test    Value  Unit
      	LMDD Read Test      52.94  MBPS
      	LMDD Write Test     16.70  MBPS
      	IOZONE  Read Test   52.08  MBPS
      	IOZONE  Write Test  23.29  MBPS
      
      Read numbers are fine. Write numbers are bit down (especially LMDD
      write), may be because write requests normally have large transfer
      size and which means there are chances that while mmcq is executing
      blk_update_bidi_request(), it may get interrupted by interrupts or
      other high priority thread.
      Signed-off-by: NSubhash Jadavani <subhashj@codeaurora.org>
      Reviewed-by: NNamjae Jeon <linkinjeon@gmail.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      ecf8b5d0
  19. 27 6月, 2012 1 次提交
    • S
      mmc: block: fix the data timeout issue with ACMD22 · d380443c
      Subhash Jadavani 提交于
      If multi block write operation fails for SD card, during
      error handling we send the SD_APP_SEND_NUM_WR_BLKS (ACMD22)
      to know how many blocks were already programmed by card.
      
      But mmc_sd_num_wr_blocks() function which sends the ACMD22
      calculates the data timeout value from csd.tacc_ns and
      csd.tacc_clks parameters which will be 0 for block addressed
      (>2GB cards) SD card. This would result in timeout_ns and
      timeout_clks being 0 in the mmc_request passed to host driver.
      This means host controller would program its data timeout timer
      value with 0 which could result in DATA TIMEOUT errors from
      controller.
      
      To fix this issue, mmc_sd_num_wr_blocks() should instead
      just call the mmc_set_data_timeout() to calculate the
      data timeout value. mmc_set_data_timeout() function
      ensures that non zero timeout value is set even for
      block addressed SD cards.
      Signed-off-by: NSubhash Jadavani <subhashj@codeaurora.org>
      Reviewed-by: NVenkatraman S <svenkatr@ti.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      d380443c
  20. 17 5月, 2012 1 次提交
  21. 10 5月, 2012 1 次提交
  22. 09 5月, 2012 2 次提交
  23. 21 4月, 2012 3 次提交
  24. 06 4月, 2012 1 次提交
  25. 29 3月, 2012 1 次提交