Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jan 2006 20:13:25 +0300
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        husnu demir <hdemir@metu.edu.tr>
Cc:        stable@FreeBSD.org, oleg@FreeBSD.org
Subject:   Re: if_bge driver problem.
Message-ID:  <20060127171325.GD83922@cell.sick.ru>
In-Reply-To: <20060127170153.GA794690@metu.edu.tr>
References:  <20060127122438.GA1044592@metu.edu.tr> <20060127153512.GX83922@FreeBSD.org> <20060127155818.GB643116@metu.edu.tr> <20060127163055.GB83922@cell.sick.ru> <20060127170153.GA794690@metu.edu.tr>

next in thread | previous in thread | raw e-mail | index | archive | help

--dp9QYJgVRVEW2bsm
Content-Type: text/plain; charset=koi8-r
Content-Disposition: inline

On Fri, Jan 27, 2006 at 07:01:53PM +0200, husnu demir wrote:
h> I tried "http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/sys/dev/bge/if_bge.c?rev=1.91.2.7&content-type=text/plain" version and replaced VLAN_INPUT_TAG with VLAN_INPUT_TAG_NEW (only one occurance). And the following errors come up.

Ohh, you also need to keep if_bgereg.h in sync with if_bge.c. Sorry,
I didn't mention this.

h> Not: I am leaving the office. Most probly, I will be here tomorrow morning :(

Me too. I will be online tomorrow for short time. I think Oleg will
join debugging your problem.

Here is attached files of all (if I haven't lost anything) important
changes. You can fetch actual files from cvsweb.

-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE

--dp9QYJgVRVEW2bsm
Content-Type: text/plain; charset=koi8-r
Content-Disposition: attachment; filename=bge_changes

pjd         2005-09-28 19:20:49 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/bge          if_bge.c 
  Log:
  Implement suspend/resume methods to be more ACPI friendly.
  I'm able to suspend/resume my laptop without this change, but then I need
  to wait for the watchdog to reset the card.
  With this change, it is ready immediately.
  
  Glanced at by:  glebius
  
  Revision  Changes    Path
  1.96      +36 -0     src/sys/dev/bge/if_bge.c

glebius     2005-10-22 14:31:02 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/bge          if_bge.c if_bgereg.h 
  Log:
  Introduce polling(4) capability for bge(4).
  
  Submitted by:   Oleg Bulyzhin <oleg rinet.ru>
  
  Revision  Changes    Path
  1.98      +110 -2    src/sys/dev/bge/if_bge.c
  1.37      +3 -0      src/sys/dev/bge/if_bgereg.h

glebius     2005-11-15 14:43:23 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/bge          if_bge.c if_bgereg.h 
  Log:
  Recognize Broadcom BCM5752 chip, that can be found in HP DC7600.
  
  PR:             kern/88940
  Submitted by:   Alexander Hausner
  
  Revision  Changes    Path
  1.100     +5 -2      src/sys/dev/bge/if_bge.c
  1.38      +2 -0      src/sys/dev/bge/if_bgereg.h

glebius     2005-11-30 12:37:07 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/bge          if_bge.c 
  Log:
  If bus_dmamap_load() failed, we free the mbuf. We also need to clear
  the pointer, to avoid double free on next bge_stop().
  
  Revision  Changes    Path
  1.101     +6 -2      src/sys/dev/bge/if_bge.c

oleg        2005-12-08 13:31:52 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/bge          if_bge.c 
    sys/dev/mii          brgphy.c 
  Log:
  1) fix tiny bug in bge_start_locked()
  2) rework link state detection code & use it in POLLING mode
  3) fix 2 bugs in link state detection code:
          a) driver unable to detect link loss on bcm5721
          b) on bcm570x chips (tested on bcm5700 bcm5701 bcm5702) driver fails
             to detect link loss with probability 1/6 (solved in brgphy.c)
  
  Devices working in TBI mode should not be affected by this change.
  
  Approved by:    glebius (mentor)
  MFC after:      1 month
  
  Revision  Changes    Path
  1.102     +115 -105  src/sys/dev/bge/if_bge.c
  1.38      +1 -1      src/sys/dev/mii/brgphy.c

glebius     2005-12-08 16:11:45 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/bge          if_bge.c if_bgereg.h 
  Log:
  A big rewrite of receive Jumbo frame handling. Remove the local Jumbo
  cluster allocator, that wasn't MPSAFE. Instead, utilize our new generic
  UMA jumbo cluster allocator. Since UMA gives us a 9k piece that is contigous
  in virtual memory, but isn't contigous in physical memory we need to handle
  a few segments. To deal with this we utilize Tigon chip feature - extended
  RX descriptors, that can handle up to four DMA segments for one frame.
  
  Details:
  
  o Remove bge_alloc_jumbo_mem(), bge_free_jumbo_mem(),
    bge_jalloc(), bge_jfree() functions.
  o Remove SLIST heads, bge_jumbo_tag, bge_jumbo_map from softc.
  o Use extended RX BDs for Jumbo receive producer ring, and
    initialize it appropriately.
  o New bge_newbuf_jumbo():
    - Allocate an mbuf with Jumbo cluster with help of m_cljget().
    - Load the cluster for DMA with help of bus_dmamap_load_mbuf_sg().
    - Assert that we got 3 segments in the DMA mapping.
    - Fill in these 3 segments into the extended RX descriptor.
  
  Revision  Changes    Path
  1.103     +49 -233   src/sys/dev/bge/if_bge.c
  1.39      +26 -15    src/sys/dev/bge/if_bgereg.h


