mirror of https://github.com/xemu-project/xemu.git
e1000e: Fix the code style
igb implementation first starts off by copying e1000e code. Correct the code style before that. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
ee59483267
commit
0eadd56bf5
|
@ -810,9 +810,10 @@ receive_filter(E1000State *s, const uint8_t *buf, int size)
|
|||
uint16_t vid = lduw_be_p(buf + 14);
|
||||
uint32_t vfta = ldl_le_p((uint32_t *)(s->mac_reg + VFTA) +
|
||||
((vid >> 5) & 0x7f));
|
||||
if ((vfta & (1 << (vid & 0x1f))) == 0)
|
||||
if ((vfta & (1 << (vid & 0x1f))) == 0) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isbcast && !ismcast && (rctl & E1000_RCTL_UPE)) { /* promiscuous ucast */
|
||||
return 1;
|
||||
|
|
|
@ -49,8 +49,9 @@
|
|||
|
||||
#include "trace.h"
|
||||
|
||||
#define E1000E_MIN_XITR (500) /* No more then 7813 interrupts per
|
||||
second according to spec 10.2.4.2 */
|
||||
/* No more then 7813 interrupts per second according to spec 10.2.4.2 */
|
||||
#define E1000E_MIN_XITR (500)
|
||||
|
||||
#define E1000E_MAX_TX_FRAGS (64)
|
||||
|
||||
static inline void
|
||||
|
@ -282,14 +283,18 @@ e1000e_intrmgr_delay_rx_causes(E1000ECore *core, uint32_t *causes)
|
|||
core->delayed_causes |= *causes & delayable_causes;
|
||||
*causes &= ~delayable_causes;
|
||||
|
||||
/* Check if delayed RX interrupts disabled by client
|
||||
or if there are causes that cannot be delayed */
|
||||
/*
|
||||
* Check if delayed RX interrupts disabled by client
|
||||
* or if there are causes that cannot be delayed
|
||||
*/
|
||||
if ((rdtr == 0) || (*causes != 0)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Check if delayed RX ACK interrupts disabled by client
|
||||
and there is an ACK packet received */
|
||||
/*
|
||||
* Check if delayed RX ACK interrupts disabled by client
|
||||
* and there is an ACK packet received
|
||||
*/
|
||||
if ((raid == 0) && (core->delayed_causes & E1000_ICR_ACK)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -2515,7 +2520,8 @@ e1000e_set_icr(E1000ECore *core, int index, uint32_t val)
|
|||
}
|
||||
|
||||
icr = core->mac[ICR] & ~val;
|
||||
/* Windows driver expects that the "receive overrun" bit and other
|
||||
/*
|
||||
* Windows driver expects that the "receive overrun" bit and other
|
||||
* ones to be cleared when the "Other" bit (#24) is cleared.
|
||||
*/
|
||||
icr = (val & E1000_ICR_OTHER) ? (icr & ~E1000_ICR_OTHER_CAUSES) : icr;
|
||||
|
@ -3269,10 +3275,12 @@ enum { E1000E_NWRITEOPS = ARRAY_SIZE(e1000e_macreg_writeops) };
|
|||
|
||||
enum { MAC_ACCESS_PARTIAL = 1 };
|
||||
|
||||
/* The array below combines alias offsets of the index values for the
|
||||
/*
|
||||
* The array below combines alias offsets of the index values for the
|
||||
* MAC registers that have aliases, with the indication of not fully
|
||||
* implemented registers (lowest bit). This combination is possible
|
||||
* because all of the offsets are even. */
|
||||
* because all of the offsets are even.
|
||||
*/
|
||||
static const uint16_t mac_reg_access[E1000E_MAC_SIZE] = {
|
||||
/* Alias index offsets */
|
||||
[FCRTL_A] = 0x07fe, [FCRTH_A] = 0x0802,
|
||||
|
@ -3557,7 +3565,8 @@ e1000e_core_post_load(E1000ECore *core)
|
|||
{
|
||||
NetClientState *nc = qemu_get_queue(core->owner_nic);
|
||||
|
||||
/* nc.link_down can't be migrated, so infer link_down according
|
||||
/*
|
||||
* nc.link_down can't be migrated, so infer link_down according
|
||||
* to link status bit in core.mac[STATUS].
|
||||
*/
|
||||
nc->link_down = (core->mac[STATUS] & E1000_STATUS_LU) == 0;
|
||||
|
|
Loading…
Reference in New Issue