Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH 1/7] mlx4: Added interrupts test support
From: Roland Dreier @ 2009-10-05 16:18 UTC (permalink / raw)
  To: Yevgeny Petrilin; +Cc: davem, netdev
In-Reply-To: <4AC9D59F.1090409@mellanox.co.il>


 > > Have you actually seen cases where
 > > the interrupt test during initialization works but then this test
 > > catches a problem?  (My experience has been that if any MSI-X interrupts
 > > work from a device, then they'll all work)

 > It also checks that all the EQs work properly. During initialization
 > we only check the asynchronous EQ

Yes, I understand what the code does.  My question was whether you have
ever actually observed a case where the async EQ works but another EQ
doesn't?  In other words is this test useful in practice?

 - R.

^ permalink raw reply

* [PATCH] dcb: data center bridging ops should be r/o
From: Stephen Hemminger @ 2009-10-05 16:01 UTC (permalink / raw)
  To: Jeff Kirsher, Jesse Brandeburg, David Miller; +Cc: netdev, e1000-devel

The data center bridging ops structure can be const

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

--- a/drivers/net/ixgbe/ixgbe.h	2009-10-03 21:40:25.712809970 -0700
+++ b/drivers/net/ixgbe/ixgbe.h	2009-10-03 21:40:33.490342038 -0700
@@ -397,7 +397,7 @@ enum ixgbe_boards {
 extern struct ixgbe_info ixgbe_82598_info;
 extern struct ixgbe_info ixgbe_82599_info;
 #ifdef CONFIG_IXGBE_DCB
-extern struct dcbnl_rtnl_ops dcbnl_ops;
+extern const struct dcbnl_rtnl_ops dcbnl_ops;
 extern int ixgbe_copy_dcb_cfg(struct ixgbe_dcb_config *src_dcb_cfg,
                               struct ixgbe_dcb_config *dst_dcb_cfg,
                               int tc_max);
--- a/drivers/net/ixgbe/ixgbe_dcb_nl.c	2009-10-03 21:39:54.710299317 -0700
+++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c	2009-10-03 21:40:05.990317034 -0700
@@ -563,7 +563,7 @@ static u8 ixgbe_dcbnl_setapp(struct net_
 	return rval;
 }
 
-struct dcbnl_rtnl_ops dcbnl_ops = {
+const struct dcbnl_rtnl_ops dcbnl_ops = {
 	.getstate	= ixgbe_dcbnl_get_state,
 	.setstate	= ixgbe_dcbnl_set_state,
 	.getpermhwaddr	= ixgbe_dcbnl_get_perm_hw_addr,
--- a/include/linux/netdevice.h	2009-10-03 21:40:52.730300256 -0700
+++ b/include/linux/netdevice.h	2009-10-03 21:41:10.362812001 -0700
@@ -909,7 +909,7 @@ struct net_device
 
 #ifdef CONFIG_DCB
 	/* Data Center Bridging netlink ops */
-	struct dcbnl_rtnl_ops *dcbnl_ops;
+	const struct dcbnl_rtnl_ops *dcbnl_ops;
 #endif
 
 #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)

^ permalink raw reply

* [PATCH v2] net: mark net_proto_ops as const
From: Stephen Hemminger @ 2009-10-05 15:58 UTC (permalink / raw)
  To: David Miller; +Cc: netdev
In-Reply-To: <20091004.211107.184509170.davem@davemloft.net>

All usages of structure net_proto_ops should be declared const.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>


---
 drivers/isdn/mISDN/socket.c       |    3 +--
 drivers/net/pppox.c               |    2 +-
 include/net/bluetooth/bluetooth.h |    2 +-
 net/appletalk/ddp.c               |    2 +-
 net/atm/pvc.c                     |    2 +-
 net/atm/svc.c                     |    2 +-
 net/ax25/af_ax25.c                |    2 +-
 net/bluetooth/af_bluetooth.c      |    4 ++--
 net/bluetooth/bnep/sock.c         |    2 +-
 net/bluetooth/cmtp/sock.c         |    2 +-
 net/bluetooth/hci_sock.c          |    2 +-
 net/bluetooth/hidp/sock.c         |    2 +-
 net/bluetooth/l2cap.c             |    2 +-
 net/bluetooth/rfcomm/sock.c       |    2 +-
 net/bluetooth/sco.c               |    2 +-
 net/can/af_can.c                  |    2 +-
 net/decnet/af_decnet.c            |    2 +-
 net/econet/af_econet.c            |    2 +-
 net/ieee802154/af_ieee802154.c    |    2 +-
 net/ipv4/af_inet.c                |    2 +-
 net/ipv6/af_inet6.c               |    2 +-
 net/ipx/af_ipx.c                  |    2 +-
 net/irda/af_irda.c                |    2 +-
 net/iucv/af_iucv.c                |    2 +-
 net/key/af_key.c                  |    2 +-
 net/llc/af_llc.c                  |    2 +-
 net/netlink/af_netlink.c          |    2 +-
 net/netrom/af_netrom.c            |    2 +-
 net/packet/af_packet.c            |    2 +-
 net/phonet/af_phonet.c            |    2 +-
 net/rds/af_rds.c                  |    2 +-
 net/rose/af_rose.c                |    2 +-
 net/rxrpc/af_rxrpc.c              |    2 +-
 net/unix/af_unix.c                |    2 +-
 net/x25/af_x25.c                  |    2 +-
 35 files changed, 36 insertions(+), 37 deletions(-)

--- a/drivers/isdn/mISDN/socket.c	2009-10-05 08:58:02.200284285 -0700
+++ b/drivers/isdn/mISDN/socket.c	2009-10-05 08:58:12.390274786 -0700
@@ -808,8 +808,7 @@ mISDN_sock_create(struct net *net, struc
 	return err;
 }
 
-static struct
-net_proto_family mISDN_sock_family_ops = {
+static const struct net_proto_family mISDN_sock_family_ops = {
 	.owner  = THIS_MODULE,
 	.family = PF_ISDN,
 	.create = mISDN_sock_create,
--- a/drivers/net/pppox.c	2009-10-05 08:58:02.190309763 -0700
+++ b/drivers/net/pppox.c	2009-10-05 08:58:12.390274786 -0700
@@ -125,7 +125,7 @@ out:
 	return rc;
 }
 
-static struct net_proto_family pppox_proto_family = {
+static const struct net_proto_family pppox_proto_family = {
 	.family	= PF_PPPOX,
 	.create	= pppox_create,
 	.owner	= THIS_MODULE,
--- a/include/net/bluetooth/bluetooth.h	2009-10-05 08:58:02.210303506 -0700
+++ b/include/net/bluetooth/bluetooth.h	2009-10-05 08:58:12.390274786 -0700
@@ -121,7 +121,7 @@ struct bt_sock_list {
 	rwlock_t          lock;
 };
 
-int  bt_sock_register(int proto, struct net_proto_family *ops);
+int  bt_sock_register(int proto, const struct net_proto_family *ops);
 int  bt_sock_unregister(int proto);
 void bt_sock_link(struct bt_sock_list *l, struct sock *s);
 void bt_sock_unlink(struct bt_sock_list *l, struct sock *s);
--- a/net/appletalk/ddp.c	2009-10-05 08:58:02.120299538 -0700
+++ b/net/appletalk/ddp.c	2009-10-05 08:58:12.390274786 -0700
@@ -1821,7 +1821,7 @@ static int atalk_compat_ioctl(struct soc
 #endif
 
 
-static struct net_proto_family atalk_family_ops = {
+static const struct net_proto_family atalk_family_ops = {
 	.family		= PF_APPLETALK,
 	.create		= atalk_create,
 	.owner		= THIS_MODULE,
--- a/net/atm/pvc.c	2009-10-05 08:58:02.030300387 -0700
+++ b/net/atm/pvc.c	2009-10-05 08:58:12.390274786 -0700
@@ -137,7 +137,7 @@ static int pvc_create(struct net *net, s
 }
 
 
-static struct net_proto_family pvc_family_ops = {
+static const struct net_proto_family pvc_family_ops = {
 	.family = PF_ATMPVC,
 	.create = pvc_create,
 	.owner = THIS_MODULE,
--- a/net/atm/svc.c	2009-10-05 08:58:02.040304591 -0700
+++ b/net/atm/svc.c	2009-10-05 08:58:12.390274786 -0700
@@ -666,7 +666,7 @@ static int svc_create(struct net *net, s
 }
 
 
-static struct net_proto_family svc_family_ops = {
+static const struct net_proto_family svc_family_ops = {
 	.family = PF_ATMSVC,
 	.create = svc_create,
 	.owner = THIS_MODULE,
--- a/net/ax25/af_ax25.c	2009-10-05 08:58:02.100297833 -0700
+++ b/net/ax25/af_ax25.c	2009-10-05 08:58:12.400273612 -0700
@@ -1961,7 +1961,7 @@ static const struct file_operations ax25
 
 #endif
 
-static struct net_proto_family ax25_family_ops = {
+static const struct net_proto_family ax25_family_ops = {
 	.family =	PF_AX25,
 	.create =	ax25_create,
 	.owner	=	THIS_MODULE,
--- a/net/bluetooth/af_bluetooth.c	2009-10-05 08:58:02.180326441 -0700
+++ b/net/bluetooth/af_bluetooth.c	2009-10-05 08:58:12.400273612 -0700
@@ -45,7 +45,7 @@
 
 /* Bluetooth sockets */
 #define BT_MAX_PROTO	8
-static struct net_proto_family *bt_proto[BT_MAX_PROTO];
+static const struct net_proto_family *bt_proto[BT_MAX_PROTO];
 static DEFINE_RWLOCK(bt_proto_lock);
 
 static struct lock_class_key bt_lock_key[BT_MAX_PROTO];
@@ -86,7 +86,7 @@ static inline void bt_sock_reclassify_lo
 				bt_key_strings[proto], &bt_lock_key[proto]);
 }
 
-int bt_sock_register(int proto, struct net_proto_family *ops)
+int bt_sock_register(int proto, const struct net_proto_family *ops)
 {
 	int err = 0;
 
--- a/net/bluetooth/bnep/sock.c	2009-10-05 08:58:02.190309763 -0700
+++ b/net/bluetooth/bnep/sock.c	2009-10-05 08:58:12.400273612 -0700
@@ -222,7 +222,7 @@ static int bnep_sock_create(struct net *
 	return 0;
 }
 
-static struct net_proto_family bnep_sock_family_ops = {
+static const struct net_proto_family bnep_sock_family_ops = {
 	.family = PF_BLUETOOTH,
 	.owner	= THIS_MODULE,
 	.create = bnep_sock_create
--- a/net/bluetooth/cmtp/sock.c	2009-10-05 08:58:02.180326441 -0700
+++ b/net/bluetooth/cmtp/sock.c	2009-10-05 08:58:12.400273612 -0700
@@ -217,7 +217,7 @@ static int cmtp_sock_create(struct net *
 	return 0;
 }
 
-static struct net_proto_family cmtp_sock_family_ops = {
+static const struct net_proto_family cmtp_sock_family_ops = {
 	.family	= PF_BLUETOOTH,
 	.owner	= THIS_MODULE,
 	.create	= cmtp_sock_create
--- a/net/bluetooth/hci_sock.c	2009-10-05 08:58:02.170284033 -0700
+++ b/net/bluetooth/hci_sock.c	2009-10-05 08:58:12.400273612 -0700
@@ -687,7 +687,7 @@ static int hci_sock_dev_event(struct not
 	return NOTIFY_DONE;
 }
 
-static struct net_proto_family hci_sock_family_ops = {
+static const struct net_proto_family hci_sock_family_ops = {
 	.family	= PF_BLUETOOTH,
 	.owner	= THIS_MODULE,
 	.create	= hci_sock_create,
--- a/net/bluetooth/hidp/sock.c	2009-10-05 08:58:02.160294425 -0700
+++ b/net/bluetooth/hidp/sock.c	2009-10-05 08:58:12.400273612 -0700
@@ -268,7 +268,7 @@ static int hidp_sock_create(struct net *
 	return 0;
 }
 
-static struct net_proto_family hidp_sock_family_ops = {
+static const struct net_proto_family hidp_sock_family_ops = {
 	.family	= PF_BLUETOOTH,
 	.owner	= THIS_MODULE,
 	.create	= hidp_sock_create
--- a/net/bluetooth/l2cap.c	2009-10-05 08:58:02.150281630 -0700
+++ b/net/bluetooth/l2cap.c	2009-10-05 08:58:12.400273612 -0700
@@ -3916,7 +3916,7 @@ static const struct proto_ops l2cap_sock
 	.getsockopt	= l2cap_sock_getsockopt
 };
 
-static struct net_proto_family l2cap_sock_family_ops = {
+static const struct net_proto_family l2cap_sock_family_ops = {
 	.family	= PF_BLUETOOTH,
 	.owner	= THIS_MODULE,
 	.create	= l2cap_sock_create,
--- a/net/bluetooth/rfcomm/sock.c	2009-10-05 08:58:02.170284033 -0700
+++ b/net/bluetooth/rfcomm/sock.c	2009-10-05 08:58:12.400273612 -0700
@@ -1101,7 +1101,7 @@ static const struct proto_ops rfcomm_soc
 	.mmap		= sock_no_mmap
 };
 
-static struct net_proto_family rfcomm_sock_family_ops = {
+static const struct net_proto_family rfcomm_sock_family_ops = {
 	.family		= PF_BLUETOOTH,
 	.owner		= THIS_MODULE,
 	.create		= rfcomm_sock_create
--- a/net/bluetooth/sco.c	2009-10-05 08:58:02.150281630 -0700
+++ b/net/bluetooth/sco.c	2009-10-05 08:58:12.400273612 -0700
@@ -993,7 +993,7 @@ static const struct proto_ops sco_sock_o
 	.getsockopt	= sco_sock_getsockopt
 };
 
-static struct net_proto_family sco_sock_family_ops = {
+static const struct net_proto_family sco_sock_family_ops = {
 	.family	= PF_BLUETOOTH,
 	.owner	= THIS_MODULE,
 	.create	= sco_sock_create,
--- a/net/can/af_can.c	2009-10-05 08:58:02.060274238 -0700
+++ b/net/can/af_can.c	2009-10-05 08:58:12.400273612 -0700
@@ -842,7 +842,7 @@ static struct packet_type can_packet __r
 	.func = can_rcv,
 };
 
-static struct net_proto_family can_family_ops __read_mostly = {
+static const struct net_proto_family can_family_ops = {
 	.family = PF_CAN,
 	.create = can_create,
 	.owner  = THIS_MODULE,
--- a/net/decnet/af_decnet.c	2009-10-05 08:58:02.070299326 -0700
+++ b/net/decnet/af_decnet.c	2009-10-05 08:58:12.400273612 -0700
@@ -2325,7 +2325,7 @@ static const struct file_operations dn_s
 };
 #endif
 
-static struct net_proto_family	dn_family_ops = {
+static const struct net_proto_family	dn_family_ops = {
 	.family =	AF_DECnet,
 	.create =	dn_create,
 	.owner	=	THIS_MODULE,
--- a/net/econet/af_econet.c	2009-10-05 08:58:02.040304591 -0700
+++ b/net/econet/af_econet.c	2009-10-05 08:58:12.400273612 -0700
@@ -742,7 +742,7 @@ static int econet_ioctl(struct socket *s
 	return 0;
 }
 
-static struct net_proto_family econet_family_ops = {
+static const struct net_proto_family econet_family_ops = {
 	.family =	PF_ECONET,
 	.create =	econet_create,
 	.owner	=	THIS_MODULE,
--- a/net/ieee802154/af_ieee802154.c	2009-10-05 08:58:02.090273653 -0700
+++ b/net/ieee802154/af_ieee802154.c	2009-10-05 08:58:12.400273612 -0700
@@ -285,7 +285,7 @@ out:
 	return rc;
 }
 
-static struct net_proto_family ieee802154_family_ops = {
+static const struct net_proto_family ieee802154_family_ops = {
 	.family		= PF_IEEE802154,
 	.create		= ieee802154_create,
 	.owner		= THIS_MODULE,
--- a/net/ipv4/af_inet.c	2009-10-05 08:58:02.120299538 -0700
+++ b/net/ipv4/af_inet.c	2009-10-05 08:58:12.400273612 -0700
@@ -931,7 +931,7 @@ static const struct proto_ops inet_sockr
 #endif
 };
 
-static struct net_proto_family inet_family_ops = {
+static const struct net_proto_family inet_family_ops = {
 	.family = PF_INET,
 	.create = inet_create,
 	.owner	= THIS_MODULE,
--- a/net/ipv6/af_inet6.c	2009-10-05 08:58:02.090273653 -0700
+++ b/net/ipv6/af_inet6.c	2009-10-05 08:58:12.400273612 -0700
@@ -552,7 +552,7 @@ const struct proto_ops inet6_dgram_ops =
 #endif
 };
 
-static struct net_proto_family inet6_family_ops = {
+static const struct net_proto_family inet6_family_ops = {
 	.family = PF_INET6,
 	.create = inet6_create,
 	.owner	= THIS_MODULE,
--- a/net/ipx/af_ipx.c	2009-10-05 08:58:02.060274238 -0700
+++ b/net/ipx/af_ipx.c	2009-10-05 08:58:12.400273612 -0700
@@ -1927,7 +1927,7 @@ static int ipx_compat_ioctl(struct socke
  * Socket family declarations
  */
 
-static struct net_proto_family ipx_family_ops = {
+static const struct net_proto_family ipx_family_ops = {
 	.family		= PF_IPX,
 	.create		= ipx_create,
 	.owner		= THIS_MODULE,
--- a/net/irda/af_irda.c	2009-10-05 08:58:02.010293933 -0700
+++ b/net/irda/af_irda.c	2009-10-05 08:58:12.410362394 -0700
@@ -2463,7 +2463,7 @@ bed:
 	return 0;
 }
 
-static struct net_proto_family irda_family_ops = {
+static const struct net_proto_family irda_family_ops = {
 	.family = PF_IRDA,
 	.create = irda_create,
 	.owner	= THIS_MODULE,
--- a/net/iucv/af_iucv.c	2009-10-05 08:58:02.050336033 -0700
+++ b/net/iucv/af_iucv.c	2009-10-05 08:58:12.410362394 -0700
@@ -1715,7 +1715,7 @@ static const struct proto_ops iucv_sock_
 	.getsockopt	= iucv_sock_getsockopt,
 };
 
-static struct net_proto_family iucv_sock_family_ops = {
+static const struct net_proto_family iucv_sock_family_ops = {
 	.family	= AF_IUCV,
 	.owner	= THIS_MODULE,
 	.create	= iucv_sock_create,
--- a/net/key/af_key.c	2009-10-05 08:58:02.070299326 -0700
+++ b/net/key/af_key.c	2009-10-05 08:58:12.410362394 -0700
@@ -3644,7 +3644,7 @@ static const struct proto_ops pfkey_ops 
 	.recvmsg	=	pfkey_recvmsg,
 };
 
-static struct net_proto_family pfkey_family_ops = {
+static const struct net_proto_family pfkey_family_ops = {
 	.family	=	PF_KEY,
 	.create	=	pfkey_create,
 	.owner	=	THIS_MODULE,
--- a/net/llc/af_llc.c	2009-10-05 08:58:02.020336899 -0700
+++ b/net/llc/af_llc.c	2009-10-05 08:58:12.410362394 -0700
@@ -1092,7 +1092,7 @@ out:
 	return rc;
 }
 
-static struct net_proto_family llc_ui_family_ops = {
+static const struct net_proto_family llc_ui_family_ops = {
 	.family = PF_LLC,
 	.create = llc_ui_create,
 	.owner	= THIS_MODULE,
--- a/net/netlink/af_netlink.c	2009-10-05 08:58:02.030300387 -0700
+++ b/net/netlink/af_netlink.c	2009-10-05 08:58:12.410362394 -0700
@@ -2050,7 +2050,7 @@ static const struct proto_ops netlink_op
 	.sendpage =	sock_no_sendpage,
 };
 
-static struct net_proto_family netlink_family_ops = {
+static const struct net_proto_family netlink_family_ops = {
 	.family = PF_NETLINK,
 	.create = netlink_create,
 	.owner	= THIS_MODULE,	/* for consistency 8) */
--- a/net/netrom/af_netrom.c	2009-10-05 08:58:02.110351485 -0700
+++ b/net/netrom/af_netrom.c	2009-10-05 08:58:12.410362394 -0700
@@ -1372,7 +1372,7 @@ static const struct file_operations nr_i
 };
 #endif	/* CONFIG_PROC_FS */
 
-static struct net_proto_family nr_family_ops = {
+static const struct net_proto_family nr_family_ops = {
 	.family		=	PF_NETROM,
 	.create		=	nr_create,
 	.owner		=	THIS_MODULE,
--- a/net/packet/af_packet.c	2009-10-05 08:58:02.140336163 -0700
+++ b/net/packet/af_packet.c	2009-10-05 08:58:12.410362394 -0700
@@ -2363,7 +2363,7 @@ static const struct proto_ops packet_ops
 	.sendpage =	sock_no_sendpage,
 };
 
-static struct net_proto_family packet_family_ops = {
+static const struct net_proto_family packet_family_ops = {
 	.family =	PF_PACKET,
 	.create =	packet_create,
 	.owner	=	THIS_MODULE,
--- a/net/phonet/af_phonet.c	2009-10-05 08:58:02.130305908 -0700
+++ b/net/phonet/af_phonet.c	2009-10-05 08:58:12.410362394 -0700
@@ -118,7 +118,7 @@ out:
 	return err;
 }
 
-static struct net_proto_family phonet_proto_family = {
+static const struct net_proto_family phonet_proto_family = {
 	.family = PF_PHONET,
 	.create = pn_socket_create,
 	.owner = THIS_MODULE,
--- a/net/rds/af_rds.c	2009-10-05 08:58:02.000283931 -0700
+++ b/net/rds/af_rds.c	2009-10-05 08:58:12.410362394 -0700
@@ -431,7 +431,7 @@ void rds_sock_put(struct rds_sock *rs)
 	sock_put(rds_rs_to_sk(rs));
 }
 
-static struct net_proto_family rds_family_ops = {
+static const struct net_proto_family rds_family_ops = {
 	.family =	AF_RDS,
 	.create =	rds_create,
 	.owner	=	THIS_MODULE,
--- a/net/rose/af_rose.c	2009-10-05 08:58:02.140336163 -0700
+++ b/net/rose/af_rose.c	2009-10-05 08:58:12.410362394 -0700
@@ -1509,7 +1509,7 @@ static const struct file_operations rose
 };
 #endif	/* CONFIG_PROC_FS */
 
-static struct net_proto_family rose_family_ops = {
+static const struct net_proto_family rose_family_ops = {
 	.family		=	PF_ROSE,
 	.create		=	rose_create,
 	.owner		=	THIS_MODULE,
--- a/net/rxrpc/af_rxrpc.c	2009-10-05 08:58:02.020336899 -0700
+++ b/net/rxrpc/af_rxrpc.c	2009-10-05 08:58:12.410362394 -0700
@@ -777,7 +777,7 @@ static struct proto rxrpc_proto = {
 	.max_header	= sizeof(struct rxrpc_header),
 };
 
-static struct net_proto_family rxrpc_family_ops = {
+static const struct net_proto_family rxrpc_family_ops = {
 	.family	= PF_RXRPC,
 	.create = rxrpc_create,
 	.owner	= THIS_MODULE,
--- a/net/unix/af_unix.c	2009-10-05 08:58:02.080273360 -0700
+++ b/net/unix/af_unix.c	2009-10-05 08:58:12.420298364 -0700
@@ -2214,7 +2214,7 @@ static const struct file_operations unix
 
 #endif
 
-static struct net_proto_family unix_family_ops = {
+static const struct net_proto_family unix_family_ops = {
 	.family = PF_UNIX,
 	.create = unix_create,
 	.owner	= THIS_MODULE,
--- a/net/x25/af_x25.c	2009-10-05 08:58:02.010293933 -0700
+++ b/net/x25/af_x25.c	2009-10-05 08:58:12.420298364 -0700
@@ -1476,7 +1476,7 @@ static int x25_ioctl(struct socket *sock
 	return rc;
 }
 
-static struct net_proto_family x25_family_ops = {
+static const struct net_proto_family x25_family_ops = {
 	.family =	AF_X25,
 	.create =	x25_create,
 	.owner	=	THIS_MODULE,

^ permalink raw reply

* Re: [6/8,RFC] CAIF Protocol Stack
From: Stefano Babic @ 2009-10-05 15:17 UTC (permalink / raw)
  To: sjur.brandeland; +Cc: netdev, Kim.xx.Lilliestierna
In-Reply-To: <1253727091-10383-1-git-send-email-sjur.brandeland@stericsson.com>

sjur.brandeland@stericsson.com wrote:
> From: Kim Lilliestierna <Kim.xx.Lilliestierna@ericsson.com>
> 
> Signed-off-by: sjur.brandeland@stericsson.com

Hi Sjur,

>  drivers/net/caif/chnl_tty.c   |  220 +++++++++++

There is no rule in drivers/net/caif/Makefile regarding this file and it
is not mentioned in the documentation. Is there anything missing ? I
supposed the serial physical layer is implemented in phyif_ser.c.

Regards,
Stefano

-- 
stefano <stefano.babic@babic.homelinux.org>
GPG Key: 0x55814DDE
Fingerprint 4E85 2A66 4CBA 497A 2A7B D3BF 5973 F216 5581 4DDE

^ permalink raw reply

* Re: [5/8,RFC] CAIF Protocol Stack
From: Stefano Babic @ 2009-10-05 15:16 UTC (permalink / raw)
  To: sjur.brandeland; +Cc: netdev, Kim.xx.Lilliestierna
In-Reply-To: <1253727086-10353-1-git-send-email-sjur.brandeland@stericsson.com>

sjur.brandeland@stericsson.com wrote:
> From: Kim Lilliestierna <Kim.xx.Lilliestierna@ericsson.com>
> 
> Signed-off-by: sjur.brandeland@stericsson.com

Hi Sjur,

> +obj-$(CAIF_CHRDEV) += chnl_chr.o

Probably this should be obj-$(CONFIG_CAIF_CHARDEV) += chnl_chr.o

> +
> +# Net device
> +obj-$(CAIF_NETDEV) += chnl_net.o

Should be maybe CONFIG_CAIF_NETDEV ?

Stefano

-- 
stefano <stefano.babic@babic.homelinux.org>
GPG Key: 0x55814DDE
Fingerprint 4E85 2A66 4CBA 497A 2A7B D3BF 5973 F216 5581 4DDE

^ permalink raw reply

* Re: [PATCH net-next-2.6] bonding: remove useless assignment
From: Jiri Pirko @ 2009-10-05 14:52 UTC (permalink / raw)
  To: Nicolas de Pesloüan
  Cc: netdev, David Miller, Jay Vosburgh, bonding-devel
In-Reply-To: <4AB67242.6060803@free.fr>

Sun, Sep 20, 2009 at 08:19:46PM CEST, nicolas.2p.debian@free.fr wrote:
> The variable old_active is first set to bond->curr_active_slave.
> Then, it is unconditionally set to new_active, without being used in between.
>
> The first assignment, having no side effect, is useless.

Correct.

>
> Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>

Reviewed-by: Jiri Pirko <jpirko@redhat.com>

>
> ---
>
> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index a7e731f..fce7233 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -1084,7 +1084,7 @@ static struct slave *bond_find_best_slave(struct bonding *bond)
>         int mintime = bond->params.updelay;
>         int i;
>
> -       new_active = old_active = bond->curr_active_slave;
> +       new_active = bond->curr_active_slave;
>
>         if (!new_active) { /* there were no active slaves left */
>                 if (bond->slave_cnt > 0)   /* found one slave */
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* [PATCH] add maintainer for network drop monitor kernel service
From: Neil Horman @ 2009-10-05 13:56 UTC (permalink / raw)
  To: netdev

I was getting ribbed about this earlier, so I figured I'd make it official.  Add
myself as the maintainer of the drop monitor bits, so people don't just gripe at
Dave when it breaks (I'm sure it will never break, but just in case :) ).

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>

diff --git a/MAINTAINERS b/MAINTAINERS
index 09a2028..c57c2e6 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3643,6 +3643,13 @@ F:	Documentation/blockdev/nbd.txt
 F:	drivers/block/nbd.c
 F:	include/linux/nbd.h
 
+NETWORK DROP MONITOR
+M:	Neil Horman <nhorman@tuxdriver.com>
+L:	netdev@vger.kernel.org
+S:	Maintained
+W:	https://fedorahosted.org/dropwatch/
+F:	net/core/drop_monitor.c
+
 NETWORKING [GENERAL]
 M:	"David S. Miller" <davem@davemloft.net>
 L:	netdev@vger.kernel.org

^ permalink raw reply related

* [PATCH] Add sk_mark route lookup support for IPv4 listening sockets, and for IPv4 multicast forwarding
From: Atis Elsts @ 2009-10-05 13:46 UTC (permalink / raw)
  To: netdev; +Cc: David Miller, panther, eric.dumazet, brian.haley, zenczykowski

This is followup to my previous route lookup patch, it adds sk_mark based routing lookup support in even more places. Now it is possible to have e.g. TCP server listening to connection requests in a specific routing table specified by SO_MARK socket option.

Also, correct me if I'm wrong, but syncookie route lookup still seems to be broken in more than one way. The sk_bound_dev_if interface from socket is not used; and route lookup is done in init_net, instead of using sock_net(sk).
cookie_v6_check() in net/ipv6/syncookies.c probably needs a patch as well.


Add support for route lookup using sk_mark on IPv4 listening sockets, and for IPv4 multicast forwarding
Signed-off-by: Atis Elsts <atis@mikrotik.com>
---
 net/ipv4/inet_connection_sock.c |    1 +
 net/ipv4/ipmr.c                 |    2 ++
 net/ipv4/syncookies.c           |    3 ++-
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index 4351ca2..9139e8f 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -358,6 +358,7 @@ struct dst_entry *inet_csk_route_req(struct sock *sk,
 	const struct inet_request_sock *ireq = inet_rsk(req);
 	struct ip_options *opt = inet_rsk(req)->opt;
 	struct flowi fl = { .oif = sk->sk_bound_dev_if,
+			    .mark = sk->sk_mark,
 			    .nl_u = { .ip4_u =
 				      { .daddr = ((opt && opt->srr) ?
 						  opt->faddr :
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 630a56d..66c58e4 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -1238,6 +1238,7 @@ static void ipmr_queue_xmit(struct sk_buff *skb, struct mfc_cache *c, int vifi)
 
 	if (vif->flags&VIFF_TUNNEL) {
 		struct flowi fl = { .oif = vif->link,
+				    .mark = skb->mark,
 				    .nl_u = { .ip4_u =
 					      { .daddr = vif->remote,
 						.saddr = vif->local,
@@ -1248,6 +1249,7 @@ static void ipmr_queue_xmit(struct sk_buff *skb, struct mfc_cache *c, int vifi)
 		encap = sizeof(struct iphdr);
 	} else {
 		struct flowi fl = { .oif = vif->link,
+				    .mark = skb->mark,
 				    .nl_u = { .ip4_u =
 					      { .daddr = iph->daddr,
 						.tos = RT_TOS(iph->tos) } },
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
index a6e0e07..5ec678a 100644
--- a/net/ipv4/syncookies.c
+++ b/net/ipv4/syncookies.c
@@ -333,7 +333,8 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
 	 * no easy way to do this.
 	 */
 	{
-		struct flowi fl = { .nl_u = { .ip4_u =
+		struct flowi fl = { .mark = sk->sk_mark,
+				    .nl_u = { .ip4_u =
 					      { .daddr = ((opt && opt->srr) ?
 							  opt->faddr :
 							  ireq->rmt_addr),

^ permalink raw reply related

* [PATCH] pasemi_mac: ethtool set settings support
From: Valentine Barshak @ 2009-10-05 13:31 UTC (permalink / raw)
  To: Olof Johansson; +Cc: linuxppc-dev, jgarzik, netdev
In-Reply-To: <4AC9ED9B.5040400@ru.mvista.com>

Add ethtool set settings to pasemi_mac_ethtool.

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
---
 drivers/net/pasemi_mac_ethtool.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff -pruN linux-2.6.orig/drivers/net/pasemi_mac_ethtool.c linux-2.6/drivers/net/pasemi_mac_ethtool.c
--- linux-2.6.orig/drivers/net/pasemi_mac_ethtool.c	2009-10-05 16:24:14.000000000 +0400
+++ linux-2.6./drivers/net/pasemi_mac_ethtool.c	2009-10-05 16:27:08.000000000 +0400
@@ -77,6 +77,19 @@ pasemi_mac_ethtool_get_settings(struct n
 	return phy_ethtool_gset(phydev, cmd);
 }
 
+static int
+pasemi_mac_ethtool_set_settings(struct net_device *netdev,
+			       struct ethtool_cmd *cmd)
+{
+	struct pasemi_mac *mac = netdev_priv(netdev);
+	struct phy_device *phydev = mac->phydev;
+
+	if (!phydev)
+		return -EOPNOTSUPP;
+
+	return phy_ethtool_sset(phydev, cmd);
+}
+
 static void
 pasemi_mac_ethtool_get_drvinfo(struct net_device *netdev,
 			       struct ethtool_drvinfo *drvinfo)
@@ -150,6 +163,7 @@ static void pasemi_mac_get_strings(struc
 
 const struct ethtool_ops pasemi_mac_ethtool_ops = {
 	.get_settings		= pasemi_mac_ethtool_get_settings,
+	.set_settings		= pasemi_mac_ethtool_set_settings,
 	.get_drvinfo		= pasemi_mac_ethtool_get_drvinfo,
 	.get_msglevel		= pasemi_mac_ethtool_get_msglevel,
 	.set_msglevel		= pasemi_mac_ethtool_set_msglevel,

^ permalink raw reply

* [PATCH] pasemi_mac: ethtool get settings fix
From: Valentine Barshak @ 2009-10-05 13:27 UTC (permalink / raw)
  To: Olof Johansson; +Cc: linuxppc-dev, jgarzik, netdev
In-Reply-To: <4AC9ED9B.5040400@ru.mvista.com>

Not all pasemi mac interfaces can have a phy attached.
For example, XAUI has no phy and phydev is NULL for it.
In this case ethtool get settings causes kernel crash.
Fix it by returning -EOPNOTSUPP if there's no PHY attached.

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
---
 drivers/net/pasemi_mac_ethtool.c |    3 +++
 1 file changed, 3 insertions(+)

diff -pruN linux-2.6.orig/drivers/net/pasemi_mac_ethtool.c linux-2.6/drivers/net/pasemi_mac_ethtool.c
--- linux-2.6.orig/drivers/net/pasemi_mac_ethtool.c	2009-02-14 03:23:08.000000000 +0300
+++ linux-2.6/drivers/net/pasemi_mac_ethtool.c	2009-10-05 16:21:52.000000000 +0400
@@ -71,6 +71,9 @@ pasemi_mac_ethtool_get_settings(struct n
 	struct pasemi_mac *mac = netdev_priv(netdev);
 	struct phy_device *phydev = mac->phydev;
 
+	if (!phydev)
+		return -EOPNOTSUPP;
+
 	return phy_ethtool_gset(phydev, cmd);
 }

^ permalink raw reply

* Re: [net-next-2.6 PATCH 6/9] vxge: Check if FCS stripping is disabled by the firmware.
From: Eric Dumazet @ 2009-10-05 13:04 UTC (permalink / raw)
  To: Sreenivasa Honnur; +Cc: davem, netdev, support
In-Reply-To: <Pine.GSO.4.10.10910050755480.9377-100000@guinness>

Sreenivasa Honnur a écrit :
> - Added a function to check if FCS stripping is disabled by the firmware, if
>   it is not disabled fail driver load.
> 
> - By default FCS stripping is disabled by the firmware. With this assumption
>   driver decrements the indicated packet length by 4 bytes(FCS length).
> 
> - This patch ensures that FCS stripping is disabled during driver load time.
> 
> Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>

What the big deal about FCS not being stripped ?

Denying driver load for this litle detail seems very hard.
You could issue a warning if there is a performance hit, but allow the driver
to function.

If this adapter has the ability to disable/enable it at firmware level,
you might replace

pkt_length -= ETH_FCS_LEN;

by :

pkt_length -= adapter->fcs_length;  

Granted you initialized adapter->fcs_length to 0 or 4 depending on firmware setup.



^ permalink raw reply

* Re: [1/8,RFC] CAIF Protocol Stack
From: Stefano Babic @ 2009-10-05 12:55 UTC (permalink / raw)
  To: sjur.brandeland; +Cc: netdev, Kim.xx.Lilliestierna
In-Reply-To: <1253727026-10233-1-git-send-email-sjur.brandeland@stericsson.com>

sjur.brandeland@stericsson.com wrote:

> diff --git a/include/linux/caif/caif_ioctl.h b/include/linux/caif/caif_ioctl.h
> new file mode 100644
> index 0000000..4fdd648
> --- /dev/null
> +++ b/include/linux/caif/caif_ioctl.h

[snip]

> +/**
> + * union caif_action
> + * This union is used to configure a new CAIF Channel and
> + */
> +
> +union caif_action {
> +	struct caif_device_name delete_channel;
> +	struct caif_channel_create_action create_channel;
> +};

It seems this structure is defined twice (here and in caif_actions.h)
and some modules (at least phyif_ser, I could check) are not compiled
clean, because both header files are included. Maybe should be protected
with ifndef __KERNEL__ ?

Regards,
Stefano

-- 
stefano <stefano.babic@babic.homelinux.org>
GPG Key: 0x55814DDE
Fingerprint 4E85 2A66 4CBA 497A 2A7B D3BF 5973 F216 5581 4DDE

^ permalink raw reply

* Re: [PATCH] pasemi_mac: ethtool get settings fix
From: Valentine @ 2009-10-05 12:59 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: netdev
In-Reply-To: <20091001222748.GA21276@ru.mvista.com>

Resending pasemi_mac ethtool patches...

Valentine Barshak wrote:
> Not all pasemi mac interfaces can have a phy attached.
> For example, XAUI has no phy and phydev is NULL for it.
> In this case ethtool get settings causes kernel crash.
> Fix it by returning -EOPNOTSUPP if there's no PHY attached.
> 
> Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
> ---
>  drivers/net/pasemi_mac_ethtool.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> --- linux-2.6.21.orig/drivers/net/pasemi_mac_ethtool.c	2008-11-06 18:10:38.000000000 +0300
> +++ linux-2.6.21/drivers/net/pasemi_mac_ethtool.c	2008-11-19 19:24:28.000000000 +0300
> @@ -71,6 +71,8 @@ pasemi_mac_ethtool_get_settings(struct n
>  	struct pasemi_mac *mac = netdev_priv(netdev);
>  	struct phy_device *phydev = mac->phydev;
>  
> +	if (!phydev)
> +		return -EOPNOTSUPP;
>  	return phy_ethtool_gset(phydev, cmd);
>  }
>  
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev


^ permalink raw reply

* Re: [PATCH] Use sk_mark for IPv6 routing lookups
From: Atis Elsts @ 2009-10-05 12:55 UTC (permalink / raw)
  To: Brian Haley; +Cc: Maciej Żenczykowski, Eric Dumazet, David Miller, netdev
In-Reply-To: <4AC64419.6020202@hp.com>

On Friday 02 October 2009 21:19:05 Brian Haley wrote:
> Maciej Żenczykowski wrote:
> > Cool!
> > 
> > As I've already pointed out in a post 2 or so weeks ago, we need the
> > exact same treatment in a ton of places throughout the code (tcp,
> > ipv6, decnet, etc...).
> 
> Here's a try at the IPv6 part...
> 
> 
> Add support for IPv6 route lookups using sk_mark.
> 

Not sure if there is need to fill the mark from skb in tunnel xmit functions. In any case, it's not done for GRE or IPIP tunnels at the moment.

Also, in this patch you are doing that for SIT (v6-in-v4) tunnels only, and not doing it for v4-in-v6 or v6-in-v6 tunnels. Any reason for that?

Atis

^ permalink raw reply

* Re: [PATCH 0/4][RFC]: coding convention for CCID-struct prefixes
From: Arnaldo Carvalho de Melo @ 2009-10-05 12:38 UTC (permalink / raw)
  To: Gerrit Renker, David Miller, dccp, netdev
In-Reply-To: <20091005112359.GB5156@gerrit.erg.abdn.ac.uk>

Em Mon, Oct 05, 2009 at 01:23:59PM +0200, Gerrit Renker escreveu:
> | After Arnaldo takes a look, I can add this as-is to net-next-2.6
> This should work, they have been compile/sparse-tested and apply cleanly on net-2.6.
> 
> I am waiting for the feedback also in order to rebuild the test tree; and have
> informed CCID-4 developers (CCID-4 subtree) about this.

On a first look I saw one inconsistency, while in ccid3 you do:

-	return scaled_div(w_init << 6, hctx->tx_rtt);
+	return scaled_div(w_init << 6, hc->tx_rtt);

in ccid2 you do:

-	struct ccid2_seq *seqp = hctx->ccid2hctx_seqh;
+	struct ccid2_seq *seqp = hctx->tx_seqh;

Since this change is about reducing the names by removing redundancy, I
think the ccid3 variant is better, i.e.: hc->tx_foo.

- Arnaldo

^ permalink raw reply

* Re: [net-next-2.6 PATCH 8/9] vxge: Acquire correct lock based on interrupt context.
From: David Miller @ 2009-10-05 12:37 UTC (permalink / raw)
  To: Sreenivasa.Honnur; +Cc: netdev, support
In-Reply-To: <Pine.GSO.4.10.10910050757300.9377-100000@guinness>

From: Sreenivasa Honnur <Sreenivasa.Honnur@neterion.com>
Date: Mon, 5 Oct 2009 07:58:42 -0400 (EDT)

> - Added macros that check if the thread is in interrupt context or not to
>   acquire or release locks
> 
> Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>

There is nothing at all wrong with using irqsave/irqrestore spin lock
calls when you're already in an interrupt.

I don't see any reason for this change.

^ permalink raw reply

* [PATCH 3/3] be2net: Bug fix to properly update ethtool tx-checksumming after ethtool -K <ifname> tx off
From: Ajit Khaparde @ 2009-10-05 12:22 UTC (permalink / raw)
  To: davem, netdev

This is a fix for a bug which was a result of wrong use of checksum offload flag.
The status of tx-checksumming was not changed from on to off
after a 'ethtool -K <ifname> tx off' operation.
Use the proper checksum offload flag NETIF_F_HW_CSUM instead of 
NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM.
Patch is against net-2.6 tree.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
---
 drivers/net/benet/be_ethtool.c |    2 +-
 drivers/net/benet/be_main.c    |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/benet/be_ethtool.c b/drivers/net/benet/be_ethtool.c
index 11445df..cda5bf2 100644
--- a/drivers/net/benet/be_ethtool.c
+++ b/drivers/net/benet/be_ethtool.c
@@ -358,7 +358,7 @@ const struct ethtool_ops be_ethtool_ops = {
 	.get_rx_csum = be_get_rx_csum,
 	.set_rx_csum = be_set_rx_csum,
 	.get_tx_csum = ethtool_op_get_tx_csum,
-	.set_tx_csum = ethtool_op_set_tx_csum,
+	.set_tx_csum = ethtool_op_set_tx_hw_csum,
 	.get_sg = ethtool_op_get_sg,
 	.set_sg = ethtool_op_set_sg,
 	.get_tso = ethtool_op_get_tso,
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index e86b2f3..6d5e81f 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -1899,8 +1899,8 @@ static void be_netdev_init(struct net_device *netdev)
 	struct be_adapter *adapter = netdev_priv(netdev);
 
 	netdev->features |= NETIF_F_SG | NETIF_F_HW_VLAN_RX | NETIF_F_TSO |
-		NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_FILTER | NETIF_F_IP_CSUM |
-		NETIF_F_IPV6_CSUM | NETIF_F_GRO;
+		NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_FILTER | NETIF_F_HW_CSUM |
+		NETIF_F_GRO;
 
 	netdev->flags |= IFF_MULTICAST;
 
-- 
1.6.0.4


^ permalink raw reply related

* [PATCH 2/3] be2net: Fix a typo in be_cmds.h
From: Ajit Khaparde @ 2009-10-05 12:22 UTC (permalink / raw)
  To: davem, netdev

MCC_STATUS_NOT_SUPPORTED should be decimal 66 not hex 66.
This patch fixes this typo. Patch against net-2.6 tree.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
---
 drivers/net/benet/be_cmds.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/benet/be_cmds.h b/drivers/net/benet/be_cmds.h
index 8b4c2cb..a86f917 100644
--- a/drivers/net/benet/be_cmds.h
+++ b/drivers/net/benet/be_cmds.h
@@ -62,7 +62,7 @@ enum {
 	MCC_STATUS_QUEUE_FLUSHING = 0x4,
 /* The command is completing with a DMA error */
 	MCC_STATUS_DMA_FAILED = 0x5,
-	MCC_STATUS_NOT_SUPPORTED = 0x66
+	MCC_STATUS_NOT_SUPPORTED = 66
 };
 
 #define CQE_STATUS_COMPL_MASK		0xFFFF
-- 
1.6.0.4


^ permalink raw reply related

* [PATCH 1/3] be2net: Bug Fix while accounting of multicast frames during netdev stats update
From: Ajit Khaparde @ 2009-10-05 12:21 UTC (permalink / raw)
  To: davem, netdev

While updating the statistics to be passed via the get_stats,
tx multicast frames were being accounted instead of rx multicast frames.
This patch fixes the bug. This patch is against the net-2.6 tree.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
---
 drivers/net/benet/be_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 2f9b501..e86b2f3 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -197,7 +197,7 @@ void netdev_stats_update(struct be_adapter *adapter)
 	/* no space available in linux */
 	dev_stats->tx_dropped = 0;
 
-	dev_stats->multicast = port_stats->tx_multicastframes;
+	dev_stats->multicast = port_stats->rx_multicast_frames;
 	dev_stats->collisions = 0;
 
 	/* detailed tx_errors */
-- 
1.6.0.4


^ permalink raw reply related

* [net-next-2.6 PATCH 9/9] vxge: Version update.
From: Sreenivasa Honnur @ 2009-10-05 11:59 UTC (permalink / raw)
  To: davem; +Cc: netdev, support

- Version Update.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
---
diff -urpN orig/drivers/net/vxge/vxge-version.h patch-9/drivers/net/vxge/vxge-version.h
--- orig/drivers/net/vxge/vxge-version.h	2009-10-04 22:43:59.000000000 -0700
+++ patch-9/drivers/net/vxge/vxge-version.h	2009-10-04 22:43:08.000000000 -0700
@@ -17,7 +17,7 @@
 
 #define VXGE_VERSION_MAJOR	"2"
 #define VXGE_VERSION_MINOR	"0"
-#define VXGE_VERSION_FIX	"5"
-#define VXGE_VERSION_BUILD	"18053"
+#define VXGE_VERSION_FIX	"6"
+#define VXGE_VERSION_BUILD	"18707"
 #define VXGE_VERSION_FOR	"k"
 #endif


^ permalink raw reply

* [net-next-2.6 PATCH 8/9] vxge: Acquire correct lock based on interrupt context.
From: Sreenivasa Honnur @ 2009-10-05 11:58 UTC (permalink / raw)
  To: davem; +Cc: netdev, support

- Added macros that check if the thread is in interrupt context or not to
  acquire or release locks

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
---
diff -urpN patch7/drivers/net/vxge/vxge-main.c patch8/drivers/net/vxge/vxge-main.c
--- patch7/drivers/net/vxge/vxge-main.c	2009-09-04 02:13:34.000000000 -0700
+++ patch8/drivers/net/vxge/vxge-main.c	2009-09-04 02:18:15.000000000 -0700
@@ -97,10 +97,10 @@ static inline void VXGE_COMPLETE_VPATH_T
 		more = 0;
 		skb_ptr = completed;
 
-		if (spin_trylock_irqsave(&fifo->tx_lock, flags)) {
+		if (vxge_spin_trylock(&fifo->tx_lock, flags)) {
 			vxge_hw_vpath_poll_tx(fifo->handle, &skb_ptr,
 						NR_SKB_COMPLETED, &more);
-			spin_unlock_irqrestore(&fifo->tx_lock, flags);
+			vxge_spin_unlock(&fifo->tx_lock, flags);
 		}
 		/* free SKBs */
 		for (temp = completed; temp != skb_ptr; temp++)
diff -urpN patch7/drivers/net/vxge/vxge-main.h patch8/drivers/net/vxge/vxge-main.h
--- patch7/drivers/net/vxge/vxge-main.h	2009-09-04 02:05:36.000000000 -0700
+++ patch8/drivers/net/vxge/vxge-main.h	2009-09-04 02:16:40.000000000 -0700
@@ -89,6 +89,26 @@
 
 #define VXGE_LL_MAX_FRAME_SIZE(dev) ((dev)->mtu + VXGE_HW_MAC_HEADER_MAX_SIZE)
 
+#define vxge_spin_lock(l, f) {                  \
+	if (in_interrupt())                     \
+		spin_lock(l);                   \
+	else                                    \
+		spin_lock_irqsave(l, f);        \
+}
+
+#define vxge_spin_trylock(l, f) \
+({ \
+	in_interrupt() ? \
+	spin_trylock(l) : spin_trylock_irqsave(l, f); \
+})
+
+#define vxge_spin_unlock(l, f) {                \
+	if (in_interrupt())                     \
+		spin_unlock(l);                 \
+	else                                    \
+		spin_unlock_irqrestore(l, f);   \
+}
+
 enum vxge_reset_event {
 	/* reset events */
 	VXGE_LL_VPATH_RESET	= 0,


^ permalink raw reply

* [net-next-2.6 PATCH 7/9] vxge: Allow multiple functions with INTA.
From: Sreenivasa Honnur @ 2009-10-05 11:57 UTC (permalink / raw)
  To: davem; +Cc: netdev, support

- Allow multiple functions with INTA.
- Removed the condition to allow only one vpath with INTA
- Ensure that the alarm bit in titan_mask_all_int register is cleared when
  driver exits.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
---
diff -urpN patch6/drivers/net/vxge/vxge-config.c patch7/drivers/net/vxge/vxge-config.cllow multiple functions with INTA.
- Removed the condition to allow only one vpath with INTA
- Ensure that the alarm bit in titan_mask_all_int register is cleared when
  driver exits.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
---
--- patch6/drivers/net/vxge/vxge-config.c	2009-09-04 01:33:43.000000000 -0700
+++ patch7/drivers/net/vxge/vxge-config.c	2009-09-04 02:11:29.000000000 -0700
@@ -3882,6 +3882,30 @@ __vxge_hw_vpath_tim_configure(struct __v
 	return status;
 }
 
+void
+vxge_hw_vpath_tti_ci_set(struct __vxge_hw_device *hldev, u32 vp_id)
+{
+	struct __vxge_hw_virtualpath *vpath;
+	struct vxge_hw_vpath_reg __iomem *vp_reg;
+	struct vxge_hw_vp_config *config;
+	u64 val64;
+
+	vpath = &hldev->virtual_paths[vp_id];
+	vp_reg = vpath->vp_reg;
+	config = vpath->vp_config;
+
+	if (config->fifo.enable == VXGE_HW_FIFO_ENABLE) {
+		val64 = readq(&vp_reg->tim_cfg1_int_num[VXGE_HW_VPATH_INTR_TX]);
+
+		if (config->tti.timer_ci_en != VXGE_HW_TIM_TIMER_CI_ENABLE) {
+			config->tti.timer_ci_en = VXGE_HW_TIM_TIMER_CI_ENABLE;
+			val64 |= VXGE_HW_TIM_CFG1_INT_NUM_TIMER_CI;
+			writeq(val64,
+			&vp_reg->tim_cfg1_int_num[VXGE_HW_VPATH_INTR_TX]);
+		}
+	}
+	return;
+}
 /*
  * __vxge_hw_vpath_initialize
  * This routine is the final phase of init which initializes the
diff -urpN patch6/drivers/net/vxge/vxge-main.c patch7/drivers/net/vxge/vxge-main.c
--- patch6/drivers/net/vxge/vxge-main.c	2009-09-04 01:31:12.000000000 -0700
+++ patch7/drivers/net/vxge/vxge-main.c	2009-09-04 02:13:34.000000000 -0700
@@ -2435,7 +2435,6 @@ static int vxge_add_isr(struct vxgedev *
 	int ret = 0;
 #ifdef CONFIG_PCI_MSI
 	int vp_idx = 0, intr_idx = 0, intr_cnt = 0, msix_idx = 0, irq_req = 0;
-	u64 function_mode = vdev->config.device_hw_info.function_mode;
 	int pci_fun = PCI_FUNC(vdev->pdev->devfn);
 
 	if (vdev->config.intr_type == MSI_X)
@@ -2444,20 +2443,9 @@ static int vxge_add_isr(struct vxgedev *
 	if (ret) {
 		vxge_debug_init(VXGE_ERR,
 			"%s: Enabling MSI-X Failed", VXGE_DRIVER_NAME);
-		if ((function_mode == VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION) &&
-			test_and_set_bit(__VXGE_STATE_CARD_UP,
-				&driver_config->inta_dev_open))
-			return VXGE_HW_FAIL;
-		else {
-			vxge_debug_init(VXGE_ERR,
-				"%s: Defaulting to INTA", VXGE_DRIVER_NAME);
-			vdev->config.intr_type = INTA;
-			vxge_hw_device_set_intr_type(vdev->devh,
-				VXGE_HW_INTR_MODE_IRQLINE);
-			vxge_close_vpaths(vdev, 1);
-			vdev->no_of_vpath = 1;
-			vdev->stats.vpaths_open = 1;
-		}
+		vxge_debug_init(VXGE_ERR,
+			"%s: Defaulting to INTA", VXGE_DRIVER_NAME);
+		vdev->config.intr_type = INTA;
 	}
 
 	if (vdev->config.intr_type == MSI_X) {
@@ -2505,24 +2493,11 @@ static int vxge_add_isr(struct vxgedev *
 					"%s: MSIX - %d  Registration failed",
 					vdev->ndev->name, intr_cnt);
 				vxge_rem_msix_isr(vdev);
-				if ((function_mode ==
-					VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION) &&
-					test_and_set_bit(__VXGE_STATE_CARD_UP,
-						&driver_config->inta_dev_open))
-					return VXGE_HW_FAIL;
-				else {
-					vxge_hw_device_set_intr_type(
-						vdev->devh,
-						VXGE_HW_INTR_MODE_IRQLINE);
-						vdev->config.intr_type = INTA;
-					vxge_debug_init(VXGE_ERR,
-						"%s: Defaulting to INTA"
-						, vdev->ndev->name);
-					vxge_close_vpaths(vdev, 1);
-					vdev->no_of_vpath = 1;
-					vdev->stats.vpaths_open = 1;
+				vdev->config.intr_type = INTA;
+				vxge_debug_init(VXGE_ERR,
+					"%s: Defaulting to INTA"
+					, vdev->ndev->name);
 					goto INTA_MODE;
-				}
 			}
 
 			if (irq_req) {
@@ -2555,23 +2530,11 @@ static int vxge_add_isr(struct vxgedev *
 				"%s: MSIX - %d Registration failed",
 				vdev->ndev->name, intr_cnt);
 			vxge_rem_msix_isr(vdev);
-			if ((function_mode ==
-				VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION) &&
-				test_and_set_bit(__VXGE_STATE_CARD_UP,
-						&driver_config->inta_dev_open))
-				return VXGE_HW_FAIL;
-			else {
-				vxge_hw_device_set_intr_type(vdev->devh,
-						VXGE_HW_INTR_MODE_IRQLINE);
-				vdev->config.intr_type = INTA;
-				vxge_debug_init(VXGE_ERR,
-					"%s: Defaulting to INTA",
-					vdev->ndev->name);
-				vxge_close_vpaths(vdev, 1);
-				vdev->no_of_vpath = 1;
-				vdev->stats.vpaths_open = 1;
+			vdev->config.intr_type = INTA;
+			vxge_debug_init(VXGE_ERR,
+				"%s: Defaulting to INTA",
+				vdev->ndev->name);
 				goto INTA_MODE;
-			}
 		}
 
 		vxge_hw_vpath_msix_unmask(vdev->vpaths[vp_idx].handle,
@@ -2584,6 +2547,10 @@ INTA_MODE:
 	snprintf(vdev->desc[0], VXGE_INTR_STRLEN, "%s:vxge", vdev->ndev->name);
 
 	if (vdev->config.intr_type == INTA) {
+		vxge_hw_device_set_intr_type(vdev->devh,
+			VXGE_HW_INTR_MODE_IRQLINE);
+		vxge_hw_vpath_tti_ci_set(vdev->devh,
+			vdev->vpaths[0].device_id);
 		ret = request_irq((int) vdev->pdev->irq,
 			vxge_isr_napi,
 			IRQF_SHARED, vdev->desc[0], vdev);
@@ -2688,13 +2655,6 @@ vxge_open(struct net_device *dev)
 	 * initialized */
 	netif_carrier_off(dev);
 
-	/* Check for another device already opn with INTA */
-	if ((function_mode == VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION) &&
-		test_bit(__VXGE_STATE_CARD_UP, &driver_config->inta_dev_open)) {
-		ret = -EPERM;
-		goto out0;
-	}
-
 	/* Open VPATHs */
 	status = vxge_open_vpaths(vdev);
 	if (status != VXGE_HW_OK) {
@@ -2983,7 +2943,6 @@ int do_vxge_close(struct net_device *dev
 	vxge_debug_entryexit(VXGE_TRACE,
 		"%s: %s:%d  Exiting...", dev->name, __func__, __LINE__);
 
-	clear_bit(__VXGE_STATE_CARD_UP, &driver_config->inta_dev_open);
 	clear_bit(__VXGE_STATE_RESET_CARD, &vdev->state);
 
 	return 0;
@@ -4397,6 +4356,27 @@ vxge_probe(struct pci_dev *pdev, const s
 	}
 
 	kfree(device_config);
+
+	/*
+	 * INTA is shared in multi-function mode. This is unlike the INTA
+	 * implementation in MR mode, where each VH has its own INTA message.
+	 * - INTA is masked (disabled) as long as at least one function sets
+	 * its TITAN_MASK_ALL_INT.ALARM bit.
+	 * - INTA is unmasked (enabled) when all enabled functions have cleared
+	 * their own TITAN_MASK_ALL_INT.ALARM bit.
+	 * The TITAN_MASK_ALL_INT ALARM & TRAFFIC bits are cleared on power up.
+	 * Though this driver leaves the top level interrupts unmasked while
+	 * leaving the required module interrupt bits masked on exit, there
+	 * could be a rougue driver around that does not follow this procedure
+	 * resulting in a failure to generate interrupts. The following code is
+	 * present to prevent such a failure.
+	 */
+
+	if (ll_config.device_hw_info.function_mode ==
+		VXGE_HW_FUNCTION_MODE_MULTI_FUNCTION)
+		if (vdev->config.intr_type == INTA)
+			vxge_hw_device_unmask_all(hldev);
+
 	vxge_debug_entryexit(VXGE_TRACE, "%s: %s:%d  Exiting...",
 		vdev->ndev->name, __func__, __LINE__);
 
diff -urpN patch6/drivers/net/vxge/vxge-main.h patch7/drivers/net/vxge/vxge-main.h
--- patch6/drivers/net/vxge/vxge-main.h	2009-09-04 01:25:50.000000000 -0700
+++ patch7/drivers/net/vxge/vxge-main.h	2009-09-04 02:05:36.000000000 -0700
@@ -112,7 +112,6 @@ enum vxge_mac_addr_state {
 struct vxge_drv_config {
 	int config_dev_cnt;
 	int total_dev_cnt;
-	unsigned long inta_dev_open;
 	int g_no_cpus;
 	unsigned int vpath_per_dev;
 };
diff -urpN patch6/drivers/net/vxge/vxge-traffic.c patch7/drivers/net/vxge/vxge-traffic.c
--- patch6/drivers/net/vxge/vxge-traffic.c	2009-09-04 01:25:50.000000000 -0700
+++ patch7/drivers/net/vxge/vxge-traffic.c	2009-09-04 02:06:25.000000000 -0700
@@ -295,6 +295,8 @@ void vxge_hw_device_intr_enable(struct _
 	u64 val64;
 	u32 val32;
 
+	vxge_hw_device_mask_all(hldev);
+
 	for (i = 0; i < VXGE_HW_MAX_VIRTUAL_PATHS; i++) {
 
 		if (!(hldev->vpaths_deployed & vxge_mBIT(i)))
diff -urpN patch6/drivers/net/vxge/vxge-traffic.h patch7/drivers/net/vxge/vxge-traffic.h
--- patch6/drivers/net/vxge/vxge-traffic.h	2009-09-04 01:25:50.000000000 -0700
+++ patch7/drivers/net/vxge/vxge-traffic.h	2009-09-04 02:07:28.000000000 -0700
@@ -2389,6 +2389,8 @@ vxge_hw_channel_dtr_free(struct __vxge_h
 
 int
 vxge_hw_channel_dtr_count(struct __vxge_hw_channel *channel);
+void
+vxge_hw_vpath_tti_ci_set(struct __vxge_hw_device *hldev, u32 vp_id);
 
 /* ========================== PRIVATE API ================================= */
 


^ permalink raw reply

* [net-next-2.6 PATCH 6/9] vxge: Check if FCS stripping is disabled by the firmware.
From: Sreenivasa Honnur @ 2009-10-05 11:56 UTC (permalink / raw)
  To: davem; +Cc: netdev, support

- Added a function to check if FCS stripping is disabled by the firmware, if
  it is not disabled fail driver load.

- By default FCS stripping is disabled by the firmware. With this assumption
  driver decrements the indicated packet length by 4 bytes(FCS length).

- This patch ensures that FCS stripping is disabled during driver load time.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
---
diff -urpN patch5/drivers/net/vxge/vxge-config.c patch6/drivers/net/vxge/vxge-config.c
--- patch5/drivers/net/vxge/vxge-config.c	2009-09-04 01:24:25.000000000 -0700
+++ patch6/drivers/net/vxge/vxge-config.c	2009-09-04 01:33:43.000000000 -0700
@@ -2157,6 +2157,28 @@ exit:
 }
 
 /*
+ * vxge_hw_vpath_strip_fcs_check - Check for FCS strip.
+ */
+enum vxge_hw_status
+vxge_hw_vpath_strip_fcs_check(struct __vxge_hw_device *hldev, u64 vpath_mask)
+{
+	struct vxge_hw_vpmgmt_reg       __iomem *vpmgmt_reg;
+	enum vxge_hw_status status = VXGE_HW_OK;
+	int i = 0, j = 0;
+
+	for (i = 0; i < VXGE_HW_MAX_VIRTUAL_PATHS; i++) {
+		if (!((vpath_mask) & vxge_mBIT(i)))
+			continue;
+		vpmgmt_reg = hldev->vpmgmt_reg[i];
+		for (j = 0; j < VXGE_HW_MAC_MAX_MAC_PORT_ID; j++) {
+			if (readq(&vpmgmt_reg->rxmac_cfg0_port_vpmgmt_clone[j])
+			& VXGE_HW_RXMAC_CFG0_PORT_VPMGMT_CLONE_STRIP_FCS)
+				return VXGE_HW_FAIL;
+		}
+	}
+	return status;
+}
+/*
  * vxge_hw_mgmt_reg_Write - Write Titan register.
  */
 enum vxge_hw_status
diff -urpN patch5/drivers/net/vxge/vxge-config.h patch6/drivers/net/vxge/vxge-config.h
--- patch5/drivers/net/vxge/vxge-config.h	2009-09-04 01:23:26.000000000 -0700
+++ patch6/drivers/net/vxge/vxge-config.h	2009-09-04 01:29:17.000000000 -0700
@@ -2201,6 +2201,8 @@ __vxge_hw_vpath_func_id_get(
 enum vxge_hw_status
 __vxge_hw_vpath_reset_check(struct __vxge_hw_virtualpath *vpath);
 
+enum vxge_hw_status
+vxge_hw_vpath_strip_fcs_check(struct __vxge_hw_device *hldev, u64 vpath_mask);
 /**
  * vxge_debug
  * @level: level of debug verbosity.
diff -urpN patch5/drivers/net/vxge/vxge-main.c patch6/drivers/net/vxge/vxge-main.c
--- patch5/drivers/net/vxge/vxge-main.c	2009-09-04 01:23:26.000000000 -0700
+++ patch6/drivers/net/vxge/vxge-main.c	2009-09-04 01:31:12.000000000 -0700
@@ -4244,6 +4244,15 @@ vxge_probe(struct pci_dev *pdev, const s
 			goto _exit3;
 	}
 
+	/* if FCS stripping is not disabled in MAC fail driver load */
+	if (vxge_hw_vpath_strip_fcs_check(hldev, vpath_mask) != VXGE_HW_OK) {
+		vxge_debug_init(VXGE_ERR,
+			"%s: FCS stripping is not disabled in MAC"
+			" failing driver load", VXGE_DRIVER_NAME);
+		ret = -EINVAL;
+		goto _exit4;
+	}
+
 	vxge_hw_device_debug_set(hldev, VXGE_ERR, VXGE_COMPONENT_LL);
 
 	/* set private device info */


^ permalink raw reply

* [net-next-2.6 PATCH 5/9] vxge: Removed unused functions.
From: Sreenivasa Honnur @ 2009-10-05 11:55 UTC (permalink / raw)
  To: davem; +Cc: netdev, support

- Removed the wrr_rebalance function

- This feature is not supported by the ASIC, hence removing the related code.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
---
diff -urpN patch4/drivers/net/vxge/vxge-config.c patch5/drivers/net/vxge/vxge-config.c
--- patch4/drivers/net/vxge/vxge-config.c	2009-09-04 01:21:52.000000000 -0700
+++ patch5/drivers/net/vxge/vxge-config.c	2009-09-04 01:24:25.000000000 -0700
@@ -461,209 +461,6 @@ __vxge_hw_verify_pci_e_info(struct __vxg
 }
 
 /*
- * vxge_hw_wrr_rebalance - Rebalance the RX_WRR and KDFC_WRR calandars.
- * Rebalance the RX_WRR and KDFC_WRR calandars.
- */
-static enum
-vxge_hw_status vxge_hw_wrr_rebalance(struct __vxge_hw_device *hldev)
-{
-	u64 val64;
-	u32 wrr_states[VXGE_HW_WEIGHTED_RR_SERVICE_STATES];
-	u32 i, j, how_often = 1;
-	enum vxge_hw_status status = VXGE_HW_OK;
-
-	status = __vxge_hw_device_is_privilaged(hldev->host_type,
-			hldev->func_id);
-	if (status != VXGE_HW_OK)
-		goto exit;
-
-	/* Reset the priorities assigned to the WRR arbitration
-	phases for the receive traffic */
-	for (i = 0; i < VXGE_HW_WRR_RING_COUNT; i++)
-		writeq(0, ((&hldev->mrpcim_reg->rx_w_round_robin_0) + i));
-
-	/* Reset the transmit FIFO servicing calendar for FIFOs */
-	for (i = 0; i < VXGE_HW_WRR_FIFO_COUNT; i++) {
-		writeq(0, ((&hldev->mrpcim_reg->kdfc_w_round_robin_0) + i));
-		writeq(0, ((&hldev->mrpcim_reg->kdfc_w_round_robin_20) + i));
-	}
-
-	/* Assign WRR priority  0 for all FIFOs */
-	for (i = 1; i < VXGE_HW_MAX_VIRTUAL_PATHS; i++) {
-		writeq(VXGE_HW_KDFC_FIFO_0_CTRL_WRR_NUMBER(0),
-				((&hldev->mrpcim_reg->kdfc_fifo_0_ctrl)  + i));
-
-		writeq(VXGE_HW_KDFC_FIFO_17_CTRL_WRR_NUMBER(0),
-			((&hldev->mrpcim_reg->kdfc_fifo_17_ctrl) + i));
-	}
-
-	/* Reset to service non-offload doorbells */
-	writeq(0, &hldev->mrpcim_reg->kdfc_entry_type_sel_0);
-	writeq(0, &hldev->mrpcim_reg->kdfc_entry_type_sel_1);
-
-	/* Set priority 0 to all receive queues */
-	writeq(0, &hldev->mrpcim_reg->rx_queue_priority_0);
-	writeq(0, &hldev->mrpcim_reg->rx_queue_priority_1);
-	writeq(0, &hldev->mrpcim_reg->rx_queue_priority_2);
-
-	/* Initialize all the slots as unused */
-	for (i = 0; i < VXGE_HW_WEIGHTED_RR_SERVICE_STATES; i++)
-		wrr_states[i] = -1;
-
-	/* Prepare the Fifo service states */
-	for (i = 0; i < VXGE_HW_MAX_VIRTUAL_PATHS; i++) {
-
-		if (!hldev->config.vp_config[i].min_bandwidth)
-			continue;
-
-		how_often = VXGE_HW_VPATH_BANDWIDTH_MAX /
-				hldev->config.vp_config[i].min_bandwidth;
-		if (how_often) {
-
-			for (j = 0; j < VXGE_HW_WRR_FIFO_SERVICE_STATES;) {
-				if (wrr_states[j] == -1) {
-					wrr_states[j] = i;
-					/* Make sure each fifo is serviced
-					 * atleast once */
-					if (i == j)
-						j += VXGE_HW_MAX_VIRTUAL_PATHS;
-					else
-						j += how_often;
-				} else
-					j++;
-			}
-		}
-	}
-
-	/* Fill the unused slots with 0 */
-	for (j = 0; j < VXGE_HW_WEIGHTED_RR_SERVICE_STATES; j++) {
-		if (wrr_states[j] == -1)
-			wrr_states[j] = 0;
-	}
-
-	/* Assign WRR priority number for FIFOs */
-	for (i = 0; i < VXGE_HW_MAX_VIRTUAL_PATHS; i++) {
-		writeq(VXGE_HW_KDFC_FIFO_0_CTRL_WRR_NUMBER(i),
-				((&hldev->mrpcim_reg->kdfc_fifo_0_ctrl) + i));
-
-		writeq(VXGE_HW_KDFC_FIFO_17_CTRL_WRR_NUMBER(i),
-			((&hldev->mrpcim_reg->kdfc_fifo_17_ctrl) + i));
-	}
-
-	/* Modify the servicing algorithm applied to the 3 types of doorbells.
-	i.e, none-offload, message and offload */
-	writeq(VXGE_HW_KDFC_ENTRY_TYPE_SEL_0_NUMBER_0(0) |
-				VXGE_HW_KDFC_ENTRY_TYPE_SEL_0_NUMBER_1(0) |
-				VXGE_HW_KDFC_ENTRY_TYPE_SEL_0_NUMBER_2(0) |
-				VXGE_HW_KDFC_ENTRY_TYPE_SEL_0_NUMBER_3(0) |
-				VXGE_HW_KDFC_ENTRY_TYPE_SEL_0_NUMBER_4(1) |
-				VXGE_HW_KDFC_ENTRY_TYPE_SEL_0_NUMBER_5(0) |
-				VXGE_HW_KDFC_ENTRY_TYPE_SEL_0_NUMBER_6(0) |
-				VXGE_HW_KDFC_ENTRY_TYPE_SEL_0_NUMBER_7(0),
-				&hldev->mrpcim_reg->kdfc_entry_type_sel_0);
-
-	writeq(VXGE_HW_KDFC_ENTRY_TYPE_SEL_1_NUMBER_8(1),
-				&hldev->mrpcim_reg->kdfc_entry_type_sel_1);
-
-	for (i = 0, j = 0; i < VXGE_HW_WRR_FIFO_COUNT; i++) {
-
-		val64 = VXGE_HW_KDFC_W_ROUND_ROBIN_0_NUMBER_0(wrr_states[j++]);
-		val64 |= VXGE_HW_KDFC_W_ROUND_ROBIN_0_NUMBER_1(wrr_states[j++]);
-		val64 |= VXGE_HW_KDFC_W_ROUND_ROBIN_0_NUMBER_2(wrr_states[j++]);
-		val64 |= VXGE_HW_KDFC_W_ROUND_ROBIN_0_NUMBER_3(wrr_states[j++]);
-		val64 |= VXGE_HW_KDFC_W_ROUND_ROBIN_0_NUMBER_4(wrr_states[j++]);
-		val64 |= VXGE_HW_KDFC_W_ROUND_ROBIN_0_NUMBER_5(wrr_states[j++]);
-		val64 |= VXGE_HW_KDFC_W_ROUND_ROBIN_0_NUMBER_6(wrr_states[j++]);
-		val64 |= VXGE_HW_KDFC_W_ROUND_ROBIN_0_NUMBER_7(wrr_states[j++]);
-
-		writeq(val64, (&hldev->mrpcim_reg->kdfc_w_round_robin_0 + i));
-		writeq(val64, (&hldev->mrpcim_reg->kdfc_w_round_robin_20 + i));
-	}
-
-	/* Set up the priorities assigned to receive queues */
-	writeq(VXGE_HW_RX_QUEUE_PRIORITY_0_RX_Q_NUMBER_0(0) |
-			VXGE_HW_RX_QUEUE_PRIORITY_0_RX_Q_NUMBER_1(1) |
-			VXGE_HW_RX_QUEUE_PRIORITY_0_RX_Q_NUMBER_2(2) |
-			VXGE_HW_RX_QUEUE_PRIORITY_0_RX_Q_NUMBER_3(3) |
-			VXGE_HW_RX_QUEUE_PRIORITY_0_RX_Q_NUMBER_4(4) |
-			VXGE_HW_RX_QUEUE_PRIORITY_0_RX_Q_NUMBER_5(5) |
-			VXGE_HW_RX_QUEUE_PRIORITY_0_RX_Q_NUMBER_6(6) |
-			VXGE_HW_RX_QUEUE_PRIORITY_0_RX_Q_NUMBER_7(7),
-			&hldev->mrpcim_reg->rx_queue_priority_0);
-
-	writeq(VXGE_HW_RX_QUEUE_PRIORITY_1_RX_Q_NUMBER_8(8) |
-			VXGE_HW_RX_QUEUE_PRIORITY_1_RX_Q_NUMBER_9(9) |
-			VXGE_HW_RX_QUEUE_PRIORITY_1_RX_Q_NUMBER_10(10) |
-			VXGE_HW_RX_QUEUE_PRIORITY_1_RX_Q_NUMBER_11(11) |
-			VXGE_HW_RX_QUEUE_PRIORITY_1_RX_Q_NUMBER_12(12) |
-			VXGE_HW_RX_QUEUE_PRIORITY_1_RX_Q_NUMBER_13(13) |
-			VXGE_HW_RX_QUEUE_PRIORITY_1_RX_Q_NUMBER_14(14) |
-			VXGE_HW_RX_QUEUE_PRIORITY_1_RX_Q_NUMBER_15(15),
-			&hldev->mrpcim_reg->rx_queue_priority_1);
-
-	writeq(VXGE_HW_RX_QUEUE_PRIORITY_2_RX_Q_NUMBER_16(16),
-				&hldev->mrpcim_reg->rx_queue_priority_2);
-
-	/* Initialize all the slots as unused */
-	for (i = 0; i < VXGE_HW_WEIGHTED_RR_SERVICE_STATES; i++)
-		wrr_states[i] = -1;
-
-	/* Prepare the Ring service states */
-	for (i = 0; i < VXGE_HW_MAX_VIRTUAL_PATHS; i++) {
-
-		if (!hldev->config.vp_config[i].min_bandwidth)
-			continue;
-
-		how_often = VXGE_HW_VPATH_BANDWIDTH_MAX /
-				hldev->config.vp_config[i].min_bandwidth;
-
-		if (how_often) {
-			for (j = 0; j < VXGE_HW_WRR_RING_SERVICE_STATES;) {
-				if (wrr_states[j] == -1) {
-					wrr_states[j] = i;
-					/* Make sure each ring is
-					 * serviced atleast once */
-					if (i == j)
-						j += VXGE_HW_MAX_VIRTUAL_PATHS;
-					else
-						j += how_often;
-				} else
-					j++;
-			}
-		}
-	}
-
-	/* Fill the unused slots with 0 */
-	for (j = 0; j < VXGE_HW_WEIGHTED_RR_SERVICE_STATES; j++) {
-		if (wrr_states[j] == -1)
-			wrr_states[j] = 0;
-	}
-
-	for (i = 0, j = 0; i < VXGE_HW_WRR_RING_COUNT; i++) {
-		val64 =  VXGE_HW_RX_W_ROUND_ROBIN_0_RX_W_PRIORITY_SS_0(
-				wrr_states[j++]);
-		val64 |=  VXGE_HW_RX_W_ROUND_ROBIN_0_RX_W_PRIORITY_SS_1(
-				wrr_states[j++]);
-		val64 |=  VXGE_HW_RX_W_ROUND_ROBIN_0_RX_W_PRIORITY_SS_2(
-				wrr_states[j++]);
-		val64 |=  VXGE_HW_RX_W_ROUND_ROBIN_0_RX_W_PRIORITY_SS_3(
-				wrr_states[j++]);
-		val64 |=  VXGE_HW_RX_W_ROUND_ROBIN_0_RX_W_PRIORITY_SS_4(
-				wrr_states[j++]);
-		val64 |=  VXGE_HW_RX_W_ROUND_ROBIN_0_RX_W_PRIORITY_SS_5(
-				wrr_states[j++]);
-		val64 |=  VXGE_HW_RX_W_ROUND_ROBIN_0_RX_W_PRIORITY_SS_6(
-				wrr_states[j++]);
-		val64 |=  VXGE_HW_RX_W_ROUND_ROBIN_0_RX_W_PRIORITY_SS_7(
-				wrr_states[j++]);
-
-		writeq(val64, ((&hldev->mrpcim_reg->rx_w_round_robin_0) + i));
-	}
-exit:
-	return status;
-}
-
-/*
  * __vxge_hw_device_initialize
  * Initialize Titan-V hardware.
  */
@@ -679,7 +476,6 @@ enum vxge_hw_status __vxge_hw_device_ini
 			goto exit;
 	}
 
-	vxge_hw_wrr_rebalance(hldev);
 exit:
 	return status;
 }



^ permalink raw reply

* [net-next-2.6 PATCH 4/9] vxge: Fixed crash in PAE system due to wrong typecasting.
From: Sreenivasa Honnur @ 2009-10-05 11:54 UTC (permalink / raw)
  To: davem; +Cc: netdev, support

- Fix a crash in PAE system due to wrong typecasting.

- On PAE system size_t is unsigned int which is 32bit. Avoid casting
  64 bit address to 32 bit

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
---
diff -urpN patch3/drivers/net/vxge/vxge-traffic.c patch4/drivers/net/vxge/vxge-traffic.c
--- patch3/drivers/net/vxge/vxge-traffic.c	2009-09-04 01:19:23.000000000 -0700
+++ patch4/drivers/net/vxge/vxge-traffic.c	2009-09-04 01:22:35.000000000 -0700
@@ -1232,7 +1232,7 @@ void vxge_hw_fifo_txdl_post(struct __vxg
 	vxge_hw_channel_dtr_post(&fifo->channel, txdlh);
 
 	__vxge_hw_non_offload_db_post(fifo,
-		(u64)(size_t)txdl_priv->dma_addr,
+		(u64)txdl_priv->dma_addr,
 		txdl_priv->frags - 1,
 		fifo->no_snoop_bits);
 


^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox