From mroberto at cetuc.puc-rio.br  Wed Jun  2 19:19:01 2010
From: mroberto at cetuc.puc-rio.br (Marcelo Roberto Jimenez)
Date: Wed, 2 Jun 2010 20:19:01 -0300
Subject: Pull request for nanoengine
Message-ID: <AANLkTilh4NtHS5p3tWbMtIU9MBBC-Md13Aw9_RdL3Ogp@mail.gmail.com>

Hi,

The following is a compilation of all the patches I have done for the
nanoengine. Some of these are also valid for SA11xx based machines
like, e.g, sharp Zaurus.

These are just stable and tested patches, this does not include the
PCI patches. All of them have been previously submitted to LKML and
all critics have been included. The patches should be well commented,
in their changesets, but anyway here goes a quick summary:

1) ARM: mach-sa1100: Put nanoEngine support back in the kernel.
2) ARM: mach-sa1100: Add a defconfig for nanoEngine.
3) ARM: mach-sa1100: Fix for compiler warning of uninitialized variable.
4) ARM: mach-sa1100: Fix checkpatch.pl issues in
arch/arm/mach-sa1100/cpu-sa1100.c.
5) ARM: mach-sa1100: Fix checkpatch.pl issues in
arch/arm/mach-sa1100/cpu-sa1110.c.
6) ARM: mach-sa1100: Fix checkpatch.pl issues in drivers/rtc/rtc-sa1100.c.
7) ARM: mach-sa1100: Print the value of RTSR on /proc/drivers/rtc.
- Self explanatory/trivial patches.

8) ARM: mach-sa1100: Fix for a nasty initialization bug in the RTSR.
- Fixes a bug that could cause the system to hang.

9) ARM: mach-sa1100: Better use of the RTC framework for sa11xx.
- This patch uses the new RTC framework to treat some common ioctl.

10) ARM: pcmcia: Fix for building DEBUG with sa11xx_base.c as a module.
- The symbol soc_pcmcia_debug was not beeing exported.

11) ARM: pcmcia: Fix checkpatch.pl issues in drivers/pcmcia/soc_common.c
- Trivial.

12) ARM: pcmcia: Adds nanoEngine PCMCIA support.
- Adds nanoEngine PCMCIA support for two sockets.

Regards,
Marcelo.

--
The following changes since commit aef4b9aaae1decc775778903922bd0075cce7a88:

  Merge branch 'next' of
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc (2010-06-01
14:13:14 -0700)

are available in the git repository at:

  git at github.com:mrjimenez/linux-2.6.git nanoengine

Marcelo Roberto Jimenez (12):
      ARM: mach-sa1100: Put nanoEngine support back in the kernel.
      ARM: mach-sa1100: Add a defconfig for nanoEngine.
      ARM: mach-sa1100: Fix for compiler warning of uninitialized variable.
      ARM: mach-sa1100: Fix checkpatch.pl issues in
arch/arm/mach-sa1100/cpu-sa1100.c.
      ARM: mach-sa1100: Fix checkpatch.pl issues in
arch/arm/mach-sa1100/cpu-sa1110.c.
      ARM: mach-sa1100: Fix checkpatch.pl issues in drivers/rtc/rtc-sa1100.c.
      ARM: mach-sa1100: Print the value of RTSR on /proc/drivers/rtc.
      ARM: mach-sa1100: Fix for a nasty initialization bug in the RTSR.
      ARM: mach-sa1100: Better use of the RTC framework for sa11xx.
      ARM: pcmcia: Fix for building DEBUG with sa11xx_base.c as a module.
      ARM: pcmcia: Fix checkpatch.pl issues in drivers/pcmcia/soc_common.c
      ARM: pcmcia: Adds nanoEngine PCMCIA support.

 arch/arm/configs/nanoengine_defconfig          | 1396 ++++++++++++++++++++++++
 arch/arm/mach-sa1100/Kconfig                   |    8 +
 arch/arm/mach-sa1100/Makefile                  |    2 +
 arch/arm/mach-sa1100/cpu-sa1100.c              |   56 +-
 arch/arm/mach-sa1100/cpu-sa1110.c              |   51 +-
 arch/arm/mach-sa1100/include/mach/nanoengine.h |   30 +
 arch/arm/mach-sa1100/nanoengine.c              |  115 ++
 drivers/pcmcia/Makefile                        |    3 +-
 drivers/pcmcia/sa1100_generic.c                |    3 +
 drivers/pcmcia/sa1100_generic.h                |    1 +
 drivers/pcmcia/sa1100_nanoengine.c             |  219 ++++
 drivers/pcmcia/soc_common.c                    |  129 ++-
 drivers/rtc/rtc-sa1100.c                       |  153 ++-
 13 files changed, 2021 insertions(+), 145 deletions(-)
 create mode 100644 arch/arm/configs/nanoengine_defconfig
 create mode 100644 arch/arm/mach-sa1100/include/mach/nanoengine.h
 create mode 100644 arch/arm/mach-sa1100/nanoengine.c
 create mode 100644 drivers/pcmcia/sa1100_nanoengine.c


From agust at denx.de  Wed Jun  2 19:38:57 2010
From: agust at denx.de (Anatolij Gustschin)
Date: Thu,  3 Jun 2010 01:38:57 +0200
Subject: [PATCH] of/pcmcia: m8xx_pcmcia.c: Fix build failures
Message-ID: <1275521937-11130-1-git-send-email-agust@denx.de>

Fixes build errors caused by the:
- OF device_node pointer being moved into struct device
- typo in match_table field in the struct device_driver
  (which shoud be of_match_table)

Signed-off-by: Anatolij Gustschin <agust at denx.de>
---
 drivers/pcmcia/m8xx_pcmcia.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pcmcia/m8xx_pcmcia.c b/drivers/pcmcia/m8xx_pcmcia.c
