1. 05 Oct, 2008 3 commits
    • Haavard Skinnemoen's avatar
      atmel-mci: Don't stop the clock between transfers · 945533b5
      Haavard Skinnemoen authored
      Some cards might get upset if we turn off the clock for extended periods
      of time. So keep the clock running until the mmc core tells us to turn
      it off.
      
      Also, don't reset the controller between each transfer. That was an
      attempt to work around earlier bugs, and it never really worked very
      well.
      Signed-off-by: default avatarHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
      945533b5
    • Haavard Skinnemoen's avatar
      atmel-mci: Implement tasklet as a state machine · c06ad258
      Haavard Skinnemoen authored
      With the current system of completed/pending events, things may get
      handled in different order depending on which event triggers first. For
      example, if the data transfer is complete before the command, the stop
      command must be sent after the command is complete, not the data. This
      creates a bit of complexity around the stop command.
      
      By having the tasklet go through a sequence of clearly defined states,
      things always happen in a certain order even if the events come at
      different times, so the stop command can simply be sent when we exit the
      "sending data" state because we will never enter that state before the
      command has been sent successfully.
      Signed-off-by: default avatarHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
      c06ad258
    • Haavard Skinnemoen's avatar
      atmel-mci: Initialize BLKR before sending data transfer command · a252e3e3
      Haavard Skinnemoen authored
      The atmel-mci driver sometimes fails data transfers like this:
      
         mmcblk0: error -5 transferring data
         end_request: I/O error, dev mmcblk0, sector 2749769
         end_request: I/O error, dev mmcblk0, sector 2749777
      
      It turns out that this might be caused by the BLKR register (which
      contains the block size and the number of blocks being transfered) being
      initialized too late. This patch moves the initialization of BLKR so
      that it contains the correct value before the block transfer command is
      sent.
      
      This error is difficult to reproduce, but if you insert a long delay
      (mdelay(10) or thereabouts) between the calls to atmci_start_command()
      and atmci_submit_data(), all transfers seem to fail without this patch,
      while I haven't seen any failures with this patch.
      Reported-by: default avatarHein_Tibosch <hein_tibosch@yahoo.es>
      Signed-off-by: default avatarHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
      a252e3e3
  2. 04 Oct, 2008 16 commits
  3. 03 Oct, 2008 20 commits
  4. 02 Oct, 2008 1 commit
    • Andy Whitcroft's avatar
      mm: handle initialising compound pages at orders greater than MAX_ORDER · 6babc32c
      Andy Whitcroft authored
      When we initialise a compound page we initialise the page flags and head
      page pointer for all base pages spanned by that page.  When we initialise
      a gigantic page (a page of order greater than or equal to MAX_ORDER) we
      have to initialise more than MAX_ORDER_NR_PAGES pages.  Currently we
      assume that all elements of the mem_map in this page are contigious in
      memory.  However this is only guarenteed out to MAX_ORDER_NR_PAGES pages,
      and with SPARSEMEM enabled they will not be contigious.  This leads us to
      walk off the end of the first section and scribble on everything which
      follows, BAD.
      
      When we reach a MAX_ORDER_NR_PAGES boundary we much locate the next
      section of the mem_map.  As gigantic pages can only be maximally aligned
      we know this will occur at exact multiple of MAX_ORDER_NR_PAGES pages from
      the start of the page.
      
      This is a bug fix for the gigantic page support in hugetlbfs.
      
      Credit to Mel Gorman for spotting the issue.
      Signed-off-by: default avatarAndy Whitcroft <apw@shadowen.org>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Cc: Jon Tollefson <kniht@linux.vnet.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6babc32c