Re: [PATCH 0/7] Fix handling of bidi commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2019-01-22 1:57 p.m., Bart Van Assche wrote:
Hi Martin,

Recently Doug Gilbert reported that handling of bidi commands is broken
in the scsi-mq code. This patch series fixes that bug and also simplifies
bidi command handling. Please consider these patches for kernel v5.1.

Thanks,

Bart.

Bart Van Assche (7):
   Introduce the bidi_supported flag in the host template structure
   Change scsi_cmnd.prot_sdb from a pointer into a regular member
   Fix bidi handling
   Introduce scsi_out_cmd()
   Move several function definitions in <scsi/scsi_cmnd.h>
   Introduce scsi_in_[sg]et_resid() and scsi_out_[sg]et_resid()
   Move the resid member from struct scsi_data_buffer into struct
     scsi_cmnd

  drivers/scsi/iscsi_tcp.c           |  8 +---
  drivers/scsi/libiscsi.c            | 12 ++---
  drivers/scsi/scsi_debug.c          | 20 +++------
  drivers/scsi/scsi_lib.c            | 70 ++++++++++++------------------
  drivers/scsi/sd.c                  |  4 +-
  drivers/scsi/virtio_scsi.c         |  4 +-
  drivers/target/loopback/tcm_loop.c |  8 +---
  include/scsi/scsi_cmnd.h           | 67 ++++++++++++++++++++--------
  include/scsi/scsi_host.h           |  2 +
  9 files changed, 96 insertions(+), 99 deletions(-)


This patchset needs something like the following if UAS (USB Attached
SCSI) is configured in your kernel.

Beware of tabs/spaces/line_wraps as this is a cut and paste:

diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 36742e8e7edc..24f3f95917a5 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -401,9 +401,9 @@ static void uas_data_cmplt(struct urb *urb)
if (status != -ENOENT && status != -ECONNRESET && status != -ESHUTDOWN)
                        uas_log_cmd_state(cmnd, "data cmplt err", status);
                /* error: no data transfered */
-               sdb->resid = sdb->length;
+               scsi_in_set_resid(cmnd, sdb->length);
        } else {
-               sdb->resid = sdb->length - urb->actual_length;
+               scsi_in_set_resid(cmnd, sdb->length - urb->actual_length);
        }
        uas_try_complete(cmnd, __func__);
 out:




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux