Re: [PATCH] 2.4.6-pre6 fix drivers/net/Config.in error

2001-06-28 Thread Andrzej Krzysztofowicz

Keith Owens wrote:
> On Thu, 28 Jun 2001 00:07:13 -0400, 
> Jeff Garzik <[EMAIL PROTECTED]> wrote:
> >Steven Cole wrote:
> >> -   dep_bool '  EISA, VLB, PCI and on board controllers' CONFIG_NET_PCI
> >> +   dep_bool '  EISA, VLB, PCI and on board controllers' CONFIG_NET_PCI 
>$CONFIG_PCI
> >
> >See the "EISA" and "VLB" parts in there?  EISA != PCI
> 
> Against 2.4.6-pre6.
> 
> Index: 6-pre6.1/drivers/net/Config.in
> --- 6-pre6.1/drivers/net/Config.in Thu, 28 Jun 2001 10:34:32 +1000 kaos 
>(linux-2.4/l/c/9_Config.in 1.1.2.2.1.3.1.8 644)
> +++ 6-pre6.1(w)/drivers/net/Config.in Thu, 28 Jun 2001 16:07:03 +1000 kaos 
>(linux-2.4/l/c/9_Config.in 1.1.2.2.1.3.1.8 644)
> @@ -142,7 +142,11 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; the
>tristate '  NE/2 (ne2000 MCA version) support' CONFIG_NE2_MCA
>tristate '  IBM LAN Adapter/A support' CONFIG_IBMLANA
> fi
> -   dep_bool '  EISA, VLB, PCI and on board controllers' CONFIG_NET_PCI
> +   if [ "$CONFIG_ISA" = "y" -o "$CONFIG_EISA" = "y" -o "$CONFIG_PCI" = "y" ]; then

CONFIG_EISA check in this condition is redundant.
Intentionally ?

> + bool '  EISA, VLB, PCI and on board controllers' CONFIG_NET_PCI

Andrzej
-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [PATCH] 2.4.6-pre6 fix drivers/net/Config.in error

2001-06-28 Thread Andrzej Krzysztofowicz

Keith Owens wrote:
 On Thu, 28 Jun 2001 00:07:13 -0400, 
 Jeff Garzik [EMAIL PROTECTED] wrote:
 Steven Cole wrote:
  -   dep_bool '  EISA, VLB, PCI and on board controllers' CONFIG_NET_PCI
  +   dep_bool '  EISA, VLB, PCI and on board controllers' CONFIG_NET_PCI 
$CONFIG_PCI
 
 See the EISA and VLB parts in there?  EISA != PCI
 
 Against 2.4.6-pre6.
 
 Index: 6-pre6.1/drivers/net/Config.in
 --- 6-pre6.1/drivers/net/Config.in Thu, 28 Jun 2001 10:34:32 +1000 kaos 
(linux-2.4/l/c/9_Config.in 1.1.2.2.1.3.1.8 644)
 +++ 6-pre6.1(w)/drivers/net/Config.in Thu, 28 Jun 2001 16:07:03 +1000 kaos 
(linux-2.4/l/c/9_Config.in 1.1.2.2.1.3.1.8 644)
 @@ -142,7 +142,11 @@ if [ $CONFIG_NET_ETHERNET = y ]; the
tristate '  NE/2 (ne2000 MCA version) support' CONFIG_NE2_MCA
tristate '  IBM LAN Adapter/A support' CONFIG_IBMLANA
 fi
 -   dep_bool '  EISA, VLB, PCI and on board controllers' CONFIG_NET_PCI
 +   if [ $CONFIG_ISA = y -o $CONFIG_EISA = y -o $CONFIG_PCI = y ]; then

CONFIG_EISA check in this condition is redundant.
Intentionally ?

 + bool '  EISA, VLB, PCI and on board controllers' CONFIG_NET_PCI

Andrzej
-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Some experience of linux on a Laptop

2001-06-24 Thread Andrzej Krzysztofowicz

> >Features I would like in the kernel:
> >1: Make the whole insmod-rmmod tingie a kernel internal so they could be 
> >trigged before rootmount.
> 
> How can you load modules into the kernel before root is mounted?
> No harddrive accessible means no modules.

initrd ?
It's quite popular feature at present.

Andrzej

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



Re: Some experience of linux on a Laptop

2001-06-24 Thread Andrzej Krzysztofowicz

 Features I would like in the kernel:
 1: Make the whole insmod-rmmod tingie a kernel internal so they could be 
 trigged before rootmount.
 
 How can you load modules into the kernel before root is mounted?
 No harddrive accessible means no modules.

initrd ?
It's quite popular feature at present.

Andrzej

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: obsolete code must die

2001-06-14 Thread Andrzej Krzysztofowicz

> On Wed, 13 Jun 2001, Daniel wrote:
> > MFM/RLL/XT/ESDI hard drive support
> > Does anyone still *have* an RLL drive that works? At the very least get rid

RLL ? Curently no. But I have a dosen of working ST225 with a dosen of ST11M
MFM controllers. Some of them ar\e still in use, mainly for booting purposes
(LILO) ... 

> > of the old driver (eg CONFIG_BLK_DEV_HD_ONLY, CONFIG_BLK_DEV_HD_IDE,
> > CONFIG_BLK_DEV_XD, CONFIG_BLK_DEV_PS2)
> 
> I am not certain how much this stuff is still used outside the US.  The XT
> driver still being around does surprise me though.  (Will that even *work*
> on modern hardware?  I didn't think you could get that card to work on a
> 386.)

Most of the boards work fine with 486. However, in most cases the BIOS
low-level-format routine does not work on them (timing issues). So low level
formatting needs a 386.
I think all of them should work on 586+ if without BIOS...

Andrzej
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: obsolete code must die

2001-06-14 Thread Andrzej Krzysztofowicz

 On Wed, 13 Jun 2001, Daniel wrote:
  MFM/RLL/XT/ESDI hard drive support
  Does anyone still *have* an RLL drive that works? At the very least get rid

RLL ? Curently no. But I have a dosen of working ST225 with a dosen of ST11M
MFM controllers. Some of them ar\e still in use, mainly for booting purposes
(LILO) ... 

  of the old driver (eg CONFIG_BLK_DEV_HD_ONLY, CONFIG_BLK_DEV_HD_IDE,
  CONFIG_BLK_DEV_XD, CONFIG_BLK_DEV_PS2)
 
 I am not certain how much this stuff is still used outside the US.  The XT
 driver still being around does surprise me though.  (Will that even *work*
 on modern hardware?  I didn't think you could get that card to work on a
 386.)

Most of the boards work fine with 486. However, in most cases the BIOS
low-level-format routine does not work on them (timing issues). So low level
formatting needs a 386.
I think all of them should work on 586+ if without BIOS...

Andrzej
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: PATCH: cs4232 isapnp support

2001-06-01 Thread Andrzej Krzysztofowicz

Hi,

> This adds ISAPnP support to cs4232.c.
[...]
> diff -u -r1.10 cs4232.c
> --- drivers/sound/cs4232.c2001/05/27 18:06:09 1.10
> +++ drivers/sound/cs4232.c2001/06/01 17:26:52
[...]
> @@ -318,22 +325,92 @@
>  static int __initdata mpuirq = -1;
>  static int __initdata synthio= -1;
>  static int __initdata synthirq   = -1;
> -
> +static int __initdata isapnp = 1;

According to the comment in include/linux/init.h these are incorrect:

 * For initialized data:
 * You should insert __initdata between the variable name and equal
 * sign followed by value, e.g.:
 *
 * static int init_variable __initdata = 0;
 * static char linux_logo[] __initdata = { 0x32, 0x36, ... };
 *

AFAIR, moving the __initdata cause problems with some gcc versions.

Andrzej


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



Re: PATCH: cs4232 isapnp support

2001-06-01 Thread Andrzej Krzysztofowicz

Hi,

 This adds ISAPnP support to cs4232.c.
[...]
 diff -u -r1.10 cs4232.c
 --- drivers/sound/cs4232.c2001/05/27 18:06:09 1.10
 +++ drivers/sound/cs4232.c2001/06/01 17:26:52
[...]
 @@ -318,22 +325,92 @@
  static int __initdata mpuirq = -1;
  static int __initdata synthio= -1;
  static int __initdata synthirq   = -1;
 -
 +static int __initdata isapnp = 1;

According to the comment in include/linux/init.h these are incorrect:

 * For initialized data:
 * You should insert __initdata between the variable name and equal
 * sign followed by value, e.g.:
 *
 * static int init_variable __initdata = 0;
 * static char linux_logo[] __initdata = { 0x32, 0x36, ... };
 *

AFAIR, moving the __initdata cause problems with some gcc versions.

Andrzej


-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: your mail

2001-05-31 Thread Andrzej Krzysztofowicz

> 
> Minor issue with bootsect.s.

1. bootsect.S is the source file

> The single instance of the lds assembly instruction includes the comment of
> !  ds:si is source
> ...
> seg fs
> lds  si,(bx)! ds:si is source
> ...
> Is this comment not in reverse order (i.e should be lds
> dest,src)

2. This is not a comment of i386 mnemonics. This comments the role of
   specific register in the following instructions.

BTW, linux-kernel readers: anybody is a volunteer for making the kernel size
counter 32-bit here? This would enable using the simple bootloader for
greater kernel loading...  (current limit is sligtly below 1MB)
Possibly some 16/32-bit real mode code mixing would be necessary.

Andrzej
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: your mail

2001-05-31 Thread Andrzej Krzysztofowicz

 
 Minor issue with bootsect.s.

1. bootsect.S is the source file

 The single instance of the lds assembly instruction includes the comment of
 !  ds:si is source
 ...
 seg fs
 lds  si,(bx)! ds:si is source
 ...
 Is this comment not in reverse order (i.e should be lds
 dest,src)

2. This is not a comment of i386 mnemonics. This comments the role of
   specific register in the following instructions.

BTW, linux-kernel readers: anybody is a volunteer for making the kernel size
counter 32-bit here? This would enable using the simple bootloader for
greater kernel loading...  (current limit is sligtly below 1MB)
Possibly some 16/32-bit real mode code mixing would be necessary.

Andrzej
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [PATCH] net #3

2001-05-30 Thread Andrzej Krzysztofowicz

> David Woodhouse wrote:
> > 
> > [EMAIL PROTECTED] said:
> > > -#ifdef CONFIG_ISAPNP
> > > +#if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE) && defined(MODULE))
> > 
> > The result here would be a 3c509 module which differs depending on whether
> > the ISAPNP module happened to be compiled at the same time or not.
> 
> In and of itself, that is an acceptable result.  We simply cannot take
> into kernel configuration variations between two kernel builds.  If you
> build your isapnp module with one configuration, and your 3c509 module
> with another config, consider yourself lucky that it works at all.

I think it is better to avoid such a dependency if possible. It will
especially simplify life of people who use precompiled kernels/modules.
And (IMHO) it is possible and quite easy to remove dependency of drivers
like network drivers on isa-pnp. I will try to prepare a test patch for if
when I find some free time...
But it would be probably a 2.5 feature (with possible backport later).

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  tel.  (0-58) 347 14 61
Wydz.Fizyki Technicznej i Matematyki Stosowanej Politechniki Gdanskiej
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [PATCH] net #3

2001-05-30 Thread Andrzej Krzysztofowicz

"Paul Gortmaker wrote:"
> Andrzej Krzysztofowicz wrote:
> > 
> > The following patch fixes some ISA PnP #ifdefs (enable modular,
> > disable when non-available) for 3c509 and smc-ultra.
> 
> > -#ifdef CONFIG_ISAPNP
> > +#if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE) && defined(MODULE))
> 
> Hrrm.  AFAICT the token CONFIG_ISAPNP_MODULE will never be defined.  :-)

If IS defined by config subsystem when
  "$CONFIG_ISAPNP" = "m"

Just mark config option and test it.

$ grep ISAPNP include/linux/autoconf.h
#undef  CONFIG_ISAPNP
#define CONFIG_ISAPNP_MODULE 1
#undef  CONFIG_BLK_DEV_ISAPNP

;)

> Regardless, we can just toss the #ifdefs altogether.  They aren't strictly
> required as appropriate stubs exist in linux/isapnp.h and that is what 
> they are there for. (I'd recommend this for 2.5, not 2.4 though.)
> 
> Granted, the CONFIG_ISAPNP buys you a slight reduction in driver
> size (even over the stubs) which somewhat seemed worthwhile in the
> past. But most of it is __init anyway, and for 2.5 I'd argue that the
> readability and lack of ifdefs outweighs the slight size change.

When __init for modules will be implemented ?

Andrzej
-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk

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



Re: [PATCH] net #6

2001-05-30 Thread Andrzej Krzysztofowicz

> 
> > The following patch removes unnecessary #ifdefs from eexpress.c
> 
> They are neccessary

Yes, you are right.
I was suggested by improper part of spinlock.h ...

Forget this patch.
 
> > @@ -643,9 +631,7 @@
> > eexp_hw_tx_pio(dev,data,length);
> > }
> > dev_kfree_skb(buf);
> > -#ifdef CONFIG_SMP
> > spin_unlock_irqrestore(>lock, flags);
> > -#endif
> > enable_irq(dev->irq);
> > return 0;
> 
> They are done this way to get good non SMP performance. Your changes would
> ruin that.

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  tel.  (0-58) 347 14 61
Wydz.Fizyki Technicznej i Matematyki Stosowanej Politechniki Gdanskiej
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [PATCH] net #9

2001-05-30 Thread Andrzej Krzysztofowicz

"Henning P. Schmiedehausen wrote:"
> Andrzej Krzysztofowicz <[EMAIL PROTECTED]> writes:
> 
> >-static char name[4][IFNAMSIZ] = { "", "", "", "" };
> 
> >+static char name[4][IFNAMSIZ];
> 
> Ugh. Sure about that one? the variables have been pointers to zero,
> now they're zero...

I do not agree. As I understand C "name" is a table, i.e. a pointer to a
prealocated area of size of 4*IFNAMSIZ*sizeof(char) bytes. There is no
pointers to the strings stored seprately. 
[ The strings are copied into the apropriate locations in the array during
  initialization ]

After applying the mentioned patch just the whole area of the array will be
zeroed. Not only the first characters of name[i] i=0,1,2,3 ...

Andrzej
-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk

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



Re: [PATCH] net #3

2001-05-30 Thread Andrzej Krzysztofowicz

"David Woodhouse wrote:"
> 
> [EMAIL PROTECTED] said:
> > -#ifdef CONFIG_ISAPNP 
> > +#if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE) && defined(MODULE)) 
> 
> The result here would be a 3c509 module which differs depending on whether 
> the ISAPNP module happened to be compiled at the same time or not. 

I'm just thinking whether the ISA PnP hardware related modules should depend
on isa-pnp.o at all 
(I mean having different behaviour of a the SAME (compiled) module depending
on whether isa-pnp.o is available or not)

It is just adding some persistent pointers for isa-pnp functions to the
kernel and teaching the modules to use request_module(). Probably also some
hacking to keep away from already used ISA PnP hardware during
initialization...

Also implementing "nopnp" option should be mandatory, IMHO.

> The ISAPNP-specific parts of the code aren't large. Please consider
> including them unconditionally instead. 

I see no objection if __init for modules is implemented...

Andrzej
-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk

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



Re: Generating valid random .configs

2001-05-30 Thread Andrzej Krzysztofowicz

"Arjan van de Ven wrote:"
> Anuradha Ratnaweera wrote:
> > 
> > Recently, I posted a request here to send your .config files and I
> > received a good number of them. (thanks!).
> > 
> > Now I want to generate even more different configurations, and a random
> > .config generator would be ideal. If I write a program which randomly
> > outputs "y", "m" and "n" and pipe its output through make config, will the
> > generated .configs always compile? Yes. the best thing is to go ahead and
> > try it (which I am doing at the moment) but I like to know the theoretical
> > answer;)
> 
> Every once in a while I run this and fix everything that doesn't
> compile. It has been 
> 2 months since I last did that, so I should do it again soon..

Some things cannot be properly fixed in CML1.
  "$CONFIG_BINFMT_MISC" = "y" -a "$CONFIG_PROC_FS" = "n"
is a good example.

Andrzej

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



Re: Generating valid random .configs

2001-05-30 Thread Andrzej Krzysztofowicz

Arjan van de Ven wrote:
 Anuradha Ratnaweera wrote:
  
  Recently, I posted a request here to send your .config files and I
  received a good number of them. (thanks!).
  
  Now I want to generate even more different configurations, and a random
  .config generator would be ideal. If I write a program which randomly
  outputs y, m and n and pipe its output through make config, will the
  generated .configs always compile? Yes. the best thing is to go ahead and
  try it (which I am doing at the moment) but I like to know the theoretical
  answer;)
 
 Every once in a while I run this and fix everything that doesn't
 compile. It has been 
 2 months since I last did that, so I should do it again soon..

Some things cannot be properly fixed in CML1.
  $CONFIG_BINFMT_MISC = y -a $CONFIG_PROC_FS = n
is a good example.

Andrzej

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [PATCH] net #9

2001-05-30 Thread Andrzej Krzysztofowicz

Henning P. Schmiedehausen wrote:
 Andrzej Krzysztofowicz [EMAIL PROTECTED] writes:
 
 -static char name[4][IFNAMSIZ] = { , , ,  };
 
 +static char name[4][IFNAMSIZ];
 
 Ugh. Sure about that one? the variables have been pointers to zero,
 now they're zero...

I do not agree. As I understand C name is a table, i.e. a pointer to a
prealocated area of size of 4*IFNAMSIZ*sizeof(char) bytes. There is no
pointers to the strings stored seprately. 
[ The strings are copied into the apropriate locations in the array during
  initialization ]

After applying the mentioned patch just the whole area of the array will be
zeroed. Not only the first characters of name[i] i=0,1,2,3 ...

Andrzej
-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [PATCH] net #3

2001-05-30 Thread Andrzej Krzysztofowicz

Paul Gortmaker wrote:
 Andrzej Krzysztofowicz wrote:
  
  The following patch fixes some ISA PnP #ifdefs (enable modular,
  disable when non-available) for 3c509 and smc-ultra.
 
  -#ifdef CONFIG_ISAPNP
  +#if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE)  defined(MODULE))
 
 Hrrm.  AFAICT the token CONFIG_ISAPNP_MODULE will never be defined.  :-)

If IS defined by config subsystem when
  $CONFIG_ISAPNP = m

Just mark config option and test it.

$ grep ISAPNP include/linux/autoconf.h
#undef  CONFIG_ISAPNP
#define CONFIG_ISAPNP_MODULE 1
#undef  CONFIG_BLK_DEV_ISAPNP

;)

 Regardless, we can just toss the #ifdefs altogether.  They aren't strictly
 required as appropriate stubs exist in linux/isapnp.h and that is what 
 they are there for. (I'd recommend this for 2.5, not 2.4 though.)
 
 Granted, the CONFIG_ISAPNP buys you a slight reduction in driver
 size (even over the stubs) which somewhat seemed worthwhile in the
 past. But most of it is __init anyway, and for 2.5 I'd argue that the
 readability and lack of ifdefs outweighs the slight size change.

When __init for modules will be implemented ?

Andrzej
-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [PATCH] net #6

2001-05-30 Thread Andrzej Krzysztofowicz

 
  The following patch removes unnecessary #ifdefs from eexpress.c
 
 They are neccessary

Yes, you are right.
I was suggested by improper part of spinlock.h ...

Forget this patch.
 
  @@ -643,9 +631,7 @@
  eexp_hw_tx_pio(dev,data,length);
  }
  dev_kfree_skb(buf);
  -#ifdef CONFIG_SMP
  spin_unlock_irqrestore(lp-lock, flags);
  -#endif
  enable_irq(dev-irq);
  return 0;
 
 They are done this way to get good non SMP performance. Your changes would
 ruin that.

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  tel.  (0-58) 347 14 61
Wydz.Fizyki Technicznej i Matematyki Stosowanej Politechniki Gdanskiej
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [PATCH] net #3

2001-05-30 Thread Andrzej Krzysztofowicz

 David Woodhouse wrote:
  
  [EMAIL PROTECTED] said:
   -#ifdef CONFIG_ISAPNP
   +#if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE)  defined(MODULE))
  
  The result here would be a 3c509 module which differs depending on whether
  the ISAPNP module happened to be compiled at the same time or not.
 
 In and of itself, that is an acceptable result.  We simply cannot take
 into kernel configuration variations between two kernel builds.  If you
 build your isapnp module with one configuration, and your 3c509 module
 with another config, consider yourself lucky that it works at all.

I think it is better to avoid such a dependency if possible. It will
especially simplify life of people who use precompiled kernels/modules.
And (IMHO) it is possible and quite easy to remove dependency of drivers
like network drivers on isa-pnp. I will try to prepare a test patch for if
when I find some free time...
But it would be probably a 2.5 feature (with possible backport later).

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  tel.  (0-58) 347 14 61
Wydz.Fizyki Technicznej i Matematyki Stosowanej Politechniki Gdanskiej
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [PATCH] net #3

2001-05-30 Thread Andrzej Krzysztofowicz

David Woodhouse wrote:
 
 [EMAIL PROTECTED] said:
  -#ifdef CONFIG_ISAPNP 
  +#if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE)  defined(MODULE)) 
 
 The result here would be a 3c509 module which differs depending on whether 
 the ISAPNP module happened to be compiled at the same time or not. 

I'm just thinking whether the ISA PnP hardware related modules should depend
on isa-pnp.o at all 
(I mean having different behaviour of a the SAME (compiled) module depending
on whether isa-pnp.o is available or not)

It is just adding some persistent pointers for isa-pnp functions to the
kernel and teaching the modules to use request_module(). Probably also some
hacking to keep away from already used ISA PnP hardware during
initialization...

Also implementing nopnp option should be mandatory, IMHO.

 The ISAPNP-specific parts of the code aren't large. Please consider
 including them unconditionally instead. 

I see no objection if __init for modules is implemented...

Andrzej
-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] net #1 (correction)

2001-05-29 Thread Andrzej Krzysztofowicz


Sorry, one fix against previous patch

Andrzej

--- drivers/net/wavelan.p.h~Wed May 30 02:43:16 2001
+++ drivers/net/wavelan.p.h Wed May 30 02:44:29 2001
@@ -705,9 +705,9 @@
 MODULE_PARM(io, "1-4i");
 MODULE_PARM(irq, "1-4i");
 MODULE_PARM(name, "1-4c" __MODULE_STRING(IFNAMSIZ));
-MODULE_PARM(io, "WaveLAN I/O base address(es),required");
-MODULE_PARM(irq, "WaveLAN IRQ number(s)");
-MODULE_PARM(name, "WaveLAN interface neme(s)");
+MODULE_PARM_DESC(io, "WaveLAN I/O base address(es),required");
+MODULE_PARM_DESC(irq, "WaveLAN IRQ number(s)");
+MODULE_PARM_DESC(name, "WaveLAN interface neme(s)");
 #endif /* MODULE */
 
 #endif /* WAVELAN_P_H */

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] net #8

2001-05-29 Thread Andrzej Krzysztofowicz


The following patch fixes some bogus comments in /drivers/net/*.c

Andrzej

*** PATCH 8 *
diff -uNr linux-2.4.5-ac4/drivers/net/3c501.c linux/drivers/net/3c501.c
--- linux-2.4.5-ac4/drivers/net/3c501.c Wed May 30 01:09:52 2001
+++ linux/drivers/net/3c501.c   Wed May 30 01:15:20 2001
@@ -253,7 +253,7 @@
 }
 
 /**
- * el1_probe: 
+ * el1_probe1: 
  * @dev: The device structure to use
  * @ioaddr: An I/O address to probe at.
  *
diff -uNr linux-2.4.5-ac4/drivers/net/aironet4500_proc.c 
linux/drivers/net/aironet4500_proc.c
--- linux-2.4.5-ac4/drivers/net/aironet4500_proc.c  Tue May 29 20:46:26 2001
+++ linux/drivers/net/aironet4500_proc.cWed May 30 01:15:20 2001
@@ -1,5 +1,5 @@
 /*
- *  Aironet 4500 Pcmcia driver
+ *  Aironet 4500 /proc interface
  *
  * Elmer Joandi, Januar 1999
  * Copyright GPL
diff -uNr linux-2.4.5-ac4/drivers/net/bagetlance.c linux/drivers/net/bagetlance.c
--- linux-2.4.5-ac4/drivers/net/bagetlance.cWed May 30 01:08:54 2001
+++ linux/drivers/net/bagetlance.c  Wed May 30 01:15:20 2001
@@ -1,5 +1,5 @@
 /* $Id$
- * vmelance.c: Ethernet driver for VME Lance cards on Baget/MIPS
+ * bagetlance.c: Ethernet driver for VME Lance cards on Baget/MIPS
  *  This code stealed and adopted from linux/drivers/net/atarilance.c
  *  See that for author info
  *
diff -uNr linux-2.4.5-ac4/drivers/net/seeq8005.c linux/drivers/net/seeq8005.c
--- linux-2.4.5-ac4/drivers/net/seeq8005.c  Wed May 30 01:08:55 2001
+++ linux/drivers/net/seeq8005.cWed May 30 01:15:20 2001
@@ -101,8 +101,6 @@
 /* Check for a network adaptor of this type, and return '0' iff one exists.
If dev->base_addr == 0, probe all likely locations.
If dev->base_addr == 1, always return failure.
-   If dev->base_addr == 2, allocate space for the device and return success
-   (detachable devices only).
*/
 
 int __init 
diff -uNr linux-2.4.5-ac4/drivers/net/sk_g16.c linux/drivers/net/sk_g16.c
--- linux-2.4.5-ac4/drivers/net/sk_g16.cMon May 28 01:34:55 2001
+++ linux/drivers/net/sk_g16.c  Wed May 30 01:15:20 2001
@@ -536,8 +536,6 @@
  * Check for a network adaptor of this type, and return '0' if one exists.
  * If dev->base_addr == 0, probe all likely locations.
  * If dev->base_addr == 1, always return failure.
- * If dev->base_addr == 2, allocate space for the device and return success
- * (detachable devices only).
  */
 
 int __init SK_init(struct net_device *dev)
