diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-09 10:33:02 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-09 10:33:02 -0400 |
commit | 9dc263239bb2cfeb242d8ef758fca66a968822d5 (patch) | |
tree | 70c0c46fa6f01740c776ae24bc0874a8d97df222 /drivers | |
parent | 0e5dec478cfff2c29e68d1108ff828fa321adc59 (diff) | |
parent | 829841146878e082613a49581ae252c071057c23 (diff) |
Merge branch 'master'
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/atm/fore200e.c | 10 | ||||
-rw-r--r-- | drivers/char/drm/drm_stub.c | 2 | ||||
-rw-r--r-- | drivers/connector/connector.c | 3 | ||||
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_main.c | 45 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 4 | ||||
-rw-r--r-- | drivers/mfd/ucb1x00-core.c | 2 | ||||
-rw-r--r-- | drivers/mfd/ucb1x00.h | 2 | ||||
-rw-r--r-- | drivers/net/Kconfig | 8 | ||||
-rw-r--r-- | drivers/net/bonding/bond_main.c | 285 | ||||
-rw-r--r-- | drivers/net/bonding/bonding.h | 4 | ||||
-rw-r--r-- | drivers/net/ibm_emac/ibm_emac_core.c | 31 | ||||
-rw-r--r-- | drivers/net/ns83820.c | 2 | ||||
-rw-r--r-- | drivers/net/pcmcia/smc91c92_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/skge.c | 24 | ||||
-rw-r--r-- | drivers/net/starfire.c | 46 | ||||
-rw-r--r-- | drivers/net/sungem.h | 3 | ||||
-rw-r--r-- | drivers/net/tokenring/ibmtr.c | 5 | ||||
-rw-r--r-- | drivers/net/tulip/21142.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco.c | 14 | ||||
-rw-r--r-- | drivers/s390/net/qeth.h | 2 | ||||
-rw-r--r-- | drivers/s390/net/qeth_main.c | 37 | ||||
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas.c | 1 | ||||
-rw-r--r-- | drivers/serial/sunsu.c | 4 |
23 files changed, 213 insertions, 325 deletions
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c index 2bf723a7b6e6..6f1a83c9d9e0 100644 --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore200e.c | |||
@@ -178,14 +178,12 @@ fore200e_irq_itoa(int irq) | |||
178 | 178 | ||
179 | 179 | ||
180 | static void* | 180 | static void* |
181 | fore200e_kmalloc(int size, int flags) | 181 | fore200e_kmalloc(int size, unsigned int __nocast flags) |
182 | { | 182 | { |
183 | void* chunk = kmalloc(size, flags); | 183 | void *chunk = kzalloc(size, flags); |
184 | 184 | ||
185 | if (chunk) | 185 | if (!chunk) |
186 | memset(chunk, 0x00, size); | 186 | printk(FORE200E "kmalloc() failed, requested size = %d, flags = 0x%x\n", size, flags); |
187 | else | ||
188 | printk(FORE200E "kmalloc() failed, requested size = %d, flags = 0x%x\n", size, flags); | ||
189 | 187 | ||
190 | return chunk; | 188 | return chunk; |
191 | } | 189 | } |
diff --git a/drivers/char/drm/drm_stub.c b/drivers/char/drm/drm_stub.c index 95a976c96eb8..70458cb061c6 100644 --- a/drivers/char/drm/drm_stub.c +++ b/drivers/char/drm/drm_stub.c | |||
@@ -47,7 +47,7 @@ MODULE_PARM_DESC(cards_limit, "Maximum number of graphics cards"); | |||
47 | MODULE_PARM_DESC(debug, "Enable debug output"); | 47 | MODULE_PARM_DESC(debug, "Enable debug output"); |
48 | 48 | ||
49 | module_param_named(cards_limit, drm_cards_limit, int, 0444); | 49 | module_param_named(cards_limit, drm_cards_limit, int, 0444); |
50 | module_param_named(debug, drm_debug, int, 0666); | 50 | module_param_named(debug, drm_debug, int, 0600); |
51 | 51 | ||
52 | drm_head_t **drm_heads; | 52 | drm_head_t **drm_heads; |
53 | struct drm_sysfs_class *drm_class; | 53 | struct drm_sysfs_class *drm_class; |
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c index bb0b3a8de14b..1422285d537c 100644 --- a/drivers/connector/connector.c +++ b/drivers/connector/connector.c | |||
@@ -69,7 +69,8 @@ int cn_already_initialized = 0; | |||
69 | * a new message. | 69 | * a new message. |
70 | * | 70 | * |
71 | */ | 71 | */ |
72 | int cn_netlink_send(struct cn_msg *msg, u32 __group, int gfp_mask) | 72 | int cn_netlink_send(struct cn_msg *msg, u32 __group, |
73 | unsigned int __nocast gfp_mask) | ||
73 | { | 74 | { |
74 | struct cn_callback_entry *__cbq; | 75 | struct cn_callback_entry *__cbq; |
75 | unsigned int size; | 76 | unsigned int size; |
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c index ffbcd40418d5..23a3f56c7899 100644 --- a/drivers/infiniband/hw/mthca/mthca_main.c +++ b/drivers/infiniband/hw/mthca/mthca_main.c | |||
@@ -503,6 +503,25 @@ err_free_aux: | |||
503 | return err; | 503 | return err; |
504 | } | 504 | } |
505 | 505 | ||
506 | static void mthca_free_icms(struct mthca_dev *mdev) | ||
507 | { | ||
508 | u8 status; | ||
509 | |||
510 | mthca_free_icm_table(mdev, mdev->mcg_table.table); | ||
511 | if (mdev->mthca_flags & MTHCA_FLAG_SRQ) | ||
512 | mthca_free_icm_table(mdev, mdev->srq_table.table); | ||
513 | mthca_free_icm_table(mdev, mdev->cq_table.table); | ||
514 | mthca_free_icm_table(mdev, mdev->qp_table.rdb_table); | ||
515 | mthca_free_icm_table(mdev, mdev->qp_table.eqp_table); | ||
516 | mthca_free_icm_table(mdev, mdev->qp_table.qp_table); | ||
517 | mthca_free_icm_table(mdev, mdev->mr_table.mpt_table); | ||
518 | mthca_free_icm_table(mdev, mdev->mr_table.mtt_table); | ||
519 | mthca_unmap_eq_icm(mdev); | ||
520 | |||
521 | mthca_UNMAP_ICM_AUX(mdev, &status); | ||
522 | mthca_free_icm(mdev, mdev->fw.arbel.aux_icm); | ||
523 | } | ||
524 | |||
506 | static int __devinit mthca_init_arbel(struct mthca_dev *mdev) | 525 | static int __devinit mthca_init_arbel(struct mthca_dev *mdev) |
507 | { | 526 | { |
508 | struct mthca_dev_lim dev_lim; | 527 | struct mthca_dev_lim dev_lim; |
@@ -580,18 +599,7 @@ static int __devinit mthca_init_arbel(struct mthca_dev *mdev) | |||
580 | return 0; | 599 | return 0; |
581 | 600 | ||
582 | err_free_icm: | 601 | err_free_icm: |
583 | if (mdev->mthca_flags & MTHCA_FLAG_SRQ) | 602 | mthca_free_icms(mdev); |
584 | mthca_free_icm_table(mdev, mdev->srq_table.table); | ||
585 | mthca_free_icm_table(mdev, mdev->cq_table.table); | ||
586 | mthca_free_icm_table(mdev, mdev->qp_table.rdb_table); | ||
587 | mthca_free_icm_table(mdev, mdev->qp_table.eqp_table); | ||
588 | mthca_free_icm_table(mdev, mdev->qp_table.qp_table); | ||
589 | mthca_free_icm_table(mdev, mdev->mr_table.mpt_table); | ||
590 | mthca_free_icm_table(mdev, mdev->mr_table.mtt_table); | ||
591 | mthca_unmap_eq_icm(mdev); | ||
592 | |||
593 | mthca_UNMAP_ICM_AUX(mdev, &status); | ||
594 | mthca_free_icm(mdev, mdev->fw.arbel.aux_icm); | ||
595 | 603 | ||
596 | err_stop_fw: | 604 | err_stop_fw: |
597 | mthca_UNMAP_FA(mdev, &status); | 605 | mthca_UNMAP_FA(mdev, &status); |
@@ -611,18 +619,7 @@ static void mthca_close_hca(struct mthca_dev *mdev) | |||
611 | mthca_CLOSE_HCA(mdev, 0, &status); | 619 | mthca_CLOSE_HCA(mdev, 0, &status); |
612 | 620 | ||
613 | if (mthca_is_memfree(mdev)) { | 621 | if (mthca_is_memfree(mdev)) { |
614 | if (mdev->mthca_flags & MTHCA_FLAG_SRQ) | 622 | mthca_free_icms(mdev); |
615 | mthca_free_icm_table(mdev, mdev->srq_table.table); | ||
616 | mthca_free_icm_table(mdev, mdev->cq_table.table); | ||
617 | mthca_free_icm_table(mdev, mdev->qp_table.rdb_table); | ||
618 | mthca_free_icm_table(mdev, mdev->qp_table.eqp_table); | ||
619 | mthca_free_icm_table(mdev, mdev->qp_table.qp_table); | ||
620 | mthca_free_icm_table(mdev, mdev->mr_table.mpt_table); | ||
621 | mthca_free_icm_table(mdev, mdev->mr_table.mtt_table); | ||
622 | mthca_unmap_eq_icm(mdev); | ||
623 | |||
624 | mthca_UNMAP_ICM_AUX(mdev, &status); | ||
625 | mthca_free_icm(mdev, mdev->fw.arbel.aux_icm); | ||
626 | 623 | ||
627 | mthca_UNMAP_FA(mdev, &status); | 624 | mthca_UNMAP_FA(mdev, &status); |
628 | mthca_free_icm(mdev, mdev->fw.arbel.fw_icm); | 625 | mthca_free_icm(mdev, mdev->fw.arbel.fw_icm); |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 704f48e0b6a7..6c5bf07489f4 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c | |||
@@ -474,7 +474,7 @@ err: | |||
474 | spin_unlock(&priv->lock); | 474 | spin_unlock(&priv->lock); |
475 | } | 475 | } |
476 | 476 | ||
477 | static void path_lookup(struct sk_buff *skb, struct net_device *dev) | 477 | static void ipoib_path_lookup(struct sk_buff *skb, struct net_device *dev) |
478 | { | 478 | { |
479 | struct ipoib_dev_priv *priv = netdev_priv(skb->dev); | 479 | struct ipoib_dev_priv *priv = netdev_priv(skb->dev); |
480 | 480 | ||
@@ -569,7 +569,7 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
569 | 569 | ||
570 | if (skb->dst && skb->dst->neighbour) { | 570 | if (skb->dst && skb->dst->neighbour) { |
571 | if (unlikely(!*to_ipoib_neigh(skb->dst->neighbour))) { | 571 | if (unlikely(!*to_ipoib_neigh(skb->dst->neighbour))) { |
572 | path_lookup(skb, dev); | 572 | ipoib_path_lookup(skb, dev); |
573 | goto out; | 573 | goto out; |
574 | } | 574 | } |
575 | 575 | ||
diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c index 10f6ce1bc0ab..612564ac6f7b 100644 --- a/drivers/mfd/ucb1x00-core.c +++ b/drivers/mfd/ucb1x00-core.c | |||
@@ -642,8 +642,6 @@ static void __exit ucb1x00_exit(void) | |||
642 | module_init(ucb1x00_init); | 642 | module_init(ucb1x00_init); |
643 | module_exit(ucb1x00_exit); | 643 | module_exit(ucb1x00_exit); |
644 | 644 | ||
645 | EXPORT_SYMBOL(ucb1x00_class); | ||
646 | |||
647 | EXPORT_SYMBOL(ucb1x00_io_set_dir); | 645 | EXPORT_SYMBOL(ucb1x00_io_set_dir); |
648 | EXPORT_SYMBOL(ucb1x00_io_write); | 646 | EXPORT_SYMBOL(ucb1x00_io_write); |
649 | EXPORT_SYMBOL(ucb1x00_io_read); | 647 | EXPORT_SYMBOL(ucb1x00_io_read); |
diff --git a/drivers/mfd/ucb1x00.h b/drivers/mfd/ucb1x00.h index 6b632644f59a..9c9a647d8b7b 100644 --- a/drivers/mfd/ucb1x00.h +++ b/drivers/mfd/ucb1x00.h | |||
@@ -106,8 +106,6 @@ struct ucb1x00_irq { | |||
106 | void (*fn)(int, void *); | 106 | void (*fn)(int, void *); |
107 | }; | 107 | }; |
108 | 108 | ||
109 | extern struct class ucb1x00_class; | ||
110 | |||
111 | struct ucb1x00 { | 109 | struct ucb1x00 { |
112 | spinlock_t lock; | 110 | spinlock_t lock; |
113 | struct mcp *mcp; | 111 | struct mcp *mcp; |
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 2a908c4690a7..c748b0e16419 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -1655,7 +1655,7 @@ config LAN_SAA9730 | |||
1655 | 1655 | ||
1656 | config NET_POCKET | 1656 | config NET_POCKET |
1657 | bool "Pocket and portable adapters" | 1657 | bool "Pocket and portable adapters" |
1658 | depends on NET_ETHERNET && ISA | 1658 | depends on NET_ETHERNET && PARPORT |
1659 | ---help--- | 1659 | ---help--- |
1660 | Cute little network (Ethernet) devices which attach to the parallel | 1660 | Cute little network (Ethernet) devices which attach to the parallel |
1661 | port ("pocket adapters"), commonly used with laptops. If you have | 1661 | port ("pocket adapters"), commonly used with laptops. If you have |
@@ -1679,7 +1679,7 @@ config NET_POCKET | |||
1679 | 1679 | ||
1680 | config ATP | 1680 | config ATP |
1681 | tristate "AT-LAN-TEC/RealTek pocket adapter support" | 1681 | tristate "AT-LAN-TEC/RealTek pocket adapter support" |
1682 | depends on NET_POCKET && ISA && X86 | 1682 | depends on NET_POCKET && PARPORT && X86 |
1683 | select CRC32 | 1683 | select CRC32 |
1684 | ---help--- | 1684 | ---help--- |
1685 | This is a network (Ethernet) device which attaches to your parallel | 1685 | This is a network (Ethernet) device which attaches to your parallel |
@@ -1694,7 +1694,7 @@ config ATP | |||
1694 | 1694 | ||
1695 | config DE600 | 1695 | config DE600 |
1696 | tristate "D-Link DE600 pocket adapter support" | 1696 | tristate "D-Link DE600 pocket adapter support" |
1697 | depends on NET_POCKET && ISA | 1697 | depends on NET_POCKET && PARPORT |
1698 | ---help--- | 1698 | ---help--- |
1699 | This is a network (Ethernet) device which attaches to your parallel | 1699 | This is a network (Ethernet) device which attaches to your parallel |
1700 | port. Read <file:Documentation/networking/DLINK.txt> as well as the | 1700 | port. Read <file:Documentation/networking/DLINK.txt> as well as the |
@@ -1709,7 +1709,7 @@ config DE600 | |||
1709 | 1709 | ||
1710 | config DE620 | 1710 | config DE620 |
1711 | tristate "D-Link DE620 pocket adapter support" | 1711 | tristate "D-Link DE620 pocket adapter support" |
1712 | depends on NET_POCKET && ISA | 1712 | depends on NET_POCKET && PARPORT |
1713 | ---help--- | 1713 | ---help--- |
1714 | This is a network (Ethernet) device which attaches to your parallel | 1714 | This is a network (Ethernet) device which attaches to your parallel |
1715 | port. Read <file:Documentation/networking/DLINK.txt> as well as the | 1715 | port. Read <file:Documentation/networking/DLINK.txt> as well as the |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index bf81cd45e4d4..f0a5b772a386 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -487,6 +487,8 @@ | |||
487 | * * Added xmit_hash_policy_layer34() | 487 | * * Added xmit_hash_policy_layer34() |
488 | * - Modified by Jay Vosburgh <fubar@us.ibm.com> to also support mode 4. | 488 | * - Modified by Jay Vosburgh <fubar@us.ibm.com> to also support mode 4. |
489 | * Set version to 2.6.3. | 489 | * Set version to 2.6.3. |
490 | * 2005/09/26 - Jay Vosburgh <fubar@us.ibm.com> | ||
491 | * - Removed backwards compatibility for old ifenslaves. Version 2.6.4. | ||
490 | */ | 492 | */ |
491 | 493 | ||
492 | //#define BONDING_DEBUG 1 | 494 | //#define BONDING_DEBUG 1 |
@@ -595,14 +597,7 @@ static int arp_ip_count = 0; | |||
595 | static int bond_mode = BOND_MODE_ROUNDROBIN; | 597 | static int bond_mode = BOND_MODE_ROUNDROBIN; |
596 | static int xmit_hashtype= BOND_XMIT_POLICY_LAYER2; | 598 | static int xmit_hashtype= BOND_XMIT_POLICY_LAYER2; |
597 | static int lacp_fast = 0; | 599 | static int lacp_fast = 0; |
598 | static int app_abi_ver = 0; | 600 | |
599 | static int orig_app_abi_ver = -1; /* This is used to save the first ABI version | ||
600 | * we receive from the application. Once set, | ||
601 | * it won't be changed, and the module will | ||
602 | * refuse to enslave/release interfaces if the | ||
603 | * command comes from an application using | ||
604 | * another ABI version. | ||
605 | */ | ||
606 | struct bond_parm_tbl { | 601 | struct bond_parm_tbl { |
607 | char *modename; | 602 | char *modename; |
608 | int mode; | 603 | int mode; |
@@ -1294,12 +1289,13 @@ static void bond_mc_list_destroy(struct bonding *bond) | |||
1294 | /* | 1289 | /* |
1295 | * Copy all the Multicast addresses from src to the bonding device dst | 1290 | * Copy all the Multicast addresses from src to the bonding device dst |
1296 | */ | 1291 | */ |
1297 | static int bond_mc_list_copy(struct dev_mc_list *mc_list, struct bonding *bond, int gpf_flag) | 1292 | static int bond_mc_list_copy(struct dev_mc_list *mc_list, struct bonding *bond, |
1293 | unsigned int __nocast gfp_flag) | ||
1298 | { | 1294 | { |
1299 | struct dev_mc_list *dmi, *new_dmi; | 1295 | struct dev_mc_list *dmi, *new_dmi; |
1300 | 1296 | ||
1301 | for (dmi = mc_list; dmi; dmi = dmi->next) { | 1297 | for (dmi = mc_list; dmi; dmi = dmi->next) { |
1302 | new_dmi = kmalloc(sizeof(struct dev_mc_list), gpf_flag); | 1298 | new_dmi = kmalloc(sizeof(struct dev_mc_list), gfp_flag); |
1303 | 1299 | ||
1304 | if (!new_dmi) { | 1300 | if (!new_dmi) { |
1305 | /* FIXME: Potential memory leak !!! */ | 1301 | /* FIXME: Potential memory leak !!! */ |
@@ -1702,51 +1698,29 @@ static int bond_enslave(struct net_device *bond_dev, struct net_device *slave_de | |||
1702 | } | 1698 | } |
1703 | } | 1699 | } |
1704 | 1700 | ||
1705 | if (app_abi_ver >= 1) { | 1701 | /* |
1706 | /* The application is using an ABI, which requires the | 1702 | * Old ifenslave binaries are no longer supported. These can |
1707 | * slave interface to be closed. | 1703 | * be identified with moderate accurary by the state of the slave: |
1708 | */ | 1704 | * the current ifenslave will set the interface down prior to |
1709 | if ((slave_dev->flags & IFF_UP)) { | 1705 | * enslaving it; the old ifenslave will not. |
1710 | printk(KERN_ERR DRV_NAME | 1706 | */ |
1711 | ": Error: %s is up\n", | 1707 | if ((slave_dev->flags & IFF_UP)) { |
1712 | slave_dev->name); | 1708 | printk(KERN_ERR DRV_NAME ": %s is up. " |
1713 | res = -EPERM; | 1709 | "This may be due to an out of date ifenslave.\n", |
1714 | goto err_undo_flags; | 1710 | slave_dev->name); |
1715 | } | 1711 | res = -EPERM; |
1716 | 1712 | goto err_undo_flags; | |
1717 | if (slave_dev->set_mac_address == NULL) { | 1713 | } |
1718 | printk(KERN_ERR DRV_NAME | ||
1719 | ": Error: The slave device you specified does " | ||
1720 | "not support setting the MAC address.\n"); | ||
1721 | printk(KERN_ERR | ||
1722 | "Your kernel likely does not support slave " | ||
1723 | "devices.\n"); | ||
1724 | 1714 | ||
1725 | res = -EOPNOTSUPP; | 1715 | if (slave_dev->set_mac_address == NULL) { |
1726 | goto err_undo_flags; | 1716 | printk(KERN_ERR DRV_NAME |
1727 | } | 1717 | ": Error: The slave device you specified does " |
1728 | } else { | 1718 | "not support setting the MAC address.\n"); |
1729 | /* The application is not using an ABI, which requires the | 1719 | printk(KERN_ERR |
1730 | * slave interface to be open. | 1720 | "Your kernel likely does not support slave devices.\n"); |
1731 | */ | ||
1732 | if (!(slave_dev->flags & IFF_UP)) { | ||
1733 | printk(KERN_ERR DRV_NAME | ||
1734 | ": Error: %s is not running\n", | ||
1735 | slave_dev->name); | ||
1736 | res = -EINVAL; | ||
1737 | goto err_undo_flags; | ||
1738 | } | ||
1739 | 1721 | ||
1740 | if ((bond->params.mode == BOND_MODE_8023AD) || | 1722 | res = -EOPNOTSUPP; |
1741 | (bond->params.mode == BOND_MODE_TLB) || | 1723 | goto err_undo_flags; |
1742 | (bond->params.mode == BOND_MODE_ALB)) { | ||
1743 | printk(KERN_ERR DRV_NAME | ||
1744 | ": Error: to use %s mode, you must upgrade " | ||
1745 | "ifenslave.\n", | ||
1746 | bond_mode_name(bond->params.mode)); | ||
1747 | res = -EOPNOTSUPP; | ||
1748 | goto err_undo_flags; | ||
1749 | } | ||
1750 | } | 1724 | } |
1751 | 1725 | ||
1752 | new_slave = kmalloc(sizeof(struct slave), GFP_KERNEL); | 1726 | new_slave = kmalloc(sizeof(struct slave), GFP_KERNEL); |
@@ -1762,41 +1736,36 @@ static int bond_enslave(struct net_device *bond_dev, struct net_device *slave_de | |||
1762 | */ | 1736 | */ |
1763 | new_slave->original_flags = slave_dev->flags; | 1737 | new_slave->original_flags = slave_dev->flags; |
1764 | 1738 | ||
1765 | if (app_abi_ver >= 1) { | 1739 | /* |
1766 | /* save slave's original ("permanent") mac address for | 1740 | * Save slave's original ("permanent") mac address for modes |
1767 | * modes that needs it, and for restoring it upon release, | 1741 | * that need it, and for restoring it upon release, and then |
1768 | * and then set it to the master's address | 1742 | * set it to the master's address |
1769 | */ | 1743 | */ |
1770 | memcpy(new_slave->perm_hwaddr, slave_dev->dev_addr, ETH_ALEN); | 1744 | memcpy(new_slave->perm_hwaddr, slave_dev->dev_addr, ETH_ALEN); |
1771 | 1745 | ||
1772 | /* set slave to master's mac address | 1746 | /* |
1773 | * The application already set the master's | 1747 | * Set slave to master's mac address. The application already |
1774 | * mac address to that of the first slave | 1748 | * set the master's mac address to that of the first slave |
1775 | */ | 1749 | */ |
1776 | memcpy(addr.sa_data, bond_dev->dev_addr, bond_dev->addr_len); | 1750 | memcpy(addr.sa_data, bond_dev->dev_addr, bond_dev->addr_len); |
1777 | addr.sa_family = slave_dev->type; | 1751 | addr.sa_family = slave_dev->type; |
1778 | res = dev_set_mac_address(slave_dev, &addr); | 1752 | res = dev_set_mac_address(slave_dev, &addr); |
1779 | if (res) { | 1753 | if (res) { |
1780 | dprintk("Error %d calling set_mac_address\n", res); | 1754 | dprintk("Error %d calling set_mac_address\n", res); |
1781 | goto err_free; | 1755 | goto err_free; |
1782 | } | 1756 | } |
1783 | 1757 | ||
1784 | /* open the slave since the application closed it */ | 1758 | /* open the slave since the application closed it */ |
1785 | res = dev_open(slave_dev); | 1759 | res = dev_open(slave_dev); |
1786 | if (res) { | 1760 | if (res) { |
1787 | dprintk("Openning slave %s failed\n", slave_dev->name); | 1761 | dprintk("Openning slave %s failed\n", slave_dev->name); |
1788 | goto err_restore_mac; | 1762 | goto err_restore_mac; |
1789 | } | ||
1790 | } | 1763 | } |
1791 | 1764 | ||
1792 | res = netdev_set_master(slave_dev, bond_dev); | 1765 | res = netdev_set_master(slave_dev, bond_dev); |
1793 | if (res) { | 1766 | if (res) { |
1794 | dprintk("Error %d calling netdev_set_master\n", res); | 1767 | dprintk("Error %d calling netdev_set_master\n", res); |
1795 | if (app_abi_ver < 1) { | 1768 | goto err_close; |
1796 | goto err_free; | ||
1797 | } else { | ||
1798 | goto err_close; | ||
1799 | } | ||
1800 | } | 1769 | } |
1801 | 1770 | ||
1802 | new_slave->dev = slave_dev; | 1771 | new_slave->dev = slave_dev; |
@@ -1997,39 +1966,6 @@ static int bond_enslave(struct net_device *bond_dev, struct net_device *slave_de | |||
1997 | 1966 | ||
1998 | write_unlock_bh(&bond->lock); | 1967 | write_unlock_bh(&bond->lock); |
1999 | 1968 | ||
2000 | if (app_abi_ver < 1) { | ||
2001 | /* | ||
2002 | * !!! This is to support old versions of ifenslave. | ||
2003 | * We can remove this in 2.5 because our ifenslave takes | ||
2004 | * care of this for us. | ||
2005 | * We check to see if the master has a mac address yet. | ||
2006 | * If not, we'll give it the mac address of our slave device. | ||
2007 | */ | ||
2008 | int ndx = 0; | ||
2009 | |||
2010 | for (ndx = 0; ndx < bond_dev->addr_len; ndx++) { | ||
2011 | dprintk("Checking ndx=%d of bond_dev->dev_addr\n", | ||
2012 | ndx); | ||
2013 | if (bond_dev->dev_addr[ndx] != 0) { | ||
2014 | dprintk("Found non-zero byte at ndx=%d\n", | ||
2015 | ndx); | ||
2016 | break; | ||
2017 | } | ||
2018 | } | ||
2019 | |||
2020 | if (ndx == bond_dev->addr_len) { | ||
2021 | /* | ||
2022 | * We got all the way through the address and it was | ||
2023 | * all 0's. | ||
2024 | */ | ||
2025 | dprintk("%s doesn't have a MAC address yet. \n", | ||
2026 | bond_dev->name); | ||
2027 | dprintk("Going to give assign it from %s.\n", | ||
2028 | slave_dev->name); | ||
2029 | bond_sethwaddr(bond_dev, slave_dev); | ||
2030 | } | ||
2031 | } | ||
2032 | |||
2033 | printk(KERN_INFO DRV_NAME | 1969 | printk(KERN_INFO DRV_NAME |
2034 | ": %s: enslaving %s as a%s interface with a%s link.\n", | 1970 | ": %s: enslaving %s as a%s interface with a%s link.\n", |
2035 | bond_dev->name, slave_dev->name, | 1971 | bond_dev->name, slave_dev->name, |
@@ -2227,12 +2163,10 @@ static int bond_release(struct net_device *bond_dev, struct net_device *slave_de | |||
2227 | /* close slave before restoring its mac address */ | 2163 | /* close slave before restoring its mac address */ |
2228 | dev_close(slave_dev); | 2164 | dev_close(slave_dev); |
2229 | 2165 | ||
2230 | if (app_abi_ver >= 1) { | 2166 | /* restore original ("permanent") mac address */ |
2231 | /* restore original ("permanent") mac address */ | 2167 | memcpy(addr.sa_data, slave->perm_hwaddr, ETH_ALEN); |
2232 | memcpy(addr.sa_data, slave->perm_hwaddr, ETH_ALEN); | 2168 | addr.sa_family = slave_dev->type; |
2233 | addr.sa_family = slave_dev->type; | 2169 | dev_set_mac_address(slave_dev, &addr); |
2234 | dev_set_mac_address(slave_dev, &addr); | ||
2235 | } | ||
2236 | 2170 | ||
2237 | /* restore the original state of the | 2171 | /* restore the original state of the |
2238 | * IFF_NOARP flag that might have been | 2172 | * IFF_NOARP flag that might have been |
@@ -2320,12 +2254,10 @@ static int bond_release_all(struct net_device *bond_dev) | |||
2320 | /* close slave before restoring its mac address */ | 2254 | /* close slave before restoring its mac address */ |
2321 | dev_close(slave_dev); | 2255 | dev_close(slave_dev); |
2322 | 2256 | ||
2323 | if (app_abi_ver >= 1) { | 2257 | /* restore original ("permanent") mac address*/ |
2324 | /* restore original ("permanent") mac address*/ | 2258 | memcpy(addr.sa_data, slave->perm_hwaddr, ETH_ALEN); |
2325 | memcpy(addr.sa_data, slave->perm_hwaddr, ETH_ALEN); | 2259 | addr.sa_family = slave_dev->type; |
2326 | addr.sa_family = slave_dev->type; | 2260 | dev_set_mac_address(slave_dev, &addr); |
2327 | dev_set_mac_address(slave_dev, &addr); | ||
2328 | } | ||
2329 | 2261 | ||
2330 | /* restore the original state of the IFF_NOARP flag that might have | 2262 | /* restore the original state of the IFF_NOARP flag that might have |
2331 | * been set by bond_set_slave_inactive_flags() | 2263 | * been set by bond_set_slave_inactive_flags() |
@@ -2423,57 +2355,6 @@ static int bond_ioctl_change_active(struct net_device *bond_dev, struct net_devi | |||
2423 | return res; | 2355 | return res; |
2424 | } | 2356 | } |
2425 | 2357 | ||
2426 | static int bond_ethtool_ioctl(struct net_device *bond_dev, struct ifreq *ifr) | ||
2427 | { | ||
2428 | struct ethtool_drvinfo info; | ||
2429 | void __user *addr = ifr->ifr_data; | ||
2430 | uint32_t cmd; | ||
2431 | |||
2432 | if (get_user(cmd, (uint32_t __user *)addr)) { | ||
2433 | return -EFAULT; | ||
2434 | } | ||
2435 | |||
2436 | switch (cmd) { | ||
2437 | case ETHTOOL_GDRVINFO: | ||
2438 | if (copy_from_user(&info, addr, sizeof(info))) { | ||
2439 | return -EFAULT; | ||
2440 | } | ||
2441 | |||
2442 | if (strcmp(info.driver, "ifenslave") == 0) { | ||
2443 | int new_abi_ver; | ||
2444 | char *endptr; | ||
2445 | |||
2446 | new_abi_ver = simple_strtoul(info.fw_version, | ||
2447 | &endptr, 0); | ||
2448 | if (*endptr) { | ||
2449 | printk(KERN_ERR DRV_NAME | ||
2450 | ": Error: got invalid ABI " | ||
2451 | "version from application\n"); | ||
2452 | |||
2453 | return -EINVAL; | ||
2454 | } | ||
2455 | |||
2456 | if (orig_app_abi_ver == -1) { | ||
2457 | orig_app_abi_ver = new_abi_ver; | ||
2458 | } | ||
2459 | |||
2460 | app_abi_ver = new_abi_ver; | ||
2461 | } | ||
2462 | |||
2463 | strncpy(info.driver, DRV_NAME, 32); | ||
2464 | strncpy(info.version, DRV_VERSION, 32); | ||
2465 | snprintf(info.fw_version, 32, "%d", BOND_ABI_VERSION); | ||
2466 | |||
2467 | if (copy_to_user(addr, &info, sizeof(info))) { | ||
2468 | return -EFAULT; | ||
2469 | } | ||
2470 | |||
2471 | return 0; | ||
2472 | default: | ||
2473 | return -EOPNOTSUPP; | ||
2474 | } | ||
2475 | } | ||
2476 | |||
2477 | static int bond_info_query(struct net_device *bond_dev, struct ifbond *info) | 2358 | static int bond_info_query(struct net_device *bond_dev, struct ifbond *info) |
2478 | { | 2359 | { |
2479 | struct bonding *bond = bond_dev->priv; | 2360 | struct bonding *bond = bond_dev->priv; |
@@ -3442,16 +3323,11 @@ static void bond_info_show_slave(struct seq_file *seq, const struct slave *slave | |||
3442 | seq_printf(seq, "Link Failure Count: %d\n", | 3323 | seq_printf(seq, "Link Failure Count: %d\n", |
3443 | slave->link_failure_count); | 3324 | slave->link_failure_count); |
3444 | 3325 | ||
3445 | if (app_abi_ver >= 1) { | 3326 | seq_printf(seq, |
3446 | seq_printf(seq, | 3327 | "Permanent HW addr: %02x:%02x:%02x:%02x:%02x:%02x\n", |
3447 | "Permanent HW addr: %02x:%02x:%02x:%02x:%02x:%02x\n", | 3328 | slave->perm_hwaddr[0], slave->perm_hwaddr[1], |
3448 | slave->perm_hwaddr[0], | 3329 | slave->perm_hwaddr[2], slave->perm_hwaddr[3], |
3449 | slave->perm_hwaddr[1], | 3330 | slave->perm_hwaddr[4], slave->perm_hwaddr[5]); |
3450 | slave->perm_hwaddr[2], | ||
3451 | slave->perm_hwaddr[3], | ||
3452 | slave->perm_hwaddr[4], | ||
3453 | slave->perm_hwaddr[5]); | ||
3454 | } | ||
3455 | 3331 | ||
3456 | if (bond->params.mode == BOND_MODE_8023AD) { | 3332 | if (bond->params.mode == BOND_MODE_8023AD) { |
3457 | const struct aggregator *agg | 3333 | const struct aggregator *agg |
@@ -4010,15 +3886,12 @@ static int bond_do_ioctl(struct net_device *bond_dev, struct ifreq *ifr, int cmd | |||
4010 | struct ifslave k_sinfo; | 3886 | struct ifslave k_sinfo; |
4011 | struct ifslave __user *u_sinfo = NULL; | 3887 | struct ifslave __user *u_sinfo = NULL; |
4012 | struct mii_ioctl_data *mii = NULL; | 3888 | struct mii_ioctl_data *mii = NULL; |
4013 | int prev_abi_ver = orig_app_abi_ver; | ||
4014 | int res = 0; | 3889 | int res = 0; |
4015 | 3890 | ||
4016 | dprintk("bond_ioctl: master=%s, cmd=%d\n", | 3891 | dprintk("bond_ioctl: master=%s, cmd=%d\n", |
4017 | bond_dev->name, cmd); | 3892 | bond_dev->name, cmd); |
4018 | 3893 | ||
4019 | switch (cmd) { | 3894 | switch (cmd) { |
4020 | case SIOCETHTOOL: | ||
4021 | return bond_ethtool_ioctl(bond_dev, ifr); | ||
4022 | case SIOCGMIIPHY: | 3895 | case SIOCGMIIPHY: |
4023 | mii = if_mii(ifr); | 3896 | mii = if_mii(ifr); |
4024 | if (!mii) { | 3897 | if (!mii) { |
@@ -4090,21 +3963,6 @@ static int bond_do_ioctl(struct net_device *bond_dev, struct ifreq *ifr, int cmd | |||
4090 | return -EPERM; | 3963 | return -EPERM; |
4091 | } | 3964 | } |
4092 | 3965 | ||
4093 | if (orig_app_abi_ver == -1) { | ||
4094 | /* no orig_app_abi_ver was provided yet, so we'll use the | ||
4095 | * current one from now on, even if it's 0 | ||
4096 | */ | ||
4097 | orig_app_abi_ver = app_abi_ver; | ||
4098 | |||
4099 | } else if (orig_app_abi_ver != app_abi_ver) { | ||
4100 | printk(KERN_ERR DRV_NAME | ||
4101 | ": Error: already using ifenslave ABI version %d; to " | ||
4102 | "upgrade ifenslave to version %d, you must first " | ||
4103 | "reload bonding.\n", | ||
4104 | orig_app_abi_ver, app_abi_ver); | ||
4105 | return -EINVAL; | ||
4106 | } | ||
4107 | |||
4108 | slave_dev = dev_get_by_name(ifr->ifr_slave); | 3966 | slave_dev = dev_get_by_name(ifr->ifr_slave); |
4109 | 3967 | ||
4110 | dprintk("slave_dev=%p: \n", slave_dev); | 3968 | dprintk("slave_dev=%p: \n", slave_dev); |
@@ -4137,14 +3995,6 @@ static int bond_do_ioctl(struct net_device *bond_dev, struct ifreq *ifr, int cmd | |||
4137 | dev_put(slave_dev); | 3995 | dev_put(slave_dev); |
4138 | } | 3996 | } |
4139 | 3997 | ||
4140 | if (res < 0) { | ||
4141 | /* The ioctl failed, so there's no point in changing the | ||
4142 | * orig_app_abi_ver. We'll restore it's value just in case | ||
4143 | * we've changed it earlier in this function. | ||
4144 | */ | ||
4145 | orig_app_abi_ver = prev_abi_ver; | ||
4146 | } | ||
4147 | |||
4148 | return res; | 3998 | return res; |
4149 | } | 3999 | } |
4150 | 4000 | ||
@@ -4578,9 +4428,18 @@ static inline void bond_set_mode_ops(struct bonding *bond, int mode) | |||
4578 | } | 4428 | } |
4579 | } | 4429 | } |
4580 | 4430 | ||
4431 | static void bond_ethtool_get_drvinfo(struct net_device *bond_dev, | ||
4432 | struct ethtool_drvinfo *drvinfo) | ||
4433 | { | ||
4434 | strncpy(drvinfo->driver, DRV_NAME, 32); | ||
4435 | strncpy(drvinfo->version, DRV_VERSION, 32); | ||
4436 | snprintf(drvinfo->fw_version, 32, "%d", BOND_ABI_VERSION); | ||
4437 | } | ||
4438 | |||
4581 | static struct ethtool_ops bond_ethtool_ops = { | 4439 | static struct ethtool_ops bond_ethtool_ops = { |
4582 | .get_tx_csum = ethtool_op_get_tx_csum, | 4440 | .get_tx_csum = ethtool_op_get_tx_csum, |
4583 | .get_sg = ethtool_op_get_sg, | 4441 | .get_sg = ethtool_op_get_sg, |
4442 | .get_drvinfo = bond_ethtool_get_drvinfo, | ||
4584 | }; | 4443 | }; |
4585 | 4444 | ||
4586 | /* | 4445 | /* |
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index 388196980862..bbf9da8af624 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h | |||
@@ -40,8 +40,8 @@ | |||
40 | #include "bond_3ad.h" | 40 | #include "bond_3ad.h" |
41 | #include "bond_alb.h" | 41 | #include "bond_alb.h" |
42 | 42 | ||
43 | #define DRV_VERSION "2.6.3" | 43 | #define DRV_VERSION "2.6.4" |
44 | #define DRV_RELDATE "June 8, 2005" | 44 | #define DRV_RELDATE "September 26, 2005" |
45 | #define DRV_NAME "bonding" | 45 | #define DRV_NAME "bonding" |
46 | #define DRV_DESCRIPTION "Ethernet Channel Bonding Driver" | 46 | #define DRV_DESCRIPTION "Ethernet Channel Bonding Driver" |
47 | 47 | ||
diff --git a/drivers/net/ibm_emac/ibm_emac_core.c b/drivers/net/ibm_emac/ibm_emac_core.c index 0de3bb906174..14e9b6315f20 100644 --- a/drivers/net/ibm_emac/ibm_emac_core.c +++ b/drivers/net/ibm_emac/ibm_emac_core.c | |||
@@ -1875,6 +1875,9 @@ static int emac_init_device(struct ocp_device *ocpdev, struct ibm_ocp_mal *mal) | |||
1875 | rc = -ENODEV; | 1875 | rc = -ENODEV; |
1876 | goto bail; | 1876 | goto bail; |
1877 | } | 1877 | } |
1878 | |||
1879 | /* Disable any PHY features not supported by the platform */ | ||
1880 | ep->phy_mii.def->features &= ~emacdata->phy_feat_exc; | ||
1878 | 1881 | ||
1879 | /* Setup initial PHY config & startup aneg */ | 1882 | /* Setup initial PHY config & startup aneg */ |
1880 | if (ep->phy_mii.def->ops->init) | 1883 | if (ep->phy_mii.def->ops->init) |
@@ -1882,6 +1885,34 @@ static int emac_init_device(struct ocp_device *ocpdev, struct ibm_ocp_mal *mal) | |||
1882 | netif_carrier_off(ndev); | 1885 | netif_carrier_off(ndev); |
1883 | if (ep->phy_mii.def->features & SUPPORTED_Autoneg) | 1886 | if (ep->phy_mii.def->features & SUPPORTED_Autoneg) |
1884 | ep->want_autoneg = 1; | 1887 | ep->want_autoneg = 1; |
1888 | else { | ||
1889 | ep->want_autoneg = 0; | ||
1890 | |||
1891 | /* Select highest supported speed/duplex */ | ||
1892 | if (ep->phy_mii.def->features & SUPPORTED_1000baseT_Full) { | ||
1893 | ep->phy_mii.speed = SPEED_1000; | ||
1894 | ep->phy_mii.duplex = DUPLEX_FULL; | ||
1895 | } else if (ep->phy_mii.def->features & | ||
1896 | SUPPORTED_1000baseT_Half) { | ||
1897 | ep->phy_mii.speed = SPEED_1000; | ||
1898 | ep->phy_mii.duplex = DUPLEX_HALF; | ||
1899 | } else if (ep->phy_mii.def->features & | ||
1900 | SUPPORTED_100baseT_Full) { | ||
1901 | ep->phy_mii.speed = SPEED_100; | ||
1902 | ep->phy_mii.duplex = DUPLEX_FULL; | ||
1903 | } else if (ep->phy_mii.def->features & | ||
1904 | SUPPORTED_100baseT_Half) { | ||
1905 | ep->phy_mii.speed = SPEED_100; | ||
1906 | ep->phy_mii.duplex = DUPLEX_HALF; | ||
1907 | } else if (ep->phy_mii.def->features & | ||
1908 | SUPPORTED_10baseT_Full) { | ||
1909 | ep->phy_mii.speed = SPEED_10; | ||
1910 | ep->phy_mii.duplex = DUPLEX_FULL; | ||
1911 | } else { | ||
1912 | ep->phy_mii.speed = SPEED_10; | ||
1913 | ep->phy_mii.duplex = DUPLEX_HALF; | ||
1914 | } | ||
1915 | } | ||
1885 | emac_start_link(ep, NULL); | 1916 | emac_start_link(ep, NULL); |
1886 | 1917 | ||
1887 | /* read the MAC Address */ | 1918 | /* read the MAC Address */ |
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c index e64df4d0800b..83334db2921c 100644 --- a/drivers/net/ns83820.c +++ b/drivers/net/ns83820.c | |||
@@ -584,7 +584,7 @@ static inline int ns83820_add_rx_skb(struct ns83820 *dev, struct sk_buff *skb) | |||
584 | return 0; | 584 | return 0; |
585 | } | 585 | } |
586 | 586 | ||
587 | static inline int rx_refill(struct net_device *ndev, int gfp) | 587 | static inline int rx_refill(struct net_device *ndev, unsigned int __nocast gfp) |
588 | { | 588 | { |
589 | struct ns83820 *dev = PRIV(ndev); | 589 | struct ns83820 *dev = PRIV(ndev); |
590 | unsigned i; | 590 | unsigned i; |
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index d652e1eddb45..c7cca842e5ee 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c | |||
@@ -1832,7 +1832,7 @@ static void fill_multicast_tbl(int count, struct dev_mc_list *addrs, | |||
1832 | { | 1832 | { |
1833 | struct dev_mc_list *mc_addr; | 1833 | struct dev_mc_list *mc_addr; |
1834 | 1834 | ||
1835 | for (mc_addr = addrs; mc_addr && --count > 0; mc_addr = mc_addr->next) { | 1835 | for (mc_addr = addrs; mc_addr && count-- > 0; mc_addr = mc_addr->next) { |
1836 | u_int position = ether_crc(6, mc_addr->dmi_addr); | 1836 | u_int position = ether_crc(6, mc_addr->dmi_addr); |
1837 | #ifndef final_version /* Verify multicast address. */ | 1837 | #ifndef final_version /* Verify multicast address. */ |
1838 | if ((mc_addr->dmi_addr[0] & 1) == 0) | 1838 | if ((mc_addr->dmi_addr[0] & 1) == 0) |
diff --git a/drivers/net/skge.c b/drivers/net/skge.c index fd398da4993b..c2e6484ef138 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c | |||
@@ -2837,21 +2837,29 @@ static void skge_netpoll(struct net_device *dev) | |||
2837 | static int skge_set_mac_address(struct net_device *dev, void *p) | 2837 | static int skge_set_mac_address(struct net_device *dev, void *p) |
2838 | { | 2838 | { |
2839 | struct skge_port *skge = netdev_priv(dev); | 2839 | struct skge_port *skge = netdev_priv(dev); |
2840 | struct sockaddr *addr = p; | 2840 | struct skge_hw *hw = skge->hw; |
2841 | int err = 0; | 2841 | unsigned port = skge->port; |
2842 | const struct sockaddr *addr = p; | ||
2842 | 2843 | ||
2843 | if (!is_valid_ether_addr(addr->sa_data)) | 2844 | if (!is_valid_ether_addr(addr->sa_data)) |
2844 | return -EADDRNOTAVAIL; | 2845 | return -EADDRNOTAVAIL; |
2845 | 2846 | ||
2846 | skge_down(dev); | 2847 | spin_lock_bh(&hw->phy_lock); |
2847 | memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN); | 2848 | memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN); |
2848 | memcpy_toio(skge->hw->regs + B2_MAC_1 + skge->port*8, | 2849 | memcpy_toio(hw->regs + B2_MAC_1 + port*8, |
2849 | dev->dev_addr, ETH_ALEN); | 2850 | dev->dev_addr, ETH_ALEN); |
2850 | memcpy_toio(skge->hw->regs + B2_MAC_2 + skge->port*8, | 2851 | memcpy_toio(hw->regs + B2_MAC_2 + port*8, |
2851 | dev->dev_addr, ETH_ALEN); | 2852 | dev->dev_addr, ETH_ALEN); |
2852 | if (dev->flags & IFF_UP) | 2853 | |
2853 | err = skge_up(dev); | 2854 | if (hw->chip_id == CHIP_ID_GENESIS) |
2854 | return err; | 2855 | xm_outaddr(hw, port, XM_SA, dev->dev_addr); |
2856 | else { | ||
2857 | gma_set_addr(hw, port, GM_SRC_ADDR_1L, dev->dev_addr); | ||
2858 | gma_set_addr(hw, port, GM_SRC_ADDR_2L, dev->dev_addr); | ||
2859 | } | ||
2860 | spin_unlock_bh(&hw->phy_lock); | ||
2861 | |||
2862 | return 0; | ||
2855 | } | 2863 | } |
2856 | 2864 | ||
2857 | static const struct { | 2865 | static const struct { |
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c index 88b89dc95c77..efdb179ecc8c 100644 --- a/drivers/net/starfire.c +++ b/drivers/net/starfire.c | |||
@@ -133,14 +133,18 @@ | |||
133 | - finally added firmware (GPL'ed by Adaptec) | 133 | - finally added firmware (GPL'ed by Adaptec) |
134 | - removed compatibility code for 2.2.x | 134 | - removed compatibility code for 2.2.x |
135 | 135 | ||
136 | LK1.4.2.1 (Ion Badulescu) | ||
137 | - fixed 32/64 bit issues on i386 + CONFIG_HIGHMEM | ||
138 | - added 32-bit padding to outgoing skb's, removed previous workaround | ||
139 | |||
136 | TODO: - fix forced speed/duplexing code (broken a long time ago, when | 140 | TODO: - fix forced speed/duplexing code (broken a long time ago, when |
137 | somebody converted the driver to use the generic MII code) | 141 | somebody converted the driver to use the generic MII code) |
138 | - fix VLAN support | 142 | - fix VLAN support |
139 | */ | 143 | */ |
140 | 144 | ||
141 | #define DRV_NAME "starfire" | 145 | #define DRV_NAME "starfire" |
142 | #define DRV_VERSION "1.03+LK1.4.2" | 146 | #define DRV_VERSION "1.03+LK1.4.2.1" |
143 | #define DRV_RELDATE "January 19, 2005" | 147 | #define DRV_RELDATE "October 3, 2005" |
144 | 148 | ||
145 | #include <linux/config.h> | 149 | #include <linux/config.h> |
146 | #include <linux/version.h> | 150 | #include <linux/version.h> |
@@ -165,6 +169,14 @@ TODO: - fix forced speed/duplexing code (broken a long time ago, when | |||
165 | * of length 1. If and when this is fixed, the #define below can be removed. | 169 | * of length 1. If and when this is fixed, the #define below can be removed. |
166 | */ | 170 | */ |
167 | #define HAS_BROKEN_FIRMWARE | 171 | #define HAS_BROKEN_FIRMWARE |
172 | |||
173 | /* | ||
174 | * If using the broken firmware, data must be padded to the next 32-bit boundary. | ||
175 | */ | ||
176 | #ifdef HAS_BROKEN_FIRMWARE | ||
177 | #define PADDING_MASK 3 | ||
178 | #endif | ||
179 | |||
168 | /* | 180 | /* |
169 | * Define this if using the driver with the zero-copy patch | 181 | * Define this if using the driver with the zero-copy patch |
170 | */ | 182 | */ |
@@ -257,9 +269,10 @@ static int full_duplex[MAX_UNITS] = {0, }; | |||
257 | * This SUCKS. | 269 | * This SUCKS. |
258 | * We need a much better method to determine if dma_addr_t is 64-bit. | 270 | * We need a much better method to determine if dma_addr_t is 64-bit. |
259 | */ | 271 | */ |
260 | #if (defined(__i386__) && defined(CONFIG_HIGHMEM) && (LINUX_VERSION_CODE > 0x20500 || defined(CONFIG_HIGHMEM64G))) || defined(__x86_64__) || defined (__ia64__) || defined(__mips64__) || (defined(__mips__) && defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) | 272 | #if (defined(__i386__) && defined(CONFIG_HIGHMEM64G)) || defined(__x86_64__) || defined (__ia64__) || defined(__mips64__) || (defined(__mips__) && defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) |
261 | /* 64-bit dma_addr_t */ | 273 | /* 64-bit dma_addr_t */ |
262 | #define ADDR_64BITS /* This chip uses 64 bit addresses. */ | 274 | #define ADDR_64BITS /* This chip uses 64 bit addresses. */ |
275 | #define netdrv_addr_t u64 | ||
263 | #define cpu_to_dma(x) cpu_to_le64(x) | 276 | #define cpu_to_dma(x) cpu_to_le64(x) |
264 | #define dma_to_cpu(x) le64_to_cpu(x) | 277 | #define dma_to_cpu(x) le64_to_cpu(x) |
265 | #define RX_DESC_Q_ADDR_SIZE RxDescQAddr64bit | 278 | #define RX_DESC_Q_ADDR_SIZE RxDescQAddr64bit |
@@ -268,6 +281,7 @@ static int full_duplex[MAX_UNITS] = {0, }; | |||
268 | #define TX_COMPL_Q_ADDR_SIZE TxComplQAddr64bit | 281 | #define TX_COMPL_Q_ADDR_SIZE TxComplQAddr64bit |
269 | #define RX_DESC_ADDR_SIZE RxDescAddr64bit | 282 | #define RX_DESC_ADDR_SIZE RxDescAddr64bit |
270 | #else /* 32-bit dma_addr_t */ | 283 | #else /* 32-bit dma_addr_t */ |
284 | #define netdrv_addr_t u32 | ||
271 | #define cpu_to_dma(x) cpu_to_le32(x) | 285 | #define cpu_to_dma(x) cpu_to_le32(x) |
272 | #define dma_to_cpu(x) le32_to_cpu(x) | 286 | #define dma_to_cpu(x) le32_to_cpu(x) |
273 | #define RX_DESC_Q_ADDR_SIZE RxDescQAddr32bit | 287 | #define RX_DESC_Q_ADDR_SIZE RxDescQAddr32bit |
@@ -1333,21 +1347,10 @@ static int start_tx(struct sk_buff *skb, struct net_device *dev) | |||
1333 | } | 1347 | } |
1334 | 1348 | ||
1335 | #if defined(ZEROCOPY) && defined(HAS_BROKEN_FIRMWARE) | 1349 | #if defined(ZEROCOPY) && defined(HAS_BROKEN_FIRMWARE) |
1336 | { | 1350 | if (skb->ip_summed == CHECKSUM_HW) { |
1337 | int has_bad_length = 0; | 1351 | skb = skb_padto(skb, (skb->len + PADDING_MASK) & ~PADDING_MASK); |
1338 | 1352 | if (skb == NULL) | |
1339 | if (skb_first_frag_len(skb) == 1) | 1353 | return NETDEV_TX_OK; |
1340 | has_bad_length = 1; | ||
1341 | else { | ||
1342 | for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) | ||
1343 | if (skb_shinfo(skb)->frags[i].size == 1) { | ||
1344 | has_bad_length = 1; | ||
1345 | break; | ||
1346 | } | ||
1347 | } | ||
1348 | |||
1349 | if (has_bad_length) | ||
1350 | skb_checksum_help(skb, 0); | ||
1351 | } | 1354 | } |
1352 | #endif /* ZEROCOPY && HAS_BROKEN_FIRMWARE */ | 1355 | #endif /* ZEROCOPY && HAS_BROKEN_FIRMWARE */ |
1353 | 1356 | ||
@@ -2127,13 +2130,12 @@ static int __init starfire_init (void) | |||
2127 | #endif | 2130 | #endif |
2128 | #endif | 2131 | #endif |
2129 | 2132 | ||
2130 | #ifndef ADDR_64BITS | ||
2131 | /* we can do this test only at run-time... sigh */ | 2133 | /* we can do this test only at run-time... sigh */ |
2132 | if (sizeof(dma_addr_t) == sizeof(u64)) { | 2134 | if (sizeof(dma_addr_t) != sizeof(netdrv_addr_t)) { |
2133 | printk("This driver has not been ported to this 64-bit architecture yet\n"); | 2135 | printk("This driver has dma_addr_t issues, please send email to maintainer\n"); |
2134 | return -ENODEV; | 2136 | return -ENODEV; |
2135 | } | 2137 | } |
2136 | #endif /* not ADDR_64BITS */ | 2138 | |
2137 | return pci_module_init (&starfire_driver); | 2139 | return pci_module_init (&starfire_driver); |
2138 | } | 2140 | } |
2139 | 2141 | ||
diff --git a/drivers/net/sungem.h b/drivers/net/sungem.h index ff8ae5f79970..16edbb1a4a7a 100644 --- a/drivers/net/sungem.h +++ b/drivers/net/sungem.h | |||
@@ -1035,7 +1035,8 @@ struct gem { | |||
1035 | 1035 | ||
1036 | #define ALIGNED_RX_SKB_ADDR(addr) \ | 1036 | #define ALIGNED_RX_SKB_ADDR(addr) \ |
1037 | ((((unsigned long)(addr) + (64UL - 1UL)) & ~(64UL - 1UL)) - (unsigned long)(addr)) | 1037 | ((((unsigned long)(addr) + (64UL - 1UL)) & ~(64UL - 1UL)) - (unsigned long)(addr)) |
1038 | static __inline__ struct sk_buff *gem_alloc_skb(int size, int gfp_flags) | 1038 | static __inline__ struct sk_buff *gem_alloc_skb(int size, |
1039 | unsigned int __nocast gfp_flags) | ||
1039 | { | 1040 | { |
1040 | struct sk_buff *skb = alloc_skb(size + 64, gfp_flags); | 1041 | struct sk_buff *skb = alloc_skb(size + 64, gfp_flags); |
1041 | 1042 | ||
diff --git a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c index e7b001017b9a..32057e65808b 100644 --- a/drivers/net/tokenring/ibmtr.c +++ b/drivers/net/tokenring/ibmtr.c | |||
@@ -531,7 +531,6 @@ static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr) | |||
531 | if (!time_after(jiffies, timeout)) continue; | 531 | if (!time_after(jiffies, timeout)) continue; |
532 | DPRINTK( "Hardware timeout during initialization.\n"); | 532 | DPRINTK( "Hardware timeout during initialization.\n"); |
533 | iounmap(t_mmio); | 533 | iounmap(t_mmio); |
534 | kfree(ti); | ||
535 | return -ENODEV; | 534 | return -ENODEV; |
536 | } | 535 | } |
537 | ti->sram_phys = | 536 | ti->sram_phys = |
@@ -645,7 +644,6 @@ static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr) | |||
645 | DPRINTK("Unknown shared ram paging info %01X\n", | 644 | DPRINTK("Unknown shared ram paging info %01X\n", |
646 | ti->shared_ram_paging); | 645 | ti->shared_ram_paging); |
647 | iounmap(t_mmio); | 646 | iounmap(t_mmio); |
648 | kfree(ti); | ||
649 | return -ENODEV; | 647 | return -ENODEV; |
650 | break; | 648 | break; |
651 | } /*end switch shared_ram_paging */ | 649 | } /*end switch shared_ram_paging */ |
@@ -675,7 +673,6 @@ static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr) | |||
675 | "driver limit (%05x), adapter not started.\n", | 673 | "driver limit (%05x), adapter not started.\n", |
676 | chk_base, ibmtr_mem_base + IBMTR_SHARED_RAM_SIZE); | 674 | chk_base, ibmtr_mem_base + IBMTR_SHARED_RAM_SIZE); |
677 | iounmap(t_mmio); | 675 | iounmap(t_mmio); |
678 | kfree(ti); | ||
679 | return -ENODEV; | 676 | return -ENODEV; |
680 | } else { /* seems cool, record what we have figured out */ | 677 | } else { /* seems cool, record what we have figured out */ |
681 | ti->sram_base = new_base >> 12; | 678 | ti->sram_base = new_base >> 12; |
@@ -690,7 +687,6 @@ static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr) | |||
690 | DPRINTK("Could not grab irq %d. Halting Token Ring driver.\n", | 687 | DPRINTK("Could not grab irq %d. Halting Token Ring driver.\n", |
691 | irq); | 688 | irq); |
692 | iounmap(t_mmio); | 689 | iounmap(t_mmio); |
693 | kfree(ti); | ||
694 | return -ENODEV; | 690 | return -ENODEV; |
695 | } | 691 | } |
696 | /*?? Now, allocate some of the PIO PORTs for this driver.. */ | 692 | /*?? Now, allocate some of the PIO PORTs for this driver.. */ |
@@ -699,7 +695,6 @@ static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr) | |||
699 | DPRINTK("Could not grab PIO range. Halting driver.\n"); | 695 | DPRINTK("Could not grab PIO range. Halting driver.\n"); |
700 | free_irq(dev->irq, dev); | 696 | free_irq(dev->irq, dev); |
701 | iounmap(t_mmio); | 697 | iounmap(t_mmio); |
702 | kfree(ti); | ||
703 | return -EBUSY; | 698 | return -EBUSY; |
704 | } | 699 | } |
705 | 700 | ||
diff --git a/drivers/net/tulip/21142.c b/drivers/net/tulip/21142.c index 5db694c4eb02..683f14b01c06 100644 --- a/drivers/net/tulip/21142.c +++ b/drivers/net/tulip/21142.c | |||
@@ -172,7 +172,7 @@ void t21142_lnk_change(struct net_device *dev, int csr5) | |||
172 | int i; | 172 | int i; |
173 | for (i = 0; i < tp->mtable->leafcount; i++) | 173 | for (i = 0; i < tp->mtable->leafcount; i++) |
174 | if (tp->mtable->mleaf[i].media == dev->if_port) { | 174 | if (tp->mtable->mleaf[i].media == dev->if_port) { |
175 | int startup = ! ((tp->chip_id == DC21143 && tp->revision == 65)); | 175 | int startup = ! ((tp->chip_id == DC21143 && (tp->revision == 48 || tp->revision == 65))); |
176 | tp->cur_index = i; | 176 | tp->cur_index = i; |
177 | tulip_select_media(dev, startup); | 177 | tulip_select_media(dev, startup); |
178 | setup_done = 1; | 178 | setup_done = 1; |
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index 6deb7cc810cc..cf3daaa1b369 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c | |||
@@ -503,9 +503,14 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev) | |||
503 | return 0; | 503 | return 0; |
504 | } | 504 | } |
505 | 505 | ||
506 | /* Length of the packet body */ | 506 | /* Check packet length, pad short packets, round up odd length */ |
507 | /* FIXME: what if the skb is smaller than this? */ | 507 | len = max_t(int, ALIGN(skb->len, 2), ETH_ZLEN); |
508 | len = max_t(int,skb->len - ETH_HLEN, ETH_ZLEN - ETH_HLEN); | 508 | if (skb->len < len) { |
509 | skb = skb_padto(skb, len); | ||
510 | if (skb == NULL) | ||
511 | goto fail; | ||
512 | } | ||
513 | len -= ETH_HLEN; | ||
509 | 514 | ||
510 | eh = (struct ethhdr *)skb->data; | 515 | eh = (struct ethhdr *)skb->data; |
511 | 516 | ||
@@ -557,8 +562,7 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev) | |||
557 | p = skb->data; | 562 | p = skb->data; |
558 | } | 563 | } |
559 | 564 | ||
560 | /* Round up for odd length packets */ | 565 | err = hermes_bap_pwrite(hw, USER_BAP, p, data_len, |
561 | err = hermes_bap_pwrite(hw, USER_BAP, p, ALIGN(data_len, 2), | ||
562 | txfid, data_off); | 566 | txfid, data_off); |
563 | if (err) { | 567 | if (err) { |
564 | printk(KERN_ERR "%s: Error %d writing packet to BAP\n", | 568 | printk(KERN_ERR "%s: Error %d writing packet to BAP\n", |
diff --git a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h index 2ad4797ce024..9963479ba89f 100644 --- a/drivers/s390/net/qeth.h +++ b/drivers/s390/net/qeth.h | |||
@@ -686,6 +686,7 @@ struct qeth_seqno { | |||
686 | __u32 pdu_hdr; | 686 | __u32 pdu_hdr; |
687 | __u32 pdu_hdr_ack; | 687 | __u32 pdu_hdr_ack; |
688 | __u16 ipa; | 688 | __u16 ipa; |
689 | __u32 pkt_seqno; | ||
689 | }; | 690 | }; |
690 | 691 | ||
691 | struct qeth_reply { | 692 | struct qeth_reply { |
@@ -848,6 +849,7 @@ qeth_realloc_headroom(struct qeth_card *card, struct sk_buff **skb, int size) | |||
848 | "on interface %s", QETH_CARD_IFNAME(card)); | 849 | "on interface %s", QETH_CARD_IFNAME(card)); |
849 | return -ENOMEM; | 850 | return -ENOMEM; |
850 | } | 851 | } |
852 | kfree_skb(*skb); | ||
851 | *skb = new_skb; | 853 | *skb = new_skb; |
852 | } | 854 | } |
853 | return 0; | 855 | return 0; |
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 71de834ece1a..bd28e2438d7f 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c | |||
@@ -511,7 +511,7 @@ static int | |||
511 | __qeth_set_offline(struct ccwgroup_device *cgdev, int recovery_mode) | 511 | __qeth_set_offline(struct ccwgroup_device *cgdev, int recovery_mode) |
512 | { | 512 | { |
513 | struct qeth_card *card = (struct qeth_card *) cgdev->dev.driver_data; | 513 | struct qeth_card *card = (struct qeth_card *) cgdev->dev.driver_data; |
514 | int rc = 0; | 514 | int rc = 0, rc2 = 0, rc3 = 0; |
515 | enum qeth_card_states recover_flag; | 515 | enum qeth_card_states recover_flag; |
516 | 516 | ||
517 | QETH_DBF_TEXT(setup, 3, "setoffl"); | 517 | QETH_DBF_TEXT(setup, 3, "setoffl"); |
@@ -523,11 +523,13 @@ __qeth_set_offline(struct ccwgroup_device *cgdev, int recovery_mode) | |||
523 | CARD_BUS_ID(card)); | 523 | CARD_BUS_ID(card)); |
524 | return -ERESTARTSYS; | 524 | return -ERESTARTSYS; |
525 | } | 525 | } |
526 | if ((rc = ccw_device_set_offline(CARD_DDEV(card))) || | 526 | rc = ccw_device_set_offline(CARD_DDEV(card)); |
527 | (rc = ccw_device_set_offline(CARD_WDEV(card))) || | 527 | rc2 = ccw_device_set_offline(CARD_WDEV(card)); |
528 | (rc = ccw_device_set_offline(CARD_RDEV(card)))) { | 528 | rc3 = ccw_device_set_offline(CARD_RDEV(card)); |
529 | if (!rc) | ||
530 | rc = (rc2) ? rc2 : rc3; | ||
531 | if (rc) | ||
529 | QETH_DBF_TEXT_(setup, 2, "1err%d", rc); | 532 | QETH_DBF_TEXT_(setup, 2, "1err%d", rc); |
530 | } | ||
531 | if (recover_flag == CARD_STATE_UP) | 533 | if (recover_flag == CARD_STATE_UP) |
532 | card->state = CARD_STATE_RECOVER; | 534 | card->state = CARD_STATE_RECOVER; |
533 | qeth_notify_processes(); | 535 | qeth_notify_processes(); |
@@ -1046,6 +1048,7 @@ qeth_setup_card(struct qeth_card *card) | |||
1046 | spin_lock_init(&card->vlanlock); | 1048 | spin_lock_init(&card->vlanlock); |
1047 | card->vlangrp = NULL; | 1049 | card->vlangrp = NULL; |
1048 | #endif | 1050 | #endif |
1051 | spin_lock_init(&card->lock); | ||
1049 | spin_lock_init(&card->ip_lock); | 1052 | spin_lock_init(&card->ip_lock); |
1050 | spin_lock_init(&card->thread_mask_lock); | 1053 | spin_lock_init(&card->thread_mask_lock); |
1051 | card->thread_start_mask = 0; | 1054 | card->thread_start_mask = 0; |
@@ -1626,16 +1629,6 @@ qeth_cmd_timeout(unsigned long data) | |||
1626 | spin_unlock_irqrestore(&reply->card->lock, flags); | 1629 | spin_unlock_irqrestore(&reply->card->lock, flags); |
1627 | } | 1630 | } |
1628 | 1631 | ||
1629 | static void | ||
1630 | qeth_reset_ip_addresses(struct qeth_card *card) | ||
1631 | { | ||
1632 | QETH_DBF_TEXT(trace, 2, "rstipadd"); | ||
1633 | |||
1634 | qeth_clear_ip_list(card, 0, 1); | ||
1635 | /* this function will also schedule the SET_IP_THREAD */ | ||
1636 | qeth_set_multicast_list(card->dev); | ||
1637 | } | ||
1638 | |||
1639 | static struct qeth_ipa_cmd * | 1632 | static struct qeth_ipa_cmd * |
1640 | qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob) | 1633 | qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob) |
1641 | { | 1634 | { |
@@ -1664,9 +1657,8 @@ qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob) | |||
1664 | "IP address reset.\n", | 1657 | "IP address reset.\n", |
1665 | QETH_CARD_IFNAME(card), | 1658 | QETH_CARD_IFNAME(card), |
1666 | card->info.chpid); | 1659 | card->info.chpid); |
1667 | card->lan_online = 1; | ||
1668 | netif_carrier_on(card->dev); | 1660 | netif_carrier_on(card->dev); |
1669 | qeth_reset_ip_addresses(card); | 1661 | qeth_schedule_recovery(card); |
1670 | return NULL; | 1662 | return NULL; |
1671 | case IPA_CMD_REGISTER_LOCAL_ADDR: | 1663 | case IPA_CMD_REGISTER_LOCAL_ADDR: |
1672 | QETH_DBF_TEXT(trace,3, "irla"); | 1664 | QETH_DBF_TEXT(trace,3, "irla"); |
@@ -2387,6 +2379,7 @@ qeth_layer2_rebuild_skb(struct qeth_card *card, struct sk_buff *skb, | |||
2387 | skb_pull(skb, VLAN_HLEN); | 2379 | skb_pull(skb, VLAN_HLEN); |
2388 | } | 2380 | } |
2389 | #endif | 2381 | #endif |
2382 | *((__u32 *)skb->cb) = ++card->seqno.pkt_seqno; | ||
2390 | return vlan_id; | 2383 | return vlan_id; |
2391 | } | 2384 | } |
2392 | 2385 | ||
@@ -3014,7 +3007,7 @@ qeth_alloc_buffer_pool(struct qeth_card *card) | |||
3014 | return -ENOMEM; | 3007 | return -ENOMEM; |
3015 | } | 3008 | } |
3016 | for(j = 0; j < QETH_MAX_BUFFER_ELEMENTS(card); ++j){ | 3009 | for(j = 0; j < QETH_MAX_BUFFER_ELEMENTS(card); ++j){ |
3017 | ptr = (void *) __get_free_page(GFP_KERNEL); | 3010 | ptr = (void *) __get_free_page(GFP_KERNEL|GFP_DMA); |
3018 | if (!ptr) { | 3011 | if (!ptr) { |
3019 | while (j > 0) | 3012 | while (j > 0) |
3020 | free_page((unsigned long) | 3013 | free_page((unsigned long) |
@@ -3058,7 +3051,8 @@ qeth_alloc_qdio_buffers(struct qeth_card *card) | |||
3058 | if (card->qdio.state == QETH_QDIO_ALLOCATED) | 3051 | if (card->qdio.state == QETH_QDIO_ALLOCATED) |
3059 | return 0; | 3052 | return 0; |
3060 | 3053 | ||
3061 | card->qdio.in_q = kmalloc(sizeof(struct qeth_qdio_q), GFP_KERNEL); | 3054 | card->qdio.in_q = kmalloc(sizeof(struct qeth_qdio_q), |
3055 | GFP_KERNEL|GFP_DMA); | ||
3062 | if (!card->qdio.in_q) | 3056 | if (!card->qdio.in_q) |
3063 | return - ENOMEM; | 3057 | return - ENOMEM; |
3064 | QETH_DBF_TEXT(setup, 2, "inq"); | 3058 | QETH_DBF_TEXT(setup, 2, "inq"); |
@@ -3083,7 +3077,7 @@ qeth_alloc_qdio_buffers(struct qeth_card *card) | |||
3083 | } | 3077 | } |
3084 | for (i = 0; i < card->qdio.no_out_queues; ++i){ | 3078 | for (i = 0; i < card->qdio.no_out_queues; ++i){ |
3085 | card->qdio.out_qs[i] = kmalloc(sizeof(struct qeth_qdio_out_q), | 3079 | card->qdio.out_qs[i] = kmalloc(sizeof(struct qeth_qdio_out_q), |
3086 | GFP_KERNEL); | 3080 | GFP_KERNEL|GFP_DMA); |
3087 | if (!card->qdio.out_qs[i]){ | 3081 | if (!card->qdio.out_qs[i]){ |
3088 | while (i > 0) | 3082 | while (i > 0) |
3089 | kfree(card->qdio.out_qs[--i]); | 3083 | kfree(card->qdio.out_qs[--i]); |
@@ -6470,6 +6464,9 @@ qeth_query_ipassists_cb(struct qeth_card *card, struct qeth_reply *reply, | |||
6470 | if (cmd->hdr.prot_version == QETH_PROT_IPV4) { | 6464 | if (cmd->hdr.prot_version == QETH_PROT_IPV4) { |
6471 | card->options.ipa4.supported_funcs = cmd->hdr.ipa_supported; | 6465 | card->options.ipa4.supported_funcs = cmd->hdr.ipa_supported; |
6472 | card->options.ipa4.enabled_funcs = cmd->hdr.ipa_enabled; | 6466 | card->options.ipa4.enabled_funcs = cmd->hdr.ipa_enabled; |
6467 | /* Disable IPV6 support hard coded for Hipersockets */ | ||
6468 | if(card->info.type == QETH_CARD_TYPE_IQD) | ||
6469 | card->options.ipa4.supported_funcs &= ~IPA_IPV6; | ||
6473 | } else { | 6470 | } else { |
6474 | #ifdef CONFIG_QETH_IPV6 | 6471 | #ifdef CONFIG_QETH_IPV6 |
6475 | card->options.ipa6.supported_funcs = cmd->hdr.ipa_supported; | 6472 | card->options.ipa6.supported_funcs = cmd->hdr.ipa_supported; |
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c index 1b3148e842af..c3f637395734 100644 --- a/drivers/scsi/megaraid/megaraid_sas.c +++ b/drivers/scsi/megaraid/megaraid_sas.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
35 | #include <linux/uio.h> | 35 | #include <linux/uio.h> |
36 | #include <asm/uaccess.h> | 36 | #include <asm/uaccess.h> |
37 | #include <linux/fs.h> | ||
37 | #include <linux/compat.h> | 38 | #include <linux/compat.h> |
38 | 39 | ||
39 | #include <scsi/scsi.h> | 40 | #include <scsi/scsi.h> |
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index 5959e6755a81..656c0e8d160e 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c | |||
@@ -518,11 +518,7 @@ static void sunsu_change_mouse_baud(struct uart_sunsu_port *up) | |||
518 | 518 | ||
519 | quot = up->port.uartclk / (16 * new_baud); | 519 | quot = up->port.uartclk / (16 * new_baud); |
520 | 520 | ||
521 | spin_unlock(&up->port.lock); | ||
522 | |||
523 | sunsu_change_speed(&up->port, up->cflag, 0, quot); | 521 | sunsu_change_speed(&up->port, up->cflag, 0, quot); |
524 | |||
525 | spin_lock(&up->port.lock); | ||
526 | } | 522 | } |
527 | 523 | ||
528 | static void receive_kbd_ms_chars(struct uart_sunsu_port *up, struct pt_regs *regs, int is_break) | 524 | static void receive_kbd_ms_chars(struct uart_sunsu_port *up, struct pt_regs *regs, int is_break) |