* [PATCH] eepro 0.13a
@ 2002-07-30 12:56 Aristeu Sergio Rozanski Filho
0 siblings, 0 replies; 6+ messages in thread
From: Aristeu Sergio Rozanski Filho @ 2002-07-30 12:56 UTC (permalink / raw)
To: Marcelo Tosatti, Linus Torvalds; +Cc: linux-kernel, Michael Westermann
[-- Attachment #1: Type: text/plain, Size: 189 bytes --]
these changes was sent by Michael Westermann.
changelog:
* in memory shortage, drop the packet also in board
* remove KERN_ macros in printk calls that doesn't start a new line
--
aris
[-- Attachment #2: eepro-2.2-0.13a.diff --]
[-- Type: text/plain, Size: 2414 bytes --]
--- linux-2.2.21/drivers/net/eepro.c.old Tue Jul 30 09:27:55 2002
+++ linux-2.2.21/drivers/net/eepro.c Tue Jul 30 09:32:48 2002
@@ -23,6 +23,8 @@
This is a compatibility hardware problem.
Versions:
+ 0.13a in memory shortage, drop packets also in board
+ (Michael Westermann <mw@microdata-pos.de>, 07/30/2002)
0.13 irq sharing, rewrote probe function, fixed a nasty bug in
hardware_send_packet and a major cleanup (aris, 11/08/2001)
0.12d tottaly isolated old code to new code (blue cards).
@@ -633,37 +633,37 @@
i = inb(dev->base_addr + ID_REG);
printk(KERN_DEBUG " id: %#x ",i);
- printk(KERN_DEBUG " io: %#x ", (unsigned)dev->base_addr);
+ printk(" io: %#x ", (unsigned)dev->base_addr);
switch (lp->eepro) {
case LAN595FX_10ISA:
- printk(KERN_INFO "%s: Intel EtherExpress 10 ISA\n at %#x,",
+ printk("%s: Intel EtherExpress 10 ISA\n at %#x,",
dev->name, (unsigned)dev->base_addr);
break;
case LAN595FX:
- printk(KERN_INFO "%s: Intel EtherExpress Pro/10+ ISA\n at %#x,",
+ printk("%s: Intel EtherExpress Pro/10+ ISA\n at %#x,",
dev->name, (unsigned)dev->base_addr);
break;
case LAN595TX:
- printk(KERN_INFO "%s: Intel EtherExpress Pro/10 ISA at %#x,",
+ printk("%s: Intel EtherExpress Pro/10 ISA at %#x,",
dev->name, (unsigned)dev->base_addr);
break;
case LAN595:
- printk(KERN_INFO "%s: Intel 82595-based lan card at %#x,",
+ printk("%s: Intel 82595-based lan card at %#x,",
dev->name, (unsigned)dev->base_addr);
}
for (i=0; i < 6; i++)
- printk(KERN_INFO "%c%02x", i ? ':' : ' ', dev->dev_addr[i]);
+ printk("%c%02x", i ? ':' : ' ', dev->dev_addr[i]);
if (net_debug > 3)
printk(KERN_DEBUG ", %dK RCV buffer",
(int)(lp->rcv_ram)/1024);
if (dev->irq > 2)
- printk(KERN_INFO ", IRQ %d, %s.\n", dev->irq, ifmap[dev->if_port]);
+ printk(", IRQ %d, %s.\n", dev->irq, ifmap[dev->if_port]);
else
- printk(KERN_INFO ", %s.\n", ifmap[dev->if_port]);
+ printk(", %s.\n", ifmap[dev->if_port]);
if (net_debug > 3) {
i = read_eeprom(dev->base_addr, 5, dev);
@@ -1548,6 +1550,10 @@
if (skb == NULL) {
printk(KERN_NOTICE "%s: Memory squeeze, dropping packet.\n", dev->name);
lp->stats.rx_dropped++;
+ rcv_car = lp->rx_start + RCV_HEADER + rcv_size;
+ lp->rx_start = rcv_next_frame;
+ outw(rcv_next_frame, ioaddr + HOST_ADDRESS_REG);
+
break;
}
skb->dev = dev;
[-- Attachment #3: eepro-2.4-0.13a.diff --]
[-- Type: text/plain, Size: 2439 bytes --]
--- linux-2.4.19-pre/drivers/net/eepro.c.old Tue Jul 30 09:36:08 2002
+++ linux-2.4.19-pre/drivers/net/eepro.c Tue Jul 30 09:34:54 2002
@@ -23,6 +23,8 @@
This is a compatibility hardware problem.
Versions:
+ 0.13a in memory shortage, drop packets also in board
+ (Michael Westermann <mw@microdata-pos.de>, 07/30/2002)
0.13 irq sharing, rewrote probe function, fixed a nasty bug in
hardware_send_packet and a major cleanup (aris, 11/08/2001)
0.12d fixing a problem with single card detected as eight eth devices
@@ -633,37 +633,37 @@
i = inb(dev->base_addr + ID_REG);
printk(KERN_DEBUG " id: %#x ",i);
- printk(KERN_DEBUG " io: %#x ", (unsigned)dev->base_addr);
+ printk(" io: %#x ", (unsigned)dev->base_addr);
switch (lp->eepro) {
case LAN595FX_10ISA:
- printk(KERN_INFO "%s: Intel EtherExpress 10 ISA\n at %#x,",
+ printk("%s: Intel EtherExpress 10 ISA\n at %#x,",
dev->name, (unsigned)dev->base_addr);
break;
case LAN595FX:
- printk(KERN_INFO "%s: Intel EtherExpress Pro/10+ ISA\n at %#x,",
+ printk("%s: Intel EtherExpress Pro/10+ ISA\n at %#x,",
dev->name, (unsigned)dev->base_addr);
break;
case LAN595TX:
- printk(KERN_INFO "%s: Intel EtherExpress Pro/10 ISA at %#x,",
+ printk("%s: Intel EtherExpress Pro/10 ISA at %#x,",
dev->name, (unsigned)dev->base_addr);
break;
case LAN595:
- printk(KERN_INFO "%s: Intel 82595-based lan card at %#x,",
+ printk("%s: Intel 82595-based lan card at %#x,",
dev->name, (unsigned)dev->base_addr);
}
for (i=0; i < 6; i++)
- printk(KERN_INFO "%c%02x", i ? ':' : ' ', dev->dev_addr[i]);
+ printk("%c%02x", i ? ':' : ' ', dev->dev_addr[i]);
if (net_debug > 3)
printk(KERN_DEBUG ", %dK RCV buffer",
(int)(lp->rcv_ram)/1024);
if (dev->irq > 2)
- printk(KERN_INFO ", IRQ %d, %s.\n", dev->irq, ifmap[dev->if_port]);
+ printk(", IRQ %d, %s.\n", dev->irq, ifmap[dev->if_port]);
else
- printk(KERN_INFO ", %s.\n", ifmap[dev->if_port]);
+ printk(", %s.\n", ifmap[dev->if_port]);
if (net_debug > 3) {
i = read_eeprom(dev->base_addr, 5, dev);
@@ -1578,6 +1580,10 @@
if (skb == NULL) {
printk(KERN_NOTICE "%s: Memory squeeze, dropping packet.\n", dev->name);
lp->stats.rx_dropped++;
+ rcv_car = lp->rx_start + RCV_HEADER + rcv_size;
+ lp->rx_start = rcv_next_frame;
+ outw(rcv_next_frame, ioaddr + HOST_ADDRESS_REG);
+
break;
}
skb->dev = dev;
[-- Attachment #4: eepro-2.5-0.13a.diff --]
[-- Type: text/plain, Size: 2432 bytes --]
--- linux-2.5.26/drivers/net/eepro.c.orig Tue Jul 16 20:49:36 2002
+++ linux-2.5.26/drivers/net/eepro.c Tue Jul 30 09:37:00 2002
@@ -23,6 +23,8 @@
This is a compatibility hardware problem.
Versions:
+ 0.13a in memory shortage, drop packets also in board
+ (Michael Westermann <mw@microdata-pos.de>, 07/30/2002)
0.13 irq sharing, rewrote probe function, fixed a nasty bug in
hardware_send_packet and a major cleanup (aris, 11/08/2001)
0.12d fixing a problem with single card detected as eight eth devices
@@ -633,37 +633,37 @@
i = inb(dev->base_addr + ID_REG);
printk(KERN_DEBUG " id: %#x ",i);
- printk(KERN_DEBUG " io: %#x ", (unsigned)dev->base_addr);
+ printk(" io: %#x ", (unsigned)dev->base_addr);
switch (lp->eepro) {
case LAN595FX_10ISA:
- printk(KERN_INFO "%s: Intel EtherExpress 10 ISA\n at %#x,",
+ printk("%s: Intel EtherExpress 10 ISA\n at %#x,",
dev->name, (unsigned)dev->base_addr);
break;
case LAN595FX:
- printk(KERN_INFO "%s: Intel EtherExpress Pro/10+ ISA\n at %#x,",
+ printk("%s: Intel EtherExpress Pro/10+ ISA\n at %#x,",
dev->name, (unsigned)dev->base_addr);
break;
case LAN595TX:
- printk(KERN_INFO "%s: Intel EtherExpress Pro/10 ISA at %#x,",
+ printk("%s: Intel EtherExpress Pro/10 ISA at %#x,",
dev->name, (unsigned)dev->base_addr);
break;
case LAN595:
- printk(KERN_INFO "%s: Intel 82595-based lan card at %#x,",
+ printk("%s: Intel 82595-based lan card at %#x,",
dev->name, (unsigned)dev->base_addr);
}
for (i=0; i < 6; i++)
- printk(KERN_INFO "%c%02x", i ? ':' : ' ', dev->dev_addr[i]);
+ printk("%c%02x", i ? ':' : ' ', dev->dev_addr[i]);
if (net_debug > 3)
printk(KERN_DEBUG ", %dK RCV buffer",
(int)(lp->rcv_ram)/1024);
if (dev->irq > 2)
- printk(KERN_INFO ", IRQ %d, %s.\n", dev->irq, ifmap[dev->if_port]);
+ printk(", IRQ %d, %s.\n", dev->irq, ifmap[dev->if_port]);
else
- printk(KERN_INFO ", %s.\n", ifmap[dev->if_port]);
+ printk(", %s.\n", ifmap[dev->if_port]);
if (net_debug > 3) {
i = read_eeprom(dev->base_addr, 5, dev);
@@ -1584,6 +1586,10 @@
if (skb == NULL) {
printk(KERN_NOTICE "%s: Memory squeeze, dropping packet.\n", dev->name);
lp->stats.rx_dropped++;
+ rcv_car = lp->rx_start + RCV_HEADER + rcv_size;
+ lp->rx_start = rcv_next_frame;
+ outw(rcv_next_frame, ioaddr + HOST_ADDRESS_REG);
+
break;
}
skb->dev = dev;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] eepro 0.13a
[not found] <20020730125601.GT16077@cathedrallabs.org.suse.lists.linux.kernel>
@ 2002-07-30 13:35 ` Andi Kleen
2002-07-30 13:48 ` Aristeu Sergio Rozanski Filho
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Andi Kleen @ 2002-07-30 13:35 UTC (permalink / raw)
To: Aristeu Sergio Rozanski Filho; +Cc: linux-kernel
> @@ -633,37 +633,37 @@
>
> i = inb(dev->base_addr + ID_REG);
> printk(KERN_DEBUG " id: %#x ",i);
> - printk(KERN_DEBUG " io: %#x ", (unsigned)dev->base_addr);
> + printk(" io: %#x ", (unsigned)dev->base_addr);
>
> switch (lp->eepro) {
> case LAN595FX_10ISA:
> - printk(KERN_INFO "%s: Intel EtherExpress 10 ISA\n at %#x,",
> + printk("%s: Intel EtherExpress 10 ISA\n at %#x,",
> dev->name, (unsigned)dev->base_addr);
[more cases deleted]
This surely can't be right. Why are you dropping all the KERN_*s ?
-Andi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] eepro 0.13a
2002-07-30 13:35 ` [PATCH] eepro 0.13a Andi Kleen
@ 2002-07-30 13:48 ` Aristeu Sergio Rozanski Filho
2002-07-30 14:13 ` Andi Kleen
2002-07-30 13:56 ` Andreas Schwab
2002-07-30 14:04 ` Jeff Garzik
2 siblings, 1 reply; 6+ messages in thread
From: Aristeu Sergio Rozanski Filho @ 2002-07-30 13:48 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel
> > @@ -633,37 +633,37 @@
> >
> > i = inb(dev->base_addr + ID_REG);
> > printk(KERN_DEBUG " id: %#x ",i);
> > - printk(KERN_DEBUG " io: %#x ", (unsigned)dev->base_addr);
> > + printk(" io: %#x ", (unsigned)dev->base_addr);
> >
> > switch (lp->eepro) {
> > case LAN595FX_10ISA:
> > - printk(KERN_INFO "%s: Intel EtherExpress 10 ISA\n at %#x,",
> > + printk("%s: Intel EtherExpress 10 ISA\n at %#x,",
> > dev->name, (unsigned)dev->base_addr);
>
> [more cases deleted]
>
> This surely can't be right. Why are you dropping all the KERN_*s ?
printk that doesn't start a new line had KERN_* removed because it prints in
the middle of line KERN_* macros like
id: 0xb4 <7> io: 0x340 <6>eth0: Intel EtherExpress Pro/10+ ISA
i had the same reaction but Michael pointed this to me. i don't know exactly
how this macro works, but you'll have the line printed out with the
beggining using KERN_* macro. isn't that sufficient?
--
aris
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] eepro 0.13a
2002-07-30 13:35 ` [PATCH] eepro 0.13a Andi Kleen
2002-07-30 13:48 ` Aristeu Sergio Rozanski Filho
@ 2002-07-30 13:56 ` Andreas Schwab
2002-07-30 14:04 ` Jeff Garzik
2 siblings, 0 replies; 6+ messages in thread
From: Andreas Schwab @ 2002-07-30 13:56 UTC (permalink / raw)
To: Andi Kleen; +Cc: Aristeu Sergio Rozanski Filho, linux-kernel
Andi Kleen <ak@suse.de> writes:
|> > @@ -633,37 +633,37 @@
|> >
|> > i = inb(dev->base_addr + ID_REG);
|> > printk(KERN_DEBUG " id: %#x ",i);
|> > - printk(KERN_DEBUG " io: %#x ", (unsigned)dev->base_addr);
|> > + printk(" io: %#x ", (unsigned)dev->base_addr);
|> >
|> > switch (lp->eepro) {
|> > case LAN595FX_10ISA:
|> > - printk(KERN_INFO "%s: Intel EtherExpress 10 ISA\n at %#x,",
|> > + printk("%s: Intel EtherExpress 10 ISA\n at %#x,",
|> > dev->name, (unsigned)dev->base_addr);
|>
|> [more cases deleted]
|>
|> This surely can't be right. Why are you dropping all the KERN_*s ?
Because the previous output is not terminated by a newline, and KERN_*s
are only recognized after newline, not in the middle of a line.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] eepro 0.13a
2002-07-30 13:35 ` [PATCH] eepro 0.13a Andi Kleen
2002-07-30 13:48 ` Aristeu Sergio Rozanski Filho
2002-07-30 13:56 ` Andreas Schwab
@ 2002-07-30 14:04 ` Jeff Garzik
2 siblings, 0 replies; 6+ messages in thread
From: Jeff Garzik @ 2002-07-30 14:04 UTC (permalink / raw)
To: Andi Kleen; +Cc: Aristeu Sergio Rozanski Filho, linux-kernel
Andi Kleen wrote:
>>@@ -633,37 +633,37 @@
>>
>> i = inb(dev->base_addr + ID_REG);
>> printk(KERN_DEBUG " id: %#x ",i);
>>- printk(KERN_DEBUG " io: %#x ", (unsigned)dev->base_addr);
>>+ printk(" io: %#x ", (unsigned)dev->base_addr);
>>
>> switch (lp->eepro) {
>> case LAN595FX_10ISA:
>>- printk(KERN_INFO "%s: Intel EtherExpress 10 ISA\n at %#x,",
>>+ printk("%s: Intel EtherExpress 10 ISA\n at %#x,",
>> dev->name, (unsigned)dev->base_addr);
>
>
> [more cases deleted]
>
> This surely can't be right. Why are you dropping all the KERN_*s ?
I have a feeling he ran a diff between his "pure" copy and the kernel
copy, and assumed the output was correct....
Jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] eepro 0.13a
2002-07-30 13:48 ` Aristeu Sergio Rozanski Filho
@ 2002-07-30 14:13 ` Andi Kleen
0 siblings, 0 replies; 6+ messages in thread
From: Andi Kleen @ 2002-07-30 14:13 UTC (permalink / raw)
To: Aristeu Sergio Rozanski Filho; +Cc: Andi Kleen, linux-kernel
> printk that doesn't start a new line had KERN_* removed because it prints in
> the middle of line KERN_* macros like
> id: 0xb4 <7> io: 0x340 <6>eth0: Intel EtherExpress Pro/10+ ISA
> i had the same reaction but Michael pointed this to me. i don't know exactly
> how this macro works, but you'll have the line printed out with the
The macro just prepends a sting using ISO C string concatenation.
> beggining using KERN_* macro. isn't that sufficient?
That makes sense. Thanks,
-Andi
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2002-07-30 14:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20020730125601.GT16077@cathedrallabs.org.suse.lists.linux.kernel>
2002-07-30 13:35 ` [PATCH] eepro 0.13a Andi Kleen
2002-07-30 13:48 ` Aristeu Sergio Rozanski Filho
2002-07-30 14:13 ` Andi Kleen
2002-07-30 13:56 ` Andreas Schwab
2002-07-30 14:04 ` Jeff Garzik
2002-07-30 12:56 Aristeu Sergio Rozanski Filho
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox