Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH 50/51] net/core/flow.c: Fix CPU hotplug callback registration
From: David Miller @ 2014-02-07  5:19 UTC (permalink / raw)
  To: srivatsa.bhat
  Cc: paulus, oleg, rusty, peterz, tglx, akpm, mingo, paulmck, tj,
	walken, ego, linux, linux-kernel, roy.qing.li, sasha.levin,
	cmetcalf, netdev
In-Reply-To: <20140206.203921.888218847049631688.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Thu, 06 Feb 2014 20:39:21 -0800 (PST)

> From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
> Date: Thu, 06 Feb 2014 03:43:46 +0530
> 
>> Subsystems that want to register CPU hotplug callbacks, as well as perform
>> initialization for the CPUs that are already online, often do it as shown
>> below:
>  ...
>> This is wrong, since it is prone to ABBA deadlocks involving the
>> cpu_add_remove_lock and the cpu_hotplug.lock (when running concurrently
>> with CPU hotplug operations).
>> 
>> Instead, the correct and race-free way of performing the callback
>> registration is:
>  ...
>> Fix the code in net/core/flow.c by using this latter form of callback
>> registration.
>> 
>> Cc: "David S. Miller" <davem@davemloft.net>
>> Cc: Li RongQing <roy.qing.li@gmail.com>
>> Cc: Sasha Levin <sasha.levin@oracle.com>
>> Cc: Andrew Morton <akpm@linux-foundation.org>
>> Cc: Chris Metcalf <cmetcalf@tilera.com>
>> Cc: netdev@vger.kernel.org
>> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
> 
> Applied.

I just realized that this has a dependency not in the 'net'
tree, so I reverted and assume you will merge this with the
patch that provides the necessary interface(s).

Signed-off-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply

* Re: [PATCH 51/51] net/iucv/iucv.c: Fix CPU hotplug callback registration
From: David Miller @ 2014-02-07  5:19 UTC (permalink / raw)
  To: srivatsa.bhat
  Cc: paulus, oleg, rusty, peterz, tglx, akpm, mingo, paulmck, tj,
	walken, ego, linux, linux-kernel, ursula.braun, linux-s390,
	netdev
In-Reply-To: <20140206.203935.23931642792292899.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Thu, 06 Feb 2014 20:39:35 -0800 (PST)

> Applied.

I just realized that this has a dependency not in the 'net'
tree, so I reverted and assume you will merge this with the
patch that provides the necessary interface(s).

Signed-off-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply

* Re: [PATCH] inet: defines IPPROTO_* needed for module alias generation
From: David Miller @ 2014-02-07  4:40 UTC (permalink / raw)
  To: mq; +Cc: carlos, netdev, linux-kernel
In-Reply-To: <1391685000-7346-1-git-send-email-mq@suse.cz>

From: Jan Moskyto Matejka <mq@suse.cz>
Date: Thu,  6 Feb 2014 12:10:00 +0100

> Commit cfd280c91253 ("net: sync some IP headers with glibc") changed a set of
> define's to an enum (with no explanation why) which introduced a bug
> in module mip6 where aliases are generated using the IPPROTO_* defines;
> mip6 doesn't load if require_module called with the aliases from
> xfrm_get_type().
> 
> Reverting this change back to define's to fix the aliases.
> 
> modinfo mip6 (before this change)
> alias:          xfrm-type-10-IPPROTO_DSTOPTS
> alias:          xfrm-type-10-IPPROTO_ROUTING
> 
> modinfo mip6 (after this change)
> alias:          xfrm-type-10-43
> alias:          xfrm-type-10-60
> 
> Signed-off-by: Jan Moskyto Matejka <mq@suse.cz>

I have to apply this, thanks Jan.

^ permalink raw reply

* Re: [patch] isdn/hisax: hex vs decimal typo in prfeatureind()
From: David Miller @ 2014-02-07  4:40 UTC (permalink / raw)
  To: dan.carpenter; +Cc: isdn, akpm, keescook, netdev, kernel-janitors
In-Reply-To: <20140206080308.GB26661@elgon.mountain>

From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Thu, 6 Feb 2014 11:03:08 +0300

> This is a static checker fix, but judging from the context then I think
> hexidecimal 0x80 is intended here instead of decimal 80.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied.

^ permalink raw reply

* Re: [PATCH] net: sctp: fix initialization of local source address on accepted ipv6 sockets
From: David Miller @ 2014-02-07  4:40 UTC (permalink / raw)
  To: matija.glavinic-pecotic.ext; +Cc: linux-sctp, netdev
In-Reply-To: <52F33A02.2040902@nsn.com>

From: Matija Glavinic Pecotic <matija.glavinic-pecotic.ext@nsn.com>
Date: Thu, 06 Feb 2014 08:30:10 +0100

