[axp] Re: qlogic problem in pre3-2.3.44

From: Richard Henderson (rth@twiddle.net)
Date: Sat Feb 12 2000 - 20:31:27 EST

  • Next message: Zachary Amsden: "Re: Scheduled Transfer Protocol on Linux"

    On Fri, Feb 11, 2000 at 05:51:26PM -0500, Jay.Estabrook@compaq.com wrote:
    > pci_map_sg appears to do incorrect IOMMU PTE init during processing of
    > the above sglist, as it attempts to make the list virtually contiguous
    > and ends up initializing more IOMMU entries than it should.

    Yep. Once davem and I figured out what was wrong with the
    sym53c8xx driver, I was able to reproduce this here too.

    Attached is a fixed pci_iommu.c.

    > qlogic driver doesn't squirrel away the count of entries returned by
    > pci_map_sg and when it comes time to free the list, often does too
    > many entries and runs into some bogus ones, causing panics in pci_free_sg.

    This probably isn't fully correct, but a similar change to the sym
    driver appears to work under load. If it's wrong it's going to fail
    on scsi errors, which I don't know how to force.

    diff -upr linux/drivers/scsi/qlogicisp.c 2.3.44-3/drivers/scsi/qlogicisp.c
    --- linux/drivers/scsi/qlogicisp.c Sat Feb 12 17:17:17 2000
    +++ 2.3.44-3/drivers/scsi/qlogicisp.c Sat Feb 12 17:22:10 2000
    @@ -811,6 +811,7 @@ int isp1020_queuecommand(Scsi_Cmnd *Cmnd
                     ds = cmd->dataseg;
     
                     sg_count = pci_map_sg(hostdata->pci_dev, sg, Cmnd->use_sg);
    + Cmnd->use_sg = sg_count;
     
                     cmd->segment_cnt = cpu_to_le16(sg_count);
     
    Thoughts on a better way to fix?

    r~



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



    This archive was generated by hypermail 2b29 : Sat Feb 12 2000 - 21:20:45 EST