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:	Mon, 10 Jan 2011 14:57:10 +0800
From:	Yin Kangkai <kangkai.yin@...ux.intel.com>
To:	Corentin Chary <corentin.chary@...il.com>
Cc:	platform-driver-x86 <platform-driver-x86@...r.kernel.org>,
	linux-kernel@...r.kernel.org,
	"Wang, Yong Y" <yong.y.wang@...el.com>,
	"Liu, Bing Wei" <bing.wei.liu@...el.com>,
	Matthew Garrett <mjg@...hat.com>
Subject: Re: [PATCH V2] platform-driver-x86: ACPI EC Extra driver for
 Oaktrail

On 2011-01-07, 19:24 +0800, Yin Kangkai wrote:
> On 2011-01-07, 09:56 +0100, Corentin Chary wrote:
> > > +static struct rfkill *oaktrail_rfkill_new(char *name, enum rfkill_type type,
> > > +                                         unsigned long mask)
> > > +{
> > > +       int err;
> > > +       struct rfkill *rfkill_dev;
> > > +
> > > +       rfkill_dev = rfkill_alloc(name, &oaktrail_device->dev, type,
> > > +                                 &oaktrail_rfkill_ops, (void *)mask);
> > > +       if (!rfkill_dev)
> > > +               return ERR_PTR(-ENOMEM);
> > > +
> > > +       err = rfkill_register(rfkill_dev);
> > 
> > Maybe you should add a rfkill_init_sw_state() call here, to be sure
> > that the rfkill initial state is right.
> 
> Yes, agree with you, and I'm trying to do that, add a
> rfkill_init_sw_state between rfkill_alloc() and rfkill_register()...
> 
> +       ec_read(OT_EC_DEVICE_STATE_ADDRESS, &value);
> +       rfkill_init_sw_state(rfkill_dev, (value & mask) != 1);
> 
> 
> However, test shows the EC seems not ready yet when booting runs here
> (value = 0), and then all the radio set as "blocked". Hence the radio
> state can't be persistent during reboot.. This is not we want.
> 
> Also tried to read out the EC address a little bit later, seems the EC
> won't be ready until very late.
> 
> Am I doing something wrong? or I need to check with HW guy about this.

It turns out that is because of a bug in driver itself and the way I'm
doing "rebooting" is wrong..

Yes, the rfkill_init_sw_state() is needed, otherwise,
rfkill_register() will wrongly set the rfkill status.

Am sending the V3 patch right away.

Kangkai
--
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