diff options
Diffstat (limited to 'drivers/net/tokenring/tms380tr.c')
-rw-r--r-- | drivers/net/tokenring/tms380tr.c | 65 |
1 files changed, 9 insertions, 56 deletions
diff --git a/drivers/net/tokenring/tms380tr.c b/drivers/net/tokenring/tms380tr.c index 8b508c922410..435ef7d5470f 100644 --- a/drivers/net/tokenring/tms380tr.c +++ b/drivers/net/tokenring/tms380tr.c | |||
@@ -325,8 +325,6 @@ static void tms380tr_timer_end_wait(unsigned long data) | |||
325 | tp->Sleeping = 0; | 325 | tp->Sleeping = 0; |
326 | wake_up_interruptible(&tp->wait_for_tok_int); | 326 | wake_up_interruptible(&tp->wait_for_tok_int); |
327 | } | 327 | } |
328 | |||
329 | return; | ||
330 | } | 328 | } |
331 | 329 | ||
332 | /* | 330 | /* |
@@ -460,8 +458,6 @@ static void tms380tr_init_net_local(struct net_device *dev) | |||
460 | tp->RplHead = &tp->Rpl[0]; | 458 | tp->RplHead = &tp->Rpl[0]; |
461 | tp->RplTail = &tp->Rpl[RPL_NUM-1]; | 459 | tp->RplTail = &tp->Rpl[RPL_NUM-1]; |
462 | tp->RplTail->Status = (RX_START_FRAME | RX_END_FRAME | RX_FRAME_IRQ); | 460 | tp->RplTail->Status = (RX_START_FRAME | RX_END_FRAME | RX_FRAME_IRQ); |
463 | |||
464 | return; | ||
465 | } | 461 | } |
466 | 462 | ||
467 | /* | 463 | /* |
@@ -481,8 +477,6 @@ static void tms380tr_init_ipb(struct net_local *tp) | |||
481 | tp->ipb.DMA_Abort_Thrhld = DMA_RETRIES; | 477 | tp->ipb.DMA_Abort_Thrhld = DMA_RETRIES; |
482 | tp->ipb.SCB_Addr = 0; | 478 | tp->ipb.SCB_Addr = 0; |
483 | tp->ipb.SSB_Addr = 0; | 479 | tp->ipb.SSB_Addr = 0; |
484 | |||
485 | return; | ||
486 | } | 480 | } |
487 | 481 | ||
488 | /* | 482 | /* |
@@ -527,8 +521,6 @@ static void tms380tr_init_opb(struct net_device *dev) | |||
527 | 521 | ||
528 | tp->ocpl.ProdIDAddr[0] = LOWORD(Addr); | 522 | tp->ocpl.ProdIDAddr[0] = LOWORD(Addr); |
529 | tp->ocpl.ProdIDAddr[1] = HIWORD(Addr); | 523 | tp->ocpl.ProdIDAddr[1] = HIWORD(Addr); |
530 | |||
531 | return; | ||
532 | } | 524 | } |
533 | 525 | ||
534 | /* | 526 | /* |
@@ -543,8 +535,6 @@ static void tms380tr_open_adapter(struct net_device *dev) | |||
543 | 535 | ||
544 | tp->OpenCommandIssued = 1; | 536 | tp->OpenCommandIssued = 1; |
545 | tms380tr_exec_cmd(dev, OC_OPEN); | 537 | tms380tr_exec_cmd(dev, OC_OPEN); |
546 | |||
547 | return; | ||
548 | } | 538 | } |
549 | 539 | ||
550 | /* | 540 | /* |
@@ -554,8 +544,6 @@ static void tms380tr_open_adapter(struct net_device *dev) | |||
554 | static void tms380tr_disable_interrupts(struct net_device *dev) | 544 | static void tms380tr_disable_interrupts(struct net_device *dev) |
555 | { | 545 | { |
556 | SIFWRITEB(0, SIFACL); | 546 | SIFWRITEB(0, SIFACL); |
557 | |||
558 | return; | ||
559 | } | 547 | } |
560 | 548 | ||
561 | /* | 549 | /* |
@@ -565,8 +553,6 @@ static void tms380tr_disable_interrupts(struct net_device *dev) | |||
565 | static void tms380tr_enable_interrupts(struct net_device *dev) | 553 | static void tms380tr_enable_interrupts(struct net_device *dev) |
566 | { | 554 | { |
567 | SIFWRITEB(ACL_SINTEN, SIFACL); | 555 | SIFWRITEB(ACL_SINTEN, SIFACL); |
568 | |||
569 | return; | ||
570 | } | 556 | } |
571 | 557 | ||
572 | /* | 558 | /* |
@@ -578,8 +564,6 @@ static void tms380tr_exec_cmd(struct net_device *dev, unsigned short Command) | |||
578 | 564 | ||
579 | tp->CMDqueue |= Command; | 565 | tp->CMDqueue |= Command; |
580 | tms380tr_chk_outstanding_cmds(dev); | 566 | tms380tr_chk_outstanding_cmds(dev); |
581 | |||
582 | return; | ||
583 | } | 567 | } |
584 | 568 | ||
585 | static void tms380tr_timeout(struct net_device *dev) | 569 | static void tms380tr_timeout(struct net_device *dev) |
@@ -592,7 +576,7 @@ static void tms380tr_timeout(struct net_device *dev) | |||
592 | * fake transmission time and go on trying. Our own timeout | 576 | * fake transmission time and go on trying. Our own timeout |
593 | * routine is in tms380tr_timer_chk() | 577 | * routine is in tms380tr_timer_chk() |
594 | */ | 578 | */ |
595 | dev->trans_start = jiffies; | 579 | dev->trans_start = jiffies; /* prevent tx timeout */ |
596 | netif_wake_queue(dev); | 580 | netif_wake_queue(dev); |
597 | } | 581 | } |
598 | 582 | ||
@@ -712,8 +696,6 @@ static void tms380tr_chk_src_addr(unsigned char *frame, unsigned char *hw_addr) | |||
712 | SRBit = frame[8] & 0x80; | 696 | SRBit = frame[8] & 0x80; |
713 | memcpy(&frame[8], hw_addr, 6); | 697 | memcpy(&frame[8], hw_addr, 6); |
714 | frame[8] |= SRBit; | 698 | frame[8] |= SRBit; |
715 | |||
716 | return; | ||
717 | } | 699 | } |
718 | 700 | ||
719 | /* | 701 | /* |
@@ -743,8 +725,6 @@ static void tms380tr_timer_chk(unsigned long data) | |||
743 | return; | 725 | return; |
744 | tp->ReOpenInProgress = 1; | 726 | tp->ReOpenInProgress = 1; |
745 | tms380tr_open_adapter(dev); | 727 | tms380tr_open_adapter(dev); |
746 | |||
747 | return; | ||
748 | } | 728 | } |
749 | 729 | ||
750 | /* | 730 | /* |
@@ -863,8 +843,6 @@ static void tms380tr_reset_interrupt(struct net_device *dev) | |||
863 | * and clear STS_SYSTEM_IRQ bit: enable adapter for further interrupts. | 843 | * and clear STS_SYSTEM_IRQ bit: enable adapter for further interrupts. |
864 | */ | 844 | */ |
865 | tms380tr_exec_sifcmd(dev, CMD_SSB_CLEAR | CMD_CLEAR_SYSTEM_IRQ); | 845 | tms380tr_exec_sifcmd(dev, CMD_SSB_CLEAR | CMD_CLEAR_SYSTEM_IRQ); |
866 | |||
867 | return; | ||
868 | } | 846 | } |
869 | 847 | ||
870 | /* | 848 | /* |
@@ -1119,8 +1097,6 @@ static void tms380tr_cmd_status_irq(struct net_device *dev) | |||
1119 | tp->MacStat.frequency_errors += tp->errorlogtable.Frequency_Error; | 1097 | tp->MacStat.frequency_errors += tp->errorlogtable.Frequency_Error; |
1120 | tp->MacStat.internal_errors += tp->errorlogtable.Internal_Error; | 1098 | tp->MacStat.internal_errors += tp->errorlogtable.Internal_Error; |
1121 | } | 1099 | } |
1122 | |||
1123 | return; | ||
1124 | } | 1100 | } |
1125 | 1101 | ||
1126 | /* | 1102 | /* |
@@ -1211,17 +1187,17 @@ static void tms380tr_set_multicast_list(struct net_device *dev) | |||
1211 | } | 1187 | } |
1212 | else | 1188 | else |
1213 | { | 1189 | { |
1214 | struct dev_mc_list *mclist; | 1190 | struct netdev_hw_addr *ha; |
1215 | 1191 | ||
1216 | netdev_for_each_mc_addr(mclist, dev) { | 1192 | netdev_for_each_mc_addr(ha, dev) { |
1217 | ((char *)(&tp->ocpl.FunctAddr))[0] |= | 1193 | ((char *)(&tp->ocpl.FunctAddr))[0] |= |
1218 | mclist->dmi_addr[2]; | 1194 | ha->addr[2]; |
1219 | ((char *)(&tp->ocpl.FunctAddr))[1] |= | 1195 | ((char *)(&tp->ocpl.FunctAddr))[1] |= |
1220 | mclist->dmi_addr[3]; | 1196 | ha->addr[3]; |
1221 | ((char *)(&tp->ocpl.FunctAddr))[2] |= | 1197 | ((char *)(&tp->ocpl.FunctAddr))[2] |= |
1222 | mclist->dmi_addr[4]; | 1198 | ha->addr[4]; |
1223 | ((char *)(&tp->ocpl.FunctAddr))[3] |= | 1199 | ((char *)(&tp->ocpl.FunctAddr))[3] |= |
1224 | mclist->dmi_addr[5]; | 1200 | ha->addr[5]; |
1225 | } | 1201 | } |
1226 | } | 1202 | } |
1227 | tms380tr_exec_cmd(dev, OC_SET_FUNCT_ADDR); | 1203 | tms380tr_exec_cmd(dev, OC_SET_FUNCT_ADDR); |
@@ -1229,7 +1205,6 @@ static void tms380tr_set_multicast_list(struct net_device *dev) | |||
1229 | 1205 | ||
1230 | tp->ocpl.OPENOptions = OpenOptions; | 1206 | tp->ocpl.OPENOptions = OpenOptions; |
1231 | tms380tr_exec_cmd(dev, OC_MODIFY_OPEN_PARMS); | 1207 | tms380tr_exec_cmd(dev, OC_MODIFY_OPEN_PARMS); |
1232 | return; | ||
1233 | } | 1208 | } |
1234 | 1209 | ||
1235 | /* | 1210 | /* |
@@ -1247,7 +1222,6 @@ void tms380tr_wait(unsigned long time) | |||
1247 | #else | 1222 | #else |
1248 | udelay(time); | 1223 | udelay(time); |
1249 | #endif | 1224 | #endif |
1250 | return; | ||
1251 | } | 1225 | } |
1252 | 1226 | ||
1253 | /* | 1227 | /* |
@@ -1266,8 +1240,6 @@ static void tms380tr_exec_sifcmd(struct net_device *dev, unsigned int WriteValue | |||
1266 | SifStsValue = SIFREADW(SIFSTS); | 1240 | SifStsValue = SIFREADW(SIFSTS); |
1267 | } while((SifStsValue & CMD_INTERRUPT_ADAPTER) && loop_counter--); | 1241 | } while((SifStsValue & CMD_INTERRUPT_ADAPTER) && loop_counter--); |
1268 | SIFWRITEW(cmd, SIFCMD); | 1242 | SIFWRITEW(cmd, SIFCMD); |
1269 | |||
1270 | return; | ||
1271 | } | 1243 | } |
1272 | 1244 | ||
1273 | /* | 1245 | /* |
@@ -1390,7 +1362,7 @@ static int tms380tr_bringup_diags(struct net_device *dev) | |||
1390 | Status &= STS_MASK; | 1362 | Status &= STS_MASK; |
1391 | 1363 | ||
1392 | if(tms380tr_debug > 3) | 1364 | if(tms380tr_debug > 3) |
1393 | printk(KERN_DEBUG " %04X \n", Status); | 1365 | printk(KERN_DEBUG " %04X\n", Status); |
1394 | /* BUD successfully completed */ | 1366 | /* BUD successfully completed */ |
1395 | if(Status == STS_INITIALIZE) | 1367 | if(Status == STS_INITIALIZE) |
1396 | return (1); | 1368 | return (1); |
@@ -1700,8 +1672,6 @@ static void tms380tr_chk_outstanding_cmds(struct net_device *dev) | |||
1700 | 1672 | ||
1701 | /* Execute SCB and generate IRQ when done. */ | 1673 | /* Execute SCB and generate IRQ when done. */ |
1702 | tms380tr_exec_sifcmd(dev, CMD_EXECUTE | CMD_SCB_REQUEST); | 1674 | tms380tr_exec_sifcmd(dev, CMD_EXECUTE | CMD_SCB_REQUEST); |
1703 | |||
1704 | return; | ||
1705 | } | 1675 | } |
1706 | 1676 | ||
1707 | /* | 1677 | /* |
@@ -1774,8 +1744,6 @@ static void tms380tr_ring_status_irq(struct net_device *dev) | |||
1774 | tp->AdapterOpenFlag = 0; | 1744 | tp->AdapterOpenFlag = 0; |
1775 | tms380tr_open_adapter(dev); | 1745 | tms380tr_open_adapter(dev); |
1776 | } | 1746 | } |
1777 | |||
1778 | return; | ||
1779 | } | 1747 | } |
1780 | 1748 | ||
1781 | /* | 1749 | /* |
@@ -1846,7 +1814,7 @@ static void tms380tr_chk_irq(struct net_device *dev) | |||
1846 | break; | 1814 | break; |
1847 | 1815 | ||
1848 | case DMA_WRITE_ABORT: | 1816 | case DMA_WRITE_ABORT: |
1849 | printk(KERN_INFO "%s: DMA write operation aborted: \n", | 1817 | printk(KERN_INFO "%s: DMA write operation aborted:\n", |
1850 | dev->name); | 1818 | dev->name); |
1851 | switch (AdapterCheckBlock[1]) | 1819 | switch (AdapterCheckBlock[1]) |
1852 | { | 1820 | { |
@@ -1932,8 +1900,6 @@ static void tms380tr_chk_irq(struct net_device *dev) | |||
1932 | /* Restart of firmware successful */ | 1900 | /* Restart of firmware successful */ |
1933 | tp->AdapterOpenFlag = 1; | 1901 | tp->AdapterOpenFlag = 1; |
1934 | } | 1902 | } |
1935 | |||
1936 | return; | ||
1937 | } | 1903 | } |
1938 | 1904 | ||
1939 | /* | 1905 | /* |
@@ -1988,8 +1954,6 @@ static void tms380tr_read_ram(struct net_device *dev, unsigned char *Data, | |||
1988 | /* Restore original values */ | 1954 | /* Restore original values */ |
1989 | SIFWRITEW(old_sifadx, SIFADX); | 1955 | SIFWRITEW(old_sifadx, SIFADX); |
1990 | SIFWRITEW(old_sifadr, SIFADR); | 1956 | SIFWRITEW(old_sifadr, SIFADR); |
1991 | |||
1992 | return; | ||
1993 | } | 1957 | } |
1994 | 1958 | ||
1995 | /* | 1959 | /* |
@@ -2021,8 +1985,6 @@ static void tms380tr_cancel_tx_queue(struct net_local* tp) | |||
2021 | dma_unmap_single(tp->pdev, tpl->DMABuff, tpl->Skb->len, DMA_TO_DEVICE); | 1985 | dma_unmap_single(tp->pdev, tpl->DMABuff, tpl->Skb->len, DMA_TO_DEVICE); |
2022 | dev_kfree_skb_any(tpl->Skb); | 1986 | dev_kfree_skb_any(tpl->Skb); |
2023 | } | 1987 | } |
2024 | |||
2025 | return; | ||
2026 | } | 1988 | } |
2027 | 1989 | ||
2028 | /* | 1990 | /* |
@@ -2094,7 +2056,6 @@ static void tms380tr_tx_status_irq(struct net_device *dev) | |||
2094 | 2056 | ||
2095 | if(!tp->TplFree->NextTPLPtr->BusyFlag) | 2057 | if(!tp->TplFree->NextTPLPtr->BusyFlag) |
2096 | netif_wake_queue(dev); | 2058 | netif_wake_queue(dev); |
2097 | return; | ||
2098 | } | 2059 | } |
2099 | 2060 | ||
2100 | /* | 2061 | /* |
@@ -2255,8 +2216,6 @@ static void tms380tr_rcv_status_irq(struct net_device *dev) | |||
2255 | /* Inform adapter about RPL valid. */ | 2216 | /* Inform adapter about RPL valid. */ |
2256 | tms380tr_exec_sifcmd(dev, CMD_RX_VALID); | 2217 | tms380tr_exec_sifcmd(dev, CMD_RX_VALID); |
2257 | } | 2218 | } |
2258 | |||
2259 | return; | ||
2260 | } | 2219 | } |
2261 | 2220 | ||
2262 | /* | 2221 | /* |
@@ -2269,8 +2228,6 @@ static void tms380tr_rcv_status_irq(struct net_device *dev) | |||
2269 | static void tms380tr_write_rpl_status(RPL *rpl, unsigned int Status) | 2228 | static void tms380tr_write_rpl_status(RPL *rpl, unsigned int Status) |
2270 | { | 2229 | { |
2271 | rpl->Status = Status; | 2230 | rpl->Status = Status; |
2272 | |||
2273 | return; | ||
2274 | } | 2231 | } |
2275 | 2232 | ||
2276 | /* | 2233 | /* |
@@ -2287,8 +2244,6 @@ static void tms380tr_update_rcv_stats(struct net_local *tp, unsigned char DataPt | |||
2287 | /* Test functional bit */ | 2244 | /* Test functional bit */ |
2288 | if(DataPtr[2] & GROUP_BIT) | 2245 | if(DataPtr[2] & GROUP_BIT) |
2289 | tp->MacStat.multicast++; | 2246 | tp->MacStat.multicast++; |
2290 | |||
2291 | return; | ||
2292 | } | 2247 | } |
2293 | 2248 | ||
2294 | static int tms380tr_set_mac_address(struct net_device *dev, void *addr) | 2249 | static int tms380tr_set_mac_address(struct net_device *dev, void *addr) |
@@ -2318,8 +2273,6 @@ static void tms380tr_dump(unsigned char *Data, int length) | |||
2318 | Data[j+0],Data[j+1],Data[j+2],Data[j+3], | 2273 | Data[j+0],Data[j+1],Data[j+2],Data[j+3], |
2319 | Data[j+4],Data[j+5],Data[j+6],Data[j+7]); | 2274 | Data[j+4],Data[j+5],Data[j+6],Data[j+7]); |
2320 | } | 2275 | } |
2321 | |||
2322 | return; | ||
2323 | } | 2276 | } |
2324 | #endif | 2277 | #endif |
2325 | 2278 | ||