2.4.3pre8 - fail to compile af_ipx.c, omission from drivers/net/Makefile

2001-03-26 Thread Eran Mann

Apparently net_init.o is missing from export-objs in 
drivers/net/Makefile in kernel 2.4.3.pre8, which causes network modules
to fail to load.

Additionally, trying to compile IPX in 2.4.3pre8 results in the
following errors:
make[2]: Entering directory `/mdk/src/linux-2.4.3/net/ipx'
gcc -D__KERNEL__ -I/mdk/src/linux-2.4.3/include -Wall
-Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe
-mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include
/mdk/src/linux-2.4.3/include/linux/modversions.h   -DEXPORT_SYMTAB -c
af_ipx.c
af_ipx.c: In function `ipxrtr_route_packet':
af_ipx.c:1545: warning: passing arg 4 of `sock_alloc_send_skb_R05cfeed4'
makes integer from pointer without a cast
af_ipx.c:1545: too few arguments to function
`sock_alloc_send_skb_R05cfeed4'
af_ipx.c: At top level:
af_ipx.c:2534: unknown field `sendpage' specified in initializer
af_ipx.c:2534: `sock_no_sendpage' undeclared here (not in a function)
af_ipx.c:2534: warning: excess elements in struct initializer
af_ipx.c:2534: warning: (near initialization for `ipx_dgram_ops')
make[2]: *** [af_ipx.o] Error 1
make[2]: Leaving directory `/mdk/src/linux-2.4.3/net/ipx'
make[1]: *** [_modsubdir_ipx] Error 2
make[1]: Leaving directory `/mdk/src/linux-2.4.3/net'
make: *** [_mod_net] Error 2

These patches fix the above problems:
===
--- linux-2.4.3pre8.orig/drivers/net/Makefile   Mon Mar 26 13:16:17 2001
+++ linux/drivers/net/Makefile  Mon Mar 26 12:03:26 2001
@@ -16,7 +16,7 @@
 # This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'.
 
 export-objs := 8390.o arlan.o aironet4500_core.o aironet4500_card.o
ppp_async.o \
-   ppp_generic.o slhc.o pppox.o auto_irq.o
+   ppp_generic.o slhc.o pppox.o auto_irq.o net_init.o
 
 ifeq ($(CONFIG_TULIP),y)
   obj-y += tulip/tulip.o
=
--- linux-2.4.3pre8.orig/net/ipx/af_ipx.c   Mon Mar 26 13:17:08 2001
+++ linux/net/ipx/af_ipx.c  Mon Mar 26 13:14:52 2001
@@ -1542,7 +1542,7 @@
ipx_offset = intrfc->if_ipx_offset;
size = sizeof(struct ipxhdr) + len + ipx_offset;
 
-   skb = sock_alloc_send_skb(sk, size, noblock, &err);
+   skb = sock_alloc_send_skb(sk, size, 0, noblock, &err);
if (!skb)
goto out_put;
 
@@ -2531,7 +2531,6 @@
sendmsg:ipx_sendmsg,
recvmsg:ipx_recvmsg,
mmap:   sock_no_mmap,
-   sendpage:   sock_no_sendpage,
 };
 
 #include 
-
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] Re: [patch] Re: 2.4.3-pre8: IPX not building

2001-03-29 Thread Eran Mann

The improved patch below should fix it. This additional problem only
showed up when IPX was built into the kernel (non modular).
If you don't want to revert the previous patch and apply this one you
can simply change 
net/ipx/af_ipx line 126 from:
static int sysctl_ipx_pprop_broadcasting = 1;

to:
int sysctl_ipx_pprop_broadcasting = 1;

and then make bzImage again.
 
Robert-Velisav MICIOVICI <[EMAIL PROTECTED]> wrote:
>
> Sorry to bother but it seems that the patchlet is still not good
> enough... problems at linkage or something:
>

> net/network.o(.data+0x5f04): undefined reference to
> `sysctl_ipx_pprop_broadcasting'
> make: *** [vmlinux] Error 1
> [root@bigfoot linux-2.4.3-pre8]#

--- linux-2.4.3pre8.orig/net/ipx/af_ipx.c   Thu Mar 29 10:27:29 2001
+++ linux-2.4.3pre8/net/ipx/af_ipx.cThu Mar 29 10:22:59 2001
@@ -123,7 +123,7 @@
 static unsigned char ipxcfg_max_hops = 16;
 static char ipxcfg_auto_select_primary;
 static char ipxcfg_auto_create_interfaces;
-static int sysctl_ipx_pprop_broadcasting = 1;
+int sysctl_ipx_pprop_broadcasting = 1;
 
 /* Global Variables */
 static struct datalink_proto *p8022_datalink;
@@ -1542,7 +1542,7 @@
ipx_offset = intrfc->if_ipx_offset;
size = sizeof(struct ipxhdr) + len + ipx_offset;
 
-   skb = sock_alloc_send_skb(sk, size, noblock, &err);
+   skb = sock_alloc_send_skb(sk, size, 0, noblock, &err);
if (!skb)
goto out_put;
 
@@ -2531,7 +2531,6 @@
sendmsg:ipx_sendmsg,
recvmsg:ipx_recvmsg,
mmap:   sock_no_mmap,
-   sendpage:   sock_no_sendpage,
 };
 
 #include 
