linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.4.6-test1, PCMCIA cards require two insertions
@ 2003-07-25 21:02 Christopher Swingley
  2003-07-25 21:24 ` Bart Trojanowski
  2003-08-02 16:33 ` Russell King
  0 siblings, 2 replies; 4+ messages in thread
From: Christopher Swingley @ 2003-07-25 21:02 UTC (permalink / raw)
  To: Linux Kernel

Greetings!

I'm running 2.6.0-test1 on an SiS based laptop with all the PCMCIA 
network and serial drivers built into the kernel.  When the system boots 
with a PCMCIA cardbus card in place, the card doesn't show up.  I unplug 
the card and plug it back in, and then the kernel "sees" it and it 
works.  If I unplug it again, I have to go through a plug - unplug - 
plug cycle before it recognizes it.  As if it only recognizes the card 
on even numbered insertion events.

My modem card is not a cardbus card (no gold colored strip on the top) 
and it exhibits the same plug - unplug - plug requirement.  If it's in 
the slot when the computer boots, however, it will get set up, because 
the pcmcia-cs cardmgr sets it up via the sysinit scripts.

Any thoughts on why these cards require more than one insertion before 
they're recognized?  Bug / feature?

Thanks,

Chris
-- 
Christopher S. Swingley          email: cswingle@iarc.uaf.edu
IARC -- Frontier Program         Please use encryption.  GPG key at:
University of Alaska Fairbanks   www.frontier.iarc.uaf.edu/~cswingle/


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 2.4.6-test1, PCMCIA cards require two insertions
  2003-07-25 21:02 2.4.6-test1, PCMCIA cards require two insertions Christopher Swingley
@ 2003-07-25 21:24 ` Bart Trojanowski
  2003-08-02 16:33 ` Russell King
  1 sibling, 0 replies; 4+ messages in thread
From: Bart Trojanowski @ 2003-07-25 21:24 UTC (permalink / raw)
  To: Linux Kernel

* Christopher Swingley <cswingle@iarc.uaf.edu> [030725 17:12]:
> I'm running 2.6.0-test1 on an SiS based laptop with all the PCMCIA 
> network and serial drivers built into the kernel.  When the system boots 
> with a PCMCIA cardbus card in place, the card doesn't show up.  I unplug 
> the card and plug it back in, and then the kernel "sees" it and it 
> works.  If I unplug it again, I have to go through a plug - unplug - 
> plug cycle before it recognizes it.  As if it only recognizes the card 
> on even numbered insertion events.

I see the same on my Thinkpad (CardBus bridge: Texas Instruments PCI1450)
With any card I've tried.  In addition on APM h/w suspend (ACPI didn't
work for me) I see the same thing... I have to pull out the card and put
it back in for it to be recognized.

Bart.

-- 
				WebSig: http://www.jukie.net/~bart/sig/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 2.4.6-test1, PCMCIA cards require two insertions
  2003-07-25 21:02 2.4.6-test1, PCMCIA cards require two insertions Christopher Swingley
  2003-07-25 21:24 ` Bart Trojanowski
@ 2003-08-02 16:33 ` Russell King
  2003-08-04 15:50   ` Christopher Swingley
  1 sibling, 1 reply; 4+ messages in thread
From: Russell King @ 2003-08-02 16:33 UTC (permalink / raw)
  To: Linux Kernel

On Fri, Jul 25, 2003 at 01:02:42PM -0800, Christopher Swingley wrote:
> I'm running 2.6.0-test1 on an SiS based laptop with all the PCMCIA 
> network and serial drivers built into the kernel.  When the system boots 
> with a PCMCIA cardbus card in place, the card doesn't show up.  I unplug 
> the card and plug it back in, and then the kernel "sees" it and it 
> works.  If I unplug it again, I have to go through a plug - unplug - 
> plug cycle before it recognizes it.  As if it only recognizes the card 
> on even numbered insertion events.

Hmm, weird - I'm not seeing that behaviour here.  Can you report back
with kernel messages with the following patch applied please?

--- linux/drivers/pcmcia/cs.c.old	Sat Aug  2 17:25:45 2003
+++ linux/drivers/pcmcia/cs.c	Sat Aug  2 17:32:49 2003
@@ -579,6 +579,7 @@
 
 static void socket_shutdown(struct pcmcia_socket *skt)
 {
+printk("socket_shutdown: skt %p\n", skt);
 	socket_remove_drivers(skt);
 	set_current_state(TASK_UNINTERRUPTIBLE);
 	schedule_timeout(cs_to_timeout(shutdown_delay));
@@ -590,7 +591,7 @@
 static int socket_reset(struct pcmcia_socket *skt)
 {
 	int status, i;
-
+printk("socket_reset: skt %p\n", skt);
 	skt->socket.flags |= SS_OUTPUT_ENA | SS_RESET;
 	skt->ops->set_socket(skt, &skt->socket);
 	udelay((long)reset_time);
@@ -622,6 +623,7 @@
 	int status, i;
 
 	skt->ops->get_status(skt, &status);
+printk("socket_setup: skt %p status %08x\n", skt, status);
 	if (!(status & SS_DETECT))
 		return CS_NO_CARD;
 
@@ -704,7 +706,7 @@
 static int socket_insert(struct pcmcia_socket *skt)
 {
 	int ret;
-
+printk("socket_insert: skt %p\n", skt);
 	if (!try_module_get(skt->owner))
 		return CS_NO_CARD;
 
@@ -728,6 +730,7 @@
 
 static int socket_suspend(struct pcmcia_socket *skt)
 {
+printk("socket_suspend: skt %p state %08x\n", skt, skt->state);
 	if (skt->state & SOCKET_SUSPEND)
 		return CS_IN_USE;
 
@@ -748,7 +751,7 @@
 static int socket_resume(struct pcmcia_socket *skt)
 {
 	int ret;
-
+printk("socket_resume: skt %p state %08x\n", skt, skt->state);
 	if (!(skt->state & SOCKET_SUSPEND))
 		return CS_IN_USE;
 
@@ -782,6 +785,7 @@
 
 static void socket_remove(struct pcmcia_socket *skt)
 {
+printk("socket_remove: skt %p\n", skt);
 	socket_shutdown(skt);
 	module_put(skt->owner);
 }
@@ -808,6 +812,7 @@
 		}
 
 		skt->ops->get_status(skt, &status);
+printk("socket %p status %08x\n", skt, status);
 		if ((skt->state & SOCKET_PRESENT) &&
 		     !(status & SS_DETECT))
 			socket_remove(skt);
@@ -866,6 +871,7 @@
 
 void pcmcia_parse_events(struct pcmcia_socket *s, u_int events)
 {
+printk("parse_events: socket %p thread %p events %08x\n", s, s->thread, events);
 	if (s->thread) {
 		spin_lock(&s->thread_lock);
 		s->thread_events |= events;

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 2.4.6-test1, PCMCIA cards require two insertions
  2003-08-02 16:33 ` Russell King
