Re: [PATCH] eepro 0.12c

2000-09-26 Thread Jes Sorensen

> "Alan" == Alan Cox <[EMAIL PROTECTED]> writes:

Alan> unsigned is always explicitly integer.
>> And recent gcc's complain over it.

Alan> So file a gcc bug ?

Hmmm and it doesn't seem to moan over it anymore, highly embarrassing
;-( Sorry Aris.

I remember Andreas changed some of these in I think the file system
code about 1.5 years ago for that reason though.

Oh well, unsigned without the int it still ugly of course ;-)

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



Re: [PATCH] eepro 0.12c

2000-09-26 Thread Jes Sorensen

> "Alan" == Alan Cox <[EMAIL PROTECTED]> writes:

Alan> unsigned is always explicitly integer.
>> And recent gcc's complain over it.

Alan> So file a gcc bug ?

Ok, I got it now - I confused 'unsigned foo' with 'static foo' the
latter being moaned about.

Sorry about the confusion.

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



Re: [PATCH] eepro 0.12c

2000-09-26 Thread Zbigniew Chyla



On Tue, 26 Sep 2000, Alan Cox wrote:

> > Alan> unsigned is always explicitly integer.
> > And recent gcc's complain over it.
> 
> So file a gcc bug ?

AFAIK C99 spec requires full type description ("unsigned int"), gcc just
follows the spec.


Zbigniew Chyla

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



Re: [PATCH] eepro 0.12c

2000-09-26 Thread Alan Cox

> Alan> unsigned is always explicitly integer.
> And recent gcc's complain over it.

So file a gcc bug ?


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



Re: [PATCH] eepro 0.12c

2000-09-26 Thread Jes Sorensen

> "Alan" == Alan Cox <[EMAIL PROTECTED]> writes:

aris> + unsigned xmt_lower_limit_reg; + unsigned xmt_upper_limit_reg;
aris> + unsigned eeprom_reg; };
>>  Please don't use unsigned without specifying the size, use either
>> unsigned int or unsigned long.

Alan> unsigned is always explicitly integer.

And recent gcc's complain over it.

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



Re: [PATCH] eepro 0.12c

2000-09-26 Thread Alan Cox

> aris> + unsigned xmt_lower_limit_reg;
> aris> + unsigned xmt_upper_limit_reg;
> aris> +   unsigned eeprom_reg;
> aris>  };
> 
> Please don't use unsigned without specifying the size, use either
> unsigned int or unsigned long.

unsigned is always explicitly integer.

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



Re: [PATCH] eepro 0.12c

2000-09-26 Thread Peter Samuelson


[Jes Sørensen]
> Please don't use unsigned without specifying the size, use either
> unsigned int or unsigned long.

This is just a stylistic issue, right?  I believe 'unsigned' is short
(no pun intended) for 'unsigned int', just as 'long' is short for 'long
int'.  I find both forms about equally readable -- but I can understand
if others don't.

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



Re: [PATCH] eepro 0.12c

2000-09-26 Thread aris

hi,
done, thanks Jes!

On 26 Sep 2000, Jes Sorensen wrote:

> > "aris" == aris  <[EMAIL PROTECTED]> writes:
> 
> aris> hi, misc fixes on eepro driver, please apply
> 
> aris> @@ -212,6 +214,12 @@
> aris>version of the 82595 chip. */
> aris>   int stepping;
> aris>   spinlock_t lock; /* Serializing lock  */ 
> aris> + unsigned rcv_ram;
> aris> + unsigned rcv_start;
> aris> +   unsigned xmt_bar;
> aris> + unsigned xmt_lower_limit_reg;
> aris> + unsigned xmt_upper_limit_reg;
> aris> +   unsigned eeprom_reg;
> aris>  };
> 
> Please don't use unsigned without specifying the size, use either
> unsigned int or unsigned long.
> 
> Cheers,
> Jes
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [EMAIL PROTECTED]
> Please read the FAQ at http://www.tux.org/lkml/
> 

-- 
Aris
---
Aristeu Sergio Rozanski Filho [EMAIL PROTECTED]
---


--- linux/drivers/net/eepro.c.old   Tue Sep 12 15:41:50 2000
+++ linux/drivers/net/eepro.c   Tue Sep 26 12:46:27 2000
@@ -23,6 +23,8 @@
This is a compatibility hardware problem.
 