diff -uNr linux-2.4.5-ac4/drivers/net/winbond-840.c linux/drivers/net/winbond-840.c
--- linux-2.4.5-ac4/drivers/net/winbond-840.c   Wed May 30 01:08:56 2001
+++ linux/drivers/net/winbond-840.c Wed May 30 01:15:20 2001
@@ -1,4 +1,4 @@
-/* winbond-840.c: A Linux PCI network adapter skeleton device driver. */
+/* winbond-840.c: A Linux PCI network adapter device driver. */
 /*
Written 1998-2001 by Donald Becker.
 


-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] net #5

2001-05-29 Thread Andrzej Krzysztofowicz


The following patch fixes some long udelay()s in aironet.c and saa9730.c
in the current kernel tree.

Andrzej

*** PATCH 5 ***
diff -uNr linux-2.4.5-ac4/drivers/net/aironet4500_card.c 
linux/drivers/net/aironet4500_card.c
--- linux-2.4.5-ac4/drivers/net/aironet4500_card.c  Mon May 28 01:34:54 2001
+++ linux/drivers/net/aironet4500_card.cWed May 30 01:12:57 2001
@@ -723,14 +723,14 @@
awc_i365_card_release(s);
 
 
-   udelay(10);
+   mdelay(100);

i365_out(s, 0x2, 0x10 );// power enable
-   udelay(20);
+   mdelay(200);

i365_out(s, 0x2, 0x10 | 0x01 | 0x04 | 0x80);//power enable

-   udelay(25);
+   mdelay(250);

if (!s->irq)
s->irq = 11;
@@ -756,7 +756,7 @@
i365_out(s,0x15,0x3f | 0x40);   // enab mem reg bit
i365_out(s,0x06,0x01);  // enab mem 

-   udelay(1);
+   mdelay(10);

cis[0] = 0x45;

@@ -767,7 +767,7 @@
 
mem[0x3e0] = 0x45;
 
-   udelay(1);
+   mdelay(10);

memcpy_fromio(cis,0xD000, 0x3e0);

@@ -795,7 +795,7 @@
s->socket, s->manufacturer,s->product);
 
i365_out(s,0x07, 0x1 | 0x2);// enable io 16bit
-   udelay(1000);
+   mdelay(1);
port = s->io;
i365_out(s,0x08, port & 0xff);
i365_out(s,0x09, (port & 0xff00)/ 0x100);
@@ -804,7 +804,7 @@
 
i365_out(s,0x06, 0x40); // enable io window
 
-   udelay(1000);
+   mdelay(1);
 
i365_out(s,0x3e0,0x45);

@@ -822,13 +822,10 @@
 

outw(0x10, s->io + 0x34);
-   udelay(1);
+   mdelay(10);

return 0;
-   
-   
 
-   
 };
 
 
diff -uNr linux-2.4.5-ac4/drivers/net/saa9730.c linux/drivers/net/saa9730.c
--- linux-2.4.5-ac4/drivers/net/saa9730.c   Sat May 19 18:35:48 2001
+++ linux/drivers/net/saa9730.c Wed May 30 01:12:57 2001
@@ -335,7 +335,7 @@
printk("Error: lan_saa9730_mii_init: timeout\n");
return -1;
}
-   udelay(1000);   /* wait 1 ms. */
+   mdelay(1);  /* wait 1 ms. */
}
 
/* Now set the control and address register. */
@@ -350,11 +350,11 @@
printk("Error: lan_saa9730_mii_init: timeout\n");
return -1;
}
-   udelay(1000);   /* wait 1 ms. */
+   mdelay(1);  /* wait 1 ms. */
}
 
/* Wait for 1 ms. */
-   udelay(1000);
+   mdelay(1);
 
/* Check the link status. */
if (INL(>lan_saa9730_regs->StationMgmtData) &
@@ -369,7 +369,7 @@
 >lan_saa9730_regs->StationMgmtCtl);
 
/* Wait for 1 ms. */
-   udelay(1000);
+   mdelay(1);
 
/* set 'CONTROL' = force reset and renegotiate */
OUTL(PHY_CONTROL_RESET | PHY_CONTROL_AUTO_NEG |
@@ -377,7 +377,7 @@
 >lan_saa9730_regs->StationMgmtData);
 
/* Wait for 50 ms. */
-   udelay(50 * 1000);
+   mdelay(50);
 
/* set 'BUSY' to start operation */
OUTL(MD_CA_BUSY | PHY_ADDRESS << MD_CA_PHY_SHF | MD_CA_WR |
@@ -393,11 +393,11 @@
("Error: lan_saa9730_mii_init: timeout\n");
return -1;
}
-   udelay(1000);   /* wait 1 ms. */
+   mdelay(1);  /* wait 1 ms. */
}
 
/* Wait for 1 ms. */
-   udelay(1000);
+   mdelay(1);
 
for (l = 0; l < 2; l++) {
/* set PHY address = 'STATUS' */
@@ -415,11 +415,11 @@
("Error: lan_saa9730_mii_init: timeout\n");
return -1;
}
-   udelay(1000);   /* wait 1 ms. */
+   mdelay(1);  /* wait 1 ms. */
}
 
/* wait for 3 sec. */
-   udelay(3000 * 1000);
+   mdelay(3000);
 
/* check the link status */
if (INL(>lan_saa9730_regs->StationMgmtData) &
@@ -495,7 +495,7 @@
("Error: lan_sa9730_stop: MAC reset timeout\n");
return -1;
}
-   udelay(1000);   /* wait 1 ms. */
+   mdelay(1);  /* wait 1 ms. */
}
 
return 0;


-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61

[PATCH] net #9

2001-05-29 Thread Andrzej Krzysztofowicz


The following patch removes some zero initializers from statics

Andrzej

 PATCH 9 *
diff -uNr linux-2.4.5-ac4/drivers/net/dmfe.c linux/drivers/net/dmfe.c
--- linux-2.4.5-ac4/drivers/net/dmfe.c  Wed May 30 01:08:54 2001
+++ linux/drivers/net/dmfe.cWed May 30 01:16:04 2001
@@ -261,20 +261,20 @@
 static char version[] __devinitdata =
KERN_INFO "Davicom DM9xxx net driver, version " DMFE_VERSION "\n";
 
-static int dmfe_debug = 0;
+static int dmfe_debug;
 static unsigned char dmfe_media_mode = DMFE_AUTO;
-static u32 dmfe_cr6_user_set = 0;
+static u32 dmfe_cr6_user_set;
 
 /* For module input parameter */
-static int debug = 0;
-static u32 cr6set = 0;
+static int debug;
+static u32 cr6set;
 static unsigned char mode = 8;
 static u8 chkmode = 1;
-static u8 HPNA_mode = 0;   /* Default: Low Power/High Speed */
-static u8 HPNA_rx_cmd = 0; /* Default: Disable Rx remote command */
-static u8 HPNA_tx_cmd = 0; /* Default: Don't issue remote command */
-static u8 HPNA_NoiseFloor = 0; /* Default: HPNA NoiseFloor */
-static u8 SF_mode = 0; /* Special Function: 1:VLAN, 2:RX Flow Control
+static u8 HPNA_mode;   /* Default: Low Power/High Speed */
+static u8 HPNA_rx_cmd; /* Default: Disable Rx remote command */
+static u8 HPNA_tx_cmd; /* Default: Don't issue remote command */
+static u8 HPNA_NoiseFloor; /* Default: HPNA NoiseFloor */
+static u8 SF_mode; /* Special Function: 1:VLAN, 2:RX Flow Control
   4: TX pause packet */
 
 unsigned long CrcTable[256] = {
diff -uNr linux-2.4.5-ac4/drivers/net/wavelan.p.h linux/drivers/net/wavelan.p.h
--- linux-2.4.5-ac4/drivers/net/wavelan.p.h Wed May 30 01:08:56 2001
+++ linux/drivers/net/wavelan.p.h   Wed May 30 01:16:05 2001
@@ -699,9 +699,9 @@
 
 #ifdef MODULE
 /* Parameters set by insmod */
-static int io[4]   = { 0, 0, 0, 0 };
-static int irq[4]  = { 0, 0, 0, 0 };
-static charname[4][IFNAMSIZ] = { "", "", "", "" };
+static int io[4];
+static int irq[4];
+static charname[4][IFNAMSIZ];
 MODULE_PARM(io, "1-4i");
 MODULE_PARM(irq, "1-4i");
 MODULE_PARM(name, "1-4c" __MODULE_STRING(IFNAMSIZ));


-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] net #4

2001-05-29 Thread Andrzej Krzysztofowicz


The following patch fixes network drivers configuration in some points:

- make sb1000 dependent on CONFIG_ISAPNP. It compiles without CONFIG_ISAPNP,
  but will not work as the driver relies on ISA PnP board detection
- de620 does not support build-in configuration (dependency on "m" now).
  It compiles, but requires io/irq module parameters for board detection
  (even ether= is not supported by this driver)
- Aironet fixes:
  -- Aironet PnP requires CONFIG_ISAPNP (y or m) to work; of course, when
 CONFIG_ISAPNP=m CONFIG_AIRONET4500_NONCS also should be "m", but
 this is not supported by CML1; to be fixed in CML2 or in another way
  -- Aironet I365 and ISA detection for built-in driver is not supported
 currently, so disable these options if CONFIG_AIRONET4500_NONCS=y

Andrzej

* PATCH 5 ***
diff -uNr linux-2.4.5-ac4/drivers/net/Config.in linux/drivers/net/Config.in
--- linux-2.4.5-ac4/drivers/net/Config.in   Mon May 28 01:34:54 2001
+++ linux/drivers/net/Config.in Wed May 30 01:11:56 2001
@@ -15,7 +15,7 @@
fi
 fi
 
-tristate 'General Instruments Surfboard 1000' CONFIG_NET_SB1000
+dep_tristate 'General Instruments Surfboard 1000' CONFIG_NET_SB1000 $CONFIG_ISAPNP
 
 #
 #  Ethernet
@@ -180,7 +180,7 @@
if [ "$CONFIG_NET_POCKET" = "y" ]; then
   dep_tristate 'AT-LAN-TEC/RealTek pocket adapter support' CONFIG_ATP 
$CONFIG_ISA
   tristate 'D-Link DE600 pocket adapter support' CONFIG_DE600
-  tristate 'D-Link DE620 pocket adapter support' CONFIG_DE620
+  dep_tristate 'D-Link DE620 pocket adapter support' CONFIG_DE620 m
fi
 fi
 
@@ -264,10 +264,14 @@
tristate '  Aironet 4500/4800 series adapters' CONFIG_AIRONET4500
dep_tristate '   Aironet 4500/4800 ISA/PCI/PNP/365 support ' 
CONFIG_AIRONET4500_NONCS $CONFIG_AIRONET4500
if [ "$CONFIG_AIRONET4500" != "n" -a "$CONFIG_AIRONET4500_NONCS" != "n" ]; then
-  bool ' Aironet 4500/4800 PNP support ' CONFIG_AIRONET4500_PNP
+  if [ "$CONFIG_AIRONET4500_NONCS" = "m" -a "$CONFIG_ISAPNP" = "m" -o 
+"$CONFIG_ISAPNP" = "y" ]; then
+bool ' Aironet 4500/4800 PNP support ' CONFIG_AIRONET4500_PNP
+  fi
   dep_bool ' Aironet 4500/4800 PCI support ' CONFIG_AIRONET4500_PCI 
$CONFIG_PCI
-  dep_bool ' Aironet 4500/4800 ISA broken support (EXPERIMENTAL)' 
CONFIG_AIRONET4500_ISA $CONFIG_EXPERIMENTAL
-  dep_bool ' Aironet 4500/4800 I365 broken support (EXPERIMENTAL)' 
CONFIG_AIRONET4500_I365 $CONFIG_EXPERIMENTAL
+  if [ "$CONFIG_AIRONET4500_NONCS" = "m" ]; then
+dep_bool ' Aironet 4500/4800 ISA broken support (EXPERIMENTAL)' 
+CONFIG_AIRONET4500_ISA $CONFIG_EXPERIMENTAL
+dep_bool ' Aironet 4500/4800 I365 broken support (EXPERIMENTAL)' 
+CONFIG_AIRONET4500_I365 $CONFIG_EXPERIMENTAL
+  fi
fi
dep_tristate '   Aironet 4500/4800 PROC interface ' CONFIG_AIRONET4500_PROC 
$CONFIG_AIRONET4500 m
 


-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] net #6

2001-05-29 Thread Andrzej Krzysztofowicz


The following patch removes unnecessary #ifdefs from eexpress.c

Andrzej

** PATCH 6 ***
diff -uNr linux-2.4.5-ac4/drivers/net/eexpress.c linux/drivers/net/eexpress.c
--- linux-2.4.5-ac4/drivers/net/eexpress.c  Wed May 30 01:08:54 2001
+++ linux/drivers/net/eexpress.cWed May 30 01:13:49 2001
@@ -574,9 +574,7 @@
 static void eexp_timeout(struct net_device *dev)
 {
struct net_local *lp = (struct net_local *)dev->priv;
-#ifdef CONFIG_SMP
-   unsigned long flags;
-#endif
+   unsigned long __attribute__((unused)) flags;
int status;

disable_irq(dev->irq);
@@ -586,10 +584,7 @@
 *  lets make it work first..
 */
 
-#ifdef CONFIG_SMP
spin_lock_irqsave(>lock, flags);
-#endif
-
status = scb_status(dev);
unstick_cu(dev);
printk(KERN_INFO "%s: transmit timed out, %s?\n", dev->name,
@@ -602,9 +597,7 @@
outb(0,dev->base_addr+SIGNAL_CA);
}
netif_wake_queue(dev);  
-#ifdef CONFIG_SMP
spin_unlock_irqrestore(>lock, flags);
-#endif
 }
 
 /*
@@ -614,9 +607,7 @@
 static int eexp_xmit(struct sk_buff *buf, struct net_device *dev)
 {
struct net_local *lp = (struct net_local *)dev->priv;
-#ifdef CONFIG_SMP
-   unsigned long flags;
-#endif
+   unsigned long __attribute__((unused)) flags;
 
 #if NET_DEBUG > 6
printk(KERN_DEBUG "%s: eexp_xmit()\n", dev->name);
@@ -629,10 +620,7 @@
 *  lets make it work first..
 */
 
-#ifdef CONFIG_SMP
spin_lock_irqsave(>lock, flags);
-#endif
-  
{
unsigned short length = (ETH_ZLEN < buf->len) ? buf->len :
ETH_ZLEN;
@@ -643,9 +631,7 @@
eexp_hw_tx_pio(dev,data,length);
}
dev_kfree_skb(buf);
-#ifdef CONFIG_SMP
spin_unlock_irqrestore(>lock, flags);
-#endif
enable_irq(dev->irq);
return 0;
 }


-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] net #1

2001-05-29 Thread Andrzej Krzysztofowicz

>From kufel!ankry  Wed May 30 02:29:36 2001
Return-Path: 
Received: from kufel.UUCP (uucp@localhost)
by green.mif.pg.gda.pl (8.9.3/8.9.3) with UUCP id CAA04405
for green.mif.pg.gda.pl!ankry; Wed, 30 May 2001 02:29:35 +0200
Received: (from ankry@localhost)
by kufel.dom (8.9.3/8.9.3) id CAA02200
for green!ankry; Wed, 30 May 2001 02:07:43 +0200
Date: Wed, 30 May 2001 02:07:43 +0200
From: Andrzej Krzysztofowicz 
Message-Id: <[EMAIL PROTECTED]>
To: kufel!green.mif.pg.gda.pl!ankry
Subject: alan.1

cox, jg, [EMAIL PROTECTED], [EMAIL PROTECTED]

Hi,
  This patch adds MODULE_PARM_DESC to all drivers located directly in
drivers/net. Some existing descriptions are fixed; some undefined
parameters are disabled.
  Also a dependency of 3c509 parameters on CONFIG_ISAPNP is removed. It is
better to have a non-working parameter (many drivers have such parameters)
than having a driver that sometimes supports a parameter and sometimes it
does not...

This is the first of my series of network patches, that are generated
incrementally against 2.4.5-ac4. However, they are so separated, that
can be applied independently (eventually with some minor shifts)

Andrzej

*** PATCH 1 *
diff -uNr linux-2.4.5-ac4/drivers/net/3c501.c linux/drivers/net/3c501.c
--- linux-2.4.5-ac4/drivers/net/3c501.c Sat May 19 18:35:42 2001
+++ linux/drivers/net/3c501.c   Wed May 30 01:07:41 2001
@@ -925,6 +925,8 @@
 static int irq=5;
 MODULE_PARM(io, "i");
 MODULE_PARM(irq, "i");
+MODULE_PARM_DESC(io, "EtherLink I/O base address");
+MODULE_PARM_DESC(irq, "EtherLink IRQ number");
 
 /**
  * init_module:
diff -uNr linux-2.4.5-ac4/drivers/net/3c503.c linux/drivers/net/3c503.c
--- linux-2.4.5-ac4/drivers/net/3c503.c Sat May 19 18:35:42 2001
+++ linux/drivers/net/3c503.c   Wed May 30 01:07:41 2001
@@ -615,6 +615,9 @@
 MODULE_PARM(io, "1-" __MODULE_STRING(MAX_EL2_CARDS) "i");
 MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_EL2_CARDS) "i");
 MODULE_PARM(xcvr, "1-" __MODULE_STRING(MAX_EL2_CARDS) "i");
+MODULE_PARM_DESC(io, "EtherLink II I/O base address(es)");
+MODULE_PARM_DESC(irq, "EtherLink II IRQ number(s) (assigned)");
+MODULE_PARM_DESC(xcvr, "EtherLink II tranceiver(s) (0=internal, 1=external)");
 
 /* This is set up so that only a single autoprobe takes place per call.
 ISA device autoprobes on a running machine are not recommended. */
diff -uNr linux-2.4.5-ac4/drivers/net/3c505.c linux/drivers/net/3c505.c
--- linux-2.4.5-ac4/drivers/net/3c505.c Sat May 19 18:35:42 2001
+++ linux/drivers/net/3c505.c   Wed May 30 01:07:41 2001
@@ -1621,6 +1621,9 @@
 MODULE_PARM(io, "1-" __MODULE_STRING(ELP_MAX_CARDS) "i");
 MODULE_PARM(irq, "1-" __MODULE_STRING(ELP_MAX_CARDS) "i");
 MODULE_PARM(dma, "1-" __MODULE_STRING(ELP_MAX_CARDS) "i");
+MODULE_PARM_DESC(io, "EtherLink Plus I/O base address(es)");
+MODULE_PARM_DESC(irq, "EtherLink Plus IRQ number(s) (assigned)");
+MODULE_PARM_DESC(dma, "EtherLink Plus DMA channel(s)");
 
 int init_module(void)
 {
diff -uNr linux-2.4.5-ac4/drivers/net/3c507.c linux/drivers/net/3c507.c
--- linux-2.4.5-ac4/drivers/net/3c507.c Sat May 19 18:35:42 2001
+++ linux/drivers/net/3c507.c   Wed May 30 01:07:41 2001
@@ -861,6 +861,8 @@
 static int irq;
 MODULE_PARM(io, "i");
 MODULE_PARM(irq, "i");
+MODULE_PARM_DESC(io, "EtherLink16 I/O base address");
+MODULE_PARM_DESC(irq, "(ignored)");
 
 int init_module(void)
 {
diff -uNr linux-2.4.5-ac4/drivers/net/3c509.c linux/drivers/net/3c509.c
--- linux-2.4.5-ac4/drivers/net/3c509.c Sat May 19 18:35:42 2001
+++ linux/drivers/net/3c509.c   Wed May 30 01:07:41 2001
@@ -1007,9 +1007,12 @@
 MODULE_PARM(irq,"1-8i");
 MODULE_PARM(xcvr,"1-8i");
 MODULE_PARM(max_interrupt_work, "i");
-#ifdef CONFIG_ISAPNP
+MODULE_PARM_DESC(debug, "EtherLink III debug level (0-6)");
+MODULE_PARM_DESC(irq, "EtherLink III IRQ number(s) (assigned)");
+MODULE_PARM_DESC(xcvr,"EtherLink III tranceiver(s) (0=internal, 1=external)");
+MODULE_PARM_DESC(max_interrupt_work, "EtherLink III maximum events handled per 
+interrupt");
 MODULE_PARM(nopnp, "i");
-#endif
+MODULE_PARM_DESC(nopnp, "EtherLink III disable ISA PnP support (0-1)");
 
 int
 init_module(void)
diff -uNr linux-2.4.5-ac4/drivers/net/3c515.c linux/drivers/net/3c515.c
--- linux-2.4.5-ac4/drivers/net/3c515.c Sat May 19 18:35:42 2001
+++ linux/drivers/net/3c515.c   Wed May 30 01:07:41 2001
@@ -85,6 +85,11 @@
 MODULE_PARM(full_duplex, "1-" __MODULE_STRING(8) "i");
 MODULE_PARM(rx_copybreak, "i");
 MODULE_PARM(max_interrupt_work, "i");
+MODULE_PARM_DESC(debug, "3c515 debug level (0-6)");
+MODULE_

[PATCH] net #1

2001-05-29 Thread Andrzej Krzysztofowicz

From kufel!ankry  Wed May 30 02:29:36 2001
Return-Path: kufel!ankry
Received: from kufel.UUCP (uucp@localhost)
by green.mif.pg.gda.pl (8.9.3/8.9.3) with UUCP id CAA04405
for green.mif.pg.gda.pl!ankry; Wed, 30 May 2001 02:29:35 +0200
Received: (from ankry@localhost)
by kufel.dom (8.9.3/8.9.3) id CAA02200
for green!ankry; Wed, 30 May 2001 02:07:43 +0200
Date: Wed, 30 May 2001 02:07:43 +0200
From: Andrzej Krzysztofowicz kufel!ankry
Message-Id: [EMAIL PROTECTED]
To: kufel!green.mif.pg.gda.pl!ankry
Subject: alan.1

cox, jg, [EMAIL PROTECTED], [EMAIL PROTECTED]

Hi,
  This patch adds MODULE_PARM_DESC to all drivers located directly in
drivers/net. Some existing descriptions are fixed; some undefined
parameters are disabled.
  Also a dependency of 3c509 parameters on CONFIG_ISAPNP is removed. It is
better to have a non-working parameter (many drivers have such parameters)
than having a driver that sometimes supports a parameter and sometimes it
does not...

This is the first of my series of network patches, that are generated
incrementally against 2.4.5-ac4. However, they are so separated, that
can be applied independently (eventually with some minor shifts)

Andrzej

*** PATCH 1 *
diff -uNr linux-2.4.5-ac4/drivers/net/3c501.c linux/drivers/net/3c501.c
--- linux-2.4.5-ac4/drivers/net/3c501.c Sat May 19 18:35:42 2001
+++ linux/drivers/net/3c501.c   Wed May 30 01:07:41 2001
@@ -925,6 +925,8 @@
 static int irq=5;
 MODULE_PARM(io, i);
 MODULE_PARM(irq, i);
+MODULE_PARM_DESC(io, EtherLink I/O base address);
+MODULE_PARM_DESC(irq, EtherLink IRQ number);
 
 /**
  * init_module:
diff -uNr linux-2.4.5-ac4/drivers/net/3c503.c linux/drivers/net/3c503.c
--- linux-2.4.5-ac4/drivers/net/3c503.c Sat May 19 18:35:42 2001
+++ linux/drivers/net/3c503.c   Wed May 30 01:07:41 2001
@@ -615,6 +615,9 @@
 MODULE_PARM(io, 1- __MODULE_STRING(MAX_EL2_CARDS) i);
 MODULE_PARM(irq, 1- __MODULE_STRING(MAX_EL2_CARDS) i);
 MODULE_PARM(xcvr, 1- __MODULE_STRING(MAX_EL2_CARDS) i);
+MODULE_PARM_DESC(io, EtherLink II I/O base address(es));
+MODULE_PARM_DESC(irq, EtherLink II IRQ number(s) (assigned));
+MODULE_PARM_DESC(xcvr, EtherLink II tranceiver(s) (0=internal, 1=external));
 
 /* This is set up so that only a single autoprobe takes place per call.
 ISA device autoprobes on a running machine are not recommended. */
diff -uNr linux-2.4.5-ac4/drivers/net/3c505.c linux/drivers/net/3c505.c
--- linux-2.4.5-ac4/drivers/net/3c505.c Sat May 19 18:35:42 2001
+++ linux/drivers/net/3c505.c   Wed May 30 01:07:41 2001
@@ -1621,6 +1621,9 @@
 MODULE_PARM(io, 1- __MODULE_STRING(ELP_MAX_CARDS) i);
 MODULE_PARM(irq, 1- __MODULE_STRING(ELP_MAX_CARDS) i);
 MODULE_PARM(dma, 1- __MODULE_STRING(ELP_MAX_CARDS) i);
+MODULE_PARM_DESC(io, EtherLink Plus I/O base address(es));
+MODULE_PARM_DESC(irq, EtherLink Plus IRQ number(s) (assigned));
+MODULE_PARM_DESC(dma, EtherLink Plus DMA channel(s));
 
 int init_module(void)
 {
diff -uNr linux-2.4.5-ac4/drivers/net/3c507.c linux/drivers/net/3c507.c
--- linux-2.4.5-ac4/drivers/net/3c507.c Sat May 19 18:35:42 2001
+++ linux/drivers/net/3c507.c   Wed May 30 01:07:41 2001
@@ -861,6 +861,8 @@
 static int irq;
 MODULE_PARM(io, i);
 MODULE_PARM(irq, i);
+MODULE_PARM_DESC(io, EtherLink16 I/O base address);
+MODULE_PARM_DESC(irq, (ignored));
 
 int init_module(void)
 {
diff -uNr linux-2.4.5-ac4/drivers/net/3c509.c linux/drivers/net/3c509.c
--- linux-2.4.5-ac4/drivers/net/3c509.c Sat May 19 18:35:42 2001
+++ linux/drivers/net/3c509.c   Wed May 30 01:07:41 2001
@@ -1007,9 +1007,12 @@
 MODULE_PARM(irq,1-8i);
 MODULE_PARM(xcvr,1-8i);
 MODULE_PARM(max_interrupt_work, i);
-#ifdef CONFIG_ISAPNP
+MODULE_PARM_DESC(debug, EtherLink III debug level (0-6));
+MODULE_PARM_DESC(irq, EtherLink III IRQ number(s) (assigned));
+MODULE_PARM_DESC(xcvr,EtherLink III tranceiver(s) (0=internal, 1=external));
+MODULE_PARM_DESC(max_interrupt_work, EtherLink III maximum events handled per 
+interrupt);
 MODULE_PARM(nopnp, i);
-#endif
+MODULE_PARM_DESC(nopnp, EtherLink III disable ISA PnP support (0-1));
 
 int
 init_module(void)
diff -uNr linux-2.4.5-ac4/drivers/net/3c515.c linux/drivers/net/3c515.c
--- linux-2.4.5-ac4/drivers/net/3c515.c Sat May 19 18:35:42 2001
+++ linux/drivers/net/3c515.c   Wed May 30 01:07:41 2001
@@ -85,6 +85,11 @@
 MODULE_PARM(full_duplex, 1- __MODULE_STRING(8) i);
 MODULE_PARM(rx_copybreak, i);
 MODULE_PARM(max_interrupt_work, i);
+MODULE_PARM_DESC(debug, 3c515 debug level (0-6));
+MODULE_PARM_DESC(options, 3c515: Bits 0-2: media type, bit 3: full duplex, bit 4: 
+bus mastering);
+MODULE_PARM_DESC(full_duplex, (ignored));
+MODULE_PARM_DESC(rx_copybreak, 3c515 copy breakpoint for copy-only-tiny-frames);
+MODULE_PARM_DESC(max_interrupt_work, 3c515 maximum events handled per interrupt);
 
 /* Knobs for adjusting internal parameters. */
 /* Put out somewhat more debugging messages. (0 - no msg, 1 minimal msgs). */
diff -uNr linux-2.4.5-ac4/drivers/net/3c523.c

[PATCH] net #5

2001-05-29 Thread Andrzej Krzysztofowicz


The following patch fixes some long udelay()s in aironet.c and saa9730.c
in the current kernel tree.

Andrzej

*** PATCH 5 ***
diff -uNr linux-2.4.5-ac4/drivers/net/aironet4500_card.c 
linux/drivers/net/aironet4500_card.c
--- linux-2.4.5-ac4/drivers/net/aironet4500_card.c  Mon May 28 01:34:54 2001
+++ linux/drivers/net/aironet4500_card.cWed May 30 01:12:57 2001
@@ -723,14 +723,14 @@
awc_i365_card_release(s);
 
 
-   udelay(10);
+   mdelay(100);

i365_out(s, 0x2, 0x10 );// power enable
-   udelay(20);
+   mdelay(200);

i365_out(s, 0x2, 0x10 | 0x01 | 0x04 | 0x80);//power enable

-   udelay(25);
+   mdelay(250);

if (!s-irq)
s-irq = 11;
@@ -756,7 +756,7 @@
i365_out(s,0x15,0x3f | 0x40);   // enab mem reg bit
i365_out(s,0x06,0x01);  // enab mem 

-   udelay(1);
+   mdelay(10);

cis[0] = 0x45;

@@ -767,7 +767,7 @@
 
mem[0x3e0] = 0x45;
 
-   udelay(1);
+   mdelay(10);

memcpy_fromio(cis,0xD000, 0x3e0);

@@ -795,7 +795,7 @@
s-socket, s-manufacturer,s-product);
 
i365_out(s,0x07, 0x1 | 0x2);// enable io 16bit
-   udelay(1000);
+   mdelay(1);
port = s-io;
i365_out(s,0x08, port  0xff);
i365_out(s,0x09, (port  0xff00)/ 0x100);
@@ -804,7 +804,7 @@
 
i365_out(s,0x06, 0x40); // enable io window
 
-   udelay(1000);
+   mdelay(1);
 
i365_out(s,0x3e0,0x45);

@@ -822,13 +822,10 @@
 

outw(0x10, s-io + 0x34);
-   udelay(1);
+   mdelay(10);

return 0;
-   
-   
 
-   
 };
 
 
diff -uNr linux-2.4.5-ac4/drivers/net/saa9730.c linux/drivers/net/saa9730.c
--- linux-2.4.5-ac4/drivers/net/saa9730.c   Sat May 19 18:35:48 2001
+++ linux/drivers/net/saa9730.c Wed May 30 01:12:57 2001
@@ -335,7 +335,7 @@
printk(Error: lan_saa9730_mii_init: timeout\n);
return -1;
}
-   udelay(1000);   /* wait 1 ms. */
+   mdelay(1);  /* wait 1 ms. */
}
 
/* Now set the control and address register. */
@@ -350,11 +350,11 @@
printk(Error: lan_saa9730_mii_init: timeout\n);
return -1;
}
-   udelay(1000);   /* wait 1 ms. */
+   mdelay(1);  /* wait 1 ms. */
}
 
