diff options
Diffstat (limited to 'drivers/net/plip.c')
-rw-r--r-- | drivers/net/plip.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/net/plip.c b/drivers/net/plip.c index d4449d6d1fe4..d4f54e9798cd 100644 --- a/drivers/net/plip.c +++ b/drivers/net/plip.c | |||
@@ -16,7 +16,7 @@ | |||
16 | * parport-sharing awareness code by Philip Blundell. | 16 | * parport-sharing awareness code by Philip Blundell. |
17 | * SMP locking by Niibe Yutaka. | 17 | * SMP locking by Niibe Yutaka. |
18 | * Support for parallel ports with no IRQ (poll mode), | 18 | * Support for parallel ports with no IRQ (poll mode), |
19 | * Modifications to use the parallel port API | 19 | * Modifications to use the parallel port API |
20 | * by Nimrod Zimerman. | 20 | * by Nimrod Zimerman. |
21 | * | 21 | * |
22 | * Fixes: | 22 | * Fixes: |
@@ -383,7 +383,7 @@ static void | |||
383 | plip_timer_bh(struct net_device *dev) | 383 | plip_timer_bh(struct net_device *dev) |
384 | { | 384 | { |
385 | struct net_local *nl = netdev_priv(dev); | 385 | struct net_local *nl = netdev_priv(dev); |
386 | 386 | ||
387 | if (!(atomic_read (&nl->kill_timer))) { | 387 | if (!(atomic_read (&nl->kill_timer))) { |
388 | plip_interrupt (-1, dev, NULL); | 388 | plip_interrupt (-1, dev, NULL); |
389 | 389 | ||
@@ -527,7 +527,7 @@ plip_receive(unsigned short nibble_timeout, struct net_device *dev, | |||
527 | } | 527 | } |
528 | 528 | ||
529 | /* | 529 | /* |
530 | * Determine the packet's protocol ID. The rule here is that we | 530 | * Determine the packet's protocol ID. The rule here is that we |
531 | * assume 802.3 if the type field is short enough to be a length. | 531 | * assume 802.3 if the type field is short enough to be a length. |
532 | * This is normal practice and works for any 'now in use' protocol. | 532 | * This is normal practice and works for any 'now in use' protocol. |
533 | * | 533 | * |
@@ -537,16 +537,16 @@ plip_receive(unsigned short nibble_timeout, struct net_device *dev, | |||
537 | * We can't fix the daddr thing as that quirk (more bug) is embedded | 537 | * We can't fix the daddr thing as that quirk (more bug) is embedded |
538 | * in far too many old systems not all even running Linux. | 538 | * in far too many old systems not all even running Linux. |
539 | */ | 539 | */ |
540 | 540 | ||
541 | static __be16 plip_type_trans(struct sk_buff *skb, struct net_device *dev) | 541 | static __be16 plip_type_trans(struct sk_buff *skb, struct net_device *dev) |
542 | { | 542 | { |
543 | struct ethhdr *eth; | 543 | struct ethhdr *eth; |
544 | unsigned char *rawp; | 544 | unsigned char *rawp; |
545 | 545 | ||
546 | skb->mac.raw=skb->data; | 546 | skb->mac.raw=skb->data; |
547 | skb_pull(skb,dev->hard_header_len); | 547 | skb_pull(skb,dev->hard_header_len); |
548 | eth = eth_hdr(skb); | 548 | eth = eth_hdr(skb); |
549 | 549 | ||
550 | if(*eth->h_dest&1) | 550 | if(*eth->h_dest&1) |
551 | { | 551 | { |
552 | if(memcmp(eth->h_dest,dev->broadcast, ETH_ALEN)==0) | 552 | if(memcmp(eth->h_dest,dev->broadcast, ETH_ALEN)==0) |
@@ -554,17 +554,17 @@ static __be16 plip_type_trans(struct sk_buff *skb, struct net_device *dev) | |||
554 | else | 554 | else |
555 | skb->pkt_type=PACKET_MULTICAST; | 555 | skb->pkt_type=PACKET_MULTICAST; |
556 | } | 556 | } |
557 | 557 | ||
558 | /* | 558 | /* |
559 | * This ALLMULTI check should be redundant by 1.4 | 559 | * This ALLMULTI check should be redundant by 1.4 |
560 | * so don't forget to remove it. | 560 | * so don't forget to remove it. |
561 | */ | 561 | */ |
562 | 562 | ||
563 | if (ntohs(eth->h_proto) >= 1536) | 563 | if (ntohs(eth->h_proto) >= 1536) |
564 | return eth->h_proto; | 564 | return eth->h_proto; |
565 | 565 | ||
566 | rawp = skb->data; | 566 | rawp = skb->data; |
567 | 567 | ||
568 | /* | 568 | /* |
569 | * This is a magic hack to spot IPX packets. Older Novell breaks | 569 | * This is a magic hack to spot IPX packets. Older Novell breaks |
570 | * the protocol design and runs IPX over 802.3 without an 802.2 LLC | 570 | * the protocol design and runs IPX over 802.3 without an 802.2 LLC |
@@ -573,7 +573,7 @@ static __be16 plip_type_trans(struct sk_buff *skb, struct net_device *dev) | |||
573 | */ | 573 | */ |
574 | if (*(unsigned short *)rawp == 0xFFFF) | 574 | if (*(unsigned short *)rawp == 0xFFFF) |
575 | return htons(ETH_P_802_3); | 575 | return htons(ETH_P_802_3); |
576 | 576 | ||
577 | /* | 577 | /* |
578 | * Real 802.2 LLC | 578 | * Real 802.2 LLC |
579 | */ | 579 | */ |
@@ -972,7 +972,7 @@ plip_tx_packet(struct sk_buff *skb, struct net_device *dev) | |||
972 | } | 972 | } |
973 | 973 | ||
974 | netif_stop_queue (dev); | 974 | netif_stop_queue (dev); |
975 | 975 | ||
976 | if (skb->len > dev->mtu + dev->hard_header_len) { | 976 | if (skb->len > dev->mtu + dev->hard_header_len) { |
977 | printk(KERN_WARNING "%s: packet too big, %d.\n", dev->name, (int)skb->len); | 977 | printk(KERN_WARNING "%s: packet too big, %d.\n", dev->name, (int)skb->len); |
978 | netif_start_queue (dev); | 978 | netif_start_queue (dev); |
@@ -993,7 +993,7 @@ plip_tx_packet(struct sk_buff *skb, struct net_device *dev) | |||
993 | } | 993 | } |
994 | schedule_work(&nl->immediate); | 994 | schedule_work(&nl->immediate); |
995 | spin_unlock_irq(&nl->lock); | 995 | spin_unlock_irq(&nl->lock); |
996 | 996 | ||
997 | return 0; | 997 | return 0; |
998 | } | 998 | } |
999 | 999 | ||
@@ -1032,7 +1032,7 @@ int plip_hard_header_cache(struct neighbour *neigh, | |||
1032 | { | 1032 | { |
1033 | struct net_local *nl = neigh->dev->priv; | 1033 | struct net_local *nl = neigh->dev->priv; |
1034 | int ret; | 1034 | int ret; |
1035 | 1035 | ||
1036 | if ((ret = nl->orig_hard_header_cache(neigh, hh)) == 0) | 1036 | if ((ret = nl->orig_hard_header_cache(neigh, hh)) == 0) |
1037 | { | 1037 | { |
1038 | struct ethhdr *eth; | 1038 | struct ethhdr *eth; |
@@ -1041,9 +1041,9 @@ int plip_hard_header_cache(struct neighbour *neigh, | |||
1041 | HH_DATA_OFF(sizeof(*eth))); | 1041 | HH_DATA_OFF(sizeof(*eth))); |
1042 | plip_rewrite_address (neigh->dev, eth); | 1042 | plip_rewrite_address (neigh->dev, eth); |
1043 | } | 1043 | } |
1044 | 1044 | ||
1045 | return ret; | 1045 | return ret; |
1046 | } | 1046 | } |
1047 | 1047 | ||
1048 | /* Open/initialize the board. This is called (in the current kernel) | 1048 | /* Open/initialize the board. This is called (in the current kernel) |
1049 | sometime after booting when the 'ifconfig' program is run. | 1049 | sometime after booting when the 'ifconfig' program is run. |
@@ -1187,7 +1187,7 @@ plip_wakeup(void *handle) | |||
1187 | else | 1187 | else |
1188 | return; | 1188 | return; |
1189 | } | 1189 | } |
1190 | 1190 | ||
1191 | if (!(dev->flags & IFF_UP)) | 1191 | if (!(dev->flags & IFF_UP)) |
1192 | /* Don't need the port when the interface is down */ | 1192 | /* Don't need the port when the interface is down */ |
1193 | return; | 1193 | return; |
@@ -1264,7 +1264,7 @@ static void plip_attach (struct parport *port) | |||
1264 | struct net_local *nl; | 1264 | struct net_local *nl; |
1265 | char name[IFNAMSIZ]; | 1265 | char name[IFNAMSIZ]; |
1266 | 1266 | ||
1267 | if ((parport[0] == -1 && (!timid || !port->devices)) || | 1267 | if ((parport[0] == -1 && (!timid || !port->devices)) || |
1268 | plip_searchfor(parport, port->number)) { | 1268 | plip_searchfor(parport, port->number)) { |
1269 | if (unit == PLIP_MAX) { | 1269 | if (unit == PLIP_MAX) { |
1270 | printk(KERN_ERR "plip: too many devices\n"); | 1270 | printk(KERN_ERR "plip: too many devices\n"); |
@@ -1277,7 +1277,7 @@ static void plip_attach (struct parport *port) | |||
1277 | printk(KERN_ERR "plip: memory squeeze\n"); | 1277 | printk(KERN_ERR "plip: memory squeeze\n"); |
1278 | return; | 1278 | return; |
1279 | } | 1279 | } |
1280 | 1280 | ||
1281 | strcpy(dev->name, name); | 1281 | strcpy(dev->name, name); |
1282 | 1282 | ||
1283 | SET_MODULE_OWNER(dev); | 1283 | SET_MODULE_OWNER(dev); |
@@ -1290,7 +1290,7 @@ static void plip_attach (struct parport *port) | |||
1290 | 1290 | ||
1291 | nl = netdev_priv(dev); | 1291 | nl = netdev_priv(dev); |
1292 | nl->pardev = parport_register_device(port, name, plip_preempt, | 1292 | nl->pardev = parport_register_device(port, name, plip_preempt, |
1293 | plip_wakeup, plip_interrupt, | 1293 | plip_wakeup, plip_interrupt, |
1294 | 0, dev); | 1294 | 0, dev); |
1295 | 1295 | ||
1296 | if (!nl->pardev) { | 1296 | if (!nl->pardev) { |
@@ -1384,7 +1384,7 @@ static int __init plip_setup(char *str) | |||
1384 | /* disable driver on "plip=" or "plip=0" */ | 1384 | /* disable driver on "plip=" or "plip=0" */ |
1385 | parport[0] = -2; | 1385 | parport[0] = -2; |
1386 | } else { | 1386 | } else { |
1387 | printk(KERN_WARNING "warning: 'plip=0x%x' ignored\n", | 1387 | printk(KERN_WARNING "warning: 'plip=0x%x' ignored\n", |
1388 | ints[1]); | 1388 | ints[1]); |
1389 | } | 1389 | } |
1390 | } | 1390 | } |