Commit c9793ca3 authored by James Bottomley's avatar James Bottomley

fix dma mapping leak in fusion

From: 	Moore, Eric Dean <Emoore@lsil.com>

Remove the internal queueing so that commands
aren't stored in the driver and thus it doesn't
have to worry about whether the IOMMU resources
are allocated or not.
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent d2b91c2d
......@@ -3395,7 +3395,7 @@ SendIocReset(MPT_ADAPTER *ioc, u8 reset_type, int sleepFlag)
* @hd: Pointer to MPT_SCSI_HOST structure
* @init: If set, initialize the spin lock.
*/
int
static int
initChainBuffers(MPT_ADAPTER *ioc)
{
u8 *mem;
......
......@@ -83,8 +83,8 @@
#define COPYRIGHT "Copyright (c) 1999-2004 " MODULEAUTHOR
#endif
#define MPT_LINUX_VERSION_COMMON "3.01.15"
#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.01.15"
#define MPT_LINUX_VERSION_COMMON "3.01.16"
#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.01.16"
#define WHAT_MAGIC_STRING "@" "(" "#" ")"
#define show_mptmod_ver(s,ver) \
......@@ -318,17 +318,6 @@ typedef struct _Q_TRACKER {
struct _Q_ITEM *tail;
} Q_TRACKER;
typedef struct _MPT_DONE_Q {
struct _MPT_DONE_Q *forw;
struct _MPT_DONE_Q *back;
void *argp;
} MPT_DONE_Q;
typedef struct _DONE_Q_TRACKER {
MPT_DONE_Q *head;
MPT_DONE_Q *tail;
} DONE_Q_TRACKER;
/*
* Chip-specific stuff... FC929 delineates break between
* FC and Parallel SCSI parts. Do NOT re-order.
......@@ -859,7 +848,7 @@ typedef struct _mpt_sge {
#define dtmprintk(x) printk x
#define DBG_DUMP_TM_REQUEST_FRAME(mfp) \
{ u32 *m = (u32 *)(mfp); \
int i, n = 12; \
int i, n = 13; \
printk("TM_REQUEST:\n"); \
for (i=0; i<n; i++) { \
if (i && ((i%8)==0)) \
......@@ -1028,12 +1017,7 @@ typedef struct _MPT_SCSI_HOST {
/* Pool of memory for holding SCpnts before doing
* OS callbacks. freeQ is the free pool.
*/
u8 *memQ;
DONE_Q_TRACKER freeQ;
DONE_Q_TRACKER doneQ; /* Holds Linux formmatted requests */
DONE_Q_TRACKER pendingQ; /* Holds MPI formmatted requests */
MPT_Q_TRACKER taskQ; /* TM request Q */
spinlock_t freedoneQlock;
int taskQcnt;
u8 tmPending;
u8 resetPending;
......
......@@ -484,7 +484,7 @@ mptctl_free_tm_flags(MPT_ADAPTER *ioc)
spin_lock_irqsave(&ioc->FreeQlock, flags);
hd->tmState = TM_STATE_ERROR;
hd->tmState = TM_STATE_NONE;
hd->tmPending = 0;
spin_unlock_irqrestore(&ioc->FreeQlock, flags);
......@@ -2195,6 +2195,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_command karg, void __user *mfPtr)
add_timer(&ioc->ioctl->timer);
if (hdr->Function == MPI_FUNCTION_SCSI_TASK_MGMT) {
DBG_DUMP_TM_REQUEST_FRAME((u32 *)mf);
rc = mpt_send_handshake_request(mptctl_id, ioc,
sizeof(SCSITaskMgmt_t), (u32*)mf, CAN_SLEEP);
if (rc == 0) {
......@@ -2865,7 +2866,7 @@ static struct mpt_pci_driver mptctl_driver = {
};
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
int __init mptctl_init(void)
static int __init mptctl_init(void)
{
int err;
int where = 1;
......@@ -2963,7 +2964,7 @@ int __init mptctl_init(void)
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
void mptctl_exit(void)
static void mptctl_exit(void)
{
misc_deregister(&mptctl_miscdev);
printk(KERN_INFO MYNAM ": Deregistered /dev/%s @ (major,minor=%d,%d)\n",
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment