aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/cavium/liquidio/request_manager.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-11-30 11:03:10 -0500
committerDavid S. Miller <davem@davemloft.net>2016-11-30 11:03:10 -0500
commit492e9d8c189bcf4b7801bf9f04356ce452d8747a (patch)
tree40f5ceb6ef52c7e84269f5d2d26e3926938af75f /drivers/net/ethernet/cavium/liquidio/request_manager.c
parent1379fd3c426ce98f2936420a43d88b54df218b69 (diff)
parentb3c35973b8ac0f0906ef38e9b07b0a01a3d357a7 (diff)
downloadlinux-stericsson-492e9d8c189bcf4b7801bf9f04356ce452d8747a.tar.gz
Merge branch 'liquidio-VF'
Raghu Vatsavayi says: ==================== liquidio VF operations This patchseries adds support for VF device specific operations like mailbox, queues and register access. This V3 patchset also has changes based on comments form earlier versions: 1) Removed extra 'void *' casting. 2) Fixed all cross compilations issues reported on S390 and Powerpc architectures. Please apply the patches in following order as these patches depend on each other. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cavium/liquidio/request_manager.c')
-rw-r--r--drivers/net/ethernet/cavium/liquidio/request_manager.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/request_manager.c b/drivers/net/ethernet/cavium/liquidio/request_manager.c
index 8531a004ad3e..ea2b7e46631d 100644
--- a/drivers/net/ethernet/cavium/liquidio/request_manager.c
+++ b/drivers/net/ethernet/cavium/liquidio/request_manager.c
@@ -28,6 +28,7 @@
#include "octeon_network.h"
#include "cn66xx_device.h"
#include "cn23xx_pf_device.h"
+#include "cn23xx_vf_device.h"
struct iq_post_status {
int status;
@@ -68,6 +69,9 @@ int octeon_init_instr_queue(struct octeon_device *oct,
conf = &(CFG_GET_IQ_CFG(CHIP_CONF(oct, cn6xxx)));
else if (OCTEON_CN23XX_PF(oct))
conf = &(CFG_GET_IQ_CFG(CHIP_CONF(oct, cn23xx_pf)));
+ else if (OCTEON_CN23XX_VF(oct))
+ conf = &(CFG_GET_IQ_CFG(CHIP_CONF(oct, cn23xx_vf)));
+
if (!conf) {
dev_err(&oct->pci_dev->dev, "Unsupported Chip %x\n",
oct->chip_id);
@@ -183,6 +187,9 @@ int octeon_delete_instr_queue(struct octeon_device *oct, u32 iq_no)
else if (OCTEON_CN23XX_PF(oct))
desc_size =
CFG_GET_IQ_INSTR_TYPE(CHIP_CONF(oct, cn23xx_pf));
+ else if (OCTEON_CN23XX_VF(oct))
+ desc_size =
+ CFG_GET_IQ_INSTR_TYPE(CHIP_CONF(oct, cn23xx_vf));
vfree(iq->request_list);
@@ -235,7 +242,9 @@ int octeon_setup_iq(struct octeon_device *oct,
}
oct->num_iqs++;
- oct->fn_list.enable_io_queues(oct);
+ if (oct->fn_list.enable_io_queues(oct))
+ return 1;
+
return 0;
}