* [PATCH] Re: pcmcia no worky in 2.5.6[32]
@ 2003-03-03 7:18 Dominik Brodowski
2003-03-05 0:54 ` Brett
0 siblings, 1 reply; 5+ messages in thread
From: Dominik Brodowski @ 2003-03-03 7:18 UTC (permalink / raw)
To: generica, linux-kernel
> Hey,
>
> since 2.5.62, I've not been able to get pcmcia working.
>
> Hardware: toshiba 100CS
>
> I've attached my .config for 2.5.63,
> and a dmesg directly after boot for 2.5.61 and 2.5.63
>
> any other details needed, please let me know
>
> thanks,
>
> / Brett
Could you please try this patch? It *should* fix this problem:
--- linux/drivers/pcmcia/i82365.c.original 2003-02-26 09:45:00.000000000 +0100
+++ linux/drivers/pcmcia/i82365.c 2003-03-03 08:14:29.000000000 +0100
@@ -1628,11 +1628,11 @@
request_irq(cs_irq, pcic_interrupt, 0, "i82365", pcic_interrupt);
#endif
- platform_device_register(&i82365_device);
-
i82365_data.nsock = sockets;
i82365_device.dev.class_data = &i82365_data;
-
+
+ platform_device_register(&i82365_device);
+
/* Finally, schedule a polling interrupt */
if (poll_interval != 0) {
poll_timer.function = pcic_interrupt_wrapper;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Re: pcmcia no worky in 2.5.6[32] 2003-03-03 7:18 [PATCH] Re: pcmcia no worky in 2.5.6[32] Dominik Brodowski @ 2003-03-05 0:54 ` Brett 2003-03-05 6:36 ` Dominik Brodowski 0 siblings, 1 reply; 5+ messages in thread From: Brett @ 2003-03-05 0:54 UTC (permalink / raw) To: Dominik Brodowski; +Cc: generica, linux-kernel On Mon, 3 Mar 2003, Dominik Brodowski wrote: > > Hey, > > > > since 2.5.62, I've not been able to get pcmcia working. > > > > Hardware: toshiba 100CS > > > > I've attached my .config for 2.5.63, > > and a dmesg directly after boot for 2.5.61 and 2.5.63 > > > > any other details needed, please let me know > > > > thanks, > > > > / Brett > > Could you please try this patch? It *should* fix this problem: > Sadly, it didn't do a thing same dmesg/no pcmcia as vanilla 2.5.63 any other ideas ?? thanks, / Brett > --- linux/drivers/pcmcia/i82365.c.original 2003-02-26 09:45:00.000000000 +0100 > +++ linux/drivers/pcmcia/i82365.c 2003-03-03 08:14:29.000000000 +0100 > @@ -1628,11 +1628,11 @@ > request_irq(cs_irq, pcic_interrupt, 0, "i82365", pcic_interrupt); > #endif > > - platform_device_register(&i82365_device); > - > i82365_data.nsock = sockets; > i82365_device.dev.class_data = &i82365_data; > - > + > + platform_device_register(&i82365_device); > + > /* Finally, schedule a polling interrupt */ > if (poll_interval != 0) { > poll_timer.function = pcic_interrupt_wrapper; > > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Re: pcmcia no worky in 2.5.6[32] 2003-03-05 0:54 ` Brett @ 2003-03-05 6:36 ` Dominik Brodowski 2003-03-06 2:07 ` Brett 0 siblings, 1 reply; 5+ messages in thread From: Dominik Brodowski @ 2003-03-05 6:36 UTC (permalink / raw) To: Brett; +Cc: linux-kernel Hi, On Wed, Mar 05, 2003 at 11:54:36AM +1100, Brett wrote: > On Mon, 3 Mar 2003, Dominik Brodowski wrote: > > > > Hey, > > > > > > since 2.5.62, I've not been able to get pcmcia working. > > > > > > Hardware: toshiba 100CS > > > > > > I've attached my .config for 2.5.63, > > > and a dmesg directly after boot for 2.5.61 and 2.5.63 > > > > > > any other details needed, please let me know > > > > > > thanks, > > > > > > / Brett > > > > Could you please try this patch? It *should* fix this problem: > > > > Sadly, it didn't do a thing > same dmesg/no pcmcia as vanilla 2.5.63 > > any other ideas ?? Yes: platform_match within the pcmcia core wasn't doing was it was supposed to do... and it still doesn't work in 2.5.64. So could you please try if it works with this patch against 2.5.64? Many thanks, Dominik diff -ruN linux-original/drivers/base/platform.c linux/drivers/base/platform.c --- linux-original/drivers/base/platform.c 2003-03-05 07:19:19.000000000 +0100 +++ linux/drivers/base/platform.c 2003-03-05 07:22:31.000000000 +0100 @@ -59,12 +59,9 @@ static int platform_match(struct device * dev, struct device_driver * drv) { - char name[BUS_ID_SIZE]; + struct platform_device *pdev = container_of(dev, struct platform_device, dev); - if (sscanf(dev->bus_id,"%s",name)) - return (strcmp(name,drv->name) == 0); - - return 0; + return (strncmp(pdev->name, drv->name, BUS_ID_SIZE) == 0); } struct bus_type platform_bus_type = { diff -ruN linux-original/drivers/pcmcia/hd64465_ss.c linux/drivers/pcmcia/hd64465_ss.c --- linux-original/drivers/pcmcia/hd64465_ss.c 2003-03-05 07:19:13.000000000 +0100 +++ linux/drivers/pcmcia/hd64465_ss.c 2003-03-05 07:35:34.000000000 +0100 @@ -1070,8 +1070,8 @@ } /* hd64465_io_debug = 0; */ - platform_device_register(&hd64465_device); hd64465_device.dev.class_data = &hd64465_data; + platform_device_register(&hd64465_device); return 0; } diff -ruN linux-original/drivers/pcmcia/i82365.c linux/drivers/pcmcia/i82365.c --- linux-original/drivers/pcmcia/i82365.c 2003-03-05 07:19:13.000000000 +0100 +++ linux/drivers/pcmcia/i82365.c 2003-03-05 07:35:34.000000000 +0100 @@ -1628,11 +1628,11 @@ request_irq(cs_irq, pcic_interrupt, 0, "i82365", pcic_interrupt); #endif - platform_device_register(&i82365_device); - i82365_data.nsock = sockets; i82365_device.dev.class_data = &i82365_data; + platform_device_register(&i82365_device); + /* Finally, schedule a polling interrupt */ if (poll_interval != 0) { poll_timer.function = pcic_interrupt_wrapper; diff -ruN linux-original/drivers/pcmcia/tcic.c linux/drivers/pcmcia/tcic.c --- linux-original/drivers/pcmcia/tcic.c 2003-03-05 07:19:13.000000000 +0100 +++ linux/drivers/pcmcia/tcic.c 2003-03-05 07:35:34.000000000 +0100 @@ -452,8 +452,6 @@ sockets++; } - platform_device_register(&tcic_device); - switch (socket_table[0].id) { case TCIC_ID_DB86082: printk("DB86082"); break; @@ -527,6 +525,8 @@ tcic_data.nsock = sockets; tcic_device.dev.class_data = &tcic_data; + platform_device_register(&tcic_device); + return 0; } /* init_tcic */ ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Re: pcmcia no worky in 2.5.6[32] 2003-03-05 6:36 ` Dominik Brodowski @ 2003-03-06 2:07 ` Brett 2003-03-06 23:30 ` [PATCH] pcmcia: it works again! [Was: Re: [PATCH] Re: pcmcia no worky in 2.5.6[32]] Dominik Brodowski 0 siblings, 1 reply; 5+ messages in thread From: Brett @ 2003-03-06 2:07 UTC (permalink / raw) To: Dominik Brodowski; +Cc: linux-kernel On Wed, 5 Mar 2003, Dominik Brodowski wrote: > Hi, > > On Wed, Mar 05, 2003 at 11:54:36AM +1100, Brett wrote: > > On Mon, 3 Mar 2003, Dominik Brodowski wrote: > > > > > > Hey, > > > > > > > > since 2.5.62, I've not been able to get pcmcia working. > > > > > > > > Hardware: toshiba 100CS > > > > > > > > I've attached my .config for 2.5.63, > > > > and a dmesg directly after boot for 2.5.61 and 2.5.63 > > > > > > > > any other details needed, please let me know > > > > > > > > thanks, > > > > > > > > / Brett > > > > > > Could you please try this patch? It *should* fix this problem: > > > > > > > Sadly, it didn't do a thing > > same dmesg/no pcmcia as vanilla 2.5.63 > > > > any other ideas ?? > > Yes: platform_match within the pcmcia core wasn't doing was it was supposed > to do... and it still doesn't work in 2.5.64. So could you please try if it > works with this patch against 2.5.64? > Yep, the patch fixed it. Now happy in 2.5.64 with pcmcia again many thanks, / Brett > > > diff -ruN linux-original/drivers/base/platform.c linux/drivers/base/platform.c > --- linux-original/drivers/base/platform.c 2003-03-05 07:19:19.000000000 +0100 > +++ linux/drivers/base/platform.c 2003-03-05 07:22:31.000000000 +0100 > @@ -59,12 +59,9 @@ > > static int platform_match(struct device * dev, struct device_driver * drv) > { > - char name[BUS_ID_SIZE]; > + struct platform_device *pdev = container_of(dev, struct platform_device, dev); > > - if (sscanf(dev->bus_id,"%s",name)) > - return (strcmp(name,drv->name) == 0); > - > - return 0; > + return (strncmp(pdev->name, drv->name, BUS_ID_SIZE) == 0); > } > > struct bus_type platform_bus_type = { > diff -ruN linux-original/drivers/pcmcia/hd64465_ss.c linux/drivers/pcmcia/hd64465_ss.c > --- linux-original/drivers/pcmcia/hd64465_ss.c 2003-03-05 07:19:13.000000000 +0100 > +++ linux/drivers/pcmcia/hd64465_ss.c 2003-03-05 07:35:34.000000000 +0100 > @@ -1070,8 +1070,8 @@ > } > > /* hd64465_io_debug = 0; */ > - platform_device_register(&hd64465_device); > hd64465_device.dev.class_data = &hd64465_data; > + platform_device_register(&hd64465_device); > > return 0; > } > diff -ruN linux-original/drivers/pcmcia/i82365.c linux/drivers/pcmcia/i82365.c > --- linux-original/drivers/pcmcia/i82365.c 2003-03-05 07:19:13.000000000 +0100 > +++ linux/drivers/pcmcia/i82365.c 2003-03-05 07:35:34.000000000 +0100 > @@ -1628,11 +1628,11 @@ > request_irq(cs_irq, pcic_interrupt, 0, "i82365", pcic_interrupt); > #endif > > - platform_device_register(&i82365_device); > - > i82365_data.nsock = sockets; > i82365_device.dev.class_data = &i82365_data; > > + platform_device_register(&i82365_device); > + > /* Finally, schedule a polling interrupt */ > if (poll_interval != 0) { > poll_timer.function = pcic_interrupt_wrapper; > diff -ruN linux-original/drivers/pcmcia/tcic.c linux/drivers/pcmcia/tcic.c > --- linux-original/drivers/pcmcia/tcic.c 2003-03-05 07:19:13.000000000 +0100 > +++ linux/drivers/pcmcia/tcic.c 2003-03-05 07:35:34.000000000 +0100 > @@ -452,8 +452,6 @@ > sockets++; > } > > - platform_device_register(&tcic_device); > - > switch (socket_table[0].id) { > case TCIC_ID_DB86082: > printk("DB86082"); break; > @@ -527,6 +525,8 @@ > tcic_data.nsock = sockets; > tcic_device.dev.class_data = &tcic_data; > > + platform_device_register(&tcic_device); > + > return 0; > > } /* init_tcic */ > ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] pcmcia: it works again! [Was: Re: [PATCH] Re: pcmcia no worky in 2.5.6[32]] 2003-03-06 2:07 ` Brett @ 2003-03-06 23:30 ` Dominik Brodowski 0 siblings, 0 replies; 5+ messages in thread From: Dominik Brodowski @ 2003-03-06 23:30 UTC (permalink / raw) To: torvalds, Brett; +Cc: linux-kernel, rmk Hi Linus, On Thu, Mar 06, 2003 at 01:07:58PM +1100, Brett wrote: > > Yes: platform_match within the pcmcia core wasn't doing was it was supposed > > to do... and it still doesn't work in 2.5.64. So could you please try if it > > works with this patch against 2.5.64? > > Yep, the patch fixed it. > Now happy in 2.5.64 with pcmcia again > > many thanks, > > / Brett please apply this patch: platform_device_register may only be called after all class-specific device data is initialized, or else the class-type add_device call (which enables the pcmcia sockets) will fail. hd64465_ss.c | 2 +- i82365.c | 4 ++-- tcic.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) Dominik diff -ruN linux-original/drivers/pcmcia/hd64465_ss.c linux/drivers/pcmcia/hd64465_ss.c --- linux-original/drivers/pcmcia/hd64465_ss.c 2003-03-05 07:19:13.000000000 +0100 +++ linux/drivers/pcmcia/hd64465_ss.c 2003-03-05 07:35:34.000000000 +0100 @@ -1070,8 +1070,8 @@ } /* hd64465_io_debug = 0; */ - platform_device_register(&hd64465_device); hd64465_device.dev.class_data = &hd64465_data; + platform_device_register(&hd64465_device); return 0; } diff -ruN linux-original/drivers/pcmcia/i82365.c linux/drivers/pcmcia/i82365.c --- linux-original/drivers/pcmcia/i82365.c 2003-03-05 07:19:13.000000000 +0100 +++ linux/drivers/pcmcia/i82365.c 2003-03-05 07:35:34.000000000 +0100 @@ -1628,11 +1628,11 @@ request_irq(cs_irq, pcic_interrupt, 0, "i82365", pcic_interrupt); #endif - platform_device_register(&i82365_device); - i82365_data.nsock = sockets; i82365_device.dev.class_data = &i82365_data; + platform_device_register(&i82365_device); + /* Finally, schedule a polling interrupt */ if (poll_interval != 0) { poll_timer.function = pcic_interrupt_wrapper; diff -ruN linux-original/drivers/pcmcia/tcic.c linux/drivers/pcmcia/tcic.c --- linux-original/drivers/pcmcia/tcic.c 2003-03-05 07:19:13.000000000 +0100 +++ linux/drivers/pcmcia/tcic.c 2003-03-05 07:35:34.000000000 +0100 @@ -452,8 +452,6 @@ sockets++; } - platform_device_register(&tcic_device); - switch (socket_table[0].id) { case TCIC_ID_DB86082: printk("DB86082"); break; @@ -527,6 +525,8 @@ tcic_data.nsock = sockets; tcic_device.dev.class_data = &tcic_data; + platform_device_register(&tcic_device); + return 0; } /* init_tcic */ ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-03-06 23:26 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2003-03-03 7:18 [PATCH] Re: pcmcia no worky in 2.5.6[32] Dominik Brodowski 2003-03-05 0:54 ` Brett 2003-03-05 6:36 ` Dominik Brodowski 2003-03-06 2:07 ` Brett 2003-03-06 23:30 ` [PATCH] pcmcia: it works again! [Was: Re: [PATCH] Re: pcmcia no worky in 2.5.6[32]] Dominik Brodowski
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).