Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122343
b: refs/heads/master
c: b5ddedc
h: refs/heads/master
i:
  122341: 11619ab
  122339: df10d98
  122335: f6e6583
v: v3
  • Loading branch information
David S. Miller committed Nov 26, 2008
1 parent 59c2c10 commit eb3045d
Show file tree
Hide file tree
Showing 122 changed files with 1,608 additions and 1,064 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: b235507cc5e552b9e75678d596727249e8fba01b
refs/heads/master: b5ddedc9cc01b1d86015af08c5f1694191804530
18 changes: 16 additions & 2 deletions trunk/drivers/net/3c503.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,21 @@ struct net_device * __init el2_probe(int unit)
}
#endif

static const struct net_device_ops el2_netdev_ops = {
.ndo_open = el2_open,
.ndo_stop = el2_close,

.ndo_start_xmit = eip_start_xmit,
.ndo_tx_timeout = eip_tx_timeout,
.ndo_get_stats = eip_get_stats,
.ndo_set_multicast_list = eip_set_multicast_list,
.ndo_validate_addr = eth_validate_addr,
.ndo_change_mtu = eth_change_mtu,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = eip_poll,
#endif
};

/* Probe for the Etherlink II card at I/O port base IOADDR,
returning non-zero on success. If found, set the station
address and memory parameters in DEVICE. */
Expand Down Expand Up @@ -335,8 +350,7 @@ el2_probe1(struct net_device *dev, int ioaddr)

ei_status.saved_irq = dev->irq;

dev->open = &el2_open;
dev->stop = &el2_close;
dev->netdev_ops = &el2_netdev_ops;
dev->ethtool_ops = &netdev_ethtool_ops;
#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = eip_poll;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/3c523.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,14 +576,14 @@ static int __init do_elmc_probe(struct net_device *dev)
return retval;
}

#ifdef MODULE
static void cleanup_card(struct net_device *dev)
{
mca_set_adapter_procfn(((struct priv *)netdev_priv(dev))->slot,
NULL, NULL);
release_region(dev->base_addr, ELMC_IO_EXTENT);
}

#ifndef MODULE
#else
struct net_device * __init elmc_probe(int unit)
{
struct net_device *dev = alloc_etherdev(sizeof(struct priv));
Expand Down
39 changes: 39 additions & 0 deletions trunk/drivers/net/8390.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,30 @@ int ei_close(struct net_device *dev)
}
EXPORT_SYMBOL(ei_close);

int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
return __ei_start_xmit(skb, dev);
}
EXPORT_SYMBOL(ei_start_xmit);

struct net_device_stats *ei_get_stats(struct net_device *dev)
{
return __ei_get_stats(dev);
}
EXPORT_SYMBOL(ei_get_stats);

void ei_set_multicast_list(struct net_device *dev)
{
__ei_set_multicast_list(dev);
}
EXPORT_SYMBOL(ei_set_multicast_list);

void ei_tx_timeout(struct net_device *dev)
{
__ei_tx_timeout(dev);
}
EXPORT_SYMBOL(ei_tx_timeout);

