<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/net/can/c_can, branch v3.2.2</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>can: c_can: remove duplicated #include</title>
<updated>2011-07-24T03:01:15+00:00</updated>
<author>
<name>Huang Weiyi</name>
<email>weiyi.huang@gmail.com</email>
</author>
<published>2011-07-22T22:19:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4570a5248bafd9d06d31ab6f6ef337c90a2a4bc0'/>
<id>4570a5248bafd9d06d31ab6f6ef337c90a2a4bc0</id>
<content type='text'>
Remove duplicated #include('s) in
  drivers/net/can/c_can/c_can.c
  drivers/net/can/c_can/c_can_platform.c

Signed-off-by: Huang Weiyi &lt;weiyi.huang@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove duplicated #include('s) in
  drivers/net/can/c_can/c_can.c
  drivers/net/can/c_can/c_can_platform.c

Signed-off-by: Huang Weiyi &lt;weiyi.huang@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Remove unneeded version.h includes from drivers/net/</title>
<updated>2011-06-24T09:40:08+00:00</updated>
<author>
<name>Jesper Juhl</name>
<email>jj@chaosbits.net</email>
</author>
<published>2011-06-24T09:40:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=95cb3656c09fcf6577138337216c27744ebc91e2'/>
<id>95cb3656c09fcf6577138337216c27744ebc91e2</id>
<content type='text'>
It was pointed out by 'make versioncheck' that some includes of
linux/version.h are not needed in drivers/net/.
This patch removes them.

Signed-off-by: Jesper Juhl &lt;jj@chaosbits.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It was pointed out by 'make versioncheck' that some includes of
linux/version.h are not needed in drivers/net/.
This patch removes them.

Signed-off-by: Jesper Juhl &lt;jj@chaosbits.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix common misspellings</title>
<updated>2011-03-31T14:26:23+00:00</updated>
<author>
<name>Lucas De Marchi</name>
<email>lucas.demarchi@profusion.mobi</email>
</author>
<published>2011-03-31T01:57:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=25985edcedea6396277003854657b5f3cb31a628'/>
<id>25985edcedea6396277003854657b5f3cb31a628</id>
<content type='text'>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>can: c_can: Fix tx_bytes accounting</title>
<updated>2011-03-28T06:35:01+00:00</updated>
<author>
<name>Jan Altenberg</name>
<email>jan@linutronix.de</email>
</author>
<published>2011-03-28T01:24:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=dc760b375e50a47847d4942811bd9679beeb5535'/>
<id>dc760b375e50a47847d4942811bd9679beeb5535</id>
<content type='text'>
The current SocketCAN implementation for the Bosch c_can cell doesn't
account the TX bytes correctly, because it calls
c_can_inval_msg_object() (which clears the msg ctrl register) before
reading the DLC value:

for (/* nix */; (priv-&gt;tx_next - priv-&gt;tx_echo) &gt; 0; priv-&gt;tx_echo++) {
        msg_obj_no = get_tx_echo_msg_obj(priv);
        c_can_inval_msg_object(dev, 0, msg_obj_no);
        val = c_can_read_reg32(priv, &amp;priv-&gt;regs-&gt;txrqst1);
        if (!(val &amp; (1 &lt;&lt; msg_obj_no))) {
                can_get_echo_skb(dev,
                                msg_obj_no - C_CAN_MSG_OBJ_TX_FIRST);
                stats-&gt;tx_bytes += priv-&gt;read_reg(priv,
                                &amp;priv-&gt;regs-&gt;ifregs[0].msg_cntrl)
                                &amp; IF_MCONT_DLC_MASK;
                stats-&gt;tx_packets++;
        }
}

So, we will always read 0 for the DLC value and "ifconfig" will report
*0* TX Bytes.

The fix is quite easy: Just move c_can_inval_msg_object() to the end of
the if() statement. So:
      * We only call c_can_inval_msg_object() if the message was
        actually transmitted
      * We read out the DLC value _before_ clearing the msg ctrl
        register

