Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Jun 1999 13:17:41 -0700 (PDT)
From:      Bill Paul <wpaul@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/pci if_rl.c if_rlreg.h
Message-ID:  <199906192017.NAA15694@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
wpaul       1999/06/19 13:17:41 PDT

  Modified files:
    sys/pci              if_rl.c if_rlreg.h 
  Log:
  Fix up the RealTek 8139 driver to work on FreeBSD/alpha. This involves a
  few changes:
  
  - there was a bug in rl_list_tx_init(): it was calculating the registers
    to initialize incorrectly. Not a problem on the x86 where unaligned
    access are allowed, but a problem on the alpha.
  
  - set rl_btag accordingly depending on the machine type
  
  - rl_rxeof() needs to be sure to longword-align the packet data. This
    is a little tricky since we copy the data out of the receive buffer
    using m_devget(), however there's no way to tell m_devget() to fill
    in the mbufs starting at a particular offset. To get around this,
    we tell m_devget to copy bytes+2 bytes starting at offset offset-2. This
    results in the proper alignment, and we can trim off the two leading
    bytes afterwards with m_adj(). We also allocate some extra space before
    the start of the receive buffer so that we don't get into trouble in
    the case where offset == 0.
  
  - redefine vtophys() in if_rlreg.h for the alpha.
  
  Making this chipset work on the alpha is sort of the inverse of putting
  a jet engine on a rowboat (putting a propeller on a 747?) but when
  you can get these things for $5 a pop, it's hard to stop people from
  buying them.
  
  Revision  Changes    Path
  1.17      +38 -8     src/sys/pci/if_rl.c
  1.8       +9 -1      src/sys/pci/if_rlreg.h



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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