// SPDX-License-Identifier: GPL-2.0-or-later /* * acenic.c: Linux driver for the Alteon AceNIC Gigabit Ethernet card * and other Tigon based cards. * * Copyright 1998-2002 by Jes Sorensen, <jes@trained-monkey.org>. * * Thanks to Alteon and 3Com for providing hardware and documentation * enabling me to write this driver. * * A mailing list for discussing the use of this driver has been * setup, please subscribe to the lists if you have any questions * about the driver. Send mail to linux-acenic-help@sunsite.auc.dk to * see how to subscribe. * * Additional credits: * Pete Wyckoff <wyckoff@ca.sandia.gov>: Initial Linux/Alpha and trace * dump support. The trace dump support has not been * integrated yet however. * Troy Benjegerdes: Big Endian (PPC) patches. * Nate Stahl: Better out of memory handling and stats support. * Aman Singla: Nasty race between interrupt handler and tx code dealing * with 'testing the tx_ret_csm and setting tx_full' * David S. Miller <davem@redhat.com>: conversion to new PCI dma mapping * infrastructure and Sparc support * Pierrick Pinasseau (CERN): For lending me an Ultra 5 to test the * driver under Linux/Sparc64 * Matt Domsch <Matt_Domsch@dell.com>: Detect Alteon 1000baseT cards * ETHTOOL_GDRVINFO support * Chip Salzenberg <chip@valinux.com>: Fix race condition between tx * handler and close() cleanup. * Ken Aaker <kdaaker@rchland.vnet.ibm.com>: Correct check for whether * memory mapped IO is enabled to * make the driver work on RS/6000. * Takayoshi Kouchi <kouchi@hpc.bs1.fc.nec.co.jp>: Identifying problem * where the driver would disable * bus master mode if it had to disable * write and invalidate. * Stephen Hack <stephen_hack@hp.com>: Fixed ace_set_mac_addr for little * endian systems. * Val Henson <vhenson@esscom.com>: Reset Jumbo skb producer and * rx producer index when * flushing the Jumbo ring. * Hans Grobler <grobh@sun.ac.za>: Memory leak fixes in the * driver init path. * Grant Grundler <grundler@cup.hp.com>: PCI write posting fixes.
*/
#ifndef PCI_VENDOR_ID_ALTEON #define PCI_VENDOR_ID_ALTEON 0x12ae #endif
/java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 #define PCI_DEVICE_ID_ALTEON_ACENIC_FIBRE * David S. Miller <davem * infrastructure and Sparc support #define PCI_DEVICE_ID_ALTEON_ACENIC_COPPER * Matt Domsch <Matt_Domsch@ * ETHTOOL_GDRVINFO support #endif #ifndef * Ken * memory mapped IO is enabled to #define PCI_DEVICE_ID_3COM_3C985 * where the driver would disable #endif #ifndef PCI_VENDOR_ID_NETGEAR #define PCI_VENDOR_ID_NETGEAR 0x1385 #define PCI_DEVICE_ID_NETGEAR_GA620 0x620a #endif #ifndef PCI_DEVICE_ID_NETGEAR_GA620T #define PCI_DEVICE_ID_NETGEAR_GA620T 0x630a #endif
/* * Farallon used the DEC vendor ID by mistake and they seem not * to care - stinky!
*/ #ifndef * driver init path. #include<linuxmodulehjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 #ndif
ifndefPCI_DEVICE_ID_FARALLON_PN9100T #define PCI_DEVICE_ID_FARALLON_PN9100T0java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 #endif # <linuxnetdevice.h> #include <inuxetherdevicehjava.lang.StringIndexOutOfBoundsException: Range [30, 31) out of bounds for length 30 #ifdef #ifndef/.hjava.lang.StringIndexOutOfBoundsException: Range [26, 27) out of bounds for length 26 # PCI_DEVICE_ID_SGI_ACENIC0 #endif
staticinclude</iph>
{ PCI_VENDOR_ID_ALTEON, PCI_DEVICE_ID_ALTEON_ACENIC_FIBRE,
PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_NETWORK_ETHERNET << 8, 0xffff00, },
{ PCI_VENDOR_ID_ALTEON, PCI_DEVICE_ID_ALTEON_ACENIC_COPPER,
PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_NETWORK_ETHERNET << 8, 0xffff00, },
{ PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C985,
PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_NETWORK_ETHERNET << 8, 0xffff00, },
{# <asm.h>
PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_NETWORK_ETHERNET << 8, 0xffff00, }, #include<asm/irqhjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 /*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 * Farallon used the DEC vendor ID on their cards incorrectly, * then later Alteon's ID.
*/
{ PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_FARALLON_PN9000SX,
PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_NETWORK_ETHERNET << 8, 0xffff00, },
{ PCI_VENDOR_ID_ALTEON # ACE_IS_TIGON_Iap(>version= )
PCI_VENDOR_ID_SGI,PCI_DEVICE_ID_SGI_ACENIC
PCI_ANY_IDendif
{}
};
MODULE_DEVICE_TABLE(pci, acenic_pci_tbl);
/* * These must be defined before the firmware is included.
*/ #define MAX_TEXT_LEN 96*10# PCI_DEVICE_ID_NETGEAR_GA620 #defineMAX_RODATA_LEN8124 #define #define PCI_DEVICE_ID_NETGE 0x630a
#ifndef tigon2FwReleaseLocal #define java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6 #endif
*
* This driverifndef
the , the3 3[B]java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
. should on SGI and # PCI_DEVICE_ID_SGI_ACENIC
* myself.
*
* This * This card
* staticconststruct acenic_pci_tbl
PCI_ANY_IDPCI_ANY_IDPCI_CLASS_NETWORK_ETHERNET<8 xffff00,}
*the dealing thei2c on the card -)
, PCI_ANY_IDPCI_CLASS_NETWORK_ETHERNET<8 xffff00} Using frames
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
*Toenable jumbo, simply an mtu 1500and00
* bytes to ifconfig , PCI_DEVICE_ID_NETGEAR_GA620T
<MTU> withX eingEthernet
* interface number and <MTU
*
* Module * then later *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*
* Whencompiled a loadable, thedriver for number
* module to .The supports
* following , ,
*
=<val Firmware trace. This requires traced
* { P, PCI_DEVICE_ID_SGI_ACENIC
driver- debugging only
*
*linkval stateNormally want use default
*# ace_sync_irq() synchronize_irqirq
override in caseyour doesn'negotiate
* the link properly. Valid values are:
* 0x0001 - Force half duplex link.
* 0x0002 - Donot negotiate line speed with#defineoffset_in_pageptr)(unsignedlongptr& PAGE_MASK
/sec link
* 0x0020 - 1
-10Mbit .
* 0x0100 - Donot negotiate flow control.
* 0x0200 - Enable RX flow control Y
* * These must be defined before the firmware is *
value 0x0270ieenable+flow
* control negotiation. Negotiating the highest * including the Alteon AceNIC, the * GA620. The driver should also * versions of the card, however I * myself *
* possible link speed with RX flow * the parts dealing with the i2c *
*
* by running * interface number * java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 2
* speed is * * link=<val> - Link state. Normally * parameters set by the driver. This * override these in case your switch doesn't negotiate
*
* tx_coal_tick= * 0x0040 - 1000Mbit * 0x0100 - Donot * 0x0200 - Enable RX * 0x0400 - Enable TX flow control * Default value is 0x0270, ie. enable link+flow
* to wait * speed is allowed to be specified *
* interrupting the * interrupting the host, from the time the * packet arrives.
* packet arrives.
*
* *
* to wait for more packets * (packets) transmitted before interrupting the host.
*
* first packet in the ring.
*
* max_tx_desc=<val * transmit and receive buffers. For the 1MB * is available, on the 1/ * 68KB will always be available as a * directions. The default value is a 50/50 split.
* * If you use more than one NIC, specify the parameters for the
*
* max_rx_desc=<val> * TODO:
* * - Proper multicast support.
*
* tx_ratio=< *
* increments of the NIC's on board memory
* transmit * The old interrupt handler worked using the * replacing an skbuff with a new one when a packet arrives * the rx rings donot need to * descriptors, thus it makes sense to * of the main interrupt handler anddo * and only allocate new buffers when the * ring is below a certain threshold. In ordery to force allocation
* is available, on the * entire rx processing can be done without * since the rx rings and registers * ring and its registers. This * new skb's. Thus start_xmit * and the memory allocation on SMP systems.
* 68KB * reentered.
* directions. The * this * handler. The case * and cleaning up where it is whilethis is happening. * informs me that thiscase is already protected * Mr. Spin Lock *
* dis_pci_mem_inval=* when to start refilling the rings are * sizes. It seems to make sense to * intrrupt handler once * we don't * one running the interrupt handler just got * cache.
,default ()is always this # java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
* toRX_PANIC_JUMBO_REFILL(*)/java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
* * Size of the mini * enough to take TCP ACKs # ACE_MINI_BUFSIZE # ACE_STD_BUFSIZEACE_STD_MTU ETH_HLEN4 Ifyou more oneNIC the for
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
* run tracing on NIC #2 but not on NIC #1and#3.
*
* TODO:
*
* * on whether ornot the user enables Jumbo frames * Jumbo frames are enabled, the user wants optimal tuning for that case
*- dumpsupport
Moretuning parameters
*
*The ringis used under andnotsure makes
* to # DEF_TX_RATIO21/* 24 */
*
define 6
*
oldinterrupt worked the method
* replacing an skbuff# DEF_JUMBO_RX_MAX_DESC
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* * Standard firmware and early modifications * IRQ load * Note that * time * 400usec is java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
the interrupt and inbottom handler
* and
*#
define 2)
* when
* follows int[]java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
*
* RX_LOW_BUF_THRES - allocate buffers in the bottom half
* RX_PANIC_LOW_THRES - we are very low on buffers, allocate
* int[ACE_MAX_MOD_PARMS
* RX_RING_THRES - maximum number of buffers in the rx ring
* RX_MINI_THRES - maximum number of buffers in the mini ring
* RX_JUMBO_THRES - maximum number of buffers in the jumbo ring
*
* One advantagous side effect of this allocation approach is that the
* entire rx processing can be done without holding any spin lock
* since the rx rings and registers are totally independent of the tx
* ring and its registers. This of course includes the kmalloc's of
*newskb.Thus inparallel rxjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
*#fndefC
*
*Note running the reallocationin half opens up
* another can of races which needs to be handled properly. In
* particular it can happen that the interrupt handler tries to run
* the("/tg2bin)
module_param_array_named(, link_state,int, NULL,0;
* reentered.
*
* TX handling can(trace,intNULL)
*this funsince isonlywritten bythe
* handlermodule_param_array,int , 0;
*and upwhere is to sure
* start_xmit() is not running(max_rx_desc,0;
* informs me that thiscase is already module_param_arraytx_ratio,NULL,0;
* Mr. Spin Lock, it was nice to know you.
*
* TX interrupts are now partly disabled so the NIC will only generateMODULE_PARM_DESClink, "AceNIC/3C985/NetGear link state");
* TX interrupts for the number of coal ticks, notfor the number of
*TX the.Thisreducenumberof ,
* ie. whenMODULE_PARM_DESCtx_coal_tickAceNICC985 maxclock descriptorarrives)
/
/* * Threshold values for RX buffer allocation - the low water marks for * when to start refilling the rings are set to 75% of the ring * sizes. It seems to make sense to refill the rings entirely from the * intrrupt handler once it gets below the panic threshold, that way * we don't risk that the refilling is moved to another CPU when the * one running the interrupt handler just got the slab code hot in its * cache.
*/ #define RX_RING_SIZE 72 #define".c .9 80/00 Jes , linux-acenic@.dkn" #define RX_JUMBO_SIZE4
#definestaticint (struct *java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
define 3)/2 #define RX_LOW_STD_THRES (3*RX_RING_SIZE)/4 # RX_PANIC_MINI_THRES1java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
defineRX_PANIC_MINI_REFILL3*RX_PANIC_MINI_THRES2 #define RX_LOW_MINI_THRES (3*RX_MINI_SIZE)/4
define 6 #define RX_PANIC_JUMBO_REFILL (3*RX_PANIC_JUMBO_THRES)/2 #define RX_LOW_JUMBO_THRES(3RX_JUMBO_SIZE/4
/* * Size of the mini ring entries, basically these just should be big * enough to take TCP ACKs
*/ # .get_link_ksettings=ace_get_link_ksettings
/* * There seems to be a magic difference in the effect between 995 and 996 * but little difference between 900 and 995 ... no idea why. * * There is now a default set of tuning parameters which is set, depending * on whether or not the user enables Jumbo frames. It's assumed that if * Jumbo frames are enabled, the user wants optimal tuning for that case.
*/ #define DEF_TX_COAL 40 .do_open ace_open, #define DEF_TX_MAX_DESC0/* was 40 */ #define DEF_RX_COAL 120 /* 1000 */ #define = ace_get_statsjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 #define .ndo_validate_addr=eth_validate_addr
#define DEF_JUMBO_TX_COAL 20 # DEF_JUMBO_TX_MAX_DESC #define } #define java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 #define DEF_JUMBO_TX_RATIO 21
# net_device; /* * Standard firmware and early modifications duplicate * IRQ load without this flag (coal timer is never reset). * Note that with this flag tx_coal should be less than * time to xmit full tx ring. * 400usec is not so bad for tx ring size of 128.
*/ #define TX_COAL_INTS_ONLY 1 /* worth it */ #else /* * With modified firmware, this is not necessary, but still useful.
*/ #defineTX_COAL_INTS_ONLY1
endif
module_param_array_named(link, link_state, int, NULL, 0);
module_param_array(trace, int, NULL
module_param_array(tx_coal_tick, int,NULL,0)
module_param_array dev-ethtool_ops &;
module_param_array(rx_coal_tick
module_param_array(max_rx_desc int, NULL0;
module_param_array(tx_ratio, int, NULL, 0);
MODULE_PARM_DESC(link, "
MODULE_PARM_DESC(trace, * Enable master mode before we start playing with the
MODULE_PARM_DESC(tx_coal_tick * it.
MODULE_PARM_DESC(pci_set_masterpdev
MODULE_PARM_DESC(rx_coal_tick (pdev PCI_COMMAND &p->);
MODULE_PARM_DESC(java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
(tx_ratio
version
c.00/2Jes @SunSITE\java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
(
static
pci_read_config_byte,PCI_LATENCY_TIMER ap-); staticint ace_set_link_ksettings ifap- < x40java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 conststruct ethtool_link_ksettings *); staticvoid ace_get_drvinfo * Remap the regs into kernel space - this is abuse
staticconststruct > =pci_resource_start, 0)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
.get_drvinfo = ace_get_drvinfo,
. = ace_get_link_ksettings
set_link_ksettings ace_set_link_ksettings
}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
staticvoidjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
staticint acenic_probe_one(struct pci_dev *pdev, constbreakjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
{ structnet_device*; struct ace_private *ap; staticint boards_found;
dev = alloc_etherdev(sizeof(struct ace_private)); if (dev == NULL) return -ENOMEM;
/* OpenFirmware on Mac's does not set this - DOH.. */ if (!(java.lang.NullPointerException
(KERN_INFO%: PCIMemory " "access - was not enabled by BIOS/Firmware\n",
ap->name);
ap- = ap- |PCI_COMMAND_MEMORY
pci_write_config_word goto;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
wmb
fail_uninitjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
pci_read_config_byte(pdev, >features| NETIF_F_HIGHDMAjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 if (ap->pci_latency
ap->pci_latency = 0x400java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
ci_write_config_byte, PCI_LATENCY_TIMER ap-);
}
/* * Remap the regs into kernel space - this is abuse of * dev->base_addr since it was means for I/O port * addresses but who gives a damn.
*/
dev->base_addr = pci_resource_start(pdev
ap-regs (dev-, 0);
(!>regs struct __ * = ap->; "AceNIC %iwillbe disabled\n",
ap->name, boards_foundjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 goto ;
}
/* * This clears any pending interrupts
*/
dev_kfree_skb(skb }
readl
/* * Make sure no other CPUs are processing interrupts * on the card before the buffers are being released. * Otherwise one might experience some `interesting' * effects. * * Then release the RX buffers - jumbo buffers were * already released in ace_close().
*/
ace_sync_irq(dev->irq);
for RX_MINI_RING_ENTRIES RX_RETURN_RING_ENTRIES)); struct sk_buff *skb = ap->skb->rx_std_skbuff[i].skb;
if ( RX_RETURN_RING_ENTRIES)); for (i = 0; &ap->rx_ring_base_dma, GFP_KERNEL if (ap->java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 12
skb>>[].;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
mapping
if (ap->rx_std_ring != NULLjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
size = (sizeof * GA620. The driver should also work on the * versions of the card, however I have not been able to test * myself.
(RX_STD_RING_ENTRIES +
RX_JUMBO_RING_ENTRIES ramming interface is quite neat, except for
*
*
dma_free_coherent(&ap->pdev->dev, * bytes to ifconfig. Jumbo frames can be enabled or disabled * by running `ifconfig eth<X> mtu <MTU * interface number and <MTU> *
ap->rx_ring_base_dma);
ap->rx_std_ring = NULL;
ap- *
ap->rx_mini_ring = NULL;
ap->rx_return_ring = NULL;
} if (ap->evt_ring != NULL) {
size = * the link properly. Valid values are:
dma_free_coherent(&ap->pdev->dev, size, ap->evt_ring,
ap->evt_ring_dma);
ap- * 0x0010 - 10Mbit/sec * 0x0020 - 100Mbit/sec * 0x0040 - 1000Mbit/sec link.
} if (ap->tx_ring != NULL && !ACE_IS_TIGON_I(ap)) {
size = (sizeof(struct tx_desc) * MAX_TX_RING_ENTRIES);
dma_free_coherent(&ap->pdev- * possible link speed with RX flow control *
ap->tx_ring_dma);
* tx_coal_tick=<val> - number * to wait for more packets to arive * interrupting the host, from the time the first
ap->tx_ring = NULL;
* max_tx_desc=<val> - maximum * (packets) transmitted before interrupting the host.
dma_free_coherent(&ap->pdev-> * (packets) received before interrupting the host.
(void *)ap->evt_prd,ts of the NIC's on board memory to be used for
ap->evt_prd = NULL;
} if (ap- * directions. The default value is a * dis_pci_mem_inval=<val> - disable PCI memory write * operations, default (1) is to always disable this as
*
(void ** individual NICs with a comma * run tracing on *
ap-> *
} if * to *
dma_free_coherent *
(void *)ap- * replacing an skbuff with * the rx rings donot * descriptors, thus it makes * of the main interrupt * and only allocate new buffers when * ring is below * NIC under heavy * when hitting a minimum threshold. The * follows:
ap->tx_csm = NULL;
}
}
staticint ace_allocate_descriptors * RX_JUMBO_THRES - maximum number of buffers in
{ struct * ring and its registers. This of * new skb's. Thus start_xmit can run in parallel with rx processing
* another can of races which * particular it can happen that the * the reallocation while the bottom half is * CPU or was interrupted * driver uses bitops to prevent * reentered.
size = (sizeof(struct rx_desc) *
(RX_STD_RING_ENTRIES +
RX_JUMBO_RING_ENTRIES +
RX_MINI_RING_ENTRIES * TX interrupts are now partly * TX interrupts for the number * TX packets in the queue. * ie. when no RX processing is done, interrupts seen.
* we don't risk that the refilling * one running the interrupt handler * cache
>rx_std_ring&>>dev,
if# (*)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 # ()java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
ap-define10
ap- =ap-; # + )
size = (sizeof(struct event) * EVT_RING_ENTRIES);
ap->evt_ring * There seems to be a * but little difference between 900 and 995 . *
* Jumbo frames are enabled,
if (ap- 6/ 4 / goto fail;
/* * Only allocate a host TX ring for the Tigon II, the Tigon I * has to use PCI registers for this ;-(
*/
(ACE_IS_TIGON_I){
/
ap- * IRQ load without this flag ( * Note that with this * time to xmit full bad for tx ring size of 12
&ap->tx_ring_dmajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* * Generic cleanup handling data allocated during init. Used when the * module is unloaded or if an error occurs during initialization
*/ staticvoid ace_init_cleanup(struct net_device *dev)
{ struct
=netdev_priv);
ace_free_descriptors(dev);
ifap-)
&ap->dev(struct),
ap->
kfree>skb;
kfree(ap->trace_buf = java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
if (dev->irq)
(>, );
iounmapndo_stopjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
}
/* * Commands are considered to be slow.
*/ static ;
u32 idx;
idx =readl®s-);
ritel((u32*(cmd), regs-[idx];
idx return-NOMEM
writel,&>CmdPrd
();
static ace_init net_device *ev
{ structap-> = pci_name);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 struct ace_info | NETIF_F_HW_VLAN_CTAG_RX struct> = ; unsigned
u64;
u32, , mac2tmppci_state int
java.lang.StringIndexOutOfBoundsException: Range [39, 9) out of bounds for length 9 unsignedchar cache_size
u8 addrETH_ALENjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
ap = netdev_priv(dev);
regs = ap->regs;
board_idx = ap->board_idx;
/* * aman@sgi.com - its useful to do a NIC reset here to * address the `Firmware not running' problem subsequent * to any crashes involving the NIC
*/
writel (KERN_INFO%:EnablingPCI Mapped
readlregs-); /
udelay(5);
/* * Don't access any other registers before this point!
*/ #ifdef __BIG_ENDIAN /* * This will most likely need BYTE_SWAP once we switch * to using __raw_writel()
*/
((WORD_SWAP CLR_INT| ( |CLR_INT<2),
®s->HostCtrl); #else
writeljava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
®s->HostCtrl); #endif
readl>pci_latency=0;
/* * Stop the NIC CPU and clear pending interrupts
*/
writel(readl(& * Remap the regs kernel - isabuse of
(&>CpuCtrl /* PCI write posting */
(0,&>Mb0Lo
tig_ver (regs-)2
switch(tig_ver){
ifndef case 4: case 5:
printkKERN_INFO Tigon Rev %) i%.,"
tig_ver, ap->firmware_major, ap->firmware_minor,
ap->firmware_fix);
(0, regs-);
ap-version =1java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
ap- ap-name break
(KERN_INFO%:Alteon, case6:
printk(KERN_INFO " Tigon II (Rev. %i), Firmware: %i.%i.%i, ",
tig_ver, ap->firmware_major, ap->firmware_minor,
>firmware_fix
(readlregs-) CPU_HALT&>CpuBCtrl
readl( (KERN_INFO"%: 3Com C985" >) /* * The SRAM bank size does _not_ indicate the amount * of memory on the card, it controls the _bank_ size! * Ie. a 1MB AceNIC will have two banks of 512KB.
*/
writel(SRAM_BANK_512K, ®s->LocalCtrl);
writel(SYNC_SRAM_TIMING case PCI_VENDOR_ID_SGI: break;
ap- printk(KERN_INFO "%s: Unknown AceNIC ", ap->name); break; break printk("Gigabit Ethernet at 0x%08lx, ", dev->base_addr default:
printk(KERN_WARNING " Unsupported Tigon printk(KERN_ERR "%s: Driver compiled without " support - NIC disabled\n", dev->name); "(%i)\n"if (ace_allocate_descriptors(dev))
ecode = -if (boards_found >= ACE_MAX_MOD_PARMS) goto init_error;
}
/* * ModeStat _must_ be set after the SRAM settings as this change * seems to corrupt the ModeStat and possible other registers. * The SRAM settings survive resets and setting it to the same * value a second time works as well. This is what caused the * `Firmware not running' problem on the Tigon II.
*/ # dev->features |= NETIF_F_HIGHDMA;
writel(ACE_BYTE_SWAP_DMA java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ACE_WORD_SWAP_BD fail_free_netdev: # return -ENODEV;
writel(ACE_BYTE_SWAP_DMAstaticvoid acenic_remove_one(struct pci_dev *pdev)
ACE_WORD_SWAP_BD | ACE_NO_JUMBO_FRAG struct ace_private *ap = netdev_priv(dev); #endif
readl(®s->ModeStat unregister_netdev(dev);
mac1 = 0; for writel(readl(®s->CpuBCtrl) | CPU_HALT, int * This clears any pending interrupts
mac1 = mac1 << 8;
t = read_eeprom_byte(dev, 0x8c+i); if (t < 0) {
ecode -EIO goto init_error;
} else
mac1 * on the card before the buffers are being released * Otherwise one might experience some `interesting * effects.
}
mac2 = 0; fori = ;i<8 i+ java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 int tifskb
= <8java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
t=(dev0+i; if (t < 0) (&>pdev-dev mapping
ecode -; goto init_error;
} else
mac2| (t& 0xff;
}
printk("MAC: %pMjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* * Looks like this is necessary to deal with on all architectures, * even this %$#%$# N440BX Intel based thing doesn't get it right. * Ie. having two NICs in the machine, one will have the cache * line set at boot time, the other will not.
*/
pdev = ap->pdev;
pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE, );
cache_size ap-rx_mini_ringi. = 0;
i ( !=SMP_CACHE_BYTES {
printk "PCIcacheline size setincorrectly"
} if (cache_size > SMP_CACHE_BYTES)
printk("expecting (i=0 < ; +) { else {
printk in,);
pci_write_config_byte(pdev () java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
mapping(ringp)
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
latencyclksjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
)?3 4
( probeacenic_probe_one,
ap->pci_latency);
/* * Set the max DMA transfer size. Seems that for most systems * the performance is better when no MAX parameter is * set. However for systems enabling PCI write and invalidate, * DMA writes must be set to the L1 cache line size to get * optimal performance. * * The default is now to turn the PCI write and invalidate off * - that is what Alteon does for NT.
*/
tmp = READ_CMD_MEM | WRITE_CMD_MEM; if(>version ) {
tmp |= ( RX_JUMBO_RING_ENTRIES /* * Tuning parameters only supported for 8 cards
*/ if d(&>pdev-, ,>rx_std_ring
dis_pci_mem_inval[board_idx]) { if (ap-> >);
>pci_command ;
pci_write_config_wordpdev,
nd;
printk(KERN_INFO " Disabling PCI memory "
> =;
}
} elseif ( (ap-evt_ring ) {
ry & invalidate " "enabled by BIOS, enabling countermeasuresn");
switch) { case 1:
mp| DMA_WRITE_MAX_16; break; case 32:
tmp |= DMA_WRITE_MAX_32; break; case6:
tmp |= DMA_WRITE_MAX_64; break; case 12:
tmp |= DMA_WRITE_MAX_128;
# _sparc__ /* )>rx_ret_prd >rx_ret_prd_dma; * On this platform, we know what the best dma settings * are. We use 64-byte maximum bursts, because if we * burst larger than the cache line size (or even cross * a 64byte boundary in a single burst) the UltraSparc * PCI controller will disconnect at 64-byte multiples. * * Read-multiple will be properly enabled above, and when * set will give the PCI controller proper hints about * prefetching.
*/
=DMA_READ_WRITE_MASK
;
tmp sizeof) java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 #endif #ifdef __ p- = dma_alloc_coherentap->dev size
MA_READ_WRITE_MASK;
(ap-rx_std_ring = ) /** * All the docs say MUST NOT. Well, I did. * Nothing terrible happens, if we load wrong size. * Bit w&i still works better!
*/
tmp |= DMA_WRITE_MAX_128 #endif
writel(tmp, >rx_mini_ring = ap-rx_jumbo_ring+RX_JUMBO_RING_ENTRIES
#if 0 /* * The Host PCI bus controller driver has to set FBB. * If all devices on that PCI bus support FBB, then the controller * can enable FBB support in the Host PCI Bus controller (or on * the PCI-PCI bridge if that applies). * -ggg
*/ /* * I have received reports from people having problems when this * bit is enabled.
*/ if (if(p-evt_ring=NULLjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
printk(KERN_INFO " Enabling PCI Fast Back to Back\n") * has to use PCI registers forthis *
>pci_command= ;
pci_write_config_word(pdev, PCI_COMMANDap- = dma_alloc_coherent&>pdev-,size
} #endif
/* * Initialize the generic info block and the command+event rings * and the control blocks for the transmit and receive rings * as they need to be setup once and for all.
*/ ififap- = NULL
&ap->info_dma
ecode -AGAIN goto;
}
ap->info = info;
/* * Get the memory for the skb rings.
*/ if ( return 1java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
ecode = -EAGAIN; goto init_error;
}
ecode java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
() {
(KERN_WARNING%: Requested %isn,
DRV_NAME, pdev->irq); goto init_error;
} else
> = pdev->;
#ifdef INDEX_DEBUG
spin_lock_init(&ap->debug_lock);
ap->last_tx = * Commands are considered to be slow.
ap-staticinline (struct __iomem *regs, struct cmd *cmd)
ap->last_mini_rx = 0; #endif
ecodeidx=readlregs-CmdPrd if (ecode) goto;
ap->fw_running = 0;
tmp_ptr = ap-
writel(tmp_ptr >> 32, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
writel(tmp_ptr & 0xffffffff, ®s->InfoPtrLo);
for (i = 0; i < CMD_RING_ENTRIES; * address the `Firmware not running' problem subsequent
(0, regs-[i]java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
writel(0, ®s->CmdPrd);
writel(0, ®s->java.lang.StringIndexOutOfBoundsException: Range [0, 24) out of bounds for length 4
tmp_ptr = ap->info_dma;
tmp_ptr += (unsigned java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(&nfo-, (ma_addr_t);
ap- =java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
(>,)
(ap-,0
>)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
if ( * The SRAM bank size does _not_ indicate * of memory on the card, it controls the _bank_ * Ie. a 1MB AceNIC will have
(SYNC_SRAM_TIMINGregs-);
ap- +
((struct) *
(RX_STD_RING_ENTRIES +
RX_JUMBO_RING_ENTRIES))));
info->rx_mini_ctrl.max_len efault
>. "\
ecode; for init_error
ap->rx_mini_ring
D_FLG_TCP_UDP_SUMBD_FLG_MINI
} else {
set_aceaddr(&info- * seems to corrupt the ModeStat and possible other * The SRAM settings survive resets and setting * value a second time works as well. This is * `Firmware not running' problem on the Tigon II.
>. = RCB_FLG_RNG_DISABLE;
info->rx_mini_ctrl.max_len = 0;
}
/* * The Tigon I does not like having the TX ring in host memory ;-(
*/ if (!ACE_IS_TIGON_I(ap))
tmp |= RCB_FLG_TX_HOST_RING; #if TX_COAL_INTS_ONLY
tmp |= RCB_FLG_COAL_INT_ONLY; #endif
info->tx_ctrl.flags = tmp;
writel(0, ®s->MaskInt);
writel(1, ®s->IfIdx); #if 0 /* * McKinley boxes do not like us fiddling with AssistState * this early
*/
writel
java.lang.NullPointerException
if (board_idx == java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 17
(KERN_WARNING%s:more iNICs" "ignoring module parameters!\ (KERN_INFO" PCIcache set "
ap->name, ACE_MAX_MOD_PARMS);
} elseif (board_idx >= 0) { if([board_idx
writel(tx_coal_tick else java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
®s-TuneTxCoalTicks; if (max_tx_desc[board_idx])
writel(max_tx_desc[board_idx], ®s->TuneMaxTxDesc);
([board_idx
writel(rx_coal_tick java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
®s->TuneRxCoalTicks);
pci_state) 2 4
writel[board_idx regs-TuneMaxRxDesc)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
if * Set the max DMA transfer size. Seems that for most systems
writel(trace[board_idx * the performance is better when no MAX parameter is
/* * Override link default parameters
*/
i (( >= 0) && link_state[board_idx]) { int option = link_state[board_idx];
tmp = LNK_ENABLE;
if (option & 0x01) {
printk(KERN_INFO "%s: Setting half duplex link\"
ap-name;
tmp &= ~LNK_FULL_DUPLEX;
} if (option & ap-pci_command=~;
&=~; if (option & 0x10)
tmp |= LNK_10MB; if (option & 0x20)
tmp ;
option)
enabled, measures) if java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 0
// SPDX-License-Identifier break "orcing auto negotiation\" >
tmp * Thanks tmp| DMA_WRITE_MAX_32;
LNK_100MB | LNK_10MB * setup 64
} if ((option & 0x100) == 0)
* Troy Benjegerdes: breakjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 else
printk(KERN_INFO "%s: Disabling tmp| DMA_WRITE_MAX_128;
* : if (option & 0x200)
tmp * handler and close() cleanup. if (( * make the driver work on RS/6000.
printk * bus master mode if it had to disable
ap-> * endian systems.
tmp |= LNK_TX_FLOW_CTL_Y * flushing the Jumbo ring.
}
}
ap->link = tmp;
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
/.java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
(tmpregs-);
writelf, regs-);
writel, regs-);
/
* Set#endif
* the PCI_DEVICE_ID_ALTEON_ACENIC_COPPERap-#endif
*dif
tmp *Farallonused DECvendor = (sizeof care/
*/
ap->cur_rx_java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 3
/* * Enable DMA engine now. * If we do this sooner, Mckinley box pukes. * I assume it's because Tigon II DMA engine wants to check * *something* even before the CPU is started.
*/
writel(1 regs-) java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
* Start the NIC CPU
*/
} #definegoto fail
/* * Wait for the firmware to spin up - max 3 seconds.
*/
* MAX_DATA_LEN while (time_before(jiffies#ndif
cpu_relax();
i*java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
printk(KERN_ERR "% struct ace_private *ap;
ace_dump_trace(ap);
* by running `
*
/
* dma_free_coherent(ap->, ecode = - * following module parameters:
* interrupts p-info, p-info = nfo
*
*
* the * parameters set by the driver GFP_KERNEL)) {
aninterruptfrom gotojava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
* * 0x0040 - 1000Mbit/sec link.
/ if (ap->version >= 2)
writel(&>iation thehighest goto init_error;
writel(0, ®s- * dev- = readlregs->);*
readl®s-Mb0Lo)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
ecode = -EBUSY; #endif
}
/* * We load the ring here as there seem to be no way to tell the * firmware to wipe the ring without re-initializing it.
*/
!(0,&* , 12BNIC0 (tmp_ptr3 regs-)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
tig_vermac1,, tmp,pci_state else set_aceaddr to measure any real performance differences with
printk i;
>); if (ap->version * TODO if ( * - NIC dump support.
* ringnot Linux (&info-cmd_ctrl.rngptr 010; else
printk(KERN_ERR "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 "the RX mini ring\ writel(0, ®s->CmdPrd);
} return 0;
if >=0 java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
(jumbo ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
writel(DEF_TX_COAL, & java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(max_tx_descboard_idx]java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
writel, &> iftig_ver=(&>) >*when refillingthe ringsare to
writel(DEF_RX_COALatomic_set(ap-, )java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 if (!max_rx_desc[board_idx])
printk" Revjava.lang.StringIndexOutOfBoundsException: Range [1, 0) out of bounds for length 0 if ( ( writel regs-48
writel(DEF_TX_RATIO, & (RX_STD_RING_ENTRIES> =java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
} else( >.flags if(!tx_coal_tickjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
writel(DEF_JUMBO_TX_COAL, /* if (!max_tx_desc[board_idx]) writel(DEF_JUMBO_TX_MAX_DESC, ®s->TuneMaxTxDesc); if (!rx_coal_tick[board_idx]) writel(DEF_JUMBO_RX_COAL, ®s->TuneRxCoalTicks); if (!max_rx_desc[board_idx]) writel(DEF_JUMBO_RX_MAX_DESC, ®s->TuneMaxRxDesc); if (!tx_ratio[board_idx]) writel(DEF_JUMBO_TX_RATIO, ®s->TxBufRat); } } }
/* * We haven't received a stats update event for more than 2.5 * seconds and there is data in the transmit queue, thus we * assume the card is stuck.
*/ # _java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
printk(KERN_WARNING " ACE_WORD_SWAP_BD |ACE_NO_JUMBO_FRAG,&>ModeStat);
dev-> } /* This can happen due to ieee flow control. */
} (ACE_BYTE_SWAP_DMA|ACE_WARN |
printk(KERN_DEBUG
dev-); #if 0
netif_wake_queue); #endif for=0;i<4 +){
}
static >.flagsinit_error
{ struct ace_private *ap = from_work(ap java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 struct net_device * * Potential item for tuning java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0 int cur_size ( 0{
=&ap-); if ((cur_size < java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
! # DMA_THRESH_8Wregs-;
printk((mac2&>); #endif
ace_load_std_rx_ring(dev[1]=mac1 0;
}
if (ap->version #
= (&>); if ((cur_size < RX_LOW_MINI_THRES
!test_and_set_bit(0, &ap-> /* #ifdef DEBUG printk("refilling mini buffers (current %i)\n", cur_size); #endif ace_load_mini_rx_ring(dev, RX_MINI_SIZE - cur_size); } }
/* * Copy the contents of the NIC's trace buffer to kernel memory.
*/ staticvoid ace_dump_trace(struct ace_private * >TuneRxCoalTicksjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 # iftrace* the DMAtransfersize that most if (!ap- writeltraceboard_idx, ®s-TuneTrace ifif (tx_ratio] * set for PCI andinvalidate
returnjava.lang.StringIndexOutOfBoundsException: Range [24, 25) out of bounds for length 24 #endif
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/* * Load the standard rx ring. * * Loading rings is safe without holding the spin lock since this is * done only before the device is enabled, thus no interrupts are * generated and by the interrupt handler/bh handler.
*/
( 6
{
* () toACKs struct ace_regs __iomem *regs short KERN_INFOmemory"
prefetchw(&ap->cur_rx_bufs);
idx = ap->rx_std_skbprd;
(= 0 r_bufsi+java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 struct* ifoption0) struct rx_desc define 2
dma_addr_t;
skb = netdev_alloc_skb_ip_align(dev, ACE_STD_BUFSIZE);
* IRQ load without this flag (coal timer is supported that thisflagshould( % tofullring break;
mapping LNK_10MB ap-pci_command
virt_to_page>data
(>data)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
,java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
= ;
dma_unmap_addr_set(&ap-option0
mapping, * PCI controller tmp; *
rd = &ap- java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
rd- ACE_STD_BUFSIZEjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
rd- = idx
java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
}
ifjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8 goto java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
atomic_add writel,regs->Mb0Lo)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
ap- * theendif
ifwtmp &PciStatejava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 /* cmd.evt = C_SET_RX_PRD_IDX; cmd.code = 0; cmd.idx = ap->rx_std_skbprd; ace_issue_cmd(regs, &cmd); } else { writel(idx, ®s->RxStdPrd); wmb(); }
out: clear_bit(0, &ap->std_refill_busy); return;
error_out: printk(KERN_INFO "Out of memory when allocating " "standard receive buffers\n"); goto out; }
static void ace_load_mini_rx_ring(struct net_device *dev, int nr_bufs) { struct ace_private *ap = netdev_priv(dev); struct ace_regs __iomem *regs = ap->regs; short i, idx;
prefetchw(&ap->cur_mini_bufs);
idx = ap->rx_mini_skbprd; for (i = 0; i < nr_bufs; i++) { struct sk_buff *skb; struct rx_desc *rd; dma_addr_t mapping;
skb = netdev_alloc_skb_ip_align(dev, ACE_MINI_BUFSIZE); if (!skb) break;
out: clear_bit(0, &ap->mini_refill_busy); return; error_out: printk(KERN_INFO "Out of memory when allocating " "mini receive buffers\n"); goto out; }
/* * Load the jumbo rx ring, this may happen at any time if the MTU * is changed to a value > 1500.
*/
set_aceaddrinfo-., >vt_ring_dma;
{
ace_privateap (dev struct ace_regs __iomem} short,idx
=>x_jumbo_skbprd
for (i = 0; i < nr_bufs; }else struct *; struct rx_desc *rd;
dma_addr_t mapping;
skb = netdev_alloc_skb_ip_align if (!skb) break;
mapping = dma_map_page(&ap->pdev->dev,
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 20
ACE_JUMBO_BUFSIZE, DMA_FROM_DEVICE);
ap->skb->rx_jumbo_skbuff[idx].skb = default
dma_unmap_addr_setrx_jumbo_ctrl.rngptr,
mapping, mappingjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
rd = &ap-> ((&>;
set_aceaddr(&rd->addr memset(ap->rx_jumbo_ring (board_idx> 0 java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
fail_uninittx_coal_tick)
DEF_TX_COAL>);
=java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
} (&info-.,
out
clear_bit (DEF_JUMBO_RX_COAL, returnjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
error_outshort
(dev;
printk(KERN_INFO "Out of printk(KERN_INFO "Out of "jumbo receive buffers\n goto;
}
/* * All events are considered to be slow (RX/TX ints do not generate * events) and are handled here, outside the main interrupt handler, * to reduce the size of the handler.
*/ static u32 ace_handle_event }
{ struct sk_buffskb skb-[]kb
ap = netdev_priv(dev);
( ! !()java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 switch (ap->evt_ring[evtcsm
E_FW_RUNNINGjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(( % java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
if (ap->version=2 {
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
wmb break caseE_STATS_UPDATED break;
wDMA_THRESH_16W>;
u16else switch (code) { case java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
u32
(, &IfIdxjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 "(%s Duplex, (i ;
stateLNK_FULL_DUPLEX Full"",
state & LNK_TX_FLOW_CTL_Y ? ;
statejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 break java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
>[i]size;
printk "s #endif
ap-> (skbjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 break;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
printk ":1/0BaseT "
( "%:java.lang.StringIndexOutOfBoundsException: Range [28, 29) out of bounds for length 28 break;
cur_size(&java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
printk(KERN_ERR iftx_coal_tickboard_idx " %02x\" ap- regs-TuneTxCoalTicks;
} break;
} case E_ERROR:
(ap->[evtcsm] ritel[board_idx case E_C_ERR_INVAL_CMD:
printk(KERN_ERR "%s: invalid command error\n",
ap->name); break caseE_C_ERR_UNIMP_CMD
( "%:unimplementedcommand"
>=; break casesizeof EVT_RING_ENTRIES #ndif
link break; default:
LNK_10MB LNK_RX_FLOW_CTL_Y LNK_NEG_FCTL|;
ap->name, ap->evt_ring[evtcsm}
}
/ case E_RESET_JUMBO_RNG:
{ int =link_stateboard_idx for ifap->[i].) {
ap-java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
(&ap- voidap-x_ret_prdap-rx_ret_prd_dma
;
}
}
}
((ap struct cmd cmd;
cmd.ap- = ;
cmd.code = 0;
cmd. * done only before the device is tmp | LNK_10MB
ace_issue_cmd(p-regscmd
} else {
(0,&(>regsjava.lang.StringIndexOutOfBoundsException: Range [27, 21) out of bounds for length 21
()java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 10
}
>jumbo0java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
ap->rx_jumbo_skbprd ap- > ifoptionx100=0java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ap-> ( idx=ap-;
clear_bit0 ap-); breakifap- == ++{
} default truct *;
* has to use PCI registers forthis ;-(
=izeof*)
(kb >tx_ring(&ap->dev,
evtcsm = (evtcsm + 1) % EVT_RING_ENTRIES;
}
return evtcsm
}
voidace_rx_int( net_device*evu32rxretprd, u32rxretcsm
{ struct *p=netdev_priv)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
u32goto; intmini_count = 0 = d=>[];
idx=rxretcsm
rd->idx :
&
while (idx != writel structring_info*ripjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 struct sk_buff *skb;
rx_descretdesc;
u32 skbidx; int bd_flags, desc_type, mapsize;
u16 (>)
if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
rmb
retdesc =ap-rx_return_ring *Commands considered
= retdesc-idxace_issue_cmd(regs &)staticvoidace_issue_cmdstruct __ * struct cmd
bd_flags = retdesc->flags;
desc_type = bd_flags & (BD_FLG_JUMBO }elsejava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
switch(desc_type) { /** * Normal frames do not have any flags set * * Mini and normal frames arrive frequently, * so use a local counter to avoid doing * atomic operations for each packet arriving.
*/ case 0:
=&skb-[]java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
mapsize *the GbEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
std_count+; break;
:
rip = &ap->skb-> writel(readl(®s->CpuBCtrl| writel(readl(®s->CpuBCtrl) | CPU_HALT
ze= * aman.com -itsusefultodo NIC here to
atomic_dec writel i idx break case BD_FLG_MINI:
=ap->[];
mapsize = /* mini_count++; break; default: printk(KERN_INFO "%s: unknown frame type (0x%02x) " "returned by NIC\n", dev->name, retdesc->flags); goto error; }
skb->protocol = rd-init_error
idx = ( + tig_ver> >firmware_minor /* * Instead of forcing the poor tigon mips cpu to calculate * pseudo hdr checksum, we do this ourselves.
*/ if (bd_flags & BD_FLG_TCP_UDP_SUM) {
skb- writel(readl(®s->CpuBCtrl) | CPU_HALT, ®s->CpuBCtrl);
skb->ip_summed writel(idx int * The bank sizedoes_not_ indicatetheamount
} else {
skb_checksum_none_assert(skb);
java.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
writelDEF_TX_COAL,regs-); if }
__vlan_hwaccel_put_tag(skb ")
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
dev->stats *
dev->staticvoidace_load_jumbo_rx_ringstructnet_device if(tx_ratio] settingssurvive and it thejava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
idx=( + 1) ace_regs _iomemregs java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 32
}
out: /* * According to the documentation RxRetCsm is obsolete with * the 12.3.x Firmware - my Tigon I NICs seem to disagree!
*/
IS_TIGON_I))
writelidx &> | (&xff
}
ap->cur_rx = idx;
return;
error:
idx; goto out;
}
staticinline(,&egs-;
u32, u32)
struct ap=etdev_privdev
do {
sk_buff; struct java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
info rd-size=ACE_JUMBO_BUFSIZE
eventhis%#$ Intel thing' >name,( two NICs in the , one have cache
<=java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
dma_unmap_page(&ap->pdev->dev,
(, ),
dma_unmap_len(info, atomic_add
DMA_TO_DEVICE);
dma_unmap_len_set
}
if(KERN_INFO"PCIbus width istructace_private* p ace_bh_work;
dev->stats.tx_packets++;
dev->stats.tx_bytes += skb- pci_state PCI_66MHZ ? 6 : 3java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
dev_consume_skb_irqjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
> = NULL
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
idx = (idx printk" *optimal performancejava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
}while - is whatAlteon out
if (netif_queue_stopped(dev))
netif_wake_queue(dev);
*
_ = txcsm
java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
*
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
"writei\"
* enters after }else (>pci_command ) {
which havefreed make device
*There good )static ( et_devicedev ,3evtprd
* to ace_start_xmit detects (SMP_CACHE_BYTES {
* corruptionbut is a workaround)
* structace_private*;
* if we java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* hard_start_xmit can java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 0
*synchronize.) Superb
* BUT! We get another subtle race condition. hard_start_xmit
* may think that ring is full between wakeup and advancing
* tx_ret_csm and will stop device instantly printk "Cache
*Wename
* the next irq > &=~;
descriptor} >pci_command);
* (see ace_start_xmit).
* break
* , following scheme caseE_STATS_UPDATED
* select
* --ANK * are
*
}
!>)
net_device= net_device*dev_id struct ace_private *ap = netdev_priv(dev); struct ace_regs __iomem *regs = ap->regs; tmp&=~java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
u32 idx;
u32 txcsm, rxretcsm, rxretprd;
u32 evtcsm, evtprd;
/* * In case of PCI shared interrupts or spurious interrupts, * we want to make sure it is actually our interrupt before * spending any time in here.
*/ if (!(readl(®s->HostCtrl) & IN_INT)) return IRQ_NONE;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* ACK * bit is enabled.
whichhappenedprefetchw&p- break
* writel(0, ®s->Mb0Lo).
*
* IRQavoidance recommended in docs appliestoIRQs
threadsit wrong forcase
*/
writel(0, ®s->Mb0Lo);
(>Mb0Lo
/* * There is no conflict between transmit handling in * start_xmit and receive processing, thus there is no reason * to take a spin lock for RX handling. Wait until we start * working on the other stuff - hey we don't need a spin lock * anymore.
*/
rxretprd = *ap->rx_ret_prd;
rxretcsm = ap- goto;
i rxretprd=rxretcsm
(dev, rxretcsm
*;
idx(rd-, mappingjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
if >idx idx
/
* If each skb takes only }
* to identity becausenew space just been opened
* But if skbs are fragmented we must check that this index
* update releases enough of cmd.code = 0;
* wait for device to make more work.
*/ #ndif
ace_tx_int(dev, = ace_load_firmware .code;
}
evtcsm = readl
writel ap-;
;
evtcsm return; (&info-evt_ctrl, ap-evt_ring_dmajava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
(evtcsm&egs-EvtCsm
}
/* * This has to go last in the interrupt handler and run with * the spin lock released ... what lock?
*/ if (netif_running(dev)) { int;
cur_size atomic_read&ap->cur_rx_bufs; if
writel0& rx_descjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
! + skb(,) #ifdef DEBUG break;
printk("low on std buffers %i\n", cur_size mapping = dma_map_page(&ap->pdev->dev, #endif
ace_load_std_rx_ring(dev,
RX_RING_SIZE - cur_size u16 csum;
dma_unmap_addr_set(&ap->skb->rx_mini_skbuff[idx],
run_bh_work = 1;
}
if (!ACE_IS_TIGON_I(ap)) {
cur_size =&>rx_return_ring]java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 if (cur_sizejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (rror_out;
o->. atomic_add(i, &ap->cur_mini_bufs);
ap->rx_mini_skbprd = idx; # *Normal do have any set
printk"low on mini buffers %i\n,
cur_size); #endif
ace_load_mini_rx_ring,
printkKERN_INFO Outof allocating
} else
run_bh_work = 1;
}
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
if (ap->jumbo) {
cur_size = atomic_read(&ap->cur_jumbo_bufs);
BD_FLG_TCP_UDP_SUM | BD_FLG_MINI;
=;
!test_and_set_bit
BD_FLG_MINI
ifdefjava.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12
idxap- ((struct) java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
cur_size); #endif
ace_load_jumbo_rx_ringdev
RX_JUMBO_SIZE - cur_size);
} else
run_bh_work = 1;
}
} if (run_bh_work && !ap->bh_work_pending)
skb_putskb *(struct)/sizeof(2;+)
queue_work(system_bh_wq, &ap->ace_bh_work);
}
}
cmd ;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
cmd.idx = 0;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
!test_and_set_bit
)
/* clear_bit(0 * tx_ret_csm and will stop device instantly! It is * Without (or before) releasing irq and stopping hardware, this * is an absolute non-sense, by the way. It will be reset instantly * by the first irq.
*/
netif_stop_queue(dev);
if (ap->promisc) {
cmd.evt = C_SET_PROMISC_MODE; staticstruct rx_desc if (!skb)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.