lkml.org 
[lkml]   [2007]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] sata_nv: fix ADMA ATAPI issues with memory over 4GB
    Hello, Robert.

    Robert Hancock wrote:
    > @@ -747,11 +748,29 @@
    > on the port. */
    > adma_enable = 0;
    > nv_adma_register_mode(ap);
    > + if (!(pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE)) {
    > + /* Transitioning to legacy mode. Free the pad buffer. */
    > + ata_pad_free(ap, ap->host->dev);
    > + ap->pad = NULL;
    > + ap->pad_dma = 0;
    > + }
    > } else {
    > - bounce_limit = *ap->dev->dma_mask;
    > + bounce_limit = pp->adma_dma_mask;
    > segment_boundary = NV_ADMA_DMA_BOUNDARY;
    > sg_tablesize = NV_ADMA_SGTBL_TOTAL_LEN;
    > adma_enable = 1;
    > +
    > + if (pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE) {
    > + /* Transitioning to ADMA mode. Free legacy PRD table
    > + and the pad buffer. */
    > + ata_pad_free(ap, ap->host->dev);
    > + ap->pad = NULL;
    > + ap->pad_dma = 0;
    > + dmam_free_coherent(ap->host->dev, ATA_PRD_TBL_SZ,
    > + ap->prd, ap->prd_dma);
    > + ap->prd = NULL;
    > + ap->prd_dma = 0;
    > + }

    How about always initialize DMA mask to ATA_DMA_MASK regardless of ADMA
    mode such that PRD and PAD buffers are always accessible by register
    mode and just raising PCI dma mask and queue bounce limit if ADMA mode
    is active?

    > + /* Set appropriate DMA mask. */
    > + pci_set_dma_mask(pdev, bounce_limit);
    > + pci_set_consistent_dma_mask(pdev, bounce_limit);

    These can fail.

    Also, please separate out the result TF handling to a separate patch. I
    know it's a small change but as both introduces important behavior
    changes, I think it would be nice to have a bisection point inbetween.

    Thanks.

    --
    tejun
    -
    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: 2007-11-13 03:29    [W:0.027 / U:29.804 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site