Re: [PATCH[RFC] Quirk macbook pro 6,2 into ahci mode

From: Tejun Heo
Date: Mon Jul 19 2010 - 06:14:27 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/