06 May, 2007

8 commits

  • And fix up the code to always allow MSI on 5714 A2.

    Call tg3_find_peer() earlier because we need that information before
    we can determine whether we can set TG3_FLAG_SUPPORT_MSI or not.

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

    Michael Chan
     
  • This patch removes the use of the TG3_FLAG_5701_REG_WRITE_BUG flag.
    It's logic is only used to set a function pointer and thus the
    logic can be collapsed and the flag removed.

    [ Comment tidy by Christoph Hellwig. -DaveM ]

    Signed-off-by: Matt Carlson
    Signed-off-by: Michael Chan

    Matt Carlson
     
  • This flag does not do anything useful.

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

    Michael Chan
     
  • The reset was added a while back so that ASF could re-init whatever
    MAC address it wanted to use after the MAC address was changed.
    Instead of resetting, we can just keep MAC address 1 unchanged during
    MAC address changes if MAC address 1 is different from MAC address 0.

    This fixes 2 problems:

    1. Bonding calls set_mac_address in contexts that cannot sleep.
    It no longer sleeps with the chip reset removed.

    2. When ASF shares the same MAC address as the NIC, it needs to
    always do that even when the MAC address is changed.

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

    Michael Chan
     
  • Change TG3_FLAG_SERDES_WOL_CAP to TG3_FLAG_WOL_CAP to make it easier
    to manage WoL. This flag is now used consistently during ethtool WoL
    setup and power setting changes.

    Signed-off-by: Gary Zambrano
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Gary Zambrano
     
  • The GPIO settings may change during reset and so the stored values in
    tp->grc_local_ctrl should be cleared first.

    Signed-off-by: Gary Zambrano
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Gary Zambrano
     
  • This patch changes the NVRAM sizing procedure so that the driver can
    take advantage of devices with 1:1 NVRAM strapping configurations. This
    is useful in cases where the traditional NVRAM sizing method fails. In
    the event that the flash size cannot be determined, the largest known
    NVRAM size is used. The patch also removes support for 5755 NVRAM
    devices that are not supported by Broadcom and adds explicit sizing for
    this device.

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

    Matt Carlson
     
  • 1. Remove the check for skb->len greater than MTU when doing TSO.
    When the destination has a smaller MSS than the source, a TSO packet
    may be smaller than the MTU and we still need to process it as a TSO
    packet.

    2. On 5705A3 devices with TSO enabled, the DMA engine can hang due to a
    hardware bug. This patch avoids the hanging condition by reducing the
    DMA burst size.

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

    Matt Carlson
     

28 Apr, 2007

1 commit

  • * master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: (67 commits)
    [SCSI] SUNESP: Complete driver rewrite to version 2.0
    [SPARC64]: Convert PCI over to generic struct iommu/strbuf.
    [SPARC]: device_node name constification fallout
    [SPARC64]: Convert SBUS over to generic iommu/strbuf structs.
    [SPARC64]: Add generic iommu and strbuf structs to iommu.h
    [SPARC64]: Consolidate {sbus,pci}_iommu_arena.
    [SPARC]: Make device_node name and type const
    [SPARC64]: constify some paramaters of OF routines
    [TIGON3]: of_get_property() returns const.
    [SPARC64]: Fix PCI rework to adhere to of_get_property() const return.
    [SPARC64]: Document and fix calculation of pages_avail.
    [SPARC64]: Make sure pbm->prom_node is setup easly enough in psycho.c
    [SPARC64]: Use bootmem_bootmap_pages() in choose_bootmap_pfn().
    [SPARC64]: Add proper header file extern for cmdline_memory_size.
    [SPARC64]: Kill sparc_ultra_dump_{i,d}tlb()
    [SPARC64]: Use DECLARE_BITMAP and BITS_TO_LONGS in mm/init.c
    [SPARC64]: Give move verbose show_mem() output just like i386.
    [SPARC64]: Mark show_mem() printk's with KERN_INFO.
    [SPARC64]: Kill kvaddr_to_phys() and friends.
    [SPARC64]: Privatize sun4u_get_pte() and fix name.
    ...

    Linus Torvalds
     

26 Apr, 2007

8 commits


07 Apr, 2007

1 commit

  • The driver will crash when the chip has been initialized by EFI before
    tg3_init_one(). In this case, the driver will call tg3_chip_reset()
    before allocating consistent memory.

    The bug is fixed by checking for tp->hw_status before accessing it
    during tg3_chip_reset().

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

    Michael Chan
     

26 Mar, 2007

