git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
drivers
/
net
/
via-velocity.c
diff --git
a/drivers/net/via-velocity.c
b/drivers/net/via-velocity.c
index
3102c68
..
ed1f837
100644
(file)
--- a/
drivers/net/via-velocity.c
+++ b/
drivers/net/via-velocity.c
@@
-61,7
+61,6
@@
#include <linux/timer.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/timer.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
-#include <linux/version.h>
#include <linux/string.h>
#include <linux/wait.h>
#include <asm/io.h>
#include <linux/string.h>
#include <linux/wait.h>
#include <asm/io.h>
@@
-263,7
+262,7
@@
static int velocity_set_media_mode(struct velocity_info *vptr, u32 mii_status);
#ifdef CONFIG_PM
#ifdef CONFIG_PM
-static int velocity_suspend(struct pci_dev *pdev,
u32
state);
+static int velocity_suspend(struct pci_dev *pdev,
pm_message_t
state);
static int velocity_resume(struct pci_dev *pdev);
static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr);
static int velocity_resume(struct pci_dev *pdev);
static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr);
@@
-792,7
+791,7
@@
static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi
#endif
if (vptr->flags & VELOCITY_FLAGS_TX_CSUM) {
#endif
if (vptr->flags & VELOCITY_FLAGS_TX_CSUM) {
- dev->features |= NETIF_F_
HW
_CSUM;
+ dev->features |= NETIF_F_
IP
_CSUM;
}
ret = register_netdev(dev);
}
ret = register_netdev(dev);
@@
-1107,6
+1106,9
@@
static void velocity_free_rd_ring(struct velocity_info *vptr)
for (i = 0; i < vptr->options.numrx; i++) {
struct velocity_rd_info *rd_info = &(vptr->rd_info[i]);
for (i = 0; i < vptr->options.numrx; i++) {
struct velocity_rd_info *rd_info = &(vptr->rd_info[i]);
+ struct rx_desc *rd = vptr->rd_ring + i;
+
+ memset(rd, 0, sizeof(*rd));
if (!rd_info->skb)
continue;
if (!rd_info->skb)
continue;
@@
-1212,10
+1214,8
@@
static void velocity_free_td_ring(struct velocity_info *vptr)
velocity_free_td_ring_entry(vptr, j, i);
}
velocity_free_td_ring_entry(vptr, j, i);
}
- if (vptr->td_infos[j]) {
- kfree(vptr->td_infos[j]);
- vptr->td_infos[j] = NULL;
- }
+ kfree(vptr->td_infos[j]);
+ vptr->td_infos[j] = NULL;
}
}
}
}
@@
-1335,7
+1335,7
@@
static inline int velocity_rx_copy(struct sk_buff **rx_skb, int pkt_size,
if (vptr->flags & VELOCITY_FLAGS_IP_ALIGN)
skb_reserve(new_skb, 2);
if (vptr->flags & VELOCITY_FLAGS_IP_ALIGN)
skb_reserve(new_skb, 2);
- memcpy(new_skb->data, rx_skb[0]->
tail
, pkt_size);
+ memcpy(new_skb->data, rx_skb[0]->
data
, pkt_size);
*rx_skb = new_skb;
ret = 0;
}
*rx_skb = new_skb;
ret = 0;
}
@@
-1456,9
+1456,9
@@
static int velocity_alloc_rx_buf(struct velocity_info *vptr, int idx)
* Do the gymnastics to get the buffer head for data at
* 64byte alignment.
*/
* Do the gymnastics to get the buffer head for data at
* 64byte alignment.
*/
- skb_reserve(rd_info->skb, (unsigned long) rd_info->skb->
tail
& 63);
+ skb_reserve(rd_info->skb, (unsigned long) rd_info->skb->
data
& 63);
rd_info->skb->dev = vptr->dev;
rd_info->skb->dev = vptr->dev;
- rd_info->skb_dma = pci_map_single(vptr->pdev, rd_info->skb->
tail
, vptr->rx_buf_sz, PCI_DMA_FROMDEVICE);
+ rd_info->skb_dma = pci_map_single(vptr->pdev, rd_info->skb->
data
, vptr->rx_buf_sz, PCI_DMA_FROMDEVICE);
/*
* Fill in the descriptor to match
/*
* Fill in the descriptor to match
@@
-2898,7
+2898,7
@@
static void velocity_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo
struct velocity_info *vptr = dev->priv;
strcpy(info->driver, VELOCITY_NAME);
strcpy(info->version, VELOCITY_VERSION);
struct velocity_info *vptr = dev->priv;
strcpy(info->driver, VELOCITY_NAME);
strcpy(info->version, VELOCITY_VERSION);
- strcpy(info->bus_info,
vptr->pdev->slot_name
);
+ strcpy(info->bus_info,
pci_name(vptr->pdev)
);
}
static void velocity_ethtool_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
}
static void velocity_ethtool_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
@@
-3096,7
+3096,7
@@
static void velocity_restore_context(struct velocity_info *vptr, struct velocity
* we are interested in.
*/
* we are interested in.
*/
-u16 wol_calc_crc(int size, u8 * pattern, u8 *mask_pattern)
+
static
u16 wol_calc_crc(int size, u8 * pattern, u8 *mask_pattern)
{
u16 crc = 0xFFFF;
u8 mask;
{
u16 crc = 0xFFFF;
u8 mask;
@@
-3210,9
+3210,10
@@
static int velocity_set_wol(struct velocity_info *vptr)
return 0;
}
return 0;
}
-static int velocity_suspend(struct pci_dev *pdev,
u32
state)
+static int velocity_suspend(struct pci_dev *pdev,
pm_message_t
state)
{
{
- struct velocity_info *vptr = pci_get_drvdata(pdev);
+ struct net_device *dev = pci_get_drvdata(pdev);
+ struct velocity_info *vptr = netdev_priv(dev);
unsigned long flags;
if(!netif_running(vptr->dev))
unsigned long flags;
if(!netif_running(vptr->dev))
@@
-3245,7
+3246,8
@@
static int velocity_suspend(struct pci_dev *pdev, u32 state)
static int velocity_resume(struct pci_dev *pdev)
{
static int velocity_resume(struct pci_dev *pdev)
{
- struct velocity_info *vptr = pci_get_drvdata(pdev);
+ struct net_device *dev = pci_get_drvdata(pdev);
+ struct velocity_info *vptr = netdev_priv(dev);
unsigned long flags;
int i;
unsigned long flags;
int i;