lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4BE81F35.60607@grandegger.com>
Date:	Mon, 10 May 2010 16:59:01 +0200
From:	Wolfgang Grandegger <wg@...ndegger.com>
To:	Matthias Fuchs <matthias.fuchs@....eu>
CC:	netdev@...r.kernel.org, Socketcan-core@...ts.berlios.de,
	linux-usb@...r.kernel.org
Subject: Re: [PATCH v2] can: Add driver for esd CAN-USB/2 device

On 05/10/2010 04:40 PM, Matthias Fuchs wrote:
> Hi Wolfgang,
> 
> On Monday 10 May 2010 15:43, Wolfgang Grandegger wrote:
>> Hi Matthias,
>>
>> On 05/10/2010 03:28 PM, Matthias Fuchs wrote:
>>> This patch adds a driver for esd's USB high speed
>>> CAN interface. The driver supports devices with
>>> multiple CAN interfaces.
>>>
>>> Signed-off-by: Matthias Fuchs <matthias.fuchs@....eu>
>>> ---
>>>
>>> version 2: 
>>>  - use bus-error reporting and counters
>>
>> I don't find support for CAN_CTRLMODE_BERR_REPORTING, apart from setting
>> the flag. If it's set bus error interrupts should be enabled or disabled
>> otherwise.
>>
>> Wolfgang.
> I expect my implementation to be complete.
> 
> 1) In esd_usb2_rx_event() I pass tx/rxerr in cf->data[6/7].
> 2) I implemented esd_usb2_get_berr_counter(). This function will 
>    return the last tx/rx error counters from the hardware that
>    are kept in priv->bec.
> 3) tx/rx error counter cannot be requested from the hardware so
>    they are stored in priv->bec when they are received from the hardware.
>    There is no way to enable or disable this behavior.
> 4) Finally I enabled the whole interface via CAN_CTRLMODE_BERR_REPORTING
>    for the CAN framework.

BERR_REPORTING != bus error counter

> I don't see where I missed anything.

The equivalent to the following SJA1000 code is missing:

           /* enable interrupts */
           if (priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING)
                   priv->write_reg(priv, REG_IER, IRQ_ALL);
           else
                   priv->write_reg(priv, REG_IER, IRQ_ALL & ~IRQ_BEI);

The user must now explicitly enable bus error reporting with
"ip ... type can berr_reporting on ....

Wolfgang.

 
> Matthias
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