mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Alfille <paul.alfille@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: w1 driver for omap error -- reversed byte sequence in netlink slave message
Date: Thu, 21 Apr 2011 21:53:39 -0400	[thread overview]
Message-ID: <BANLkTimhyTLuKw90Q6HitVgLC7wyeOD5wQ@mail.gmail.com> (raw)

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

             reply	other threads:[~2011-04-22  1:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-22  1:53 Paul Alfille [this message]
2011-04-25  6:05 ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTimhyTLuKw90Q6HitVgLC7wyeOD5wQ@mail.gmail.com \
    --to=paul.alfille@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®