mac_mode
unsigned int mac_mode = CHCR_SCMD_AUTH_MODE_CBCMAC;
cipher_mode, mac_mode,
u32 mac_mode;
mac_mode = BNX2_RD(bp, BNX2_EMAC_MODE);
mac_mode &= ~BNX2_EMAC_MODE_PORT;
mac_mode |= BNX2_EMAC_MODE_MAC_LOOP | BNX2_EMAC_MODE_FORCE_LINK;
BNX2_WR(bp, BNX2_EMAC_MODE, mac_mode);
u32 mac_mode;
mac_mode = BNX2_RD(bp, BNX2_EMAC_MODE);
mac_mode &= ~(BNX2_EMAC_MODE_PORT | BNX2_EMAC_MODE_HALF_DUPLEX |
mac_mode |= BNX2_EMAC_MODE_PORT_GMII;
BNX2_WR(bp, BNX2_EMAC_MODE, mac_mode);
tp->mac_mode |= MAC_MODE_TXSTAT_ENABLE | MAC_MODE_RXSTAT_ENABLE |
tp->mac_mode |= MAC_MODE_APE_TX_EN | MAC_MODE_APE_RX_EN;
tp->mac_mode |= MAC_MODE_LINK_POLARITY;
tw32_f(MAC_MODE, tp->mac_mode | MAC_MODE_RXSTAT_CLEAR | MAC_MODE_TXSTAT_CLEAR);
(tp->mac_mode &
tw32_f(MAC_MODE, tp->mac_mode);
tp->mac_mode = MAC_MODE_APE_TX_EN | MAC_MODE_APE_RX_EN;
tp->mac_mode = 0;
u32 mac_mode, lcl_adv, rmt_adv;
mac_mode = tp->mac_mode & ~(MAC_MODE_PORT_MODE_MASK |
mac_mode |= MAC_MODE_PORT_MODE_MII;
mac_mode |= MAC_MODE_PORT_MODE_GMII;
mac_mode |= MAC_MODE_PORT_MODE_MII;
mac_mode |= MAC_MODE_HALF_DUPLEX;
mac_mode |= MAC_MODE_PORT_MODE_GMII;
if (mac_mode != tp->mac_mode) {
tp->mac_mode = mac_mode;
tw32_f(MAC_MODE, tp->mac_mode);
u32 mac_mode;
mac_mode = MAC_MODE_PORT_MODE_GMII;
mac_mode = MAC_MODE_PORT_MODE_GMII;
mac_mode = MAC_MODE_PORT_MODE_MII;
mac_mode = MAC_MODE_PORT_MODE_MII;
mac_mode |= tp->mac_mode & MAC_MODE_LINK_POLARITY;
mac_mode |= MAC_MODE_LINK_POLARITY;
mac_mode &= ~MAC_MODE_LINK_POLARITY;
mac_mode = MAC_MODE_PORT_MODE_TBI;
mac_mode |= MAC_MODE_MAGIC_PKT_ENABLE;
mac_mode |= MAC_MODE_KEEP_FRAME_IN_WOL;
mac_mode |= MAC_MODE_APE_TX_EN |
tw32_f(MAC_MODE, mac_mode);
(tp->mac_mode & MAC_MODE_PORT_INT_LPBACK))
tp->mac_mode &= ~MAC_MODE_PORT_MODE_MASK;
tp->mac_mode |= MAC_MODE_PORT_MODE_MII;
tp->mac_mode |= MAC_MODE_PORT_MODE_GMII;
tp->mac_mode |= MAC_MODE_PORT_MODE_MII;
tp->mac_mode |= MAC_MODE_PORT_MODE_GMII;
tp->mac_mode &= ~MAC_MODE_HALF_DUPLEX;
tp->mac_mode |= MAC_MODE_HALF_DUPLEX;
tp->mac_mode |= MAC_MODE_LINK_POLARITY;
tp->mac_mode &= ~MAC_MODE_LINK_POLARITY;
tw32_f(MAC_MODE, tp->mac_mode);
tp->mac_mode |= MAC_MODE_SEND_CONFIGS;
tw32_f(MAC_MODE, tp->mac_mode);
tp->mac_mode |= MAC_MODE_SEND_CONFIGS;
tw32_f(MAC_MODE, tp->mac_mode);
tp->mac_mode |= MAC_MODE_SEND_CONFIGS;
tw32_f(MAC_MODE, tp->mac_mode);
tp->mac_mode &= ~MAC_MODE_SEND_CONFIGS;
tw32_f(MAC_MODE, tp->mac_mode);
tmp = tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK;
tw32_f(MAC_MODE, tp->mac_mode | MAC_MODE_SEND_CONFIGS);
tp->mac_mode &= ~MAC_MODE_SEND_CONFIGS;
tw32_f(MAC_MODE, tp->mac_mode);
tw32_f(MAC_MODE, (tp->mac_mode | MAC_MODE_SEND_CONFIGS));
tw32_f(MAC_MODE, tp->mac_mode);
tp->mac_mode &= ~(MAC_MODE_PORT_MODE_MASK | MAC_MODE_HALF_DUPLEX);
tp->mac_mode |= MAC_MODE_PORT_MODE_TBI;
tw32_f(MAC_MODE, tp->mac_mode);
tw32_f(MAC_MODE, (tp->mac_mode |
tw32_f(MAC_MODE, tp->mac_mode);
tp->mac_mode &= ~MAC_MODE_PORT_MODE_MASK;
tp->mac_mode |= MAC_MODE_PORT_MODE_GMII;
tp->mac_mode |= MAC_MODE_PORT_MODE_GMII;
tp->mac_mode |= MAC_MODE_PORT_MODE_MII;
tp->mac_mode |= MAC_MODE_PORT_MODE_MII;
tw32_f(MAC_MODE, tp->mac_mode);
tp->mac_mode |= MAC_MODE_PORT_MODE_GMII;
tw32_f(MAC_MODE, tp->mac_mode);
tp->mac_mode &= ~MAC_MODE_HALF_DUPLEX;
tp->mac_mode |= MAC_MODE_HALF_DUPLEX;
tw32_f(MAC_MODE, tp->mac_mode);
tp->mac_mode &= ~(MAC_MODE_HALF_DUPLEX |
tp->mac_mode |= MAC_MODE_PORT_INT_LPBACK;
tp->mac_mode |= MAC_MODE_LINK_POLARITY;
tp->mac_mode |= MAC_MODE_PORT_MODE_MII;
tp->mac_mode |= MAC_MODE_PORT_MODE_GMII;
tp->mac_mode &= ~MAC_MODE_PORT_INT_LPBACK;
tp->mac_mode &= ~MAC_MODE_LINK_POLARITY;
tw32(MAC_MODE, tp->mac_mode);
u32 val, bmcr, mac_mode, ptest = 0;
mac_mode = tp->mac_mode &
mac_mode |= MAC_MODE_PORT_MODE_GMII;
mac_mode |= MAC_MODE_PORT_MODE_MII;
mac_mode &= ~MAC_MODE_LINK_POLARITY;
mac_mode |= MAC_MODE_LINK_POLARITY;
tw32(MAC_MODE, mac_mode);
if (tp->mac_mode & MAC_MODE_PORT_INT_LPBACK)
if (!(tp->mac_mode & MAC_MODE_PORT_INT_LPBACK))
tp->mac_mode &= ~MAC_MODE_TDE_ENABLE;
tp->mac_mode &= ~MAC_MODE_TDE_ENABLE;
tw32_f(MAC_MODE, tp->mac_mode);
tp->mac_mode = MAC_MODE_PORT_MODE_TBI;
val = tp->mac_mode;
tp->mac_mode = MAC_MODE_PORT_MODE_GMII;
val = tp->mac_mode;
u32 mac_mode;
mac_drv->mac_mode = mac_param->mac_mode;
static const enum mac_mode g_mac_mode_100[] = {
param->mac_mode = hns_get_enet_interface(mac_cb);
static const enum mac_mode g_mac_mode_1000[] = {
static enum mac_mode hns_get_enet_interface(const struct hns_mac_cb *mac_cb)
if (MAC_SPEED_FROM_MODE(param.mac_mode) < MAC_SPEED_10000)
enum mac_mode mac_mode;
enum mac_mode mac_mode;
#define MAC_MAKE_MODE(interface, speed) (enum mac_mode)((interface) | (speed))
mac_drv->mac_mode = mac_param->mac_mode;
setup->mac_mode = cpu_to_le16(mode);
__le16 mac_mode;