diff mbox

ib/ehca: fix in_wc handling in process_mad()

Message ID 20100216095950.15c6eb9d@alex-laptop (mailing list archive)
State Accepted
Headers show

Commit Message

Alexander Schmidt Feb. 16, 2010, 8:59 a.m. UTC
None
diff mbox

Patch

--- linux-2.6.orig/drivers/infiniband/hw/ehca/ehca_sqp.c
+++ linux-2.6/drivers/infiniband/hw/ehca/ehca_sqp.c
@@ -222,7 +222,7 @@  int ehca_process_mad(struct ib_device *i
 {
 	int ret;
 
-	if (!port_num || port_num > ibdev->phys_port_cnt)
+	if (!port_num || port_num > ibdev->phys_port_cnt || !in_wc)
 		return IB_MAD_RESULT_FAILURE;
 
 	/* accept only pma request */