Skip to content

Commit

Permalink
net: ipa: kill ipa_endpoint_stop()
Browse files Browse the repository at this point in the history
The previous commit made ipa_endpoint_stop() be a trivial wrapper
around gsi_channel_stop().  Since it no longer does anything
special, just open-code it in the three places it's used.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alex Elder authored and David S. Miller committed May 7, 2020
1 parent 9928fcc commit f30dcb7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 23 deletions.
27 changes: 6 additions & 21 deletions drivers/net/ipa/ipa_endpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@ static int ipa_endpoint_reset_rx_aggr(struct ipa_endpoint *endpoint)

gsi_trans_read_byte_done(gsi, endpoint->channel_id);

ret = ipa_endpoint_stop(endpoint);
ret = gsi_channel_stop(gsi, endpoint->channel_id);
if (ret)
goto out_suspend_again;

Expand All @@ -1231,7 +1231,7 @@ static int ipa_endpoint_reset_rx_aggr(struct ipa_endpoint *endpoint)
goto out_suspend_again;

err_endpoint_stop:
ipa_endpoint_stop(endpoint);
(void)gsi_channel_stop(gsi, endpoint->channel_id);
out_suspend_again:
if (suspended)
(void)ipa_endpoint_program_suspend(endpoint, true);
Expand Down Expand Up @@ -1269,22 +1269,6 @@ static void ipa_endpoint_reset(struct ipa_endpoint *endpoint)
ret, endpoint->channel_id, endpoint->endpoint_id);
}

/**
* ipa_endpoint_stop() - Stops a GSI channel in IPA
* @client: Client whose endpoint should be stopped
*
* This function implements the sequence to stop a GSI channel
* in IPA. This function returns when the channel is is STOP state.
*
* Return value: 0 on success, negative otherwise
*/
int ipa_endpoint_stop(struct ipa_endpoint *endpoint)
{
struct gsi *gsi = &endpoint->ipa->gsi;

return gsi_channel_stop(gsi, endpoint->channel_id);
}

static void ipa_endpoint_program(struct ipa_endpoint *endpoint)
{
if (endpoint->toward_ipa) {
Expand Down Expand Up @@ -1337,12 +1321,13 @@ void ipa_endpoint_disable_one(struct ipa_endpoint *endpoint)
{
u32 mask = BIT(endpoint->endpoint_id);
struct ipa *ipa = endpoint->ipa;
struct gsi *gsi = &ipa->gsi;
int ret;

if (!(endpoint->ipa->enabled & mask))
if (!(ipa->enabled & mask))
return;

endpoint->ipa->enabled ^= mask;
ipa->enabled ^= mask;

if (!endpoint->toward_ipa) {
ipa_endpoint_replenish_disable(endpoint);
Expand All @@ -1351,7 +1336,7 @@ void ipa_endpoint_disable_one(struct ipa_endpoint *endpoint)
}

/* Note that if stop fails, the channel's state is not well-defined */
ret = ipa_endpoint_stop(endpoint);
ret = gsi_channel_stop(gsi, endpoint->channel_id);
if (ret)
dev_err(&ipa->pdev->dev,
"error %d attempting to stop endpoint %u\n", ret,
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/ipa/ipa_endpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ int ipa_endpoint_modem_exception_reset_all(struct ipa *ipa);

int ipa_endpoint_skb_tx(struct ipa_endpoint *endpoint, struct sk_buff *skb);

int ipa_endpoint_stop(struct ipa_endpoint *endpoint);

void ipa_endpoint_exit_one(struct ipa_endpoint *endpoint);

int ipa_endpoint_enable_one(struct ipa_endpoint *endpoint);
Expand Down

0 comments on commit f30dcb7

Please sign in to comment.