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: <4AC9D79C.1030406@grandegger.com>
Date:	Mon, 05 Oct 2009 13:25:16 +0200
From:	Wolfgang Grandegger <wg@...ndegger.com>
To:	Anant Gole <anantgole@...com>
CC:	netdev@...r.kernel.org, socketcan-core@...ts.berlios.de,
	linux-arm-kernel@...ts.arm.linux.org.uk
Subject: Re: [PATCH] net-next:can: add TI CAN (HECC) driver

Anant Gole wrote:
> TI HECC (High End CAN Controller) module is found on many TI devices. It
> has 32 hardware mailboxes with full implementation of CAN protocol 2.0B
> with bus speeds up to 1Mbps. Specifications of the module are available
> on TI web <http://www.ti.com>
> 
> Signed-off-by: Anant Gole <anantgole@...com>

I already reviewed this driver on the Socketcan-core ML and it's almost
OK from the Socket-CAN point of view. Just one issue...

[snip]
> diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c
> new file mode 100644
> index 0000000..9090103
> --- /dev/null
> +++ b/drivers/net/can/ti_hecc.c
[snip]
> +static int ti_hecc_set_btc(struct ti_hecc_priv *priv)
> +{
> +	struct can_bittiming *bit_timing = &priv->can.bittiming;
> +	u32 can_btc;
> +
> +	can_btc = (bit_timing->phase_seg2 - 1) & 0x7;
> +	can_btc |= ((bit_timing->phase_seg1 + bit_timing->prop_seg - 1)
> +			& 0xF) << 3;
> +	if (bit_timing->brp > 4 && priv->can.ctrlmode & CAN_CTRLMODE_3_SAMPLES)
> +			can_btc |= HECC_CANBTC_SAM;
> +	else
> +		dev_info(priv->ndev->dev.parent,
> +			"WARN: Triple sampling not set due to h/w limitations"
> +			" at %d bitrate", bit_timing->bitrate);

That's not correct from my point of view. The warning message should
only be printed when the user tries to set triple sampling. I think it
should be similar to:

	if (priv->can.ctrlmode & CAN_CTRLMODE_3_SAMPLES) {
		if (bit_timing->brp > 4)
			can_btc |= HECC_CANBTC_SAM;
		else
			dev_warn(priv->ndev->dev.parent,
			"Triple sampling not set due to h/w "
			limitations");
	}

Apart from that, the patch looks OK.

Wolfgang.

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