NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/49140: Can't write to SD card



>Number:         49140
>Category:       kern
>Synopsis:       Can't write to SD card
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 22 12:00:00 +0000 2014
>Originator:     Patrick Welche
>Release:        -current/amd64 in 2012 and today
>Organization:
>Environment:
7.99.1/amd64
>Description:
This is the same setup as the old posts:

http://mail-index.netbsd.org/netbsd-users/2012/11/02/msg011815.html 
http://mail-index.netbsd.org/current-users/2013/01/10/msg021821.html

Laptop contains a:

sdhc0 at pci1 dev 0 function 0: Ricoh 5U823 SD/MMC Controller (rev. 0x04)
sdhc0: interrupting at ioapic0 pin 16
sdhc0: SD Host Specification 3.0, rev.5
sdhc0: software reset reg=00000001
sdhc0: using DMA transfer
sdhc0: base clock frequency 50 MHz
sdhc0: max block length 512 bytes
sdmmc0 at sdhc0 slot 0

sdmmc_dump_data: CID
--------+--------------------------------------------------+------------------+
offset  | +0 +1 +2 +3 +4 +5 +6 +7  +8 +9 +a +b +c +d +e +f | data             |
offset  | +0 +1 +2 +3 +4 +5 +6 +7  +8 +9 +a +b +c +d +e +f |------------------+ 
00000000| c7 00 06 db 78 7c 30 47  36 31 44 53 48 50 27 00 | ....x|0G61DSHP'. |
--------+--------------------------------------------------+------------------+

ld0 at sdmmc0: <0x27:0x5048:SD16G:0x30:0x7c78db06:0x0c7>
ld0: WARNING: power management not supported
ld0: 14756 MB, 7495 cyl, 64 head, 63 sec, 512 bytes/sect x 30220288 sectors
ld0: 4-bit width, bus clock 50.000 MHz


but writing to the card fails:

# dd if=rpi.img of=/dev/rld0d
dd: /dev/rld0d: Input/output error
1+0 records in
0+0 records out
0 bytes transferred in 0.001 secs (0 bytes/sec)
# dd if=rpi.img of=/dev/ld0d
dd: /dev/ld0d: Input/output error
1+0 records in
0+0 records out
0 bytes transferred in 0.001 secs (0 bytes/sec)


This is an extract the mass of debug output:

ld0: I/O operation (dir=IN, blkno=0x0, bcnt=0x200)
seg#0: addr=0x4037a000, size=0x200
sdhc0: start cmd 17 arg=00000000 data=0xfffffe81411fa800 dlen=512 flags=00000572
, status=0
sdhc0: writing cmd: blksize=512 blkcnt=1 mode=0013 cmd=113a
sdhc0: resp = 00000900
sdhc0: resp = 00000900sdhc0: software reset reg=00000006
sdhc0: resp = 00000900sdhc0: softwar
sdhc0: cmd 17 abort (flags=00000573 error=60) 
ld0: error 60

>How-To-Repeat:
Try to write directly to an SD card using a Ricoh 5U823. I can write to the 
card successfully
with a USB SD card reader, so the card doesn't seem to be at fault.
>Fix:



Home | Main Index | Thread Index | Old Index