Skip to contentSkip to conversation

mpt3sas: a small correction in _base_process_reply_queue

PATCH Applied Tomas Henzl 3 participants 4 messages Sep 11, 2020 – Sep 22, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mpt3sas: a small correction in _base_process_reply_queue

There is no need to compute module a simple comparision is good enough.

---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/mpt3sas/mpt3sas_base.c +1 -1
index a67749c8f4ab..ea51fd04e3f1 100644
@@ -1627,7 +1627,7 @@ _base_process_reply_queue(struct adapter_reply_queue *reply_q)
 		 * So that FW can find enough entries to post the Reply
 		 * Descriptors in the reply descriptor post queue.
 		 */
-		if (!base_mod64(completed_cmds, ioc->thresh_hold)) {
+		if (completed_cmds >= ioc->thresh_hold) {
 			if (ioc->combined_reply_queue) {
 				writel(reply_q->reply_post_host_index |
 						((msix_index  & 7) <<
Signature · 1 line
2.25.4
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Tomas Henzl

There is no need to compute module a simple comparision is good enough.

Thanks,
Sreekanth

Quoted 20 lines
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/mpt3sas/mpt3sas_base.c +1 -2
index a67749c8f4ab..ea51fd04e3f1 100644
@@ -1627,7 +1627,7 @@ _base_process_reply_queue(struct adapter_reply_queue *reply_q)
                 * So that FW can find enough entries to post the Reply
                 * Descriptors in the reply descriptor post queue.
                 */
-               if (!base_mod64(completed_cmds, ioc->thresh_hold)) {
+               if (completed_cmds >= ioc->thresh_hold) {
                        if (ioc->combined_reply_queue) {
                                writel(reply_q->reply_post_host_index |
                                                ((msix_index  & 7) <<
--

2.25.4

#2 lore raw
In reply to Tomas Henzl

Tomas,

Quoted 2 lines

There is no need to compute module a simple comparision is good enough.

Applied to 5.10/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering