Hi Jean,

The reason for the memset was to clear the net_device struct and this is
needed in Linux-2.2. In Linux-2.4, the memset is done by dev_alloc() itself,
so I cannot see any reason for us to do that. The bug as I saw it was only 
that some old 2.2 code was passed on to 2.4. 

I have tried to fire up to irda devices here, and I have not problems at
all!?

What am I missing here?

-- Dag

On Wed, 23 Aug 2000 11:52:20 -0700, you wrote:
>       Hi,
> 
>       I did read through the patches you sent. I disagree violently
> at the following difference between patch-2.4-test6-irda1 and
> patch-2.4-test6-irda2 :
> ---------------------------------------
>  --- linux-2.4.0-test6/drivers/net/irda/irtty.c Tue Mar 21 20:17:28 2000
> -+++ linux-2.4.0-test6-irda-patch/drivers/net/irda/irtty.c      Sun Aug 13 21:57:25 
>2000
> ++++ linux-2.4.0-test6-irda-patch/drivers/net/irda/irtty.c      Sun Aug 20 09:56:25 
>2000
> -@@ -233,8 +233,14 @@ static int irtty_open(struct tty_struct 
> +@@ -233,8 +233,6 @@ static int irtty_open(struct tty_struct 
>                 ERROR(__FUNCTION__ "(), dev_alloc() failed!\n");
>                 return -ENOMEM;
>         }
> -+
> -+#if LINUX_VERSION_CODE >= 0x020362    /* 2.3.99-pre7 */
> -+      /* dev_alloc doesn't clear the struct (Yuck !!!) */
> -+      memset(((__u8*)dev)+IFNAMSIZ,0,sizeof(struct net_device)-IFNAMSIZ);
> -+#else
> -       /* dev_alloc doesn't clear the struct */
> -       memset(((__u8*)dev)+sizeof(char*),0,sizeof(struct net_device)-sizeof(char*));
> -+#endif /* LINUX_VERSION_CODE >= 0x020362 */
> +-      /* dev_alloc doesn't clear the struct */
> +-      memset(((__u8*)dev)+sizeof(char*),0,sizeof(struct net_device)-sizeof(char*));
>   
>         dev->priv = (void *) self;
>         self->netdev = dev;
> ---------------------------------------
>       Just try to use 2 dongles or read my previous e-mail on why.
> 
>       Apart from that, all other changes look nice. I still need to
> try it out ;-)
> 
>       Jean
> _______________________________________________
> Linux-IrDA mailing list  -  [EMAIL PROTECTED]
> http://www4.pasta.cs.UiT.No/mailman/listinfo/linux-irda
> 
> 
> 
> 
----
Dag Brattli,                       Mail:  [EMAIL PROTECTED]
Senior Systems Engineer            Web:   http://www.fast.no/
Fast Search & Transfer ASA         Phone: +47 776 96 688
P.O. Box 1126                      Fax:   +47 776 96 689
NO-9261 Troms�, NORWAY             Cell:  +47 924 05 388

_______________________________________________
Linux-IrDA mailing list  -  [EMAIL PROTECTED]
http://www4.pasta.cs.UiT.No/mailman/listinfo/linux-irda

Reply via email to