|
@@ -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,8 +575,9 @@ 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]->logical_port_id == logical_port)
|
|
|
- return adapter->port[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 @@ out:
|
|
|
|
|
|
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;
|