Hi Dominique, On Thursday 19 February 2009 01:06:29 Dominique Leuenberger wrote: > Hi, > > Just downloaded the latest tarball and trying to build the new rpms for > openSUSE. So far no luck. the vmxnet module seems not to be building > anymore: >
The following should help with vmxnet, I will look in vmxnet3 in a bit. -- Dmitry --- a/modules/linux/vmxnet/vmxnet.c +++ b/modules/linux/vmxnet/vmxnet.c @@ -184,7 +184,7 @@ static int vmxnet_change_mtu(struct net_device *dev, int new_mtu) { - struct Vmxnet_Private *lp = (struct Vmxnet_Private *)dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); if (new_mtu < VMXNET_MIN_MTU || new_mtu > VMXNET_MAX_MTU) { return -EINVAL; @@ -258,7 +258,7 @@ vmxnet_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *drvinfo) { - struct Vmxnet_Private *lp = dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); strncpy(drvinfo->driver, vmxnet_driver.name, sizeof(drvinfo->driver)); drvinfo->driver[sizeof(drvinfo->driver) - 1] = '\0'; @@ -296,7 +296,7 @@ vmxnet_set_tso(struct net_device *dev, u32 data) { if (data) { - struct Vmxnet_Private *lp = (struct Vmxnet_Private *)dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); if (!lp->tso) { return -EINVAL; @@ -448,7 +448,7 @@ } if (value.data) { - struct Vmxnet_Private *lp = (struct Vmxnet_Private *)dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); if (!lp->tso) { return -EINVAL; @@ -620,7 +620,7 @@ static void vmxnet_tx_timeout(struct net_device *dev) { - compat_netif_wake_queue(dev); + netif_wake_queue(dev); } #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,43) */ @@ -646,11 +646,10 @@ { #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,43) struct net_device *dev = (struct net_device *)data; - struct Vmxnet_Private *lp; + struct Vmxnet_Private *lp = netdev_priv(dev); uint32 status; int ok; - lp = dev->priv; status = inl(dev->base_addr + VMXNET_STATUS_ADDR); ok = (status & VMXNET_STATUS_CONNECTED) != 0; if (ok != netif_carrier_ok(dev)) { @@ -825,13 +824,13 @@ } } - dev = compat_alloc_etherdev(sizeof *lp); + dev = alloc_etherdev(sizeof *lp); if (!dev) { printk(KERN_ERR "Unable to allocate ethernet device\n"); goto morph_back; } - lp = dev->priv; + lp = netdev_priv(dev); lp->pdev = pdev; dev->base_addr = ioaddr; @@ -1085,14 +1084,14 @@ #endif compat_pci_unmap_single(lp->pdev, lp->ddPA, lp->ddSize, PCI_DMA_BIDIRECTIONAL); kfree(lp->dd); -free_dev:; - compat_free_netdev(dev); -morph_back:; +free_dev: + free_netdev(dev); +morph_back: if (morphed) { /* Morph back to LANCE hw. */ outw(LANCE_CHIP, ioaddr - MORPH_PORT_SIZE); } -release_reg:; +release_reg: release_region(reqIOAddr, reqIOSize); pci_disable:; compat_pci_disable_device(pdev); @@ -1119,7 +1118,7 @@ vmxnet_remove_device(struct pci_dev* pdev) { struct net_device *dev = pci_get_drvdata(pdev); - struct Vmxnet_Private *lp = dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); /* * Do this before device is gone so we never call netif_carrier_* after @@ -1170,7 +1169,7 @@ compat_pci_unmap_single(lp->pdev, lp->ddPA, lp->ddSize, PCI_DMA_BIDIRECTIONAL); kfree(lp->dd); - compat_free_netdev(dev); + free_netdev(dev); compat_pci_disable_device(pdev); } @@ -1193,7 +1192,7 @@ static int vmxnet_init_ring(struct net_device *dev) { - struct Vmxnet_Private *lp = (Vmxnet_Private *)dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); Vmxnet2_DriverData *dd = lp->dd; unsigned int i; size_t offset; @@ -1321,7 +1320,7 @@ static int vmxnet_open(struct net_device *dev) { - struct Vmxnet_Private *lp = (Vmxnet_Private *)dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); unsigned int ioaddr = dev->base_addr; uint32 ddPA; @@ -1351,7 +1350,7 @@ #endif lp->dd->txStopped = FALSE; - compat_netif_start_queue(dev); + netif_start_queue(dev); #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,43) dev->interrupt = 0; @@ -1575,7 +1574,7 @@ static void check_tx_queue(struct net_device *dev) { - Vmxnet_Private *lp = (Vmxnet_Private *)dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); Vmxnet2_DriverData *dd = lp->dd; int completed = 0; @@ -1611,8 +1610,8 @@ lp->numTxPending -= completed; // XXX conditionally wake up the queue based on the # of freed entries - if (compat_netif_queue_stopped(dev)) { - compat_netif_wake_queue(dev); + if (netif_queue_stopped(dev)) { + netif_wake_queue(dev); dd->txStopped = FALSE; } } @@ -1643,7 +1642,7 @@ vmxnet_tx(struct sk_buff *skb, struct net_device *dev) { Vmxnet_TxStatus status = VMXNET_DEFER_TRANSMIT; - struct Vmxnet_Private *lp = (struct Vmxnet_Private *)dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); Vmxnet2_DriverData *dd = lp->dd; unsigned long flags; Vmxnet2_TxRingEntry *xre; @@ -1684,7 +1683,7 @@ /* check for the availability of tx ring entries */ if (dd->txRingLength - lp->numTxPending < txEntries) { dd->txStopped = TRUE; - compat_netif_stop_queue(dev); + netif_stop_queue(dev); check_tx_queue(dev); spin_unlock_irqrestore(&lp->txLock, flags); @@ -1814,7 +1813,7 @@ if (lp->txBufInfo[dd->txDriverNext].skb != NULL) { dd->txStopped = TRUE; - compat_netif_stop_queue(dev); + netif_stop_queue(dev); check_tx_queue(dev); spin_unlock_irqrestore(&lp->txLock, flags); @@ -2043,7 +2042,7 @@ static int vmxnet_rx(struct net_device *dev) { - Vmxnet_Private *lp = (Vmxnet_Private *)dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); Vmxnet2_DriverData *dd = lp->dd; if (!lp->devOpen) { @@ -2173,7 +2172,7 @@ } - lp = (struct Vmxnet_Private *)dev->priv; + lp = netdev_priv(dev); outl(VMXNET_CMD_INTR_ACK, dev->base_addr + VMXNET_COMMAND_ADDR); dd = lp->dd; @@ -2194,8 +2193,8 @@ spin_unlock(&lp->txLock); } - if (compat_netif_queue_stopped(dev) && !lp->dd->txStopped) { - compat_netif_wake_queue(dev); + if (netif_queue_stopped(dev) && !lp->dd->txStopped) { + netif_wake_queue(dev); } #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,43) @@ -2255,7 +2254,7 @@ vmxnet_close(struct net_device *dev) { unsigned int ioaddr = dev->base_addr; - Vmxnet_Private *lp = (Vmxnet_Private *)dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); int i; unsigned long flags; @@ -2267,7 +2266,7 @@ dev->start = 0; #endif - compat_netif_stop_queue(dev); + netif_stop_queue(dev); lp->devOpen = FALSE; @@ -2348,7 +2347,7 @@ static int vmxnet_load_multicast (struct net_device *dev) { - Vmxnet_Private *lp = (Vmxnet_Private *) dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); volatile u16 *mcast_table = (u16 *)lp->dd->LADRF; struct dev_mc_list *dmi = dev->mc_list; char *addrs; @@ -2409,7 +2408,7 @@ vmxnet_set_multicast_list(struct net_device *dev) { unsigned int ioaddr = dev->base_addr; - Vmxnet_Private *lp = (Vmxnet_Private *)dev->priv; + struct Vmxnet_Private *lp = netdev_priv(dev); lp->dd->ifflags = ~(VMXNET_IFF_PROMISC |VMXNET_IFF_BROADCAST @@ -2459,7 +2458,7 @@ unsigned int ioaddr = dev->base_addr; int i; - if (compat_netif_running(dev)) + if (netif_running(dev)) return -EBUSY; memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); @@ -2489,7 +2488,7 @@ static struct net_device_stats * vmxnet_get_stats(struct net_device *dev) { - Vmxnet_Private *lp = (Vmxnet_Private *)dev->priv; + Vmxnet_Private *lp = netdev_priv(dev); return &lp->stats; } ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ open-vm-tools-devel mailing list open-vm-tools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-vm-tools-devel