From owner-freebsd-arm@freebsd.org Sat Sep 8 07:52:49 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E07BFEB945 for ; Sat, 8 Sep 2018 07:52:49 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic312-22.consmr.mail.bf2.yahoo.com (sonic312-22.consmr.mail.bf2.yahoo.com [74.6.128.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19C7E8AB33 for ; Sat, 8 Sep 2018 07:52:48 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: LtTwW0MVM1mPLG_63ID8DWVHiMLdSy.rFSF6PPM03AsqUpq5RU1ewkEgV.pxQ5e TWxlhydKXTifqcPweb733JRKpGGyjQDNA87y0UZ9UPGpOtwiNiOGWnBVefAs5QOcL2HvV_cUtbW5 fFEPxHTvmVp4P.3wsiGWq9In2aSWLIutlOXcL4rZfkPf9IBJkdxFeBoDBgM6uF6wfMrJyz5E1bjX nAkWP9c1YkZs0frXBuGoVrWlrsgDdbs6eADYFp9Uk3HTXze.SnbXKqsKLljshQexjenaPdFV9hVi wR4LunHA8Oh8x4qmoh7w2GCLOEt0uubWH53ZbZlLlMKUzzJ7Py2pNrYs4MNotaZMpeMLtaTVn0Fd XSwlTCbz0LqCeNNQZeE6BQIC1whfp5qsJbY0drezPZuIPsvsyxj9zZEddkztLG5KlMZcrL1yleDD d9Oox5DQpNOalKl3QfDI2WNj0589snU3wIQjF2.6SZLiZJQzSpzLxHMP7RhHrBXcUp_5K1T67tAJ fVyKrDfRjF9YfIFCzF7pqABXQd667pF6qRVYeyuZ5u.uVVAFzcACqyWAmjbXyhaKgGR4rzflCcAt zeXKJM1PhNtKTA45x9cyW30FwIDuMZ819.dpaLm3yOzlYUymZWAUBVluTReUG14gYlMua_TxmRsX _2Cn2M.d.9hRjQZAWz9tG.Yl_IdA5tDZJ3rm9Xmw767FoA90IywvzgxfUL5uR7bsSRQ_lTlbC6QQ ONZWdxD1qOOHxV.zo00mplb1lR_vNhY.LaMtNDxP1QtqgmPySJrCC.gCPPqmNfXPD37Fy_8.OoN9 MS2K9YMqw.CfIFto95DJrY9j_iiY6qVsEmnmHwsTVeuYJgsmgAqL.x1tF8QgnCgoqQlbp9IDU0Lx w2hlRJ79e4riobtED2oGxtMElFqB2dVnddQTnrgY3ESJYSrOeKJc_ORZhNUBMo3NJmm7NkF.V2Y_ 5Cw_2QHZXFUHvm_e0Q1rkpQdHdAUt5eFjuUA0sg4rGd7JUmb.r1Qx3i8Jt.4vOHnlhax7uA-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.bf2.yahoo.com with HTTP; Sat, 8 Sep 2018 07:52:41 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp408.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 22fcde8d053a94e65e4a709c08499438 for ; Sat, 08 Sep 2018 07:52:40 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: A possible e.MMC CMD protocol violation? Message-Id: <10C361F4-9DA4-4FD8-9D33-13112AE41DA4@yahoo.com> Date: Sat, 8 Sep 2018 00:52:38 -0700 To: freebsd-arm X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Sep 2018 07:52:49 -0000 In my investigation that lead to a hack that allows use of e.MMC on a microsd card adapter to boot a Pine64+ 2GB, I ran into a separate, earlier in time issue that seemed to contradict what I was reading about the e.MMC protocol's Device states and what operations are allowed/expected in each state vs. not being allowed/expected. In: mmc0: Card at relative address 0x0002 added: mmc0: card: MMCHC DJNB4R 0.7 SN 9F43B2E7 MFG 06/2016 by 21 0x0000 mmc0: quirks: 0 mmc0: bus: 4bit, 200MHz (HS200 timing) mmc0: memory: 244277248 blocks, erase sector 1024 blocks mmc0: REQUEST: CMD7 arg 0 flags 0 uhub2: 1 port with 1 removable, self powered mmc0: REQUEST: CMD2 arg 0 flags 0x67 AW_MMC_INT_RESP_TIMEOUT mmc0: CMD2 RESULT: 1 mmc0: REQUEST: CMD2 arg 0 flags 0x67 AW_MMC_INT_RESP_TIMEOUT mmc0: CMD2 RESULT: 1 mmc0: REQUEST: CMD2 arg 0 flags 0x67 AW_MMC_INT_RESP_TIMEOUT mmc0: CMD2 RESULT: 1 mmc0: REQUEST: CMD2 arg 0 flags 0x67 AW_MMC_INT_RESP_TIMEOUT mmc0: CMD2 RESULT: 1 the context has already been classified as mmc instead of sd for the media. The: mmc0: REQUEST: CMD7 arg 0 flags 0 is always a "device is not addressed" CMD7 and does one of the following state transitions: tran -> stby data -> stby prg -> dis irq -> stby No other current-states allow/expect CMD7. But for: mmc0: REQUEST: CMD2 arg 0 flags 0x67 there is only: ready -> ident (device wins bus) ready -> ready (device loses bus) irq -> stby (both win and lose) No other current-states allow/expect CMD2. So stby and dis do not. (I got this from a "Device state transitions" table.) Yet the sequence above is that form of CMD7 followed by 4 failing retries of CMD2. Seems odd to me, unless I've misinterpreted something. It may be that the CMD2's are only slightly wasteful so the "always an error" statue might be a very minor violation. [This all resulted from attempting to re-enable using media that I used to use in the Pine64+ 2GB microsd card slot and in other example microsd card slot contexts. For now I've only access to the Pine64+ 2GB as something with a microsd card slot. But I'm hoping to have all the examples work when I again have access. The above does not block use but I figured I'd mention it.] === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)