Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe6ea1f7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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
parents 6d7de67c 184231bd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@
#include <asm/io.h>

#define DRV_NAME	"ehea"
#define DRV_VERSION	"EHEA_0043"
#define DRV_VERSION	"EHEA_0044"

#define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \
	| NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR)
+35 −21
Original line number Diff line number Diff line
@@ -558,12 +558,12 @@ static irqreturn_t ehea_qp_aff_irq_handler(int irq, void *param)
	u32 qp_token;

	eqe = ehea_poll_eq(port->qp_eq);
	ehea_debug("eqe=%p", eqe);

	while (eqe) {
		ehea_debug("*eqe=%lx", *(u64*)eqe);
		eqe = ehea_poll_eq(port->qp_eq);
		qp_token = EHEA_BMASK_GET(EHEA_EQE_QP_TOKEN, eqe->entry);
		ehea_debug("next eqe=%p", eqe);
		ehea_error("QP aff_err: entry=0x%lx, token=0x%x",
			   eqe->entry, qp_token);
		eqe = ehea_poll_eq(port->qp_eq);
	}

	return IRQ_HANDLED;
@@ -575,6 +575,7 @@ static struct ehea_port *ehea_get_port(struct ehea_adapter *adapter,
	int i;

	for (i = 0; i < adapter->num_ports; i++)
		if (adapter->port[i])
	                if (adapter->port[i]->logical_port_id == logical_port)
				return adapter->port[i];
	return NULL;
@@ -642,6 +643,8 @@ int ehea_sense_port_attr(struct ehea_port *port)
		break;
	}

	port->autoneg = 1;

	/* Number of default QPs */
	port->num_def_qps = cb0->num_default_qps;