index 1a648b9..25e5e30 100644
--- a/drivers/pcmcia/m8xx_pcmcia.c
+++ b/drivers/pcmcia/m8xx_pcmcia.c
@@ -1157,7 +1157,7 @@ static int __init m8xx_probe(struct of_device *ofdev,
 	unsigned int i, m, hwirq;
 	pcmconf8xx_t *pcmcia;
 	int status;
-	struct device_node *np = ofdev->node;
+	struct device_node *np = ofdev->dev.of_node;
 
 	pcmcia_info("%s\n", version);
 
@@ -1301,7 +1301,7 @@ static struct of_platform_driver m8xx_pcmcia_driver = {
 	.driver = {
 		.name = driver_name,
 		.owner = THIS_MODULE,
-		.match_table = m8xx_pcmcia_match,
+		.of_match_table = m8xx_pcmcia_match,
 	},
 	.probe = m8xx_probe,
 	.remove = m8xx_remove,
-- 
1.7.0.4



From akpm at linux-foundation.org  Wed Jun  2 19:38:44 2010
From: akpm at linux-foundation.org (Andrew Morton)
Date: Wed, 2 Jun 2010 16:38:44 -0700
Subject: Pull request for nanoengine
In-Reply-To: <AANLkTilh4NtHS5p3tWbMtIU9MBBC-Md13Aw9_RdL3Ogp@mail.gmail.com>
References: <AANLkTilh4NtHS5p3tWbMtIU9MBBC-Md13Aw9_RdL3Ogp@mail.gmail.com>
Message-ID: <20100602163844.509e9953.akpm@linux-foundation.org>

On Wed, 2 Jun 2010 20:19:01 -0300
Marcelo Roberto Jimenez <mroberto at cetuc.puc-rio.br> wrote:

> The following is a compilation of all the patches I have done for the
> nanoengine. Some of these are also valid for SA11xx based machines
> like, e.g, sharp Zaurus.

Which other kernel developer were you hoping would merge this tree?

>  arch/arm/configs/nanoengine_defconfig          | 1396 ++++++++++++++++++++++++
>  arch/arm/mach-sa1100/Kconfig                   |    8 +
>  arch/arm/mach-sa1100/Makefile                  |    2 +
>  arch/arm/mach-sa1100/cpu-sa1100.c              |   56 +-
>  arch/arm/mach-sa1100/cpu-sa1110.c              |   51 +-
>  arch/arm/mach-sa1100/include/mach/nanoengine.h |   30 +
>  arch/arm/mach-sa1100/nanoengine.c              |  115 ++
>  drivers/pcmcia/Makefile                        |    3 +-
>  drivers/pcmcia/sa1100_generic.c                |    3 +
>  drivers/pcmcia/sa1100_generic.h                |    1 +
>  drivers/pcmcia/sa1100_nanoengine.c             |  219 ++++
>  drivers/pcmcia/soc_common.c                    |  129 ++-
>  drivers/rtc/rtc-sa1100.c                       |  153 ++-

I can only think it must have been Russell.

I've rather lost track of what's happening with ARM subtrees.  I
_think_ it's now the case the relevant maintainers are putting their
trees into linux-next directly and are asking Linus to pull them
directly.  But maybe that's a misconception.

Can someone please explain the current state of play?

Thanks.


From randy.dunlap at oracle.com  Wed Jun  2 21:22:01 2010
From: randy.dunlap at oracle.com (Randy Dunlap)
Date: Wed, 2 Jun 2010 18:22:01 -0700
Subject: Pull request for nanoengine
In-Reply-To: <20100602163844.509e9953.akpm@linux-foundation.org>
References: <AANLkTilh4NtHS5p3tWbMtIU9MBBC-Md13Aw9_RdL3Ogp@mail.gmail.com>
	<20100602163844.509e9953.akpm@linux-foundation.org>
Message-ID: <20100602182201.4fcb3417.randy.dunlap@oracle.com>

On Wed, 2 Jun 2010 16:38:44 -0700 Andrew Morton wrote:

> On Wed, 2 Jun 2010 20:19:01 -0300
> Marcelo Roberto Jimenez <mroberto at cetuc.puc-rio.br> wrote:
> 
> > The following is a compilation of all the patches I have done for the
> > nanoengine. Some of these are also valid for SA11xx based machines
> > like, e.g, sharp Zaurus.
> 
> Which other kernel developer were you hoping would merge this tree?
> 
> >  arch/arm/configs/nanoengine_defconfig          | 1396 ++++++++++++++++++++++++
> >  arch/arm/mach-sa1100/Kconfig                   |    8 +
> >  arch/arm/mach-sa1100/Makefile                  |    2 +
> >  arch/arm/mach-sa1100/cpu-sa1100.c              |   56 +-
> >  arch/arm/mach-sa1100/cpu-sa1110.c              |   51 +-
> >  arch/arm/mach-sa1100/include/mach/nanoengine.h |   30 +
> >  arch/arm/mach-sa1100/nanoengine.c              |  115 ++
> >  drivers/pcmcia/Makefile                        |    3 +-
> >  drivers/pcmcia/sa1100_generic.c                |    3 +
> >  drivers/pcmcia/sa1100_generic.h                |    1 +
> >  drivers/pcmcia/sa1100_nanoengine.c             |  219 ++++
> >  drivers/pcmcia/soc_common.c                    |  129 ++-
> >  drivers/rtc/rtc-sa1100.c                       |  153 ++-
> 
> I can only think it must have been Russell.
> 
> I've rather lost track of what's happening with ARM subtrees.  I
> _think_ it's now the case the relevant maintainers are putting their
> trees into linux-next directly and are asking Linus to pull them
> directly.  But maybe that's a misconception.
> 
> Can someone please explain the current state of play?


Check this from about 2 hours before your question:
  http://lkml.org/lkml/2010/6/2/472  (Linus)


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***


From grant.likely at secretlab.ca  Wed Jun  2 22:11:52 2010
From: grant.likely at secretlab.ca (Grant Likely)
Date: Wed, 2 Jun 2010 20:11:52 -0600
Subject: [PATCH] of/pcmcia: m8xx_pcmcia.c: Fix build failures
In-Reply-To: <1275521937-11130-1-git-send-email-agust@denx.de>
References: <1275521937-11130-1-git-send-email-agust@denx.de>
Message-ID: <20100603021152.GB27186@angua.secretlab.ca>

On Thu, Jun 03, 2010 at 01:38:57AM +0200, Anatolij Gustschin wrote:
> Fixes build errors caused by the:
> - OF device_node pointer being moved into struct device
> - typo in match_table field in the struct device_driver
>   (which shoud be of_match_table)
> 
> Signed-off-by: Anatolij Gustschin <agust at denx.de>

applied



From vzapolskiy at gmail.com  Thu Jun  3 09:25:50 2010
From: vzapolskiy at gmail.com (Vladimir Zapolskiy)
Date: Thu,  3 Jun 2010 17:25:50 +0400
Subject: [PATCH Resend] PCMCIA: add Cogent CSB726 PCMCIA support
Message-ID: <1275571550-24437-1-git-send-email-vzapolskiy@gmail.com>

This patch adds support for CompactFlash socket found in CSB726 board.

Signed-off-by: Vladimir Zapolskiy <vzapolskiy at gmail.com>
Cc: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
Cc: Dominik Brodowski <linux at dominikbrodowski.net>
Acked-by: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
Acked-by: Dominik Brodowski<linux at dominikbrodowski.net>
---
 drivers/pcmcia/Kconfig         |    3 +-
 drivers/pcmcia/Makefile        |    1 +
 drivers/pcmcia/pxa2xx_csb726.c |  156 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 159 insertions(+), 1 deletions(-)
 create mode 100644 drivers/pcmcia/pxa2xx_csb726.c

diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig
index 9f3adbd..168219b 100644
--- a/drivers/pcmcia/Kconfig
+++ b/drivers/pcmcia/Kconfig
@@ -208,7 +208,8 @@ config PCMCIA_PXA2XX
 	depends on ARM && ARCH_PXA && PCMCIA
 	depends on (ARCH_LUBBOCK || MACH_MAINSTONE || PXA_SHARPSL \
 		    || MACH_ARMCORE || ARCH_PXA_PALM || TRIZEPS_PCMCIA \
-		    || ARCOM_PCMCIA || ARCH_PXA_ESERIES || MACH_STARGATE2)
+		    || ARCOM_PCMCIA || ARCH_PXA_ESERIES || MACH_STARGATE2 \
+		    || MACH_CSB726)
 	select PCMCIA_SOC_COMMON
 	help
 	  Say Y here to include support for the PXA2xx PCMCIA controller
diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile
index 83ff802..efcda3f 100644
--- a/drivers/pcmcia/Makefile
+++ b/drivers/pcmcia/Makefile
@@ -74,5 +74,6 @@ pxa2xx-obj-$(CONFIG_MACH_PALMTC)		+= pxa2xx_palmtc.o
 pxa2xx-obj-$(CONFIG_MACH_PALMLD)		+= pxa2xx_palmld.o
 pxa2xx-obj-$(CONFIG_MACH_E740)			+= pxa2xx_e740.o
 pxa2xx-obj-$(CONFIG_MACH_STARGATE2)		+= pxa2xx_stargate2.o
+pxa2xx-obj-$(CONFIG_MACH_CSB726)		+= pxa2xx_csb726.o
 
 obj-$(CONFIG_PCMCIA_PXA2XX)			+= pxa2xx_base.o $(pxa2xx-obj-y)
diff --git a/drivers/pcmcia/pxa2xx_csb726.c b/drivers/pcmcia/pxa2xx_csb726.c
new file mode 100644
index 0000000..bd86e90
--- /dev/null
+++ b/drivers/pcmcia/pxa2xx_csb726.c
@@ -0,0 +1,156 @@
+/*
+ * linux/drivers/pcmcia/pxa2xx_csb726.c
+ *
+ * Cogent CSB726 Compact Flash specific routines.
+ *
+ * Copyright 2010 Vladimir Zapolskiy <vzapolskiy at gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/interrupt.h>
+#include <linux/delay.h>
+#include <linux/platform_device.h>
+#include <linux/gpio.h>
+
+#include <pcmcia/ss.h>
+
+#include <asm/irq.h>
+#include <asm/mach-types.h>
+
+#include "soc_common.h"
+
+#define GPIO_CF_RDY     98
+#define GPIO_CF_CD      99
+#define GPIO_CF_RST     103
+
+static struct pcmcia_irqs irqs[] = {
+	{
+		.sock = 0,
+		.irq  = IRQ_GPIO(GPIO_CF_CD),
+		.str  = "PCMCIA0 CD",
+	},
+};
+
+static int csb726_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
+{
+	int ret;
+
+	ret = gpio_request(GPIO_CF_RST, "CF reset");
+	if (ret)
+		return ret;
+	gpio_direction_output(GPIO_CF_RST, 0);
+
+	skt->socket.pci_irq = IRQ_GPIO(GPIO_CF_RDY);
+	ret = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
+	if (!ret)
+		gpio_free(GPIO_CF_RST);
+
+	return ret;
+}
+
+static void csb726_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
+{
+	soc_pcmcia_free_irqs(skt, irqs, ARRAY_SIZE(irqs));
+	gpio_free(GPIO_CF_RST);
+}
+
+static void csb726_pcmcia_socket_state(struct soc_pcmcia_socket *skt,
+				       struct pcmcia_state *state)
+{
+	state->detect = !gpio_get_value(GPIO_CF_CD);
+	state->ready  = !!gpio_get_value(GPIO_CF_RDY);
+	state->bvd1   = 0; /* not available - battery detect on card */
+	state->bvd2   = 0; /* not available */
+	state->vs_3v  = 1; /* not available - voltage detect for card */
+	state->vs_Xv  = 0; /* not available */
+	state->wrprot = 0; /* not available - write protect */
+}
+
+static int csb726_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
+					  const socket_state_t *state)
+{
+	switch (skt->nr) {
+	case 0:
+		if (state->flags & SS_RESET) {
+			/* reset */
+			gpio_set_value(GPIO_CF_RST, 1);
+			udelay(10);
+			gpio_set_value(GPIO_CF_RST, 0);
+		}
+		break;
+	}
+
+	return 0;
+}
+
+static void csb726_pcmcia_socket_init(struct soc_pcmcia_socket *skt)
+{
+	soc_pcmcia_enable_irqs(skt, irqs, ARRAY_SIZE(irqs));
+}
+
+static void csb726_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)
+{
+	soc_pcmcia_disable_irqs(skt, irqs, ARRAY_SIZE(irqs));
+}
+
+static struct pcmcia_low_level csb726_pcmcia_ops __initdata = {
+	.owner			= THIS_MODULE,
+	.hw_init		= csb726_pcmcia_hw_init,
+	.hw_shutdown		= csb726_pcmcia_hw_shutdown,
+	.socket_state		= csb726_pcmcia_socket_state,
+	.configure_socket	= csb726_pcmcia_configure_socket,
+	.socket_init		= csb726_pcmcia_socket_init,
+	.socket_suspend		= csb726_pcmcia_socket_suspend,
+	.nr			= 1,
+};
+
+static struct platform_device *csb726_pcmcia_device;
+
+static int __init csb726_pcmcia_init(void)
+{
+	int ret;
+
+	if (!machine_is_csb726())
+		return -ENODEV;
+
+	csb726_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
+	if (!csb726_pcmcia_device)
+		return -ENOMEM;
+
+	ret = platform_device_add_data(csb726_pcmcia_device,
+				       &csb726_pcmcia_ops,
+				       sizeof(csb726_pcmcia_ops));
+	if (ret)
+		goto error_put_platform_device;
+
+	ret = platform_device_add(csb726_pcmcia_device);
+	if (ret)
+		goto error_put_platform_device;
+
+	return 0;
+
+error_put_platform_device:
+	platform_device_put(csb726_pcmcia_device);
+
+	return ret;
+}
+
+static void __exit csb726_pcmcia_exit(void)
+{
+	platform_device_unregister(csb726_pcmcia_device);
+}
+
+fs_initcall(csb726_pcmcia_init);
+module_exit(csb726_pcmcia_exit);
+
+MODULE_DESCRIPTION("Cogent CSB726 Compact Flash Driver");
+MODULE_AUTHOR("Vladimir Zapolskiy <vzapolskiy at gmail.com>");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:pxa2xx-pcmcia");
-- 
1.7.0.4



