tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
if_wm: support for INTEL 82571EB_SERDES
Hi -
I got a board with such a chip. There is practically
no PHY, no autonegoiation etc. Data are transferred
on a backplane.
The appended patch makes it work. It is obviously quite
destructive -- just to show where changes are needed.
I could turn that into its own set of
mediainit/change/check functions. Just don't want to
step onto any maintainer's toes.
So does anyone care?
Another question is what if_media.h mediatype to use.
Technically it is 1000base-bx (sometimes called -kx).
There is already a -cx, the only difference is the
impedance (which is 100ohm). Using cx is wrong, adding
a new one doesn't make sense because the driver can't
tell the difference anyway... It's about the same as
with singlemode/multimode fiber, there is just too much
nonsense in that header.
best regards
Matthias
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
#
# old_revision [f26d78c2f8c3d2f0faa3f845e9a3989ae374c191]
#
# patch "sys/dev/pci/if_wm.c"
# from [a637541a1fb46ecbc30d7fcbb320a59977cada16]
# to [abe1b8d958558ac3e0ce5210fa7e936a37d5ed4f]
#
============================================================
--- sys/dev/pci/if_wm.c a637541a1fb46ecbc30d7fcbb320a59977cada16
+++ sys/dev/pci/if_wm.c abe1b8d958558ac3e0ce5210fa7e936a37d5ed4f
@@ -613,6 +613,7 @@ static const struct wm_product {
int wmp_flags;
#define WMP_F_1000X 0x01
#define WMP_F_1000T 0x02
+#define WMP_F_SERDES 0x04
} wm_products[] = {
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82542,
"Intel i82542 1000BASE-X Ethernet",
@@ -765,7 +766,7 @@ static const struct wm_product {
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82571EB_FIBER,
"Intel PRO/1000 PF (82571EB)",
WM_T_82571, WMP_F_1000X },
-#if 0
+#if 1
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82571EB_SERDES,
"Intel PRO/1000 PB (82571EB)",
WM_T_82571, WMP_F_SERDES },
@@ -4188,6 +4189,7 @@ wm_tbi_mediainit(struct wm_softc *sc)
*/
sc->sc_ctrl |= CTRL_SWDPIO(0);
sc->sc_ctrl &= ~CTRL_SWDPIO(1);
+ sc->sc_ctrl &= ~CTRL_LRST;
CSR_WRITE(sc, WMREG_CTRL, sc->sc_ctrl);
@@ -4248,6 +4250,7 @@ wm_tbi_mediachange(struct ifnet *ifp)
static int
wm_tbi_mediachange(struct ifnet *ifp)
{
+#if 0
struct wm_softc *sc = ifp->if_softc;
struct ifmedia_entry *ife = sc->sc_mii.mii_media.ifm_cur;
uint32_t status;
@@ -4354,7 +4357,7 @@ wm_tbi_mediachange(struct ifnet *ifp)
}
wm_tbi_set_linkled(sc);
-
+#endif
return (0);
}
@@ -4390,6 +4393,9 @@ wm_tbi_check_link(struct wm_softc *sc)
struct ifmedia_entry *ife = sc->sc_mii.mii_media.ifm_cur;
uint32_t rxcw, ctrl, status;
+ sc->sc_tbi_linkup = 1;
+ return;
+
status = CSR_READ(sc, WMREG_STATUS);
rxcw = CSR_READ(sc, WMREG_RXCW);
@@ -5639,6 +5645,9 @@ wm_check_for_link(struct wm_softc *sc)
uint32_t status;
uint32_t sig;
+ sc->sc_tbi_linkup = 1;
+ return 0;
+
rxcw = CSR_READ(sc, WMREG_RXCW);
ctrl = CSR_READ(sc, WMREG_CTRL);
status = CSR_READ(sc, WMREG_STATUS);
Home |
Main Index |
Thread Index |
Old Index