Merge tag 'rpmsg-v5.17-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/remote...
[linux-2.6-microblaze.git] / drivers / net / ipa / ipa_endpoint.h
index 0a859d1..0313cdc 100644 (file)
@@ -40,6 +40,19 @@ enum ipa_endpoint_name {
 
 #define IPA_ENDPOINT_MAX               32      /* Max supported by driver */
 
+/**
+ * enum ipa_replenish_flag:    RX buffer replenish flags
+ *
+ * @IPA_REPLENISH_ENABLED:     Whether receive buffer replenishing is enabled
+ * @IPA_REPLENISH_ACTIVE:      Whether replenishing is underway
+ * @IPA_REPLENISH_COUNT:       Number of defined replenish flags
+ */
+enum ipa_replenish_flag {
+       IPA_REPLENISH_ENABLED,
+       IPA_REPLENISH_ACTIVE,
+       IPA_REPLENISH_COUNT,    /* Number of flags (must be last) */
+};
+
 /**
  * struct ipa_endpoint - IPA endpoint information
  * @ipa:               IPA pointer
@@ -51,7 +64,7 @@ enum ipa_endpoint_name {
  * @trans_tre_max:     Maximum number of TRE descriptors per transaction
  * @evt_ring_id:       GSI event ring used by the endpoint
  * @netdev:            Network device pointer, if endpoint uses one
- * @replenish_enabled: Whether receive buffer replenishing is enabled
+ * @replenish_flags:   Replenishing state flags
  * @replenish_ready:   Number of replenish transactions without doorbell
  * @replenish_saved:   Replenish requests held while disabled
  * @replenish_backlog: Number of buffers needed to fill hardware queue
@@ -72,7 +85,7 @@ struct ipa_endpoint {
        struct net_device *netdev;
 
        /* Receive buffer replenishing for RX endpoints */
-       bool replenish_enabled;
+       DECLARE_BITMAP(replenish_flags, IPA_REPLENISH_COUNT);
        u32 replenish_ready;
        atomic_t replenish_saved;
        atomic_t replenish_backlog;