diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-01-23 14:02:41 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-01-23 14:02:41 -0500 |
commit | fe6ea1f7e5c2d3947bf62f2a219e69718ca0b187 (patch) | |
tree | 7c6efcc79f7b12f28315a61e10c9a984fd787043 | |
parent | 6d7de67c5e4f2e9cdcf9b0a096380846e6a8278b (diff) | |
parent | 184231bdb41fc4c385ae8e115f5afaff02fe1690 (diff) |
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
NetXen: Use pci_register_driver() instead of pci_module_init() in init_module
NetXen: Firmware check modifications
ehea: Fixed possible nullpointer access
ehea: Added logging off associated errors
ehea: Improved logging of permission issues
ehea: New method to determine number of available ports
ehea: Modified initial autoneg state determination
ehea: Fixing firmware queue config issue
ehea: Fixed wrong dereferencation
PHY: Export phy ethtool helpers
modify 3c589_cs to be SMP safe
-rw-r--r-- | drivers/net/ehea/ehea.h | 2 | ||||
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 56 | ||||
-rw-r--r-- | drivers/net/ehea/ehea_phyp.c | 10 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic.h | 7 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_hw.c | 3 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_main.c | 2 | ||||
-rw-r--r-- | drivers/net/pcmcia/3c589_cs.c | 7 | ||||
-rw-r--r-- | drivers/net/phy/phy.c | 3 |
8 files changed, 57 insertions, 33 deletions
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index 39ad9f73d1ec..be10a3a26b5b 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h | |||
@@ -39,7 +39,7 @@ | |||
39 | #include <asm/io.h> | 39 | #include <asm/io.h> |
40 | 40 | ||
41 | #define DRV_NAME "ehea" | 41 | #define DRV_NAME "ehea" |
42 | #define DRV_VERSION "EHEA_0043" | 42 | #define DRV_VERSION "EHEA_0044" |
43 | 43 | ||
44 | #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ | 44 | #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ |
45 | | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR) | 45 | | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR) |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 83fa32f72398..1072e69ef85d 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -558,12 +558,12 @@ static irqreturn_t ehea_qp_aff_irq_handler(int irq, void *param) | |||
558 | u32 qp_token; | 558 | u32 qp_token; |
559 | 559 | ||
560 | eqe = ehea_poll_eq(port->qp_eq); | 560 | eqe = ehea_poll_eq(port->qp_eq); |
561 | ehea_debug("eqe=%p", eqe); | 561 | |
562 | while (eqe) { | 562 | while (eqe) { |
563 | ehea_debug("*eqe=%lx", *(u64*)eqe); | ||
564 | eqe = ehea_poll_eq(port->qp_eq); | ||
565 | qp_token = EHEA_BMASK_GET(EHEA_EQE_QP_TOKEN, eqe->entry); | 563 | qp_token = EHEA_BMASK_GET(EHEA_EQE_QP_TOKEN, eqe->entry); |
566 | ehea_debug("next eqe=%p", eqe); | 564 | ehea_error("QP aff_err: entry=0x%lx, token=0x%x", |
565 | eqe->entry, qp_token); | ||
566 | eqe = ehea_poll_eq(port->qp_eq); | ||
567 | } | 567 | } |
568 | 568 | ||
569 | return IRQ_HANDLED; | 569 | return IRQ_HANDLED; |
@@ -575,8 +575,9 @@ static struct ehea_port *ehea_get_port(struct ehea_adapter *adapter, | |||
575 | int i; | 575 | int i; |
576 | 576 | ||
577 | for (i = 0; i < adapter->num_ports; i++) | 577 | for (i = 0; i < adapter->num_ports; i++) |
578 | if (adapter->port[i]->logical_port_id == logical_port) | 578 | if (adapter->port[i]) |
579 | return adapter->port[i]; | 579 | if (adapter->port[i]->logical_port_id == logical_port) |
580 | return adapter->port[i]; | ||
580 | return NULL; | 581 | return NULL; |
581 | } | 582 | } |
582 | 583 | ||
@@ -642,6 +643,8 @@ int ehea_sense_port_attr(struct ehea_port *port) | |||
642 | break; | 643 | break; |
643 | } | 644 | } |
644 | 645 | ||
646 | port->autoneg = 1; | ||
647 | |||
645 | /* Number of default QPs */ | 648 | /* Number of default QPs */ |
646 | port->num_def_qps = cb0->num_default_qps; | 649 | port->num_def_qps = cb0->num_default_qps; |
647 | 650 | ||
@@ -728,10 +731,7 @@ int ehea_set_portspeed(struct ehea_port *port, u32 port_speed) | |||
728 | } | 731 | } |
729 | } else { | 732 | } else { |
730 | if (hret == H_AUTHORITY) { | 733 | if (hret == H_AUTHORITY) { |
731 | ehea_info("Hypervisor denied setting port speed. Either" | 734 | ehea_info("Hypervisor denied setting port speed"); |
732 | " this partition is not authorized to set " | ||
733 | "port speed or another partition has modified" | ||
734 | " port speed first."); | ||
735 | ret = -EPERM; | 735 | ret = -EPERM; |
736 | } else { | 736 | } else { |
737 | ret = -EIO; | 737 | ret = -EIO; |
@@ -998,7 +998,7 @@ static int ehea_configure_port(struct ehea_port *port) | |||
998 | | EHEA_BMASK_SET(PXLY_RC_JUMBO_FRAME, 1); | 998 | | EHEA_BMASK_SET(PXLY_RC_JUMBO_FRAME, 1); |
999 | 999 | ||
1000 | for (i = 0; i < port->num_def_qps; i++) | 1000 | for (i = 0; i < port->num_def_qps; i++) |
1001 | cb0->default_qpn_arr[i] = port->port_res[i].qp->init_attr.qp_nr; | 1001 | cb0->default_qpn_arr[i] = port->port_res[0].qp->init_attr.qp_nr; |
1002 | 1002 | ||
1003 | if (netif_msg_ifup(port)) | 1003 | if (netif_msg_ifup(port)) |
1004 | ehea_dump(cb0, sizeof(*cb0), "ehea_configure_port"); | 1004 | ehea_dump(cb0, sizeof(*cb0), "ehea_configure_port"); |
@@ -1485,11 +1485,12 @@ out: | |||
1485 | 1485 | ||
1486 | static void ehea_promiscuous_error(u64 hret, int enable) | 1486 | static void ehea_promiscuous_error(u64 hret, int enable) |
1487 | { | 1487 | { |
1488 | ehea_info("Hypervisor denied %sabling promiscuous mode.%s", | 1488 | if (hret == H_AUTHORITY) |
1489 | enable == 1 ? "en" : "dis", | 1489 | ehea_info("Hypervisor denied %sabling promiscuous mode", |
1490 | hret != H_AUTHORITY ? "" : " Another partition owning a " | 1490 | enable == 1 ? "en" : "dis"); |
1491 | "logical port on the same physical port might have altered " | 1491 | else |
1492 | "promiscuous mode first."); | 1492 | ehea_error("failed %sabling promiscuous mode", |
1493 | enable == 1 ? "en" : "dis"); | ||
1493 | } | 1494 | } |
1494 | 1495 | ||
1495 | static void ehea_promiscuous(struct net_device *dev, int enable) | 1496 | static void ehea_promiscuous(struct net_device *dev, int enable) |
@@ -2267,6 +2268,8 @@ static void ehea_tx_watchdog(struct net_device *dev) | |||
2267 | int ehea_sense_adapter_attr(struct ehea_adapter *adapter) | 2268 | int ehea_sense_adapter_attr(struct ehea_adapter *adapter) |
2268 | { | 2269 | { |
2269 | struct hcp_query_ehea *cb; | 2270 | struct hcp_query_ehea *cb; |
2271 | struct device_node *lhea_dn = NULL; | ||
2272 | struct device_node *eth_dn = NULL; | ||
2270 | u64 hret; | 2273 | u64 hret; |
2271 | int ret; | 2274 | int ret; |
2272 | 2275 | ||
@@ -2283,7 +2286,18 @@ int ehea_sense_adapter_attr(struct ehea_adapter *adapter) | |||
2283 | goto out_herr; | 2286 | goto out_herr; |
2284 | } | 2287 | } |
2285 | 2288 | ||
2286 | adapter->num_ports = cb->num_ports; | 2289 | /* Determine the number of available logical ports |
2290 | * by counting the child nodes of the lhea OFDT entry | ||
2291 | */ | ||
2292 | adapter->num_ports = 0; | ||
2293 | lhea_dn = of_find_node_by_name(lhea_dn, "lhea"); | ||
2294 | do { | ||
2295 | eth_dn = of_get_next_child(lhea_dn, eth_dn); | ||
2296 | if (eth_dn) | ||
2297 | adapter->num_ports++; | ||
2298 | } while ( eth_dn ); | ||
2299 | of_node_put(lhea_dn); | ||
2300 | |||
2287 | adapter->max_mc_mac = cb->max_mc_mac - 1; | 2301 | adapter->max_mc_mac = cb->max_mc_mac - 1; |
2288 | ret = 0; | 2302 | ret = 0; |
2289 | 2303 | ||
@@ -2334,8 +2348,6 @@ static int ehea_setup_single_port(struct ehea_port *port, | |||
2334 | 2348 | ||
2335 | INIT_LIST_HEAD(&port->mc_list->list); | 2349 | INIT_LIST_HEAD(&port->mc_list->list); |
2336 | 2350 | ||
2337 | ehea_set_portspeed(port, EHEA_SPEED_AUTONEG); | ||
2338 | |||
2339 | ret = ehea_sense_port_attr(port); | 2351 | ret = ehea_sense_port_attr(port); |
2340 | if (ret) | 2352 | if (ret) |
2341 | goto out; | 2353 | goto out; |
@@ -2471,14 +2483,16 @@ static int __devinit ehea_probe(struct ibmebus_dev *dev, | |||
2471 | 2483 | ||
2472 | adapter_handle = (u64*)get_property(dev->ofdev.node, "ibm,hea-handle", | 2484 | adapter_handle = (u64*)get_property(dev->ofdev.node, "ibm,hea-handle", |
2473 | NULL); | 2485 | NULL); |
2474 | if (!adapter_handle) { | 2486 | if (adapter_handle) |
2487 | adapter->handle = *adapter_handle; | ||
2488 | |||
2489 | if (!adapter->handle) { | ||
2475 | dev_err(&dev->ofdev.dev, "failed getting handle for adapter" | 2490 | dev_err(&dev->ofdev.dev, "failed getting handle for adapter" |
2476 | " '%s'\n", dev->ofdev.node->full_name); | 2491 | " '%s'\n", dev->ofdev.node->full_name); |
2477 | ret = -ENODEV; | 2492 | ret = -ENODEV; |
2478 | goto out_free_ad; | 2493 | goto out_free_ad; |
2479 | } | 2494 | } |
2480 | 2495 | ||
2481 | adapter->handle = *adapter_handle; | ||
2482 | adapter->pd = EHEA_PD_ID; | 2496 | adapter->pd = EHEA_PD_ID; |
2483 | 2497 | ||
2484 | dev->ofdev.dev.driver_data = adapter; | 2498 | dev->ofdev.dev.driver_data = adapter; |
diff --git a/drivers/net/ehea/ehea_phyp.c b/drivers/net/ehea/ehea_phyp.c index 0cfc2bc1a27b..37716e05e808 100644 --- a/drivers/net/ehea/ehea_phyp.c +++ b/drivers/net/ehea/ehea_phyp.c | |||
@@ -94,6 +94,7 @@ static long ehea_plpar_hcall9(unsigned long opcode, | |||
94 | { | 94 | { |
95 | long ret; | 95 | long ret; |
96 | int i, sleep_msecs; | 96 | int i, sleep_msecs; |
97 | u8 cb_cat; | ||
97 | 98 | ||
98 | for (i = 0; i < 5; i++) { | 99 | for (i = 0; i < 5; i++) { |
99 | ret = plpar_hcall9(opcode, outs, | 100 | ret = plpar_hcall9(opcode, outs, |
@@ -106,7 +107,13 @@ static long ehea_plpar_hcall9(unsigned long opcode, | |||
106 | continue; | 107 | continue; |
107 | } | 108 | } |
108 | 109 | ||
109 | if (ret < H_SUCCESS) | 110 | cb_cat = EHEA_BMASK_GET(H_MEHEAPORT_CAT, arg2); |
111 | |||
112 | if ((ret < H_SUCCESS) && !(((ret == H_AUTHORITY) | ||
113 | && (opcode == H_MODIFY_HEA_PORT)) | ||
114 | && (((cb_cat == H_PORT_CB4) && ((arg3 == H_PORT_CB4_JUMBO) | ||
115 | || (arg3 == H_PORT_CB4_SPEED))) || ((cb_cat == H_PORT_CB7) | ||
116 | && (arg3 == H_PORT_CB7_DUCQPN))))) | ||
110 | ehea_error("opcode=%lx ret=%lx" | 117 | ehea_error("opcode=%lx ret=%lx" |
111 | " arg1=%lx arg2=%lx arg3=%lx arg4=%lx" | 118 | " arg1=%lx arg2=%lx arg3=%lx arg4=%lx" |
112 | " arg5=%lx arg6=%lx arg7=%lx arg8=%lx" | 119 | " arg5=%lx arg6=%lx arg7=%lx arg8=%lx" |
@@ -120,7 +127,6 @@ static long ehea_plpar_hcall9(unsigned long opcode, | |||
120 | outs[0], outs[1], outs[2], outs[3], | 127 | outs[0], outs[1], outs[2], outs[3], |
121 | outs[4], outs[5], outs[6], outs[7], | 128 | outs[4], outs[5], outs[6], outs[7], |
122 | outs[8]); | 129 | outs[8]); |
123 | |||
124 | return ret; | 130 | return ret; |
125 | } | 131 | } |
126 | 132 | ||
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index 6490acf05305..59324b1693d6 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h | |||
@@ -63,12 +63,11 @@ | |||
63 | 63 | ||
64 | #include "netxen_nic_hw.h" | 64 | #include "netxen_nic_hw.h" |
65 | 65 | ||
66 | #define NETXEN_NIC_BUILD_NO "4" | 66 | #define NETXEN_NIC_BUILD_NO "2" |
67 | #define _NETXEN_NIC_LINUX_MAJOR 3 | 67 | #define _NETXEN_NIC_LINUX_MAJOR 3 |
68 | #define _NETXEN_NIC_LINUX_MINOR 3 | 68 | #define _NETXEN_NIC_LINUX_MINOR 3 |
69 | #define _NETXEN_NIC_LINUX_SUBVERSION 2 | 69 | #define _NETXEN_NIC_LINUX_SUBVERSION 3 |
70 | #define NETXEN_NIC_LINUX_VERSIONID "3.3.2" "-" NETXEN_NIC_BUILD_NO | 70 | #define NETXEN_NIC_LINUX_VERSIONID "3.3.3" "-" NETXEN_NIC_BUILD_NO |
71 | #define NETXEN_NIC_FW_VERSIONID "3.3.2" | ||
72 | 71 | ||
73 | #define RCV_DESC_RINGSIZE \ | 72 | #define RCV_DESC_RINGSIZE \ |
74 | (sizeof(struct rcv_desc) * adapter->max_rx_desc_count) | 73 | (sizeof(struct rcv_desc) * adapter->max_rx_desc_count) |
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index c0c31d1914a7..191e2336e323 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
@@ -984,7 +984,8 @@ void netxen_nic_flash_print(struct netxen_adapter *adapter) | |||
984 | _NETXEN_NIC_LINUX_MAJOR, fw_major); | 984 | _NETXEN_NIC_LINUX_MAJOR, fw_major); |
985 | adapter->driver_mismatch = 1; | 985 | adapter->driver_mismatch = 1; |
986 | } | 986 | } |
987 | if (fw_minor != _NETXEN_NIC_LINUX_MINOR) { | 987 | if (fw_minor != _NETXEN_NIC_LINUX_MINOR && |
988 | fw_minor != (_NETXEN_NIC_LINUX_MINOR + 1)) { | ||
988 | printk(KERN_ERR "The mismatch in driver version and firmware " | 989 | printk(KERN_ERR "The mismatch in driver version and firmware " |
989 | "version minor number\n" | 990 | "version minor number\n" |
990 | "Driver version minor number = %d \t" | 991 | "Driver version minor number = %d \t" |
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 8a5792fea774..96e1bee19ba0 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -1144,7 +1144,7 @@ static int __init netxen_init_module(void) | |||
1144 | if ((netxen_workq = create_singlethread_workqueue("netxen")) == 0) | 1144 | if ((netxen_workq = create_singlethread_workqueue("netxen")) == 0) |
1145 | return -ENOMEM; | 1145 | return -ENOMEM; |
1146 | 1146 | ||
1147 | return pci_module_init(&netxen_driver); | 1147 | return pci_register_driver(&netxen_driver); |
1148 | } | 1148 | } |
1149 | 1149 | ||
1150 | module_init(netxen_init_module); | 1150 | module_init(netxen_init_module); |
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c index 342f4062de0b..461e8274ef69 100644 --- a/drivers/net/pcmcia/3c589_cs.c +++ b/drivers/net/pcmcia/3c589_cs.c | |||
@@ -606,11 +606,14 @@ static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
606 | { | 606 | { |
607 | kio_addr_t ioaddr = dev->base_addr; | 607 | kio_addr_t ioaddr = dev->base_addr; |
608 | struct el3_private *priv = netdev_priv(dev); | 608 | struct el3_private *priv = netdev_priv(dev); |
609 | unsigned long flags; | ||
609 | 610 | ||
610 | DEBUG(3, "%s: el3_start_xmit(length = %ld) called, " | 611 | DEBUG(3, "%s: el3_start_xmit(length = %ld) called, " |
611 | "status %4.4x.\n", dev->name, (long)skb->len, | 612 | "status %4.4x.\n", dev->name, (long)skb->len, |
612 | inw(ioaddr + EL3_STATUS)); | 613 | inw(ioaddr + EL3_STATUS)); |
613 | 614 | ||
615 | spin_lock_irqsave(&priv->lock, flags); | ||
616 | |||
614 | priv->stats.tx_bytes += skb->len; | 617 | priv->stats.tx_bytes += skb->len; |
615 | 618 | ||
616 | /* Put out the doubleword header... */ | 619 | /* Put out the doubleword header... */ |
@@ -628,6 +631,7 @@ static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
628 | 631 | ||
629 | dev_kfree_skb(skb); | 632 | dev_kfree_skb(skb); |
630 | pop_tx_status(dev); | 633 | pop_tx_status(dev); |
634 | spin_unlock_irqrestore(&priv->lock, flags); | ||
631 | 635 | ||
632 | return 0; | 636 | return 0; |
633 | } | 637 | } |
@@ -729,14 +733,13 @@ static void media_check(unsigned long arg) | |||
729 | 733 | ||
730 | if (!netif_device_present(dev)) goto reschedule; | 734 | if (!netif_device_present(dev)) goto reschedule; |
731 | 735 | ||
732 | EL3WINDOW(1); | ||
733 | /* Check for pending interrupt with expired latency timer: with | 736 | /* Check for pending interrupt with expired latency timer: with |
734 | this, we can limp along even if the interrupt is blocked */ | 737 | this, we can limp along even if the interrupt is blocked */ |
735 | if ((inw(ioaddr + EL3_STATUS) & IntLatch) && | 738 | if ((inw(ioaddr + EL3_STATUS) & IntLatch) && |
736 | (inb(ioaddr + EL3_TIMER) == 0xff)) { | 739 | (inb(ioaddr + EL3_TIMER) == 0xff)) { |
737 | if (!lp->fast_poll) | 740 | if (!lp->fast_poll) |
738 | printk(KERN_WARNING "%s: interrupt(s) dropped!\n", dev->name); | 741 | printk(KERN_WARNING "%s: interrupt(s) dropped!\n", dev->name); |
739 | el3_interrupt(dev->irq, lp); | 742 | el3_interrupt(dev->irq, dev); |
740 | lp->fast_poll = HZ; | 743 | lp->fast_poll = HZ; |
741 | } | 744 | } |
742 | if (lp->fast_poll) { | 745 | if (lp->fast_poll) { |
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index e175f3910b18..9765fa661467 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c | |||
@@ -286,6 +286,7 @@ int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd) | |||
286 | 286 | ||
287 | return 0; | 287 | return 0; |
288 | } | 288 | } |
289 | EXPORT_SYMBOL(phy_ethtool_sset); | ||
289 | 290 | ||
290 | int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd) | 291 | int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd) |
291 | { | 292 | { |
@@ -302,7 +303,7 @@ int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd) | |||
302 | 303 | ||
303 | return 0; | 304 | return 0; |
304 | } | 305 | } |
305 | 306 | EXPORT_SYMBOL(phy_ethtool_gset); | |
306 | 307 | ||
307 | /* Note that this function is currently incompatible with the | 308 | /* Note that this function is currently incompatible with the |
308 | * PHYCONTROL layer. It changes registers without regard to | 309 | * PHYCONTROL layer. It changes registers without regard to |