Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 89764
b: refs/heads/master
c: 97eab63
h: refs/heads/master
v: v3
  • Loading branch information
James Smart authored and James Bottomley committed Apr 10, 2008
1 parent af75733 commit fbc7a97
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 87 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9b37960523afb1b519b406dec4c4f3155b82b2ba
refs/heads/master: 97eab63490452f0a5242fa94ddaa9b727d69cb25
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/lpfc/lpfc.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

struct lpfc_sli2_slim;

#define LPFC_MAX_TARGET 256 /* max number of targets supported */
#define LPFC_MAX_TARGET 4096 /* max number of targets supported */
#define LPFC_MAX_DISC_THREADS 64 /* max outstanding discovery els
requests */
#define LPFC_MAX_NS_RETRY 3 /* Number of retry attempts to contact
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/scsi/lpfc/lpfc_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1954,7 +1954,9 @@ sysfs_mbox_read(struct kobject *kobj, struct bin_attribute *bin_attr,
(phba->sysfs_mbox.mbox->mb.mbxCommand !=
MBX_DUMP_MEMORY &&
phba->sysfs_mbox.mbox->mb.mbxCommand !=
MBX_RESTART)) {
MBX_RESTART &&
phba->sysfs_mbox.mbox->mb.mbxCommand !=
MBX_WRITE_VPARMS)) {
sysfs_mbox_idle(phba);
spin_unlock_irq(&phba->hbalock);
return -EPERM;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/lpfc/lpfc_ct.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ lpfc_ct_ignore_hbq_buffer(struct lpfc_hba *phba, struct lpfc_iocbq *piocbq,
{
if (!mp) {
lpfc_printf_log(phba, KERN_INFO, LOG_ELS,
"0146 Ignoring unsolicted CT No HBQ "
"0146 Ignoring unsolicited CT No HBQ "
"status = x%x\n",
piocbq->iocb.ulpStatus);
}
Expand Down
36 changes: 0 additions & 36 deletions trunk/drivers/scsi/lpfc/lpfc_els.c
Original file line number Diff line number Diff line change
Expand Up @@ -5097,39 +5097,3 @@ void lpfc_fabric_abort_hba(struct lpfc_hba *phba)
(piocb->iocb_cmpl) (phba, piocb, piocb);
}
}


#if 0
void lpfc_fabric_abort_flogi(struct lpfc_hba *phba)
{
LIST_HEAD(completions);
struct lpfc_iocbq *tmp_iocb, *piocb;
IOCB_t *cmd;
struct lpfc_nodelist *ndlp;

spin_lock_irq(&phba->hbalock);
list_for_each_entry_safe(piocb, tmp_iocb, &phba->fabric_iocb_list,
list) {

cmd = &piocb->iocb;
ndlp = (struct lpfc_nodelist *) piocb->context1;
if (cmd->ulpCommand == CMD_ELS_REQUEST64_CR &&
ndlp != NULL &&
ndlp->nlp_DID == Fabric_DID)
list_move_tail(&piocb->list, &completions);
}
spin_unlock_irq(&phba->hbalock);

while (!list_empty(&completions)) {
piocb = list_get_first(&completions, struct lpfc_iocbq, list);
list_del_init(&piocb->list);

cmd = &piocb->iocb;
cmd->ulpStatus = IOSTAT_LOCAL_REJECT;
cmd->un.ulpWord[4] = IOERR_SLI_ABORTED;
(piocb->iocb_cmpl) (phba, piocb, piocb);
}
}
#endif /* 0 */


32 changes: 0 additions & 32 deletions trunk/drivers/scsi/lpfc/lpfc_hbadisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2948,24 +2948,6 @@ __lpfc_find_node(struct lpfc_vport *vport, node_filter filter, void *param)
return NULL;
}

#if 0
/*
* Search node lists for a remote port matching filter criteria
* Caller needs to hold host_lock before calling this routine.
*/
struct lpfc_nodelist *
lpfc_find_node(struct lpfc_vport *vport, node_filter filter, void *param)
{
struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
struct lpfc_nodelist *ndlp;

spin_lock_irq(shost->host_lock);
ndlp = __lpfc_find_node(vport, filter, param);
spin_unlock_irq(shost->host_lock);
return ndlp;
}
#endif /* 0 */

/*
* This routine looks up the ndlp lists for the given RPI. If rpi found it
* returns the node list element pointer else return NULL.
Expand All @@ -2976,20 +2958,6 @@ __lpfc_findnode_rpi(struct lpfc_vport *vport, uint16_t rpi)
return __lpfc_find_node(vport, lpfc_filter_by_rpi, &rpi);
}

#if 0
struct lpfc_nodelist *
lpfc_findnode_rpi(struct lpfc_vport *vport, uint16_t rpi)
{
struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
struct lpfc_nodelist *ndlp;

spin_lock_irq(shost->host_lock);
ndlp = __lpfc_findnode_rpi(vport, rpi);
spin_unlock_irq(shost->host_lock);
return ndlp;
}
#endif /* 0 */

