/* Returns mmrbc: maximum designed memory read count in bytes or appropriate error value.  */
int pcix_get_max_mmrbc(struct pci_dev *dev)
/* Returns mmrbc: maximum designed memory read count in bytes or appropriate error value.  */
int pcix_get_max_mmrbc(struct pci_dev *dev)
{
	int err, cap;
	u32 stat;
	cap = pci_find_capability(dev, PCI_CAP_ID_PCIX);
	if (!cap)
		return -EINVAL;
	err = pci_read_config_dword(dev, cap + PCI_X_STATUS, &stat);
	if (err)
		return -EINVAL;
	return (stat & PCI_X_STATUS_MAX_READ) >> 12;
}