1. 05 1月, 2012 1 次提交
  2. 18 12月, 2011 1 次提交
    • A
      fat.c: fix printf() length modifier · 2d1b83b3
      Andreas Bießmann 提交于
      The DIRENTSPERBLOCK utilizes sizeof() which will return a size_t which has no
      fixed size. Therefor use correct length modifer for printf() statement to
      prevent compiler warnings.
      
      This patch fixes following warning:
      
      ---8<---
      fat.c: In function 'do_fat_read':
      fat.c:879: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int'
      --->8---
      Signed-off-by: NAndreas Bießmann <biessmann@corscience.de>
      cc: Mike Frysinger <vapier@gentoo.org>
      cc: Thomas Chou <thomas@wytron.com.tw>
      cc: rjones@nexus-tech.net
      cc: kharris@nexus-tech.net
      Acked-by: NMike Frysinger <vapier@gentoo.org>
      2d1b83b3
  3. 08 11月, 2011 1 次提交
  4. 28 10月, 2011 2 次提交
  5. 27 10月, 2011 1 次提交
    • D
      FAT: Add FAT write feature · c30a15e5
      Donggeun Kim 提交于
      In some cases, saving data in RAM as a file with FAT format is required.
      This patch allows the file to be written in FAT formatted partition.
      
      The usage is similar with reading a file.
      First, fat_register_device function is called before file_fat_write function
      in order to set target partition.
      Then, file_fat_write function is invoked with desired file name,
      start ram address for writing data, and file size.
      Signed-off-by: NDonggeun Kim <dg77.kim@samsung.com>
      Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
      c30a15e5
  6. 02 10月, 2011 4 次提交
  7. 02 4月, 2011 1 次提交
    • E
      fat32 root directory handling · 3f270f42
      Erik Hansen 提交于
      Fat directory handling didn't check reaching the end of the root directory. It
      relied on a stop condition based on a directory entry with a name starting with
      a '\0' character. This check in itself is wrong ('\0' indicates free entry, not
      end_of_directory) but outside the scope of this fix. For FAT32, the end of the
      rootdir is reached when the end of the cluster chain is reached. The code didn't
      check this condition and started to read an incorrect cluster. This caused a
      subsequent read request of a sector outside the range of the usb stick in
      use. On its turn, the usb stick protested with a stall handshake.
      
      Both FAT32 and non-FAT32 (FAT16/FAT12) end or rootdir checks have been put in.
      Signed-off-by: NErik Hansen <erik@makarta.com>
      3f270f42
  8. 20 10月, 2010 1 次提交
    • S
      FAT: buffer overflow with FAT12/16 · 11c8dd36
      Stefano Babic 提交于
      Last commit 3831530da was intended
      "explicitly specify FAT12/16 root directory parsing buffer size, instead
      of relying on cluster size". Howver, the underlying function requires
      the size of the buffer in blocks, not in bytes, and instead of passing
      a double sector size a request for 1024 blocks is sent. This generates
      a buffer overflow with overwriting of other structure (in the case seen,
      USB structures were overwritten).
      Signed-off-by: NStefano Babic <sbabic@denx.de>
      CC: Mikhail Zolotaryov <lebon@lebon.org.ua>
      11c8dd36
  9. 13 10月, 2010 1 次提交
    • M
      VFAT: fix processing of scattered long file name entries · 3831530d
      Mikhail Zolotaryov 提交于
      The U-Boot code has the following bugs related to the processing of Long File
      Name (LFN) entries scattered across several clusters/sectors :
      
      1) get_vfatname() function is designed to gather scattered LFN entries by
      cluster chain processing - that doesn't work for FAT12/16 root directory.
      In other words, the function expects the following input data:
       1.1) FAT32 directory (which is cluster chain based);
              OR
       1.2) FAT12/16 non-root directory (which is also cluster chain based);
              OR
       1.3) FAT12/16 root directory (allocated as contiguous sectors area), but
       all necessary information MUST be within the input buffer of filesystem cluster
       size (thus cluster-chain jump is never initiated).
      
      In order to accomplish the last condition, root directory parsing code in
      do_fat_read() uses the following trick: read-out cluster-size block, process
      only first sector (512 bytes), then shift 512 forward, read-out cluster-size
      block and so on. This works great unless cluster size is equal to 512 bytes
      (in a case you have a small partition), or long file name entries are scattered
      across three sectors, see 4) for details.
      
      2) Despite of the fact that get_vfatname() supports FAT32 root directory
      browsing, do_fat_read() function doesn't send current cluster number correctly,
      so root directory look-up doesn't work correctly.
      
      3) get_vfatname() doesn't gather scattered entries correctly also is the case
      when all LFN entries are located at the end of the source cluster, but real
      directory entry (which must be returned) is at the only beginning of the
      next one. No error detected, the resulting directory entry returned contains
      a semi-random information (wrong size, wrong start cluster number and so on)
      i.e. the entry is not accessible.
      
      4) LFN (VFAT) allows up to 20 entries (slots) each containing 26 bytes (13
      UTF-16 code units) to represent a single long file name i.e. up to 520 bytes.
      U-Boot allocates 256 bytes buffer instead, i.e. 10 or more LFN slots record
      may cause buffer overflow / memory corruption.
      Also, it's worth to mention that 20+1 slots occupy 672 bytes space which may
      take more than one cluster of 512 bytes (medium-size FAT32 or small FAT16
      partition) - get_vfatname() function doesn't support such case as well.
      
      The patch attached fixes these problems in the following way:
      - keep using 256 bytes buffer for a long file name, but safely prevent a
      possible buffer overflow (skip LFN processing, if it contains 10 or more
      slots).
      
      - explicitly specify FAT12/16 root directory parsing buffer size, instead
      of relying on cluster size. The value used is a double sector size (to store
      current sector and the next one). This fixes the first problem and increases
      performance on big FAT12/16 partitions;
      
      - send current cluster number (FAT32) to get_vfatname() during root
      directory processing;
      
      - use LFN counter to seek the real directory entry in get_vfatname() - fixes the
      third problem;
      
      - skip deleted entries in the root directory (to prevent bogus buffer
      overflow detection and LFN counter steps).
      
      Note: it's not advised to split up the patch, because a separate part may
      operate incorrectly.
      Signed-off-by: NMikhail Zolotaryov <lebon@lebon.org.ua>
      3831530d
  10. 25 7月, 2010 3 次提交
    • W
      fs/fat: Big code cleanup. · 7385c28e
      Wolfgang Denk 提交于
      - reformat
      - throw out macros like FAT_DPRINT and FAT_DPRINT
      - remove dead code
      Signed-off-by: NWolfgang Denk <wd@denx.de>
      7385c28e
    • W
      FAT32: fix broken root directory handling. · 2aa98c66
      Wolfgang Denk 提交于
      On FAT32, instead of fetching the cluster numbers from the FAT, the
      code assumed (incorrectly) that the clusters for the root directory
      were allocated contiguously. In the result, only the first cluster
      could be accessed. At the typical cluster size of 8 sectors this
      caused all accesses to files after the first 128 entries to fail -
      "fatls" would terminate after 128 files (usually displaying a bogus
      file name, occasionally even crashing the system), and "fatload"
      would fail to find any files that were not in the first directory
      cluster.
      Signed-off-by: NWolfgang Denk <wd@denx.de>
      2aa98c66
    • W
      FAT32: fix support for superfloppy-format (PBR) · 66c2d73c
      Wolfgang Denk 提交于
      "Superfloppy" format (in U-Boot called PBR) did not work for FAT32 as
      the file system type string is at a different location. Add support
      for FAT32.
      Signed-off-by: NWolfgang Denk <wd@denx.de>
      66c2d73c
  11. 28 5月, 2010 1 次提交
  12. 13 6月, 2009 1 次提交
    • T
      FAT replace compare_sign with strncmp. · 651351fe
      Tom Rix 提交于
      The static function compare_sign is only used to compare the fs_type string
      and does not do anything more than what strncmp does.
      
      The addition of the trailing '\0' to fs_type, while legal, is not needed
      because the it is never printed out and strncmp does not depend on NULL
      terminated strings.
      Signed-off-by: NTom Rix <Tom.Rix@windriver.com>
      651351fe
  13. 04 4月, 2009 1 次提交
    • U
      mflash: Initial mflash support · 75eb82ec
      unsik Kim 提交于
      Mflash is fusion memory device mainly targeted consumer eletronic and
      mobile phone.
      Internally, it have nand flash and other hardware logics and supports
      some different operation (ATA, IO, XIP) modes.
      
      IO mode is custom mode for the host that doesn't have IDE interface.
      (Many mobile targeted SoC doesn't have IDE bus)
      
      This driver support mflash IO mode.
      
      Followings are brief descriptions about IO mode.
      
      1. IO mode based on ATA protocol and uses some custom command. (read
         confirm, write confirm)
      2. IO mode uses SRAM bus interface.
      Signed-off-by: Nunsik Kim <donari75@gmail.com>
      75eb82ec
  14. 28 1月, 2009 1 次提交
  15. 24 1月, 2009 1 次提交
  16. 10 12月, 2008 1 次提交
  17. 05 12月, 2008 1 次提交
    • R
      Remove non-ascii characters from fat code · 3c2c2f42
      Remy Bohmer 提交于
      This code contains some non-ascii characters in comment lines and code.
      Most editors do not display those characters properly and editing those
      files results always in diffs at these places which are usually not required
      to be changed at all. This is error prone.
      
      So, remove those weird characters and replace them by normal C-style
      equivalents for which the proper defines were already in the header.
      Signed-off-by: NRemy Bohmer <linux@bohmer.net>
      3c2c2f42
  18. 31 8月, 2008 1 次提交
  19. 03 3月, 2008 1 次提交
  20. 15 2月, 2008 1 次提交
  21. 10 1月, 2008 1 次提交
  22. 07 8月, 2007 1 次提交
  23. 10 7月, 2007 1 次提交
  24. 04 7月, 2007 1 次提交
  25. 23 6月, 2007 1 次提交
    • H
      [PCS440EP] upgrade the PCS440EP board: · 566a494f
      Heiko Schocher 提交于
                      - Show on the Status LEDs, some States of the board.
                      - Get the MAC addresses from the EEProm
                      - use PREBOOT
                      - use the CF on the board.
                      - check the U-Boot image in the Flash with a SHA1
                        checksum.
                      - use dynamic TLB entries generation for the SDRAM
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      566a494f
  26. 18 5月, 2007 1 次提交
  27. 09 5月, 2007 1 次提交
  28. 13 10月, 2005 1 次提交
  29. 06 8月, 2005 1 次提交
  30. 17 12月, 2004 1 次提交
  31. 30 9月, 2004 1 次提交
    • W
      * Patches by Sean Chang, 09 Aug 2004: · a5bbcc3c
      wdenk 提交于
        - Added support for both 8 and 16 bit mode access to System ACE CF
          through MPU.
        - Fixed missing System ACE CF device during get FAT partition info
          in fat_register_device function.
        - Enabled System ACE CF support on ML300.
      
      * Patch by Sean Chang, 09 Aug 2004:
        Synch defines for saveenv and do_saveenv functions so they get
        compiled under the same statement.
      a5bbcc3c
  32. 15 3月, 2004 1 次提交
    • W
      * Patches by Travis Sawyer, 12 Mar 2004: · 855a496f
      wdenk 提交于
        - Fix Gigabit Ethernet support for 440GX
        - Add Gigabit Ethernet Support to MII PHY utilities
      
      * Patch by Brad Kemp, 12 Mar 2004:
        Fixes for drivers/cfi_flash.c:
        - Better support for x8/x16 implementations
        - Added failure for AMD chips attempting to use CFG_FLASH_USE_BUFFER_WRITE
        - Added defines for AMD command and address constants
      
      * Patch by Leon Kukovec, 12 Mar 2004:
        Fix get_dentfromdir() to correctly handle deleted dentries
      
      * Patch by George G. Davis, 11 Mar 2004:
        Remove hard coded network settings in TI OMAP1610 H2
        default board config
      
      * Patch by George G. Davis, 11 Mar 2004:
        add support for ADS GraphicsClient+ board.
      855a496f
  33. 27 2月, 2004 1 次提交
    • W
      * Patch by Markus Pietrek, 24 Feb 2004: · 80885a9d
      wdenk 提交于
        NS9750 DevBoard added
      
      * Patch by Pierre AUBERT, 24 Feb 2004
        add USB support for MPC5200
      
      * Patch by Steven Scholz, 24 Feb 2004:
        - fix MII commands to use values from last command
      
      * Patch by Torsten Demke, 24 Feb 2004:
        Add support for the eXalion platform (SPSW-8240, F-30, F-300)
      80885a9d
  34. 24 2月, 2004 1 次提交
    • W
      * Patch by Thomas Elste, 10 Feb 2004: · 2d1a537d
      wdenk 提交于
        Add support for NET+50 CPU and ModNET50 board
      
      * Patch by Sam Song, 10 Feb 2004:
        Fix typos in cfi_flash.c
      
      * Patch by Leon Kukovec, 10 Feb 2004
        Fixed long dir entry slot id calculation in get_vfatname
      
      * Patch by Robin Gilks, 10 Feb 2004:
        add "itest" command (operators: -eq, -ne, -lt, -gt, -le, -ge, ==,
        !=, <>, <, >, <=, >=)
      2d1a537d