1 /* SPDX-License-Identifier: (GPL-2.0 OR MIT) 2 * Google virtual Ethernet (gve) driver 3 * 4 * Copyright (C) 2015-2019 Google, Inc. 5 */ 6 7 #ifndef _GVE_REGISTER_H_ 8 #define _GVE_REGISTER_H_ 9 10 /* Fixed Configuration Registers */ 11 struct gve_registers { 12 __be32 device_status; 13 __be32 driver_status; 14 __be32 max_tx_queues; 15 __be32 max_rx_queues; 16 __be32 adminq_pfn; 17 __be32 adminq_doorbell; 18 __be32 adminq_event_counter; 19 u8 reserved[3]; 20 u8 driver_version; 21 __be32 adminq_base_address_hi; 22 __be32 adminq_base_address_lo; 23 __be16 adminq_length; 24 }; 25 26 enum gve_device_status_flags { 27 GVE_DEVICE_STATUS_RESET_MASK = BIT(1), 28 GVE_DEVICE_STATUS_LINK_STATUS_MASK = BIT(2), 29 GVE_DEVICE_STATUS_REPORT_STATS_MASK = BIT(3), 30 GVE_DEVICE_STATUS_DEVICE_IS_RESET = BIT(4), 31 }; 32 33 enum gve_driver_status_flags { 34 GVE_DRIVER_STATUS_RUN_MASK = BIT(0), 35 GVE_DRIVER_STATUS_RESET_MASK = BIT(1), 36 }; 37 #endif /* _GVE_REGISTER_H_ */ 38