All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Tejun Heo <htejun@gmail.com>, Jeff Garzik <jeff@garzik.org>,
	Linux IDE mailing list <linux-ide@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: devres and requesting resources
Date: Fri, 29 Feb 2008 18:04:09 +0100	[thread overview]
Message-ID: <200802291804.09412.bzolnier@gmail.com> (raw)
In-Reply-To: <20080229140106.41ccc843@core>

On Friday 29 February 2008, Alan Cox wrote:
> > controller like ICH AHCIs.  ata_generic or ide generic might attach to a
> > controller which is already being driven by ahci under certain
> > configurations.
> 
> ata_generic will not nor ata_legacy both are much too smart for that. The
> legacy old IDE driver might but that probably isn't going to be fixed by
> devres and is trivial to fix in that driver (just steal the code from
> pata_legacy).

Yep, nice trick.

Since it is your idea/code could you please also fix ide_generic? :)

> > have different requirements can just open code pci_request_regions() and
> > pcim_iomap().  pcim_request_regions() should provide sensible default
> > behavior for common cases.
> 
> Which is arguably the current behaviour. Changing the behaviour and not
> the name is a really bad idea and will cause problems in future so don't
> do that.
> >
> > I think the best solution is to allow duplicate request regions for
> > managed devices which is okay as we know we're holding the resource and
> > let drivers which need to reserve all regions call pci_request_regions()
> > before calling pcim_request_regions().

This will work until code outside libata (i.e. IDE) starts using devres...

[ Incidentally, just yesterday I finished moving resource management handling
  to host drivers so it might as well happen. ]

> How about
> 
> 	pcim_request_all_regions()
> 
> for the behaviour Jeff wants, simple, direct, differently named and
> obvious what it does.

Seconded.

Thanks,
Bart

  parent reply	other threads:[~2008-02-29 17:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-29  0:36 devres and requesting resources Jeff Garzik
2008-02-29 11:26 ` Alan Cox
2008-02-29 12:11   ` Jeff Garzik
2008-02-29 12:28     ` Tejun Heo
2008-02-29 14:01       ` Alan Cox
2008-02-29 14:17         ` Tejun Heo
2008-02-29 19:25           ` Jeff Garzik
2008-02-29 17:04         ` Bartlomiej Zolnierkiewicz [this message]
2008-02-29 17:04           ` Alan Cox
2008-02-29 13:55     ` Alan Cox

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=200802291804.09412.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=htejun@gmail.com \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.