3 commits

  • Update version to 3.75.

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

    Michael Chan
     
  • On most tg3 chips, the memory enable bit in the PCI command register
    gets cleared during chip reset and must be restored before accessing
    PCI registers using memory cycles. The chip does not generate
    interrupt during chip reset, but the irq handler can still be called
    because of irq sharing or irqpoll. Reading a register in the irq
    handler can cause a master abort in this scenario and may result in a
    crash on some architectures.

    Use the TG3_FLAG_CHIP_RESETTING flag to tell the irq handler to exit
    without touching any registers. The checking of the flag is in the
    "slow" path of the irq handler and will not affect normal performance.
    The msi handler is not shared and therefore does not require checking
    the flag.

    Thanks to Bernhard Walle for reporting the problem.

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

    Michael Chan
     
  • This flag to support multiple PCIX split completions was never used
    because of hardware bugs. This will make room for a new flag.

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

    Michael Chan
     

03 Mar, 2007

1 commit

  • This patch splits the vlan_group struct into a multi-allocated struct. On
    x86_64, the size of the original struct is a little more than 32KB, causing
    a 4-order allocation, which is prune to problems caused by buddy-system
    external fragmentation conditions.

    I couldn't just use vmalloc() because vfree() cannot be called in the
    softirq context of the RCU callback.

    Signed-off-by: Dan Aloni
    Acked-by: Jeff Garzik
    Signed-off-by: David S. Miller

    Dan Aloni
     

27 Feb, 2007

1 commit

  • 1. Add race condition check after netif_stop_queue(). tg3_tx() runs
    without netif_tx_lock and can race with tg3_start_xmit_dma_bug() ->
    tg3_tso_bug().

    2. Firmware TSO in 5703/5704/5705 also have the same TSO limitation,
    i.e. they cannot handle TSO headers bigger than 80 bytes. Rename
    TG3_FL2_HW_TSO_1_BUG to TG3_FL2_TSO_BUG and set this flag on
    these chips as well.

    3. Update version to 3.74.

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

    Michael Chan
     

14 Feb, 2007

8 commits


09 Feb, 2007

1 commit

  • During an oprofile session of linux-2.6.20 on a dual opteron system, I noticed
    an expensive divide was done in tg3_poll().

    I am using gcc-4.1.1, so the following comment from drivers/net/tg3.c seems
    over-optimistic :

    /* Do not place this n-ring entries value into the tp struct itself,
    * we really want to expose these constants to GCC so that modulo et
    * al. operations are done with shifts and masks instead of with
    * hw multiply/modulo instructions. Another solution would be to
    * replace things like '% foo' with '& (foo - 1)'.
    */
    #define TG3_RX_RCB_RING_SIZE(tp) \
    ((tp->tg3_flags2 & TG3_FLG2_5705_PLUS) ? 512 : 1024)

    Assembly code before patch :
    (oprofile results included)
    6434 0.0088 :ffffffff803684b9: mov 0x6f0(%r15),%eax
    587 8.0e-04 :ffffffff803684c0: and $0x40000,%eax
    2170 0.0030 :ffffffff803684c5: cmp $0x1,%eax
    :ffffffff803684c8: lea 0x1(%r13),%eax
    :ffffffff803684cc: sbb %ecx,%ecx
    2051 0.0028 :ffffffff803684ce: xor %edx,%edx
    :ffffffff803684d0: and $0x200,%ecx
    20 2.7e-05 :ffffffff803684d6: add $0x200,%ecx
    1986 0.0027 :ffffffff803684dc: div %ecx
    103427 0.1410 :ffffffff803684de: cmp %edx,0xffffffffffffff7c(%rbp)

    Assembly code after the suggested patch :

    ffffffff803684b9: mov 0x6f0(%r15),%eax
    ffffffff803684c0: and $0x40000,%eax
    ffffffff803684c5: cmp $0x1,%eax
    ffffffff803684c8: sbb %eax,%eax
    ffffffff803684ca: inc %r13d
    ffffffff803684cd: and $0x200,%eax
    ffffffff803684d2: add $0x1ff,%eax
    ffffffff803684d7: and %eax,%r13d
    ffffffff803684da: cmp %r13d,0xffffffffffffff7c(%rbp)

    Signed-off-by: Eric Dumazet
    Acked-by: Michael Chan
    Signed-off-by: David S. Miller

    Eric Dumazet
     

06 Feb, 2007

1 commit

  • Remove the NETIF_F_TSO #ifdef-ery in drivers/net; this was
    for old-old-2.4 compat (even current 2.4 has NETIF_F_TSO)
    but it's time to get rid of it by now.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Jeff Garzik

    Arjan van de Ven
     

09 Jan, 2007

1 commit


18 Dec, 2006

5 commits


07 Dec, 2006

1 commit