From bugzilla-daemon at bugzilla.kernel.org  Sun Jun  6 02:17:01 2010
From: bugzilla-daemon at bugzilla.kernel.org (bugzilla-daemon at bugzilla.kernel.org)
Date: Sun, 6 Jun 2010 06:17:01 GMT
Subject: [Bug 16138] New: PCMCIA regression
Message-ID: <bug-16138-4463@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=16138

           Summary: PCMCIA regression
           Product: Drivers
           Version: 2.5
    Kernel Version: 2.6.34
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: PCMCIA
        AssignedTo: linux-pcmcia at lists.infradead.org
        ReportedBy: maciej.rutecki at gmail.com
                CC: rjw at sisk.pl, maciej.rutecki at gmail.com,
                    mpatocka at redhat.com
        Regression: Yes


Subject    : PCMCIA regression
Submitter  : Mikulas Patocka <mpatocka at redhat.com>
Date       : 2010-05-25 20:25
Message-ID : Pine.LNX.4.64.1005251619020.12278 at hs20-bc2-1.build.redhat.com
References : http://marc.info/?l=linux-kernel&m=127481913909672&w=2

This entry is being used for tracking a regression from 2.6.33.  Please don't
close it until the problem is fixed in the mainline.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


From bugzilla-daemon at bugzilla.kernel.org  Sun Jun  6 02:17:09 2010
From: bugzilla-daemon at bugzilla.kernel.org (bugzilla-daemon at bugzilla.kernel.org)
Date: Sun, 6 Jun 2010 06:17:09 GMT
Subject: [Bug 16138] PCMCIA regression
In-Reply-To: <bug-16138-4463@https.bugzilla.kernel.org/>
References: <bug-16138-4463@https.bugzilla.kernel.org/>
Message-ID: <201006060617.o566H9q6000643@demeter.kernel.org>

https://bugzilla.kernel.org/show_bug.cgi?id=16138


Maciej Rutecki <maciej.rutecki at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |15310




-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


From bugzilla-daemon at bugzilla.kernel.org  Sun Jun  6 03:14:27 2010
From: bugzilla-daemon at bugzilla.kernel.org (bugzilla-daemon at bugzilla.kernel.org)
Date: Sun, 6 Jun 2010 07:14:27 GMT
Subject: [Bug 16138] PCMCIA regression
In-Reply-To: <bug-16138-4463@https.bugzilla.kernel.org/>
References: <bug-16138-4463@https.bugzilla.kernel.org/>
Message-ID: <201006060714.o567ERWl011864@demeter.kernel.org>

https://bugzilla.kernel.org/show_bug.cgi?id=16138


Dominik Brodowski <linux at brodo.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |linux at brodo.de




--- Comment #1 from Dominik Brodowski <linux at brodo.de>  2010-06-06 07:14:26 ---
Mikulas, have you had the chance to run the tests I mentioned on lkml already?
If not, here are my comments again:

"
Does this warning appear during reume, or during some other "special" use
case? Also, does commit cc83b08fc791045ac197e6f4a030599bcd7100c5 solve this
issue? If not: Could you enable dynamic debug logging via

# mount debugfs
mount none -t debugfs /sys/kernel/debug/

# enable debug
echo "module pcmcia +p" > /sys/kernel/debug/dynamic_debug/control
echo "module pcmcia_core +p" > /sys/kernel/debug/dynamic_debug/control
echo "module yenta_socket +p" > /sys/kernel/debug/dynamic_debug/control

and send me the resulting log (which may be looong).
"

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


From komurojun-mbn at nifty.com  Sun Jun  6 03:56:28 2010
From: komurojun-mbn at nifty.com (Komuro)
Date: Sun, 6 Jun 2010 16:56:28 +0900 (JST)
Subject: [BUG] pcmcia: dev_node removal (drivers with unregister_netdev check)
Message-ID: <24648311.56791275810988104.komurojun-mbn@nifty.com>

Dear Dominik

You introduced a bug to smc91c92_cs.c

link->priv = dev;   
      is necessary at smc91c92_probe.


