public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Vasiliy Kulikov <segooon@gmail.com>
Cc: kernel-janitors@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@suse.de>,
	Alan Cox <alan@linux.intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Rakib Mullick <rakib.mullick@gmail.com>,
	Ben Hutchings <ben@decadent.org.uk>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 01/18] char: moxa: call disable_pci_device() if
Date: Sat, 07 Aug 2010 19:08:14 +0000	[thread overview]
Message-ID: <20100807190814.GZ9031@bicker> (raw)
In-Reply-To: <20100807180251.GA2686@albatros>

On Sat, Aug 07, 2010 at 10:02:52PM +0400, Vasiliy Kulikov wrote:
> 
> The thing is not in that pci_enable_device() is nestable, but in that
> some buggy non-mainline drivers may not use PCI api, but use
> request_*(). In this case PCI bus doesn't see this driver and tries to
> call mainline driver probe(). It sees that resources are already
> grabbed. The only reason can be another driver that rules this device
> (or our kernel is crazy). As we are robust driver we don't want to break
> this buggy third party driver :-)
> 

What Jeff Garzik was saying in those days if two people called
pci_enable_device() it wasn't a problem, but if one person then called
pci_disable_device() the other person who still wanted it enabled was
screwed.  That model was "*first* person out of the building lock the
door."

That was half a decade ago though.  The fix that Jeff proposed wasn't
really a good one because there is no way people would get that right.
None of that applies any more.  These days we just call enable when we 
want it enabled and disable when we are done.  All the dependencies are
handled for us.

In fact, if we try to use the old hacks and work arounds, that will cause
bugs in the new code...

regards,
dan carpenter


      reply	other threads:[~2010-08-07 19:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-06 19:49 [PATCH 01/18] char: moxa: call disable_pci_device() if pci_probe() failed Kulikov Vasiliy
2010-08-07  7:22 ` [PATCH 01/18] char: moxa: call disable_pci_device() if Dan Carpenter
2010-08-07  8:55   ` Vasiliy Kulikov
2010-08-07  9:58     ` Dan Carpenter
2010-08-07 18:02       ` Vasiliy Kulikov
2010-08-07 19:08         ` Dan Carpenter [this message]

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=20100807190814.GZ9031@bicker \
    --to=error27@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@linux.intel.com \
    --cc=ben@decadent.org.uk \
    --cc=gregkh@suse.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rakib.mullick@gmail.com \
    --cc=segooon@gmail.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