From bd27325d155445df285b18a6fb0412f4dcfbb6b1 Mon Sep 17 00:00:00 2001 From: Jonah Miller Date: Fri, 4 Sep 2015 18:03:24 -0400 Subject: [PATCH] Updated patch to work with 3.5 --- .mpss-metadata | 4 ++-- README.md | 4 ++-- host/micscif_pm.c | 2 +- include/mic/io_interface.h | 13 +++++++++++++ micscif/micscif_nodeqp.c | 2 +- micscif/micscif_ports.c | 2 +- 6 files changed, 20 insertions(+), 7 deletions(-) diff --git a/.mpss-metadata b/.mpss-metadata index e9b29d7..eeec3bd 100644 --- a/.mpss-metadata +++ b/.mpss-metadata @@ -1,2 +1,2 @@ -3.4.2-1 -36aff5ba523102d83ed26965d87593c6faa8be27 +3.5.2-1 +5c2298f5c59a5aaa74df6d07f860b983cd11e45d diff --git a/README.md b/README.md index bb8ba29..56bdcc6 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -Intel MPSS 3.4 for Linux 3.13.0 +Intel MPSS 3.5 for Linux 3.13.0 =============================== -This repository contains Intel MPSS 3.4 modules. The source is patched to work +This repository contains Intel MPSS 3.5 modules. The source is patched to work with Linux Kernel 3.13.0, it was only tested on Ubuntu 14.04, but should work on any distro since the Kernel version is 3.13.0 (not tested with newer kernel versions). diff --git a/host/micscif_pm.c b/host/micscif_pm.c index 964d155..e0abb12 100644 --- a/host/micscif_pm.c +++ b/host/micscif_pm.c @@ -177,7 +177,7 @@ mic_pm_send(mic_ctx_t *mic_ctx, void *msg, uint32_t len) err = scif_send(epd, msg, len, PM_SEND_MODE); /*scif_send returns the number of bytes returned on success */ if(err <= 0) { - printk("scif_send to node: %d port: %d failed with error %d\n", + PM_DEBUG("scif_send to node: %d port: %d failed with error %d\n", epd->peer.node, epd->peer.port, err); } else { PM_DEBUG("Bytes sent = %d\n",err); diff --git a/include/mic/io_interface.h b/include/mic/io_interface.h index 3c91858..4d00e61 100644 --- a/include/mic/io_interface.h +++ b/include/mic/io_interface.h @@ -38,6 +38,16 @@ #ifndef __IO_INTERFACE_H__ #define __IO_INTERFACE_H__ +/* + * The host driver exports sysfs entries in + * /sys/class/mic/micX/ + * The "/sys/class/mic/micX/state" entry reflects the state of the + * card as it transitions from hardware reset through booting an image + * + * All the other entries have valid values when the state entry is either + * "ready" or "online" + */ + /* * ----------------------------------------- * IOCTL interface information @@ -81,6 +91,9 @@ typedef enum { * \param len uos escape opecode * * This structure is used for IOCTL_FLASHCMD. + * + * This IOCTL can only be issued when /sys/class/mic/mic0/state returns "online" + * after it has been set to "boot:flash" */ struct ctrlioctl_flashcmd { uint32_t brdnum; diff --git a/micscif/micscif_nodeqp.c b/micscif/micscif_nodeqp.c index ce3b2fa..24bd580 100644 --- a/micscif/micscif_nodeqp.c +++ b/micscif/micscif_nodeqp.c @@ -2568,7 +2568,7 @@ micscif_nodeqp_intrhandler(struct micscif_dev *scifdev, struct micscif_qp *qp) * P2P connections to provide better Node QP responsiveness * in anticipation of P2P Proxy DMA requests for performance. */ - if (is_p2p_scifdev(scifdev) && + if (scifdev->sd_proxy_dma_reads && scifdev->num_active_conn && SCIFDEV_STOPPED != scifdev->sd_state) { queue_work(scifdev->sd_intr_wq, &scifdev->sd_intr_bh); diff --git a/micscif/micscif_ports.c b/micscif/micscif_ports.c index 97c9eb4..8eeeb7b 100644 --- a/micscif/micscif_ports.c +++ b/micscif/micscif_ports.c @@ -327,7 +327,7 @@ get_scif_port(void) init_scif_array(); spin_lock(&port_lock); - if (first_free == PORTS_ARRAY_SIZE) { /* Pool is empty */ + if (first_free >= PORTS_ARRAY_SIZE) { /* Pool is empty */ port = 0; port_err++; goto out;