Prev: [132/156] ip_gre: include route header_len in max_headroom calculation
Next: [129/156] net: add __must_check to sk_add_backlog
From: Greg KH on 30 Mar 2010 19:30 2.6.33-stable review patch. If anyone has any objections, please let us know. ------------------ From: Dean Nelson <dnelson(a)redhat.com> commit 25daeb550b69e89aff59bc6a84218a12b5203531 upstream. For the PCI_X_STATUS register, pcix_get_max_mmrbc() is returning an incorrect value, which is based on: (stat & PCI_X_STATUS_MAX_READ) >> 12 Valid return values are 512, 1024, 2048, 4096, which correspond to a 'stat' (masked and right shifted by 21) of 0, 1, 2, 3, respectively. A right shift by 11 would generate the correct return value when 'stat' (masked and right shifted by 21) has a value of 1 or 2. But for a value of 0 or 3 it's not possible to generate the correct return value by only right shifting. Fix is based on pcix_get_mmrbc()'s similar dealings with the PCI_X_CMD register. Signed-off-by: Dean Nelson <dnelson(a)redhat.com> Signed-off-by: Jesse Barnes <jbarnes(a)virtuousgeek.org> Signed-off-by: Greg Kroah-Hartman <gregkh(a)suse.de> --- drivers/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -2432,7 +2432,7 @@ int pcix_get_max_mmrbc(struct pci_dev *d if (err) return -EINVAL; - return (stat & PCI_X_STATUS_MAX_READ) >> 12; + return 512 << ((stat & PCI_X_STATUS_MAX_READ) >> 21); } EXPORT_SYMBOL(pcix_get_max_mmrbc); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |