<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/de/if_devar.h, branch release/8.2.0</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>MFC r197461:</title>
<updated>2009-10-05T19:29:25+00:00</updated>
<author>
<name>Pyun YongHyeon</name>
<email>yongari@FreeBSD.org</email>
</author>
<published>2009-10-05T19:29:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0baf4d94503a2c36e9dcec16db44990e56169826'/>
<id>0baf4d94503a2c36e9dcec16db44990e56169826</id>
<content type='text'>
  Use __NO_STRICT_ALIGNMENT to determine whether de(4) have to apply
  alignment fixup code for received frames on strict alignment
  architectures.

MFC r197463:
  Consistently use bus_addr_t.

MFC r197464:
  Destroy dmamap in dma cleanup.

MFC r197465:
  Align Tx/Rx descriptors on 32 bytes boundary instead of PAGE_SIZE.
  Also align setup descriptor on 32 bytes boundary. Tx buffer have no
  alignment limitation so create dmamap without alignment
  restriction[1]. Rx buffer still seems to require 4 bytes alignment
  limitation but we can simply use MCLBYTES for size to map the
  buffer instead of TULIP_DATA_PER_DESC as the buffer is allocated
  with m_getcl(9).
  de(4) supports up to TULIP_MAX_TXSEG segments for Tx buffers,
  increase maximum dma segment size to TULIP_MAX_TXSEG * MCLBYTES.
  While I'm here remove TULIP_DATA_PER_DESC as it is not used anymore.

  This should fix de(4) breakage introduced after r176206.
  Submitted by:	jhb [1]
  Reported by:	WATANABE Kazuhiro &lt; CQG00620 &lt;&gt; nifty dot ne dot jp &gt;
  Tested by:	WATANABE Kazuhiro &lt; CQG00620 &lt;&gt; nifty dot ne dot jp &gt;,
		Takahashi Yoshihiro &lt; nyan &lt;&gt; jp dot freebsd dot org &gt;
Approved by:	re (kib)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  Use __NO_STRICT_ALIGNMENT to determine whether de(4) have to apply
  alignment fixup code for received frames on strict alignment
  architectures.

MFC r197463:
  Consistently use bus_addr_t.

MFC r197464:
  Destroy dmamap in dma cleanup.

MFC r197465:
  Align Tx/Rx descriptors on 32 bytes boundary instead of PAGE_SIZE.
  Also align setup descriptor on 32 bytes boundary. Tx buffer have no
  alignment limitation so create dmamap without alignment
  restriction[1]. Rx buffer still seems to require 4 bytes alignment
  limitation but we can simply use MCLBYTES for size to map the
  buffer instead of TULIP_DATA_PER_DESC as the buffer is allocated
  with m_getcl(9).
  de(4) supports up to TULIP_MAX_TXSEG segments for Tx buffers,
  increase maximum dma segment size to TULIP_MAX_TXSEG * MCLBYTES.
  While I'm here remove TULIP_DATA_PER_DESC as it is not used anymore.

  This should fix de(4) breakage introduced after r176206.
  Submitted by:	jhb [1]
  Reported by:	WATANABE Kazuhiro &lt; CQG00620 &lt;&gt; nifty dot ne dot jp &gt;
  Tested by:	WATANABE Kazuhiro &lt; CQG00620 &lt;&gt; nifty dot ne dot jp &gt;,
		Takahashi Yoshihiro &lt; nyan &lt;&gt; jp dot freebsd dot org &gt;
Approved by:	re (kib)
</pre>
</div>
</content>
</entry>
<entry>
<title>Increase size of timer counter bitfield to accomodate the actual size of the</title>
<updated>2007-05-20T16:43:35+00:00</updated>
<author>
<name>Matt Jacob</name>
<email>mjacob@FreeBSD.org</email>
</author>
<published>2007-05-20T16:43:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c512bc298cd2f211091ff38a4973eb00159da9e5'/>
<id>c512bc298cd2f211091ff38a4973eb00159da9e5</id>
<content type='text'>
default timer value.

Discovered By: gcc 4.2

MFC after:	3 days
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
default timer value.

Discovered By: gcc 4.2

MFC after:	3 days
</pre>
</div>
</content>
</entry>
<entry>
<title>- Consistently use if_printf() only in interface methods: if_start(),</title>
<updated>2006-09-15T15:16:12+00:00</updated>
<author>
<name>Gleb Smirnoff</name>
<email>glebius@FreeBSD.org</email>
</author>
<published>2006-09-15T15:16:12+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6b9f5c941c90292a855cb13e27f3a7151aeb7cc6'/>
<id>6b9f5c941c90292a855cb13e27f3a7151aeb7cc6</id>
<content type='text'>
  if_watchdog, etc., or in functions used only in these methods.
  In all other functions in the driver use device_printf().