/* Wait for 1 ms. */
-   udelay(1000);
+   mdelay(1);
 
/* Check the link status. */
if (INL(lp-lan_saa9730_regs-StationMgmtData) 
@@ -369,7 +369,7 @@
 lp-lan_saa9730_regs-StationMgmtCtl);
 
/* Wait for 1 ms. */
-   udelay(1000);
+   mdelay(1);
 
/* set 'CONTROL' = force reset and renegotiate */
OUTL(PHY_CONTROL_RESET | PHY_CONTROL_AUTO_NEG |
@@ -377,7 +377,7 @@
 lp-lan_saa9730_regs-StationMgmtData);
 
/* Wait for 50 ms. */
-   udelay(50 * 1000);
+   mdelay(50);
 
/* set 'BUSY' to start operation */
OUTL(MD_CA_BUSY | PHY_ADDRESS  MD_CA_PHY_SHF | MD_CA_WR |
@@ -393,11 +393,11 @@
(Error: lan_saa9730_mii_init: timeout\n);
return -1;
}
-   udelay(1000);   /* wait 1 ms. */
+   mdelay(1);  /* wait 1 ms. */
}
 
/* Wait for 1 ms. */
-   udelay(1000);
+   mdelay(1);
 
for (l = 0; l  2; l++) {
/* set PHY address = 'STATUS' */
@@ -415,11 +415,11 @@
(Error: lan_saa9730_mii_init: timeout\n);
return -1;
}
-   udelay(1000);   /* wait 1 ms. */
+   mdelay(1);  /* wait 1 ms. */
}
 
/* wait for 3 sec. */
-   udelay(3000 * 1000);
+   mdelay(3000);
 
/* check the link status */
if (INL(lp-lan_saa9730_regs-StationMgmtData) 
@@ -495,7 +495,7 @@
(Error: lan_sa9730_stop: MAC reset timeout\n);
return -1;
}
-   udelay(1000);   /* wait 1 ms. */
+   mdelay(1);  /* wait 1 ms. */
}
 
return 0;


-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied 

[PATCH] net #8

2001-05-29 Thread Andrzej Krzysztofowicz


The following patch fixes some bogus comments in /drivers/net/*.c

Andrzej

*** PATCH 8 *
diff -uNr linux-2.4.5-ac4/drivers/net/3c501.c linux/drivers/net/3c501.c
--- linux-2.4.5-ac4/drivers/net/3c501.c Wed May 30 01:09:52 2001
+++ linux/drivers/net/3c501.c   Wed May 30 01:15:20 2001
@@ -253,7 +253,7 @@
 }
 
 /**
- * el1_probe: 
+ * el1_probe1: 
  * @dev: The device structure to use
  * @ioaddr: An I/O address to probe at.
  *
diff -uNr linux-2.4.5-ac4/drivers/net/aironet4500_proc.c 
linux/drivers/net/aironet4500_proc.c
--- linux-2.4.5-ac4/drivers/net/aironet4500_proc.c  Tue May 29 20:46:26 2001
+++ linux/drivers/net/aironet4500_proc.cWed May 30 01:15:20 2001
@@ -1,5 +1,5 @@
 /*
- *  Aironet 4500 Pcmcia driver
+ *  Aironet 4500 /proc interface
  *
  * Elmer Joandi, Januar 1999
  * Copyright GPL
diff -uNr linux-2.4.5-ac4/drivers/net/bagetlance.c linux/drivers/net/bagetlance.c
--- linux-2.4.5-ac4/drivers/net/bagetlance.cWed May 30 01:08:54 2001
+++ linux/drivers/net/bagetlance.c  Wed May 30 01:15:20 2001
@@ -1,5 +1,5 @@
 /* $Id$
- * vmelance.c: Ethernet driver for VME Lance cards on Baget/MIPS
+ * bagetlance.c: Ethernet driver for VME Lance cards on Baget/MIPS
  *  This code stealed and adopted from linux/drivers/net/atarilance.c
  *  See that for author info
  *
diff -uNr linux-2.4.5-ac4/drivers/net/seeq8005.c linux/drivers/net/seeq8005.c
--- linux-2.4.5-ac4/drivers/net/seeq8005.c  Wed May 30 01:08:55 2001
+++ linux/drivers/net/seeq8005.cWed May 30 01:15:20 2001
@@ -101,8 +101,6 @@
 /* Check for a network adaptor of this type, and return '0' iff one exists.
If dev-base_addr == 0, probe all likely locations.
If dev-base_addr == 1, always return failure.
-   If dev-base_addr == 2, allocate space for the device and return success
-   (detachable devices only).
*/
 
 int __init 
diff -uNr linux-2.4.5-ac4/drivers/net/sk_g16.c linux/drivers/net/sk_g16.c
--- linux-2.4.5-ac4/drivers/net/sk_g16.cMon May 28 01:34:55 2001
+++ linux/drivers/net/sk_g16.c  Wed May 30 01:15:20 2001
@@ -536,8 +536,6 @@
  * Check for a network adaptor of this type, and return '0' if one exists.
  * If dev-base_addr == 0, probe all likely locations.
  * If dev-base_addr == 1, always return failure.
- * If dev-base_addr == 2, allocate space for the device and return success
- * (detachable devices only).
  */
 
 int __init SK_init(struct net_device *dev)
diff -uNr linux-2.4.5-ac4/drivers/net/winbond-840.c linux/drivers/net/winbond-840.c
--- linux-2.4.5-ac4/drivers/net/winbond-840.c   Wed May 30 01:08:56 2001
+++ linux/drivers/net/winbond-840.c Wed May 30 01:15:20 2001
@@ -1,4 +1,4 @@
-/* winbond-840.c: A Linux PCI network adapter skeleton device driver. */
+/* winbond-840.c: A Linux PCI network adapter device driver. */
 /*
Written 1998-2001 by Donald Becker.
 


-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] net #9

2001-05-29 Thread Andrzej Krzysztofowicz


The following patch removes some zero initializers from statics

Andrzej

 PATCH 9 *
diff -uNr linux-2.4.5-ac4/drivers/net/dmfe.c linux/drivers/net/dmfe.c
--- linux-2.4.5-ac4/drivers/net/dmfe.c  Wed May 30 01:08:54 2001
+++ linux/drivers/net/dmfe.cWed May 30 01:16:04 2001
@@ -261,20 +261,20 @@
 static char version[] __devinitdata =
KERN_INFO Davicom DM9xxx net driver, version  DMFE_VERSION \n;
 
-static int dmfe_debug = 0;
+static int dmfe_debug;
 static unsigned char dmfe_media_mode = DMFE_AUTO;
-static u32 dmfe_cr6_user_set = 0;
+static u32 dmfe_cr6_user_set;
 
 /* For module input parameter */
-static int debug = 0;
-static u32 cr6set = 0;
+static int debug;
+static u32 cr6set;
 static unsigned char mode = 8;
 static u8 chkmode = 1;
-static u8 HPNA_mode = 0;   /* Default: Low Power/High Speed */
-static u8 HPNA_rx_cmd = 0; /* Default: Disable Rx remote command */
-static u8 HPNA_tx_cmd = 0; /* Default: Don't issue remote command */
-static u8 HPNA_NoiseFloor = 0; /* Default: HPNA NoiseFloor */
-static u8 SF_mode = 0; /* Special Function: 1:VLAN, 2:RX Flow Control
+static u8 HPNA_mode;   /* Default: Low Power/High Speed */
+static u8 HPNA_rx_cmd; /* Default: Disable Rx remote command */
+static u8 HPNA_tx_cmd; /* Default: Don't issue remote command */
+static u8 HPNA_NoiseFloor; /* Default: HPNA NoiseFloor */
+static u8 SF_mode; /* Special Function: 1:VLAN, 2:RX Flow Control
   4: TX pause packet */
 
 unsigned long CrcTable[256] = {
diff -uNr linux-2.4.5-ac4/drivers/net/wavelan.p.h linux/drivers/net/wavelan.p.h
--- linux-2.4.5-ac4/drivers/net/wavelan.p.h Wed May 30 01:08:56 2001
+++ linux/drivers/net/wavelan.p.h   Wed May 30 01:16:05 2001
@@ -699,9 +699,9 @@
 
 #ifdef MODULE
 /* Parameters set by insmod */
-static int io[4]   = { 0, 0, 0, 0 };
-static int irq[4]  = { 0, 0, 0, 0 };
-static charname[4][IFNAMSIZ] = { , , ,  };
+static int io[4];
+static int irq[4];
+static charname[4][IFNAMSIZ];
 MODULE_PARM(io, 1-4i);
 MODULE_PARM(irq, 1-4i);
 MODULE_PARM(name, 1-4c __MODULE_STRING(IFNAMSIZ));


-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] net #1 (correction)

2001-05-29 Thread Andrzej Krzysztofowicz


Sorry, one fix against previous patch

Andrzej

--- drivers/net/wavelan.p.h~Wed May 30 02:43:16 2001
+++ drivers/net/wavelan.p.h Wed May 30 02:44:29 2001
@@ -705,9 +705,9 @@
 MODULE_PARM(io, 1-4i);
 MODULE_PARM(irq, 1-4i);
 MODULE_PARM(name, 1-4c __MODULE_STRING(IFNAMSIZ));
-MODULE_PARM(io, WaveLAN I/O base address(es),required);
-MODULE_PARM(irq, WaveLAN IRQ number(s));
-MODULE_PARM(name, WaveLAN interface neme(s));
+MODULE_PARM_DESC(io, WaveLAN I/O base address(es),required);
+MODULE_PARM_DESC(irq, WaveLAN IRQ number(s));
+MODULE_PARM_DESC(name, WaveLAN interface neme(s));
 #endif /* MODULE */
 
 #endif /* WAVELAN_P_H */

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] net #4

2001-05-29 Thread Andrzej Krzysztofowicz


The following patch fixes network drivers configuration in some points:

- make sb1000 dependent on CONFIG_ISAPNP. It compiles without CONFIG_ISAPNP,
  but will not work as the driver relies on ISA PnP board detection
- de620 does not support build-in configuration (dependency on m now).
  It compiles, but requires io/irq module parameters for board detection
  (even ether= is not supported by this driver)
- Aironet fixes:
  -- Aironet PnP requires CONFIG_ISAPNP (y or m) to work; of course, when
 CONFIG_ISAPNP=m CONFIG_AIRONET4500_NONCS also should be m, but
 this is not supported by CML1; to be fixed in CML2 or in another way
  -- Aironet I365 and ISA detection for built-in driver is not supported
 currently, so disable these options if CONFIG_AIRONET4500_NONCS=y

Andrzej

* PATCH 5 ***
diff -uNr linux-2.4.5-ac4/drivers/net/Config.in linux/drivers/net/Config.in
--- linux-2.4.5-ac4/drivers/net/Config.in   Mon May 28 01:34:54 2001
+++ linux/drivers/net/Config.in Wed May 30 01:11:56 2001
@@ -15,7 +15,7 @@
fi
 fi
 
-tristate 'General Instruments Surfboard 1000' CONFIG_NET_SB1000
+dep_tristate 'General Instruments Surfboard 1000' CONFIG_NET_SB1000 $CONFIG_ISAPNP
 
 #
 #  Ethernet
@@ -180,7 +180,7 @@
if [ $CONFIG_NET_POCKET = y ]; then
   dep_tristate 'AT-LAN-TEC/RealTek pocket adapter support' CONFIG_ATP 
$CONFIG_ISA
   tristate 'D-Link DE600 pocket adapter support' CONFIG_DE600
-  tristate 'D-Link DE620 pocket adapter support' CONFIG_DE620
+  dep_tristate 'D-Link DE620 pocket adapter support' CONFIG_DE620 m
fi
 fi
 
@@ -264,10 +264,14 @@
tristate '  Aironet 4500/4800 series adapters' CONFIG_AIRONET4500
dep_tristate '   Aironet 4500/4800 ISA/PCI/PNP/365 support ' 
CONFIG_AIRONET4500_NONCS $CONFIG_AIRONET4500
if [ $CONFIG_AIRONET4500 != n -a $CONFIG_AIRONET4500_NONCS != n ]; then
-  bool ' Aironet 4500/4800 PNP support ' CONFIG_AIRONET4500_PNP
+  if [ $CONFIG_AIRONET4500_NONCS = m -a $CONFIG_ISAPNP = m -o 
+$CONFIG_ISAPNP = y ]; then
+bool ' Aironet 4500/4800 PNP support ' CONFIG_AIRONET4500_PNP
+  fi
   dep_bool ' Aironet 4500/4800 PCI support ' CONFIG_AIRONET4500_PCI 
$CONFIG_PCI
-  dep_bool ' Aironet 4500/4800 ISA broken support (EXPERIMENTAL)' 
CONFIG_AIRONET4500_ISA $CONFIG_EXPERIMENTAL
-  dep_bool ' Aironet 4500/4800 I365 broken support (EXPERIMENTAL)' 
CONFIG_AIRONET4500_I365 $CONFIG_EXPERIMENTAL
+  if [ $CONFIG_AIRONET4500_NONCS = m ]; then
+dep_bool ' Aironet 4500/4800 ISA broken support (EXPERIMENTAL)' 
+CONFIG_AIRONET4500_ISA $CONFIG_EXPERIMENTAL
+dep_bool ' Aironet 4500/4800 I365 broken support (EXPERIMENTAL)' 
+CONFIG_AIRONET4500_I365 $CONFIG_EXPERIMENTAL
+  fi
fi
dep_tristate '   Aironet 4500/4800 PROC interface ' CONFIG_AIRONET4500_PROC 
$CONFIG_AIRONET4500 m
 


-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] net #6

2001-05-29 Thread Andrzej Krzysztofowicz


The following patch removes unnecessary #ifdefs from eexpress.c

Andrzej

** PATCH 6 ***
diff -uNr linux-2.4.5-ac4/drivers/net/eexpress.c linux/drivers/net/eexpress.c
--- linux-2.4.5-ac4/drivers/net/eexpress.c  Wed May 30 01:08:54 2001
+++ linux/drivers/net/eexpress.cWed May 30 01:13:49 2001
@@ -574,9 +574,7 @@
 static void eexp_timeout(struct net_device *dev)
 {
struct net_local *lp = (struct net_local *)dev-priv;
-#ifdef CONFIG_SMP
-   unsigned long flags;
-#endif
+   unsigned long __attribute__((unused)) flags;
int status;

disable_irq(dev-irq);
@@ -586,10 +584,7 @@
 *  lets make it work first..
 */
 
-#ifdef CONFIG_SMP
spin_lock_irqsave(lp-lock, flags);
-#endif
-
status = scb_status(dev);
unstick_cu(dev);
printk(KERN_INFO %s: transmit timed out, %s?\n, dev-name,
@@ -602,9 +597,7 @@
outb(0,dev-base_addr+SIGNAL_CA);
}
netif_wake_queue(dev);  
-#ifdef CONFIG_SMP
spin_unlock_irqrestore(lp-lock, flags);
-#endif
 }
 
 /*
@@ -614,9 +607,7 @@
 static int eexp_xmit(struct sk_buff *buf, struct net_device *dev)
 {
struct net_local *lp = (struct net_local *)dev-priv;
-#ifdef CONFIG_SMP
-   unsigned long flags;
-#endif
+   unsigned long __attribute__((unused)) flags;
 
 #if NET_DEBUG  6
printk(KERN_DEBUG %s: eexp_xmit()\n, dev-name);
@@ -629,10 +620,7 @@
 *  lets make it work first..
 */
 
-#ifdef CONFIG_SMP
spin_lock_irqsave(lp-lock, flags);
-#endif
-  
{
unsigned short length = (ETH_ZLEN  buf-len) ? buf-len :
ETH_ZLEN;
@@ -643,9 +631,7 @@
eexp_hw_tx_pio(dev,data,length);
}
dev_kfree_skb(buf);
-#ifdef CONFIG_SMP
spin_unlock_irqrestore(lp-lock, flags);
-#endif
enable_irq(dev-irq);
return 0;
 }


-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: vm in 2.4.5

2001-05-26 Thread Andrzej Krzysztofowicz

> On Sat, 26 May 2001, J . A . Magallon wrote:
> > It does not begin to use swap in a growing fashion, it just appears
> > full in a moment.
> 
> It gets _allocated_ in a moment, but things don't actually get
> swapped out. This isn't a problem.
> 
> The real problem is that we don't actively reclaim swap space
> when it gets full. We just assign swap to parts of processes,
> but we never reclaim it when we need swap space for something
> else; at least, not until the process exit()s or exec()s.

As I understand the original message, before the compilation and after the
system is in a "similar" state ("the same" processes should be running; even
less of them if some were killed by OOM).

:  total   used   free sharedbuffers cached
: -/+ buffers/cache:  49908 205780
: Swap:   152576  0 152576

~49 MB in use befere the test,

: -/+ buffers/cache:  14844 240844
: Swap:   152576 152576  0

~149 MB allocated swap. By processes of total size of 49 MB ? Strange...

Either the test shows some leak in running userspace processes (they
allocate a lot of memory) as an effect of memory shortage (strange) or there
is some leak in the kernel. Or the test is bad (something else is running
when it finishes).

Am I right ?

Andrzej

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



Re: [PATCH] __init -> __initdata in drivers/video/matrox/matroxfb_base.c (244ac16)

2001-05-26 Thread Andrzej Krzysztofowicz

> --- linux-244-ac11-clean/drivers/video/matrox/matroxfb_base.c Sat May 19 20:58:43 
>2001
> +++ linux-244-ac11/drivers/video/matrox/matroxfb_base.c   Sun May 20 23:55:24 
>2001
> @@ -2483,7 +2483,7 @@
>   return 0;
>  }
>  
> -static int __init initialized = 0;
> +static int __initdata initialized = 0;

It should be 

static int initialized __initdata = 0;

Andrzej

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



Re: [PATCH] __init - __initdata in drivers/video/matrox/matroxfb_base.c (244ac16)

2001-05-26 Thread Andrzej Krzysztofowicz

 --- linux-244-ac11-clean/drivers/video/matrox/matroxfb_base.c Sat May 19 20:58:43 
2001
 +++ linux-244-ac11/drivers/video/matrox/matroxfb_base.c   Sun May 20 23:55:24 
2001
 @@ -2483,7 +2483,7 @@
   return 0;
  }
  
 -static int __init initialized = 0;
 +static int __initdata initialized = 0;

It should be 

static int initialized __initdata = 0;

Andrzej

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: vm in 2.4.5

2001-05-26 Thread Andrzej Krzysztofowicz

 On Sat, 26 May 2001, J . A . Magallon wrote:
  It does not begin to use swap in a growing fashion, it just appears
  full in a moment.
 
 It gets _allocated_ in a moment, but things don't actually get
 swapped out. This isn't a problem.
 
 The real problem is that we don't actively reclaim swap space
 when it gets full. We just assign swap to parts of processes,
 but we never reclaim it when we need swap space for something
 else; at least, not until the process exit()s or exec()s.

As I understand the original message, before the compilation and after the
system is in a similar state (the same processes should be running; even
less of them if some were killed by OOM).

:  total   used   free sharedbuffers cached
: -/+ buffers/cache:  49908 205780
: Swap:   152576  0 152576

~49 MB in use befere the test,

: -/+ buffers/cache:  14844 240844
: Swap:   152576 152576  0

~149 MB allocated swap. By processes of total size of 49 MB ? Strange...

Either the test shows some leak in running userspace processes (they
allocate a lot of memory) as an effect of memory shortage (strange) or there
is some leak in the kernel. Or the test is bad (something else is running
when it finishes).

Am I right ?

Andrzej

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [PATCH] drivers/net/others

2001-05-24 Thread Andrzej Krzysztofowicz

> Thanks for your impressive clean-up patch.  I have a couple of comments
> regarding your clean-up of the dmfe.c driver.

Thanks for your response.
 
> On Thu, 24 May 2001, Andrzej Krzysztofowicz wrote:
> 
> > @@ -395,7 +395,7 @@
> > u32 dev_rev, pci_pmr;
> >
> > if (!printed_version++)
> > -   printk(version);
> > +   printk("%s", version);
> >
> > DMFE_DBUG(0, "dmfe_init_one()", 0);
> >
> 
> Could you please explain the purpose of this change?  To me it looks less
> efficient in both performance and memory usage.

Basically I also preferred to avoid the extra string here. But Alan suggests
it may cause problems while somebody wants to add a literal % to the version
string. Moreover, IMHO it is better to have a standard here, i.e. either all
drivers contain the format or none does.

If you still complain, I'll drop this change.

