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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 31 Mar 2010 11:49:49 +0200
From:	Michał Mirosław <mirqus@...il.com>
To:	Daniel Mack <daniel@...aq.de>
Cc:	linux-kernel@...r.kernel.org,
	Alagu Sankar <alagusankar@...wise.com>,
	Volker Ernst <volker.ernst@...r.com>,
	Dan Williams <dcbw@...hat.com>,
	"John W. Linville" <linville@...driver.com>,
	Holger Schurig <hs4233@...l.mn-solutions.de>,
	Bing Zhao <bzhao@...vell.com>,
	libertas-dev@...ts.infradead.org, linux-wireless@...r.kernel.org,
	linux-mmc@...r.kernel.org
Subject: Re: [PATCH] libertas/sdio: set ECSI and SCSI bits for 1-bit transfers

W dniu 31 marca 2010 11:08 użytkownik Daniel Mack <daniel@...aq.de> napisał:
> On Wed, Mar 31, 2010 at 11:07:06AM +0200, Michał Mirosław wrote:
>> 2010/3/30 Daniel Mack <daniel@...aq.de>:
>> [...]
>> > @@ -1022,6 +1025,27 @@ static int if_sdio_probe(struct sdio_func *func,
>> >        if (ret)
>> >                goto disable;
>> >
>> > +       /* For 1-bit transfers, we need to enable the interrupt flags in
>> > +        * the CCCR register. Temporarily set the function number to 0
>> > +        * for that. */
>> > +       if ((host->caps & MMC_CAP_SDIO_IRQ) &&
>> > +           (host->ios.bus_width == MMC_BUS_WIDTH_1)) {
>> > +               unsigned int num = func->num;
>> > +               u8 reg;
>> > +
>> > +               func->num = 0;
>> > +               reg = sdio_readb(func, SDIO_CCCR_IF, &ret);
>> > +               if (ret)
>> > +                       goto release_int;
>> > +
>> > +               reg |= SDIO_BUS_ECSI | SDIO_BUS_SCSI;
>> > +               sdio_writeb(func, reg, SDIO_CCCR_IF, &ret);
>> > +               if (ret)
>> > +                       goto release_int;
>> > +
>> > +               func->num = num;
>> > +       }
>> > +
>> >        card->ioport = sdio_readb(func, IF_SDIO_IOPORT, &ret);
>> >        if (ret)
>> >                goto release_int;
>>
>> You should probably just use mmc_io_rw_direct() in this case instead
>> of abusing func->num.
>
> Hmm, that function isn't exported, and I didn't want to change this. You
> say you'd prefer that? I can cook up something that does it, no problem.

BTW, I can't see any exported functions to access fn#0 directly from
drivers. Maybe it's time to introduce them now - at least CCCR has
some vendor-defined parts that drivers may want to access and there is
a lot of place in CIS area that can be (ab)used by devices.

Best Regards,
Michał Mirosław
--
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