• Matt Carlson's avatar
    tg3: Fix TSO CAP for 5704 devs w / ASF enabled · 3a0d367c
    Matt Carlson authored
    [ Upstream commit cf9ecf4b ]
    
    On the earliest TSO capable devices, TSO was accomplished through
    firmware.  The TSO cannot coexist with ASF management firmware though.
    The tg3 driver determines whether or not ASF is enabled by calling
    tg3_get_eeprom_hw_cfg(), which checks a particular bit of NIC memory.
    Commit dabc5c67
    
    , entitled "tg3: Move
    TSO_CAPABLE assignment", accidentally moved the code that determines
    TSO capabilities earlier than the call to tg3_get_eeprom_hw_cfg().  As a
    consequence, the driver was attempting to determine TSO capabilities
    before it had all the data it needed to make the decision.
    
    This patch fixes the problem by revisiting and reevaluating the decision
    after tg3_get_eeprom_hw_cfg() is called.
    Signed-off-by: default avatarMatt Carlson <mcarlson@broadcom.com>
    Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
    3a0d367c
tg3.c 417 KB