@@ -742,7 +742,7 @@ mpt3sas_halt_firmware(struct MPT3SAS_ADAPTER *ioc)
742
742
743
743
dump_stack ();
744
744
745
- doorbell = readl (& ioc -> chip -> Doorbell );
745
+ doorbell = ioc -> base_readl (& ioc -> chip -> Doorbell );
746
746
if ((doorbell & MPI2_IOC_STATE_MASK ) == MPI2_IOC_STATE_FAULT )
747
747
mpt3sas_base_fault_info (ioc , doorbell );
748
748
else {
@@ -1351,10 +1351,10 @@ _base_mask_interrupts(struct MPT3SAS_ADAPTER *ioc)
1351
1351
u32 him_register ;
1352
1352
1353
1353
ioc -> mask_interrupts = 1 ;
1354
- him_register = readl (& ioc -> chip -> HostInterruptMask );
1354
+ him_register = ioc -> base_readl (& ioc -> chip -> HostInterruptMask );
1355
1355
him_register |= MPI2_HIM_DIM + MPI2_HIM_RIM + MPI2_HIM_RESET_IRQ_MASK ;
1356
1356
writel (him_register , & ioc -> chip -> HostInterruptMask );
1357
- readl (& ioc -> chip -> HostInterruptMask );
1357
+ ioc -> base_readl (& ioc -> chip -> HostInterruptMask );
1358
1358
}
1359
1359
1360
1360
/**
@@ -1368,7 +1368,7 @@ _base_unmask_interrupts(struct MPT3SAS_ADAPTER *ioc)
1368
1368
{
1369
1369
u32 him_register ;
1370
1370
1371
- him_register = readl (& ioc -> chip -> HostInterruptMask );
1371
+ him_register = ioc -> base_readl (& ioc -> chip -> HostInterruptMask );
1372
1372
him_register &= ~MPI2_HIM_RIM ;
1373
1373
writel (him_register , & ioc -> chip -> HostInterruptMask );
1374
1374
ioc -> mask_interrupts = 0 ;
@@ -4880,7 +4880,7 @@ mpt3sas_base_get_iocstate(struct MPT3SAS_ADAPTER *ioc, int cooked)
4880
4880
{
4881
4881
u32 s , sc ;
4882
4882
4883
- s = readl (& ioc -> chip -> Doorbell );
4883
+ s = ioc -> base_readl (& ioc -> chip -> Doorbell );
4884
4884
sc = s & MPI2_IOC_STATE_MASK ;
4885
4885
return cooked ? sc : s ;
4886
4886
}
@@ -4936,7 +4936,7 @@ _base_wait_for_doorbell_int(struct MPT3SAS_ADAPTER *ioc, int timeout)
4936
4936
count = 0 ;
4937
4937
cntdn = 1000 * timeout ;
4938
4938
do {
4939
- int_status = readl (& ioc -> chip -> HostInterruptStatus );
4939
+ int_status = ioc -> base_readl (& ioc -> chip -> HostInterruptStatus );
4940
4940
if (int_status & MPI2_HIS_IOC2SYS_DB_STATUS ) {
4941
4941
dhsprintk (ioc ,
4942
4942
ioc_info (ioc , "%s: successful count(%d), timeout(%d)\n" ,
@@ -4962,7 +4962,7 @@ _base_spin_on_doorbell_int(struct MPT3SAS_ADAPTER *ioc, int timeout)
4962
4962
count = 0 ;
4963
4963
cntdn = 2000 * timeout ;
4964
4964
do {
4965
- int_status = readl (& ioc -> chip -> HostInterruptStatus );
4965
+ int_status = ioc -> base_readl (& ioc -> chip -> HostInterruptStatus );
4966
4966
if (int_status & MPI2_HIS_IOC2SYS_DB_STATUS ) {
4967
4967
dhsprintk (ioc ,
4968
4968
ioc_info (ioc , "%s: successful count(%d), timeout(%d)\n" ,
@@ -5000,14 +5000,14 @@ _base_wait_for_doorbell_ack(struct MPT3SAS_ADAPTER *ioc, int timeout)
5000
5000
count = 0 ;
5001
5001
cntdn = 1000 * timeout ;
5002
5002
do {
5003
- int_status = readl (& ioc -> chip -> HostInterruptStatus );
5003
+ int_status = ioc -> base_readl (& ioc -> chip -> HostInterruptStatus );
5004
5004
if (!(int_status & MPI2_HIS_SYS2IOC_DB_STATUS )) {
5005
5005
dhsprintk (ioc ,
5006
5006
ioc_info (ioc , "%s: successful count(%d), timeout(%d)\n" ,
5007
5007
__func__ , count , timeout ));
5008
5008
return 0 ;
5009
5009
} else if (int_status & MPI2_HIS_IOC2SYS_DB_STATUS ) {
5010
- doorbell = readl (& ioc -> chip -> Doorbell );
5010
+ doorbell = ioc -> base_readl (& ioc -> chip -> Doorbell );
5011
5011
if ((doorbell & MPI2_IOC_STATE_MASK ) ==
5012
5012
MPI2_IOC_STATE_FAULT ) {
5013
5013
mpt3sas_base_fault_info (ioc , doorbell );
@@ -5042,7 +5042,7 @@ _base_wait_for_doorbell_not_used(struct MPT3SAS_ADAPTER *ioc, int timeout)
5042
5042
count = 0 ;
5043
5043
cntdn = 1000 * timeout ;
5044
5044
do {
5045
- doorbell_reg = readl (& ioc -> chip -> Doorbell );
5045
+ doorbell_reg = ioc -> base_readl (& ioc -> chip -> Doorbell );
5046
5046
if (!(doorbell_reg & MPI2_DOORBELL_USED )) {
5047
5047
dhsprintk (ioc ,
5048
5048
ioc_info (ioc , "%s: successful count(%d), timeout(%d)\n" ,
@@ -5157,13 +5157,13 @@ _base_handshake_req_reply_wait(struct MPT3SAS_ADAPTER *ioc, int request_bytes,
5157
5157
__le32 * mfp ;
5158
5158
5159
5159
/* make sure doorbell is not in use */
5160
- if ((readl (& ioc -> chip -> Doorbell ) & MPI2_DOORBELL_USED )) {
5160
+ if ((ioc -> base_readl (& ioc -> chip -> Doorbell ) & MPI2_DOORBELL_USED )) {
5161
5161
ioc_err (ioc , "doorbell is in use (line=%d)\n" , __LINE__ );
5162
5162
return - EFAULT ;
5163
5163
}
5164
5164
5165
5165
/* clear pending doorbell interrupts from previous state changes */
5166
- if (readl (& ioc -> chip -> HostInterruptStatus ) &
5166
+ if (ioc -> base_readl (& ioc -> chip -> HostInterruptStatus ) &
5167
5167
MPI2_HIS_IOC2SYS_DB_STATUS )
5168
5168
writel (0 , & ioc -> chip -> HostInterruptStatus );
5169
5169
@@ -5206,15 +5206,15 @@ _base_handshake_req_reply_wait(struct MPT3SAS_ADAPTER *ioc, int request_bytes,
5206
5206
}
5207
5207
5208
5208
/* read the first two 16-bits, it gives the total length of the reply */
5209
- reply [0 ] = le16_to_cpu (readl (& ioc -> chip -> Doorbell )
5209
+ reply [0 ] = le16_to_cpu (ioc -> base_readl (& ioc -> chip -> Doorbell )
5210
5210
& MPI2_DOORBELL_DATA_MASK );
5211
5211
writel (0 , & ioc -> chip -> HostInterruptStatus );
5212
5212
if ((_base_wait_for_doorbell_int (ioc , 5 ))) {
5213
5213
ioc_err (ioc , "doorbell handshake int failed (line=%d)\n" ,
5214
5214
__LINE__ );
5215
5215
return - EFAULT ;
5216
5216
}
5217
- reply [1 ] = le16_to_cpu (readl (& ioc -> chip -> Doorbell )
5217
+ reply [1 ] = le16_to_cpu (ioc -> base_readl (& ioc -> chip -> Doorbell )
5218
5218
& MPI2_DOORBELL_DATA_MASK );
5219
5219
writel (0 , & ioc -> chip -> HostInterruptStatus );
5220
5220
@@ -5225,9 +5225,10 @@ _base_handshake_req_reply_wait(struct MPT3SAS_ADAPTER *ioc, int request_bytes,
5225
5225
return - EFAULT ;
5226
5226
}
5227
5227
if (i >= reply_bytes /2 ) /* overflow case */
5228
- readl (& ioc -> chip -> Doorbell );
5228
+ ioc -> base_readl (& ioc -> chip -> Doorbell );
5229
5229
else
5230
- reply [i ] = le16_to_cpu (readl (& ioc -> chip -> Doorbell )
5230
+ reply [i ] = le16_to_cpu (
5231
+ ioc -> base_readl (& ioc -> chip -> Doorbell )
5231
5232
& MPI2_DOORBELL_DATA_MASK );
5232
5233
writel (0 , & ioc -> chip -> HostInterruptStatus );
5233
5234
}
@@ -6053,14 +6054,14 @@ _base_diag_reset(struct MPT3SAS_ADAPTER *ioc)
6053
6054
if (count ++ > 20 )
6054
6055
goto out ;
6055
6056
6056
- host_diagnostic = readl (& ioc -> chip -> HostDiagnostic );
6057
+ host_diagnostic = ioc -> base_readl (& ioc -> chip -> HostDiagnostic );
6057
6058
drsprintk (ioc ,
6058
6059
ioc_info (ioc , "wrote magic sequence: count(%d), host_diagnostic(0x%08x)\n" ,
6059
6060
count , host_diagnostic ));
6060
6061
6061
6062
} while ((host_diagnostic & MPI2_DIAG_DIAG_WRITE_ENABLE ) == 0 );
6062
6063
6063
- hcb_size = readl (& ioc -> chip -> HCBSize );
6064
+ hcb_size = ioc -> base_readl (& ioc -> chip -> HCBSize );
6064
6065
6065
6066
drsprintk (ioc , ioc_info (ioc , "diag reset: issued\n" ));
6066
6067
writel (host_diagnostic | MPI2_DIAG_RESET_ADAPTER ,
@@ -6073,7 +6074,7 @@ _base_diag_reset(struct MPT3SAS_ADAPTER *ioc)
6073
6074
for (count = 0 ; count < (300000000 /
6074
6075
MPI2_HARD_RESET_PCIE_SECOND_READ_DELAY_MICRO_SEC ); count ++ ) {
6075
6076
6076
- host_diagnostic = readl (& ioc -> chip -> HostDiagnostic );
6077
+ host_diagnostic = ioc -> base_readl (& ioc -> chip -> HostDiagnostic );
6077
6078
6078
6079
if (host_diagnostic == 0xFFFFFFFF )
6079
6080
goto out ;
0 commit comments