Lines Matching refs:lp
572 struct esp_lun_data *lp) in esp_alloc_lun_tag() argument
576 if (lp->non_tagged_cmd) in esp_alloc_lun_tag()
579 if (lp->hold) { in esp_alloc_lun_tag()
583 if (lp->num_tagged) in esp_alloc_lun_tag()
589 lp->hold = 0; in esp_alloc_lun_tag()
590 } else if (lp->num_tagged) { in esp_alloc_lun_tag()
594 lp->hold = 1; in esp_alloc_lun_tag()
598 lp->non_tagged_cmd = ent; in esp_alloc_lun_tag()
604 if (lp->non_tagged_cmd || lp->hold) in esp_alloc_lun_tag()
608 BUG_ON(lp->tagged_cmds[ent->orig_tag[1]]); in esp_alloc_lun_tag()
610 lp->tagged_cmds[ent->orig_tag[1]] = ent; in esp_alloc_lun_tag()
611 lp->num_tagged++; in esp_alloc_lun_tag()
617 struct esp_lun_data *lp) in esp_free_lun_tag() argument
620 BUG_ON(lp->tagged_cmds[ent->orig_tag[1]] != ent); in esp_free_lun_tag()
621 lp->tagged_cmds[ent->orig_tag[1]] = NULL; in esp_free_lun_tag()
622 lp->num_tagged--; in esp_free_lun_tag()
624 BUG_ON(lp->non_tagged_cmd != ent); in esp_free_lun_tag()
625 lp->non_tagged_cmd = NULL; in esp_free_lun_tag()
695 struct esp_lun_data *lp = dev->hostdata; in find_and_prep_issuable_command() local
710 if (esp_alloc_lun_tag(ent, lp) < 0) in find_and_prep_issuable_command()
722 struct esp_lun_data *lp; in esp_maybe_execute_command() local
748 lp = dev->hostdata; in esp_maybe_execute_command()
808 if (lp && (tp->flags & ESP_TGT_DISCONNECT) && ent->tag[0]) in esp_maybe_execute_command()
949 struct esp_lun_data *lp = dev->hostdata; in esp_event_queue_full() local
951 scsi_track_queue_full(dev, lp->num_tagged - 1); in esp_event_queue_full()
1048 struct esp_lun_data *lp) in esp_reconnect_with_tag() argument
1053 if (!lp->num_tagged) { in esp_reconnect_with_tag()
1127 ent = lp->tagged_cmds[esp->command_block[1]]; in esp_reconnect_with_tag()
1142 struct esp_lun_data *lp; in esp_reconnect() local
1202 lp = dev->hostdata; in esp_reconnect()
1204 ent = lp->non_tagged_cmd; in esp_reconnect()
1206 ent = esp_reconnect_with_tag(esp, lp); in esp_reconnect()
2062 struct esp_lun_data *lp = dev->hostdata; in esp_clear_hold() local
2064 BUG_ON(lp->num_tagged); in esp_clear_hold()
2065 lp->hold = 0; in esp_clear_hold()
2463 struct esp_lun_data *lp; in esp_slave_alloc() local
2465 lp = kzalloc(sizeof(*lp), GFP_KERNEL); in esp_slave_alloc()
2466 if (!lp) in esp_slave_alloc()
2468 dev->hostdata = lp; in esp_slave_alloc()
2499 struct esp_lun_data *lp = dev->hostdata; in esp_slave_destroy() local
2501 kfree(lp); in esp_slave_destroy()