--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -103,7 +103,6 @@ struct smc_private {
     u_short                    manfid;
     u_short                    cardid;
 
-    dev_node_t                 node;
     struct sk_buff             *saved_skb;
     int                                packets_waiting;
     void                       __iomem *base;
@@ -323,7 +322,6 @@ static int smc91c92_probe(struct pcmcia_device *link)
        return -ENOMEM;
     smc = netdev_priv(dev);
     smc->p_dev = link;
-    link->priv = dev;                    <=  HERE. This is necessary!!
 



From linux at dominikbrodowski.net  Mon Jun  7 12:24:57 2010
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Mon, 7 Jun 2010 18:24:57 +0200
Subject: [PATCH Resend] PCMCIA: add Cogent CSB726 PCMCIA support
In-Reply-To: <1275571550-24437-1-git-send-email-vzapolskiy@gmail.com>
References: <1275571550-24437-1-git-send-email-vzapolskiy@gmail.com>
Message-ID: <20100607162457.GA10712@isilmar-3.linta.de>

Russell,

have you had a chance to review this patch, and/or decide which way it
should take upstream?

Best,
	Dominik

On Thu, Jun 03, 2010 at 05:25:50PM +0400, Vladimir Zapolskiy wrote:
> This patch adds support for CompactFlash socket found in CSB726 board.
> 
> Signed-off-by: Vladimir Zapolskiy <vzapolskiy at gmail.com>
> Cc: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
> Cc: Dominik Brodowski <linux at dominikbrodowski.net>
> Acked-by: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
> Acked-by: Dominik Brodowski<linux at dominikbrodowski.net>
> ---
>  drivers/pcmcia/Kconfig         |    3 +-
>  drivers/pcmcia/Makefile        |    1 +
>  drivers/pcmcia/pxa2xx_csb726.c |  156 ++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 159 insertions(+), 1 deletions(-)
>  create mode 100644 drivers/pcmcia/pxa2xx_csb726.c
> 
> diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig
> index 9f3adbd..168219b 100644
> --- a/drivers/pcmcia/Kconfig
> +++ b/drivers/pcmcia/Kconfig
> @@ -208,7 +208,8 @@ config PCMCIA_PXA2XX
>  	depends on ARM && ARCH_PXA && PCMCIA
>  	depends on (ARCH_LUBBOCK || MACH_MAINSTONE || PXA_SHARPSL \
>  		    || MACH_ARMCORE || ARCH_PXA_PALM || TRIZEPS_PCMCIA \
> -		    || ARCOM_PCMCIA || ARCH_PXA_ESERIES || MACH_STARGATE2)
> +		    || ARCOM_PCMCIA || ARCH_PXA_ESERIES || MACH_STARGATE2 \
> +		    || MACH_CSB726)
>  	select PCMCIA_SOC_COMMON
>  	help
>  	  Say Y here to include support for the PXA2xx PCMCIA controller
> diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile
> index 83ff802..efcda3f 100644
> --- a/drivers/pcmcia/Makefile
> +++ b/drivers/pcmcia/Makefile
> @@ -74,5 +74,6 @@ pxa2xx-obj-$(CONFIG_MACH_PALMTC)		+= pxa2xx_palmtc.o
>  pxa2xx-obj-$(CONFIG_MACH_PALMLD)		+= pxa2xx_palmld.o
>  pxa2xx-obj-$(CONFIG_MACH_E740)			+= pxa2xx_e740.o
>  pxa2xx-obj-$(CONFIG_MACH_STARGATE2)		+= pxa2xx_stargate2.o
> +pxa2xx-obj-$(CONFIG_MACH_CSB726)		+= pxa2xx_csb726.o
>  
>  obj-$(CONFIG_PCMCIA_PXA2XX)			+= pxa2xx_base.o $(pxa2xx-obj-y)
> diff --git a/drivers/pcmcia/pxa2xx_csb726.c b/drivers/pcmcia/pxa2xx_csb726.c
> new file mode 100644
> index 0000000..bd86e90
> --- /dev/null
> +++ b/drivers/pcmcia/pxa2xx_csb726.c
> @@ -0,0 +1,156 @@
> +/*
> + * linux/drivers/pcmcia/pxa2xx_csb726.c
> + *
> + * Cogent CSB726 Compact Flash specific routines.
> + *
> + * Copyright 2010 Vladimir Zapolskiy <vzapolskiy at gmail.com>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + *
> + */
> +
> +#include <linux/module.h>
> +#include <linux/init.h>
> +#include <linux/kernel.h>
> +#include <linux/interrupt.h>
> +#include <linux/delay.h>
> +#include <linux/platform_device.h>
> +#include <linux/gpio.h>
> +
> +#include <pcmcia/ss.h>
> +
> +#include <asm/irq.h>
> +#include <asm/mach-types.h>
> +
> +#include "soc_common.h"
> +
> +#define GPIO_CF_RDY     98
> +#define GPIO_CF_CD      99
> +#define GPIO_CF_RST     103
> +
> +static struct pcmcia_irqs irqs[] = {
> +	{
> +		.sock = 0,
> +		.irq  = IRQ_GPIO(GPIO_CF_CD),
> +		.str  = "PCMCIA0 CD",
> +	},
> +};
> +
> +static int csb726_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
> +{
> +	int ret;
> +
> +	ret = gpio_request(GPIO_CF_RST, "CF reset");
> +	if (ret)
> +		return ret;
> +	gpio_direction_output(GPIO_CF_RST, 0);
> +
> +	skt->socket.pci_irq = IRQ_GPIO(GPIO_CF_RDY);
> +	ret = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
> +	if (!ret)
> +		gpio_free(GPIO_CF_RST);
> +
> +	return ret;
> +}
> +
> +static void csb726_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
> +{
> +	soc_pcmcia_free_irqs(skt, irqs, ARRAY_SIZE(irqs));
> +	gpio_free(GPIO_CF_RST);
> +}
> +
> +static void csb726_pcmcia_socket_state(struct soc_pcmcia_socket *skt,
> +				       struct pcmcia_state *state)
> +{
> +	state->detect = !gpio_get_value(GPIO_CF_CD);
> +	state->ready  = !!gpio_get_value(GPIO_CF_RDY);
> +	state->bvd1   = 0; /* not available - battery detect on card */
> +	state->bvd2   = 0; /* not available */
> +	state->vs_3v  = 1; /* not available - voltage detect for card */
> +	state->vs_Xv  = 0; /* not available */
> +	state->wrprot = 0; /* not available - write protect */
> +}
> +
> +static int csb726_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
> +					  const socket_state_t *state)
> +{
> +	switch (skt->nr) {
> +	case 0:
> +		if (state->flags & SS_RESET) {
> +			/* reset */
> +			gpio_set_value(GPIO_CF_RST, 1);
> +			udelay(10);
> +			gpio_set_value(GPIO_CF_RST, 0);
> +		}
> +		break;
> +	}
> +
> +	return 0;
> +}
> +
> +static void csb726_pcmcia_socket_init(struct soc_pcmcia_socket *skt)
> +{
> +	soc_pcmcia_enable_irqs(skt, irqs, ARRAY_SIZE(irqs));
> +}
> +
> +static void csb726_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)
> +{
> +	soc_pcmcia_disable_irqs(skt, irqs, ARRAY_SIZE(irqs));
> +}
> +
> +static struct pcmcia_low_level csb726_pcmcia_ops __initdata = {
> +	.owner			= THIS_MODULE,
> +	.hw_init		= csb726_pcmcia_hw_init,
> +	.hw_shutdown		= csb726_pcmcia_hw_shutdown,
> +	.socket_state		= csb726_pcmcia_socket_state,
> +	.configure_socket	= csb726_pcmcia_configure_socket,
> +	.socket_init		= csb726_pcmcia_socket_init,
> +	.socket_suspend		= csb726_pcmcia_socket_suspend,
> +	.nr			= 1,
> +};
> +
> +static struct platform_device *csb726_pcmcia_device;
> +
> +static int __init csb726_pcmcia_init(void)
> +{
> +	int ret;
> +
> +	if (!machine_is_csb726())
> +		return -ENODEV;
> +
> +	csb726_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
> +	if (!csb726_pcmcia_device)
> +		return -ENOMEM;
> +
> +	ret = platform_device_add_data(csb726_pcmcia_device,
> +				       &csb726_pcmcia_ops,
> +				       sizeof(csb726_pcmcia_ops));
> +	if (ret)
> +		goto error_put_platform_device;
> +
> +	ret = platform_device_add(csb726_pcmcia_device);
> +	if (ret)
> +		goto error_put_platform_device;
> +
> +	return 0;
> +
> +error_put_platform_device:
> +	platform_device_put(csb726_pcmcia_device);
> +
> +	return ret;
> +}
> +
> +static void __exit csb726_pcmcia_exit(void)
> +{
> +	platform_device_unregister(csb726_pcmcia_device);
> +}
> +
> +fs_initcall(csb726_pcmcia_init);
> +module_exit(csb726_pcmcia_exit);
> +
> +MODULE_DESCRIPTION("Cogent CSB726 Compact Flash Driver");
> +MODULE_AUTHOR("Vladimir Zapolskiy <vzapolskiy at gmail.com>");
> +MODULE_LICENSE("GPL v2");
> +MODULE_ALIAS("platform:pxa2xx-pcmcia");
> -- 
> 1.7.0.4
> 


