1893ce44dSCatherine Sullivan /* SPDX-License-Identifier: (GPL-2.0 OR MIT) 2893ce44dSCatherine Sullivan * Google virtual Ethernet (gve) driver 3893ce44dSCatherine Sullivan * 4893ce44dSCatherine Sullivan * Copyright (C) 2015-2019 Google, Inc. 5893ce44dSCatherine Sullivan */ 6893ce44dSCatherine Sullivan 7893ce44dSCatherine Sullivan #ifndef _GVE_REGISTER_H_ 8893ce44dSCatherine Sullivan #define _GVE_REGISTER_H_ 9893ce44dSCatherine Sullivan 10893ce44dSCatherine Sullivan /* Fixed Configuration Registers */ 11893ce44dSCatherine Sullivan struct gve_registers { 12893ce44dSCatherine Sullivan __be32 device_status; 13893ce44dSCatherine Sullivan __be32 driver_status; 14893ce44dSCatherine Sullivan __be32 max_tx_queues; 15893ce44dSCatherine Sullivan __be32 max_rx_queues; 16893ce44dSCatherine Sullivan __be32 adminq_pfn; 17893ce44dSCatherine Sullivan __be32 adminq_doorbell; 18893ce44dSCatherine Sullivan __be32 adminq_event_counter; 19893ce44dSCatherine Sullivan u8 reserved[3]; 20893ce44dSCatherine Sullivan u8 driver_version; 21893ce44dSCatherine Sullivan }; 22893ce44dSCatherine Sullivan 23893ce44dSCatherine Sullivan enum gve_device_status_flags { 24893ce44dSCatherine Sullivan GVE_DEVICE_STATUS_RESET_MASK = BIT(1), 25893ce44dSCatherine Sullivan GVE_DEVICE_STATUS_LINK_STATUS_MASK = BIT(2), 26*24aeb56fSKuo Zhao GVE_DEVICE_STATUS_REPORT_STATS_MASK = BIT(3), 27893ce44dSCatherine Sullivan }; 28893ce44dSCatherine Sullivan #endif /* _GVE_REGISTER_H_ */ 29