RDMA/cxgb4,cxgb4vf,cxgb4i,csiostor: Cleanup macros
Subsystems (9)
v3 cover RDMA/cxgb4,cxgb4vf,cxgb4i,csiostor: Cleanup macros
Hi,
This series moves the debugfs code to a new file debugfs.c and cleans up macros/register defines.
Various patches have ended up changing the style of the symbolic macros/register defines and some of them used the macros/register defines that matches the output of the script from the hardware team.
As a result, the current kernel.org files are a mix of different macro styles. Since this macro/register defines is used by five different drivers, a few patch series have ended up adding duplicate macro/register define entries with different styles. This makes these register define/macro files a complete mess and we want to make them clean and consistent.
Will post few more series so that we can cover all the macros so that they all follow the same style to be consistent.
The patches series is created against 'net-next' tree.
And includes patches on cxgb4, cxgb4vf, iw_cxgb4, csiostor and cxgb4i driver.
We have included all the maintainers of respective drivers. Kindly review the change and let us know in case of any review comments.
Thanks
V3: Use suffix instead of prefix for macros/register defines
V2: Changes the description and cover-letter content to answer David Miller's question
Hariprasad Shenai (3):
cxgb4: Add cxgb4_debugfs.c, move all debugfs code to new file
cxgb4: Cleanup macros so they follow the same style and look
consistent
cxgb4: Cleanup macros so they follow the same style and look
consistent, part 2
drivers/infiniband/hw/cxgb4/cm.c | 56 +++--- drivers/infiniband/hw/cxgb4/cq.c | 8 +- drivers/infiniband/hw/cxgb4/mem.c | 14 +- drivers/infiniband/hw/cxgb4/qp.c | 26 ++-- drivers/net/ethernet/chelsio/cxgb4/Makefile | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 3 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.h | 6 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 158 ++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.h | 52 ++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 173 +++++--------------- drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 15 +- drivers/net/ethernet/chelsio/cxgb4/sge.c | 32 ++-- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 127 +++++++------- drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 72 +++++++-- drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 142 ++++++++++++---- drivers/net/ethernet/chelsio/cxgb4vf/sge.c | 32 ++-- drivers/net/ethernet/chelsio/cxgb4vf/t4vf_common.h | 2 +- drivers/net/ethernet/chelsio/cxgb4vf/t4vf_hw.c | 150 +++++++++--------- drivers/scsi/csiostor/csio_attr.c | 8 +- drivers/scsi/csiostor/csio_hw.c | 14 +- drivers/scsi/csiostor/csio_hw_t4.c | 15 +- drivers/scsi/csiostor/csio_hw_t5.c | 21 ++- drivers/scsi/csiostor/csio_init.c | 6 +- drivers/scsi/csiostor/csio_lnode.c | 18 +- drivers/scsi/csiostor/csio_mb.c | 172 ++++++++++---------- drivers/scsi/csiostor/csio_scsi.c | 24 ++-- drivers/scsi/csiostor/csio_wr.h | 2 +- drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 35 ++-- 28 files changed, 816 insertions(+), 568 deletions(-) create mode 100644 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c create mode 100644 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.h
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v3 1/3 cxgb4: Add cxgb4_debugfs.c, move all debugfs code to new file
--- drivers/net/ethernet/chelsio/cxgb4/Makefile | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 158 ++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.h | 52 +++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 97 +------------ 5 files changed, 217 insertions(+), 92 deletions(-) create mode 100644 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c create mode 100644 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.h
drivers/net/ethernet/chelsio/cxgb4/Makefile +1 -0
@@ -6,3 +6,4 @@ obj-$(CONFIG_CHELSIO_T4) += cxgb4.o cxgb4-objs := cxgb4_main.o l2t.o t4_hw.o sge.o cxgb4-$(CONFIG_CHELSIO_T4_DCB) += cxgb4_dcb.o +cxgb4-$(CONFIG_DEBUG_FS) += cxgb4_debugfs.o
drivers/net/ethernet/chelsio/cxgb4/cxgb4.h +1 -0
@@ -1085,4 +1085,5 @@ void t4_db_dropped(struct adapter *adapter);int t4_fwaddrspace_write (struct adapter *adap,unsigned int mbox,u32 addr,u32 val);void t4_sge_decode_idma_state (struct adapter *adapter,int state); +void t4_free_mem (void *addr);#endif /* __CXGB4_H__ */
drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c new file +158 -0
158 lines not on this page · raw message
drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.h new file +52 -0
52 lines not on this page · raw message
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +5 -92
120 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 1/1 cxgb4: Remove unnecessary struct in6_addr * casts
Just use the address of the in6_addr.
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
Quoted 1 line
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +0
-0
[]
Quoted 1 line
#include <
../drivers/net/bonding/bonding.h>
This include path seems unfortunate so I looked at the code a bit. I don't see an easy way to change it.
Maybe some of bonding.h should be moved into a new file like 'include/net/bonding.h' or something.
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +3 -6
@@ -4395,8 +4395,7 @@ static int clip_add(struct net_device *event_dev, struct inet6_ifaddr *ifa,if (cxgb4_netdev (event_dev)) {switch (event) {case NETDEV_UP : - ret =cxgb4_clip_get (event_dev, - (const struct in6_addr *)ifa->addr.s6_addr); + ret =cxgb4_clip_get (event_dev, &ifa->addr);if (ret <0 ) {rcu_read_unlock ();return ret;
@@ -4404,8 +4403,7 @@ static int clip_add(struct net_device *event_dev, struct inet6_ifaddr *ifa, ret =NOTIFY_OK ;break ;case NETDEV_DOWN : -cxgb4_clip_release (event_dev, - (const struct in6_addr *)ifa->addr.s6_addr); +cxgb4_clip_release (event_dev, &ifa->addr); ret =NOTIFY_OK ;break ;default :
@@ -4474,8 +4472,7 @@ static int update_dev_clip(struct net_device *root_dev, struct net_device *dev)read_lock_bh (&idev->lock);list_for_each_entry (ifa, &idev->addr_list, if_list) { - ret =cxgb4_clip_get (dev, - (const struct in6_addr *)ifa->addr.s6_addr); + ret =cxgb4_clip_get (dev, &ifa->addr);if (ret <0 )break ; }
Re: [PATCH net-next] cxgb4: Remove unnecessary struct in6_addr * casts
From: Joe Perches <[email protected]>
Date: Thu, 06 Nov 2014 20:46:14 -0800
Quoted 3 lines
Just use the address of the
in6_addr.Signed-off-by Joe Perches <[email protected]>
Applied, thanks.
Quoted 10 lines
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
Quoted 1 line
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +0
-0[]
Quoted 1 line
#include <
../drivers/net/bonding/bonding.h>This include path seems unfortunate so I looked at the code a bit. I don't see an easy way to change it.
Maybe some of
bonding.hshould be moved into a new file like 'include/net/bonding.h' or something.
I just committed the following into net-next, thanks for pointing this out.
====================
[PATCH] net: Move bonding headers under include/net
This ways drivers like cxgb4 don't need to do ugly relative includes.
--- drivers/net/bonding/bond_3ad.c | 4 +- drivers/net/bonding/bond_3ad.h | 283 ---------- drivers/net/bonding/bond_alb.c | 4 +- drivers/net/bonding/bond_alb.h | 181 ------- drivers/net/bonding/bond_debugfs.c | 4 +- drivers/net/bonding/bond_main.c | 6 +- drivers/net/bonding/bond_netlink.c | 2 +- drivers/net/bonding/bond_options.c | 2 +- drivers/net/bonding/bond_options.h | 130 ----- drivers/net/bonding/bond_procfs.c | 2 +- drivers/net/bonding/bond_sysfs.c | 2 +- drivers/net/bonding/bond_sysfs_slave.c | 2 +- drivers/net/bonding/bonding.h | 654 ------------------------ drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 3 +- include/net/bond_3ad.h | 283 ++++++++++ include/net/bond_alb.h | 181 +++++++ include/net/bond_options.h | 130 +++++ include/net/bonding.h | 654 ++++++++++++++++++++++++ 18 files changed, 1263 insertions(+), 1264 deletions(-) delete mode 100644 drivers/net/bonding/bond_3ad.h delete mode 100644 drivers/net/bonding/bond_alb.h delete mode 100644 drivers/net/bonding/bond_options.h delete mode 100644 drivers/net/bonding/bonding.h create mode 100644 include/net/bond_3ad.h create mode 100644 include/net/bond_alb.h create mode 100644 include/net/bond_options.h create mode 100644 include/net/bonding.h
drivers/net/bonding/bond_3ad.c +2 -2
@@ -29,8 +29,8 @@#include <linux/if_bonding.h> #include <linux/pkt_sched.h> #include <net/net_namespace.h> -#include "bonding.h" -#include "bond_3ad.h" +#include <net/bonding.h> +#include <net/bond_3ad.h> /* General definitions */ #define AD_SHORT_TIMEOUT 1
drivers/net/bonding/bond_3ad.h deleted +0 -283
283 lines not on this page · raw message
drivers/net/bonding/bond_alb.c +2 -2
@@ -37,8 +37,8 @@#include <net/arp.h> #include <net/ipv6.h> #include <asm/byteorder.h> -#include "bonding.h" -#include "bond_alb.h" +#include <net/bonding.h> +#include <net/bond_alb.h>
drivers/net/bonding/bond_alb.h deleted +0 -181
181 lines not on this page · raw message
drivers/net/bonding/bond_debugfs.c +2 -2
@@ -3,8 +3,8 @@#include <linux/device.h> #include <linux/netdevice.h> -#include "bonding.h" -#include "bond_alb.h" +#include <net/bonding.h> +#include <net/bond_alb.h> #if defined(CONFIG_DEBUG_FS ) && !defined(CONFIG_NET_NS )
drivers/net/bonding/bond_main.c +3 -3
@@ -77,9 +77,9 @@#include <net/pkt_sched.h> #include <linux/rculist.h> #include <net/flow_keys.h> -#include "bonding.h" -#include "bond_3ad.h" -#include "bond_alb.h" +#include <net/bonding.h> +#include <net/bond_3ad.h> +#include <net/bond_alb.h> /*---------------------------- Module parameters ----------------------------*/
drivers/net/bonding/bond_netlink.c +1 -1
@@ -17,7 +17,7 @@#include <linux/if_ether.h> #include <net/netlink.h> #include <net/rtnetlink.h> -#include "bonding.h" +#include <net/bonding.h> static size_t bond_get_slave_size (const struct net_device *bond_dev,const struct net_device *slave_dev)
drivers/net/bonding/bond_options.c +1 -1
@@ -16,7 +16,7 @@#include <linux/rcupdate.h> #include <linux/ctype.h> #include <linux/inet.h> -#include "bonding.h" +#include <net/bonding.h> static int bond_option_active_slave_set (struct bonding *bond,const struct bond_opt_value *newval);
drivers/net/bonding/bond_options.h deleted +0 -130
130 lines not on this page · raw message
drivers/net/bonding/bond_procfs.c +1 -1
@@ -2,7 +2,7 @@#include <linux/export.h> #include <net/net_namespace.h> #include <net/netns/generic.h> -#include "bonding.h" +#include <net/bonding.h> static void *bond_info_seq_start (struct seq_file *seq,loff_t *pos)
drivers/net/bonding/bond_sysfs.c +1 -1
@@ -40,7 +40,7 @@#include <net/netns/generic.h> #include <linux/nsproxy.h> -#include "bonding.h" +#include <net/bonding.h> #define to_dev (obj) container_of(obj, struct device, kobj)#define to_bond (cd) ((struct bonding *)(netdev_priv(to_net_dev(cd))))
drivers/net/bonding/bond_sysfs_slave.c +1 -1
@@ -12,7 +12,7 @@#include <linux/kernel.h> #include <linux/netdevice.h> -#include "bonding.h" +#include <net/bonding.h> struct slave_attribute {struct attribute attr;
drivers/net/bonding/bonding.h deleted +0 -654
654 lines not on this page · raw message
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +1 -2
@@ -61,6 +61,7 @@#include <net/neighbour.h> #include <net/netevent.h> #include <net/addrconf.h> +#include <net/bonding.h> #include <asm/uaccess.h> #include "cxgb4.h"
@@ -71,8 +72,6 @@#include "cxgb4_debugfs.h" #include "l2t.h" -#include <../drivers/net/bonding/bonding.h> -#ifdef DRV_VERSION #undef DRV_VERSION#endif
include/net/bond_3ad.h new file +283 -0
283 lines not on this page · raw message
include/net/bond_alb.h new file +181 -0
181 lines not on this page · raw message
include/net/bond_options.h new file +130 -0
130 lines not on this page · raw message
include/net/bonding.h new file +654 -0
654 lines not on this page · raw message
Signature · 1 line
1.9.3
Re: [PATCH net-next] cxgb4: Remove unnecessary struct in6_addr * casts
Quoted 1 line · David Miller
From: Joe Perches <[email protected]> Date: Thu, 06 Nov 2014 20:46:14 -0800
[]
Quoted 4 lines
Quoted 4 lines
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
Quoted 1 line
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +0
-0[]
Quoted 1 line
#include <
../drivers/net/bonding/bonding.h>
Quoted 8 lines
Quoted 5 lines
This include path seems unfortunate so I looked at the code a bit. I don't see an easy way to change it.
Maybe some of
bonding.hshould be moved into a new file like 'include/net/bonding.h' or something.I just committed the following into net-next, thanks for pointing this out.
Thanks.
btw: using "git format-patch -M" makes reading and verifying the patch a lot easier.
Unfortunately, there's no current way to make this a global default for everyone, but I have this in my ~/.gitconfig:
[diff]
renames = true
David Miller
maintainerRe: [PATCH net-next] cxgb4: Remove unnecessary struct in6_addr * casts
From: Joe Perches <[email protected]>
Date: Mon, 10 Nov 2014 10:48:18 -0800
Quoted 6 lines
btw: using "git format-patch -M" makes reading and verifying the patch a lot easier.
Unfortunately, there's no current way to make this a global default for everyone, but I have this in my ~/.gitconfig:
None of those moves were pure moves, I adjusted the top-level cpp guard names in every file plus there were some path changes in net/bonding.h as well.
Re: [PATCH net-next] cxgb4: Remove unnecessary struct in6_addr * casts
Quoted 9 lines · David Miller
From: Joe Perches <[email protected]>
Date: Mon, 10 Nov 2014 10:48:18 -0800Quoted 6 lines
btw: using "git format-patch -M" makes reading and verifying the patch a lot easier.
Unfortunately, there's no current way to make this a global default for everyone, but I have this in my ~/.gitconfig:
[diff] renames = true
Quoted 3 lines
None of those moves were pure moves, I adjusted the top-level cpp guard names in every file plus there were some path changes in
net/bonding.has well.
Hey again.
That doesn't really matter much as git's pretty smart about renames with simultaneous changes.
The resultant emailed patch would have been 9k vs 86k.
fyi: Here's your patch with -M (or just using that .gitconfig entry)
(btw: thanks Junio)
---
Quoted 1 line
From
1ef8019be8799c39f316a772ffdd705c46029752Mon Sep 17 00:00:00 2001
Message-Id: <1ef8019be8799c39f316a772ffdd705c46029752.1415646835.git.joe@perches.com>
From: "David S. Miller" <[email protected]>
Date: Mon, 10 Nov 2014 13:27:49 -0500
Subject: [PATCH] net: Move bonding headers under include/net
This ways drivers like cxgb4 don't need to do ugly relative includes.
---
drivers/net/bonding/bond_3ad.c | 4 ++--
drivers/net/bonding/bond_alb.c | 4 ++--
drivers/net/bonding/bond_debugfs.c | 4 ++--
drivers/net/bonding/bond_main.c | 6 +++---
drivers/net/bonding/bond_netlink.c | 2 +-
drivers/net/bonding/bond_options.c | 2 +-
drivers/net/bonding/bond_procfs.c | 2 +-
drivers/net/bonding/bond_sysfs.c | 2 +-
drivers/net/bonding/bond_sysfs_slave.c | 2 +-
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 3 +--
{drivers/net/bonding => include/net}/bond_3ad.h | 6 +++---
{drivers/net/bonding => include/net}/bond_alb.h | 6 +++---
{drivers/net/bonding => include/net}/bond_options.h | 6 +++---
{drivers/net/bonding => include/net}/bonding.h | 12 ++++++------
14 files changed, 30 insertions(+), 31 deletions(-)
rename {drivers/net/bonding => include/net}/bond_3ad.h (99%)
rename {drivers/net/bonding => include/net}/bond_alb.h (98%)
rename {drivers/net/bonding => include/net}/bond_options.h (97%)
rename {drivers/net/bonding => include/net}/bonding.h (99%)drivers/net/bonding/bond_3ad.c +2 -2
@@ -29,8 +29,8 @@#include <linux/if_bonding.h> #include <linux/pkt_sched.h> #include <net/net_namespace.h> -#include "bonding.h" -#include "bond_3ad.h" +#include <net/bonding.h> +#include <net/bond_3ad.h> /* General definitions */ #define AD_SHORT_TIMEOUT 1
drivers/net/bonding/bond_alb.c +2 -2
@@ -37,8 +37,8 @@#include <net/arp.h> #include <net/ipv6.h> #include <asm/byteorder.h> -#include "bonding.h" -#include "bond_alb.h" +#include <net/bonding.h> +#include <net/bond_alb.h>
drivers/net/bonding/bond_debugfs.c +2 -2
@@ -3,8 +3,8 @@#include <linux/device.h> #include <linux/netdevice.h> -#include "bonding.h" -#include "bond_alb.h" +#include <net/bonding.h> +#include <net/bond_alb.h> #if defined(CONFIG_DEBUG_FS ) && !defined(CONFIG_NET_NS )
drivers/net/bonding/bond_main.c +3 -3
@@ -77,9 +77,9 @@#include <net/pkt_sched.h> #include <linux/rculist.h> #include <net/flow_keys.h> -#include "bonding.h" -#include "bond_3ad.h" -#include "bond_alb.h" +#include <net/bonding.h> +#include <net/bond_3ad.h> +#include <net/bond_alb.h> /*---------------------------- Module parameters ----------------------------*/
drivers/net/bonding/bond_netlink.c +1 -1
@@ -17,7 +17,7 @@#include <linux/if_ether.h> #include <net/netlink.h> #include <net/rtnetlink.h> -#include "bonding.h" +#include <net/bonding.h> static size_t bond_get_slave_size (const struct net_device *bond_dev,const struct net_device *slave_dev)
drivers/net/bonding/bond_options.c +1 -1
@@ -16,7 +16,7 @@#include <linux/rcupdate.h> #include <linux/ctype.h> #include <linux/inet.h> -#include "bonding.h" +#include <net/bonding.h> static int bond_option_active_slave_set (struct bonding *bond,const struct bond_opt_value *newval);
drivers/net/bonding/bond_procfs.c +1 -1
@@ -2,7 +2,7 @@#include <linux/export.h> #include <net/net_namespace.h> #include <net/netns/generic.h> -#include "bonding.h" +#include <net/bonding.h> static void *bond_info_seq_start (struct seq_file *seq,loff_t *pos)
drivers/net/bonding/bond_sysfs.c +1 -1
@@ -40,7 +40,7 @@#include <net/netns/generic.h> #include <linux/nsproxy.h> -#include "bonding.h" +#include <net/bonding.h> #define to_dev (obj) container_of(obj, struct device, kobj)#define to_bond (cd) ((struct bonding *)(netdev_priv(to_net_dev(cd))))
drivers/net/bonding/bond_sysfs_slave.c +1 -1
@@ -12,7 +12,7 @@#include <linux/kernel.h> #include <linux/netdevice.h> -#include "bonding.h" +#include <net/bonding.h> struct slave_attribute {struct attribute attr;
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +1 -2
@@ -61,6 +61,7 @@#include <net/neighbour.h> #include <net/netevent.h> #include <net/addrconf.h> +#include <net/bonding.h> #include <asm/uaccess.h> #include "cxgb4.h"
@@ -71,8 +72,6 @@#include "cxgb4_debugfs.h" #include "l2t.h" -#include <../drivers/net/bonding/bonding.h> -#ifdef DRV_VERSION #undef DRV_VERSION#endif
include/net/bond_3ad.h renamed from drivers/net/bonding/bond_3ad.h +3 -3
@@ -20,8 +20,8 @@* */ -#ifndef __BOND_3AD_H__ -#define __BOND_3AD_H__ +#ifndef _NET_BOND_3AD_H +#define _NET_BOND_3AD_H#include <asm/byteorder.h> #include <linux/skbuff.h>
@@ -279,5 +279,5 @@ int bond_3ad_lacpdu_recv(const struct sk_buff *skb, struct bonding *bond, struct slave *slave);int bond_3ad_set_carrier (struct bonding *bond);void bond_3ad_update_lacp_rate (struct bonding *bond); -#endif /* __BOND_3AD_H__ */ +#endif /* _NET_BOND_3AD_H */
include/net/bond_alb.h renamed from drivers/net/bonding/bond_alb.h +3 -3
@@ -19,8 +19,8 @@* */ -#ifndef __BOND_ALB_H__ -#define __BOND_ALB_H__ +#ifndef _NET_BOND_ALB_H +#define _NET_BOND_ALB_H#include <linux/if_ether.h>
@@ -177,5 +177,5 @@ int bond_tlb_xmit(struct sk_buff *skb, struct net_device *bond_dev);void bond_alb_monitor (struct work_struct *);int bond_alb_set_mac_address (struct net_device *bond_dev,void *addr);void bond_alb_clear_vlan (struct bonding *bond,unsigned short vlan_id); -#endif /* __BOND_ALB_H__ */ +#endif /* _NET_BOND_ALB_H */
include/net/bond_options.h renamed from drivers/net/bonding/bond_options.h +3 -3
@@ -8,8 +8,8 @@* (at your option) any later version. */ -#ifndef _BOND_OPTIONS_H -#define _BOND_OPTIONS_H +#ifndef _NET_BOND_OPTIONS_H +#define _NET_BOND_OPTIONS_H#define BOND_OPT_MAX_NAMELEN 32#define BOND_OPT_VALID (opt) ((opt) < BOND_OPT_LAST)
@@ -127,4 +127,4 @@ static inline void __bond_opt_init(struct bond_opt_value *optval,void bond_option_arp_ip_targets_clear (struct bonding *bond); -#endif /* _BOND_OPTIONS_H */ +#endif /* _NET_BOND_OPTIONS_H */
include/net/bonding.h renamed from drivers/net/bonding/bonding.h +6 -6
@@ -12,8 +12,8 @@* */ -#ifndef _LINUX_BONDING_H -#define _LINUX_BONDING_H +#ifndef _NET_BONDING_H +#define _NET_BONDING_H#include <linux/timer.h> #include <linux/proc_fs.h>
@@ -26,9 +26,9 @@#include <linux/reciprocal_div.h> #include <linux/if_link.h> -#include "bond_3ad.h" -#include "bond_alb.h" -#include "bond_options.h" +#include <net/bond_3ad.h> +#include <net/bond_alb.h> +#include <net/bond_options.h> #define DRV_VERSION "3.7.1"#define DRV_RELDATE "April 27, 2011"
@@ -651,4 +651,4 @@ static inline void bond_tx_drop(struct net_device *dev, struct sk_buff *skb) dev_kfree_skb_any(skb); } -#endif /* _LINUX_BONDING_H */ +#endif /* _NET_BONDING_H */
Signature · 1 line
2.1.2
PATCH v3 2/3 cxgb4: Cleanup macros so they follow the same style and look consistent
In reply to Hariprasad ShenaiVarious patches have ended up changing the style of the symbolic macros/register to different style.
As a result, the current kernel.org files are a mix of different macro styles. Since this macro/register defines is used by different drivers a few patch series have ended up adding duplicate macro/register define entries with different styles. This makes these register define/macro files a complete mess and we want to make them clean and consistent. This patch cleans up a part of it.
--- drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 32 +++++----- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 16 +++-- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 6 +- drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 72 +++++++++++++++----- drivers/scsi/csiostor/csio_hw_t4.c | 15 ++-- drivers/scsi/csiostor/csio_hw_t5.c | 21 +++--- drivers/scsi/csiostor/csio_init.c | 6 +- 7 files changed, 106 insertions(+), 62 deletions(-)
drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c +16 -16
@@ -128,30 +128,30 @@ int t4_setup_debugfs(struct adapter *adap) t4_debugfs_files, ARRAY_SIZE(t4_debugfs_files)); - i =t4_read_reg (adap,MA_TARGET_MEM_ENABLE ); -if (i &EDRAM0_ENABLE ) { - size =t4_read_reg (adap,MA_EDRAM0_BAR ); -add_debugfs_mem (adap,"edc0" ,MEM_EDC0 ,EDRAM_SIZE_GET (size)); + i =t4_read_reg (adap,MA_TARGET_MEM_ENABLE_A ); +if (i &EDRAM0_ENABLE_F ) { + size =t4_read_reg (adap,MA_EDRAM0_BAR_A ); +add_debugfs_mem (adap,"edc0" ,MEM_EDC0 ,EDRAM0_SIZE_G (size)); } -if (i &EDRAM1_ENABLE ) { - size =t4_read_reg (adap,MA_EDRAM1_BAR ); -add_debugfs_mem (adap,"edc1" ,MEM_EDC1 ,EDRAM_SIZE_GET (size)); +if (i &EDRAM1_ENABLE_F ) { + size =t4_read_reg (adap,MA_EDRAM1_BAR_A ); +add_debugfs_mem (adap,"edc1" ,MEM_EDC1 ,EDRAM1_SIZE_G (size)); }if (is_t4 (adap->params.chip)) { - size =t4_read_reg (adap,MA_EXT_MEMORY_BAR ); -if (i &EXT_MEM_ENABLE ) + size =t4_read_reg (adap,MA_EXT_MEMORY_BAR_A ); +if (i &EXT_MEM_ENABLE_F )add_debugfs_mem (adap,"mc" ,MEM_MC , -EXT_MEM_SIZE_GET (size)); +EXT_MEM_SIZE_G (size)); }else { -if (i &EXT_MEM_ENABLE ) { - size =t4_read_reg (adap,MA_EXT_MEMORY_BAR ); +if (i &EXT_MEM0_ENABLE_F ) { + size =t4_read_reg (adap,MA_EXT_MEMORY0_BAR_A );add_debugfs_mem (adap,"mc0" ,MEM_MC0 , -EXT_MEM_SIZE_GET (size)); +EXT_MEM0_SIZE_G (size)); } -if (i &EXT_MEM1_ENABLE ) { - size =t4_read_reg (adap,MA_EXT_MEMORY1_BAR ); +if (i &EXT_MEM1_ENABLE_F ) { + size =t4_read_reg (adap,MA_EXT_MEMORY1_BAR_A );add_debugfs_mem (adap,"mc1" ,MEM_MC1 , -EXT_MEM_SIZE_GET (size)); +EXT_MEM1_SIZE_G (size)); } }return 0 ;
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +9 -7
@@ -3802,7 +3802,7 @@ int cxgb4_read_tpte(struct net_device *dev, u32 stag, __be32 *tpte) {struct adapter *adap;u32 offset, memtype, memaddr; -u32 edc0_size, edc1_size, mc0_size, mc1_size; +u32 edc0_size, edc1_size, mc0_size, mc1_size, size;u32 edc0_end, edc1_end, mc0_end, mc1_end;int ret;
@@ -3816,9 +3816,12 @@ int cxgb4_read_tpte(struct net_device *dev, u32 stag, __be32 *tpte)* and EDC1. Some cards will have neither MC0 nor MC1, most cards have * MC0, and some have both MC0 and MC1. */ - edc0_size =EDRAM_SIZE_GET (t4_read_reg (adap,MA_EDRAM0_BAR )) <<20 ; - edc1_size =EDRAM_SIZE_GET (t4_read_reg (adap,MA_EDRAM1_BAR )) <<20 ; - mc0_size =EXT_MEM_SIZE_GET (t4_read_reg (adap,MA_EXT_MEMORY_BAR )) <<20 ; + size =t4_read_reg (adap,MA_EDRAM0_BAR_A ); + edc0_size =EDRAM0_SIZE_G (size) <<20 ; + size =t4_read_reg (adap,MA_EDRAM1_BAR_A ); + edc1_size =EDRAM1_SIZE_G (size) <<20 ; + size =t4_read_reg (adap,MA_EXT_MEMORY0_BAR_A ); + mc0_size =EXT_MEM0_SIZE_G (size) <<20 ; edc0_end = edc0_size; edc1_end = edc0_end + edc1_size;
@@ -3838,9 +3841,8 @@ int cxgb4_read_tpte(struct net_device *dev, u32 stag, __be32 *tpte)/* T4 only has a single memory channel */ goto err; }else { - mc1_size =EXT_MEM_SIZE_GET ( -t4_read_reg (adap, -MA_EXT_MEMORY1_BAR )) <<20 ; + size =t4_read_reg (adap,MA_EXT_MEMORY1_BAR_A ); + mc1_size =EXT_MEM1_SIZE_G (size) <<20 ; mc1_end = mc0_end + mc1_size;if (offset < mc1_end) { memtype =MEM_MC1 ;
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +3 -3
@@ -483,12 +483,12 @@ int t4_memory_rw(struct adapter *adap, int win, int mtype, u32 addr,* MEM_MC0 = 2 -- For T5 * MEM_MC1 = 3 -- For T5 */ - edc_size =EDRAM_SIZE_GET (t4_read_reg (adap,MA_EDRAM0_BAR )); + edc_size =EDRAM0_SIZE_G (t4_read_reg (adap,MA_EDRAM0_BAR_A ));if (mtype !=MEM_MC1 ) memoffset = (mtype * (edc_size *1024 *1024 ));else { - mc_size =EXT_MEM_SIZE_GET (t4_read_reg (adap, -MA_EXT_MEMORY_BAR )); + mc_size =EXT_MEM0_SIZE_G (t4_read_reg (adap, +MA_EXT_MEMORY1_BAR_A )); memoffset = (MEM_MC0 * edc_size + mc_size) *1024 *1024 ; }
drivers/net/ethernet/chelsio/cxgb4/t4_regs.h +56 -16
84 lines not on this page · raw message
drivers/scsi/csiostor/csio_hw_t4.c +8 -7
@@ -307,12 +307,12 @@ csio_t4_memory_rw(struct csio_hw *hw, u32 win, int mtype, u32 addr,* MEM_EDC1 = 1 * MEM_MC = 2 -- T4 */ - edc_size =EDRAM_SIZE_GET (csio_rd_reg32 (hw,MA_EDRAM0_BAR )); + edc_size =EDRAM0_SIZE_G (csio_rd_reg32 (hw,MA_EDRAM0_BAR_A ));if (mtype !=MEM_MC1 ) memoffset = (mtype * (edc_size *1024 *1024 ));else { - mc_size =EXT_MEM_SIZE_GET (csio_rd_reg32 (hw, -MA_EXT_MEMORY_BAR )); + mc_size =EXT_MEM_SIZE_G (csio_rd_reg32 (hw, +MA_EXT_MEMORY_BAR_A )); memoffset = (MEM_MC0 * edc_size + mc_size) *1024 *1024 ; }
@@ -383,11 +383,12 @@ static void csio_t4_dfs_create_ext_mem(struct csio_hw *hw) {u32 size; -int i =csio_rd_reg32 (hw,MA_TARGET_MEM_ENABLE ); -if (i &EXT_MEM_ENABLE ) { - size =csio_rd_reg32 (hw,MA_EXT_MEMORY_BAR ); +int i =csio_rd_reg32 (hw,MA_TARGET_MEM_ENABLE_A ); + +if (i &EXT_MEM_ENABLE_F ) { + size =csio_rd_reg32 (hw,MA_EXT_MEMORY_BAR_A );csio_add_debugfs_mem (hw,"mc" ,MEM_MC , -EXT_MEM_SIZE_GET (size)); +EXT_MEM_SIZE_G (size)); } }
drivers/scsi/csiostor/csio_hw_t5.c +11 -10
@@ -298,12 +298,12 @@ csio_t5_memory_rw(struct csio_hw *hw, u32 win, int mtype, u32 addr,* MEM_MC0 = 2 -- For T5 * MEM_MC1 = 3 -- For T5 */ - edc_size =EDRAM_SIZE_GET (csio_rd_reg32 (hw,MA_EDRAM0_BAR )); + edc_size =EDRAM0_SIZE_G (csio_rd_reg32 (hw,MA_EDRAM0_BAR_A ));if (mtype !=MEM_MC1 ) memoffset = (mtype * (edc_size *1024 *1024 ));else { - mc_size =EXT_MEM_SIZE_GET (csio_rd_reg32 (hw, -MA_EXT_MEMORY_BAR )); + mc_size =EXT_MEM_SIZE_G (csio_rd_reg32 (hw, +MA_EXT_MEMORY_BAR_A )); memoffset = (MEM_MC0 * edc_size + mc_size) *1024 *1024 ; }
@@ -372,16 +372,17 @@ static void csio_t5_dfs_create_ext_mem(struct csio_hw *hw) {u32 size; -int i =csio_rd_reg32 (hw,MA_TARGET_MEM_ENABLE ); -if (i &EXT_MEM_ENABLE ) { - size =csio_rd_reg32 (hw,MA_EXT_MEMORY_BAR ); +int i =csio_rd_reg32 (hw,MA_TARGET_MEM_ENABLE_A ); + +if (i &EXT_MEM_ENABLE_F ) { + size =csio_rd_reg32 (hw,MA_EXT_MEMORY_BAR_A );csio_add_debugfs_mem (hw,"mc0" ,MEM_MC0 , -EXT_MEM_SIZE_GET (size)); +EXT_MEM_SIZE_G (size)); } -if (i &EXT_MEM1_ENABLE ) { - size =csio_rd_reg32 (hw,MA_EXT_MEMORY1_BAR ); +if (i &EXT_MEM1_ENABLE_F ) { + size =csio_rd_reg32 (hw,MA_EXT_MEMORY1_BAR_A );csio_add_debugfs_mem (hw,"mc1" ,MEM_MC1 , -EXT_MEM_SIZE_GET (size)); +EXT_MEM_SIZE_G (size)); } }
drivers/scsi/csiostor/csio_init.c +3 -3
@@ -128,10 +128,10 @@ static int csio_setup_debugfs(struct csio_hw *hw)if (IS_ERR_OR_NULL (hw->debugfs_root))return -1 ; - i =csio_rd_reg32 (hw,MA_TARGET_MEM_ENABLE ); -if (i &EDRAM0_ENABLE ) + i =csio_rd_reg32 (hw,MA_TARGET_MEM_ENABLE_A ); +if (i &EDRAM0_ENABLE_F )csio_add_debugfs_mem (hw,"edc0" ,MEM_EDC0 ,5 ); -if (i &EDRAM1_ENABLE ) +if (i &EDRAM1_ENABLE_F )csio_add_debugfs_mem (hw,"edc1" ,MEM_EDC1 ,5 ); hw->chip_ops->chip_dfs_create_ext_mem (hw);
Signature · 1 line
1.7.1
PATCH v3 3/3 cxgb4: Cleanup macros so they follow the same style and look consistent, part 2
In reply to Hariprasad ShenaiVarious patches have ended up changing the style of the symbolic macros/register defines to different style.
As a result, the current kernel.org files are a mix of different macro styles. Since this macro/register defines is used by different drivers a few patch series have ended up adding duplicate macro/register define entries with different styles. This makes these register define/macro files a complete mess and we want to make them clean and consistent. This patch cleans up a part of it.
--- drivers/infiniband/hw/cxgb4/cm.c | 56 ++++---- drivers/infiniband/hw/cxgb4/cq.c | 8 +- drivers/infiniband/hw/cxgb4/mem.c | 14 +- drivers/infiniband/hw/cxgb4/qp.c | 26 ++-- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 2 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.h | 6 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 60 ++++---- drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 15 +- drivers/net/ethernet/chelsio/cxgb4/sge.c | 32 ++-- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 121 +++++++------- drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 142 +++++++++++++---- drivers/net/ethernet/chelsio/cxgb4vf/sge.c | 32 ++-- drivers/net/ethernet/chelsio/cxgb4vf/t4vf_common.h | 2 +- drivers/net/ethernet/chelsio/cxgb4vf/t4vf_hw.c | 150 +++++++++--------- drivers/scsi/csiostor/csio_attr.c | 8 +- drivers/scsi/csiostor/csio_hw.c | 14 +- drivers/scsi/csiostor/csio_lnode.c | 18 +- drivers/scsi/csiostor/csio_mb.c | 172 ++++++++++---------- drivers/scsi/csiostor/csio_scsi.c | 24 ++-- drivers/scsi/csiostor/csio_wr.h | 2 +- drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 35 ++-- 21 files changed, 509 insertions(+), 430 deletions(-)
drivers/infiniband/hw/cxgb4/cm.c +28 -28
@@ -472,10 +472,10 @@ static void send_flowc(struct c4iw_ep *ep, struct sk_buff *skb) skb =get_skb (skb, flowclen,GFP_KERNEL ); flowc = (struct fw_flowc_wr *)__skb_put (skb, flowclen); - flowc->op_to_nparams =cpu_to_be32 (FW_WR_OP (FW_FLOWC_WR ) | -FW_FLOWC_WR_NPARAMS (8 )); - flowc->flowid_len16 =cpu_to_be32 (FW_WR_LEN16 (DIV_ROUND_UP (flowclen, -16 )) |FW_WR_FLOWID (ep->hwtid)); + flowc->op_to_nparams =cpu_to_be32 (FW_WR_OP_V (FW_FLOWC_WR ) | +FW_FLOWC_WR_NPARAMS_V (8 )); + flowc->flowid_len16 =cpu_to_be32 (FW_WR_LEN16_V (DIV_ROUND_UP (flowclen, +16 )) |FW_WR_FLOWID_V (ep->hwtid)); flowc->mnemval[0 ].mnemonic =FW_FLOWC_MNEM_PFNVFN ; flowc->mnemval[0].val = cpu_to_be32(FW_PFVF_CMD_PFN
@@ -803,16 +803,16 @@ static void send_mpa_req(struct c4iw_ep *ep, struct sk_buff *skb, req = (struct fw_ofld_tx_data_wr *)skb_put (skb, wrlen);memset (req,0 , wrlen); req->op_to_immdlen =cpu_to_be32 ( -FW_WR_OP (FW_OFLD_TX_DATA_WR ) | -FW_WR_COMPL (1 ) | -FW_WR_IMMDLEN (mpalen)); +FW_WR_OP_V (FW_OFLD_TX_DATA_WR ) | +FW_WR_COMPL_F | +FW_WR_IMMDLEN_V (mpalen)); req->flowid_len16 =cpu_to_be32 ( -FW_WR_FLOWID (ep->hwtid) | -FW_WR_LEN16 (wrlen >>4 )); +FW_WR_FLOWID_V (ep->hwtid) | +FW_WR_LEN16_V (wrlen >>4 )); req->plen =cpu_to_be32 (mpalen); req->tunnel_to_proxy =cpu_to_be32 ( -FW_OFLD_TX_DATA_WR_FLUSH (1 ) | -FW_OFLD_TX_DATA_WR_SHOVE (1 )); +FW_OFLD_TX_DATA_WR_FLUSH_F | +FW_OFLD_TX_DATA_WR_SHOVE_F ); mpa = (struct mpa_message *)(req +1 );memcpy (mpa->key,MPA_KEY_REQ ,sizeof (mpa->key));
@@ -897,16 +897,16 @@ static int send_mpa_reject(struct c4iw_ep *ep, const void *pdata, u8 plen) req = (struct fw_ofld_tx_data_wr *)skb_put (skb, wrlen);memset (req,0 , wrlen); req->op_to_immdlen =cpu_to_be32 ( -FW_WR_OP (FW_OFLD_TX_DATA_WR ) | -FW_WR_COMPL (1 ) | -FW_WR_IMMDLEN (mpalen)); +FW_WR_OP_V (FW_OFLD_TX_DATA_WR ) | +FW_WR_COMPL_F | +FW_WR_IMMDLEN_V (mpalen)); req->flowid_len16 =cpu_to_be32 ( -FW_WR_FLOWID (ep->hwtid) | -FW_WR_LEN16 (wrlen >>4 )); +FW_WR_FLOWID_V (ep->hwtid) | +FW_WR_LEN16_V (wrlen >>4 )); req->plen =cpu_to_be32 (mpalen); req->tunnel_to_proxy =cpu_to_be32 ( -FW_OFLD_TX_DATA_WR_FLUSH (1 ) | -FW_OFLD_TX_DATA_WR_SHOVE (1 )); +FW_OFLD_TX_DATA_WR_FLUSH_F | +FW_OFLD_TX_DATA_WR_SHOVE_F ); mpa = (struct mpa_message *)(req +1 );memset (mpa,0 ,sizeof (*mpa));
@@ -977,16 +977,16 @@ static int send_mpa_reply(struct c4iw_ep *ep, const void *pdata, u8 plen) req = (struct fw_ofld_tx_data_wr *)skb_put (skb, wrlen);memset (req,0 , wrlen); req->op_to_immdlen =cpu_to_be32 ( -FW_WR_OP (FW_OFLD_TX_DATA_WR ) | -FW_WR_COMPL (1 ) | -FW_WR_IMMDLEN (mpalen)); +FW_WR_OP_V (FW_OFLD_TX_DATA_WR ) | +FW_WR_COMPL_F | +FW_WR_IMMDLEN_V (mpalen)); req->flowid_len16 =cpu_to_be32 ( -FW_WR_FLOWID (ep->hwtid) | -FW_WR_LEN16 (wrlen >>4 )); +FW_WR_FLOWID_V (ep->hwtid) | +FW_WR_LEN16_V (wrlen >>4 )); req->plen =cpu_to_be32 (mpalen); req->tunnel_to_proxy =cpu_to_be32 ( -FW_OFLD_TX_DATA_WR_FLUSH (1 ) | -FW_OFLD_TX_DATA_WR_SHOVE (1 )); +FW_OFLD_TX_DATA_WR_FLUSH_F | +FW_OFLD_TX_DATA_WR_SHOVE_F ); mpa = (struct mpa_message *)(req +1 );memset (mpa,0 ,sizeof (*mpa));
@@ -1751,7 +1751,7 @@ static void send_fw_act_open_req(struct c4iw_ep *ep, unsigned int atid) req = (struct fw_ofld_connection_wr *)__skb_put (skb,sizeof (*req));memset (req,0 ,sizeof (*req)); req->op_compl =htonl (V_WR_OP (FW_OFLD_CONNECTION_WR )); - req->len16_pkd =htonl (FW_WR_LEN16 (DIV_ROUND_UP (sizeof (*req),16 ))); + req->len16_pkd =htonl (FW_WR_LEN16_V (DIV_ROUND_UP (sizeof (*req),16 ))); req->le.filter =cpu_to_be32 (cxgb4_select_ntuple ( ep->com.dev->rdev.lldi.ports[0 ], ep->l2t));
@@ -3537,8 +3537,8 @@ static void send_fw_pass_open_req(struct c4iw_dev *dev, struct sk_buff *skb, req_skb =alloc_skb (sizeof (struct fw_ofld_connection_wr ),GFP_KERNEL ); req = (struct fw_ofld_connection_wr *)__skb_put (req_skb,sizeof (*req));memset (req,0 ,sizeof (*req)); - req->op_compl =htonl (V_WR_OP (FW_OFLD_CONNECTION_WR ) |FW_WR_COMPL (1 )); - req->len16_pkd =htonl (FW_WR_LEN16 (DIV_ROUND_UP (sizeof (*req),16 ))); + req->op_compl =htonl (V_WR_OP (FW_OFLD_CONNECTION_WR ) |FW_WR_COMPL_F ); + req->len16_pkd =htonl (FW_WR_LEN16_V (DIV_ROUND_UP (sizeof (*req),16 ))); req->le.version_cpl =htonl (F_FW_OFLD_CONNECTION_WR_CPL ); req->le.filter = (__force __be32 ) filter; req->le.lport = lport;
drivers/infiniband/hw/cxgb4/cq.c +4 -4
@@ -51,9 +51,9 @@ static int destroy_cq(struct c4iw_rdev *rdev, struct t4_cq *cq, res_wr = (struct fw_ri_res_wr *)__skb_put (skb, wr_len);memset (res_wr,0 , wr_len); res_wr->op_nres =cpu_to_be32 ( -FW_WR_OP (FW_RI_RES_WR ) | +FW_WR_OP_V (FW_RI_RES_WR ) |V_FW_RI_RES_WR_NRES (1 ) | -FW_WR_COMPL (1 )); +FW_WR_COMPL_F ); res_wr->len16_pkd =cpu_to_be32 (DIV_ROUND_UP (wr_len,16 )); res_wr->cookie = (unsigned long ) &wr_wait; res = res_wr->res;
@@ -121,9 +121,9 @@ static int create_cq(struct c4iw_rdev *rdev, struct t4_cq *cq, res_wr = (struct fw_ri_res_wr *)__skb_put (skb, wr_len);memset (res_wr,0 , wr_len); res_wr->op_nres =cpu_to_be32 ( -FW_WR_OP (FW_RI_RES_WR ) | +FW_WR_OP_V (FW_RI_RES_WR ) |V_FW_RI_RES_WR_NRES (1 ) | -FW_WR_COMPL (1 )); +FW_WR_COMPL_F ); res_wr->len16_pkd =cpu_to_be32 (DIV_ROUND_UP (wr_len,16 )); res_wr->cookie = (unsigned long ) &wr_wait; res = res_wr->res;
drivers/infiniband/hw/cxgb4/mem.c +7 -7
@@ -74,10 +74,10 @@ static int _c4iw_write_mem_dma_aligned(struct c4iw_rdev *rdev, u32 addr, req = (struct ulp_mem_io *)__skb_put (skb, wr_len);memset (req,0 , wr_len);INIT_ULPTX_WR (req, wr_len,0 ,0 ); - req->wr.wr_hi =cpu_to_be32 (FW_WR_OP (FW_ULPTX_WR ) | - (wait ?FW_WR_COMPL (1 ) :0 )); + req->wr.wr_hi =cpu_to_be32 (FW_WR_OP_V (FW_ULPTX_WR ) | + (wait ?FW_WR_COMPL_F :0 )); req->wr.wr_lo = wait ? (__force __be64 )(unsigned long ) &wr_wait :0L ; - req->wr.wr_mid =cpu_to_be32 (FW_WR_LEN16 (DIV_ROUND_UP (wr_len,16 ))); + req->wr.wr_mid =cpu_to_be32 (FW_WR_LEN16_V (DIV_ROUND_UP (wr_len,16 ))); req->cmd =cpu_to_be32 (ULPTX_CMD (ULP_TX_MEM_WRITE )); req->cmd |=cpu_to_be32 (V_T5_ULP_MEMIO_ORDER (1 )); req->dlen =cpu_to_be32 (ULP_MEMIO_DATA_LEN (len>>5 ));
@@ -135,13 +135,13 @@ static int _c4iw_write_mem_inline(struct c4iw_rdev *rdev, u32 addr, u32 len,INIT_ULPTX_WR (req, wr_len,0 ,0 );if (i == (num_wqe-1 )) { - req->wr.wr_hi =cpu_to_be32 (FW_WR_OP (FW_ULPTX_WR ) | -FW_WR_COMPL (1 )); + req->wr.wr_hi =cpu_to_be32 (FW_WR_OP_V (FW_ULPTX_WR ) | +FW_WR_COMPL_F ); req->wr.wr_lo = (__force __be64 )(unsigned long ) &wr_wait; }else - req->wr.wr_hi =cpu_to_be32 (FW_WR_OP (FW_ULPTX_WR )); + req->wr.wr_hi =cpu_to_be32 (FW_WR_OP_V (FW_ULPTX_WR )); req->wr.wr_mid =cpu_to_be32 ( -FW_WR_LEN16 (DIV_ROUND_UP (wr_len,16 ))); +FW_WR_LEN16_V (DIV_ROUND_UP (wr_len,16 ))); req->cmd = cmd; req->dlen = cpu_to_be32(ULP_MEMIO_DATA_LEN(
drivers/infiniband/hw/cxgb4/qp.c +13 -13
@@ -271,9 +271,9 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq, res_wr = (struct fw_ri_res_wr *)__skb_put (skb, wr_len);memset (res_wr,0 , wr_len); res_wr->op_nres =cpu_to_be32 ( -FW_WR_OP (FW_RI_RES_WR ) | +FW_WR_OP_V (FW_RI_RES_WR ) |V_FW_RI_RES_WR_NRES (2 ) | -FW_WR_COMPL (1 )); +FW_WR_COMPL_F ); res_wr->len16_pkd =cpu_to_be32 (DIV_ROUND_UP (wr_len,16 )); res_wr->cookie = (unsigned long ) &wr_wait; res = res_wr->res;
@@ -1082,10 +1082,10 @@ static void post_terminate(struct c4iw_qp *qhp, struct t4_cqe *err_cqe, wqe = (struct fw_ri_wr *)__skb_put (skb,sizeof (*wqe));memset (wqe,0 ,sizeof *wqe); - wqe->op_compl =cpu_to_be32 (FW_WR_OP (FW_RI_INIT_WR )); + wqe->op_compl =cpu_to_be32 (FW_WR_OP_V (FW_RI_INIT_WR )); wqe->flowid_len16 =cpu_to_be32 ( -FW_WR_FLOWID (qhp->ep->hwtid) | -FW_WR_LEN16 (DIV_ROUND_UP (sizeof *wqe,16 ))); +FW_WR_FLOWID_V (qhp->ep->hwtid) | +FW_WR_LEN16_V (DIV_ROUND_UP (sizeof (*wqe),16 ))); wqe->u.terminate.type =FW_RI_TYPE_TERMINATE ; wqe->u.terminate.immdlen =cpu_to_be32 (sizeof *term);
@@ -1204,11 +1204,11 @@ static int rdma_fini(struct c4iw_dev *rhp, struct c4iw_qp *qhp, wqe = (struct fw_ri_wr *)__skb_put (skb,sizeof (*wqe));memset (wqe,0 ,sizeof *wqe); wqe->op_compl =cpu_to_be32 ( -FW_WR_OP (FW_RI_INIT_WR ) | -FW_WR_COMPL (1 )); +FW_WR_OP_V (FW_RI_INIT_WR ) | +FW_WR_COMPL_F ); wqe->flowid_len16 =cpu_to_be32 ( -FW_WR_FLOWID (ep->hwtid) | -FW_WR_LEN16 (DIV_ROUND_UP (sizeof *wqe,16 ))); +FW_WR_FLOWID_V (ep->hwtid) | +FW_WR_LEN16_V (DIV_ROUND_UP (sizeof (*wqe),16 ))); wqe->cookie = (unsigned long ) &ep->com.wr_wait; wqe->u.fini.type =FW_RI_TYPE_FINI ;
@@ -1273,11 +1273,11 @@ static int rdma_init(struct c4iw_dev *rhp, struct c4iw_qp *qhp) wqe = (struct fw_ri_wr *)__skb_put (skb,sizeof (*wqe));memset (wqe,0 ,sizeof *wqe); wqe->op_compl =cpu_to_be32 ( -FW_WR_OP (FW_RI_INIT_WR ) | -FW_WR_COMPL (1 )); +FW_WR_OP_V (FW_RI_INIT_WR ) | +FW_WR_COMPL_F ); wqe->flowid_len16 =cpu_to_be32 ( -FW_WR_FLOWID (qhp->ep->hwtid) | -FW_WR_LEN16 (DIV_ROUND_UP (sizeof *wqe,16 ))); +FW_WR_FLOWID_V (qhp->ep->hwtid) | +FW_WR_LEN16_V (DIV_ROUND_UP (sizeof (*wqe),16 ))); wqe->cookie = (unsigned long ) &qhp->ep->com.wr_wait;
drivers/net/ethernet/chelsio/cxgb4/cxgb4.h +1 -1
@@ -354,7 +354,7 @@ struct link_config {unsigned char link_ok;/* link up? */ }; -#define FW_LEN16 (fw_struct) FW_CMD_LEN16(sizeof(fw_struct) / 16) +#define FW_LEN16 (fw_struct) FW_CMD_LEN16_V(sizeof(fw_struct) / 16)enum {MAX_ETH_QSETS =32 ,/* # of Ethernet Tx/Rx queue sets */
drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.h +3 -3
@@ -42,9 +42,9 @@ do { \ memset(&(__pcmd), 0, sizeof(__pcmd)); \ (__pcmd).op_to_portid = \ - cpu_to_be32(FW_CMD_OP(FW_PORT_CMD) | \ - FW_CMD_REQUEST | \ - FW_CMD_##__op | \ + cpu_to_be32(FW_CMD_OP_V(FW_PORT_CMD) | \ + FW_CMD_REQUEST_F | \ + FW_CMD_##__op##_F | \ FW_PORT_CMD_PORTID(__port)); \ (__pcmd).action_to_len16 = \ cpu_to_be32(FW_PORT_CMD_ACTION(__action) | \
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +30 -30
150 lines not on this page · raw message
drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h +8 -7
@@ -52,10 +52,10 @@ enum { };#define INIT_TP_WR (w, tid) do { \ - (w)->wr.wr_hi = htonl(FW_WR_OP(FW_TP_WR) | \ - FW_WR_IMMDLEN(sizeof(*w) - sizeof(w->wr))); \ - (w)->wr.wr_mid = htonl(FW_WR_LEN16(DIV_ROUND_UP(sizeof(*w), 16)) | \ - FW_WR_FLOWID(tid)); \ + (w)->wr.wr_hi = htonl(FW_WR_OP_V(FW_TP_WR) | \ + FW_WR_IMMDLEN_V(sizeof(*w) - sizeof(w->wr))); \ + (w)->wr.wr_mid = htonl(FW_WR_LEN16_V(DIV_ROUND_UP(sizeof(*w), 16)) | \ + FW_WR_FLOWID_V(tid)); \ (w)->wr.wr_lo = cpu_to_be64(0); \ } while (0)
@@ -65,9 +65,10 @@ enum { } while (0)#define INIT_ULPTX_WR (w, wrlen, atomic, tid) do { \ - (w)->wr.wr_hi = htonl(FW_WR_OP(FW_ULPTX_WR) | FW_WR_ATOMIC(atomic)); \ - (w)->wr.wr_mid = htonl(FW_WR_LEN16(DIV_ROUND_UP(wrlen, 16)) | \ - FW_WR_FLOWID(tid)); \ + (w)->wr.wr_hi = htonl(FW_WR_OP_V(FW_ULPTX_WR) | \ + FW_WR_ATOMIC_V(atomic)); \ + (w)->wr.wr_mid = htonl(FW_WR_LEN16_V(DIV_ROUND_UP(wrlen, 16)) | \ + FW_WR_FLOWID_V(tid)); \ (w)->wr.wr_lo = cpu_to_be64(0); \ } while (0)
drivers/net/ethernet/chelsio/cxgb4/sge.c +16 -16
@@ -1092,10 +1092,10 @@ out_free: dev_kfree_skb_any(skb); goto out_free; } - wr_mid =FW_WR_LEN16 (DIV_ROUND_UP (flits,2 )); + wr_mid =FW_WR_LEN16_V (DIV_ROUND_UP (flits,2 ));if (unlikely (credits <ETHTXQ_STOP_THRES )) {eth_txq_stop (q); - wr_mid |=FW_WR_EQUEQ |FW_WR_EQUIQ ; + wr_mid |=FW_WR_EQUEQ_F |FW_WR_EQUIQ_F ; } wr = (void *)&q->q.desc[q->q.pidx];
@@ -1112,8 +1112,8 @@ out_free: dev_kfree_skb_any(skb);int eth_xtra_len =skb_network_offset (skb) -ETH_HLEN ; len +=sizeof (*lso); - wr->op_immdlen =htonl (FW_WR_OP (FW_ETH_TX_PKT_WR ) | -FW_WR_IMMDLEN (len)); + wr->op_immdlen =htonl (FW_WR_OP_V (FW_ETH_TX_PKT_WR ) | +FW_WR_IMMDLEN_V (len)); lso->c.lso_ctrl = htonl(LSO_OPCODE(CPL_TX_PKT_LSO) | LSO_FIRST_SLICE | LSO_LAST_SLICE | LSO_IPV6(v6) |
@@ -1135,8 +1135,8 @@ out_free: dev_kfree_skb_any(skb); q->tx_cso += ssi->gso_segs; }else { len +=sizeof (*cpl); - wr->op_immdlen =htonl (FW_WR_OP (FW_ETH_TX_PKT_WR ) | -FW_WR_IMMDLEN (len)); + wr->op_immdlen =htonl (FW_WR_OP_V (FW_ETH_TX_PKT_WR ) | +FW_WR_IMMDLEN_V (len)); cpl = (void *)(wr +1 );if (skb->ip_summed ==CHECKSUM_PARTIAL ) { cntrl =hwcsum (skb) |TXPKT_IPCSUM_DIS ;
@@ -1224,7 +1224,7 @@ static void ctrlq_check_stop(struct sge_ctrl_txq *q, struct fw_wr_hdr *wr) {reclaim_completed_tx_imm (&q->q);if (unlikely (txq_avail (&q->q) <TXQ_STOP_THRES )) { - wr->lo |=htonl (FW_WR_EQUEQ |FW_WR_EQUIQ ); + wr->lo |=htonl (FW_WR_EQUEQ_F |FW_WR_EQUIQ_F ); q->q.stops++; q->full =1 ; }
@@ -1406,7 +1406,7 @@ static void ofldtxq_stop(struct sge_ofld_txq *q, struct sk_buff *skb) {struct fw_wr_hdr *wr = (struct fw_wr_hdr *)skb->data; - wr->lo |=htonl (FW_WR_EQUEQ |FW_WR_EQUIQ ); + wr->lo |=htonl (FW_WR_EQUEQ_F |FW_WR_EQUIQ_F ); q->q.stops++; q->full =1 ; }
@@ -2297,8 +2297,8 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,return -ENOMEM ;memset (&c,0 ,sizeof (c)); - c.op_to_vfn =htonl (FW_CMD_OP (FW_IQ_CMD ) |FW_CMD_REQUEST | -FW_CMD_WRITE |FW_CMD_EXEC | + c.op_to_vfn =htonl (FW_CMD_OP_V (FW_IQ_CMD ) |FW_CMD_REQUEST_F | +FW_CMD_WRITE_F |FW_CMD_EXEC_F |FW_IQ_CMD_PFN (adap->fn) |FW_IQ_CMD_VFN (0 )); c.alloc_to_len16 =htonl (FW_IQ_CMD_ALLOC |FW_IQ_CMD_IQSTART (1 ) |FW_LEN16 (c));
@@ -2423,8 +2423,8 @@ int t4_sge_alloc_eth_txq(struct adapter *adap, struct sge_eth_txq *txq,return -ENOMEM ;memset (&c,0 ,sizeof (c)); - c.op_to_vfn =htonl (FW_CMD_OP (FW_EQ_ETH_CMD ) |FW_CMD_REQUEST | -FW_CMD_WRITE |FW_CMD_EXEC | + c.op_to_vfn =htonl (FW_CMD_OP_V (FW_EQ_ETH_CMD ) |FW_CMD_REQUEST_F | +FW_CMD_WRITE_F |FW_CMD_EXEC_F |FW_EQ_ETH_CMD_PFN (adap->fn) |FW_EQ_ETH_CMD_VFN (0 )); c.alloc_to_len16 =htonl (FW_EQ_ETH_CMD_ALLOC |FW_EQ_ETH_CMD_EQSTART |FW_LEN16 (c));
@@ -2476,8 +2476,8 @@ int t4_sge_alloc_ctrl_txq(struct adapter *adap, struct sge_ctrl_txq *txq,if (!txq->q.desc)return -ENOMEM ; - c.op_to_vfn =htonl (FW_CMD_OP (FW_EQ_CTRL_CMD ) |FW_CMD_REQUEST | -FW_CMD_WRITE |FW_CMD_EXEC | + c.op_to_vfn =htonl (FW_CMD_OP_V (FW_EQ_CTRL_CMD ) |FW_CMD_REQUEST_F | +FW_CMD_WRITE_F |FW_CMD_EXEC_F |FW_EQ_CTRL_CMD_PFN (adap->fn) |FW_EQ_CTRL_CMD_VFN (0 )); c.alloc_to_len16 = htonl(FW_EQ_CTRL_CMD_ALLOC |
@@ -2530,8 +2530,8 @@ int t4_sge_alloc_ofld_txq(struct adapter *adap, struct sge_ofld_txq *txq,return -ENOMEM ;memset (&c,0 ,sizeof (c)); - c.op_to_vfn =htonl (FW_CMD_OP (FW_EQ_OFLD_CMD ) |FW_CMD_REQUEST | -FW_CMD_WRITE |FW_CMD_EXEC | + c.op_to_vfn =htonl (FW_CMD_OP_V (FW_EQ_OFLD_CMD ) |FW_CMD_REQUEST_F | +FW_CMD_WRITE_F |FW_CMD_EXEC_F |FW_EQ_OFLD_CMD_PFN (adap->fn) |FW_EQ_OFLD_CMD_VFN (0 )); c.alloc_to_len16 = htonl(FW_EQ_OFLD_CMD_ALLOC |
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +61 -60
292 lines not on this page · raw message
drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h +109 -33
177 lines not on this page · raw message
drivers/net/ethernet/chelsio/cxgb4vf/sge.c +16 -16
@@ -132,7 +132,7 @@ enum {* we can specify for immediate data in the firmware Ethernet TX * Work Request. */ - MAX_IMM_TX_PKT_LEN = FW_WR_IMMDLEN_MASK, + MAX_IMM_TX_PKT_LEN = FW_WR_IMMDLEN_M,/* * Max size of a WR sent through a control TX queue.
@@ -1149,7 +1149,7 @@ int t4vf_eth_xmit(struct sk_buff *skb, struct net_device *dev) goto out_free; } - wr_mid =FW_WR_LEN16 (DIV_ROUND_UP (flits,2 )); + wr_mid =FW_WR_LEN16_V (DIV_ROUND_UP (flits,2 ));if (unlikely (credits <ETHTXQ_STOP_THRES )) {/* * After we're done injecting the Work Request for this
@@ -1161,7 +1161,7 @@ int t4vf_eth_xmit(struct sk_buff *skb, struct net_device *dev)* has opened up. */ txq_stop (txq); - wr_mid |=FW_WR_EQUEQ |FW_WR_EQUIQ ; + wr_mid |=FW_WR_EQUEQ_F |FW_WR_EQUIQ_F ; }/*
@@ -1191,9 +1191,9 @@ int t4vf_eth_xmit(struct sk_buff *skb, struct net_device *dev)int eth_xtra_len =skb_network_offset (skb) -ETH_HLEN ; wr->op_immdlen = -cpu_to_be32 (FW_WR_OP (FW_ETH_TX_PKT_VM_WR ) | -FW_WR_IMMDLEN (sizeof (*lso) + -sizeof (*cpl))); +cpu_to_be32 (FW_WR_OP_V (FW_ETH_TX_PKT_VM_WR ) | +FW_WR_IMMDLEN_V (sizeof (*lso) + +sizeof (*cpl)));/* * Fill in the LSO CPL message. */
@@ -1228,8 +1228,8 @@ int t4vf_eth_xmit(struct sk_buff *skb, struct net_device *dev) len =is_eth_imm (skb) ? skb->len +sizeof (*cpl) :sizeof (*cpl); wr->op_immdlen = -cpu_to_be32 (FW_WR_OP (FW_ETH_TX_PKT_VM_WR ) | -FW_WR_IMMDLEN (len)); +cpu_to_be32 (FW_WR_OP_V (FW_ETH_TX_PKT_VM_WR ) | +FW_WR_IMMDLEN_V (len));/* * Set up TX Packet CPL pointer, control word and perform
@@ -2084,10 +2084,10 @@ int t4vf_sge_alloc_rxq(struct adapter *adapter, struct sge_rspq *rspq,* into OS-independent common code ... */ memset (&cmd,0 ,sizeof (cmd)); - cmd.op_to_vfn =cpu_to_be32 (FW_CMD_OP (FW_IQ_CMD ) | -FW_CMD_REQUEST | -FW_CMD_WRITE | -FW_CMD_EXEC ); + cmd.op_to_vfn =cpu_to_be32 (FW_CMD_OP_V (FW_IQ_CMD ) | +FW_CMD_REQUEST_F | +FW_CMD_WRITE_F | +FW_CMD_EXEC_F ); cmd.alloc_to_len16 =cpu_to_be32 (FW_IQ_CMD_ALLOC |FW_IQ_CMD_IQSTART (1 ) |FW_LEN16 (cmd));
@@ -2246,10 +2246,10 @@ int t4vf_sge_alloc_eth_txq(struct adapter *adapter, struct sge_eth_txq *txq,* into the common code ... */ memset (&cmd,0 ,sizeof (cmd)); - cmd.op_to_vfn =cpu_to_be32 (FW_CMD_OP (FW_EQ_ETH_CMD ) | -FW_CMD_REQUEST | -FW_CMD_WRITE | -FW_CMD_EXEC ); + cmd.op_to_vfn =cpu_to_be32 (FW_CMD_OP_V (FW_EQ_ETH_CMD ) | +FW_CMD_REQUEST_F | +FW_CMD_WRITE_F | +FW_CMD_EXEC_F ); cmd.alloc_to_len16 =cpu_to_be32 (FW_EQ_ETH_CMD_ALLOC |FW_EQ_ETH_CMD_EQSTART |FW_LEN16 (cmd));
drivers/net/ethernet/chelsio/cxgb4vf/t4vf_common.h +1 -1
@@ -67,7 +67,7 @@ enum chip_type {/* * The "len16" field of a Firmware Command Structure ... */ -#define FW_LEN16 (fw_struct) FW_CMD_LEN16(sizeof(fw_struct) / 16) +#define FW_LEN16 (fw_struct) FW_CMD_LEN16_V(sizeof(fw_struct) / 16)/* * Per-VF statistics.
drivers/net/ethernet/chelsio/cxgb4vf/t4vf_hw.c +75 -75
310 lines not on this page · raw message
drivers/scsi/csiostor/csio_attr.c +4 -4
@@ -451,9 +451,9 @@ csio_fcoe_alloc_vnp(struct csio_hw *hw, struct csio_lnode *ln)/* Process Mbox response of VNP command */ rsp = (struct fw_fcoe_vnp_cmd *)(mbp->mb); -if (FW_CMD_RETVAL_GET (ntohl (rsp->alloc_to_len16)) !=FW_SUCCESS ) { +if (FW_CMD_RETVAL_G (ntohl (rsp->alloc_to_len16)) !=FW_SUCCESS ) {csio_ln_err (ln,"FCOE VNP ALLOC cmd returned 0x%x!\n" , -FW_CMD_RETVAL_GET (ntohl (rsp->alloc_to_len16))); +FW_CMD_RETVAL_G (ntohl (rsp->alloc_to_len16))); ret = -EINVAL ; goto out_free; }
@@ -526,9 +526,9 @@ csio_fcoe_free_vnp(struct csio_hw *hw, struct csio_lnode *ln)/* Process Mbox response of VNP command */ rsp = (struct fw_fcoe_vnp_cmd *)(mbp->mb); -if (FW_CMD_RETVAL_GET (ntohl (rsp->alloc_to_len16)) !=FW_SUCCESS ) { +if (FW_CMD_RETVAL_G (ntohl (rsp->alloc_to_len16)) !=FW_SUCCESS ) {csio_ln_err (ln,"FCOE VNP FREE cmd returned 0x%x!\n" , -FW_CMD_RETVAL_GET (ntohl (rsp->alloc_to_len16))); +FW_CMD_RETVAL_G (ntohl (rsp->alloc_to_len16))); ret = -EINVAL ; }
drivers/scsi/csiostor/csio_hw.c +7 -7
@@ -1370,9 +1370,9 @@ csio_hw_fw_config_file(struct csio_hw *hw, caps_cmd = (struct fw_caps_config_cmd *)(mbp->mb);CSIO_INIT_MBP (mbp, caps_cmd,CSIO_MB_DEFAULT_TMO , hw,NULL ,1 ); caps_cmd->op_to_write = -htonl (FW_CMD_OP (FW_CAPS_CONFIG_CMD ) | -FW_CMD_REQUEST | -FW_CMD_READ ); +htonl (FW_CMD_OP_V (FW_CAPS_CONFIG_CMD ) | +FW_CMD_REQUEST_F | +FW_CMD_READ_F ); caps_cmd->cfvalid_to_len16 = htonl(FW_CAPS_CONFIG_CMD_CFVALID | FW_CAPS_CONFIG_CMD_MEMTYPE_CF(mtype) |
@@ -1407,9 +1407,9 @@ csio_hw_fw_config_file(struct csio_hw *hw,* And now tell the firmware to use the configuration we just loaded. */ caps_cmd->op_to_write = -htonl (FW_CMD_OP (FW_CAPS_CONFIG_CMD ) | -FW_CMD_REQUEST | -FW_CMD_WRITE ); +htonl (FW_CMD_OP_V (FW_CAPS_CONFIG_CMD ) | +FW_CMD_REQUEST_F | +FW_CMD_WRITE_F ); caps_cmd->cfvalid_to_len16 =htonl (FW_LEN16 (*caps_cmd));if (csio_mb_issue (hw, mbp)) {
@@ -1678,7 +1678,7 @@ csio_get_fcoe_resinfo(struct csio_hw *hw) } rsp = (struct fw_fcoe_res_info_cmd *)(mbp->mb); - retval =FW_CMD_RETVAL_GET (ntohl (rsp->retval_len16)); + retval =FW_CMD_RETVAL_G (ntohl (rsp->retval_len16));if (retval !=FW_SUCCESS ) {csio_err (hw,"FW_FCOE_RES_INFO_CMD failed with ret x%x\n" , retval);
drivers/scsi/csiostor/csio_lnode.c +9 -9
@@ -603,7 +603,7 @@ csio_ln_vnp_read_cbfn(struct csio_hw *hw, struct csio_mb *mbp)enum fw_retval retval;__be32 nport_id; - retval =FW_CMD_RETVAL_GET (ntohl (rsp->alloc_to_len16)); + retval =FW_CMD_RETVAL_G (ntohl (rsp->alloc_to_len16));if (retval !=FW_SUCCESS ) {csio_err (hw,"FCOE VNP read cmd returned error:0x%x\n" , retval);mempool_free (mbp, hw->mb_mempool);
@@ -770,7 +770,7 @@ csio_ln_read_fcf_cbfn(struct csio_hw *hw, struct csio_mb *mbp) (struct fw_fcoe_fcf_cmd *)(mbp->mb);enum fw_retval retval; - retval =FW_CMD_RETVAL_GET (ntohl (rsp->retval_len16)); + retval =FW_CMD_RETVAL_G (ntohl (rsp->retval_len16));if (retval !=FW_SUCCESS ) {csio_ln_err (ln,"FCOE FCF cmd failed with ret x%x\n" , retval);
@@ -1506,7 +1506,7 @@ csio_fcoe_fwevt_handler(struct csio_hw *hw, __u8 cpl_op, __be64 *cmd) } }else if (cpl_op ==CPL_FW6_PLD ) { wr = (struct fw_wr_hdr *) (cmd +4 ); -if (FW_WR_OP_GET (be32_to_cpu (wr->hi)) +if (FW_WR_OP_G (be32_to_cpu (wr->hi)) ==FW_RDEV_WR ) { rdev_wr = (struct fw_rdev_wr *) (cmd +4 );
@@ -1574,17 +1574,17 @@ out_pld:return ; }else {csio_warn (hw,"unexpected WR op(0x%x) recv\n" , -FW_WR_OP_GET (be32_to_cpu ((wr->hi)))); +FW_WR_OP_G (be32_to_cpu ((wr->hi))));CSIO_INC_STATS (hw, n_cpl_unexp); } }else if (cpl_op ==CPL_FW6_MSG ) { wr = (struct fw_wr_hdr *) (cmd); -if (FW_WR_OP_GET (be32_to_cpu (wr->hi)) ==FW_FCOE_ELS_CT_WR ) { +if (FW_WR_OP_G (be32_to_cpu (wr->hi)) ==FW_FCOE_ELS_CT_WR ) {csio_ln_mgmt_wr_handler (hw, wr,sizeof (struct fw_fcoe_els_ct_wr )); }else {csio_warn (hw,"unexpected WR op(0x%x) recv\n" , -FW_WR_OP_GET (be32_to_cpu ((wr->hi)))); +FW_WR_OP_G (be32_to_cpu ((wr->hi))));CSIO_INC_STATS (hw, n_cpl_unexp); } }else {
@@ -1668,12 +1668,12 @@ csio_ln_prep_ecwr(struct csio_ioreq *io_req, uint32_t wr_len,__be32 port_id; wr = (struct fw_fcoe_els_ct_wr *)fw_wr; - wr->op_immdlen =cpu_to_be32 (FW_WR_OP (FW_FCOE_ELS_CT_WR ) | + wr->op_immdlen =cpu_to_be32 (FW_WR_OP_V (FW_FCOE_ELS_CT_WR ) |FW_FCOE_ELS_CT_WR_IMMDLEN (immd_len)); wr_len =DIV_ROUND_UP (wr_len,16 ); - wr->flowid_len16 =cpu_to_be32 (FW_WR_FLOWID (flow_id) | -FW_WR_LEN16 (wr_len)); + wr->flowid_len16 =cpu_to_be32 (FW_WR_FLOWID_V (flow_id) | +FW_WR_LEN16_V (wr_len)); wr->els_ct_type = sub_op; wr->ctl_pri =0 ; wr->cp_en_class =0 ;
drivers/scsi/csiostor/csio_mb.c +86 -86
413 lines not on this page · raw message
drivers/scsi/csiostor/csio_scsi.c +12 -12
@@ -230,10 +230,10 @@ csio_scsi_init_cmd_wr(struct csio_ioreq *req, void *addr, uint32_t size)struct csio_dma_buf *dma_buf;uint8_t imm =csio_hw_to_scsim (hw)->proto_cmd_len; - wr->op_immdlen =cpu_to_be32 (FW_WR_OP (FW_SCSI_CMD_WR ) | + wr->op_immdlen =cpu_to_be32 (FW_WR_OP_V (FW_SCSI_CMD_WR ) |FW_SCSI_CMD_WR_IMMDLEN (imm)); - wr->flowid_len16 =cpu_to_be32 (FW_WR_FLOWID (rn->flowid) | -FW_WR_LEN16 ( + wr->flowid_len16 =cpu_to_be32 (FW_WR_FLOWID_V (rn->flowid) | +FW_WR_LEN16_V (DIV_ROUND_UP (size,16 ))); wr->cookie = (uintptr_t ) req;
@@ -391,10 +391,10 @@ csio_scsi_init_read_wr(struct csio_ioreq *req, void *wrp, uint32_t size)uint8_t imm =csio_hw_to_scsim (hw)->proto_cmd_len;struct scsi_cmnd *scmnd =csio_scsi_cmnd (req); - wr->op_immdlen =cpu_to_be32 (FW_WR_OP (FW_SCSI_READ_WR ) | + wr->op_immdlen =cpu_to_be32 (FW_WR_OP_V (FW_SCSI_READ_WR ) |FW_SCSI_READ_WR_IMMDLEN (imm)); - wr->flowid_len16 =cpu_to_be32 (FW_WR_FLOWID (rn->flowid) | -FW_WR_LEN16 (DIV_ROUND_UP (size,16 ))); + wr->flowid_len16 =cpu_to_be32 (FW_WR_FLOWID_V (rn->flowid) | +FW_WR_LEN16_V (DIV_ROUND_UP (size,16 ))); wr->cookie = (uintptr_t )req; wr->iqid =cpu_to_be16 (csio_q_physiqid (hw, req->iq_idx)); wr->tmo_val = (uint8_t )(req->tmo);
@@ -444,10 +444,10 @@ csio_scsi_init_write_wr(struct csio_ioreq *req, void *wrp, uint32_t size)uint8_t imm =csio_hw_to_scsim (hw)->proto_cmd_len;struct scsi_cmnd *scmnd =csio_scsi_cmnd (req); - wr->op_immdlen =cpu_to_be32 (FW_WR_OP (FW_SCSI_WRITE_WR ) | + wr->op_immdlen =cpu_to_be32 (FW_WR_OP_V (FW_SCSI_WRITE_WR ) |FW_SCSI_WRITE_WR_IMMDLEN (imm)); - wr->flowid_len16 =cpu_to_be32 (FW_WR_FLOWID (rn->flowid) | -FW_WR_LEN16 (DIV_ROUND_UP (size,16 ))); + wr->flowid_len16 =cpu_to_be32 (FW_WR_FLOWID_V (rn->flowid) | +FW_WR_LEN16_V (DIV_ROUND_UP (size,16 ))); wr->cookie = (uintptr_t )req; wr->iqid =cpu_to_be16 (csio_q_physiqid (hw, req->iq_idx)); wr->tmo_val = (uint8_t )(req->tmo);
@@ -674,9 +674,9 @@ csio_scsi_init_abrt_cls_wr(struct csio_ioreq *req, void *addr, uint32_t size,struct csio_rnode *rn = req->rnode;struct fw_scsi_abrt_cls_wr *wr = (struct fw_scsi_abrt_cls_wr *)addr; - wr->op_immdlen =cpu_to_be32 (FW_WR_OP (FW_SCSI_ABRT_CLS_WR )); - wr->flowid_len16 =cpu_to_be32 (FW_WR_FLOWID (rn->flowid) | -FW_WR_LEN16 ( + wr->op_immdlen =cpu_to_be32 (FW_WR_OP_V (FW_SCSI_ABRT_CLS_WR )); + wr->flowid_len16 =cpu_to_be32 (FW_WR_FLOWID_V (rn->flowid) | +FW_WR_LEN16_V (DIV_ROUND_UP (size,16 ))); wr->cookie = (uintptr_t ) req;
drivers/scsi/csiostor/csio_wr.h +1 -1
@@ -101,7 +101,7 @@/* WR status is at the same position as retval in a CMD header */ #define csio_wr_status (_wr) \ - (FW_CMD_RETVAL_GET(ntohl(((struct fw_cmd_hdr *)(_wr))->lo))) + (FW_CMD_RETVAL_G(ntohl(((struct fw_cmd_hdr *)(_wr))->lo)))struct csio_hw ;
drivers/scsi/cxgbi/cxgb4i/cxgb4i.c +18 -17
@@ -499,10 +499,10 @@ static inline void send_tx_flowc_wr(struct cxgbi_sock *csk) skb =alloc_wr (flowclen,0 ,GFP_ATOMIC ); flowc = (struct fw_flowc_wr *)skb->head; flowc->op_to_nparams = -htonl (FW_WR_OP (FW_FLOWC_WR ) |FW_FLOWC_WR_NPARAMS (8 )); +htonl (FW_WR_OP_V (FW_FLOWC_WR ) |FW_FLOWC_WR_NPARAMS_V (8 )); flowc->flowid_len16 = -htonl (FW_WR_LEN16 (DIV_ROUND_UP (72 ,16 )) | -FW_WR_FLOWID (csk->tid)); +htonl (FW_WR_LEN16_V (DIV_ROUND_UP (72 ,16 )) | +FW_WR_FLOWID_V (csk->tid)); flowc->mnemval[0 ].mnemonic =FW_FLOWC_MNEM_PFNVFN ; flowc->mnemval[0 ].val =htonl (csk->cdev->pfvf); flowc->mnemval[1 ].mnemonic =FW_FLOWC_MNEM_CH ;
@@ -542,30 +542,31 @@ static inline void make_tx_data_wr(struct cxgbi_sock *csk, struct sk_buff *skb, {struct fw_ofld_tx_data_wr *req;unsigned int submode =cxgbi_skcb_ulp_mode (skb) &3 ; -unsigned int wr_ulp_mode =0 ; +unsigned int wr_ulp_mode =0 , val; req = (struct fw_ofld_tx_data_wr *)__skb_push (skb,sizeof (*req));if (is_ofld_imm (skb)) { - req->op_to_immdlen =htonl (FW_WR_OP (FW_OFLD_TX_DATA_WR ) | -FW_WR_COMPL (1 ) | -FW_WR_IMMDLEN (dlen)); - req->flowid_len16 =htonl (FW_WR_FLOWID (csk->tid) | -FW_WR_LEN16 (credits)); + req->op_to_immdlen =htonl (FW_WR_OP_V (FW_OFLD_TX_DATA_WR ) | +FW_WR_COMPL_F | +FW_WR_IMMDLEN_V (dlen)); + req->flowid_len16 =htonl (FW_WR_FLOWID_V (csk->tid) | +FW_WR_LEN16_V (credits)); }else { req->op_to_immdlen = -cpu_to_be32 (FW_WR_OP (FW_OFLD_TX_DATA_WR ) | -FW_WR_COMPL (1 ) | -FW_WR_IMMDLEN (0 )); +cpu_to_be32 (FW_WR_OP_V (FW_OFLD_TX_DATA_WR ) | +FW_WR_COMPL_F | +FW_WR_IMMDLEN_V (0 )); req->flowid_len16 = -cpu_to_be32 (FW_WR_FLOWID (csk->tid) | -FW_WR_LEN16 (credits)); +cpu_to_be32 (FW_WR_FLOWID_V (csk->tid) | +FW_WR_LEN16_V (credits)); }if (submode) - wr_ulp_mode =FW_OFLD_TX_DATA_WR_ULPMODE (ULP2_MODE_ISCSI ) | -FW_OFLD_TX_DATA_WR_ULPSUBMODE (submode); + wr_ulp_mode =FW_OFLD_TX_DATA_WR_ULPMODE_V (ULP2_MODE_ISCSI ) | +FW_OFLD_TX_DATA_WR_ULPSUBMODE_V (submode); + val =skb_peek (&csk->write_queue) ?0 :1 ; req->tunnel_to_proxy =htonl (wr_ulp_mode | -FW_OFLD_TX_DATA_WR_SHOVE (skb_peek (&csk->write_queue) ?0 :1 )); +FW_OFLD_TX_DATA_WR_SHOVE_V (val)); req->plen =htonl (len);if (!cxgbi_sock_flag (csk,CTPF_TX_DATA_SENT ))cxgbi_sock_set_flag (csk,CTPF_TX_DATA_SENT );
Signature · 1 line
1.7.1
David Miller
maintainerFrom: Hariprasad Shenai <[email protected]>
Date: Fri, 7 Nov 2014 09:35:22 +0530
Quoted 21 lines
This series moves the debugfs code to a new file
debugfs.cand cleans up macros/register defines.Various patches have ended up changing the style of the symbolic macros/register defines and some of them used the macros/register defines that matches the output of the script from the hardware team.
As a result, the current kernel.org files are a mix of different macro styles. Since this macro/register defines is used by five different drivers, a few patch series have ended up adding duplicate macro/register define entries with different styles. This makes these register define/macro files a complete mess and we want to make them clean and consistent.
Will post few more series so that we can cover all the macros so that they all follow the same style to be consistent.
The patches series is created against 'net-next' tree.
And includes patches on cxgb4, cxgb4vf,iw_cxgb4, csiostor and cxgb4i driver.We have included all the maintainers of respective drivers. Kindly review the change and let us know in case of any review comments.
...
Quoted 3 lines
V3: Use suffix instead of prefix for macros/register defines
V2: Changes the description and cover-letter content to answer David Miller's question
Series applied, thanks.