Versions:
+   0.12c   fixed other multiple cards bug and other cleanups
+   (aris, 08/21/2000)
0.12b   added reset when the tx interrupt is called and TX isn't done
and other minor fixes. this may fix a problem found after
initialization that delays tx until a transmit timeout is 
@@ -201,10 +203,10 @@
 /* Information that need to be kept for each board. */
 struct eepro_local {
struct enet_statistics stats;
-   unsigned rx_start;
-   unsigned tx_start; /* start of the transmit chain */
+   unsigned int rx_start;
+   unsigned int tx_start; /* start of the transmit chain */
int tx_last;  /* pointer to last packet in the transmit chain */
-   unsigned tx_end;   /* end of the transmit chain (plus 1) */
+   unsigned int tx_end;   /* end of the transmit chain (plus 1) */
int eepro;  /* 1 for the EtherExpress Pro/10,
   2 for the EtherExpress Pro/10+,
   0 for other 82595-based lan cards. */
@@ -212,6 +214,12 @@
   version of the 82595 chip. */
int stepping;
spinlock_t lock; /* Serializing lock  */ 
+   unsigned int rcv_ram;
+   unsigned int rcv_start;
+   unsigned int xmt_bar;
+   unsigned int xmt_lower_limit_reg;
+   unsigned int xmt_upper_limit_reg;
+   unsigned int eeprom_reg;
 };
 
 /* The station (ethernet) address prefix, used for IDing the board. */
@@ -356,24 +364,20 @@
 
 #defineRCV_HEADER  8
 #define RCV_DEFAULT_RAM0x6000
-#define RCV_RAMrcv_ram
-
-static unsigned rcv_ram = RCV_DEFAULT_RAM;
+#define RCV_RAMlp->rcv_ram
 
 #define XMT_HEADER 8
 #define XMT_RAM(RAM_SIZE - RCV_RAM)
 
-#define XMT_START  ((rcv_start + RCV_RAM) % RAM_SIZE)
+#define XMT_START  ((lp->rcv_start + RCV_RAM) % RAM_SIZE)
 
-#define RCV_LOWER_LIMIT(rcv_start >> 8)
-#define RCV_UPPER_LIMIT(((rcv_start + RCV_RAM) - 2) >> 8)
+#define RCV_LOWER_LIMIT(lp->rcv_start >> 8)
+#define RCV_UPPER_LIMIT(((lp->rcv_start + RCV_RAM) - 2) >> 8)
 #define XMT_LOWER_LIMIT(XMT_START >> 8)
 #define XMT_UPPER_LIMIT(((XMT_START + XMT_RAM) - 2) >> 8)
 
 #define RCV_START_PRO  0x00
 #define RCV_START_10   XMT_RAM
-   /* by default the old driver */
-static unsigned rcv_start = RCV_START_PRO;
 
 #defineRCV_DONE0x0008
 #defineRX_OK   0x2000
@@ -422,7 +426,6 @@
 
 #defineXMT_BAR_PRO 0x0a
 #defineXMT_BAR_10  0x0b
-static unsigned xmt_bar = XMT_BAR_PRO;
 
 #defineHOST_ADDRESS_REG0x0c
 #defineIO_PORT 0x0e
@@ -440,8 +443,6 @@
 #defineXMT_UPPER_LIMIT_REG_PRO 0x0b
 #defineXMT_LOWER_LIMIT_REG_10  0x0b
 #defineXMT_UPPER_LIMIT_REG_10  0x0a
-static unsigned xmt_lower_limit_reg = XMT_LOWER_LIMIT_REG_PRO;
-static unsigned xmt_upper_limit_reg = XMT_UPPER_LIMIT_REG_PRO;
 
 /* Bank 2 registers */
 #defineXMT_Chain_Int   0x20/* Interrupt at the end of the transmit chain 
*/
@@ -466,7 +467,6 @@
 
 #define EEPROM_REG_PRO 0x0a
 #define EEPROM_REG_10  0x0b
-static unsigned eeprom_reg = EEPROM_REG_PRO;
 
 #define EESK 0x01
 #define EECS 0x02
@@ -528,7 +528,8 @@
 #define eepro_ack_tx(ioaddr) outb (TX_INT, ioaddr + STATUS_REG)
 
 /* a complete sel reset */
-#define 

Re: [PATCH] eepro 0.12c

2000-09-26 Thread Jes Sorensen

> "aris" == aris  <[EMAIL PROTECTED]> writes:

aris> hi, misc fixes on eepro driver, please apply

aris> @@ -212,6 +214,12 @@
aris>  version of the 82595 chip. */
aris> int stepping;
aris> spinlock_t lock; /* Serializing lock  */ 
aris> +   unsigned rcv_ram;
aris> +   unsigned rcv_start;
aris> +   unsigned xmt_bar;
aris> +   unsigned xmt_lower_limit_reg;
aris> +   unsigned xmt_upper_limit_reg;
aris> +   unsigned eeprom_reg;
aris>  };

Please don't use unsigned without specifying the size, use either
unsigned int or unsigned long.

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



