diff options
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/pegasus.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c index a84ba487c713..8c19307e5040 100644 --- a/drivers/net/usb/pegasus.c +++ b/drivers/net/usb/pegasus.c | |||
@@ -117,7 +117,7 @@ static void ctrl_callback(struct urb *urb) | |||
117 | case -ENOENT: | 117 | case -ENOENT: |
118 | break; | 118 | break; |
119 | default: | 119 | default: |
120 | if (netif_msg_drv(pegasus)) | 120 | if (netif_msg_drv(pegasus) && printk_ratelimit()) |
121 | dev_dbg(&pegasus->intf->dev, "%s, status %d\n", | 121 | dev_dbg(&pegasus->intf->dev, "%s, status %d\n", |
122 | __FUNCTION__, urb->status); | 122 | __FUNCTION__, urb->status); |
123 | } | 123 | } |
@@ -166,7 +166,7 @@ static int get_registers(pegasus_t * pegasus, __u16 indx, __u16 size, | |||
166 | set_current_state(TASK_RUNNING); | 166 | set_current_state(TASK_RUNNING); |
167 | if (ret == -ENODEV) | 167 | if (ret == -ENODEV) |
168 | netif_device_detach(pegasus->net); | 168 | netif_device_detach(pegasus->net); |
169 | if (netif_msg_drv(pegasus)) | 169 | if (netif_msg_drv(pegasus) && printk_ratelimit()) |
170 | dev_err(&pegasus->intf->dev, "%s, status %d\n", | 170 | dev_err(&pegasus->intf->dev, "%s, status %d\n", |
171 | __FUNCTION__, ret); | 171 | __FUNCTION__, ret); |
172 | goto out; | 172 | goto out; |
@@ -275,7 +275,7 @@ static int set_register(pegasus_t * pegasus, __u16 indx, __u8 data) | |||
275 | if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { | 275 | if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { |
276 | if (ret == -ENODEV) | 276 | if (ret == -ENODEV) |
277 | netif_device_detach(pegasus->net); | 277 | netif_device_detach(pegasus->net); |
278 | if (netif_msg_drv(pegasus)) | 278 | if (netif_msg_drv(pegasus) && printk_ratelimit()) |
279 | dev_err(&pegasus->intf->dev, "%s, status %d\n", | 279 | dev_err(&pegasus->intf->dev, "%s, status %d\n", |
280 | __FUNCTION__, ret); | 280 | __FUNCTION__, ret); |
281 | goto out; | 281 | goto out; |
@@ -1209,8 +1209,7 @@ static void pegasus_set_multicast(struct net_device *net) | |||
1209 | pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS; | 1209 | pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS; |
1210 | if (netif_msg_link(pegasus)) | 1210 | if (netif_msg_link(pegasus)) |
1211 | pr_info("%s: Promiscuous mode enabled.\n", net->name); | 1211 | pr_info("%s: Promiscuous mode enabled.\n", net->name); |
1212 | } else if (net->mc_count || | 1212 | } else if (net->mc_count || (net->flags & IFF_ALLMULTI)) { |
1213 | (net->flags & IFF_ALLMULTI)) { | ||
1214 | pegasus->eth_regs[EthCtrl0] |= RX_MULTICAST; | 1213 | pegasus->eth_regs[EthCtrl0] |= RX_MULTICAST; |
1215 | pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; | 1214 | pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; |
1216 | if (netif_msg_link(pegasus)) | 1215 | if (netif_msg_link(pegasus)) |
@@ -1220,6 +1219,8 @@ static void pegasus_set_multicast(struct net_device *net) | |||
1220 | pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; | 1219 | pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; |
1221 | } | 1220 | } |
1222 | 1221 | ||
1222 | pegasus->ctrl_urb->status = 0; | ||
1223 | |||
1223 | pegasus->flags |= ETH_REGS_CHANGE; | 1224 | pegasus->flags |= ETH_REGS_CHANGE; |
1224 | ctrl_callback(pegasus->ctrl_urb); | 1225 | ctrl_callback(pegasus->ctrl_urb); |
1225 | } | 1226 | } |