Signed-off-by: Jan Altenberg &lt;jan@linutronix.de&gt;
Acked-by: Kurt Van Dijck &lt;kurt.van.dijck@eia.be&gt;
Acked-by: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current SocketCAN implementation for the Bosch c_can cell doesn't
account the TX bytes correctly, because it calls
c_can_inval_msg_object() (which clears the msg ctrl register) before
reading the DLC value:

for (/* nix */; (priv-&gt;tx_next - priv-&gt;tx_echo) &gt; 0; priv-&gt;tx_echo++) {
        msg_obj_no = get_tx_echo_msg_obj(priv);
        c_can_inval_msg_object(dev, 0, msg_obj_no);
        val = c_can_read_reg32(priv, &amp;priv-&gt;regs-&gt;txrqst1);
        if (!(val &amp; (1 &lt;&lt; msg_obj_no))) {
                can_get_echo_skb(dev,
                                msg_obj_no - C_CAN_MSG_OBJ_TX_FIRST);
                stats-&gt;tx_bytes += priv-&gt;read_reg(priv,
                                &amp;priv-&gt;regs-&gt;ifregs[0].msg_cntrl)
                                &amp; IF_MCONT_DLC_MASK;
                stats-&gt;tx_packets++;
        }
}

So, we will always read 0 for the DLC value and "ifconfig" will report
*0* TX Bytes.

The fix is quite easy: Just move c_can_inval_msg_object() to the end of
the if() statement. So:
      * We only call c_can_inval_msg_object() if the message was
        actually transmitted
      * We read out the DLC value _before_ clearing the msg ctrl
        register

Signed-off-by: Jan Altenberg &lt;jan@linutronix.de&gt;
Acked-by: Kurt Van Dijck &lt;kurt.van.dijck@eia.be&gt;
Acked-by: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>can: c_can_platform: fix irq check in probe</title>
<updated>2011-03-28T06:35:01+00:00</updated>
<author>
<name>Marc Kleine-Budde</name>
<email>mkl@pengutronix.de</email>
</author>
<published>2011-03-24T02:34:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b0052b088cf0cb688b4630c1d520c57276da71a5'/>
<id>b0052b088cf0cb688b4630c1d520c57276da71a5</id>
<content type='text'>
This patch fixes the check in the probe function whether a IRQ was supplied
to the driver. The original driver check the irq "struct resource *" against
&lt;= 0. Use "platform_get_irq" instead.

Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Cc: Bhupesh Sharma &lt;bhupesh.sharma@st.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes the check in the probe function whether a IRQ was supplied
to the driver. The original driver check the irq "struct resource *" against
&lt;= 0. Use "platform_get_irq" instead.

Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Cc: Bhupesh Sharma &lt;bhupesh.sharma@st.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>can: c_can: disable one shot mode until driver is fixed</title>
<updated>2011-03-28T06:35:00+00:00</updated>
<author>
<name>Marc Kleine-Budde</name>
<email>mkl@pengutronix.de</email>
</author>
<published>2011-03-24T02:34:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ee6f0988a69b3a81bcea0871418ecf5db332149c'/>
<id>ee6f0988a69b3a81bcea0871418ecf5db332149c</id>
<content type='text'>
This patch disables the one shot mode, until the driver has been fixed and
tested to support it.

&gt; I'm quite sure I've seen a situation where msg_obj 17 "seemed" to be
&gt; pending, while msg_obj 18 and 19 already have been transmitted. But
&gt; in that case, I enabled ONESHOT for the can interface, which enables
&gt; the DA mode (automatic retransmission is disabled).

Reported-by: Jan Altenberg &lt;jan@linutronix.de&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Kurt Van Dijck &lt;kurt.van.dijck@eia.be&gt;
Cc: Bhupesh Sharma &lt;bhupesh.sharma@st.com&gt;
Acked-by: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch disables the one shot mode, until the driver has been fixed and
tested to support it.

