* [PATCH net 0/4] qlcnic: bug fixes
@ 2013-07-26 20:23 Himanshu Madhani
2013-07-26 20:24 ` [PATCH net 1/4] qlcnic: Fix initialization of work function Himanshu Madhani
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Himanshu Madhani @ 2013-07-26 20:23 UTC (permalink / raw)
To: davem; +Cc: netdev, Dept_NX_Linux_NIC_Driver, Himanshu Madhani
From: Himanshu Madhani <himanshu.madhani@qlogic.com>
Please apply to net.
Thanks,
Himanshu
Jitendra Kalsaria (1):
qlcnic: Fix initialization of work function.
Manish Chopra (2):
qlcnic: Fix setting Guest VLAN
qlcnic: Fix diagnostic interrupt test for 83xx adapters.
Pratik Pujar (1):
qlcnic: Fix operation type and command type.
.../net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 4 +--
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 2 ++
.../ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 2 ++
.../net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c | 30 +++++++++++++++++++---
4 files changed, 32 insertions(+), 6 deletions(-)
--
1.8.1.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net 1/4] qlcnic: Fix initialization of work function.
2013-07-26 20:23 [PATCH net 0/4] qlcnic: bug fixes Himanshu Madhani
@ 2013-07-26 20:24 ` Himanshu Madhani
2013-07-26 20:24 ` [PATCH net 2/4] qlcnic: Fix operation type and command type Himanshu Madhani
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Himanshu Madhani @ 2013-07-26 20:24 UTC (permalink / raw)
To: davem
Cc: netdev, Dept_NX_Linux_NIC_Driver, Jitendra Kalsaria, himanshu.madhani
From: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Work function needs to be initialized before we participate in
inter device communication (IDC).
Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
index f41dfab..51ab4b5 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
@@ -2123,6 +2123,8 @@ int qlcnic_83xx_init(struct qlcnic_adapter *adapter, int pci_using_dac)
set_bit(QLC_83XX_MBX_READY, &adapter->ahw->idc.status);
qlcnic_83xx_clear_function_resources(adapter);
+ INIT_DELAYED_WORK(&adapter->idc_aen_work, qlcnic_83xx_idc_aen_work);
+
/* register for NIC IDC AEN Events */
qlcnic_83xx_register_nic_idc_func(adapter, 1);
@@ -2140,8 +2142,6 @@ int qlcnic_83xx_init(struct qlcnic_adapter *adapter, int pci_using_dac)
if (adapter->nic_ops->init_driver(adapter))
return -EIO;
- INIT_DELAYED_WORK(&adapter->idc_aen_work, qlcnic_83xx_idc_aen_work);
-
/* Periodically monitor device status */
qlcnic_83xx_idc_poll_dev_state(&adapter->fw_work.work);
--
1.8.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net 2/4] qlcnic: Fix operation type and command type.
2013-07-26 20:23 [PATCH net 0/4] qlcnic: bug fixes Himanshu Madhani
2013-07-26 20:24 ` [PATCH net 1/4] qlcnic: Fix initialization of work function Himanshu Madhani
@ 2013-07-26 20:24 ` Himanshu Madhani
2013-07-26 20:24 ` [PATCH net 3/4] qlcnic: Fix setting Guest VLAN Himanshu Madhani
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Himanshu Madhani @ 2013-07-26 20:24 UTC (permalink / raw)
To: davem; +Cc: netdev, Dept_NX_Linux_NIC_Driver, Pratik Pujar, himanshu.madhani
From: Pratik Pujar <pratik.pujar@qlogic.com>
Operation type and command type is not set correct in back channel
response.
Signed-off-by: Pratik Pujar <pratik.pujar@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 2 ++
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c | 4 +---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
index 62380ce..56e85f9 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
@@ -762,6 +762,7 @@ static int qlcnic_sriov_alloc_bc_mbx_args(struct qlcnic_cmd_args *mbx, u32 type)
memset(mbx->rsp.arg, 0, sizeof(u32) * mbx->rsp.num);
mbx->req.arg[0] = (type | (mbx->req.num << 16) |
(3 << 29));
+ mbx->rsp.arg[0] = (type & 0xffff) | mbx->rsp.num << 16;
return 0;
}
}
@@ -813,6 +814,7 @@ static int qlcnic_sriov_prepare_bc_hdr(struct qlcnic_bc_trans *trans,
cmd->req.num = trans->req_pay_size / 4;
cmd->rsp.num = trans->rsp_pay_size / 4;
hdr = trans->rsp_hdr;
+ cmd->op_type = trans->req_hdr->op_type;
}
trans->trans_id = seq;
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c
index 46aeb59..9bdd51e 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c
@@ -641,8 +641,6 @@ static int qlcnic_sriov_pf_channel_cfg_cmd(struct qlcnic_bc_trans *trans,
int err;
adapter = vf->adapter;
- cmd->rsp.arg[0] = trans->req_hdr->cmd_op;
- cmd->rsp.arg[0] |= (1 << 16);
if (trans->req_hdr->cmd_op == QLCNIC_BC_CMD_CHANNEL_INIT) {
err = qlcnic_sriov_pf_config_vport(adapter, 1, func);
@@ -1187,7 +1185,7 @@ static int qlcnic_sriov_pf_get_acl_cmd(struct qlcnic_bc_trans *trans,
u8 cmd_op, mode = vp->vlan_mode;
cmd_op = trans->req_hdr->cmd_op;
- cmd->rsp.arg[0] = (cmd_op & 0xffff) | 14 << 16 | 1 << 25;
+ cmd->rsp.arg[0] |= 1 << 25;
switch (mode) {
case QLC_GUEST_VLAN_MODE:
--
1.8.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net 3/4] qlcnic: Fix setting Guest VLAN
2013-07-26 20:23 [PATCH net 0/4] qlcnic: bug fixes Himanshu Madhani
2013-07-26 20:24 ` [PATCH net 1/4] qlcnic: Fix initialization of work function Himanshu Madhani
2013-07-26 20:24 ` [PATCH net 2/4] qlcnic: Fix operation type and command type Himanshu Madhani
@ 2013-07-26 20:24 ` Himanshu Madhani
2013-07-26 20:24 ` [PATCH net 4/4] qlcnic: Fix diagnostic interrupt test for 83xx adapters Himanshu Madhani
2013-07-28 3:03 ` [PATCH net 0/4] qlcnic: bug fixes David Miller
4 siblings, 0 replies; 6+ messages in thread
From: Himanshu Madhani @ 2013-07-26 20:24 UTC (permalink / raw)
To: davem; +Cc: netdev, Dept_NX_Linux_NIC_Driver, Manish Chopra, himanshu.madhani
From: Manish Chopra <manish.chopra@qlogic.com>
o When configuring guest VLAN after PVID configuration, VF was loading
with previously configured PVID. Clear the PVID which was previously
configured before configuring guest VLAN.
o Display guest VLAN when it is configured
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
.../net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c | 26 +++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c
index 9bdd51e..eb49cd6 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c
@@ -1749,6 +1749,7 @@ int qlcnic_sriov_set_vf_vlan(struct net_device *netdev, int vf,
switch (vlan) {
case 4095:
+ vp->vlan = 0;
vp->vlan_mode = QLC_GUEST_VLAN_MODE;
break;
case 0:
@@ -1767,6 +1768,29 @@ int qlcnic_sriov_set_vf_vlan(struct net_device *netdev, int vf,
return 0;
}
+static inline __u32 qlcnic_sriov_get_vf_vlan(struct qlcnic_adapter *adapter,
+ struct qlcnic_vport *vp, int vf)
+{
+ __u32 vlan = 0;
+
+ switch (vp->vlan_mode) {
+ case QLC_PVID_MODE:
+ vlan = vp->vlan;
+ break;
+ case QLC_GUEST_VLAN_MODE:
+ vlan = MAX_VLAN_ID;
+ break;
+ case QLC_NO_VLAN_MODE:
+ vlan = 0;
+ break;
+ default:
+ netdev_info(adapter->netdev, "Invalid VLAN mode = %d for VF %d\n",
+ vp->vlan_mode, vf);
+ }
+
+ return vlan;
+}
+
int qlcnic_sriov_get_vf_config(struct net_device *netdev,
int vf, struct ifla_vf_info *ivi)
{
@@ -1782,7 +1806,7 @@ int qlcnic_sriov_get_vf_config(struct net_device *netdev,
vp = sriov->vf_info[vf].vp;
memcpy(&ivi->mac, vp->mac, ETH_ALEN);
- ivi->vlan = vp->vlan;
+ ivi->vlan = qlcnic_sriov_get_vf_vlan(adapter, vp, vf);
ivi->qos = vp->qos;
ivi->spoofchk = vp->spoofchk;
if (vp->max_tx_bw == MAX_BW)
--
1.8.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net 4/4] qlcnic: Fix diagnostic interrupt test for 83xx adapters.
2013-07-26 20:23 [PATCH net 0/4] qlcnic: bug fixes Himanshu Madhani
` (2 preceding siblings ...)
2013-07-26 20:24 ` [PATCH net 3/4] qlcnic: Fix setting Guest VLAN Himanshu Madhani
@ 2013-07-26 20:24 ` Himanshu Madhani
2013-07-28 3:03 ` [PATCH net 0/4] qlcnic: bug fixes David Miller
4 siblings, 0 replies; 6+ messages in thread
From: Himanshu Madhani @ 2013-07-26 20:24 UTC (permalink / raw)
To: davem; +Cc: netdev, Dept_NX_Linux_NIC_Driver, Manish Chopra, himanshu.madhani
From: Manish Chopra <manish.chopra@qlogic.com>
o Initialize proper interrupt handler for 83xx.
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 41635f2..cc78d39 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -1383,6 +1383,8 @@ qlcnic_request_irq(struct qlcnic_adapter *adapter)
if (adapter->ahw->diag_test == QLCNIC_INTERRUPT_TEST) {
if (qlcnic_82xx_check(adapter))
handler = qlcnic_tmp_intr;
+ else
+ handler = qlcnic_83xx_tmp_intr;
if (!QLCNIC_IS_MSI_FAMILY(adapter))
flags |= IRQF_SHARED;
--
1.8.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net 0/4] qlcnic: bug fixes
2013-07-26 20:23 [PATCH net 0/4] qlcnic: bug fixes Himanshu Madhani
` (3 preceding siblings ...)
2013-07-26 20:24 ` [PATCH net 4/4] qlcnic: Fix diagnostic interrupt test for 83xx adapters Himanshu Madhani
@ 2013-07-28 3:03 ` David Miller
4 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2013-07-28 3:03 UTC (permalink / raw)
To: himanshu.madhani; +Cc: netdev, Dept_NX_Linux_NIC_Driver
From: Himanshu Madhani <himanshu.madhani@qlogic.com>
Date: Fri, 26 Jul 2013 16:23:59 -0400
> Please apply to net.
Series applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-07-28 3:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-26 20:23 [PATCH net 0/4] qlcnic: bug fixes Himanshu Madhani
2013-07-26 20:24 ` [PATCH net 1/4] qlcnic: Fix initialization of work function Himanshu Madhani
2013-07-26 20:24 ` [PATCH net 2/4] qlcnic: Fix operation type and command type Himanshu Madhani
2013-07-26 20:24 ` [PATCH net 3/4] qlcnic: Fix setting Guest VLAN Himanshu Madhani
2013-07-26 20:24 ` [PATCH net 4/4] qlcnic: Fix diagnostic interrupt test for 83xx adapters Himanshu Madhani
2013-07-28 3:03 ` [PATCH net 0/4] qlcnic: bug fixes 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).