04 Dec, 2009

1 commit


03 Dec, 2009

38 commits

  • Fix dma-api-checking warnings in Sun HME

    Sun HME driver is mapping the first fragment with dma_map_single and subsequent
    fragments with dma_map_page. It is unmapping all fragments with dma_unmap_single
    and that produces the warning.

    This patch changes it so that it unmaps only the first fragment with
    dma_unmap_single and subsequent fragments are unmapped with dma_unmap_page.

    WARNING: at lib/dma-debug.c:816 check_unmap+0x3ac/0x780()
    hme 0000:01:01.1: DMA-API: device driver frees DMA memory with wrong function [device address=0x00000000c1082000] [size=32 bytes] [mapped as page] [unmapped as single]
    Modules linked in: nbd sunhme openpromfs sermouse unix
    Call Trace:
    [0000000000456910] warn_slowpath_common+0x50/0xa0
    [0000000000571f4c] check_unmap+0x3ac/0x780
    [0000000000572570] debug_dma_unmap_page+0x50/0x60
    [000000001002f5fc] happy_meal_tx+0x11c/0x260 [sunhme]
    [000000001002fc4c] happy_meal_interrupt+0xcc/0xe0 [sunhme]
    [0000000000492d94] handle_fasteoi_irq+0x74/0x100
    [000000000042ac0c] handler_irq+0xcc/0x100
    [0000000000426a54] valid_addr_bitmap_patch+0x14/0x1c0
    [0000000000665de0] _spin_unlock_irqrestore+0x40/0x60
    [0000000000462bb8] mod_timer+0x118/0x1a0
    [00000000005ec254] sk_reset_timer+0x14/0x40
    [0000000000635e4c] tcp_event_new_data_sent+0x8c/0xc0
    [0000000000639374] __tcp_push_pending_frames+0x34/0xc0
    ---[ end trace 73d5c42c1e9f11c4 ]---
    Mapped at:
    [] happy_meal_start_xmit+0x308/0x480 [sunhme]
    [] dev_hard_start_xmit+0x318/0x3c0
    [] sch_direct_xmit+0x1a4/0x200
    [] dev_queue_xmit+0x410/0x560
    [] neigh_resolve_output+0xfc/0x300

    Signed-off-by: Mikulas Patocka
    Signed-off-by: David S. Miller

    Mikulas Patocka
     
  • Eric Dumazet mentioned in a context of another problem:

    "Well, it seems NFS reuses its socket, so maybe we miss some
    cleaning as spotted in this old patch"

    I've not check under which conditions that actually happens but
    if true, we need to make sure we don't accidently leave stale
    hints behind when the write queue had to be purged (whether reusing
    with NFS can actually happen if purging took place is something I'm
    not sure of).

    ...At least it compiles.

    Signed-off-by: Ilpo Järvinen
    Signed-off-by: David S. Miller

    Ilpo Järvinen
     
  • Otherwise:

    ERROR: "sysctl_tcp_cookie_size" [net/ipv6/ipv6.ko] undefined!
    make[1]: *** [__modpost] Error 1

    Signed-off-by: David S. Miller

    David S. Miller
     
  • net/ipv4/tcp_output.c: In function ‘tcp_make_synack’:
    net/ipv4/tcp_output.c:2488: warning: cast from pointer to integer of different size

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Take advantage of the fact that an explicit rtnl_kill_links is
    unnecessary (and skipping it improves batching), as network namespace
    exit calls dellink on all remaining virtual devices, and
    rtnl_link_unregister calls dellink on all outstanding devices in that
    network namespace. To do this we need to leave the vlan proc
    directories in place until after network device exit time, which is
    done by using register_pernet_subsys instead of
    register_pernet_device.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: David S. Miller

    Eric W. Biederman
     
  • Unimplemented operations should not silently fail.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • These functions provide the default behaviour and do not need to be
    set in struct ethtool_ops.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • Parse incoming TCP_COOKIE option(s).

    Calculate TCP_COOKIE option.

    Send optional data.

    This is a significantly revised implementation of an earlier (year-old)
    patch that no longer applies cleanly, with permission of the original
    author (Adam Langley):

    http://thread.gmane.org/gmane.linux.network/102586

    Requires:
    TCPCT part 1a: add request_values parameter for sending SYNACK
    TCPCT part 1b: generate Responder Cookie secret
    TCPCT part 1c: sysctl_tcp_cookie_size, socket option TCP_COOKIE_TRANSACTIONS
    TCPCT part 1d: define TCP cookie option, extend existing struct's
    TCPCT part 1e: implement socket option TCP_COOKIE_TRANSACTIONS
    TCPCT part 1f: Initiator Cookie => Responder

    Signed-off-by: William.Allen.Simpson@gmail.com
    Signed-off-by: David S. Miller

    William Allen Simpson
     
  • Calculate and format TCP_COOKIE option.

    This is a significantly revised implementation of an earlier (year-old)
    patch that no longer applies cleanly, with permission of the original
    author (Adam Langley):

    http://thread.gmane.org/gmane.linux.network/102586

    Requires:
    TCPCT part 1c: sysctl_tcp_cookie_size, socket option TCP_COOKIE_TRANSACTIONS
    TCPCT part 1d: define TCP cookie option, extend existing struct's

    Signed-off-by: William.Allen.Simpson@gmail.com
    Signed-off-by: David S. Miller

    William Allen Simpson
     
  • Provide per socket control of the TCP cookie option and SYN/SYNACK data.

    This is a straightforward re-implementation of an earlier (year-old)
    patch that no longer applies cleanly, with permission of the original
    author (Adam Langley):

    http://thread.gmane.org/gmane.linux.network/102586

    The principle difference is using a TCP option to carry the cookie nonce,
    instead of a user configured offset in the data.

    Allocations have been rearranged to avoid requiring GFP_ATOMIC.

    Requires:
    net: TCP_MSS_DEFAULT, TCP_MSS_DESIRED
    TCPCT part 1c: sysctl_tcp_cookie_size, socket option TCP_COOKIE_TRANSACTIONS
    TCPCT part 1d: define TCP cookie option, extend existing struct's

    Signed-off-by: William.Allen.Simpson@gmail.com
    Signed-off-by: David S. Miller

    William Allen Simpson
     
  • Data structures are carefully composed to require minimal additions.
    For example, the struct tcp_options_received cookie_plus variable fits
    between existing 16-bit and 8-bit variables, requiring no additional
    space (taking alignment into consideration). There are no additions to
    tcp_request_sock, and only 1 pointer in tcp_sock.

    This is a significantly revised implementation of an earlier (year-old)
    patch that no longer applies cleanly, with permission of the original
    author (Adam Langley):

    http://thread.gmane.org/gmane.linux.network/102586

    The principle difference is using a TCP option to carry the cookie nonce,
    instead of a user configured offset in the data. This is more flexible and
    less subject to user configuration error. Such a cookie option has been
    suggested for many years, and is also useful without SYN data, allowing
    several related concepts to use the same extension option.

    "Re: SYN floods (was: does history repeat itself?)", September 9, 1996.
    http://www.merit.net/mail.archives/nanog/1996-09/msg00235.html

    "Re: what a new TCP header might look like", May 12, 1998.
    ftp://ftp.isi.edu/end2end/end2end-interest-1998.mail

    These functions will also be used in subsequent patches that implement
    additional features.

    Requires:
    TCPCT part 1a: add request_values parameter for sending SYNACK
    TCPCT part 1b: generate Responder Cookie secret
    TCPCT part 1c: sysctl_tcp_cookie_size, socket option TCP_COOKIE_TRANSACTIONS

    Signed-off-by: William.Allen.Simpson@gmail.com
    Signed-off-by: David S. Miller

    William Allen Simpson
     
  • Define sysctl (tcp_cookie_size) to turn on and off the cookie option
    default globally, instead of a compiled configuration option.

    Define per socket option (TCP_COOKIE_TRANSACTIONS) for setting constant
    data values, retrieving variable cookie values, and other facilities.

    Move inline tcp_clear_options() unchanged from net/tcp.h to linux/tcp.h,
    near its corresponding struct tcp_options_received (prior to changes).

    This is a straightforward re-implementation of an earlier (year-old)
    patch that no longer applies cleanly, with permission of the original
    author (Adam Langley):

    http://thread.gmane.org/gmane.linux.network/102586

    These functions will also be used in subsequent patches that implement
    additional features.

    Requires:
    net: TCP_MSS_DEFAULT, TCP_MSS_DESIRED

    Signed-off-by: William.Allen.Simpson@gmail.com
    Signed-off-by: David S. Miller

    William Allen Simpson
     
  • Define (missing) hash message size for SHA1.

    Define hashing size constants specific to TCP cookies.

    Add new function: tcp_cookie_generator().

    Maintain global secret values for tcp_cookie_generator().

    This is a significantly revised implementation of earlier (15-year-old)
    Photuris [RFC-2522] code for the KA9Q cooperative multitasking platform.

    Linux RCU technique appears to be well-suited to this application, though
    neither of the circular queue items are freed.

    These functions will also be used in subsequent patches that implement
    additional features.

    Signed-off-by: William.Allen.Simpson@gmail.com
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    William Allen Simpson
     
  • Add optional function parameters associated with sending SYNACK.
    These parameters are not needed after sending SYNACK, and are not
    used for retransmission. Avoids extending struct tcp_request_sock,
    and avoids allocating kernel memory.

    Also affects DCCP as it uses common struct request_sock_ops,
    but this parameter is currently reserved for future use.

    Signed-off-by: William.Allen.Simpson@gmail.com
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    William Allen Simpson
     
  • David S. Miller
     
  • Replace pci_alloc_consistent() with dma_alloc_coherent() so that
    appropriate GFP flags can be used.

    Signed-off-by: Michael Chan
    Signed-off-by: Benjamin Li
    Signed-off-by: David S. Miller

    Michael Chan
     
  • The old code mistakenly zeroed out the upper 32-bit of the DMA address.

    Signed-off-by: Michael Chan
    Signed-off-by: Benjamin Li
    Signed-off-by: David S. Miller

    Michael Chan
     
  • Fix code to read the proper iSCSI MAC address for bnx2x devices.

    Signed-off-by: Michael Chan
    Signed-off-by: Benjamin Li
    Signed-off-by: David S. Miller

    Michael Chan
     
  • Need to send a HALT command to the firmware to fully shutdown the bnx2x
    rings.

    Signed-off-by: Michael Chan
    Signed-off-by: Benjamin Li
    Signed-off-by: David S. Miller

    Michael Chan
     
  • Old code was initializing the ring producers using an incorrect I/O
    address.

    Signed-off-by: Michael Chan
    Signed-off-by: Benjamin Li
    Signed-off-by: David S. Miller

    Michael Chan
     
  • Handle few corner cases in firmware hang detection and recovery:

    o Don't mark device state as READY, till handshake with
    firmware is done.
    o During probe, if start_firmware fails, restore reference
    count.
    o Don't increment refernce count, if start_firmware fails
    during firmware reset.
    o Clear __NX_RESETTING bit, incase of fatal error or tempeature
    reaches critical limit so that pci remove() doesn't poll on
    this bit.

    Signed-off-by: Amit Kumar Salecha
    Signed-off-by: David S. Miller

    Amit Kumar Salecha
     
  • Driver maps only some part of the MMIO bar 0 in case of
    NX2031. This is sufficient for tx and rx by the driver.
    When debug tools need to access resources in
    unmapped regions, driver needs to map these on the fly
    in order to complete read/write request.

    Signed-off-by: Narender Kumar
    Signed-off-by: Dhananjay Phadke
    Signed-off-by: Amit Kumar Salecha
    Signed-off-by: David S. Miller

    Narender Kumar
     
  • Some function pointers for a few PHY operations (for 82578 and 82567) and
    were set incorrectly causing functions to be executed that were accessing
    incorrect PHY register offsets for that particular device. This patch also
    moves a few PHY-specific functions from ich8lan.c to the more appropriate
    phy.c.

    Signed-off-by: Bruce Allan
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Bruce Allan
     
  • The workaround that detects the correct PHY ID when an initial read of the
    PHY ID registers returns an invalid one should retry up to ten times with
    a small delay between attempts using a single PHY address and then repeat
    using the remaining possible PHY addresses. Do this instead of trying each
    possible PHY address repeating that up to 100 times.

    Signed-off-by: Bruce Allan
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Bruce Allan
     
  • The function pointers for 8257x devices are not set. This is not really a
    problem now because there is nothing in the driver that references the
    pointers for this particular MAC-family (the appropriate functions are
    called directly), but the pointers should be set in case they are used in
    the future.

    Signed-off-by: Bruce Allan
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Bruce Allan
     
  • The two functions skb_dma_map/unmap are unsafe to use as they cause
    problems when packets are cloned and sent to multiple devices while a HW
    IOMMU is enabled. Due to this it is best to remove the code so it is not
    used by any other network driver maintainters.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • Due to the fact that skb_dma_map/unmap do not work correctly when a HW
    IOMMU is enabled it has been recommended to go about removing the calls
    from the network device drivers.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    CC: Matt Carlson
    CC: Michael Chan
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • Due to the fact that skb_dma_map/unmap do not work correctly when a HW
    IOMMU is enabled it has been recommended to go about removing the calls
    from the network device drivers.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    CC: Eilon Greenstein
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • Due to the fact that skb_dma_map/unmap do not work correctly when a HW
    IOMMU is enabled it has been recommended to go about removing the calls
    from the network device drivers.

    [ Fix bnx2_free_tx_skbs() ring indexing and use NETDEV_TX_OK return
    code in bnx2_start_xmit() after cleaning up DMA mapping errors. -Mchan ]

    Signed-off-by: Alexander Duyck
    Signed-off-by: Michael Chan
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • This patch removes the skb_dma_map/unmap calls from the igbvf driver due to
    the fact that it does not play well with HW IOMMU when combined with
    transmitting cloned skbs.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • This change removes skb_dma_map/unmap calls from the igb driver due to the
    fact that the call is incompatible with iommu enabled kernels. In order to
    prevent warnings about using the wrong unmap call I have added a
    mapped_as_page value to the buffer_info structure to track if the mapped
    region is a page or a buffer.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • This patch removes skb_dma_map/unmap calls from the ixgbe driver due to the
    fact that the calls don't work with HW IOMMU enabled systems. The problem
    is that multiple mappings will give different results when HW IOMMU is
    enabled and the skb_dma_map/unmap calls only have one location to store
    mappings.

    Signed-off-by: Alexander Duyck
    Acked-by: Peter P Waskiewicz Jr
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • skb_dma_map is incompatible with HW iommu due to the fact that multiple
    mappings can result in different results each time. For this reason it is
    best to just remove use of these function calls.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • Remove the use of skb_dma_map from the e1000 driver in order to avoid
    issues when HW iommu are in use.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • In testing we have found that skb_dma_map/unmap is incompatible with HW
    IOMMU due to the fact that multiple mappings will return different results.
    In order to correct this we need to remove skb_dma_map/unmap calls from the
    e1000e driver.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • The commit 27fed4175acf81ddd91d9a4ee2fd298981f60295 (ip: fix logic of
    reverse path filter sysctl) has changed the logic of rp_filter. The
    document about rp_filter is out of date. Now, setting
    conf/all/rp_filte with 0 can also enable source validation.

    Update the document according to the commit.

    Signed-off-by: Shan Wei
    Signed-off-by: David S. Miller

    Shan Wei
     
  • bnx2 is failing when a PCI error is detected. The error is the
    following:

    bnx2: Chip not in correct endian mode
    bnx2: fw sync timeout, reset code = 404001d

    This error was caused because the way pci_restore_state() is working
    after commit 4b77b0a2ba27d64f58f16d8d4d48d8319dda36ff ("PCI: Clear
    saved_state after the state has been restored").

    Signed-off-by: Breno Leitao
    Acked-by: Michael Chan
    Signed-off-by: David S. Miller

    Breno Leitao
     

02 Dec, 2009

1 commit