RE: [PATCH] net: qlcnic: Deletion of unnecessary memset
> -Original Message- > From: Christophe JAILLET [mailto:christophe.jail...@wanadoo.fr] > Sent: Tuesday, July 14, 2015 1:22 AM > To: Shahed Shaikh; Dept-GE Linux NIC Dev > Cc: netdev; linux-kernel; kernel-janit...@vger.kernel.org; Christophe JAILLET > Subject: [PATCH] net: qlcnic: Deletion of unnecessary memset > > There is no need to memset memory allocated with vzalloc. > > Signed-off-by: Christophe JAILLET > --- > drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c > b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c > index 2f6cc42..7dbab3c 100644 > --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c > +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c > @@ -2403,7 +2403,6 @@ int qlcnic_alloc_tx_rings(struct qlcnic_adapter > *adapter, > qlcnic_free_tx_rings(adapter); > return -ENOMEM; > } > - memset(cmd_buf_arr, 0, TX_BUFF_RINGSIZE(tx_ring)); > tx_ring->cmd_buf_arr = cmd_buf_arr; > spin_lock_init(_ring->tx_clean_lock); > } Acked-by: Shahed Shaikh Thanks, Shahed -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH] net: qlcnic: Deletion of unnecessary memset
-Original Message- From: Christophe JAILLET [mailto:christophe.jail...@wanadoo.fr] Sent: Tuesday, July 14, 2015 1:22 AM To: Shahed Shaikh; Dept-GE Linux NIC Dev Cc: netdev; linux-kernel; kernel-janit...@vger.kernel.org; Christophe JAILLET Subject: [PATCH] net: qlcnic: Deletion of unnecessary memset There is no need to memset memory allocated with vzalloc. Signed-off-by: Christophe JAILLET christophe.jail...@wanadoo.fr --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c index 2f6cc42..7dbab3c 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c @@ -2403,7 +2403,6 @@ int qlcnic_alloc_tx_rings(struct qlcnic_adapter *adapter, qlcnic_free_tx_rings(adapter); return -ENOMEM; } - memset(cmd_buf_arr, 0, TX_BUFF_RINGSIZE(tx_ring)); tx_ring-cmd_buf_arr = cmd_buf_arr; spin_lock_init(tx_ring-tx_clean_lock); } Acked-by: Shahed Shaikh shahed.sha...@qlogic.com Thanks, Shahed -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH] qlcnic: Fix return value in qlcnic_probe()
> -Original Message- > From: xuyongjia...@163.com [mailto:xuyongjia...@163.com] > Sent: Tuesday, December 30, 2014 1:34 PM > To: Shahed Shaikh; Dept-GE Linux NIC Dev > Cc: netdev; linux-kernel; Yongjian Xu > Subject: [PATCH] qlcnic: Fix return value in qlcnic_probe() > > From: Yongjian Xu > > If the check of adapter fails and goes into the 'else' branch, the return > value > 'err' should not still be zero. > > Signed-off-by: Yongjian Xu > --- > drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c |1 + > 1 file changed, 1 insertion(+) Acked-by: Shahed Shaikh Thanks, Shahed -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH] qlcnic: Fix return value in qlcnic_probe()
-Original Message- From: xuyongjia...@163.com [mailto:xuyongjia...@163.com] Sent: Tuesday, December 30, 2014 1:34 PM To: Shahed Shaikh; Dept-GE Linux NIC Dev Cc: netdev; linux-kernel; Yongjian Xu Subject: [PATCH] qlcnic: Fix return value in qlcnic_probe() From: Yongjian Xu xuyongjia...@gmail.com If the check of adapter fails and goes into the 'else' branch, the return value 'err' should not still be zero. Signed-off-by: Yongjian Xu xuyongjia...@gmail.com --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c |1 + 1 file changed, 1 insertion(+) Acked-by: Shahed Shaikh shahed.sha...@qlogic.com Thanks, Shahed -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCHv2 net 4/4] qlcnic: Implement ndo_gso_check()
> -Original Message- > From: Joe Stringer [mailto:joestrin...@nicira.com] > Sent: Friday, November 14, 2014 6:08 AM > To: netdev > Cc: sathya.pe...@emulex.com; Shahed Shaikh; am...@mellanox.com; Dept- > GE Linux NIC Dev; Tom Herbert (Partner - google); gerlitz...@gmail.com; > alexander.du...@gmail.com; linux-kernel > Subject: [PATCHv2 net 4/4] qlcnic: Implement ndo_gso_check() > > Use vxlan_gso_check() to advertise offload support for this NIC. > > Signed-off-by: Joe Stringer > --- > v2: Refactor out vxlan helper. > --- > drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c |6 ++ > 1 file changed, 6 insertions(+) Acked-by: Shahed Shaikh Thanks Joe. -Shahed > > diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c > b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c > index f5e29f7..a913b3a 100644 > --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c > +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c > @@ -503,6 +503,11 @@ static void qlcnic_del_vxlan_port(struct net_device > *netdev, > > adapter->flags |= QLCNIC_DEL_VXLAN_PORT; } > + > +static bool qlcnic_gso_check(struct sk_buff *skb, struct net_device > +*dev) { > + return vxlan_gso_check(skb); > +} > #endif > > static const struct net_device_ops qlcnic_netdev_ops = { @@ -526,6 +531,7 > @@ static const struct net_device_ops qlcnic_netdev_ops = { #ifdef > CONFIG_QLCNIC_VXLAN > .ndo_add_vxlan_port = qlcnic_add_vxlan_port, > .ndo_del_vxlan_port = qlcnic_del_vxlan_port, > + .ndo_gso_check = qlcnic_gso_check, > #endif > #ifdef CONFIG_NET_POLL_CONTROLLER > .ndo_poll_controller = qlcnic_poll_controller, > -- > 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCHv2 net 4/4] qlcnic: Implement ndo_gso_check()
-Original Message- From: Joe Stringer [mailto:joestrin...@nicira.com] Sent: Friday, November 14, 2014 6:08 AM To: netdev Cc: sathya.pe...@emulex.com; Shahed Shaikh; am...@mellanox.com; Dept- GE Linux NIC Dev; Tom Herbert (Partner - google); gerlitz...@gmail.com; alexander.du...@gmail.com; linux-kernel Subject: [PATCHv2 net 4/4] qlcnic: Implement ndo_gso_check() Use vxlan_gso_check() to advertise offload support for this NIC. Signed-off-by: Joe Stringer joestrin...@nicira.com --- v2: Refactor out vxlan helper. --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c |6 ++ 1 file changed, 6 insertions(+) Acked-by: Shahed Shaikh shahed.sha...@qlogic.com Thanks Joe. -Shahed diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c index f5e29f7..a913b3a 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c @@ -503,6 +503,11 @@ static void qlcnic_del_vxlan_port(struct net_device *netdev, adapter-flags |= QLCNIC_DEL_VXLAN_PORT; } + +static bool qlcnic_gso_check(struct sk_buff *skb, struct net_device +*dev) { + return vxlan_gso_check(skb); +} #endif static const struct net_device_ops qlcnic_netdev_ops = { @@ -526,6 +531,7 @@ static const struct net_device_ops qlcnic_netdev_ops = { #ifdef CONFIG_QLCNIC_VXLAN .ndo_add_vxlan_port = qlcnic_add_vxlan_port, .ndo_del_vxlan_port = qlcnic_del_vxlan_port, + .ndo_gso_check = qlcnic_gso_check, #endif #ifdef CONFIG_NET_POLL_CONTROLLER .ndo_poll_controller = qlcnic_poll_controller, -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH net 5/5] qlcnic: Implement ndo_gso_check()
> -Original Message- > From: Joe Stringer [mailto:joestrin...@nicira.com] > Sent: Wednesday, November 05, 2014 3:27 AM > To: netdev > Cc: sathya.pe...@emulex.com; jeffrey.t.kirs...@intel.com; > linux.n...@intel.com; am...@mellanox.com; Shahed Shaikh; Dept-GE Linux > NIC Dev; Tom Herbert (Partner - google); linux-kernel > Subject: [PATCH net 5/5] qlcnic: Implement ndo_gso_check() > > ndo_gso_check() was recently introduced to allow NICs to report the > offloading support that they have on a per-skb basis. Add an implementation > for this driver which checks for something that looks like VXLAN. > > Implementation shamelessly stolen from Tom Herbert: > http://thread.gmane.org/gmane.linux.network/332428/focus=333111 > > Signed-off-by: Joe Stringer > --- > drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 12 > 1 file changed, 12 insertions(+) > > diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c > b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c > index f5e29f7..6184f47 100644 > --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c > +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c > @@ -505,6 +505,17 @@ static void qlcnic_del_vxlan_port(struct net_device > *netdev, } #endif > > +static bool qlcnic_gso_check(struct sk_buff *skb, struct net_device > +*dev) { > + if ((skb_shinfo(skb)->gso_type & SKB_GSO_UDP_TUNNEL) && > + (skb->inner_protocol_type != ENCAP_TYPE_ETHER || > + skb->inner_protocol != htons(ETH_P_TEB) || > + skb_inner_mac_header(skb) - skb_transport_header(skb) != 16)) > + return false; > + Hi Joe, Yes, qlcnic driver only supports VXLAN offload. It would be good to put a comment about value 16 to make it more intuitive. e.g. 16 is the size of outer UDP header + VXLAN header. Anyway, patch looks good to me. Acked-by: Shahed Shaikh Thanks, Shahed -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH net 5/5] qlcnic: Implement ndo_gso_check()
-Original Message- From: Joe Stringer [mailto:joestrin...@nicira.com] Sent: Wednesday, November 05, 2014 3:27 AM To: netdev Cc: sathya.pe...@emulex.com; jeffrey.t.kirs...@intel.com; linux.n...@intel.com; am...@mellanox.com; Shahed Shaikh; Dept-GE Linux NIC Dev; Tom Herbert (Partner - google); linux-kernel Subject: [PATCH net 5/5] qlcnic: Implement ndo_gso_check() ndo_gso_check() was recently introduced to allow NICs to report the offloading support that they have on a per-skb basis. Add an implementation for this driver which checks for something that looks like VXLAN. Implementation shamelessly stolen from Tom Herbert: http://thread.gmane.org/gmane.linux.network/332428/focus=333111 Signed-off-by: Joe Stringer joestrin...@nicira.com --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c index f5e29f7..6184f47 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c @@ -505,6 +505,17 @@ static void qlcnic_del_vxlan_port(struct net_device *netdev, } #endif +static bool qlcnic_gso_check(struct sk_buff *skb, struct net_device +*dev) { + if ((skb_shinfo(skb)-gso_type SKB_GSO_UDP_TUNNEL) + (skb-inner_protocol_type != ENCAP_TYPE_ETHER || + skb-inner_protocol != htons(ETH_P_TEB) || + skb_inner_mac_header(skb) - skb_transport_header(skb) != 16)) + return false; + Hi Joe, Yes, qlcnic driver only supports VXLAN offload. It would be good to put a comment about value 16 to make it more intuitive. e.g. 16 is the size of outer UDP header + VXLAN header. Anyway, patch looks good to me. Acked-by: Shahed Shaikh shahed.sha...@qlogic.com Thanks, Shahed -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH NET-NEXT V2] netxen: fix ethtool rx_dropped information in ethtool get_ethtool_stats()
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev- > ow...@vger.kernel.org] On Behalf Of ethan zhao > Sent: Wednesday, July 09, 2014 10:45 AM > To: David Miller > Cc: ba...@ti.com; netdev; linux-kernel; sriharsha.dev...@oracle.com; > ethan.ker...@gmail.com; vaughan@oracle.com > Subject: Re: [PATCH NET-NEXT V2] netxen: fix ethtool rx_dropped > information in ethtool get_ethtool_stats() > > David, > Sorry I don't know who owns this driver, the SOB of other patches to > netxen may mislead me you could ACK it or not, so it is definitely not the > original meaning that ask you specifically to review one patch. > just ask for help point to someone could review it Ethan, You can get the maintainers of netxen_nic driver from " MAINTAINERS" file. Please copy maintainers of this driver for review. NETXEN (1/10) GbE SUPPORT M: Manish Chopra M: Sony Chacko M: Rajesh Borundia L: net...@vger.kernel.org W: http://www.qlogic.com S: Supported F: drivers/net/ethernet/qlogic/netxen/ HTH. Thanks, Shahed -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH NET-NEXT V2] netxen: fix ethtool rx_dropped information in ethtool get_ethtool_stats()
-Original Message- From: netdev-ow...@vger.kernel.org [mailto:netdev- ow...@vger.kernel.org] On Behalf Of ethan zhao Sent: Wednesday, July 09, 2014 10:45 AM To: David Miller Cc: ba...@ti.com; netdev; linux-kernel; sriharsha.dev...@oracle.com; ethan.ker...@gmail.com; vaughan@oracle.com Subject: Re: [PATCH NET-NEXT V2] netxen: fix ethtool rx_dropped information in ethtool get_ethtool_stats() David, Sorry I don't know who owns this driver, the SOB of other patches to netxen may mislead me you could ACK it or not, so it is definitely not the original meaning that ask you specifically to review one patch. just ask for help point to someone could review it Ethan, You can get the maintainers of netxen_nic driver from MAINTAINERS file. Please copy maintainers of this driver for review. NETXEN (1/10) GbE SUPPORT M: Manish Chopra manish.cho...@qlogic.com M: Sony Chacko sony.cha...@qlogic.com M: Rajesh Borundia rajesh.borun...@qlogic.com L: net...@vger.kernel.org W: http://www.qlogic.com S: Supported F: drivers/net/ethernet/qlogic/netxen/ HTH. Thanks, Shahed -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v2 net-next 2/2] qlcnic: Use pci_enable_msix_exact() instead of pci_enable_msix()
> -Original Message- > From: Alexander Gordeev [mailto:agord...@redhat.com] > Sent: Friday, April 25, 2014 3:14 PM > To: Shahed Shaikh > Cc: linux-kernel; Dept-HSG Linux NIC Dev; netdev; linux-pci > Subject: [PATCH v2 net-next 2/2] qlcnic: Use pci_enable_msix_exact() > instead of pci_enable_msix() > > As result of deprecation of MSI-X/MSI enablement functions > pci_enable_msix() and pci_enable_msi_block() all drivers using these two > interfaces need to be updated to use the new pci_enable_msi_range() or > pci_enable_msi_exact() and pci_enable_msix_range() or > pci_enable_msix_exact() interfaces. > > Cc: Shahed Shaikh > Cc: dept-hsglinuxnic...@qlogic.com > Cc: net...@vger.kernel.org > Cc: linux-...@vger.kernel.org > > Signed-off-by: Alexander Gordeev Acked-by: Shahed Shaikh Thanks, Shahed -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH net-next 2/2] qlcnic: Use pci_enable_msix_exact() instead of pci_enable_msix()
> -Original Message- > From: Alexander Gordeev [mailto:agord...@redhat.com] > Sent: Friday, April 25, 2014 2:31 PM > To: Shahed Shaikh > Cc: linux-kernel; Dept-HSG Linux NIC Dev; netdev; linux-pci > Subject: Re: [PATCH net-next 2/2] qlcnic: Use pci_enable_msix_exact() > instead of pci_enable_msix() > > On Fri, Apr 25, 2014 at 08:48:14AM +, Shahed Shaikh wrote: > > > diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c > > > b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c > > > index dbf7539..26f022b 100644 > > > --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c > > > +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c > > > @@ -690,8 +690,8 @@ int qlcnic_setup_tss_rss_intr(struct > > > qlcnic_adapter > > > *adapter) > > > adapter->msix_entries[vector].entry = vector; > > > > > > restore: > > > - err = pci_enable_msix(pdev, adapter->msix_entries, num_msix); > > > - if (err > 0) { > > > + err = pci_enable_msix_exact(pdev, adapter->msix_entries, > > > num_msix); > > > + if (err == -ENOSPC) { > > > if (!adapter->drv_tss_rings && !adapter->drv_rss_rings) > > > return -ENOSPC; > > > > I think, it would be good if we return "err" instead of "-ENOSPC" . > > > > if (!adapter->drv_tss_rings && !adapter->drv_rss_rings) > > - return -ENOSPC; > > + return err; > > At this point "err" could only be -ENOSPC. I am not sure why returning "err" > is > better, but I'll repost if you insist. Agree. But it will make code look cleaner. Thanks, Shahed -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH net-next 2/2] qlcnic: Use pci_enable_msix_exact() instead of pci_enable_msix()
> -Original Message- > From: Alexander Gordeev [mailto:agord...@redhat.com] > Sent: Friday, April 25, 2014 1:36 PM > To: linux-kernel > Cc: Alexander Gordeev; Shahed Shaikh; Dept-HSG Linux NIC Dev; netdev; > linux-pci > Subject: [PATCH net-next 2/2] qlcnic: Use pci_enable_msix_exact() instead > of pci_enable_msix() > > As result of deprecation of MSI-X/MSI enablement functions > pci_enable_msix() and pci_enable_msi_block() all drivers using these two > interfaces need to be updated to use the new pci_enable_msi_range() or > pci_enable_msi_exact() and pci_enable_msix_range() or > pci_enable_msix_exact() interfaces. > > Cc: Shahed Shaikh > Cc: dept-hsglinuxnic...@qlogic.com > Cc: net...@vger.kernel.org > Cc: linux-...@vger.kernel.org > > Signed-off-by: Alexander Gordeev > --- > drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c > b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c > index dbf7539..26f022b 100644 > --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c > +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c > @@ -690,8 +690,8 @@ int qlcnic_setup_tss_rss_intr(struct qlcnic_adapter > *adapter) > adapter->msix_entries[vector].entry = vector; > > restore: > - err = pci_enable_msix(pdev, adapter->msix_entries, num_msix); > - if (err > 0) { > + err = pci_enable_msix_exact(pdev, adapter->msix_entries, > num_msix); > + if (err == -ENOSPC) { > if (!adapter->drv_tss_rings && !adapter->drv_rss_rings) > return -ENOSPC; I think, it would be good if we return "err" instead of "-ENOSPC" . if (!adapter->drv_tss_rings && !adapter->drv_rss_rings) - return -ENOSPC; + return err; Thanks, Shahed -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH net-next 2/2] qlcnic: Use pci_enable_msix_exact() instead of pci_enable_msix()
-Original Message- From: Alexander Gordeev [mailto:agord...@redhat.com] Sent: Friday, April 25, 2014 1:36 PM To: linux-kernel Cc: Alexander Gordeev; Shahed Shaikh; Dept-HSG Linux NIC Dev; netdev; linux-pci Subject: [PATCH net-next 2/2] qlcnic: Use pci_enable_msix_exact() instead of pci_enable_msix() As result of deprecation of MSI-X/MSI enablement functions pci_enable_msix() and pci_enable_msi_block() all drivers using these two interfaces need to be updated to use the new pci_enable_msi_range() or pci_enable_msi_exact() and pci_enable_msix_range() or pci_enable_msix_exact() interfaces. Cc: Shahed Shaikh shahed.sha...@qlogic.com Cc: dept-hsglinuxnic...@qlogic.com Cc: net...@vger.kernel.org Cc: linux-...@vger.kernel.org Signed-off-by: Alexander Gordeev agord...@redhat.com --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c index dbf7539..26f022b 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c @@ -690,8 +690,8 @@ int qlcnic_setup_tss_rss_intr(struct qlcnic_adapter *adapter) adapter-msix_entries[vector].entry = vector; restore: - err = pci_enable_msix(pdev, adapter-msix_entries, num_msix); - if (err 0) { + err = pci_enable_msix_exact(pdev, adapter-msix_entries, num_msix); + if (err == -ENOSPC) { if (!adapter-drv_tss_rings !adapter-drv_rss_rings) return -ENOSPC; I think, it would be good if we return err instead of -ENOSPC . if (!adapter-drv_tss_rings !adapter-drv_rss_rings) - return -ENOSPC; + return err; Thanks, Shahed -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH net-next 2/2] qlcnic: Use pci_enable_msix_exact() instead of pci_enable_msix()
-Original Message- From: Alexander Gordeev [mailto:agord...@redhat.com] Sent: Friday, April 25, 2014 2:31 PM To: Shahed Shaikh Cc: linux-kernel; Dept-HSG Linux NIC Dev; netdev; linux-pci Subject: Re: [PATCH net-next 2/2] qlcnic: Use pci_enable_msix_exact() instead of pci_enable_msix() On Fri, Apr 25, 2014 at 08:48:14AM +, Shahed Shaikh wrote: diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c index dbf7539..26f022b 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c @@ -690,8 +690,8 @@ int qlcnic_setup_tss_rss_intr(struct qlcnic_adapter *adapter) adapter-msix_entries[vector].entry = vector; restore: - err = pci_enable_msix(pdev, adapter-msix_entries, num_msix); - if (err 0) { + err = pci_enable_msix_exact(pdev, adapter-msix_entries, num_msix); + if (err == -ENOSPC) { if (!adapter-drv_tss_rings !adapter-drv_rss_rings) return -ENOSPC; I think, it would be good if we return err instead of -ENOSPC . if (!adapter-drv_tss_rings !adapter-drv_rss_rings) - return -ENOSPC; + return err; At this point err could only be -ENOSPC. I am not sure why returning err is better, but I'll repost if you insist. Agree. But it will make code look cleaner. Thanks, Shahed -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v2 net-next 2/2] qlcnic: Use pci_enable_msix_exact() instead of pci_enable_msix()
-Original Message- From: Alexander Gordeev [mailto:agord...@redhat.com] Sent: Friday, April 25, 2014 3:14 PM To: Shahed Shaikh Cc: linux-kernel; Dept-HSG Linux NIC Dev; netdev; linux-pci Subject: [PATCH v2 net-next 2/2] qlcnic: Use pci_enable_msix_exact() instead of pci_enable_msix() As result of deprecation of MSI-X/MSI enablement functions pci_enable_msix() and pci_enable_msi_block() all drivers using these two interfaces need to be updated to use the new pci_enable_msi_range() or pci_enable_msi_exact() and pci_enable_msix_range() or pci_enable_msix_exact() interfaces. Cc: Shahed Shaikh shahed.sha...@qlogic.com Cc: dept-hsglinuxnic...@qlogic.com Cc: net...@vger.kernel.org Cc: linux-...@vger.kernel.org Signed-off-by: Alexander Gordeev agord...@redhat.com Acked-by: Shahed Shaikh shahed.sha...@qlogic.com Thanks, Shahed -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH] qlcnic: Fix MSI-X initialization code
> -Original Message- > From: Alexander Gordeev [mailto:agord...@redhat.com] > Sent: Tuesday, April 15, 2014 3:07 PM > To: linux-kernel > Cc: Alexander Gordeev; Shahed Shaikh; Dept-HSG Linux NIC Dev; netdev; > linux-pci > Subject: [PATCH] qlcnic: Fix MSI-X initialization code > > Function qlcnic_setup_tss_rss_intr() might enter endless loop in case > pci_enable_msix() contiguously returns a positive number of MSI-Xs that > could have been allocated. > Besides, the function contains 'err = -EIO;' assignment that never could be > reached. This update fixes the aforementioned issues. > > Cc: Shahed Shaikh > Cc: dept-hsglinuxnic...@qlogic.com > Cc: net...@vger.kernel.org > Cc: linux-...@vger.kernel.org > > Signed-off-by: Alexander Gordeev Acked-by: Shahed Shaikh Thanks, Shahed > --- > drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 28 --- > -- > 1 files changed, 16 insertions(+), 12 deletions(-) > > diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c > b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c > index 309d056..2e615d5 100644 > --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c > +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c > @@ -670,7 +670,7 @@ int qlcnic_setup_tss_rss_intr(struct qlcnic_adapter > *adapter) > else > num_msix += adapter->drv_tx_rings; > > - if (adapter->drv_rss_rings > 0) > + if (adapter->drv_rss_rings > 0) > num_msix += adapter->drv_rss_rings; > else > num_msix += adapter->drv_sds_rings; > @@ -686,19 +686,15 @@ int qlcnic_setup_tss_rss_intr(struct qlcnic_adapter > *adapter) > return -ENOMEM; > } > > -restore: > for (vector = 0; vector < num_msix; vector++) > adapter->msix_entries[vector].entry = vector; > > +restore: > err = pci_enable_msix(pdev, adapter->msix_entries, num_msix); > - if (err == 0) { > - adapter->ahw->num_msix = num_msix; > - if (adapter->drv_tss_rings > 0) > - adapter->drv_tx_rings = adapter->drv_tss_rings; > + if (err > 0) { > + if (!adapter->drv_tss_rings && !adapter->drv_rss_rings) > + return -ENOSPC; > > - if (adapter->drv_rss_rings > 0) > - adapter->drv_sds_rings = adapter->drv_rss_rings; > - } else { > netdev_info(adapter->netdev, > "Unable to allocate %d MSI-X vectors, Available > vectors %d\n", > num_msix, err); > @@ -716,12 +712,20 @@ restore: > "Restoring %d Tx, %d SDS rings for total %d > vectors.\n", > adapter->drv_tx_rings, adapter->drv_sds_rings, > num_msix); > - goto restore; > > - err = -EIO; > + goto restore; > + } else if (err < 0) { > + return err; > } > > - return err; > + adapter->ahw->num_msix = num_msix; > + if (adapter->drv_tss_rings > 0) > + adapter->drv_tx_rings = adapter->drv_tss_rings; > + > + if (adapter->drv_rss_rings > 0) > + adapter->drv_sds_rings = adapter->drv_rss_rings; > + > + return 0; > } > > int qlcnic_enable_msix(struct qlcnic_adapter *adapter, u32 num_msix) > -- > 1.7.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH] qlcnic: Fix MSI-X initialization code
-Original Message- From: Alexander Gordeev [mailto:agord...@redhat.com] Sent: Tuesday, April 15, 2014 3:07 PM To: linux-kernel Cc: Alexander Gordeev; Shahed Shaikh; Dept-HSG Linux NIC Dev; netdev; linux-pci Subject: [PATCH] qlcnic: Fix MSI-X initialization code Function qlcnic_setup_tss_rss_intr() might enter endless loop in case pci_enable_msix() contiguously returns a positive number of MSI-Xs that could have been allocated. Besides, the function contains 'err = -EIO;' assignment that never could be reached. This update fixes the aforementioned issues. Cc: Shahed Shaikh shahed.sha...@qlogic.com Cc: dept-hsglinuxnic...@qlogic.com Cc: net...@vger.kernel.org Cc: linux-...@vger.kernel.org Signed-off-by: Alexander Gordeev agord...@redhat.com Acked-by: Shahed Shaikh shahed.sha...@qlogic.com Thanks, Shahed --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 28 --- -- 1 files changed, 16 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c index 309d056..2e615d5 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c @@ -670,7 +670,7 @@ int qlcnic_setup_tss_rss_intr(struct qlcnic_adapter *adapter) else num_msix += adapter-drv_tx_rings; - if (adapter-drv_rss_rings 0) + if (adapter-drv_rss_rings 0) num_msix += adapter-drv_rss_rings; else num_msix += adapter-drv_sds_rings; @@ -686,19 +686,15 @@ int qlcnic_setup_tss_rss_intr(struct qlcnic_adapter *adapter) return -ENOMEM; } -restore: for (vector = 0; vector num_msix; vector++) adapter-msix_entries[vector].entry = vector; +restore: err = pci_enable_msix(pdev, adapter-msix_entries, num_msix); - if (err == 0) { - adapter-ahw-num_msix = num_msix; - if (adapter-drv_tss_rings 0) - adapter-drv_tx_rings = adapter-drv_tss_rings; + if (err 0) { + if (!adapter-drv_tss_rings !adapter-drv_rss_rings) + return -ENOSPC; - if (adapter-drv_rss_rings 0) - adapter-drv_sds_rings = adapter-drv_rss_rings; - } else { netdev_info(adapter-netdev, Unable to allocate %d MSI-X vectors, Available vectors %d\n, num_msix, err); @@ -716,12 +712,20 @@ restore: Restoring %d Tx, %d SDS rings for total %d vectors.\n, adapter-drv_tx_rings, adapter-drv_sds_rings, num_msix); - goto restore; - err = -EIO; + goto restore; + } else if (err 0) { + return err; } - return err; + adapter-ahw-num_msix = num_msix; + if (adapter-drv_tss_rings 0) + adapter-drv_tx_rings = adapter-drv_tss_rings; + + if (adapter-drv_rss_rings 0) + adapter-drv_sds_rings = adapter-drv_rss_rings; + + return 0; } int qlcnic_enable_msix(struct qlcnic_adapter *adapter, u32 num_msix) -- 1.7.7.6 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: linux-next: Tree for Mar 28 (qlcnic)
> -Original Message- > From: Randy Dunlap [mailto:rdun...@infradead.org] > Sent: Friday, March 28, 2014 11:57 PM > To: Stephen Rothwell; linux-n...@vger.kernel.org > Cc: linux-kernel; netdev; Shahed Shaikh; Dept-HSG Linux NIC Dev > Subject: Re: linux-next: Tree for Mar 28 (qlcnic) > > On 03/28/2014 12:09 AM, Stephen Rothwell wrote: > > Hi all, > > > > This tree still fails (more than usual) the powerpc allyesconfig build. > > > > Changes since 20140327: > > > > > on x86_64: > CONFIG_VXLAN=m > > drivers/built-in.o: In function `qlcnic_attach': > (.text+0x25d9dc): undefined reference to `vxlan_get_rx_port' > > > Full randconfig file is attached. > > depends on VXLAN ? Yes. Need to add dependency on VXLAN in Kconfig of qlcnic. I will send a patch to fix this build failure. Thanks, Shahed > > -- > ~Randy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: linux-next: Tree for Mar 28 (qlcnic)
-Original Message- From: Randy Dunlap [mailto:rdun...@infradead.org] Sent: Friday, March 28, 2014 11:57 PM To: Stephen Rothwell; linux-n...@vger.kernel.org Cc: linux-kernel; netdev; Shahed Shaikh; Dept-HSG Linux NIC Dev Subject: Re: linux-next: Tree for Mar 28 (qlcnic) On 03/28/2014 12:09 AM, Stephen Rothwell wrote: Hi all, This tree still fails (more than usual) the powerpc allyesconfig build. Changes since 20140327: on x86_64: CONFIG_VXLAN=m drivers/built-in.o: In function `qlcnic_attach': (.text+0x25d9dc): undefined reference to `vxlan_get_rx_port' Full randconfig file is attached. depends on VXLAN ? Yes. Need to add dependency on VXLAN in Kconfig of qlcnic. I will send a patch to fix this build failure. Thanks, Shahed -- ~Randy -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH net-next 4/7] qlcnic: Remove casts of pointer to same type
> -Original Message- > From: Joe Perches [mailto:j...@perches.com] > Sent: Tuesday, March 25, 2014 1:46 AM > To: netdev > Cc: Shahed Shaikh; Dept-HSG Linux NIC Dev; linux-kernel > Subject: [PATCH net-next 4/7] qlcnic: Remove casts of pointer to same type > > Casting a pointer to a pointer of the same type is pointless, so remove these > unnecessary casts. > > Done via coccinelle script: > > $ cat typecast_2.cocci > @@ > type T; > T *foo; > @@ > > - (T *)foo > + foo > > Signed-off-by: Joe Perches Acked-by: Shahed Shaikh Thanks, Shahed > --- > drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c > b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c > index ec399b7..2d91975 100644 > --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c > +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c > @@ -1388,7 +1388,7 @@ static int qlcnic_83xx_copy_fw_file(struct > qlcnic_adapter *adapter) > addr = (u64)dest; > > ret = qlcnic_83xx_ms_mem_write128(adapter, addr, > - (u32 *)p_cache, size / 16); > + p_cache, size / 16); > if (ret) { > dev_err(>pdev->dev, "MS memory write > failed\n"); > release_firmware(fw); > -- > 1.8.1.2.459.gbcd45b4.dirty -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH net-next 4/7] qlcnic: Remove casts of pointer to same type
-Original Message- From: Joe Perches [mailto:j...@perches.com] Sent: Tuesday, March 25, 2014 1:46 AM To: netdev Cc: Shahed Shaikh; Dept-HSG Linux NIC Dev; linux-kernel Subject: [PATCH net-next 4/7] qlcnic: Remove casts of pointer to same type Casting a pointer to a pointer of the same type is pointless, so remove these unnecessary casts. Done via coccinelle script: $ cat typecast_2.cocci @@ type T; T *foo; @@ - (T *)foo + foo Signed-off-by: Joe Perches j...@perches.com Acked-by: Shahed Shaikh shahed.sha...@qlogic.com Thanks, Shahed --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c index ec399b7..2d91975 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c @@ -1388,7 +1388,7 @@ static int qlcnic_83xx_copy_fw_file(struct qlcnic_adapter *adapter) addr = (u64)dest; ret = qlcnic_83xx_ms_mem_write128(adapter, addr, - (u32 *)p_cache, size / 16); + p_cache, size / 16); if (ret) { dev_err(adapter-pdev-dev, MS memory write failed\n); release_firmware(fw); -- 1.8.1.2.459.gbcd45b4.dirty -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH net-next 28/35] qlcnic: Use pci_enable_msix_range() instead of pci_enable_msix()
> -Original Message- > From: Alexander Gordeev [mailto:agord...@redhat.com] > Sent: Saturday, February 22, 2014 2:54 PM > To: Ben Hutchings > Cc: linux-kernel; Himanshu Madhani; Rajesh Borundia; Shahed Shaikh; Dept- > Eng Linux Driver; netdev; linux-pci > Subject: Re: [PATCH net-next 28/35] qlcnic: Use pci_enable_msix_range() > instead of pci_enable_msix() > > On Sat, Feb 22, 2014 at 12:48:47AM +, Ben Hutchings wrote: > > Sorry, I'm confused and this does work. But I wonder whether it is > > really an improvement over using the old API. > > Slightly, as far as I am concerned - we just exchange tri-state oddity to re- > enable MSI-X oddity. We're not going to improve drivers that can not work > with any number of MSI-Xs from a range, like this one. I will send a patch which will make use of available MSI-X number and remove the retry logic. Thanks, Shahed -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH net-next 28/35] qlcnic: Use pci_enable_msix_range() instead of pci_enable_msix()
-Original Message- From: Alexander Gordeev [mailto:agord...@redhat.com] Sent: Saturday, February 22, 2014 2:54 PM To: Ben Hutchings Cc: linux-kernel; Himanshu Madhani; Rajesh Borundia; Shahed Shaikh; Dept- Eng Linux Driver; netdev; linux-pci Subject: Re: [PATCH net-next 28/35] qlcnic: Use pci_enable_msix_range() instead of pci_enable_msix() On Sat, Feb 22, 2014 at 12:48:47AM +, Ben Hutchings wrote: Sorry, I'm confused and this does work. But I wonder whether it is really an improvement over using the old API. Slightly, as far as I am concerned - we just exchange tri-state oddity to re- enable MSI-X oddity. We're not going to improve drivers that can not work with any number of MSI-Xs from a range, like this one. I will send a patch which will make use of available MSI-X number and remove the retry logic. Thanks, Shahed -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH -next] qlcnic: fix compiler warning
Adding netdev. > -Original Message- > From: Martin Kaiser,,, [mailto:mar...@reykholt.kaiser.cx] On Behalf Of > Martin Kaiser > Sent: Thursday, January 09, 2014 9:29 PM > To: Himanshu Madhani; Rajesh Borundia > Cc: linux-kernel; triv...@kernel.org > Subject: [PATCH -next] qlcnic: fix compiler warning > > Add an explicit cast to fix the following warning (seen on Debian Wheezy, gcc > 4.7.2) > > CC [M] drivers/net/wireless/rtlwifi/rtl8192ce/trx.o > drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c: In function > ‘qlcnic_send_filter’: > drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:349:3: warning: > passing argument 2 of ‘ether_addr_equal’ from incompatible pointer type > [enabled by default] > In file included from include/linux/if_vlan.h:16:0, > from drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:9: > include/linux/etherdevice.h:244:20: note: expected ‘const u8 *’ but > argument is of type ‘u64 *’ > If I am not wrong, this patch should go to David's net-next tree. > Signed-off-by: Martin Kaiser Acked-by: Shahed Shaikh Thanks, Shahed > --- > drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c > b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c > index 6373f60..3557154 100644 > --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c > +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c > @@ -346,7 +346,7 @@ static void qlcnic_send_filter(struct qlcnic_adapter > *adapter, > head = &(adapter->fhash.fhead[hindex]); > > hlist_for_each_entry_safe(tmp_fil, n, head, fnode) { > - if (ether_addr_equal(tmp_fil->faddr, _addr) && > + if (ether_addr_equal(tmp_fil->faddr, (const u8 *)_addr) > && > tmp_fil->vlan_id == vlan_id) { > if (jiffies > (QLCNIC_READD_AGE * HZ + tmp_fil- > >ftime)) > qlcnic_change_filter(adapter, _addr, > -- > 1.7.10.4
RE: [PATCH -next] qlcnic: fix compiler warning
Adding netdev. -Original Message- From: Martin Kaiser,,, [mailto:mar...@reykholt.kaiser.cx] On Behalf Of Martin Kaiser Sent: Thursday, January 09, 2014 9:29 PM To: Himanshu Madhani; Rajesh Borundia Cc: linux-kernel; triv...@kernel.org Subject: [PATCH -next] qlcnic: fix compiler warning Add an explicit cast to fix the following warning (seen on Debian Wheezy, gcc 4.7.2) CC [M] drivers/net/wireless/rtlwifi/rtl8192ce/trx.o drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c: In function ‘qlcnic_send_filter’: drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:349:3: warning: passing argument 2 of ‘ether_addr_equal’ from incompatible pointer type [enabled by default] In file included from include/linux/if_vlan.h:16:0, from drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:9: include/linux/etherdevice.h:244:20: note: expected ‘const u8 *’ but argument is of type ‘u64 *’ If I am not wrong, this patch should go to David's net-next tree. Signed-off-by: Martin Kaiser mar...@kaiser.cx Acked-by: Shahed Shaikh shahed.sha...@qlogic.com Thanks, Shahed --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c index 6373f60..3557154 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c @@ -346,7 +346,7 @@ static void qlcnic_send_filter(struct qlcnic_adapter *adapter, head = (adapter-fhash.fhead[hindex]); hlist_for_each_entry_safe(tmp_fil, n, head, fnode) { - if (ether_addr_equal(tmp_fil-faddr, src_addr) + if (ether_addr_equal(tmp_fil-faddr, (const u8 *)src_addr) tmp_fil-vlan_id == vlan_id) { if (jiffies (QLCNIC_READD_AGE * HZ + tmp_fil- ftime)) qlcnic_change_filter(adapter, src_addr, -- 1.7.10.4
RE: [PATCH v3 2/8] drivers: net: Mark functions as static in qlcnic_83xx_hw.c
> -Original Message- > From: Rashika Kheria [mailto:rashika.khe...@gmail.com] > Sent: Thursday, December 19, 2013 2:18 PM > To: linux-kernel; Himanshu Madhani; Rajesh Borundia; Shahed Shaikh; > Jitendra Kalsaria; Sony Chacko; Sucheta Chakraborty; Dept-Eng Linux Driver; > netdev; j...@joshtriplett.org > Subject: [PATCH v3 2/8] drivers: net: Mark functions as static in > qlcnic_83xx_hw.c > > This patch marks the function qlcnic_83xx_clear_legacy_intr_mask(), > qlcnic_83xx_set_legacy_intr_mask() and > qlcnic_83xx_enable_legacy_msix_mbx_intr() in qlcnic_83xx_hw.c as static > because they are not used outside this file. > > Thus, it also removes the following warnings in > ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c: > > drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:318:13: warning: no > previous prototype for ‘qlcnic_83xx_clear_legacy_intr_mask’ [-Wmissing- > prototypes] > drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:323:13: warning: no > previous prototype for ‘qlcnic_83xx_set_legacy_intr_mask’ [-Wmissing- > prototypes] > drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:343:13: warning: no > previous prototype for ‘qlcnic_83xx_enable_legacy_msix_mbx_intr’ [- > Wmissing-prototypes] > > Signed-off-by: Rashika Kheria > Reviewed-by: Josh Triplett Acked-by: Shahed Shaikh Thanks, Shahed N�r��yb�X��ǧv�^�){.n�+{zX����ܨ}���Ơz�:+v���zZ+��+zf���h���~i���z��w���?�&�)ߢf��^jǫy�m��@A�a��� 0��h���i
RE: [PATCH v3 1/8] drivers: net: Mark functions as static in qlcnic_io.c
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev- > ow...@vger.kernel.org] On Behalf Of Rashika Kheria > Sent: Thursday, December 19, 2013 2:17 PM > To: linux-kernel; Himanshu Madhani; Rajesh Borundia; Shahed Shaikh; > Jitendra Kalsaria; Sony Chacko; Sucheta Chakraborty; Dept-Eng Linux Driver; > netdev; j...@joshtriplett.org > Subject: [PATCH v3 1/8] drivers: net: Mark functions as static in qlcnic_io.c > > This patch marks the function qlcnic_enable_tx_intr(), > qlcnic_83xx_enable_tx_intr() and qlcnic_83xx_disable_tx_intr() in qlcnic_io.c > as static because they are not used outside this file. > > Thus, it also removes the following warnings in > ethernet/qlogic/qlcnic/qlcnic_io.c: > > drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:130:13: warning: no previous > prototype for ‘qlcnic_enable_tx_intr’ [-Wmissing-prototypes] > drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:147:13: warning: no previous > prototype for ‘qlcnic_83xx_enable_tx_intr’ [-Wmissing-prototypes] > drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:153:13: warning: no previous > prototype for ‘qlcnic_83xx_disable_tx_intr’ [-Wmissing-prototypes] > > Signed-off-by: Rashika Kheria > Reviewed-by: Josh Triplett Acked-by: Shahed Shaikh Thanks, Shahed N�r��yb�X��ǧv�^�){.n�+{zX����ܨ}���Ơz�:+v���zZ+��+zf���h���~i���z��w���?�&�)ߢf��^jǫy�m��@A�a��� 0��h���i
RE: [PATCH v3 1/8] drivers: net: Mark functions as static in qlcnic_io.c
-Original Message- From: netdev-ow...@vger.kernel.org [mailto:netdev- ow...@vger.kernel.org] On Behalf Of Rashika Kheria Sent: Thursday, December 19, 2013 2:17 PM To: linux-kernel; Himanshu Madhani; Rajesh Borundia; Shahed Shaikh; Jitendra Kalsaria; Sony Chacko; Sucheta Chakraborty; Dept-Eng Linux Driver; netdev; j...@joshtriplett.org Subject: [PATCH v3 1/8] drivers: net: Mark functions as static in qlcnic_io.c This patch marks the function qlcnic_enable_tx_intr(), qlcnic_83xx_enable_tx_intr() and qlcnic_83xx_disable_tx_intr() in qlcnic_io.c as static because they are not used outside this file. Thus, it also removes the following warnings in ethernet/qlogic/qlcnic/qlcnic_io.c: drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:130:13: warning: no previous prototype for ‘qlcnic_enable_tx_intr’ [-Wmissing-prototypes] drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:147:13: warning: no previous prototype for ‘qlcnic_83xx_enable_tx_intr’ [-Wmissing-prototypes] drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:153:13: warning: no previous prototype for ‘qlcnic_83xx_disable_tx_intr’ [-Wmissing-prototypes] Signed-off-by: Rashika Kheria rashika.khe...@gmail.com Reviewed-by: Josh Triplett j...@joshtriplett.org Acked-by: Shahed Shaikh shahed.sha...@qlogic.com Thanks, Shahed N�r��yb�X��ǧv�^�){.n�+{zX����ܨ}���Ơz�j:+v���zZ+��+zf���h���~i���z��w���?��)ߢf��^jǫy�m��@A�a��� 0��h���i
RE: [PATCH v3 2/8] drivers: net: Mark functions as static in qlcnic_83xx_hw.c
-Original Message- From: Rashika Kheria [mailto:rashika.khe...@gmail.com] Sent: Thursday, December 19, 2013 2:18 PM To: linux-kernel; Himanshu Madhani; Rajesh Borundia; Shahed Shaikh; Jitendra Kalsaria; Sony Chacko; Sucheta Chakraborty; Dept-Eng Linux Driver; netdev; j...@joshtriplett.org Subject: [PATCH v3 2/8] drivers: net: Mark functions as static in qlcnic_83xx_hw.c This patch marks the function qlcnic_83xx_clear_legacy_intr_mask(), qlcnic_83xx_set_legacy_intr_mask() and qlcnic_83xx_enable_legacy_msix_mbx_intr() in qlcnic_83xx_hw.c as static because they are not used outside this file. Thus, it also removes the following warnings in ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c: drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:318:13: warning: no previous prototype for ‘qlcnic_83xx_clear_legacy_intr_mask’ [-Wmissing- prototypes] drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:323:13: warning: no previous prototype for ‘qlcnic_83xx_set_legacy_intr_mask’ [-Wmissing- prototypes] drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:343:13: warning: no previous prototype for ‘qlcnic_83xx_enable_legacy_msix_mbx_intr’ [- Wmissing-prototypes] Signed-off-by: Rashika Kheria rashika.khe...@gmail.com Reviewed-by: Josh Triplett j...@joshtriplett.org Acked-by: Shahed Shaikh shahed.sha...@qlogic.com Thanks, Shahed N�r��yb�X��ǧv�^�){.n�+{zX����ܨ}���Ơz�j:+v���zZ+��+zf���h���~i���z��w���?��)ߢf��^jǫy�m��@A�a��� 0��h���i