From fec7afefda288159d2a6e2e86c08b8e2eddd453a Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 22 Sep 2010 18:03:20 +0000 Subject: [PATCH] More cleanup. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2166 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- ibmvstgt/src/scsi_tgt.h | 3 -- ibmvstgt/src/scsi_tgt_lib.c | 95 ------------------------------------ ibmvstgt/src/scsi_tgt_priv.h | 5 -- 3 files changed, 103 deletions(-) diff --git a/ibmvstgt/src/scsi_tgt.h b/ibmvstgt/src/scsi_tgt.h index 55610c9b3..e69de29bb 100644 --- a/ibmvstgt/src/scsi_tgt.h +++ b/ibmvstgt/src/scsi_tgt.h @@ -1,3 +0,0 @@ -/* - * SCSI target definitions - */ diff --git a/ibmvstgt/src/scsi_tgt_lib.c b/ibmvstgt/src/scsi_tgt_lib.c index 2882a1a22..e69de29bb 100644 --- a/ibmvstgt/src/scsi_tgt_lib.c +++ b/ibmvstgt/src/scsi_tgt_lib.c @@ -1,95 +0,0 @@ -/* - * SCSI target lib functions - * - * Copyright (C) 2005 Mike Christie - * Copyright (C) 2005 FUJITA Tomonori - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "scsi_tgt_priv.h" - -static struct workqueue_struct *scsi_tgtd; -static struct kmem_cache *scsi_tgt_cmd_cache; - -/* - * TODO: this struct will be killed when the block layer supports large bios - * and James's work struct code is in - */ -struct scsi_tgt_cmd { - /* TODO replace work with James b's code */ - struct work_struct work; - /* TODO fix limits of some drivers */ - struct bio *bio; - - struct list_head hash_list; - struct request *rq; - u64 itn_id; - u64 tag; -}; - -#define TGT_HASH_ORDER 4 -#define cmd_hashfn(tag) hash_long((unsigned long) (tag), TGT_HASH_ORDER) - -struct scsi_tgt_queuedata { - struct Scsi_Host *shost; - struct list_head cmd_hash[1 << TGT_HASH_ORDER]; - spinlock_t cmd_hash_lock; -}; - -static int __init scsi_tgt_init(void) -{ - int err; - - scsi_tgt_cmd_cache = KMEM_CACHE(scsi_tgt_cmd, 0); - if (!scsi_tgt_cmd_cache) - return -ENOMEM; - - scsi_tgtd = create_workqueue("scsi_tgtd"); - if (!scsi_tgtd) { - err = -ENOMEM; - goto free_kmemcache; - } - - return 0; - -free_kmemcache: - kmem_cache_destroy(scsi_tgt_cmd_cache); - return err; -} - -static void __exit scsi_tgt_exit(void) -{ - destroy_workqueue(scsi_tgtd); - kmem_cache_destroy(scsi_tgt_cmd_cache); -} - -module_init(scsi_tgt_init); -module_exit(scsi_tgt_exit); - -MODULE_DESCRIPTION("SCSI target core"); -MODULE_LICENSE("GPL"); diff --git a/ibmvstgt/src/scsi_tgt_priv.h b/ibmvstgt/src/scsi_tgt_priv.h index 4d9b9610d..e69de29bb 100644 --- a/ibmvstgt/src/scsi_tgt_priv.h +++ b/ibmvstgt/src/scsi_tgt_priv.h @@ -1,5 +0,0 @@ -/* tmp - will replace with SCSI logging stuff */ -#define eprintk(fmt, args...) \ -do { \ - printk("%s(%d) " fmt, __func__, __LINE__, ##args); \ -} while (0)