&gt; I'm quite sure I've seen a situation where msg_obj 17 "seemed" to be
&gt; pending, while msg_obj 18 and 19 already have been transmitted. But
&gt; in that case, I enabled ONESHOT for the can interface, which enables
&gt; the DA mode (automatic retransmission is disabled).

Reported-by: Jan Altenberg &lt;jan@linutronix.de&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Kurt Van Dijck &lt;kurt.van.dijck@eia.be&gt;
Cc: Bhupesh Sharma &lt;bhupesh.sharma@st.com&gt;
Acked-by: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>can: c_can: Do basic c_can configuration _before_ enabling the interrupts</title>
<updated>2011-03-22T01:19:26+00:00</updated>
<author>
<name>Jan Altenberg</name>
<email>jan@linutronix.de</email>
</author>
<published>2011-03-22T01:19:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4f2d56c45fec7c15169599cab05e9f6df18769d0'/>
<id>4f2d56c45fec7c15169599cab05e9f6df18769d0</id>
<content type='text'>
I ran into some trouble while testing the SocketCAN driver for the BOSCH
C_CAN controller. The interface is not correctly initialized, if I put
some CAN traffic on the line, _while_ the interface is being started
(which means: the interface doesn't come up correcty, if there's some RX
traffic while doing 'ifconfig can0 up').

The current implementation enables the controller interrupts _before_
doing the basic c_can configuration. I think, this should be done the
other way round.

The patch below fixes things for me.

Signed-off-by: Jan Altenberg &lt;jan@linutronix.de&gt;
Acked-by: Kurt Van Dijck &lt;kurt.van.dijck@eia.be&gt;
Acked-by: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I ran into some trouble while testing the SocketCAN driver for the BOSCH
C_CAN controller. The interface is not correctly initialized, if I put
some CAN traffic on the line, _while_ the interface is being started
(which means: the interface doesn't come up correcty, if there's some RX
traffic while doing 'ifconfig can0 up').

The current implementation enables the controller interrupts _before_
doing the basic c_can configuration. I think, this should be done the
other way round.

The patch below fixes things for me.

Signed-off-by: Jan Altenberg &lt;jan@linutronix.de&gt;
Acked-by: Kurt Van Dijck &lt;kurt.van.dijck@eia.be&gt;
Acked-by: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>can: c_can: Added support for Bosch C_CAN controller</title>
<updated>2011-02-14T06:51:44+00:00</updated>
<author>
<name>Bhupesh Sharma</name>
<email>bhupesh.sharma@st.com</email>
</author>
<published>2011-02-14T06:51:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=881ff67ad45041f6ff08441aa17302aea77bd054'/>
<id>881ff67ad45041f6ff08441aa17302aea77bd054</id>
<content type='text'>
Bosch C_CAN controller is a full-CAN implementation which is compliant
to CAN protocol version 2.0 part A and B. Bosch C_CAN user manual can be
obtained from:

http://www.semiconductors.bosch.de/media/en/pdf/ipmodules_1/c_can/users_manual_c_can.pdf

This patch adds the support for this controller.
The following are the design choices made while writing the controller
driver:
1. Interface Register set IF1 has be used only in the current design.
2. Out of the 32 Message objects available, 16 are kept aside for RX
   purposes and the rest for TX purposes.
3. NAPI implementation is such that both the TX and RX paths function
   in polling mode.

Signed-off-by: Bhupesh Sharma &lt;bhupesh.sharma@st.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bosch C_CAN controller is a full-CAN implementation which is compliant
to CAN protocol version 2.0 part A and B. Bosch C_CAN user manual can be
obtained from:

http://www.semiconductors.bosch.de/media/en/pdf/ipmodules_1/c_can/users_manual_c_can.pdf

This patch adds the support for this controller.
The following are the design choices made while writing the controller
driver:
1. Interface Register set IF1 has be used only in the current design.
2. Out of the 32 Message objects available, 16 are kept aside for RX
   purposes and the rest for TX purposes.
3. NAPI implementation is such that both the TX and RX paths function
   in polling mode.

Signed-off-by: Bhupesh Sharma &lt;bhupesh.sharma@st.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
