[BUG REPORT!!!] [PATCH 19/49] pcmcia: remove remaining in-kernel pcmcia_get_configuration_info() users
Komuro
komurojun-mbn at nifty.com
Sun Nov 2 03:46:22 EST 2008
Dear Dominik
The reason of this bug is link->io is not copied
to the slave serial_cs device.
My patch below fix this problem.
--- ds.c.orig 2008-11-01 08:59:13.000000000 +0900
+++ ds.c 2008-11-02 17:05:44.000000000 +0900
@@ -668,6 +668,7 @@ struct pcmcia_device * pcmcia_device_add
list_for_each_entry(tmp_dev, &s->devices_list, socket_device_list)
if (p_dev->func == tmp_dev->func) {
p_dev->function_config = tmp_dev->function_config;
+ p_dev->io = tmp_dev->io;
kref_get(&p_dev->function_config->ref);
}
Best Regards
Komuro
> Dear Dominik
>
> Unfortunately, your path "[PATCH 19/49] pcmcia: remove remaining in-kernel
> pcmcia_get_configuration_info() users"
> broke the "serial_cs" and other drivers.
>
> You replace "config->BasePort2" to "link->io.BasePort2" at serial_cs.
>
> But link->io.BasePort2, link->io.NumPorts2(etc)
> does not contain correct value (it is zero).
>
> Please fix this problem (or reveart the patch).
>
>
> Best Regards
> Komuro
>
> Here is your patch.
> >--- a/drivers/serial/serial_cs.c
> >+++ b/drivers/serial/serial_cs.c
> >@@ -488,23 +488,23 @@ static int simple_config_check_notpicky(struct pcmcia_device *p_dev,
> > static int simple_config(struct pcmcia_device *link)
> > {
> > struct serial_info *info = link->priv;
> >- config_info_t config;
> >- int i, try;
> >+ int i = -ENODEV, try;
> >
> > /* If the card is already configured, look up the port and irq */
> >- i = pcmcia_get_configuration_info(link, &config);
> >- if ((i == CS_SUCCESS) && (config.Attributes & CONF_VALID_CLIENT)) {
> >+ if (link->function_config) {
> > unsigned int port = 0;
> >- if ((config.BasePort2 != 0) && (config.NumPorts2 == 8)) {
> >- port = config.BasePort2;
> >+ if ((link->io.BasePort2 != 0) &&
> >+ (link->io.NumPorts2 == 8)) {
> >+ port = link->io.BasePort2;
> > info->slave = 1;
> > } else if ((info->manfid == MANFID_OSITECH) &&
> >- (config.NumPorts1 == 0x40)) {
> >- port = config.BasePort1 + 0x28;
> >+ (link->io.NumPorts1 == 0x40)) {
> >+ port = link->io.BasePort1 + 0x28;
> > info->slave = 1;
> > }
> > if (info->slave) {
> >- return setup_serial(link, info, port, config.AssignedIRQ);
> >+ return setup_serial(link, info, port,
> >+ link->irq.AssignedIRQ);
> }
> }
>
>
>
>
> _______________________________________________
> Linux PCMCIA reimplementation list
> http://lists.infradead.org/mailman/listinfo/linux-pcmcia
--
Komuro <komurojun-mbn at nifty.com>
More information about the linux-pcmcia
mailing list