Re: [PATCH] SMC911X: Fix using of dereferenced skb after netif_rx

2007-12-04 Thread Jeff Garzik
Wang Chen wrote: Peter Korsgaard said the following on 2007-12-3 21:47: "Wang" == Wang Chen <[EMAIL PROTECTED]> writes: Hi, Wang> + len = skb->len; Wang> netif_rx(skb); dev-> stats.rx_packets++; Wang> - dev->stats.rx_bytes += skb->len; Wang> + dev->stats.rx_bytes += len;

Re: [PATCH] SMC911X: Fix using of dereferenced skb after netif_rx

2007-12-04 Thread Peter Korsgaard
> "Wang" == Wang Chen <[EMAIL PROTECTED]> writes: Hi, >> Why not simply update the stats before calling netif_rx as the return >> value isn't checked anyway? Wang> Even the return value of netif_rx isn't checked, dev->stats maybe Wang> changed in netif_rx. But fortunately dev->stats isn'

Re: [PATCH] SMC911X: Fix using of dereferenced skb after netif_rx

2007-12-03 Thread Wang Chen
Peter Korsgaard said the following on 2007-12-3 21:47: >> "Wang" == Wang Chen <[EMAIL PROTECTED]> writes: > > Hi, > > Wang> + len = skb->len; > Wang>netif_rx(skb); > dev-> stats.rx_packets++; > Wang> - dev->stats.rx_bytes += skb->len; > Wang> + dev->stats.rx_bytes

Re: [PATCH] SMC911X: Fix using of dereferenced skb after netif_rx

2007-12-03 Thread Peter Korsgaard
> "Wang" == Wang Chen <[EMAIL PROTECTED]> writes: Hi, Wang> +len = skb->len; Wang> netif_rx(skb); dev-> stats.rx_packets++; Wang> -dev->stats.rx_bytes += skb->len; Wang> +dev->stats.rx_bytes += len; Why not simply update the stats before calling netif_rx

Re: [PATCH] SMC911X: Fix using of dereferenced skb after netif_rx

2007-12-03 Thread Wang Chen
Herbert Xu said the following on 2007-12-3 18:11: > Please send driver patches to Jeff Garzik <[EMAIL PROTECTED]>. > Sorry. Resend the patch. After netif_rx(), skb will be freed. So get the skb->len before netif_rx(). Signed-off-by: Wang Chen <[EMAIL PROTECTED]> --- smc911x.c |5 +++-- 1 f

Re: [PATCH] SMC911X: Fix using of dereferenced skb after netif_rx

2007-12-03 Thread Herbert Xu
On Mon, Dec 03, 2007 at 03:59:09PM +0800, Wang Chen wrote: > After netif_rx(), skb will be freed. So get the > skb->len before netif_rx(). > > Signed-off-by: Wang Chen <[EMAIL PROTECTED]> Please send driver patches to Jeff Garzik <[EMAIL PROTECTED]>. Thanks, -- Visit Openswan at http://www.open

[PATCH] SMC911X: Fix using of dereferenced skb after netif_rx

2007-12-03 Thread Wang Chen
After netif_rx(), skb will be freed. So get the skb->len before netif_rx(). Signed-off-by: Wang Chen <[EMAIL PROTECTED]> --- smc911x.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) --- linux-2.6.24.rc3.org/drivers/net/smc911x.c 2007-11-19 12:38:05.0 +0800 +++ linux-2.6

Re: [PATCH] smc911x: Fix undefined CONFIG_ symbol warning

2007-11-23 Thread Jeff Garzik
Peter Korsgaard wrote: elif defined(CONFIG_*) should be used instead of elif CONFIG_* so GCC doesn't give warnings about undefined symbols when the config option is disabled. --- drivers/net/smc911x.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/smc911x.h

[PATCH] smc911x: Fix multicast handling

2007-11-22 Thread Peter Korsgaard
smc911x_set_multicast_list fails to fill out the multicast hash table correctly; Bit 1 was used rather than bit 5 to decide if the lower or upper register should be used. The function is at the same time cleaned up by calling ether_crc rather than using it's own bit reversal table. Signed-off-by:

[PATCH] smc911x: Fix unused variable warning.

2007-11-21 Thread Peter Korsgaard
The smc911x_local pointer in smc911x_rcv is only used in the SMC_USE_DMA case. Move it under the #ifdef so GCC doesn't generate a warning in the non-DMA case. Signed-off-by: Peter Korsgaard <[EMAIL PROTECTED]> --- drivers/net/smc911x.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-)

[PATCH] smc911x: Fix undefined CONFIG_ symbol warning

2007-11-21 Thread Peter Korsgaard
elif defined(CONFIG_*) should be used instead of elif CONFIG_* so GCC doesn't give warnings about undefined symbols when the config option is disabled. Signed-off-by: Peter Korsgaard <[EMAIL PROTECTED]> --- Sigh, forgot --signoff :/ drivers/net/smc911x.h |2 +- 1 files changed, 1 insertions(

[PATCH] smc911x: Fix undefined CONFIG_ symbol warning

2007-11-21 Thread Peter Korsgaard
elif defined(CONFIG_*) should be used instead of elif CONFIG_* so GCC doesn't give warnings about undefined symbols when the config option is disabled. --- drivers/net/smc911x.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h

[PATCH] smc911x: Fix unused variable warning.

