1. 16 3月, 2011 6 次提交
    • A
      UBI: make self-checks dynamic · 92d124f5
      Artem Bityutskiy 提交于
      This patch adds a possibility to dynamically switch UBI self-checks
      on and off, instead of toggling them compile-time from the configuration
      menu. This is much more flexible, and consistent with UBIFS, and this
      also simplifies UBI Kconfig menu and the code.
      
      This patch introduces two levels of self-checks - general, which
      includes all self-checks which are relatively fast, and I/O, which
      includes write-verify checks and erase-verify checks, which are
      relatively slow and involve flash I/O.
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      92d124f5
    • A
      UBI: make debugging messages dynamic · b342efd4
      Artem Bityutskiy 提交于
      This patch adds a possibility to dynamically select UBI debugging
      messages, instead of selecting them compile-time from the configuration
      menu. This is much more flexible, and consistent with UBIFS, and this
      also simplifies UBI Kconfig menu and the code.
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      b342efd4
    • A
      UBI: remove UBI_IO_DEBUG macro · 6f9fdf62
      Artem Bityutskiy 提交于
      This additional little macro is used to print a bit more messages
      while scanning the media. However, we have the 'dbg_bld()' macro
      for this, so we better us 'dbg_bld()' and kill UBI_IO_DEBUG. This
      simplifies the code a tiny bit.
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      6f9fdf62
    • A
      UBI: kill debugging buffer · 6edb9793
      Artem Bityutskiy 提交于
      This patch kills the 'ubi->dbg_peb_buf' debugging buffer and the
      associated mutex, because all users of this buffer are now gone.
      We are killing this buffer because we are going to switch to
      dynamic debugging control, just like in UBIFS, which means that
      CONFIG_MTD_UBI_DEBUG_PARANOID will be removed. In this case we'd
      end up always allocating 'ubi->dbg_peb_buf', which is rather large
      (128KiB or more), and this would be wasteful. Thus, we are just
      killing it.
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      6edb9793
    • A
      UBI: allocate erase checking buffer on demand · 332873d6
      Artem Bityutskiy 提交于
      Instead of using pre-allocated 'ubi->dbg_peb_buf' buffer in
      'ubi_dbg_check_all_ff()', dynamically allocate it when needed. The
      intend is to get rid of the pre-allocated 'ubi->dbg_peb_buf' buffer
      completely. And the need for this arises because we want to change
      to dynamic debugging control instead of compile-time control, i.e.,
      we are going to kill the CONFIG_MTD_UBI_DEBUG_PARANOID Kconfig
      option, which would mean that 'ubi->dbg_peb_buf' is always allocated,
      which would be wasteful.
      
      Thus, we are getting rid of 'ubi->dbg_peb_buf', and this is a
      preparation for that.
      signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      332873d6
    • A
      UBI: allocate write checking buffer on demand · a7586743
      Artem Bityutskiy 提交于
      Instead of using pre-allocated 'ubi->dbg_peb_buf' buffer in
      'ubi_dbg_check_write()', dynamically allocate it when needed. The
      intend is to get rid of the pre-allocated 'ubi->dbg_peb_buf' buffer
      completely. And the need for this arises because we want to change
      to dynamic debugging control instead of compile-time control, i.e.,
      we are going to kill the CONFIG_MTD_UBI_DEBUG_PARANOID Kconfig
      option, which would mean that 'ubi->dbg_peb_buf' is always allocated,
      which would be wasteful.
      
      Thus, we are getting rid of 'ubi->dbg_peb_buf', and this is a
      preparation for that.
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      a7586743
  2. 07 2月, 2011 5 次提交
    • A
      UBI: always re-read in case of read failures · a87f29cb
      Artem Bityutskiy 提交于
      When the read operation fails, UBI tries to re-read several times in
      a hope that one of the subsequent reads may succeed. However, currently
      UBI re-reads only if MTD failed to read all data, but does not re-reads
      if all the data were read, but with an integrity error (-EBADMSB). This
      patch makes UBI to always re-try reading.
      
      This should be useful for reading NAND pages with unstable bits -
      re-reading may help to get correct data.
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      a87f29cb
    • A
      UBI: cleanup comments about corrupted PEBs · fef2deb3
      Artem Bityutskiy 提交于
      Just make them a bit more readable and explanatory.
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      fef2deb3
    • A
      UBI: add slab cache for ubi_scan_leb objects · 6c1e875c
      Artem Bityutskiy 提交于
      During scanning UBI allocates one struct ubi_scan_leb object for each PEB,
      so it can end up allocating thousands of them. Use slab cache to reduce
      memory consumption for these 48-byte objects, because currently used
      'kmalloc()' ends up allocating 64 bytes per object, instead of 48.
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      6c1e875c
    • A
      UBI: use raw mtd read function in debugging code · 7950d023
      Artem Bityutskiy 提交于
      This change affects only the debugging code. Namely, use mtd->read()
      function instead of ubi_io_read() to avoid bit-flips injection
      (ubi_dbg_is_bitflip()) which we do not want on the debugging path.
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      7950d023
    • A
      UBI: try to reveal buggy MTD drivers · 276832d8
      Artem Bityutskiy 提交于
      When reading data from the flash, corrupt the buffer we are about to
      read to. The idea is to fix the following possible situation:
      
      1. The buffer contains data from previous operation, e.g., read from
         another PEB previously. The data looks like expected, e.g., if we
         just do not read anything and return - the caller would not
         notice this. E.g., if we are reading a VID header, the buffer may
         contain a valid VID header from another PEB.
      2. The driver is buggy and returns use success or -EBADMSG or
         -EUCLEAN, but it does not actually put any data to the buffer.
      
      This may confuse UBI or upper layers - they may think the buffer
      contains valid data while in fact it is just old data.
      
      Thus, try to reveal such buggy MTD drivers with simple debugging
      code which fills the read buffer with 0x12 constant.
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      276832d8
  3. 26 1月, 2011 3 次提交
  4. 04 1月, 2011 1 次提交
  5. 03 1月, 2011 5 次提交
  6. 01 1月, 2011 5 次提交
  7. 31 12月, 2010 1 次提交
  8. 30 12月, 2010 4 次提交
  9. 29 12月, 2010 5 次提交
    • D
      skfp: testing the wrong variable in skfp_driver_init() · 4a5fc4e1
      Dan Carpenter 提交于
      The intent here was to test if the allocation failed but we tested
      "SharedMemSize" instead of "SharedMemAddr" by mistake.
      Signed-off-by: NDan Carpenter <error27@gmail.com>
      Reviewed-by: NJiri Pirko <jpirko@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4a5fc4e1
    • S
      ppp: allow disabling multilink protocol ID compression · d39cd5e9
      stephen hemminger 提交于
      Linux would not connect to other router running old version Cisco IOS (12.0).
      This is most likely a bug in that version of IOS, since it is fixed
      in later versions. As a workaround this patch allows a module parameter
      to be set to disable compressing the protocol ID.
      
      See: https://bugzilla.vyatta.com/show_bug.cgi?id=3979
      
      RFC 1990 allows an implementation to formulate MP fragments as if protocol
      compression had been negotiated.  This allows us to always send compressed
      protocol IDs.  But some implementations don't accept MP fragments with
      compressed protocol IDs.  This parameter allows us to interoperate with
      them.  The default value of the configurable parameter is the same as the
      current behavior:  protocol compression is enabled.  If protocol compression
      is disabled we will not send compressed protocol IDs.
      
      This is based on an earlier patch by Bob Gilligan (using a sysctl).
      Module parameter is writable to allow for enabling even if ppp
      is already loaded for other uses.
      Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Acked-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d39cd5e9
    • B
      ehea: Avoid changing vlan flags · c4711786
      Breno Leitao 提交于
      This patch avoids disabling the vlan flags using ethtool.
      Signed-off-by: NBreno Leitao <leitao@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c4711786
    • D
      ueagle-atm: fix PHY signal initialization race · 12f188f2
      Dan Williams 提交于
      A race exists when initializing ueagle-atm devices where the generic atm
      device may not yet be created before the driver attempts to initialize
      it's PHY signal state, which checks whether the atm device has been
      created or not.  This often causes the sysfs 'carrier' attribute to be
      '1' even though no signal has actually been found.
      
      uea_probe
         usbatm_usb_probe
            driver->bind (uea_bind)
               uea_boot
                  kthread_run(uea_kthread)     uea_kthread
            usbatm_atm_init                       uea_start_reset
               atm_dev_register                      UPDATE_ATM_SIGNAL
      
      UPDATE_ATM_SIGNAL checks whether the ATM device has been created and if
      not, will not update the PHY signal state.  Because of the race that
      does not always happen in time, and the PHY signal state remains
      ATM_PHY_SIG_FOUND even though no signal exists.
      
      To fix the race, just create the kthread during initialization, and only
      after initialization is complete, start the thread that reboots the
      device and initializes PHY state.
      
      [ 3030.490931] uea_probe: calling usbatm_usb_probe
      [ 3030.490946] ueagle-atm 8-2:1.0: usbatm_usb_probe: trying driver ueagle-atm with vendor=1110, product=9031, ifnum  0
      [ 3030.493691] uea_bind: setting usbatm
      [ 3030.496932] usb 8-2: [ueagle-atm] using iso mode
      [ 3030.497283] ueagle-atm 8-2:1.0: usbatm_usb_probe: using 3021 byte buffer for rx channel 0xffff880125953508
         <kthread already started before usbatm_usb_probe() has returned>
      [ 3030.497292] usb 8-2: [ueagle-atm] (re)booting started
         <UPDATE_ATM_SIGNAL checks whether ATM device has been created yet before setting PHY state>
      [ 3030.497298] uea_start_reset: atm dev (null)
         <and since it hasn't been created yet PHY state is not set>
      [ 3030.497306] ueagle-atm 8-2:1.0: usbatm_usb_probe: using 3392 byte buffer for tx channel 0xffff8801259535b8
      [ 3030.497374] usbatm_usb_probe: about to init
      [ 3030.497379] usbatm_usb_probe: calling usbatm_atm_init
         <atm device finally gets created>
      [ 3030.497384] usbatm_atm_init: creating atm device!
      Signed-off-by: NDan Williams <dcbw@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      12f188f2
    • A
      RAMOOPS: Don't overflow over non-allocated regions · 1873bb81
      Ahmed S. Darwish 提交于
      The current code mis-calculates the ramoops header size, leading to an
      overflow over the next record at best, or over a non-allocated region at
      worst.  Fix that calculation.
      Signed-off-by: NAhmed S. Darwish <darwish.07@gmail.com>
      Acked-by: NMarco Stornelli <marco.stornelli@gmail.com>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1873bb81
  10. 27 12月, 2010 4 次提交
  11. 26 12月, 2010 1 次提交