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

fatfs: Fix unaligned access in disk_ioctl #4652

Merged
merged 1 commit into from
Jul 13, 2017

Conversation

geky
Copy link
Contributor

@geky geky commented Jun 27, 2017

Unlike the other disk_ioctl options, GET_SECTOR_SIZE is interpreted as a 16-bit WORD, instead of a 32-bit DWORD. This caused an unaligned access error on M0 platforms.

disk_ioctl documentation:
https://elm-chan.org/fsw/ff/doc/dioctl.html

related issue #4649
cc @LMESTM

Unlike the other disk_ioctl options, GET_SECTOR_SIZE is interpreted
as a 16-bit WORD, instead of a 32-bit DWORD. This caused an unaligned
access error on M0 platforms.
@LMESTM
Copy link
Contributor

LMESTM commented Jun 28, 2017

Using a 16 bits size instead of 32 bits is another fix I had tried and I confirm this works fine !

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 28, 2017

/morph test-nightly

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test-nightly

Output

mbed Build Number: 676

Test failed!

@geky
Copy link
Contributor Author

geky commented Jun 28, 2017

Looks like a timing failure in tests-mbed_drivers-wait_us?

14:27:57 [1498678112.35][HTST][INF] tick! 1498678112.326000
14:27:57 [1498678112.35][HTST][INF] tick! 1498678112.326000
14:27:57 [1498678112.35][HTST][INF] Received end event, timestamp: 1498678112.326000
14:27:57 [1498678112.35][HTST][INF] Start: 1498678100.974000
14:27:57 [1498678112.35][HTST][INF] Finish: 1498678112.326000
14:27:57 [1498678112.35][HTST][INF] Total time taken: 11.352000
14:27:57 [1498678112.35][HTST][INF] Total drift/Max total drift: 1.352000/0.500000
14:27:57 [1498678112.35][HTST][INF] Average drift/Max average drift: 0.135200/0.050000
14:27:57 [1498678112.35][HTST][INF] FAIL: Total drift exceeded max total drift

@chrissnow
Copy link
Contributor

chrissnow commented Jun 28, 2017

@geky might be unrelated but I've just been facing similar test timing issues here 4640
Edit: yes it was unrelated. I misread something..

@theotherjimmy
Copy link
Contributor

/morph test-nightly

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test-nightly

Output

mbed Build Number: 698

Test failed!

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 3, 2017

Hold on with nightly until we got #4672 on master

@theotherjimmy
Copy link
Contributor

#4672 on master. /morph test-nightly

@mbed-bot
Copy link

mbed-bot commented Jul 8, 2017

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test-nightly

Output

mbed Build Number: 747

Test failed!

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 10, 2017

/morph test-nightly

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test-nightly

Output

mbed Build Number: 757

All builds and test passed!

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

Successfully merging this pull request may close these issues.

6 participants