[SCSI] megaraid: simplify internal command handling
We don't use the passed in scsi command for anything, so just add a adapter- wide internal status to go along with the internal scb that is used unter int_mtx to pass back the return value and get rid of all the complexities and abuse of the scsi_cmnd structure. This gets rid of the only user of scsi_allocate_command/scsi_free_command, which can now be removed. [jejb: checkpatch fixes] Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Adam Radford <aradford@gmail.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:

committed by
James Bottomley

parent
c38c007af0
commit
0f2bb84d2a
@@ -853,10 +853,10 @@ typedef struct {
|
||||
|
||||
u8 sglen; /* f/w supported scatter-gather list length */
|
||||
|
||||
unsigned char int_cdb[MAX_COMMAND_SIZE];
|
||||
scb_t int_scb;
|
||||
struct mutex int_mtx; /* To synchronize the internal
|
||||
commands */
|
||||
int int_status; /* status of internal cmd */
|
||||
struct completion int_waitq; /* wait queue for internal
|
||||
cmds */
|
||||
|
||||
@@ -1004,7 +1004,6 @@ static int mega_del_logdrv(adapter_t *, int);
|
||||
static int mega_do_del_logdrv(adapter_t *, int);
|
||||
static void mega_get_max_sgl(adapter_t *);
|
||||
static int mega_internal_command(adapter_t *, megacmd_t *, mega_passthru *);
|
||||
static void mega_internal_done(Scsi_Cmnd *);
|
||||
static int mega_support_cluster(adapter_t *);
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user