> commit 	efe4208f47f907b86f528788da711e8ab9dea44d:
> 'ipv6: make lookups simpler and faster' broke initialization of local source
> address on accepted ipv6 sockets. Before the mentioned commit receive address
> was copied along with the contents of ipv6_pinfo in sctp_v6_create_accept_sk.
> Now when it is moved, it has to be copied separately.
> 
> This also fixes lksctp's ipv6 regression in a sense that test_getname_v6, TC5 -
> 'getsockname on a connected server socket' now passes.
> 
> Signed-off-by: Matija Glavinic Pecotic <matija.glavinic-pecotic.ext@nsn.com>

Applied.

^ permalink raw reply

* Re: [PATCH net] r8152: fix the submission of the interrupt transfer
From: David Miller @ 2014-02-07  4:39 UTC (permalink / raw)
  To: hayeswang; +Cc: netdev, nic_swsd, linux-kernel, linux-usb
In-Reply-To: <1391658948-4456-1-git-send-email-hayeswang@realtek.com>

From: Hayes Wang <hayeswang@realtek.com>
Date: Thu, 6 Feb 2014 11:55:48 +0800

> The submission of the interrupt transfer should be done after setting
> the bit of WORK_ENABLE, otherwise the callback function would have
> the opportunity to be returned directly.
> 
> Clear the bit of WORK_ENABLE before killing the interrupt transfer.
> 
> Signed-off-by: Hayes Wang <hayeswang@realtek.com>

Applied.

^ permalink raw reply

* Re: [PATCH 51/51] net/iucv/iucv.c: Fix CPU hotplug callback registration
From: David Miller @ 2014-02-07  4:39 UTC (permalink / raw)
  To: srivatsa.bhat
  Cc: paulus, oleg, rusty, peterz, tglx, akpm, mingo, paulmck, tj,
	walken, ego, linux, linux-kernel, ursula.braun, linux-s390,
	netdev
In-Reply-To: <20140205221354.19080.25861.stgit@srivatsabhat.in.ibm.com>

From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Date: Thu, 06 Feb 2014 03:43:55 +0530

> Subsystems that want to register CPU hotplug callbacks, as well as perform
> initialization for the CPUs that are already online, often do it as shown
> below:
 ...
> This is wrong, since it is prone to ABBA deadlocks involving the
> cpu_add_remove_lock and the cpu_hotplug.lock (when running concurrently
> with CPU hotplug operations).
> 
> Instead, the correct and race-free way of performing the callback
> registration is:
 ...
> Fix the code in net/iucv/iucv.c by using this latter form of callback
> registration. Also, provide helper functions to perform the common memory
> allocations and frees, to condense repetitive code.
> 
> Cc: Ursula Braun <ursula.braun@de.ibm.com>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: linux-s390@vger.kernel.org
> Cc: netdev@vger.kernel.org
> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>

Applied.

^ permalink raw reply

* Re: [PATCH 50/51] net/core/flow.c: Fix CPU hotplug callback registration
From: David Miller @ 2014-02-07  4:39 UTC (permalink / raw)
  To: srivatsa.bhat
  Cc: paulus, oleg, rusty, peterz, tglx, akpm, mingo, paulmck, tj,
	walken, ego, linux, linux-kernel, roy.qing.li, sasha.levin,
	cmetcalf, netdev
In-Reply-To: <20140205221345.19080.20784.stgit@srivatsabhat.in.ibm.com>

From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Date: Thu, 06 Feb 2014 03:43:46 +0530

> Subsystems that want to register CPU hotplug callbacks, as well as perform
> initialization for the CPUs that are already online, often do it as shown
> below:
 ...
> This is wrong, since it is prone to ABBA deadlocks involving the
> cpu_add_remove_lock and the cpu_hotplug.lock (when running concurrently
> with CPU hotplug operations).
> 
> Instead, the correct and race-free way of performing the callback
> registration is:
 ...
> Fix the code in net/core/flow.c by using this latter form of callback
> registration.
> 
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Li RongQing <roy.qing.li@gmail.com>
> Cc: Sasha Levin <sasha.levin@oracle.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Chris Metcalf <cmetcalf@tilera.com>
> Cc: netdev@vger.kernel.org
> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>

Applied.

^ permalink raw reply

* Re: [PATCH net] bnx2x: Allow VF rss on higher PFs
From: David Miller @ 2014-02-07  4:39 UTC (permalink / raw)
  To: yuvalmin; +Cc: netdev, ariele
In-Reply-To: <1391609232-875-1-git-send-email-yuvalmin@broadcom.com>

From: Yuval Mintz <yuvalmin@broadcom.com>
Date: Wed, 5 Feb 2014 16:07:12 +0200

> bnx2x driver uses incorrect PF identifier to configure (in HW) the VF
> interrupt scheme; As a result, in multi-function mode the configuration
> for PFs with a high index (4+) will overflow and the PF will erroneously
> configure a single ISR scheme for its VFs.
> As a result, if such a VF uses multiple queues, interrupt generation will
> stop after VF receives an Rx packet or sends a Tx packet on a queue
> other than queue[0].
> 
> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
> Signed-off-by: Ariel Elior <ariele@broadcom.com>

Applied.

^ permalink raw reply

