lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD=FV=U3aT1KKtSwAFhYURJJerp70ij8h647=xyV51et4jYipg@mail.gmail.com>
Date:	Thu, 8 Aug 2013 17:16:55 -0700
From:	Doug Anderson <dianders@...gle.com>
To:	James Hogan <james.hogan@...tec.com>,
	"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
	Chris Ball <cjb@...top.org>,
	Tomasz Figa <tomasz.figa@...il.com>
Cc:	Olof Johansson <olof@...om.net>,
	Jaehoon Chung <jh80.chung@...sung.com>,
	Seungwon Jeon <tgih.jun@...sung.com>,
	Grant Grundler <grundler@...omium.org>,
	Alim Akhtar <alim.akhtar@...sung.com>,
	Abhilash Kesavan <a.kesavan@...sung.com>,
	Doug Anderson <dianders@...omium.org>,
	linux-samsung-soc <linux-samsung-soc@...r.kernel.org>,
	Kukjin Kim <kgene.kim@...sung.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	Sonny Rao <sonnyrao@...omium.org>
Subject: dw_mmc: Does anyone use multiple slots?

Hi,

A quick question: does anyone know of any hardware that actually
implements multiple slots per host on the dw_mmc controller?

When working on the driver I often find myself running into questions
about how things should work on the theoretical "multiple slot" dw_mmc
implementation.  ...and I often find bugs where things couldn't
possibly work for a multiple slot implementation.

As an example, recently I sent up (870556a mmc: dw_mmc: Handle late
vmmc regulators with EPROBE_DEFER).  Before that patch the host-global
"host->vmmc" was being set once per slot.  Said another way, if slot 0
set host->mmc to ABC, then slot 1 would come along and clobber
host->mmc to DEF.  After my patch the dw_mmc code assumes one vmmc
regulator per host.  As Tomasz pointed out, that might not be so good
(*), but it was better than what was there before.  Maybe all
multislot implementations don't use vmmc?

Another example, though, is dw_mci_init_slot().  It calls this once per slot:
  mmc_alloc_host(sizeof(struct dw_mci_slot), host->dev);

...where "host->dev" is shared among all the slots.  I haven't tested
it (since I don't have multislot), but that doesn't seem wise to me.
Reading through mmc_alloc_host(), it looks like it assumes that this
host owns host->dev and it feels free to clobber variables.  Sound
familiar?

I guess my overall question is: if there are no actual implementations
of multislot, shouldn't we kill it and simplify the code a whole lot?
If someone out there has a real multislot device they can step back in
and do it more correctly?

Of course we need to find someone to actually go through and do the
killing of multislot, but finding that person might be easier if there
was some agreement that it was good to do.

Cheers?  Flames?

-Doug

---

(*) On the other hand, maybe my patch is OK.  A reasonable way that
multi-slot power might work is with a since vmmc and then it is
multiplexed through with PWREN?  All I know is that exynos says
"PWREN" is not implemented and that exynos only has one slot per host.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