> > @@ -2024,8 +2027,10 @@
> >  {
> > int rc;
> >
> > -   printk(version);
> > +#ifdef MODULE
> > +   printk("s", version);
> > printed_version = 1;
> > +#endif /* MODULE */
> >
> > DMFE_DBUG(0, "init_module() ", debug);
> >
> 
> Whoups...  And why did you add the ifdef, btw?

AFAIK module_init becomes __initcall while compiled into kernel. So it is
called (IMO) always and the previous "version" printing (around line 400)
would never be executed (printed_version == 1). 
And we do not want to print version for built-in drivers which do not detect
hardware, do we ?

Andrzej

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  tel.  (0-58) 347 14 61
Wydz.Fizyki Technicznej i Matematyki Stosowanej Politechniki Gdanskiej
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [PATCH] drivers/net/others

2001-05-24 Thread Andrzej Krzysztofowicz

 Thanks for your impressive clean-up patch.  I have a couple of comments
 regarding your clean-up of the dmfe.c driver.

Thanks for your response.
 
 On Thu, 24 May 2001, Andrzej Krzysztofowicz wrote:
 
  @@ -395,7 +395,7 @@
  u32 dev_rev, pci_pmr;
 
  if (!printed_version++)
  -   printk(version);
  +   printk(%s, version);
 
  DMFE_DBUG(0, dmfe_init_one(), 0);
 
 
 Could you please explain the purpose of this change?  To me it looks less
 efficient in both performance and memory usage.

Basically I also preferred to avoid the extra string here. But Alan suggests
it may cause problems while somebody wants to add a literal % to the version
string. Moreover, IMHO it is better to have a standard here, i.e. either all
drivers contain the format or none does.

If you still complain, I'll drop this change.

  @@ -2024,8 +2027,10 @@
   {
  int rc;
 
  -   printk(version);
  +#ifdef MODULE
  +   printk(s, version);
  printed_version = 1;
  +#endif /* MODULE */
 
  DMFE_DBUG(0, init_module() , debug);
 
 
 Whoups...  And why did you add the ifdef, btw?

AFAIK module_init becomes __initcall while compiled into kernel. So it is
called (IMO) always and the previous version printing (around line 400)
would never be executed (printed_version == 1). 
And we do not want to print version for built-in drivers which do not detect
hardware, do we ?

Andrzej

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  tel.  (0-58) 347 14 61
Wydz.Fizyki Technicznej i Matematyki Stosowanej Politechniki Gdanskiej
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] drivers/net/others

2001-05-23 Thread Andrzej Krzysztofowicz
original code
 */
 
-void *slow_memcpy( void *dst, const void *src, size_t len )
+static void *slow_memcpy( void *dst, const void *src, size_t len )
 
 {  
unsigned long to = (unsigned long)dst;
@@ -709,8 +711,10 @@
else
*RIEBL_IVEC_ADDR = IRQ_SOURCE_TO_VECTOR(dev->irq);
 
+#ifndef MODULE
if (did_version++ == 0)
-   DPRINTK( 1, ( version ));
+   DPRINTK( 0, ( "%s", version ));
+#endif /* MODULE */
 
/* The LANCE-specific entries in the device structure. */
dev->open = _open;
@@ -1332,6 +1336,7 @@
 
 {  int err;
 
+   DPRINTK( 0, ( "%s", version ));
bagetlance_dev.init = bagetlance_probe;
if ((err = register_netdev( _dev ))) {
if (err == -EIO)  {
diff -uNr linux-2.4.4-ac15/drivers/net/bmac.c linux/drivers/net/bmac.c
--- linux-2.4.4-ac15/drivers/net/bmac.c Sat May 19 19:02:23 2001
+++ linux/drivers/net/bmac.cThu May 24 02:22:32 2001
@@ -564,7 +564,7 @@
 }
 
 /* Bit-reverse one byte of an ethernet hardware address. */
-static unsigned char
+static unsigned char __init
 bitrev(unsigned char b)
 {
int d = 0, i;
@@ -1107,7 +1107,7 @@
 #define SROMAddressBits6
 #define EnetAddressOffset  20
 
-static unsigned char
+static unsigned char __init
 bmac_clock_out_bit(struct net_device *dev)
 {
unsigned short data;
@@ -1126,7 +1126,7 @@
return val;
 }
 
-static void
+static void __init
 bmac_clock_in_bit(struct net_device *dev, unsigned int val)
 {
unsigned short data;
@@ -1144,7 +1144,7 @@
udelay(DelayValue);
 }
 
-static void
+static void __init
 reset_and_select_srom(struct net_device *dev)
 {
/* first reset */
@@ -1157,7 +1157,7 @@
bmac_clock_in_bit(dev, 0);
 }
 
-static unsigned short
+static unsigned short __init
 read_srom(struct net_device *dev, unsigned int addr, unsigned int addr_len)
 {
unsigned short data, val;
@@ -1186,7 +1186,7 @@
  * checksums. What a pain..
  */
 
-static int
+static int __init
 bmac_verify_checksum(struct net_device *dev)
 {
unsigned short data, storedCS;
@@ -1199,7 +1199,7 @@
 }
 
 
-static void
+static void __init
 bmac_get_station_address(struct net_device *dev, unsigned char *ea)
 {
int i;
diff -uNr linux-2.4.4-ac15/drivers/net/cs89x0.c linux/drivers/net/cs89x0.c
--- linux-2.4.4-ac15/drivers/net/cs89x0.c   Sat May 19 18:35:44 2001
+++ linux/drivers/net/cs89x0.c  Thu May 24 02:22:32 2001
@@ -81,6 +81,14 @@
 : Make `version[]' __initdata
 : Uninlined the read/write reg/word functions.
 
+  Andrzej Krzysztofowicz
+: Kernel 2.4.5-pre5
+: Added MOD_DESC_PARM
+: Added KERN_INFO marker to version[]
+: Print version: 
+:   - always for module
+:   - when a device detected for built-in
+
 */
 
 /* Always include 'config.h' first in case the user wants to turn on
@@ -139,7 +147,7 @@
 #include "cs89x0.h"
 
 static char version[] __initdata =
-"cs89x0.c: v2.4.3-pre1 Russell Nelson <[EMAIL PROTECTED]>, Andrew Morton 
<[EMAIL PROTECTED]>\n";
+KERN_INFO "cs89x0.c: v2.4.5-ac16 Russell Nelson <[EMAIL PROTECTED]>, Andrew Morton 
+<[EMAIL PROTECTED]>\n";
 
 /* First, a few definitions that the brave might change.
A zero-terminated list of I/O addresses to be probed. Some special flags..
@@ -436,8 +444,10 @@
if (lp->chip_type != CS8900 && lp->chip_revision >= 'C')
lp->send_cmd = TX_NOW;
 
-   if (net_debug  &&  version_printed++ == 0)
-   printk(version);
+#ifndef MODULE
+   if (version_printed++ == 0)
+   printk("%s", version);
+#endif /* MODULE */
 
printk(KERN_INFO "%s: cs89%c0%s rev %c found at %#3lx ",
   dev->name,
@@ -1607,6 +1617,25 @@
 MODULE_PARM(dma , "i");
 MODULE_PARM(dmasize , "i");
 MODULE_PARM(use_dma , "i");
+MODULE_PARM_DESC(io, "cs89x0 I/O base address");
+MODULE_PARM_DESC(irq, "cs89x0 IRQ number");
+#if DEBUGGING
+MODULE_PARM_DESC(debug, "cs89x0 debug level (0-6)");
+#else
+MODULE_PARM_DESC(debug, "(ignored)");
+#endif
+MODULE_PARM_DESC(media, "Set cs89x0 adapter(s) media type(s) (rj45,bnc,aui)");
+/* No other value than -1 for duplex seem to be currently interpreted */
+MODULE_PARM_DESC(duplex, "(ignored)");
+#if ALLOW_DMA
+MODULE_PARM_DESC(dma , "cs89x0 ISA DMA channel; ignored if use_dma=0");
+MODULE_PARM_DESC(dmasize , "cs89x0 DMA size in kB (16,64); ignored if use_dma=0");
+MODULE_PARM_DESC(use_dma , "cs89x0 using DMA (0-1)");
+#else
+MODULE_PARM_DESC(dma , "(ignored)");
+MODULE_PARM_DESC(dmasize , "(ignored)");
+MODULE_PARM_DESC(use_dma , "(i

[PATCH] for drivers/net/3com -ac15

2001-05-23 Thread Andrzej Krzysztofowicz

>From kufel!ankry  Thu May 24 02:57:39 2001
Return-Path: 
Received: from kufel.UUCP (uucp@localhost)
by green.mif.pg.gda.pl (8.9.3/8.9.3) with UUCP id CAA27068
for green.mif.pg.gda.pl!ankry; Thu, 24 May 2001 02:57:39 +0200
Received: (from ankry@localhost)
by kufel.dom (8.9.3/8.9.3) id DAA02169
for ankry@green; Thu, 24 May 2001 03:03:30 +0200
Date: Thu, 24 May 2001 03:03:30 +0200
From: Andrzej Krzysztofowicz 
Message-Id: <[EMAIL PROTECTED]>
To: kufel!green.mif.pg.gda.pl!ankry
Subject: 3com

Hi,
  This version of 3Com network drivers patch contains suggested fixes:

- module version printing moved to init_module() where possible
- fixed wrong description of "full_duplex" parameter
- restored formating strings in version printing for people who need
  literal % in the version strings and ignore warnings ...

Andrzej

***
diff -uNr linux-2.4.4-ac15/drivers/net/3c501.c linux/drivers/net/3c501.c
--- linux-2.4.4-ac15/drivers/net/3c501.cSat May 19 19:00:45 2001
+++ linux/drivers/net/3c501.c   Thu May 24 02:22:31 2001
@@ -251,7 +251,7 @@
 }
 
 /**
- * el1_probe: 
+ * el1_probe1: 
  * @dev: The device structure to use
  * @ioaddr: An I/O address to probe at.
  *
@@ -270,6 +270,7 @@
unsigned char station_addr[6];
int autoirq = 0;
int i;
+   static int printed_version;
 
/*
 *  Reserve I/O resource for exclusive use by this driver
@@ -340,15 +341,17 @@
if (autoirq)
dev->irq = autoirq;
 
+#ifndef MODULE
+   if (!printed_version++)
+   printk("%s", version);
+#endif /* MODULE */
+
printk(KERN_INFO "%s: %s EtherLink at %#lx, using %sIRQ %d.\n", dev->name, 
mname, dev->base_addr,
autoirq ? "auto":"assigned ", dev->irq);
 
 #ifdef CONFIG_IP_MULTICAST
printk(KERN_WARNING "WARNING: Use of the 3c501 in a multicast kernel is NOT 
recommended.\n");
-#endif
-
-   if (el_debug)
-   printk(version);
+#endif /* CONFIG_IP_MULTICAST */
 
/*
 *  Initialize the device structure.
@@ -925,6 +928,8 @@
 static int irq=5;
 MODULE_PARM(io, "i");
 MODULE_PARM(irq, "i");
+MODULE_PARM_DESC(io, "EtherLink I/O base address");
+MODULE_PARM_DESC(irq, "EtherLink IRQ number");
 
 /**
  * init_module:
@@ -940,6 +945,7 @@
  
 int init_module(void)
 {
+   printk("%s", version);
dev_3c501.irq=irq;
dev_3c501.base_addr=io;
if (register_netdev(_3c501) != 0)
diff -uNr linux-2.4.4-ac15/drivers/net/3c503.c linux/drivers/net/3c503.c
--- linux-2.4.4-ac15/drivers/net/3c503.cSat May 19 19:00:45 2001
+++ linux/drivers/net/3c503.c   Thu May 24 02:22:31 2001
@@ -149,7 +149,7 @@
 
 /* Reset and/or avoid any lurking NE2000 */
 if (inb(ioaddr + 0x408) == 0xff) {
-   mdelay(1);
+   mdelay(1);
retval = -ENODEV;
goto out;
 }
@@ -178,8 +178,10 @@
goto out;
 }
 
-if (ei_debug  &&  version_printed++ == 0)
-   printk(version);
+#ifndef MODULE
+if (version_printed++ == 0)
+   printk("%s", version);
+#endif /* MODULE */
 
 dev->base_addr = ioaddr;
 /* Allocate dev->priv and fill in 8390 specific dev fields. */
@@ -615,6 +617,9 @@
 MODULE_PARM(io, "1-" __MODULE_STRING(MAX_EL2_CARDS) "i");
 MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_EL2_CARDS) "i");
 MODULE_PARM(xcvr, "1-" __MODULE_STRING(MAX_EL2_CARDS) "i");
+MODULE_PARM_DESC(io, "EtherLink II I/O base address(es)");
+MODULE_PARM_DESC(irq, "EtherLink II IRQ number(s) (assigned)");
+MODULE_PARM_DESC(xcvr, "EtherLink II tranceiver(s) (0=internal, 1=external)");
 
 /* This is set up so that only a single autoprobe takes place per call.
 ISA device autoprobes on a running machine are not recommended. */
@@ -623,6 +628,7 @@
 {
int this_dev, found = 0;
 
+   printk("%s", version);
for (this_dev = 0; this_dev < MAX_EL2_CARDS; this_dev++) {
struct net_device *dev = _el2[this_dev];
dev->irq = irq[this_dev];
diff -uNr linux-2.4.4-ac15/drivers/net/3c505.c linux/drivers/net/3c505.c
--- linux-2.4.4-ac15/drivers/net/3c505.cSat May 19 18:35:42 2001
+++ linux/drivers/net/3c505.c   Thu May 24 02:22:31 2001
@@ -1621,6 +1621,9 @@
 MODULE_PARM(io, "1-" __MODULE_STRING(ELP_MAX_CARDS) "i");
 MODULE_PARM(irq, "1-" __MODULE_STRING(ELP_MAX_CARDS) "i");
 MODULE_PARM(dma, "1-" __MODULE_STRING(ELP_MAX_CARDS) "i");
+MODULE_PARM_DESC(io, "EtherLink Plus I/O base address(es)");
+MODULE_PARM_DESC(irq, "EtherLink Plus IRQ number(s) (assigned)");
+MODULE_PARM_DESC(dma, &quo

Re: [timer] max timeout

2001-05-23 Thread Andrzej Krzysztofowicz

"sebastien person wrote:"
> Is it bad to do the following call ?
> 
>   mod_timer(, jiffies+(0.1*HZ));

Yes, it is bad. Don't use floating point in the kernel if you don't need.

> that might fire the timer 1/10 second later.

HZ/10 is much better ...

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [timer] max timeout

2001-05-23 Thread Andrzej Krzysztofowicz

sebastien person wrote:
 Is it bad to do the following call ?
 
   mod_timer(timer, jiffies+(0.1*HZ));

Yes, it is bad. Don't use floating point in the kernel if you don't need.

 that might fire the timer 1/10 second later.

HZ/10 is much better ...

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] for drivers/net/3com -ac15

2001-05-23 Thread Andrzej Krzysztofowicz

From kufel!ankry  Thu May 24 02:57:39 2001
Return-Path: kufel!ankry
Received: from kufel.UUCP (uucp@localhost)
by green.mif.pg.gda.pl (8.9.3/8.9.3) with UUCP id CAA27068
for green.mif.pg.gda.pl!ankry; Thu, 24 May 2001 02:57:39 +0200
Received: (from ankry@localhost)
by kufel.dom (8.9.3/8.9.3) id DAA02169
for ankry@green; Thu, 24 May 2001 03:03:30 +0200
Date: Thu, 24 May 2001 03:03:30 +0200
From: Andrzej Krzysztofowicz kufel!ankry
Message-Id: [EMAIL PROTECTED]
To: kufel!green.mif.pg.gda.pl!ankry
Subject: 3com

Hi,
  This version of 3Com network drivers patch contains suggested fixes:

- module version printing moved to init_module() where possible
- fixed wrong description of full_duplex parameter
- restored formating strings in version printing for people who need
  literal % in the version strings and ignore warnings ...

Andrzej

***
diff -uNr linux-2.4.4-ac15/drivers/net/3c501.c linux/drivers/net/3c501.c
--- linux-2.4.4-ac15/drivers/net/3c501.cSat May 19 19:00:45 2001
+++ linux/drivers/net/3c501.c   Thu May 24 02:22:31 2001
@@ -251,7 +251,7 @@
 }
 
 /**
- * el1_probe: 
+ * el1_probe1: 
  * @dev: The device structure to use
  * @ioaddr: An I/O address to probe at.
  *
@@ -270,6 +270,7 @@
unsigned char station_addr[6];
int autoirq = 0;
int i;
+   static int printed_version;
 
/*
 *  Reserve I/O resource for exclusive use by this driver
@@ -340,15 +341,17 @@
if (autoirq)
dev-irq = autoirq;
 
+#ifndef MODULE
+   if (!printed_version++)
+   printk(%s, version);
+#endif /* MODULE */
+
printk(KERN_INFO %s: %s EtherLink at %#lx, using %sIRQ %d.\n, dev-name, 
mname, dev-base_addr,
autoirq ? auto:assigned , dev-irq);
 
 #ifdef CONFIG_IP_MULTICAST
printk(KERN_WARNING WARNING: Use of the 3c501 in a multicast kernel is NOT 
recommended.\n);
-#endif
-
-   if (el_debug)
-   printk(version);
+#endif /* CONFIG_IP_MULTICAST */
 
/*
 *  Initialize the device structure.
@@ -925,6 +928,8 @@
 static int irq=5;
 MODULE_PARM(io, i);
 MODULE_PARM(irq, i);
+MODULE_PARM_DESC(io, EtherLink I/O base address);
+MODULE_PARM_DESC(irq, EtherLink IRQ number);
 
 /**
  * init_module:
@@ -940,6 +945,7 @@
  
 int init_module(void)
 {
+   printk(%s, version);
dev_3c501.irq=irq;
dev_3c501.base_addr=io;
if (register_netdev(dev_3c501) != 0)
diff -uNr linux-2.4.4-ac15/drivers/net/3c503.c linux/drivers/net/3c503.c
--- linux-2.4.4-ac15/drivers/net/3c503.cSat May 19 19:00:45 2001
+++ linux/drivers/net/3c503.c   Thu May 24 02:22:31 2001
@@ -149,7 +149,7 @@
 
 /* Reset and/or avoid any lurking NE2000 */
 if (inb(ioaddr + 0x408) == 0xff) {
-   mdelay(1);
+   mdelay(1);
retval = -ENODEV;
goto out;
 }
@@ -178,8 +178,10 @@
goto out;
 }
 
-if (ei_debugversion_printed++ == 0)
-   printk(version);
+#ifndef MODULE
+if (version_printed++ == 0)
+   printk(%s, version);
+#endif /* MODULE */
 
 dev-base_addr = ioaddr;
 /* Allocate dev-priv and fill in 8390 specific dev fields. */
@@ -615,6 +617,9 @@
 MODULE_PARM(io, 1- __MODULE_STRING(MAX_EL2_CARDS) i);
 MODULE_PARM(irq, 1- __MODULE_STRING(MAX_EL2_CARDS) i);
 MODULE_PARM(xcvr, 1- __MODULE_STRING(MAX_EL2_CARDS) i);
+MODULE_PARM_DESC(io, EtherLink II I/O base address(es));
+MODULE_PARM_DESC(irq, EtherLink II IRQ number(s) (assigned));
+MODULE_PARM_DESC(xcvr, EtherLink II tranceiver(s) (0=internal, 1=external));
 
 /* This is set up so that only a single autoprobe takes place per call.
 ISA device autoprobes on a running machine are not recommended. */
@@ -623,6 +628,7 @@
 {
int this_dev, found = 0;
 
+   printk(%s, version);
for (this_dev = 0; this_dev  MAX_EL2_CARDS; this_dev++) {
struct net_device *dev = dev_el2[this_dev];
dev-irq = irq[this_dev];
diff -uNr linux-2.4.4-ac15/drivers/net/3c505.c linux/drivers/net/3c505.c
--- linux-2.4.4-ac15/drivers/net/3c505.cSat May 19 18:35:42 2001
+++ linux/drivers/net/3c505.c   Thu May 24 02:22:31 2001
@@ -1621,6 +1621,9 @@
 MODULE_PARM(io, 1- __MODULE_STRING(ELP_MAX_CARDS) i);
 MODULE_PARM(irq, 1- __MODULE_STRING(ELP_MAX_CARDS) i);
 MODULE_PARM(dma, 1- __MODULE_STRING(ELP_MAX_CARDS) i);
+MODULE_PARM_DESC(io, EtherLink Plus I/O base address(es));
+MODULE_PARM_DESC(irq, EtherLink Plus IRQ number(s) (assigned));
+MODULE_PARM_DESC(dma, EtherLink Plus DMA channel(s));
 
 int init_module(void)
 {
diff -uNr linux-2.4.4-ac15/drivers/net/3c507.c linux/drivers/net/3c507.c
--- linux-2.4.4-ac15/drivers/net/3c507.cSat May 19 19:00:45 2001
+++ linux/drivers/net/3c507.c   Thu May 24 02:22:31 2001
@@ -348,8 +348,10 @@
goto out;
}
 
-   if (net_debugversion_printed++ == 0)
-   printk

[PATCH] drivers/net/others

2001-05-23 Thread Andrzej Krzysztofowicz
, version);
+#endif /* MODULE */
 
printk(KERN_NOTICE %s: Pocket adapter found at %#3lx, IRQ %d, SAPROM 
   %02X:%02X:%02X:%02X:%02X:%02X.\n, dev-name, dev-base_addr,
@@ -928,8 +932,9 @@
 }
 
 static int __init atp_init_module(void) {
-   if (debug)  /* Emit version even if no 
cards detected. */
-   printk(KERN_INFO %s KERN_INFO %s, versionA, versionB);
+#ifdef MODULE
+   printk(%s, version);
+#endif /* MODULE */
return atp_init(NULL);
 }
 
diff -uNr linux-2.4.4-ac15/drivers/net/bagetlance.c linux/drivers/net/bagetlance.c
--- linux-2.4.4-ac15/drivers/net/bagetlance.c   Sat May 19 18:35:44 2001
+++ linux/drivers/net/bagetlance.c  Thu May 24 02:22:31 2001
@@ -1,5 +1,5 @@
 /* $Id$
- * vmelance.c: Ethernet driver for VME Lance cards on Baget/MIPS
+ * bagetlance.c: Ethernet driver for VME Lance cards on Baget/MIPS
  *  This code stealed and adopted from linux/drivers/net/atarilance.c
  *  See that for author info
  *
@@ -12,8 +12,6 @@
  * related with 16BIT-only access to A24 space.
  */
 
-static char *version = bagetlance.c: v1.1 11/10/98\n;
-
 #include linux/module.h
 
 #include linux/stddef.h
@@ -36,6 +34,9 @@
 
 #include asm/baget/baget.h
 
+static char version[] __initdata =
+   KERN_INFO bagetlance.c: v1.1 11/10/98\n;
+
 #define BAGET_LANCE_IRQ  BAGET_IRQ_MASK(0xdf)
 
 /*
@@ -59,6 +60,7 @@
 static int lance_debug = 1;
 #endif
 MODULE_PARM(lance_debug, i);
+MODULE_PARM_DESC(lance_debug, Lance debug level (0-3));
 
 /* Print debug messages on probing? */
 #undef LANCE_DEBUG_PROBE
@@ -182,7 +184,7 @@
  * prefix for Riebl cards, the 00:00 at the end is arbitrary.
  */
 
-static unsigned char OldRieblDefHwaddr[6] = {
+static unsigned char OldRieblDefHwaddr[6] __initdata = {
0x00, 0x00, 0x36, 0x04, 0x00, 0x00
 };
 
@@ -207,7 +209,7 @@
PAM_CARD/* PAM card with EEPROM */
 };
 
-static char *lance_names[] = {
+static char *lance_names[] __initdata = {
Riebl-Card (without battery),
Riebl-Card (with battery),
PAM intern card
@@ -357,7 +359,7 @@
Don't confuse with function name -- it stays from original code
 */
 
-void *slow_memcpy( void *dst, const void *src, size_t len )
+static void *slow_memcpy( void *dst, const void *src, size_t len )
 
 {  
unsigned long to = (unsigned long)dst;
@@ -709,8 +711,10 @@
else
*RIEBL_IVEC_ADDR = IRQ_SOURCE_TO_VECTOR(dev-irq);
 
+#ifndef MODULE
if (did_version++ == 0)
-   DPRINTK( 1, ( version ));
+   DPRINTK( 0, ( %s, version ));
+#endif /* MODULE */
 
/* The LANCE-specific entries in the device structure. */
dev-open = lance_open;
@@ -1332,6 +1336,7 @@
 
 {  int err;
 
+   DPRINTK( 0, ( %s, version ));
bagetlance_dev.init = bagetlance_probe;
if ((err = register_netdev( bagetlance_dev ))) {
if (err == -EIO)  {
diff -uNr linux-2.4.4-ac15/drivers/net/bmac.c linux/drivers/net/bmac.c
--- linux-2.4.4-ac15/drivers/net/bmac.c Sat May 19 19:02:23 2001
+++ linux/drivers/net/bmac.cThu May 24 02:22:32 2001
@@ -564,7 +564,7 @@
 }
 
 /* Bit-reverse one byte of an ethernet hardware address. */
-static unsigned char
+static unsigned char __init
 bitrev(unsigned char b)
 {
int d = 0, i;
@@ -1107,7 +1107,7 @@
 #define SROMAddressBits6
 #define EnetAddressOffset  20
 
-static unsigned char
+static unsigned char __init
 bmac_clock_out_bit(struct net_device *dev)
 {
unsigned short data;
@@ -1126,7 +1126,7 @@
return val;
 }
 
-static void
+static void __init
 bmac_clock_in_bit(struct net_device *dev, unsigned int val)
 {
unsigned short data;
@@ -1144,7 +1144,7 @@
udelay(DelayValue);
 }
 
-static void
+static void __init
 reset_and_select_srom(struct net_device *dev)
 {
/* first reset */
@@ -1157,7 +1157,7 @@
bmac_clock_in_bit(dev, 0);
 }
 
-static unsigned short
+static unsigned short __init
 read_srom(struct net_device *dev, unsigned int addr, unsigned int addr_len)
 {
unsigned short data, val;
@@ -1186,7 +1186,7 @@
  * checksums. What a pain..
  */
 
-static int
+static int __init
 bmac_verify_checksum(struct net_device *dev)
 {
unsigned short data, storedCS;
@@ -1199,7 +1199,7 @@
 }
 
 
-static void
+static void __init
 bmac_get_station_address(struct net_device *dev, unsigned char *ea)
 {
int i;
diff -uNr linux-2.4.4-ac15/drivers/net/cs89x0.c linux/drivers/net/cs89x0.c
--- linux-2.4.4-ac15/drivers/net/cs89x0.c   Sat May 19 18:35:44 2001
+++ linux/drivers/net/cs89x0.c  Thu May 24 02:22:32 2001
@@ -81,6 +81,14 @@
 : Make `version[]' __initdata
 : Uninlined the read/write reg/word functions.
 
+  Andrzej Krzysztofowicz
+: Kernel 2.4.5-pre5
+: Added MOD_DESC_PARM
+: Added KERN_INFO marker to version

[PATCH] CONFIG_PROC_FS=n fixes

2001-05-21 Thread Andrzej Krzysztofowicz

Hi,
   The following patch fixes compilation problems of
- zoran (drivers/media/video/zr36067.c) 
- Compaq SMART2 disk array (drivers/block/cpqarray.c)

and possibly some others, when CONFIG_PROC_FS=n

Andrzej

***
diff -ur linux-2.4.4-ac11/drivers/media/video/zoran.h linux/drivers/media/video/zoran.h
--- linux-2.4.4-ac11/drivers/media/video/zoran.hMon May 21 12:57:46 2001
+++ linux/drivers/media/video/zoran.h   Mon May 21 14:14:16 2001
@@ -305,11 +305,8 @@
struct zoran_gbuffer jpg_gbuf[BUZ_MAX_FRAME];   /* MJPEG buffers' info */
 
/* Additional stuff for testing */
-#ifdef CONFIG_PROC_FS
-
struct proc_dir_entry *zoran_proc;
 
-#endif
int testing;
int jpeg_error;
int intr_counter_GIRQ1;
diff -ur linux-2.4.4-ac11/include/linux/proc_fs.h linux/include/linux/proc_fs.h
--- linux-2.4.4-ac11/include/linux/proc_fs.hMon May 21 12:03:41 2001
+++ linux/include/linux/proc_fs.h   Mon May 21 12:03:22 2001
@@ -171,6 +171,8 @@
 
 #else
 
+#define proc_root_driver NULL
+
 static inline struct proc_dir_entry *proc_net_create(const char *name, mode_t mode, 
get_info_t *get_info) {return NULL;}
 static inline void proc_net_remove(const char *name) {}
 
-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] CONFIG_PROC_FS=n fixes

2001-05-21 Thread Andrzej Krzysztofowicz

Hi,
   The following patch fixes compilation problems of
- zoran (drivers/media/video/zr36067.c) 
- Compaq SMART2 disk array (drivers/block/cpqarray.c)

and possibly some others, when CONFIG_PROC_FS=n

Andrzej

***
diff -ur linux-2.4.4-ac11/drivers/media/video/zoran.h linux/drivers/media/video/zoran.h
--- linux-2.4.4-ac11/drivers/media/video/zoran.hMon May 21 12:57:46 2001
+++ linux/drivers/media/video/zoran.h   Mon May 21 14:14:16 2001
@@ -305,11 +305,8 @@
struct zoran_gbuffer jpg_gbuf[BUZ_MAX_FRAME];   /* MJPEG buffers' info */
 
/* Additional stuff for testing */
-#ifdef CONFIG_PROC_FS
-
struct proc_dir_entry *zoran_proc;
 
-#endif
int testing;
int jpeg_error;
int intr_counter_GIRQ1;
diff -ur linux-2.4.4-ac11/include/linux/proc_fs.h linux/include/linux/proc_fs.h
--- linux-2.4.4-ac11/include/linux/proc_fs.hMon May 21 12:03:41 2001
+++ linux/include/linux/proc_fs.h   Mon May 21 12:03:22 2001
@@ -171,6 +171,8 @@
 
 #else
 
+#define proc_root_driver NULL
+
 static inline struct proc_dir_entry *proc_net_create(const char *name, mode_t mode, 
get_info_t *get_info) {return NULL;}
 static inline void proc_net_remove(const char *name) {}
 
-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] ppc xconfig 2.2.5-pre4

2001-05-20 Thread Andrzej Krzysztofowicz

Hi,

The following patch fixes ppc xconfig potential problem introduced in
2.4.5-pre4.

Andrzej

***
diff -uNr linux-2.4.5-pre4/arch/ppc/config.in linux-pre4/arch/ppc/config.in
--- linux-2.4.5-pre4/arch/ppc/config.in Mon May 21 03:17:02 2001
+++ linux-pre4/arch/ppc/config.in   Mon May 21 03:22:51 2001
@@ -135,7 +135,8 @@
  define_bool CONFIG_PCI $CONFIG_PCI_QSPAN
   else
  if [ "$CONFIG_APUS" = "y" ]; then
-   bool 'PCI for Permedia2' CONFIG_PCI
+   bool 'PCI for Permedia2' CONFIG_PCI_PERMEDIA
+   define_bool CONFIG_PCI $CONFIG_PCI_PERMEDIA
  else
define_bool CONFIG_PCI y
  fi

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [PATCH] 2.4.4-ac11 network drivers cleaning

2001-05-20 Thread Andrzej Krzysztofowicz

> 
> On Sat, 19 May 2001 17:58:49 -0400, 
> Jeff Garzik <[EMAIL PROTECTED]> wrote:
> >Finally, I don't know if I mentioned this earlier, but to be complete
> >and optimal, version strings should be a single variable 'version', such
> >that it can be passed directly to printk like
> >
> > printk(version);
> 
> Nit pick.  That has random side effects if version contains any '%'
> characters.  Make it

It should not. I see no reason for a literal % in the version string.

> 
>   printk("%s\n", version);
> 
> Not quite as optimal but safer.

It is simpler to remove the %s from version. I don't think any of them
require it. If one add a % he should know what he is doing.

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  tel.  (0-58) 347 14 61
Wydz.Fizyki Technicznej i Matematyki Stosowanej Politechniki Gdanskiej
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [PATCH] 2.4.4-ac11 network drivers cleaning

2001-05-20 Thread Andrzej Krzysztofowicz

 
 On Sat, 19 May 2001 17:58:49 -0400, 
 Jeff Garzik [EMAIL PROTECTED] wrote:
 Finally, I don't know if I mentioned this earlier, but to be complete
 and optimal, version strings should be a single variable 'version', such
 that it can be passed directly to printk like
 
  printk(version);
 
 Nit pick.  That has random side effects if version contains any '%'
 characters.  Make it

It should not. I see no reason for a literal % in the version string.

 
   printk(%s\n, version);
 
 Not quite as optimal but safer.

It is simpler to remove the %s from version. I don't think any of them
require it. If one add a % he should know what he is doing.

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  tel.  (0-58) 347 14 61
Wydz.Fizyki Technicznej i Matematyki Stosowanej Politechniki Gdanskiej
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] ppc xconfig 2.2.5-pre4

2001-05-20 Thread Andrzej Krzysztofowicz

Hi,

The following patch fixes ppc xconfig potential problem introduced in
2.4.5-pre4.

Andrzej

***
diff -uNr linux-2.4.5-pre4/arch/ppc/config.in linux-pre4/arch/ppc/config.in
--- linux-2.4.5-pre4/arch/ppc/config.in Mon May 21 03:17:02 2001
+++ linux-pre4/arch/ppc/config.in   Mon May 21 03:22:51 2001
@@ -135,7 +135,8 @@
  define_bool CONFIG_PCI $CONFIG_PCI_QSPAN
   else
  if [ $CONFIG_APUS = y ]; then
-   bool 'PCI for Permedia2' CONFIG_PCI
+   bool 'PCI for Permedia2' CONFIG_PCI_PERMEDIA
+   define_bool CONFIG_PCI $CONFIG_PCI_PERMEDIA
  else
define_bool CONFIG_PCI y
  fi

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] 2.4.4-ac11 aironet fixes

2001-05-19 Thread Andrzej Krzysztofowicz

Hi,

The following patch fixes aironet drivers. It contains
- fixed Config.in to disable non-working configurations (PNP without isapnp,
  built-in ISA or I365)
- marked __init/__devinit/__devinitdata some initial code/variables
- disable (#if 0) currently unused function (awc4500_pnp_hw_reset)
- version printing fixes
- long delay fixes (udelay()->mdelay())
- added MODULE_PARM_DESC
- functions with local onlu use marked static
- removes duplicated version string from PCMCIA driver.

Andrzej

diff -ur linux-2.4.4-ac11/drivers/net/Config.in linux/drivers/net/Config.in
--- linux-2.4.4-ac11/drivers/net/Config.in  Fri May 18 17:56:21 2001
+++ linux/drivers/net/Config.in Fri May 18 23:27:59 2001
@@ -260,10 +260,14 @@
tristate '  Aironet 4500/4800 series adapters' CONFIG_AIRONET4500
dep_tristate '   Aironet 4500/4800 ISA/PCI/PNP/365 support ' 
CONFIG_AIRONET4500_NONCS $CONFIG_AIRONET4500
if [ "$CONFIG_AIRONET4500" != "n" -a "$CONFIG_AIRONET4500_NONCS" != "n" ]; then
-  bool ' Aironet 4500/4800 PNP support ' CONFIG_AIRONET4500_PNP
+  if [ "$CONFIG_AIRONET4500_NONCS" = "m" -a "$CONFIG_ISAPNP" = "m" -o 
+"$CONFIG_ISAPNP" = "y" ]; then
+bool ' Aironet 4500/4800 PNP support ' CONFIG_AIRONET4500_PNP
+  fi
   dep_bool ' Aironet 4500/4800 PCI support ' CONFIG_AIRONET4500_PCI 
$CONFIG_PCI
-  dep_bool ' Aironet 4500/4800 ISA broken support (EXPERIMENTAL)' 
CONFIG_AIRONET4500_ISA $CONFIG_EXPERIMENTAL
-  dep_bool ' Aironet 4500/4800 I365 broken support (EXPERIMENTAL)' 
CONFIG_AIRONET4500_I365 $CONFIG_EXPERIMENTAL
+  if [ "$CONFIG_AIRONET4500_NONCS" = "m" ]; then
+dep_bool ' Aironet 4500/4800 ISA broken support (EXPERIMENTAL)' 
+CONFIG_AIRONET4500_ISA $CONFIG_EXPERIMENTAL
+dep_bool ' Aironet 4500/4800 I365 broken support (EXPERIMENTAL)' 
+CONFIG_AIRONET4500_I365 $CONFIG_EXPERIMENTAL
+  fi
fi
dep_tristate '   Aironet 4500/4800 PROC interface ' CONFIG_AIRONET4500_PROC 
$CONFIG_AIRONET4500 m
 
diff -ur linux-2.4.4-ac11/drivers/net/aironet4500_card.c 
linux/drivers/net/aironet4500_card.c
--- linux-2.4.4-ac11/drivers/net/aironet4500_card.c Tue May  1 21:14:31 2001
+++ linux/drivers/net/aironet4500_card.cFri May 18 22:59:20 2001
@@ -11,10 +11,6 @@
  * Jeff Garzik - softnet, cleanups
  *
  */
-#ifdef MODULE
-static const char *awc_version =
-"aironet4500_cards.c v0.2  Feb 27, 2000  Elmer Joandi, [EMAIL PROTECTED]\n";
-#endif
 
 #include 
 #include 
@@ -56,6 +52,11 @@
 #define AIRONET4500_3654
 
 
+static char awc_version[] __devinitdata =
+KERN_INFO "aironet4500_cards.c v0.2  Feb 27, 2000  Elmer Joandi, 
[EMAIL PROTECTED]\n";
+
+static int version_printed __devinitdata = 0;
+
 #ifdef CONFIG_AIRONET4500_PCI
 
 #include 
@@ -75,7 +76,7 @@
int ioaddr, int cis_addr, int mem_addr,u8 pci_irq_line) ;
 
 
-int awc4500_pci_probe(struct net_device *dev)
+int __devinit awc4500_pci_probe(struct net_device *dev)
 {
int cards_found = 0;
static int pci_index;   /* Static, for multiple probe calls. */
@@ -136,6 +137,11 @@
 // request_region(pci_cisaddr, AIRONET4X00_CIS_SIZE, "aironet4x00 cis");
 // request_region(pci_memaddr, AIRONET4X00_MEM_SIZE, "aironet4x00 mem");
 
+#ifndef MODULE
+   if (!version_printed++)
+   printk(awc_version);
+#endif /* MODULE */
+
mdelay(10);
 
pci_read_config_word(pdev, PCI_COMMAND, _command);
@@ -164,7 +170,7 @@
 }
 
 
-static int awc_pci_init(struct net_device * dev, struct pci_dev *pdev,
+static int __devinit awc_pci_init(struct net_device * dev, struct pci_dev *pdev,
int ioaddr, int cis_addr, int mem_addr, u8 pci_irq_line) {
 
int i, allocd_dev = 0;
@@ -294,6 +300,7 @@
 #define PNP_BUS_NUMBER number
 #define PNP_DEV_NUMBER devfn
 
+#if 0 /* unused ? */
 
 int awc4500_pnp_hw_reset(struct net_device *dev){
struct isapnp_logdev *logdev;
@@ -331,8 +338,9 @@
 
return 0;
 }
+#endif /* 0 */
 
-int awc4500_pnp_probe(struct net_device *dev)
+int __init awc4500_pnp_probe(struct net_device *dev)
 {
int isa_index = 0;
int isa_irq_line = 0;
@@ -383,6 +391,12 @@
return -ENOMEM;
}
}
+
+#ifndef MODULE
+   if (!version_printed++)
+   printk(awc_version);
+#endif /* MODULE */
+
dev->priv = kmalloc(sizeof(struct awc_private),GFP_KERNEL );
memset(dev->priv,0,sizeof(struct awc_private));
if (!dev->priv) {
@@ -523,7 +537,7 @@
 
 
 
-int awc4500_isa_probe(struct net_device *dev)
+static int __init awc4500_isa_probe(struct net_device *dev)
 {
 // int cards_found = 0;
 // static int isa_index;   /* Static, for multiple probe calls. */
@@ -670,18 +684,18 @@
int product;
 };

-inline u8 i365_in (struct i365_socket * s, int offset) { 

[PATCH] 2.4.4-ac11 network drivers cleaning

2001-05-19 Thread Andrzej Krzysztofowicz

>From kufel!root  Sat May 19 23:39:35 2001
Return-Path: 
Received: from kufel.UUCP (uucp@localhost)
by green.mif.pg.gda.pl (8.9.3/8.9.3) with UUCP id XAA02226
for green.mif.pg.gda.pl!ankry; Sat, 19 May 2001 23:39:35 +0200
Received: (from root@localhost)
by kufel.dom (8.9.3/8.9.3) id XAA02243
for ankry@green; Sat, 19 May 2001 23:40:52 +0200
Date: Sat, 19 May 2001 23:40:52 +0200
From: root 
Message-Id: <[EMAIL PROTECTED]>
To: kufel!green.mif.pg.gda.pl!ankry
Subject: 3com

Hi Alan,

The following patch is a preliminary attempt for cleaning network drivers in
2.4 (drivers for 3Com boards for beginning). It contains:

- cleaning version printing as Jeff suggests (modular - always, built in -
  if detected)
- added MODULE_PARM_DESC (the main reason I've created the patch)
- made version __initdata
- a comment fix (3c501)
- added KERN_* markers to some printk's (only a few)
- enabled modular isapnp usage by 3c509

BTW, Looking at the "options" parameter in some drivers I found that using
it might be ugly in some cases and do not allow specyfic settings. For
example it is difficult to set 10Mbps/half-duplex not changing media type in
some drivers as it requires "options=0" setting, which is simply ignored.
Parameters like duplex setting should be IMO three-state (full/half/not
changed) while there's only one bit in "options" assigned to them currently.
Jeff, Alan, what do you think of changing the method for media/link type
setting and unifying it across drivers ?
Of course, I think of it as a 2.5 project...

Andrzej

**
diff -ur linux-2.4.4-ac11/drivers/net/3c501.c linux/drivers/net/3c501.c
--- linux-2.4.4-ac11/drivers/net/3c501.cTue May  1 21:14:30 2001
+++ linux/drivers/net/3c501.c   Fri May 18 23:44:28 2001
@@ -238,6 +238,10 @@
 
SET_MODULE_OWNER(dev);
 
+#ifdef MODULE
+   printk(version);
+#endif /* MODULE */
+
if (base_addr > 0x1ff)  /* Check a single specified location. */
return el1_probe1(dev, base_addr);
else if (base_addr != 0)/* Don't probe at all. */
@@ -251,7 +255,7 @@
 }
 
 /**
- * el1_probe: 
+ * el1_probe1: 
  * @dev: The device structure to use
  * @ioaddr: An I/O address to probe at.
  *
@@ -270,6 +274,7 @@
unsigned char station_addr[6];
int autoirq = 0;
int i;
+   static int printed_version;
 
/*
 *  Reserve I/O resource for exclusive use by this driver
@@ -340,15 +345,17 @@
if (autoirq)
dev->irq = autoirq;
 
+#ifndef MODULE
+   if (!printed_version++)
+   printk(version);
+#endif /* MODULE */
+
printk(KERN_INFO "%s: %s EtherLink at %#lx, using %sIRQ %d.\n", dev->name, 
mname, dev->base_addr,
autoirq ? "auto":"assigned ", dev->irq);
 
 #ifdef CONFIG_IP_MULTICAST
printk(KERN_WARNING "WARNING: Use of the 3c501 in a multicast kernel is NOT 
recommended.\n");
-#endif
-
-   if (el_debug)
-   printk(version);
+#endif /* CONFIG_IP_MULTICAST */
 
/*
 *  Initialize the device structure.
@@ -925,6 +932,8 @@
 static int irq=5;
 MODULE_PARM(io, "i");
 MODULE_PARM(irq, "i");
+MODULE_PARM_DESC(io, "EtherLink I/O base address");
+MODULE_PARM_DESC(irq, "EtherLink IRQ number");
 
 /**
  * init_module:
diff -ur linux-2.4.4-ac11/drivers/net/3c503.c linux/drivers/net/3c503.c
--- linux-2.4.4-ac11/drivers/net/3c503.cTue May  1 21:14:30 2001
+++ linux/drivers/net/3c503.c   Fri May 18 23:45:06 2001
@@ -178,8 +178,10 @@
goto out;
 }
 
-if (ei_debug  &&  version_printed++ == 0)
+#ifndef MODULE
+if (version_printed++ == 0)
printk(version);
+#endif /* MODULE */
 
 dev->base_addr = ioaddr;
 /* Allocate dev->priv and fill in 8390 specific dev fields. */
@@ -615,6 +617,8 @@
 MODULE_PARM(io, "1-" __MODULE_STRING(MAX_EL2_CARDS) "i");
 MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_EL2_CARDS) "i");
 MODULE_PARM(xcvr, "1-" __MODULE_STRING(MAX_EL2_CARDS) "i");
+MODULE_PARM_DESC(io, "EtherLink II I/O base address(es)");
+MODULE_PARM_DESC(irq, "EtherLink II IRQ number(s) (assigned)");
 
 /* This is set up so that only a single autoprobe takes place per call.
 ISA device autoprobes on a running machine are not recommended. */
@@ -623,6 +627,7 @@
 {
int this_dev, found = 0;
 
+   printk(version);
for (this_dev = 0; this_dev < MAX_EL2_CARDS; this_dev++) {
struct net_device *dev = _el2[this_dev];
dev->irq = irq[this_dev];
diff -ur linux-2.4.4-ac11/drivers/net/3c505.c linux/drivers/net/3c505.c
--- linux-2.4.4-ac11/drivers/net/3c505.cSat Apr 28 20:34:50 2001
+++ linux/drivers/net/3c505.c   Fri May 18 19:38:44 2001
@@ -1621,6 +1621,9 @@
 MODULE_PARM(io, "1-" __MODULE_STRING(ELP_MAX_CARDS) "i");
 MODULE_PARM(irq, "1-" __MODULE_STRING(ELP_MAX_CARDS) "i");
 MODULE_PARM(dma, "1-" 

[PATCH] 2.4.4-ac11 aironet fixes

2001-05-19 Thread Andrzej Krzysztofowicz

Hi,

The following patch fixes aironet drivers. It contains
- fixed Config.in to disable non-working configurations (PNP without isapnp,
  built-in ISA or I365)
- marked __init/__devinit/__devinitdata some initial code/variables
- disable (#if 0) currently unused function (awc4500_pnp_hw_reset)
- version printing fixes
- long delay fixes (udelay()-mdelay())
- added MODULE_PARM_DESC
- functions with local onlu use marked static
- removes duplicated version string from PCMCIA driver.

Andrzej

diff -ur linux-2.4.4-ac11/drivers/net/Config.in linux/drivers/net/Config.in
--- linux-2.4.4-ac11/drivers/net/Config.in  Fri May 18 17:56:21 2001
+++ linux/drivers/net/Config.in Fri May 18 23:27:59 2001
@@ -260,10 +260,14 @@
tristate '  Aironet 4500/4800 series adapters' CONFIG_AIRONET4500
dep_tristate '   Aironet 4500/4800 ISA/PCI/PNP/365 support ' 
CONFIG_AIRONET4500_NONCS $CONFIG_AIRONET4500
if [ $CONFIG_AIRONET4500 != n -a $CONFIG_AIRONET4500_NONCS != n ]; then
-  bool ' Aironet 4500/4800 PNP support ' CONFIG_AIRONET4500_PNP
+  if [ $CONFIG_AIRONET4500_NONCS = m -a $CONFIG_ISAPNP = m -o 
+$CONFIG_ISAPNP = y ]; then
+bool ' Aironet 4500/4800 PNP support ' CONFIG_AIRONET4500_PNP
+  fi
   dep_bool ' Aironet 4500/4800 PCI support ' CONFIG_AIRONET4500_PCI 
$CONFIG_PCI
-  dep_bool ' Aironet 4500/4800 ISA broken support (EXPERIMENTAL)' 
CONFIG_AIRONET4500_ISA $CONFIG_EXPERIMENTAL
-  dep_bool ' Aironet 4500/4800 I365 broken support (EXPERIMENTAL)' 
CONFIG_AIRONET4500_I365 $CONFIG_EXPERIMENTAL
+  if [ $CONFIG_AIRONET4500_NONCS = m ]; then
+dep_bool ' Aironet 4500/4800 ISA broken support (EXPERIMENTAL)' 
+CONFIG_AIRONET4500_ISA $CONFIG_EXPERIMENTAL
+dep_bool ' Aironet 4500/4800 I365 broken support (EXPERIMENTAL)' 
+CONFIG_AIRONET4500_I365 $CONFIG_EXPERIMENTAL
+  fi
fi
dep_tristate '   Aironet 4500/4800 PROC interface ' CONFIG_AIRONET4500_PROC 
$CONFIG_AIRONET4500 m
 
diff -ur linux-2.4.4-ac11/drivers/net/aironet4500_card.c 
linux/drivers/net/aironet4500_card.c
--- linux-2.4.4-ac11/drivers/net/aironet4500_card.c Tue May  1 21:14:31 2001
+++ linux/drivers/net/aironet4500_card.cFri May 18 22:59:20 2001
@@ -11,10 +11,6 @@
  * Jeff Garzik - softnet, cleanups
  *
  */
-#ifdef MODULE
-static const char *awc_version =
-aironet4500_cards.c v0.2  Feb 27, 2000  Elmer Joandi, [EMAIL PROTECTED]\n;
-#endif
 
 #include linux/version.h
 #include linux/config.h
@@ -56,6 +52,11 @@
 #define AIRONET4500_3654
 
 
+static char awc_version[] __devinitdata =
+KERN_INFO aironet4500_cards.c v0.2  Feb 27, 2000  Elmer Joandi, 
[EMAIL PROTECTED]\n;
+
+static int version_printed __devinitdata = 0;
+
 #ifdef CONFIG_AIRONET4500_PCI
 
 #include linux/pci.h
@@ -75,7 +76,7 @@
int ioaddr, int cis_addr, int mem_addr,u8 pci_irq_line) ;
 
 
-int awc4500_pci_probe(struct net_device *dev)
+int __devinit awc4500_pci_probe(struct net_device *dev)
 {
int cards_found = 0;
static int pci_index;   /* Static, for multiple probe calls. */
@@ -136,6 +137,11 @@
 // request_region(pci_cisaddr, AIRONET4X00_CIS_SIZE, aironet4x00 cis);
 // request_region(pci_memaddr, AIRONET4X00_MEM_SIZE, aironet4x00 mem);
 
+#ifndef MODULE
+   if (!version_printed++)
+   printk(awc_version);
+#endif /* MODULE */
+
mdelay(10);
 
pci_read_config_word(pdev, PCI_COMMAND, pci_command);
@@ -164,7 +170,7 @@
 }
 
 
-static int awc_pci_init(struct net_device * dev, struct pci_dev *pdev,
+static int __devinit awc_pci_init(struct net_device * dev, struct pci_dev *pdev,
int ioaddr, int cis_addr, int mem_addr, u8 pci_irq_line) {
 
int i, allocd_dev = 0;
@@ -294,6 +300,7 @@
 #define PNP_BUS_NUMBER number
 #define PNP_DEV_NUMBER devfn
 
+#if 0 /* unused ? */
 
 int awc4500_pnp_hw_reset(struct net_device *dev){
struct isapnp_logdev *logdev;
@@ -331,8 +338,9 @@
 
return 0;
 }
+#endif /* 0 */
 
-int awc4500_pnp_probe(struct net_device *dev)
+int __init awc4500_pnp_probe(struct net_device *dev)
 {
int isa_index = 0;
int isa_irq_line = 0;
@@ -383,6 +391,12 @@
return -ENOMEM;
}
}
+
+#ifndef MODULE
+   if (!version_printed++)
+   printk(awc_version);
+#endif /* MODULE */
+
dev-priv = kmalloc(sizeof(struct awc_private),GFP_KERNEL );
memset(dev-priv,0,sizeof(struct awc_private));
if (!dev-priv) {
@@ -523,7 +537,7 @@
 
 
 
-int awc4500_isa_probe(struct net_device *dev)
+static int __init awc4500_isa_probe(struct net_device *dev)
 {
 // int cards_found = 0;
 // static int isa_index;   /* Static, for multiple probe calls. */
@@ -670,18 +684,18 @@
int product;
 };

-inline u8 i365_in (struct i365_socket * s, int 

[PATCH] 2.4.4-ac11 network drivers cleaning

2001-05-19 Thread Andrzej Krzysztofowicz

From kufel!root  Sat May 19 23:39:35 2001
Return-Path: kufel!root
Received: from kufel.UUCP (uucp@localhost)
by green.mif.pg.gda.pl (8.9.3/8.9.3) with UUCP id XAA02226
for green.mif.pg.gda.pl!ankry; Sat, 19 May 2001 23:39:35 +0200
Received: (from root@localhost)
by kufel.dom (8.9.3/8.9.3) id XAA02243
for ankry@green; Sat, 19 May 2001 23:40:52 +0200
Date: Sat, 19 May 2001 23:40:52 +0200
From: root kufel!root
Message-Id: [EMAIL PROTECTED]
To: kufel!green.mif.pg.gda.pl!ankry
Subject: 3com

Hi Alan,

The following patch is a preliminary attempt for cleaning network drivers in
2.4 (drivers for 3Com boards for beginning). It contains:

- cleaning version printing as Jeff suggests (modular - always, built in -
  if detected)
- added MODULE_PARM_DESC (the main reason I've created the patch)
- made version __initdata
- a comment fix (3c501)
- added KERN_* markers to some printk's (only a few)
- enabled modular isapnp usage by 3c509

BTW, Looking at the options parameter in some drivers I found that using
it might be ugly in some cases and do not allow specyfic settings. For
example it is difficult to set 10Mbps/half-duplex not changing media type in
some drivers as it requires options=0 setting, which is simply ignored.
Parameters like duplex setting should be IMO three-state (full/half/not
changed) while there's only one bit in options assigned to them currently.
Jeff, Alan, what do you think of changing the method for media/link type
setting and unifying it across drivers ?
Of course, I think of it as a 2.5 project...

Andrzej

**
diff -ur linux-2.4.4-ac11/drivers/net/3c501.c linux/drivers/net/3c501.c
--- linux-2.4.4-ac11/drivers/net/3c501.cTue May  1 21:14:30 2001
+++ linux/drivers/net/3c501.c   Fri May 18 23:44:28 2001
@@ -238,6 +238,10 @@
 
SET_MODULE_OWNER(dev);
 
+#ifdef MODULE
+   printk(version);
+#endif /* MODULE */
+
if (base_addr  0x1ff)  /* Check a single specified location. */
return el1_probe1(dev, base_addr);
else if (base_addr != 0)/* Don't probe at all. */
@@ -251,7 +255,7 @@
 }
 
 /**
- * el1_probe: 
+ * el1_probe1: 
  * @dev: The device structure to use
  * @ioaddr: An I/O address to probe at.
  *
@@ -270,6 +274,7 @@
unsigned char station_addr[6];
int autoirq = 0;
int i;
+   static int printed_version;
 
/*
 *  Reserve I/O resource for exclusive use by this driver
@@ -340,15 +345,17 @@
if (autoirq)
dev-irq = autoirq;
 
+#ifndef MODULE
+   if (!printed_version++)
+   printk(version);
+#endif /* MODULE */
+
printk(KERN_INFO %s: %s EtherLink at %#lx, using %sIRQ %d.\n, dev-name, 
mname, dev-base_addr,
autoirq ? auto:assigned , dev-irq);
 
 #ifdef CONFIG_IP_MULTICAST
printk(KERN_WARNING WARNING: Use of the 3c501 in a multicast kernel is NOT 
recommended.\n);
-#endif
-
-   if (el_debug)
-   printk(version);
+#endif /* CONFIG_IP_MULTICAST */
 
/*
 *  Initialize the device structure.
@@ -925,6 +932,8 @@
 static int irq=5;
 MODULE_PARM(io, i);
 MODULE_PARM(irq, i);
+MODULE_PARM_DESC(io, EtherLink I/O base address);
+MODULE_PARM_DESC(irq, EtherLink IRQ number);
 
 /**
  * init_module:
diff -ur linux-2.4.4-ac11/drivers/net/3c503.c linux/drivers/net/3c503.c
--- linux-2.4.4-ac11/drivers/net/3c503.cTue May  1 21:14:30 2001
+++ linux/drivers/net/3c503.c   Fri May 18 23:45:06 2001
@@ -178,8 +178,10 @@
goto out;
 }
 
-if (ei_debugversion_printed++ == 0)
+#ifndef MODULE
+if (version_printed++ == 0)
printk(version);
+#endif /* MODULE */
 
 dev-base_addr = ioaddr;
 /* Allocate dev-priv and fill in 8390 specific dev fields. */
@@ -615,6 +617,8 @@
 MODULE_PARM(io, 1- __MODULE_STRING(MAX_EL2_CARDS) i);
 MODULE_PARM(irq, 1- __MODULE_STRING(MAX_EL2_CARDS) i);
 MODULE_PARM(xcvr, 1- __MODULE_STRING(MAX_EL2_CARDS) i);
+MODULE_PARM_DESC(io, EtherLink II I/O base address(es));
+MODULE_PARM_DESC(irq, EtherLink II IRQ number(s) (assigned));
 
 /* This is set up so that only a single autoprobe takes place per call.
 ISA device autoprobes on a running machine are not recommended. */
@@ -623,6 +627,7 @@
 {
int this_dev, found = 0;
 
+   printk(version);
for (this_dev = 0; this_dev  MAX_EL2_CARDS; this_dev++) {
struct net_device *dev = dev_el2[this_dev];
dev-irq = irq[this_dev];
diff -ur linux-2.4.4-ac11/drivers/net/3c505.c linux/drivers/net/3c505.c
--- linux-2.4.4-ac11/drivers/net/3c505.cSat Apr 28 20:34:50 2001
+++ linux/drivers/net/3c505.c   Fri May 18 19:38:44 2001
@@ -1621,6 +1621,9 @@
 MODULE_PARM(io, 1- __MODULE_STRING(ELP_MAX_CARDS) i);
 MODULE_PARM(irq, 1- __MODULE_STRING(ELP_MAX_CARDS) i);
 MODULE_PARM(dma, 1- __MODULE_STRING(ELP_MAX_CARDS) i);
+MODULE_PARM_DESC(io, 

Re: make xconfig with tcl/tk 8.3 - the patches

2001-05-17 Thread Andrzej Krzysztofowicz

"Simon Geard wrote:"
> 
> Re my previous message on this subject, the patch files are attached.
> 
> They can also be found at my web site:
> 
> http://homepage.ntlworld.com/whiteowl/kernel

Unfortunately your patches break with older tk:

Error in startup script: couldn't compile regular expression pattern: nested
*?+
while executing
"regexp {([0-9A-Za-z_]+)="(.*?)"} $line foo var value"
(procedure "read_config" line 18)
invoked from within
"read_config $defaults"
(file "scripts/kconfig.tk" line 21611)
make: *** [xconfig] Error 1

I've checked tk-8.0 and 8.0.3.

Some other comments:
- please generate patches as universal diff (-uNr options for diff are
  preferred)
- please follow indentation rules used in a file you modify.
  {header,tail}.tk are tab-indented, not spaces.

Regards
Andrzej

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



Re: make xconfig with tcl/tk 8.3 - the patches

2001-05-17 Thread Andrzej Krzysztofowicz

Simon Geard wrote:
 
 Re my previous message on this subject, the patch files are attached.
 
 They can also be found at my web site:
 
 http://homepage.ntlworld.com/whiteowl/kernel

Unfortunately your patches break with older tk:

Error in startup script: couldn't compile regular expression pattern: nested
*?+
while executing
regexp {([0-9A-Za-z_]+)=(.*?)} $line foo var value
(procedure read_config line 18)
invoked from within
read_config $defaults
(file scripts/kconfig.tk line 21611)
make: *** [xconfig] Error 1

I've checked tk-8.0 and 8.0.3.

Some other comments:
- please generate patches as universal diff (-uNr options for diff are
  preferred)
- please follow indentation rules used in a file you modify.
  {header,tail}.tk are tab-indented, not spaces.

Regards
Andrzej

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: LANANA: To Pending Device Number Registrants

2001-05-16 Thread Andrzej Krzysztofowicz

> 
> OK, just correct me if I get this wrong, but this code is taking the LAST 2
> characters of the device name and verifying that it is "cd".  Which would
> mean that the standard states that "/dev/ginsucd" would be a CD-ROM drive?
> 
> That is why I feel a "name" of a device handle shouldnt set how a driver
> operates in this fashion... if you make a small error in your compare, you
> might try to eject a Ginsu Cabbage Dicer instead of a cdrom drive... OOPS!
> 
>   Sam Bingner
> 
> Alan Cox writes:
> > >   len = readlink ("/proc/self/3", buffer, buflen);
> > >   if (strcmp (buffer + len - 2, "cd") != 0) {
> > >   fprintf (stderr, "Not a CD-ROM! Bugger off.\n");
> > >   exit (1);
> > 
> > And on my box cd is the cabbage dicer whoops
> 
> Actually, no, because it's guaranteed that a trailing "/cd" is a
> CD-ROM. That's the standard.

Sure, you no longer support /dev/sdcd (eighty-second SCSI disk)...
;)

Andrzej
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: LANANA: To Pending Device Number Registrants

2001-05-16 Thread Andrzej Krzysztofowicz

 
 OK, just correct me if I get this wrong, but this code is taking the LAST 2
 characters of the device name and verifying that it is cd.  Which would
 mean that the standard states that /dev/ginsucd would be a CD-ROM drive?
 
 That is why I feel a name of a device handle shouldnt set how a driver
 operates in this fashion... if you make a small error in your compare, you
 might try to eject a Ginsu Cabbage Dicer instead of a cdrom drive... OOPS!
 
   Sam Bingner
 
 Alan Cox writes:
 len = readlink (/proc/self/3, buffer, buflen);
 if (strcmp (buffer + len - 2, cd) != 0) {
 fprintf (stderr, Not a CD-ROM! Bugger off.\n);
 exit (1);
  
  And on my box cd is the cabbage dicer whoops
 
 Actually, no, because it's guaranteed that a trailing /cd is a
 CD-ROM. That's the standard.

Sure, you no longer support /dev/sdcd (eighty-second SCSI disk)...
;)

Andrzej
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [PATCH] SCSI disk minor number cleaning

2001-05-15 Thread Andrzej Krzysztofowicz

> Hi,
>   The following patch cleans up a bit usage of parameters related to
> number of minors per disk in the SCSI subsystem. This is a preliminary
> patch and it seems to not contain any problematic changes. The full version
> of the patch (that allows to succesfully change SCSI_MINOR_SHIFT and use
> more/less partitions per disk) is available at
> 
> ftp://rudy.mif.pg.gda.pl/pub/People/ankry/patches/scsi-minor/
> 
> Both are against 2.4.4-ac9, but the "shorter" one can be applied to
> 2.4.5-pre series as well.

Oops. The previous putch was buggy (broken #include).
The enclosed in corrected...

> Any comments are welcome.

 Andrzej
**
diff -ur linux-2.4.4-ac9/drivers/scsi/sd.c linux-scsi/drivers/scsi/sd.c
--- linux-2.4.4-ac9/drivers/scsi/sd.c   Thu May  3 19:29:16 2001
+++ linux-scsi/drivers/scsi/sd.cTue May 15 23:39:12 2001
@@ -67,11 +67,12 @@
 
 #define SD_MAJOR(i) (!(i) ? SCSI_DISK0_MAJOR : SCSI_DISK1_MAJOR-1+(i))
 
-#define SCSI_DISKS_PER_MAJOR   16
+#define SCSI_MINOR_SHIFT   4
+#define SCSI_DISKS_PER_MAJOR   (1 << (8 - SCSI_MINOR_SHIFT))
 #define SD_MAJOR_NUMBER(i) SD_MAJOR((i) >> 8)
 #define SD_MINOR_NUMBER(i) ((i) & 255)
 #define MKDEV_SD_PARTITION(i)  MKDEV(SD_MAJOR_NUMBER(i), (i) & 255)
-#define MKDEV_SD(index)MKDEV_SD_PARTITION((index) << 4)
+#define MKDEV_SD(index)MKDEV_SD_PARTITION((index) << SCSI_MINOR_SHIFT)
 #define N_USED_SCSI_DISKS  (sd_template.dev_max + SCSI_DISKS_PER_MAJOR - 1)
 #define N_USED_SD_MAJORS   (N_USED_SCSI_DISKS / SCSI_DISKS_PER_MAJOR)
 
@@ -298,7 +299,7 @@
SCSI_LOG_HLQUEUE(1, printk("Doing sd request, dev = %d, block = %d\n", devm, 
block));
 
dpnt = _disks[dev];
-   if (devm >= (sd_template.dev_max << 4) ||
+   if (devm >= (sd_template.dev_max << SCSI_MINOR_SHIFT) ||
!dpnt ||
!dpnt->device->online ||
block + SCpnt->request.nr_sectors > sd[devm].nr_sects) {
@@ -563,8 +564,8 @@
 {
SCSI_DISK0_MAJOR,   /* Major number */
"sd",   /* Major name */
-   4,  /* Bits to shift to get real from partition */
-   1 << 4, /* Number of partitions per real */
+   SCSI_MINOR_SHIFT,   /* Bits to shift to get real from partition */
+   1 << SCSI_MINOR_SHIFT,  /* Number of partitions per real */
NULL,   /* hd struct */
NULL,   /* block sizes */
0,  /* number */
@@ -951,7 +952,7 @@
 * The disk reading code does not allow for reading
 * of partial sectors.
 */
-   for (m = i << 4; m < ((i + 1) << 4); m++) {
+   for (m = i << SCSI_MINOR_SHIFT; m < ((i + 1) << 
+SCSI_MINOR_SHIFT); m++) {
sd_blocksizes[m] = sector_size;
}
} {
@@ -964,8 +965,11 @@
int hard_sector = sector_size;
int sz = rscsi_disks[i].capacity * (hard_sector/256);
 
-   /* There are 16 minors allocated for each major device */
-   for (m = i << 4; m < ((i + 1) << 4); m++) {
+   /* 
+* There are 1< 1)
sd_gendisks = kmalloc(N_USED_SD_MAJORS * sizeof(struct gendisk), 
GFP_ATOMIC);
@@ -1132,10 +1136,10 @@
 SCSI_DISKS_PER_MAJOR * sizeof *sd_gendisks[i].flags);
sd_gendisks[i].major = SD_MAJOR(i);
sd_gendisks[i].major_name = "sd";
-   sd_gendisks[i].minor_shift = 4;
-   sd_gendisks[i].max_p = 1 << 4;
-   sd_gendisks[i].part = sd + (i * SCSI_DISKS_PER_MAJOR << 4);
-   sd_gendisks[i].sizes = sd_sizes + (i * SCSI_DISKS_PER_MAJOR << 4);
+   sd_gendisks[i].minor_shift = SCSI_MINOR_SHIFT;
+   sd_gendisks[i].max_p = 1 << SCSI_MINOR_SHIFT;
+   sd_gendisks[i].part = sd + (i * SCSI_DISKS_PER_MAJOR << 
+SCSI_MINOR_SHIFT);
+   sd_gendisks[i].sizes = sd_sizes + (i * SCSI_DISKS_PER_MAJOR << 
+SCSI_MINOR_SHIFT);
sd_gendisks[i].nr_real = 0;
sd_gendisks[i].next = sd_gendisks + i + 1;
sd_gendisks[i].real_devices =
@@ -1191,9 +1195,9 @@
if (!rscsi_disks[i].capacity && rscsi_disks[i].device) {
sd_init_onedisk(i);
if (!rscsi_disks[i].has_part_table) {
-   sd_sizes[i << 4] = rscsi_disks[i].capacity;
+   sd_sizes[i << SCSI_MINOR_SHIFT] = 
+rscsi_disks[i].capacity;
register_disk(_GENDISK(i), MKDEV_SD(i),
-   1<<4, _fops,
+   1 << SCSI_MINOR_SHIFT, _fops,
 

Re: LANANA: To Pending Device Number Registrants

2001-05-15 Thread Andrzej Krzysztofowicz

> On Tue, 15 May 2001, Jonathan Lundell wrote:
> > >
> > >Keep it informational. And NEVER EVER make it part of the design.
> > 
> > What about:
> > 
> > 1 (network domain). I have two network interfaces that I connect to 
> > two different network segments, eth0 & eth1;
> 
> So?
> 
> Informational. You can always ask what "eth0" and "eth1" are.
> 
> There's another side to this: repeatability. A setup should be
> _repeatable_.

It stops to be repetable unless you are able to define *which* interface
become eg. eth0 after boot. Think of hotplug...

> This is what we have now. Network devices are called "eth0..N", and nobody
  ^^
Not true. I did. Once :)

> is complaining about the fact that the numbering is basically random. It
> is _repeatable_ as long as you don't change your hardware setup, and the
> numbering has effectively _nothing_ to do with "location".

Consider the following situation:
- you have three ethernet adapters supported by a single driver; assume
  they are *significantly* different
- you hotplug a spare adapter, supported by the same driver
- your spare adapter become eth0 after reboot...
- you need access to a NFS server on former eth2 during boot

How would you configure the system to boot regardless the spare adapter is
plugged in or not?

> You don't say "oh, I have my network card in PCI bus #2, slot #3,
> subfunction #1, so I should do 'ifconfig netp2s3f1'". Right?

ifconfig eth-00:20:12:34:ab:cd ?

I'd prefer using MAC address here, but it is also not good as MAC need not
to be unique.

> The location of the device is _meaningless_. 

Unfortunately sometimes it is. Rare cases. I used to hit one.

> So? Same deal. You don't have eth0..N, you have disk0..N. 
> 
> What's the problem? It's _repeatable_, in that as long as you don't change
> your disks, they'll show up the same way. But the 0..N doesn't imply that
> the disks are anywhere special.

Not good comparison. You can mount filesystems on disks by UUID.
You should be independent on disk names then.

> Linux gets this _somewhat_ right. The /dev/sdxxx naming is correct (or, if
> you look at only IDE devices, /dev/hdxxx). The problem is that we don't
> have a unified namespace, so unlike eth0..N we do _not_ have a unified
> namespace for disks.

Andrzej
-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Kernel 2.4.4 Compilation Error

2001-05-15 Thread Andrzej Krzysztofowicz

> 
> I'd tried to make my 2.4.4 kernel. But after I made the "make bzImage"
> the following error arose:
> 
> gcc -D__KERNEL__ -I/Usr/src/linux/2.2.4/include -Wall
> -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe
> -march=i686 -c -o i387.o i387.c
> {standard input}: Assambler messages:
> {standard input}:30 Error: no such 386 instruction: `ldmxcsr'

You need newer binutils.

Andrzej

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



Re: Kernel 2.4.4 Compilation Error

2001-05-15 Thread Andrzej Krzysztofowicz

 
 I'd tried to make my 2.4.4 kernel. But after I made the make bzImage
 the following error arose:
 
 gcc -D__KERNEL__ -I/Usr/src/linux/2.2.4/include -Wall
 -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe
 -march=i686 -c -o i387.o i387.c
 {standard input}: Assambler messages:
 {standard input}:30 Error: no such 386 instruction: `ldmxcsr'

You need newer binutils.

Andrzej

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: LANANA: To Pending Device Number Registrants

2001-05-15 Thread Andrzej Krzysztofowicz

 On Tue, 15 May 2001, Jonathan Lundell wrote:
  
  Keep it informational. And NEVER EVER make it part of the design.
  
  What about:
  
  1 (network domain). I have two network interfaces that I connect to 
  two different network segments, eth0  eth1;
 
 So?
 
 Informational. You can always ask what eth0 and eth1 are.
 
 There's another side to this: repeatability. A setup should be
 _repeatable_.

It stops to be repetable unless you are able to define *which* interface
become eg. eth0 after boot. Think of hotplug...

 This is what we have now. Network devices are called eth0..N, and nobody
  ^^
Not true. I did. Once :)

 is complaining about the fact that the numbering is basically random. It
 is _repeatable_ as long as you don't change your hardware setup, and the
 numbering has effectively _nothing_ to do with location.

Consider the following situation:
- you have three ethernet adapters supported by a single driver; assume
  they are *significantly* different
- you hotplug a spare adapter, supported by the same driver
- your spare adapter become eth0 after reboot...
- you need access to a NFS server on former eth2 during boot

How would you configure the system to boot regardless the spare adapter is
plugged in or not?

 You don't say oh, I have my network card in PCI bus #2, slot #3,
 subfunction #1, so I should do 'ifconfig netp2s3f1'. Right?

ifconfig eth-00:20:12:34:ab:cd ?

I'd prefer using MAC address here, but it is also not good as MAC need not
to be unique.

 The location of the device is _meaningless_. 

Unfortunately sometimes it is. Rare cases. I used to hit one.

 So? Same deal. You don't have eth0..N, you have disk0..N. 
 
 What's the problem? It's _repeatable_, in that as long as you don't change
 your disks, they'll show up the same way. But the 0..N doesn't imply that
 the disks are anywhere special.

Not good comparison. You can mount filesystems on disks by UUID.
You should be independent on disk names then.

 Linux gets this _somewhat_ right. The /dev/sdxxx naming is correct (or, if
 you look at only IDE devices, /dev/hdxxx). The problem is that we don't
 have a unified namespace, so unlike eth0..N we do _not_ have a unified
 namespace for disks.

Andrzej
-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [PATCH] SCSI disk minor number cleaning

2001-05-15 Thread Andrzej Krzysztofowicz

 Hi,
   The following patch cleans up a bit usage of parameters related to
 number of minors per disk in the SCSI subsystem. This is a preliminary
 patch and it seems to not contain any problematic changes. The full version
 of the patch (that allows to succesfully change SCSI_MINOR_SHIFT and use
 more/less partitions per disk) is available at
 
 ftp://rudy.mif.pg.gda.pl/pub/People/ankry/patches/scsi-minor/
 
 Both are against 2.4.4-ac9, but the shorter one can be applied to
 2.4.5-pre series as well.

Oops. The previous putch was buggy (broken #include).
The enclosed in corrected...

 Any comments are welcome.

 Andrzej
**
diff -ur linux-2.4.4-ac9/drivers/scsi/sd.c linux-scsi/drivers/scsi/sd.c
--- linux-2.4.4-ac9/drivers/scsi/sd.c   Thu May  3 19:29:16 2001
+++ linux-scsi/drivers/scsi/sd.cTue May 15 23:39:12 2001
@@ -67,11 +67,12 @@
 
 #define SD_MAJOR(i) (!(i) ? SCSI_DISK0_MAJOR : SCSI_DISK1_MAJOR-1+(i))
 
-#define SCSI_DISKS_PER_MAJOR   16
+#define SCSI_MINOR_SHIFT   4
+#define SCSI_DISKS_PER_MAJOR   (1  (8 - SCSI_MINOR_SHIFT))
 #define SD_MAJOR_NUMBER(i) SD_MAJOR((i)  8)
 #define SD_MINOR_NUMBER(i) ((i)  255)
 #define MKDEV_SD_PARTITION(i)  MKDEV(SD_MAJOR_NUMBER(i), (i)  255)
-#define MKDEV_SD(index)MKDEV_SD_PARTITION((index)  4)
+#define MKDEV_SD(index)MKDEV_SD_PARTITION((index)  SCSI_MINOR_SHIFT)
 #define N_USED_SCSI_DISKS  (sd_template.dev_max + SCSI_DISKS_PER_MAJOR - 1)
 #define N_USED_SD_MAJORS   (N_USED_SCSI_DISKS / SCSI_DISKS_PER_MAJOR)
 
@@ -298,7 +299,7 @@
SCSI_LOG_HLQUEUE(1, printk(Doing sd request, dev = %d, block = %d\n, devm, 
block));
 
dpnt = rscsi_disks[dev];
-   if (devm = (sd_template.dev_max  4) ||
+   if (devm = (sd_template.dev_max  SCSI_MINOR_SHIFT) ||
!dpnt ||
!dpnt-device-online ||
block + SCpnt-request.nr_sectors  sd[devm].nr_sects) {
@@ -563,8 +564,8 @@
 {
SCSI_DISK0_MAJOR,   /* Major number */
sd,   /* Major name */
-   4,  /* Bits to shift to get real from partition */
-   1  4, /* Number of partitions per real */
+   SCSI_MINOR_SHIFT,   /* Bits to shift to get real from partition */
+   1  SCSI_MINOR_SHIFT,  /* Number of partitions per real */
NULL,   /* hd struct */
NULL,   /* block sizes */
0,  /* number */
@@ -951,7 +952,7 @@
 * The disk reading code does not allow for reading
 * of partial sectors.
 */
-   for (m = i  4; m  ((i + 1)  4); m++) {
+   for (m = i  SCSI_MINOR_SHIFT; m  ((i + 1)  
+SCSI_MINOR_SHIFT); m++) {
sd_blocksizes[m] = sector_size;
}
} {
@@ -964,8 +965,11 @@
int hard_sector = sector_size;
int sz = rscsi_disks[i].capacity * (hard_sector/256);
 
-   /* There are 16 minors allocated for each major device */
-   for (m = i  4; m  ((i + 1)  4); m++) {
+   /* 
+* There are 1SCSI_MINOR_SHIFT minors allocated 
+* for each major device
+*/
+   for (m = i  SCSI_MINOR_SHIFT; m  ((i + 1)  
+SCSI_MINOR_SHIFT); m++) {
sd_hardsizes[m] = hard_sector;
}
 
@@ -1083,34 +1087,34 @@
memset(rscsi_disks, 0, sd_template.dev_max * sizeof(Scsi_Disk));
 
/* for every (necessary) major: */
-   sd_sizes = kmalloc((sd_template.dev_max  4) * sizeof(int), GFP_ATOMIC);
+   sd_sizes = kmalloc((sd_template.dev_max  SCSI_MINOR_SHIFT) * sizeof(int), 
+GFP_ATOMIC);
if (!sd_sizes)
goto cleanup_disks;
-   memset(sd_sizes, 0, (sd_template.dev_max  4) * sizeof(int));
+   memset(sd_sizes, 0, (sd_template.dev_max  SCSI_MINOR_SHIFT) * sizeof(int));
 
-   sd_blocksizes = kmalloc((sd_template.dev_max  4) * sizeof(int), GFP_ATOMIC);
+   sd_blocksizes = kmalloc((sd_template.dev_max  SCSI_MINOR_SHIFT) * 
+sizeof(int), GFP_ATOMIC);
if (!sd_blocksizes)
goto cleanup_sizes;

-   sd_hardsizes = kmalloc((sd_template.dev_max  4) * sizeof(int), GFP_ATOMIC);
+   sd_hardsizes = kmalloc((sd_template.dev_max  SCSI_MINOR_SHIFT) * 
+sizeof(int), GFP_ATOMIC);
if (!sd_hardsizes)
goto cleanup_blocksizes;
 
-   for (i = 0; i  sd_template.dev_max  4; i++) {
+   for (i = 0; i  sd_template.dev_max  SCSI_MINOR_SHIFT; i++) {
sd_blocksizes[i] = 1024;
sd_hardsizes[i] = 512;
}
 
for (i = 0; i  N_USED_SD_MAJORS; i++) {
-   blksize_size[SD_MAJOR(i)] = 

[PATCH] net PCI_ID fixes

2001-05-14 Thread Andrzej Krzysztofowicz

Hi,

This patch renames some PCI_IDS in net drivers to use namespace from
pci_ids.h.

Also the "__{dev,}initdata" variables in pcnet32.c put together.
It seems that the "section type conflict" in pcnet32.c some -ac kernels ago
was caused by __initdata variables not declared together (some public /
static variables between them). 
[ However I have no idea why separated __initdata vars break sometimes -
  a gcc error? ]

Andrzej

*
diff -ur linux-2.4.4-ac9/drivers/net/pcnet32.c linux/drivers/net/pcnet32.c
--- linux-2.4.4-ac9/drivers/net/pcnet32.c   Tue May  1 21:14:32 2001
+++ linux/drivers/net/pcnet32.c Mon May 14 22:19:01 2001
@@ -45,6 +45,16 @@
 
 static unsigned int pcnet32_portlist[] __initdata = {0x300, 0x320, 0x340, 0x360, 0};
 
+/*
+ * PCI device identifiers for "new style" Linux PCI Device Drivers
+ */
+static struct pci_device_id pcnet32_pci_tbl[] __devinitdata = {
+{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE_HOME, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 
+0 },
+{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE, 0x1014, 0x2000, 0, 0, 0 },
+{ 0, }
+};
+
 static int pcnet32_debug = 1;
 static int tx_start = 1; /* Mapping -- 0:20, 1:64, 2:128, 3:~220 (depends on chip 
vers) */
 
@@ -204,16 +214,6 @@
 
 #define PCNET32_TOTAL_SIZE 0x20
 
-/* some PCI ids */
-#ifndef PCI_DEVICE_ID_AMD_LANCE
-#define PCI_VENDOR_ID_AMD0x1022
-#define PCI_DEVICE_ID_AMD_LANCE  0x2000
-#endif
-#ifndef PCI_DEVICE_ID_AMD_PCNETHOME
-#define PCI_DEVICE_ID_AMD_PCNETHOME   0x2001
-#endif
-
-
 #define CRC_POLYNOMIAL_LE 0xedb88320UL /* Ethernet CRC, little endian */
 
 /* The PCNET32 Rx and Tx ring descriptors. */
@@ -318,16 +318,6 @@
 int (*probe1) (unsigned long, unsigned char, int, int, struct pci_dev *);
 };
 
-
-/*
- * PCI device identifiers for "new style" Linux PCI Device Drivers
- */
-static struct pci_device_id pcnet32_pci_tbl[] __devinitdata = {
-{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_PCNETHOME, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 
},
-{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
-{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE, 0x1014, 0x2000, 0, 0, 0 },
-{ 0, }
-};
 
 MODULE_DEVICE_TABLE (pci, pcnet32_pci_tbl);
 
Only in linux/drivers/net: pcnet32.c.orig
diff -ur linux-2.4.4-ac9/drivers/net/tlan.c linux/drivers/net/tlan.c
--- linux-2.4.4-ac9/drivers/net/tlan.c  Tue May  1 21:14:33 2001
+++ linux/drivers/net/tlan.cMon May 14 22:19:01 2001
@@ -241,21 +241,21 @@
 };
 
 static struct pci_device_id tlan_pci_tbl[] __devinitdata = {
-   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_NETELLIGENT_10,
+   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL10,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
-   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_NETELLIGENT_10_100,
+   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 },
-   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_NETFLEX_3P_INTEGRATED,
+   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETFLEX3I,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2 },
-   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_NETFLEX_3P,
+   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_THUNDER,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3 },
-   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_NETFLEX_3P_BNC,
+   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETFLEX3B,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 },
-   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_NETELLIGENT_10_100_PROLIANT,
+   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100PI,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5 },
-   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_NETELLIGENT_10_100_DUAL,
+   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100D,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6 },
-   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_DESKPRO_4000_5233MMX,
+   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100I,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 7 },
{ PCI_VENDOR_ID_OLICOM, PCI_DEVICE_ID_OLICOM_OC2183,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 },
diff -ur linux-2.4.4-ac9/drivers/net/tlan.h linux/drivers/net/tlan.h
--- linux-2.4.4-ac9/drivers/net/tlan.h  Thu Apr 26 23:50:56 2001
+++ linux/drivers/net/tlan.hMon May 14 22:19:01 2001
@@ -61,14 +61,6 @@
 *
 /

-#define PCI_DEVICE_ID_NETELLIGENT_10   0xAE34
-#define PCI_DEVICE_ID_NETELLIGENT_10_100   0xAE32
-#define PCI_DEVICE_ID_NETFLEX_3P_INTEGRATED0xAE35
-#define PCI_DEVICE_ID_NETFLEX_3P   0xF130
-#define PCI_DEVICE_ID_NETFLEX_3P_BNC   0xF150
-#define PCI_DEVICE_ID_NETELLIGENT_10_100_PROLIANT  0xAE43
-#define PCI_DEVICE_ID_NETELLIGENT_10_100_DUAL  

[PATCH] net PCI_ID fixes

2001-05-14 Thread Andrzej Krzysztofowicz

Hi,

This patch renames some PCI_IDS in net drivers to use namespace from
pci_ids.h.

Also the __{dev,}initdata variables in pcnet32.c put together.
It seems that the section type conflict in pcnet32.c some -ac kernels ago
was caused by __initdata variables not declared together (some public /
static variables between them). 
[ However I have no idea why separated __initdata vars break sometimes -
  a gcc error? ]

Andrzej

*
diff -ur linux-2.4.4-ac9/drivers/net/pcnet32.c linux/drivers/net/pcnet32.c
--- linux-2.4.4-ac9/drivers/net/pcnet32.c   Tue May  1 21:14:32 2001
+++ linux/drivers/net/pcnet32.c Mon May 14 22:19:01 2001
@@ -45,6 +45,16 @@
 
 static unsigned int pcnet32_portlist[] __initdata = {0x300, 0x320, 0x340, 0x360, 0};
 
+/*
+ * PCI device identifiers for new style Linux PCI Device Drivers
+ */
+static struct pci_device_id pcnet32_pci_tbl[] __devinitdata = {
+{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE_HOME, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 
+0 },
+{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE, 0x1014, 0x2000, 0, 0, 0 },
+{ 0, }
+};
+
 static int pcnet32_debug = 1;
 static int tx_start = 1; /* Mapping -- 0:20, 1:64, 2:128, 3:~220 (depends on chip 
vers) */
 
@@ -204,16 +214,6 @@
 
 #define PCNET32_TOTAL_SIZE 0x20
 
-/* some PCI ids */
-#ifndef PCI_DEVICE_ID_AMD_LANCE
-#define PCI_VENDOR_ID_AMD0x1022
-#define PCI_DEVICE_ID_AMD_LANCE  0x2000
-#endif
-#ifndef PCI_DEVICE_ID_AMD_PCNETHOME
-#define PCI_DEVICE_ID_AMD_PCNETHOME   0x2001
-#endif
-
-
 #define CRC_POLYNOMIAL_LE 0xedb88320UL /* Ethernet CRC, little endian */
 
 /* The PCNET32 Rx and Tx ring descriptors. */
@@ -318,16 +318,6 @@
 int (*probe1) (unsigned long, unsigned char, int, int, struct pci_dev *);
 };
 
-
-/*
- * PCI device identifiers for new style Linux PCI Device Drivers
- */
-static struct pci_device_id pcnet32_pci_tbl[] __devinitdata = {
-{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_PCNETHOME, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 
},
-{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
-{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE, 0x1014, 0x2000, 0, 0, 0 },
-{ 0, }
-};
 
 MODULE_DEVICE_TABLE (pci, pcnet32_pci_tbl);
 
Only in linux/drivers/net: pcnet32.c.orig
diff -ur linux-2.4.4-ac9/drivers/net/tlan.c linux/drivers/net/tlan.c
--- linux-2.4.4-ac9/drivers/net/tlan.c  Tue May  1 21:14:33 2001
+++ linux/drivers/net/tlan.cMon May 14 22:19:01 2001
@@ -241,21 +241,21 @@
 };
 
 static struct pci_device_id tlan_pci_tbl[] __devinitdata = {
-   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_NETELLIGENT_10,
+   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL10,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
-   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_NETELLIGENT_10_100,
+   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 },
-   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_NETFLEX_3P_INTEGRATED,
+   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETFLEX3I,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2 },
-   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_NETFLEX_3P,
+   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_THUNDER,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3 },
-   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_NETFLEX_3P_BNC,
+   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETFLEX3B,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 },
-   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_NETELLIGENT_10_100_PROLIANT,
+   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100PI,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5 },
-   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_NETELLIGENT_10_100_DUAL,
+   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100D,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6 },
-   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_DESKPRO_4000_5233MMX,
+   { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100I,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 7 },
{ PCI_VENDOR_ID_OLICOM, PCI_DEVICE_ID_OLICOM_OC2183,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 },
diff -ur linux-2.4.4-ac9/drivers/net/tlan.h linux/drivers/net/tlan.h
--- linux-2.4.4-ac9/drivers/net/tlan.h  Thu Apr 26 23:50:56 2001
+++ linux/drivers/net/tlan.hMon May 14 22:19:01 2001
@@ -61,14 +61,6 @@
 *
 /

-#define PCI_DEVICE_ID_NETELLIGENT_10   0xAE34
-#define PCI_DEVICE_ID_NETELLIGENT_10_100   0xAE32
-#define PCI_DEVICE_ID_NETFLEX_3P_INTEGRATED0xAE35
-#define PCI_DEVICE_ID_NETFLEX_3P   0xF130
-#define PCI_DEVICE_ID_NETFLEX_3P_BNC   0xF150
-#define PCI_DEVICE_ID_NETELLIGENT_10_100_PROLIANT  0xAE43
-#define PCI_DEVICE_ID_NETELLIGENT_10_100_DUAL  0xAE40

[BUG] loop device problem in 2.2

2001-05-12 Thread Andrzej Krzysztofowicz

Hi,

  I observe a problem with loop block device over a sparse file grater than
2GB on alpha. When write attempts to the device appear (probably only at
offset greater than 2GB), the filesysstem where the loop device file is
located gets corruptted. i observe this eg. while doing

mke2fs /dev/loop0

I think it is either loop or ext2 problem...

Up till now I have tested 2.2.20pre2 and 2.2.19 kernels.

1. Is this a known problem ?
2. If so, is there any way to fix it ?

Andrzej

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[BUG] loop device problem in 2.2

2001-05-12 Thread Andrzej Krzysztofowicz

Hi,

  I observe a problem with loop block device over a sparse file grater than
2GB on alpha. When write attempts to the device appear (probably only at
offset greater than 2GB), the filesysstem where the loop device file is
located gets corruptted. i observe this eg. while doing

mke2fs /dev/loop0

I think it is either loop or ext2 problem...

Up till now I have tested 2.2.20pre2 and 2.2.19 kernels.

1. Is this a known problem ?
2. If so, is there any way to fix it ?

Andrzej

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [PATCH] for iso8859-13

2001-05-11 Thread Andrzej Krzysztofowicz

"Nerijus Baliunas wrote:"
> -NLS ISO 8859-1  (Latin 1; Western European Languages)
> +NLS ISO 8859-1 (Latin 1; Western European Languages)

Should'n it be consistent with Config.in ?

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk

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



Re: Kernel 2.4.4, Adaptec 7880 on board controller

2001-05-11 Thread Andrzej Krzysztofowicz

"Joachim Backes wrote:"
> when booting on a machine having an Adaptec 7880 on board
> controller (Kernel 2.4.4), then i get the following msg:
> ...
> SCSI subsystem driver Revision: 1.00
> request_module[scsi_hostadapter]: Root fs not mounted
> request_module[scsi_hostadapter]: Root fs not mounted
> request_module[scsi_hostadapter]: Root fs not mounted
> ...
> The aic7xxx scsi driver is not configured as module,
> but linked to the kernel.

Hmmm, I observe similar messages when
- scsi low-level driver (eg. sd, sr, st) linked to the kernel,
- no appropriate (corresponding to any of the above drivers) devices found
  on the hostadapters which have support linked to the kernel.

I don't think it is driver-specyfic. As I looked at the code it would be
difficult to avoid them (unless a linked-to-the-kernel function is able
to detect whether it is called from __init code or from a module
initialization code).

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk

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



Re: Kernel 2.4.4, Adaptec 7880 on board controller

2001-05-11 Thread Andrzej Krzysztofowicz

Joachim Backes wrote:
 when booting on a machine having an Adaptec 7880 on board
 controller (Kernel 2.4.4), then i get the following msg:
 ...
 SCSI subsystem driver Revision: 1.00
 request_module[scsi_hostadapter]: Root fs not mounted
 request_module[scsi_hostadapter]: Root fs not mounted
 request_module[scsi_hostadapter]: Root fs not mounted
 ...
 The aic7xxx scsi driver is not configured as module,
 but linked to the kernel.

Hmmm, I observe similar messages when
- scsi low-level driver (eg. sd, sr, st) linked to the kernel,
- no appropriate (corresponding to any of the above drivers) devices found
  on the hostadapters which have support linked to the kernel.

I don't think it is driver-specyfic. As I looked at the code it would be
difficult to avoid them (unless a linked-to-the-kernel function is able
to detect whether it is called from __init code or from a module
initialization code).

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [PATCH] for iso8859-13

2001-05-11 Thread Andrzej Krzysztofowicz

Nerijus Baliunas wrote:
 -NLS ISO 8859-1  (Latin 1; Western European Languages)
 +NLS ISO 8859-1 (Latin 1; Western European Languages)

Should'n it be consistent with Config.in ?

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: make menuconfig versus make xconfig, Kernel 2.4

2001-05-10 Thread Andrzej Krzysztofowicz

"Joachim Backes wrote:"
> I made an update from Kernel 2.2.19 to 2.4.4, and I made
> a copy from the 2.2.19 .config file into the 2.4.4 directory.
> 
> After that, I was wondering about the following fact:
> 
> "make menuconfig" for kernel 2.4.4 showed (what seems to
> be correct) for ATA/IDE the same kernel configuration, as it
> was shown in 2.2.19, when using the 2.2.19 ".config".
> 
> But: 2.4.4 "make xconfig" using the 2.2.19 .config showed
> a disabled ATA/IDE configuration.
> 
> Only after saving the 2.4.4 configuration produced by "make menuconfig",
> then the configuration for ATA/IDE was correctly displayed by "make xconfig".


The Menuconfig behaviour is probably incorrect. CONFIG_IDE is missing.
Try
make oldconfig 
first.
-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: make menuconfig versus make xconfig, Kernel 2.4

2001-05-10 Thread Andrzej Krzysztofowicz

Joachim Backes wrote:
 I made an update from Kernel 2.2.19 to 2.4.4, and I made
 a copy from the 2.2.19 .config file into the 2.4.4 directory.
 
 After that, I was wondering about the following fact:
 
 make menuconfig for kernel 2.4.4 showed (what seems to
 be correct) for ATA/IDE the same kernel configuration, as it
 was shown in 2.2.19, when using the 2.2.19 .config.
 
 But: 2.4.4 make xconfig using the 2.2.19 .config showed
 a disabled ATA/IDE configuration.
 
 Only after saving the 2.4.4 configuration produced by make menuconfig,
 then the configuration for ATA/IDE was correctly displayed by make xconfig.


The Menuconfig behaviour is probably incorrect. CONFIG_IDE is missing.
Try
make oldconfig 
first.
-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] koi8-ru support for 2.4

2001-05-07 Thread Andrzej Krzysztofowicz

Hi,

   The following patch adds koi8-ru (Belarussian) charset support for
2.4.4-ac kernels on top of nls_koi8-u module. They differ on two characters
only, so I don't think t is worth to create a new table for koi8-ru.

   Well it could be koi8-u on top of koi8-ru as well, but I choosed minimal-
changes-way for the patch.

Andrzej 


diff -uNr linux-2.4.4-ac5/Documentation/Configure.help 
linux/Documentation/Configure.help
--- linux-2.4.4-ac5/Documentation/Configure.helpWed May  2 23:42:15 2001
+++ linux/Documentation/Configure.help  Sun May  6 22:09:54 2001
@@ -12567,8 +12567,8 @@
   cp862, cp863, cp864, cp865, cp866, cp869, cp874, cp932, cp936,
   cp949, cp950, cp1251, cp1255, euc-jp, euc-kr, gb2312, iso8859-1,
   iso8859-2, iso8859-3, iso8859-4, iso8859-5, iso8859-6, iso8859-7,
-  iso8859-8, iso8859-9, iso8859-14, iso8859-15, koi8-r, koi8-u, sjis,
-  tis-620, utf8.
+  iso8859-8, iso8859-9, iso8859-14, iso8859-15, koi8-r, koi8-ru,
+  koi8-u, sjis, tis-620, utf8.
   If you specify a wrong value, it will use the built-in NLS;
   compatible with iso8859-1.
 
@@ -12937,13 +12937,13 @@
   input/output character sets. Say Y here for the preferred Russian
   character set.
 
-NLS KOI8-U (Ukrainian) 
+NLS KOI8-U/RU (Ukrainian, Belarussian) 
 CONFIG_NLS_KOI8_U
   If you want to display filenames with native language characters
   from the Microsoft FAT file system family or from JOLIET CDROMs
   correctly on the screen, you need to include the appropriate
   input/output character sets. Say Y here for the preferred Ukrainian
-  character set.
+  (koi8-u) and Belarussian (koi8-ru) character sets.
 
 NLS UTF8
 CONFIG_NLS_UTF8
diff -uNr linux-2.4.4-ac5/fs/nls/Config.in linux/fs/nls/Config.in
--- linux-2.4.4-ac5/fs/nls/Config.inSat Apr 28 20:35:03 2001
+++ linux/fs/nls/Config.in  Sun May  6 22:05:35 2001
@@ -56,7 +56,7 @@
   tristate 'NLS ISO 8859-14 (Latin 8; Celtic)'  CONFIG_NLS_ISO8859_14
   tristate 'NLS ISO 8859-15 (Latin 9; Western European Languages with Euro)' 
CONFIG_NLS_ISO8859_15
   tristate 'NLS KOI8-R (Russian)'   CONFIG_NLS_KOI8_R
-  tristate 'NLS KOI8-U (Ukrainian)' CONFIG_NLS_KOI8_U
+  tristate 'NLS KOI8-U/RU (Ukrainian, Belarussian)' CONFIG_NLS_KOI8_U
   tristate 'NLS UTF8'   CONFIG_NLS_UTF8
   endmenu
 fi
diff -uNr linux-2.4.4-ac5/fs/nls/Makefile linux/fs/nls/Makefile
--- linux-2.4.4-ac5/fs/nls/Makefile Sat Apr 28 20:35:03 2001
+++ linux/fs/nls/Makefile   Sun May  6 21:41:41 2001
@@ -49,7 +49,7 @@
 obj-$(CONFIG_NLS_ISO8859_14)   += nls_iso8859-14.o
 obj-$(CONFIG_NLS_ISO8859_15)   += nls_iso8859-15.o
 obj-$(CONFIG_NLS_KOI8_R)   += nls_koi8-r.o
-obj-$(CONFIG_NLS_KOI8_U)   += nls_koi8-u.o
+obj-$(CONFIG_NLS_KOI8_U)   += nls_koi8-u.o nls_koi8-ru.o
 obj-$(CONFIG_NLS_ABC)  += nls_abc.o
 obj-$(CONFIG_NLS_UTF8) += nls_utf8.o
 
diff -uNr linux-2.4.4-ac5/fs/nls/nls_koi8-ru.c linux/fs/nls/nls_koi8-ru.c
--- linux-2.4.4-ac5/fs/nls/nls_koi8-ru.cThu Jan  1 01:00:00 1970
+++ linux/fs/nls/nls_koi8-ru.c  Sun May  6 21:47:28 2001
@@ -0,0 +1,99 @@
+/*
+ * linux/fs/nls_koi8-ru.c
+ *
+ * Charset koi8-ru translation based on charset koi8-u.
+ * The Unicode to charset table has only exact mappings.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+static struct nls_table *p_nls;
+
+static int uni2char(const wchar_t uni,
+   unsigned char *out, int boundlen)
+{
+   if (boundlen <= 0)
+   return -ENAMETOOLONG;
+
+   if ((uni & 0xffaf) == 0x040e || (uni & 0xffce) == 0x254c) {
+   /* koi8-ru and koi8-u differ only on two characters */
+   if (uni == 0x040e)
+   return 0xbe;
+   else if (uni == 0x045e)
+   return 0xae;
+   else if (uni == 0x255d || uni == 0x256c)
+   return 0;
+   else
+   return p_nls->uni2char(uni, out, boundlen);
+   }
+   else
+   /* fast path */
+   return p_nls->uni2char(uni, out, boundlen);
+}
+
+static int char2uni(const unsigned char *rawstring, int boundlen,
+   wchar_t *uni)
+{
+   int n;
+
+   if ((*rawstring & 0xef) != 0xae) {
+   /* koi8-ru and koi8-u differ only on two characters */
+   *uni = (*rawstring & 0x10) ? 0x040e : 0x045e;
+   return 1;
+   }
+
+   n = p_nls->char2uni(rawstring, boundlen, uni);
+   return n;
+}
+
+static struct nls_table table = {
+   "koi8-ru",
+   uni2char,
+   char2uni,
+   NULL,
+   NULL,
+   THIS_MODULE,
+};
+
+static int __init init_nls_koi8_ru(void)
+{
+   p_nls = load_nls("koi8-u");
+
+   if (p_nls) {
+   table.charset2upper = p_nls->charset2upper;
+   table.charset2lower = p_nls->charset2lower;
+   return register_nls();
+   }
+
+   return -EINVAL;
+}
+
+static void __exit 

Re: [PATCH] for iso8859-13

2001-05-07 Thread Andrzej Krzysztofowicz

"Kai Henningsen wrote:"
> [EMAIL PROTECTED] (H. Peter Anvin)  wrote on 06.05.01 in 
><9d4ut6$9b9$[EMAIL PROTECTED]>:
> > Wouldn't it make a heck of a lot more sense if we had a preprocessor
> > which could produce these kinds of tables from a more sensible input
> > format (preferrably one which is already in use somewhere.)
> 
> For example from the tables on the Unicode webserver or from the IBM  
> charset registry ...
> 

The original tables seem to be generated automatically, however manually
broken in some places.

Can anybody point me to the tools the original tables were generated with?

Andrzej

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: [PATCH] for iso8859-13

2001-05-07 Thread Andrzej Krzysztofowicz

Kai Henningsen wrote:
 [EMAIL PROTECTED] (H. Peter Anvin)  wrote on 06.05.01 in 
9d4ut6$9b9$[EMAIL PROTECTED]:
  Wouldn't it make a heck of a lot more sense if we had a preprocessor
  which could produce these kinds of tables from a more sensible input
  format (preferrably one which is already in use somewhere.)
 
 For example from the tables on the Unicode webserver or from the IBM  
 charset registry ...
 

The original tables seem to be generated automatically, however manually
broken in some places.

Can anybody point me to the tools the original tables were generated with?

Andrzej

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] koi8-ru support for 2.4

2001-05-07 Thread Andrzej Krzysztofowicz

Hi,

   The following patch adds koi8-ru (Belarussian) charset support for
2.4.4-ac kernels on top of nls_koi8-u module. They differ on two characters
only, so I don't think t is worth to create a new table for koi8-ru.

   Well it could be koi8-u on top of koi8-ru as well, but I choosed minimal-
changes-way for the patch.

Andrzej 


diff -uNr linux-2.4.4-ac5/Documentation/Configure.help 
linux/Documentation/Configure.help
--- linux-2.4.4-ac5/Documentation/Configure.helpWed May  2 23:42:15 2001
+++ linux/Documentation/Configure.help  Sun May  6 22:09:54 2001
@@ -12567,8 +12567,8 @@
   cp862, cp863, cp864, cp865, cp866, cp869, cp874, cp932, cp936,
   cp949, cp950, cp1251, cp1255, euc-jp, euc-kr, gb2312, iso8859-1,
   iso8859-2, iso8859-3, iso8859-4, iso8859-5, iso8859-6, iso8859-7,
-  iso8859-8, iso8859-9, iso8859-14, iso8859-15, koi8-r, koi8-u, sjis,
-  tis-620, utf8.
+  iso8859-8, iso8859-9, iso8859-14, iso8859-15, koi8-r, koi8-ru,
+  koi8-u, sjis, tis-620, utf8.
   If you specify a wrong value, it will use the built-in NLS;
   compatible with iso8859-1.
 
@@ -12937,13 +12937,13 @@
   input/output character sets. Say Y here for the preferred Russian
   character set.
 
-NLS KOI8-U (Ukrainian) 
+NLS KOI8-U/RU (Ukrainian, Belarussian) 
 CONFIG_NLS_KOI8_U
   If you want to display filenames with native language characters
   from the Microsoft FAT file system family or from JOLIET CDROMs
   correctly on the screen, you need to include the appropriate
   input/output character sets. Say Y here for the preferred Ukrainian
-  character set.
+  (koi8-u) and Belarussian (koi8-ru) character sets.
 
 NLS UTF8
 CONFIG_NLS_UTF8
diff -uNr linux-2.4.4-ac5/fs/nls/Config.in linux/fs/nls/Config.in
--- linux-2.4.4-ac5/fs/nls/Config.inSat Apr 28 20:35:03 2001
+++ linux/fs/nls/Config.in  Sun May  6 22:05:35 2001
@@ -56,7 +56,7 @@
   tristate 'NLS ISO 8859-14 (Latin 8; Celtic)'  CONFIG_NLS_ISO8859_14
   tristate 'NLS ISO 8859-15 (Latin 9; Western European Languages with Euro)' 
CONFIG_NLS_ISO8859_15
   tristate 'NLS KOI8-R (Russian)'   CONFIG_NLS_KOI8_R
-  tristate 'NLS KOI8-U (Ukrainian)' CONFIG_NLS_KOI8_U
+  tristate 'NLS KOI8-U/RU (Ukrainian, Belarussian)' CONFIG_NLS_KOI8_U
   tristate 'NLS UTF8'   CONFIG_NLS_UTF8
   endmenu
 fi
diff -uNr linux-2.4.4-ac5/fs/nls/Makefile linux/fs/nls/Makefile
--- linux-2.4.4-ac5/fs/nls/Makefile Sat Apr 28 20:35:03 2001
+++ linux/fs/nls/Makefile   Sun May  6 21:41:41 2001
@@ -49,7 +49,7 @@
 obj-$(CONFIG_NLS_ISO8859_14)   += nls_iso8859-14.o
 obj-$(CONFIG_NLS_ISO8859_15)   += nls_iso8859-15.o
 obj-$(CONFIG_NLS_KOI8_R)   += nls_koi8-r.o
-obj-$(CONFIG_NLS_KOI8_U)   += nls_koi8-u.o
+obj-$(CONFIG_NLS_KOI8_U)   += nls_koi8-u.o nls_koi8-ru.o
 obj-$(CONFIG_NLS_ABC)  += nls_abc.o
 obj-$(CONFIG_NLS_UTF8) += nls_utf8.o
 
diff -uNr linux-2.4.4-ac5/fs/nls/nls_koi8-ru.c linux/fs/nls/nls_koi8-ru.c
--- linux-2.4.4-ac5/fs/nls/nls_koi8-ru.cThu Jan  1 01:00:00 1970
+++ linux/fs/nls/nls_koi8-ru.c  Sun May  6 21:47:28 2001
@@ -0,0 +1,99 @@
+/*
+ * linux/fs/nls_koi8-ru.c
+ *
+ * Charset koi8-ru translation based on charset koi8-u.
+ * The Unicode to charset table has only exact mappings.
+ */
+
+#include linux/module.h
+#include linux/kernel.h
+#include linux/string.h
+#include linux/nls.h
+#include linux/errno.h
+
+static struct nls_table *p_nls;
+
+static int uni2char(const wchar_t uni,
+   unsigned char *out, int boundlen)
+{
+   if (boundlen = 0)
+   return -ENAMETOOLONG;
+
+   if ((uni  0xffaf) == 0x040e || (uni  0xffce) == 0x254c) {
+   /* koi8-ru and koi8-u differ only on two characters */
+   if (uni == 0x040e)
+   return 0xbe;
+   else if (uni == 0x045e)
+   return 0xae;
+   else if (uni == 0x255d || uni == 0x256c)
+   return 0;
+   else
+   return p_nls-uni2char(uni, out, boundlen);
+   }
+   else
+   /* fast path */
+   return p_nls-uni2char(uni, out, boundlen);
+}
+
+static int char2uni(const unsigned char *rawstring, int boundlen,
+   wchar_t *uni)
+{
+   int n;
+
+   if ((*rawstring  0xef) != 0xae) {
+   /* koi8-ru and koi8-u differ only on two characters */
+   *uni = (*rawstring  0x10) ? 0x040e : 0x045e;
+   return 1;
+   }
+
+   n = p_nls-char2uni(rawstring, boundlen, uni);
+   return n;
+}
+
+static struct nls_table table = {
+   koi8-ru,
+   uni2char,
+   char2uni,
+   NULL,
+   NULL,
+   THIS_MODULE,
+};
+
+static int __init init_nls_koi8_ru(void)
+{
+   p_nls = load_nls(koi8-u);
+
+   if (p_nls) {
+   table.charset2upper = p_nls-charset2upper;
+   table.charset2lower = p_nls-charset2lower;
+   return register_nls(table);
+ 

[PATCH] for iso8859-13

2001-05-06 Thread Andrzej Krzysztofowicz

Hi,
   The following patch removed unused and broken conversion table from
nls_iso8859-13.c.


--- linux-2.4.4-ac5/fs/nls/nls_iso8859-13.c Sat Apr 28 20:35:03 2001
+++ linux/fs/nls/nls_iso8859-13.c   Sun May  6 22:42:19 2001
@@ -149,35 +149,6 @@
0x00, 0xca, 0xea, 0xdd, 0xfd, 0xde, 0xfe, 0x00, /* 0x78-0x7f */
 };
 
-static unsigned char page02[256] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
-   0x00, 0xff, 0x00, 0x00, 0xb4, 0xa1, 0xa5, 0x00, /* 0x18-0x1f */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
-   
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */
-};
-
 static unsigned char page20[256] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */


-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] for cp1255

2001-05-06 Thread Andrzej Krzysztofowicz

Hi,
  The following patch fixes a bug in UTF8->CP1255 translation.


--- linux-2.4.4-ac5/fs/nls/nls_cp1255.c Sat Apr 28 20:35:03 2001
+++ linux/fs/nls/nls_cp1255.c   Sun May  6 22:33:19 2001
@@ -254,7 +254,7 @@
 };
 
 static unsigned char *page_uni2charset[256] = {
-   page00, NULL,   NULL,   NULL,   NULL,   page05, NULL,   NULL,   
+   page00, page01, page02, NULL,   NULL,   page05, NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   


-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] for cp1255

2001-05-06 Thread Andrzej Krzysztofowicz

Hi,
  The following patch fixes a bug in UTF8-CP1255 translation.


--- linux-2.4.4-ac5/fs/nls/nls_cp1255.c Sat Apr 28 20:35:03 2001
+++ linux/fs/nls/nls_cp1255.c   Sun May  6 22:33:19 2001
@@ -254,7 +254,7 @@
 };
 
 static unsigned char *page_uni2charset[256] = {
-   page00, NULL,   NULL,   NULL,   NULL,   page05, NULL,   NULL,   
+   page00, page01, page02, NULL,   NULL,   page05, NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   


-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] for iso8859-13

2001-05-06 Thread Andrzej Krzysztofowicz

Hi,
   The following patch removed unused and broken conversion table from
nls_iso8859-13.c.


--- linux-2.4.4-ac5/fs/nls/nls_iso8859-13.c Sat Apr 28 20:35:03 2001
+++ linux/fs/nls/nls_iso8859-13.c   Sun May  6 22:42:19 2001
@@ -149,35 +149,6 @@
0x00, 0xca, 0xea, 0xdd, 0xfd, 0xde, 0xfe, 0x00, /* 0x78-0x7f */
 };
 
-static unsigned char page02[256] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
-   0x00, 0xff, 0x00, 0x00, 0xb4, 0xa1, 0xa5, 0x00, /* 0x18-0x1f */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
-   
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */
-};
-
 static unsigned char page20[256] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */


-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] for koi8-u in 2.4.4-ac5

2001-05-05 Thread Andrzej Krzysztofowicz

Hi,
  I think this patch requires no comment.


diff -ur linux-2.4.4-ac5/fs/nls/nls_koi8-u.c linux/fs/nls/nls_koi8-u.c
--- linux-2.4.4-ac5/fs/nls/nls_koi8-u.c Sat May  5 11:30:21 2001
+++ linux/fs/nls/nls_koi8-u.c   Sun May  6 01:03:37 2001
@@ -141,6 +141,7 @@
0xd2, 0xd3, 0xd4, 0xd5, 0xc6, 0xc8, 0xc3, 0xde, /* 0x40-0x47 */
0xdb, 0xdd, 0xdf, 0xd9, 0xd8, 0xdc, 0xc0, 0xd1, /* 0x48-0x4f */
0x00, 0xa3, 0x00, 0x00, 0xa4, 0x00, 0xa6, 0xa7, /* 0x50-0x57 */
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */


-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] for koi8-u in 2.4.4-ac5