* Re: [PATCH RESEND net-next] bonding: don't permit slaves to change their mtu independently
From: Ding Tianhong @ 2014-02-07  4:19 UTC (permalink / raw)
  To: David Miller; +Cc: fubar, vfalico, andy, netdev
In-Reply-To: <20140201.165340.704074184414791614.davem@davemloft.net>

On 2014/2/2 8:53, David Miller wrote:
> From: Ding Tianhong <dingtianhong@huawei.com>
> Date: Sat, 25 Jan 2014 12:55:09 +0800
> 
>> I have come to a conclusion by testing all modes for mtu changing:
>>
>> 1). If the slaves support changing mtu and no need to restart the device,
>>     just like virtual nic, the master will not lost any packages for all
>>     mode.
>>
>> 2). If the slaves support changing mtu and need to restart the device,
>>     just like Intel 82599, the AB, 802.3, ALB and TLB mode may lost
>>     packages, but other modes could work well.
>>
>> The reason is that when the slave's mtu has been changed, the slave's hw will
>> restart, if the slave is current active slave, the master may set the
>> slave to backup state and reselect a new slave, after the reselect processing,
>> the master could work again, but if in load-balance mode, the master could
>> select another active slave to send and recv packages.
>>
>> So the best way to fix the problem is don't permit slave to change their
>> mtu independently.
>>
>> Cc: Jay Vosburgh <fubar@us.ibm.com>
>> Cc: Veaceslav Falico <vfalico@redhat.com>
>> Cc: Andy Gospodarek <andy@greyhouse.net>
>> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
> 
> This has been rotting in patchwork for a week, and desperately needs
> someone to review it.
> 
> 
Self Naked, this patch did not consider the bond dev MTU changing, because
if I forbidden the slave to change mtu in any way, the bond will not change
its own mtu anymore, so I should think more about this situation. Sorry for the
noise.

Regards
Ding

^ permalink raw reply

* Re: [PATCH net] tg3: Fix deadlock in tg3_change_mtu()
From: David Miller @ 2014-02-07  4:06 UTC (permalink / raw)
  To: nsujir; +Cc: netdev, david.vrabel, mchan
In-Reply-To: <1391724785-13562-1-git-send-email-nsujir@broadcom.com>

From: Nithin Nayak Sujir <nsujir@broadcom.com>
Date: Thu, 6 Feb 2014 14:13:05 -0800

> Quoting David Vrabel -
> "5780 cards cannot have jumbo frames and TSO enabled together.  When
> jumbo frames are enabled by setting the MTU, the TSO feature must be
> cleared.  This is done indirectly by calling netdev_update_features()
> which will call tg3_fix_features() to actually clear the flags.
> 
> netdev_update_features() will also trigger a new netlink message for the
> feature change event which will result in a call to tg3_get_stats64()
> which deadlocks on the tg3 lock."
> 
> tg3_set_mtu() does not need to be under the tg3 lock since converting
> the flags to use set_bit(). Move it out to after tg3_netif_stop().
> 
> Reported-by: David Vrabel <david.vrabel@citrix.com>
> Tested-by: David Vrabel <david.vrabel@citrix.com>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
> Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>

Applied and queued up for -stable, thanks.

^ permalink raw reply

* Re: [patch] tg3: cleanup an error path in tg3_phy_reset_5703_4_5()
From: David Miller @ 2014-02-07  4:06 UTC (permalink / raw)
  To: dan.carpenter; +Cc: nsujir, mchan, netdev, kernel-janitors
In-Reply-To: <20140205132920.GE800@elgon.mountain>

From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Wed, 5 Feb 2014 16:29:21 +0300

> In the original code, if tg3_readphy() fails then it does an unnecessary
> check to verify "err" is still zero and then returns -EBUSY.
> 
> My static checker complains about the unnecessary "if (!err)" check and
> anyway it is better to propagate the -EBUSY error code from
> tg3_readphy() instead of hard coding it here.  And really the original
> code is confusing to look at.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied.

^ permalink raw reply

* Re: [PATCH] ipv4: Fix runtime WARNING in rtmsg_ifa()
From: David Miller @ 2014-02-07  4:03 UTC (permalink / raw)
  To: geert; +Cc: jiri, cwang, netdev, linux-kernel
In-Reply-To: <1391585905-24851-1-git-send-email-geert@linux-m68k.org>

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Wed,  5 Feb 2014 08:38:25 +0100

> On m68k/ARAnyM:
 ...
