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]
Message-ID: <CACRpkdbVXPi7fNjGEzChayQ1KQg8h2R6sm0TNRsVOFJmAT=YMQ@mail.gmail.com>
Date:	Thu, 27 Nov 2014 14:26:31 +0100
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Roger Quadros <rogerq@...com>
Cc:	wg@...ndegger.com, Marc Kleine-Budde <mkl@...gutronix.de>,
	Wolfram Sang <wsa@...-dreams.de>,
	Tony Lindgren <tony@...mide.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Mugunthan V N <mugunthanvnm@...com>,
	George Cherian <george.cherian@...com>,
	Felipe Balbi <balbi@...com>, Sekhar Nori <nsekhar@...com>,
	Nishanth Menon <nm@...com>,
	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
	Linux-OMAP <linux-omap@...r.kernel.org>,
	linux-can@...r.kernel.org,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH v7 6/8] net: can: c_can: Disable pins when CAN interface
 is down

On Fri, Nov 14, 2014 at 4:40 PM, Roger Quadros <rogerq@...com> wrote:

> DRA7 CAN IP suffers from a problem which causes it to be prevented
> from fully turning OFF (i.e. stuck in transition) if the module was
> disabled while there was traffic on the CAN_RX line.
>
> To work around this issue we select the SLEEP pin state by default
> on probe and use the DEFAULT pin state on CAN up and back to the
> SLEEP pin state on CAN down.
>
> Signed-off-by: Roger Quadros <rogerq@...com>

Reviewed-by: Linus Walleij <linus.walleij@...aro.org>

I see you figured it out all by yourselves :D

(Sorry for being absent.)

> +#include <linux/pinctrl/consumer.h>
> +       pinctrl_pm_select_default_state(dev->dev.parent);
> +       pinctrl_pm_select_sleep_state(dev->dev.parent);
> +       pinctrl_pm_select_sleep_state(dev->dev.parent);

NB: in drivers/base/pinctrl.c:

#ifdef CONFIG_PM
        /*
         * If power management is enabled, we also look for the optional
         * sleep and idle pin states, with semantics as defined in
         * <linux/pinctrl/pinctrl-state.h>
         */
        dev->pins->sleep_state = pinctrl_lookup_state(dev->pins->p,
                                        PINCTRL_STATE_SLEEP);

So if these states are necessary for the driver to work, put
depends on PM or select PM in the Kconfig.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