marcel      2005-12-13 06:14:14 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/bge          if_bge.c 
  Log:
  In bge_link_upd(), rewrite the logic so that status is assigned
  on the code path it is used in a way that GCC understands. This
  avoids breakage due to higher optimization levels.
  
  Revision  Changes    Path
  1.104     +2 -4      src/sys/dev/bge/if_bge.c


yongari     2005-12-15 05:48:49 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/bge          if_bge.c if_bgereg.h 
  Log:
  Add bge(4) support for big-endian architectures(part 1/2).
   - Give up endianess support and switch to native-endian format for
     accessing hardware structures. In fact embedded processor for
     BCM57xx is big-endian architure(MIPS) and it requires native-endian
     format for NIC structures.The NIC performs necessary byte/word
     swapping depending on programmed endian type.
   - With above changes all htole16/htole32 calls were gone.
   - Remove bge_vhandle member in softc and changed to use explicit
     register access. This may add additional performance penalty
     that than that of previous memory access. But most of the access
     is performed on initialization phase(e.g. RCB setup), it would be
     negligible.
  
  Due to incorrect use of bus_dma(9) in bge(4) it still panics sparc64
  system in device detach path. The issue would be fixed in next patch.
  
  Reviewed by:    jkim (initial version)
  Silence from:   ps
  Tested by:      glebius
  Obtained from:  NetBSD via OpenBSD
  
  Revision  Changes    Path
  1.105     +74 -80    src/sys/dev/bge/if_bge.c
  1.40      +66 -9     src/sys/dev/bge/if_bgereg.h


glebius     2005-12-15 09:45:54 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/bge          if_bge.c 
  Log:
  o Rewrite bge_encap() to use bus_dmamap_load_mbuf_sg(9), inlining the
    callback function bge_dma_map_tx_desc() into the bge_encap() itself.
  o If busdma returns EFBIG, try to m_defrag() the packet.
  
  Reviewed by:    yongari
  
  Revision  Changes    Path
  1.106     +55 -82    src/sys/dev/bge/if_bge.c

glebius     2005-12-18 18:24:27 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/bge          if_bge.c 
    sys/dev/em           if_em.c 
    sys/dev/ixgb         if_ixgb.c 
    sys/dev/nge          if_nge.c 
    sys/dev/re           if_re.c 
    sys/dev/ti           if_ti.c 
    sys/dev/txp          if_txp.c 
    sys/dev/vge          if_vge.c 
    sys/net              if_vlan_var.h 
    sys/net80211         ieee80211_input.c 
  Log:
  - Fix VLAN_INPUT_TAG() macro, so that it doesn't touch mtag in
    case if memory allocation failed.
  - Remove fourth argument from VLAN_INPUT_TAG(), that was used
    incorrectly in almost all drivers. Indicate failure with
    mbuf value of NULL.
  
  In collaboration with:  yongari, ru, sam
  
  Revision  Changes    Path
  1.107     +5 -2      src/sys/dev/bge/if_bge.c
  1.93      +1 -2      src/sys/dev/em/if_em.c
  1.18      +1 -2      src/sys/dev/ixgb/if_ixgb.c
  1.85      +3 -1      src/sys/dev/nge/if_nge.c
  1.62      +5 -2      src/sys/dev/re/if_re.c
  1.118     +5 -2      src/sys/dev/ti/if_ti.c
  1.40      +3 -2      src/sys/dev/txp/if_txp.c
  1.23      +5 -2      src/sys/dev/vge/if_vge.c
  1.23      +7 -6      src/sys/net/if_vlan_var.h
  1.85      +3 -2      src/sys/net80211/ieee80211_input.c

glebius     2005-12-18 20:26:12 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/bge          if_bge.c if_bgereg.h 
  Log:
  Since BGE_MBX_TX_HOST_PROD0_LO register is write-only to software,
  we can cache its value in the softc. Eliminates one PCI register
  write per call to bge_start().
  
  A 1.8% speedup for UDP_RR test on my old box.
  
  Obtained from:  NetBSD(jonathan) via delphij
  
  Revision  Changes    Path
  1.108     +10 -4     src/sys/dev/bge/if_bge.c
  1.41      +1 -0      src/sys/dev/bge/if_bgereg.h

