Re: possible bug in net/tc35815.c in linux-2.6.19

2007-02-27 Thread Atsushi Nemoto
On Mon, 26 Feb 2007 23:07:47 +0300, Sergei Shtylyov <[EMAIL PROTECTED]> wrote:
> Yeah, tc35815_1.c in our looks like the one in the CELF archive (what I 
> didn't get is why they decided to keep both drivers around?)

I think tc35815_1.c can just replace old tc35815.c.  New one lacks
tc35815_killall() which is currently called by arch/mips/jmr3927 code,
but there would be no point doing a such thing.  arch/mips/jmr3927
should be fixed.

> I think everybody would be just thankful. :-)

OK, I'll prepare a patch after some cleanup.

---
Atsushi Nemoto
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: possible bug in net/tc35815.c in linux-2.6.19

2007-02-26 Thread Sergei Shtylyov

Hello.

Atsushi Nemoto wrote:


I know both MontaVista and CELF have new driver for the chip.  If
anybody in MontaVista did not complain I can send CELF's one available
at http://tree.celinuxforum.org/pubwiki/moin.cgi/PatchArchive.  (it


   Yeah, tc35815_1.c in our looks like the one in the CELF archive (what I 
didn't get is why they decided to keep both drivers around?)



needs some changes for recent kernel, for example pt_regs removal, but
it would be easy).



Sergei?


   I think everybody would be just thankful. :-)
   There's quite a lot of other TX4938 patches that need pushing into 
Linux/MIPS -- unfortunetely, this hasn't been done by MV... :-<



---
Atsushi Nemoto


   BTW, does RBTX4938 boot the recent kernels for you? If so, what .config 
are you using -- I'm afraid something's up with rbhma4500_defconfig?


WBR, Sergei
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: possible bug in net/tc35815.c in linux-2.6.19

2007-02-26 Thread Atsushi Nemoto
On Mon, 26 Feb 2007 10:26:59 +, Ralf Baechle <[EMAIL PROTECTED]> wrote:
> > I created my own patch for this (and one other bug), and checked it in.
> > 
> > Really, though, someone in MIPS-land should give this driver some loving 
> > care.  It is filled with bugs and 2.4-era anachronisms.
> 
> Took a look at it.  It's sort of a non-bug because the driver cannot be
> compiled as module, so the module_exit function cannot possibly be
> executed.  The board support code is calling into the driver which makes
> it impossible to build this driver as a module, yet it's possible to
> select building this driver as a module ...  Oh yeah, that root_tc35815_dev
> stuff is also pretty ugly.

Yes, the driver is quite obsoleted.  It was added long ago with
arch/mips/jmr3927 and not maintained long time, as like as the board
itself.

I know both MontaVista and CELF have new driver for the chip.  If
anybody in MontaVista did not complain I can send CELF's one available
at http://tree.celinuxforum.org/pubwiki/moin.cgi/PatchArchive.  (it
needs some changes for recent kernel, for example pt_regs removal, but
it would be easy).

Sergei?

---
Atsushi Nemoto
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: possible bug in net/tc35815.c in linux-2.6.19

2007-02-26 Thread Ralf Baechle
On Sat, Feb 24, 2007 at 05:04:01PM -0500, Jeff Garzik wrote:

> >>I am a graduate student working on finding bugs in Linux drivers using
> >>an automated research tool.  I think I've found a possible bug in
> >>net/tc35815.c, and I'd appreciate it if you could confirm/disconfirm it.
> >>
> >>Thanks,
> >>Philip
> >>
> >>---
> >>net/tc35815.c
> >>
> >>tc35815_driver is never unregistered in tc35815_cleanup_module()
> >>
> >>static int __init tc35815_init_module(void)
> >>{
> >>return pci_register_driver(&tc35815_driver);
> >>}
> >>
> >>static void __exit tc35815_cleanup_module(void)
> >>{
> >>struct net_device *next_dev;
> >>
> >>while (root_tc35815_dev) {
> >>struct net_device *dev = root_tc35815_dev;
> >>next_dev = ((struct tc35815_local *)dev->priv)->next_module;
> >>iounmap((void *)(dev->base_addr));
> >>unregister_netdev(dev);
> >>free_netdev(dev);
> >>root_tc35815_dev = next_dev;
> >>}
> >>}
> >>
> >>
> >
> >I think that you are right, but I don't know this code.
> >
> >Jeff, what do you think about this?
> >
> >Regards,
> >Michal
> 
> I created my own patch for this (and one other bug), and checked it in.
> 
> Really, though, someone in MIPS-land should give this driver some loving 
> care.  It is filled with bugs and 2.4-era anachronisms.