2001-05-05 Thread Andrzej Krzysztofowicz

Hi,
  I think this patch requires no comment.


diff -ur linux-2.4.4-ac5/fs/nls/nls_koi8-u.c linux/fs/nls/nls_koi8-u.c
--- linux-2.4.4-ac5/fs/nls/nls_koi8-u.c Sat May  5 11:30:21 2001
+++ linux/fs/nls/nls_koi8-u.c   Sun May  6 01:03:37 2001
@@ -141,6 +141,7 @@
0xd2, 0xd3, 0xd4, 0xd5, 0xc6, 0xc8, 0xc3, 0xde, /* 0x40-0x47 */
0xdb, 0xdd, 0xdf, 0xd9, 0xd8, 0xdc, 0xc0, 0xd1, /* 0x48-0x4f */
0x00, 0xa3, 0x00, 0x00, 0xa4, 0x00, 0xa6, 0xa7, /* 0x50-0x57 */
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */


-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: 2.4.4-ac4 - oops on unload "cdrom" module

2001-05-04 Thread Andrzej Krzysztofowicz


> This oops happens when I run "rmmod cdrom" on a 2.4.4-ac4 kernel with
> CONFIG_SYSCTL enabled. It doesn't happen if CONFIG_SYSCTL is disabled.
> 
> sr_mod isn't loaded at this point. Reference to sd_mod looks weird. After
> this oops the "cdrom" module remains in memory in the "deleted" state.

