<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/ethernet/ibm, branch linux-5.11.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.11.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.11.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-04-21T11:13:26Z</updated>
<entry>
<title>ibmvnic: remove duplicate napi_schedule call in open function</title>
<updated>2021-04-21T11:13:26Z</updated>
<author>
<name>Lijun Pan</name>
</author>
<published>2021-04-14T07:46:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f5df8dbbc3e5b3938779f5fb003a9a7bbc19bfa0'/>
<id>urn:sha1:f5df8dbbc3e5b3938779f5fb003a9a7bbc19bfa0</id>
<content type='text'>
commit 7c451f3ef676c805a4b77a743a01a5c21a250a73 upstream.

Remove the unnecessary napi_schedule() call in __ibmvnic_open() since
interrupt_rx() calls napi_schedule_prep/__napi_schedule during every
receive interrupt.

Fixes: ed651a10875f ("ibmvnic: Updated reset handling")
Signed-off-by: Lijun Pan &lt;lijunp213@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ibmvnic: remove duplicate napi_schedule call in do_reset function</title>
<updated>2021-04-21T11:13:26Z</updated>
<author>
<name>Lijun Pan</name>
</author>
<published>2021-04-14T07:46:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4ba852fd216cc64a3d708efbe1f910003091252a'/>
<id>urn:sha1:4ba852fd216cc64a3d708efbe1f910003091252a</id>
<content type='text'>
commit d3a6abccbd272aea7dc2c6f984bb5a2c11278e44 upstream.

During adapter reset, do_reset/do_hard_reset calls ibmvnic_open(),
which will calls napi_schedule if previous state is VNIC_CLOSED
(i.e, the reset case, and "ifconfig down" case). So there is no need
for do_reset to call napi_schedule again at the end of the function
though napi_schedule will neglect the request if napi is already
scheduled.

Fixes: ed651a10875f ("ibmvnic: Updated reset handling")
Signed-off-by: Lijun Pan &lt;lijunp213@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ibmvnic: avoid calling napi_disable() twice</title>
<updated>2021-04-21T11:13:26Z</updated>
<author>
<name>Lijun Pan</name>
</author>
<published>2021-04-14T07:46:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c3e1d486a0b8a6b3f3460ef786744abe173d3de7'/>
<id>urn:sha1:c3e1d486a0b8a6b3f3460ef786744abe173d3de7</id>
<content type='text'>
commit 0775ebc4cf8554bdcd2c212669a0868ab68df5c0 upstream.

__ibmvnic_open calls napi_disable without checking whether NAPI polling
has already been disabled or not. This could cause napi_disable
being called twice, which could generate deadlock. For example,
the first napi_disable will spin until NAPI_STATE_SCHED is cleared
by napi_complete_done, then set it again.
When napi_disable is called the second time, it will loop infinitely
because no dev-&gt;poll will be running to clear NAPI_STATE_SCHED.

To prevent above scenario from happening, call ibmvnic_napi_disable()
which checks if napi is disabled or not before calling napi_disable.

Fixes: bfc32f297337 ("ibmvnic: Move resource initialization to its own routine")
Suggested-by: Thomas Falcon &lt;tlfalcon@linux.ibm.com&gt;
Signed-off-by: Lijun Pan &lt;lijunp213@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ibmvnic: correctly use dev_consume/free_skb_irq</title>
<updated>2021-04-21T11:13:25Z</updated>
<author>
<name>Lijun Pan</name>
</author>
<published>2021-04-13T08:33:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5d328093979ab37f5f9f661380c31e347076aba6'/>
<id>urn:sha1:5d328093979ab37f5f9f661380c31e347076aba6</id>
<content type='text'>
commit ca09bf7bb109a37a7ff05f230bb3fa3627e6625f upstream.

It is more correct to use dev_kfree_skb_irq when packets are dropped,
and to use dev_consume_skb_irq when packets are consumed.

