aacraid: remove needless code
Subsystems (2)
PATCH 1/1 aacraid: remove needless code
Patch "bef18d308a22 scsi: aacraid: Disabling TM path
and only processing IOP reset"
has modified aac_hba_send so it returns -EINVAL for everything except HBA_IU_TYPE_SCSI_TM_REQ command. That makes callers using other commands useless - remove them together with related functions and make the test in aac_hba_send more visible.
Patch also replaces a /* fall through */ comment.
Signed-off-by Tomas Henzl <[email protected]>
--- drivers/scsi/aacraid/commsup.c | 12 +- drivers/scsi/aacraid/linit.c | 379 +++++---------------------------- 2 files changed, 64 insertions(+), 327 deletions(-)
drivers/scsi/aacraid/commsup.c +6 -6
@@ -714,6 +714,9 @@ int aac_hba_send(u8 command, struct fib *fibptr, fib_callback callback,struct aac_hba_cmd_req *hbacmd = (struct aac_hba_cmd_req *) fibptr->hw_fib_va; +if (command !=HBA_IU_TYPE_SCSI_CMD_REQ ) +return -EINVAL ; + fibptr->flags = (FIB_CONTEXT_FLAG |FIB_CONTEXT_FLAG_NATIVE_HBA );if (callback) { wait =0 ;
@@ -725,13 +728,10 @@ int aac_hba_send(u8 command, struct fib *fibptr, fib_callback callback, hbacmd->iu_type = command; -if (command ==HBA_IU_TYPE_SCSI_CMD_REQ ) {/* bit1 of request_id must be 0 */ - hbacmd->request_id = -cpu_to_le32 ((((u32)(fibptr - dev->fibs)) <<2 ) +1 ); - fibptr->flags |=FIB_CONTEXT_FLAG_SCSI_CMD ; - }else -return -EINVAL ; + hbacmd->request_id = +cpu_to_le32 ((((u32)(fibptr - dev->fibs)) <<2 ) +1 ); + fibptr->flags |=FIB_CONTEXT_FLAG_SCSI_CMD ;if (wait) {
drivers/scsi/aacraid/linit.c +58 -321
407 lines not on this page · raw message
Signature · 1 line
2.25.4