<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/sys/dev/hme, branch stable/7</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=stable%2F7</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=stable%2F7'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2011-07-25T14:46:24Z</updated>
<entry>
<title>MFC: r220940</title>
<updated>2011-07-25T14:46:24Z</updated>
<author>
<name>Marius Strobl</name>
<email>marius@FreeBSD.org</email>
</author>
<published>2011-07-25T14:46:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=0fb9fe88ad5ea4bb9f67d4917854d5a03d974a63'/>
<id>urn:sha1:0fb9fe88ad5ea4bb9f67d4917854d5a03d974a63</id>
<content type='text'>
Correct spelling in comments.

Submitted by:	brucec
</content>
</entry>
<entry>
<title>MFC: r213893, r213908, r214566, r214605, r214846</title>
<updated>2010-11-07T11:12:30Z</updated>
<author>
<name>Marius Strobl</name>
<email>marius@FreeBSD.org</email>
</author>
<published>2010-11-07T11:12:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=4aec3028843cf6e3074fa61de9a91bd59471724a'/>
<id>urn:sha1:4aec3028843cf6e3074fa61de9a91bd59471724a</id>
<content type='text'>
Convert the PHY drivers to honor the mii_flags passed down and convert
the NIC drivers as well as the PHY drivers to take advantage of the
mii_attach() introduced in r213878 (MFC'ed to stable/8 in r214685) to
get rid of certain hacks. For the most part these were:
- Artificially limiting miibus_{read,write}reg methods to certain PHY
  addresses; we now let mii_attach() only probe the PHY at the desired
  address(es) instead.
- PHY drivers setting MIIF_* flags based on the NIC driver they hang
  off from, partly even based on grabbing and using the softc of the
  parent; we now pass these flags down from the NIC to the PHY drivers
  via mii_attach(). This got us rid of all such hacks except those of
  brgphy() in combination with bce(4) and bge(4), which is way beyond
  what can be expressed with simple flags.

While at it, I took the opportunity to change the NIC drivers to pass
up the error returned by mii_attach() (previously by mii_phy_probe())
and unify the error message used in this case where and as appropriate
as mii_attach() actually can fail for a number of reasons, not just
because of no PHY(s) being present at the expected address(es).

Reviewed by:	jhb, yongari
</content>
</entry>
<entry>
<title>MFC: r204646</title>
<updated>2010-10-17T12:11:43Z</updated>
<author>
<name>Marius Strobl</name>
<email>marius@FreeBSD.org</email>
</author>
<published>2010-10-17T12:11:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=d2a030ba2fb334f9ecc837cfcb814a8234e8cfcb'/>
<id>urn:sha1:d2a030ba2fb334f9ecc837cfcb814a8234e8cfcb</id>
<content type='text'>
The NetBSD Foundation has granted permission to remove clause 3 and 4 from
the software.

Obtained from:	NetBSD
</content>
</entry>
<entry>
<title>MFC: r178589</title>
<updated>2008-06-11T20:52:34Z</updated>
<author>
<name>Marius Strobl</name>
<email>marius@FreeBSD.org</email>
</author>
<published>2008-06-11T20:52:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=24b78d1cf2aed16fab481954b3a79a234e3a4d45'/>
<id>urn:sha1:24b78d1cf2aed16fab481954b3a79a234e3a4d45</id>
<content type='text'>
- Use the revamped code from the gem(4) PCI front-end, which
  doesn't require parts of the Expansion ROM to be copied around,
  for obtaining the MAC address on !OFW platforms.
- Don't unnecessarily cache bus space tag and handle nor RIDs
  in the softcs of the front-ends.
- Don't use function calls in initializers.
- Let the SBus front-end depend on sbus(4).
</content>
</entry>
<entry>
<title>MFC: r178470</title>
<updated>2008-06-11T19:48:35Z</updated>
<author>
<name>Marius Strobl</name>
<email>marius@FreeBSD.org</email>
</author>
<published>2008-06-11T19:48:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=523dbbb064c0dd3e4d80b180b83d32eb24815ae7'/>
<id>urn:sha1:523dbbb064c0dd3e4d80b180b83d32eb24815ae7</id>
<content type='text'>
o Disable HMEDEBUG by default.
o Add CTASSERTs ensuring that HME_NRXDESC and HME_NTXDESC are set to
  legal values.
o Use appropriate maxsize, nsegments and maxsegsize parameters when
  creating DMA tags and correct some comments related to them.
o The FreeBSD bus_dmamap_sync(9) supports ored together flags for quite
  some time now so collapse calls accordingly.
o Add missing BUS_DMASYNC_PREREAD when syncing the control DMA maps in
  hme_rint() and hme_start_locked().
o Keep state of the link state and use it to enable or disable the MAC
  in hme_mii_statchg() accordingly as well as to return early from
  hme_start_locked() in case the link is down.
o Introduce a sc_flags and use it to replace individual members like
  sc_pci.
o Add bus_barrier(9) calls to hme_mac_bitflip(), hme_mii_readreg(),
  hme_mii_writereg() and hme_stop() to ensure the respective bit
  has been written before we starting polling on it and for the right
  bits to change.
o Rather just returning in case hme_mac_bitflip() fails and leaving us
  in an undefined state report the problem and move on; chances are
  the requested configuration will become active shortly after.
o Don't call hme_start_locked() in hme_init_locked() unconditionally
  but only after calls to hme_init_locked() when it's appropriate, i.e.
  in hme_watchdog().
o Add a KASSERT which asserts nsegs is valid also to hme_load_txmbuf().
o In hme_load_txmbuf():
  - use a maximum of the newly introduced HME_NTXSEGS segments instead
    of the incorrect HME_NTXQ, which reflects the maximum TX queue
    length, for loading the mbufs and put the DMA segments back onto
    the stack instead of the softc as 16 should be ok there.
  - use the common errno(2) return values instead of homegrown ones,
  - given that hme_load_txmbuf() is allowed to fail resulting in a
    packet drop for quite some time now implement the functionality of
    hme_txcksum() by means of m_pullup(9), which de-obfuscates the code
    and allows to always retrieve the correct length of the IP header, [1]
  - also add a KASSERT which asserts nsegs is valid,
  - take advantage of m_collapse(9) instead of m_defrag(9) for
    performance reasons.
o Don't bother to check whether the interface is running or whether its
  queue is empty before calling hme_start_locked() in hme_tint(), the
  former will check these anyway.
o In hme_intr() call hme_rint() before hme_tint() as gem_tint() may
  take quite a while to return when it calls hme_start_locked().
o Get rid of sc_debug and just check if_flags for IFF_DEBUG directly.
o Add a shadow sc_ifflags so we don't reset the chip when unnecessary.
o Handle IFF_ALLMULTI correctly. [2]
o Use PCIR_BAR instead of a homegrown macro.
o Replace sc_enaddr[6] with sc_enaddr[ETHER_ADDR_LEN].
o Use the maximum of 256 TX descriptors for better performance as using
  all of them has no additional static cost rather than using just half
  of them.

Reported by:	rwatson [2]
Suggested by:	yongari [1]
Reviewed by:	yongari
</content>
</entry>
<entry>
<title>Remove invalid BUS_DMA_ALLOCNOW when creating a tag which is used for</title>
<updated>2007-05-01T11:50:11Z</updated>
<author>
<name>Marius Strobl</name>
<email>marius@FreeBSD.org</email>
</author>
<published>2007-05-01T11:50:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=e3b78ec974ec6d1482fe6170813646c88b489034'/>
<id>urn:sha1:e3b78ec974ec6d1482fe6170813646c88b489034</id>
<content type='text'>
a "static" memory allocation only.
</content>
</entry>
<entry>
<title>o break newbus api: add a new argument of type driver_filter_t to</title>
<updated>2007-02-23T12:19:07Z</updated>
<author>
<name>Paolo Pisati</name>
<email>piso@FreeBSD.org</email>
</author>
<published>2007-02-23T12:19:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=ef544f631226436ef590825881e7a28369df82f6'/>
<id>urn:sha1:ef544f631226436ef590825881e7a28369df82f6</id>
<content type='text'>
  bus_setup_intr()

o add an int return code to all fast handlers

o retire INTR_FAST/IH_FAST

For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current

Reviewed by: many
Approved by: re@
</content>
</entry>
<entry>
<title>- Use the hme_tick() callout instead of if_slowtimo() for driving</title>
<updated>2006-12-06T02:07:20Z</updated>
<author>
<name>Marius Strobl</name>
<email>marius@FreeBSD.org</email>
</author>
<published>2006-12-06T02:07:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=05856e0b8faac74b9b8cfa36dbae267ad0d58001'/>
<id>urn:sha1:05856e0b8faac74b9b8cfa36dbae267ad0d58001</id>
<content type='text'>
  hme_watchdog() in order to avoid races accessing if_timer.
- Use bus_get_dma_tag() so hme(4) works on platforms requiring it.
- Don't bother to set if_mtu to ETHERMTU, ether_ifattach() does that.
</content>
</entry>
<entry>
<title>Remove the HME_LOCK_ASSERT() in hme_mifinit(), which was added in the</title>
<updated>2006-12-04T01:53:40Z</updated>
<author>
<name>Marius Strobl</name>
<email>marius@FreeBSD.org</email>
</author>
<published>2006-12-04T01:53:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=e46af1289e9c09b940afb79ba2235954cdcf1a16'/>
<id>urn:sha1:e46af1289e9c09b940afb79ba2235954cdcf1a16</id>
<content type='text'>
previous revision; it's actually ok when invoking hme_mifinit() from
hme_config() without the lock held.
</content>
</entry>
<entry>
<title>- In hme_stop() mask all interrupts.</title>
<updated>2006-12-04T00:51:08Z</updated>
<author>
<name>Marius Strobl</name>
<email>marius@FreeBSD.org</email>
</author>
<published>2006-12-04T00:51:08Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=f279f5ced446a015681d0a3f86df3997b7de61e8'/>
<id>urn:sha1:f279f5ced446a015681d0a3f86df3997b7de61e8</id>
<content type='text'>
- In hme_eint() print MIF register contents on MIF interrupts.
- In hme_mifinit() don't bother to preserve the previous MIF config.
  This was mainly done in order to preserve the PHY select bit (external
  or internal PHY) but which only needs to be set as appropriate when
  reading from or writing to the desired PHY in hme_mii_{read,write}reg().
  Similarly don't bother to set the PHY select bit in hme_mii_statchg().
- In hme_mii_{read,write}reg() ignore requests to PHYs other than the
  external and internal PHY one.
- Move enabling/disabling the MII drivers of the external transceiver
  from hme_init_locked() and based on the sheer presence of an external
  to hme_mifinit() and based on the currently selected media, defaulting
  to the internal transceiver when the media hasn't been set, yet.
  Invoke hme_mifinit() from the newly added hme_mediachange_locked() so
  the setting of the MII drivers is updated when changing media.
  These changes keep the MII bus from wedging (which manifests in the HME
  and the PHYs no longer being able to communicate with each other) when
  the PHY device drivers isolate the unused PHY in two-PHY configurations
  as present in f.e. Netra t1 100 while changing media, either from
  hme_init_locked() (see also below) or via ifconfig(8). They also allow
  for using both transceivers/PHYs.
- In the newly added hme_mediachange_locked() also reset the PHYs in two-
  PHY configurations before invoking mii_mediachg(). This is required
  for successfully unisolating the previously unused PHY when switching
  between PHYs.
- Now that changing media should no longer cause problems back out rev.
  1.27 and re-enable setting the current media in hme_init_locked() (see
  the commit message of rev. 1.23 for more info).

These changes are roughly a merge of NetBSD gem.c rev. 1.32 - 1.35 (1.30
was already fixed differently in our 1.36; 1.31 and 1.32 were wrong) with
some parts reworked and things that don't make sense like setting the MII
drivers and restoring the previous MIF and XIF settings in hme_mii_{read,
write}reg() omitted.

MFC after:	2 weeks
</content>
</entry>
</feed>
