diff options
Diffstat (limited to 'drivers/message/fusion/mptlan.c')
| -rw-r--r-- | drivers/message/fusion/mptlan.c | 108 |
1 files changed, 0 insertions, 108 deletions
diff --git a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c index a1abf95cf751..603ffd008c73 100644 --- a/drivers/message/fusion/mptlan.c +++ b/drivers/message/fusion/mptlan.c | |||
| @@ -77,12 +77,6 @@ MODULE_VERSION(my_VERSION); | |||
| 77 | * Fusion MPT LAN private structures | 77 | * Fusion MPT LAN private structures |
| 78 | */ | 78 | */ |
| 79 | 79 | ||
| 80 | struct NAA_Hosed { | ||
| 81 | u16 NAA; | ||
| 82 | u8 ieee[FC_ALEN]; | ||
| 83 | struct NAA_Hosed *next; | ||
| 84 | }; | ||
| 85 | |||
| 86 | struct BufferControl { | 80 | struct BufferControl { |
| 87 | struct sk_buff *skb; | 81 | struct sk_buff *skb; |
| 88 | dma_addr_t dma; | 82 | dma_addr_t dma; |
| @@ -159,11 +153,6 @@ static u8 LanCtx = MPT_MAX_PROTOCOL_DRIVERS; | |||
| 159 | static u32 max_buckets_out = 127; | 153 | static u32 max_buckets_out = 127; |
| 160 | static u32 tx_max_out_p = 127 - 16; | 154 | static u32 tx_max_out_p = 127 - 16; |
| 161 | 155 | ||
| 162 | #ifdef QLOGIC_NAA_WORKAROUND | ||
| 163 | static struct NAA_Hosed *mpt_bad_naa = NULL; | ||
| 164 | DEFINE_RWLOCK(bad_naa_lock); | ||
| 165 | #endif | ||
| 166 | |||
| 167 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 156 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
| 168 | /** | 157 | /** |
| 169 | * lan_reply - Handle all data sent from the hardware. | 158 | * lan_reply - Handle all data sent from the hardware. |
| @@ -780,30 +769,6 @@ mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev) | |||
| 780 | // ctx, skb, skb->data)); | 769 | // ctx, skb, skb->data)); |
| 781 | 770 | ||
| 782 | mac = skb_mac_header(skb); | 771 | mac = skb_mac_header(skb); |
| 783 | #ifdef QLOGIC_NAA_WORKAROUND | ||
| 784 | { | ||
| 785 | struct NAA_Hosed *nh; | ||
| 786 | |||
| 787 | /* Munge the NAA for Tx packets to QLogic boards, which don't follow | ||
| 788 | RFC 2625. The longer I look at this, the more my opinion of Qlogic | ||
| 789 | drops. */ | ||
| 790 | read_lock_irq(&bad_naa_lock); | ||
| 791 | for (nh = mpt_bad_naa; nh != NULL; nh=nh->next) { | ||
| 792 | if ((nh->ieee[0] == mac[0]) && | ||
| 793 | (nh->ieee[1] == mac[1]) && | ||
| 794 | (nh->ieee[2] == mac[2]) && | ||
| 795 | (nh->ieee[3] == mac[3]) && | ||
| 796 | (nh->ieee[4] == mac[4]) && | ||
| 797 | (nh->ieee[5] == mac[5])) { | ||
| 798 | cur_naa = nh->NAA; | ||
| 799 | dlprintk ((KERN_INFO "mptlan/sdu_send: using NAA value " | ||
| 800 | "= %04x.\n", cur_naa)); | ||
| 801 | break; | ||
| 802 | } | ||
| 803 | } | ||
| 804 | read_unlock_irq(&bad_naa_lock); | ||
| 805 | } | ||
| 806 | #endif | ||
| 807 | 772 | ||
| 808 | pTrans->TransactionDetails[0] = cpu_to_le32((cur_naa << 16) | | 773 | pTrans->TransactionDetails[0] = cpu_to_le32((cur_naa << 16) | |
| 809 | (mac[0] << 8) | | 774 | (mac[0] << 8) | |
| @@ -1572,79 +1537,6 @@ mpt_lan_type_trans(struct sk_buff *skb, struct net_device *dev) | |||
| 1572 | 1537 | ||
| 1573 | fcllc = (struct fcllc *)skb->data; | 1538 | fcllc = (struct fcllc *)skb->data; |
| 1574 | 1539 | ||
| 1575 | #ifdef QLOGIC_NAA_WORKAROUND | ||
| 1576 | { | ||
| 1577 | u16 source_naa = fch->stype, found = 0; | ||
| 1578 | |||
| 1579 | /* Workaround for QLogic not following RFC 2625 in regards to the NAA | ||
| 1580 | value. */ | ||
| 1581 | |||
| 1582 | if ((source_naa & 0xF000) == 0) | ||
| 1583 | source_naa = swab16(source_naa); | ||
| 1584 | |||
| 1585 | if (fcllc->ethertype == htons(ETH_P_ARP)) | ||
| 1586 | dlprintk ((KERN_INFO "mptlan/type_trans: got arp req/rep w/ naa of " | ||
| 1587 | "%04x.\n", source_naa)); | ||
| 1588 | |||
| 1589 | if ((fcllc->ethertype == htons(ETH_P_ARP)) && | ||
| 1590 | ((source_naa >> 12) != MPT_LAN_NAA_RFC2625)){ | ||
| 1591 | struct NAA_Hosed *nh, *prevnh; | ||
| 1592 | int i; | ||
| 1593 | |||
| 1594 | dlprintk ((KERN_INFO "mptlan/type_trans: ARP Req/Rep from " | ||
| 1595 | "system with non-RFC 2625 NAA value (%04x).\n", | ||
| 1596 | source_naa)); | ||
| 1597 | |||
| 1598 | write_lock_irq(&bad_naa_lock); | ||
| 1599 | for (prevnh = nh = mpt_bad_naa; nh != NULL; | ||
| 1600 | prevnh=nh, nh=nh->next) { | ||
| 1601 | if ((nh->ieee[0] == fch->saddr[0]) && | ||
| 1602 | (nh->ieee[1] == fch->saddr[1]) && | ||
| 1603 | (nh->ieee[2] == fch->saddr[2]) && | ||
| 1604 | (nh->ieee[3] == fch->saddr[3]) && | ||
| 1605 | (nh->ieee[4] == fch->saddr[4]) && | ||
| 1606 | (nh->ieee[5] == fch->saddr[5])) { | ||
| 1607 | found = 1; | ||
| 1608 | dlprintk ((KERN_INFO "mptlan/type_trans: ARP Re" | ||
| 1609 | "q/Rep w/ bad NAA from system already" | ||
| 1610 | " in DB.\n")); | ||
| 1611 | break; | ||
| 1612 | } | ||
| 1613 | } | ||
| 1614 | |||
| 1615 | if ((!found) && (nh == NULL)) { | ||
| 1616 | |||
| 1617 | nh = kmalloc(sizeof(struct NAA_Hosed), GFP_KERNEL); | ||
| 1618 | dlprintk ((KERN_INFO "mptlan/type_trans: ARP Req/Rep w/" | ||
| 1619 | " bad NAA from system not yet in DB.\n")); | ||
| 1620 | |||
| 1621 | if (nh != NULL) { | ||
| 1622 | nh->next = NULL; | ||
| 1623 | if (!mpt_bad_naa) | ||
| 1624 | mpt_bad_naa = nh; | ||
| 1625 | if (prevnh) | ||
| 1626 | prevnh->next = nh; | ||
| 1627 | |||
| 1628 | nh->NAA = source_naa; /* Set the S_NAA value. */ | ||
| 1629 | for (i = 0; i < FC_ALEN; i++) | ||
| 1630 | nh->ieee[i] = fch->saddr[i]; | ||
| 1631 | dlprintk ((KERN_INFO "Got ARP from %02x:%02x:%02x:%02x:" | ||
| 1632 | "%02x:%02x with non-compliant S_NAA value.\n", | ||
| 1633 | fch->saddr[0], fch->saddr[1], fch->saddr[2], | ||
| 1634 | fch->saddr[3], fch->saddr[4],fch->saddr[5])); | ||
| 1635 | } else { | ||
| 1636 | printk (KERN_ERR "mptlan/type_trans: Unable to" | ||
| 1637 | " kmalloc a NAA_Hosed struct.\n"); | ||
| 1638 | } | ||
| 1639 | } else if (!found) { | ||
| 1640 | printk (KERN_ERR "mptlan/type_trans: found not" | ||
| 1641 | " set, but nh isn't null. Evil " | ||
| 1642 | "funkiness abounds.\n"); | ||
| 1643 | } | ||
| 1644 | write_unlock_irq(&bad_naa_lock); | ||
| 1645 | } | ||
| 1646 | } | ||
| 1647 | #endif | ||
| 1648 | 1540 | ||
| 1649 | /* Strip the SNAP header from ARP packets since we don't | 1541 | /* Strip the SNAP header from ARP packets since we don't |
| 1650 | * pass them through to the 802.2/SNAP layers. | 1542 | * pass them through to the 802.2/SNAP layers. |
