equal
deleted
inserted
replaced
1469 |
1469 |
1470 static void rtl_check_media (struct net_device *dev, unsigned int init_media) |
1470 static void rtl_check_media (struct net_device *dev, unsigned int init_media) |
1471 { |
1471 { |
1472 struct rtl8139_private *tp = netdev_priv(dev); |
1472 struct rtl8139_private *tp = netdev_priv(dev); |
1473 |
1473 |
1474 if (tp->phys[0] >= 0) { |
1474 if (EtherCAT_dev_is_ec(rtl_ec_dev, dev)) { |
|
1475 void __iomem *ioaddr = tp->mmio_addr; |
|
1476 uint16_t state = RTL_R16(BasicModeStatus) & BMSR_LSTATUS; |
|
1477 EtherCAT_dev_link_state(rtl_ec_dev, state ? 1 : 0); |
|
1478 } |
|
1479 else if (tp->phys[0] >= 0) { |
1475 mii_check_media(&tp->mii, netif_msg_link(tp), init_media); |
1480 mii_check_media(&tp->mii, netif_msg_link(tp), init_media); |
1476 } |
1481 } |
1477 } |
1482 } |
1478 |
1483 |
1479 /* Start the hardware at open or resume. */ |
1484 /* Start the hardware at open or resume. */ |
2398 |
2403 |
2399 /* EtherCAT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/ |
2404 /* EtherCAT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/ |
2400 |
2405 |
2401 if (EtherCAT_dev_is_ec(rtl_ec_dev, dev)) |
2406 if (EtherCAT_dev_is_ec(rtl_ec_dev, dev)) |
2402 { |
2407 { |
2403 #if 0 // FIXME |
|
2404 rtl_ec_dev.intr_cnt++; |
|
2405 #endif |
|
2406 status = RTL_R16 (IntrStatus); |
2408 status = RTL_R16 (IntrStatus); |
2407 } |
2409 } |
2408 else |
2410 else |
2409 { |
2411 { |
2410 spin_lock(&tp->lock); |
2412 spin_lock(&tp->lock); |