[openfabrics-ewg] Current OFED kernel snapshot - problems in back porting SRP to RH4

Doug Ledford dledford at redhat.com
Tue May 2 14:07:19 PDT 2006


On Tue, May 02, 2006 at 11:30:13AM +0300, Ishai Rabinovitz wrote:
> We have a problem when trying to back port SRP to RH4 U2 and U3 (Actually to 
> any kernel earlier than 2.6.13).
> The problem is when the SCSI driver is calling to eh_abort_handler,
> or to eh_device_reset_handler.
> In the current kernel (starting from 2.6.13) this call is made without 
> host_lock spin-lock locked.
> In the SRP code that performs the abort and the reset (srp_send_tsk_mgmt) we 
> send a message to the target and we wait for a response from the target.
> 
> In early versions of the kernel the SCSI driver performs irq_spinlock_save to 
> the host_lock before calling to the abort or reset handlers.
> This creates a problem: The SRP driver can not go to sleep until the target will
> answer.


static int srp_abort(struct scsi_cmnd *scmnd)
{
	int rv;
        printk(KERN_ERR "SRP abort called\n");

	spin_unlock_irq(scmnd->device->host->host_lock);
        rv = srp_send_tsk_mgmt(scmnd, SRP_TSK_ABORT_TASK);
        spin_lock_irq(scmnd->device->host->host_lock);
	return rv;
}

repeat the same change for srp_reset and srp_reset_host

-- 
  Doug Ledford <dledford at redhat.com>
         Red Hat, Inc. 
         1801 Varsity Dr.
         Raleigh, NC 27606
  



More information about the ewg mailing list