1
0
Fork 0
Commit Graph

21 Commits (c7258a4477b5ed0243c28ec107b98bb946757448)

Author SHA1 Message Date
FUJITA Tomonori b58d91547f [SCSI] export scsi-ml functions needed by tgt_scsi_lib and its LLDs
This patch contains the needed changes to the scsi-ml for the target
mode support.

Note, per the last review we moved almost all the fields we added
to the scsi_cmnd to our internal data structure which we are going
to try and kill off when we can replace it with support from other
parts of the kernel.

The one field we left on was the offset variable. This is needed to handle
the case where the target gets request that is so large that it cannot
execute it in one dma operation. So max_secotors or a segment limit may
limit the size of the transfer. In this case our tgt core code will
break up the command into managable transfers and send them to the
LLD one at a time. The offset is then used to tell the LLD where in
the command we are at. Is there another field on the scsi_cmd for
that?

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-25 13:08:56 -06:00
Christoph Hellwig 4f777ed260 [SCSI] kill scsi_assign_lock
scsi_assign_lock has been unused for a long time and is a bad idea
in general, so kill it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-11-15 14:14:46 -06:00
James Bottomley 86e33a296c [SCSI] add shared tag map helpers
This patch adds support for sharing tag maps at the host level
(i.e. either every queue [LUN] has its own tag map or there's a single
one for the entire host).  This formulation is primarily intended to
help single issue queue hardware, like the aic7xxx

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-31 11:18:03 -04:00
Michael Reed dd7e2f2266 [SCSI] scsi_queue_work() documented return value is incorrect
If you examine the queue_work() routine you'll see that it returns
1 on success, 0 if the work is already queued.

This patch corrects the source code documentation for the
scsi_queue_work function.

Signed-off-by: Michael Reed <mdr@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 11:36:23 -05:00
Christoph Hellwig 9227c33de8 [PATCH] move ->eh_strategy_handler to the transport class
Overriding the whole EH code is a per-transport, not per-host thing.
Move ->eh_strategy_handler to the transport class, same as
->eh_timed_out.

Downside is that scsi_host_alloc can't check for the total lack of EH
anymore, but the transition period from old EH where we needed it is
long gone already.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-04-10 14:15:47 -04:00
Jes Sorensen 24669f75a3 [SCSI] SCSI core kmalloc2kzalloc
Change the core SCSI code to use kzalloc rather than kmalloc+memset
where possible.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27 22:55:02 -06:00
Arjan van de Ven 0b95067238 [SCSI] turn most scsi semaphores into mutexes
the scsi layer is using semaphores in a mutex way, this patch converts
these into using mutexes instead

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12 11:53:11 -06:00
Tejun Heo 461d4e90c8 [BLOCK] update SCSI to use new blk_ordered for barriers
All ordered request related stuff delegated to HLD.  Midlayer
now doens't deal with ordered setting or prepare_flush
callback.  sd.c updated to deal with blk_queue_ordered
setting.  Currently, ordered tag isn't used as SCSI midlayer
cannot guarantee request ordering.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-06 09:52:55 +01:00
James Bottomley 849a8924a6 Merge by Hand
Conflicts in dec_esp.c (Thanks Bacchus), scsi_transport_iscsi.c and
scsi_transport_fc.h

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-04 22:29:52 -06:00
Russell King d052d1beff Create platform_device.h to contain all the platform device details.
Convert everyone who uses platform_bus_type to include
linux/platform_device.h.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-29 19:07:23 +01:00
James Bottomley 9ccfc756a7 [SCSI] move the mid-layer printk's over to shost/starget/sdev_printk
This should eliminate (at least in the mid layer) to make numeric
assumptions about any of the enumeration variables.  As a side effect,
it will also make all the messages consistent and line us up nicely for
the error logging strategy (if it ever shows itself again).

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-10-28 14:23:02 -05:00
Al Viro c53033f6b0 [PATCH] gfp_t: drivers/scsi
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-28 08:16:50 -07:00
James Bottomley 9e70592fcd [SCSI] fix potential panic with proc on module removal
There's a problem in our host release in that it calls
scsi_proc_hostdir_rm(). However, if you hold a reference to the host as
you remove the module, the host template (which proc uses) will be freed
and the system will panic when the host device is finally released.

Fix this by moving scsi_proc_hostdir_rm() to where it should be: in
scsi_remove_host().

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-10-02 15:20:03 -05:00
James Bottomley 939647ee30 [SCSI] fix oops on usb storage device disconnect
We fix the oops by enforcing the host state model.  There have also
been two extra states added: SHOST_CANCEL_RECOVERY and
SHOST_DEL_RECOVERY so we can take the model through host removal while
the recovery thread is active.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-19 09:24:52 -05:00
Christoph Hellwig c5478def7a [SCSI] switch EH thread startup to the kthread API
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-06 17:26:06 -05:00
Mike Anderson 82f29467a0 [SCSI] host state model update: mediate host add/remove race
Add support to not allow additions to a host when it is being removed.

Signed-off-by: Mike Anderson <andmike@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-30 11:13:01 -05:00
Mike Anderson d2c9d9eafa [SCSI] host state model update: reimplement scsi_host_cancel
Remove the old scsi_host_cancel function as it has not been working for
sometime do to the device list possibly being empty when it is called and
possible race issues. Add setting of SHOST_CANCEL at the state of beginning
of scsi_remove_host.

Signed-off-by: Mike Anderson <andmike@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-30 11:11:37 -05:00
Mike Anderson d330187408 [SCSI] host state model update: replace old host bitmap state
Migrate the current SCSI host state model to a model like SCSI
device is using.

Signed-off-by: Mike Anderson <andmike@us.ibm.com>

Rejections fixed up and

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-07-30 11:10:24 -05:00
Christoph Hellwig 12413197ee [SCSI] remove scsi_set_device
scsi_add_host is the proper place to set the device, but people copy
the scsi_set_device usage from older drivers again and again.

note that this leaves some legacy drivers like qlogicisp/qlogicfc
without pci association in sysfs, but they're scheduled to go away soon
anyway.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-26 08:31:47 -05:00
Adrian Bunk 52c1da3953 [PATCH] make various thing static
Another rollup of patches which give various symbols static scope

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-24 00:06:43 -07:00
Linus Torvalds 1da177e4c3 Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
2005-04-16 15:20:36 -07:00