> Adding some debugging code reveals that net_fill_ifaddr() fails in
> 
>     put_cacheinfo(skb, ifa->ifa_cstamp, ifa->ifa_tstamp,
>                               preferred, valid))
> 
> nla_put complains:
> 
>     lib/nlattr.c:454: skb_tailroom(skb) = 12, nla_total_size(attrlen) = 20
> 
> Apparently commit 5c766d642bcaffd0c2a5b354db2068515b3846cf ("ipv4:
> introduce address lifetime") forgot to take into account the addition of
> struct ifa_cacheinfo in inet_nlmsg_size(). Hence add it, like is already
> done for ipv6.
> 
> Suggested-by: Cong Wang <cwang@twopensource.com>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

Applied and queued up for -stable, thanks!

^ permalink raw reply

* Re: [PATCH net-next] bnx2[x]: Make module parameters readable
From: David Miller @ 2014-02-07  4:00 UTC (permalink / raw)
  To: james.leddy; +Cc: netdev, mchan, ariele
In-Reply-To: <1391544659-5711-1-git-send-email-james.leddy@redhat.com>

From: James M Leddy <james.leddy@redhat.com>
Date: Tue,  4 Feb 2014 15:10:59 -0500

> Occasionally users want to know what parameters their Broadcom drivers
> are running with. For example, a user may want to know if MSI is
> disabled.
> 
> This patch has been compile tested.
> 
> Signed-off-by: James M Leddy <james.leddy@redhat.com>

Applied, thanks James.

^ permalink raw reply

* Re: [PATCH RESEND net-next] bonding: don't permit slaves to change their mtu independently
From: Ding Tianhong @ 2014-02-07  3:56 UTC (permalink / raw)
  To: David Miller; +Cc: fubar, vfalico, andy, netdev
In-Reply-To: <20140206.194107.170476650427156102.davem@davemloft.net>

On 2014/2/7 11:41, David Miller wrote:
> From: Ding Tianhong <dingtianhong@huawei.com>
> Date: Sat, 25 Jan 2014 12:55:09 +0800
> 
>> I have come to a conclusion by testing all modes for mtu changing:
>>
>> 1). If the slaves support changing mtu and no need to restart the device,
>>     just like virtual nic, the master will not lost any packages for all
>>     mode.
>>
>> 2). If the slaves support changing mtu and need to restart the device,
>>     just like Intel 82599, the AB, 802.3, ALB and TLB mode may lost
>>     packages, but other modes could work well.
>>
>> The reason is that when the slave's mtu has been changed, the slave's hw will
>> restart, if the slave is current active slave, the master may set the
>> slave to backup state and reselect a new slave, after the reselect processing,
>> the master could work again, but if in load-balance mode, the master could
>> select another active slave to send and recv packages.
>>
>> So the best way to fix the problem is don't permit slave to change their
>> mtu independently.
>>
>> Cc: Jay Vosburgh <fubar@us.ibm.com>
>> Cc: Veaceslav Falico <vfalico@redhat.com>
>> Cc: Andy Gospodarek <andy@greyhouse.net>
>> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
> 
> Without any review, I'm not applying this patch, sorry.
> 
> 
Ok, and I found some new issue for this patch, maybe need more discussion.

Regards
Ding

^ permalink raw reply

* Re: [PATCH] net: irda: ep7211-sir: Remove driver
From: David Miller @ 2014-02-07  3:55 UTC (permalink / raw)
  To: shc_work; +Cc: netdev, samuel
In-Reply-To: <1391528612-16957-1-git-send-email-shc_work@mail.ru>

From: Alexander Shiyan <shc_work@mail.ru>
Date: Tue,  4 Feb 2014 19:43:32 +0400

> This patch removes old and unsupported CLPS711X IrDA driver.
> Support for IrDA for CLPS711X serial port now provided by commit
> 4a33f1f59abd (serial: clps711x: Add support for N_IRDA line
> discipline), so IrDA-mode can be turned ON with "irattach" tool
> through "irtty" driver.
> 
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH v1 1/3] net: stmmac:sti: Add STi SOC glue driver.
From: David Miller @ 2014-02-07  3:53 UTC (permalink / raw)
  To: srinivas.kandagatla
  Cc: netdev, robh+dt, pawel.moll, mark.rutland, ijc+devicetree, galak,
	rob, linux, stuart.menefy, peppe.cavallaro, devicetree, linux-doc,
	linux-kernel, linux-arm-kernel, kernel
In-Reply-To: <1391428868-27245-1-git-send-email-srinivas.kandagatla@st.com>

From: <srinivas.kandagatla@st.com>
Date: Mon, 3 Feb 2014 12:01:08 +0000

> +	res = platform_get_resource_byname(pdev,
> +				IORESOURCE_MEM, "sti-ethconf");

This is not the correct way to format multi-line function calls,
you'll need to fix this up in this entire series.

The arguments on the second and subsequent lines must start at
the first column after the openning parenthesis of the function
call.  You must use the appropriate number of both space and
TAB characters necessary to do so.

If you're only using TAB characters to indent, you're doing it
wrong.

Thank you.

^ permalink raw reply

* Re: [PATCH 3/3] ARM: sunxi: dt: Convert to the new net compatibles
From: David Miller @ 2014-02-07  3:47 UTC (permalink / raw)
  To: maxime.ripard; +Cc: netdev, linux-arm-kernel
In-Reply-To: <1391348953-10662-3-git-send-email-maxime.ripard@free-electrons.com>

From: Maxime Ripard <maxime.ripard@free-electrons.com>
Date: Sun,  2 Feb 2014 14:49:13 +0100