From bugzilla-daemon at bugzilla.kernel.org  Mon Jun  7 12:35:26 2010
From: bugzilla-daemon at bugzilla.kernel.org (bugzilla-daemon at bugzilla.kernel.org)
Date: Mon, 7 Jun 2010 16:35:26 GMT
Subject: [Bug 16138] PCMCIA regression
In-Reply-To: <bug-16138-4463@https.bugzilla.kernel.org/>
References: <bug-16138-4463@https.bugzilla.kernel.org/>
Message-ID: <201006071635.o57GZQ1p014263@demeter.kernel.org>

https://bugzilla.kernel.org/show_bug.cgi?id=16138





--- Comment #2 from Dominik Brodowski <linux at brodo.de>  2010-06-07 16:35:23 ---
Created an attachment (id=26685)
 --> (https://bugzilla.kernel.org/attachment.cgi?id=26685)
[PATCH] pcmcia: avoid validate_cis failure on CIS override

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


From bugzilla-daemon at bugzilla.kernel.org  Mon Jun  7 12:35:48 2010
From: bugzilla-daemon at bugzilla.kernel.org (bugzilla-daemon at bugzilla.kernel.org)
Date: Mon, 7 Jun 2010 16:35:48 GMT
Subject: [Bug 16138] PCMCIA regression
In-Reply-To: <bug-16138-4463@https.bugzilla.kernel.org/>
References: <bug-16138-4463@https.bugzilla.kernel.org/>
Message-ID: <201006071635.o57GZm3f014371@demeter.kernel.org>

https://bugzilla.kernel.org/show_bug.cgi?id=16138





--- Comment #3 from Dominik Brodowski <linux at brodo.de>  2010-06-07 16:35:47 ---
Mikulas, could you check out this patch, please? Thanks!

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


From marek.vasut at gmail.com  Mon Jun  7 12:56:56 2010
From: marek.vasut at gmail.com (Marek Vasut)
Date: Mon, 7 Jun 2010 18:56:56 +0200
Subject: [PATCH Resend] PCMCIA: add Cogent CSB726 PCMCIA support
In-Reply-To: <20100607162457.GA10712@isilmar-3.linta.de>
References: <1275571550-24437-1-git-send-email-vzapolskiy@gmail.com>
	<20100607162457.GA10712@isilmar-3.linta.de>
Message-ID: <201006071856.56960.marek.vasut@gmail.com>

Dne Po 7. ?ervna 2010 18:24:57 Dominik Brodowski napsal(a):
> Russell,
> 
> have you had a chance to review this patch, and/or decide which way it
> should take upstream?
> 
> Best,
> 	Dominik
> 
> On Thu, Jun 03, 2010 at 05:25:50PM +0400, Vladimir Zapolskiy wrote:
> > This patch adds support for CompactFlash socket found in CSB726 board.
> > 
> > Signed-off-by: Vladimir Zapolskiy <vzapolskiy at gmail.com>
> > Cc: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
> > Cc: Dominik Brodowski <linux at dominikbrodowski.net>
> > Acked-by: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
> > Acked-by: Dominik Brodowski<linux at dominikbrodowski.net>
> > ---
> > 
> >  drivers/pcmcia/Kconfig         |    3 +-
> >  drivers/pcmcia/Makefile        |    1 +
> >  drivers/pcmcia/pxa2xx_csb726.c |  156
> >  ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 159
> >  insertions(+), 1 deletions(-)
> >  create mode 100644 drivers/pcmcia/pxa2xx_csb726.c
> > 
> > diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig
> > index 9f3adbd..168219b 100644
> > --- a/drivers/pcmcia/Kconfig
> > +++ b/drivers/pcmcia/Kconfig
> > @@ -208,7 +208,8 @@ config PCMCIA_PXA2XX
> > 
> >  	depends on ARM && ARCH_PXA && PCMCIA
> >  	depends on (ARCH_LUBBOCK || MACH_MAINSTONE || PXA_SHARPSL \
> >  	
> >  		    || MACH_ARMCORE || ARCH_PXA_PALM || TRIZEPS_PCMCIA \
> > 
> > -		    || ARCOM_PCMCIA || ARCH_PXA_ESERIES || MACH_STARGATE2)
> > +		    || ARCOM_PCMCIA || ARCH_PXA_ESERIES || MACH_STARGATE2 \
> > +		    || MACH_CSB726)
> > 
> >  	select PCMCIA_SOC_COMMON
> >  	help
> >  	
> >  	  Say Y here to include support for the PXA2xx PCMCIA controller
> > 
> > diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile
> > index 83ff802..efcda3f 100644
> > --- a/drivers/pcmcia/Makefile
> > +++ b/drivers/pcmcia/Makefile
> > @@ -74,5 +74,6 @@ pxa2xx-obj-$(CONFIG_MACH_PALMTC)		+= 
pxa2xx_palmtc.o
> > 
> >  pxa2xx-obj-$(CONFIG_MACH_PALMLD)		+= pxa2xx_palmld.o
> >  pxa2xx-obj-$(CONFIG_MACH_E740)			+= pxa2xx_e740.o
> >  pxa2xx-obj-$(CONFIG_MACH_STARGATE2)		+= pxa2xx_stargate2.o
> > 
> > +pxa2xx-obj-$(CONFIG_MACH_CSB726)		+= pxa2xx_csb726.o
> > 
> >  obj-$(CONFIG_PCMCIA_PXA2XX)			+= pxa2xx_base.o 
$(pxa2xx-obj-y)
> > 
> > diff --git a/drivers/pcmcia/pxa2xx_csb726.c
> > b/drivers/pcmcia/pxa2xx_csb726.c new file mode 100644
> > index 0000000..bd86e90
> > --- /dev/null
> > +++ b/drivers/pcmcia/pxa2xx_csb726.c
> > @@ -0,0 +1,156 @@
> > +/*
> > + * linux/drivers/pcmcia/pxa2xx_csb726.c
> > + *
> > + * Cogent CSB726 Compact Flash specific routines.
> > + *
> > + * Copyright 2010 Vladimir Zapolskiy <vzapolskiy at gmail.com>
> > + *
> > + * This program is free software; you can redistribute it and/or modify
> > + * it under the terms of the GNU General Public License version 2 as
> > + * published by the Free Software Foundation.
> > + *
> > + */
> > +
> > +#include <linux/module.h>
> > +#include <linux/init.h>
> > +#include <linux/kernel.h>
> > +#include <linux/interrupt.h>
> > +#include <linux/delay.h>
> > +#include <linux/platform_device.h>
> > +#include <linux/gpio.h>
> > +
> > +#include <pcmcia/ss.h>
> > +
> > +#include <asm/irq.h>
> > +#include <asm/mach-types.h>
> > +
> > +#include "soc_common.h"
> > +
> > +#define GPIO_CF_RDY     98
> > +#define GPIO_CF_CD      99
> > +#define GPIO_CF_RST     103
> > +
> > +static struct pcmcia_irqs irqs[] = {
> > +	{
> > +		.sock = 0,
> > +		.irq  = IRQ_GPIO(GPIO_CF_CD),
> > +		.str  = "PCMCIA0 CD",
> > +	},
> > +};
> > +
> > +static int csb726_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
> > +{
> > +	int ret;
> > +
> > +	ret = gpio_request(GPIO_CF_RST, "CF reset");
> > +	if (ret)
> > +		return ret;
> > +	gpio_direction_output(GPIO_CF_RST, 0);

This can also fail.

> > +
> > +	skt->socket.pci_irq = IRQ_GPIO(GPIO_CF_RDY);

gpio_to_irq();

> > +	ret = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
> > +	if (!ret)
> > +		gpio_free(GPIO_CF_RST);

Use a failpath here:
if (ret) { dev_err(); goto err1; }
return 0;
err1:
...

> > +
> > +	return ret;
> > +}
> > +
> > +static void csb726_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
> > +{
> > +	soc_pcmcia_free_irqs(skt, irqs, ARRAY_SIZE(irqs));
> > +	gpio_free(GPIO_CF_RST);
> > +}
> > +
> > +static void csb726_pcmcia_socket_state(struct soc_pcmcia_socket *skt,
> > +				       struct pcmcia_state *state)
> > +{
> > +	state->detect = !gpio_get_value(GPIO_CF_CD);
> > +	state->ready  = !!gpio_get_value(GPIO_CF_RDY);

Is the double negation (!!) needed here?

> > +	state->bvd1   = 0; /* not available - battery detect on card */
> > +	state->bvd2   = 0; /* not available */
> > +	state->vs_3v  = 1; /* not available - voltage detect for card */
> > +	state->vs_Xv  = 0; /* not available */
> > +	state->wrprot = 0; /* not available - write protect */
> > +}
> > +
> > +static int csb726_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
> > +					  const socket_state_t *state)
> > +{
> > +	switch (skt->nr) {
> > +	case 0:

You registered just one socket anyway ... how can socket->nr be != 0?

> > +		if (state->flags & SS_RESET) {
> > +			/* reset */
> > +			gpio_set_value(GPIO_CF_RST, 1);
> > +			udelay(10);
> > +			gpio_set_value(GPIO_CF_RST, 0);
> > +		}
> > +		break;
> > +	}
> > +
> > +	return 0;
> > +}
> > +
> > +static void csb726_pcmcia_socket_init(struct soc_pcmcia_socket *skt)
> > +{
> > +	soc_pcmcia_enable_irqs(skt, irqs, ARRAY_SIZE(irqs));
> > +}
> > +
> > +static void csb726_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)
> > +{
> > +	soc_pcmcia_disable_irqs(skt, irqs, ARRAY_SIZE(irqs));
> > +}
> > +
> > +static struct pcmcia_low_level csb726_pcmcia_ops __initdata = {
> > +	.owner			= THIS_MODULE,
> > +	.hw_init		= csb726_pcmcia_hw_init,
> > +	.hw_shutdown		= csb726_pcmcia_hw_shutdown,
> > +	.socket_state		= csb726_pcmcia_socket_state,
> > +	.configure_socket	= csb726_pcmcia_configure_socket,
> > +	.socket_init		= csb726_pcmcia_socket_init,
> > +	.socket_suspend		= csb726_pcmcia_socket_suspend,
> > +	.nr			= 1,
> > +};
> > +
> > +static struct platform_device *csb726_pcmcia_device;
> > +
> > +static int __init csb726_pcmcia_init(void)
> > +{
> > +	int ret;
> > +
> > +	if (!machine_is_csb726())
> > +		return -ENODEV;
> > +
> > +	csb726_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
> > +	if (!csb726_pcmcia_device)
> > +		return -ENOMEM;
> > +
> > +	ret = platform_device_add_data(csb726_pcmcia_device,
> > +				       &csb726_pcmcia_ops,
> > +				       sizeof(csb726_pcmcia_ops));
> > +	if (ret)
> > +		goto error_put_platform_device;
> > +
> > +	ret = platform_device_add(csb726_pcmcia_device);
> > +	if (ret)
> > +		goto error_put_platform_device;
> > +
> > +	return 0;
> > +
> > +error_put_platform_device:
> > +	platform_device_put(csb726_pcmcia_device);
> > +
> > +	return ret;
> > +}
> > +
> > +static void __exit csb726_pcmcia_exit(void)
> > +{
> > +	platform_device_unregister(csb726_pcmcia_device);
> > +}
> > +
> > +fs_initcall(csb726_pcmcia_init);

