Messages in this thread | | | Date | Mon, 19 Jul 2010 12:13:29 +0200 | From | Tejun Heo <> | Subject | Re: [PATCH[RFC] Quirk macbook pro 6,2 into ahci mode |
| |
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
| |