ref: fa769a8f9d2200387c9e76f059dab2e213a8a792
parent: c7c58ef8bb07a917dc9e1891b9226a132493c84a
author: cinap_lenrek <[email protected]>
date: Sun Sep 20 10:53:44 EDT 2015
sdmmc: handle fakescsi emulation
--- a/sys/src/9/port/sdmmc.c
+++ b/sys/src/9/port/sdmmc.c
@@ -297,9 +297,17 @@
}
static int
-mmcrio(SDreq*)
+mmcrio(SDreq *r)
{
- return -1;
+ int i, rw, count;
+ uvlong lba;
+
+ if((i = sdfakescsi(r)) != SDnostatus)
+ return r->status = i;
+ if((i = sdfakescsirw(r, &lba, &count, &rw)) != SDnostatus)
+ return i;
+ r->rlen = mmcbio(r->unit, r->lun, rw == SDwrite, r->data, count, lba);
+ return r->status = SDok;
}
SDifc sdmmcifc = {