lkml.org 
[lkml]   [2006]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: Error handling in LibATA

    >
    > I began to try your patch and noticed that the code was different than
    > my copy of 2.6.15 rc5, so I downloaded 2.6.15 (release) and still see
    > that the base copy of libata-core.c is different. A good indicator was
    > that ata_qc_complete() requires 2 parameters in the code from 2.6.15.
    > Can you tell me where I can find the copy your working off and if I have
    > to have any other files to support it?

    Hi John,

    Attached please find the patch for the 2.6.15 tree.
    Also please turn on the ATA_DEBUG and ATA_VERBOSE_DEBUG in libata.h
    for detailed log during the test, thanks.

    Albert

    =================

    --- linux-2.6.15/drivers/scsi/libata-core.c 2006-01-03 11:21:10.000000000 +0800
    +++ errmask/drivers/scsi/libata-core.c 2006-01-13 13:27:12.000000000 +0800
    @@ -3312,6 +3312,7 @@ static void ata_qc_timeout(struct ata_qu
    struct ata_host_set *host_set = ap->host_set;
    u8 host_stat = 0, drv_stat;
    unsigned long flags;
    + unsigned int err_mask = 0;

    DPRINTK("ENTER\n");

    @@ -3346,8 +3347,15 @@ static void ata_qc_timeout(struct ata_qu
    printk(KERN_ERR "ata%u: command 0x%x timeout, stat 0x%x host_stat 0x%x\n",
    ap->id, qc->tf.command, drv_stat, host_stat);

    + /* If drv_stat looks ok (0x50 normally), we treat this
    + * as lost interrupt and complete the qc as normal.
    + * If drv_stat looks bad (0x00, 0xff, etc), err_mask is set.
    + */
    + if (!ata_ok(drv_stat))
    + err_mask |= __ac_err_mask(drv_stat);
    +
    /* complete taskfile transaction */
    - ata_qc_complete(qc, ac_err_mask(drv_stat));
    + ata_qc_complete(qc, err_mask);
    break;
    }



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

    \
     
     \ /
      Last update: 2006-01-13 06:48    [W:0.023 / U:89.680 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site