Commit f5ee43fe authored by François Romieu's avatar François Romieu Committed by Jeff Garzik

[PATCH] via-velocity: early invocation of init_cam_filter()

In velocity_init_registers(), init_cam_filter() clears mCAMmask which
might have been set by set_multi() (not sure if this can ever occur).
Modified to invoke init_cam_filter() first. Also, clear_isr() is called
twice. Removed the first invocation.

In velocity_found1(), there was a unneeded assignment from vptr to
dev->priv.  Removed.
Signed-off-by: default avatarTejun Heo <tj@home-tj.org>
parent 2f652923
...@@ -591,6 +591,11 @@ static void velocity_init_registers(struct velocity_info *vptr, ...@@ -591,6 +591,11 @@ static void velocity_init_registers(struct velocity_info *vptr,
*/ */
BYTE_REG_BITS_SET(CFGB_OFSET, (CFGB_CRANDOM | CFGB_CAP | CFGB_MBA | CFGB_BAKOPT), &regs->CFGB); BYTE_REG_BITS_SET(CFGB_OFSET, (CFGB_CRANDOM | CFGB_CAP | CFGB_MBA | CFGB_BAKOPT), &regs->CFGB);
/*
* Init CAM filter
*/
velocity_init_cam_filter(vptr);
/* /*
* Set packet filter: Receive directed and broadcast address * Set packet filter: Receive directed and broadcast address
*/ */
...@@ -615,8 +620,6 @@ static void velocity_init_registers(struct velocity_info *vptr, ...@@ -615,8 +620,6 @@ static void velocity_init_registers(struct velocity_info *vptr,
mac_tx_queue_run(regs, i); mac_tx_queue_run(regs, i);
} }
velocity_init_cam_filter(vptr);
init_flow_control_register(vptr); init_flow_control_register(vptr);
writel(CR0_STOP, &regs->CR0Clr); writel(CR0_STOP, &regs->CR0Clr);
...@@ -624,7 +627,6 @@ static void velocity_init_registers(struct velocity_info *vptr, ...@@ -624,7 +627,6 @@ static void velocity_init_registers(struct velocity_info *vptr,
mii_status = velocity_get_opt_media_mode(vptr); mii_status = velocity_get_opt_media_mode(vptr);
netif_stop_queue(vptr->dev); netif_stop_queue(vptr->dev);
mac_clear_isr(regs);
mii_init(vptr, mii_status); mii_init(vptr, mii_status);
...@@ -723,7 +725,6 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi ...@@ -723,7 +725,6 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi
vptr->dev = dev; vptr->dev = dev;
dev->priv = vptr;
dev->irq = pdev->irq; dev->irq = pdev->irq;
ret = pci_enable_device(pdev); ret = pci_enable_device(pdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment