public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Tony Lindgren" <tony@atomide.com>,
	"Benoît Coussno" <b-cousson@ti.com>,
	"Paul Walmsley" <paul@pwsan.com>,
	"Sourav Poddar" <sourav.poddar@ti.com>,
	"Russ Dill" <Russ.Dill@ti.com>, "Felipe Balbi" <balbi@ti.com>,
	"Koen Kooi" <koen@circuitco.com>,
	linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: Platform device tester - Allow removal
Date: Tue, 13 Aug 2013 19:55:12 +0100	[thread overview]
Message-ID: <20130813185512.GA25647@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <70F17005-652E-4C04-B6EC-51E16EE237C3@antoniou-consulting.com>

On Tue, Aug 13, 2013 at 09:42:27PM +0300, Pantelis Antoniou wrote:
> But creation just crashes.
> 
> > root@beaglebone:/sys/bus/platform/drivers/omap_i2c# echo 4819c000.i2c >bind   
> > [  145.053929] Unable to handle kernel NULL pointer dereference at virtual address 00000001
> > [  145.062651] pgd = ca8c0000
> > [  145.065507] [00000001] *pgd=8f437831, *pte=00000000, *ppte=00000000
> > [  145.072163] Internal error: Oops: 17 [#1] SMP ARM
> > [  145.077105] Modules linked in: ipv6 autofs4
> > [  145.081537] CPU: 0 PID: 301 Comm: sh Not tainted 3.11.0-rc5-00125-g3b988fb #146
> > [  145.089222] task: cf5b5580 ti: cf464000 task.ti: cf464000
> > [  145.094918] PC is at omap_i2c_runtime_suspend+0x10/0xb4
> > [  145.100408] LR is at omap_i2c_runtime_suspend+0x8/0xb4

Well then, what you have here is a bug in the way that OMAP re-uses the
platform device stuff - and that _does_ need fixing somehow.

The problem is that i2c_dev->regs is NULL at the point where
pm_runtime_set_autosuspend_delay() is called, which as autosuspend
is still set from the time that the device was unbound, it means that
this triggers an immediate suspend.

I suspect that:

        pm_runtime_set_autosuspend_delay(dev->dev, OMAP_I2C_PM_TIMEOUT);
        pm_runtime_use_autosuspend(dev->dev);

should be moved later in the probe function, after the switch (scheme)
block.

  reply	other threads:[~2013-08-13 18:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1376386470-27328-1-git-send-email-panto@antoniou-consulting.com>
2013-08-13 18:20 ` [PATCH] staging: Platform device tester - Allow removal Greg Kroah-Hartman
2013-08-13 18:42   ` Pantelis Antoniou
2013-08-13 18:55     ` Russell King - ARM Linux [this message]
2013-08-13 19:33       ` Kevin Hilman
2013-08-13 18:55     ` Greg Kroah-Hartman
2013-08-13 18:59       ` Pantelis Antoniou
2013-08-13 19:02         ` Russell King - ARM Linux
2013-08-13 19:04           ` Pantelis Antoniou
2013-08-13 19:04         ` Greg Kroah-Hartman
2013-08-13 19:25     ` Kevin Hilman
2013-08-13 18:22 ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130813185512.GA25647@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=Russ.Dill@ti.com \
    --cc=b-cousson@ti.com \
    --cc=balbi@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=koen@circuitco.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=panto@antoniou-consulting.com \
    --cc=paul@pwsan.com \
    --cc=sourav.poddar@ti.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox