Page MenuHomeFreeBSD

D59283.diff
No OneTemporary

D59283.diff

diff --git a/sys/cam/mmc/mmc_xpt.c b/sys/cam/mmc/mmc_xpt.c
--- a/sys/cam/mmc/mmc_xpt.c
+++ b/sys/cam/mmc/mmc_xpt.c
@@ -1045,8 +1045,10 @@
if (mmcio->cmd.resp[0] & MMC_OCR_S18A) {
CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_PROBE,
("Card supports 1.8V signaling\n"));
- mmcp->card_features |= CARD_FEATURE_18V;
- if (softc->flags & PROBE_FLAG_HOST_CAN_DO_18V) {
+ if ((softc->flags & PROBE_FLAG_HOST_CAN_DO_18V) == 0) {
+ CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_PROBE,
+ ("Host cannot do 1.8V signaling, staying at 3.3V\n"));
+ } else {
CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_PROBE,
("Host supports 1.8V signaling. Switch voltage!\n"));
done_ccb->ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
@@ -1057,6 +1059,12 @@
done_ccb->cts.proto_specific.mmc.ios.vccq = vccq_180;
done_ccb->cts.proto_specific.mmc.ios_valid = MMC_VCCQ;
xpt_action(done_ccb);
+ if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) ==
+ CAM_REQ_CMP)
+ mmcp->card_features |= CARD_FEATURE_18V;
+ else
+ CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_PROBE,
+ ("1.8V switch failed, staying at 3.3V\n"));
}
}
} else {

File Metadata

Mime Type
text/plain
Expires
Tue, Sep 1, 7:16 AM (1 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37733537
Default Alt Text
D59283.diff (1 KB)

Event Timeline