On 2020-07-17 00:39, Lee Sang Hyun wrote: > - ret = scsi_execute(sdp, cmd, DMA_NONE, NULL, 0, NULL, &sshdr, > - START_STOP_TIMEOUT, 0, 0, RQF_PM, NULL); > - if (ret) { > - sdev_printk(KERN_WARNING, sdp, > - "START_STOP failed for power mode: %d, result %x\n", > - pwr_mode, ret); > - if (driver_byte(ret) == DRIVER_SENSE) > - scsi_print_sense_hdr(sdp, NULL, &sshdr); > + for (retries = 0; retries < SSU_RETRIES; retries++) { > + ret = scsi_execute(sdp, cmd, DMA_NONE, NULL, 0, NULL, &sshdr, > + START_STOP_TIMEOUT, 0, 0, RQF_PM, NULL); > + if (ret) { > + sdev_printk(KERN_WARNING, sdp, > + "START_STOP failed for power mode: %d, result %x\n", > + pwr_mode, ret); > + if (driver_byte(ret) == DRIVER_SENSE) > + scsi_print_sense_hdr(sdp, NULL, &sshdr); > + } else { > + break; > + } The ninth argument of scsi_execute() is called 'retries'. Wouldn't it be better to pass a nonzero value as the 'retries' argument of scsi_execute() instead of adding a loop around the scsi_execute() call? Thanks, Bart.