Re: [PATCH 08/17] ibmvscsi: Fix bidi command test

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

 



On 01/23/2015 04:10 AM, Bart Van Assche wrote:
> Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxxxxxx>
> Cc: Brian King <brking@xxxxxxxxxxxxxxxxxx>
> Cc: Nathan Fontenot <nfont@xxxxxxxxxxxxxxxxxx>
> ---
>  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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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