Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1958
b: refs/heads/master
c: bb011b8
h: refs/heads/master
v: v3
  • Loading branch information
David Brownell authored and Russell King committed Jun 12, 2005
1 parent c14fb1f commit c05d73a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 30 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: a1541d5af66d02426655b1498f814c52347dd7d3
refs/heads/master: bb011b8e8eded247cb71cb6d10e47517aacbd542
4 changes: 3 additions & 1 deletion trunk/arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,9 @@ source "drivers/block/Kconfig"

source "drivers/acorn/block/Kconfig"

if ARCH_CLPS7500 || ARCH_IOP3XX || ARCH_IXP4XX || ARCH_L7200 || ARCH_LH7A40X || ARCH_PXA || ARCH_RPC || ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE
if PCMCIA || ARCH_CLPS7500 || ARCH_IOP3XX || ARCH_IXP4XX \
|| ARCH_L7200 || ARCH_LH7A40X || ARCH_PXA || ARCH_RPC \
|| ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE
source "drivers/ide/Kconfig"
endif

Expand Down
55 changes: 27 additions & 28 deletions trunk/drivers/scsi/qla2xxx/qla_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ qla2x00_iospace_config(scsi_qla_host_t *ha)
*/
int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)
{
int ret = -ENODEV;
int ret;
device_reg_t __iomem *reg;
struct Scsi_Host *host;
scsi_qla_host_t *ha;
Expand All @@ -1161,7 +1161,7 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)
fc_port_t *fcport;

if (pci_enable_device(pdev))
goto probe_out;
return -1;

host = scsi_host_alloc(&qla2x00_driver_template,
sizeof(scsi_qla_host_t));
Expand All @@ -1183,8 +1183,9 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)

/* Configure PCI I/O space */
ret = qla2x00_iospace_config(ha);
if (ret)
goto probe_failed;
if (ret != 0) {
goto probe_alloc_failed;
}

/* Sanitize the information from PCI BIOS. */
host->irq = pdev->irq;
Expand Down Expand Up @@ -1257,10 +1258,23 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)
qla_printk(KERN_WARNING, ha,
"[ERROR] Failed to allocate memory for adapter\n");

ret = -ENOMEM;
goto probe_failed;
goto probe_alloc_failed;
}

pci_set_drvdata(pdev, ha);
host->this_id = 255;
host->cmd_per_lun = 3;
host->unique_id = ha->instance;
host->max_cmd_len = MAX_CMDSZ;
host->max_channel = ha->ports - 1;
host->max_id = ha->max_targets;
host->max_lun = ha->max_luns;
host->transportt = qla2xxx_transport_template;
if (scsi_add_host(host, &pdev->dev))
goto probe_alloc_failed;

qla2x00_alloc_sysfs_attr(ha);

if (qla2x00_initialize_adapter(ha) &&
!(ha->device_flags & DFLG_NO_CABLE)) {

Expand All @@ -1271,10 +1285,11 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)
"Adapter flags %x.\n",
ha->host_no, ha->device_flags));

ret = -ENODEV;
goto probe_failed;
}

qla2x00_init_host_attr(ha);

/*
* Startup the kernel thread for this host adapter
*/
Expand All @@ -1284,26 +1299,17 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)
qla_printk(KERN_WARNING, ha,
"Unable to start DPC thread!\n");

ret = -ENODEV;
goto probe_failed;
}
wait_for_completion(&ha->dpc_inited);

host->this_id = 255;
host->cmd_per_lun = 3;
host->unique_id = ha->instance;
host->max_cmd_len = MAX_CMDSZ;
host->max_channel = ha->ports - 1;
host->max_lun = MAX_LUNS;
host->transportt = qla2xxx_transport_template;

if (IS_QLA2100(ha) || IS_QLA2200(ha))
ret = request_irq(host->irq, qla2100_intr_handler,
SA_INTERRUPT|SA_SHIRQ, ha->brd_info->drv_name, ha);
else
ret = request_irq(host->irq, qla2300_intr_handler,
SA_INTERRUPT|SA_SHIRQ, ha->brd_info->drv_name, ha);
if (ret) {
if (ret != 0) {
qla_printk(KERN_WARNING, ha,
"Failed to reserve interrupt %d already in use.\n",
host->irq);
Expand Down Expand Up @@ -1357,18 +1363,9 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)
msleep(10);
}

pci_set_drvdata(pdev, ha);
ha->flags.init_done = 1;
num_hosts++;

ret = scsi_add_host(host, &pdev->dev);
if (ret)
goto probe_failed;

qla2x00_alloc_sysfs_attr(ha);

qla2x00_init_host_attr(ha);

qla_printk(KERN_INFO, ha, "\n"
" QLogic Fibre Channel HBA Driver: %s\n"
" QLogic %s - %s\n"
Expand All @@ -1387,15 +1384,17 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)
probe_failed:
fc_remove_host(ha->host);

scsi_remove_host(host);

probe_alloc_failed:
qla2x00_free_device(ha);

scsi_host_put(host);

probe_disable_device:
pci_disable_device(pdev);

probe_out:
return ret;
return -1;
}
EXPORT_SYMBOL_GPL(qla2x00_probe_one);

Expand Down

0 comments on commit c05d73a

Please sign in to comment.