netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] liquidio VF: fix incorrect struct being used
@ 2017-01-04 19:31 Felix Manlunas
  2017-01-06 20:31 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Manlunas @ 2017-01-04 19:31 UTC (permalink / raw)
  To: davem; +Cc: netdev, raghu.vatsavayi, derek.chickles, satananda.burla

From: Prasad Kanneganti <prasad.kanneganti@cavium.com>

The VF driver is using the wrong struct when sending commands to the NIC
firmware, sometimes causing adverse effects in the firmware.  The right
struct is the one that the PF is using, so make the VF use that as well.

Signed-off-by: Prasad Kanneganti <prasad.kanneganti@cavium.com>
Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: Derek Chickles <derek.chickles@cavium.com>
Signed-off-by: Satanand Burla <satananda.burla@cavium.com>
---
 drivers/net/ethernet/cavium/liquidio/octeon_nic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_nic.c b/drivers/net/ethernet/cavium/liquidio/octeon_nic.c
index c3d6a82..0243be8 100644
--- a/drivers/net/ethernet/cavium/liquidio/octeon_nic.c
+++ b/drivers/net/ethernet/cavium/liquidio/octeon_nic.c
@@ -49,7 +49,7 @@ octeon_alloc_soft_command_resp(struct octeon_device    *oct,
 	/* Add in the response related fields. Opcode and Param are already
 	 * there.
 	 */
-	if (OCTEON_CN23XX_PF(oct)) {
+	if (OCTEON_CN23XX_PF(oct) || OCTEON_CN23XX_VF(oct)) {
 		ih3      = (struct octeon_instr_ih3 *)&sc->cmd.cmd3.ih3;
 		rdp     = (struct octeon_instr_rdp *)&sc->cmd.cmd3.rdp;
 		irh     = (struct octeon_instr_irh *)&sc->cmd.cmd3.irh;
@@ -70,7 +70,7 @@ octeon_alloc_soft_command_resp(struct octeon_device    *oct,
 
 	*sc->status_word = COMPLETION_WORD_INIT;
 
-	if (OCTEON_CN23XX_PF(oct))
+	if (OCTEON_CN23XX_PF(oct) || OCTEON_CN23XX_VF(oct))
 		sc->cmd.cmd3.rptr =  sc->dmarptr;
 	else
 		sc->cmd.cmd2.rptr =  sc->dmarptr;

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

* Re: [PATCH net-next] liquidio VF: fix incorrect struct being used
  2017-01-04 19:31 [PATCH net-next] liquidio VF: fix incorrect struct being used Felix Manlunas
@ 2017-01-06 20:31 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-01-06 20:31 UTC (permalink / raw)
  To: felix.manlunas; +Cc: netdev, raghu.vatsavayi, derek.chickles, satananda.burla

From: Felix Manlunas <felix.manlunas@cavium.com>
Date: Wed, 4 Jan 2017 11:31:55 -0800

> From: Prasad Kanneganti <prasad.kanneganti@cavium.com>
> 
> The VF driver is using the wrong struct when sending commands to the NIC
> firmware, sometimes causing adverse effects in the firmware.  The right
> struct is the one that the PF is using, so make the VF use that as well.
> 
> Signed-off-by: Prasad Kanneganti <prasad.kanneganti@cavium.com>
> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
> Signed-off-by: Derek Chickles <derek.chickles@cavium.com>
> Signed-off-by: Satanand Burla <satananda.burla@cavium.com>

Applied.

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

end of thread, other threads:[~2017-01-06 20:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-04 19:31 [PATCH net-next] liquidio VF: fix incorrect struct being used Felix Manlunas
2017-01-06 20:31 ` David Miller

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).