third_party/virtualbox/src/VBox/Devices/Network/DevE1000.cpp
/**
 * Default register write handler.
 *
 * Stores the value to the register array in device state structure. Only bits
 * corresponding to 1s both in 'writable' and 'mask' will be stored.
 *
 * @returns VBox status code.
 *
 * @param   pThis       The device state structure.
 * @param   offset      Register offset in memory-mapped frame.
 * @param   index       Register index in register array.
 * @param   value       The value to store.
 * @param   mask        Used to implement partial writes (8 and 16-bit).
 * @thread  EMT
 */
Default register write handler.
Stores the value to the register array in device state structure. Only bits
corresponding to 1s both in 'writable' and 'mask' will be stored.

@returns VBox status code.

@param   pThis       The device state structure.
@param   offset      Register offset in memory-mapped frame.
@param   index       Register index in register array.
@param   value       The value to store.
@param   mask        Used to implement partial writes (8 and 16-bit).
@thread  EMT
Default register write handler . Stores the value to the register array in device state structure . Only bits corresponding to 1s both in ' writable ' and ' mask ' will be stored . @returns VBox status code . @param pThis The device state structure . @param offset Register offset in memory - mapped frame . @param index Register index in register array . @param value The value to store . @param mask Used to implement partial writes ( 8 and 16 - bit ) . @thread EMT
static int e1kRegWriteDefault(PE1KSTATE pThis, uint32_t offset, uint32_t index, uint32_t value)
{
    RT_NOREF_PV(offset);
    AssertReturn(index < E1K_NUM_OF_32BIT_REGS, VERR_DEV_IO_ERROR);
    pThis->auRegs[index] = (value & g_aE1kRegMap[index].writable)
                         | (pThis->auRegs[index] & ~g_aE1kRegMap[index].writable);
    return VINF_SUCCESS;
}
static int e1kRegWriteDefault ( PE1KSTATE pThis , uint32_t offset , uint32_t index , uint32_t value ) { RT_NOREF_PV ( offset ) ; AssertReturn ( index < E1K_NUM_OF_32BIT_REGS , VERR_DEV_IO_ERROR ) ; pThis -> auRegs [ index ] = ( value & g_aE1kRegMap [ index ] . writable ) | ( pThis -> auRegs [ index ] & ~ g_aE1kRegMap [ index ] . writable ) ; return VINF_SUCCESS ; }
Default register write handler.
Default register write handler .