Re: [PATCHv3 10/14] HSI: Introduce driver for SSI Protocol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

> This adds a driver for the SSI McSAAB protocol as used in
> the Nokia N900.
> 
> Signed-off-by: Carlos Chinea <carlos.chinea@xxxxxxxxx>
> Signed-off-by: Sebastian Reichel <sre@xxxxxxxxxx>

> +#define SSIP_MIN_PN_HDR		6	/* FIXME: Revisit */
> +#define SSIP_WDTOUT		2000	/* FIXME: has to be 500 msecs> */

Can they be fixed now, or do they have to wait?


> +#ifdef __LITTLE_ENDIAN
> +	((u16 *)skb->data)[2] = swab16(((u16 *)skb->data)[2]);
> +	dev_dbg(&dev->dev, "RX length fixed (%04x -> %u)\n",
> +			((u16 *)skb->data)[2], ntohs(((u16 *)skb->data)[2]));
> +#endif

Uh. Can this be replaced by
    ((u16 *)skb->data)[2] = htons(((u16 *)skb->data)[2]);

(without the ifdef?)

> +	/*
> +	 * Modem sends Phonet messages over SSI with its own endianess...
> +	 * Assume that modem has the same endianess as we do.
> +	 */
> +	if (skb_cow_head(skb, 0))
> +		goto drop;
> +#ifdef __LITTLE_ENDIAN
> +	((u16 *)skb->data)[2] = swab16(((u16 *)skb->data)[2]);
> +#endif

Here, too?

But it looks like the comment does not match the code, because we
swap.

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux