Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84402
b: refs/heads/master
c: da4541b
h: refs/heads/master
v: v3
  • Loading branch information
Seokmann Ju authored and James Bottomley committed Feb 8, 2008
1 parent de5ca77 commit 846f6f5
Show file tree
Hide file tree
Showing 4 changed files with 15 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: 99363ef81cc7d0bab275304b8d34cf71d189cdcc
refs/heads/master: da4541b63bbe9a945d7bbc1105f2deacc42ef195
11 changes: 7 additions & 4 deletions trunk/drivers/scsi/qla2xxx/qla_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ qla2x00_get_host_port_id(struct Scsi_Host *shost)
static void
qla2x00_get_host_speed(struct Scsi_Host *shost)
{
scsi_qla_host_t *ha = shost_priv(shost);
scsi_qla_host_t *ha = to_qla_parent(shost_priv(shost));
uint32_t speed = 0;

switch (ha->link_data_rate) {
Expand All @@ -861,14 +861,17 @@ qla2x00_get_host_speed(struct Scsi_Host *shost)
case PORT_SPEED_4GB:
speed = 4;
break;
case PORT_SPEED_8GB:
speed = 8;
break;
}
fc_host_speed(shost) = speed;
}

static void
qla2x00_get_host_port_type(struct Scsi_Host *shost)
{
scsi_qla_host_t *ha = shost_priv(shost);
scsi_qla_host_t *ha = to_qla_parent(shost_priv(shost));
uint32_t port_type = FC_PORTTYPE_UNKNOWN;

switch (ha->current_topology) {
Expand Down Expand Up @@ -978,7 +981,7 @@ qla2x00_issue_lip(struct Scsi_Host *shost)
static struct fc_host_statistics *
qla2x00_get_fc_host_stats(struct Scsi_Host *shost)
{
scsi_qla_host_t *ha = shost_priv(shost);
scsi_qla_host_t *ha = to_qla_parent(shost_priv(shost));
int rval;
struct link_statistics *stats;
dma_addr_t stats_dma;
Expand Down Expand Up @@ -1062,7 +1065,7 @@ qla2x00_get_host_fabric_name(struct Scsi_Host *shost)
static void
qla2x00_get_host_port_state(struct Scsi_Host *shost)
{
scsi_qla_host_t *ha = shost_priv(shost);
scsi_qla_host_t *ha = to_qla_parent(shost_priv(shost));

if (!ha->flags.online)
fc_host_port_state(shost) = FC_PORTSTATE_OFFLINE;
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/scsi/qla2xxx/qla_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -2041,8 +2041,6 @@ typedef struct vport_params {
#define VP_RET_CODE_NO_MEM 5
#define VP_RET_CODE_NOT_FOUND 6

#define to_qla_parent(x) (((x)->parent) ? (x)->parent : (x))

/*
* ISP operations
*/
Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/scsi/qla2xxx/qla_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ static __inline__ void qla2x00_check_fabric_devices(scsi_qla_host_t *ha)
qla2x00_get_firmware_state(ha, &fw_state);
}

static __inline__ scsi_qla_host_t * to_qla_parent(scsi_qla_host_t *);
static __inline__ scsi_qla_host_t *
to_qla_parent(scsi_qla_host_t *ha)
{
return ha->parent ? ha->parent : ha;
}

/**
* qla2x00_issue_marker() - Issue a Marker IOCB if necessary.
* @ha: HA context
Expand Down

0 comments on commit 846f6f5

Please sign in to comment.