From: Chris Snook <csnook@redhat.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: atl1-devel@lists.sourceforge.net,
Jay Cliburn <jacliburn@bellsouth.net>,
netdev@vger.kernel.org
Subject: [PATCH 2/2] atl1: wrap problematic optimizations in CONFIG_ATL1_EXPERIMENTAL
Date: Fri, 7 Sep 2007 19:52:09 -0400 [thread overview]
Message-ID: <20070907235209.GB12055@shell.boston.redhat.com> (raw)
In-Reply-To: <46E1E1AC.5030801@redhat.com>
From: Chris Snook <csnook@redhat.com>
Make certain problematic optimizations build-time configurable.
Signed-off-by: Chris Snook <csnook@redhat.com>
Acked-by: Jay Cliburn <jacliburn@bellsouth.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;
next prev parent reply other threads:[~2007-09-07 23:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-07 23:41 [PATCH 0/2] atl1: Introduce CONFIG_ATL1_EXPERIMENTAL Chris Snook
2007-09-07 23:47 ` [PATCH 1/2] atl1: add CONFIG_ATL1_EXPERIMENTAL to kconfig Chris Snook
2007-09-07 23:52 ` Chris Snook [this message]
2007-09-08 0:21 ` [atl1-devel] [PATCH 2/2] atl1: wrap problematic optimizations in CONFIG_ATL1_EXPERIMENTAL Luca
2007-09-08 0:27 ` Chris Snook
2007-09-07 23:54 ` [PATCH 0/2] atl1: Introduce CONFIG_ATL1_EXPERIMENTAL Jeff Garzik
2007-09-08 0:06 ` Chris Snook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070907235209.GB12055@shell.boston.redhat.com \
--to=csnook@redhat.com \
--cc=atl1-devel@lists.sourceforge.net \
--cc=jacliburn@bellsouth.net \
--cc=jeff@garzik.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).