diff options
Diffstat (limited to 'drivers/message')
-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 582a921c7aab..eeef0bd077f4 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) | |
@@ -1569,79 +1534,6 @@ mpt_lan_type_trans(struct sk_buff *skb, struct net_device *dev) | |||
1569 | 1534 | ||
1570 | fcllc = (struct fcllc *)skb->data; | 1535 | fcllc = (struct fcllc *)skb->data; |
1571 | 1536 | ||
1572 | #ifdef QLOGIC_NAA_WORKAROUND | ||
1573 | { | ||
1574 | u16 source_naa = fch->stype, found = 0; | ||
1575 | |||
1576 | /* Workaround for QLogic not following RFC 2625 in regards to the NAA | ||
1577 | value. */ | ||
1578 | |||
1579 | if ((source_naa & 0xF000) == 0) | ||
1580 | source_naa = swab16(source_naa); | ||
1581 | |||
1582 | if (fcllc->ethertype == htons(ETH_P_ARP)) | ||
1583 | dlprintk ((KERN_INFO "mptlan/type_trans: got arp req/rep w/ naa of " | ||
1584 | "%04x.\n", source_naa)); | ||
1585 | |||
1586 | if ((fcllc->ethertype == htons(ETH_P_ARP)) && | ||
1587 | ((source_naa >> 12) != MPT_LAN_NAA_RFC2625)){ | ||
1588 | struct NAA_Hosed *nh, *prevnh; | ||
1589 | int i; | ||
1590 | |||
1591 | dlprintk ((KERN_INFO "mptlan/type_trans: ARP Req/Rep from " | ||
1592 | "system with non-RFC 2625 NAA value (%04x).\n", | ||
1593 | source_naa)); | ||
1594 | |||
1595 | write_lock_irq(&bad_naa_lock); | ||
1596 | for (prevnh = nh = mpt_bad_naa; nh != NULL; | ||
1597 | prevnh=nh, nh=nh->next) { | ||
1598 | if ((nh->ieee[0] == fch->saddr[0]) && | ||
1599 | (nh->ieee[1] == fch->saddr[1]) && | ||
1600 | (nh->ieee[2] == fch->saddr[2]) && | ||
1601 | (nh->ieee[3] == fch->saddr[3]) && | ||
1602 | (nh->ieee[4] == fch->saddr[4]) && | ||
1603 | (nh->ieee[5] == fch->saddr[5])) { | ||
1604 | found = 1; | ||
1605 | dlprintk ((KERN_INFO "mptlan/type_trans: ARP Re" | ||
1606 | "q/Rep w/ bad NAA from system already" | ||
1607 | " in DB.\n")); | ||
1608 | break; | ||
1609 | } | ||
1610 | } | ||
1611 | |||
1612 | if ((!found) && (nh == NULL)) { | ||
1613 | |||
1614 | nh = kmalloc(sizeof(struct NAA_Hosed), GFP_KERNEL); | ||
1615 | dlprintk ((KERN_INFO "mptlan/type_trans: ARP Req/Rep w/" | ||
1616 | " bad NAA from system not yet in DB.\n")); | ||
1617 | |||
1618 | if (nh != NULL) { | ||
1619 | nh->next = NULL; | ||
1620 | if (!mpt_bad_naa) | ||
1621 | mpt_bad_naa = nh; | ||
1622 | if (prevnh) | ||
1623 | prevnh->next = nh; | ||
1624 | |||
1625 | nh->NAA = source_naa; /* Set the S_NAA value. */ | ||
1626 | for (i = 0; i < FC_ALEN; i++) | ||
1627 | nh->ieee[i] = fch->saddr[i]; | ||
1628 | dlprintk ((KERN_INFO "Got ARP from %pM with" | ||
1629 | " non-compliant S_NAA value.\n", | ||
1630 | fch->saddr)); | ||
1631 | } else { | ||
1632 | printk (KERN_ERR "mptlan/type_trans: Unable to" | ||
1633 | " kmalloc a NAA_Hosed struct.\n"); | ||
1634 | } | ||
1635 | } else if (!found) { | ||
1636 | printk (KERN_ERR "mptlan/type_trans: found not" | ||
1637 | " set, but nh isn't null. Evil " | ||
1638 | "funkiness abounds.\n"); | ||
1639 | } | ||
1640 | write_unlock_irq(&bad_naa_lock); | ||
1641 | } | ||
1642 | } | ||
1643 | #endif | ||
1644 | |||
1645 | /* Strip the SNAP header from ARP packets since we don't | 1537 | /* Strip the SNAP header from ARP packets since we don't |
1646 | * pass them through to the 802.2/SNAP layers. | 1538 | * pass them through to the 802.2/SNAP layers. |
1647 | */ | 1539 | */ |