Well after some time, I've spoke with the HP people and they changed the Mezzanine cards from (QLogic Corp. IBA7322 QDR InfiniBand HCA (rev 02)) to (Mellanox Technologies MT26428 [ConnectX VPI PCIe 2.0 5GT/s - IB QDR / 10GigE] (rev b0)) and now it works, not at 3.2Gb/s (the throughput that I think QDR may get), but both ports come up and they are running fine. After the replacement of the mezzanine cards, also I do a firmware upgrade code and took it to the last available code from the HP support site.
$ ibstat
CA 'mlx4_0'
CA type: MT26428
Number of ports: 2
Firmware version: 2.9.1530
Hardware version: b0
Node GUID: 0xf452140300dd3294
System image GUID: 0xf452140300dd3297
Port 1:
State: Active
Physical state: LinkUp
Rate: 40
Base lid: 32
LMC: 0
SM lid: 2
Capability mask: 0x02510868
Port GUID: 0xf452140300dd3295
Link layer: InfiniBand
Port 2:
State: Active
Physical state: LinkUp
Rate: 40
Base lid: 33
LMC: 0
SM lid: 2
Capability mask: 0x02510868
Port GUID: 0xf452140300dd3296
Link layer: InfiniBand