[ofa-general] Re: [PATCH] IB/mlx4: enable MSI-X by default

Roland Dreier rdreier at cisco.com
Fri Jul 20 21:54:27 PDT 2007


 > -	mlx4_enable_msi_x(dev);
 > -
 >  	if (mlx4_cmd_init(dev)) {
 >  		mlx4_err(dev, "Failed to init command interface, aborting.\n");
 >  		goto err_free_dev;
 >  	}
 >  
 > +	mlx4_enable_msi_x(dev);

Why this change?  I don't see anything in mlx4_cmd_init() that seems
to matter in terms of coming before or after enabling MSI-X.

 >  	err = mlx4_init_hca(dev);
 > +	if (err == -EBUSY && (dev->flags & MLX4_FLAG_MSI_X)) {
 > +		mlx4_warn(dev, "Trying again with MSI/MSI-X disabled.\n");
 > +		dev->flags &= ~MLX4_FLAG_MSI_X;
 > +		pci_disable_msix(pdev);
 > +		err = mlx4_init_hca(dev);
 > +	}
 > +
 >  	if (err)
 >  		goto err_cmd;
 >  
 > +	mlx4_enable_msi_x(dev);
 > +
 >  	err = mlx4_setup_hca(dev);

Have you actually tested this on a system where MSI-X fails?  Because
I don't see how it could work-- we don't actually try interrupts until
mlx4_setup_hca() (in fact we don't even create any EQs until then).
So I don't see how mlx4_init_hca() could tell if MSI-X is OK...

 - R.



More information about the general mailing list