28 Jul, 2011

40 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (32 commits)
    tg3: Remove 5719 jumbo frames and TSO blocks
    tg3: Break larger frags into 4k chunks for 5719
    tg3: Add tx BD budgeting code
    tg3: Consolidate code that calls tg3_tx_set_bd()
    tg3: Add partial fragment unmapping code
    tg3: Generalize tg3_skb_error_unmap()
    tg3: Remove short DMA check for 1st fragment
    tg3: Simplify tx bd assignments
    tg3: Reintroduce tg3_tx_ring_info
    ASIX: Use only 11 bits of header for data size
    ASIX: Simplify condition in rx_fixup()
    Fix cdc-phonet build
    bonding: reduce noise during init
    bonding: fix string comparison errors
    net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
    net: add IFF_SKB_TX_SHARED flag to priv_flags
    net: sock_sendmsg_nosec() is static
    forcedeth: fix vlans
    gianfar: fix bug caused by 87c288c6e9aa31720b72e2bc2d665e24e1653c3e
    gro: Only reset frag0 when skb can be pulled
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://neil.brown.name/md: (75 commits)
    md/raid10: handle further errors during fix_read_error better.
    md/raid10: Handle read errors during recovery better.
    md/raid10: simplify read error handling during recovery.
    md/raid10: record bad blocks due to write errors during resync/recovery.
    md/raid10: attempt to fix read errors during resync/check
    md/raid10: Handle write errors by updating badblock log.
    md/raid10: clear bad-block record when write succeeds.
    md/raid10: avoid writing to known bad blocks on known bad drives.
    md/raid10 record bad blocks as needed during recovery.
    md/raid10: avoid reading known bad blocks during resync/recovery.
    md/raid10 - avoid reading from known bad blocks - part 3
    md/raid10: avoid reading from known bad blocks - part 2
    md/raid10: avoid reading from known bad blocks - part 1
    md/raid10: Split handle_read_error out from raid10d.
    md/raid10: simplify/reindent some loops.
    md/raid5: Clear bad blocks on successful write.
    md/raid5. Don't write to known bad block on doubtful devices.
    md/raid5: write errors should be recorded as bad blocks if possible.
    md/raid5: use bad-block log to improve handling of uncorrectable read errors.
    md/raid5: avoid reading from known bad blocks.
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
    sound: oss: rename local change_bits to avoid powerpc bitsops.h definition
    ALSA: hda - Fix duplicated DAC assignments for Realtek
    ALSA: asihpi - off by one in asihpi_hpi_ioctl()
    ALSA: hda - Fix Oops with Realtek quirks with NULL adc_nids
    ALSA: asihpi - bug fix pa use before init.
    ALSA: hda - Add support for vref-out based mute LED control on IDT codecs

    Linus Torvalds
     
  • The A0 revision of this chip is the only device that requires these
    features to be disabled.

    Signed-off-by: Matt Carlson
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • The 5719 has bug where RDMAs larger than 4k can cause problems. This
    patch works around the problem by dividing larger DMA requests into
    something the hardware can handle.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • As the driver breaks large skb fragments into smaller submissions to the
    hardware, there is a new danger that BDs might get exhausted before all
    fragments have been mapped. This patch adds code to make sure tx BDs
    aren't oversubscribed and flag the condition if it happens.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • This patch consolidates all code that populates tx BDs into a single
    routine. Setting tx BDs needs to be more carefully controlled to see if
    workarounds need to be applied.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • The following patches are going to break skb fragments into smaller
    sizes. This patch attempts to make the change easier to digest by only
    addressing the skb teardown portion.

    The patch modifies the driver to skip over any BDs that have a flag set
    that indicates the BD isn't the beginning of an skb fragment. Such BDs
    were a result of segmentation and do not need a pci_unmap_page() call.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • In the following patches, unmapping skb fragments will get just as
    complicated as mapping them. This patch generalizes
    tg3_skb_error_unmap() and makes it the one-stop-shop for skb unmapping.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • The first fragment of an skb should always be greater than 8 bytes.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • In the following patches, the process the driver will use to assign skb
    fragments to transmit BDs will get more complicated. To prepare for
    that new code, this patch seeks to simplify how transmit BDs are
    populated. It does this by separating the code that assigns the BD
    members from the logic that controls how the fields are set.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • The following patches will require the use of an additional flag in the
    ring_info structure. The use of this flag is tx path specific, so this
    patch defines a specialized ring_info structure.

    Signed-off-by: Matt Carlson
    Reviewed-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • The AX88772B uses only 11 bits of the header for the actual size. The other bits
    are used for something else. This causes dmesg full of messages:

    asix_rx_fixup() Bad Header Length

    This patch trims the check to only 11 bits. I believe on older chips, the
    remaining 5 top bits are unused.

    Signed-off-by: Marek Vasut
    Signed-off-by: David S. Miller

    Marek Vasut
     
  • Signed-off-by: Marek Vasut
    Signed-off-by: David S. Miller

    Marek Vasut
     
  • Try to send to correct address this time!

    ---------- Forwarded Message ----------

    Subject: [PATCH] Fix cdc-phonet build
    Date: Saturday 23 Jul 2011
    From: Chris Clayton
    To: linux-net@vger.kernel.org

    cdc-phonet does not presently build on linux-3.0 because there is no entry for it in
    drivers/net/Makefile. This patch adds that entry.

    Signed-off-by: Chris Clayton
    Signed-off-by: David S. Miller

    Chris Clayton
     
  • On Tue, Jul 26, 2011 at 05:40:27PM -0700, Joe Perches wrote:
    > On Tue, 2011-07-26 at 17:37 -0700, Jay Vosburgh wrote:
    > > Joe Perches wrote:
    > > >I'd prefer you don't separate the format string
    > > >into multiple pieces.
    > > Why not? To me, it looks easier to read split into sections
    > > that don't wrap lines.
    >
    > Harder to grep for a dmesg and the
    > defect rate of these split formats is
    > typically higher than single strings
    > because of bad spacing between string
    > segments.
    >

    I noticed that you took some time back in late 2009 to 'consolidate' the
    split format-strings present in the bonding driver at the time and I've
    decided I'm fine to leave them the way they are. The main point of my
    patch was to change the output and I would like to get that included.
    Here is my updated patch...

    Subject: [PATCH net-next-2.6 v2] bonding: reduce noise during init

    Many are using sysfs to configure bonding rather than module options, so
    there is no need for bonding to throw this warning in normal cases.

    Keep the message around when debugging is enabled as it might be useful
    for someone desperate enough to enable debugging, but eliminate it
    otherwise.

    Signed-off-by: Andy Gospodarek
    Signed-off-by: David S. Miller

    Andy Gospodarek
     
  • When a bond contains a device where one name is the subset of another
    (eth1 and eth10, for example), one cannot properly set the primary
    device or the currently active device.

    This was reported and based on work by Takuma Umeya. I also verified
    the problem and tested that this fix resolves it.

    V2: A few did not like the the current code or my changes, so I
    refactored bonding_store_primary and bonding_store_active_slave to be a
    bit cleaner, dropped the use of strnicmp since we did not really need
    the comparison to be case insensitive, and formatted the input string
    from sysfs so a comparison to IFNAMSIZ could be used.

    I also discovered an error in bonding_store_active_slave that would
    modify bond->primary_slave rather than bond->curr_active_slave before
    forcing the bonding driver to choose a new active slave.

    V3: Actually sending the proper patch....

    Signed-off-by: Andy Gospodarek
    Reported-by: Takuma Umeya
    Signed-off-by: David S. Miller

    Andy Gospodarek
     
  • After the last patch, We are left in a state in which only drivers calling
    ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
    hardware call ether_setup for their net_devices and don't hold any state in
    their skbs. There are a handful of drivers that violate this assumption of
    course, and need to be fixed up. This patch identifies those drivers, and marks
    them as not being able to support the safe transmission of skbs by clearning the
    IFF_TX_SKB_SHARING flag in priv_flags

    Signed-off-by: Neil Horman
    CC: Karsten Keil
    CC: "David S. Miller"
    CC: Jay Vosburgh
    CC: Andy Gospodarek
    CC: Patrick McHardy
    CC: Krzysztof Halasa
    CC: "John W. Linville"
    CC: Greg Kroah-Hartman
    CC: Marcel Holtmann
    CC: Johannes Berg
    Signed-off-by: David S. Miller

    Neil Horman
     
  • Pktgen attempts to transmit shared skbs to net devices, which can't be used by
    some drivers as they keep state information in skbs. This patch adds a flag
    marking drivers as being able to handle shared skbs in their tx path. Drivers
    are defaulted to being unable to do so, but calling ether_setup enables this
    flag, as 90% of the drivers calling ether_setup touch real hardware and can
    handle shared skbs. A subsequent patch will audit drivers to ensure that the
    flag is set properly

    Signed-off-by: Neil Horman
    Reported-by: Jiri Pirko
    CC: Robert Olsson
    CC: Eric Dumazet
    CC: Alexey Dobriyan
    CC: David S. Miller
    Signed-off-by: David S. Miller

    Neil Horman
     
  • Signed-off-by: Eric Dumazet
    CC: Anton Blanchard
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • For some reason, when rxaccel is disabled, NV_RX3_VLAN_TAG_PRESENT is
    still set and some pseudorandom vids appear. So check for
    NETIF_F_HW_VLAN_RX as well. Also set correctly hw_features and set vlan
    mode on probe.

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko
     
  • commit 87c288c6e9aa31720b72e2bc2d665e24e1653c3e "gianfar: do vlan cleanup" has two issues:
    # permutation of rx and tx flags
    # enabling vlan tag insertion by default (this leads to unusable connections on some configurations)

    If VLAN insertion is requested (via ethtool) it will be set at an other point ...

    Signed-off-by: Sebastian Poehn
    Signed-off-by: David S. Miller

    Sebastian Pöhn
     
  • David S. Miller
     
  • …s/security-testing-2.6

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: (54 commits)
    tpm_nsc: Fix bug when loading multiple TPM drivers
    tpm: Move tpm_tis_reenable_interrupts out of CONFIG_PNP block
    tpm: Fix compilation warning when CONFIG_PNP is not defined
    TOMOYO: Update kernel-doc.
    tpm: Fix a typo
    tpm_tis: Probing function for Intel iTPM bug
    tpm_tis: Fix the probing for interrupts
    tpm_tis: Delay ACPI S3 suspend while the TPM is busy
    tpm_tis: Re-enable interrupts upon (S3) resume
    tpm: Fix display of data in pubek sysfs entry
    tpm_tis: Add timeouts sysfs entry
    tpm: Adjust interface timeouts if they are too small
    tpm: Use interface timeouts returned from the TPM
    tpm_tis: Introduce durations sysfs entry
    tpm: Adjust the durations if they are too small
    tpm: Use durations returned from TPM
    TOMOYO: Enable conditional ACL.
    TOMOYO: Allow using argv[]/envp[] of execve() as conditions.
    TOMOYO: Allow using executable's realpath and symlink's target as conditions.
    TOMOYO: Allow using owner/group etc. of file objects as conditions.
    ...

    Fix up trivial conflict in security/tomoyo/realpath.c

    Linus Torvalds
     
  • If we find more read/write errors we should record a bad block before
    failing the device.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • Currently when we get a read error during recovery, we simply abort
    the recovery.

    Instead, repeat the read in page-sized blocks.
    On successful reads, write to the target.
    On read errors, record a bad block on the destination,
    and only if that fails do we abort the recovery.

    As we now retry reads we need to know where we read from. This was in
    bi_sector but that can be changed during a read attempt.
    So store the correct from_addr and to_addr in the r10_bio for later
    access.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • If a read error is detected during recovery the code currently
    fails the read device.
    This isn't really necessary. recovery_request_write will signal
    a write error to end_sync_write and it will record a write
    error on the destination device which will record a bad block
    there or kick it from the array.

    So just remove this call to do md_error.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • If we get a write error during resync/recovery don't fail the device
    but instead record a bad block. If that fails we can then fail the
    device.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • We already attempt to fix read errors found during normal IO
    and a 'repair' process.
    It is best to try to repair them at any time they are found,
    so move a test so that during sync and check a read error will
    be corrected by over-writing with good data.

    If both (all) devices have known bad blocks in the sync section we
    won't try to fix even though the bad blocks might not overlap. That
    should be considered later.

    Also if we hit a read error during recovery we don't try to fix it.
    It would only be possible to fix if there were at least three copies
    of data, which is not very common with RAID10. But it should still
    be considered later.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • When we get a write error (in the data area, not in metadata),
    update the badblock log rather than failing the whole device.

    As the write may well be many blocks, we trying writing each
    block individually and only log the ones which fail.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • If we succeed in writing to a block that was recorded as
    being bad, we clear the bad-block record.

    This requires some delayed handling as the bad-block-list update has
    to happen in process-context.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • Writing to known bad blocks on drives that have seen a write error
    is asking for trouble. So try to avoid these blocks.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • When recovering one or more devices, if all the good devices have
    bad blocks we should record a bad block on the device being rebuilt.

    If this fails, we need to abort the recovery.

    To ensure we don't think that we aborted later than we actually did,
    we need to move the check for MD_RECOVERY_INTR earlier in md_do_sync,
    in particular before mddev->curr_resync is updated.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • During resync/recovery limit the size of the request to avoid
    reading into a bad block that does not start at-or-before the current
    read address.

    Similarly if there is a bad block at this address, don't allow the
    current request to extend beyond the end of that bad block.

    Now that we don't ever read from known bad blocks, it is safe to allow
    devices with those blocks into the array.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • When attempting to repair a read error, don't read from
    devices with a known bad block.

    As we are only reading PAGE_SIZE blocks, we don't try to
    narrow down to smaller regions in the hope that only part of this
    page is bad - it isn't worth the effort.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • When redirecting a read error to a different device, we must
    again avoid bad blocks and possibly split the request.

    Spin_lock typo fixed thanks to Dan Carpenter

    Signed-off-by: NeilBrown

    NeilBrown
     
  • This patch just covers the basic read path:
    1/ read_balance needs to check for badblocks, and return not only
    the chosen slot, but also how many good blocks are available
    there.
    2/ read submission must be ready to issue multiple reads to
    different devices as different bad blocks on different devices
    could mean that a single large read cannot be served by any one
    device, but can still be served by the array.
    This requires keeping count of the number of outstanding requests
    per bio. This count is stored in 'bi_phys_segments'

    On read error we currently just fail the request if another target
    cannot handle the whole request. Next patch refines that a bit.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • raid10d() is too big and is about to get bigger, so split
    handle_read_error() out as a separate function.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • When a loop ends with a large if, it can be neater to change the
    if to invert the condition and just 'continue'.
    Then the body of the if can be indented to a lower level.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • On a successful write to a known bad block, flag the sh
    so that raid5d can remove the known bad block from the list.

    Signed-off-by: NeilBrown

    NeilBrown