net: ipa: rename db_enable flag
In several places, a Boolean flag is used in the GSI code to indicate whether the "doorbell engine" should be enabled or not when a channel is configured. This is basically done to abstract this property from the IPA version; the GSI code doesn't otherwise "know" what the IPA hardware version is. The doorbell engine is enabled only for IPA v3.5.1, not for IPA v4.0 and later. The next patch makes another change that affects behavior during channel reset (which also involves programming the channel). It also distinguishes IPA v3.5.1 hardware from newer hardware. Rather than creating another flag whose value matches the "db_enable" value, just rename "db_enable" to be "legacy" so it can be used to signal more than just the special doorbell handling. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
ee733cd896
commit
f86a1909ea
@@ -1136,7 +1136,7 @@ static int ipa_endpoint_reset_rx_aggr(struct ipa_endpoint *endpoint)
|
||||
bool endpoint_suspended = false;
|
||||
struct gsi *gsi = &ipa->gsi;
|
||||
dma_addr_t addr;
|
||||
bool db_enable;
|
||||
bool legacy;
|
||||
u32 retries;
|
||||
u32 len = 1;
|
||||
void *virt;
|
||||
@@ -1200,8 +1200,8 @@ static int ipa_endpoint_reset_rx_aggr(struct ipa_endpoint *endpoint)
|
||||
* complete the channel reset sequence. Finish by suspending the
|
||||
* channel again (if necessary).
|
||||
*/
|
||||
db_enable = ipa->version == IPA_VERSION_3_5_1;
|
||||
gsi_channel_reset(gsi, endpoint->channel_id, db_enable);
|
||||
legacy = ipa->version == IPA_VERSION_3_5_1;
|
||||
gsi_channel_reset(gsi, endpoint->channel_id, legacy);
|
||||
|
||||
msleep(1);
|
||||
|
||||
@@ -1223,8 +1223,8 @@ static void ipa_endpoint_reset(struct ipa_endpoint *endpoint)
|
||||
{
|
||||
u32 channel_id = endpoint->channel_id;
|
||||
struct ipa *ipa = endpoint->ipa;
|
||||
bool db_enable;
|
||||
bool special;
|
||||
bool legacy;
|
||||
int ret = 0;
|
||||
|
||||
/* On IPA v3.5.1, if an RX endpoint is reset while aggregation
|
||||
@@ -1233,12 +1233,12 @@ static void ipa_endpoint_reset(struct ipa_endpoint *endpoint)
|
||||
*
|
||||
* IPA v3.5.1 enables the doorbell engine. Newer versions do not.
|
||||
*/
|
||||
db_enable = ipa->version == IPA_VERSION_3_5_1;
|
||||
legacy = ipa->version == IPA_VERSION_3_5_1;
|
||||
special = !endpoint->toward_ipa && endpoint->data->aggregation;
|
||||
if (special && ipa_endpoint_aggr_active(endpoint))
|
||||
ret = ipa_endpoint_reset_rx_aggr(endpoint);
|
||||
else
|
||||
gsi_channel_reset(&ipa->gsi, channel_id, db_enable);
|
||||
gsi_channel_reset(&ipa->gsi, channel_id, legacy);
|
||||
|
||||
if (ret)
|
||||
dev_err(&ipa->pdev->dev,
|
||||
|
Reference in New Issue
Block a user