From e2e396439f4f5093ff51e9ae75b92c47a7d56b5c Mon Sep 17 00:00:00 2001 From: Mike Belopuhov Date: Fri, 28 Jun 2013 11:59:43 +0000 Subject: Turns out that BGE_STATFLAG_UPDATED bit in the status block doesn't get properly updated by the newer hardware (seen in the TX completion case). This leads to very poor transmit performance in the beginning of a TCP connection. Linux and FreeBSD don't rely on BGE_STATFLAG_UPDATED bit since they enable MSI and tagged status for 5717+. Doing the same does indeed fix an issue. Change was tested by David Imhoff on 5719, 5720 and 5721/5750, Hrvoje Popovski on 5704 B0, sthen@ on 5723/5784, benno@ on 5704 A3, and me on 5719, 5720 adn 5714/5715. No objections from kettenis@ and dlg@. --- sys/dev/pci/if_bgereg.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sys/dev/pci/if_bgereg.h') diff --git a/sys/dev/pci/if_bgereg.h b/sys/dev/pci/if_bgereg.h index dbd8b19e13f..61de08b0f81 100644 --- a/sys/dev/pci/if_bgereg.h +++ b/sys/dev/pci/if_bgereg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bgereg.h,v 1.116 2013/06/13 11:23:54 mikeb Exp $ */ +/* $OpenBSD: if_bgereg.h,v 1.117 2013/06/28 11:59:42 mikeb Exp $ */ /* * Copyright (c) 2001 Wind River Systems @@ -225,6 +225,7 @@ #define BGE_PCIMISCCTL_CLOCKCTL_RW 0x00000020 #define BGE_PCIMISCCTL_REG_WORDSWAP 0x00000040 #define BGE_PCIMISCCTL_INDIRECT_ACCESS 0x00000080 +#define BGE_PCIMISCCTL_TAGGED_STATUS 0x00000200 #define BGE_PCIMISCCTL_ASICREV 0xFFFF0000 #define BGE_PCIMISCCTL_ASICREV_SHIFT 16 @@ -1919,8 +1920,7 @@ #define BGE_MSIMODE_PCI_TGT_ABRT_ATTN 0x00000004 #define BGE_MSIMODE_PCI_MSTR_ABRT_ATTN 0x00000008 #define BGE_MSIMODE_PCI_PERR_ATTN 0x00000010 -#define BGE_MSIMODE_MSI_FIFOUFLOW_ATTN 0x00000020 -#define BGE_MSIMODE_MSI_FIFOOFLOW_ATTN 0x00000040 +#define BGE_MSIMODE_ONE_SHOT_DISABLE 0x00000020 /* MSI status register */ #define BGE_MSISTAT_PCI_TGT_ABRT_ATTN 0x00000004 @@ -2401,7 +2401,7 @@ struct bge_sts_idx { struct bge_status_block { u_int32_t bge_status; - u_int32_t bge_rsvd0; + u_int32_t bge_status_tag; #if BYTE_ORDER == LITTLE_ENDIAN u_int16_t bge_rx_jumbo_cons_idx; u_int16_t bge_rx_std_cons_idx; @@ -2810,6 +2810,7 @@ struct bge_softc { u_int32_t bge_expcap; u_int32_t bge_mps; u_int32_t bge_expmrq; + u_int32_t bge_lasttag; u_int32_t bge_flags; #define BGE_TXRING_VALID 0x00000001 #define BGE_RXRING_VALID 0x00000002 @@ -2841,6 +2842,7 @@ struct bge_softc { #define BGE_57765_PLUS 0x08000000 #define BGE_APE 0x10000000 #define BGE_CPMU_PRESENT 0x20000000 +#define BGE_TAGGED_STATUS 0x40000000 bus_dma_tag_t bge_dmatag; u_int32_t bge_mfw_flags; /* Management F/W flags */ -- cgit v1.2.3