* 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; 6+ 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] 6+ 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; 6+ 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] 6+ 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; 6+ 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] 6+ 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 2013-04-02 6:01 ` sja1000 private defines - was: " Oliver Hartkopp 2 siblings, 1 reply; 6+ 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] 6+ messages in thread
* sja1000 private defines - was: Re: pull-request: can 2013-03-27 2013-03-27 18:10 ` pull-request: can 2013-03-27 David Miller @ 2013-04-02 6:01 ` Oliver Hartkopp 2013-04-02 7:24 ` Marc Kleine-Budde 0 siblings, 1 reply; 6+ messages in thread From: Oliver Hartkopp @ 2013-04-02 6:01 UTC (permalink / raw) To: mkl; +Cc: linux-can On 27.03.2013 19:10, David Miller wrote: > 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.) Hello Marc, i would suggest to replace REG_ with SJA_ for SJA1000 private defines. 1. There's only one "SJA_EN" private(!) define in linux/drivers/infiniband/hw/qib/qib_iba7322.c which we'll never clash with. There SJA_ is a short form of SPC_JTAG_ and (even if it's not necessary) SJA_EN could be renamed to SJTAG_EN 2. Replacing REG_ with SJA1000_REG_ will produce a linebreak hell in all SJA1000 drivers (and the patch of course) Naming SJA1000 private defines with SJA_ instead of REG_ (and rename your new SJA1000_REG_SR back to SJA_SR) looks the more handy change to me. Regards, Oliver ~/linux$ find . -name \*.[ch] | grep -v can | xargs grep SJA ./include/generated/autoconf.h:#define CONFIG_CAN_SJA1000_MODULE 1 ./include/generated/autoconf.h:#define CONFIG_CAN_SJA1000_ISA_MODULE 1 ./include/generated/autoconf.h:#define CONFIG_CAN_SJA1000_PLATFORM_MODULE 1 ./drivers/infiniband/hw/qib/qib_iba7322.c:#define SJA_EN SYM_MASK(SPC_JTAG_ACCESS_REG, SPC_JTAG_ACCESS_EN) ./drivers/infiniband/hw/qib/qib_iba7322.c: val = SJA_EN; ./drivers/infiniband/hw/qib/qib_iba7322.c: valbase = SJA_EN | (bisten << BISTEN_LSB) | ./drivers/infiniband/hw/qib/qib_iba7322.c: val = SJA_EN | (bisten << BISTEN_LSB); ./drivers/infiniband/hw/qib/qib_iba7322.c: val = SJA_EN | (bisten << BISTEN_LSB) | (R_OP_UPDATE << R_OPCODE_LSB); ./drivers/net/ethernet/icplus/ipg.h:#define IPG_ETHERSTATSJABBERS 0x130 ./drivers/net/ethernet/broadcom/bnx2.h:#define BNX2_EMAC_RX_STAT_ETHERSTATSJABBERS 0x00001538 ./arch/arm/mach-pxa/include/mach/pcm027.h:/* CAN controller SJA1000 (unsupported yet) */ >> >> 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. > -- > To unsubscribe from this list: send the line "unsubscribe netdev" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: sja1000 private defines - was: Re: pull-request: can 2013-03-27 2013-04-02 6:01 ` sja1000 private defines - was: " Oliver Hartkopp @ 2013-04-02 7:24 ` Marc Kleine-Budde 0 siblings, 0 replies; 6+ messages in thread From: Marc Kleine-Budde @ 2013-04-02 7:24 UTC (permalink / raw) To: Oliver Hartkopp; +Cc: linux-can On 04/02/2013 08:01 AM, Oliver Hartkopp wrote: > On 27.03.2013 19:10, David Miller wrote: > >> 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.) > > > Hello Marc, > > i would suggest to replace REG_ with SJA_ for SJA1000 private defines. > > 1. There's only one "SJA_EN" private(!) define in > > linux/drivers/infiniband/hw/qib/qib_iba7322.c > > which we'll never clash with. There SJA_ is a short form of SPC_JTAG_ and > (even if it's not necessary) SJA_EN could be renamed to SJTAG_EN > > 2. Replacing REG_ with SJA1000_REG_ will produce a linebreak hell in all > SJA1000 drivers (and the patch of course) > > Naming SJA1000 private defines with SJA_ instead of REG_ (and rename your new > SJA1000_REG_SR back to SJA_SR) looks the more handy change to me. I have the patch that adds SJA1000_ to all defines ready. Feel free to post a patch that adds a prefix to _all_[1] defines in sja1000.h. [1] If we replace REG_ with SJA_, we still a have lot of defines without a common prefix. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-04-02 7:24 UTC | newest] Thread overview: 6+ 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 2013-04-02 6:01 ` sja1000 private defines - was: " Oliver Hartkopp 2013-04-02 7:24 ` Marc Kleine-Budde
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).