lkml.org 
[lkml]   [2011]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] pata_artop: add Power Management support
Hello.

On 13-10-2011 14:59, Bartlomiej Zolnierkiewicz wrote:

> From: Bartlomiej Zolnierkiewicz<bzolnier@gmail.com>
> Subject: [PATCH] pata_artop: add Power Management support

> Fixes IDE -> libata regression.

> There shouldn't be any problems with it as corresponding IDE's host
> driver (aec62xx) has been supporting PCI Power Management since
> Oct 10 2008 (commit feb22b7f "ide: add proper PCI PM support (v2)")
> and IDE PM since Jun 14 2003 (patch v2.5.73 "ide: Power Management").

> Signed-off-by: Bartlomiej Zolnierkiewicz<bzolnier@gmail.com>
> ---
> earlier references:
> https://lkml.org/lkml/2009/11/25/314

> drivers/ata/pata_artop.c | 81 +++++++++++++++++++++++++++++++----------------
> 1 file changed, 54 insertions(+), 27 deletions(-)

> Index: b/drivers/ata/pata_artop.c
> ===================================================================
> --- a/drivers/ata/pata_artop.c
> +++ b/drivers/ata/pata_artop.c
[...]
> @@ -313,6 +313,33 @@ static struct ata_port_operations artop6
> .prereset = artop62x0_pre_reset,
> };
>
> +static void atp8xx_fixup(struct pci_dev *pdev)
> +{
> + if (pdev->device == 0x0005)

This is asking to be *switch* statement instead.

> + /* BIOS may have left us in UDMA, clear it before libata probe */
> + pci_write_config_byte(pdev, 0x54, 0);
> + else if (pdev->device == 0x0008 || pdev->device == 0x0009) {
> + u8 reg;
> +
> + /* Mac systems come up with some registers not set as we
> + will need them */

Comment style could be improved...

WBR, Sergei


\
 
 \ /
  Last update: 2011-10-13 14:09    [W:0.021 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site