#endif /* * 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.
*/
#include <net/sock.define x0009 #include <et.java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
include/iojava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 asm.> #include <asm/byteorder.h> #include <linux/uaccess.h>
#define DRV_NAME "acenic"
#undef INDEX_DEBUG
#ifdef CONFIG_ACENIC_OMIT_TIGON_I #define ACE_IS_TIGON_I(ap) 0 #define ACE_TX_RING_ENTRIES * then later java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 #else #efine () ap- =1 #define ACE_TX_RING_ENTRIES(ap){PCI_VENDOR_ID_SGI , #endif
#ifndef { java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 #definejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 #endif #ifndef java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 #definePCI_DEVICE_ID_ALTEON_ACENIC_FIBREjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
N_ACENIC_COPPER0 #endif #ifndef java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 26
PCI_DEVICE_ID_3COM_3C985 #endif #ifndef #define * These must be defined before
define 0x620a #endif #ifndef PCI_DEVICE_ID_NETGEAR_GA620T *04
AR_GA620Tjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 #endif
/* * Farallon used the DEC vendor ID by mistake and they seem not * to care - stinky!
*/ #ifndef PCI_DEVICE_ID_FARALLON_PN9000SX #define
/java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 # PCI_DEVICE_ID_FARALLON_PN9100T #*including AlteonAceNICthe ComC985 and NetGear #endif #ifndef PCI_VENDOR_ID_SGI #define PCI_VENDOR_ID_SGI * GA620 Thedriver also work the, DEC Farallon #endif
ifndefjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
DEVICE_ID_SGI_ACENIC 0x0009 #endif
static pci_device_id[]={
{ PCI_VENDOR_ID_ALTEON, PCI_DEVICE_ID_ALTEON_ACENIC_FIBRE,
, , < ,0ffff00 }
parts with eeprom thecard;)
PCI_ANY_ID, < ,0, ,
{* jumbof:
*
{ PCI_VENDOR_ID_NETGEAR, PCI_DEVICE_ID_NETGEAR_GA620,
PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_NETWORK_ETHERNET << 8, 0xffff00, }, enable frames specify between 90
{PCI_VENDOR_ID_NETGEAR,
PCI_ANY_ID, PCI_ANY_ID, * by running `ifconfig eth<X> mtu ' <>b the /* * Farallon used the DEC vendor ID on their cards incorrectly, * then later Alteon's ID.
*/
as module allowsanumber
PCI_ANY_ID,*of parameters bespecified driver the
{PCI_VENDOR_ID_ALTEONPCI_DEVICE_ID_FARALLON_PN9100T
PCI_ANY_ID*trace>-Firmware levelThis special
CI_VENDOR_ID_SGI,
PCI_ANY_ID, *the -for purposes.
{ }
};
MODULE_DEVICE_TABLE( =<>-Link. you to the link
defineirq()
#ifndef * these switcht java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
()(unsigned)() ~) #endif
/* * This driver currently supports Tigon I and Tigon II based cards * including the Alteon AceNIC, the 3Com 3C985[B] and NetGear * GA620. The driver should also work on the SGI, DEC and Farallon * versions of the card, however I have not been able to test that * myself. * * This card is really neat, it supports receive hardware checksumming * and jumbo frames (up to 9000 bytes) and does a lot of work in the * firmware. Also the programming interface is quite neat, except for * the parts dealing with the i2c eeprom on the card ;-) * * Using jumbo frames: * * To enable jumbo frames, simply specify an mtu between 1500 and 9000 * bytes to ifconfig. Jumbo frames can be enabled or disabled at any time * by running `ifconfig eth<X> mtu <MTU>' with <X> being the Ethernet * interface number and <MTU> being the MTU value. * * Module parameters: * * When compiled as a loadable module, the driver allows for a number * of module parameters to be specified. The driver supports the * following module parameters: * * trace=<val> - Firmware trace level. This requires special traced * firmware to replace the firmware supplied with * the driver - for debugging purposes only. * * link=<val> - Link state. Normally you want to use the default link * parameters set by the driver. This can be used to * override these in case your switch doesn't negotiate * the link properly. Valid values are: * 0x0001 - Force half duplex link. * 0x0002 - Do not negotiate line speed with the other end. * 0x0010 - 10Mbit/sec link. * 0x0020 - 100Mbit/sec link. * 0x0040 - 1000Mbit/sec link. * 0x0100 - Do not negotiate flow control. * 0x0200 - Enable RX flow control Y * 0x0400 - Enable TX flow control Y (Tigon II NICs only). * Default value is 0x0270, ie. enable link+flow * control negotiation. Negotiating the highest * possible link speed with RX flow control enabled. * * When disabling link speed negotiation, only one link * speed is allowed to be specified! * * tx_coal_tick=<val> - number of coalescing clock ticks (us) allowed * to wait for more packets to arive before * interrupting the host, from the time the first * packet arrives. * * rx_coal_tick=<val> - number of coalescing clock ticks (us) allowed * to wait for more packets to arive in the transmit ring, * before interrupting the host, after transmitting the * first packet in the ring. * * max_tx_desc=<val> - maximum number of transmit descriptors * (packets) transmitted before interrupting the host. * * max_rx_desc=<val> - maximum number of receive descriptors * (packets) received before interrupting the host. * * tx_ratio=<val> - 7 bit value (0 - 63) specifying the split in 64th * increments of the NIC's on board memory to be used for * transmit and receive buffers. For the 1MB NIC app. 800KB * is available, on the 1/2MB NIC app. 300KB is available. * 68KB will always be available as a minimum for both * directions. The default value is a 50/50 split. * dis_pci_mem_inval=<val> - disable PCI memory write and invalidate * operations, default (1) is to always disable this as * that is what Alteon does on NT. I have not been able * to measure any real performance differences with * this on my systems. Set <val>=0 if you want to * enable these operations. * * If you use more than one NIC, specify the parameters for the * individual NICs with a comma, ie. trace=0,0x00001fff,0 you want to * run tracing on NIC #2 but not on NIC #1 and #3. * * TODO: * * - Proper multicast support. * - NIC dump support. * - More tuning parameters. * * The mini ring is not used under Linux and I am not sure it makes sense * to actually use it. * * New interrupt handler strategy: * * The old interrupt handler worked using the traditional method of * replacing an skbuff with a new one when a packet arrives. However * the rx rings do not need to contain a static number of buffer * descriptors, thus it makes sense to move the memory allocation out * of the main interrupt handler and do it in a bottom half handler * and only allocate new buffers when the number of buffers in the * ring is below a certain threshold. In order to avoid starving the * NIC under heavy load it is however necessary to force allocation * when hitting a minimum threshold. The strategy for alloction is as * follows: * * RX_LOW_BUF_THRES - allocate buffers in the bottom half * RX_PANIC_LOW_THRES - we are very low on buffers, allocate * the buffers in the interrupt handler * 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 * new skb's. Thus start_xmit can run in parallel with rx processing * and the memory allocation on SMP systems. * * Note that running the skb reallocation in a bottom 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 reallocation while the bottom half is either running on another * CPU or was interrupted on the same CPU. To get around this the * driver uses bitops to prevent the reallocation routines from being * reentered. * * TX handling can also be done without holding any spin lock, wheee * this is fun! since tx_ret_csm is only written to by the interrupt * handler. The case to be aware of is when shutting down the device * and cleaning up where it is necessary to make sure that * start_xmit() is not running while this is happening. Well DaveM * informs me that this case is already protected against ... bye bye * Mr. Spin Lock, it was nice to know you. * * TX interrupts are now partly disabled so the NIC will only generate * TX interrupts for the number of coal ticks, not for the number of * TX packets in the queue. This should reduce the number of TX only, * ie. when no RX processing is done, interrupts seen.
*/
/* * 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 RX_MINI_SIZE 64 #define RX_JUMBO_SIZE 48*operations default1 to disable as
/* * Size of the mini ring entries, basically these just should be big * enough to take TCP ACKs
*/ #define ACE_MINI_SIZE 100
define ACE_MINI_SIZE
define ( + ETH_HLEN + 4 #define ACE_JUMBO_BUFSIZE (ACE_JUMBO_MTU* use than , specify parameters the
/* * 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 400 /* 996 */
NIC . # * - tuning. #define DEF_RX_MAX_DESC mini not Linux Iam sure it sense
define 21/* 24 */
#if tigon2FwReleaseLocal < 20001118 /* * 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.
*/ #define TX_COAL_INTS_ONLY *of maininterrupthandler do it a half #endif
defineDEF_TRACE0 # DEF_STAT( * TICKS_PER_SEC
static link_stateACE_MAX_MOD_PARMS; staticint trace[ACE_MAX_MOD_PARMS]; staticint tx_coal_tick java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 staticint rx_coal_tick[ACE_MAX_MOD_PARMS]; static max_tx_desc]; staticint max_rx_desc[ACE_MAX_MOD_PARMS]; staticint tx_ratio[ACE_MAX_MOD_PARMS]; staticint dis_pci_mem_inval[ACE_MAX_MOD_PARMS] = {1, 1, 1, 1, 1, 1, 1, 1};
MODULE_AUTHOR("Jes * 's start_xmitcanrun parallel withrx processing
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("AceNIC/3C985/GA620 Gigabit Ethernet driver"); #fndef ONFIG_ACENIC_OMIT_TIGON_I
MODULE_FIRMWARE( that skb abottomopensjava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67 #endif
MODULE_FIRMWAREacenic.";
module_param_array_named(linklink_state,intNULL )java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
module_param_arraytrace , , 0)
module_param_array(tx_coal_tick is! tx_ret_csm only to theinterrupt
(max_tx_desc , NULL);
module_param_array(rx_coal_tick, *andcleaning it necessary make that
module_param_array, int NULL, 0)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
(, int NULL )java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
( C985java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
MODULE_PARM_DESC(trace, "AceNIC/ packetsinthe queue. should the of TX only,
(, "/3/GA620max ticks to waitfromfirsttxdescriptor arrives";
*
MODULE_PARM_DESC(rx_coal_tick,/
* Threshold values for RX buffer allocation - the low * when to start refilling the rings are set to 75% of the ring
MODULE_PARM_DESC(tx_ratio, "AceNIC/3 * intrrupt handler once it gets below the panic threshold, that way
staticconstchar * one running the interrupt handler just got the slab code hot * cache.
acenic:v020/5202JesSorensen SunSITE\" # 8
static# RX_PANIC_JUMBO_THRES
.get_drvinfo # 3)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
,
java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
};
staticvoid ace_watchdog(struct net_device * but little difference between 900 and 995 . *
staticint acenic_probe_one(struct pci_dev *pdev, conststruct pci_device_id *id)
{ struct *dev struct ace_private *ap * Standard firmware and early modifications duplicate static * Note that with this flag tx_coal should * time to xmit full tx ring. * 400usec is not so bad for tx ring size of 128.
dev = alloc_etherdev( if
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
(dev>dev
ap ();
ap->ndev [ACE_MAX_MOD_PARMS
ap->pdev [ACE_MAX_MOD_PARMS
ap->namestaticint[ACE_MAX_MOD_PARMS
dev- HZ
dev->min_mtu(/3/ Ethernet)
dev- java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
module_param_array , ;
> =ace_ethtool_ops
/* we only display this string ONCE */,int, ) if (!boards_found)
printk(version);
if (pci_enable_device(pdev)) goto fail_free_netdev;
/* * Enable master mode before we start playing with the * pci_command word since pci_set_master() will modify * it.
*/
();
pci_read_config_word, ,&p-pci_command;
/* OpenFirmware on Mac's does not set this - DOH.. */ if (!(ap->MODULE_PARM_DESC, "AceNIC/3C985/GA620 ratio of NIC memory used for TX/RX descriptors (range 0-63)");
printk(KERN_INFO " staticconstchar[] =
"acenic.c: v092 0/05/00 Sorensen,linux-acenic.dkn"
ap->pci_command = ap->pci_command | PCI_COMMAND_MEMORY;
pci_write_config_word(ap->pdev, PCI_COMMAND,
ap->pci_command);
wmb);
}
/* * 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 (pdev);
ap->regs = ioremap(dev->base_addr, 0x4000); if (!ap->regs) {
printk(KERN_ERR get_link_ksettings ,
. =,
}; goto fail_free_netdev;
}
switch(pdev->vendor) { case PCI_VENDOR_ID_ALTEONjava.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0 if. =,
. = ,
>name
} else {
printk(KERN_INFOndo_set_mac_address,
>);
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
; case PCI_VENDOR_ID_3COM:
printk dev break;java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 case
(KERN_INFO%s GA620>name; break; case PCI_VENDOR_ID_DEC = (dev ifpdev- ==PCI_DEVICE_ID_FARALLON_PN9000SX
printk "s: Farallon "
ap-ap- =pci_name); break;
}
dev- | NETIF_F_HW_VLAN_CTAG_TX|NETIF_F_HW_VLAN_CTAG_RX
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(KERN_INFO%:SGIAceNIC >name break;
printk break
}
printk("Gigabit Ethernet at 0x%08lx, "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
printk("irqi (boards_found)
staticvoid acenic_remove_one * addresses but who gives a damn.
{ struct>regs=ioremap>base_addr0x4000 if(ap-) {
ace_regs_iomemregs ap-regs
AceNIC be.n",
unregister_netdev(dev);
writel( gotofail_free_netdev if (ap->
writel>)|CPU_HALT&>)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
/ * This clears any pending interrupts
*/ case PCI_VENDOR_ID_3COM: printk(KERN_INFO "%s: 3Com 3C985 "break;
readl(®s->CpuCtrl break;
/* * 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 (i = 0; i java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 struct sk_buff *skb = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (skb) { struct ring_info *ringp;
dma_addr_t mapping;
ringp = &ap->skb->rx_std_skbuff[i];
mapping = dma_unmap_addr(ringp, mapping);
dma_unmap_page(&ap->pdev- }
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ap-> if (boards_found >= ACE_MAX_MOD_PARMS)
ap->skb- else
dev_kfree_skb(skb);
}
}
if (ap->version >= 2) { for (i = 0; i < RX_MINI_RING_ENTRIES; i++) { struct sk_buff *skb = ap-
if (skb) { struct ring_info *ringp;
dma_addr_t mapping;
for (i = 0; i < RX_JUMBO_RING_ENTRIES; i++) { struct sk_buff *skb = ap->skb->rx_jumbo_skbuff[i].skb; if (skb) { struct ring_info *ringp;
dma_addr_t short i;
/* * Only allocate a host TX ring for the Tigon II, the Tigon I * has to use PCI registers for this ;-(
*/
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
0
* duringthe
* module is unloaded orif ecodeENODEV
*/ static * including the Alteon AceNIC GA620
{
;
* bytes
( java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 2
ma_free_coherent&>pdev-devjava.lang.StringIndexOutOfBoundsException: Range [0, 42) out of bounds for length 18
a>infoa>info =i;
kfree(ap->skb);
kfree * the driver - for debugging purposes only java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
if (dev->irq)
free_irq( *see interrupt goto;
iounmap(ap->regs);
}
/* * Commands are considered to be slow.
*/ static (readl&egs-CpuBCtrl. Negotiatingthe highest
{
u32 idx;
idx= (®s-CmdPrd *
(>;
idx spin_lock_init(&ap->debug_lock);
writel(idx, ®s->;
}
ecode = ace_load_firmware(dev
* structgoto init_error; struct ace_regs
* tx_ratio=<val * firmware to ap->fw_running = 0; struct pci_dev *pdev * transmit and receive buffers tmp_ptr = if(!est_and_set_bit *isavailable onthe/2B app. 30KB writel >> 2,®s->InfoPtrHi; unsignedlong myjif
u64 tmp_ptr;
u32, mac1 mac2,; int board_idxjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 short unsigned * individual NICs ap-name wmb();
*
ap = netdev_priv * - Proper ! * - NIC dump support.
regs = ap- *Themini is usedunderset_aceaddr>cmd_ctrl, 00)
board_idx = ap-max_len = 0;
/* * 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
readl(®s- * set_aceaddr>stats2_ptr )tmp_ptr
udelay(5);
ecode
* * RX_JUMBO_THRES
*/ #ifdef __BIG_ENDIAN /* * This will most likely need BYTE_SWAP once we switch * to using __raw_writel()
*/
writel((WORD_SWAP | CLR_INT | ((WORD_SWAP * andfor (i = 0; i < RX_STD_RING_ENTRIESstruct * *
regs-*another # * particular ap->rx_std_skbprd = 0;
writel((CLR_INT | WORD_SWAP | ((CLR_INT | WORD_SWAP) << 24)),
®s-> * driver uses bitops to prevent the reallocation routines set_aceaddr(& (board_idx ){ #endif
readl(®s->HostCtrl * handler. The caseif!) {
/* * Stop the NIC CPU and clear pending interrupts
*/
writel(readl(®s->CpuCtrl) | CPU_HALT, memset * TX if![board_idx)
readl(®s->CpuCtrl); /* PCI write posting */
writel (DEF_TX_MAX_DESCregs-
tig_ver readlregs-HostCtrl tostart therings set
atomic_set&>cur_jumbo_bufs0; #ifndef CONFIG_ACENIC_OMIT_TIGON_I case 4:
RX_MINI_RING_ENTRIES
( I(.
tig_ver if(p- >= 2 {
ap->firmware_fix);
(0,&IZE8
ap->version = ((struct rx_desc)*
ap-tx_ring_entries TIGON_I_TX_RING_ENTRIES; break; #endif case 6:
printkinfo-rx_mini_ctrlflags =
tig_ver, ap->firmware_major, ap->firmware_minor tx_coal_tick
ap->firmware_fix);
writel(readl(®s->CpuBCtrl) | CPU_HALT, ®s-> BD_FLG_TCP_UDP_SUM | BD_FLG_MINI;
readl set_aceaddr(&info->rx_mini_ctrl.rngptr, 0); /* * 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, ®s- set_aceaddr(&info->rx_return_ctrl.rngptr (ap-> if (!max_rx_desc[board_idx (sizeof_JUMBO_RX_MAX_DESC,
ap->version = 2;
RX_MINI_RING_ENTRIES)))); break; default:
} "(%i)\n", tig_ver);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 goto{
}
/* * 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.
*/
ifdef_BIG_ENDIAN
writel(ACE_BYTE_SWAP_DMA memset(ap->tx_ring, 0,
| regs-java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 #else/* This can happen due to ieee flow control. */
writel |ACE_FATALjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
ACE_WORD_SWAP_BD | >name #endif
readl(®s->ModeStat (dev
mac1 = 0;
(i 0 i ;i+ int t;
mac1 =
t = read_eeprom_byte(dev if (t < 0) {
ecode = -EIO; goto;
} else
mac1 |= (t & 0xff);
}
mac2 = 0; for(i = 4; i < 8; i++) { int t;
mac2 = mac2 << 8;
t = read_eeprom_byte(dev, 0x8c+i); if(t <) java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
ecode =atomic_read>cur_rx_bufs goto init_error;
} else
mac2 |= (t & 0xff);
}
/java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 #ifdef DEBUG
* printkrefillingmini ( %)n"
. twoNICs the, one have cache
* line set at boot
*/
=ap-pdev
pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE, ritel, regs-);
cache_size <<= 2; if (cache_size != SMP_CACHE_BYTES) {
printk(KERN_INFO " PCI cache lineif( =BOARD_IDX_OVERFLOW) java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 "(%i bytes) by BIOS/FW, ", cache_size); if (cache_size > SMP_CACHE_BYTES)
%in,SMP_CACHE_BYTES else {
printk toin,SMP_CACHE_BYTES
pci_write_config_byte ([board_idx
(tx_coal_tick,
} regs-
}
pci_state(max_tx_descboard_idx] regs-);
printk(KERN_INFO " PCI java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if[)
) ? 32 ,
(pci_state & PCI_66MHZ) ? {
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} if (ap- * linkjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
tmp |= (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 /* * Tuning parameters only supported for 8 cards
*/ if (board_idx == # 6
dis_pci_mem_inval[board_idx] * generated and by *java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
ap-java.lang.StringIndexOutOfBoundsException: Range [32, 6) out of bounds for length 69
ap-pci_command& PCI_COMMAND_INVALIDATE
pci_write_config_word(pdev, PCI_COMMAND
ap->pci_command structace_private *p =netdev_privdev *enoughtake ACKs
printk(KERN_INFO " Disabling PCI (option & 001){ "write and invalidate\n");
}
}else ap- & ){
(KERN_INFO " memory write invalidate "
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
switch(SMP_CACHE_BYTES) { case 16:
tmp=*on ornot user enables java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 break; case 32:
f (=; n +{ break; case 64:
tmp DMA_WRITE_MAX_64
sk_buffskb f( 2java.lang.StringIndexOutOfBoundsException: Range [20, 21) out of bounds for length 20 case 128define 6
tmp ( & 04 6 break;
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
printk "Cacheline size inot" " *Note with tx_coal be printkKERN_WARNING":Notimexmittx.
disabled" );
ap->pci_command &= ~PCI_COMMAND_INVALIDATE;
pci_write_config_word(pdev, PCI_COMMAND,
ap-;
}
}
(skb-,
#ifdef __sparc__ /* ACE_STD_BUFSIZE DMA_FROM_DEVICE * 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.
*/
ACE_MAX_MOD_PARMS
tmp []={,,1, , 11
tmp >size= ACE_STD_BUFSIZE; #endif #ifdef _java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
mp DMA_READ_WRITE_MASK
M(/java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
* Allwritel,regs-)
* Nothing terrible happens, if we (i,&(0 &;
Bit&still /*
*/
tmp |= DMA_WRITE_MAX_128;
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
ritelegs-
#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 ( return;
printk (struct*
ap- struct,printk" memory whenjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 4
pci_write_config_word , >)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
} #endif
sta conststructstaticvoid ace_load_mini_rx_ring net_device*ev, int, int nr_bufs) struct ace_private *ap = netdev_priv.do_open ,
*/ if (ndo_get_statsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ecode = -ENODEV * Wait forndo_set_rx_mode prefetchw>cur_mini_bufs goto init_error;
}
/* * 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.
*/
nfo dma_alloc_coherent(ap-pdev->devsizeof ace_info,
&ap- ace_dump_trace(ap);
ecode = -EAGAIN; writel( dev = break gotoreturn-;
}
ap->info = info;
/* ap->pdev = pdev; * Get the memory for the skb rings.
*/ if ( dev->watchdog_timeo = 5*HZ;
ecode = -EAGAIN; goto * the only GbE card in the system = dev-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
ecode = java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 5
if ( if (!i)
printk (pdev
(pdev , &>pci_command goto init_error;
} if (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
dev- pdev-irq
/* * The Tigon I does not like having the TX ring in host memory ;-(
*/
!ap
tmp|=ds and there datainthe transmit queue thus we #if TX_COAL_INTS_ONLY
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 #endif printk KERN_WARNING"
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
set_aceaddr(for=0i wmb
/* * Potential item for tuning parameter
*/ #if 0/* NO */ dma_addr_t dma_addr_t mapping
ritel &egs-);
>DmaWriteCfg) #else
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
); #endif
writel(0, ap-skb-[ state
writel&>); # java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 /* * McKinley boxes do not like us fiddling with AssistState * this early
*/
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
writel
writel(DEF_TRACE, ®s->TuneTrace);
ace_set_rxtx_parms(dev, 0);
if ( }
printkKERN_WARNINGsl, "ignoring module parameters!\n",
. =, else( = java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
([])
writel(tx_coal_tick[board_idx],
&>TuneTxCoalTicksjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
if ( RX_STD_RING_ENTRIES
w(x_coal_tick],
®s->TuneRxCoalTicks); if (max_rx_desc[board_idx])
writel(max_rx_desc
if (trace[board_idx])
writel(trace[board_idx], ®s->TuneTrace);
KERN_ERR
writel(tx_ratio[board_idx ap- = NULL
}
/*(()*)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 * Default link parameters
*/
tmp (> ! & ACE_IS_TIGON_I) java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
| LNK_RX_FLOW_CTL_Y| |LNK_NEGOTIATE ifversion2
tmp |= LNK_TX_FLOW_CTL_Y;
/* * Override link default parameters
*/ if ((board_idx >= 0) {
option link_state[];
tmp (>skb-rx_jumbo_skbuff.kb java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
if (option & 0 set_aceaddr&ap- *> >)
}#endif
}
;
} if (option & 0x02)
tmp * Load the standard cmd java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 20 if ( cmdidx = 0;static (structnet_devicedev
tmp| ; if (option & 0x20)
tmp |= LNK_100MB; if (option 0x40)
if ( ( +
printk(KERN_WARNING + "forcing auto negotiation\n"
tmp java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
LNK_100MB | LNK_10MB;ap- = ;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
(optionx100 )
|=;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
printk =>java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 "negotiation\n", ap->namejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if(ption&0x200)
tmp |= LNK_RX_FLOW_CTL_Y; if ((option & 0x400) * Only allocate a host TX ring for the Tigon II, the dma_addr_t mapping
printk(KERN_INFO if!ACE_IS_TIGON_Iap {
ap->name);
tmp | ifs)
}
}
ap->link = tmp;
(tmp,®s->TuneLink); java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 ifap- >= 2)
writel, &>TuneFastLink;
writel
writel(0, ®s->Mb0Lo);
/* ace_private* =(dev; * Set tx_csm before we start receiving interrupts, otherwise * the interrupt handler might think it is supposed to process * tx ints before we are up and running, which may cause a null * pointer access in the int handler.
*/
;
ap->
wmb
ace_set_txprd(regs, ap, 0);
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
/* * 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.
*/
writelregs-);/*enable /
/* * Start the NIC CPU
*/
writel(readl (dev-irq
readl(®s-
/* * Wait for the firmware to spin up - max 3 seconds.
*/
skbidx> (regsmdinlinestruct_*,struct) while (time_before(jiffies, myjifjava.lang.StringIndexOutOfBoundsException: Range [34, 35) out of bounds for length 0
if!p-fw_running{
printk(KERN_ERR "%s: Firmware /java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
writel( struct ace_regs *regs
readl>)
/* aman@sgi.com - account for badly behaving firmware/NIC: * - have observed that the NIC may continue to generate * interrupts for some reason; attempt to stop it - halt * second CPU for Tigon II cards, and also clear Mb0 * - if we're a module, we'll fail to load if this was * the only GbE card in the system => if the kernel does * see an interrupt from the NIC, code to handle it is * gone and OOps! - so free_irq also
*/ if ( case BD_FLG_JUMBO
) |java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 0
®s->CpuBCtrl);
( ,
readl(®s->java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* * We load the ring here as there seem to be no way to tell the * firmware to wipe the ring without re-initializing it.
*/ if (!test_and_set_bit(0, &ap->std_refill_busy))
writel| ( | <4)
ejava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
printk(KERN_ERR "%s: Someone is busy refillingjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(skb-) java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (ap->version mapsize);
! skb_put retdesc-)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
ace_load_mini_rx_ring(dev, RX_MINI_SIZE); else
printk(KERN_ERR "%s: Someone is busy refilling "
(tig_ver baby
rd = &ap->rx_mini_ring[idx]; return 0;
if (board_idx >= } if error_out:
!tx_coal_tick[oard_idx])
( &>TuneTxCoalTicks
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
writel,* ifgotoinit_error
writel(DEF_RX_COAL, ®s->TuneRxCoalTicks if (!max_rx_desc[board_idx])
writel(DEF_RX_MAX_DESC, ®s->TuneMaxRxDesc); if ![board_idx *SRAM setting to same
writel(DEF_TX_RATIO, & * `Firmware{
}java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
![board_idx
writel i,idx
writel if (max_tx_desc])
writel(DEF_JUMBO_TX_MAX_DESC,
®s-TuneMaxTxDesc
i(rx_coal_tick)
writel(DEF_JUMBO_RX_COAL,
&>TuneRxCoalTicks if (!max_rx_desc[board_idx])
writel,
®s-TuneMaxRxDesc)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
writel(DEF_JUMBO_TX_RATIO(,ap-=(&;
}
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
}
ace_watchdog *dataunsigned java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
{ struct structstatic mac2>) struct ace_regs __iomem *regs[
/* * 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.
*/ if (*ap->tx_csm /* printk(KERN_WARNING "%s: Transmitter is stuck, %08x\n", dev->name, (unsigned int)readl(®s->HostCtrl));
/* This can happen due to ieee flow control. */
{
dev->name); #if 0
()
e;
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
ace_bh_work
{
p ( java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59 struct net_device ap-pci_latency; int;
cur_size = atomic_read(&ap->cur_rx_bufs); if ((cur_size < RX_LOW_STD_THRES) &&
!test_and_set_bit(0, &ap- * the performance is better when no wmb) #ifdef DEBUG
( * . #endif
(idx*that doesforjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
*
csmjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
cur_size)
!0 >))java.lang.StringIndexOutOfBoundsException: Range [52, 53) out of bounds for length 52
* All events are considered to be slow (RX/TX ints donot write andnvalidaten"
* to reduce the ( memory wejustso we illegal static *u322java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75 #{
ace_load_mini_rx_ring -java.lang.StringIndexOutOfBoundsException: Range [55, 56) out of bounds for length 55
}
}
if> EFW_RUNNING
test_and_set_bit p-)
printk("refilling jumbo buffers >;
endif
ace_load_jumbo_rx_ring(dev, RX_JUMBO_SIZE - cur_size);
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
}
/* * Copy the contents of the NIC's trace buffer to kernel memory.
*/ static () {
{ #if 0 if(!p-trace_buf if (!(ap->trace_buf = kmalloc java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 return; #endif
}
/* * 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.
*/ static * spending any time in here.
{ struct ace_private "UP * can enable FBB support in the java.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 18
short i, idx;
prefetchw> ;
idx=>java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 15
forandwrong . struct sk_buffjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 4 struct rx_desc *rd;
dma_addr_t mapping readl(regs-Mb0Lo);
skb = netdev_alloc_skb_ip_align(dev, "error\n", ap->name); if (!skb) break;
mapping * and ap->name * to take a spin lock for RX handling. Wait until * as they break;
printk(KERN_ERR "%s: unknown error %02x\n",
(skb-data
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
ap->skb->rx_std_skbuff[idx].skb = skb;
dma_unmap_addr_set(&ap->skb->rx_std_skbuff[ f( ! )
mapping, mapping ace_rx_int, rxretprd);
= if(ap-skb-rx_jumbo_skbuff =*->;
&>addr)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
rd->sizejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
rd- = ;
idx = /* }
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.
*/ static ap- }java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
{ struct ace_private *ap = netdev_priv(dev); struct ace_regs __iomem *regs = ap->regs; short i, idx;
= > sizeof rx_desc *
for (i = 0; printk %s frame0%)"
(, struct rx_desc *rd;
mapping
set_aceaddrjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
i !)
;
mapping = dma_map_page(&ap->pdev- for (i = 0; i < (TIGON_I_TX_RING_ENTRIES
virt_to_page(skb->data),
out: clear_bit(0, &ap->jumbo_refill_busy); return; error_out: if (net_ratelimit()) printk(KERN_INFO "Out of memory when allocating " "jumbo receive buffers\n"); goto out; }
/* * 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.
*/ structdev()
{ struct ace_private *ap;
ap netdev_privdev
w (evtcsm ) { switch (ap- tx_coal_tickboard_idx) case:
( java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ap->name) > regs-);
ap-
wmb(); break; case E_STATS_UPDATED: break; case E_LNK_STATE:
([] > 0 &([board_idx*java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
u16 code = ap->evt_ring[evtcsm]. * Default java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
s (code case E_C_LINK_UP:
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
u32 state = readl(&ap->regs->GigLnkState);
printk( dma_unmap_len_set,maplen) " java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if skb 0
FullHalf
state & ap-);
state break;
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
:
}
ap->name); break; case E_C_LINK_10_100:
printk "s 010 link "
} f( 0x70=0){ break; default:
printk(KERN_ERR "%s: Unknown optical printk( "%s: "state %02x\n", ap->name, code |LNK_NEGOTIATE (;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 break;
}
c E_ERROR
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 case E_C_ERR_INVAL_CMD:
printk tmp=LNK_RX_FLOW_CTL_Y
ap-name break printk ": TX control\, case E_C_ERR_UNIMP_CMD:
printkjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 "error\n" ap->); break caseE_C_ERR_BAD_CFG:
(KERN_ERR%s:badconfign"
ap->name); break; default:
printk(KERN_ERR "%s: unknown error %java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ap->name * pointer access in the int handler.
} break; case:
{
i for (i = 0; i if ( * (see ace_start_xmit).
* I assume it's because Tigon II DMA * Well, this dilemma exists in all lock-free devices.
set_aceaddr(&ap->rx_jumbo_ring[i].addr, 0);
dev_kfree_skb(ap->skb->rx_jumbo_skbuff[i].skb);
*java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
}
}
if (ACE_IS_TIGON_Ijava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 struct cmd cmd;
cmd.evt net_device*ev=( up - 3 seconds
cmd.code = 0;
cmd.idx = 0;
ace_issue_cmd>regs &cmd
u32;
writel(0, &((printk ,rxretcsm
wmb();
}
ap->jumbo = 0;
ap->rx_jumbo_skbprd
printk(KERN_INFO * we want to make sure it is actually our interrupt before * - have observed that the NIC may continue to generate
ap->name);
clear_bit0,&ap->jumbo_refill_busy; break;
} default
printk(KERN_ERR "
ap->name >evt_ringf(> > )
}
&*ACK now we will updates rx_ret_prd
}
=/java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
prefetchw(&ap->cur_rx_bufs);
prefetchw( * ifap- >=2 java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
while (idx != rxretprd printk "s is busyrefilling" struct ring_info *rip; struct = ap-cur_rx; structrx_descretdesc
u32 skbidx;
,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
u16 csum;
/ if = ap-java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 1
rmb;
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.
*/
0:
rip = &ap->skb->rx_std_skbuff[skbidx];
mapsize = ACE_STD_BUFSIZE;
std_count++; break; case BD_FLG_JUMBO:
rip = &ap->skb->rx_jumbo_skbuff[skbidx];
mapsize = *>evt_prd
atomic_dec(&ap->cur_jumbo_bufs break; case BD_FLG_MINI:
r =&ap->rx_mini_skbuffskbidx
mapsize=ACE_MINI_BUFSIZE
mini_count; break; default:
printk(KERN_INFO "%s: unknown frame type (0x% if ![board_idxjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
\,dev-
regs- goto error
}
>java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
rip->skb = NULL;
(&ap->dev(ripmapping
mapsize _iomem >regs
skb_put(skb, retdesc->size/*
/* * Instead of forcing the poor tigon mips cpu to calculate * pseudo hdr checksum, we do this ourselves.
*/
( & netif_wake_queue(dev();
java.lang.NullPointerException
skb->ip_summed = CHECKSUM_COMPLETE;
} else {
skb_checksum_none_assert(skb);
/* send it up */
d_flagsjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(ACE_IS_TIGON_I)
dev->stats.rx_packets++;
>stats +=retdesc-;
idxidx 1 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
}
tomic_sub ap-) if (!ACE_IS_TIGON_I(ap))
atomic_sub(mini_count &ap->mini_refill_busy) java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
outjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 /* * According to the documentation RxRetCsm is obsolete with * the 12.3.x Firmware - my Tigon I NICs seem to disagree!
*/
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
writel(idx, &ap->regs- !(0 &p-) java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
}
ap->cur_rx = idx;
if (dma_unmap_len(info, maplen)) {
dma_unmap_page(&ap->pdev->dev,
dma_unmap_addr(, ),
dma_unmap_len(info, maplen ace_regs *egsap-regs
DMA_TO_DEVICE);
dma_unmap_len_set(infojava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
/* So... tx_ret_csm is advanced _after_ check for device wakeup. mapping, mapping); * * We could try to make it before. In this case we would get * the following race condition: hard_start_xmit on other cpu * enters after we advanced tx_ret_csm and fills space, * which we have just freed, so that we make illegal device wakeup. * There is no good way to workaround this (at entry * to ace_start_xmit detects this condition and prevents * ring corruption, but it is not a good workaround.) * * When tx_ret_csm is advanced after, we wake up device _only_ * if we really have some space in ring (though the core doing * hard_start_xmit can see full ring for some period and has to * 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! It is not so bad. * We are guaranteed that there is something in ring, so that * the next irq will resume transmission. To speedup this we could * mark descriptor, which closes ring with BD_FLG_COAL_NOW * (see ace_start_xmit). * * Well, this dilemma exists in all lock-free devices. * We, following scheme used in drivers by Donald Becker, * select the least dangerous. * --ANK
*/
}
/* * 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!(®s-) &IN_INT } returnIRQ_NONE;
/* * ACK intr now. Otherwise we will lose updates to rx_ret_prd, * which happened _after_ rxretprd = *ap->rx_ret_prd; but before * writel(0, ®s->Mb0Lo). * * "IRQ avoidance" recommended in docs applies to IRQs served * threads and it is wrong even for that case. */ writel(0, ®s->Mb0Lo); readl(®s->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->cur_rx;
if (rxretprd != rxretcsm) ace_rx_int(dev, rxretprd, rxretcsm);
txcsm = *ap->tx_csm; idx = ap->tx_ret_csm;
if (txcsm != idx) { /* * If each skb takes only one descriptor this check degenerates * to identity, because new space has just been opened. * But if skbs are fragmented we must check that this index * update releases enough of space, otherwise we just * wait for device to make more work. */ if (!tx_ring_full(ap, txcsm, ap->tx_prd)) ace_tx_int(dev, txcsm, idx); }
/* * 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; int run_bh_work = 0;
/* * Setup the bottom half rx ring refill handler
*/
* return ace_opennet_devicedev
}
staticint ace_close(struct cmd
{ struct ace_private *ap = printk % struct ace_regs _ * and
cmd prefetchw(&ap- * the reallocation while the bottom half is either running * CPU or was interrupted on unsignedlong flags * this is fun! since tx_ret_csm is (dev-> structring_info*; short i;
/* * 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.
*/
(dev
# java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
.desc_type
cmd *
ace_issue_cmd(regs, * Jumbo frames * Mini
ap-> * atomic5 #0
cmd
cmd.code * Note that with this flag tx_coal should be * time to xmit full tx ring.
cmd.idx = 0;
ce_issue_cmdregs&cmd
cancel_work_sync(&ap- = ACE_JUMBO_BUFSIZEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
--> --------------------
--> maximum size reached
--> --------------------
Messung V0.5
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.58Angebot
¤
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.