All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Jens Axboe <jaxboe@fusionio.com>
Cc: Jeff Garzik <jgarzik@pobox.com>,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Jesse Barnes <jbarnes@virtuousgeek.org>
Subject: Re: [PATCH[RFC] Quirk macbook pro 6,2 into ahci mode
Date: Mon, 19 Jul 2010 12:13:29 +0200	[thread overview]
Message-ID: <4C442549.4030006@kernel.org> (raw)
In-Reply-To: <4C439B6D.7050103@fusionio.com>

Hello,

On 07/19/2010 02:25 AM, Jens Axboe wrote:
> +static void pch_update_bar(struct pci_dev *pdev)
> +{
> +	if (pcim_iomap_regions(pdev, 1 << 5, "AHCI quirk")) {
> +		int ret;
> +
> +		printk("AHCI BAR not set - attempting to program... ");
> +		pdev->resource[5].flags = IORESOURCE_MEM;
> +		ret = pci_allocate_resource(pdev, 5);
> +		if (ret)
> +			printk (KERN_INFO "Failed to allocate new region\n");
> +		else
> +			printk (KERN_INFO "Succeeded\n");
> +	} else
> +		pcim_iounmap_regions(pdev, 1 << 5);
> +}

Hmm... as the firmware is setting up the resource during boot,
wouldn't it be better to save it and restore it during resume?  That
would be simpler and more robust.

Thanks.

-- 
tejun

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

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-18 16:03 [PATCH[RFC] Quirk macbook pro 6,2 into ahci mode Jens Axboe
2010-07-18 18:42 ` Matthew Garrett
2010-07-18 20:34   ` Jens Axboe
2010-07-18 21:32     ` Tino Keitel
2010-07-19  5:40     ` Tino Keitel
2010-07-19 15:49       ` Jens Axboe
2010-07-19 15:53         ` Tino Keitel
2010-07-19 15:55           ` Jens Axboe
2010-07-19 17:23             ` Mike Snitzer
2010-07-19 20:40               ` Jens Axboe
2010-07-18 22:44   ` Jeff Garzik
2010-07-19  0:25     ` Jens Axboe
2010-07-19 10:13       ` Tejun Heo [this message]
2010-07-19 15:58     ` Matthew Garrett

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=4C442549.4030006@kernel.org \
    --to=tj@kernel.org \
    --cc=jaxboe@fusionio.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg59@srcf.ucam.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.