2007-11-21 Thread Peter Korsgaard
The smc911x_local pointer in smc911x_rcv is only used in the SMC_USE_DMA case. Move it under the #ifdef so GCC doesn't generate a warning in the non-DMA case. --- drivers/net/smc911x.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/smc911x.c b/drivers/net/smc

Re: [PATCH] smc911x irq sense request and MPR2 board support

2007-10-02 Thread Jeff Garzik
Markus Brunner wrote: Hi, this are the changes to the smc911x driver, which were necessary to get it running on the Magic Panel R2 (smsc9115). It is a SH3-DSP based board. The other patches are available on the linuxsh-dev mailinglist. http://marc.info/?l=linuxsh-dev&r=1&b=200708&w=2 It was n

Re: [PATCH] smc911x irq sense request and MPR2 board support

2007-09-28 Thread Paul Mundt
On Sat, Sep 29, 2007 at 01:24:47AM -0400, Jeff Garzik wrote: > Markus Brunner wrote: > >this are the changes to the smc911x driver, which were necessary > >to get it running on the Magic Panel R2 (smsc9115). > >It is a SH3-DSP based board. The other patches are available on > >the linuxsh-dev mail

Re: [PATCH] smc911x irq sense request and MPR2 board support

2007-09-28 Thread Jeff Garzik
Markus Brunner wrote: Hi, this are the changes to the smc911x driver, which were necessary to get it running on the Magic Panel R2 (smsc9115). It is a SH3-DSP based board. The other patches are available on the linuxsh-dev mailinglist. http://marc.info/?l=linuxsh-dev&r=1&b=200708&w=2 It was n

[PATCH] smc911x irq sense request and MPR2 board support

2007-08-19 Thread Markus Brunner
Hi, this are the changes to the smc911x driver, which were necessary to get it running on the Magic Panel R2 (smsc9115). It is a SH3-DSP based board. The other patches are available on the linuxsh-dev mailinglist. http://marc.info/?l=linuxsh-dev&r=1&b=200708&w=2 It was necessary to set the irq s

Re: [PATCH] smc911x: fix compilation breakage wjen debug is on

2007-04-28 Thread Jeff Garzik
Vitaly Wool wrote: Hello Jeff, the patch below fixes compilation breakage of smc911x driver when ENABLE_SMC_DEBUG_PKTS equals to 1. smc911x.c |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Signed-off-by: Vitaly Wool <[EMAIL PROTECTED]> applied, and forwarded to [EMAIL PROTECTED]

[PATCH] smc911x: fix compilation breakage wjen debug is on

2007-04-27 Thread Vitaly Wool
Hello Jeff, the patch below fixes compilation breakage of smc911x driver when ENABLE_SMC_DEBUG_PKTS equals to 1. smc911x.c |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Signed-off-by: Vitaly Wool <[EMAIL PROTECTED]> Index: linux-2.6/drivers/net/smc911x.c ==

Re: [PATCH] smc911x

2006-12-26 Thread Jeff Garzik
Pierre TARDY wrote: Attached a patch on smc911x driver, which corrects obvious errors in the 16bit chips support of this driver. Please note that this driver still do NOT support 16bit chips (9115 and 9117), as it claims to, there may be mistakes in the data fifo managment, this patch enable

[PATCH] smc911x

2006-12-19 Thread Pierre TARDY
Attached a patch on smc911x driver, which corrects obvious errors in the 16bit chips support of this driver. Please note that this driver still do NOT support 16bit chips (9115 and 9117), as it claims to, there may be mistakes in the data fifo managment, this patch enable the driver to init th

Re: [PATCH] smc911x: fix netpoll compilation faliure

2006-12-15 Thread Andrew Morton
On Fri, 15 Dec 2006 16:13:28 +0300 Vitaly Wool <[EMAIL PROTECTED]> wrote: > Hello folks, > > the trivial patch below fixes the compilation failure for smc911x.c when > NET_POLL_CONTROLLER is set. > > drivers/net/smc911x.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Signed-o

[PATCH] smc911x: fix netpoll compilation faliure

2006-12-15 Thread Vitaly Wool
Hello folks, the trivial patch below fixes the compilation failure for smc911x.c when NET_POLL_CONTROLLER is set. drivers/net/smc911x.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Signed-off-by: Vitaly Wool <[EMAIL PROTECTED]> diff --git a/drivers/net/smc911x.c b/drivers/net/smc9

Re: [PATCH] smc911x: Re-release spinlock on spurious interrupt

2006-07-20 Thread Peter Korsgaard
> "Peter" == Peter Korsgaard <[EMAIL PROTECTED]> writes: Peter> Hi, Peter> The smc911x driver forgets to release the spinlock on spurious Peter> interrupts. This little patch fixes it. Crap - forgot to sign off :/ Signed-off-by: Peter Korsgaard <[EMAIL PROTECTED]> diff -Naur linux-2.6.18

[PATCH] smc911x: Re-release spinlock on spurious interrupt

2006-07-20 Thread Peter Korsgaard
Hi, The smc911x driver forgets to release the spinlock on spurious interrupts. This little patch fixes it. diff -Naur linux-2.6.18-rc2.orig/drivers/net/smc911x.c linux-2.6.18-rc2/drivers/net/smc911x.c --- linux-2.6.18-rc2.orig/drivers/net/smc911x.c 2006-07-20 10:26:20.0 +0200 +++ linux-