mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Komuro <komurojun-mbn@nifty.com>
To: linux@dominikbrodowski.net
Cc: linux-kernel@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>,
	torvalds@osdl.org, linux-pcmcia@lists.infradead.org
Subject: Re: [BUG REPORT!!!] [PATCH 19/49] pcmcia: remove remaining in-kernel pcmcia_get_configuration_info() users
Date: Sun, 2 Nov 2008 17:46:22 +0900	[thread overview]
Message-ID: <20081102174622.02500138.komurojun-mbn@nifty.com> (raw)
In-Reply-To: <20081101110746.41733076.komurojun-mbn@nifty.com>

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@nifty.com>

  reply	other threads:[~2008-11-02  8:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-22 14:58 [PATCH] pcmcia: Fix broken abuse of dev->driver_data Alan Cox
2008-09-22 21:56 ` Dominik Brodowski
2008-09-22 22:12   ` Alan Cox
2008-09-22 22:26     ` Dominik Brodowski
2008-09-22 23:15       ` Alan Cox
2008-09-23  1:31         ` Komuro
2008-09-26 13:29         ` [PATCH git latest] drivers/net: fixing a datarace related to update_stats() Komuro
2008-09-26 16:06           ` Tammy
2008-09-26 17:31           ` Lin Tan
2008-11-01  2:07       ` [BUG REPORT!!!] [PATCH 19/49] pcmcia: remove remaining in-kernel pcmcia_get_configuration_info() users Komuro
2008-11-02  8:46         ` Komuro [this message]
2008-11-02  9:17           ` Dominik Brodowski
2008-11-02 10:33             ` Komuro
2008-11-02 12:04               ` Dominik Brodowski
2008-10-06 12:18     ` [PATCH 03/19] pcmcia: Whine harder about use of EXCLUSIVE Komuro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081102174622.02500138.komurojun-mbn@nifty.com \
    --to=komurojun-mbn@nifty.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pcmcia@lists.infradead.org \
    --cc=linux@dominikbrodowski.net \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®