irqreturn_t ei_interrupt(int irq, void *dev_id)
{
return __ei_interrupt(irq, dev_id);
Expand All @@ -31,6 +55,21 @@ void ei_poll(struct net_device *dev)
EXPORT_SYMBOL(ei_poll);
#endif

const struct net_device_ops ei_netdev_ops = {
.ndo_open = ei_open,
.ndo_stop = ei_close,
.ndo_start_xmit = ei_start_xmit,
.ndo_tx_timeout = ei_tx_timeout,
.ndo_get_stats = ei_get_stats,
.ndo_set_multicast_list = ei_set_multicast_list,
.ndo_validate_addr = eth_validate_addr,
.ndo_change_mtu = eth_change_mtu,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = ei_poll,
#endif
};
EXPORT_SYMBOL(ei_netdev_ops);

struct net_device *__alloc_ei_netdev(int size)
{
return ____alloc_ei_netdev(size);
Expand Down
18 changes: 14 additions & 4 deletions trunk/drivers/net/8390.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,19 @@ extern void ei_poll(struct net_device *dev);
extern void eip_poll(struct net_device *dev);
#endif

extern void ei_tx_timeout(struct net_device *dev);
extern int ei_start_xmit(struct sk_buff *skb, struct net_device *dev);
extern void ei_set_multicast_list(struct net_device *dev);
extern struct net_device_stats *ei_get_stats(struct net_device *dev);

/* Without I/O delay - non ISA or later chips */
extern void NS8390_init(struct net_device *dev, int startp);
extern int ei_open(struct net_device *dev);
extern int ei_close(struct net_device *dev);
extern irqreturn_t ei_interrupt(int irq, void *dev_id);
extern void ei_tx_timeout(struct net_device *dev);
extern int ei_start_xmit(struct sk_buff *skb, struct net_device *dev);
extern void ei_set_multicast_list(struct net_device *dev);
extern struct net_device_stats *ei_get_stats(struct net_device *dev);

extern const struct net_device_ops ei_netdev_ops;

extern struct net_device *__alloc_ei_netdev(int size);
static inline struct net_device *alloc_ei_netdev(void)
{
Expand All @@ -54,6 +57,13 @@ extern void NS8390p_init(struct net_device *dev, int startp);
extern int eip_open(struct net_device *dev);
extern int eip_close(struct net_device *dev);
extern irqreturn_t eip_interrupt(int irq, void *dev_id);
extern void eip_tx_timeout(struct net_device *dev);
extern int eip_start_xmit(struct sk_buff *skb, struct net_device *dev);
extern void eip_set_multicast_list(struct net_device *dev);
extern struct net_device_stats *eip_get_stats(struct net_device *dev);

extern const struct net_device_ops eip_netdev_ops;

extern struct net_device *__alloc_eip_netdev(int size);
static inline struct net_device *alloc_eip_netdev(void)
{
Expand Down
39 changes: 39 additions & 0 deletions trunk/drivers/net/8390p.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,30 @@ int eip_close(struct net_device *dev)
}
EXPORT_SYMBOL(eip_close);

int eip_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
return __ei_start_xmit(skb, dev);
}
EXPORT_SYMBOL(eip_start_xmit);

struct net_device_stats *eip_get_stats(struct net_device *dev)
{
return __ei_get_stats(dev);
}
EXPORT_SYMBOL(eip_get_stats);

void eip_set_multicast_list(struct net_device *dev)
{
__ei_set_multicast_list(dev);
}
EXPORT_SYMBOL(eip_set_multicast_list);

void eip_tx_timeout(struct net_device *dev)
{
__ei_tx_timeout(dev);
}
EXPORT_SYMBOL(eip_tx_timeout);

irqreturn_t eip_interrupt(int irq, void *dev_id)
{
return __ei_interrupt(irq, dev_id);
Expand All @@ -36,6 +60,21 @@ void eip_poll(struct net_device *dev)
EXPORT_SYMBOL(eip_poll);
#endif

const struct net_device_ops eip_netdev_ops = {
.ndo_open = eip_open,
.ndo_stop = eip_close,
.ndo_start_xmit = eip_start_xmit,
.ndo_tx_timeout = eip_tx_timeout,
.ndo_get_stats = eip_get_stats,
.ndo_set_multicast_list = eip_set_multicast_list,
.ndo_validate_addr = eth_validate_addr,
.ndo_change_mtu = eth_change_mtu,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = eip_poll,
#endif
};
EXPORT_SYMBOL(eip_netdev_ops);

struct net_device *__alloc_eip_netdev(int size)
{
return ____alloc_ei_netdev(size);
Expand Down
26 changes: 2 additions & 24 deletions trunk/drivers/net/apne.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@
struct net_device * __init apne_probe(int unit);
static int apne_probe1(struct net_device *dev, int ioaddr);

static int apne_open(struct net_device *dev);
static int apne_close(struct net_device *dev);

static void apne_reset_8390(struct net_device *dev);
static void apne_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr,
int ring_page);
Expand Down Expand Up @@ -314,6 +311,7 @@ static int __init apne_probe1(struct net_device *dev, int ioaddr)

dev->base_addr = ioaddr;
dev->irq = IRQ_AMIGA_PORTS;
dev->netdev_ops = &ei_netdev_ops;

/* Install the Interrupt handler */
i = request_irq(dev->irq, apne_interrupt, IRQF_SHARED, DRV_NAME, dev);
Expand All @@ -337,11 +335,7 @@ static int __init apne_probe1(struct net_device *dev, int ioaddr)
ei_status.block_input = &apne_block_input;
ei_status.block_output = &apne_block_output;
ei_status.get_8390_hdr = &apne_get_8390_hdr;
dev->open = &apne_open;
dev->stop = &apne_close;
#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = ei_poll;
#endif

NS8390_init(dev, 0);

pcmcia_ack_int(pcmcia_get_intreq()); /* ack PCMCIA int req */
Expand All @@ -352,22 +346,6 @@ static int __init apne_probe1(struct net_device *dev, int ioaddr)
return 0;
}

static int
apne_open(struct net_device *dev)
{
ei_open(dev);
return 0;
}

static int
apne_close(struct net_device *dev)
{
if (ei_debug > 1)
printk("%s: Shutting down ethercard.\n", dev->name);
ei_close(dev);
return 0;
}

/* Hard reset the card. This used to pause for the same period that a
8390 reset command required, but that shouldn't be necessary. */
static void
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/atlx/atl2.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,15 +644,13 @@ static int atl2_request_irq(struct atl2_adapter *adapter)
int flags, err = 0;

flags = IRQF_SHARED;
#ifdef CONFIG_PCI_MSI
adapter->have_msi = true;
err = pci_enable_msi(adapter->pdev);
if (err)
adapter->have_msi = false;

if (adapter->have_msi)
flags &= ~IRQF_SHARED;
#endif

return request_irq(adapter->pdev->irq, &atl2_intr, flags, netdev->name,
netdev);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/cassini.c
Original file line number Diff line number Diff line change
Expand Up @@ -2347,7 +2347,7 @@ static int cas_rx_ringN(struct cas *cp, int ring, int budget)
drops = 0;
while (1) {
struct cas_rx_comp *rxc = rxcs + entry;
struct sk_buff *skb;
struct sk_buff *uninitialized_var(skb);
int type, len;
u64 words[4];
int i, dring;
Expand Down
7 changes: 6 additions & 1 deletion trunk/drivers/net/depca.c
Original file line number Diff line number Diff line change
Expand Up @@ -1556,6 +1556,7 @@ static int __init depca_isa_probe (struct platform_device *device)
#ifdef CONFIG_EISA
static int __init depca_eisa_probe (struct device *device)
{
enum depca_type adapter = unknown;
struct eisa_device *edev;
struct net_device *dev;
struct depca_private *lp;
Expand All @@ -1574,7 +1575,11 @@ static int __init depca_eisa_probe (struct device *device)
* the EISA configuration structures (yet... :-), just rely on
* the ISA probing to sort it out... */

depca_shmem_probe (&mem_start);
adapter = depca_shmem_probe (&mem_start);
if (adapter == unknown) {
status = -ENODEV;
goto out_free;
}

dev->base_addr = ioaddr;
dev->irq = irq;
Expand Down
24 changes: 18 additions & 6 deletions trunk/drivers/net/e2100.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static void e21_block_output(struct net_device *dev, int count,
const unsigned char *buf, int start_page);
static void e21_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr,
int ring_page);

static int e21_open(struct net_device *dev);
static int e21_close(struct net_device *dev);


Expand Down Expand Up @@ -160,6 +160,21 @@ struct net_device * __init e2100_probe(int unit)
}
#endif

static const struct net_device_ops e21_netdev_ops = {
.ndo_open = e21_open,
.ndo_stop = e21_close,

.ndo_start_xmit = ei_start_xmit,
.ndo_tx_timeout = ei_tx_timeout,
.ndo_get_stats = ei_get_stats,
.ndo_set_multicast_list = ei_set_multicast_list,
.ndo_validate_addr = eth_validate_addr,
.ndo_change_mtu = eth_change_mtu,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = ei_poll,
#endif
};

static int __init e21_probe1(struct net_device *dev, int ioaddr)
{
int i, status, retval;
Expand Down Expand Up @@ -265,11 +280,8 @@ static int __init e21_probe1(struct net_device *dev, int ioaddr)
ei_status.block_input = &e21_block_input;
ei_status.block_output = &e21_block_output;
ei_status.get_8390_hdr = &e21_get_8390_hdr;
dev->open = &e21_open;
dev->stop = &e21_close;
#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = ei_poll;
#endif

dev->netdev_ops = &e21_netdev_ops;
NS8390_init(dev, 0);

retval = register_netdev(dev);
Expand Down
25 changes: 1 addition & 24 deletions trunk/drivers/net/es3210.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ static const char version[] =

static int es_probe1(struct net_device *dev, int ioaddr);

static int es_open(struct net_device *dev);
static int es_close(struct net_device *dev);

static void es_reset_8390(struct net_device *dev);

static void es_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_page);
Expand Down Expand Up @@ -289,11 +286,7 @@ static int __init es_probe1(struct net_device *dev, int ioaddr)
ei_status.block_output = &es_block_output;
ei_status.get_8390_hdr = &es_get_8390_hdr;

dev->open = &es_open;
dev->stop = &es_close;
#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = ei_poll;
#endif
dev->netdev_ops = &ei_netdev_ops;
NS8390_init(dev, 0);

retval = register_netdev(dev);
Expand Down Expand Up @@ -385,22 +378,6 @@ static void es_block_output(struct net_device *dev, int count,
memcpy_toio(shmem, buf, count);
}

static int es_open(struct net_device *dev)
{
ei_open(dev);
return 0;
}

static int es_close(struct net_device *dev)
{

if (ei_debug > 1)
printk("%s: Shutting down ethercard.\n", dev->name);

ei_close(dev);
return 0;
}

#ifdef MODULE
#define MAX_ES_CARDS 4 /* Max number of ES3210 cards per module */
#define NAMELEN 8 /* # of chars for storing dev->name */
Expand Down
Loading

0 comments on commit eb3045d

Please sign in to comment.