@@ -728,10 +731,7 @@ int ehea_set_portspeed(struct ehea_port *port, u32 port_speed)
		}
	} else {
		if (hret == H_AUTHORITY) {
			ehea_info("Hypervisor denied setting port speed. Either"
				  " this partition is not authorized to set "
				  "port speed or another partition has modified"
				  " port speed first.");
			ehea_info("Hypervisor denied setting port speed");
			ret = -EPERM;
		} else {
			ret = -EIO;
@@ -998,7 +998,7 @@ static int ehea_configure_port(struct ehea_port *port)
		     | EHEA_BMASK_SET(PXLY_RC_JUMBO_FRAME, 1);

	for (i = 0; i < port->num_def_qps; i++)
		cb0->default_qpn_arr[i] = port->port_res[i].qp->init_attr.qp_nr;
		cb0->default_qpn_arr[i] = port->port_res[0].qp->init_attr.qp_nr;

	if (netif_msg_ifup(port))
		ehea_dump(cb0, sizeof(*cb0), "ehea_configure_port");
@@ -1485,11 +1485,12 @@ static int ehea_set_mac_addr(struct net_device *dev, void *sa)

static void ehea_promiscuous_error(u64 hret, int enable)
{
	ehea_info("Hypervisor denied %sabling promiscuous mode.%s",
		  enable == 1 ? "en" : "dis",
		  hret != H_AUTHORITY ? "" : " Another partition owning a "
		  "logical port on the same physical port might have altered "
		  "promiscuous mode first.");
	if (hret == H_AUTHORITY)
		ehea_info("Hypervisor denied %sabling promiscuous mode",
			  enable == 1 ? "en" : "dis");
	else
		ehea_error("failed %sabling promiscuous mode",
			   enable == 1 ? "en" : "dis");
}

static void ehea_promiscuous(struct net_device *dev, int enable)
@@ -2267,6 +2268,8 @@ static void ehea_tx_watchdog(struct net_device *dev)
int ehea_sense_adapter_attr(struct ehea_adapter *adapter)
{
	struct hcp_query_ehea *cb;
	struct device_node *lhea_dn = NULL;
	struct device_node *eth_dn = NULL;
	u64 hret;
	int ret;

@@ -2283,7 +2286,18 @@ int ehea_sense_adapter_attr(struct ehea_adapter *adapter)
		goto out_herr;
	}

	adapter->num_ports = cb->num_ports;
	/* Determine the number of available logical ports
	 * by counting the child nodes of the lhea OFDT entry
	 */
	adapter->num_ports = 0;
	lhea_dn = of_find_node_by_name(lhea_dn, "lhea");
	do {
		eth_dn = of_get_next_child(lhea_dn, eth_dn);
		if (eth_dn)
			adapter->num_ports++;
	} while ( eth_dn );
	of_node_put(lhea_dn);

	adapter->max_mc_mac = cb->max_mc_mac - 1;
	ret = 0;

@@ -2334,8 +2348,6 @@ static int ehea_setup_single_port(struct ehea_port *port,

	INIT_LIST_HEAD(&port->mc_list->list);

	ehea_set_portspeed(port, EHEA_SPEED_AUTONEG);

	ret = ehea_sense_port_attr(port);
	if (ret)
		goto out;
@@ -2471,14 +2483,16 @@ static int __devinit ehea_probe(struct ibmebus_dev *dev,

	adapter_handle = (u64*)get_property(dev->ofdev.node, "ibm,hea-handle",
					    NULL);
	if (!adapter_handle) {
	if (adapter_handle)
		adapter->handle = *adapter_handle;

	if (!adapter->handle) {
		dev_err(&dev->ofdev.dev, "failed getting handle for adapter"
			" '%s'\n", dev->ofdev.node->full_name);
		ret = -ENODEV;
		goto out_free_ad;
	}

	adapter->handle = *adapter_handle;
	adapter->pd = EHEA_PD_ID;

	dev->ofdev.dev.driver_data = adapter;
+8 −2
Original line number Diff line number Diff line
@@ -94,6 +94,7 @@ static long ehea_plpar_hcall9(unsigned long opcode,
{
	long ret;
	int i, sleep_msecs;
	u8 cb_cat;

	for (i = 0; i < 5; i++) {
		ret = plpar_hcall9(opcode, outs,
@@ -106,7 +107,13 @@ static long ehea_plpar_hcall9(unsigned long opcode,
			continue;
		}

		if (ret < H_SUCCESS)
		cb_cat = EHEA_BMASK_GET(H_MEHEAPORT_CAT, arg2);

		if ((ret < H_SUCCESS) && !(((ret == H_AUTHORITY)
		    && (opcode == H_MODIFY_HEA_PORT))
		    && (((cb_cat == H_PORT_CB4) && ((arg3 == H_PORT_CB4_JUMBO)
		    || (arg3 == H_PORT_CB4_SPEED))) || ((cb_cat == H_PORT_CB7)
		    && (arg3 == H_PORT_CB7_DUCQPN)))))
			ehea_error("opcode=%lx ret=%lx"
				   " arg1=%lx arg2=%lx arg3=%lx arg4=%lx"
				   " arg5=%lx arg6=%lx arg7=%lx arg8=%lx"
@@ -120,7 +127,6 @@ static long ehea_plpar_hcall9(unsigned long opcode,
				   outs[0], outs[1], outs[2], outs[3],
				   outs[4], outs[5], outs[6], outs[7],
				   outs[8]);

		return ret;
	}

+3 −4
Original line number Diff line number Diff line
@@ -63,12 +63,11 @@

#include "netxen_nic_hw.h"

#define NETXEN_NIC_BUILD_NO     "4"
#define NETXEN_NIC_BUILD_NO     "2"
#define _NETXEN_NIC_LINUX_MAJOR 3
#define _NETXEN_NIC_LINUX_MINOR 3
#define _NETXEN_NIC_LINUX_SUBVERSION 2
#define NETXEN_NIC_LINUX_VERSIONID  "3.3.2" "-" NETXEN_NIC_BUILD_NO
#define NETXEN_NIC_FW_VERSIONID "3.3.2"
#define _NETXEN_NIC_LINUX_SUBVERSION 3
#define NETXEN_NIC_LINUX_VERSIONID  "3.3.3" "-" NETXEN_NIC_BUILD_NO

#define RCV_DESC_RINGSIZE	\
	(sizeof(struct rcv_desc) * adapter->max_rx_desc_count)
+2 −1
Original line number Diff line number Diff line
@@ -984,7 +984,8 @@ void netxen_nic_flash_print(struct netxen_adapter *adapter)
		       _NETXEN_NIC_LINUX_MAJOR, fw_major);
		adapter->driver_mismatch = 1;
	}
	if (fw_minor != _NETXEN_NIC_LINUX_MINOR) {
	if (fw_minor != _NETXEN_NIC_LINUX_MINOR &&
			fw_minor != (_NETXEN_NIC_LINUX_MINOR + 1)) {
		printk(KERN_ERR "The mismatch in driver version and firmware "
		       "version minor number\n"
		       "Driver version minor number = %d \t"
Loading