Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33574
b: refs/heads/master
c: 8f6d98d
h: refs/heads/master
v: v3
  • Loading branch information
James Smart authored and James Bottomley committed Aug 6, 2006
1 parent af61b4f commit 739a4b8
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 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: 1c067a42413c4f39c907443b8f5979cd4d82f0ff
refs/heads/master: 8f6d98d2e05c38cb08fbda5e38e5f87d361c3cac
6 changes: 3 additions & 3 deletions trunk/drivers/scsi/lpfc/lpfc_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ sysfs_mbox_write(struct kobject *kobj, char *buf, loff_t off, size_t count)
phba->sysfs_mbox.mbox == NULL ) {
sysfs_mbox_idle(phba);
spin_unlock_irq(host->host_lock);
return -EINVAL;
return -EAGAIN;
}
}

Expand Down Expand Up @@ -1008,7 +1008,7 @@ sysfs_mbox_read(struct kobject *kobj, char *buf, loff_t off, size_t count)
if (rc != MBX_SUCCESS) {
sysfs_mbox_idle(phba);
spin_unlock_irq(host->host_lock);
return -ENODEV;
return (rc == MBX_TIMEOUT) ? -ETIME : -ENODEV;
}
phba->sysfs_mbox.state = SMBOX_READING;
}
Expand All @@ -1017,7 +1017,7 @@ sysfs_mbox_read(struct kobject *kobj, char *buf, loff_t off, size_t count)
printk(KERN_WARNING "mbox_read: Bad State\n");
sysfs_mbox_idle(phba);
spin_unlock_irq(host->host_lock);
return -EINVAL;
return -EAGAIN;
}

memcpy(buf, (uint8_t *) & phba->sysfs_mbox.mbox->mb + off, count);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/scsi/lpfc/lpfc_ct.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ lpfc_ct_unsol_event(struct lpfc_hba * phba,
}

ct_unsol_event_exit_piocbq:
list_del(&head);
if (pmbuf) {
list_for_each_entry_safe(matp, next_matp, &pmbuf->list, list) {
lpfc_mbuf_free(phba, matp->virt, matp->phys);
Expand Down
12 changes: 11 additions & 1 deletion trunk/drivers/scsi/lpfc/lpfc_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1616,7 +1616,11 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid)
goto out_free_iocbq;
}

/* We can rely on a queue depth attribute only after SLI HBA setup */
/*
* Set initial can_queue value since 0 is no longer supported and
* scsi_add_host will fail. This will be adjusted later based on the
* max xri value determined in hba setup.
*/
host->can_queue = phba->cfg_hba_queue_depth - 10;

/* Tell the midlayer we support 16 byte commands */
Expand Down Expand Up @@ -1656,6 +1660,12 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid)
goto out_free_irq;
}

/*
* hba setup may have changed the hba_queue_depth so we need to adjust
* the value of can_queue.
*/
host->can_queue = phba->cfg_hba_queue_depth - 10;

lpfc_discovery_wait(phba);

if (phba->cfg_poll & DISABLE_FCP_RING_INT) {
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/scsi/lpfc/lpfc_sli.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,8 @@ lpfc_sli_next_iotag(struct lpfc_hba * phba, struct lpfc_iocbq * iocbq)
kfree(old_arr);
return iotag;
}
}
} else
spin_unlock_irq(phba->host->host_lock);

lpfc_printf_log(phba, KERN_ERR,LOG_SLI,
"%d:0318 Failed to allocate IOTAG.last IOTAG is %d\n",
Expand Down Expand Up @@ -1399,11 +1400,11 @@ lpfc_sli_handle_slow_ring_event(struct lpfc_hba * phba,
next_iocb,
&saveq->list,
list) {
list_del(&rspiocbp->list);
lpfc_sli_release_iocbq(phba,
rspiocbp);
}
}

lpfc_sli_release_iocbq(phba, saveq);
}
}
Expand Down

0 comments on commit 739a4b8

Please sign in to comment.