@ 2003-08-04 15:50   ` Christopher Swingley
  0 siblings, 0 replies; 4+ messages in thread
From: Christopher Swingley @ 2003-08-04 15:50 UTC (permalink / raw)
  To: Linux Kernel

Russell,

Earlier I reported:

> On Fri, Jul 25, 2003 at 01:02:42PM -0800, Christopher Swingley wrote:
> > I'm running 2.6.0-test1 on an SiS based laptop with all the PCMCIA 
> > network and serial drivers built into the kernel.  When the system boots 
> > with a PCMCIA cardbus card in place, the card doesn't show up.  I unplug 
> > the card and plug it back in, and then the kernel "sees" it and it 
> > works.  If I unplug it again, I have to go through a plug - unplug - 
> > plug cycle before it recognizes it.  As if it only recognizes the card 
> > on even numbered insertion events.

Still behaves the same way with a stock 2.6.0-test2.  I applied the 
patch you included to 2.6.0-test2.  Same strange dual-insertion behavior 
was noted.

Also, I have another laptop, Intel based, that doesn't show this 
behavior.  So it's something to do with this one.

> Hmm, weird - I'm not seeing that behaviour here.  Can you report back
> with kernel messages with the following patch applied please?

Here's what happens on the console.  If you want kern.log, let me know 
and I'll send that along.  I don't see anything different between them.

After the laptop finishes booting, the PCMCIA network card (tulip 
driver) is not running.

I remove the card:

    parse_events: socket df5cd82c thread df60e060 events 00000080
    socket df5cd82c status 00001c00

I insert the card:

    parse_events: socket df5cd82c thread df60e060 events 00000080
    socket df5cd82c status 00001c80
    socket_insert: skt df5cd82c
    socket_setup: skt df5cd82c status 00001c80
    socket_reset: skt df5cd82c
    Linux Tulip driver version 1.1.13 (May 11, 2002)
    <rest of tulip driver stuff snipped>

I remove the card:

    parse_events: socket df5cd82c thread df60e060 events 00000080
    socket df5cd82c status 00001c00
    socket_remove: skt df5cd82c
    socket_shutdown: skt df5cd82c status 00001c80
 
I insert the card:

    (nothing at all)

I remove the card:

    parse_events: socket df5cd82c thread df60e060 events 00000080
    socket df5cd82c status 00001c00

I insert the card:

    parse_events: socket df5cd82c thread df60e060 events 00000080
    socket df5cd82c status 00001c80
    socket_insert: skt df5cd82c
    socket_setup: skt df5cd82c status 00001c80
    socket_reset: skt df5cd82c
    Linux Tulip driver version 1.1.13 (May 11, 2002)
    <rest of tulip driver stuff snipped>

Chris
-- 
Christopher S. Swingley          email: cswingle@iarc.uaf.edu
IARC -- Frontier Program         Please use encryption.  GPG key at:
University of Alaska Fairbanks   www.frontier.iarc.uaf.edu/~cswingle/


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-08-04 15:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-25 21:02 2.4.6-test1, PCMCIA cards require two insertions Christopher Swingley
2003-07-25 21:24 ` Bart Trojanowski
2003-08-02 16:33 ` Russell King
2003-08-04 15:50   ` Christopher Swingley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).