* [PATCH 5/7] net: wireless: wl1251: use spi_get_drvdata() and spi_set_drvdata()
From: Jingoo Han @ 2013-04-06 6:36 UTC (permalink / raw)
To: 'David S. Miller'; +Cc: netdev, 'Jingoo Han'
In-Reply-To: <000c01ce3290$c44c0980$4ce41c80$%han@samsung.com>
Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/wireless/ti/wl1251/spi.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ti/wl1251/spi.c b/drivers/net/wireless/ti/wl1251/spi.c
index 3b266d3..4c67c2f 100644
--- a/drivers/net/wireless/ti/wl1251/spi.c
+++ b/drivers/net/wireless/ti/wl1251/spi.c
@@ -257,7 +257,7 @@ static int wl1251_spi_probe(struct spi_device *spi)
wl = hw->priv;
SET_IEEE80211_DEV(hw, &spi->dev);
- dev_set_drvdata(&spi->dev, wl);
+ spi_set_drvdata(spi, wl);
wl->if_priv = spi;
wl->if_ops = &wl1251_spi_ops;
@@ -311,7 +311,7 @@ static int wl1251_spi_probe(struct spi_device *spi)
static int wl1251_spi_remove(struct spi_device *spi)
{
- struct wl1251 *wl = dev_get_drvdata(&spi->dev);
+ struct wl1251 *wl = spi_get_drvdata(spi);
free_irq(wl->irq, wl);
wl1251_free_hw(wl);
--
1.7.2.5
^ permalink raw reply related
* [PATCH 4/7] net: ethernet: enc28j60: use spi_get_drvdata() and spi_set_drvdata()
From: Jingoo Han @ 2013-04-06 6:36 UTC (permalink / raw)
To: 'David S. Miller'; +Cc: netdev, 'Jingoo Han'
In-Reply-To: <000c01ce3290$c44c0980$4ce41c80$%han@samsung.com>
Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/ethernet/microchip/enc28j60.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/microchip/enc28j60.c b/drivers/net/ethernet/microchip/enc28j60.c
index 5d98a9f..c7b40aa 100644
--- a/drivers/net/ethernet/microchip/enc28j60.c
+++ b/drivers/net/ethernet/microchip/enc28j60.c
@@ -1566,7 +1566,7 @@ static int enc28j60_probe(struct spi_device *spi)
INIT_WORK(&priv->setrx_work, enc28j60_setrx_work_handler);
INIT_WORK(&priv->irq_work, enc28j60_irq_work_handler);
INIT_WORK(&priv->restart_work, enc28j60_restart_work_handler);
- dev_set_drvdata(&spi->dev, priv); /* spi to priv reference */
+ spi_set_drvdata(spi, priv); /* spi to priv reference */
SET_NETDEV_DEV(dev, &spi->dev);
if (!enc28j60_chipset_init(dev)) {
@@ -1618,7 +1618,7 @@ error_alloc:
static int enc28j60_remove(struct spi_device *spi)
{
- struct enc28j60_net *priv = dev_get_drvdata(&spi->dev);
+ struct enc28j60_net *priv = spi_get_drvdata(spi);
if (netif_msg_drv(priv))
printk(KERN_DEBUG DRV_NAME ": remove\n");
--
1.7.2.5
^ permalink raw reply related
* [PATCH 3/7] net: ethernet: ks8851: use spi_get_drvdata() and spi_set_drvdata()
From: Jingoo Han @ 2013-04-06 6:35 UTC (permalink / raw)
To: 'David S. Miller'; +Cc: netdev, 'Jingoo Han'
In-Reply-To: <000c01ce3290$c44c0980$4ce41c80$%han@samsung.com>
Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/ethernet/micrel/ks8851.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c
index 8fb4812..4a3b499 100644
--- a/drivers/net/ethernet/micrel/ks8851.c
+++ b/drivers/net/ethernet/micrel/ks8851.c
@@ -1367,7 +1367,7 @@ static int ks8851_read_selftest(struct ks8851_net *ks)
#ifdef CONFIG_PM
static int ks8851_suspend(struct spi_device *spi, pm_message_t state)
{
- struct ks8851_net *ks = dev_get_drvdata(&spi->dev);
+ struct ks8851_net *ks = spi_get_drvdata(spi);
struct net_device *dev = ks->netdev;
if (netif_running(dev)) {
@@ -1380,7 +1380,7 @@ static int ks8851_suspend(struct spi_device *spi, pm_message_t state)
static int ks8851_resume(struct spi_device *spi)
{
- struct ks8851_net *ks = dev_get_drvdata(&spi->dev);
+ struct ks8851_net *ks = spi_get_drvdata(spi);
struct net_device *dev = ks->netdev;
if (netif_running(dev)) {
@@ -1456,7 +1456,7 @@ static int ks8851_probe(struct spi_device *spi)
SET_ETHTOOL_OPS(ndev, &ks8851_ethtool_ops);
SET_NETDEV_DEV(ndev, &spi->dev);
- dev_set_drvdata(&spi->dev, ks);
+ spi_set_drvdata(spi, ks);
ndev->if_port = IF_PORT_100BASET;
ndev->netdev_ops = &ks8851_netdev_ops;
@@ -1516,7 +1516,7 @@ err_irq:
static int ks8851_remove(struct spi_device *spi)
{
- struct ks8851_net *priv = dev_get_drvdata(&spi->dev);
+ struct ks8851_net *priv = spi_get_drvdata(spi);
if (netif_msg_drv(priv))
dev_info(&spi->dev, "remove\n");
--
1.7.2.5
^ permalink raw reply related
* [PATCH 2/7] net: can: mcp251x: use spi_get_drvdata() and spi_set_drvdata()
From: Jingoo Han @ 2013-04-06 6:35 UTC (permalink / raw)
To: 'David S. Miller'; +Cc: netdev, 'Jingoo Han'
In-Reply-To: <000c01ce3290$c44c0980$4ce41c80$%han@samsung.com>
Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/can/mcp251x.c | 32 ++++++++++++++++----------------
1 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c
index 2b620c8..3444e9e 100644
--- a/drivers/net/can/mcp251x.c
+++ b/drivers/net/can/mcp251x.c
@@ -269,7 +269,7 @@ struct mcp251x_priv {
#define MCP251X_IS(_model) \
static inline int mcp251x_is_##_model(struct spi_device *spi) \
{ \
- struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev); \
+ struct mcp251x_priv *priv = spi_get_drvdata(spi); \
return priv->model == CAN_MCP251X_MCP##_model; \
}
@@ -305,7 +305,7 @@ static void mcp251x_clean(struct net_device *net)
*/
static int mcp251x_spi_trans(struct spi_device *spi, int len)
{
- struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
+ struct mcp251x_priv *priv = spi_get_drvdata(spi);
struct spi_transfer t = {
.tx_buf = priv->spi_tx_buf,
.rx_buf = priv->spi_rx_buf,
@@ -333,7 +333,7 @@ static int mcp251x_spi_trans(struct spi_device *spi, int len)
static u8 mcp251x_read_reg(struct spi_device *spi, uint8_t reg)
{
- struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
+ struct mcp251x_priv *priv = spi_get_drvdata(spi);
u8 val = 0;
priv->spi_tx_buf[0] = INSTRUCTION_READ;
@@ -348,7 +348,7 @@ static u8 mcp251x_read_reg(struct spi_device *spi, uint8_t reg)
static void mcp251x_read_2regs(struct spi_device *spi, uint8_t reg,
uint8_t *v1, uint8_t *v2)
{
- struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
+ struct mcp251x_priv *priv = spi_get_drvdata(spi);
priv->spi_tx_buf[0] = INSTRUCTION_READ;
priv->spi_tx_buf[1] = reg;
@@ -361,7 +361,7 @@ static void mcp251x_read_2regs(struct spi_device *spi, uint8_t reg,
static void mcp251x_write_reg(struct spi_device *spi, u8 reg, uint8_t val)
{
- struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
+ struct mcp251x_priv *priv = spi_get_drvdata(spi);
priv->spi_tx_buf[0] = INSTRUCTION_WRITE;
priv->spi_tx_buf[1] = reg;
@@ -373,7 +373,7 @@ static void mcp251x_write_reg(struct spi_device *spi, u8 reg, uint8_t val)
static void mcp251x_write_bits(struct spi_device *spi, u8 reg,
u8 mask, uint8_t val)
{
- struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
+ struct mcp251x_priv *priv = spi_get_drvdata(spi);
priv->spi_tx_buf[0] = INSTRUCTION_BIT_MODIFY;
priv->spi_tx_buf[1] = reg;
@@ -386,7 +386,7 @@ static void mcp251x_write_bits(struct spi_device *spi, u8 reg,
static void mcp251x_hw_tx_frame(struct spi_device *spi, u8 *buf,
int len, int tx_buf_idx)
{
- struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
+ struct mcp251x_priv *priv = spi_get_drvdata(spi);
if (mcp251x_is_2510(spi)) {
int i;
@@ -403,7 +403,7 @@ static void mcp251x_hw_tx_frame(struct spi_device *spi, u8 *buf,
static void mcp251x_hw_tx(struct spi_device *spi, struct can_frame *frame,
int tx_buf_idx)
{
- struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
+ struct mcp251x_priv *priv = spi_get_drvdata(spi);
u32 sid, eid, exide, rtr;
u8 buf[SPI_TRANSFER_BUF_LEN];
@@ -434,7 +434,7 @@ static void mcp251x_hw_tx(struct spi_device *spi, struct can_frame *frame,
static void mcp251x_hw_rx_frame(struct spi_device *spi, u8 *buf,
int buf_idx)
{
- struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
+ struct mcp251x_priv *priv = spi_get_drvdata(spi);
if (mcp251x_is_2510(spi)) {
int i, len;
@@ -454,7 +454,7 @@ static void mcp251x_hw_rx_frame(struct spi_device *spi, u8 *buf,
static void mcp251x_hw_rx(struct spi_device *spi, int buf_idx)
{
- struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
+ struct mcp251x_priv *priv = spi_get_drvdata(spi);
struct sk_buff *skb;
struct can_frame *frame;
u8 buf[SPI_TRANSFER_BUF_LEN];
@@ -550,7 +550,7 @@ static int mcp251x_do_set_mode(struct net_device *net, enum can_mode mode)
static int mcp251x_set_normal_mode(struct spi_device *spi)
{
- struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
+ struct mcp251x_priv *priv = spi_get_drvdata(spi);
unsigned long timeout;
/* Enable interrupts */
@@ -620,7 +620,7 @@ static int mcp251x_setup(struct net_device *net, struct mcp251x_priv *priv,
static int mcp251x_hw_reset(struct spi_device *spi)
{
- struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
+ struct mcp251x_priv *priv = spi_get_drvdata(spi);
int ret;
unsigned long timeout;
@@ -1020,7 +1020,7 @@ static int mcp251x_can_probe(struct spi_device *spi)
CAN_CTRLMODE_LOOPBACK | CAN_CTRLMODE_LISTENONLY;
priv->model = spi_get_device_id(spi)->driver_data;
priv->net = net;
- dev_set_drvdata(&spi->dev, priv);
+ spi_set_drvdata(spi, priv);
priv->spi = spi;
mutex_init(&priv->mcp_lock);
@@ -1118,7 +1118,7 @@ error_out:
static int mcp251x_can_remove(struct spi_device *spi)
{
struct mcp251x_platform_data *pdata = spi->dev.platform_data;
- struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
+ struct mcp251x_priv *priv = spi_get_drvdata(spi);
struct net_device *net = priv->net;
unregister_candev(net);
@@ -1144,7 +1144,7 @@ static int mcp251x_can_suspend(struct device *dev)
{
struct spi_device *spi = to_spi_device(dev);
struct mcp251x_platform_data *pdata = spi->dev.platform_data;
- struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
+ struct mcp251x_priv *priv = spi_get_drvdata(spi);
struct net_device *net = priv->net;
priv->force_quit = 1;
@@ -1176,7 +1176,7 @@ static int mcp251x_can_resume(struct device *dev)
{
struct spi_device *spi = to_spi_device(dev);
struct mcp251x_platform_data *pdata = spi->dev.platform_data;
- struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
+ struct mcp251x_priv *priv = spi_get_drvdata(spi);
if (priv->after_suspend & AFTER_SUSPEND_POWER) {
pdata->power_enable(1);
--
1.7.2.5
^ permalink raw reply related
* [PATCH 1/7] net: ieee802154: mrf24j40: use spi_get_drvdata() and spi_set_drvdata()
From: Jingoo Han @ 2013-04-06 6:34 UTC (permalink / raw)
To: 'David S. Miller'; +Cc: netdev, 'Jingoo Han'
Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/ieee802154/mrf24j40.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c
index 0ca8f88..ca00351 100644
--- a/drivers/net/ieee802154/mrf24j40.c
+++ b/drivers/net/ieee802154/mrf24j40.c
@@ -648,7 +648,7 @@ static int mrf24j40_probe(struct spi_device *spi)
init_completion(&devrec->tx_complete);
INIT_WORK(&devrec->irqwork, mrf24j40_isrwork);
devrec->spi = spi;
- dev_set_drvdata(&spi->dev, devrec);
+ spi_set_drvdata(spi, devrec);
/* Register with the 802154 subsystem */
@@ -720,7 +720,7 @@ err_devrec:
static int mrf24j40_remove(struct spi_device *spi)
{
- struct mrf24j40 *devrec = dev_get_drvdata(&spi->dev);
+ struct mrf24j40 *devrec = spi_get_drvdata(spi);
dev_dbg(printdev(devrec), "remove\n");
@@ -732,7 +732,7 @@ static int mrf24j40_remove(struct spi_device *spi)
* complete? */
/* Clean up the SPI stuff. */
- dev_set_drvdata(&spi->dev, NULL);
+ spi_set_drvdata(spi, NULL);
kfree(devrec->buf);
kfree(devrec);
return 0;
--
1.7.2.5
^ permalink raw reply related
* Re: [Suggestion] ISDN: isdnloop: C grammar issue, '}' miss match 'if' and 'switch' statement.
From: Chen Gang @ 2013-04-06 4:56 UTC (permalink / raw)
To: Dan Williams
Cc: Joe Perches, David Miller, torvalds, eric.dumazet, mkubecek,
fengguang.wu, isdn, netdev
In-Reply-To: <1365194247.22273.7.camel@dcbw.foobar.com>
On 2013年04月06日 04:37, Dan Williams wrote:
> On Thu, 2013-04-04 at 20:00 -0700, Joe Perches wrote:
>> > On Thu, 2013-04-04 at 14:09 -0400, David Miller wrote:
>>> > > From: Chen Gang <gang.chen@asianux.com>
>>> > > Date: Thu, 04 Apr 2013 16:30:01 +0800
>>>>> > > >> Of course, nobody sane actually cares about ISDN any more, so I think
>>>>> > > >> this is all pretty academic. I think even Germany (where ISDN *used*
>>>>> > > >> to be very common due to telephone monopolies and odd rules) no longer
>>>>> > > >> uses it. I can't imagine that anybody else does either.
>>>> > > > can we delete it ?
>>> > > I think the point is no that we can delete it, but rather that we
>>> > > should concentrate our efforts on code that more people use rather
>>> > > than trying to clean up antiquated code with very few users.
>> >
>> > Very sensible.
>> >
>> > I was going to see about moving drivers/isdn/hardware/eicon
>> > to staging but it seems the hardware is still for sale.
>> >
>> > http://www.dialogic.com/en/products/media/diva/diva-bri-2.aspx
>> >
>> > Anyone have suggestions on other obsolete isdn drivers that
>> > could be moved to staging for awhile before deletion?
> Anything PCMCIA or ISA? There are a number of them:
>
> CONFIG_ISDN_DRV_AVMB1_B1ISA
> CONFIG_ISDN_DRV_AVMB1_B1PCMCIA
> CONFIG_ISDN_DRV_AVMB1_AVM_CS
> CONFIG_ISDN_DRV_AVMB1_T1ISA
> CONFIG_HISAX_SEDLBAUER_CS
> CONFIG_HISAX_ELSA_CS
> CONFIG_HISAX_AVM_A1_CS
> CONFIG_HISAX_TELES_CS
> CONFIG_ISDN_DRV_ACT2000
>
> That's all I can find in a quick look.
thanks. it seems we really can not delete ISDN.
:-)
--
Chen Gang
Asianux Corporation
^ permalink raw reply
* Re: PROBLEM: IPv6 TCP-Connections resetting
From: Hannes Frederic Sowa @ 2013-04-06 4:37 UTC (permalink / raw)
To: Tetja Rediske, djduanjiong, netdev, steffen.klassert
In-Reply-To: <20130406043534.GC30194@order.stressinduktion.org>
On Sat, Apr 06, 2013 at 06:35:34AM +0200, Hannes Frederic Sowa wrote:
> [no comments from me - only forwarded to netdev@vger.kernel.org, Duan
> Jiong and Steffen Klassert]
Sorry, I had this in my todo list and haven't seen it got here already. :/
^ permalink raw reply
* Re: PROBLEM: IPv6 TCP-Connections resetting
From: Hannes Frederic Sowa @ 2013-04-06 4:35 UTC (permalink / raw)
To: Tetja Rediske; +Cc: djduanjiong, netdev, steffen.klassert
In-Reply-To: <20130405174828.310a02c3@trediske.ws.office.manitu.net>
[no comments from me - only forwarded to netdev@vger.kernel.org, Duan
Jiong and Steffen Klassert]
On Fri, Apr 05, 2013 at 05:48:28PM +0200, Tetja Rediske wrote:
> Hi,
>
> [1.] One line summary of the problem:
>
> IPv6 TCP-Connections resetting
>
> [2.] Full description of the problem/report:
>
> In the last weeks we updated some of our systems to a 3.8.4 Kernel.
> Since then sometimes we can't connect to services running IPv6,
> Apache and Openssh tested.
>
> We got this on different machines with x86 and x86_64 Kernels. On
> x86_64 it is more random, but on x86 i can reproduce it permanently
> (Just opening any TCP Connection 1st time or after some short delay).
> Connecting quick after the reset again will work as expected. It will
> also work, if you keep another connection open.
>
> Before I got to the Kernel, I just kept an strace on an userspace
> process, but it did not notice the connection attempt. After this I
> monitored the connection with tcpdump, but nothing unusual.
>
> Then I did a rollback to the older Kernel and it worked as expected.
>
> I tracked it down with 'git bisect' to commit:
>
> 093d04d42fa094f6740bb188f0ad0c215ff61e2c
>
> I also tested latest git state available.
>
> [3.] Keywords (i.e., modules, networking, kernel):
>
> networking, IPv6
>
> [4.] Kernel information
> [4.1.] Kernel version (from /proc/version):
>
> since commit: 093d04d42fa094f6740bb188f0ad0c215ff61e2c
>
> [4.2.] Kernel .config file:
> [5.] Most recent kernel version which did not have the bug:
>
> none
>
> [6.] Output of Oops.. message (if applicable) with symbolic information
> resolved (see Documentation/oops-tracing.txt)
> [7.] A small shell script or example program which triggers the
> problem (if possible)
> [8.] Environment
> [8.1.] Software (add the output of the ver_linux script here)
>
> Different systems, mostly reproduced on this one:
>
> Linux dns03.tetja.de 3.9.0-rc5+ #10 SMP Fri Apr 5 16:55:54 CEST 2013
> i686 AMD Athlon(tm) 64 X2 Dual Core Processor 5600+ AuthenticAMD
> GNU/Linux
>
> Gnu C 4.4.5
> Gnu make 3.82
> binutils 2.22
> util-linux 2.22.2
> mount debug
> module-init-tools 12
> e2fsprogs 1.42
> jfsutils 1.1.15
> reiserfsprogs 3.6.21
> xfsprogs 3.1.10
> Linux C Library 2.15
> Dynamic linker (ldd) 2.15
> Procps 3.3.4
> Net-tools 1.60_p20120127084908
> Kbd 1.15.3wip
> Sh-utils 8.20
> Modules Loaded
>
> Connections looking like this on booth sites:
>
> 11:52:04.634315 IP6 2a00:1828:0:1::10.51808 >
> 2a00:1828:1000:1102::2.80: Flags [S], seq 103067898, win 5760, options
> [mss 1440,sackOK,TS val 232579708 ecr 0,nop,wscale 7], length 0
>
> 11:52:04.634354 IP6 2a00:1828:1000:1102::2.80 >
> 2a00:1828:0:1::10.51808: Flags [S.], seq 3352491415, ack 103067899, win
> 14280, options [mss 1440,sackOK,TS val 174797959 ecr
> 232579708,nop,wscale 7], length 0
>
> 11:52:04.634656 IP6 fe80::92e2:baff:fe00:c120 > 2a00:1828:1000:1102::2:
> ICMP6, redirect, 2a00:1828:0:1::10 to 2a00:1828:0:1::10, length 136
>
> 11:52:04.634715 IP6 2a00:1828:0:1::10.51808 >
> 2a00:1828:1000:1102::2.80: Flags [.], ack 1, win 45, options
> [nop,nop,TS val 232579708 ecr 174797959], length 0
>
> 11:52:04.634726 IP6 2a00:1828:1000:1102::2.80 >
> 2a00:1828:0:1::10.51808: Flags [R], seq 3352491416, win 0, length 0
>
> 11:52:04.635027 IP6 2a00:1828:0:1::10.51808 >
> 2a00:1828:1000:1102::2.80: Flags [P.], seq 1:359, ack 1, win 45,
> options [nop,nop,TS val 232579708 ecr 174797959], length 358
>
> 11:52:04.635037 IP6 2a00:1828:1000:1102::2.80 >
> 2a00:1828:0:1::10.51808: Flags [R], seq 3352491416, win 0, length 0
>
> 11:52:04.635071 IP6 fe80::92e2:baff:fe00:c120 > 2a00:1828:1000:1102::2:
> ICMP6, redirect, 2a00:1828:0:1::10 to 2a00:1828:0:1::10, length 112
>
> 11:52:04.635246 IP6 fe80::92e2:baff:fe00:c120 > 2a00:1828:1000:1102::2:
> ICMP6, redirect, 2a00:1828:0:1::10 to 2a00:1828:0:1::10, length 112
>
> Kind Regards and keep up the good work! :)
>
> Tetja Rediske
^ permalink raw reply
* Re: [PATCH] bonding: remove sysfs before removing devices
From: Veaceslav Falico @ 2013-04-06 1:49 UTC (permalink / raw)
To: Nikolay Aleksandrov; +Cc: netdev, fubar, andy, davem
In-Reply-To: <515F5E6C.2030009@redhat.com>
On Sat, Apr 06, 2013 at 01:29:48AM +0200, Nikolay Aleksandrov wrote:
>On 04/06/2013 01:21 AM, Veaceslav Falico wrote:
>> On Sat, Apr 06, 2013 at 12:15:11AM +0200, Nikolay Aleksandrov wrote:
>>> Hi,
>>> Sorry for the late reply but I was travelling this week. In my
>>> opinion this
>>> fix is wrong because in bond_uninit() (called by rtnl_link_unregister)
>>> you have:
>>> list_del(&bond->bond_list);
>>> which is linked in the bond_net dev_list which is freed by
>>> unregister_pernet_subsys.
>>
>> Yep, you're right, I've hit it recently with the patch applied, and now
>> working on it. However, I still think that the idea of the patch is
>> correct
>> - i.e. to first disable sysfs (especially bonding_masters) and only
>> afterwards to start removing everything else. Or, obviously, to finally
>> add normal locking to sysfs functions.
>>
>> Anyway, this corruption is really rare, so I'll wait for your fix next
>> week.
>>
>Well, there's no need for that because you'll have to iterate over all
>"net"s to do it properly. Since we already have code that does it
>(unregister_pernet_subsys), my fix is to kill off any "left" bond
>devices in bond_net_exit() _after_ destroying the bonding_masters
>sysfs entry for that net. This way we preserve the code structure and avoid
>duplicating a loop over all nets.
Yep, that was one approach that I wanted to do, however I didn't like the
idea to duplicate the device destruction - i.e. the rtnl_link_unregister()
already does that, and to re-delete them after sysfs gets out of the way
feeled wrong. However, I've also missed the net->dev_list part, so seems
like both approaches have drawbacks... Or did I miss something?
>This is the fix we discussed a week ago.
Not with me :). I didn't know of this bug by that time...
>I'd be happy to hear any comments on it before posting :-)
>
>Of course stopping the whole bonding sysfs handling is also an alternative.
I think it'd be the best way to do that.
1) We can't remove the net_ns before removing the devices cause they depend
on it (and I think it's quite a hack anyway now that I'm aware of dev_list).
2) We can't re-remove devices after sysfs deactivation, it's also a hack,
cause rtnl does the same thing.
3) We can't hold rtnl_mutex to do both rtnl and net_ns removal cause we can
deadlock in sysfs code (when it gets removed).
4) We can't remove the b_masters before all the logic cause it'll duplicate
the code for unregister_pernet_operations(), and will also look like a
hack (with looping through net_ns).
Out of all these, #2 (your option) looks the best - the least intrusive and
the easiest to read. However, I still think that it's the lesser evil, and
there must exist a way to do it correctly (like with #3, and avoid the
deadlock by restart_syscall() technique in bond_store_bonds() - however I
don't really know if it'll work.).
Anyway, I'd really like your feedback on these thoughts, and if nothing
better comes up - your patch :).
Thank you!
^ permalink raw reply
* Re: [PATCH] bonding: remove sysfs before removing devices
From: Nikolay Aleksandrov @ 2013-04-05 23:29 UTC (permalink / raw)
To: Veaceslav Falico; +Cc: netdev, fubar, andy, davem
In-Reply-To: <20130405232133.GA19437@redhat.com>
On 04/06/2013 01:21 AM, Veaceslav Falico wrote:
> On Sat, Apr 06, 2013 at 12:15:11AM +0200, Nikolay Aleksandrov wrote:
>> Hi,
>> Sorry for the late reply but I was travelling this week. In my
>> opinion this
>> fix is wrong because in bond_uninit() (called by rtnl_link_unregister)
>> you have:
>> list_del(&bond->bond_list);
>> which is linked in the bond_net dev_list which is freed by
>> unregister_pernet_subsys.
>
> Yep, you're right, I've hit it recently with the patch applied, and now
> working on it. However, I still think that the idea of the patch is
> correct
> - i.e. to first disable sysfs (especially bonding_masters) and only
> afterwards to start removing everything else. Or, obviously, to finally
> add normal locking to sysfs functions.
>
> Anyway, this corruption is really rare, so I'll wait for your fix next
> week.
>
Well, there's no need for that because you'll have to iterate over all
"net"s to do it properly. Since we already have code that does it
(unregister_pernet_subsys), my fix is to kill off any "left" bond
devices in bond_net_exit() _after_ destroying the bonding_masters
sysfs entry for that net. This way we preserve the code structure and avoid
duplicating a loop over all nets.
This is the fix we discussed a week ago.
I'd be happy to hear any comments on it before posting :-)
Of course stopping the whole bonding sysfs handling is also an alternative.
^ permalink raw reply
* Re: [PATCH] bonding: remove sysfs before removing devices
From: Veaceslav Falico @ 2013-04-05 23:21 UTC (permalink / raw)
To: Nikolay Aleksandrov; +Cc: netdev, fubar, andy, davem
In-Reply-To: <515F4CEF.3030207@redhat.com>
On Sat, Apr 06, 2013 at 12:15:11AM +0200, Nikolay Aleksandrov wrote:
>Hi,
>Sorry for the late reply but I was travelling this week. In my opinion this
>fix is wrong because in bond_uninit() (called by rtnl_link_unregister)
>you have:
>list_del(&bond->bond_list);
>which is linked in the bond_net dev_list which is freed by
>unregister_pernet_subsys.
Yep, you're right, I've hit it recently with the patch applied, and now
working on it. However, I still think that the idea of the patch is correct
- i.e. to first disable sysfs (especially bonding_masters) and only
afterwards to start removing everything else. Or, obviously, to finally
add normal locking to sysfs functions.
Anyway, this corruption is really rare, so I'll wait for your fix next
week.
>You'll get a corrupted list warning at best.
>
>Here's a sample from running insmod max_bonds=3/rmmod in a loop with the
>patch applied:
>Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302186] ------------[ cut here
>]------------
>Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302191] WARNING: at
>lib/list_debug.c:62 __list_del_entry+0x82/0xd0()
>Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302192] Hardware name: VirtualBox
>Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302194] list_del corruption.
>next->prev should be ffff880036bc6860, but was ffff88002ee23000
>Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302194] Modules linked in:
>bonding(O-) ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6
>nf_conntrack_ipv4 nf_defrag_ipv4 ip6table_filter xt_conntrack
>nf_conntrack ip6_tables snd_hda_codec_idt snd_hda_intel snd_hda_codec
>snd_hwdep snd_seq snd_seq_device ppdev snd_pcm pcspkr snd_page_alloc
>i2c_piix4 joydev snd_timer snd soundcore i2c_core microcode parport_pc
>parport e1000 [last unloaded: bonding]
>Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302214] Call Trace:
>Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302219] [<ffffffff8105e99f>]
>warn_slowpath_common+0x7f/0xc0
>Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302221] [<ffffffff8105ea96>]
>warn_slowpath_fmt+0x46/0x50
>Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302225] [<ffffffff8164efaf>]
>? printk+0x61/0x63
>Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302227] [<ffffffff8130c302>]
>__list_del_entry+0x82/0xd0
>Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302229] [<ffffffff8130c361>]
>list_del+0x11/0x40
>Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302233] [<ffffffffa0187f70>]
>bond_uninit+0x70/0xd0 [bonding]
>Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302236] [<ffffffff815486d8>]
>rollback_registered_many+0x158/0x220
>Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302238] [<ffffffff815487f9>]
>unregister_netdevice_many+0x19/0x60
>Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302240] [<ffffffff815575ae>]
>__rtnl_link_unregister+0x6e/0xb0
>Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302243] [<ffffffff81557b7e>]
>rtnl_link_unregister+0x1e/0x30
>Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302246] [<ffffffffa019359e>]
>bonding_exit+0x2d/0xa8f [bonding]
>Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302249] [<ffffffff810c1dd0>]
>sys_delete_module+0x170/0x2d0
>Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302252] [<ffffffff81014981>]
>? do_notify_resume+0x71/0xb0
>Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302255] [<ffffffff81661899>]
>system_call_fastpath+0x16/0x1b
>Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302256] ---[ end trace
>31cca9f26623fa11 ]---
>Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302417] bonding: bond1:
>released all slaves
>
>You can hit this also with a NULL pointer dereference.
>I have a correct fix for this bug which I intend to post next week when
>I get back and after some more testing.
>
>Please let me know if I've missed something about this patch.
>
>Best regards,
> Nik
^ permalink raw reply
* [PATCH v2] mac802154: Keep track of the channel when changed
From: Alan Ott @ 2013-04-05 23:03 UTC (permalink / raw)
To: Alexander Smirnov, Dmitry Eremin-Solenikov, David S. Miller
Cc: Alan Ott, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
In-Reply-To: <515F4017.6060404-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
Two sections checked whether the current channel != the new channel
without ever setting the current channel variables.
1. net/mac802154/tx.c: Prevent set_channel() from getting called every
time a packet is sent.
2. net/mac802154/mib.c: Lock (pib_lock) accesses to current_channel and
current_page and make sure they are updated when the channel has been
changed.
Signed-off-by: Alan Ott <alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
---
net/mac802154/mib.c | 12 +++++++++++-
net/mac802154/tx.c | 3 +++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/net/mac802154/mib.c b/net/mac802154/mib.c
index f03e55f..8ded97c 100644
--- a/net/mac802154/mib.c
+++ b/net/mac802154/mib.c
@@ -176,9 +176,15 @@ static void phy_chan_notify(struct work_struct *work)
struct mac802154_sub_if_data *priv = netdev_priv(nw->dev);
int res;
+ mutex_lock(&priv->hw->phy->pib_lock);
res = hw->ops->set_channel(&hw->hw, priv->page, priv->chan);
if (res)
pr_debug("set_channel failed\n");
+ else {
+ priv->hw->phy->current_channel = priv->chan;
+ priv->hw->phy->current_page = priv->page;
+ }
+ mutex_unlock(&priv->hw->phy->pib_lock);
kfree(nw);
}
@@ -195,8 +201,11 @@ void mac802154_dev_set_page_channel(struct net_device *dev, u8 page, u8 chan)
priv->chan = chan;
spin_unlock_bh(&priv->mib_lock);
+ mutex_lock(&priv->hw->phy->pib_lock);
if (priv->hw->phy->current_channel != priv->chan ||
priv->hw->phy->current_page != priv->page) {
+ mutex_unlock(&priv->hw->phy->pib_lock);
+
work = kzalloc(sizeof(*work), GFP_ATOMIC);
if (!work)
return;
@@ -204,5 +213,6 @@ void mac802154_dev_set_page_channel(struct net_device *dev, u8 page, u8 chan)
INIT_WORK(&work->work, phy_chan_notify);
work->dev = dev;
queue_work(priv->hw->dev_workqueue, &work->work);
- }
+ } else
+ mutex_unlock(&priv->hw->phy->pib_lock);
}
diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c
index 3fd3e07..6d16473 100644
--- a/net/mac802154/tx.c
+++ b/net/mac802154/tx.c
@@ -58,6 +58,9 @@ static void mac802154_xmit_worker(struct work_struct *work)
pr_debug("set_channel failed\n");
goto out;
}
+
+ xw->priv->phy->current_channel = xw->chan;
+ xw->priv->phy->current_page = xw->page;
}
res = xw->priv->ops->xmit(&xw->priv->hw, xw->skb);
--
1.7.11.2
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
^ permalink raw reply related
* Re: [PATCH] bonding: remove sysfs before removing devices
From: Nikolay Aleksandrov @ 2013-04-05 22:15 UTC (permalink / raw)
To: Veaceslav Falico; +Cc: netdev, fubar, andy, davem
In-Reply-To: <1365003993-13181-1-git-send-email-vfalico@redhat.com>
Hi,
Sorry for the late reply but I was travelling this week. In my opinion this
fix is wrong because in bond_uninit() (called by rtnl_link_unregister)
you have:
list_del(&bond->bond_list);
which is linked in the bond_net dev_list which is freed by
unregister_pernet_subsys.
You'll get a corrupted list warning at best.
Here's a sample from running insmod max_bonds=3/rmmod in a loop with the
patch applied:
Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302186] ------------[ cut here
]------------
Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302191] WARNING: at
lib/list_debug.c:62 __list_del_entry+0x82/0xd0()
Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302192] Hardware name: VirtualBox
Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302194] list_del corruption.
next->prev should be ffff880036bc6860, but was ffff88002ee23000
Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302194] Modules linked in:
bonding(O-) ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6
nf_conntrack_ipv4 nf_defrag_ipv4 ip6table_filter xt_conntrack
nf_conntrack ip6_tables snd_hda_codec_idt snd_hda_intel snd_hda_codec
snd_hwdep snd_seq snd_seq_device ppdev snd_pcm pcspkr snd_page_alloc
i2c_piix4 joydev snd_timer snd soundcore i2c_core microcode parport_pc
parport e1000 [last unloaded: bonding]
Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302214] Call Trace:
Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302219] [<ffffffff8105e99f>]
warn_slowpath_common+0x7f/0xc0
Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302221] [<ffffffff8105ea96>]
warn_slowpath_fmt+0x46/0x50
Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302225] [<ffffffff8164efaf>]
? printk+0x61/0x63
Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302227] [<ffffffff8130c302>]
__list_del_entry+0x82/0xd0
Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302229] [<ffffffff8130c361>]
list_del+0x11/0x40
Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302233] [<ffffffffa0187f70>]
bond_uninit+0x70/0xd0 [bonding]
Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302236] [<ffffffff815486d8>]
rollback_registered_many+0x158/0x220
Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302238] [<ffffffff815487f9>]
unregister_netdevice_many+0x19/0x60
Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302240] [<ffffffff815575ae>]
__rtnl_link_unregister+0x6e/0xb0
Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302243] [<ffffffff81557b7e>]
rtnl_link_unregister+0x1e/0x30
Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302246] [<ffffffffa019359e>]
bonding_exit+0x2d/0xa8f [bonding]
Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302249] [<ffffffff810c1dd0>]
sys_delete_module+0x170/0x2d0
Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302252] [<ffffffff81014981>]
? do_notify_resume+0x71/0xb0
Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302255] [<ffffffff81661899>]
system_call_fastpath+0x16/0x1b
Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302256] ---[ end trace
31cca9f26623fa11 ]---
Apr 5 23:54:54 dhcp-1-171 kernel: [ 21.302417] bonding: bond1:
released all slaves
You can hit this also with a NULL pointer dereference.
I have a correct fix for this bug which I intend to post next week when
I get back and after some more testing.
Please let me know if I've missed something about this patch.
Best regards,
Nik
^ permalink raw reply
* [PATCH net,2/2] hyperv: Fix RNDIS send_completion code path
From: Haiyang Zhang @ 2013-04-05 21:44 UTC (permalink / raw)
To: davem, netdev; +Cc: haiyangz, kys, olaf, jasowang, linux-kernel, devel
In-Reply-To: <1365198280-23270-1-git-send-email-haiyangz@microsoft.com>
In some cases, the VM_PKT_COMP message can arrive later than RNDIS completion
message, which will free the packet memory. This may cause panic due to access
to freed memory in netvsc_send_completion().
This patch fixes this problem by removing rndis_filter_send_request_completion()
from the code path. The function was a no-op.
Reported-by: Long Li <longli@microsoft.com>
Tested-by: Long Li <longli@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
---
drivers/net/hyperv/netvsc.c | 17 ++++++++++++-----
drivers/net/hyperv/rndis_filter.c | 14 +-------------
2 files changed, 13 insertions(+), 18 deletions(-)
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index 1cd7748..f5f0f09 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -470,8 +470,10 @@ static void netvsc_send_completion(struct hv_device *device,
packet->trans_id;
/* Notify the layer above us */
- nvsc_packet->completion.send.send_completion(
- nvsc_packet->completion.send.send_completion_ctx);
+ if (nvsc_packet)
+ nvsc_packet->completion.send.send_completion(
+ nvsc_packet->completion.send.
+ send_completion_ctx);
num_outstanding_sends =
atomic_dec_return(&net_device->num_outstanding_sends);
@@ -498,6 +500,7 @@ int netvsc_send(struct hv_device *device,
int ret = 0;
struct nvsp_message sendMessage;
struct net_device *ndev;
+ u64 req_id;
net_device = get_outbound_net_device(device);
if (!net_device)
@@ -518,20 +521,24 @@ int netvsc_send(struct hv_device *device,
0xFFFFFFFF;
sendMessage.msg.v1_msg.send_rndis_pkt.send_buf_section_size = 0;
+ if (packet->completion.send.send_completion)
+ req_id = (u64)packet;
+ else
+ req_id = 0;
+
if (packet->page_buf_cnt) {
ret = vmbus_sendpacket_pagebuffer(device->channel,
packet->page_buf,
packet->page_buf_cnt,
&sendMessage,
sizeof(struct nvsp_message),
- (unsigned long)packet);
+ req_id);
} else {
ret = vmbus_sendpacket(device->channel, &sendMessage,
sizeof(struct nvsp_message),
- (unsigned long)packet,
+ req_id,
VM_PKT_DATA_INBAND,
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
-
}
if (ret == 0) {
diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c
index 2b657d4..0775f0a 100644
--- a/drivers/net/hyperv/rndis_filter.c
+++ b/drivers/net/hyperv/rndis_filter.c
@@ -61,9 +61,6 @@ struct rndis_request {
static void rndis_filter_send_completion(void *ctx);
-static void rndis_filter_send_request_completion(void *ctx);
-
-
static struct rndis_device *get_rndis_device(void)
{
@@ -241,10 +238,7 @@ static int rndis_filter_send_request(struct rndis_device *dev,
packet->page_buf[0].len;
}
- packet->completion.send.send_completion_ctx = req;/* packet; */
- packet->completion.send.send_completion =
- rndis_filter_send_request_completion;
- packet->completion.send.send_completion_tid = (unsigned long)dev;
+ packet->completion.send.send_completion = NULL;
ret = netvsc_send(dev->net_dev->dev, packet);
return ret;
@@ -999,9 +993,3 @@ static void rndis_filter_send_completion(void *ctx)
/* Pass it back to the original handler */
filter_pkt->completion(filter_pkt->completion_ctx);
}
-
-
-static void rndis_filter_send_request_completion(void *ctx)
-{
- /* Noop */
-}
--
1.7.4.1
^ permalink raw reply related
* [PATCH net,1/2] hyperv: Fix a kernel warning from netvsc_linkstatus_callback()
From: Haiyang Zhang @ 2013-04-05 21:44 UTC (permalink / raw)
To: davem, netdev; +Cc: haiyangz, kys, olaf, jasowang, linux-kernel, devel
The warning about local_bh_enable inside IRQ happens when disconnecting a
virtual NIC.
The reason for the warning is -- netif_tx_disable() is called when the NIC
is disconnected. And it's called within irq context. netif_tx_disable() calls
local_bh_enable() which displays warning if in irq.
The fix is to remove the unnecessary netif_tx_disable & wake_queue() in the
netvsc_linkstatus_callback().
Reported-by: Richard Genoud <richard.genoud@gmail.com>
Tested-by: Long Li <longli@microsoft.com>
Tested-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
---
drivers/net/hyperv/netvsc_drv.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 5f85205..8341b62 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -241,13 +241,11 @@ void netvsc_linkstatus_callback(struct hv_device *device_obj,
if (status == 1) {
netif_carrier_on(net);
- netif_wake_queue(net);
ndev_ctx = netdev_priv(net);
schedule_delayed_work(&ndev_ctx->dwork, 0);
schedule_delayed_work(&ndev_ctx->dwork, msecs_to_jiffies(20));
} else {
netif_carrier_off(net);
- netif_tx_disable(net);
}
}
--
1.7.4.1
^ permalink raw reply related
* Re: [PATCH] mac802154: Keep track of the channel when changed
From: Alan Ott @ 2013-04-05 21:20 UTC (permalink / raw)
To: Werner Almesberger
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
David S. Miller
In-Reply-To: <20130405210514.GF28141@ws>
On 04/05/2013 05:05 PM, Werner Almesberger wrote:
> Alan Ott wrote:
>> Prevent set_channel() from getting called every time a packet is sent. This
>> looks like it was an oversight.
> at86rf230.c and derivatives avoid this problem by setting
> phy->current_* in the *_channel function.
>
> But I'd agree that it's nicer to do this in one place, not in
> every driver.
>
> In case a driver had a weird failure mode in which it leaves the
> original channel but only makes it halfway to the new channel, it
> could still set phy->current_* and return an error. So there's no
> loss of functionality with your change.
Hmm... I just noticed that mib.c does the same thing (and doesn't set
phy->current_*). I'll need to fix that one too (and resubmit). :(
Alan.
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
^ permalink raw reply
* Re: [PATCH] TTY: ircomm, use GFP_KERNEL in ircomm_open()
From: Greg Kroah-Hartman @ 2013-04-05 21:15 UTC (permalink / raw)
To: Mathias Krause; +Cc: Samuel Ortiz, David S. Miller, netdev
In-Reply-To: <1365195727-24780-1-git-send-email-minipli@googlemail.com>
On Fri, Apr 05, 2013 at 11:02:07PM +0200, Mathias Krause wrote:
> Hi Greg,
>
> I'm unsure if you or Dave should take that one as it's for one a TTY
> patch but also living under net/. So I'm uncertain and let you decide!
If Dave want to take it, it's fine with me:
> -- >8 --
> Subject: [PATCH] TTY: ircomm, use GFP_KERNEL in ircomm_open()
>
> We're clearly running in non-atomic context as our only call site is
> able to call wait_event_interruptible(). So we're safe to use GFP_KERNEL
> here instead of GFP_ATOMIC.
>
> Signed-off-by: Mathias Krause <minipli@googlemail.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply
* Re: [Linux-zigbee-devel] [PATCH] mac802154: Keep track of the channel when changed
From: Werner Almesberger @ 2013-04-05 21:05 UTC (permalink / raw)
To: Alan Ott
Cc: Alexander Smirnov, Dmitry Eremin-Solenikov, David S. Miller,
netdev, linux-kernel, linux-zigbee-devel
In-Reply-To: <1365194201-2635-1-git-send-email-alan@signal11.us>
Alan Ott wrote:
> Prevent set_channel() from getting called every time a packet is sent. This
> looks like it was an oversight.
at86rf230.c and derivatives avoid this problem by setting
phy->current_* in the *_channel function.
But I'd agree that it's nicer to do this in one place, not in
every driver.
In case a driver had a weird failure mode in which it leaves the
original channel but only makes it halfway to the new channel, it
could still set phy->current_* and return an error. So there's no
loss of functionality with your change.
- Werner
^ permalink raw reply
* [PATCH] TTY: ircomm, use GFP_KERNEL in ircomm_open()
From: Mathias Krause @ 2013-04-05 21:02 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Samuel Ortiz, David S. Miller, netdev, Mathias Krause
Hi Greg,
I'm unsure if you or Dave should take that one as it's for one a TTY
patch but also living under net/. So I'm uncertain and let you decide!
Thanks,
Mathias
-- >8 --
Subject: [PATCH] TTY: ircomm, use GFP_KERNEL in ircomm_open()
We're clearly running in non-atomic context as our only call site is
able to call wait_event_interruptible(). So we're safe to use GFP_KERNEL
here instead of GFP_ATOMIC.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
---
net/irda/ircomm/ircomm_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/irda/ircomm/ircomm_core.c b/net/irda/ircomm/ircomm_core.c
index 52079f1..b797daa 100644
--- a/net/irda/ircomm/ircomm_core.c
+++ b/net/irda/ircomm/ircomm_core.c
@@ -117,7 +117,7 @@ struct ircomm_cb *ircomm_open(notify_t *notify, __u8 service_type, int line)
IRDA_ASSERT(ircomm != NULL, return NULL;);
- self = kzalloc(sizeof(struct ircomm_cb), GFP_ATOMIC);
+ self = kzalloc(sizeof(struct ircomm_cb), GFP_KERNEL);
if (self == NULL)
return NULL;
--
1.7.10.4
^ permalink raw reply related
* [PATCH 2/2] irda: use GFP_KERNEL in irda_connect_response()
From: Mathias Krause @ 2013-04-05 20:41 UTC (permalink / raw)
To: Samuel Ortiz, David S. Miller; +Cc: netdev, Mathias Krause
In-Reply-To: <1365194488-23462-1-git-send-email-minipli@googlemail.com>
The only call site of irda_connect_response() is irda_accept() -- a
function called from user context only. Therefore it has no need for
GFP_ATOMIC.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
---
net/irda/af_irda.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index 2846cf5..a7f6ef1 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -305,8 +305,7 @@ static void irda_connect_response(struct irda_sock *self)
IRDA_DEBUG(2, "%s()\n", __func__);
- skb = alloc_skb(TTP_MAX_HEADER + TTP_SAR_HEADER,
- GFP_ATOMIC);
+ skb = alloc_skb(TTP_MAX_HEADER + TTP_SAR_HEADER, GFP_KERNEL);
if (skb == NULL) {
IRDA_DEBUG(0, "%s() Unable to allocate sk_buff!\n",
__func__);
--
1.7.10.4
^ permalink raw reply related
* [PATCH 1/2] irda: use GFP_KERNEL in irda_create()
From: Mathias Krause @ 2013-04-05 20:41 UTC (permalink / raw)
To: Samuel Ortiz, David S. Miller; +Cc: netdev, Mathias Krause
In-Reply-To: <1365194488-23462-1-git-send-email-minipli@googlemail.com>
irda_create() is called from user context only, therefore has no need
for GFP_ATOMIC.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
---
net/irda/af_irda.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index d28e7f0..2846cf5 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -1120,7 +1120,7 @@ static int irda_create(struct net *net, struct socket *sock, int protocol,
}
/* Allocate networking socket */
- sk = sk_alloc(net, PF_IRDA, GFP_ATOMIC, &irda_proto);
+ sk = sk_alloc(net, PF_IRDA, GFP_KERNEL, &irda_proto);
if (sk == NULL)
return -ENOMEM;
--
1.7.10.4
^ permalink raw reply related
* [PATCH 0/2] irda: GFP_ATOMIC cleanups
From: Mathias Krause @ 2013-04-05 20:41 UTC (permalink / raw)
To: Samuel Ortiz, David S. Miller; +Cc: netdev, Mathias Krause
Hi Samuel, Dave,
this small series changes some obvious misusages of GFP_ATOMIC in the
irda code.
Please apply -- probably to net-next!
Mathias Krause (2):
irda: use GFP_KERNEL in irda_create()
irda: use GFP_KERNEL in irda_connect_response()
net/irda/af_irda.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--
1.7.10.4
^ permalink raw reply
* [GIT] Networking
From: David Miller @ 2013-04-05 20:41 UTC (permalink / raw)
To: torvalds; +Cc: akpm, netdev, linux-kernel
1) Fix erroneous sock_orphan() leading to crashes and double kfree_skb() in
NFC protocol. From Thierry Escande and Samuel Ortiz.
2) Fix use after free in remain-on-channel mac80211 code, from Johannes
Berg.
3) nf_reset() needs to reset the NF tracing cookie, otherwise we can leak
it from one namespace into another. Fix from Gao Feng and Patrick
McHardy.
4) Fix overflow in channel scanning array of mwifiex driver, from Stone
Piao.
5) Fix loss of link after suspend/shutdown in r8169, from Hayes Wang.
6) Synchronization of unicast address lists to the undelying device doesn't
work because whether to sync is maintained as a boolean rather than a
true count. Fix from Vlad Yasevich.
7) Fix corruption of TSO packets in atl1e by limiting the segmented packet
length. From Hannes Frederic Sowa.
8) Revert bogus AF_UNIX credential passing change and fix the coalescing
issue properly, from Eric W. Biederman.
9) Changes of ipv4 address lifetime settings needs to generate a notification,
from Jiri Pirko.
Please pull, thanks a lot!
The following changes since commit da241efcd9c3da2af6ba20055c7e158ec725005c:
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (2013-04-02 18:58:01 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net master
for you to fetch changes up to 124dff01afbdbff251f0385beca84ba1b9adda68:
netfilter: don't reset nf_trace in nf_reset() (2013-04-05 15:38:10 -0400)
----------------------------------------------------------------
David S. Miller (2):
Merge branch 'for-davem' of git://git.kernel.org/.../linville/wireless into wireless
Merge branch 'master' of git://1984.lsi.us.es/nf
Eric W. Biederman (2):
Revert "af_unix: dont send SCM_CREDENTIAL when dest socket is NULL"
af_unix: If we don't care about credentials coallesce all messages
Gao feng (1):
netfilter: reset nf_trace in nf_reset
Hannes Frederic Sowa (1):
atl1e: limit gso segment size to prevent generation of wrong ip length fields
Jakub Kicinski (1):
ixgbe: fix registration order of driver and DCA nofitication
Jiri Pirko (1):
net: ipv4: notify when address lifetime changes
Johannes Berg (3):
mac80211: fix remain-on-channel cancel crash
mac80211: fix idle handling sequence
iwlwifi: dvm: fix the passive-no-RX workaround
John W. Linville (4):
Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211
Merge branch 'for-john' of git://git.kernel.org/.../iwlwifi/iwlwifi-fixes
Merge tag 'nfc-fixes-3.9-2' of git://git.kernel.org/.../sameo/nfc-fixes
Merge branch 'master' of git://git.kernel.org/.../linville/wireless into for-davem
Matthias Schiffer (1):
netfilter: ip6t_NPT: Fix translation for non-multiple of 32 prefix lengths
Pablo Neira Ayuso (1):
netfilter: nfnetlink_acct: return -EINVAL if object name is empty
Patrick McHardy (1):
netfilter: don't reset nf_trace in nf_reset()
Samuel Ortiz (3):
NFC: llcp: Detach socket from process context only when releasing the socket
NFC: llcp: Keep the connected socket parent pointer alive
NFC: microread: Fix build failure due to a new MEI bus API
Stone Piao (1):
mwifiex: limit channel number not to overflow memory
Thierry Escande (1):
NFC: llcp: Remove possible double call to kfree_skb
Veaceslav Falico (1):
bonding: remove sysfs before removing devices
Vlad Yasevich (1):
net: count hw_addr syncs so that unsync works properly.
Wei Yongjun (2):
netfilter: nfnetlink_queue: fix error return code in nfnetlink_queue_init()
netfilter: nf_conntrack: fix error return code
hayeswang (1):
r8169: fix auto speed down issue
drivers/net/bonding/bond_main.c | 2 +-
drivers/net/ethernet/atheros/atl1e/atl1e.h | 2 +-
drivers/net/ethernet/atheros/atl1e/atl1e_main.c | 1 +
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 11 +++++++++--
drivers/net/ethernet/realtek/r8169.c | 28 +++++++++++++++++++++++++---
drivers/net/wireless/iwlwifi/dvm/rxon.c | 18 ++++++++----------
drivers/net/wireless/iwlwifi/dvm/tx.c | 2 +-
drivers/net/wireless/mwifiex/cfg80211.c | 3 ++-
drivers/nfc/microread/mei.c | 38 +++++++++++++++++---------------------
include/linux/netdevice.h | 2 +-
include/linux/skbuff.h | 7 +++++++
net/core/dev.c | 1 +
net/core/dev_addr_lists.c | 6 +++---
net/ipv4/devinet.c | 6 ++++--
net/ipv6/netfilter/ip6t_NPT.c | 2 +-
net/mac80211/cfg.c | 6 ++++--
net/mac80211/chan.c | 17 ++++++++++++++---
net/mac80211/ieee80211_i.h | 4 +++-
net/mac80211/iface.c | 2 +-
net/mac80211/offchannel.c | 23 +++++++++++++++++------
net/netfilter/nf_conntrack_standalone.c | 1 +
net/netfilter/nfnetlink_acct.c | 2 ++
net/netfilter/nfnetlink_queue_core.c | 4 +++-
net/nfc/llcp/llcp.c | 8 --------
net/nfc/llcp/sock.c | 6 +++---
net/unix/af_unix.c | 6 +++---
26 files changed, 133 insertions(+), 75 deletions(-)
^ permalink raw reply
* Re: [Suggestion] ISDN: isdnloop: C grammar issue, '}' miss match 'if' and 'switch' statement.
From: Dan Williams @ 2013-04-05 20:37 UTC (permalink / raw)
To: Joe Perches
Cc: David Miller, gang.chen, torvalds, eric.dumazet, mkubecek,
fengguang.wu, isdn, netdev
In-Reply-To: <1365130824.25884.8.camel@joe-AO722>
On Thu, 2013-04-04 at 20:00 -0700, Joe Perches wrote:
> On Thu, 2013-04-04 at 14:09 -0400, David Miller wrote:
> > From: Chen Gang <gang.chen@asianux.com>
> > Date: Thu, 04 Apr 2013 16:30:01 +0800
> > >> Of course, nobody sane actually cares about ISDN any more, so I think
> > >> this is all pretty academic. I think even Germany (where ISDN *used*
> > >> to be very common due to telephone monopolies and odd rules) no longer
> > >> uses it. I can't imagine that anybody else does either.
> > > can we delete it ?
> > I think the point is no that we can delete it, but rather that we
> > should concentrate our efforts on code that more people use rather
> > than trying to clean up antiquated code with very few users.
>
> Very sensible.
>
> I was going to see about moving drivers/isdn/hardware/eicon
> to staging but it seems the hardware is still for sale.
>
> http://www.dialogic.com/en/products/media/diva/diva-bri-2.aspx
>
> Anyone have suggestions on other obsolete isdn drivers that
> could be moved to staging for awhile before deletion?
Anything PCMCIA or ISA? There are a number of them:
CONFIG_ISDN_DRV_AVMB1_B1ISA
CONFIG_ISDN_DRV_AVMB1_B1PCMCIA
CONFIG_ISDN_DRV_AVMB1_AVM_CS
CONFIG_ISDN_DRV_AVMB1_T1ISA
CONFIG_HISAX_SEDLBAUER_CS
CONFIG_HISAX_ELSA_CS
CONFIG_HISAX_AVM_A1_CS
CONFIG_HISAX_TELES_CS
CONFIG_ISDN_DRV_ACT2000
That's all I can find in a quick look.
Dan
^ permalink raw reply
* [PATCH] mrf24j40: Enable link-layer acknowledgement and retry
From: Alan Ott @ 2013-04-05 20:34 UTC (permalink / raw)
To: Alexander Smirnov, Dmitry Eremin-Solenikov
Cc: linux-zigbee-devel, netdev, linux-kernel, Alan Ott
On the MRF24J40, link-layer acknowledgment request and retry must be
turned on explicitly for each packet. Turn this on in the hardware based
on the FC_ACK_REQ bit being set in the packet.
Also, now that failure to receive an ACK will cause the hardware to report
failure of transmission, change the log level for this failure to debug
level.
Signed-off-by: Alan Ott <alan@signal11.us>
---
drivers/net/ieee802154/mrf24j40.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c
index 6481faf..556151d 100644
--- a/drivers/net/ieee802154/mrf24j40.c
+++ b/drivers/net/ieee802154/mrf24j40.c
@@ -25,6 +25,7 @@
#include <linux/pinctrl/consumer.h>
#include <net/wpan-phy.h>
#include <net/mac802154.h>
+#include <net/ieee802154.h>
/* MRF24J40 Short Address Registers */
#define REG_RXMCR 0x00 /* Receive MAC control */
@@ -349,7 +350,9 @@ static int mrf24j40_tx(struct ieee802154_dev *dev, struct sk_buff *skb)
if (ret)
goto err;
val |= 0x1;
- val &= ~0x4;
+ /* Set TXNACKREQ if the ACK bit is set in the packet. */
+ if (skb->data[0] & IEEE802154_FC_ACK_REQ)
+ val |= 0x4;
write_short_reg(devrec, REG_TXNCON, val);
INIT_COMPLETION(devrec->tx_complete);
@@ -371,7 +374,7 @@ static int mrf24j40_tx(struct ieee802154_dev *dev, struct sk_buff *skb)
if (ret)
goto err;
if (val & 0x1) {
- dev_err(printdev(devrec), "Error Sending. Retry count exceeded\n");
+ dev_dbg(printdev(devrec), "Error Sending. Retry count exceeded\n");
ret = -ECOMM; /* TODO: Better error code ? */
} else
dev_dbg(printdev(devrec), "Packet Sent\n");
--
1.7.11.2
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox