Commit 54aed113 authored by Mithlesh Thukral's avatar Mithlesh Thukral Committed by Greg Kroah-Hartman

Staging: sxg: Add Ethtool functionality enhancement and misc cleanups

Misc. cleanups in the driver.
* Remove debugging code and variables.
* Fix compile time warnings.
* Remove debugging comments.
* Start cleanup of sxg_stats structure. This structure will eventually become
  very small
Signed-off-by: default avatarLinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: default avatarChristopher Harrer <charrer@alacritech.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6a2946ba
...@@ -105,9 +105,10 @@ static void sxg_complete_slow_send(struct adapter_t *adapter, int irq_context); ...@@ -105,9 +105,10 @@ static void sxg_complete_slow_send(struct adapter_t *adapter, int irq_context);
static struct sk_buff *sxg_slow_receive(struct adapter_t *adapter, static struct sk_buff *sxg_slow_receive(struct adapter_t *adapter,
struct sxg_event *Event); struct sxg_event *Event);
static void sxg_process_rcv_error(struct adapter_t *adapter, u32 ErrorStatus); static void sxg_process_rcv_error(struct adapter_t *adapter, u32 ErrorStatus);
/* See if we need sxg_mac_filter() in future. If not remove it
static bool sxg_mac_filter(struct adapter_t *adapter, static bool sxg_mac_filter(struct adapter_t *adapter,
struct ether_header *EtherHdr, ushort length); struct ether_header *EtherHdr, ushort length);
*/
static struct net_device_stats *sxg_get_stats(struct net_device * dev); static struct net_device_stats *sxg_get_stats(struct net_device * dev);
void sxg_free_resources(struct adapter_t *adapter); void sxg_free_resources(struct adapter_t *adapter);
void sxg_free_rcvblocks(struct adapter_t *adapter); void sxg_free_rcvblocks(struct adapter_t *adapter);
...@@ -121,7 +122,7 @@ void sxg_collect_statistics(struct adapter_t *adapter); ...@@ -121,7 +122,7 @@ void sxg_collect_statistics(struct adapter_t *adapter);
static int sxg_mac_set_address(struct net_device *dev, void *ptr); static int sxg_mac_set_address(struct net_device *dev, void *ptr);
static void sxg_mcast_set_list(struct net_device *dev); static void sxg_mcast_set_list(struct net_device *dev);
static void sxg_adapter_set_hwaddr(struct adapter_t *adapter); static int sxg_adapter_set_hwaddr(struct adapter_t *adapter);
static void sxg_unmap_mmio_space(struct adapter_t *adapter); static void sxg_unmap_mmio_space(struct adapter_t *adapter);
...@@ -155,7 +156,7 @@ static struct sxgbase_driver sxg_global = { ...@@ -155,7 +156,7 @@ static struct sxgbase_driver sxg_global = {
static int intagg_delay = 100; static int intagg_delay = 100;
static u32 dynamic_intagg = 0; static u32 dynamic_intagg = 0;
char sxg_driver_name[] = "sxg"; char sxg_driver_name[] = "sxg_nic";
#define DRV_AUTHOR "Alacritech, Inc. Engineering" #define DRV_AUTHOR "Alacritech, Inc. Engineering"
#define DRV_DESCRIPTION \ #define DRV_DESCRIPTION \
"Alacritech SLIC Techonology(tm) Non-Accelerated 10Gbe Driver" "Alacritech SLIC Techonology(tm) Non-Accelerated 10Gbe Driver"
...@@ -911,7 +912,7 @@ static int sxg_entry_probe(struct pci_dev *pcidev, ...@@ -911,7 +912,7 @@ static int sxg_entry_probe(struct pci_dev *pcidev,
DBG_ERROR("sxg: %s ENTER sxg_adapter_set_hwaddr\n", DBG_ERROR("sxg: %s ENTER sxg_adapter_set_hwaddr\n",
__func__); __func__);
sxg_read_config(adapter); sxg_read_config(adapter);
sxg_adapter_set_hwaddr(adapter); status = sxg_adapter_set_hwaddr(adapter);
} else { } else {
adapter->state = ADAPT_FAIL; adapter->state = ADAPT_FAIL;
adapter->linkstate = LINK_DOWN; adapter->linkstate = LINK_DOWN;
...@@ -1102,17 +1103,11 @@ static irqreturn_t sxg_isr(int irq, void *dev_id) ...@@ -1102,17 +1103,11 @@ static irqreturn_t sxg_isr(int irq, void *dev_id)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
int debug_inthandler = 0;
static void sxg_handle_interrupt(struct adapter_t *adapter) static void sxg_handle_interrupt(struct adapter_t *adapter)
{ {
/* unsigned char RssId = 0; */ /* unsigned char RssId = 0; */
u32 NewIsr; u32 NewIsr;
if (++debug_inthandler < 20) {
DBG_ERROR("Enter sxg_handle_interrupt ISR[%x]\n",
adapter->IsrCopy[0]);
}
SXG_TRACE(TRACE_SXG, SxgTraceBuffer, TRACE_NOISY, "HndlIntr", SXG_TRACE(TRACE_SXG, SxgTraceBuffer, TRACE_NOISY, "HndlIntr",
adapter, adapter->IsrCopy[0], 0, 0); adapter, adapter->IsrCopy[0], 0, 0);
/* For now, RSS is disabled with line based interrupts */ /* For now, RSS is disabled with line based interrupts */
...@@ -1140,11 +1135,6 @@ static void sxg_handle_interrupt(struct adapter_t *adapter) ...@@ -1140,11 +1135,6 @@ static void sxg_handle_interrupt(struct adapter_t *adapter)
SXG_TRACE(TRACE_SXG, SxgTraceBuffer, TRACE_NOISY, "ClearIsr", SXG_TRACE(TRACE_SXG, SxgTraceBuffer, TRACE_NOISY, "ClearIsr",
adapter, NewIsr, 0, 0); adapter, NewIsr, 0, 0);
if (debug_inthandler < 20) {
DBG_ERROR
("Exit sxg_handle_interrupt2 after enabling interrupt\n");
}
WRITE_REG(adapter->UcodeRegs[0].Isr, NewIsr, TRUE); WRITE_REG(adapter->UcodeRegs[0].Isr, NewIsr, TRUE);
SXG_TRACE(TRACE_SXG, SxgTraceBuffer, TRACE_NOISY, "XHndlInt", SXG_TRACE(TRACE_SXG, SxgTraceBuffer, TRACE_NOISY, "XHndlInt",
...@@ -1170,7 +1160,6 @@ static int sxg_process_isr(struct adapter_t *adapter, u32 MessageId) ...@@ -1170,7 +1160,6 @@ static int sxg_process_isr(struct adapter_t *adapter, u32 MessageId)
SXG_TRACE(TRACE_SXG, SxgTraceBuffer, TRACE_NOISY, "ProcIsr", SXG_TRACE(TRACE_SXG, SxgTraceBuffer, TRACE_NOISY, "ProcIsr",
adapter, Isr, 0, 0); adapter, Isr, 0, 0);
DBG_ERROR("%s: Entering with %d ISR value\n", __FUNCTION__, Isr);
/* Error */ /* Error */
if (Isr & SXG_ISR_ERR) { if (Isr & SXG_ISR_ERR) {
if (Isr & SXG_ISR_PDQF) { if (Isr & SXG_ISR_PDQF) {
...@@ -1187,9 +1176,8 @@ static int sxg_process_isr(struct adapter_t *adapter, u32 MessageId) ...@@ -1187,9 +1176,8 @@ static int sxg_process_isr(struct adapter_t *adapter, u32 MessageId)
* off for now. I don't want to make the code more * off for now. I don't want to make the code more
* complicated than strictly needed. * complicated than strictly needed.
*/ */
adapter->Stats.RcvNoBuffer++;
adapter->stats.rx_missed_errors++; adapter->stats.rx_missed_errors++;
if (adapter->Stats.RcvNoBuffer < 5) { if (adapter->stats.rx_missed_errors< 5) {
DBG_ERROR("%s: SXG_ISR_ERR RMISS!!\n", DBG_ERROR("%s: SXG_ISR_ERR RMISS!!\n",
__func__); __func__);
} }
...@@ -1221,8 +1209,6 @@ static int sxg_process_isr(struct adapter_t *adapter, u32 MessageId) ...@@ -1221,8 +1209,6 @@ static int sxg_process_isr(struct adapter_t *adapter, u32 MessageId)
} }
/* Transmit drop - no DRAM buffers or XMT error */ /* Transmit drop - no DRAM buffers or XMT error */
if (Isr & SXG_ISR_XDROP) { if (Isr & SXG_ISR_XDROP) {
adapter->Stats.XmtDrops++;
adapter->Stats.XmtErrors++;
DBG_ERROR("%s: SXG_ISR_ERR XDROP!!\n", __func__); DBG_ERROR("%s: SXG_ISR_ERR XDROP!!\n", __func__);
} }
} }
...@@ -1233,7 +1219,7 @@ static int sxg_process_isr(struct adapter_t *adapter, u32 MessageId) ...@@ -1233,7 +1219,7 @@ static int sxg_process_isr(struct adapter_t *adapter, u32 MessageId)
/* Dump */ /* Dump */
if (Isr & SXG_ISR_UPC) { if (Isr & SXG_ISR_UPC) {
/* Maybe change when debug is added.. */ /* Maybe change when debug is added.. */
ASSERT(adapter->DumpCmdRunning); // ASSERT(adapter->DumpCmdRunning);
adapter->DumpCmdRunning = FALSE; adapter->DumpCmdRunning = FALSE;
} }
/* Link event */ /* Link event */
...@@ -1425,8 +1411,8 @@ static void sxg_complete_slow_send(struct adapter_t *adapter, int irq_context) ...@@ -1425,8 +1411,8 @@ static void sxg_complete_slow_send(struct adapter_t *adapter, int irq_context)
struct sxg_ring_info *XmtRingInfo = &adapter->XmtRingZeroInfo; struct sxg_ring_info *XmtRingInfo = &adapter->XmtRingZeroInfo;
u32 *ContextType; u32 *ContextType;
struct sxg_cmd *XmtCmd; struct sxg_cmd *XmtCmd;
unsigned long flags; unsigned long flags = 0;
unsigned long sgl_flags; unsigned long sgl_flags = 0;
unsigned int processed_count = 0; unsigned int processed_count = 0;
/* /*
...@@ -1476,8 +1462,6 @@ static void sxg_complete_slow_send(struct adapter_t *adapter, int irq_context) ...@@ -1476,8 +1462,6 @@ static void sxg_complete_slow_send(struct adapter_t *adapter, int irq_context)
TRACE_IMPORTANT, "DmSndCmp", skb, 0, TRACE_IMPORTANT, "DmSndCmp", skb, 0,
0, 0); 0, 0);
ASSERT(adapter->Stats.XmtQLen); ASSERT(adapter->Stats.XmtQLen);
adapter->Stats.XmtQLen--;/* within XmtZeroLock */
adapter->Stats.XmtOk++;
/* /*
* Now drop the lock and complete the send * Now drop the lock and complete the send
* back to Microsoft. We need to drop the lock * back to Microsoft. We need to drop the lock
...@@ -1614,7 +1598,7 @@ static struct sk_buff *sxg_slow_receive(struct adapter_t *adapter, ...@@ -1614,7 +1598,7 @@ static struct sk_buff *sxg_slow_receive(struct adapter_t *adapter,
RcvDataBufferHdr, Packet, Event->Length, 0); RcvDataBufferHdr, Packet, Event->Length, 0);
/* Lastly adjust the receive packet length. */ /* Lastly adjust the receive packet length. */
RcvDataBufferHdr->SxgDumbRcvPacket = NULL; RcvDataBufferHdr->SxgDumbRcvPacket = NULL;
RcvDataBufferHdr->PhysicalAddress = NULL; RcvDataBufferHdr->PhysicalAddress = (dma_addr_t)NULL;
SXG_ALLOCATE_RCV_PACKET(adapter, RcvDataBufferHdr, BufferSize); SXG_ALLOCATE_RCV_PACKET(adapter, RcvDataBufferHdr, BufferSize);
if (RcvDataBufferHdr->skb) if (RcvDataBufferHdr->skb)
{ {
...@@ -1628,7 +1612,8 @@ static struct sk_buff *sxg_slow_receive(struct adapter_t *adapter, ...@@ -1628,7 +1612,8 @@ static struct sk_buff *sxg_slow_receive(struct adapter_t *adapter,
drop: drop:
SXG_TRACE(TRACE_SXG, SxgTraceBuffer, TRACE_NOISY, "DropRcv", SXG_TRACE(TRACE_SXG, SxgTraceBuffer, TRACE_NOISY, "DropRcv",
RcvDataBufferHdr, Event->Length, 0, 0); RcvDataBufferHdr, Event->Length, 0, 0);
adapter->Stats.RcvDiscards++; adapter->stats.rx_dropped++;
// adapter->Stats.RcvDiscards++;
spin_lock(&adapter->RcvQLock); spin_lock(&adapter->RcvQLock);
SXG_FREE_RCV_DATA_BUFFER(adapter, RcvDataBufferHdr); SXG_FREE_RCV_DATA_BUFFER(adapter, RcvDataBufferHdr);
spin_unlock(&adapter->RcvQLock); spin_unlock(&adapter->RcvQLock);
...@@ -1649,7 +1634,7 @@ static void sxg_process_rcv_error(struct adapter_t *adapter, u32 ErrorStatus) ...@@ -1649,7 +1634,7 @@ static void sxg_process_rcv_error(struct adapter_t *adapter, u32 ErrorStatus)
{ {
u32 Error; u32 Error;
adapter->Stats.RcvErrors++; adapter->stats.rx_errors++;
if (ErrorStatus & SXG_RCV_STATUS_TRANSPORT_ERROR) { if (ErrorStatus & SXG_RCV_STATUS_TRANSPORT_ERROR) {
Error = ErrorStatus & SXG_RCV_STATUS_TRANSPORT_MASK; Error = ErrorStatus & SXG_RCV_STATUS_TRANSPORT_MASK;
...@@ -1713,6 +1698,7 @@ static void sxg_process_rcv_error(struct adapter_t *adapter, u32 ErrorStatus) ...@@ -1713,6 +1698,7 @@ static void sxg_process_rcv_error(struct adapter_t *adapter, u32 ErrorStatus)
} }
} }
#if 0 /* Find out if this code will be needed in future */
/* /*
* sxg_mac_filter * sxg_mac_filter
* *
...@@ -1789,7 +1775,7 @@ static bool sxg_mac_filter(struct adapter_t *adapter, ...@@ -1789,7 +1775,7 @@ static bool sxg_mac_filter(struct adapter_t *adapter,
adapter->Stats.RcvDiscards++; adapter->Stats.RcvDiscards++;
return (FALSE); return (FALSE);
} }
#endif
static int sxg_register_interrupt(struct adapter_t *adapter) static int sxg_register_interrupt(struct adapter_t *adapter)
{ {
if (!adapter->intrregistered) { if (!adapter->intrregistered) {
...@@ -2159,7 +2145,7 @@ static int sxg_transmit_packet(struct adapter_t *adapter, struct sk_buff *skb) ...@@ -2159,7 +2145,7 @@ static int sxg_transmit_packet(struct adapter_t *adapter, struct sk_buff *skb)
SXG_GET_SGL_BUFFER(adapter, SxgSgl, 0); SXG_GET_SGL_BUFFER(adapter, SxgSgl, 0);
if (!SxgSgl) { if (!SxgSgl) {
adapter->Stats.NoSglBuf++; adapter->Stats.NoSglBuf++;
adapter->Stats.XmtErrors++; adapter->stats.tx_errors++;
SXG_TRACE(TRACE_SXG, SxgTraceBuffer, TRACE_NOISY, "SndPktF1", SXG_TRACE(TRACE_SXG, SxgTraceBuffer, TRACE_NOISY, "SndPktF1",
adapter, skb, 0, 0); adapter, skb, 0, 0);
return (STATUS_RESOURCES); return (STATUS_RESOURCES);
...@@ -2243,9 +2229,7 @@ static int sxg_dumb_sgl(struct sxg_x64_sgl *pSgl, ...@@ -2243,9 +2229,7 @@ static int sxg_dumb_sgl(struct sxg_x64_sgl *pSgl,
SXG_TRACE(TRACE_SXG, SxgTraceBuffer, TRACE_NOISY, "DumbCmd", SXG_TRACE(TRACE_SXG, SxgTraceBuffer, TRACE_NOISY, "DumbCmd",
XmtCmd, XmtRingInfo->Head, XmtRingInfo->Tail, 0); XmtCmd, XmtRingInfo->Head, XmtRingInfo->Tail, 0);
/* Update stats */ /* Update stats */
adapter->Stats.DumbXmtPkts++;
adapter->stats.tx_packets++; adapter->stats.tx_packets++;
adapter->Stats.DumbXmtBytes += DataLength;
adapter->stats.tx_bytes += DataLength; adapter->stats.tx_bytes += DataLength;
#if XXXTODO /* Stats stuff */ #if XXXTODO /* Stats stuff */
if (SXG_MULTICAST_PACKET(EtherHdr)) { if (SXG_MULTICAST_PACKET(EtherHdr)) {
...@@ -2297,19 +2281,19 @@ static int sxg_dumb_sgl(struct sxg_x64_sgl *pSgl, ...@@ -2297,19 +2281,19 @@ static int sxg_dumb_sgl(struct sxg_x64_sgl *pSgl,
SXG_ABORT_CMD(XmtRingInfo); SXG_ABORT_CMD(XmtRingInfo);
} }
spin_unlock_irqrestore(&adapter->XmtZeroLock, flags); spin_unlock_irqrestore(&adapter->XmtZeroLock, flags);
return STATUS_FAILURE;
/* /*
* failsgl: * failsgl:
* Jump to this label if failure occurs before the * Jump to this label if failure occurs before the
* XmtZeroLock is grabbed * XmtZeroLock is grabbed
*/ */
adapter->Stats.XmtErrors++;
adapter->stats.tx_errors++; adapter->stats.tx_errors++;
SXG_TRACE(TRACE_SXG, SxgTraceBuffer, TRACE_IMPORTANT, "DumSGFal", SXG_TRACE(TRACE_SXG, SxgTraceBuffer, TRACE_IMPORTANT, "DumSGFal",
pSgl, SxgSgl, XmtRingInfo->Head, XmtRingInfo->Tail); pSgl, SxgSgl, XmtRingInfo->Head, XmtRingInfo->Tail);
/* SxgSgl->DumbPacket is the skb */ /* SxgSgl->DumbPacket is the skb */
// SXG_COMPLETE_DUMB_SEND(adapter, SxgSgl->DumbPacket); // SXG_COMPLETE_DUMB_SEND(adapter, SxgSgl->DumbPacket);
return STATUS_FAILURE;
} }
/* /*
...@@ -3204,7 +3188,6 @@ void sxg_unmap_resources(struct adapter_t *adapter) ...@@ -3204,7 +3188,6 @@ void sxg_unmap_resources(struct adapter_t *adapter)
void sxg_free_resources(struct adapter_t *adapter) void sxg_free_resources(struct adapter_t *adapter)
{ {
u32 RssIds, IsrCount; u32 RssIds, IsrCount;
u32 i;
struct net_device *netdev = adapter->netdev; struct net_device *netdev = adapter->netdev;
RssIds = SXG_RSS_CPU_COUNT(adapter); RssIds = SXG_RSS_CPU_COUNT(adapter);
IsrCount = adapter->MsiEnabled ? RssIds : 1; IsrCount = adapter->MsiEnabled ? RssIds : 1;
...@@ -3220,7 +3203,6 @@ void sxg_free_resources(struct adapter_t *adapter) ...@@ -3220,7 +3203,6 @@ void sxg_free_resources(struct adapter_t *adapter)
/* Free Irq */ /* Free Irq */
free_irq(adapter->netdev->irq, netdev); free_irq(adapter->netdev->irq, netdev);
if (!(IsListEmpty(&adapter->AllRcvBlocks))) { if (!(IsListEmpty(&adapter->AllRcvBlocks))) {
sxg_free_rcvblocks(adapter); sxg_free_rcvblocks(adapter);
} }
...@@ -3353,7 +3335,7 @@ static int sxg_allocate_buffer_memory(struct adapter_t *adapter, ...@@ -3353,7 +3335,7 @@ static int sxg_allocate_buffer_memory(struct adapter_t *adapter,
Buffer = pci_alloc_consistent(adapter->pcidev, Size, &pBuffer); Buffer = pci_alloc_consistent(adapter->pcidev, Size, &pBuffer);
else { else {
Buffer = kzalloc(Size, GFP_ATOMIC); Buffer = kzalloc(Size, GFP_ATOMIC);
pBuffer = NULL; pBuffer = (dma_addr_t)NULL;
} }
if (Buffer == NULL) { if (Buffer == NULL) {
/* /*
...@@ -3532,7 +3514,7 @@ static void sxg_allocate_sgl_buffer_complete(struct adapter_t *adapter, ...@@ -3532,7 +3514,7 @@ static void sxg_allocate_sgl_buffer_complete(struct adapter_t *adapter,
} }
static void sxg_adapter_set_hwaddr(struct adapter_t *adapter) static int sxg_adapter_set_hwaddr(struct adapter_t *adapter)
{ {
/* /*
* DBG_ERROR ("%s ENTER card->config_set[%x] port[%d] physport[%d] \ * DBG_ERROR ("%s ENTER card->config_set[%x] port[%d] physport[%d] \
...@@ -3576,6 +3558,7 @@ static void sxg_adapter_set_hwaddr(struct adapter_t *adapter) ...@@ -3576,6 +3558,7 @@ static void sxg_adapter_set_hwaddr(struct adapter_t *adapter)
/* DBG_ERROR ("%s EXIT port %d\n", __func__, adapter->port); */ /* DBG_ERROR ("%s EXIT port %d\n", __func__, adapter->port); */
sxg_dbg_macaddrs(adapter); sxg_dbg_macaddrs(adapter);
return 0;
} }
#if XXXTODO #if XXXTODO
...@@ -3933,7 +3916,8 @@ static void sxg_complete_descriptor_blocks(struct adapter_t *adapter, ...@@ -3933,7 +3916,8 @@ static void sxg_complete_descriptor_blocks(struct adapter_t *adapter,
void sxg_collect_statistics(struct adapter_t *adapter) void sxg_collect_statistics(struct adapter_t *adapter)
{ {
if(adapter->ucode_stats) if(adapter->ucode_stats)
WRITE_REG64(adapter, adapter->UcodeRegs[0].GetUcodeStats, adapter->pucode_stats, 0); WRITE_REG64(adapter, adapter->UcodeRegs[0].GetUcodeStats,
adapter->pucode_stats, 0);
adapter->stats.rx_fifo_errors = adapter->ucode_stats->ERDrops; adapter->stats.rx_fifo_errors = adapter->ucode_stats->ERDrops;
adapter->stats.rx_over_errors = adapter->ucode_stats->NBDrops; adapter->stats.rx_over_errors = adapter->ucode_stats->NBDrops;
adapter->stats.tx_fifo_errors = adapter->ucode_stats->XDrops; adapter->stats.tx_fifo_errors = adapter->ucode_stats->XDrops;
......
...@@ -54,52 +54,28 @@ extern char sxg_driver_name[]; ...@@ -54,52 +54,28 @@ extern char sxg_driver_name[];
*/ */
struct sxg_stats { struct sxg_stats {
/* Xmt */ /* Xmt */
u32 XmtNBL; /* Offload send NBL count */
u64 DumbXmtBytes; /* Dumbnic send bytes */
u64 SlowXmtBytes; /* Slowpath send bytes */
u64 FastXmtBytes; /* Fastpath send bytes */
u64 DumbXmtPkts; /* Dumbnic send packets */
u64 SlowXmtPkts; /* Slowpath send packets */
u64 FastXmtPkts; /* Fastpath send packets */
u64 DumbXmtUcastPkts; /* directed packets */ u64 DumbXmtUcastPkts; /* directed packets */
u64 DumbXmtMcastPkts; /* Multicast packets */ u64 DumbXmtMcastPkts; /* Multicast packets */
u64 DumbXmtBcastPkts; /* OID_GEN_BROADCAST_FRAMES_RCV */ u64 DumbXmtBcastPkts; /* OID_GEN_BROADCAST_FRAMES_RCV */
u64 DumbXmtUcastBytes; /* OID_GEN_DIRECTED_BYTES_XMIT */ u64 DumbXmtUcastBytes; /* OID_GEN_DIRECTED_BYTES_XMIT */
u64 DumbXmtMcastBytes; /* OID_GEN_MULTICAST_BYTES_XMIT */ u64 DumbXmtMcastBytes; /* OID_GEN_MULTICAST_BYTES_XMIT */
u64 DumbXmtBcastBytes; /* OID_GEN_BROADCAST_BYTES_XMIT */ u64 DumbXmtBcastBytes; /* OID_GEN_BROADCAST_BYTES_XMIT */
u64 XmtErrors; /* OID_GEN_XMIT_ERROR */
u64 XmtDiscards; /* OID_GEN_XMIT_DISCARDS */
u64 XmtOk; /* OID_GEN_XMIT_OK */
u64 XmtQLen; /* OID_GEN_TRANSMIT_QUEUE_LENGTH */ u64 XmtQLen; /* OID_GEN_TRANSMIT_QUEUE_LENGTH */
u64 XmtZeroFull; /* Transmit ring zero full */ u64 XmtZeroFull; /* Transmit ring zero full */
/* Rcv */ /* Rcv */
u32 RcvNBL; /* Offload recieve NBL count */
u64 DumbRcvBytes; /* dumbnic recv bytes */
u64 DumbRcvUcastBytes; /* OID_GEN_DIRECTED_BYTES_RCV */ u64 DumbRcvUcastBytes; /* OID_GEN_DIRECTED_BYTES_RCV */
u64 DumbRcvMcastBytes; /* OID_GEN_MULTICAST_BYTES_RCV */ u64 DumbRcvMcastBytes; /* OID_GEN_MULTICAST_BYTES_RCV */
u64 DumbRcvBcastBytes; /* OID_GEN_BROADCAST_BYTES_RCV */ u64 DumbRcvBcastBytes; /* OID_GEN_BROADCAST_BYTES_RCV */
u64 SlowRcvBytes; /* Slowpath recv bytes */
u64 FastRcvBytes; /* Fastpath recv bytes */
u64 DumbRcvPkts; /* OID_GEN_DIRECTED_FRAMES_RCV */
u64 DumbRcvTcpPkts; /* See SxgCollectStats */
u64 DumbRcvUcastPkts; /* directed packets */ u64 DumbRcvUcastPkts; /* directed packets */
u64 DumbRcvMcastPkts; /* Multicast packets */ u64 DumbRcvMcastPkts; /* Multicast packets */
u64 DumbRcvBcastPkts; /* OID_GEN_BROADCAST_FRAMES_RCV */ u64 DumbRcvBcastPkts; /* OID_GEN_BROADCAST_FRAMES_RCV */
u64 SlowRcvPkts; /* OID_GEN_DIRECTED_FRAMES_RCV */
u64 RcvErrors; /* OID_GEN_RCV_ERROR */
u64 RcvDiscards; /* OID_GEN_RCV_DISCARDS */
u64 RcvNoBuffer; /* OID_GEN_RCV_NO_BUFFER */
u64 PdqFull; /* Processed Data Queue Full */ u64 PdqFull; /* Processed Data Queue Full */
u64 EventRingFull; /* Event ring full */ u64 EventRingFull; /* Event ring full */
/* Verbose stats */ /* Verbose stats */
u64 MaxSends; /* Max sends outstanding */
u64 NoSglBuf; /* SGL buffer allocation failure */ u64 NoSglBuf; /* SGL buffer allocation failure */
u64 SglFail; /* NDIS SGL failure */
u64 SglAsync; /* NDIS SGL failure */
u64 NoMem; /* Memory allocation failure */ u64 NoMem; /* Memory allocation failure */
u64 NumInts; /* Interrupts */ u64 NumInts; /* Interrupts */
u64 FalseInts; /* Interrupt with ISR == 0 */ u64 FalseInts; /* Interrupt with ISR == 0 */
u64 XmtDrops; /* No sahara DRAM buffer for xmt */
/* Sahara receive status */ /* Sahara receive status */
u64 TransportCsum; /* SXG_RCV_STATUS_TRANSPORT_CSUM */ u64 TransportCsum; /* SXG_RCV_STATUS_TRANSPORT_CSUM */
u64 TransportUflow; /* SXG_RCV_STATUS_TRANSPORT_UFLOW */ u64 TransportUflow; /* SXG_RCV_STATUS_TRANSPORT_UFLOW */
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#define _SXG_DEBUG_H_ #define _SXG_DEBUG_H_
#define ATKDBG 1 #define ATKDBG 1
#define ATK_TRACE_ENABLED 1 #define ATK_TRACE_ENABLED 0
#define DBG_ERROR(n, args...) printk(KERN_WARNING n, ##args) #define DBG_ERROR(n, args...) printk(KERN_WARNING n, ##args)
......
...@@ -968,9 +968,9 @@ struct sxg_scatter_gather { ...@@ -968,9 +968,9 @@ struct sxg_scatter_gather {
sizeof(struct sxg_x64_sge))) sizeof(struct sxg_x64_sge)))
/* Force NDIS to give us it's own buffer so we can reformat to our own */ /* Force NDIS to give us it's own buffer so we can reformat to our own */
#define SXG_SGL_BUFFER(_SxgSgl) NULL //VSS change this value and test #define SXG_SGL_BUFFER(_SxgSgl) NULL
#define SXG_SGL_BUFFER_LENGTH(_SxgSgl) 0 //VSS change this value and test #define SXG_SGL_BUFFER_LENGTH(_SxgSgl) 0
#define SXG_SGL_BUF_SIZE 0 //VSS change this value and test #define SXG_SGL_BUF_SIZE 0
/* /*
#if defined(CONFIG_X86_64) #if defined(CONFIG_X86_64)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment