netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* pull-request: can 2013-03-27
@ 2013-03-27 14:05 Marc Kleine-Budde
  2013-03-27 14:05 ` [PATCH 1/2] can: sja1000: fix define conflict on SH Marc Kleine-Budde
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Marc Kleine-Budde @ 2013-03-27 14:05 UTC (permalink / raw)
  To: netdev; +Cc: linux-can

Hello David,

here's a patch series for net for the v3.9 release cycle. Fengguang Wu found
two problems with the sja1000 drivers:

A macro in the SH architecture collides with one in the sja1000 driver. I
created a minimal patch suited for stable, only changing this particular
define. (Once net is merged back to net-next, I'll post a patch to uniformly
use a SJA1000_ prefix for the sja100 private defines.) If you prefer, I can
squash both patches together.

Fengguang further noticed that the peak pcmcia driver will not compile on archs
without ioport support. I created a patch to limit the driver to archs which
select HAS_IOPORT in Kconfig.

regards,
Marc

---

The following changes since commit b175293ccc98ab84e93d25472d7422b4a897614b:

  Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (2013-03-26 14:24:29 -0700)

are available in the git repository at:


  git://gitorious.org/linux-can/linux-can.git fixes-for-3.9

for you to fetch changes up to 3fd33497f80aa528ded0db2851b48638635d5caa:

  can: sja1000: limit PEAK PCAN-PC Card to HAS_IOPORT (2013-03-27 14:51:49 +0100)

----------------------------------------------------------------
Marc Kleine-Budde (2):
      can: sja1000: fix define conflict on SH
      can: sja1000: limit PEAK PCAN-PC Card to HAS_IOPORT

 drivers/net/can/sja1000/Kconfig   | 1 +
 drivers/net/can/sja1000/plx_pci.c | 4 ++--
 drivers/net/can/sja1000/sja1000.c | 6 +++---
 drivers/net/can/sja1000/sja1000.h | 2 +-
 4 files changed, 7 insertions(+), 6 deletions(-)



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

* [PATCH 1/2] can: sja1000: fix define conflict on SH
  2013-03-27 14:05 pull-request: can 2013-03-27 Marc Kleine-Budde
@ 2013-03-27 14:05 ` Marc Kleine-Budde
  2013-03-27 14:05 ` [PATCH 2/2] can: sja1000: limit PEAK PCAN-PC Card to HAS_IOPORT Marc Kleine-Budde
  2013-03-27 18:10 ` pull-request: can 2013-03-27 David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Marc Kleine-Budde @ 2013-03-27 14:05 UTC (permalink / raw)
  To: netdev; +Cc: linux-can, Marc Kleine-Budde, linux-stable

Thias patch fixes a define conflict between the SH architecture and the sja1000
driver:

    drivers/net/can/sja1000/sja1000.h:59:0: warning:
        "REG_SR" redefined [enabled by default]
    arch/sh/include/asm/ptrace_32.h:25:0: note:
         this is the location of the previous definition

A SJA1000_ prefix is added to the offending sja1000 define only, to make a
minimal patch suited for stable. A later patch will add a SJA1000_ prefix to
all defines in sja1000.h.

Cc: linux-stable <stable@vger.kernel.org>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/sja1000/plx_pci.c | 4 ++--
 drivers/net/can/sja1000/sja1000.c | 6 +++---
 drivers/net/can/sja1000/sja1000.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/can/sja1000/plx_pci.c b/drivers/net/can/sja1000/plx_pci.c
index a042cdc..3c18d7d 100644
--- a/drivers/net/can/sja1000/plx_pci.c
+++ b/drivers/net/can/sja1000/plx_pci.c
@@ -348,7 +348,7 @@ static inline int plx_pci_check_sja1000(const struct sja1000_priv *priv)
 	 */
 	if ((priv->read_reg(priv, REG_CR) & REG_CR_BASICCAN_INITIAL_MASK) ==
 	    REG_CR_BASICCAN_INITIAL &&
-	    (priv->read_reg(priv, REG_SR) == REG_SR_BASICCAN_INITIAL) &&
+	    (priv->read_reg(priv, SJA1000_REG_SR) == REG_SR_BASICCAN_INITIAL) &&
 	    (priv->read_reg(priv, REG_IR) == REG_IR_BASICCAN_INITIAL))
 		flag = 1;
 
@@ -360,7 +360,7 @@ static inline int plx_pci_check_sja1000(const struct sja1000_priv *priv)
 	 * See states on p. 23 of the Datasheet.
 	 */
 	if (priv->read_reg(priv, REG_MOD) == REG_MOD_PELICAN_INITIAL &&
-	    priv->read_reg(priv, REG_SR) == REG_SR_PELICAN_INITIAL &&
+	    priv->read_reg(priv, SJA1000_REG_SR) == REG_SR_PELICAN_INITIAL &&
 	    priv->read_reg(priv, REG_IR) == REG_IR_PELICAN_INITIAL)
 		return flag;
 
diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c
index daf4013..e4df307 100644
--- a/drivers/net/can/sja1000/sja1000.c
+++ b/drivers/net/can/sja1000/sja1000.c
@@ -92,7 +92,7 @@ static void sja1000_write_cmdreg(struct sja1000_priv *priv, u8 val)
 	 */
 	spin_lock_irqsave(&priv->cmdreg_lock, flags);
 	priv->write_reg(priv, REG_CMR, val);
