* [PATCH net-next 0/2] tsnep: Two fixes for the driver
@ 2022-08-04 18:39 Gerhard Engleder
2022-08-04 18:39 ` [PATCH net-next 1/2] tsnep: Fix unused warning for 'tsnep_of_match' Gerhard Engleder
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Gerhard Engleder @ 2022-08-04 18:39 UTC (permalink / raw)
To: davem, kuba; +Cc: netdev, Gerhard Engleder
Two simple bugfixes for tsnep driver.
Gerhard Engleder (2):
tsnep: Fix unused warning for 'tsnep_of_match'
tsnep: Fix tsnep_tx_unmap() error path usage
drivers/net/ethernet/engleder/tsnep_main.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--
2.30.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH net-next 1/2] tsnep: Fix unused warning for 'tsnep_of_match'
2022-08-04 18:39 [PATCH net-next 0/2] tsnep: Two fixes for the driver Gerhard Engleder
@ 2022-08-04 18:39 ` Gerhard Engleder
2022-08-04 18:39 ` [PATCH net-next 2/2] tsnep: Fix tsnep_tx_unmap() error path usage Gerhard Engleder
2022-08-09 3:50 ` [PATCH net-next 0/2] tsnep: Two fixes for the driver patchwork-bot+netdevbpf
2 siblings, 0 replies; 8+ messages in thread
From: Gerhard Engleder @ 2022-08-04 18:39 UTC (permalink / raw)
To: davem, kuba; +Cc: netdev, Gerhard Engleder, kernel test robot
Kernel test robot found the following warning:
drivers/net/ethernet/engleder/tsnep_main.c:1254:34: warning:
'tsnep_of_match' defined but not used [-Wunused-const-variable=]
of_match_ptr() compiles into NULL if CONFIG_OF is disabled.
tsnep_of_match exists always so use of of_match_ptr() is useless.
Fix warning by dropping of_match_ptr().
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Gerhard Engleder <gerhard@engleder-embedded.com>
---
drivers/net/ethernet/engleder/tsnep_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/engleder/tsnep_main.c b/drivers/net/ethernet/engleder/tsnep_main.c
index cb069a0af7b9..d98199f3414b 100644
--- a/drivers/net/ethernet/engleder/tsnep_main.c
+++ b/drivers/net/ethernet/engleder/tsnep_main.c
@@ -1282,7 +1282,7 @@ MODULE_DEVICE_TABLE(of, tsnep_of_match);
static struct platform_driver tsnep_driver = {
.driver = {
.name = TSNEP,
- .of_match_table = of_match_ptr(tsnep_of_match),
+ .of_match_table = tsnep_of_match,
},
.probe = tsnep_probe,
.remove = tsnep_remove,
--
2.30.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net-next 2/2] tsnep: Fix tsnep_tx_unmap() error path usage
2022-08-04 18:39 [PATCH net-next 0/2] tsnep: Two fixes for the driver Gerhard Engleder
2022-08-04 18:39 ` [PATCH net-next 1/2] tsnep: Fix unused warning for 'tsnep_of_match' Gerhard Engleder
@ 2022-08-04 18:39 ` Gerhard Engleder
2022-08-08 19:23 ` Jakub Kicinski
2022-08-09 3:50 ` [PATCH net-next 0/2] tsnep: Two fixes for the driver patchwork-bot+netdevbpf
2 siblings, 1 reply; 8+ messages in thread
From: Gerhard Engleder @ 2022-08-04 18:39 UTC (permalink / raw)
To: davem, kuba; +Cc: netdev, Gerhard Engleder
If tsnep_tx_map() fails, then tsnep_tx_unmap() shall start at the write
index like tsnep_tx_map(). This is different to the normal operation.
Thus, add an additional parameter to tsnep_tx_unmap() to enable start at
different positions for successful TX and failed TX.
Signed-off-by: Gerhard Engleder <gerhard@engleder-embedded.com>
---
drivers/net/ethernet/engleder/tsnep_main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/engleder/tsnep_main.c b/drivers/net/ethernet/engleder/tsnep_main.c
index d98199f3414b..a5f7152a1716 100644
--- a/drivers/net/ethernet/engleder/tsnep_main.c
+++ b/drivers/net/ethernet/engleder/tsnep_main.c
@@ -340,14 +340,14 @@ static int tsnep_tx_map(struct sk_buff *skb, struct tsnep_tx *tx, int count)
return 0;
}
-static void tsnep_tx_unmap(struct tsnep_tx *tx, int count)
+static void tsnep_tx_unmap(struct tsnep_tx *tx, int index, int count)
{
struct device *dmadev = tx->adapter->dmadev;
struct tsnep_tx_entry *entry;
int i;
for (i = 0; i < count; i++) {
- entry = &tx->entry[(tx->read + i) % TSNEP_RING_SIZE];
+ entry = &tx->entry[(index + i) % TSNEP_RING_SIZE];
if (entry->len) {
if (i == 0)
@@ -395,7 +395,7 @@ static netdev_tx_t tsnep_xmit_frame_ring(struct sk_buff *skb,
retval = tsnep_tx_map(skb, tx, count);
if (retval != 0) {
- tsnep_tx_unmap(tx, count);
+ tsnep_tx_unmap(tx, tx->write, count);
dev_kfree_skb_any(entry->skb);
entry->skb = NULL;
@@ -464,7 +464,7 @@ static bool tsnep_tx_poll(struct tsnep_tx *tx, int napi_budget)
if (skb_shinfo(entry->skb)->nr_frags > 0)
count += skb_shinfo(entry->skb)->nr_frags;
- tsnep_tx_unmap(tx, count);
+ tsnep_tx_unmap(tx, tx->read, count);
if ((skb_shinfo(entry->skb)->tx_flags & SKBTX_IN_PROGRESS) &&
(__le32_to_cpu(entry->desc_wb->properties) &
--
2.30.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH net-next 2/2] tsnep: Fix tsnep_tx_unmap() error path usage
2022-08-04 18:39 ` [PATCH net-next 2/2] tsnep: Fix tsnep_tx_unmap() error path usage Gerhard Engleder
@ 2022-08-08 19:23 ` Jakub Kicinski
2022-08-08 19:29 ` Gerhard Engleder
2022-08-08 19:30 ` Gerhard Engleder
0 siblings, 2 replies; 8+ messages in thread
From: Jakub Kicinski @ 2022-08-08 19:23 UTC (permalink / raw)
To: Gerhard Engleder; +Cc: davem, netdev
On Thu, 4 Aug 2022 20:39:35 +0200 Gerhard Engleder wrote:
> If tsnep_tx_map() fails, then tsnep_tx_unmap() shall start at the write
> index like tsnep_tx_map(). This is different to the normal operation.
> Thus, add an additional parameter to tsnep_tx_unmap() to enable start at
> different positions for successful TX and failed TX.
>
> Signed-off-by: Gerhard Engleder <gerhard@engleder-embedded.com>
Is this correct:
Fixes: 403f69bbdbad ("tsnep: Add TSN endpoint Ethernet MAC driver")
?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next 2/2] tsnep: Fix tsnep_tx_unmap() error path usage
2022-08-08 19:23 ` Jakub Kicinski
@ 2022-08-08 19:29 ` Gerhard Engleder
2022-08-08 19:30 ` Gerhard Engleder
1 sibling, 0 replies; 8+ messages in thread
From: Gerhard Engleder @ 2022-08-08 19:29 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, netdev
On 08.08.22 21:23, Jakub Kicinski wrote:
> On Thu, 4 Aug 2022 20:39:35 +0200 Gerhard Engleder wrote:
>> If tsnep_tx_map() fails, then tsnep_tx_unmap() shall start at the write
>> index like tsnep_tx_map(). This is different to the normal operation.
>> Thus, add an additional parameter to tsnep_tx_unmap() to enable start at
>> different positions for successful TX and failed TX.
>>
>> Signed-off-by: Gerhard Engleder <gerhard@engleder-embedded.com>
> Is this correct:
>
> Fixes: 403f69bbdbad ("tsnep: Add TSN endpoint Ethernet MAC driver")
>
> ?
Yes, that's correct. Sorry I forget to add it. Shall I add it and resend?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next 2/2] tsnep: Fix tsnep_tx_unmap() error path usage
2022-08-08 19:23 ` Jakub Kicinski
2022-08-08 19:29 ` Gerhard Engleder
@ 2022-08-08 19:30 ` Gerhard Engleder
2022-08-08 21:30 ` Jakub Kicinski
1 sibling, 1 reply; 8+ messages in thread
From: Gerhard Engleder @ 2022-08-08 19:30 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, netdev
On 08.08.22 21:23, Jakub Kicinski wrote:
> On Thu, 4 Aug 2022 20:39:35 +0200 Gerhard Engleder wrote:
>> If tsnep_tx_map() fails, then tsnep_tx_unmap() shall start at the write
>> index like tsnep_tx_map(). This is different to the normal operation.
>> Thus, add an additional parameter to tsnep_tx_unmap() to enable start at
>> different positions for successful TX and failed TX.
>>
>> Signed-off-by: Gerhard Engleder <gerhard@engleder-embedded.com>
> Is this correct:
>
> Fixes: 403f69bbdbad ("tsnep: Add TSN endpoint Ethernet MAC driver")
>
> ?
Yes, that's correct. Sorry I forget to add it. Shall I add it and resend?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next 2/2] tsnep: Fix tsnep_tx_unmap() error path usage
2022-08-08 19:30 ` Gerhard Engleder
@ 2022-08-08 21:30 ` Jakub Kicinski
0 siblings, 0 replies; 8+ messages in thread
From: Jakub Kicinski @ 2022-08-08 21:30 UTC (permalink / raw)
To: Gerhard Engleder; +Cc: davem, netdev
On Mon, 8 Aug 2022 21:30:02 +0200 Gerhard Engleder wrote:
> On 08.08.22 21:23, Jakub Kicinski wrote:
> > On Thu, 4 Aug 2022 20:39:35 +0200 Gerhard Engleder wrote:
> >> If tsnep_tx_map() fails, then tsnep_tx_unmap() shall start at the write
> >> index like tsnep_tx_map(). This is different to the normal operation.
> >> Thus, add an additional parameter to tsnep_tx_unmap() to enable start at
> >> different positions for successful TX and failed TX.
> >>
> >> Signed-off-by: Gerhard Engleder <gerhard@engleder-embedded.com>
> > Is this correct:
> >
> > Fixes: 403f69bbdbad ("tsnep: Add TSN endpoint Ethernet MAC driver")
> >
> > ?
> Yes, that's correct. Sorry I forget to add it. Shall I add it and resend?
It's okay, I'll add it.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next 0/2] tsnep: Two fixes for the driver
2022-08-04 18:39 [PATCH net-next 0/2] tsnep: Two fixes for the driver Gerhard Engleder
2022-08-04 18:39 ` [PATCH net-next 1/2] tsnep: Fix unused warning for 'tsnep_of_match' Gerhard Engleder
2022-08-04 18:39 ` [PATCH net-next 2/2] tsnep: Fix tsnep_tx_unmap() error path usage Gerhard Engleder
@ 2022-08-09 3:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-08-09 3:50 UTC (permalink / raw)
To: Gerhard Engleder; +Cc: davem, kuba, netdev
Hello:
This series was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 4 Aug 2022 20:39:33 +0200 you wrote:
> Two simple bugfixes for tsnep driver.
>
> Gerhard Engleder (2):
> tsnep: Fix unused warning for 'tsnep_of_match'
> tsnep: Fix tsnep_tx_unmap() error path usage
>
> drivers/net/ethernet/engleder/tsnep_main.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
Here is the summary with links:
- [net-next,1/2] tsnep: Fix unused warning for 'tsnep_of_match'
https://git.kernel.org/netdev/net/c/73afd7816c55
- [net-next,2/2] tsnep: Fix tsnep_tx_unmap() error path usage
https://git.kernel.org/netdev/net/c/b3bb8628bf64
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-08-09 3:50 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-04 18:39 [PATCH net-next 0/2] tsnep: Two fixes for the driver Gerhard Engleder
2022-08-04 18:39 ` [PATCH net-next 1/2] tsnep: Fix unused warning for 'tsnep_of_match' Gerhard Engleder
2022-08-04 18:39 ` [PATCH net-next 2/2] tsnep: Fix tsnep_tx_unmap() error path usage Gerhard Engleder
2022-08-08 19:23 ` Jakub Kicinski
2022-08-08 19:29 ` Gerhard Engleder
2022-08-08 19:30 ` Gerhard Engleder
2022-08-08 21:30 ` Jakub Kicinski
2022-08-09 3:50 ` [PATCH net-next 0/2] tsnep: Two fixes for the driver patchwork-bot+netdevbpf
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).