* [PATCH] e1000, errata 2{3, 4} - possible EEH or memory corruption when DMA crosses a 64k boundary
@ 2005-02-01 19:27 Olaf Hering
2005-02-01 19:33 ` Jon Mason
0 siblings, 1 reply; 4+ messages in thread
From: Olaf Hering @ 2005-02-01 19:27 UTC (permalink / raw)
To: Ganesh Venkatesan, netdev; +Cc: linuxppc64-dev
We have this patch in SLES9 SP1.
I asked google about 'fix for errata 23, cant cross 64kB boundary', and
it shhows such a patch is also part of RH 2.6.9.
It still applies to current Linus tree.
Can you check wether this is still required for the current driver?
References: SUSE48368 LTC12567
Need to check 64k boundary on DMA address as well.
We also need to have 64k boundary checking on the DMA address
that comes back from pci_map_single(). This address is what will
be passed to the adapter on ppc64 for it to DMA into. It's the
address that the adapter sees which will trip erratum 23.
The so patched driver passed a quick netperf run and a weekend
long stress test.
diff -puN drivers/net/e1000-new/e1000_main.c~64k-align-check-dma-suse drivers/net/e1000-new/e1000_main.c
--- linux-2.6.5-7.127/drivers/net/e1000-new/e1000_main.c~64k-align-check-dma-suse Wed Dec 8 16:55:46 2004
+++ linux-2.6.5-7.127-moilanen/drivers/net/e1000-new/e1000_main.c Thu Dec 9 15:46:04 2004
@@ -2579,6 +2579,29 @@ e1000_alloc_rx_buffers(struct e1000_adap
adapter->rx_buffer_len,
PCI_DMA_FROMDEVICE);
+ if(adapter->hw.mac_type == e1000_82545 ||
+ adapter->hw.mac_type == e1000_82546) {
+ /* fix for errata 23, cant cross 64kB boundary */
+ begin = (unsigned long)buffer_info->dma;
+ end = (unsigned long)(adapter->rx_buffer_len) - 1;
+
+ if(!e1000_check_64k_alignment(adapter, begin, end)) {
+
+ DPRINTK(RX_ERR,ERR,"dma align check failed: "
+ "begin: 0x%lx, end: 0x%lx\n", begin, end);
+
+ dev_kfree_skb(skb);
+ buffer_info->skb = NULL;
+
+ pci_unmap_single(pdev,
+ buffer_info->dma,
+ adapter->rx_buffer_len,
+ PCI_DMA_FROMDEVICE);
+
+ break; /* while !buffer_info->skb */
+ }
+ }
+
rx_desc = E1000_RX_DESC(*rx_ring, i);
rx_desc->buffer_addr = cpu_to_le64(buffer_info->dma);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] e1000, errata 2{3, 4} - possible EEH or memory corruption when DMA crosses a 64k boundary
2005-02-01 19:27 [PATCH] e1000, errata 2{3, 4} - possible EEH or memory corruption when DMA crosses a 64k boundary Olaf Hering
@ 2005-02-01 19:33 ` Jon Mason
0 siblings, 0 replies; 4+ messages in thread
From: Jon Mason @ 2005-02-01 19:33 UTC (permalink / raw)
To: Olaf Hering; +Cc: netdev, Ganesh Venkatesan, linuxppc64-dev
On Tuesday 01 February 2005 01:27 pm, Olaf Hering wrote:
>
> We have this patch in SLES9 SP1.
> I asked google about 'fix for errata 23, cant cross 64kB boundary', and
> it shhows such a patch is also part of RH 2.6.9.
> It still applies to current Linus tree.
> Can you check wether this is still required for the current driver?
This patch is still lacking from the latest e1000 driver. Intel has the patch in their queue, so it will be needed until they release their next version of the e1000 driver.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] e1000, errata 2{3, 4} - possible EEH or memory corruption when DMA crosses a 64k boundary
@ 2005-02-01 19:36 Venkatesan, Ganesh
2005-02-01 19:40 ` Olaf Hering
0 siblings, 1 reply; 4+ messages in thread
From: Venkatesan, Ganesh @ 2005-02-01 19:36 UTC (permalink / raw)
To: Olaf Hering, netdev; +Cc: linuxppc64-dev, Ronciak, John, Brandeburg, Jesse
The patch attached to your mail does not seem to be complete. Did the
mail application truncate?
In any case, this fix is required in e1000. It is *not* in the latest
driver that is released but *is* in the driver that is lined up for
release in a couple of weeks.
Thanks,
Ganesh.
>-----Original Message-----
>From: Olaf Hering [mailto:olh@suse.de]
>Sent: Tuesday, February 01, 2005 11:28 AM
>To: Venkatesan, Ganesh; netdev@oss.sgi.com
>Cc: linuxppc64-dev@ozlabs.org
>Subject: [PATCH] e1000, errata 2{3,4} - possible EEH or memory
corruption
>when DMA crosses a 64k boundary
>
>
>We have this patch in SLES9 SP1.
>I asked google about 'fix for errata 23, cant cross 64kB boundary', and
>it shhows such a patch is also part of RH 2.6.9.
>It still applies to current Linus tree.
>Can you check wether this is still required for the current driver?
>
>
>References: SUSE48368 LTC12567
>
>Need to check 64k boundary on DMA address as well.
>
>We also need to have 64k boundary checking on the DMA address
>that comes back from pci_map_single(). This address is what will
>be passed to the adapter on ppc64 for it to DMA into. It's the
>address that the adapter sees which will trip erratum 23.
>
>The so patched driver passed a quick netperf run and a weekend
>long stress test.
>
>diff -puN drivers/net/e1000-new/e1000_main.c~64k-align-check-dma-suse
>drivers/net/e1000-new/e1000_main.c
>---
linux-2.6.5-7.127/drivers/net/e1000-new/e1000_main.c~64k-align-check-
>dma-suse Wed Dec 8 16:55:46 2004
>+++ linux-2.6.5-7.127-moilanen/drivers/net/e1000-new/e1000_main.c
Thu Dec
>9 15:46:04 2004
>@@ -2579,6 +2579,29 @@ e1000_alloc_rx_buffers(struct e1000_adap
>
adapter->rx_buffer_len,
> PCI_DMA_FROMDEVICE);
>
>+ if(adapter->hw.mac_type == e1000_82545 ||
>+ adapter->hw.mac_type == e1000_82546) {
>+ /* fix for errata 23, cant cross 64kB boundary
*/
>+ begin = (unsigned long)buffer_info->dma;
>+ end = (unsigned long)(adapter->rx_buffer_len)
- 1;
>+
>+ if(!e1000_check_64k_alignment(adapter, begin,
end)) {
>+
>+ DPRINTK(RX_ERR,ERR,"dma align check
failed: "
>+ "begin: 0x%lx, end: 0x%lx\n",
begin, end);
>+
>+ dev_kfree_skb(skb);
>+ buffer_info->skb = NULL;
>+
>+ pci_unmap_single(pdev,
>+ buffer_info->dma,
>+ adapter->rx_buffer_len,
>+ PCI_DMA_FROMDEVICE);
>+
>+ break; /* while !buffer_info->skb */
>+ }
>+ }
>+
> rx_desc = E1000_RX_DESC(*rx_ring, i);
> rx_desc->buffer_addr = cpu_to_le64(buffer_info->dma);
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] e1000, errata 2{3, 4} - possible EEH or memory corruption when DMA crosses a 64k boundary
2005-02-01 19:36 Venkatesan, Ganesh
@ 2005-02-01 19:40 ` Olaf Hering
0 siblings, 0 replies; 4+ messages in thread
From: Olaf Hering @ 2005-02-01 19:40 UTC (permalink / raw)
To: Venkatesan, Ganesh
Cc: netdev, Ronciak, John, Brandeburg, Jesse, linuxppc64-dev
On Tue, Feb 01, Venkatesan, Ganesh wrote:
> In any case, this fix is required in e1000. It is *not* in the latest
> driver that is released but *is* in the driver that is lined up for
> release in a couple of weeks.
Thats good enough, just that things dont get lost. There are probably a
few separate patches for each problem found.
We are still in the process of sorting out our +2k patch mess.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-02-01 19:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-01 19:27 [PATCH] e1000, errata 2{3, 4} - possible EEH or memory corruption when DMA crosses a 64k boundary Olaf Hering
2005-02-01 19:33 ` Jon Mason
-- strict thread matches above, loose matches on Subject: below --
2005-02-01 19:36 Venkatesan, Ganesh
2005-02-01 19:40 ` Olaf Hering
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).