* [PATCH v3] ethernet: myri10ge: use arch_phys_wc_add()
@ 2015-04-21 20:09 Luis R. Rodriguez
2015-04-21 21:48 ` David Miller
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Luis R. Rodriguez @ 2015-04-21 20:09 UTC (permalink / raw)
To: hykim, hkim, netdev
Cc: luto, Luis R. Rodriguez, Suresh Siddha, Ingo Molnar,
Thomas Gleixner, Juergen Gross, Daniel Vetter, Dave Airlie,
Antonino Daplas, Jean-Christophe Plagniol-Villard,
Tomi Valkeinen, linux-kernel
From: "Luis R. Rodriguez" <mcgrof@suse.com>
This driver already uses ioremap_wc() on the same range
so when write-combining is available that will be used
instead.
Cc: Hyong-Youb Kim <hykim@myri.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Suresh Siddha <sbsiddha@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Juergen Gross <jgross@suse.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: netdev@vger.kernel.org
Cc: Juergen Gross <jgross@suse.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Antonino Daplas <adaplas@gmail.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
---
drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 38 ++++++------------------
1 file changed, 9 insertions(+), 29 deletions(-)
diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
index 1412f5a..2bae502 100644
--- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
+++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
@@ -69,11 +69,7 @@
#include <net/ip.h>
#include <net/tcp.h>
#include <asm/byteorder.h>
-#include <asm/io.h>
#include <asm/processor.h>
-#ifdef CONFIG_MTRR
-#include <asm/mtrr.h>
-#endif
#include <net/busy_poll.h>
#include "myri10ge_mcp.h"
@@ -242,8 +238,7 @@ struct myri10ge_priv {
unsigned int rdma_tags_available;
int intr_coal_delay;
__be32 __iomem *intr_coal_delay_ptr;
- int mtrr;
- int wc_enabled;
+ int wc_cookie;
int down_cnt;
wait_queue_head_t down_wq;
struct work_struct watchdog_work;
@@ -1905,7 +1900,7 @@ static const char myri10ge_gstrings_main_stats[][ETH_GSTRING_LEN] = {
"tx_aborted_errors", "tx_carrier_errors", "tx_fifo_errors",
"tx_heartbeat_errors", "tx_window_errors",
/* device-specific stats */
- "tx_boundary", "WC", "irq", "MSI", "MSIX",
+ "tx_boundary", "irq", "MSI", "MSIX",
"read_dma_bw_MBs", "write_dma_bw_MBs", "read_write_dma_bw_MBs",
"serial_number", "watchdog_resets",
#ifdef CONFIG_MYRI10GE_DCA
@@ -1984,7 +1979,6 @@ myri10ge_get_ethtool_stats(struct net_device *netdev,
data[i] = ((u64 *)&link_stats)[i];
data[i++] = (unsigned int)mgp->tx_boundary;
- data[i++] = (unsigned int)mgp->wc_enabled;
data[i++] = (unsigned int)mgp->pdev->irq;
data[i++] = (unsigned int)mgp->msi_enabled;
data[i++] = (unsigned int)mgp->msix_enabled;
@@ -4040,14 +4034,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
mgp->board_span = pci_resource_len(pdev, 0);
mgp->iomem_base = pci_resource_start(pdev, 0);
- mgp->mtrr = -1;
- mgp->wc_enabled = 0;
-#ifdef CONFIG_MTRR
- mgp->mtrr = mtrr_add(mgp->iomem_base, mgp->board_span,
- MTRR_TYPE_WRCOMB, 1);
- if (mgp->mtrr >= 0)
- mgp->wc_enabled = 1;
-#endif
+ mgp->wc_cookie = arch_phys_wc_add(mgp->iomem_base, mgp->board_span);
mgp->sram = ioremap_wc(mgp->iomem_base, mgp->board_span);
if (mgp->sram == NULL) {
dev_err(&pdev->dev, "ioremap failed for %ld bytes at 0x%lx\n",
@@ -4146,14 +4133,14 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
goto abort_with_state;
}
if (mgp->msix_enabled)
- dev_info(dev, "%d MSI-X IRQs, tx bndry %d, fw %s, WC %s\n",
+ dev_info(dev, "%d MSI-X IRQs, tx bndry %d, fw %s, MTRR %s, WC Enabled\n",
mgp->num_slices, mgp->tx_boundary, mgp->fw_name,
- (mgp->wc_enabled ? "Enabled" : "Disabled"));
+ (mgp->wc_cookie > 0 ? "Enabled" : "Disabled"));
else
- dev_info(dev, "%s IRQ %d, tx bndry %d, fw %s, WC %s\n",
+ dev_info(dev, "%s IRQ %d, tx bndry %d, fw %s, MTRR %s, WC Enabled\n",
mgp->msi_enabled ? "MSI" : "xPIC",
pdev->irq, mgp->tx_boundary, mgp->fw_name,
- (mgp->wc_enabled ? "Enabled" : "Disabled"));
+ (mgp->wc_cookie > 0 ? "Enabled" : "Disabled"));
board_number++;
return 0;
@@ -4175,10 +4162,7 @@ abort_with_ioremap:
iounmap(mgp->sram);
abort_with_mtrr:
-#ifdef CONFIG_MTRR
- if (mgp->mtrr >= 0)
- mtrr_del(mgp->mtrr, mgp->iomem_base, mgp->board_span);
-#endif
+ arch_phys_wc_del(mgp->wc_cookie);
dma_free_coherent(&pdev->dev, sizeof(*mgp->cmd),
mgp->cmd, mgp->cmd_bus);
@@ -4220,11 +4204,7 @@ static void myri10ge_remove(struct pci_dev *pdev)
pci_restore_state(pdev);
iounmap(mgp->sram);
-
-#ifdef CONFIG_MTRR
- if (mgp->mtrr >= 0)
- mtrr_del(mgp->mtrr, mgp->iomem_base, mgp->board_span);
-#endif
+ arch_phys_wc_del(mgp->wc_cookie);
myri10ge_free_slices(mgp);
kfree(mgp->msix_vectors);
dma_free_coherent(&pdev->dev, sizeof(*mgp->cmd),
--
2.3.2.209.gd67f9d5.dirty
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3] ethernet: myri10ge: use arch_phys_wc_add()
2015-04-21 20:09 [PATCH v3] ethernet: myri10ge: use arch_phys_wc_add() Luis R. Rodriguez
@ 2015-04-21 21:48 ` David Miller
2015-04-22 7:15 ` Hyong-Youb Kim
2015-04-23 18:28 ` David Miller
2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2015-04-21 21:48 UTC (permalink / raw)
To: mcgrof
Cc: hykim, hkim, netdev, luto, mcgrof, sbsiddha, mingo, tglx, jgross,
daniel.vetter, airlied, adaplas, plagnioj, tomi.valkeinen,
linux-kernel
From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Date: Tue, 21 Apr 2015 13:09:45 -0700
> From: "Luis R. Rodriguez" <mcgrof@suse.com>
>
> This driver already uses ioremap_wc() on the same range
> so when write-combining is available that will be used
> instead.
...
> Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
I'll apply this with a driver maintainer's ACK.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3] ethernet: myri10ge: use arch_phys_wc_add()
2015-04-21 20:09 [PATCH v3] ethernet: myri10ge: use arch_phys_wc_add() Luis R. Rodriguez
2015-04-21 21:48 ` David Miller
@ 2015-04-22 7:15 ` Hyong-Youb Kim
2015-04-23 18:28 ` David Miller
2 siblings, 0 replies; 6+ messages in thread
From: Hyong-Youb Kim @ 2015-04-22 7:15 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: hykim, netdev, luto, Luis R. Rodriguez, Suresh Siddha,
Ingo Molnar, Thomas Gleixner, Juergen Gross, Daniel Vetter,
Dave Airlie, Antonino Daplas, Jean-Christophe Plagniol-Villard,
Tomi Valkeinen, linux-kernel
On Tue, Apr 21, 2015 at 01:09:45PM -0700, Luis R. Rodriguez wrote:
> From: "Luis R. Rodriguez" <mcgrof@suse.com>
>
> This driver already uses ioremap_wc() on the same range
> so when write-combining is available that will be used
> instead.
[...]
> Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Tested using the patched v4.0. It works fine. Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3] ethernet: myri10ge: use arch_phys_wc_add()
2015-04-21 20:09 [PATCH v3] ethernet: myri10ge: use arch_phys_wc_add() Luis R. Rodriguez
2015-04-21 21:48 ` David Miller
2015-04-22 7:15 ` Hyong-Youb Kim
@ 2015-04-23 18:28 ` David Miller
2015-04-24 1:57 ` Hyong-Youb Kim
2 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2015-04-23 18:28 UTC (permalink / raw)
To: mcgrof
Cc: hykim, hkim, netdev, luto, mcgrof, sbsiddha, mingo, tglx, jgross,
daniel.vetter, airlied, adaplas, plagnioj, tomi.valkeinen,
linux-kernel
From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Date: Tue, 21 Apr 2015 13:09:45 -0700
> From: "Luis R. Rodriguez" <mcgrof@suse.com>
>
> This driver already uses ioremap_wc() on the same range
> so when write-combining is available that will be used
> instead.
>
...
> Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
I can't wait forever for the driver maintainers to review this, so
I'm applying it.
Thanks Luis.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3] ethernet: myri10ge: use arch_phys_wc_add()
2015-04-23 18:28 ` David Miller
@ 2015-04-24 1:57 ` Hyong-Youb Kim
2015-04-24 2:35 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Hyong-Youb Kim @ 2015-04-24 1:57 UTC (permalink / raw)
To: David Miller
Cc: mcgrof, hykim, netdev, luto, mcgrof, sbsiddha, mingo, tglx,
jgross, daniel.vetter, airlied, adaplas, plagnioj,
tomi.valkeinen, linux-kernel
On Thu, Apr 23, 2015 at 02:28:40PM -0400, David Miller wrote:
> I can't wait forever for the driver maintainers to review this, so
> I'm applying it.
FWIW, I replied to Luis's patch yesterday. It appears on the netdev
list and patchwork. Checked the recipient list, and it includes
netdev, but not your address. I guess I will not make that mistake
again.
https://patchwork.ozlabs.org/patch/463481/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3] ethernet: myri10ge: use arch_phys_wc_add()
2015-04-24 1:57 ` Hyong-Youb Kim
@ 2015-04-24 2:35 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2015-04-24 2:35 UTC (permalink / raw)
To: hkim
Cc: mcgrof, hykim, netdev, luto, mcgrof, sbsiddha, mingo, tglx,
jgross, daniel.vetter, airlied, adaplas, plagnioj,
tomi.valkeinen, linux-kernel
From: Hyong-Youb Kim <hkim@cspi.com>
Date: Fri, 24 Apr 2015 10:57:58 +0900
> X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2015 01:58:46.2847 (UTC)
> X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
> X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR05MB1302
> X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 23 Apr 2015 18:58:55 -0700 (PDT)
> Content-Type: text/plain; charset="us-ascii"
> Content-Disposition: inline
> Subject: Re: [PATCH v3] ethernet: myri10ge: use arch_phys_wc_add()
> From: Hyong-Youb Kim <hkim@cspi.com>
> To: David Miller <davem@davemloft.net>
> CC: <mcgrof@do-not-panic.com>, <hykim@myri.com>, <netdev@vger.kernel.org>,
> <luto@amacapital.net>, <mcgrof@suse.com>, <sbsiddha@gmail.com>,
> <mingo@elte.hu>, <tglx@linutronix.de>, <jgross@suse.com>,
> <daniel.vetter@ffwll.ch>, <airlied@redhat.com>, <adaplas@gmail.com>,
> <plagnioj@jcrosoft.com>, <tomi.valkeinen@ti.com>,
> <linux-kernel@vger.kernel.org>
> Date: Fri, 24 Apr 2015 10:57:58 +0900
> User-Agent: Mutt/1.5.23 (2014-03-12)
>
> On Thu, Apr 23, 2015 at 02:28:40PM -0400, David Miller wrote:
>> I can't wait forever for the driver maintainers to review this, so
>> I'm applying it.
>
> FWIW, I replied to Luis's patch yesterday. It appears on the netdev
> list and patchwork. Checked the recipient list, and it includes
> netdev, but not your address. I guess I will not make that mistake
> again.
I saw it.
You did not supply an Acked-by: or Tested-by: tag in that response.
Also, if you are not going to use the email address listed in the
MAINTAINERS entry for this driver, you should update it so I know
what email addresses to look for to know if someone is responsible
for that driver or not.
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-04-24 2:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-21 20:09 [PATCH v3] ethernet: myri10ge: use arch_phys_wc_add() Luis R. Rodriguez
2015-04-21 21:48 ` David Miller
2015-04-22 7:15 ` Hyong-Youb Kim
2015-04-23 18:28 ` David Miller
2015-04-24 1:57 ` Hyong-Youb Kim
2015-04-24 2:35 ` David Miller
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).