Took a look at it.  It's sort of a non-bug because the driver cannot be
compiled as module, so the module_exit function cannot possibly be
executed.  The board support code is calling into the driver which makes
it impossible to build this driver as a module, yet it's possible to
select building this driver as a module ...  Oh yeah, that root_tc35815_dev
stuff is also pretty ugly.

Atsushi?

  Ralf
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: possible bug in net/tc35815.c in linux-2.6.19

2007-02-24 Thread Jeff Garzik

Michal Piotrowski wrote:

Hi Philip,

Philip Guo napisał(a):

Hi,

I am a graduate student working on finding bugs in Linux drivers using
an automated research tool.  I think I've found a possible bug in
net/tc35815.c, and I'd appreciate it if you could confirm/disconfirm it.

Thanks,
Philip

---
net/tc35815.c

tc35815_driver is never unregistered in tc35815_cleanup_module()

static int __init tc35815_init_module(void)
{
return pci_register_driver(&tc35815_driver);
}

static void __exit tc35815_cleanup_module(void)
{
struct net_device *next_dev;

while (root_tc35815_dev) {
struct net_device *dev = root_tc35815_dev;
next_dev = ((struct tc35815_local *)dev->priv)->next_module;
iounmap((void *)(dev->base_addr));
unregister_netdev(dev);
free_netdev(dev);
root_tc35815_dev = next_dev;
}
}




I think that you are right, but I don't know this code.

Jeff, what do you think about this?

Regards,
Michal


I created my own patch for this (and one other bug), and checked it in.

Really, though, someone in MIPS-land should give this driver some loving 
care.  It is filled with bugs and 2.4-era anachronisms.


Jeff



-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: possible bug in net/tc35815.c in linux-2.6.19

2007-02-24 Thread Michal Piotrowski
Hi Philip,

Philip Guo napisał(a):
> Hi,
> 
> I am a graduate student working on finding bugs in Linux drivers using
> an automated research tool.  I think I've found a possible bug in
> net/tc35815.c, and I'd appreciate it if you could confirm/disconfirm it.
> 
> Thanks,
> Philip
> 
> ---
> net/tc35815.c
> 
> tc35815_driver is never unregistered in tc35815_cleanup_module()
> 
> static int __init tc35815_init_module(void)
> {
> return pci_register_driver(&tc35815_driver);
> }
> 
> static void __exit tc35815_cleanup_module(void)
> {
> struct net_device *next_dev;
> 
> while (root_tc35815_dev) {
> struct net_device *dev = root_tc35815_dev;
> next_dev = ((struct tc35815_local *)dev->priv)->next_module;
> iounmap((void *)(dev->base_addr));
> unregister_netdev(dev);
> free_netdev(dev);
> root_tc35815_dev = next_dev;
> }
> }
> 
> 

I think that you are right, but I don't know this code.

Jeff, what do you think about this?

Regards,
Michal

PS. Philip, please sign this patch.

-- 
Michal K. K. Piotrowski
LTG - Linux Testers Group (PL)
(http://www.stardust.webpages.pl/ltg/)
LTG - Linux Testers Group (EN)
(http://www.stardust.webpages.pl/linux_testers_group_en/)

Signed-off-by: Michal Piotrowski <[EMAIL PROTECTED]>

--- linux-mm-clean/drivers/net/tc35815.c2007-02-04 19:44:54.0 
+0100
+++ linux-mm/drivers/net/tc35815.c  2007-02-24 13:07:34.0 +0100
@@ -1740,6 +1740,8 @@ static void __exit tc35815_cleanup_modul
free_netdev(dev);
root_tc35815_dev = next_dev;
}
+
+   pci_unregister_driver(&tc35815_driver);
 }
 module_init(tc35815_init_module);
 module_exit(tc35815_cleanup_module);
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html