[PATCH] qla2xxx: remove unnecessary command direction determination
On Tuesday, June 22, 2004 12:07 AM, Arjan van de Ven wrote: > On Tue, 2004-06-22 at 07:49, Andrew Vasquez wrote: > > > diff -Nru a/drivers/scsi/qla2xxx/qla_iocb.c > b/drivers/scsi/qla2xxx/qla_iocb.c > > --- a/drivers/scsi/qla2xxx/qla_iocb.c 2004-06-21 15:36:37 -07:00 > > +++ b/drivers/scsi/qla2xxx/qla_iocb.c 2004-06-21 15:36:37 -07:00 @@ > > -43,7 +43,7 @@ else if (cmd->sc_data_direction == > > DMA_FROM_DEVICE) cflags = CF_READ; else { > > - switch (cmd->data_cmnd[0]) { > > + switch (cmd->cmnd[0]) { > > case WRITE_6: > > case WRITE_10: > > case WRITE_12: > > this sounds wrong. > Yes, it is _wrong_! This code is baggage left behind from earlier drivers when we were 'asked' to work around certain applications' inability to properly construct commands. > Is there any reason qlogic drivers can't use/trust the midlayer > instead of doing qla2x00_get_cmd_direction() to reverse engineer to > direction ?? Sure. Especially considering an earlier thread: http://marc.theaimsgroup.com/?t=108727983000002&r=1&w=2Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Showing
Please register or sign in to comment