lkml.org 
[lkml]   [2008]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [smartmontools-support] inactive SATA drives won't stay in standby or sleep, PATA models did. (fwd)
    Hello, Mikael.

    > --- linux-2.6.27/drivers/ata/sata_promise.c.~1~ 2008-07-14 10:22:36.000000000 +0200
    > +++ linux-2.6.27/drivers/ata/sata_promise.c 2008-10-20 00:20:58.000000000 +0200
    > @@ -153,6 +153,7 @@ static void pdc_freeze(struct ata_port *
    > static void pdc_sata_freeze(struct ata_port *ap);
    > static void pdc_thaw(struct ata_port *ap);
    > static void pdc_sata_thaw(struct ata_port *ap);
    > +static int pdc_prereset(struct ata_link *link, unsigned long deadline);
    > static void pdc_error_handler(struct ata_port *ap);
    > static void pdc_post_internal_cmd(struct ata_queued_cmd *qc);
    > static int pdc_pata_cable_detect(struct ata_port *ap);
    > @@ -175,6 +176,7 @@ static const struct ata_port_operations
    > .sff_irq_clear = pdc_irq_clear,
    >
    > .post_internal_cmd = pdc_post_internal_cmd,
    > + .prereset = pdc_prereset,
    > .error_handler = pdc_error_handler,
    > };
    >
    > @@ -691,6 +693,12 @@ static void pdc_sata_thaw(struct ata_por
    > readl(host_mmio + hotplug_offset); /* flush */
    > }
    >
    > +static int pdc_prereset(struct ata_link *link, unsigned long deadline)
    > +{
    > + pdc_reset_port(link->ap);

    I would put this into ->hardreset itself as the controller can also
    get out of sync with reality during reset. Other than that, looks
    like the correct approach.

    Thanks.

    --
    tejun


    \
     
     \ /
      Last update: 2008-10-21 06:23    [W:0.021 / U:1.244 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site