diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-11-10 03:16:27 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-11-10 03:16:27 -0500 |
| commit | 4ecd33d930591d41fe356160593a9076467b961c (patch) | |
| tree | b9051a334540bbce38db1b2b03cebb4cf1d51f73 /drivers/message | |
| parent | 7d5a78cd98c3a5eb83bd6a061c5ea6ef1e9b8fcb (diff) | |
| parent | f7160c7573615ec82c691e294cf80d920b5d588d (diff) | |
Merge commit 'v2.6.28-rc4' into x86/apic
Diffstat (limited to 'drivers/message')
| -rw-r--r-- | drivers/message/fusion/mptctl.c | 7 | ||||
| -rw-r--r-- | drivers/message/fusion/mptlan.c | 108 | ||||
| -rw-r--r-- | drivers/message/i2o/i2o_block.c | 12 | ||||
| -rw-r--r-- | drivers/message/i2o/i2o_config.c | 21 |
4 files changed, 11 insertions, 137 deletions
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c index f5233f3d9eff..b89f476cd0a9 100644 --- a/drivers/message/fusion/mptctl.c +++ b/drivers/message/fusion/mptctl.c | |||
| @@ -559,12 +559,6 @@ mptctl_fasync(int fd, struct file *filep, int mode) | |||
| 559 | return ret; | 559 | return ret; |
| 560 | } | 560 | } |
| 561 | 561 | ||
| 562 | static int | ||
| 563 | mptctl_release(struct inode *inode, struct file *filep) | ||
| 564 | { | ||
| 565 | return fasync_helper(-1, filep, 0, &async_queue); | ||
| 566 | } | ||
| 567 | |||
| 568 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 562 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
| 569 | /* | 563 | /* |
| 570 | * MPT ioctl handler | 564 | * MPT ioctl handler |
| @@ -2706,7 +2700,6 @@ mptctl_hp_targetinfo(unsigned long arg) | |||
| 2706 | static const struct file_operations mptctl_fops = { | 2700 | static const struct file_operations mptctl_fops = { |
| 2707 | .owner = THIS_MODULE, | 2701 | .owner = THIS_MODULE, |
| 2708 | .llseek = no_llseek, | 2702 | .llseek = no_llseek, |
| 2709 | .release = mptctl_release, | ||
| 2710 | .fasync = mptctl_fasync, | 2703 | .fasync = mptctl_fasync, |
| 2711 | .unlocked_ioctl = mptctl_ioctl, | 2704 | .unlocked_ioctl = mptctl_ioctl, |
| 2712 | #ifdef CONFIG_COMPAT | 2705 | #ifdef CONFIG_COMPAT |
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. |
diff --git a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c index 11a617ab4243..84bdc2ee69e6 100644 --- a/drivers/message/i2o/i2o_block.c +++ b/drivers/message/i2o/i2o_block.c | |||
| @@ -567,8 +567,8 @@ static void i2o_block_biosparam(unsigned long capacity, unsigned short *cyls, | |||
| 567 | 567 | ||
| 568 | /** | 568 | /** |
| 569 | * i2o_block_open - Open the block device | 569 | * i2o_block_open - Open the block device |
| 570 | * @inode: inode for block device being opened | 570 | * @bdev: block device being opened |
| 571 | * @file: file to open | 571 | * @mode: file open mode |
| 572 | * | 572 | * |
| 573 | * Power up the device, mount and lock the media. This function is called, | 573 | * Power up the device, mount and lock the media. This function is called, |
| 574 | * if the block device is opened for access. | 574 | * if the block device is opened for access. |
| @@ -596,8 +596,8 @@ static int i2o_block_open(struct block_device *bdev, fmode_t mode) | |||
| 596 | 596 | ||
| 597 | /** | 597 | /** |
| 598 | * i2o_block_release - Release the I2O block device | 598 | * i2o_block_release - Release the I2O block device |
| 599 | * @inode: inode for block device being released | 599 | * @disk: gendisk device being released |
| 600 | * @file: file to close | 600 | * @mode: file open mode |
| 601 | * | 601 | * |
| 602 | * Unlock and unmount the media, and power down the device. Gets called if | 602 | * Unlock and unmount the media, and power down the device. Gets called if |
| 603 | * the block device is closed. | 603 | * the block device is closed. |
| @@ -643,8 +643,8 @@ static int i2o_block_getgeo(struct block_device *bdev, struct hd_geometry *geo) | |||
| 643 | 643 | ||
| 644 | /** | 644 | /** |
| 645 | * i2o_block_ioctl - Issue device specific ioctl calls. | 645 | * i2o_block_ioctl - Issue device specific ioctl calls. |
| 646 | * @inode: inode for block device ioctl | 646 | * @bdev: block device being opened |
| 647 | * @file: file for ioctl | 647 | * @mode: file open mode |
| 648 | * @cmd: ioctl command | 648 | * @cmd: ioctl command |
| 649 | * @arg: arg | 649 | * @arg: arg |
| 650 | * | 650 | * |
diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c index a3fabdbe6ca6..f3384c32b9a1 100644 --- a/drivers/message/i2o/i2o_config.c +++ b/drivers/message/i2o/i2o_config.c | |||
| @@ -1097,28 +1097,17 @@ static int cfg_fasync(int fd, struct file *fp, int on) | |||
| 1097 | static int cfg_release(struct inode *inode, struct file *file) | 1097 | static int cfg_release(struct inode *inode, struct file *file) |
| 1098 | { | 1098 | { |
| 1099 | ulong id = (ulong) file->private_data; | 1099 | ulong id = (ulong) file->private_data; |
| 1100 | struct i2o_cfg_info *p1, *p2; | 1100 | struct i2o_cfg_info *p, **q; |
| 1101 | unsigned long flags; | 1101 | unsigned long flags; |
| 1102 | 1102 | ||
| 1103 | lock_kernel(); | 1103 | lock_kernel(); |
| 1104 | p1 = p2 = NULL; | ||
| 1105 | |||
| 1106 | spin_lock_irqsave(&i2o_config_lock, flags); | 1104 | spin_lock_irqsave(&i2o_config_lock, flags); |
| 1107 | for (p1 = open_files; p1;) { | 1105 | for (q = &open_files; (p = *q) != NULL; q = &p->next) { |
| 1108 | if (p1->q_id == id) { | 1106 | if (p->q_id == id) { |
| 1109 | 1107 | *q = p->next; | |
| 1110 | if (p1->fasync) | 1108 | kfree(p); |
| 1111 | cfg_fasync(-1, file, 0); | ||
| 1112 | if (p2) | ||
| 1113 | p2->next = p1->next; | ||
| 1114 | else | ||
| 1115 | open_files = p1->next; | ||
| 1116 | |||
| 1117 | kfree(p1); | ||
| 1118 | break; | 1109 | break; |
| 1119 | } | 1110 | } |
| 1120 | p2 = p1; | ||
| 1121 | p1 = p1->next; | ||
| 1122 | } | 1111 | } |
| 1123 | spin_unlock_irqrestore(&i2o_config_lock, flags); | 1112 | spin_unlock_irqrestore(&i2o_config_lock, flags); |
| 1124 | unlock_kernel(); | 1113 | unlock_kernel(); |
