e1000x_common.h (0eadd56bf53ab196a16d492d7dd31c62e1c24c32) | e1000x_common.h (b7728c9f62d8ee5c4772a08ebe2f21bd789c73f7) |
---|---|
1/* 2 * QEMU e1000(e) emulation - shared code 3 * 4 * Copyright (c) 2008 Qumranet 5 * 6 * Based on work done by: 7 * Nir Peleg, Tutis Systems Ltd. for Qumranet Inc. 8 * Copyright (c) 2007 Dan Aloni --- 138 unchanged lines hidden (view full) --- 147 * told us to strip it off the packet. */ 148 return (mac[RCTL] & E1000_RCTL_SECRC) ? 0 : 4; 149} 150 151static inline void 152e1000x_update_regs_on_link_down(uint32_t *mac, uint16_t *phy) 153{ 154 mac[STATUS] &= ~E1000_STATUS_LU; | 1/* 2 * QEMU e1000(e) emulation - shared code 3 * 4 * Copyright (c) 2008 Qumranet 5 * 6 * Based on work done by: 7 * Nir Peleg, Tutis Systems Ltd. for Qumranet Inc. 8 * Copyright (c) 2007 Dan Aloni --- 138 unchanged lines hidden (view full) --- 147 * told us to strip it off the packet. */ 148 return (mac[RCTL] & E1000_RCTL_SECRC) ? 0 : 4; 149} 150 151static inline void 152e1000x_update_regs_on_link_down(uint32_t *mac, uint16_t *phy) 153{ 154 mac[STATUS] &= ~E1000_STATUS_LU; |
155 phy[PHY_STATUS] &= ~MII_SR_LINK_STATUS; 156 phy[PHY_STATUS] &= ~MII_SR_AUTONEG_COMPLETE; 157 phy[PHY_LP_ABILITY] &= ~MII_LPAR_LPACK; | 155 phy[MII_BMSR] &= ~MII_BMSR_LINK_ST; 156 phy[MII_BMSR] &= ~MII_BMSR_AN_COMP; 157 phy[MII_ANLPAR] &= ~MII_ANLPAR_ACK; |
158} 159 160static inline void 161e1000x_update_regs_on_link_up(uint32_t *mac, uint16_t *phy) 162{ 163 mac[STATUS] |= E1000_STATUS_LU; | 158} 159 160static inline void 161e1000x_update_regs_on_link_up(uint32_t *mac, uint16_t *phy) 162{ 163 mac[STATUS] |= E1000_STATUS_LU; |
164 phy[PHY_STATUS] |= MII_SR_LINK_STATUS; | 164 phy[MII_BMSR] |= MII_BMSR_LINK_ST; |
165} 166 167void e1000x_update_rx_total_stats(uint32_t *mac, 168 size_t data_size, 169 size_t data_fcs_size); 170 171void e1000x_core_prepare_eeprom(uint16_t *eeprom, 172 const uint16_t *templ, --- 44 unchanged lines hidden --- | 165} 166 167void e1000x_update_rx_total_stats(uint32_t *mac, 168 size_t data_size, 169 size_t data_fcs_size); 170 171void e1000x_core_prepare_eeprom(uint16_t *eeprom, 172 const uint16_t *templ, --- 44 unchanged lines hidden --- |