Fixes: 0d973388185d ("ibmvnic: Introduce xmit_more support using batched subCRQ hcalls")
Suggested-by: Thomas Falcon &lt;tlfalcon@linux.ibm.com&gt;
Signed-off-by: Lijun Pan &lt;lijunp213@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ibmvnic: remove excessive irqsave</title>
<updated>2021-03-17T16:11:21Z</updated>
<author>
<name>Junlin Yang</name>
</author>
<published>2021-03-05T08:48:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=70a43e24f58e8002bbebeff165f484927ae1d375'/>
<id>urn:sha1:70a43e24f58e8002bbebeff165f484927ae1d375</id>
<content type='text'>
commit 69cdb7947adb816fc9325b4ec02a6dddd5070b82 upstream.

ibmvnic_remove locks multiple spinlocks while disabling interrupts:
spin_lock_irqsave(&amp;adapter-&gt;state_lock, flags);
spin_lock_irqsave(&amp;adapter-&gt;rwi_lock, flags);

As reported by coccinelle, the second _irqsave() overwrites the value
saved in 'flags' by the first _irqsave(),   therefore when the second
_irqrestore() comes,the value in 'flags' is not valid,the value saved
by the first _irqsave() has been lost.
This likely leads to IRQs remaining disabled. So remove the second
_irqsave():
spin_lock_irqsave(&amp;adapter-&gt;state_lock, flags);
spin_lock(&amp;adapter-&gt;rwi_lock);

Generated by: ./scripts/coccinelle/locks/flags.cocci
./drivers/net/ethernet/ibm/ibmvnic.c:5413:1-18:
ERROR: nested lock+irqsave that reuses flags from line 5404.

Fixes: 4a41c421f367 ("ibmvnic: serialize access to work queue on remove")
Signed-off-by: Junlin Yang &lt;yangjunlin@yulong.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ibmvnic: always store valid MAC address</title>
<updated>2021-03-17T16:11:21Z</updated>
<author>
<name>Jiri Wiesner</name>
</author>
<published>2021-03-04T16:18:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7ff7b1a6d6e6f982370faf75a32f8f3f0f98b0ca'/>
<id>urn:sha1:7ff7b1a6d6e6f982370faf75a32f8f3f0f98b0ca</id>
<content type='text'>
commit 67eb211487f0c993d9f402d1c196ef159fd6a3b5 upstream.

The last change to ibmvnic_set_mac(), 8fc3672a8ad3, meant to prevent
users from setting an invalid MAC address on an ibmvnic interface
that has not been brought up yet. The change also prevented the
requested MAC address from being stored by the adapter object for an
ibmvnic interface when the state of the ibmvnic interface is
VNIC_PROBED - that is after probing has finished but before the
ibmvnic interface is brought up. The MAC address stored by the
adapter object is used and sent to the hypervisor for checking when
an ibmvnic interface is brought up.

The ibmvnic driver ignoring the requested MAC address when in
VNIC_PROBED state caused LACP bonds (bonds in 802.3ad mode) with more
than one slave to malfunction. The bonding code must be able to
change the MAC address of its slaves before they are brought up
during enslaving. The inability of kernels with 8fc3672a8ad3 to set
the MAC addresses of bonding slaves is observable in the output of
"ip address show". The MAC addresses of the slaves are the same as
the MAC address of the bond on a working system whereas the slaves
retain their original MAC addresses on a system with a malfunctioning
LACP bond.

Fixes: 8fc3672a8ad3 ("ibmvnic: fix ibmvnic_set_mac")
Signed-off-by: Jiri Wiesner &lt;jwiesner@suse.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ibmvnic: Fix possibly uninitialized old_num_tx_queues variable warning.</title>
<updated>2021-03-17T16:11:21Z</updated>
<author>
<name>Michal Suchanek</name>
</author>
<published>2021-03-02T19:47:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e6e77eda7286efcc184d209b4e537db2ca2eda20'/>
<id>urn:sha1:e6e77eda7286efcc184d209b4e537db2ca2eda20</id>
<content type='text'>
commit 6881b07fdd24850def1f03761c66042b983ff86e upstream.