> Switch the device tree to the new compatibles introduced in the ethernet and
> mdio drivers to have a common pattern accross all Allwinner SoCs.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Applied.

^ permalink raw reply

* Re: [PATCH 2/3] net: phy: sunxi: Add new compatibles
From: David Miller @ 2014-02-07  3:47 UTC (permalink / raw)
  To: maxime.ripard; +Cc: netdev, linux-arm-kernel
In-Reply-To: <1391348953-10662-2-git-send-email-maxime.ripard@free-electrons.com>

From: Maxime Ripard <maxime.ripard@free-electrons.com>
Date: Sun,  2 Feb 2014 14:49:12 +0100

> The Allwinner A10 compatibles were following a slightly different compatible
> patterns than the rest of the SoCs for historical reasons. Add compatibles
> matching the other pattern to the mdio driver for consistency, and keep the
> older one for backward compatibility.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Applied.

^ permalink raw reply

* Re: [PATCH 1/3] net: ethernet: sunxi: Add new compatibles
From: David Miller @ 2014-02-07  3:47 UTC (permalink / raw)
  To: maxime.ripard; +Cc: netdev, linux-arm-kernel
In-Reply-To: <1391348953-10662-1-git-send-email-maxime.ripard@free-electrons.com>

From: Maxime Ripard <maxime.ripard@free-electrons.com>
Date: Sun,  2 Feb 2014 14:49:11 +0100

> The Allwinner A10 compatibles were following a slightly different compatible
> patterns than the rest of the SoCs for historical reasons. Add compatibles
> matching the other pattern to the ethernet driver for consistency, and keep the
> older one for backward compatibility.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Applied.

^ permalink raw reply

* Re: Suspected Copy Paste error in rtnl_bridge_notify
From: David Miller @ 2014-02-07  3:45 UTC (permalink / raw)
  To: tj; +Cc: yogeshgaur.83, akpm, torvalds, linux-kernel, netdev
In-Reply-To: <20140131114712.GB26148@htj.dyndns.org>

From: Tejun Heo <tj@kernel.org>
Date: Fri, 31 Jan 2014 06:47:12 -0500

>> In above code isn't code line:
>> err = br_dev->netdev_ops->ndo_bridge_getlink(skb, 0, 0, dev, 0);
>> should be
>> err = br_dev->netdev_ops->ndo_bridge_getlink(skb, 0, 0, br_dev, 0);
>> 
>> If this needs to be changed then please review attached patch adding this
>> change.

It's not a typo, we want the actual underlying physical device.

Look at the implementations such as drivers/net/ethernet/emulex/be_main.c:
be_ndo_bridge_netlink().  It's doing things like:

	struct be_adapter *adapter = netdev_priv(dev);

^ permalink raw reply

* Re: [PATCH RESEND net-next] bonding: don't permit slaves to change their mtu independently
From: David Miller @ 2014-02-07  3:41 UTC (permalink / raw)
  To: dingtianhong; +Cc: fubar, vfalico, andy, netdev
In-Reply-To: <52E343AD.3080402@huawei.com>

From: Ding Tianhong <dingtianhong@huawei.com>
Date: Sat, 25 Jan 2014 12:55:09 +0800

> I have come to a conclusion by testing all modes for mtu changing:
> 
> 1). If the slaves support changing mtu and no need to restart the device,
>     just like virtual nic, the master will not lost any packages for all
>     mode.
> 
> 2). If the slaves support changing mtu and need to restart the device,
>     just like Intel 82599, the AB, 802.3, ALB and TLB mode may lost
>     packages, but other modes could work well.
> 
> The reason is that when the slave's mtu has been changed, the slave's hw will
> restart, if the slave is current active slave, the master may set the
> slave to backup state and reselect a new slave, after the reselect processing,
> the master could work again, but if in load-balance mode, the master could
> select another active slave to send and recv packages.
> 
> So the best way to fix the problem is don't permit slave to change their
> mtu independently.
> 
> Cc: Jay Vosburgh <fubar@us.ibm.com>
> Cc: Veaceslav Falico <vfalico@redhat.com>
> Cc: Andy Gospodarek <andy@greyhouse.net>
> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>

Without any review, I'm not applying this patch, sorry.

^ permalink raw reply

* Re: Re: [PATCH] USB2NET : SR9800 : One chip USB2.0 USB2NET SR9800Device Driver Support
From: liujunliang_ljl @ 2014-02-07  3:13 UTC (permalink / raw)
  To: Joe Perches
  Cc: davem, horms, romieu, gregkh, netdev, linux-usb, linux-kernel,
	sunhecheng
In-Reply-To: <1390899572.20150.97.camel@joe-AO722>

Dear Joe :

		I'm sorry that I reply so late, because I have just spent new chinese year.

		I will resubmit SR9800 Driver today.

		Thanks a lot.


2014-02-07 



liujunliang_ljl 



