Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some SPI bits per word values cause kernel panic on BeagleBone Black #1

Open
alexanderhiam opened this issue Oct 23, 2015 · 4 comments
Assignees
Labels

Comments

@alexanderhiam
Copy link
Member

On the BeagleBone Black, setting an SPI bus to 11 bits/word then trying to read from it causes kernel panic. Writing works.

This has something to do with the value because setting it to 16 bits/word works fine for read and write. Perhaps it's odd number values?

@alexanderhiam alexanderhiam self-assigned this Oct 23, 2015
@jpulliam
Copy link

jpulliam commented Dec 4, 2015

Possibly odd values, happened using 9-bit words. Attached is the log from when I tried to read. Took me forever to track down the problem until I found this bug report.
capture.txt

@alexanderhiam
Copy link
Member Author

Yeah, it's an annoying one - are you running into it on a BeagleBone Black? I've been assuming it's an issue in the BeagleBone spi driver, but I haven't tried out odd speeds on any other systems yet.

@jpulliam
Copy link

jpulliam commented Dec 4, 2015

Yes, this was on the Beaglebone Black.

edit: just for kicks I ran through a bunch of values:

Working - 4, 5, 6, 7, 8, 12, 13, 14, 15, 16, 32
Broke - 9,10,11,17, 18, 24

On Fri, Dec 4, 2015, 12:56 PM Alexander Hiam [email protected]
wrote:

Yeah, it's an annoying one - are you running into it on a BeagleBone
Black? I've been assuming it's an issue in the BeagleBone spi driver, but I
haven't tried out odd speeds on any other systems yet.


Reply to this email directly or view it on GitHub
#1 (comment).

@alexanderhiam
Copy link
Member Author

Weird... and thanks for testing that!

Looks like the problem is in here somewhere: https://github.com/beagleboard/linux/blob/3.8/drivers/spi/spi-omap2-mcspi.c#L1034
Maybe some day I'll look at debugging that driver, but for now I don't think it's too big of a deal to just avoid those broken word sizes - in my experience devices that use weird word sizes are usually compatible with the next biggest power of two anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants