[ofw] patch: fix the assumption that __cep_mad_send_cb is always being called at dispatch level

Fab Tillier ftillier at microsoft.com
Mon Mar 8 18:45:12 PST 2010


Hi Tzachi,

Comment inline.

> -----Original Message-----
> From: Tzachi Dar [mailto:tzachid at mellanox.co.il]
> Sent: Monday, March 08, 2010 5:04 AM
> 
> OK, than the new patch now looks like:
> Index: al_smi.c
> ===================================================================
> --- al_smi.c	(revision 5646)
> +++ al_smi.c	(working copy)
> @@ -925,6 +925,7 @@
>  	al_mad_wr_t*			p_mad_wr;
> 
>  	ib_api_status_t			status;
> +	KIRQL irql;
> 
>  	AL_ENTER( AL_DBG_SMI );
> 
> @@ -970,8 +971,10 @@
>  		{
>  			cl_spinlock_release( &p_spl_qp_svc->obj.lock );
>  			p_mad_wr = PARENT_STRUCT( p_list_item, al_mad_wr_t,
> list_item );
> +			irql = KeRaiseIrqlToDpcLevel();

Move this outside the loop, otherwise you'll keep bumping IRQL between the spinlock and the callback.

>  			__complete_send_mad( p_spl_qp_svc->h_mad_disp,
> p_mad_wr,
>  				IB_WCS_WR_FLUSHED_ERR );
> +			KeLowerIrql(irql);

Ditto here.

>  			cl_spinlock_acquire( &p_spl_qp_svc->obj.lock );
>  		}
> 
> 



More information about the ofw mailing list