linguini1 commented on PR #18333:
URL: https://github.com/apache/nuttx/pull/18333#issuecomment-3850084026
Note: the BCM2835 datasheet states that the block size can only be 1k bytes
(it has only 10 bits to represent it's size). [p. 68, 1] So we can't change the
mask to what this PR proposes according to the register layout.
I did try running this patch, and it doesn't fix the issue:
```console
nsh> sdstress
Start stress test with 64 files, 4096 bytes and 32 iterations.
[ 75.686000] mmcsd_readmultiple: ERROR: Card not ready: -110
[ 75.690000] bcm2711_waitresponse: Timed out polling response.
[ 75.690000] mmcsd_sendcmdpoll: ERROR: Wait for response to cmd: 0000004d
failed: -110
read /sd/stress/[ 75.756000] bcm2711_waitresponse: Timed out polling
response.
[ 75.756000] mmcsd_sendcmdpoll: ERROR: Wait for response to cmd: 0000004d
failed: -110
tmp000 failed, r[ 75.821000] bcm2711_waitresponse: Timed out polling
response.
[ 75.821000] mmcsd_sendcmdpoll: ERROR: Wait for response to cmd: 0000004d
failed: -110
et: -1, errno 11[ 75.886000] bcm2711_waitresponse: Timed out polling
response.
[ 75.886000] mmcsd_sendcmdpoll: ERROR: Wait for response to cmd: 0000004d
failed: -110
0 -> Unknown err[ 75.951000] bcm2711_waitresponse: Timed out polling
response.
[ 75.951000] mmcsd_sendcmdpoll: ERROR: Wait for response to cmd: 0000004d
failed: -110
or 110
iteratio[ 76.016000] bcm2711_waitresponse: Timed out polling response.
[ 76.016000] mmcsd_sendcmdpoll: ERROR: Wait for response to cmd: 0000004d
failed: -110
n 0 took 1076.00[ 76.081000] bcm2711_waitresponse: Timed out polling
response.
[ 76.081000] mmcsd_sendcmdpoll: ERROR: Wait for response to cmd: 0000004d
failed: -110
0 ms: FAIL
Test[ 76.146000] bcm2711_waitresponse: Timed out polling response.
[ 76.146000] mmcsd_sendcmdpoll: ERROR: Wait for response to cmd: 0000004d
failed: -110
FAIL: Average t[ 76.211000] bcm2711_waitresponse: Timed out polling
response.
[ 76.211000] mmcsd_sendcmdpoll: ERROR: Wait for response to cmd: 0000004d
failed: -110
ime: 33.625 ms
[ 76.276000] bcm2711_waitresponse: Timed out polling response.
[ 76.276000] mmcsd_sendcmdpoll: ERROR: Wait for response to cmd: 0000004d
failed: -110
nsh> [ 76.341000] bcm2711_waitresponse: Timed out polling response.
[ 76.341000] mmcsd_sendcmdpoll: ERROR: Wait for response to cmd: 0000004d
failed: -110
[ 76.406000] bcm2711_waitresponse: Timed out polling response.
[ 76.406000] mmcsd_sendcmdpoll: ERROR: Wait for response to cmd: 0000004d
failed: -110
[ 76.471000] bcm2711_waitresponse: Timed out polling response.
[ 76.471000] mmcsd_sendcmdpoll: ERROR: Wait for response to cmd: 0000004d
failed: -110
[ 76.536000] bcm2711_waitresponse: Timed out polling response.
[ 76.536000] mmcsd_sendcmdpoll: ERROR: Wait for response to cmd: 0000004d
failed: -110
[ 76.601000] bcm2711_waitresponse: Timed out polling response.
[ 76.601000] mmcsd_sendcmdpoll: ERROR: Wait for response to cmd: 0000004d
failed: -110
[ 76.666000] bcm2711_waitresponse: Timed out polling response.
[ 76.666000] mmcsd_sendcmdpoll: ERROR: Wait for response to cmd: 0000004d
failed: -110
[ 76.731000] mmcsd_writesingle: ERROR: Card not ready: -110
[ 76.731000] file_put: ERROR: fs putfilep file_close() failed: -110
```
Honestly, it may be a pure limitation of the SD controller that more bytes
don't work. I don't know if there's some way to have the driver gracefully
refuse operations that have blocks that are too large? Or if it can break them
up into manageable 1k blocks? But this approach will not work. Sorry for the
delay in testing!
[1]:
https://www.raspberrypi.org/app/uploads/2012/02/BCM2835-ARM-Peripherals.pdf
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]