[ipxe-devel] HP G9 and HP FlexFabric 20Gb 2-port 650FLB Adapter (again)

Fabrice Bacchella fabrice.bacchella at orange.fr
Wed Aug 12 09:46:53 UTC 2015


Ok I finally got it.

I made some modifications, in the  nii.patch.

I added some debuging at level 2.

Some of the modifications are rewriting for better conformance with specifications (like NULL replaced by PXE_DBADDR_NOT_USED), and more readability

This one is a true bug :
@@ -685,14 +700,26 @@ static int nii_set_station_address ( struct nii_nic *nii,
 	PXE_CPB_STATION_ADDRESS cpb;
 	int stat;
 	int rc;
+	unsigned int op;
+
+	if ( (nii->undi->Implementation & PXE_ROMID_IMP_STATION_ADDR_SETTABLE) == 0)  {
+		DBGC ( nii, "NII %s could not set station address: unsupported by implementation\n",
+		       nii->dev.name);
+		return 0;
+	}

Emulex cards don't accept this, but is it really needed any way ?

I don't quite understand the next one, it might be an emulex bug:
I tried testing Implementation, but it didn't work, so I needed to set a custom flags, I don't know if all filters are really needed.

 static int nii_set_rx_filters ( struct nii_nic *nii ) {
-	unsigned int op;
+	unsigned int op,flags = 0;
 	int stat;
 	int rc;
+	//PXE_UINT32 Implementation = nii->undi->Implementation;
 
 	/* Issue command */
-	op = NII_OP ( PXE_OPCODE_RECEIVE_FILTERS,
-		      ( PXE_OPFLAGS_RECEIVE_FILTER_ENABLE |
-			PXE_OPFLAGS_RECEIVE_FILTER_UNICAST |
-			PXE_OPFLAGS_RECEIVE_FILTER_BROADCAST |
-			PXE_OPFLAGS_RECEIVE_FILTER_PROMISCUOUS |
-			PXE_OPFLAGS_RECEIVE_FILTER_ALL_MULTICAST ) );
+	//flags = PXE_OPFLAGS_RECEIVE_FILTER_ENABLE;
+	flags = PXE_OPFLAGS_RECEIVE_FILTER_ENABLE | PXE_OPFLAGS_RECEIVE_FILTER_UNICAST | PXE_OPFLAGS_RECEIVE_FILTER_BROADCAST;
+	//flags |= PXE_OPFLAGS_RECEIVE_FILTER_UNICAST;
+	//flags |= (Implementation & PXE_ROMID_IMP_BROADCAST_RX_SUPPORTED) ? PXE_OPFLAGS_RECEIVE_FILTER_BROADCAST : 0 ;
+	//flags |= (Implementation & PXE_ROMID_IMP_PROMISCUOUS_RX_SUPPORTED) ? PXE_OPFLAGS_RECEIVE_FILTER_PROMISCUOUS : 0;
+	//flags |= (Implementation & PXE_ROMID_IMP_FILTERED_MULTICAST_RX_SUPPORTED) ? PXE_OPFLAGS_RECEIVE_FILTER_ALL_MULTICAST : 0;
+	op = NII_OP ( PXE_OPCODE_RECEIVE_FILTERS, flags );
+	DBGC2 ( nii, "set rx filters for NII %s: 0x%x\n",
+	       nii->dev.name, flags);
 	if ( ( stat = nii_issue ( nii, op ) ) < 0 ) {
 		rc = -EIO_STAT ( stat );
 		DBGC ( nii, "NII %s could not set receive filters: %s\n",
@


I'm not sure this one is needed, but it's more explicit, I think it should work better in some corner case.
@@ -751,6 +783,11 @@ static int nii_transmit ( struct net_device *netdev,
 		return 0;
 	}
 
+	op = NII_OP (PXE_OPCODE_TRANSMIT,
+		     ( PXE_OPFLAGS_TRANSMIT_WHOLE |
+		       PXE_OPFLAGS_TRANSMIT_BLOCK
+		       ) );
+


I'm not sure about this one too, my Emulex don't like the PXE_OPFLAGS_INITIALIZE_DO_NOT_DETECT_CABLE, so I removed it.
@@ -594,7 +600,9 @@ static int nii_initialise ( struct nii_nic *nii ) {
 
 	/* Issue command */
 	op = NII_OP ( PXE_OPCODE_INITIALIZE,
-		      PXE_OPFLAGS_INITIALIZE_DO_NOT_DETECT_CABLE );
+		      0 );
+	DBGC2 ( nii, "initialise NII %s\n",
+	        nii->dev.name);
 	if ( ( stat = nii_issue_cpb_db ( nii, op, &cpb, sizeof ( cpb ),
 					 &db, sizeof ( db ) ) ) < 0 ) {
 		rc = -EIO_STAT ( stat );


-------------- next part --------------
A non-text attachment was scrubbed...
Name: nii.patch
Type: application/octet-stream
Size: 6682 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20150812/fff65ff4/attachment.obj>
-------------- next part --------------



> Le 7 ao?t 2015 ? 17:31, Fabrice Bacchella <fabrice.bacchella at orange.fr> a ?crit :
> 
> 
>> Le 7 ao?t 2015 ? 08:12, Fabrice Bacchella <fabrice.bacchella at orange.fr> a ?crit :
>> 
>> I'm fighting with a FlexFabric 20Gb 2-port 650FLB Adapter on a ProLiant BL460c Gen9, booting in UEFI.
> 
> I just tried to boot the same hardware in BIOS mode, so using UNDI drivers, it worked perfectly.
> _______________________________________________
> ipxe-devel mailing list
> ipxe-devel at lists.ipxe.org
> https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel



More information about the ipxe-devel mailing list