aboutsummaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-29 11:20:02 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-29 11:20:02 -0700
commitf1d1c9fa8f360990e263bdcb73e35ab6fbdc41fe (patch)
tree91468535e200f890fd532d5cbb50df59035278e0 /scripts/basic
parent2ff55e98d6e662a4887d2c688a4ab2ae510a97df (diff)
parent176e21ee2ec89cae8d45cf1a850ea45a45428fb8 (diff)
Merge branch 'nfs-for-2.6.40' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'nfs-for-2.6.40' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: SUNRPC: Support for RPC over AF_LOCAL transports SUNRPC: Remove obsolete comment SUNRPC: Use AF_LOCAL for rpcbind upcalls SUNRPC: Clean up use of curly braces in switch cases NFS: Revert NFSROOT default mount options SUNRPC: Rename xs_encode_tcp_fragment_header() nfs,rcu: convert call_rcu(nfs_free_delegation_callback) to kfree_rcu() nfs41: Correct offset for LAYOUTCOMMIT NFS: nfs_update_inode: print current and new inode size in debug output NFSv4.1: Fix the handling of NFS4ERR_SEQ_MISORDERED errors NFSv4: Handle expired stateids when the lease is still valid SUNRPC: Deal with the lack of a SYN_SENT sk->sk_state_change callback...
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions
i < priv->num_rx_queues; i++) { stats->rx_packets += priv->rx_queue[i]->stats.rx_packets; stats->rx_bytes += priv->rx_queue[i]->stats.rx_bytes; stats->rx_dropped += priv->rx_queue[i]->stats.rx_dropped; } for (i = 0; i < priv->num_tx_queues; i++) { stats->tx_bytes += priv->tx_queue[i]->stats.tx_bytes; stats->tx_packets += priv->tx_queue[i]->stats.tx_packets; } if (priv->device_flags & FSL_GIANFAR_DEV_HAS_RMON) { struct rmon_mib __iomem *rmon = &priv->gfargrp[0].regs->rmon; unsigned long flags; u32 rdrp, car, car_before; u64 rdrp_offset; spin_lock_irqsave(&priv->rmon_overflow.lock, flags); car = gfar_read(&rmon->car1) & CAR1_C1RDR; do { car_before = car; rdrp = gfar_read(&rmon->rdrp); car = gfar_read(&rmon->car1) & CAR1_C1RDR; } while (car != car_before); if (car) { priv->rmon_overflow.rdrp++; gfar_write(&rmon->car1, car); } rdrp_offset = priv->rmon_overflow.rdrp; spin_unlock_irqrestore(&priv->rmon_overflow.lock, flags); stats->rx_missed_errors = rdrp + (rdrp_offset << 16); } } /* Set the appropriate hash bit for the given addr */ /* The algorithm works like so: * 1) Take the Destination Address (ie the multicast address), and * do a CRC on it (little endian), and reverse the bits of the * result. * 2) Use the 8 most significant bits as a hash into a 256-entry * table. The table is controlled through 8 32-bit registers: * gaddr0-7. gaddr0's MSB is entry 0, and gaddr7's LSB is * gaddr7. This means that the 3 most significant bits in the * hash index which gaddr register to use, and the 5 other bits * indicate which bit (assuming an IBM numbering scheme, which * for PowerPC (tm) is usually the case) in the register holds * the entry. */ static void gfar_set_hash_for_addr(struct net_device *dev, u8 *addr) { u32 tempval; struct gfar_private *priv = netdev_priv(dev); u32 result = ether_crc(ETH_ALEN, addr); int width = priv->hash_width; u8 whichbit = (result >> (32 - width)) & 0x1f; u8 whichreg = result >> (32 - width + 5); u32 value = (1 << (31-whichbit)); tempval = gfar_read(priv->hash_regs[whichreg]); tempval |= value; gfar_write(priv->hash_regs[whichreg], tempval); } /* There are multiple MAC Address register pairs on some controllers * This function sets the numth pair to a given address */ static void gfar_set_mac_for_addr(struct net_device *dev, int num, const u8 *addr) { struct gfar_private *priv = netdev_priv(dev); struct gfar __iomem *regs = priv->gfargrp[0].regs; u32 tempval; u32 __iomem *macptr = ®s->macstnaddr1; macptr += num*2; /* For a station address of 0x12345678ABCD in transmission * order (BE), MACnADDR1 is set to 0xCDAB7856 and * MACnADDR2 is set to 0x34120000. */ tempval = (addr[5] << 24) | (addr[4] << 16) | (addr[3] << 8) | addr[2]; gfar_write(macptr, tempval); tempval = (addr[1] << 24) | (addr[0] << 16); gfar_write(macptr+1, tempval); } static int gfar_set_mac_addr(struct net_device *dev, void *p) { int ret; ret = eth_mac_addr(dev, p); if (ret) return ret; gfar_set_mac_for_addr(dev, 0, dev->dev_addr); return 0; } static void gfar_ints_disable(struct gfar_private *priv) { int i; for (i = 0; i < priv->num_grps; i++) { struct gfar __iomem *regs = priv->gfargrp[i].regs; /* Clear IEVENT */ gfar_write(®s->ievent, IEVENT_INIT_CLEAR); /* Initialize IMASK */ gfar_write(®s->imask, IMASK_INIT_CLEAR); } } static void gfar_ints_enable(struct gfar_private *priv) { int i; for (i = 0; i < priv->num_grps; i++) { struct gfar __iomem *regs = priv->gfargrp[i].regs; /* Unmask the interrupts we look for */ gfar_write(®s->imask, IMASK_DEFAULT | priv->rmon_overflow.imask); } } static int gfar_alloc_tx_queues(struct gfar_private *priv) { int i; for (i = 0; i < priv->num_tx_queues;