GCC 7.5 reports:
../drivers/net/ethernet/ibm/ibmvnic.c: In function 'ibmvnic_reset_init':
../drivers/net/ethernet/ibm/ibmvnic.c:5373:51: warning: 'old_num_tx_queues' may be used uninitialized in this function [-Wmaybe-uninitialized]
../drivers/net/ethernet/ibm/ibmvnic.c:5373:6: warning: 'old_num_rx_queues' may be used uninitialized in this function [-Wmaybe-uninitialized]

The variable is initialized only if(reset) and used only if(reset &amp;&amp;
something) so this is a false positive. However, there is no reason to
not initialize the variables unconditionally avoiding the warning.

Fixes: 635e442f4a48 ("ibmvnic: merge ibmvnic_reset_init and ibmvnic_init")
Signed-off-by: Michal Suchanek &lt;msuchanek@suse.de&gt;
Reviewed-by: Sukadev Bhattiprolu &lt;sukadev@linux.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ibmvnic: change IBMVNIC_MAX_IND_DESCS to 16</title>
<updated>2021-03-04T11:14:03Z</updated>
<author>
<name>Dany Madden</name>
</author>
<published>2021-02-12T20:16:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f5db88cecfd926aedfb478e962a3df587e7e1273'/>
<id>urn:sha1:f5db88cecfd926aedfb478e962a3df587e7e1273</id>
<content type='text'>
[ Upstream commit a6f2fe5f108c11ff8023d07f9c00cc3c9c3203b8 ]

The supported indirect subcrq entries on Power8 is 16. Power9
supports 128. Redefined this value to 16 to minimize the driver from
having to reset when migrating between Power9 and Power8. In our rx/tx
performance testing, we found no performance difference between 16 and
128 at this time.

Fixes: f019fb6392e5 ("ibmvnic: Introduce indirect subordinate Command Response Queue buffer")
Signed-off-by: Dany Madden &lt;drt@linux.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ibmvnic: serialize access to work queue on remove</title>
<updated>2021-03-04T11:13:57Z</updated>
<author>
<name>Sukadev Bhattiprolu</name>
</author>
<published>2021-02-13T04:42:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d052b2e6a933dc22e59ee074ca6abd2ef2377250'/>
<id>urn:sha1:d052b2e6a933dc22e59ee074ca6abd2ef2377250</id>
<content type='text'>
[ Upstream commit 4a41c421f3676fdeea91733cf434dcf319c4c351 ]

The work queue is used to queue reset requests like CHANGE-PARAM or
FAILOVER resets for the worker thread. When the adapter is being removed
the adapter state is set to VNIC_REMOVING and the work queue is flushed
so no new work is added. However the check for adapter being removed is
racy in that the adapter can go into REMOVING state just after we check
and we might end up adding work just as it is being flushed (or after).

The -&gt;rwi_lock is already being used to serialize queue/dequeue work.
Extend its usage ensure there is no race when scheduling/flushing work.

Fixes: 6954a9e4192b ("ibmvnic: Flush existing work items before device removal")
Signed-off-by: Sukadev Bhattiprolu &lt;sukadev@linux.ibm.com&gt;
Cc:Uwe Kleine-König &lt;uwe@kleine-koenig.org&gt;
Cc:Saeed Mahameed &lt;saeed@kernel.org&gt;
Reviewed-by: Dany Madden &lt;drt@linux.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ibmvnic: skip send_request_unmap for timeout reset</title>
<updated>2021-03-04T11:13:56Z</updated>
<author>
<name>Lijun Pan</name>
</author>
<published>2021-02-13T02:49:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8db126a7729914fd03d805078ae5592acca8999d'/>
<id>urn:sha1:8db126a7729914fd03d805078ae5592acca8999d</id>
<content type='text'>
[ Upstream commit 7d3a7b9ea59ddb223aec59b45fa1713c633aaed4 ]

Timeout reset will trigger the VIOS to unmap it automatically,
similarly as FAILVOER and MOBILITY events. If we unmap it
in the linux side, we will see errors like
"30000003: Error 4 in REQUEST_UNMAP_RSP".
So, don't call send_request_unmap for timeout reset.

Fixes: ed651a10875f ("ibmvnic: Updated reset handling")
Signed-off-by: Lijun Pan &lt;ljp@linux.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
