Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86969
b: refs/heads/master
c: 024f801
h: refs/heads/master
i:
  86967: 47294e6
v: v3
  • Loading branch information
Mike Christie authored and James Bottomley committed Mar 5, 2008
1 parent 5052752 commit c6acab1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 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: 50a29aec9c47d26e869df83ef1d69e3b63c83bf4
refs/heads/master: 024f801f528220edc89275a724ea00cd18c5ebb7
26 changes: 14 additions & 12 deletions trunk/drivers/scsi/qla4xxx/ql4_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ static int qla4xxx_eh_host_reset(struct scsi_cmnd *cmd);
static int qla4xxx_slave_alloc(struct scsi_device *device);
static int qla4xxx_slave_configure(struct scsi_device *device);
static void qla4xxx_slave_destroy(struct scsi_device *sdev);
static void qla4xxx_scan_start(struct Scsi_Host *shost);

static struct scsi_host_template qla4xxx_driver_template = {
.module = THIS_MODULE,
Expand All @@ -90,6 +91,7 @@ static struct scsi_host_template qla4xxx_driver_template = {
.slave_destroy = qla4xxx_slave_destroy,

.scan_finished = iscsi_scan_finished,
.scan_start = qla4xxx_scan_start,

.this_id = -1,
.cmd_per_lun = 3,
Expand Down Expand Up @@ -299,6 +301,18 @@ struct ddb_entry *qla4xxx_alloc_sess(struct scsi_qla_host *ha)
return ddb_entry;
}

static void qla4xxx_scan_start(struct Scsi_Host *shost)
{
struct scsi_qla_host *ha = shost_priv(shost);
struct ddb_entry *ddb_entry, *ddbtemp;

/* finish setup of sessions that were already setup in firmware */
list_for_each_entry_safe(ddb_entry, ddbtemp, &ha->ddb_list, list) {
if (ddb_entry->fw_ddb_device_state == DDB_DS_SESSION_ACTIVE)
qla4xxx_add_sess(ddb_entry);
}
}

/*
* Timer routines
*/
Expand Down Expand Up @@ -1178,7 +1192,6 @@ static int __devinit qla4xxx_probe_adapter(struct pci_dev *pdev,
int ret = -ENODEV, status;
struct Scsi_Host *host;
struct scsi_qla_host *ha;
struct ddb_entry *ddb_entry, *ddbtemp;
uint8_t init_retry_count = 0;
char buf[34];

Expand Down Expand Up @@ -1297,13 +1310,6 @@ static int __devinit qla4xxx_probe_adapter(struct pci_dev *pdev,
if (ret)
goto probe_failed;

/* Update transport device information for all devices. */
list_for_each_entry_safe(ddb_entry, ddbtemp, &ha->ddb_list, list) {
if (ddb_entry->fw_ddb_device_state == DDB_DS_SESSION_ACTIVE)
if (qla4xxx_add_sess(ddb_entry))
goto remove_host;
}

printk(KERN_INFO
" QLogic iSCSI HBA Driver version: %s\n"
" QLogic ISP%04x @ %s, host#=%ld, fw=%02d.%02d.%02d.%02d\n",
Expand All @@ -1313,10 +1319,6 @@ static int __devinit qla4xxx_probe_adapter(struct pci_dev *pdev,
scsi_scan_host(host);
return 0;

remove_host:
qla4xxx_free_ddb_list(ha);
scsi_remove_host(host);

probe_failed:
qla4xxx_free_adapter(ha);
scsi_host_put(ha->host);
Expand Down

0 comments on commit c6acab1

Please sign in to comment.