> Unable to handle kernel NULL pointer dereference at virtual address 0008
[...]
> >>EIP; c0118051<=

The following patch fixes unloading of cdrom module when no cdrom driver
loaded (2.4.5-pre, 2.4.4-ac):

--- drivers/cdrom/cdrom.c.old   Fri May  4 22:44:31 2001
+++ drivers/cdrom/cdrom.c   Fri May  4 22:54:36 2001
@@ -2698,7 +2698,8 @@
 
 static void cdrom_sysctl_unregister(void)
 {
-   unregister_sysctl_table(cdrom_sysctl_header);
+   if (cdrom_sysctl_header)
+   unregister_sysctl_table(cdrom_sysctl_header);
 }
 
 #endif /* CONFIG_SYSCTL */


Andrzej


-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  tel.  (0-58) 347 14 61
Wydz.Fizyki Technicznej i Matematyki Stosowanej Politechniki Gdanskiej
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: 2.4.4-ac4 - oops on unload cdrom module

2001-05-04 Thread Andrzej Krzysztofowicz


 This oops happens when I run rmmod cdrom on a 2.4.4-ac4 kernel with
 CONFIG_SYSCTL enabled. It doesn't happen if CONFIG_SYSCTL is disabled.
 
 sr_mod isn't loaded at this point. Reference to sd_mod looks weird. After
 this oops the cdrom module remains in memory in the deleted state.

 Unable to handle kernel NULL pointer dereference at virtual address 0008
