Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122551
b: refs/heads/master
c: b74ca3a
h: refs/heads/master
i:
  122549: 67fa5d3
  122547: f1cb9b3
  122543: 617b828
v: v3
  • Loading branch information
Wang Chen authored and David S. Miller committed Dec 8, 2008
1 parent 3608c1d commit 6217291
Show file tree
Hide file tree
Showing 19 changed files with 25 additions and 30 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5a001a070e032bea1be563b13ebf9819cd5e54d4
refs/heads/master: b74ca3a896b9ab5f952bc440154758e708c48884
2 changes: 1 addition & 1 deletion trunk/Documentation/networking/driver.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Transmit path guidelines:
static int drv_hard_start_xmit(struct sk_buff *skb,
struct net_device *dev)
{
struct drv *dp = dev->priv;
struct drv *dp = netdev_priv(dev);

lock_tx(dp);
...
Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/networking/netdevices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ There are routines in net_init.c to handle the common cases of
alloc_etherdev, alloc_netdev. These reserve extra space for driver
private data which gets freed when the network device is freed. If
separately allocated data is attached to the network device
(dev->priv) then it is up to the module exit handler to free that.
(netdev_priv(dev)) then it is up to the module exit handler to free that.

MTU
===
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/3c501.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static const struct ethtool_ops netdev_ethtool_ops;
static int el_debug = EL_DEBUG;

/*
* Board-specific info in dev->priv.
* Board-specific info in netdev_priv(dev).
*/

struct net_local
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/atp.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ static unsigned short __init eeprom_op(long ioaddr, u32 cmd)
registers that "should" only need to be set once at boot, so that
there is non-reboot way to recover if something goes wrong.
This is an attachable device: if there is no dev->priv entry then it wasn't
This is an attachable device: if there is no private entry then it wasn't
probed for at boot-time, and we need to probe for it again.
*/
static int net_open(struct net_device *dev)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/eexpress.c
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,7 @@ static void eexp_hw_tx_pio(struct net_device *dev, unsigned short *buf,
/*
* Sanity check the suspected EtherExpress card
* Read hardware address, reset card, size memory and initialize buffer
* memory pointers. These are held in dev->priv, in case someone has more
* memory pointers. These are held in netdev_priv(), in case someone has more
* than one card in a machine.
*/

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/forcedeth.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,12 +712,12 @@ struct nv_skb_map {

/*
* SMP locking:
* All hardware access under dev->priv->lock, except the performance
* All hardware access under netdev_priv(dev)->lock, except the performance
* critical parts:
* - rx is (pseudo-) lockless: it relies on the single-threading provided
* by the arch code for interrupts.
* - tx setup is lockless: it relies on netif_tx_lock. Actual submission
* needs dev->priv->lock :-(
* needs netdev_priv(dev)->lock :-(
* - set_multicast_list: preparation lockless, relies on netif_tx_lock.
*/

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/lance.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ static int __init lance_probe1(struct net_device *dev, int ioaddr, int irq, int
}
}

/* We can't allocate dev->priv from alloc_etherdev() because it must
/* We can't allocate private data from alloc_etherdev() because it must
a ISA DMA-able region. */
chipname = chip_table[lance_version].name;
printk("%s: %s at %#3x, ", dev->name, chipname, ioaddr);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/myri_sbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ static int __devinit myri_sbus_probe(struct of_device *op, const struct of_devic
err_free_irq:
free_irq(dev->irq, dev);
err:
/* This will also free the co-allocated 'dev->priv' */
/* This will also free the co-allocated private data*/
free_netdev(dev);
return -ENODEV;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/pci-skeleton.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ static int __devinit netdrv_init_one (struct pci_dev *pdev,
dev->irq = pdev->irq;
dev->base_addr = (unsigned long) ioaddr;

/* dev->priv/tp zeroed and aligned in alloc_etherdev */
/* netdev_priv()/tp zeroed and aligned in alloc_etherdev */
tp = netdev_priv(dev);

/* note: tp->chipset set in netdrv_init_board */
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/sun3_82586.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ static int sun3_82586_open(struct net_device *dev)
static int check586(struct net_device *dev,char *where,unsigned size)
{
struct priv pb;
struct priv *p = /* (struct priv *) dev->priv*/ &pb;
struct priv *p = &pb;
char *iscp_addr;
int i;

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/sunbmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1233,7 +1233,7 @@ static int __devinit bigmac_ether_init(struct of_device *op,
bp->bmac_block,
bp->bblock_dvma);

/* This also frees the co-located 'dev->priv' */
/* This also frees the co-located private data */
free_netdev(dev);
return -ENODEV;
}
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/net/tokenring/3c359.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,9 @@ static int __devinit xl_probe(struct pci_dev *pdev,
} ;

/*
* Allowing init_trdev to allocate the dev->priv structure will align xl_private
* on a 32 bytes boundary which we need for the rx/tx descriptors
* Allowing init_trdev to allocate the private data will align
* xl_private on a 32 bytes boundary which we need for the rx/tx
* descriptors
*/

dev = alloc_trdev(sizeof(struct xl_private)) ;
Expand Down
9 changes: 5 additions & 4 deletions trunk/drivers/net/via-rhine.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,13 @@ IIId. Synchronization
The driver runs as two independent, single-threaded flows of control. One
is the send-packet routine, which enforces single-threaded use by the
dev->priv->lock spinlock. The other thread is the interrupt handler, which
is single threaded by the hardware and interrupt handling software.
netdev_priv(dev)->lock spinlock. The other thread is the interrupt handler,
which is single threaded by the hardware and interrupt handling software.
The send packet thread has partial control over the Tx ring. It locks the
dev->priv->lock whenever it's queuing a Tx packet. If the next slot in the ring
is not available it stops the transmit queue by calling netif_stop_queue.
netdev_priv(dev)->lock whenever it's queuing a Tx packet. If the next slot in
the ring is not available it stops the transmit queue by
calling netif_stop_queue.
The interrupt handler has exclusive control over the Rx ring and records stats
from the Tx ring. After reaping the stats, it marks the Tx queue entry as
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/strip.c
Original file line number Diff line number Diff line change
Expand Up @@ -2494,7 +2494,7 @@ static void strip_dev_setup(struct net_device *dev)
dev->type = ARPHRD_METRICOM; /* dtang */
dev->hard_header_len = sizeof(STRIP_Header);
/*
* dev->priv Already holds a pointer to our struct strip
* netdev_priv(dev) Already holds a pointer to our struct strip
*/

*(MetricomAddress *) & dev->broadcast = broadcast_address;
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/hdlc.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct hdlc_proto {
};


/* Pointed to by dev->priv */
/* Pointed to by netdev_priv(dev) */
typedef struct hdlc_device {
/* used by HDLC layer to take control over HDLC device from hw driver*/
int (*attach)(struct net_device *dev,
Expand Down
1 change: 0 additions & 1 deletion trunk/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,6 @@ struct net_device
/*
* One part is mostly used on xmit path (device)
*/
void *priv; /* pointer to private data */
/* These may be needed for future network-power-down code. */
unsigned long trans_start; /* Time (in jiffies) of last Tx */

Expand Down
4 changes: 2 additions & 2 deletions trunk/net/atm/mpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ static const char *mpoa_device_type_string(char type)
}

/*
* lec device calls this via its dev->priv->lane2_ops->associate_indicator()
* when it sees a TLV in LE_ARP packet.
* lec device calls this via its netdev_priv(dev)->lane2_ops
* ->associate_indicator() when it sees a TLV in LE_ARP packet.
* We fill in the pointer above when we see a LANE2 lec initializing
* See LANE2 spec 3.1.5
*
Expand Down
6 changes: 0 additions & 6 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -4378,12 +4378,6 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name,
dev->num_tx_queues = queue_count;
dev->real_num_tx_queues = queue_count;

if (sizeof_priv) {
dev->priv = ((char *)dev +
((sizeof(struct net_device) + NETDEV_ALIGN_CONST)
& ~NETDEV_ALIGN_CONST));
}

dev->gso_max_size = GSO_MAX_SIZE;

netdev_init_queues(dev);
Expand Down

0 comments on commit 6217291

Please sign in to comment.