[openib-general] SRP: [PATCH] Releasing the scsi_host when unloading
Ishai Rabinovitz
ishai at mellanox.co.il
Wed May 17 07:55:20 PDT 2006
On Wed, May 17, 2006 at 02:56:58AM +0300, Roland Dreier wrote:
> BTW, I think the patch below is correct as well. This avoids problems
> where the SRP driver waits forever for a completion, for example if
> sending the DREQ fails because the connection has already been
> disconnected by the target.
>
> Does this scenario seem like the deadlock you thought you saw?
>
> --- linux-kernel/infiniband/ulp/srp/ib_srp.c (revision 7245)
> +++ linux-kernel/infiniband/ulp/srp/ib_srp.c (working copy)
> @@ -342,7 +342,10 @@ static void srp_disconnect_target(struct
> /* XXX should send SRP_I_LOGOUT request */
>
> init_completion(&target->done);
> - ib_send_cm_dreq(target->cm_id, NULL, 0);
> + if (ib_send_cm_dreq(target->cm_id, NULL, 0)) {
> + printk(KERN_DEBUG PFX "Sending CM DREQ failed\n");
> + return;
> + }
> wait_for_completion(&target->done);
> }
>
I don't think this caused the deadlock I had.
Still it looks like an important patch.
--
Ishai Rabinovitz
More information about the general
mailing list