Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106556
b: refs/heads/master
c: 711c1d9
h: refs/heads/master
v: v3
  • Loading branch information
Seokmann Ju authored and James Bottomley committed Jul 26, 2008
1 parent 662746c commit 7970d54
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 24 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: 032d8dd739eccbb39c78c901beece70062d1820d
refs/heads/master: 711c1d916be083a5bf4fbc8e66201e7e9f8b9334
6 changes: 0 additions & 6 deletions trunk/drivers/scsi/qla2xxx/qla_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1200,17 +1200,11 @@ qla24xx_vport_create(struct fc_vport *fc_vport, bool disable)
static int
qla24xx_vport_delete(struct fc_vport *fc_vport)
{
scsi_qla_host_t *ha = shost_priv(fc_vport->shost);
scsi_qla_host_t *vha = fc_vport->dd_data;

qla24xx_disable_vp(vha);
qla24xx_deallocate_vp_id(vha);

mutex_lock(&ha->vport_lock);
ha->cur_vport_count--;
clear_bit(vha->vp_idx, ha->vp_idx_map);
mutex_unlock(&ha->vport_lock);

kfree(vha->node_name);
kfree(vha->port_name);

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/scsi/qla2xxx/qla_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -2170,7 +2170,6 @@ typedef struct scsi_qla_host {
struct pci_dev *pdev;

unsigned long host_no;
unsigned long instance;

volatile struct {
uint32_t init_done :1;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/scsi/qla2xxx/qla_gbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ extern int ql2xfdmienable;
extern int ql2xallocfwdump;
extern int ql2xextended_error_logging;
extern int ql2xqfullrampup;
extern int num_hosts;

extern int qla2x00_loop_reset(scsi_qla_host_t *);
extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int);
Expand Down
11 changes: 3 additions & 8 deletions trunk/drivers/scsi/qla2xxx/qla_mid.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ qla24xx_allocate_vp_id(scsi_qla_host_t *vha)

set_bit(vp_id, ha->vp_idx_map);
ha->num_vhosts++;
ha->cur_vport_count++;
vha->vp_idx = vp_id;
list_add_tail(&vha->vp_list, &ha->vp_list);
mutex_unlock(&ha->vport_lock);
Expand All @@ -58,6 +59,7 @@ qla24xx_deallocate_vp_id(scsi_qla_host_t *vha)
mutex_lock(&ha->vport_lock);
vp_id = vha->vp_idx;
ha->num_vhosts--;
ha->cur_vport_count--;
clear_bit(vp_id, ha->vp_idx_map);
list_del(&vha->vp_list);
mutex_unlock(&ha->vport_lock);
Expand Down Expand Up @@ -390,7 +392,6 @@ qla24xx_create_vhost(struct fc_vport *fc_vport)
vha->parent = ha;
vha->fc_vport = fc_vport;
vha->device_flags = 0;
vha->instance = num_hosts;
vha->vp_idx = qla24xx_allocate_vp_id(vha);
if (vha->vp_idx > ha->max_npiv_vports) {
DEBUG15(printk("scsi(%ld): Couldn't allocate vp_id.\n",
Expand Down Expand Up @@ -428,20 +429,14 @@ qla24xx_create_vhost(struct fc_vport *fc_vport)
host->max_cmd_len = MAX_CMDSZ;
host->max_channel = MAX_BUSES - 1;
host->max_lun = MAX_LUNS;
host->unique_id = vha->instance;
host->unique_id = host->host_no;
host->max_id = MAX_TARGETS_2200;
host->transportt = qla2xxx_transport_vport_template;

DEBUG15(printk("DEBUG: detect vport hba %ld at address = %p\n",
vha->host_no, vha));

vha->flags.init_done = 1;
num_hosts++;

mutex_lock(&ha->vport_lock);
set_bit(vha->vp_idx, ha->vp_idx_map);
ha->cur_vport_count++;
mutex_unlock(&ha->vport_lock);

return vha;

Expand Down
8 changes: 1 addition & 7 deletions trunk/drivers/scsi/qla2xxx/qla_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ char qla2x00_version_str[40];
*/
static struct kmem_cache *srb_cachep;

int num_hosts;
int ql2xlogintimeout = 20;
module_param(ql2xlogintimeout, int, S_IRUGO|S_IRUSR);
MODULE_PARM_DESC(ql2xlogintimeout,
Expand Down Expand Up @@ -1663,9 +1662,6 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
}
host->can_queue = ha->request_q_length + 128;

/* load the F/W, read paramaters, and init the H/W */
ha->instance = num_hosts;

mutex_init(&ha->vport_lock);
init_completion(&ha->mbx_cmd_comp);
complete(&ha->mbx_cmd_comp);
Expand Down Expand Up @@ -1713,7 +1709,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)

host->this_id = 255;
host->cmd_per_lun = 3;
host->unique_id = ha->instance;
host->unique_id = host->host_no;
host->max_cmd_len = MAX_CMDSZ;
host->max_channel = MAX_BUSES - 1;
host->max_lun = MAX_LUNS;
Expand All @@ -1734,8 +1730,6 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
ha->flags.init_done = 1;
ha->flags.online = 1;

num_hosts++;

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

0 comments on commit 7970d54

Please sign in to comment.