w1 driver for omap error -- reversed byte sequence in netlink slave message

From: Paul Alfille
Date: Thu Apr 21 2011 - 21:54:29 EST


OWFS (one-wire filesystem -- www.owfs.org) seems to be the only user
of the w1 netlink messages. We use them to extend the kernel 1-wire
system from a simple temperature sensor to a complete 1-wire bus
master. Thus we've uncovered a bug -- byte reversal -- in one of the
sub-modules.

1-wire devices have a unique 64-bit address (including an 8-bit CRC)
that is reported by the netlink W1_CMD_SEARCH message. For the omap
bus master, and only the omap bus master, the slave addresses are
byte-order reversed. If the slave byte order is reversed in that case,
the CRC8 is then correct, the slave address then matches the actual
device address lettered on the device, and all other commands work
correctly.

The driver is in kernel/drivers/w1/masters/omap_hdq.c

Paul Alfille
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/