Re: [PATCH] can: hi311x: Work around TX complete interrupt erratum

2018-05-10 Thread Akshay Bhat
a packet is waiting in > the RX FIFO, instead of looking at the INTF register. > > Cc: Mathias Duckeck <m.duck...@kunbus.de> > Cc: Akshay Bhat <akshay.b...@timesys.com> > Cc: Casey Fitzpatrick <casey.fitzpatr...@timesys.com> > Cc: sta...@vger.kernel.org # v4.12+ > Signed-off-by: Lukas Wunner <lu...@wunner.de> > --- Acked-by: Akshay Bhat <akshay.b...@timesys.com>

Re: [PATCH] can: hi311x: Acquire SPI lock on ->do_get_berr_counter

2018-05-09 Thread Akshay Bhat
ut in > reality the chip has never sent away the frame since the commands it > received were malformed. > > Fix by acquiring the SPI lock in hi3110_get_berr_counter(). > > I've scrutinized the entire driver for further unlocked SPI accesses but > found no others. > > Cc

Re: [PATCH v4 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2017-04-04 Thread Akshay Bhat
On 04/04/2017 11:34 AM, Marc Kleine-Budde wrote: > On 03/24/2017 06:20 PM, Akshay Bhat wrote: >> Hi Marc, >> >> On 03/17/2017 05:10 PM, Akshay Bhat wrote: >>> This patch adds support for the Holt HI-311x CAN controller. The HI311x >>> CAN controller i

Re: [PATCH v4 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2017-03-24 Thread Akshay Bhat
Hi Marc, On 03/17/2017 05:10 PM, Akshay Bhat wrote: > This patch adds support for the Holt HI-311x CAN controller. The HI311x > CAN controller is capable of transmitting and receiving standard data > frames, extended data frames and remote frames. The HI311x interfaces > with the h

Re: [PATCH v4 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2017-03-20 Thread Akshay Bhat
Hi Wolfgang, On 03/20/2017 12:46 PM, Wolfgang Grandegger wrote: ..snip.. >> >> The top 3 bits of HI3110_READ_ERR (BUSOFF, TXERRP, RXERRP) are valid >> even if HI3110_INT_BUSERR is not set. > > I'm confused! If you disable BUSERR interrupts, you do not get the > status bits any longer, you said.

Re: [PATCH v4 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2017-03-20 Thread Akshay Bhat
Hi Wolfgang, On 03/19/2017 12:17 PM, Wolfgang Grandegger wrote: > Hello Akshay, > > I still see some improvements... > > Am 17.03.2017 um 22:10 schrieb Akshay Bhat: >> This patch adds support for the Holt HI-311x CAN controller. The HI311x >> CAN controller

[PATCH v4 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2017-03-17 Thread Akshay Bhat
Signed-off-by: Akshay Bhat <nod...@gmail.com> --- v3 -> v4: Address comments from Wolfgang Grandegger: - Add support for CAN warning state reporting - Add support for reporting tx/rx error counts in bus error messages - Keep bus error interrupts enabled to detect CAN state changes

[PATCH v4 1/2] can: holt_hi311x: document device tree bindings

2017-03-17 Thread Akshay Bhat
Document the HOLT HI-311x CAN device tree bindings. Signed-off-by: Akshay Bhat <nod...@gmail.com> Acked-by: Rob Herring <r...@kernel.org> --- v3 -> v4: - No changes .../devicetree/bindings/net/can/holt_hi311x.txt| 24 ++ 1 file changed, 24 insertions(

Re: [PATCH v2 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2017-03-17 Thread Akshay Bhat
Hi Wolfgang, On 03/17/2017 01:04 PM, Wolfgang Grandegger wrote: > > Hm, that's unusual. Cable disconnected and then send a message: > > $ grep /proc/interrupts; sleep 10; /proc/interrupts > > should make things clear. But maybe it's a clever chip and it does stop > sending error messages if

Re: [PATCH v2 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2017-03-17 Thread Akshay Bhat
Hi Wolfgang, On 03/17/2017 03:39 AM, Wolfgang Grandegger wrote: > Hello Akshay, > > Am 16.03.2017 um 23:29 schrieb Akshay Bhat: >> Hi Wolfgang, >> >> On 03/16/2017 04:02 PM, Wolfgang Grandegger wrote: >>> >>> Looks much better now! There are m

Re: [PATCH v2 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2017-03-16 Thread Akshay Bhat
Hi Wolfgang, On 03/16/2017 04:02 PM, Wolfgang Grandegger wrote: > > Looks much better now! There are message for state changes to error > warning and passive. Just the following message is not correct: > > (000.200824) can0 2004 [8] 00 40 00 00 00 00 5F 19 ERRORFRAME >

Re: [PATCH v2 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2017-03-16 Thread Akshay Bhat
Hi Wolfgang, On 03/15/2017 05:42 AM, Wolfgang Grandegger wrote: > Hello Akshay, > ..snip.. >> >> So here is my plan: >> - Have the bus error interrupt always enabled >> - If berr-reporting off, then have the isr checks/reports state changes > > Error state change messages should always be

Re: [PATCH v2 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2017-03-14 Thread Akshay Bhat
Hi Wolfgang, On Tue, Mar 14, 2017 at 2:08 PM, Wolfgang Grandegger wrote: ...snip >> /disconnect cable >> can0 2088 [8] 00 00 00 19 00 00 28 00 ERRORFRAME >> protocol-violation{{}{acknowledge-slot}} >> bus-error >>

Re: [PATCH v2 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2017-03-14 Thread Akshay Bhat
Hi Wolfgang, On 03/14/2017 08:11 AM, Wolfgang Grandegger wrote: > ... snip ... >>> A few other things to check: >>> >>> Run "cangen" and monitor the message with "candump -e any,0:0,#FFF". >>> Then 1) disconnect the cable or 2) short-circuit CAN low and high at the >>> connector. You should

Re: [PATCH v2 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2017-03-13 Thread Akshay Bhat
Hi Wolfgang, On 03/09/2017 12:36 PM, Wolfgang Grandegger wrote: > Hello, > > doing a quick review... I realized a few issues... > > Am 17.01.2017 um 20:22 schrieb Akshay Bhat: >> +static u8 hi3110_read(struct spi_device *spi, u8 command) >> +{ >> +struct hi

[PATCH v3 1/2] can: holt_hi311x: document device tree bindings

2017-03-13 Thread Akshay Bhat
Document the HOLT HI-311x CAN device tree bindings. Signed-off-by: Akshay Bhat <nod...@gmail.com> Acked-by: Rob Herring <r...@kernel.org> --- v2 -> v3: - No changes .../devicetree/bindings/net/can/holt_hi311x.txt| 24 ++ 1 file changed, 24 insertions(

[PATCH v3 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2017-03-13 Thread Akshay Bhat
Signed-off-by: Akshay Bhat <nod...@gmail.com> --- v2 -> v3: Address comments from Wolfgang Grandegger: - Remove noisy debug messages in hi3110 read/write - Remove error messages which worsen failure conditions - Do not copy data bytes for RTR messages - Simplify the logic to setting the

Re: [PATCH v2 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2017-03-09 Thread Akshay Bhat
Hi Wolfgang, On 03/09/2017 09:45 AM, Wolfgang Grandegger wrote: > Hello Akshay, > > Am 09.03.2017 um 13:34 schrieb Akshay Bhat: >> >> Hi Wolfgang, >> >> Good question. I have not worked with MPC251x but the HI-311x performs >> much better because HI-3110

Re: [PATCH v2 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2017-03-09 Thread Akshay Bhat
included in the Linux kernel. Below are detailed test results if you like: https://goo.gl/VWgzp7 Ones of particular interest: 10M-msgs-1M-bitrate-100burst-40ms-interval-leaf.png 10M-msgs-1M-bitrate-100burst-40ms-interval-pwc.txt Thanks, Akshay > > Am 07.03.2017 um 16:31 schrieb Akshay Bhat: &

Re: [PATCH v2 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2017-03-07 Thread Akshay Bhat
On 01/17/2017 02:22 PM, Akshay Bhat wrote: > This patch adds support for the Holt HI-311x CAN controller. The HI311x > CAN controller is capable of transmitting and receiving standard data > frames, extended data frames and remote frames. The HI311x interfaces > with the h

[PATCH v2 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2017-01-17 Thread Akshay Bhat
Signed-off-by: Akshay Bhat <nod...@gmail.com> --- v1 -> v2: Address comments from Marc Kleine-Budde: - use u8 instead of uint8_t - alphabetically sort Makefile and Kconfig - copy over copyright information from mcp251x - use single space after each marco - add missing HI3110_ namespace i

[PATCH v2 1/2] can: holt_hi311x: document device tree bindings

2017-01-17 Thread Akshay Bhat
Document the HOLT HI-311x CAN device tree bindings. Signed-off-by: Akshay Bhat <nod...@gmail.com> Acked-by: Rob Herring <r...@kernel.org> --- v1 -> v2: - No changes .../devicetree/bindings/net/can/holt_hi311x.txt| 24 ++ 1 file changed, 24 insertions(

Re: [PATCH 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2017-01-17 Thread Akshay Bhat
Marc, On 01/03/2017 10:31 AM, Marc Kleine-Budde wrote: > On 11/14/2016 06:55 PM, Akshay Bhat wrote: >> This patch adds support for the Holt HI-311x CAN controller. The HI311x >> CAN controller is capable of transmitting and receiving standard data >> frames, extended data fra

[PATCH 1/2] can: holt_hi311x: document device tree bindings

2016-11-14 Thread Akshay Bhat
Document the HOLT HI-311x CAN device tree bindings. Signed-off-by: Akshay Bhat <nod...@gmail.com> --- .../devicetree/bindings/net/can/holt_hi311x.txt| 24 ++ 1 file changed, 24 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/can/holt_hi31

[PATCH 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2016-11-14 Thread Akshay Bhat
Signed-off-by: Akshay Bhat <nod...@gmail.com> --- drivers/net/can/spi/Kconfig |6 + drivers/net/can/spi/Makefile |1 + drivers/net/can/spi/hi311x.c | 1071 ++ 3 files changed, 1078 insertions(+) create mode 100644 drivers/net/can/spi/hi