[nvmewin] Question on PciBar pointer...

Luse, Paul E paul.e.luse at intel.com
Tue Jul 24 13:32:44 PDT 2012

Something seems to be wrong with the mail server - lots of email just now showing up.  Yes, that last line down there was not used and is removed in the pending patch.  Yes, you're in the right place to add mapping of addt'l BARs if your hw has them.  Let me know if you have problems getting it working - as NVMe doesn't use the other BARs we wouldn't be looking for that code to be contributed back of course...


From: nvmewin-bounces at lists.openfabrics.org [mailto:nvmewin-bounces at lists.openfabrics.org] On Behalf Of Freyensee, James P
Sent: Thursday, July 19, 2012 1:05 PM
To: nvmewin at lists.openfabrics.org
Subject: Re: [nvmewin] Question on PciBar pointer...

So I am assuming the silence means the code pointed out in the last email (bottom of email) is in fact, useless dead-code?

I at least believe this is the case because in NVMeFindAdapter() it looks like one can access the BAR memory-mapped space via (example):

    pMM_Range = NULL;
    pMM_Range = &(*(pPCI->AccessRanges))[0];

    if (pMM_Range == NULL) {
        return (SP_RETURN_NOT_FOUND);

    /* Mapping BAR memory to the virtual address of Control registers */
    pAE->pCtrlRegister = (PNVMe_CONTROLLER_REGISTERS)StorPortGetDeviceBase(pAE,

So I am assuming if one were to add code for a BAR2-BAR5, this code shown above is basically how it is going to be initialized.  Also a new member variable in pAE will be needed to point to this new BAR.  Right?

From: Freyensee, James P
Sent: Thursday, July 12, 2012 4:02 PM
To: nvmewin at lists.openfabrics.org<mailto:nvmewin at lists.openfabrics.org>
Subject: Question on PciBar pointer...

What is:

PVOID                       pPciBar[MAX_PCI_BAR];

Supposed to be used for in the driver?  I did a search on this variable and I only find it declared and not used.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/nvmewin/attachments/20120724/536cdded/attachment.html>

More information about the nvmewin mailing list