module_init();

> > +module_exit(csb726_pcmcia_exit);
> > +
> > +MODULE_DESCRIPTION("Cogent CSB726 Compact Flash Driver");
> > +MODULE_AUTHOR("Vladimir Zapolskiy <vzapolskiy at gmail.com>");
> > +MODULE_LICENSE("GPL v2");
> > +MODULE_ALIAS("platform:pxa2xx-pcmcia");
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Cheers!


From linux at dominikbrodowski.net  Fri Jun 11 10:44:53 2010
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Fri, 11 Jun 2010 16:44:53 +0200
Subject: [PATCH 1/4] pcmcia: only keep saved I365_CSCINT flag if there is no
	PCI irq
In-Reply-To: <20100611144359.GA9572@comet.dominikbrodowski.net>
References: <20100611144359.GA9572@comet.dominikbrodowski.net>
Message-ID: <1276267496-9836-1-git-send-email-linux@dominikbrodowski.net>

Keeping the saved I365_CSCINT flag around breaks PCMCIA on some system,
and is only needed on a few systems to get PCMCIA to work. This patch
allows PCMCIA to work on both types, and it fixes
https://bugzilla.kernel.org/show_bug.cgi?id=16015

Reported-by: Justin P. Mattock <justinmattock at gmail.com>
CC: <stable at kernel.org>
Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
---
 drivers/pcmcia/yenta_socket.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c
index 424e576..6bf8b2c 100644
--- a/drivers/pcmcia/yenta_socket.c
+++ b/drivers/pcmcia/yenta_socket.c
@@ -975,7 +975,7 @@ static irqreturn_t yenta_probe_handler(int irq, void *dev_id)
 /* probes the PCI interrupt, use only on override functions */
 static int yenta_probe_cb_irq(struct yenta_socket *socket)
 {
-	u8 reg;
+	u8 reg = 0;
 
 	if (!socket->cb_irq)
 		return -1;
@@ -989,7 +989,8 @@ static int yenta_probe_cb_irq(struct yenta_socket *socket)
 	}
 
 	/* generate interrupt, wait */
-	reg = exca_readb(socket, I365_CSCINT);
+	if (!socket->dev->irq)
+		reg = exca_readb(socket, I365_CSCINT);
 	exca_writeb(socket, I365_CSCINT, reg | I365_CSC_STSCHG);
 	cb_writel(socket, CB_SOCKET_EVENT, -1);
 	cb_writel(socket, CB_SOCKET_MASK, CB_CSTSMASK);
-- 
1.7.0.4



From linux at dominikbrodowski.net  Fri Jun 11 10:44:56 2010
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Fri, 11 Jun 2010 16:44:56 +0200
Subject: [PATCH 4/4] pcmcia: avoid validate_cis failure on CIS override
In-Reply-To: <20100611144359.GA9572@comet.dominikbrodowski.net>
References: <20100611144359.GA9572@comet.dominikbrodowski.net>
Message-ID: <1276267496-9836-4-git-send-email-linux@dominikbrodowski.net>

Commit a8408c17 introduced a new check to pccard_validate_cis(),
which avoids any "late" calls to this function. This broke the
insertion of cards which require a CIS override which changes
the number of card functions. Fix this by asserting that this
is _not_ a late call, but a proper call early during the card
insertion process.

Fixes https://bugzilla.kernel.org/show_bug.cgi?id=16138

Reported-by: Mikulas Patocka <mpatocka at redhat.com>
CC: <stable at kernel.org>
Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
---
 drivers/pcmcia/ds.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 7ef7ade..9fc3398 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -671,6 +671,7 @@ static void pcmcia_requery(struct pcmcia_socket *s)
 		if (old_funcs != new_funcs) {
 			/* we need to re-start */
 			pcmcia_card_remove(s, NULL);
+			s->functions = 0;
 			pcmcia_card_add(s);
 		}
 	}
-- 
1.7.0.4



From linux at dominikbrodowski.net  Fri Jun 11 10:43:59 2010
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Fri, 11 Jun 2010 16:43:59 +0200
Subject: [git pull] PCMCIA bugfixes for 2.6.35-rc3
Message-ID: <20100611144359.GA9572@comet.dominikbrodowski.net>

Linus,

in order to solve a few bugs -- among them most probably bug 16138, even
though the bug reporter hasn't verified the bugfix so far -- please pull
from

  git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6.git urgent

The diffstat and list of changes follows; the patches are sent to the PCMCIA
list.

Thanks,
	Dominik

----

Dominik Brodowski (3):
      pcmcia: only keep saved I365_CSCINT flag if there is no PCI irq
      pcmcia: dev_node removal bugfix
      pcmcia: avoid validate_cis failure on CIS override

Justin P. Mattock (1):
      pcmcia: yenta_socket.c Remove extra #ifdef CONFIG_YENTA_TI

 drivers/net/pcmcia/smc91c92_cs.c |    1 +
 drivers/pcmcia/ds.c              |    1 +
 drivers/pcmcia/yenta_socket.c    |   19 +++++++++----------
 3 files changed, 11 insertions(+), 10 deletions(-)


From linux at dominikbrodowski.net  Fri Jun 11 10:44:55 2010
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Fri, 11 Jun 2010 16:44:55 +0200
Subject: [PATCH 3/4] pcmcia: dev_node removal bugfix
In-Reply-To: <20100611144359.GA9572@comet.dominikbrodowski.net>
References: <20100611144359.GA9572@comet.dominikbrodowski.net>
Message-ID: <1276267496-9836-3-git-send-email-linux@dominikbrodowski.net>

