]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
PCI: Reduce size of ATS structure elements
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 17 Jul 2015 20:27:34 +0000 (15:27 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 13 Aug 2015 20:57:22 +0000 (15:57 -0500)
The extended capabilities list is linked with 12-bit pointers, and the ATS
Smallest Translation Unit and Invalidate Queue Depth fields are both 5
bits.

Use u16 and u8 to hold the extended capability address and the stu and qdep
values.  No functional change.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Joerg Roedel <jroedel@suse.de>
include/linux/pci.h

index 8bc16b5e474768ee2c1d00c0434c00e89a3330ac..238b77e8ca41de8ed12ba8b048c9666d0c55efcb 100644 (file)
@@ -376,9 +376,9 @@ struct pci_dev {
                struct pci_sriov *sriov;        /* SR-IOV capability related */
                struct pci_dev *physfn; /* the PF this VF is associated with */
        };
-       int             ats_cap;        /* ATS Capability offset */
-       int             ats_stu;        /* ATS Smallest Translation Unit */
-       int             ats_qdep;       /* ATS Invalidate Queue Depth */
+       u16             ats_cap;        /* ATS Capability offset */
+       u8              ats_stu;        /* ATS Smallest Translation Unit */
+       u8              ats_qdep;       /* ATS Invalidate Queue Depth */
        atomic_t        ats_ref_cnt;    /* number of VFs with ATS enabled */
 #endif
        phys_addr_t rom; /* Physical address of ROM if it's not from the BAR */