- Use __func__ instead of typing function name.

Submitted by:	Alex Lyashkov &lt;umka sevcity.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  if_watchdog, etc., or in functions used only in these methods.
  In all other functions in the driver use device_printf().
- Use __func__ instead of typing function name.

Submitted by:	Alex Lyashkov &lt;umka sevcity.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Repo copy de driver to dev/de, and adjust.</title>
<updated>2006-02-26T17:52:04+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2006-02-26T17:52:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6e5832cd990ddbfa7ae68597fc55cd279cac3760'/>
<id>6e5832cd990ddbfa7ae68597fc55cd279cac3760</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use ETHER_ADDR_LEN rather than hardcoding 6.</title>
<updated>2005-12-21T15:15:43+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2005-12-21T15:15:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=87f34c405b117bc4f775ec677518c8d282e708e9'/>
<id>87f34c405b117bc4f775ec677518c8d282e708e9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Byte copy IF_LLADDR() on stack to align it to be safe for typecasts.</title>
<updated>2005-11-30T17:48:23+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@FreeBSD.org</email>
</author>
<published>2005-11-30T17:48:23+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3faffd5dae0c1dd9acf64d65e2b166b16787f2ee'/>
<id>3faffd5dae0c1dd9acf64d65e2b166b16787f2ee</id>
<content type='text'>
Tested by:	jhb
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Tested by:	jhb
</pre>
</div>
</content>
</entry>
<entry>
<title>Various fixes to make de(4) not panic after ru@'s IF_LLADDR() changes:</title>
<updated>2005-11-21T21:50:07+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2005-11-21T21:50:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f5e19c734266e459f9c34cf2126cb0021fb2d6ed'/>
<id>f5e19c734266e459f9c34cf2126cb0021fb2d6ed</id>
<content type='text'>
- Don't call tulip_addr_filter() to reset the RX address filter in
  tulip_reset() since that gets called before ether_ifattach().  Just
  call it in tulip_init_locked().
- Use be16dec() and le16dec() to parse MAC addresses when programming
  the RX filter.
- Let ether_ioctl() handle SIOCSIFMTU since we were doing the exact same
  thing with the added bonus that we leaked the driver lock if the MTU
  was &gt; ETHERMTU in the homerolled version.  This part will be MFC'd.

Clue from:	wpaul (1)
Stolen from:	marcel (2 via patch for dc(4))
MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Don't call tulip_addr_filter() to reset the RX address filter in
  tulip_reset() since that gets called before ether_ifattach().  Just
  call it in tulip_init_locked().
- Use be16dec() and le16dec() to parse MAC addresses when programming
  the RX filter.
- Let ether_ioctl() handle SIOCSIFMTU since we were doing the exact same
  thing with the added bonus that we leaked the driver lock if the MTU
  was &gt; ETHERMTU in the homerolled version.  This part will be MFC'd.

Clue from:	wpaul (1)
Stolen from:	marcel (2 via patch for dc(4))
MFC after:	1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>- Remove non-bus-dma code.</title>
<updated>2005-08-25T21:06:56+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2005-08-25T21:06:56+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=4faaaed479f8103060ed5e8723ce55be2af17c37'/>
<id>4faaaed479f8103060ed5e8723ce55be2af17c37</id>
<content type='text'>
- Remove form feed characters.
- Fixup style of function declarations.
- Assume that an mbuf cluster is big enough to hold an ethernet frame.
  (This should really be using m_defrag(), but this diff is just simple
  changes for now.)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Remove form feed characters.
- Fixup style of function declarations.
- Assume that an mbuf cluster is big enough to hold an ethernet frame.
  (This should really be using m_defrag(), but this diff is just simple
  changes for now.)
</pre>
</div>
</content>
</entry>
<entry>
<title>Major rototill of this driver to add FreeBSD bus-dma support:</title>
<updated>2005-08-25T20:12:43+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2005-08-25T20:12:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f8190d8dc817fa5ef7ad2dd184decfce737d74b7'/>
<id>f8190d8dc817fa5ef7ad2dd184decfce737d74b7</id>
<content type='text'>
- Allocate arrays of metadata for the descriptors in the rx and tx rings
  and change the ring pointers to walk the metadata array rather than the
  actual descriptor rings.  Each metadata object contains a pointer to its
  descriptor, a pointer to any associated mbuf, and a pointer to the
  associated bus_dmamap_t in the bus_dma case.  The mbuf pointers replace
  the tulip_txq and tulip_rxq local ifqueue's in the softc.
- Add lots of KTR trace entries using a local KTR_TULIP level which
  defaults to 0, but can be changed to KTR_DEV at the top of the file
  when debugging.
