Enabled _sdma_txadd_daddr()

This commit is contained in:
Aram Santogidis
2017-08-09 13:05:20 +09:00
committed by Balazs Gerofi
parent fa6db686b4
commit 076e6b9b12
7 changed files with 22 additions and 16 deletions

View File

@ -369,6 +369,7 @@ struct hfi1_ctxtdata {
#endif /* __HFI1_ORIG__ */
//TODO: Fix hfi1_ctxtdata and pport
#ifndef __HFI1_ORIG__
struct hfi1_ctxtdata {
unsigned ctxt;
@ -1267,7 +1268,8 @@ struct hfi1_devdata {
struct hfi1_devdata {
char verbs_dev[2688]; //struct hfi1_ibdev verbs_dev
struct list_head list;
struct pci_dev *pcidev;
//TODO: pcidev
void *pcidev; // struct pci_dev *pcidev;
char user_cdev[104]; //struct cdev user_cdev
char diag_cdev[104]; //struct cdev diag_cdev
char ui_cdev[104]; //struct cdev ui_cdev

View File

@ -90,9 +90,12 @@ typedef ihk_spinlock_t spinlock_t;
#define __iomem
#define __rcu
#define __percpu
#define GFP_KERNEL 0
#define send_routine void *
#define GFP_KERNEL 0
// TODO: double check GFP_ATOMIC
#define GFP_ATOMIC 0
/* hfi1 pio.h */
#define SC_MAX 4 /* count of send context types */

View File

@ -46,7 +46,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include <hfi1/hfi.h>
#include <hfi1/ihk_hfi1_common.h>
#include <hfi1/sdma_txreq.h>
@ -691,7 +691,6 @@ static inline void sdma_txclean(struct hfi1_devdata *dd, struct sdma_txreq *tx)
if (tx->num_desc)
__sdma_txclean(dd, tx);
}
#ifdef __HFI1_ORIG__
int _pad_sdma_tx_descs(struct hfi1_devdata *, struct sdma_txreq *);
/* helpers used by public routines */
@ -708,7 +707,6 @@ static inline void _sdma_close_tx(struct hfi1_devdata *dd,
SDMA_DESC1_INT_REQ_FLAG);
}
#endif /* __HFI1_ORIG__ */
static inline int _sdma_txadd_daddr(
struct hfi1_devdata *dd,
int type,
@ -727,13 +725,11 @@ static inline int _sdma_txadd_daddr(
/* special cases for last */
if (!tx->tlen) {
if (tx->packet_len & (sizeof(u32) - 1)) {
//TODO: _pad_sdma_tx_descs
//rval = _pad_sdma_tx_descs(dd, tx);
rval = _pad_sdma_tx_descs(dd, tx);
if (rval)
return rval;
} else {
//TODO: _sdma_close_tx
//_sdma_close_tx(dd, tx);
_sdma_close_tx(dd, tx);
}
}
tx->num_desc++;

View File

@ -51,9 +51,7 @@
#include <hfi1/ihk_hfi1_common.h>
#include <hfi1/iowait.h>
#include <hfi1/sdma.h>
#include <string.h>
#include <hfi1/hfi.h>
#include <hfi1/hfi1_user.h>
#include <uio.h>