aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tulip/uli526x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/tulip/uli526x.c')
-rw-r--r--drivers/net/tulip/uli526x.c38
1 files changed, 22 insertions, 16 deletions
diff --git a/drivers/net/tulip/uli526x.c b/drivers/net/tulip/uli526x.c
index a59c1f224aa8..2511ca7a12aa 100644
--- a/drivers/net/tulip/uli526x.c
+++ b/drivers/net/tulip/uli526x.c
@@ -434,10 +434,6 @@ static int uli526x_open(struct net_device *dev)
434 434
435 ULI526X_DBUG(0, "uli526x_open", 0); 435 ULI526X_DBUG(0, "uli526x_open", 0);
436 436
437 ret = request_irq(dev->irq, &uli526x_interrupt, IRQF_SHARED, dev->name, dev);
438 if (ret)
439 return ret;
440
441 /* system variable init */ 437 /* system variable init */
442 db->cr6_data = CR6_DEFAULT | uli526x_cr6_user_set; 438 db->cr6_data = CR6_DEFAULT | uli526x_cr6_user_set;
443 db->tx_packet_cnt = 0; 439 db->tx_packet_cnt = 0;
@@ -456,6 +452,10 @@ static int uli526x_open(struct net_device *dev)
456 /* Initialize ULI526X board */ 452 /* Initialize ULI526X board */
457 uli526x_init(dev); 453 uli526x_init(dev);
458 454
455 ret = request_irq(dev->irq, &uli526x_interrupt, IRQF_SHARED, dev->name, dev);
456 if (ret)
457 return ret;
458
459 /* Active System Interface */ 459 /* Active System Interface */
460 netif_wake_queue(dev); 460 netif_wake_queue(dev);
461 461
@@ -1368,6 +1368,12 @@ static void update_cr6(u32 cr6_data, unsigned long ioaddr)
1368 * This setup frame initialize ULI526X address filter mode 1368 * This setup frame initialize ULI526X address filter mode
1369 */ 1369 */
1370 1370
1371#ifdef __BIG_ENDIAN
1372#define FLT_SHIFT 16
1373#else
1374#define FLT_SHIFT 0
1375#endif
1376
1371static void send_filter_frame(struct net_device *dev, int mc_cnt) 1377static void send_filter_frame(struct net_device *dev, int mc_cnt)
1372{ 1378{
1373 struct uli526x_board_info *db = netdev_priv(dev); 1379 struct uli526x_board_info *db = netdev_priv(dev);
@@ -1384,27 +1390,27 @@ static void send_filter_frame(struct net_device *dev, int mc_cnt)
1384 1390
1385 /* Node address */ 1391 /* Node address */
1386 addrptr = (u16 *) dev->dev_addr; 1392 addrptr = (u16 *) dev->dev_addr;
1387 *suptr++ = addrptr[0]; 1393 *suptr++ = addrptr[0] << FLT_SHIFT;
1388 *suptr++ = addrptr[1]; 1394 *suptr++ = addrptr[1] << FLT_SHIFT;
1389 *suptr++ = addrptr[2]; 1395 *suptr++ = addrptr[2] << FLT_SHIFT;
1390 1396
1391 /* broadcast address */ 1397 /* broadcast address */
1392 *suptr++ = 0xffff; 1398 *suptr++ = 0xffff << FLT_SHIFT;
1393 *suptr++ = 0xffff; 1399 *suptr++ = 0xffff << FLT_SHIFT;
1394 *suptr++ = 0xffff; 1400 *suptr++ = 0xffff << FLT_SHIFT;
1395 1401
1396 /* fit the multicast address */ 1402 /* fit the multicast address */
1397 for (mcptr = dev->mc_list, i = 0; i < mc_cnt; i++, mcptr = mcptr->next) { 1403 for (mcptr = dev->mc_list, i = 0; i < mc_cnt; i++, mcptr = mcptr->next) {
1398 addrptr = (u16 *) mcptr->dmi_addr; 1404 addrptr = (u16 *) mcptr->dmi_addr;
1399 *suptr++ = addrptr[0]; 1405 *suptr++ = addrptr[0] << FLT_SHIFT;
1400 *suptr++ = addrptr[1]; 1406 *suptr++ = addrptr[1] << FLT_SHIFT;
1401 *suptr++ = addrptr[2]; 1407 *suptr++ = addrptr[2] << FLT_SHIFT;
1402 } 1408 }
1403 1409
1404 for (; i<14; i++) { 1410 for (; i<14; i++) {
1405 *suptr++ = 0xffff; 1411 *suptr++ = 0xffff << FLT_SHIFT;
1406 *suptr++ = 0xffff; 1412 *suptr++ = 0xffff << FLT_SHIFT;
1407 *suptr++ = 0xffff; 1413 *suptr++ = 0xffff << FLT_SHIFT;
1408 } 1414 }
1409 1415
1410 /* prepare the setup frame */ 1416 /* prepare the setup frame */