[openib-general] Re: mthca crash on startup

Roland Dreier roland at topspin.com
Thu Nov 18 11:50:53 PST 2004


I committed this change, which should help a little
(pci_alloc_consistent() is implicitly GFP_ATOMIC).

 - R.

Index: infiniband/hw/mthca/mthca_qp.c
===================================================================
--- infiniband/hw/mthca/mthca_qp.c	(revision 1265)
+++ infiniband/hw/mthca/mthca_qp.c	(working copy)
@@ -967,8 +967,8 @@
 	u32 mqpn = qpn * 2 + dev->qp_table.sqp_start + port - 1;
 
 	sqp->header_buf_size = sqp->qp.sq.max * MTHCA_UD_HEADER_SIZE;
-	sqp->header_buf = pci_alloc_consistent(dev->pdev, sqp->header_buf_size,
-					       &sqp->header_dma);
+	sqp->header_buf = dma_alloc_coherent(&dev->pdev->dev, sqp->header_buf_size,
+					     &sqp->header_dma, GFP_KERNEL);
 	if (!sqp->header_buf)
 		return -ENOMEM;
 



More information about the general mailing list