[...]
 EIP; c0118051 unregister_sysctl_table+5/2c   =

The following patch fixes unloading of cdrom module when no cdrom driver
loaded (2.4.5-pre, 2.4.4-ac):

--- drivers/cdrom/cdrom.c.old   Fri May  4 22:44:31 2001
+++ drivers/cdrom/cdrom.c   Fri May  4 22:54:36 2001
@@ -2698,7 +2698,8 @@
 
 static void cdrom_sysctl_unregister(void)
 {
-   unregister_sysctl_table(cdrom_sysctl_header);
+   if (cdrom_sysctl_header)
+   unregister_sysctl_table(cdrom_sysctl_header);
 }
 
 #endif /* CONFIG_SYSCTL */


Andrzej


-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  tel.  (0-58) 347 14 61
Wydz.Fizyki Technicznej i Matematyki Stosowanej Politechniki Gdanskiej
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] menuconfig

2001-05-03 Thread Andrzej Krzysztofowicz

Hi,
   The following one-liner patch fixes the problem in menuconfig with
handling choice lists containing parentheses (in 2.4.4-ac4 and 2.4.5-pre1).
Please apply...


--- scripts/Menuconfig~ Mon Nov 13 23:14:29 2000
+++ scripts/Menuconfig  Thu May  3 19:45:25 2001
@@ -347,7 +347,7 @@
 
