On 01/23/2015 04:10 AM, Bart Van Assche wrote:
> Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com>
> Cc: Brian King <brk...@linux.vnet.ibm.com>
> Cc: Nathan Fontenot <nf...@linux.vnet.ibm.com>
> ---
>  drivers/scsi/ibmvscsi/ibmvscsi.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c 
> b/drivers/scsi/ibmvscsi/ibmvscsi.c
> index acea5d6..cf26b33 100644
> --- a/drivers/scsi/ibmvscsi/ibmvscsi.c
> +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
> @@ -765,16 +765,18 @@ static int map_data_for_srp_cmd(struct scsi_cmnd *cmd,
>                               struct srp_event_struct *evt_struct,
>                               struct srp_cmd *srp_cmd, struct device *dev)
>  {
> +     if (scsi_bidi_cmnd(cmd)) {
> +             sdev_printk(KERN_ERR, cmd->device,
> +                         "Bidirectional commands are not yet supported\n");
> +             return 0;
> +     }
> +

Is there a particular problem this solves, or is this simply a change to
use the bidi API in place of checking sc_data_direction for
DMA_BIDIRECTIONAL?

-Tyrel

>       switch (cmd->sc_data_direction) {
>       case DMA_FROM_DEVICE:
>       case DMA_TO_DEVICE:
>               break;
>       case DMA_NONE:
>               return 1;
> -     case DMA_BIDIRECTIONAL:
> -             sdev_printk(KERN_ERR, cmd->device,
> -                         "Can't map DMA_BIDIRECTIONAL to read/write\n");
> -             return 0;
>       default:
>               sdev_printk(KERN_ERR, cmd->device,
>                           "Unknown data direction 0x%02x; can't map!\n",
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to