Vasu Dev wrote:
> Added fc_fcp_pkt_destory() and used this as exch destructor callback.
>
> Added extra fsp pkt hold when sending fsp with new exchange and
> later same hold is released by fc_fcp_pkt_destory() to free fsp pkt
> along with exch free.
>
> I've done some testing with this patch. The fsp pkt tracking is
> looking good in my testing but in some cases I couldn't unload fcoe stack.
> This could be un-related to this patch but will ensure that this is not
> due to this patch with some more testing before committing this patch.
>
> Signed-off-by: Vasu Dev <[EMAIL PROTECTED]>
> ---
>
> drivers/scsi/libfc/fc_fcp.c | 34 +++++++++++++++++++++++-----------
> 1 files changed, 23 insertions(+), 11 deletions(-)
>
>
> diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
> index 358a26b..0201cfe 100644
> --- a/drivers/scsi/libfc/fc_fcp.c
> +++ b/drivers/scsi/libfc/fc_fcp.c
> @@ -232,6 +232,23 @@ static void fc_fcp_pkt_hold(struct fc_fcp_pkt *sp)
> }
>
> /**
> + * fc_fcp_pkt_destory - release hold on scsi_pkt packet
> + *
> + * @sp: exchange sequence
> + * @fsp: fcp packet struct
> + *
> + * Release hold on scsi_pkt packet set to keep scsi_pkt
> + * till EM layer exch resource is not freed.
> + * Context : called from from EM layer.
> + * no locking required
> + */
> +static void fc_fcp_pkt_destroy(struct fc_seq *sp, void *arg)
> +{
> + struct fc_fcp_pkt *fsp = arg;
> + fc_fcp_pkt_release(fsp);
you can just pass arg right to fc_fcp_pkt_release because arg is void.
Looks ok to me.
_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel