freebsd-dev/sys/dev/hme
Marius Strobl f279f5ced4 - In hme_stop() mask all interrupts.
- 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
2006-12-04 00:51:08 +00:00
..
if_hme_pci.c Add a missing mtx_destroy() in hme_pci_detach(). 2005-07-10 10:36:45 +00:00
if_hme_sbus.c Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
if_hme.c - In hme_stop() mask all interrupts. 2006-12-04 00:51:08 +00:00
if_hmereg.h - Convert hme(4) to use TX side bus_dmamap_load_mbuf_sg(9). 2005-10-25 03:56:21 +00:00
if_hmevar.h - Convert hme(4) to use TX side bus_dmamap_load_mbuf_sg(9). 2005-10-25 03:56:21 +00:00