Re: [PATCH] [SCSI] arcmsr: &/| confusion in arcmsr_build_ccb()

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

 



On Sat, 2011-01-01 at 19:40 +0100, roel kluin wrote:
> Make sure no other command which does a write, such as UNMAP and WRITE_32, is missed.
> 
> Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
> ---
>  drivers/scsi/arcmsr/arcmsr_hba.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> If you agree this is the right fix, please ack.
> 
> diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
> index 17e3df4..a5acedc 100644
> --- a/drivers/scsi/arcmsr/arcmsr_hba.c
> +++ b/drivers/scsi/arcmsr/arcmsr_hba.c
> @@ -1171,7 +1171,7 @@ static int arcmsr_build_ccb(struct AdapterControlBlock *acb,
>  	arcmsr_cdb->msgPages = arccdbsize/0x100 + (arccdbsize % 0x100 ? 1 : 0);
>  	if ( arccdbsize > 256)
>  		arcmsr_cdb->Flags |= ARCMSR_CDB_FLAG_SGL_BSIZE;
> -	if (pcmd->cmnd[0]|WRITE_6 || pcmd->cmnd[0]|WRITE_10 || pcmd->cmnd[0]|WRITE_12 ){
> +	if (pcmd->sc_data_direction == DMA_TO_DEVICE)
>  		arcmsr_cdb->Flags |= ARCMSR_CDB_FLAG_WRITE;
>  	}
>  	ccb->arc_cdb_size = arccdbsize;

Compile checking patches you send in next time would be most welcome:

  CC [M]  drivers/scsi/arcmsr/arcmsr_hba.o
drivers/scsi/arcmsr/arcmsr_hba.c:1177:5: error: expected â=â, â,â, â;â,
âasmâ or â__attribute__â before â->â token
drivers/scsi/arcmsr/arcmsr_hba.c:1178:2: error: expected identifier or
â(â before âreturnâ
drivers/scsi/arcmsr/arcmsr_hba.c:1179:1: error: expected identifier or
â(â before â}â token
drivers/scsi/arcmsr/arcmsr_hba.c: In function âarcmsr_build_ccbâ:
drivers/scsi/arcmsr/arcmsr_hba.c:1176:2: warning: control reaches end of
non-void function

James


--
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