Port-alpha archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Anyone still using PCI "isp" SCSI / FC controllers?



The Qlogic ISP SCSI / FC driver PCI front-end appears to universally support using 64-bit PCI DMA addresses, based on my reading of this code block in isp_pci_dmasetup():

                if (sizeof (bus_addr_t) > 4) { 
                        if (rq->req_header.rqs_entry_type == RQSTYPE_T2RQS) {
                                rq->req_header.rqs_entry_type = RQSTYPE_T3RQS;
                        } else if (rq->req_header.rqs_entry_type == RQSTYPE_REQUEST) {  
                                rq->req_header.rqs_entry_type = RQSTYPE_A64;
                        }
                }

There's just one problem, though!  It does not use the 64-bit PCI DMA tag, and so it is always getting DMA addresses that fit in 32-bits.  On x86-64 machines, this results in having to bounce DMA transfers (ick).  On Alpha machines, this results in having to use SGMAP (IOMMU) DMA; this is not a problem unto itself, and I recently made some improvements to this on systems where Qlogic ISP controllers were more likely to be present (e.g. AlphaServer 1000 / 1000A).

But there are some Alpha systems we support (notably the EV6+ Tsunami/Typhoon/Titan systems e.g. DS10/DS20/DS25/...) that natively support 64-bit PCI DMA addressing without having to use SGMAPs ... this is generally preferred because, among other things, it's faster.

I'm pretty sure it's safe, based on the code block quoted above, to change PCI DMA tag selection in the driver to something like this:

        /*
         * See conditional in isp_pci_dmasetup(); if
         * sizeof (bus_addr_t) > 4, then we'll program 
         * the device using 64-bit DMA addresses.  
         * So, if we're going to do that, we should do
         * our best to get 64-bit addresses in the first
         * place.
         */
        if (sizeof (bus_addr_t) > 4 && pci_dma64_available(pa)) {
                isp->isp_dmatag = pa->pa_dmat64;
        } else {
                isp->isp_dmatag = pa->pa_dmat;
        }

Anyway, if someone with more knowledge of these controllers could chime in, I'd really appreciate it.  (Hopefully Matt is still lurking on these mailing lists??)

-- thorpej



Home | Main Index | Thread Index | Old Index