netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: segooon@gmail.com
Cc: kernel-janitors@vger.kernel.org, isdn@linux-pingi.de,
	adobriyan@gmail.com, tilman@imap.cc, netdev@vger.kernel.org
Subject: Re: [PATCH 07/18] isdn: avm: call disable_pci_device() if pci_probe() failed
Date: Sat, 07 Aug 2010 22:34:12 -0700 (PDT)	[thread overview]
Message-ID: <20100807.223412.212426246.davem@davemloft.net> (raw)
In-Reply-To: <1281124303-13537-1-git-send-email-segooon@gmail.com>

From: Kulikov Vasiliy <segooon@gmail.com>
Date: Fri,  6 Aug 2010 23:51:41 +0400

> Driver should call disable_pci_device() if it returns from pci_probe()

"pci_disable_device()"

> with error. Also it must not be called if request_region() fails as
> it means that somebody uses device resources and rules the device.

This interface, frankly, sucks.

If this is what we want then pci_enable_device() and
pci_disable_device() should maintain a reference count,
so that device drivers need not be mindful of what
arbitrary special circumstances they should make the
disable call or not.  They can make it unconditionally
and the PCI layer makes sure the device doesn't get
disabled unintentionally.

This is software interface design 101.

The current requirements are beyond unreasonable and
should be fixed before we apply patches like this.

I'm tossing all of these patches, sorry.

      reply	other threads:[~2010-08-08  5:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-06 19:51 [PATCH 07/18] isdn: avm: call disable_pci_device() if pci_probe() failed Kulikov Vasiliy
2010-08-08  5:34 ` David Miller [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=20100807.223412.212426246.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=adobriyan@gmail.com \
    --cc=isdn@linux-pingi.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=segooon@gmail.com \
    --cc=tilman@imap.cc \
    /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;
as well as URLs for NNTP newsgroup(s).