-	priv->read_reg(priv, REG_SR);
+	priv->read_reg(priv, SJA1000_REG_SR);
 	spin_unlock_irqrestore(&priv->cmdreg_lock, flags);
 }
 
@@ -502,7 +502,7 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id)
 
 	while ((isrc = priv->read_reg(priv, REG_IR)) && (n < SJA1000_MAX_IRQ)) {
 		n++;
-		status = priv->read_reg(priv, REG_SR);
+		status = priv->read_reg(priv, SJA1000_REG_SR);
 		/* check for absent controller due to hw unplug */
 		if (status == 0xFF && sja1000_is_absent(priv))
 			return IRQ_NONE;
@@ -530,7 +530,7 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id)
 			/* receive interrupt */
 			while (status & SR_RBS) {
 				sja1000_rx(dev);
-				status = priv->read_reg(priv, REG_SR);
+				status = priv->read_reg(priv, SJA1000_REG_SR);
 				/* check for absent controller */
 				if (status == 0xFF && sja1000_is_absent(priv))
 					return IRQ_NONE;
diff --git a/drivers/net/can/sja1000/sja1000.h b/drivers/net/can/sja1000/sja1000.h
index afa9984..aa48e05 100644
--- a/drivers/net/can/sja1000/sja1000.h
+++ b/drivers/net/can/sja1000/sja1000.h
@@ -56,7 +56,7 @@
 /* SJA1000 registers - manual section 6.4 (Pelican Mode) */
 #define REG_MOD		0x00
 #define REG_CMR		0x01
-#define REG_SR		0x02
+#define SJA1000_REG_SR		0x02
 #define REG_IR		0x03
 #define REG_IER		0x04
 #define REG_ALC		0x0B
-- 
1.8.2.rc2

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

* [PATCH 2/2] can: sja1000: limit PEAK PCAN-PC Card to HAS_IOPORT
  2013-03-27 14:05 pull-request: can 2013-03-27 Marc Kleine-Budde
  2013-03-27 14:05 ` [PATCH 1/2] can: sja1000: fix define conflict on SH Marc Kleine-Budde
@ 2013-03-27 14:05 ` Marc Kleine-Budde
  2013-03-27 18:10 ` pull-request: can 2013-03-27 David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Marc Kleine-Budde @ 2013-03-27 14:05 UTC (permalink / raw)
  To: netdev; +Cc: linux-can, Marc Kleine-Budde, Paul Mundt

This patch limits the PEAK PCAN-PC Card driver to systems with ioports. Fixes a
compile time breakage on SH:

    drivers/net/can/sja1000/peak_pcmcia.c:626:2: error:
        implicit declaration of function 'ioport_unmap'

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/sja1000/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/can/sja1000/Kconfig b/drivers/net/can/sja1000/Kconfig
index b39ca5b..ff2ba86 100644
--- a/drivers/net/can/sja1000/Kconfig
+++ b/drivers/net/can/sja1000/Kconfig
@@ -46,6 +46,7 @@ config CAN_EMS_PCI
 config CAN_PEAK_PCMCIA
 	tristate "PEAK PCAN-PC Card"
 	depends on PCMCIA
+	depends on HAS_IOPORT
 	---help---
 	  This driver is for the PCAN-PC Card PCMCIA adapter (1 or 2 channels)
 	  from PEAK-System (http://www.peak-system.com). To compile this
-- 
1.8.2.rc2


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

* Re: pull-request: can 2013-03-27
  2013-03-27 14:05 pull-request: can 2013-03-27 Marc Kleine-Budde
  2013-03-27 14:05 ` [PATCH 1/2] can: sja1000: fix define conflict on SH Marc Kleine-Budde
  2013-03-27 14:05 ` [PATCH 2/2] can: sja1000: limit PEAK PCAN-PC Card to HAS_IOPORT Marc Kleine-Budde
@ 2013-03-27 18:10 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2013-03-27 18:10 UTC (permalink / raw)
  To: mkl; +Cc: netdev, linux-can

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Wed, 27 Mar 2013 15:05:26 +0100

> Hello David,
> 
> here's a patch series for net for the v3.9 release cycle. Fengguang Wu found
> two problems with the sja1000 drivers:
> 
> A macro in the SH architecture collides with one in the sja1000 driver. I
> created a minimal patch suited for stable, only changing this particular
> define. (Once net is merged back to net-next, I'll post a patch to uniformly
> use a SJA1000_ prefix for the sja100 private defines.) If you prefer, I can
> squash both patches together.
> 
> Fengguang further noticed that the peak pcmcia driver will not compile on archs
> without ioport support. I created a patch to limit the driver to archs which
> select HAS_IOPORT in Kconfig.

Pulled, thanks Marc.

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

end of thread, other threads:[~2013-03-27 18:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-27 14:05 pull-request: can 2013-03-27 Marc Kleine-Budde
2013-03-27 14:05 ` [PATCH 1/2] can: sja1000: fix define conflict on SH Marc Kleine-Budde
2013-03-27 14:05 ` [PATCH 2/2] can: sja1000: limit PEAK PCAN-PC Card to HAS_IOPORT Marc Kleine-Budde
2013-03-27 18:10 ` pull-request: can 2013-03-27 David Miller

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).