Lines Matching defs:mac
1438 static void t3_gate_rx_traffic(struct cmac *mac, u32 *rx_cfg,
1442 t3_mac_disable_exact_filters(mac);
1445 *rx_cfg = t3_read_reg(mac->adapter, A_XGM_RX_CFG + mac->offset);
1446 t3_set_reg_field(mac->adapter, A_XGM_RX_CFG + mac->offset,
1450 *rx_hash_high = t3_read_reg(mac->adapter, A_XGM_RX_HASH_HIGH +
1451 mac->offset);
1452 t3_write_reg(mac->adapter, A_XGM_RX_HASH_HIGH + mac->offset, 0);
1454 *rx_hash_low = t3_read_reg(mac->adapter, A_XGM_RX_HASH_LOW +
1455 mac->offset);
1456 t3_write_reg(mac->adapter, A_XGM_RX_HASH_LOW + mac->offset, 0);
1462 static void t3_open_rx_traffic(struct cmac *mac, u32 rx_cfg,
1465 t3_mac_enable_exact_filters(mac);
1466 t3_set_reg_field(mac->adapter, A_XGM_RX_CFG + mac->offset,
1469 t3_write_reg(mac->adapter, A_XGM_RX_HASH_HIGH + mac->offset,
1471 t3_write_reg(mac->adapter, A_XGM_RX_HASH_LOW + mac->offset,
1478 struct cmac *mac = &pi->mac;
1483 t3_gate_rx_traffic(mac, &rx_cfg, &rx_hash_high, &rx_hash_low);
1484 t3_write_reg(adapter, A_XGM_RX_CTRL + mac->offset, 0);
1487 (void) t3_read_reg(adapter, A_XGM_INT_STATUS + mac->offset);
1491 t3_write_reg(adapter, A_XGM_RX_CTRL + mac->offset, F_RXEN);
1492 t3_open_rx_traffic(mac, rx_cfg, rx_hash_high, rx_hash_low);
1494 link_fault = t3_read_reg(adapter, A_XGM_INT_STATUS + mac->offset);
1501 struct cmac *mac = &pi->mac;
1505 t3_read_reg(adapter, A_XGM_INT_STATUS + mac->offset);
1506 t3_write_reg(adapter, A_XGM_INT_CAUSE + mac->offset, F_XGM_INT);
1507 t3_set_reg_field(adapter, A_XGM_INT_ENABLE + mac->offset,
1527 struct cmac *mac = &pi->mac;
1553 /* Update mac speed before checking for link fault. */
1556 t3_mac_set_speed_duplex_fc(mac, speed, duplex, fc);
1569 mac->stats.link_faults++;
1575 t3c_pcs_force_los(mac);
1577 t3b_pcs_reset(mac);
1608 t3c_pcs_force_los(mac);
1610 t3b_pcs_reset(mac);
1612 t3_write_reg(adapter, A_XGM_XAUI_ACT_CTRL + mac->offset,
1617 t3_set_reg_field(adapter, A_XGM_TXFIFO_CFG + mac->offset,
1620 t3_mac_enable(mac, MAC_DIRECTION_TX | MAC_DIRECTION_RX);
1621 t3_set_reg_field(adapter, A_XGM_STAT_CTRL + mac->offset,
1631 A_XGM_XAUI_ACT_CTRL + mac->offset, 0);
1637 A_XGM_INT_ENABLE + mac->offset,
1640 t3_mac_disable(mac, MAC_DIRECTION_RX);
1647 A_XGM_TXFIFO_CFG + mac->offset, 0, F_ENDROPPKT);
1648 t3_write_reg(adapter, A_XGM_RX_CTRL + mac->offset, 0);
1650 A_XGM_TX_CTRL + mac->offset, F_TXEN);
1652 A_XGM_RX_CTRL + mac->offset, F_RXEN);
1657 mac->was_reset);
1658 mac->was_reset = 0;
1664 * @mac: the MAC to setup
1674 int t3_link_start(struct cphy *phy, struct cmac *mac, struct link_config *lc)
1693 t3_mac_set_speed_duplex_fc(mac, lc->speed, lc->duplex,
1703 t3_mac_set_speed_duplex_fc(mac, -1, -1, fc);
2158 struct cmac *mac;
2162 mac = &pi->mac;
2170 cause = (t3_read_reg(adap, A_XGM_INT_CAUSE + mac->offset)
2174 mac->stats.tx_fifo_parity_err++;
2178 mac->stats.rx_fifo_parity_err++;
2182 mac->stats.tx_fifo_urun++;
2184 mac->stats.rx_fifo_ovfl++;
2186 mac->stats.serdes_signal_loss++;
2188 mac->stats.xaui_pcs_ctc_err++;
2190 mac->stats.xaui_pcs_align_change++;
2192 t3_read_reg(adap, A_XGM_INT_ENABLE + mac->offset)) {
2193 t3_set_reg_field(adap, A_XGM_INT_ENABLE + mac->offset,
2204 t3_write_reg(adap, A_XGM_INT_CAUSE + mac->offset, cause);
2423 t3_write_reg(adapter, A_XGM_XGM_INT_ENABLE + pi->mac.offset,
2431 t3_write_reg(adapter, A_XGM_XGM_INT_DISABLE + pi->mac.offset,
2447 t3_write_reg(adapter, A_XGM_INT_ENABLE + pi->mac.offset, XGM_INTR_MASK);
2463 t3_write_reg(adapter, A_XGM_INT_ENABLE + pi->mac.offset, 0);
2479 t3_write_reg(adapter, A_XGM_INT_CAUSE + pi->mac.offset, 0xffffffff);
4158 t3_mac_init(&adap2pinfo(adapter, 0)->mac);
4319 void mac_prep(struct cmac *mac, adapter_t *adapter, int index)
4323 mac->adapter = adapter;
4324 mac->multiport = adapter->params.nports > 2;
4325 if (mac->multiport) {
4326 mac->ext_port = (unsigned char)index;
4327 mac->nucast = 8;
4329 mac->nucast = 1;
4336 if (mac->multiport ||
4340 mac->offset = (XGMAC0_1_BASE_ADDR - XGMAC0_0_BASE_ADDR) * index;
4343 t3_write_reg(adapter, A_XGM_SERDES_CTRL + mac->offset,
4345 t3_set_reg_field(adapter, A_XGM_PORT_CFG + mac->offset,
4571 mac_prep(&p->mac, adapter, j);