* [PATCH 0/2] myri10ge updates for 2.6.23 @ 2007-08-24 6:56 Brice Goglin 2007-08-24 6:57 ` [PATCH 1/2] myri10ge: use pcie_get/set_readrq Brice Goglin 2007-08-24 6:57 ` [PATCH 2/2] myri10ge: update driver version to 1.3.2-1.269 Brice Goglin 0 siblings, 2 replies; 4+ messages in thread From: Brice Goglin @ 2007-08-24 6:56 UTC (permalink / raw) To: Jeff Garzik; +Cc: netdev Hi Jeff, Now that Greg pushed my fix to expose pcie_get_readrq() prototype in linux/pci.h, I am resending my rework of Peter Oruba's patch to use pcie_get/set_readrq() in myri10ge. Please apply for 2.6.23. 1. use pcie_get/set_readrq 2. update driver version to 1.3.2-1.269 Also, we noticed that packet forwarding is faster on our hardware when receiving in linear skb instead of pages (about 10Gb/s vs. 7), so we are thinking of submitting a Kconfig option to switch to the old linear skb RX code. Would this be acceptable? Thanks, Brice ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] myri10ge: use pcie_get/set_readrq 2007-08-24 6:56 [PATCH 0/2] myri10ge updates for 2.6.23 Brice Goglin @ 2007-08-24 6:57 ` Brice Goglin 2007-08-25 4:41 ` Jeff Garzik 2007-08-24 6:57 ` [PATCH 2/2] myri10ge: update driver version to 1.3.2-1.269 Brice Goglin 1 sibling, 1 reply; 4+ messages in thread From: Brice Goglin @ 2007-08-24 6:57 UTC (permalink / raw) To: Jeff Garzik; +Cc: netdev Based on a patch from Peter Oruba, convert myri10ge to use pcie_get_readrq() and pcie_set_readrq() instead of our own PCI calls and arithmetics. These driver changes incorporate the proposed PCI-X / PCI-Express read byte count interface. Reading and setting those values doesn't take place "manually", instead wrapping functions are called to allow quirks for some PCI bridges. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off by: Peter Oruba <peter.oruba@amd.com> Based on work by Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> --- drivers/net/myri10ge/myri10ge.c | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) Index: linux-2.6.git/drivers/net/myri10ge/myri10ge.c =================================================================== --- linux-2.6.git.orig/drivers/net/myri10ge/myri10ge.c 2007-08-24 08:43:01.000000000 +0200 +++ linux-2.6.git/drivers/net/myri10ge/myri10ge.c 2007-08-24 08:45:29.000000000 +0200 @@ -2514,26 +2514,20 @@ { struct pci_dev *pdev = mgp->pdev; struct device *dev = &pdev->dev; - int cap, status; - u16 val; + int status; mgp->tx.boundary = 4096; /* * Verify the max read request size was set to 4KB * before trying the test with 4KB. */ - cap = pci_find_capability(pdev, PCI_CAP_ID_EXP); - if (cap < 64) { - dev_err(dev, "Bad PCI_CAP_ID_EXP location %d\n", cap); - goto abort; - } - status = pci_read_config_word(pdev, cap + PCI_EXP_DEVCTL, &val); - if (status != 0) { + status = pcie_get_readrq(pdev); + if (status < 0) { dev_err(dev, "Couldn't read max read req size: %d\n", status); goto abort; } - if ((val & (5 << 12)) != (5 << 12)) { - dev_warn(dev, "Max Read Request size != 4096 (0x%x)\n", val); + if (status != 4096) { + dev_warn(dev, "Max Read Request size != 4096 (%d)\n", status); mgp->tx.boundary = 2048; } /* @@ -2850,9 +2844,7 @@ size_t bytes; int i; int status = -ENXIO; - int cap; int dac_enabled; - u16 val; netdev = alloc_etherdev(sizeof(*mgp)); if (netdev == NULL) { @@ -2884,19 +2876,7 @@ = pci_find_capability(pdev, PCI_CAP_ID_VNDR); /* Set our max read request to 4KB */ - cap = pci_find_capability(pdev, PCI_CAP_ID_EXP); - if (cap < 64) { - dev_err(&pdev->dev, "Bad PCI_CAP_ID_EXP location %d\n", cap); - goto abort_with_netdev; - } - status = pci_read_config_word(pdev, cap + PCI_EXP_DEVCTL, &val); - if (status != 0) { - dev_err(&pdev->dev, "Error %d reading PCI_EXP_DEVCTL\n", - status); - goto abort_with_netdev; - } - val = (val & ~PCI_EXP_DEVCTL_READRQ) | (5 << 12); - status = pci_write_config_word(pdev, cap + PCI_EXP_DEVCTL, val); + status = pcie_set_readrq(pdev, 4096); if (status != 0) { dev_err(&pdev->dev, "Error %d writing PCI_EXP_DEVCTL\n", status); ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] myri10ge: use pcie_get/set_readrq 2007-08-24 6:57 ` [PATCH 1/2] myri10ge: use pcie_get/set_readrq Brice Goglin @ 2007-08-25 4:41 ` Jeff Garzik 0 siblings, 0 replies; 4+ messages in thread From: Jeff Garzik @ 2007-08-25 4:41 UTC (permalink / raw) To: Brice Goglin; +Cc: netdev Brice Goglin wrote: > Based on a patch from Peter Oruba, convert myri10ge to use pcie_get_readrq() > and pcie_set_readrq() instead of our own PCI calls and arithmetics. > > These driver changes incorporate the proposed PCI-X / PCI-Express read byte > count interface. Reading and setting those values doesn't take place > "manually", instead wrapping functions are called to allow quirks for some > PCI bridges. > > Signed-off-by: Brice Goglin <brice@myri.com> > Signed-off by: Peter Oruba <peter.oruba@amd.com> > Based on work by Stephen Hemminger <shemminger@linux-foundation.org> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org> > --- > drivers/net/myri10ge/myri10ge.c | 32 ++++++-------------------------- > 1 file changed, 6 insertions(+), 26 deletions(-) applied 1-2 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] myri10ge: update driver version to 1.3.2-1.269 2007-08-24 6:56 [PATCH 0/2] myri10ge updates for 2.6.23 Brice Goglin 2007-08-24 6:57 ` [PATCH 1/2] myri10ge: use pcie_get/set_readrq Brice Goglin @ 2007-08-24 6:57 ` Brice Goglin 1 sibling, 0 replies; 4+ messages in thread From: Brice Goglin @ 2007-08-24 6:57 UTC (permalink / raw) To: Jeff Garzik; +Cc: netdev Update myri10ge driver version to 1.3.2-1.269. Signed-off-by: Brice Goglin <brice@myri.com> --- drivers/net/myri10ge/myri10ge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6.git/drivers/net/myri10ge/myri10ge.c =================================================================== --- linux-2.6.git.orig/drivers/net/myri10ge/myri10ge.c 2007-08-24 08:45:29.000000000 +0200 +++ linux-2.6.git/drivers/net/myri10ge/myri10ge.c 2007-08-24 08:45:38.000000000 +0200 @@ -72,7 +72,7 @@ #include "myri10ge_mcp.h" #include "myri10ge_mcp_gen_header.h" -#define MYRI10GE_VERSION_STR "1.3.1-1.248" +#define MYRI10GE_VERSION_STR "1.3.2-1.269" MODULE_DESCRIPTION("Myricom 10G driver (10GbE)"); MODULE_AUTHOR("Maintainer: help@myri.com"); ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-08-25 4:41 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-08-24 6:56 [PATCH 0/2] myri10ge updates for 2.6.23 Brice Goglin 2007-08-24 6:57 ` [PATCH 1/2] myri10ge: use pcie_get/set_readrq Brice Goglin 2007-08-25 4:41 ` Jeff Garzik 2007-08-24 6:57 ` [PATCH 2/2] myri10ge: update driver version to 1.3.2-1.269 Brice Goglin
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).