Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 32074
b: refs/heads/master
c: 8ab6f3f
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Garzik committed Jul 5, 2006
1 parent 7c9596f commit fedfabc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 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: c3d8e682b7d10f57d13c86ecbb15806781d6e953
refs/heads/master: 8ab6f3f706f5cb91bc0793afc95c8809837ece05
38 changes: 19 additions & 19 deletions trunk/drivers/net/via-velocity.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ static char __devinit *get_chip_name(enum chip_type chip_id)
static void __devexit velocity_remove1(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
struct velocity_info *vptr = dev->priv;
struct velocity_info *vptr = netdev_priv(dev);

#ifdef CONFIG_PM
unsigned long flags;
Expand Down Expand Up @@ -708,7 +708,7 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi

SET_MODULE_OWNER(dev);
SET_NETDEV_DEV(dev, &pdev->dev);
vptr = dev->priv;
vptr = netdev_priv(dev);


if (first) {
Expand Down Expand Up @@ -1728,7 +1728,7 @@ static void velocity_free_tx_buf(struct velocity_info *vptr, struct velocity_td_

static int velocity_open(struct net_device *dev)
{
struct velocity_info *vptr = dev->priv;
struct velocity_info *vptr = netdev_priv(dev);
int ret;

vptr->rx_buf_sz = (dev->mtu <= 1504 ? PKT_BUF_SZ : dev->mtu + 32);
Expand Down Expand Up @@ -1785,7 +1785,7 @@ static int velocity_open(struct net_device *dev)

static int velocity_change_mtu(struct net_device *dev, int new_mtu)
{
struct velocity_info *vptr = dev->priv;
struct velocity_info *vptr = netdev_priv(dev);
unsigned long flags;
int oldmtu = dev->mtu;
int ret = 0;
Expand Down Expand Up @@ -1861,7 +1861,7 @@ static void velocity_shutdown(struct velocity_info *vptr)

static int velocity_close(struct net_device *dev)
{
struct velocity_info *vptr = dev->priv;
struct velocity_info *vptr = netdev_priv(dev);

netif_stop_queue(dev);
velocity_shutdown(vptr);
Expand Down Expand Up @@ -1894,7 +1894,7 @@ static int velocity_close(struct net_device *dev)

static int velocity_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct velocity_info *vptr = dev->priv;
struct velocity_info *vptr = netdev_priv(dev);
int qnum = 0;
struct tx_desc *td_ptr;
struct velocity_td_info *tdinfo;
Expand Down Expand Up @@ -2049,7 +2049,7 @@ static int velocity_xmit(struct sk_buff *skb, struct net_device *dev)
static int velocity_intr(int irq, void *dev_instance, struct pt_regs *regs)
{
struct net_device *dev = dev_instance;
struct velocity_info *vptr = dev->priv;
struct velocity_info *vptr = netdev_priv(dev);
u32 isr_status;
int max_count = 0;

Expand Down Expand Up @@ -2104,7 +2104,7 @@ static int velocity_intr(int irq, void *dev_instance, struct pt_regs *regs)

static void velocity_set_multi(struct net_device *dev)
{
struct velocity_info *vptr = dev->priv;
struct velocity_info *vptr = netdev_priv(dev);
struct mac_regs __iomem * regs = vptr->mac_regs;
u8 rx_mode;
int i;
Expand Down Expand Up @@ -2153,7 +2153,7 @@ static void velocity_set_multi(struct net_device *dev)

static struct net_device_stats *velocity_get_stats(struct net_device *dev)
{
struct velocity_info *vptr = dev->priv;
struct velocity_info *vptr = netdev_priv(dev);

/* If the hardware is down, don't touch MII */
if(!netif_running(dev))
Expand Down Expand Up @@ -2196,7 +2196,7 @@ static struct net_device_stats *velocity_get_stats(struct net_device *dev)

static int velocity_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
struct velocity_info *vptr = dev->priv;
struct velocity_info *vptr = netdev_priv(dev);
int ret;

/* If we are asked for information and the device is power
Expand Down Expand Up @@ -2825,7 +2825,7 @@ static void enable_flow_control_ability(struct velocity_info *vptr)

static int velocity_ethtool_up(struct net_device *dev)
{
struct velocity_info *vptr = dev->priv;
struct velocity_info *vptr = netdev_priv(dev);
if (!netif_running(dev))
pci_set_power_state(vptr->pdev, PCI_D0);
return 0;
Expand All @@ -2841,14 +2841,14 @@ static int velocity_ethtool_up(struct net_device *dev)

static void velocity_ethtool_down(struct net_device *dev)
{
struct velocity_info *vptr = dev->priv;
struct velocity_info *vptr = netdev_priv(dev);
if (!netif_running(dev))
pci_set_power_state(vptr->pdev, PCI_D3hot);
}

static int velocity_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
struct velocity_info *vptr = dev->priv;
struct velocity_info *vptr = netdev_priv(dev);
struct mac_regs __iomem * regs = vptr->mac_regs;
u32 status;
status = check_connection_type(vptr->mac_regs);
Expand All @@ -2873,7 +2873,7 @@ static int velocity_get_settings(struct net_device *dev, struct ethtool_cmd *cmd

static int velocity_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
struct velocity_info *vptr = dev->priv;
struct velocity_info *vptr = netdev_priv(dev);
u32 curr_status;
u32 new_status = 0;
int ret = 0;
Expand All @@ -2896,22 +2896,22 @@ static int velocity_set_settings(struct net_device *dev, struct ethtool_cmd *cmd

static u32 velocity_get_link(struct net_device *dev)
{
struct velocity_info *vptr = dev->priv;
struct velocity_info *vptr = netdev_priv(dev);
struct mac_regs __iomem * regs = vptr->mac_regs;
return BYTE_REG_BITS_IS_ON(PHYSR0_LINKGD, &regs->PHYSR0) ? 0 : 1;
}

static void velocity_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
{
struct velocity_info *vptr = dev->priv;
struct velocity_info *vptr = netdev_priv(dev);
strcpy(info->driver, VELOCITY_NAME);
strcpy(info->version, VELOCITY_VERSION);
strcpy(info->bus_info, pci_name(vptr->pdev));
}

static void velocity_ethtool_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
{
struct velocity_info *vptr = dev->priv;
struct velocity_info *vptr = netdev_priv(dev);
wol->supported = WAKE_PHY | WAKE_MAGIC | WAKE_UCAST | WAKE_ARP;
wol->wolopts |= WAKE_MAGIC;
/*
Expand All @@ -2927,7 +2927,7 @@ static void velocity_ethtool_get_wol(struct net_device *dev, struct ethtool_woli

static int velocity_ethtool_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
{
struct velocity_info *vptr = dev->priv;
struct velocity_info *vptr = netdev_priv(dev);

if (!(wol->wolopts & (WAKE_PHY | WAKE_MAGIC | WAKE_UCAST | WAKE_ARP)))
return -EFAULT;
Expand Down Expand Up @@ -2992,7 +2992,7 @@ static struct ethtool_ops velocity_ethtool_ops = {

static int velocity_mii_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
struct velocity_info *vptr = dev->priv;
struct velocity_info *vptr = netdev_priv(dev);
struct mac_regs __iomem * regs = vptr->mac_regs;
unsigned long flags;
struct mii_ioctl_data *miidata = if_mii(ifr);
Expand Down

0 comments on commit fedfabc

Please sign in to comment.