lkml.org 
[lkml]   [2012]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 05/11] firewire-sbp-target: Add sbp_configfs.c
On Feb 15 Chris Boot wrote:
> --- /dev/null
> +++ b/drivers/target/sbp/sbp_configfs.c
> @@ -0,0 +1,751 @@
> +/*
> + * SBP2 target driver (SCSI over IEEE1394 in target mode)
> + *
> + * Copyright (C) 2011 Chris Boot <bootc@bootc.net>
> + *
> + * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
> + */
> +
> +#define KMSG_COMPONENT "sbp_target"
> +#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
> +
> +#include <linux/module.h>
> +#include <linux/moduleparam.h>
> +#include <linux/version.h>
> +#include <linux/init.h>
> +#include <linux/slab.h>
> +#include <linux/kthread.h>
> +#include <linux/types.h>
> +#include <linux/string.h>
> +#include <linux/configfs.h>
> +#include <linux/ctype.h>
> +#include <linux/firewire.h>
> +
> +#include <asm/unaligned.h>
> +
> +#include <target/target_core_base.h>
> +#include <target/target_core_backend.h>
> +#include <target/target_core_fabric.h>
> +#include <target/target_core_configfs.h>
> +#include <target/target_core_fabric_configfs.h>
> +#include <target/configfs_macros.h>
> +
> +#include "sbp_base.h"
> +#include "sbp_fabric.h"
> +#include "sbp_management_agent.h"
> +
> +/* Local pointer to allocated TCM configfs fabric module */
> +struct target_fabric_configfs *sbp_fabric_configfs;
> +
> +struct workqueue_struct *sbp_workqueue;

#include <linux/workqueue.h> goes before this.

[...]
> + sbp_workqueue = alloc_workqueue("firewire-sbp-target", WQ_UNBOUND, 0);
> + if (!sbp_workqueue) {
> + target_fabric_configfs_deregister(fabric);
> + return -ENOMEM;
> + }

What are your specific requirements that you cannot use one of the
system-wide workqueues?
--
Stefan Richter
-=====-===-- --=- -====
http://arcgraph.de/sr/

\
 
 \ /
  Last update: 2012-02-15 20:25    [W:1.870 / U:0.600 seconds]
©2003-2014 Jasper Spaans. Advertise on this site