Skip to contentSkip to conversation

i82365 PCI-PCMCIA bridge still not working in 2.4.0-test11

DISCUSSION Michel Salim 3 participants 6 messages Nov 21, 2000 – Jan 5, 2001

lore
Share & tools
lore
#0 lore raw

Hi,

Installed kernel 2.4.0-test11 on my Debian Woody box today. Had no problem apart from getting PCMCIA to work. I have a PCI-PCMCIA adapter on my desktop PC, using the Cirrus Logic CL6729 chipset; on a 2.2.x kernel it is detected as an i82365 and works accordingly.

After trying 2.4.0-test9 and -test10 (which don't support i82365), it was nice to see that test11-pre6 finally has regained PCMCIA support... so it's weird to encounter this problem. Has anyone managed to use the i82365 kernel module?

relevant kernel config:

PCMCIA support compiled as a module
i82365 as a module
CardBus (yenta_socket) as a module

Attached are the result of running /etc/init.d/pcmcia start and the error message from dmesg

Any help appreciated... and looking forward to test12... or will it be 2.4.0-final, finally?

:)

Regards,

Michel Salim

Starting PCMCIA services: modulesHint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters
Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters
cardmgr.

/lib/modules/2.4.0-test11/pcmcia/i82365.o: init_module: No such device
ds: no socket drivers loaded! /lib/modules/2.4.0-test11/pcmcia/ds.o: init_module: Operation not permitted

#1 lore raw
Quoted 3 lines · [email protected] said:

Installed kernel 2.4.0-test11 on my Debian Woody box today. Had no
problem apart from getting PCMCIA to work. I have a PCI-PCMCIA adapter
on my desktop PC, using the Cirrus Logic CL6729 chipset;

Linus got a bit carried away when stripping out all the CardBus support from i82365, and took out the support for PCI-PCMCIA bridges too.

Try this snapshot of my development tree, or use lspci to find the IO address of the device and specify that to the existing module.

Index: drivers/pcmcia/cirrus.h
===================================================================
RCS file: /net/passion/inst/cvs/linux/drivers/pcmcia/Attic/cirrus.h,v retrieving revision 1.1.2.2

pcmcia/cirrus.h +9 -0
diff -u -r1.1.2.2 cirrus.h
@@ -48,6 +48,11 @@
 #define PD67_EXT_INDEX		0x2e	/* Extension index */
 #define PD67_EXT_DATA		0x2f	/* Extension data */
 
+#define pd67_ext_get(s, r) \
+    (i365_set(s, PD67_EXT_INDEX, r), i365_get(s, PD67_EXT_DATA))
+#define pd67_ext_set(s, r, v) \
+    (i365_set(s, PD67_EXT_INDEX, r), i365_set(s, PD67_EXT_DATA, v))
+
 /* PD6722 extension registers -- indexed in PD67_EXT_INDEX */
 #define PD67_DATA_MASK0		0x01	/* Data mask 0 */
 #define PD67_DATA_MASK1		0x02	/* Data mask 1 */
@@ -119,6 +124,10 @@
 #define PD67_EC1_INV_CARD_IRQ	0x08
 #define PD67_EC1_INV_MGMT_IRQ	0x10
 #define PD67_EC1_PULLUP_CTL	0x20
+
+/* Fields in PD67_EXTERN_DATA */
+#define PD67_EXD_VS1(s)         (0x01 << ((s)<<1))
+#define PD67_EXD_VS2(s)         (0x02 << ((s)<<1))
 
 /* Fields in PD67_MISC_CTL_3 */
 #define PD67_MC3_IRQ_MASK	0x03

Index: drivers/pcmcia/cs.c
===================================================================
RCS file: /net/passion/inst/cvs/linux/drivers/pcmcia/Attic/cs.c,v retrieving revision 1.1.2.28