echo -e "
function $firstchoice () \
-   { l_choice '$title' \"$choices\" $current ;}" >>MCradiolists
+   { l_choice '$title' \"$choices\" \"$current\" ;}" >>MCradiolists
 }
 
 } # END load_functions()


-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: xconfig is broken (example ppc 8xx) [PATCH]

2001-05-03 Thread Andrzej Krzysztofowicz

"george anzinger wrote:"
> To show the problem do:
> 
> make xconfig ARCH=ppc
> 
> in the "Platform support" menu "Processor Type" select "8xx" then close
> the subminue with "MainMenu"
> 
> now select "Save and Exit"
> 
> This produces the following error messages:
> 
> ERROR - Attempting to write value for unconfigured variable
> (CONFIG_SCC_ENET).
> ERROR - Attempting to write value for unconfigured variable
> (CONFIG_FEC_ENET).

The following patch shold fix it. It is against 2.4.3-ac14, but should
cleanly apply to the Linus's tree also.

Andrzej

***
diff -ur linux-2.4.3-ac14/arch/ppc/8260_io/Config.in linux/arch/ppc/8260_io/Config.in
--- linux-2.4.3-ac14/arch/ppc/8260_io/Config.in Mon Nov 13 23:13:15 2000
+++ linux/arch/ppc/8260_io/Config.inThu May  3 12:51:28 2001
@@ -4,18 +4,22 @@
 if [ "$CONFIG_NET_ETHERNET" = "y" ]; then
   mainmenu_option next_comment
   comment 'MPC8260 Communication Options'
-  bool 'CPM SCC Ethernet' CONFIG_SCC_ENET
+  bool 'CPM SCC Ethernet' CONFIG_SCC_ENET_8260
+  define_bool CONFIG_SCC_ENET $CONFIG_SCC_ENET_8260
   if [ "$CONFIG_SCC_ENET" = "y" ]; then
-  bool 'Ethernet on SCC1' CONFIG_SCC1_ENET
+bool 'Ethernet on SCC1' CONFIG_SCC1_ENET_8260
+define_bool CONFIG_SCC1_ENET $CONFIG_SCC1_ENET_8260
 if [ "$CONFIG_SCC1_ENET" != "y" ]; then
-  bool 'Ethernet on SCC2' CONFIG_SCC2_ENET
+bool 'Ethernet on SCC2' CONFIG_SCC2_ENET_8260
+define_bool CONFIG_SCC2_ENET $CONFIG_SCC2_ENET_8260
 fi
   fi
 #
 #  CONFIG_FEC_ENET is only used to get netdevices to call our init
 #function.  Any combination of FCC1,2,3 are supported.
 #
-  bool 'FCC Ethernet' CONFIG_FEC_ENET
+  bool 'FCC Ethernet' CONFIG_FEC_ENET_8260
+  define_bool CONFIG_FEC_ENET $CONFIG_FEC_ENET_8260
   if [ "$CONFIG_FEC_ENET" = "y" ]; then
 bool 'Ethernet on FCC1' CONFIG_FCC1_ENET
 bool 'Ethernet on FCC2' CONFIG_FCC2_ENET
diff -ur linux-2.4.3-ac14/arch/ppc/8xx_io/Config.in linux/arch/ppc/8xx_io/Config.in
--- linux-2.4.3-ac14/arch/ppc/8xx_io/Config.in  Wed Apr  4 00:18:05 2001
+++ linux/arch/ppc/8xx_io/Config.in Thu May  3 13:00:29 2001
@@ -5,14 +5,19 @@
 comment 'MPC8xx CPM Options'
 
 if [ "$CONFIG_NET_ETHERNET" = "y" ]; then
-  bool 'CPM SCC Ethernet' CONFIG_SCC_ENET
+   bool 'CPM SCC Ethernet' CONFIG_SCC_ENET_8xx
+   define_bool CONFIG_SCC_ENET $CONFIG_SCC_ENET_8xx
   if [ "$CONFIG_SCC_ENET" = "y" ]; then
 choice 'SCC used for Ethernet' \
-   "SCC1   CONFIG_SCC1_ENET\
-SCC2   CONFIG_SCC2_ENET\
-SCC3   CONFIG_SCC3_ENET"   SCC1
+   "SCC1   CONFIG_SCC1_ENET_8xx\
+SCC2   CONFIG_SCC2_ENET_8xx\
+SCC3   CONFIG_SCC3_ENET_8xx"   SCC1
+  define_bool CONFIG_SCC1_ENET $CONFIG_SCC1_ENET_8xx
+  define_bool CONFIG_SCC2_ENET $CONFIG_SCC2_ENET_8xx
+  define_bool CONFIG_SCC3_ENET $CONFIG_SCC3_ENET_8xx
   fi
-  bool '860T FEC Ethernet' CONFIG_FEC_ENET
+  bool '860T FEC Ethernet' CONFIG_FEC_ENET_8xx
+  define_bool CONFIG_FEC_ENET $CONFIG_FEC_ENET_8xx
   if [ "$CONFIG_FEC_ENET" = "y" ]; then
 bool 'Use MDIO for PHY configuration' CONFIG_USE_MDIO
   fi
diff -ur linux-2.4.3-ac14/arch/ppc/config.in linux/arch/ppc/config.in
--- linux-2.4.3-ac14/arch/ppc/config.in Sun Apr 22 14:48:28 2001
+++ linux/arch/ppc/config.inThu May  3 13:03:03 2001
@@ -34,6 +34,8 @@
 
 if [ "$CONFIG_6xx" = "y" ]; then
   bool 'MPC8260 CPM Support' CONFIG_8260
+else
+   define_bool CONFIG_8260 n
 fi
 
 if [ "$CONFIG_POWER3" = "y" -o "$CONFIG_POWER4" = "y" ]; then
***

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: xconfig is broken (example ppc 8xx) [PATCH]

2001-05-03 Thread Andrzej Krzysztofowicz

george anzinger wrote:
 To show the problem do:
 
 make xconfig ARCH=ppc
 
 in the Platform support menu Processor Type select 8xx then close
 the subminue with MainMenu
 
 now select Save and Exit
 
 This produces the following error messages:
 
 ERROR - Attempting to write value for unconfigured variable
 (CONFIG_SCC_ENET).
 ERROR - Attempting to write value for unconfigured variable
 (CONFIG_FEC_ENET).

The following patch shold fix it. It is against 2.4.3-ac14, but should
cleanly apply to the Linus's tree also.

Andrzej

***
diff -ur linux-2.4.3-ac14/arch/ppc/8260_io/Config.in linux/arch/ppc/8260_io/Config.in
--- linux-2.4.3-ac14/arch/ppc/8260_io/Config.in Mon Nov 13 23:13:15 2000
+++ linux/arch/ppc/8260_io/Config.inThu May  3 12:51:28 2001
@@ -4,18 +4,22 @@
 if [ $CONFIG_NET_ETHERNET = y ]; then
   mainmenu_option next_comment
   comment 'MPC8260 Communication Options'
-  bool 'CPM SCC Ethernet' CONFIG_SCC_ENET
+  bool 'CPM SCC Ethernet' CONFIG_SCC_ENET_8260
+  define_bool CONFIG_SCC_ENET $CONFIG_SCC_ENET_8260
   if [ $CONFIG_SCC_ENET = y ]; then
-  bool 'Ethernet on SCC1' CONFIG_SCC1_ENET
+bool 'Ethernet on SCC1' CONFIG_SCC1_ENET_8260
+define_bool CONFIG_SCC1_ENET $CONFIG_SCC1_ENET_8260
 if [ $CONFIG_SCC1_ENET != y ]; then
-  bool 'Ethernet on SCC2' CONFIG_SCC2_ENET
+bool 'Ethernet on SCC2' CONFIG_SCC2_ENET_8260
+define_bool CONFIG_SCC2_ENET $CONFIG_SCC2_ENET_8260
 fi
   fi
 #
 #  CONFIG_FEC_ENET is only used to get netdevices to call our init
 #function.  Any combination of FCC1,2,3 are supported.
 #
-  bool 'FCC Ethernet' CONFIG_FEC_ENET
+  bool 'FCC Ethernet' CONFIG_FEC_ENET_8260
+  define_bool CONFIG_FEC_ENET $CONFIG_FEC_ENET_8260
   if [ $CONFIG_FEC_ENET = y ]; then
 bool 'Ethernet on FCC1' CONFIG_FCC1_ENET
 bool 'Ethernet on FCC2' CONFIG_FCC2_ENET
diff -ur linux-2.4.3-ac14/arch/ppc/8xx_io/Config.in linux/arch/ppc/8xx_io/Config.in
--- linux-2.4.3-ac14/arch/ppc/8xx_io/Config.in  Wed Apr  4 00:18:05 2001
+++ linux/arch/ppc/8xx_io/Config.in Thu May  3 13:00:29 2001
@@ -5,14 +5,19 @@
 comment 'MPC8xx CPM Options'
 
 if [ $CONFIG_NET_ETHERNET = y ]; then
-  bool 'CPM SCC Ethernet' CONFIG_SCC_ENET
+   bool 'CPM SCC Ethernet' CONFIG_SCC_ENET_8xx
+   define_bool CONFIG_SCC_ENET $CONFIG_SCC_ENET_8xx
   if [ $CONFIG_SCC_ENET = y ]; then
 choice 'SCC used for Ethernet' \
-   SCC1   CONFIG_SCC1_ENET\
-SCC2   CONFIG_SCC2_ENET\
-SCC3   CONFIG_SCC3_ENET   SCC1
+   SCC1   CONFIG_SCC1_ENET_8xx\
+SCC2   CONFIG_SCC2_ENET_8xx\
+SCC3   CONFIG_SCC3_ENET_8xx   SCC1
+  define_bool CONFIG_SCC1_ENET $CONFIG_SCC1_ENET_8xx
+  define_bool CONFIG_SCC2_ENET $CONFIG_SCC2_ENET_8xx
+  define_bool CONFIG_SCC3_ENET $CONFIG_SCC3_ENET_8xx
   fi
-  bool '860T FEC Ethernet' CONFIG_FEC_ENET
+  bool '860T FEC Ethernet' CONFIG_FEC_ENET_8xx
+  define_bool CONFIG_FEC_ENET $CONFIG_FEC_ENET_8xx
   if [ $CONFIG_FEC_ENET = y ]; then
 bool 'Use MDIO for PHY configuration' CONFIG_USE_MDIO
   fi
diff -ur linux-2.4.3-ac14/arch/ppc/config.in linux/arch/ppc/config.in
--- linux-2.4.3-ac14/arch/ppc/config.in Sun Apr 22 14:48:28 2001
+++ linux/arch/ppc/config.inThu May  3 13:03:03 2001
@@ -34,6 +34,8 @@
 
 if [ $CONFIG_6xx = y ]; then
   bool 'MPC8260 CPM Support' CONFIG_8260
+else
+   define_bool CONFIG_8260 n
 fi
 
 if [ $CONFIG_POWER3 = y -o $CONFIG_POWER4 = y ]; then
***

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] menuconfig

2001-05-03 Thread Andrzej Krzysztofowicz

Hi,
   The following one-liner patch fixes the problem in menuconfig with
handling choice lists containing parentheses (in 2.4.4-ac4 and 2.4.5-pre1).
Please apply...


--- scripts/Menuconfig~ Mon Nov 13 23:14:29 2000
+++ scripts/Menuconfig  Thu May  3 19:45:25 2001
@@ -347,7 +347,7 @@
 
echo -e 
function $firstchoice () \
-   { l_choice '$title' \$choices\ $current ;} MCradiolists
+   { l_choice '$title' \$choices\ \$current\ ;} MCradiolists
 }
 
 } # END load_functions()


-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: xconfig is broken (example ppc 8xx)

2001-05-02 Thread Andrzej Krzysztofowicz

> To show the problem do:
> 
> make xconfig ARCH=ppc
> 
> in the "Platform support" menu "Processor Type" select "8xx" then close
> the subminue with "MainMenu"
> 
> now select "Save and Exit"
> 
> This produces the following error messages:
> 
> ERROR - Attempting to write value for unconfigured variable
> (CONFIG_SCC_ENET).
> ERROR - Attempting to write value for unconfigured variable
> (CONFIG_FEC_ENET).

> I think the problem is that the "wish" script builder does not allow a
> CONFIG option to be configured in two different places, even if only one

Exactly.

> of scripts should be included.

xconfig is not an on-line parser as other interpreters.
It is a script build as effect of parsing of the whole config tree
and includes all possible options.

The problem is that xconfig is based on an assumption that an
unconfigured/disabled option variable preserves its value (as "hidden")
for future reuse. It is in generel contradiction with reusing same
option in more than ane place in the config tree.

And nobody wants to rewrite xconfig (removing the mentioned above
assumption) at the end (hopefully in 2.5) of its life ...

Andrzej
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: xconfig is broken (example ppc 8xx)

2001-05-02 Thread Andrzej Krzysztofowicz

 To show the problem do:
 
 make xconfig ARCH=ppc
 
 in the Platform support menu Processor Type select 8xx then close
 the subminue with MainMenu
 
 now select Save and Exit
 
 This produces the following error messages:
 
 ERROR - Attempting to write value for unconfigured variable
 (CONFIG_SCC_ENET).
 ERROR - Attempting to write value for unconfigured variable
 (CONFIG_FEC_ENET).

 I think the problem is that the wish script builder does not allow a
 CONFIG option to be configured in two different places, even if only one

Exactly.

 of scripts should be included.

xconfig is not an on-line parser as other interpreters.
It is a script build as effect of parsing of the whole config tree
and includes all possible options.

The problem is that xconfig is based on an assumption that an
unconfigured/disabled option variable preserves its value (as hidden)
for future reuse. It is in generel contradiction with reusing same
option in more than ane place in the config tree.

And nobody wants to rewrite xconfig (removing the mentioned above
assumption) at the end (hopefully in 2.5) of its life ...

Andrzej
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: iso9660 endianness cleanup patch

2001-05-01 Thread Andrzej Krzysztofowicz


Are you sure that the arguments of the following casting

> + return le16_to_cpu(*(u16 *)p);

> + return be16_to_cpu(*(u16 *)p);

> + return le32_to_cpu(*(u32 *)p);

> + return be32_to_cpu(*(u32 *)p);

are properly aligned ?
I did not revise the code to check it, but AFAIK improperly aligned
char* pointers cause problem with casting to pointers to 16/32-bit data
on some architectures (I heard of sucj a problem with alpha).

Maybe there was a reason that the original code did operate on bytes here...

Andrzej

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: iso9660 endianness cleanup patch

2001-05-01 Thread Andrzej Krzysztofowicz


Are you sure that the arguments of the following casting

 + return le16_to_cpu(*(u16 *)p);

 + return be16_to_cpu(*(u16 *)p);

 + return le32_to_cpu(*(u32 *)p);

 + return be32_to_cpu(*(u32 *)p);

are properly aligned ?
I did not revise the code to check it, but AFAIK improperly aligned
char* pointers cause problem with casting to pointers to 16/32-bit data
on some architectures (I heard of sucj a problem with alpha).

Maybe there was a reason that the original code did operate on bytes here...

Andrzej

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: 2.4.4-pre7 build failure w/ IP NAT and ipchains

2001-04-27 Thread Andrzej Krzysztofowicz

"Matthias Andree wrote:"
> On Fri, 27 Apr 2001, David S. Miller wrote:
> > Your configuration seems impossible, somehow the config system allowed
> > you to set CONFIG_IP_NF_COMPAT_IPCHAINS without setting
> > CONFIG_IP_NF_CONNTRACK.

Just quick look at net/ipv4/netfilter/Config.in explains everything:

: if [ "$CONFIG_IP_NF_CONNTRACK" != "y" ]; then
:   if [ "$CONFIG_IP_NF_IPTABLES" != "y" ]; then
: tristate 'ipchains (2.2-style) support' CONFIG_IP_NF_COMPAT_IPCHAINS

CONFIG_IP_NF_COMPAT_IPCHAINS depends on CONFIG_IP_NF_CONNTRACK being
disabled. And it seems to be intentional...

> Now, if I set "connection tracking" to "y", the ipchains option
> disappears (make menuconfig). Are things supposed to behave this way?
> I'd like to stick to ipchains for a while, rather than switch to
> iptables. (Administrator laziness, of course.)

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: 2.4.4-pre7 build failure w/ IP NAT and ipchains

2001-04-27 Thread Andrzej Krzysztofowicz

Matthias Andree wrote:
 On Fri, 27 Apr 2001, David S. Miller wrote:
  Your configuration seems impossible, somehow the config system allowed
  you to set CONFIG_IP_NF_COMPAT_IPCHAINS without setting
  CONFIG_IP_NF_CONNTRACK.

Just quick look at net/ipv4/netfilter/Config.in explains everything:

: if [ $CONFIG_IP_NF_CONNTRACK != y ]; then
:   if [ $CONFIG_IP_NF_IPTABLES != y ]; then
: tristate 'ipchains (2.2-style) support' CONFIG_IP_NF_COMPAT_IPCHAINS

CONFIG_IP_NF_COMPAT_IPCHAINS depends on CONFIG_IP_NF_CONNTRACK being
disabled. And it seems to be intentional...

 Now, if I set connection tracking to y, the ipchains option
 disappears (make menuconfig). Are things supposed to behave this way?
 I'd like to stick to ipchains for a while, rather than switch to
 iptables. (Administrator laziness, of course.)

-- 
===
  Andrzej M. Krzysztofowicz   [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys.  Math.,   Technical University of Gdansk
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



  1   2   3   >