From: Ayaz Abdulla Date: Wed, 14 Apr 2010 01:49:51 +0000 (-0700) Subject: forcedeth: fix tx limit2 flag check X-Git-Tag: firefly_0821_release~10186^2~1284 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cd67c595a03ec6a41f14ae060bfbb1757b80aa5a;p=firefly-linux-kernel-4.4.55.git forcedeth: fix tx limit2 flag check commit 5c659322a904a7cc0265e7b183372b9bdebec6db upstream. This is a fix for bug 572201 @ bugs.debian.org This patch fixes the TX_LIMIT feature flag. The previous logic check for TX_LIMIT2 also took into account a device that only had TX_LIMIT set. Reported-by: Stephen Mulcahu Reported-by: Ben Huchings Signed-off-by: Ayaz Abdulla Signed-off-by: David S. Miller Cc: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 3116601dbfea..7cd446d0f51a 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c @@ -5900,7 +5900,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i /* Limit the number of tx's outstanding for hw bug */ if (id->driver_data & DEV_NEED_TX_LIMIT) { np->tx_limit = 1; - if ((id->driver_data & DEV_NEED_TX_LIMIT2) && + if (((id->driver_data & DEV_NEED_TX_LIMIT2) == DEV_NEED_TX_LIMIT2) && pci_dev->revision >= 0xA2) np->tx_limit = 0; }