pcmcia/cs.c +2 -4
diff -u -r1.1.2.28 cs.c
@@ -416,12 +416,10 @@
 {
     int i;
 
-    for (i = 0; i < sockets; i++) {
+    for (i = sockets-1; i >= 0; i-- ) {
 	socket_info_t *socket = socket_table[i];
 	if (socket->ss_entry == ss_entry)
-	    pcmcia_unregister_socket (socket);
-	else
-	    i++;
+		pcmcia_unregister_socket (socket);
     }
 } /* unregister_ss_entry */
 

Index: drivers/pcmcia/i82365.c
===================================================================
RCS file: /net/passion/inst/cvs/linux/drivers/pcmcia/Attic/i82365.c,v retrieving revision 1.1.2.15

pcmcia/i82365.c +452 -27

747 lines not on this page · raw message

Index: drivers/pcmcia/i82365.h
===================================================================
RCS file: /net/passion/inst/cvs/linux/drivers/pcmcia/Attic/i82365.h,v retrieving revision 1.1.2.2

pcmcia/i82365.h +5 -0
diff -u -r1.1.2.2 i82365.h
@@ -132,4 +132,9 @@
 
 #define I365_REG(slot, reg)	(((slot) << 6) + reg)
 
+#define  O2_MODE_D_IRQ_MODE     0x03
+#define  O2_MODE_D_IRQ_PCPCI    0x00
+#define  O2_MODE_D_IRQ_PCIWAY   0x02
+#define  O2_MODE_D_IRQ_PCI      0x03
+
 #endif /* _LINUX_I82365_H */

--
dwmw2

-
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/

#2 lore raw
In reply to Michel Salim

Thanks for the patch... but it does not quite work. It applies cleanly, but upon booting the patched kernel, the machine freezes completely upon PCMCIA initialisation (it got to the point where the init script said 'Loading modules' then nothing). CTRL+ALT+DEL does not work, either.

Anyone got a clue? Would love to help debug this if someone would just walk me through it.

Michel

Quoted 11 lines · David Woodhouse
Quoted 3 lines · [email protected] said:

Installed kernel 2.4.0-test11 on my Debian Woody box today. Had no
problem apart from getting PCMCIA to work. I have a PCI-PCMCIA adapter
on my desktop PC, using the Cirrus Logic CL6729 chipset;

Linus got a bit carried away when stripping out all the CardBus support from i82365, and took out the support for PCI-PCMCIA bridges too.

Try this snapshot of my development tree, or use lspci to find the IO address of the device and specify that to the existing module.

-
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/

#3 lore raw

Manually inputting i365_base=0x1030 when loading the module results in the same freeze - nothing works at all, had to do a full hardware reset. This is on the latest 2.4.0-prerelease...

David, any luck on your side? Sorry for the long absence, been a bit busy and then I went on holiday.

Any chance it's due to IRQ sharing? Since I've been struggling to use my PCMCIA modem under kernel 2.2.x too... pcmcia-cs detects it and minicom can dial using it but nothing else... :( the PCMCIA controller is on IRQ 11, same as my video card. Haven't tried swapping it since the cables are a mess to reattach :p

A belated Happy New Year,

Michel

Quoted 30 lines · David Woodhouse
Quoted 5 lines · [email protected] said:

Thanks for the patch... but it does not quite work. It applies cleanly, but upon booting the patched kernel, the machine freezes completely upon PCMCIA initialisation (it got to the point where the init script said 'Loading modules' then nothing). CTRL+ALT+DEL does not work, either.

Hmmm.

Quoted 2 lines · [email protected] said:

Anyone got a clue? Would love to help debug this if someone would
just walk me through it.

I think you may have to wait until I next get left alone in the house with the opportunity to gut my girlfriend's machine and stick a PCMCIA controller in it, unless you're willing to work on this yourself.

What I've done so far is to refer to the current i82365 code from David Hinds' standalone package, and put back into Linus' version all the non-CardBus CONFIG_PCI code which deals with PCI-PCMCIA bridges. As some changes have been made to the pcmcia core in David's version since the merge, that's not trivial, although it's quite simple.

I probably missed something - probably a change which isn't in CONFIG_PCI ifdefs. Did it print anything before dying? Does it die if you haven't got any cards present when it initialises? Does it die if you ensure it's polling the socket for status changes and doesn't register the interrupt?

Does it work with the standard driver in -test11 if you specify the correct i365_base= parameter as obtained from lspci?

If it does work with the current driver, I'm half inclined to leave it alone until 2.5 when we can re-sync the pcmcia core and hopefully then it'll 'just work' if we drop in the standalone driver, perhaps with the cardbus-specific parts stripped out.

--
dwmw2

Signature · 6 lines
Michèl Alexandre Salim

-
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/
#4 lore raw
Quoted 3 lines · [email protected] said:

Manually inputting i365_base=0x1030 when loading the module results in
the same freeze - nothing works at all, had to do a full hardware
reset. This is on the latest 2.4.0-prerelease...

Is this the code in 2.4.0-prerelease or the code I sent you? Sounds like it's probably dying in an IRQ storm.

Quoted 2 lines · [email protected] said:

David, any luck on your side? Sorry for the long absence, been a bit
busy and then I went on holiday.

I have a full databook for the i82092aa and a selection of example boards - was yours one of those or another type? I'm not entirely sure when I'll have time to poke at it again - I may wait for the 2.5 branch.

Quoted 1 line · [email protected] said:

Any chance it's due to IRQ sharing?

Possibly. Is any driver trying to use irq 11? Can you disable the irq for the video card in your BIOS?

--
dwmw2

-
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/

#5 lore raw
In reply to Michel Salim
Quoted 9 lines · David Woodhouse
Quoted 3 lines · [email protected] said:

Manually inputting i365_base=0x1030 when loading the module results in
the same freeze - nothing works at all, had to do a full hardware
reset. This is on the latest 2.4.0-prerelease...

Is this the code in 2.4.0-prerelease or the code I sent you? Sounds like it's probably dying in an IRQ storm.

The one in prerelease.

Quoted 11 lines

I have a full databook for the i82092aa and a selection of example boards - was yours one of those or another type? I'm not entirely sure when I'll have time to poke at it again - I may wait for the 2.5 branch.

Quoted 1 line · [email protected] said:

Any chance it's due to IRQ sharing?

Possibly. Is any driver trying to use irq 11? Can you disable the irq for the video card in your BIOS?

--
dwmw2

Well, got it working under 2.2.17. I suspect it is just a matter of the drivers in 2.4.x not accomodating desktop-based PCMCIA readers. In the latest PCMCIA Howto there is a subsection under 2.3 on such devices and workarounds needed to get them running - none of them are recognised by the i82365 driver in 2.4.0-prerelease.

I think I'll just stick to 2.2.x for the time being - if anyone fancy a go at it I'm more than willing to try out the code.

Regards,

Signature · 6 lines
Michèl Alexandre Salim

-
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/