diff options
author | Randy Dunlap <rdunlap@infradead.org> | 2013-02-22 13:23:54 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-02-24 04:43:11 -0500 |
commit | bf07bdea0d6baea1c8ca9e2dbc278cb85fbc33e2 (patch) | |
tree | 90bc63ff72517cad09821aa80779972d90e4f0f4 /drivers/scsi | |
parent | 6781209e7621a900fe83b3c09b1a02ec1a947c75 (diff) |
[SCSI] scsi: fix lpfc build when wmb() is defined as mb()
On architectures where wmb() is defined as mb(), a build error
happens since there is also a variable named 'mb' in lpfc_sli.c's
lpfc_sli_issue_mbox_s3() function. Rename the variable to 'mbx'
to prevent the build error.
drivers/scsi/lpfc/lpfc_sli.c: error: called object 'mb' is not a function
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 55b6fc83ad71..74b67d98e952 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c | |||
@@ -6644,7 +6644,7 @@ static int | |||
6644 | lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, | 6644 | lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, |
6645 | uint32_t flag) | 6645 | uint32_t flag) |
6646 | { | 6646 | { |
6647 | MAILBOX_t *mb; | 6647 | MAILBOX_t *mbx; |
6648 | struct lpfc_sli *psli = &phba->sli; | 6648 | struct lpfc_sli *psli = &phba->sli; |
6649 | uint32_t status, evtctr; | 6649 | uint32_t status, evtctr; |
6650 | uint32_t ha_copy, hc_copy; | 6650 | uint32_t ha_copy, hc_copy; |
@@ -6698,7 +6698,7 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, | |||
6698 | 6698 | ||
6699 | psli = &phba->sli; | 6699 | psli = &phba->sli; |
6700 | 6700 | ||
6701 | mb = &pmbox->u.mb; | 6701 | mbx = &pmbox->u.mb; |
6702 | status = MBX_SUCCESS; | 6702 | status = MBX_SUCCESS; |
6703 | 6703 | ||
6704 | if (phba->link_state == LPFC_HBA_ERROR) { | 6704 | if (phba->link_state == LPFC_HBA_ERROR) { |
@@ -6713,7 +6713,7 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, | |||
6713 | goto out_not_finished; | 6713 | goto out_not_finished; |
6714 | } | 6714 | } |
6715 | 6715 | ||
6716 | if (mb->mbxCommand != MBX_KILL_BOARD && flag & MBX_NOWAIT) { | 6716 | if (mbx->mbxCommand != MBX_KILL_BOARD && flag & MBX_NOWAIT) { |
6717 | if (lpfc_readl(phba->HCregaddr, &hc_copy) || | 6717 | if (lpfc_readl(phba->HCregaddr, &hc_copy) || |
6718 | !(hc_copy & HC_MBINT_ENA)) { | 6718 | !(hc_copy & HC_MBINT_ENA)) { |
6719 | spin_unlock_irqrestore(&phba->hbalock, drvr_flag); | 6719 | spin_unlock_irqrestore(&phba->hbalock, drvr_flag); |
@@ -6767,7 +6767,7 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, | |||
6767 | "(%d):0308 Mbox cmd issue - BUSY Data: " | 6767 | "(%d):0308 Mbox cmd issue - BUSY Data: " |
6768 | "x%x x%x x%x x%x\n", | 6768 | "x%x x%x x%x x%x\n", |
6769 | pmbox->vport ? pmbox->vport->vpi : 0xffffff, | 6769 | pmbox->vport ? pmbox->vport->vpi : 0xffffff, |
6770 | mb->mbxCommand, phba->pport->port_state, | 6770 | mbx->mbxCommand, phba->pport->port_state, |
6771 | psli->sli_flag, flag); | 6771 | psli->sli_flag, flag); |
6772 | 6772 | ||
6773 | psli->slistat.mbox_busy++; | 6773 | psli->slistat.mbox_busy++; |
@@ -6777,15 +6777,15 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, | |||
6777 | lpfc_debugfs_disc_trc(pmbox->vport, | 6777 | lpfc_debugfs_disc_trc(pmbox->vport, |
6778 | LPFC_DISC_TRC_MBOX_VPORT, | 6778 | LPFC_DISC_TRC_MBOX_VPORT, |
6779 | "MBOX Bsy vport: cmd:x%x mb:x%x x%x", | 6779 | "MBOX Bsy vport: cmd:x%x mb:x%x x%x", |
6780 | (uint32_t)mb->mbxCommand, | 6780 | (uint32_t)mbx->mbxCommand, |
6781 | mb->un.varWords[0], mb->un.varWords[1]); | 6781 | mbx->un.varWords[0], mbx->un.varWords[1]); |
6782 | } | 6782 | } |
6783 | else { | 6783 | else { |
6784 | lpfc_debugfs_disc_trc(phba->pport, | 6784 | lpfc_debugfs_disc_trc(phba->pport, |
6785 | LPFC_DISC_TRC_MBOX, | 6785 | LPFC_DISC_TRC_MBOX, |
6786 | "MBOX Bsy: cmd:x%x mb:x%x x%x", | 6786 | "MBOX Bsy: cmd:x%x mb:x%x x%x", |
6787 | (uint32_t)mb->mbxCommand, | 6787 | (uint32_t)mbx->mbxCommand, |
6788 | mb->un.varWords[0], mb->un.varWords[1]); | 6788 | mbx->un.varWords[0], mbx->un.varWords[1]); |
6789 | } | 6789 | } |
6790 | 6790 | ||
6791 | return MBX_BUSY; | 6791 | return MBX_BUSY; |
@@ -6796,7 +6796,7 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, | |||
6796 | /* If we are not polling, we MUST be in SLI2 mode */ | 6796 | /* If we are not polling, we MUST be in SLI2 mode */ |
6797 | if (flag != MBX_POLL) { | 6797 | if (flag != MBX_POLL) { |
6798 | if (!(psli->sli_flag & LPFC_SLI_ACTIVE) && | 6798 | if (!(psli->sli_flag & LPFC_SLI_ACTIVE) && |
6799 | (mb->mbxCommand != MBX_KILL_BOARD)) { | 6799 | (mbx->mbxCommand != MBX_KILL_BOARD)) { |
6800 | psli->sli_flag &= ~LPFC_SLI_MBOX_ACTIVE; | 6800 | psli->sli_flag &= ~LPFC_SLI_MBOX_ACTIVE; |
6801 | spin_unlock_irqrestore(&phba->hbalock, drvr_flag); | 6801 | spin_unlock_irqrestore(&phba->hbalock, drvr_flag); |
6802 | /* Mbox command <mbxCommand> cannot issue */ | 6802 | /* Mbox command <mbxCommand> cannot issue */ |
@@ -6818,23 +6818,23 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, | |||
6818 | "(%d):0309 Mailbox cmd x%x issue Data: x%x x%x " | 6818 | "(%d):0309 Mailbox cmd x%x issue Data: x%x x%x " |
6819 | "x%x\n", | 6819 | "x%x\n", |
6820 | pmbox->vport ? pmbox->vport->vpi : 0, | 6820 | pmbox->vport ? pmbox->vport->vpi : 0, |
6821 | mb->mbxCommand, phba->pport->port_state, | 6821 | mbx->mbxCommand, phba->pport->port_state, |
6822 | psli->sli_flag, flag); | 6822 | psli->sli_flag, flag); |
6823 | 6823 | ||
6824 | if (mb->mbxCommand != MBX_HEARTBEAT) { | 6824 | if (mbx->mbxCommand != MBX_HEARTBEAT) { |
6825 | if (pmbox->vport) { | 6825 | if (pmbox->vport) { |
6826 | lpfc_debugfs_disc_trc(pmbox->vport, | 6826 | lpfc_debugfs_disc_trc(pmbox->vport, |
6827 | LPFC_DISC_TRC_MBOX_VPORT, | 6827 | LPFC_DISC_TRC_MBOX_VPORT, |
6828 | "MBOX Send vport: cmd:x%x mb:x%x x%x", | 6828 | "MBOX Send vport: cmd:x%x mb:x%x x%x", |
6829 | (uint32_t)mb->mbxCommand, | 6829 | (uint32_t)mbx->mbxCommand, |
6830 | mb->un.varWords[0], mb->un.varWords[1]); | 6830 | mbx->un.varWords[0], mbx->un.varWords[1]); |
6831 | } | 6831 | } |
6832 | else { | 6832 | else { |
6833 | lpfc_debugfs_disc_trc(phba->pport, | 6833 | lpfc_debugfs_disc_trc(phba->pport, |
6834 | LPFC_DISC_TRC_MBOX, | 6834 | LPFC_DISC_TRC_MBOX, |
6835 | "MBOX Send: cmd:x%x mb:x%x x%x", | 6835 | "MBOX Send: cmd:x%x mb:x%x x%x", |
6836 | (uint32_t)mb->mbxCommand, | 6836 | (uint32_t)mbx->mbxCommand, |
6837 | mb->un.varWords[0], mb->un.varWords[1]); | 6837 | mbx->un.varWords[0], mbx->un.varWords[1]); |
6838 | } | 6838 | } |
6839 | } | 6839 | } |
6840 | 6840 | ||
@@ -6842,12 +6842,12 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, | |||
6842 | evtctr = psli->slistat.mbox_event; | 6842 | evtctr = psli->slistat.mbox_event; |
6843 | 6843 | ||
6844 | /* next set own bit for the adapter and copy over command word */ | 6844 | /* next set own bit for the adapter and copy over command word */ |
6845 | mb->mbxOwner = OWN_CHIP; | 6845 | mbx->mbxOwner = OWN_CHIP; |
6846 | 6846 | ||
6847 | if (psli->sli_flag & LPFC_SLI_ACTIVE) { | 6847 | if (psli->sli_flag & LPFC_SLI_ACTIVE) { |
6848 | /* Populate mbox extension offset word. */ | 6848 | /* Populate mbox extension offset word. */ |
6849 | if (pmbox->in_ext_byte_len || pmbox->out_ext_byte_len) { | 6849 | if (pmbox->in_ext_byte_len || pmbox->out_ext_byte_len) { |
6850 | *(((uint32_t *)mb) + pmbox->mbox_offset_word) | 6850 | *(((uint32_t *)mbx) + pmbox->mbox_offset_word) |
6851 | = (uint8_t *)phba->mbox_ext | 6851 | = (uint8_t *)phba->mbox_ext |
6852 | - (uint8_t *)phba->mbox; | 6852 | - (uint8_t *)phba->mbox; |
6853 | } | 6853 | } |
@@ -6859,11 +6859,11 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, | |||
6859 | pmbox->in_ext_byte_len); | 6859 | pmbox->in_ext_byte_len); |
6860 | } | 6860 | } |
6861 | /* Copy command data to host SLIM area */ | 6861 | /* Copy command data to host SLIM area */ |
6862 | lpfc_sli_pcimem_bcopy(mb, phba->mbox, MAILBOX_CMD_SIZE); | 6862 | lpfc_sli_pcimem_bcopy(mbx, phba->mbox, MAILBOX_CMD_SIZE); |
6863 | } else { | 6863 | } else { |
6864 | /* Populate mbox extension offset word. */ | 6864 | /* Populate mbox extension offset word. */ |
6865 | if (pmbox->in_ext_byte_len || pmbox->out_ext_byte_len) | 6865 | if (pmbox->in_ext_byte_len || pmbox->out_ext_byte_len) |
6866 | *(((uint32_t *)mb) + pmbox->mbox_offset_word) | 6866 | *(((uint32_t *)mbx) + pmbox->mbox_offset_word) |
6867 | = MAILBOX_HBA_EXT_OFFSET; | 6867 | = MAILBOX_HBA_EXT_OFFSET; |
6868 | 6868 | ||
6869 | /* Copy the mailbox extension data */ | 6869 | /* Copy the mailbox extension data */ |
@@ -6873,24 +6873,24 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, | |||
6873 | pmbox->context2, pmbox->in_ext_byte_len); | 6873 | pmbox->context2, pmbox->in_ext_byte_len); |
6874 | 6874 | ||
6875 | } | 6875 | } |
6876 | if (mb->mbxCommand == MBX_CONFIG_PORT) { | 6876 | if (mbx->mbxCommand == MBX_CONFIG_PORT) { |
6877 | /* copy command data into host mbox for cmpl */ | 6877 | /* copy command data into host mbox for cmpl */ |
6878 | lpfc_sli_pcimem_bcopy(mb, phba->mbox, MAILBOX_CMD_SIZE); | 6878 | lpfc_sli_pcimem_bcopy(mbx, phba->mbox, MAILBOX_CMD_SIZE); |
6879 | } | 6879 | } |
6880 | 6880 | ||
6881 | /* First copy mbox command data to HBA SLIM, skip past first | 6881 | /* First copy mbox command data to HBA SLIM, skip past first |
6882 | word */ | 6882 | word */ |
6883 | to_slim = phba->MBslimaddr + sizeof (uint32_t); | 6883 | to_slim = phba->MBslimaddr + sizeof (uint32_t); |
6884 | lpfc_memcpy_to_slim(to_slim, &mb->un.varWords[0], | 6884 | lpfc_memcpy_to_slim(to_slim, &mbx->un.varWords[0], |
6885 | MAILBOX_CMD_SIZE - sizeof (uint32_t)); | 6885 | MAILBOX_CMD_SIZE - sizeof (uint32_t)); |
6886 | 6886 | ||
6887 | /* Next copy over first word, with mbxOwner set */ | 6887 | /* Next copy over first word, with mbxOwner set */ |
6888 | ldata = *((uint32_t *)mb); | 6888 | ldata = *((uint32_t *)mbx); |
6889 | to_slim = phba->MBslimaddr; | 6889 | to_slim = phba->MBslimaddr; |
6890 | writel(ldata, to_slim); | 6890 | writel(ldata, to_slim); |
6891 | readl(to_slim); /* flush */ | 6891 | readl(to_slim); /* flush */ |
6892 | 6892 | ||
6893 | if (mb->mbxCommand == MBX_CONFIG_PORT) { | 6893 | if (mbx->mbxCommand == MBX_CONFIG_PORT) { |
6894 | /* switch over to host mailbox */ | 6894 | /* switch over to host mailbox */ |
6895 | psli->sli_flag |= LPFC_SLI_ACTIVE; | 6895 | psli->sli_flag |= LPFC_SLI_ACTIVE; |
6896 | } | 6896 | } |
@@ -6965,7 +6965,7 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, | |||
6965 | /* First copy command data */ | 6965 | /* First copy command data */ |
6966 | word0 = *((uint32_t *)phba->mbox); | 6966 | word0 = *((uint32_t *)phba->mbox); |
6967 | word0 = le32_to_cpu(word0); | 6967 | word0 = le32_to_cpu(word0); |
6968 | if (mb->mbxCommand == MBX_CONFIG_PORT) { | 6968 | if (mbx->mbxCommand == MBX_CONFIG_PORT) { |
6969 | MAILBOX_t *slimmb; | 6969 | MAILBOX_t *slimmb; |
6970 | uint32_t slimword0; | 6970 | uint32_t slimword0; |
6971 | /* Check real SLIM for any errors */ | 6971 | /* Check real SLIM for any errors */ |
@@ -6992,7 +6992,7 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, | |||
6992 | 6992 | ||
6993 | if (psli->sli_flag & LPFC_SLI_ACTIVE) { | 6993 | if (psli->sli_flag & LPFC_SLI_ACTIVE) { |
6994 | /* copy results back to user */ | 6994 | /* copy results back to user */ |
6995 | lpfc_sli_pcimem_bcopy(phba->mbox, mb, MAILBOX_CMD_SIZE); | 6995 | lpfc_sli_pcimem_bcopy(phba->mbox, mbx, MAILBOX_CMD_SIZE); |
6996 | /* Copy the mailbox extension data */ | 6996 | /* Copy the mailbox extension data */ |
6997 | if (pmbox->out_ext_byte_len && pmbox->context2) { | 6997 | if (pmbox->out_ext_byte_len && pmbox->context2) { |
6998 | lpfc_sli_pcimem_bcopy(phba->mbox_ext, | 6998 | lpfc_sli_pcimem_bcopy(phba->mbox_ext, |
@@ -7001,7 +7001,7 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, | |||
7001 | } | 7001 | } |
7002 | } else { | 7002 | } else { |
7003 | /* First copy command data */ | 7003 | /* First copy command data */ |
7004 | lpfc_memcpy_from_slim(mb, phba->MBslimaddr, | 7004 | lpfc_memcpy_from_slim(mbx, phba->MBslimaddr, |
7005 | MAILBOX_CMD_SIZE); | 7005 | MAILBOX_CMD_SIZE); |
7006 | /* Copy the mailbox extension data */ | 7006 | /* Copy the mailbox extension data */ |
7007 | if (pmbox->out_ext_byte_len && pmbox->context2) { | 7007 | if (pmbox->out_ext_byte_len && pmbox->context2) { |
@@ -7016,7 +7016,7 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, | |||
7016 | readl(phba->HAregaddr); /* flush */ | 7016 | readl(phba->HAregaddr); /* flush */ |
7017 | 7017 | ||
7018 | psli->sli_flag &= ~LPFC_SLI_MBOX_ACTIVE; | 7018 | psli->sli_flag &= ~LPFC_SLI_MBOX_ACTIVE; |
7019 | status = mb->mbxStatus; | 7019 | status = mbx->mbxStatus; |
7020 | } | 7020 | } |
7021 | 7021 | ||
7022 | spin_unlock_irqrestore(&phba->hbalock, drvr_flag); | 7022 | spin_unlock_irqrestore(&phba->hbalock, drvr_flag); |