patch-2.3.14 linux/drivers/net/3c59x.c

Next file: linux/drivers/net/7990.c
Previous file: linux/drivers/net/3c527.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.13/linux/drivers/net/3c59x.c linux/drivers/net/3c59x.c
@@ -229,14 +229,14 @@
 	const char *name;
 	u16	vendor_id, device_id, device_id_mask, flags;
 	int drv_flags, io_size;
-	struct device *(*probe1)(int pci_bus, int pci_devfn, struct device *dev,
+	struct net_device *(*probe1)(int pci_bus, int pci_devfn, struct net_device *dev,
 							 long ioaddr, int irq, int chip_idx, int fnd_cnt);
 };
 
 enum { IS_VORTEX=1, IS_BOOMERANG=2, IS_CYCLONE=4,
 	   HAS_PWR_CTRL=0x10, HAS_MII=0x20, HAS_NWAY=0x40, HAS_CB_FNS=0x80, };
-static struct device *vortex_probe1(int pci_bus, int pci_devfn,
-									struct device *dev, long ioaddr,
+static struct net_device *vortex_probe1(int pci_bus, int pci_devfn,
+									struct net_device *dev, long ioaddr,
 									int irq, int dev_id, int card_idx);
 static struct pci_id_info pci_tbl[] = {
 	{"3c590 Vortex 10Mbps",			0x10B7, 0x5900, 0xffff,
@@ -422,7 +422,7 @@
 	/* The addresses of transmit- and receive-in-place skbuffs. */
 	struct sk_buff* rx_skbuff[RX_RING_SIZE];
 	struct sk_buff* tx_skbuff[TX_RING_SIZE];
-	struct device *next_module;
+	struct net_device *next_module;
 	void *priv_addr;
 	unsigned int cur_rx, cur_tx;		/* The next free ring entry */
 	unsigned int dirty_rx, dirty_tx;	/* The ring entries to be free()ed. */
@@ -482,23 +482,23 @@
 };
 
 #ifndef CARDBUS
-static int vortex_scan(struct device *dev, struct pci_id_info pci_tbl[]);
+static int vortex_scan(struct net_device *dev, struct pci_id_info pci_tbl[]);
 #endif
-static int vortex_open(struct device *dev);
+static int vortex_open(struct net_device *dev);
 static void mdio_sync(long ioaddr, int bits);
 static int mdio_read(long ioaddr, int phy_id, int location);
 static void mdio_write(long ioaddr, int phy_id, int location, int value);
 static void vortex_timer(unsigned long arg);
-static int vortex_start_xmit(struct sk_buff *skb, struct device *dev);
-static int boomerang_start_xmit(struct sk_buff *skb, struct device *dev);
-static int vortex_rx(struct device *dev);
-static int boomerang_rx(struct device *dev);
+static int vortex_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static int boomerang_start_xmit(struct sk_buff *skb, struct net_device *dev);
+static int vortex_rx(struct net_device *dev);
+static int boomerang_rx(struct net_device *dev);
 static void vortex_interrupt(int irq, void *dev_id, struct pt_regs *regs);
-static int vortex_close(struct device *dev);
-static void update_stats(long ioaddr, struct device *dev);
-static struct net_device_stats *vortex_get_stats(struct device *dev);
-static void set_rx_mode(struct device *dev);
-static int vortex_ioctl(struct device *dev, struct ifreq *rq, int cmd);
+static int vortex_close(struct net_device *dev);
+static void update_stats(long ioaddr, struct net_device *dev);
+static struct net_device_stats *vortex_get_stats(struct net_device *dev);
+static void set_rx_mode(struct net_device *dev);
+static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
 
 
 /* This driver uses 'options' to pass the media type, full-duplex flag, etc. */
@@ -507,7 +507,7 @@
 static int options[MAX_UNITS] = { -1, -1, -1, -1, -1, -1, -1, -1,};
 static int full_duplex[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
 /* A list of all installed Vortex devices, for removing the driver module. */
-static struct device *root_vortex_dev = NULL;
+static struct net_device *root_vortex_dev = NULL;
 
 #ifdef MODULE
 #ifndef CARDBUS
@@ -524,7 +524,7 @@
 	u16 dev_id, vendor_id;
 	u32 io;
 	u8 bus, devfn, irq;
-	struct device *dev;
+	struct net_device *dev;
 	int chip_idx;
 
 	if (loc->bus != LOC_PCI) return NULL;
@@ -566,14 +566,14 @@
 
 static void vortex_detach(dev_node_t *node)
 {
-	struct device **devp, **next;
+	struct net_device **devp, **next;
 	printk(KERN_INFO "vortex_detach(%s)\n", node->dev_name);
 	for (devp = &root_vortex_dev; *devp; devp = next) {
 		next = &((struct vortex_private *)(*devp)->priv)->next_module;
 		if (strcmp((*devp)->name, node->dev_name) == 0) break;
 	}
 	if (*devp) {
-		struct device *dev = *devp;
+		struct net_device *dev = *devp;
 		struct vortex_private *vp = dev->priv;
 		if (dev->flags & IFF_UP)
 			vortex_close(dev);
@@ -608,7 +608,7 @@
 }
 
 #else
-int tc59x_probe(struct device *dev)
+int tc59x_probe(struct net_device *dev)
 {
 	static int scanned=0;
 	if(scanned++)
@@ -619,7 +619,7 @@
 #endif  /* not MODULE */
 
 #ifndef CARDBUS
-static int vortex_scan(struct device *dev, struct pci_id_info pci_tbl[])
+static int vortex_scan(struct net_device *dev, struct pci_id_info pci_tbl[])
 {
 	int cards_found = 0;
 
@@ -762,8 +762,8 @@
 }
 #endif  /* ! Cardbus */
 
-static struct device *vortex_probe1(int pci_bus, int pci_devfn,
-									struct device *dev, long ioaddr,
+static struct net_device *vortex_probe1(int pci_bus, int pci_devfn,
+									struct net_device *dev, long ioaddr,
 									int irq, int chip_idx, int card_idx)
 {
 	struct vortex_private *vp;
@@ -964,7 +964,7 @@
 
 
 static int
-vortex_open(struct device *dev)
+vortex_open(struct net_device *dev)
 {
 	long ioaddr = dev->base_addr;
 	struct vortex_private *vp = (struct vortex_private *)dev->priv;
@@ -1159,7 +1159,7 @@
 
 static void vortex_timer(unsigned long data)
 {
-	struct device *dev = (struct device *)data;
+	struct net_device *dev = (struct net_device *)data;
 	struct vortex_private *vp = (struct vortex_private *)dev->priv;
 	long ioaddr = dev->base_addr;
 	int next_tick = 0;
@@ -1261,7 +1261,7 @@
 	return;
 }
 
-static void vortex_tx_timeout(struct device *dev)
+static void vortex_tx_timeout(struct net_device *dev)
 {
 	struct vortex_private *vp = (struct vortex_private *)dev->priv;
 	long ioaddr = dev->base_addr;
@@ -1332,7 +1332,7 @@
  * the cache impact.
  */
 static void
-vortex_error(struct device *dev, int status)
+vortex_error(struct net_device *dev, int status)
 {
 	struct vortex_private *vp = (struct vortex_private *)dev->priv;
 	long ioaddr = dev->base_addr;
@@ -1421,7 +1421,7 @@
 
 
 static int
-vortex_start_xmit(struct sk_buff *skb, struct device *dev)
+vortex_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct vortex_private *vp = (struct vortex_private *)dev->priv;
 	long ioaddr = dev->base_addr;
@@ -1483,7 +1483,7 @@
 }
 
 static int
-boomerang_start_xmit(struct sk_buff *skb, struct device *dev)
+boomerang_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct vortex_private *vp = (struct vortex_private *)dev->priv;
 	long ioaddr = dev->base_addr;
@@ -1547,7 +1547,7 @@
    after the Tx thread. */
 static void vortex_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-	struct device *dev = dev_id;
+	struct net_device *dev = dev_id;
 	struct vortex_private *vp = (struct vortex_private *)dev->priv;
 	long ioaddr;
 	int latency, status;
@@ -1672,7 +1672,7 @@
 	return;
 }
 
-static int vortex_rx(struct device *dev)
+static int vortex_rx(struct net_device *dev)
 {
 	struct vortex_private *vp = (struct vortex_private *)dev->priv;
 	long ioaddr = dev->base_addr;
@@ -1745,7 +1745,7 @@
 }
 
 static int
-boomerang_rx(struct device *dev)
+boomerang_rx(struct net_device *dev)
 {
 	struct vortex_private *vp = (struct vortex_private *)dev->priv;
 	int entry = vp->cur_rx % RX_RING_SIZE;
@@ -1841,7 +1841,7 @@
 }
 
 static int
-vortex_close(struct device *dev)
+vortex_close(struct net_device *dev)
 {
 	struct vortex_private *vp = (struct vortex_private *)dev->priv;
 	long ioaddr = dev->base_addr;
@@ -1901,7 +1901,7 @@
 	return 0;
 }
 
-static struct net_device_stats *vortex_get_stats(struct device *dev)
+static struct net_device_stats *vortex_get_stats(struct net_device *dev)
 {
 	struct vortex_private *vp = (struct vortex_private *)dev->priv;
 	unsigned long flags;
@@ -1922,7 +1922,7 @@
 	table.  This is done by checking that the ASM (!) code generated uses
 	atomic updates with '+='.
 	*/
-static void update_stats(long ioaddr, struct device *dev)
+static void update_stats(long ioaddr, struct net_device *dev)
 {
 	struct vortex_private *vp = (struct vortex_private *)dev->priv;
 
@@ -1953,7 +1953,7 @@
 	return;
 }
 
-static int vortex_ioctl(struct device *dev, struct ifreq *rq, int cmd)
+static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 {
 	struct vortex_private *vp = (struct vortex_private *)dev->priv;
 	long ioaddr = dev->base_addr;
@@ -1981,7 +1981,7 @@
 /* Pre-Cyclone chips have no documented multicast filter, so the only
    multicast setting is to receive all multicast frames.  At least
    the chip has a very clean way to set the mode, unlike many others. */
-static void set_rx_mode(struct device *dev)
+static void set_rx_mode(struct net_device *dev)
 {
 	long ioaddr = dev->base_addr;
 	int new_mode;
@@ -2096,7 +2096,7 @@
 #ifdef MODULE
 void cleanup_module(void)
 {
-	struct device *next_dev;
+	struct net_device *next_dev;
 
 #ifdef CARDBUS
 	unregister_driver(&vortex_ops);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)