-
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.3 fails to link when IPX compiled in

2001-03-30 Thread Eran Mann

Hi,
When compiling linux-2.4.3 with IPX built in one gets:
ld -m elf_i386 -T /mdk/src/linux-2.4.3/arch/i386/vmlinux.lds -e stext
arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o
init/version.o \
--start-group \
arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o
fs/fs.o ipc/ipc.o \
drivers/block/block.o drivers/char/char.o drivers/misc/misc.o
drivers/net/net.o drivers/media/media.o  drivers/char/agp/agp.o
drivers/char/drm/drm.o drivers/ide/idedriver.o drivers/scsi/scsidrv.o
drivers/cdrom/driver.o drivers/sound/sounddrivers.o drivers/pci/driver.o
drivers/pnp/pnp.o drivers/video/video.o \
net/network.o \
/mdk/src/linux-2.4.3/arch/i386/lib/lib.a /mdk/src/linux-2.4.3/lib/lib.a
/mdk/src/linux-2.4.3/arch/i386/lib/lib.a \
--end-group \
-o vmlinux
net/network.o(.data+0x2ee4): undefined reference to
`sysctl_ipx_pprop_broadcasting'
make: *** [vmlinux] Error 1

The patchlet below seems to solve it.

--- linux-2.4.3.orig/net/ipx/af_ipx.c   Fri Mar 30 11:54:55 2001
+++ linux/net/ipx/af_ipx.c  Fri Mar 30 12:29:23 2001
@@ -123,7 +123,7 @@
 static unsigned char ipxcfg_max_hops = 16;
 static char ipxcfg_auto_select_primary;
 static char ipxcfg_auto_create_interfaces;
-static int sysctl_ipx_pprop_broadcasting = 1;
+int sysctl_ipx_pprop_broadcasting = 1;
 
 /* Global Variables */
 static struct datalink_proto *p8022_datalink;
-
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/



[OOPS] paport related OOPS since 2.6.11-bk7

2005-03-28 Thread Eran Mann
The OOPS below gets generated consistently when FC3 kudzu is run during 
boot (tested between 2.6.11-bk7 and 2.6.11.6-bk1). It seems to be caused 
by the hotplug-parport changeset:
http://linux.bkbits.net:8080/linux-2.5/[EMAIL PROTECTED]|[EMAIL PROTECTED]
(reverting this changeset eliminates the oops).

parport_pc: VIA 686A/8231 detected
parport_pc: probing current configuration
parport_pc: Current parallel port base: 0x378
parport0: PC-style at 0x378, irq 7 [PCSPP,EPP]
parport_pc: VIA parallel port: io=0x378, irq=7
Unable to handle kernel NULL pointer dereference at virtual address 
 printing eip:
d3f37368
*pde = 
Oops:  [#1]
PREEMPT
Modules linked in: parport_pc parport binfmt_misc nls_cp437 
nls_iso8859_1 ntfs video thermal processor fan container button battery 
ac uhci_hcd usbcore 3c59x mii
CPU:0
EIP:0060:[]Not tainted VLI
EFLAGS: 00010286   (2.6.12-rc1)
EIP is at parport_pc_pci_remove+0x18/0x40 [parport_pc]
eax: c12ef844   ebx: c12ef800   ecx: c12ef844   edx: d3f37350
esi:    edi: d3f3cc68   ebp: ce53aecc   esp: ce53aec0
ds: 007b   es: 007b   ss: 0068
Process modprobe (pid: 3187, threadinfo=ce53a000 task=cfbe2570)
Stack: c018f481 c12ef800 c12ef844 ce53aedc c0239636 c12ef800 c12ef868 
ce53aef8
   c02fe67c c12ef844 c040412e d3f3ccb0 d3f3ccb0 d3f375a0 ce53af0c 
c02fe6a0
   c12ef844 d3f3cc68  ce53af24 c02feb9a d3f3cc68 d3f3cc68 
d3f3cc68
Call Trace:
 [] show_stack+0x7f/0xa0
 [] show_registers+0x156/0x1d0
 [] die+0xea/0x180
 [] do_page_fault+0x482/0x6ba
 [] error_code+0x2b/0x30
 [] pci_device_remove+0x36/0x40
 [] device_release_driver+0x7c/0x80
 [] driver_detach+0x20/0x30
 [] bus_remove_driver+0x4a/0x90
 [] driver_unregister+0x12/0x20
 [] pci_unregister_driver+0x15/0x20
 [] parport_pc_exit+0x9e/0xae [parport_pc]
 [] sys_delete_module+0x17e/0x1b0
 [] sysenter_past_esp+0x54/0x75
Code: 44 24 04 89 0c 24 ff d2 eb 94 89 f6 8d bc 27 00 00 00 00 55 89 e5 
56 53 83 ec 04 8b 45 08 83 c0 44 8b 70 74 c7 40 74 00 00 00 00 <8b> 1e 
eb 10 8d 74 26 00 8b 44 9e 04 89 04 24 e8 d4 f4 ff ff 4b

--
Eran Mann
MRV International
www.mrv.com
-
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: [OOPS] paport related OOPS since 2.6.11-bk7

2005-03-28 Thread Eran Mann
Russell King wrote:
On Mon, Mar 28, 2005 at 06:45:43PM +0200, Eran Mann wrote:
The OOPS below gets generated consistently when FC3 kudzu is run during 
boot (tested between 2.6.11-bk7 and 2.6.11.6-bk1). It seems to be caused 
by the hotplug-parport changeset:
http://linux.bkbits.net:8080/linux-2.5/[EMAIL PROTECTED]|[EMAIL PROTECTED]
(reverting this changeset eliminates the oops).

Please try this instead.
It appears that the parport driver claims on-board superio devices
without actually doing anything.  When the driver is removed, we
try to dereference non-existent driver data to unregister the ports.
Since we didn't register anything, it's safe to ignore these devices
in the remove function.
Signed-off-by: Russell King <[EMAIL PROTECTED]>
diff -up -x BitKeeper -x ChangeSet -x SCCS -x _xlk -x *.orig -x *.rej orig/drivers/parport/parport_pc.c linux/drivers/parport/parport_pc.c
--- orig/drivers/parport/parport_pc.c	Sat Mar 19 11:22:08 2005
+++ linux/drivers/parport/parport_pc.c	Mon Mar 28 17:55:51 2005
@@ -2976,10 +2976,12 @@ static void __devexit parport_pc_pci_rem
 
 	pci_set_drvdata(dev, NULL);
 
-	for (i = data->num - 1; i >= 0; i--)
-		parport_pc_unregister_port(data->ports[i]);
+	if (data) {
+		for (i = data->num - 1; i >= 0; i--)
+			parport_pc_unregister_port(data->ports[i]);
 
-	kfree(data);
+		kfree(data);
+	}
 }
 
 static struct pci_driver parport_pc_pci_driver = {

Doesn't seem to help. Do you want me to check anything else?
Mar 28 17:13:44 eran kernel: parport0: PC-style at 0x378, irq 7 [PCSPP,EPP]
Mar 28 17:13:44 eran kernel: parport_pc: VIA parallel port: io=0x378, irq=7
Mar 28 17:13:44 eran kernel: Unable to handle kernel NULL pointer 
dereference at virtual address 
Mar 28 17:13:44 eran kernel:  printing eip:
Mar 28 17:13:44 eran kernel: d3f37368
Mar 28 17:13:44 eran kernel: *pde = 
Mar 28 17:13:44 eran kernel: Oops:  [#1]
Mar 28 17:13:44 eran kernel: PREEMPT
Mar 28 17:13:44 eran kernel: Modules linked in: parport_pc parport 
binfmt_misc nls_cp437 nls_iso8859_1 ntfs video thermal processor fan 
container button battery ac uhci_hcd usbcore 3c59x mii
Mar 28 17:13:44 eran kernel: CPU:0
Mar 28 17:13:44 eran kernel: EIP:0060:[]Not tainted VLI
Mar 28 17:13:44 eran kernel: EFLAGS: 00010286   (2.6.11-bk6-patched)
Mar 28 17:13:44 eran kernel: EIP is at parport_pc_pci_remove+0x18/0x40 
[parport_pc]
Mar 28 17:13:44 eran kernel: eax: c12ef844   ebx: c12ef800   ecx: 
c12ef844   edx: d3f37350
Mar 28 17:13:44 eran kernel: esi:    edi: d3f3cd48   ebp: 
ce585ecc   esp: ce585ec0
Mar 28 17:13:44 eran kernel: ds: 007b   es: 007b   ss: 0068
Mar 28 17:13:44 eran kernel: Process modprobe (pid: 3503, 
threadinfo=ce585000 task=cffdf040)
Mar 28 17:13:44 eran kernel: Stack: c0190441 c12ef800 c12ef844 ce585edc 
c0237c06 c12ef800 c12ef868 ce585ef8
Mar 28 17:13:44 eran kernel:c02f9c5c c12ef844 c03ff1cd d3f3cd90 
d3f3cd90 d3f375a0 ce585f0c c02f9c80
Mar 28 17:13:44 eran kernel:c12ef844 d3f3cd48  ce585f24 
c02fa17a d3f3cd48 d3f3cd48 d3f3cd48
Mar 28 17:13:44 eran kernel: Call Trace:
Mar 28 17:13:44 eran kernel:  [] show_stack+0x7f/0xa0
Mar 28 17:13:44 eran kernel:  [] show_registers+0x156/0x1d0
Mar 28 17:13:44 eran kernel:  [] die+0xea/0x180
Mar 28 17:13:44 eran kernel:  [] do_page_fault+0x482/0x6ba
Mar 28 17:13:44 eran kernel:  [] error_code+0x2b/0x30
Mar 28 17:13:44 eran kernel:  [] pci_device_remove+0x36/0x40
Mar 28 17:13:44 eran kernel:  [] device_release_driver+0x7c/0x80
Mar 28 17:13:44 eran kernel:  [] driver_detach+0x20/0x30
Mar 28 17:13:44 eran kernel:  [] bus_remove_driver+0x4a/0x90
Mar 28 17:13:44 eran kernel:  [] driver_unregister+0x12/0x20
Mar 28 17:13:44 eran kernel:  [] pci_unregister_driver+0x15/0x20
Mar 28 17:13:44 eran kernel:  [] parport_pc_exit+0x9e/0xae 
[parport_pc]
Mar 28 17:13:44 eran kernel:  [] sys_delete_module+0x17e/0x1b0
Mar 28 17:13:44 eran kernel:  [] sysenter_past_esp+0x54/0x75
Mar 28 17:13:44 eran kernel: Code: 44 24 04 89 0c 24 ff d2 eb 94 89 f6 
8d bc 27 00 00 00 00 55 89 e5 56 53 83 ec 04 8b 45 08 83 c0 44 8b 70 74 
c7 40 74 00 00 00 00 <8b> 1e eb 10 8d 74 26 00 8b 44 9e 04 89 04 24 e8 
d4 f4 ff ff 4b

--
Eran Mann
Senior Software Engineer
MRV International
Tel: 972-4-9936297
Fax: 972-4-9890430
www.mrv.com
-
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: [OOPS] paport related OOPS since 2.6.11-bk7

2005-03-28 Thread Eran Mann
Russell King wrote:
Can you double-check please?
 

I'm sorry, I booted the wrong image.
The fix does work (tested against 2.6.11.6-bk1).
-
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.6.11.6-bk2] e100: Use EEPROM config for Auto MDI/MDI-X

2005-03-30 Thread Eran Mann
Current e100.c doesn't follow the EEPROM configuration regarding Auto 
MDI/MDI-X switching, instead it is enabled unconditionally for the 
relevant chips.
This is especially bad since according to Intel's errata this feature is 
no-longer supported.

Signed-off-by: Eran Mann <[EMAIL PROTECTED]>
--- linux-2.6.11.6-bk2/drivers/net/e100.c	2005-03-29 19:57:10.0 +0200
+++ linux-2.6.11.6-bk2-patched/drivers/net/e100.c	2005-03-29 19:28:52.0 +0200
@@ -1072,13 +1072,17 @@
 		mdio_write(netdev, nic->mii.phy_id, MII_NSC_CONG, cong);
 	}
 
-	if((nic->mac >= mac_82550_D102) || ((nic->flags & ich) && 
-		(mdio_read(netdev, nic->mii.phy_id, MII_TPISTATUS) & 0x8000) && 
-		(nic->eeprom[eeprom_cnfg_mdix] & eeprom_mdix_enabled)))
-		/* enable/disable MDI/MDI-X auto-switching */
-		mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG,
-			nic->mii.force_media ? 0 : NCONFIG_AUTO_SWITCH);
-
+	if(((nic->mac >= mac_82550_D102) || ((nic->flags & ich) &&
+		(mdio_read(netdev, nic->mii.phy_id, MII_TPISTATUS) &
+			0x8000 {
+		/* Enable/Disable Auto MDI/MDI-X Switching */
+		if ((nic->eeprom[eeprom_cnfg_mdix] & eeprom_mdix_enabled) &&
+		!nic->mii.force_media)
+			mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG,
+			   		NCONFIG_AUTO_SWITCH);
+		else
+	mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG, 0);
+		}
 	return 0;
 }
 
@@ -2245,11 +2249,11 @@
 		goto err_out_iounmap;
 	}
 
-	e100_phy_init(nic);
-
 	if((err = e100_eeprom_load(nic)))
 		goto err_out_free;
 
+	e100_phy_init(nic);
+
 	memcpy(netdev->dev_addr, nic->eeprom, ETH_ALEN);
 	if(!is_valid_ether_addr(netdev->dev_addr)) {
 		DPRINTK(PROBE, ERR, "Invalid MAC address from "