I just added a SD-card to my fonera and patched openwrt with the patches in https://dev.openwrt.org/ticket/1861
And I've been somewhat successful, the card is detected and I could read data from it, so the hardware appears to work.
BUT when I try to run fdisk to repartition the card I only get errors (see below).
Does anyone recognize what might be wrong?
And a more general question: where can I find information about what "error -51" and "error -22" stands for?
mmc_spi spi32766.0: ASSUMING 3.2-3.4 V slot power
mmc_spi spi32766.0: SD/MMC host mmc0, no DMA, no WP, no poweroff
spi-gpio-mmc: MMC-Card "fonera" attached to GPIO pins 1,3,4,7
mmc_spi spi32766.0: can't change chip-select polarity
mmc0: new SD card on SPI
mmcblk0: mmc0:0000 SD01G 992000KiB
root@OpenWrt:/tmp# fdisk /dev/mmcblk0
mmcblk0: error -22 sending read/write command
end_request: I/O error, dev mmcblk0, sector 0
Buffer I/O error on device mmcblk0, logical block 0
mmcblk0: error -22 sending read/write command
end_request: I/O error, dev mmcblk0, sector 8
Buffer I/O error on device mmcblk0, logical block 1
mmcblk0: error -22 sending read/write command
end_request: I/O error, dev mmcblk0, sector 16
Buffer I/O error on device mmcblk0, logical block 2
mmcblk0: error -22 sending read/write command
end_request: I/O error, dev mmcblk0, sector 24
Buffer I/O error on device mmcblk0, logical block 3
mmcblk0: error -22 sending read/write command
end_request: I/O error, dev mmcblk0, sector 0
Buffer I/O error on device mmcblk0, logical block 0
mmcblk0: error -22 sending read/write command
end_request: I/O error, dev mmcblk0, sector 1983992
Buffer I/O error on device mmcblk0, logical block 247999
mmcblk0: error -22 sending read/write command
end_request: I/O error, dev mmcblk0, sector 1983992
Buffer I/O error on device mmcblk0, logical block 247999
mmcblk0: error -22 sending read/write command
end_request: I/O error, dev mmcblk0, sector 0
Buffer I/O error on device mmcblk0, logical block 0
mmcblk0: error -22 sending read/write command
end_request: I/O error, dev mmcblk0, sector 8
Buffer I/O error on device mmcblk0, logical block 1
mmcblk0: error -22 sending read/write command
end_request: I/O error, dev mmcblk0, sector 16
Buffer I/O error on device mmcblk0, logical block 2
mmcblk0: error -22 sending read/write command
end_request: I/O error, dev mmcblk0, sector 24
mmcblk0: error -22 sending read/write command
end_request: I/O error, dev mmcblk0, sector 0
Unable to read /dev/mmcblk0
root@OpenWrt:/tmp#