]> Pileus Git - ~andy/linux/blobdiff - drivers/scsi/mpt2sas/mpt2sas_config.c
Merge branches 'at91', 'ep93xx', 'etm', 'ks8695', 'nuc', 'u300' and 'u8500' into...
[~andy/linux] / drivers / scsi / mpt2sas / mpt2sas_config.c
index 2e018c9f59825c2321fe74a689fc6cd338983c90..594a389c6526f265d9cc8b58d530702a3f1ba312 100644 (file)
@@ -2,7 +2,7 @@
  * This module provides common API for accessing firmware configuration pages
  *
  * This code is based on drivers/scsi/mpt2sas/mpt2_base.c
- * Copyright (C) 2007-2008  LSI Corporation
+ * Copyright (C) 2007-2009  LSI Corporation
  *  (mailto:DL-MPTFusionLinux@lsi.com)
  *
  * This program is free software; you can redistribute it and/or
@@ -233,18 +233,19 @@ _config_free_config_dma_memory(struct MPT2SAS_ADAPTER *ioc,
  *
  * The callback handler when using _config_request.
  *
- * Return nothing.
+ * Return 1 meaning mf should be freed from _base_interrupt
+ *        0 means the mf is freed from this function.
  */
-void
+u8
 mpt2sas_config_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index,
     u32 reply)
 {
        MPI2DefaultReply_t *mpi_reply;
 
        if (ioc->config_cmds.status == MPT2_CMD_NOT_USED)
-               return;
+               return 1;
        if (ioc->config_cmds.smid != smid)
-               return;
+               return 1;
        ioc->config_cmds.status |= MPT2_CMD_COMPLETE;
        mpi_reply =  mpt2sas_base_get_reply_virt_addr(ioc, reply);
        if (mpi_reply) {
@@ -258,6 +259,7 @@ mpt2sas_config_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index,
 #endif
        ioc->config_cmds.smid = USHORT_MAX;
        complete(&ioc->config_cmds.done);
+       return 1;
 }
 
 /**