发件人: Joe Perches 
发送时间: 2014-01-28  16:59:38 
收件人: liujunliang_ljl 
抄送: davem; horms; romieu; gregkh; netdev; linux-usb; linux-kernel; sunhecheng 
主题: Re: [PATCH] USB2NET : SR9800 : One chip USB2.0 USB2NET SR9800Device Driver Support 
 
On Tue, 2014-01-28 at 16:36 +0800, liujunliang_ljl@163.com wrote:
> From: Liu Junliang <liujunliang_ljl@163.com>
trivial comments...
> diff --git a/drivers/net/usb/sr9800.c b/drivers/net/usb/sr9800.c
[]
> +static int sr_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
> +{
[]
> + if (size != ((~header >> 16) & 0x07ff)) {
> + netdev_err(dev->net,
> +    "sr_rx_fixup() Bad Header Length\n");
printks with embedded functions names are
generally better using "%s: ", __func__
netdev_err(dev->net, "%s: Bad header length\n",
   __func__);
[]
> + netdev_err(dev->net,
> +    "sr_rx_fixup() Bad RX Length %d\n", size);
etc.
> + if (skb->len != offset) {
> + netdev_err(dev->net, "sr_rx_fixup() Bad SKB Length %d\n",
> +    skb->len);
etc.
[]
> +static inline int sr9800_set_default_mode(struct usbnet *dev)
> +{
rather a big function to inline
[]
> + if (ret < 0) {
> + netdev_dbg(dev->net, "Write IPG,IPG1,IPG2 failed: %d", ret);
missing newline terminations
> + netdev_dbg(dev->net, "RX_CTL is 0x%04x after all initializations",
> +    rx_ctl);
etc...

^ permalink raw reply

* [PATCH 04/12] staging: r8188eu: Remove ODM_Write1Byte
From: Larry Finger @ 2014-02-07  2:45 UTC (permalink / raw)
  To: gregkh; +Cc: netdev, devel, Larry Finger
In-Reply-To: <1391741147-3047-1-git-send-email-Larry.Finger@lwfinger.net>

This routine is the equivalent of rtl_write6.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
 drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c     | 23 +++++++++-------------
 drivers/staging/rtl8188eu/hal/odm.c                |  3 ++-
 drivers/staging/rtl8188eu/hal/odm_RegConfig8188E.c |  4 +++-
 drivers/staging/rtl8188eu/hal/odm_interface.c      |  6 ------
 drivers/staging/rtl8188eu/include/odm_interface.h  |  2 --
 5 files changed, 14 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c b/drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c
index 9f907f8..bb80b8a 100644
--- a/drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c
+++ b/drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c
@@ -868,7 +868,7 @@ _PHY_ReloadMACRegisters(
 
 	ODM_RT_TRACE(dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD,  ("Reload MAC parameters !\n"));
 	for (i = 0; i < (IQK_MAC_REG_NUM - 1); i++) {
-		ODM_Write1Byte(dm_odm, MACReg[i], (u8)MACBackup[i]);
+		rtw_write8(adapt, MACReg[i], (u8)MACBackup[i]);
 	}
 	ODM_Write4Byte(dm_odm, MACReg[i], MACBackup[i]);
 }
@@ -912,12 +912,12 @@ _PHY_MACSettingCalibration(
 
 	ODM_RT_TRACE(dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("MAC settings for Calibration.\n"));
 
-	ODM_Write1Byte(dm_odm, MACReg[i], 0x3F);
+	rtw_write8(adapt, MACReg[i], 0x3F);
 
 	for (i = 1; i < (IQK_MAC_REG_NUM - 1); i++) {
-		ODM_Write1Byte(dm_odm, MACReg[i], (u8)(MACBackup[i]&(~BIT3)));
+		rtw_write8(adapt, MACReg[i], (u8)(MACBackup[i]&(~BIT3)));
 	}
-	ODM_Write1Byte(dm_odm, MACReg[i], (u8)(MACBackup[i]&(~BIT5)));
+	rtw_write8(adapt, MACReg[i], (u8)(MACBackup[i]&(~BIT5)));
 }
 
 void
@@ -1223,16 +1223,14 @@ static void phy_LCCalibrate_8188E(struct adapter *adapt, bool is2t)
 {
 	u8 tmpreg;
 	u32 RF_Amode = 0, RF_Bmode = 0, LC_Cal;
-	struct hal_data_8188e	*pHalData = GET_HAL_DATA(adapt);
-	struct odm_dm_struct *dm_odm = &pHalData->odmpriv;
 
 	/* Check continuous TX and Packet TX */
 	tmpreg = rtw_read8(adapt, 0xd03);
 
 	if ((tmpreg&0x70) != 0)			/* Deal with contisuous TX case */
-		ODM_Write1Byte(dm_odm, 0xd03, tmpreg&0x8F);	/* disable all continuous TX */
+		rtw_write8(adapt, 0xd03, tmpreg&0x8F);	/* disable all continuous TX */
 	else							/*  Deal with Packet TX case */
-		ODM_Write1Byte(dm_odm, REG_TXPAUSE, 0xFF);			/*  block all queues */
+		rtw_write8(adapt, REG_TXPAUSE, 0xFF);			/*  block all queues */
 
 	if ((tmpreg&0x70) != 0) {
 		/* 1. Read original RF mode */
@@ -1264,7 +1262,7 @@ static void phy_LCCalibrate_8188E(struct adapter *adapt, bool is2t)
 	if ((tmpreg&0x70) != 0) {
 		/* Deal with continuous TX case */
 		/* Path-A */
-		ODM_Write1Byte(dm_odm, 0xd03, tmpreg);
+		rtw_write8(adapt, 0xd03, tmpreg);
 		PHY_SetRFReg(adapt, RF_PATH_A, RF_AC, bMask12Bits, RF_Amode);
 
 		/* Path-B */
@@ -1272,7 +1270,7 @@ static void phy_LCCalibrate_8188E(struct adapter *adapt, bool is2t)
 			PHY_SetRFReg(adapt, RF_PATH_B, RF_AC, bMask12Bits, RF_Bmode);
 	} else {
 		/*  Deal with Packet TX case */
-		ODM_Write1Byte(dm_odm, REG_TXPAUSE, 0x00);
+		rtw_write8(adapt, REG_TXPAUSE, 0x00);
 	}
 }
 
@@ -1468,13 +1466,10 @@ void PHY_LCCalibrate_8188E(struct adapter *adapt)
 
 static void phy_setrfpathswitch_8188e(struct adapter *adapt, bool main, bool is2t)
 {
-	struct hal_data_8188e	*pHalData = GET_HAL_DATA(adapt);
-	struct odm_dm_struct *dm_odm = &pHalData->odmpriv;
-
 	if (!adapt->hw_init_completed) {
 		u8 u1btmp;
 		u1btmp = rtw_read8(adapt, REG_LEDCFG2) | BIT7;
-		ODM_Write1Byte(dm_odm, REG_LEDCFG2, u1btmp);
+		rtw_write8(adapt, REG_LEDCFG2, u1btmp);
 		PHY_SetBBReg(adapt, rFPGA0_XAB_RFParameter, BIT13, 0x01);
 	}
 
diff --git a/drivers/staging/rtl8188eu/hal/odm.c b/drivers/staging/rtl8188eu/hal/odm.c
index 5d41ef9..fc05e48 100644
--- a/drivers/staging/rtl8188eu/hal/odm.c
+++ b/drivers/staging/rtl8188eu/hal/odm.c
@@ -887,9 +887,10 @@ void odm_CCKPacketDetectionThresh(struct odm_dm_struct *pDM_Odm)
 void ODM_Write_CCK_CCA_Thres(struct odm_dm_struct *pDM_Odm, u8 CurCCK_CCAThres)
 {
 	struct rtw_dig *pDM_DigTable = &pDM_Odm->DM_DigTable;
+	struct adapter *adapt = pDM_Odm->Adapter;
 
 	if (pDM_DigTable->CurCCK_CCAThres != CurCCK_CCAThres)		/* modify by Guo.Mingzhi 2012-01-03 */
-		ODM_Write1Byte(pDM_Odm, ODM_REG(CCK_CCA, pDM_Odm), CurCCK_CCAThres);
+		rtw_write8(adapt, ODM_REG(CCK_CCA, pDM_Odm), CurCCK_CCAThres);
 	pDM_DigTable->PreCCK_CCAThres = pDM_DigTable->CurCCK_CCAThres;
 	pDM_DigTable->CurCCK_CCAThres = CurCCK_CCAThres;
 }
diff --git a/drivers/staging/rtl8188eu/hal/odm_RegConfig8188E.c b/drivers/staging/rtl8188eu/hal/odm_RegConfig8188E.c
index 6193d9f..a988612 100644
--- a/drivers/staging/rtl8188eu/hal/odm_RegConfig8188E.c
+++ b/drivers/staging/rtl8188eu/hal/odm_RegConfig8188E.c
@@ -66,7 +66,9 @@ void odm_ConfigRF_RadioB_8188E(struct odm_dm_struct *pDM_Odm, u32 Addr, u32 Data
 
 void odm_ConfigMAC_8188E(struct odm_dm_struct *pDM_Odm, u32 Addr, u8 Data)
 {
-	ODM_Write1Byte(pDM_Odm, Addr, Data);
+	struct adapter *adapt = pDM_Odm->Adapter;
+
+	rtw_write8(adapt, Addr, Data);
 	ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_TRACE, ("===> ODM_ConfigMACWithHeaderFile: [MAC_REG] %08X %08X\n", Addr, Data));
 }
 
diff --git a/drivers/staging/rtl8188eu/hal/odm_interface.c b/drivers/staging/rtl8188eu/hal/odm_interface.c
index ae4f30c..76c54dc 100644
--- a/drivers/staging/rtl8188eu/hal/odm_interface.c
+++ b/drivers/staging/rtl8188eu/hal/odm_interface.c
@@ -21,12 +21,6 @@
 #include "odm_precomp.h"
 /*  ODM IO Relative API. */
 
-void ODM_Write1Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr, u8 Data)
-{
-	struct adapter *Adapter = pDM_Odm->Adapter;
-	rtw_write8(Adapter, RegAddr, Data);
-}
-
 void ODM_Write2Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr, u16 Data)
 {
 	struct adapter *Adapter = pDM_Odm->Adapter;
diff --git a/drivers/staging/rtl8188eu/include/odm_interface.h b/drivers/staging/rtl8188eu/include/odm_interface.h
index adcdc39..a11dec1 100644
--- a/drivers/staging/rtl8188eu/include/odm_interface.h
+++ b/drivers/staging/rtl8188eu/include/odm_interface.h
@@ -77,8 +77,6 @@ typedef void (*RT_WORKITEM_CALL_BACK)(void *pContext);
 
 /*  =========== EXtern Function Prototype */
 
-void ODM_Write1Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr, u8 Data);
-
 void ODM_Write2Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr, u16 Data);
 
 void ODM_Write4Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr, u32 Data);
-- 
1.8.4.5

^ permalink raw reply related

* [PATCH 01/12] staging: r8188eu: Remove ODM_Read1Byte
From: Larry Finger @ 2014-02-07  2:45 UTC (permalink / raw)
  To: gregkh; +Cc: netdev, devel, Larry Finger
In-Reply-To: <1391741147-3047-1-git-send-email-Larry.Finger@lwfinger.net>

This is essentially a synonym for rtw_read8.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
 drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c    | 6 +++---
 drivers/staging/rtl8188eu/hal/odm_interface.c     | 6 ------
 drivers/staging/rtl8188eu/include/odm_interface.h | 2 --
 3 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c b/drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c
index 15e8e3f..6581a27 100644
--- a/drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c
+++ b/drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c
@@ -839,7 +839,7 @@ static void _PHY_SaveMACRegisters(
 	struct odm_dm_struct *dm_odm = &pHalData->odmpriv;
 	ODM_RT_TRACE(dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Save MAC parameters.\n"));
 	for (i = 0; i < (IQK_MAC_REG_NUM - 1); i++) {
-		MACBackup[i] = ODM_Read1Byte(dm_odm, MACReg[i]);
+		MACBackup[i] = rtw_read8(adapt, MACReg[i]);
 	}
 	MACBackup[i] = ODM_Read4Byte(dm_odm, MACReg[i]);
 }
@@ -1227,7 +1227,7 @@ static void phy_LCCalibrate_8188E(struct adapter *adapt, bool is2t)
 	struct odm_dm_struct *dm_odm = &pHalData->odmpriv;
 
 	/* Check continuous TX and Packet TX */
-	tmpreg = ODM_Read1Byte(dm_odm, 0xd03);
+	tmpreg = rtw_read8(adapt, 0xd03);
 
 	if ((tmpreg&0x70) != 0)			/* Deal with contisuous TX case */
 		ODM_Write1Byte(dm_odm, 0xd03, tmpreg&0x8F);	/* disable all continuous TX */
@@ -1473,7 +1473,7 @@ static void phy_setrfpathswitch_8188e(struct adapter *adapt, bool main, bool is2
 
 	if (!adapt->hw_init_completed) {
 		u8 u1btmp;
-		u1btmp = ODM_Read1Byte(dm_odm, REG_LEDCFG2) | BIT7;
+		u1btmp = rtw_read8(adapt, REG_LEDCFG2) | BIT7;
 		ODM_Write1Byte(dm_odm, REG_LEDCFG2, u1btmp);
 		PHY_SetBBReg(adapt, rFPGA0_XAB_RFParameter, BIT13, 0x01);
 	}
diff --git a/drivers/staging/rtl8188eu/hal/odm_interface.c b/drivers/staging/rtl8188eu/hal/odm_interface.c
index 3cd6821..5b29067 100644
--- a/drivers/staging/rtl8188eu/hal/odm_interface.c
+++ b/drivers/staging/rtl8188eu/hal/odm_interface.c
@@ -21,12 +21,6 @@
 #include "odm_precomp.h"
 /*  ODM IO Relative API. */
 
-u8 ODM_Read1Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr)
-{
-	struct adapter *Adapter = pDM_Odm->Adapter;
-	return rtw_read8(Adapter, RegAddr);
-}
-
 u16 ODM_Read2Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr)
 {
 	struct adapter *Adapter = pDM_Odm->Adapter;
diff --git a/drivers/staging/rtl8188eu/include/odm_interface.h b/drivers/staging/rtl8188eu/include/odm_interface.h
index a50eae3..ba06101 100644
--- a/drivers/staging/rtl8188eu/include/odm_interface.h
+++ b/drivers/staging/rtl8188eu/include/odm_interface.h
@@ -77,8 +77,6 @@ typedef void (*RT_WORKITEM_CALL_BACK)(void *pContext);
 
 /*  =========== EXtern Function Prototype */
 
-u8 ODM_Read1Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr);
-
 u16 ODM_Read2Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr);
 
 u32 ODM_Read4Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr);
-- 
1.8.4.5

^ permalink raw reply related


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