yongari     2005-12-22 01:44:27 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/bge          if_bge.c 
  Log:
  Add bge(4) support for big-endian architectures(part 2/2).
   - removed unused funtion bge_handle_events().
   - removed bus_dmamap_destroy(9) calls for DMA maps created by
     bus_dmamem_alloc(9). This should fix panics seen on sparc64
     in device detach.
   - added check for parent DMA tag creation.
   - switched to use __NO_STRICT_ALIGNMENT as bge(4) supports all
     architectures.
   - added missing bus_dmamap_sync(9) in bge_txeof().
   - added missing bus_dmamap_sync(9) in bge_encap().
   - corrected memory synchronization operation on status block.
     As the driver just read status block that was DMAed by NIC it
     should use BUS_DMASYNC_POSTREAD. Likewise the driver does not
     need to write status block back, so remove unnecessary
     bus_dmamap_sync(9) calls in bge_intr().
   - corrected memory synchronization operation on RX return ring.
     The driver only read the block so remove unnecessary
     bus_dmamap_sync(9) in bge_rxeof().
   - force bus_dmamap_sync(9) for only modified descriptors. Blindly
     synching all desciptor rings would reduce performance.
   - call bus_dmamap_sync(9) for DMA maps that were modified in bge_rxeof().
  
  Reviewed by:    jkim(initial version)
  Tested by:      glebius(i386), jkim(amd64 initial version)
  
  Revision  Changes    Path
  1.109     +75 -92    src/sys/dev/bge/if_bge.c


yongari     2005-12-22 02:03:57 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/bge          if_bge.c 
  Log:
  Fix bge_eeprom_getbyte() to return 1 when timeout happens.
  Previously it always returned 0 which means success regardless of
  EEPROM status.
  
  While here, add a check whether EEPROM read is successful.
  
  Submitted by:   jkim
  
  Revision  Changes    Path
  1.110     +8 -3      src/sys/dev/bge/if_bge.c

glebius     2005-12-22 15:14:42 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/bge          if_bge.c 
  Log:
  - All bge(4) supported hardware is known to support RX/TX checksum offloading,
    except for BGE_CHIPID_BCM5700_B0, which is buggy.
  - All bge(4) supported hardware, has a bug that produces incorrect checksums
    on Ethernet runts. However, in case of a transmitted packet, the latter can
    be padded with zeroes, and the checksum would be correct. (Probably chip
    includes the pad data into checksum). In case of receive, we just don't
    trust checksum data in received runts.
  
  Obtained from:  NetBSD (jonathan) via Mihail Balikov
  
  Revision  Changes    Path
  1.111     +69 -10    src/sys/dev/bge/if_bge.c

yongari     2005-12-23 02:04:41 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/bge          if_bge.c if_bgereg.h 
  Log:
  Use device_printf() and if_printf() rather than printf() and axe
  bge_unit from the softc.
  
  Requested by:   marius
  
  Revision  Changes    Path
  1.112     +51 -52    src/sys/dev/bge/if_bge.c
  1.42      +0 -1      src/sys/dev/bge/if_bgereg.h

oleg        2006-01-13 08:59:40 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/bge          if_bge.c 
  Log:
  1) move all link state detection code from bge_tick_locked() to bge_link_upd()
  2) use more robust way of link state handling for BCM5700 rev.B2 chip
  3) workaround bug of some BCM570x chips which cause spurious "link up" messages
  4) fix bug: some BCM570x chips was unable to detect link state changes after
     ifconfig down/up sequence until any 'non-link related' interrupt generated.
     (this happened due to pending internal link state attention which blocked
     interrupt generation)
  
  Approved by:    glebius (mentor)
  MFC after:      1 week
  
  Revision  Changes    Path
  1.113     +101 -60   src/sys/dev/bge/if_bge.c

scottl      2006-01-14 17:42:22 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/bge          if_bgereg.h 
  Log:
  Don't base the number of jumbo segments on page size, instead base it on the
  fact that jumbo desriptors are defined to have 3 segments.
  
  Found by: Coverity Prevent(tm)
  
  Revision  Changes    Path
  1.43      +1 -1      src/sys/dev/bge/if_bgereg.h

oleg        2006-01-17 23:01:58 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/bge          if_bge.c if_bgereg.h 
  Log:
   - Count packets discarded by RX/TX MAC (cause of FIFO overflow, etc)
     as input/output interface errors.
   - Keep values of rx/tx discards & tx collisions inside struct bge_softc.
     So we can keep statistic across ifconfig down/up runs (cause bringing
     bge up will reset chip).
  
  Approved by:    glebius (mentor)
  MFC after:      1 week
  
  Revision  Changes    Path
  1.114     +30 -29    src/sys/dev/bge/if_bge.c
  1.44      +3 -0      src/sys/dev/bge/if_bgereg.h

glebius     2006-01-18 14:31:21 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/bge          if_bge.c if_bgereg.h 
  Log:
  Be ready to a case when not a constant number of segments is returned
  by bus_dmamap_load_mbuf_sg() on jumbo buffer allocation.
  
  Reviewed by:    scottl, gallatin
  
  Revision  Changes    Path
  1.115     +22 -12    src/sys/dev/bge/if_bge.c
  1.45      +1 -1      src/sys/dev/bge/if_bgereg.h

--dp9QYJgVRVEW2bsm--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060127171325.GD83922>