hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/scsi/ppa.c
....@@ -590,7 +590,7 @@
590590 if (cmd->SCp.buffer && !cmd->SCp.this_residual) {
591591 /* if scatter/gather, advance to the next segment */
592592 if (cmd->SCp.buffers_residual--) {
593
- cmd->SCp.buffer++;
593
+ cmd->SCp.buffer = sg_next(cmd->SCp.buffer);
594594 cmd->SCp.this_residual =
595595 cmd->SCp.buffer->length;
596596 cmd->SCp.ptr = sg_virt(cmd->SCp.buffer);
....@@ -717,6 +717,7 @@
717717 }
718718 cmd->SCp.phase++;
719719 }
720
+ fallthrough;
720721
721722 case 2: /* Phase 2 - We are now talking to the scsi bus */
722723 if (!ppa_select(dev, scmd_id(cmd))) {
....@@ -724,7 +725,7 @@
724725 return 0;
725726 }
726727 cmd->SCp.phase++;
727
- /* fall through */
728
+ fallthrough;
728729
729730 case 3: /* Phase 3 - Ready to accept a command */
730731 w_ctr(ppb, 0x0c);
....@@ -734,7 +735,7 @@
734735 if (!ppa_send_command(cmd))
735736 return 0;
736737 cmd->SCp.phase++;
737
- /* fall through */
738
+ fallthrough;
738739
739740 case 4: /* Phase 4 - Setup scatter/gather buffers */
740741 if (scsi_bufflen(cmd)) {
....@@ -748,7 +749,7 @@
748749 }
749750 cmd->SCp.buffers_residual = scsi_sg_count(cmd) - 1;
750751 cmd->SCp.phase++;
751
- /* fall through */
752
+ fallthrough;
752753
753754 case 5: /* Phase 5 - Data transfer stage */
754755 w_ctr(ppb, 0x0c);
....@@ -761,7 +762,7 @@
761762 if (retv == 0)
762763 return 1;
763764 cmd->SCp.phase++;
764
- /* fall through */
765
+ fallthrough;
765766
766767 case 6: /* Phase 6 - Read status/message */
767768 cmd->result = DID_OK << 16;
....@@ -778,7 +779,6 @@
778779 (DID_OK << 16) + (h << 8) + (l & STATUS_MASK);
779780 }
780781 return 0; /* Finished */
781
- break;
782782
783783 default:
784784 printk(KERN_ERR "ppa: Invalid scsi phase\n");
....@@ -846,10 +846,8 @@
846846 case 1: /* Have not connected to interface */
847847 dev->cur_cmd = NULL; /* Forget the problem */
848848 return SUCCESS;
849
- break;
850849 default: /* SCSI command sent, can not abort */
851850 return FAILED;
852
- break;
853851 }
854852 }
855853
....@@ -978,7 +976,6 @@
978976 .bios_param = ppa_biosparam,
979977 .this_id = -1,
980978 .sg_tablesize = SG_ALL,
981
- .use_clustering = ENABLE_CLUSTERING,
982979 .can_queue = 1,
983980 .slave_alloc = ppa_adjust_queue,
984981 };