Patch c7c2fa07 removed one line too much from smc91c92_cs.c.

Reported-by: Komuro <komurojun-mbn at nifty.com>
CC: netdev at vger.kernel.org
CC: linux-wireless at vger.kernel.org
Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
---
 drivers/net/pcmcia/smc91c92_cs.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index 7b6fe89..64e6a84 100644
--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -322,6 +322,7 @@ static int smc91c92_probe(struct pcmcia_device *link)
 	return -ENOMEM;
     smc = netdev_priv(dev);
     smc->p_dev = link;
+    link->priv = dev;
 
     spin_lock_init(&smc->lock);
     link->io.NumPorts1 = 16;
-- 
1.7.0.4



From linux at dominikbrodowski.net  Fri Jun 11 10:44:54 2010
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Fri, 11 Jun 2010 16:44:54 +0200
Subject: [PATCH 2/4] pcmcia: yenta_socket.c Remove extra #ifdef CONFIG_YENTA_TI
In-Reply-To: <20100611144359.GA9572@comet.dominikbrodowski.net>
References: <20100611144359.GA9572@comet.dominikbrodowski.net>
Message-ID: <1276267496-9836-2-git-send-email-linux@dominikbrodowski.net>

From: Justin P. Mattock <justinmattock at gmail.com>

Seems pointless to have two #ifdef's with the same
CONFIG_YENTA_TI. Remove the extra one and
move CARDBUS_TYPE_ENE with the others.

[linux at dominikbrodowski.net: spelling & whitespace fixes]
Signed-off-by: Justin P. Mattock <justinmattock at gmail.com>
Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
---
 drivers/pcmcia/yenta_socket.c |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c
index 6bf8b2c..f1d4137 100644
--- a/drivers/pcmcia/yenta_socket.c
+++ b/drivers/pcmcia/yenta_socket.c
@@ -880,6 +880,12 @@ static struct cardbus_type cardbus_type[] = {
 		.restore_state	= ti_restore_state,
 		.sock_init	= ti_init,
 	},
+	[CARDBUS_TYPE_ENE]	= {
+		.override	= ene_override,
+		.save_state	= ti_save_state,
+		.restore_state	= ti_restore_state,
+		.sock_init	= ti_init,
+	},
 #endif
 #ifdef CONFIG_YENTA_RICOH
 	[CARDBUS_TYPE_RICOH]	= {
@@ -902,14 +908,6 @@ static struct cardbus_type cardbus_type[] = {
 		.restore_state	= o2micro_restore_state,
 	},
 #endif
-#ifdef CONFIG_YENTA_TI
-	[CARDBUS_TYPE_ENE]	= {
-		.override	= ene_override,
-		.save_state	= ti_save_state,
-		.restore_state	= ti_restore_state,
-		.sock_init	= ti_init,
-	},
-#endif
 };
 
 
-- 
1.7.0.4



From komurojun-mbn at nifty.com  Fri Jun 11 20:49:53 2010
From: komurojun-mbn at nifty.com (Komuro)
Date: Sat, 12 Jun 2010 09:49:53 +0900 (JST)
Subject: [BUG?] pcmcia: IO port probe is broken on 2.6.35-rc2?
In-Reply-To: <7370688.56801275810988472.komurojun-mbn@nifty.com>
References: <7370688.56801275810988472.komurojun-mbn@nifty.com>
Message-ID: <21738314.20761276303793549.komurojun-mbn@nifty.com>


Hi,

It seems "IO port probe" is broken on 2.6.35.rc2.

[2.6.35-rc2]
pcmcia_socket pcmcia_socket0: cs: IO port probe 0x100-0x3af: excluding excludi
ng 0x100-0x107 0x108-0x10f 0x110-0x117 0x118-0x11f 0x120-0x127 0x128-0x12f 0x1
30-0x137 0x138-0x13f 0x140-0x147 0x148-0x14f 0x150-0x157 0x158-0x15f 0x160-0x1
67 0x168-0x177 0x170-0x17f 0x180-0x187 0x188-0x18f 0x190-0x197 0x198-0x19f 0x1
a0-0x1a7 0x1a8-0x1af 0x1b0-0x1b7 0x1b8-0x1bf 0x1c0-0x1c7 0x1c8-0x1cf 0x1d0-0x1
d7 0x1d8-0x1df 0x1e0-0x1e7 0x1e8-0x1f7 0x1f0-0x1ff 0x200-0x207 0x208-0x20f 0x2
10-0x217 0x218-0x21f 0x220-0x227 0x228-0x22f 0x230-0x237 0x238-0x23f 0x248-0x2
4f 0x240-0x247 0x290-0x297 0x290-0x297 0x2c0-0x2c7 0x2c8-0x2cf 0x2d0-0x2d7 0x2
d8-0x2df 0x2e0-0x2e7 0x2e8-0x2ef 0x2f0-0x2f7 0x2f8-0x2ff 0x300-0x307 0x308-0x3
0f 0x310-0x317 0x318-0x31f 0x320-0x327 0x328-0x32f 0x330-0x337 0x338-0x33f 0x3
40-0x347 0x348-0x34f 0x350-0x357 0x358-0x35f 0x360-0x367 0x368-0x37f 0x370-0x3
87 0x388-0x38f 0x390-0x397 0x398-0x39f 0x3a8-0x3af
 0x3a0-0x3a7
pcmcia_socket pcmcia_socket1: cs: IO port probe 0x3e0-0x4ff:
pcmcia_socket pcmcia_socket0: cs: IO port probe 0x3e0-0x4ff: excluding 0x3e0-0
x3e7 excluding 0x3f0-0x41f 0x3e0-0x3e7 0x3f0-0x41f 0x4d0-0x4d7 0x4d0-0x4d7

pcmcia_socket pcmcia_socket1: cs: IO port probe 0x820-0x8ff:
pcmcia_socket pcmcia_socket0: cs: IO port probe 0x820-0x8ff: excluding 0x820-0
x87f excluding 0x820-0x87f

pcmcia_socket pcmcia_socket1: cs: IO port probe 0xc00-0xcf7:
pcmcia_socket pcmcia_socket0: cs: IO port probe 0xc00-0xcf7: clean.
 clean.

[2.6.34]
pcmcia_socket pcmcia_socket1: cs: IO port probe 0x100-0x3af: excluding 0x170-0
x177 0x1f0-0x1f7 0x290-0x297 0x370-0x37f
pcmcia_socket pcmcia_socket1: cs: IO port probe 0x3e0-0x4ff: excluding 0x3e0-0
x3e7 0x3f0-0x41f 0x4d0-0x4d7
pcmcia_socket pcmcia_socket1: cs: IO port probe 0x820-0x8ff: excluding 0x820-0
x87f
pcmcia_socket pcmcia_socket1: cs: IO port probe 0xc00-0xcf7: clean.

Komuro



From linux at dominikbrodowski.net  Sat Jun 12 04:04:35 2010
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Sat, 12 Jun 2010 10:04:35 +0200
Subject: [BUG?] pcmcia: IO port probe is broken on 2.6.35-rc2?
In-Reply-To: <21738314.20761276303793549.komurojun-mbn@nifty.com>
References: <7370688.56801275810988472.komurojun-mbn@nifty.com>
	<21738314.20761276303793549.komurojun-mbn@nifty.com>
Message-ID: <20100612080435.GA7159@comet.dominikbrodowski.net>

Dear Komuro,

could you compare /proc/ioports between 2.6.34 and 2.6.35-rc2, please?

Thanks,
	Dominik


From komurojun-mbn at nifty.com  Sun Jun 13 00:11:43 2010
From: komurojun-mbn at nifty.com (Komuro)
Date: Sun, 13 Jun 2010 13:11:43 +0900 (JST)
Subject: [BUG?] pcmcia: IO port probe is broken on 2.6.35-rc2?
In-Reply-To: <20100612080435.GA7159@comet.dominikbrodowski.net>
References: <20100612080435.GA7159@comet.dominikbrodowski.net>
	<7370688.56801275810988472.komurojun-mbn@nifty.com>
	<21738314.20761276303793549.komurojun-mbn@nifty.com>
Message-ID: <15764923.41951276402303179.komurojun-mbn@nifty.com>


Hi,

/proc/ioports between 2.6.34. and 2.6.35-rc2 is
same.

Currently I can't reproduce this problem.

0000-ffff : PCI Bus #00
  0000-001f : dma1
  0020-0021 : pic1
  0040-0043 : timer0
  0050-0053 : timer1
  0060-0060 : keyboard
  0064-0064 : keyboard
  0080-008f : dma page reg
  00a0-00a1 : pic2
  00c0-00df : dma2
  00f0-00ff : fpu
  0170-0177 : 0000:00:0f.1
    0170-0177 : pata_via
  01f0-01f7 : 0000:00:0f.1
    01f0-01f7 : pata_via
  0290-0297 : pnp 00:09
  0300-031f : pcmcia_socket0
  0376-0376 : 0000:00:0f.1
    0376-0376 : pata_via
  03c0-03df : vga+
  03e1-03e7 : pnp 00:0a
  03f2-03f2 : floppy
  03f4-03f5 : floppy
  03f6-03f6 : 0000:00:0f.1
    03f6-03f6 : pata_via
  03f7-03f7 : floppy
  03f8-03ff : serial
  0400-041f : pnp 00:0a
  04d0-04d1 : pnp 00:0a
  0680-06ff : pnp 00:09
  0800-087f : pnp 00:0a
    0800-0803 : ACPI PM1a_EVT_BLK
    0804-0805 : ACPI PM1a_CNT_BLK
    0808-080b : ACPI PM_TMR
    0820-0823 : ACPI GPE0_BLK
  0cf8-0cff : PCI conf1
  1000-10ff : PCI CardBus 0000:03
  1400-14ff : PCI CardBus 0000:03
  1800-18ff : 0000:00:11.6
  5010-5015 : ACPI CPU throttle
  b000-b0ff : 0000:00:0a.0
  b400-b4ff : 0000:00:0f.0
    b400-b4ff : sata_via
  b800-b80f : 0000:00:0f.0
    b800-b80f : sata_via
  c000-c003 : 0000:00:0f.0
    c000-c003 : sata_via
  c400-c407 : 0000:00:0f.0
    c400-c407 : sata_via
  c800-c803 : 0000:00:0f.0
    c800-c803 : sata_via
  d000-d007 : 0000:00:0f.0
    d000-d007 : sata_via
  d400-d41f : 0000:00:10.0
  d800-d81f : 0000:00:10.1
  e000-e01f : 0000:00:10.2
  e400-e41f : 0000:00:10.3
  e800-e8ff : 0000:00:11.5
  fc00-fc0f : 0000:00:0f.1
    fc00-fc0f : pata_via



From linux at dominikbrodowski.net  Sun Jun 13 04:05:33 2010
From: linux at dominikbrodowski.net (Dominik Brodowski)
Date: Sun, 13 Jun 2010 10:05:33 +0200
Subject: [BUG?] pcmcia: IO port probe is broken on 2.6.35-rc2?
In-Reply-To: <15764923.41951276402303179.komurojun-mbn@nifty.com>
References: <20100612080435.GA7159@comet.dominikbrodowski.net>
	<7370688.56801275810988472.komurojun-mbn@nifty.com>
	<21738314.20761276303793549.komurojun-mbn@nifty.com>
	<15764923.41951276402303179.komurojun-mbn@nifty.com>
Message-ID: <20100613080533.GA9796@isilmar-3.linta.de>

Dear Komuro,

On Sun, Jun 13, 2010 at 01:11:43PM +0900, Komuro wrote:
> /proc/ioports between 2.6.34. and 2.6.35-rc2 is
> same.
> 
> Currently I can't reproduce this problem.

as nothing changed in this code between .34 and .35-rc2, would you agree in
not attempting to track it down further at the moment? I also can't see how
this could only happen once in a while.... So, if this appears again, please
tell me so :)

Thanks & best,
	Dominik


From bugzilla-daemon at bugzilla.kernel.org  Sun Jun 13 07:51:24 2010
From: bugzilla-daemon at bugzilla.kernel.org (bugzilla-daemon at bugzilla.kernel.org)
Date: Sun, 13 Jun 2010 11:51:24 GMT
Subject: [Bug 16015] yenta_socket.c  broken wireless cards.
In-Reply-To: <bug-16015-4463@https.bugzilla.kernel.org/>
References: <bug-16015-4463@https.bugzilla.kernel.org/>
Message-ID: <201006131151.o5DBpO6g017730@demeter.kernel.org>

https://bugzilla.kernel.org/show_bug.cgi?id=16015


Rafael J. Wysocki <rjw at sisk.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
     Kernel Version|                            |2.6.34
         Resolution|                            |CODE_FIX




--- Comment #4 from Rafael J. Wysocki <rjw at sisk.pl>  2010-06-13 11:51:19 ---
Fixed by commit 02caa56e4b789b80ae7e0f0f0789f94b44ad32ef .

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


From bugzilla-daemon at bugzilla.kernel.org  Sun Jun 13 07:51:37 2010
From: bugzilla-daemon at bugzilla.kernel.org (bugzilla-daemon at bugzilla.kernel.org)
Date: Sun, 13 Jun 2010 11:51:37 GMT
Subject: [Bug 16015] yenta_socket.c  broken wireless cards.
In-Reply-To: <bug-16015-4463@https.bugzilla.kernel.org/>
References: <bug-16015-4463@https.bugzilla.kernel.org/>
Message-ID: <201006131151.o5DBpb7b017859@demeter.kernel.org>

https://bugzilla.kernel.org/show_bug.cgi?id=16015


Rafael J. Wysocki <rjw at sisk.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED




-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


From bugzilla-daemon at bugzilla.kernel.org  Sun Jun 13 09:25:44 2010
From: bugzilla-daemon at bugzilla.kernel.org (bugzilla-daemon at bugzilla.kernel.org)
Date: Sun, 13 Jun 2010 13:25:44 GMT
Subject: [Bug 16015] yenta_socket.c  broken wireless cards.
In-Reply-To: <bug-16015-4463@https.bugzilla.kernel.org/>
References: <bug-16015-4463@https.bugzilla.kernel.org/>
Message-ID: <201006131325.o5DDPiTe008125@demeter.kernel.org>

https://bugzilla.kernel.org/show_bug.cgi?id=16015





--- Comment #5 from Justin P. Mattock <justinmattock at gmail.com>  2010-06-13 13:25:41 ---
alright.. then once that hits the main tree then this can be closed..

Thanks!

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


From bugzilla-daemon at bugzilla.kernel.org  Sun Jun 13 10:05:45 2010
From: bugzilla-daemon at bugzilla.kernel.org (bugzilla-daemon at bugzilla.kernel.org)
Date: Sun, 13 Jun 2010 14:05:45 GMT
Subject: [Bug 16138] PCMCIA regression
In-Reply-To: <bug-16138-4463@https.bugzilla.kernel.org/>
References: <bug-16138-4463@https.bugzilla.kernel.org/>
Message-ID: <201006131405.o5DE5j1Y019012@demeter.kernel.org>

https://bugzilla.kernel.org/show_bug.cgi?id=16138


Rafael J. Wysocki <rjw at sisk.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |PATCH_ALREADY_AVAILABLE




--- Comment #4 from Rafael J. Wysocki <rjw at sisk.pl>  2010-06-13 14:05:13 ---
Handled-By : Dominik Brodowski <linux at brodo.de>
Patch : https://bugzilla.kernel.org/attachment.cgi?id=26685

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


From bugzilla-daemon at bugzilla.kernel.org  Mon Jun 21 14:12:23 2010
From: bugzilla-daemon at bugzilla.kernel.org (bugzilla-daemon at bugzilla.kernel.org)
Date: Mon, 21 Jun 2010 18:12:23 GMT
Subject: [Bug 16138] PCMCIA regression
In-Reply-To: <bug-16138-4463@https.bugzilla.kernel.org/>
References: <bug-16138-4463@https.bugzilla.kernel.org/>
Message-ID: <201006211812.o5LICNm7008149@demeter.kernel.org>

https://bugzilla.kernel.org/show_bug.cgi?id=16138


Rafael J. Wysocki <rjw at sisk.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED
         Resolution|PATCH_ALREADY_AVAILABLE     |CODE_FIX




--- Comment #5 from Rafael J. Wysocki <rjw at sisk.pl>  2010-06-21 18:12:16 ---
Fixed by commit b83156b52dd77979cc93bafc2283929532f6f7d0 .

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


