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

+57 -33
+1 -1
drivers/net/ehea/ehea.h
··· 39 39 #include <asm/io.h> 40 40 41 41 #define DRV_NAME "ehea" 42 - #define DRV_VERSION "EHEA_0043" 42 + #define DRV_VERSION "EHEA_0044" 43 43 44 44 #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ 45 45 | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR)
+35 -21
drivers/net/ehea/ehea_main.c
··· 558 558 u32 qp_token; 559 559 560 560 eqe = ehea_poll_eq(port->qp_eq); 561 - ehea_debug("eqe=%p", eqe); 561 + 562 562 while (eqe) { 563 - ehea_debug("*eqe=%lx", *(u64*)eqe); 564 - eqe = ehea_poll_eq(port->qp_eq); 565 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 569 return IRQ_HANDLED; ··· 575 575 int i; 576 576 577 577 for (i = 0; i < adapter->num_ports; i++) 578 - if (adapter->port[i]->logical_port_id == logical_port) 579 - return adapter->port[i]; 578 + if (adapter->port[i]) 579 + if (adapter->port[i]->logical_port_id == logical_port) 580 + return adapter->port[i]; 580 581 return NULL; 581 582 } 582 583 ··· 642 641 port->full_duplex = 0; 643 642 break; 644 643 } 644 + 645 + port->autoneg = 1; 645 646 646 647 /* Number of default QPs */ 647 648 port->num_def_qps = cb0->num_default_qps; ··· 731 728 } 732 729 } else { 733 730 if (hret == H_AUTHORITY) { 734 - ehea_info("Hypervisor denied setting port speed. Either" 735 - " this partition is not authorized to set " 736 - "port speed or another partition has modified" 737 - " port speed first."); 731 + ehea_info("Hypervisor denied setting port speed"); 738 732 ret = -EPERM; 739 733 } else { 740 734 ret = -EIO; ··· 998 998 | EHEA_BMASK_SET(PXLY_RC_JUMBO_FRAME, 1); 999 999 1000 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 1003 if (netif_msg_ifup(port)) 1004 1004 ehea_dump(cb0, sizeof(*cb0), "ehea_configure_port"); ··· 1485 1485 1486 1486 static void ehea_promiscuous_error(u64 hret, int enable) 1487 1487 { 1488 - ehea_info("Hypervisor denied %sabling promiscuous mode.%s", 1489 - enable == 1 ? "en" : "dis", 1490 - hret != H_AUTHORITY ? "" : " Another partition owning a " 1491 - "logical port on the same physical port might have altered " 1492 - "promiscuous mode first."); 1488 + if (hret == H_AUTHORITY) 1489 + ehea_info("Hypervisor denied %sabling promiscuous mode", 1490 + enable == 1 ? "en" : "dis"); 1491 + else 1492 + ehea_error("failed %sabling promiscuous mode", 1493 + enable == 1 ? "en" : "dis"); 1493 1494 } 1494 1495 1495 1496 static void ehea_promiscuous(struct net_device *dev, int enable) ··· 2268 2267 int ehea_sense_adapter_attr(struct ehea_adapter *adapter) 2269 2268 { 2270 2269 struct hcp_query_ehea *cb; 2270 + struct device_node *lhea_dn = NULL; 2271 + struct device_node *eth_dn = NULL; 2271 2272 u64 hret; 2272 2273 int ret; 2273 2274 ··· 2286 2283 goto out_herr; 2287 2284 } 2288 2285 2289 - adapter->num_ports = cb->num_ports; 2286 + /* Determine the number of available logical ports 2287 + * by counting the child nodes of the lhea OFDT entry 2288 + */ 2289 + adapter->num_ports = 0; 2290 + lhea_dn = of_find_node_by_name(lhea_dn, "lhea"); 2291 + do { 2292 + eth_dn = of_get_next_child(lhea_dn, eth_dn); 2293 + if (eth_dn) 2294 + adapter->num_ports++; 2295 + } while ( eth_dn ); 2296 + of_node_put(lhea_dn); 2297 + 2290 2298 adapter->max_mc_mac = cb->max_mc_mac - 1; 2291 2299 ret = 0; 2292 2300 ··· 2347 2333 } 2348 2334 2349 2335 INIT_LIST_HEAD(&port->mc_list->list); 2350 - 2351 - ehea_set_portspeed(port, EHEA_SPEED_AUTONEG); 2352 2336 2353 2337 ret = ehea_sense_port_attr(port); 2354 2338 if (ret) ··· 2483 2471 2484 2472 adapter_handle = (u64*)get_property(dev->ofdev.node, "ibm,hea-handle", 2485 2473 NULL); 2486 - if (!adapter_handle) { 2474 + if (adapter_handle) 2475 + adapter->handle = *adapter_handle; 2476 + 2477 + if (!adapter->handle) { 2487 2478 dev_err(&dev->ofdev.dev, "failed getting handle for adapter" 2488 2479 " '%s'\n", dev->ofdev.node->full_name); 2489 2480 ret = -ENODEV; 2490 2481 goto out_free_ad; 2491 2482 } 2492 2483 2493 - adapter->handle = *adapter_handle; 2494 2484 adapter->pd = EHEA_PD_ID; 2495 2485 2496 2486 dev->ofdev.dev.driver_data = adapter;
+8 -2
drivers/net/ehea/ehea_phyp.c
··· 94 94 { 95 95 long ret; 96 96 int i, sleep_msecs; 97 + u8 cb_cat; 97 98 98 99 for (i = 0; i < 5; i++) { 99 100 ret = plpar_hcall9(opcode, outs, ··· 107 106 continue; 108 107 } 109 108 110 - if (ret < H_SUCCESS) 109 + cb_cat = EHEA_BMASK_GET(H_MEHEAPORT_CAT, arg2); 110 + 111 + if ((ret < H_SUCCESS) && !(((ret == H_AUTHORITY) 112 + && (opcode == H_MODIFY_HEA_PORT)) 113 + && (((cb_cat == H_PORT_CB4) && ((arg3 == H_PORT_CB4_JUMBO) 114 + || (arg3 == H_PORT_CB4_SPEED))) || ((cb_cat == H_PORT_CB7) 115 + && (arg3 == H_PORT_CB7_DUCQPN))))) 111 116 ehea_error("opcode=%lx ret=%lx" 112 117 " arg1=%lx arg2=%lx arg3=%lx arg4=%lx" 113 118 " arg5=%lx arg6=%lx arg7=%lx arg8=%lx" ··· 127 120 outs[0], outs[1], outs[2], outs[3], 128 121 outs[4], outs[5], outs[6], outs[7], 129 122 outs[8]); 130 - 131 123 return ret; 132 124 } 133 125
+3 -4
drivers/net/netxen/netxen_nic.h
··· 63 63 64 64 #include "netxen_nic_hw.h" 65 65 66 - #define NETXEN_NIC_BUILD_NO "4" 66 + #define NETXEN_NIC_BUILD_NO "2" 67 67 #define _NETXEN_NIC_LINUX_MAJOR 3 68 68 #define _NETXEN_NIC_LINUX_MINOR 3 69 - #define _NETXEN_NIC_LINUX_SUBVERSION 2 70 - #define NETXEN_NIC_LINUX_VERSIONID "3.3.2" "-" NETXEN_NIC_BUILD_NO 71 - #define NETXEN_NIC_FW_VERSIONID "3.3.2" 69 + #define _NETXEN_NIC_LINUX_SUBVERSION 3 70 + #define NETXEN_NIC_LINUX_VERSIONID "3.3.3" "-" NETXEN_NIC_BUILD_NO 72 71 73 72 #define RCV_DESC_RINGSIZE \ 74 73 (sizeof(struct rcv_desc) * adapter->max_rx_desc_count)
+2 -1
drivers/net/netxen/netxen_nic_hw.c
··· 984 984 _NETXEN_NIC_LINUX_MAJOR, fw_major); 985 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 989 printk(KERN_ERR "The mismatch in driver version and firmware " 989 990 "version minor number\n" 990 991 "Driver version minor number = %d \t"
+1 -1
drivers/net/netxen/netxen_nic_main.c
··· 1144 1144 if ((netxen_workq = create_singlethread_workqueue("netxen")) == 0) 1145 1145 return -ENOMEM; 1146 1146 1147 - return pci_module_init(&netxen_driver); 1147 + return pci_register_driver(&netxen_driver); 1148 1148 } 1149 1149 1150 1150 module_init(netxen_init_module);
+5 -2
drivers/net/pcmcia/3c589_cs.c
··· 606 606 { 607 607 kio_addr_t ioaddr = dev->base_addr; 608 608 struct el3_private *priv = netdev_priv(dev); 609 + unsigned long flags; 609 610 610 611 DEBUG(3, "%s: el3_start_xmit(length = %ld) called, " 611 612 "status %4.4x.\n", dev->name, (long)skb->len, 612 613 inw(ioaddr + EL3_STATUS)); 614 + 615 + spin_lock_irqsave(&priv->lock, flags); 613 616 614 617 priv->stats.tx_bytes += skb->len; 615 618 ··· 631 628 632 629 dev_kfree_skb(skb); 633 630 pop_tx_status(dev); 631 + spin_unlock_irqrestore(&priv->lock, flags); 634 632 635 633 return 0; 636 634 } ··· 733 729 734 730 if (!netif_device_present(dev)) goto reschedule; 735 731 736 - EL3WINDOW(1); 737 732 /* Check for pending interrupt with expired latency timer: with 738 733 this, we can limp along even if the interrupt is blocked */ 739 734 if ((inw(ioaddr + EL3_STATUS) & IntLatch) && 740 735 (inb(ioaddr + EL3_TIMER) == 0xff)) { 741 736 if (!lp->fast_poll) 742 737 printk(KERN_WARNING "%s: interrupt(s) dropped!\n", dev->name); 743 - el3_interrupt(dev->irq, lp); 738 + el3_interrupt(dev->irq, dev); 744 739 lp->fast_poll = HZ; 745 740 } 746 741 if (lp->fast_poll) {
+2 -1
drivers/net/phy/phy.c
··· 286 286 287 287 return 0; 288 288 } 289 + EXPORT_SYMBOL(phy_ethtool_sset); 289 290 290 291 int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd) 291 292 { ··· 303 302 304 303 return 0; 305 304 } 306 - 305 + EXPORT_SYMBOL(phy_ethtool_gset); 307 306 308 307 /* Note that this function is currently incompatible with the 309 308 * PHYCONTROL layer. It changes registers without regard to