diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_dbg.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_dbg.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c index 34760f8d4f17..4a990f4da4ea 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.c +++ b/drivers/scsi/qla2xxx/qla_dbg.c | |||
@@ -149,11 +149,9 @@ qla24xx_pause_risc(struct device_reg_24xx __iomem *reg) | |||
149 | int rval = QLA_SUCCESS; | 149 | int rval = QLA_SUCCESS; |
150 | uint32_t cnt; | 150 | uint32_t cnt; |
151 | 151 | ||
152 | if (RD_REG_DWORD(®->hccr) & HCCRX_RISC_PAUSE) | ||
153 | return rval; | ||
154 | |||
155 | WRT_REG_DWORD(®->hccr, HCCRX_SET_RISC_PAUSE); | 152 | WRT_REG_DWORD(®->hccr, HCCRX_SET_RISC_PAUSE); |
156 | for (cnt = 30000; (RD_REG_DWORD(®->hccr) & HCCRX_RISC_PAUSE) == 0 && | 153 | for (cnt = 30000; |
154 | ((RD_REG_DWORD(®->host_status) & HSRX_RISC_PAUSED) == 0) && | ||
157 | rval == QLA_SUCCESS; cnt--) { | 155 | rval == QLA_SUCCESS; cnt--) { |
158 | if (cnt) | 156 | if (cnt) |
159 | udelay(100); | 157 | udelay(100); |
@@ -351,7 +349,7 @@ static inline void * | |||
351 | qla25xx_copy_mq(struct qla_hw_data *ha, void *ptr, uint32_t **last_chain) | 349 | qla25xx_copy_mq(struct qla_hw_data *ha, void *ptr, uint32_t **last_chain) |
352 | { | 350 | { |
353 | uint32_t cnt, que_idx; | 351 | uint32_t cnt, que_idx; |
354 | uint8_t req_cnt, rsp_cnt, que_cnt; | 352 | uint8_t que_cnt; |
355 | struct qla2xxx_mq_chain *mq = ptr; | 353 | struct qla2xxx_mq_chain *mq = ptr; |
356 | struct device_reg_25xxmq __iomem *reg; | 354 | struct device_reg_25xxmq __iomem *reg; |
357 | 355 | ||
@@ -363,9 +361,8 @@ qla25xx_copy_mq(struct qla_hw_data *ha, void *ptr, uint32_t **last_chain) | |||
363 | mq->type = __constant_htonl(DUMP_CHAIN_MQ); | 361 | mq->type = __constant_htonl(DUMP_CHAIN_MQ); |
364 | mq->chain_size = __constant_htonl(sizeof(struct qla2xxx_mq_chain)); | 362 | mq->chain_size = __constant_htonl(sizeof(struct qla2xxx_mq_chain)); |
365 | 363 | ||
366 | req_cnt = find_first_zero_bit(ha->req_qid_map, ha->max_queues); | 364 | que_cnt = ha->max_req_queues > ha->max_rsp_queues ? |
367 | rsp_cnt = find_first_zero_bit(ha->rsp_qid_map, ha->max_queues); | 365 | ha->max_req_queues : ha->max_rsp_queues; |
368 | que_cnt = req_cnt > rsp_cnt ? req_cnt : rsp_cnt; | ||
369 | mq->count = htonl(que_cnt); | 366 | mq->count = htonl(que_cnt); |
370 | for (cnt = 0; cnt < que_cnt; cnt++) { | 367 | for (cnt = 0; cnt < que_cnt; cnt++) { |
371 | reg = (struct device_reg_25xxmq *) ((void *) | 368 | reg = (struct device_reg_25xxmq *) ((void *) |