mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-21 04:31:26 +00:00
qla2xxx-32gbit: Move qla2x00_set_fcport_state() from a .h into a .c file
The qla2x00_set_fcport_state() function is not in the hot path so move its definition from a .h into a .c file. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8306 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -79,6 +79,7 @@ int qla2x00_post_work(struct scsi_qla_host *vha, struct qla_work_evt *e);
|
||||
extern void *qla2x00_alloc_iocbs_ready(struct qla_qpair *, srb_t *);
|
||||
extern int qla24xx_update_fcport_fcp_prio(scsi_qla_host_t *, fc_port_t *);
|
||||
|
||||
extern void qla2x00_set_fcport_state(fc_port_t *fcport, int state);
|
||||
extern fc_port_t *
|
||||
qla2x00_alloc_fcport(scsi_qla_host_t *, gfp_t );
|
||||
|
||||
|
||||
@@ -4788,6 +4788,24 @@ qla2x00_nvram_config(scsi_qla_host_t *vha)
|
||||
return (rval);
|
||||
}
|
||||
|
||||
void qla2x00_set_fcport_state(fc_port_t *fcport, int state)
|
||||
{
|
||||
int old_state;
|
||||
|
||||
old_state = atomic_read(&fcport->state);
|
||||
atomic_set(&fcport->state, state);
|
||||
|
||||
/* Don't print state transitions during initial allocation of fcport */
|
||||
if (old_state && old_state != state) {
|
||||
ql_dbg(ql_dbg_disc, fcport->vha, 0x207d,
|
||||
"FCPort %s state transitioned from %s to %s - "
|
||||
"portid=%02x%02x%02x.\n", wwn_to_str(fcport->port_name),
|
||||
port_state_str[old_state], port_state_str[state],
|
||||
fcport->d_id.b.domain, fcport->d_id.b.area,
|
||||
fcport->d_id.b.al_pa);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
qla2x00_rport_del(void *data)
|
||||
{
|
||||
|
||||
@@ -126,25 +126,6 @@ static inline const char *wwn_to_str(const u8 port_name[8])
|
||||
return wwn;
|
||||
}
|
||||
|
||||
static inline void
|
||||
qla2x00_set_fcport_state(fc_port_t *fcport, int state)
|
||||
{
|
||||
int old_state;
|
||||
|
||||
old_state = atomic_read(&fcport->state);
|
||||
atomic_set(&fcport->state, state);
|
||||
|
||||
/* Don't print state transitions during initial allocation of fcport */
|
||||
if (old_state && old_state != state) {
|
||||
ql_dbg(ql_dbg_disc, fcport->vha, 0x207d,
|
||||
"FCPort %s state transitioned from %s to %s - "
|
||||
"portid=%02x%02x%02x.\n", wwn_to_str(fcport->port_name),
|
||||
port_state_str[old_state], port_state_str[state],
|
||||
fcport->d_id.b.domain, fcport->d_id.b.area,
|
||||
fcport->d_id.b.al_pa);
|
||||
}
|
||||
}
|
||||
|
||||
static inline int
|
||||
qla2x00_hba_err_chk_enabled(srb_t *sp)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user