lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 7 Sep 2007 19:52:09 -0400
From:	Chris Snook <csnook@...hat.com>
To:	Jeff Garzik <jeff@...zik.org>
Cc:	atl1-devel@...ts.sourceforge.net,
	Jay Cliburn <jacliburn@...lsouth.net>, netdev@...r.kernel.org
Subject: [PATCH 2/2] atl1: wrap problematic optimizations in CONFIG_ATL1_EXPERIMENTAL

From: Chris Snook <csnook@...hat.com>

Make certain problematic optimizations build-time configurable.

Signed-off-by: Chris Snook <csnook@...hat.com>
Acked-by: Jay Cliburn <jacliburn@...lsouth.net>

--- a/drivers/net/atl1/atl1_main.c	2007-09-04 10:12:38.000000000 -0400
+++ b/drivers/net/atl1/atl1_main.c	2007-09-04 11:23:26.000000000 -0400
@@ -2203,22 +2203,26 @@ static int __devinit atl1_probe(struct p
 	struct net_device *netdev;
 	struct atl1_adapter *adapter;
 	static int cards_found = 0;
-	bool pci_using_64 = true;
+	bool pci_using_64 = false;
 	int err;
 
 	err = pci_enable_device(pdev);
 	if (err)
 		return err;
 
+#ifdef CONFIG_ATL1_EXPERIMENTAL
 	err = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
+	if (!err) {
+		pci_using_64 = true;
+		goto dma_ok;
+	}
+#endif /* CONFIG_ATL1_EXPERIMENTAL */
+	err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
 	if (err) {
-		err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
-		if (err) {
-			dev_err(&pdev->dev, "no usable DMA configuration\n");
-			goto err_dma;
-		}
-		pci_using_64 = false;
+		dev_err(&pdev->dev, "no usable DMA configuration\n");
+		goto err_dma;
 	}
+dma_ok:
 	/* Mark all PCI regions associated with PCI device
 	 * pdev as being reserved by owner atl1_driver_name
 	 */
@@ -2294,11 +2298,13 @@ static int __devinit atl1_probe(struct p
 	netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX);
 
 	/*
-	 * FIXME - Until tso performance gets fixed, disable the feature.
+	 * TSO currently has performance problems,
+	 * so let's disable it by default.
 	 * Enable it with ethtool -K if desired.
 	 */
-	/* netdev->features |= NETIF_F_TSO; */
-
+#ifdef CONFIG_ATL1_EXPERIMENTAL
+	netdev->features |= NETIF_F_TSO;
+#endif
 	if (pci_using_64)
 		netdev->features |= NETIF_F_HIGHDMA;
 
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