linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: ipa: Remove ipa_endpoint_stop{,_rx_dma} again
@ 2020-05-08 19:41 Nathan Chancellor
  2020-05-08 21:17 ` Arnd Bergmann
  2020-05-09  5:52 ` Jakub Kicinski
  0 siblings, 2 replies; 4+ messages in thread
From: Nathan Chancellor @ 2020-05-08 19:41 UTC (permalink / raw)
  To: Alex Elder, David S. Miller; +Cc: netdev, linux-kernel, Nathan Chancellor

When building arm64 allyesconfig:

drivers/net/ipa/ipa_endpoint.c: In function 'ipa_endpoint_stop_rx_dma':
drivers/net/ipa/ipa_endpoint.c:1274:13: error: 'IPA_ENDPOINT_STOP_RX_SIZE' undeclared (first use in this function)
drivers/net/ipa/ipa_endpoint.c:1274:13: note: each undeclared identifier is reported only once for each function it appears in
drivers/net/ipa/ipa_endpoint.c:1289:2: error: implicit declaration of function 'ipa_cmd_dma_task_32b_addr_add' [-Werror=implicit-function-declaration]
drivers/net/ipa/ipa_endpoint.c:1291:45: error: 'ENDPOINT_STOP_DMA_TIMEOUT' undeclared (first use in this function)
drivers/net/ipa/ipa_endpoint.c: In function 'ipa_endpoint_stop':
drivers/net/ipa/ipa_endpoint.c:1309:16: error: 'IPA_ENDPOINT_STOP_RX_RETRIES' undeclared (first use in this function)

These functions were removed in a series, merged in as
commit 33395f4a5c1b ("Merge branch 'net-ipa-kill-endpoint-stop-workaround'").

Remove them again so that the build works properly.

Fixes: 3793faad7b5b ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
 drivers/net/ipa/ipa_endpoint.c | 61 ----------------------------------
 1 file changed, 61 deletions(-)

diff --git a/drivers/net/ipa/ipa_endpoint.c b/drivers/net/ipa/ipa_endpoint.c
index 5fec30e542cb..82066a223a67 100644
--- a/drivers/net/ipa/ipa_endpoint.c
+++ b/drivers/net/ipa/ipa_endpoint.c
@@ -1269,67 +1269,6 @@ static void ipa_endpoint_reset(struct ipa_endpoint *endpoint)
 			ret, endpoint->channel_id, endpoint->endpoint_id);
 }
 
-static int ipa_endpoint_stop_rx_dma(struct ipa *ipa)
-{
-	u16 size = IPA_ENDPOINT_STOP_RX_SIZE;
-	struct gsi_trans *trans;
-	dma_addr_t addr;
-	int ret;
-
-	trans = ipa_cmd_trans_alloc(ipa, 1);
-	if (!trans) {
-		dev_err(&ipa->pdev->dev,
-			"no transaction for RX endpoint STOP workaround\n");
-		return -EBUSY;
-	}
-
-	/* Read into the highest part of the zero memory area */
-	addr = ipa->zero_addr + ipa->zero_size - size;
-
-	ipa_cmd_dma_task_32b_addr_add(trans, size, addr, false);
-
-	ret = gsi_trans_commit_wait_timeout(trans, ENDPOINT_STOP_DMA_TIMEOUT);
-	if (ret)
-		gsi_trans_free(trans);
-
-	return ret;
-}
-
-/**
- * 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)
-{
-	u32 retries = IPA_ENDPOINT_STOP_RX_RETRIES;
-	int ret;
-
-	do {
-		struct ipa *ipa = endpoint->ipa;
-		struct gsi *gsi = &ipa->gsi;
-
-		ret = gsi_channel_stop(gsi, endpoint->channel_id);
-		if (ret != -EAGAIN || endpoint->toward_ipa)
-			break;
-
-		/* For IPA v3.5.1, send a DMA read task and check again */
-		if (ipa->version == IPA_VERSION_3_5_1) {
-			ret = ipa_endpoint_stop_rx_dma(ipa);
-			if (ret)
-				break;
-		}
-
-		msleep(1);
-	} while (retries--);
-
-	return retries ? ret : -EIO;
-}
-
 static void ipa_endpoint_program(struct ipa_endpoint *endpoint)
 {
 	if (endpoint->toward_ipa) {

base-commit: 30e2206e11ce27ae910cc0dab21472429e400a87
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: ipa: Remove ipa_endpoint_stop{,_rx_dma} again
  2020-05-08 19:41 [PATCH net-next] net: ipa: Remove ipa_endpoint_stop{,_rx_dma} again Nathan Chancellor
@ 2020-05-08 21:17 ` Arnd Bergmann
  2020-05-09  5:52 ` Jakub Kicinski
  1 sibling, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2020-05-08 21:17 UTC (permalink / raw)
  To: Nathan Chancellor; +Cc: Alex Elder, David S. Miller, Networking, linux-kernel

On Fri, May 8, 2020 at 9:44 PM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> When building arm64 allyesconfig:
>
> drivers/net/ipa/ipa_endpoint.c: In function 'ipa_endpoint_stop_rx_dma':
> drivers/net/ipa/ipa_endpoint.c:1274:13: error: 'IPA_ENDPOINT_STOP_RX_SIZE' undeclared (first use in this function)
> drivers/net/ipa/ipa_endpoint.c:1274:13: note: each undeclared identifier is reported only once for each function it appears in
> drivers/net/ipa/ipa_endpoint.c:1289:2: error: implicit declaration of function 'ipa_cmd_dma_task_32b_addr_add' [-Werror=implicit-function-declaration]
> drivers/net/ipa/ipa_endpoint.c:1291:45: error: 'ENDPOINT_STOP_DMA_TIMEOUT' undeclared (first use in this function)
> drivers/net/ipa/ipa_endpoint.c: In function 'ipa_endpoint_stop':
> drivers/net/ipa/ipa_endpoint.c:1309:16: error: 'IPA_ENDPOINT_STOP_RX_RETRIES' undeclared (first use in this function)
>
> These functions were removed in a series, merged in as
> commit 33395f4a5c1b ("Merge branch 'net-ipa-kill-endpoint-stop-workaround'").
>
> Remove them again so that the build works properly.
>
> Fixes: 3793faad7b5b ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net")
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

I ran into the same issue but didn't see the solution right away. Your patch
looks good to me.

Reviewed-by: Arnd Bergmann <arnd@arndb.de>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: ipa: Remove ipa_endpoint_stop{,_rx_dma} again
  2020-05-08 19:41 [PATCH net-next] net: ipa: Remove ipa_endpoint_stop{,_rx_dma} again Nathan Chancellor
  2020-05-08 21:17 ` Arnd Bergmann
@ 2020-05-09  5:52 ` Jakub Kicinski
  2020-05-18 15:00   ` Alex Elder
  1 sibling, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2020-05-09  5:52 UTC (permalink / raw)
  To: Nathan Chancellor; +Cc: Alex Elder, David S. Miller, netdev, linux-kernel

On Fri,  8 May 2020 12:41:33 -0700 Nathan Chancellor wrote:
> When building arm64 allyesconfig:
> 
> drivers/net/ipa/ipa_endpoint.c: In function 'ipa_endpoint_stop_rx_dma':
> drivers/net/ipa/ipa_endpoint.c:1274:13: error: 'IPA_ENDPOINT_STOP_RX_SIZE' undeclared (first use in this function)
> drivers/net/ipa/ipa_endpoint.c:1274:13: note: each undeclared identifier is reported only once for each function it appears in
> drivers/net/ipa/ipa_endpoint.c:1289:2: error: implicit declaration of function 'ipa_cmd_dma_task_32b_addr_add' [-Werror=implicit-function-declaration]
> drivers/net/ipa/ipa_endpoint.c:1291:45: error: 'ENDPOINT_STOP_DMA_TIMEOUT' undeclared (first use in this function)
> drivers/net/ipa/ipa_endpoint.c: In function 'ipa_endpoint_stop':
> drivers/net/ipa/ipa_endpoint.c:1309:16: error: 'IPA_ENDPOINT_STOP_RX_RETRIES' undeclared (first use in this function)
> 
> These functions were removed in a series, merged in as
> commit 33395f4a5c1b ("Merge branch 'net-ipa-kill-endpoint-stop-workaround'").
> 
> Remove them again so that the build works properly.
> 
> Fixes: 3793faad7b5b ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net")
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Applied, thank you!

I think I already said this, but would be great if IPA built on x86
with COMPILE_TEST..

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: ipa: Remove ipa_endpoint_stop{,_rx_dma} again
  2020-05-09  5:52 ` Jakub Kicinski
@ 2020-05-18 15:00   ` Alex Elder
  0 siblings, 0 replies; 4+ messages in thread
From: Alex Elder @ 2020-05-18 15:00 UTC (permalink / raw)
  To: Jakub Kicinski, Nathan Chancellor
  Cc: Alex Elder, David S. Miller, netdev, linux-kernel

On 5/9/20 12:52 AM, Jakub Kicinski wrote:
> On Fri,  8 May 2020 12:41:33 -0700 Nathan Chancellor wrote:
>> When building arm64 allyesconfig:
>>
>> drivers/net/ipa/ipa_endpoint.c: In function 'ipa_endpoint_stop_rx_dma':
>> drivers/net/ipa/ipa_endpoint.c:1274:13: error: 'IPA_ENDPOINT_STOP_RX_SIZE' undeclared (first use in this function)
>> drivers/net/ipa/ipa_endpoint.c:1274:13: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/net/ipa/ipa_endpoint.c:1289:2: error: implicit declaration of function 'ipa_cmd_dma_task_32b_addr_add' [-Werror=implicit-function-declaration]
>> drivers/net/ipa/ipa_endpoint.c:1291:45: error: 'ENDPOINT_STOP_DMA_TIMEOUT' undeclared (first use in this function)
>> drivers/net/ipa/ipa_endpoint.c: In function 'ipa_endpoint_stop':
>> drivers/net/ipa/ipa_endpoint.c:1309:16: error: 'IPA_ENDPOINT_STOP_RX_RETRIES' undeclared (first use in this function)
>>
>> These functions were removed in a series, merged in as
>> commit 33395f4a5c1b ("Merge branch 'net-ipa-kill-endpoint-stop-workaround'").
>>
>> Remove them again so that the build works properly.
>>
>> Fixes: 3793faad7b5b ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net")
>> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> 
> Applied, thank you!

First, I want to apologize for not responding to this earlier.  There
are some problems with my mail filters and am only now starting to go
through some of these messages...

Thank you Nathan for the fix and Arnd for the review, and Jakub for
merging it.

> I think I already said this, but would be great if IPA built on x86
> with COMPILE_TEST..

Yes I intend to add this but it was not as simple as I had hoped
and other things have had priority; sorry about that.  Soon.

					-Alex


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-18 15:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08 19:41 [PATCH net-next] net: ipa: Remove ipa_endpoint_stop{,_rx_dma} again Nathan Chancellor
2020-05-08 21:17 ` Arnd Bergmann
2020-05-09  5:52 ` Jakub Kicinski
2020-05-18 15:00   ` Alex Elder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).