/*
* This routine looks up the ndlp lists for the given WWPN. If WWPN found it
* returns the node element list pointer else return NULL.
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/scsi/lpfc/lpfc_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -729,8 +729,7 @@ lpfc_handle_eratt(struct lpfc_hba *phba)
if (!phba->cfg_enable_hba_reset)
return;

if (phba->work_hs & HS_FFER6 ||
phba->work_hs & HS_FFER5) {
if (phba->work_hs & HS_FFER6) {
/* Re-establishing Link */
lpfc_printf_log(phba, KERN_INFO, LOG_LINK_EVENT,
"1301 Re-establishing Link "
Expand Down
8 changes: 6 additions & 2 deletions trunk/drivers/scsi/lpfc/lpfc_scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ lpfc_ramp_up_queue_handler(struct lpfc_hba *phba)
for(i = 0; i <= phba->max_vpi && vports[i] != NULL; i++) {
shost = lpfc_shost_from_vport(vports[i]);
shost_for_each_device(sdev, shost) {
if (vports[i]->cfg_lun_queue_depth <=
sdev->queue_depth)
continue;
if (sdev->ordered_tags)
scsi_adjust_queue_depth(sdev,
MSG_ORDERED_TAG,
Expand Down Expand Up @@ -606,6 +609,9 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
result = cmd->result;
sdev = cmd->device;
lpfc_scsi_unprep_dma_buf(phba, lpfc_cmd);
spin_lock_irqsave(sdev->host->host_lock, flags);
lpfc_cmd->pCmd = NULL; /* This must be done before scsi_done */
spin_unlock_irqrestore(sdev->host->host_lock, flags);
cmd->scsi_done(cmd);

if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) {
Expand All @@ -614,7 +620,6 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
* wake up the thread.
*/
spin_lock_irqsave(sdev->host->host_lock, flags);
lpfc_cmd->pCmd = NULL;
if (lpfc_cmd->waitq)
wake_up(lpfc_cmd->waitq);
spin_unlock_irqrestore(sdev->host->host_lock, flags);
Expand Down Expand Up @@ -685,7 +690,6 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
* wake up the thread.
*/
spin_lock_irqsave(sdev->host->host_lock, flags);
lpfc_cmd->pCmd = NULL;
if (lpfc_cmd->waitq)
wake_up(lpfc_cmd->waitq);
spin_unlock_irqrestore(sdev->host->host_lock, flags);
Expand Down
20 changes: 9 additions & 11 deletions trunk/drivers/scsi/lpfc/lpfc_sli.c
Original file line number Diff line number Diff line change
Expand Up @@ -3481,26 +3481,21 @@ lpfc_sli_hba_down(struct lpfc_hba *phba)
phba->pport->work_port_events &= ~WORKER_MBOX_TMO;
spin_unlock(&phba->pport->work_port_lock);

/* Return any pending or completed mbox cmds */
list_splice_init(&phba->sli.mboxq, &completions);
if (psli->mbox_active) {
list_add_tail(&psli->mbox_active->list, &completions);
psli->mbox_active = NULL;
psli->sli_flag &= ~LPFC_SLI_MBOX_ACTIVE;
}

/* Return any pending or completed mbox cmds */
list_splice_init(&phba->sli.mboxq, &completions);
list_splice_init(&phba->sli.mboxq_cmpl, &completions);
INIT_LIST_HEAD(&psli->mboxq);
INIT_LIST_HEAD(&psli->mboxq_cmpl);

spin_unlock_irqrestore(&phba->hbalock, flags);

while (!list_empty(&completions)) {
list_remove_head(&completions, pmb, LPFC_MBOXQ_t, list);
pmb->mb.mbxStatus = MBX_NOT_FINISHED;
if (pmb->mbox_cmpl) {
if (pmb->mbox_cmpl)
pmb->mbox_cmpl(phba,pmb);
}
}
return 1;
}
Expand Down Expand Up @@ -4201,6 +4196,7 @@ lpfc_intr_handler(int irq, void *dev_id)
phba->pport->stopped = 1;
}

spin_lock(&phba->hbalock);
if ((work_ha_copy & HA_MBATT) &&
(phba->sli.mbox_active)) {
pmb = phba->sli.mbox_active;
Expand All @@ -4211,6 +4207,7 @@ lpfc_intr_handler(int irq, void *dev_id)
/* First check out the status word */
lpfc_sli_pcimem_bcopy(mbox, pmbox, sizeof(uint32_t));
if (pmbox->mbxOwner != OWN_HOST) {
spin_unlock(&phba->hbalock);
/*
* Stray Mailbox Interrupt, mbxCommand <cmd>
* mbxStatus <status>
Expand All @@ -4226,10 +4223,10 @@ lpfc_intr_handler(int irq, void *dev_id)
/* clear mailbox attention bit */
work_ha_copy &= ~HA_MBATT;
} else {
phba->sli.mbox_active = NULL;
spin_unlock(&phba->hbalock);
phba->last_completion_time = jiffies;
del_timer(&phba->sli.mbox_tmo);

phba->sli.mbox_active = NULL;
if (pmb->mbox_cmpl) {
lpfc_sli_pcimem_bcopy(mbox, pmbox,
MAILBOX_CMD_SIZE);
Expand Down Expand Up @@ -4282,7 +4279,8 @@ lpfc_intr_handler(int irq, void *dev_id)
spin_unlock(&phba->pport->work_port_lock);
lpfc_mbox_cmpl_put(phba, pmb);
}
}
} else
spin_unlock(&phba->hbalock);
if ((work_ha_copy & HA_MBATT) &&
(phba->sli.mbox_active == NULL)) {
send_current_mbox:
Expand Down

0 comments on commit fbc7a97

Please sign in to comment.