Displaying 1 result from an estimated 1 matches for "sd_max_retries".
2019 Sep 04
0
[PATCH] scsi: virtio_scsi: unplug LUNs when events missed
...ar) inquiry_len;
> +
> + memset(inq_result, 0, inq_result_len);
> +
> + result = scsi_execute_req(sdev, scsi_cmd, DMA_FROM_DEVICE,
> + inq_result, inquiry_len, NULL,
> + 2, 3, NULL);
Where do the weird 2 and 3 values come from?
Most callers seem to use SD_TIMEOUT, SD_MAX_RETRIES...
> +
> + if (result == 0 && inq_result[0] >> 5) {
> + /* PQ indicates the LUN is not attached */
> + scsi_remove_device(sdev);
> + }
> + }
> +
> + kfree(inq_result);
> +}
> +
> static void virtscsi_handle_event(struct work_struct *work)
>...