Re: [PATCH] eepro 0.12c

2000-09-26 Thread Jes Sorensen

 "aris" == aris  [EMAIL PROTECTED] writes:

aris hi, misc fixes on eepro driver, please apply

aris @@ -212,6 +214,12 @@
aris  version of the 82595 chip. */
aris int stepping;
aris spinlock_t lock; /* Serializing lock  */ 
aris +   unsigned rcv_ram;
aris +   unsigned rcv_start;
aris +   unsigned xmt_bar;
aris +   unsigned xmt_lower_limit_reg;
aris +   unsigned xmt_upper_limit_reg;
aris +   unsigned eeprom_reg;
aris  };

Please don't use unsigned without specifying the size, use either
unsigned int or unsigned long.

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



Re: [PATCH] eepro 0.12c

2000-09-26 Thread aris

hi,
done, thanks Jes!

On 26 Sep 2000, Jes Sorensen wrote:

  "aris" == aris  [EMAIL PROTECTED] writes:
 
 aris hi, misc fixes on eepro driver, please apply
 
 aris @@ -212,6 +214,12 @@
 arisversion of the 82595 chip. */
 aris   int stepping;
 aris   spinlock_t lock; /* Serializing lock  */ 
 aris + unsigned rcv_ram;
 aris + unsigned rcv_start;
 aris +   unsigned xmt_bar;
 aris + unsigned xmt_lower_limit_reg;
 aris + unsigned xmt_upper_limit_reg;
 aris +   unsigned eeprom_reg;
 aris  };
 
 Please don't use unsigned without specifying the size, use either
 unsigned int or unsigned long.
 
 Cheers,
 Jes
 -
 To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
 the body of a message to [EMAIL PROTECTED]
 Please read the FAQ at http://www.tux.org/lkml/
 

-- 
Aris
---
Aristeu Sergio Rozanski Filho [EMAIL PROTECTED]
---


--- linux/drivers/net/eepro.c.old   Tue Sep 12 15:41:50 2000
+++ linux/drivers/net/eepro.c   Tue Sep 26 12:46:27 2000
@@ -23,6 +23,8 @@
This is a compatibility hardware problem.
 
Versions:
+   0.12c   fixed other multiple cards bug and other cleanups
+   (aris, 08/21/2000)
0.12b   added reset when the tx interrupt is called and TX isn't done
and other minor fixes. this may fix a problem found after
initialization that delays tx until a transmit timeout is 
@@ -201,10 +203,10 @@
 /* Information that need to be kept for each board. */
 struct eepro_local {
struct enet_statistics stats;
-   unsigned rx_start;
-   unsigned tx_start; /* start of the transmit chain */
+   unsigned int rx_start;
+   unsigned int tx_start; /* start of the transmit chain */
int tx_last;  /* pointer to last packet in the transmit chain */
-   unsigned tx_end;   /* end of the transmit chain (plus 1) */
+   unsigned int tx_end;   /* end of the transmit chain (plus 1) */
int eepro;  /* 1 for the EtherExpress Pro/10,
   2 for the EtherExpress Pro/10+,
   0 for other 82595-based lan cards. */
@@ -212,6 +214,12 @@
   version of the 82595 chip. */
int stepping;
spinlock_t lock; /* Serializing lock  */ 
+   unsigned int rcv_ram;
+   unsigned int rcv_start;
+   unsigned int xmt_bar;
+   unsigned int xmt_lower_limit_reg;
+   unsigned int xmt_upper_limit_reg;
+   unsigned int eeprom_reg;
 };
 
 /* The station (ethernet) address prefix, used for IDing the board. */
@@ -356,24 +364,20 @@
 
 #defineRCV_HEADER  8
 #define RCV_DEFAULT_RAM0x6000
-#define RCV_RAMrcv_ram
-
-static unsigned rcv_ram = RCV_DEFAULT_RAM;
+#define RCV_RAMlp-rcv_ram
 
 #define XMT_HEADER 8
 #define XMT_RAM(RAM_SIZE - RCV_RAM)
 
-#define XMT_START  ((rcv_start + RCV_RAM) % RAM_SIZE)
+#define XMT_START  ((lp-rcv_start + RCV_RAM) % RAM_SIZE)
 
-#define RCV_LOWER_LIMIT(rcv_start  8)
-#define RCV_UPPER_LIMIT(((rcv_start + RCV_RAM) - 2)  8)
+#define RCV_LOWER_LIMIT(lp-rcv_start  8)
+#define RCV_UPPER_LIMIT(((lp-rcv_start + RCV_RAM) - 2)  8)
 #define XMT_LOWER_LIMIT(XMT_START  8)
 #define XMT_UPPER_LIMIT(((XMT_START + XMT_RAM) - 2)  8)
 
 #define RCV_START_PRO  0x00
 #define RCV_START_10   XMT_RAM