- Rename tulip_init(), tulip_start(), tulip_ifinit(), and tulip_ifstart()
  to tulip_init_locked(), tulip_start_locked(), tulip_init(), and
  tulip_start(), respectively, to match the convention in other drivers.
- Add a TULIP_SP_MAC() macro to encode two bytes of the MAC address into
  the setup buffer and use that in place of lots of BYTE_ORDER #ifdef's.
  Also, remove an incorrect XXX comment I added earlier, the driver was
  correct (at least it does the same thing dc(4) does).  TULIP_SP_MAC
  was shamelessly copied from DC_SP_MAC() in dc(4).
- Remove the #ifdef'd NetBSD bus-dma code and replace it with FreeBSD
  bus-dma code that not only compiles but even works at runtime.
- Use callout_init_mtx() instead of just callout_init().
- Correct the various wrapper macros for bus_dmamap_sync() for the rx
  and tx buffers to only ask for the sync ops that they actually need.
- Tidy the #ifdef TULIP_COPY_RXDATA code by expanding an #ifdef a bit
  so it becomes easier to read at the expense of a couple of duplicated
  lines of code.  Also, use m_getcl() to get an mbuf cluster rather than
  MGETHDR() followed by MCLGET().
- Maintain the ring free (ri_free) count for the rx ring metadata since
  we no longer have tulip_rxq.ifq_len around to indicate how many mbuf's
  are currently in the rx ring.
- Add code to teardown bus_dma resources when attach fails and generally
  fixup attach to do a better job of cleaning up when it fails.  This
  gets us a good bit closer to possibly having a detach method someday
  and making this driver an unloadable module.
- Add some functions that can be called from ddb to dump the state of
  a descriptor ring and to dump the state of an individual descriptor.
- Various comment grammer and spelling fixes.

I have bus-dma turned on by default, but I've left the non-bus-dma code
around so that it can be turned off to aid in debugging should any problems
turn up later on.  I'll be removing the non-bus-dma code in a subsequent
commit.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Allocate arrays of metadata for the descriptors in the rx and tx rings
  and change the ring pointers to walk the metadata array rather than the
  actual descriptor rings.  Each metadata object contains a pointer to its
  descriptor, a pointer to any associated mbuf, and a pointer to the
  associated bus_dmamap_t in the bus_dma case.  The mbuf pointers replace
  the tulip_txq and tulip_rxq local ifqueue's in the softc.
- Add lots of KTR trace entries using a local KTR_TULIP level which
  defaults to 0, but can be changed to KTR_DEV at the top of the file
  when debugging.
- Rename tulip_init(), tulip_start(), tulip_ifinit(), and tulip_ifstart()
  to tulip_init_locked(), tulip_start_locked(), tulip_init(), and
  tulip_start(), respectively, to match the convention in other drivers.
- Add a TULIP_SP_MAC() macro to encode two bytes of the MAC address into
  the setup buffer and use that in place of lots of BYTE_ORDER #ifdef's.
  Also, remove an incorrect XXX comment I added earlier, the driver was
  correct (at least it does the same thing dc(4) does).  TULIP_SP_MAC
  was shamelessly copied from DC_SP_MAC() in dc(4).
- Remove the #ifdef'd NetBSD bus-dma code and replace it with FreeBSD
  bus-dma code that not only compiles but even works at runtime.
- Use callout_init_mtx() instead of just callout_init().
- Correct the various wrapper macros for bus_dmamap_sync() for the rx
  and tx buffers to only ask for the sync ops that they actually need.
- Tidy the #ifdef TULIP_COPY_RXDATA code by expanding an #ifdef a bit
  so it becomes easier to read at the expense of a couple of duplicated
  lines of code.  Also, use m_getcl() to get an mbuf cluster rather than
  MGETHDR() followed by MCLGET().
- Maintain the ring free (ri_free) count for the rx ring metadata since
  we no longer have tulip_rxq.ifq_len around to indicate how many mbuf's
  are currently in the rx ring.
- Add code to teardown bus_dma resources when attach fails and generally
  fixup attach to do a better job of cleaning up when it fails.  This
  gets us a good bit closer to possibly having a detach method someday
  and making this driver an unloadable module.
- Add some functions that can be called from ddb to dump the state of
  a descriptor ring and to dump the state of an individual descriptor.
- Various comment grammer and spelling fixes.

I have bus-dma turned on by default, but I've left the non-bus-dma code
around so that it can be turned off to aid in debugging should any problems
turn up later on.  I'll be removing the non-bus-dma code in a subsequent
commit.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove the unused TULIP_CSR_{READ,WRITE}BYTE macros.</title>
<updated>2005-08-17T17:45:19+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2005-08-17T17:45:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6da5b383f15460ecd2a572a912b1ea37e11a44b1'/>
<id>6da5b383f15460ecd2a572a912b1ea37e11a44b1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
