1. 27 4月, 2007 1 次提交
    • A
      UBI: Unsorted Block Images · 801c135c
      Artem B. Bityutskiy 提交于
      UBI (Latin: "where?") manages multiple logical volumes on a single
      flash device, specifically supporting NAND flash devices. UBI provides
      a flexible partitioning concept which still allows for wear-levelling
      across the whole flash device.
      
      In a sense, UBI may be compared to the Logical Volume Manager
      (LVM). Whereas LVM maps logical sector numbers to physical HDD sector
      numbers, UBI maps logical eraseblocks to physical eraseblocks.
      
      More information may be found at
      http://www.linux-mtd.infradead.org/doc/ubi.html
      
      Partitioning/Re-partitioning
      
        An UBI volume occupies a certain number of erase blocks. This is
        limited by a configured maximum volume size, which could also be
        viewed as the partition size. Each individual UBI volume's size can
        be changed independently of the other UBI volumes, provided that the
        sum of all volume sizes doesn't exceed a certain limit.
      
        UBI supports dynamic volumes and static volumes. Static volumes are
        read-only and their contents are protected by CRC check sums.
      
      Bad eraseblocks handling
      
        UBI transparently handles bad eraseblocks. When a physical
        eraseblock becomes bad, it is substituted by a good physical
        eraseblock, and the user does not even notice this.
      
      Scrubbing
      
        On a NAND flash bit flips can occur on any write operation,
        sometimes also on read. If bit flips persist on the device, at first
        they can still be corrected by ECC, but once they accumulate,
        correction will become impossible. Thus it is best to actively scrub
        the affected eraseblock, by first copying it to a free eraseblock
        and then erasing the original. The UBI layer performs this type of
        scrubbing under the covers, transparently to the UBI volume users.
      
      Erase Counts
      
        UBI maintains an erase count header per eraseblock. This frees
        higher-level layers (like file systems) from doing this and allows
        for centralized erase count management instead. The erase counts are
        used by the wear-levelling algorithm in the UBI layer. The algorithm
        itself is exchangeable.
      
      Booting from NAND
      
        For booting directly from NAND flash the hardware must at least be
        capable of fetching and executing a small portion of the NAND
        flash. Some NAND flash controllers have this kind of support. They
        usually limit the window to a few kilobytes in erase block 0. This
        "initial program loader" (IPL) must then contain sufficient logic to
        load and execute the next boot phase.
      
        Due to bad eraseblocks, which may be randomly scattered over the
        flash device, it is problematic to store the "secondary program
        loader" (SPL) statically. Also, due to bit-flips it may become
        corrupted over time. UBI allows to solve this problem gracefully by
        storing the SPL in a small static UBI volume.
      
      UBI volumes vs. static partitions
      
        UBI volumes are still very similar to static MTD partitions:
      
          * both consist of eraseblocks (logical eraseblocks in case of UBI
            volumes, and physical eraseblocks in case of static partitions;
          * both support three basic operations - read, write, erase.
      
        But UBI volumes have the following advantages over traditional
        static MTD partitions:
      
          * there are no eraseblock wear-leveling constraints in case of UBI
            volumes, so the user should not care about this;
          * there are no bit-flips and bad eraseblocks in case of UBI volumes.
      
        So, UBI volumes may be considered as flash devices with relaxed
        restrictions.
      
      Where can it be found?
      
        Documentation, kernel code and applications can be found in the MTD
        gits.
      
      What are the applications for?
      
        The applications help to create binary flash images for two purposes: pfi
        files (partial flash images) for in-system update of UBI volumes, and plain
        binary images, with or without OOB data in case of NAND, for a manufacturing
        step. Furthermore some tools are/and will be created that allow flash content
        analysis after a system has crashed..
      
      Who did UBI?
      
        The original ideas, where UBI is based on, were developed by Andreas
        Arnez, Frank Haverkamp and Thomas Gleixner. Josh W. Boyer and some others
        were involved too. The implementation of the kernel layer was done by Artem
        B. Bityutskiy. The user-space applications and tools were written by Oliver
        Lohmann with contributions from Frank Haverkamp, Andreas Arnez, and Artem.
        Joern Engel contributed a patch which modifies JFFS2 so that it can be run on
        a UBI volume. Thomas Gleixner did modifications to the NAND layer. Alexander
        Schmidt made some testing work as well as core functionality improvements.
      Signed-off-by: NArtem B. Bityutskiy <dedekind@linutronix.de>
      Signed-off-by: NFrank Haverkamp <haver@vnet.ibm.com>
      801c135c
  2. 26 4月, 2007 1 次提交
    • A
      packet: fix error handling · cbc31a47
      Andrew Morton 提交于
      The packet driver is assuming (reasonably) that the (undocumented)
      request.errors is an errno.  But it is in fact some mysterious bitfield.  When
      things go wrong we return weird positive numbers to the VFS as pointers and it
      goes oops.
      
      Thanks to William Heimbigner for reporting and diagnosis.
      
      (It doesn't oops, but this driver still doesn't work for William)
      
      Cc: William Heimbigner <icxcnika@mar.tar.cc>
      Cc: Peter Osterlund <petero2@telia.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cbc31a47
  3. 25 4月, 2007 5 次提交
    • M
      [BNX2]: Fix occasional NETDEV WATCHDOG on 5709. · 68c9f75a
      Michael Chan 提交于
      Tweak a register setting to prevent the tx mailbox from halting.
      
      Update version to 1.5.8.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      68c9f75a
    • A
      drivers/net/hamradio/baycom_ser_fdx build fix · 5efb764c
      Andrew Morton 提交于
      sparc64:
      
      drivers/net/hamradio/baycom_ser_fdx.c: In function `ser12_open':
      drivers/net/hamradio/baycom_ser_fdx.c:417: error: `NR_IRQS' undeclared (first us
      e in this function)
      drivers/net/hamradio/baycom_ser_fdx.c:417: error: (Each undeclared identifier is
       reported only once
      drivers/net/hamradio/baycom_ser_fdx.c:417: error: for each function it appears i
      n.)
      
      Cc: Folkert van Heusden <folkert@vanheusden.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      5efb764c
    • D
      usb-net/pegasus: fix pegasus carrier detection · c43c49bd
      Dan Williams 提交于
      Broken by 4a1728a2 which switched the
      return semantics of read_mii_word() but didn't fix usage of
      read_mii_word() to conform to the new semantics.
      
      Setting carrier to off based on the NO_CARRIER flag is also incorrect as
      that flag only triggers on TX failure and therefore isn't correct when
      no frames are being transmitted.  Since there is already a 2*HZ MII
      carrier check going on, defer to that.
      
      Add a TRUST_LINK_STATUS feature flag for adapters where the LINK_STATUS
      flag is actually correct, and use that rather than the NO_CARRIER flag.
      Signed-off-by: NDan Williams <dcbw@redhat.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      c43c49bd
    • N
      sis900: Allocate rx replacement buffer before rx operation · b748d9e3
      Neil Horman 提交于
      	The sis900 driver appears to have a bug in which the receive routine
      passes the skbuff holding the received frame to the network stack before
      refilling the buffer in the rx ring.  If a new skbuff cannot be allocated, the
      driver simply leaves a hole in the rx ring, which causes the driver to stop
      receiving frames and become non-recoverable without an rmmod/insmod according to
      reporters.  This patch reverses that order, attempting to allocate a replacement
      buffer first, and receiving the new frame only if one can be allocated.  If no
      skbuff can be allocated, the current skbuf in the rx ring is recycled, dropping
      the current frame, but keeping the NIC operational.
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      b748d9e3
    • A
      [netdrvr] depca: handle platform_device_add() failure · d91c088b
      Andrea Righi 提交于
      The following patch fixes a kernel bug in depca_platform_probe().
      
      We don't use a dynamic pointer for pldev->dev.platform_data, so it seems
      that the correct way to proceed if platform_device_add(pldev) fails is
      to explicitly set the pldev->dev.platform_data pointer to NULL, before
      calling the platform_device_put(pldev), or it will be kfree'ed by
      platform_device_release().
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      d91c088b
  4. 24 4月, 2007 15 次提交
  5. 22 4月, 2007 4 次提交
  6. 21 4月, 2007 3 次提交
  7. 20 4月, 2007 11 次提交
    • L
      Revert "e1000: fix NAPI performance on 4-port adapters" · 46fcc86d
      Linus Torvalds 提交于
      This reverts commit 60cba200.  It's been
      linked to lockups of the e1000 hardware, see for example
      
      	https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=229603
      
      but it's likely that the commit itself is not really introducing the
      bug, but just allowing an unrelated problem to rear its ugly head (ie
      one current working theory is that the code exposes us to a hardware
      race condition by decreasing the amount of time we spend in each NAPI
      poll cycle).
      
      We'll revert it until root cause is known.  Intel has a repeatable
      reproduction on two different machines and bus traces of the hardware
      doing something bad.
      Acked-by: NJesse Brandeburg <jesse.brandeburg@intel.com>
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Greg KH <gregkh@suse.de>
      Cc: Dave Jones <davej@redhat.com>
      Cc: Auke Kok <auke-jan.h.kok@intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      46fcc86d
    • A
      pata_sis: Fix oops on boot · f3769e9d
      Alan Cox 提交于
      A small number of SiS setups require special handling (not many judging
      by how long this dumb bug survived). A couple of Fedora 7 devel testers
      hit an Oops on pata_sis loading which is caused by terminal confusion
      between chipset as 'the chipset we have found' and chipset as 'array
      iterator'
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      f3769e9d
    • P
      [PPP]: Fix skbuff.c:BUG due incorrect logic in process_input_packet() · 7c5050e3
      Paul Mackerras 提交于
      From: Paul Mackerras <paulus@samba.org>
      
      This fixes:
      
      Subject: kernel BUG at net/core/skbuff.c in linux-2.6.21-rc6
      
      process_input_packet() treats the case where the first byte is 0xff
      (PPP_ALLSTATIONS) but the second byte is 0x03 (PPP_UI) as indicating a
      packet with a PPP protocol number of 0xff.  Arguably that's wrong
      since PPP protocol 0xff is reserved, and the RFC does envision the
      possibility of receiving frames where the control field has values
      other than 0x03.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7c5050e3
    • S
      sky2: version 1.14 · 93cd791e
      Stephen Hemminger 提交于
      Signed-off-by: NStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      93cd791e
    • S
      sky2: no jumbo on Yukon FE · d2adf4f6
      Stephen Hemminger 提交于
      The Yukon FE (100mbit only) chips do not support large packets.
      Signed-off-by: NStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      d2adf4f6
    • S
      sky2: EC-U performance and jumbo support · b628ed98
      Stephen Hemminger 提交于
      The Yukon EC Ultra chips have transmit settings for store and
      forward and PCI buffering. By setting these appropriately, normal
      performance goes from 750Mbytes/sec to 940Mbytes/sec (non-jumbo).
      
      It is also possible to do Jumbo mode, but it means turning off
      TSO and checksum offload so the performance gets worse. There isn't
      enough buffering for checksum offload to work.
      Signed-off-by: NStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      b628ed98
    • S
      sky2: disable ASF on all chip types · 4f44d8ba
      Stephen Hemminger 提交于
      Need to make sure and disable ASF on all chip types. Otherwise, there may be
      random reboots.
      Signed-off-by: NStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      4f44d8ba
    • S
      sky2: handle descriptor errors · 40b01727
      Stephen Hemminger 提交于
      There should never be descriptor error unless hardware or driver is buggy.
      But if an error occurs, print useful information, clear irq, and recover.
      Signed-off-by: NStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      40b01727
    • S
      sky2: disable support for 88E8056 · 0a17e4c2
      Stephen Hemminger 提交于
      This device is having all sorts of problems that lead to data corruption
      and system instability.  It gets receive status and data out of order,
      it generates descriptor and TSO errors, etc.
      
      Until the problems are resolved, it should not be used by anyone
      who cares about there system.
      Signed-off-by: NStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      0a17e4c2
    • D
      gianfar needs crc32 lib dependency · bf41a7c5
      Dave Jiang 提交于
      Gianfar needs crc32 to be selected to compile.
      Signed-off-by: NDave Jiang <djiang@mvista.com>
      
      --
       drivers/net/Kconfig |    1 +
       1 files changed, 1 insertions(+), 0 deletions(-)
      --
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      bf41a7c5
    • L
      spidernet: Fix problem sending IP fragments · 33bdeec8
      Linas Vepstas 提交于
      The basic structure of "normal" UDP/IP/Ethernet
      frames (that actually work):
       - It starts with the Ethernet header (dest MAC, src MAC, etc.)
       - The next part is occupied by the IP header (version info, length of
      packet, id=0, fragment offset=0, checksum, from / to address, etc.)
       - Then comes the UDP header (src / dest port, length, checksum)
       - Actual payload
       - Ethernet checksum
      
      Now what's different for IP fragment:
       - The IP header has id set to some value (same for all fragments),
      offset is set appropriately (i.e. 0 for first fragment, following
      according to size of other fragments), size is the length of the frame.
       - UDP header is unchanged. I.e. length is according to full UDP
      datagram, not just the part within the actual frame! But this is only
      true within the first frame: all following frames don't have a valid
      UDP-header at all.
      
      The spidernet silicon seems to be quite intelligent: It's able to
      compute (IP / UDP / Ethernet) checksums on the fly and tests if frames
      are conforming to RFC -- at least conforming to RFC on complete frames.
      
      But IP fragments are different as explained above:
      I.e. for IP fragments containing part of a UDP datagram it sees
      incompatible length in the headers for IP and UDP in the first frame
      and, thus, skips this frame. But the content *is* correct for IP
      fragments. For all following frames it finds (most probably) no valid
      UDP header at all. But this *is* also correct for IP fragments.
      
      The Linux IP-stack seems to be clever in this point. It expects the
      spidernet to calculate the checksum (since the module claims to be able
      to do so) and marks the skb's for "normal" frames accordingly
      (ip_summed set to CHECKSUM_HW).
      But for the IP fragments it does not expect the driver to be capable to
      handle the frames appropriately. Thus all checksums are allready
      computed. This is also flaged within the skb (ip_summed set to
      CHECKSUM_NONE).
      
      Unfortunately the spidernet driver ignores that hints. It tries to send
      the IP fragments of UDP datagrams as normal UDP/IP frames. Since they
      have different structure the silicon detects them the be not
      "well-formed" and skips them.
      
      The following one-liner against 2.6.21-rc2 changes this behavior. If the
      IP-stack claims to have done the checksumming, the driver should not
      try to checksum (and analyze) the frame but send it as is.
      Signed-off-by: NNorbert Eicker <n.eicker@fz-juelich.de>
      Signed-off-by: NLinas Vepstas <linas@austin.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      33bdeec8