-   /* by default the old driver */
-static unsigned rcv_start = RCV_START_PRO;
 
 #defineRCV_DONE0x0008
 #defineRX_OK   0x2000
@@ -422,7 +426,6 @@
 
 #defineXMT_BAR_PRO 0x0a
 #defineXMT_BAR_10  0x0b
-static unsigned xmt_bar = XMT_BAR_PRO;
 
 #defineHOST_ADDRESS_REG0x0c
 #defineIO_PORT 0x0e
@@ -440,8 +443,6 @@
 #defineXMT_UPPER_LIMIT_REG_PRO 0x0b
 #defineXMT_LOWER_LIMIT_REG_10  0x0b
 #defineXMT_UPPER_LIMIT_REG_10  0x0a
-static unsigned xmt_lower_limit_reg = XMT_LOWER_LIMIT_REG_PRO;
-static unsigned xmt_upper_limit_reg = XMT_UPPER_LIMIT_REG_PRO;
 
 /* Bank 2 registers */
 #defineXMT_Chain_Int   0x20/* Interrupt at the end of the transmit chain 
*/
@@ -466,7 +467,6 @@
 
 #define EEPROM_REG_PRO 0x0a
 #define EEPROM_REG_10  0x0b
-static unsigned eeprom_reg = EEPROM_REG_PRO;
 
 #define EESK 0x01
 #define EECS 0x02
@@ -528,7 +528,8 @@
 #define eepro_ack_tx(ioaddr) outb (TX_INT, ioaddr + STATUS_REG)
 
 /* a complete sel reset */
-#define eepro_complete_selreset(ioaddr) {  eepro_dis_int(ioaddr);\
+#define 

Re: [PATCH] eepro 0.12c

2000-09-26 Thread Peter Samuelson


[Jes Sørensen]
 Please don't use unsigned without specifying the size, use either
 unsigned int or unsigned long.

This is just a stylistic issue, right?  I believe 'unsigned' is short
(no pun intended) for 'unsigned int', just as 'long' is short for 'long
int'.  I find both forms about equally readable -- but I can understand
if others don't.

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



Re: [PATCH] eepro 0.12c

2000-09-26 Thread Alan Cox

 aris + unsigned xmt_lower_limit_reg;
 aris + unsigned xmt_upper_limit_reg;
 aris +   unsigned eeprom_reg;
 aris  };
 
 Please don't use unsigned without specifying the size, use either
 unsigned int or unsigned long.

unsigned is always explicitly integer.

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



Re: [PATCH] eepro 0.12c

2000-09-26 Thread Jes Sorensen

 "Alan" == Alan Cox [EMAIL PROTECTED] writes:

aris + unsigned xmt_lower_limit_reg; + unsigned xmt_upper_limit_reg;
aris + unsigned eeprom_reg; };
  Please don't use unsigned without specifying the size, use either
 unsigned int or unsigned long.

Alan unsigned is always explicitly integer.

And recent gcc's complain over it.

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



Re: [PATCH] eepro 0.12c

2000-09-26 Thread Alan Cox

 Alan unsigned is always explicitly integer.
 And recent gcc's complain over it.

So file a gcc bug ?


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



Re: [PATCH] eepro 0.12c

2000-09-26 Thread Zbigniew Chyla



On Tue, 26 Sep 2000, Alan Cox wrote:

  Alan unsigned is always explicitly integer.
  And recent gcc's complain over it.
 
 So file a gcc bug ?

AFAIK C99 spec requires full type description ("unsigned int"), gcc just
follows the spec.


Zbigniew Chyla

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



Re: [PATCH] eepro 0.12c

2000-09-26 Thread Jes Sorensen

 "Alan" == Alan Cox [EMAIL PROTECTED] writes:

Alan unsigned is always explicitly integer.
 And recent gcc's complain over it.

Alan So file a gcc bug ?

Ok, I got it now - I confused 'unsigned foo' with 'static foo' the
latter being moaned about.

Sorry about the confusion.

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



Re: [PATCH] eepro 0.12c

2000-09-26 Thread Jes Sorensen

 "Alan" == Alan Cox [EMAIL PROTECTED] writes:

Alan unsigned is always explicitly integer.
 And recent gcc's complain over it.

Alan So file a gcc bug ?

Hmmm and it doesn't seem to moan over it anymore, highly embarrassing
;-( Sorry Aris.

I remember Andreas changed some of these in I think the file system
code about 1.5 years ago for that reason though.

Oh well, unsigned without the int it still ugly of course ;-)

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