Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 32077
b: refs/heads/master
c: cabb766
h: refs/heads/master
i:
  32075: 8a267ed
v: v3
  • Loading branch information
Jeff Garzik committed Jul 5, 2006
1 parent a2a1d0f commit 53b479d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 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: e54f48933f414fa447c26d16524a4c9a8e2facc6
refs/heads/master: cabb7667dc150320ccd9d6f64fbd7a34766bc775
20 changes: 11 additions & 9 deletions trunk/drivers/net/via-velocity.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ static int rx_copybreak = 200;
module_param(rx_copybreak, int, 0644);
MODULE_PARM_DESC(rx_copybreak, "Copy breakpoint for copy-only-tiny-frames");

static void velocity_init_info(struct pci_dev *pdev, struct velocity_info *vptr, struct velocity_info_tbl *info);
static void velocity_init_info(struct pci_dev *pdev, struct velocity_info *vptr,
const struct velocity_info_tbl *info);
static int velocity_get_pci_info(struct velocity_info *, struct pci_dev *pdev);
static void velocity_print_info(struct velocity_info *vptr);
static int velocity_open(struct net_device *dev);
Expand Down Expand Up @@ -294,9 +295,9 @@ static void velocity_unregister_notifier(void)
* Internal board variants. At the moment we have only one
*/

static struct velocity_info_tbl chip_info_table[] = {
{CHIP_TYPE_VT6110, "VIA Networking Velocity Family Gigabit Ethernet Adapter", 256, 1, 0x00FFFFFFUL},
{0, NULL}
static const struct velocity_info_tbl chip_info_table[] __devinitdata = {
{CHIP_TYPE_VT6110, "VIA Networking Velocity Family Gigabit Ethernet Adapter", 1, 0x00FFFFFFUL},
{ }
};

/*
Expand Down Expand Up @@ -685,7 +686,7 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi
static int first = 1;
struct net_device *dev;
int i;
struct velocity_info_tbl *info = &chip_info_table[ent->driver_data];
const struct velocity_info_tbl *info = &chip_info_table[ent->driver_data];
struct velocity_info *vptr;
struct mac_regs __iomem * regs;
int ret = -ENOMEM;
Expand Down Expand Up @@ -742,7 +743,7 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi
goto err_disable;
}

regs = ioremap(vptr->memaddr, vptr->io_size);
regs = ioremap(vptr->memaddr, VELOCITY_IO_SIZE);
if (regs == NULL) {
ret = -EIO;
goto err_release_res;
Expand Down Expand Up @@ -860,13 +861,14 @@ static void __devinit velocity_print_info(struct velocity_info *vptr)
* discovered.
*/

static void __devinit velocity_init_info(struct pci_dev *pdev, struct velocity_info *vptr, struct velocity_info_tbl *info)
static void __devinit velocity_init_info(struct pci_dev *pdev,
struct velocity_info *vptr,
const struct velocity_info_tbl *info)
{
memset(vptr, 0, sizeof(struct velocity_info));

vptr->pdev = pdev;
vptr->chip_id = info->chip_id;
vptr->io_size = info->io_size;
vptr->num_txq = info->txqueue;
vptr->multicast_limit = MCAM_SIZE;
spin_lock_init(&vptr->lock);
Expand Down Expand Up @@ -904,7 +906,7 @@ static int __devinit velocity_get_pci_info(struct velocity_info *vptr, struct pc
return -EINVAL;
}

if (pci_resource_len(pdev, 1) < 256) {
if (pci_resource_len(pdev, 1) < VELOCITY_IO_SIZE) {
dev_printk(KERN_ERR, &pdev->dev, "region #1 is too small.\n");
return -EINVAL;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/via-velocity.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#define VELOCITY_FULL_DRV_NAM "VIA Networking Velocity Family Gigabit Ethernet Adapter Driver"
#define VELOCITY_VERSION "1.13"

#define VELOCITY_IO_SIZE 256

#define PKT_BUF_SZ 1540

#define MAX_UNITS 8
Expand Down Expand Up @@ -1191,7 +1193,6 @@ enum chip_type {
struct velocity_info_tbl {
enum chip_type chip_id;
char *name;
int io_size;
int txqueue;
u32 flags;
};
Expand Down Expand Up @@ -1751,7 +1752,6 @@ struct velocity_info {
struct mac_regs __iomem * mac_regs;
unsigned long memaddr;
unsigned long ioaddr;
u32 io_size;

u8 rev_id;

Expand Down

0 comments on commit 53b479d

Please sign in to comment.