]> err.no Git - linux-2.6/log
linux-2.6
17 years ago[SCSI] switch sdev sysfs attributes to default attributes
Kay Sievers [Tue, 11 Sep 2007 15:00:14 +0000 (17:00 +0200)]
[SCSI] switch sdev sysfs attributes to default attributes

This removes the unused sysfs attribute overwriting logic for most of
the attributes, and plugs them into the driver core default attribute
creation.

Without this patch, at the time of the events for the SCSI LUN's, there
will be no sysfs files, because their creation is delayed until the sd
driver has spun up the disks, which might take several seconds. It is the
last WAIT_FOR_SYSFS rule in the default udev setup which can be removed
with this change.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Use DRV_NAME
Matthew Wilcox [Sun, 9 Sep 2007 14:56:40 +0000 (08:56 -0600)]
[SCSI] advansys: Use DRV_NAME

Follow the example of some other drivers by defining DRV_NAME to be
"advansys".  Prevents spelling mistakes.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Comment/indentation/macro cleanup
Matthew Wilcox [Sun, 9 Sep 2007 14:56:39 +0000 (08:56 -0600)]
[SCSI] advansys: Comment/indentation/macro cleanup

 - Delete comments relating to the previous structure of the driver.
   I have no intention of honouring them ;-)
 - Reformat comments > 80 columns
 - Remove now-obsolete comments from advansys_interrupt
 - Change adv_get_sglist() from do {} while (1) to for (;;)
 - Return void from AscInitQLinkVar()
 - Take out a level of indentation in adv_get_sglist()
 - Reduce indentation level of AscAsyncFix()
 - Remove unused macros
 - Refactor AscSendScsiQueue slightly

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Remove some custom wrappers
Matthew Wilcox [Sun, 9 Sep 2007 14:56:38 +0000 (08:56 -0600)]
[SCSI] advansys: Remove some custom wrappers

 - Replace ASC_ASSERT() with BUG_ON().
   In a few places, get rid of the assertion altogether -- the ensuing
   crash will tell us all we need to know.  Use BUG() where it fits better
   than BUG_ON().  Also fix a fencepost error in advansys_proc_info().
 - Replace DvcSleepMilliSecond with mdelay.
   Despite its name using 'sleep', the implementation was a delay.
   I've marked some places with XXX where we should probably be using
   msleep instead.  They need to be audited to be sure we can sleep in
   that context.
 - Replace DvcDelayMicroSecond with udelay.
 - Replace DvcDelayNanoSecond with udelay too.
   All callers were multiples of 1000.
 - Remove DvcEnterCritical and DvcLeaveCritical.
   These functions are no-ops, and as the comments said, the spinlock
   protects the critical sections.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Remove a check for an impossible condition
Matthew Wilcox [Sun, 9 Sep 2007 14:56:37 +0000 (08:56 -0600)]
[SCSI] advansys: Remove a check for an impossible condition

AscExeScsiQueue() has one caller, and it passes the address of a
variable; this cannot ever be NULL.  This is the only place that ever
sets ASCQ_ERR_SCSIQ_NULL_PTR, so delete that error code too, as well as
several other unused ASCQ_ERR codes.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Support 16-byte commands properly
Matthew Wilcox [Sun, 9 Sep 2007 14:56:36 +0000 (08:56 -0600)]
[SCSI] advansys: Support 16-byte commands properly

The SCSI midlayer won't send commands greater than ->max_cmd_len.
So the checks on length in asc_build_req and adv_build_req are obsolete
and can be deleted, but also we have to set the max_cmd_len in
advansys_board_found().  Also move the length definitions together, and
write a helpful comment.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Enable interrupts earlier in queuecommand
Matthew Wilcox [Sun, 9 Sep 2007 14:56:35 +0000 (08:56 -0600)]
[SCSI] advansys: Enable interrupts earlier in queuecommand

Move as much as possible outside the critical section in queuecommand, eg:
 - Set the scsi_done field before acquiring the lock
 - Call asc_scsi_done after dropping the lock

Also remove a comment suggesting we should enable interrupts (now we do)
and do some minor reformatting for readability.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Remove `active' queue and all remaining internal queueing code
Matthew Wilcox [Sun, 9 Sep 2007 14:56:34 +0000 (08:56 -0600)]
[SCSI] advansys: Remove `active' queue and all remaining internal queueing code

The `active' list was used in the reset handler -- but the midlayer
guarantees that list is empty by the time the reset handler is invoked.
It was also checked in the interrupt routines to be sure that this command
belonged to this board, but we don't need to check that either.  We can
then delete the asc_prt_target_stats() function as it will never print
anything, along with asc_enqueue(), asc_dequeue_list(), asc_rmqueue(),
asc_scsi_done_list(), struct asc_queue, ASC_QUEUE_EMPTY, ASC_TID_ALL,
ASC_FRONT, ASC_BACK, and all the REQ* macros.  Also remove this item from
the todo list.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Remove `done' queue
Matthew Wilcox [Sun, 9 Sep 2007 14:56:33 +0000 (08:56 -0600)]
[SCSI] advansys: Remove `done' queue

 - Move the guts of asc_scsi_done_list() into a new function, asc_scsi_done.
 - Call asc_scsi_done() in asc_isr_callback() and adv_isr_callback().  The
   comment was wrong; scsi_done cannot enable interrupts.
 - All other places which queued an scp on the done list are error paths
   for queuecommand, and so we can just call asc_scsi_done() in queuecommand
   if we receive an error.
 - We no longer need to keep a list of done requests in advansys_interrupt

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Remove a check for an impossible condition
Matthew Wilcox [Sun, 9 Sep 2007 14:56:32 +0000 (08:56 -0600)]
[SCSI] advansys: Remove a check for an impossible condition

The midlayer guarantees it won't call ->queuecommand for a host which
is handling a reset condition.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Remove `waiting' queue
Matthew Wilcox [Sun, 9 Sep 2007 14:56:31 +0000 (08:56 -0600)]
[SCSI] advansys: Remove `waiting' queue

If the adapter is busy, return the request to the midlayer rather than
queueing it in the driver.  asc_execute_queue() and asc_dequeue() become
unused, and we don't need to print out stats on the waiting queue any more.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Shrink advansys_board_found a little more
Matthew Wilcox [Sun, 9 Sep 2007 14:56:30 +0000 (08:56 -0600)]
[SCSI] advansys: Shrink advansys_board_found a little more

Move the error reporting into AscInitGetConfig, AdvInitGetConfig and
AscInitSetConfig.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Reformat microcode
Matthew Wilcox [Sun, 9 Sep 2007 14:56:29 +0000 (08:56 -0600)]
[SCSI] advansys: Reformat microcode

It's just data, so format it to something that looks more visually
appealing (and saves some lines)

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Create AdvLoadMicrocode
Matthew Wilcox [Sun, 9 Sep 2007 14:56:28 +0000 (08:56 -0600)]
[SCSI] advansys: Create AdvLoadMicrocode

Split AdvLoadMicrocode out of AdvInitAsc3550Driver, AdvInitAsc38C0800Driver
and AdvInitAsc38C1600Driver.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Create AdvBuildCarrierFreelist
Matthew Wilcox [Sun, 9 Sep 2007 14:56:27 +0000 (08:56 -0600)]
[SCSI] advansys: Create AdvBuildCarrierFreelist

Split AdvBuildCarrierFreelist out of AdvInitAsc3550Driver,
AdvInitAsc38C0800Driver and AdvInitAsc38C1600Driver.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Fix VLB driver name
Matthew Wilcox [Sun, 9 Sep 2007 14:56:26 +0000 (08:56 -0600)]
[SCSI] advansys: Fix VLB driver name

You can't have two drivers for the same bus type with the same name.
Since ISA and VLB are both isa_drivers, rename the VLB one to advansys_vlb.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] zfcp: whitespace cleanup
Swen Schillig [Fri, 7 Sep 2007 07:15:31 +0000 (09:15 +0200)]
[SCSI] zfcp: whitespace cleanup

Cleanup the whitepace from the entire zfcp driver to prevent
to have those changes in future feature or function patches.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] mpt fusion: remove redundant memset
Mariusz Kozlowski [Fri, 10 Aug 2007 21:50:53 +0000 (14:50 -0700)]
[SCSI] mpt fusion: remove redundant memset

alloc_fcdev() calls alloc_netdev() which uses kzalloc to alloc all the
memory together with dev->priv region hence no zeroing of structs inside
struct mpt_lan_priv needed.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Acked-by: "Moore, Eric Dean" <Eric.Moore@lsil.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] mpt fusion: fix two potential mem leaks
Jesper Juhl [Fri, 10 Aug 2007 21:50:51 +0000 (14:50 -0700)]
[SCSI] mpt fusion: fix two potential mem leaks

The Coverity checker spotted two potential memory leaks in
drivers/message/fusion/mptbase.c::mpt_attach().

There are two returns that may leak the storage allocated for 'ioc'
(sizeof(MPT_ADAPTER) bytes).

A simple fix would be to simply add two kfree() calls before the return
statements, but a better fix (that this patch implements) is to reorder the
code so that if we hit the first return condition we don't have to do the
allocation at all and then just add a kfree() call for the second case.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: "Moore, Eric Dean" <Eric.Moore@lsil.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] mpt fusion: mostly kmalloc + memset conversion to kzalloc
Mariusz Kozlowski [Fri, 10 Aug 2007 21:50:50 +0000 (14:50 -0700)]
[SCSI] mpt fusion: mostly kmalloc + memset conversion to kzalloc

This patch does kmalloc + memset conversion to kzalloc anSigned-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
d simplifies mptctl_probe().

 drivers/message/fusion/mptctl.c | 82092 -> 81884 (-208 bytes)
 drivers/message/fusion/mptctl.o | 201784 -> 200648 (-1136 bytes)

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Acked-by: "Moore, Eric Dean" <Eric.Moore@lsil.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] mpt fusion: Use menuconfig objects
Jan Engelhardt [Fri, 10 Aug 2007 21:50:37 +0000 (14:50 -0700)]
[SCSI] mpt fusion: Use menuconfig objects

Change Kconfig objects from "menu, config" into "menuconfig" so
that the user can disable the whole feature without having to
enter the menu first.

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Acked-by: "Moore, Eric Dean" <Eric.Moore@lsil.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] srp_transport: convert to use supported_mode attribute
FUJITA Tomonori [Fri, 31 Aug 2007 17:03:39 +0000 (02:03 +0900)]
[SCSI] srp_transport: convert to use supported_mode attribute

srp transport works for target drivers without supported_mode
attribute but it would be better to use it explicitly.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] fc_transport: add target driver support
FUJITA Tomonori [Fri, 31 Aug 2007 17:02:27 +0000 (02:02 +0900)]
[SCSI] fc_transport: add target driver support

This adds minimum target driver support like the srp transport does:

- fc_remote_port_{rolechg,delete} calls
scsi_tgt_it_nexus_{create,destroy} for target drivers.

- add callbacks to notify target drivers of the nexus and tmf
operation results to fc_function_template.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] add supported_mode and active_mode attributes to the host
FUJITA Tomonori [Fri, 31 Aug 2007 17:02:20 +0000 (02:02 +0900)]
[SCSI] add supported_mode and active_mode attributes to the host

This adds supported_mode and active_mode attributes to
/sys/class/sys_host/hostX/ for specifying the mode that a lld supports
and the currently activated mode. The output format is similar to fc
rport roles:

luce:/sys/class/scsi_host/host0$ cat supported_mode
Initiator
luce:/sys/class/scsi_host/host0$ cat active_mode
Initiator

The mode values uses bitmap since we would support dual-mode llds in
the future like this:

luce:/sys/class/scsi_host/host0$ cat supported_mode
Initiator, Target

The supported_mode attribute looks at a scsi_host_template and the
active_mode attribute looks at a scsi_host. We would add a hook to a
scsi_host_template to change the active_mode attribute
dynamically. But now there is no hook since no lld supports that
feature.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] tgt: fix can_queue bug
FUJITA Tomonori [Fri, 31 Aug 2007 17:02:16 +0000 (02:02 +0900)]
[SCSI] tgt: fix can_queue bug

should use host->can_queue instead of host->hostt->can_queue.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] aic94xx: Add new PCI ID for ASC58300
Gilbert Wu [Wed, 5 Sep 2007 23:04:29 +0000 (16:04 -0700)]
[SCSI] aic94xx: Add new PCI ID for ASC58300

Add new HBA PCI ID (0x416) for ASC58300 which has eight port SAS and
SATA PCI-X 133MHz low profile host bus adapter with two mini SAS 4x
external connectors.

Signed-off-by: Gilbert Wu <gilbert_wu@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] aacraid: Add documentation for new Adaptec, SMC and SUN cards
Salyzyn, Mark [Tue, 4 Sep 2007 16:55:47 +0000 (12:55 -0400)]
[SCSI] aacraid: Add documentation for new Adaptec, SMC and SUN cards

Add the SMC LP, SUN EM and Adaptec 5405 cards to the aacraid
documentation list of supported products. These cards are picked up with
family match, so no associated code changes.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] hptiop: adding new firmware interface and more PCI device IDs
HighPoint Linux Team [Thu, 30 Aug 2007 10:06:21 +0000 (18:06 +0800)]
[SCSI] hptiop: adding new firmware interface and more PCI device IDs

updated patch based on Jeff Garzik's comments.

- check adapter firmware version and use appropriate interface accordingly
- add new PCI device IDs and use PCI_VDEVICE macro
- update driver version string
- remove unused data structures
- remove unnecessary typecasts

Signed-off-by: HighPoint Linux Team <linux@highpoint-tech.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] zfcp: Enable debug feature before setting adapter online
Christof Schmitt [Tue, 28 Aug 2007 07:31:41 +0000 (09:31 +0200)]
[SCSI] zfcp: Enable debug feature before setting adapter online

Already register the debug feature before the zfcp adapter is
set online. This allows to use the debug feature to investigate
the online/offline sequence.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] zfcp: cleanup, separation of ERP, non ERP-version for exchange_ functions
Swen Schillig [Tue, 28 Aug 2007 07:31:09 +0000 (09:31 +0200)]
[SCSI] zfcp: cleanup, separation of ERP, non ERP-version for exchange_ functions

cleanup, using ERP request mempool for all ERP versions of
the exchange functions (exchange_config (ECD), exchange_port (EPD) )
providing individual versions of the ECD, EPD functions for ERP
and other purposes (_sync).

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] scsi_transport_fc: Introduce disable_target_scan flag
Christof Schmitt [Tue, 28 Aug 2007 07:31:21 +0000 (09:31 +0200)]
[SCSI] scsi_transport_fc: Introduce disable_target_scan flag

This change has already been discussed on linux-scsi:
http://marc.info/?t=118771096400003
http://marc.info/?t=118760913100005

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Acked-by: James Smart <James.Smart@Emulex.Com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] zfcp: Remove braces for only one statement
Christof Schmitt [Tue, 28 Aug 2007 07:30:59 +0000 (09:30 +0200)]
[SCSI] zfcp: Remove braces for only one statement

Remove braces for only one statement

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] zfcp: Remove unnecessary assignment
Christof Schmitt [Tue, 28 Aug 2007 07:30:50 +0000 (09:30 +0200)]
[SCSI] zfcp: Remove unnecessary assignment

zfcp_adapter_enqueue initialized adapter->ccw_device twice with
the same value. Remove the second assignment, since it is not
necessary.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] zfcp: avoid if (whatever) ; constructs.
Heiko Carstens [Tue, 28 Aug 2007 07:30:42 +0000 (09:30 +0200)]
[SCSI] zfcp: avoid if (whatever) ; constructs.

Avoid "if (whatever) ;" constructs since they seem to confuse people,
even if there is a comment.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] zfcp: correct indentation for nested if-else
Christof Schmitt [Tue, 28 Aug 2007 07:30:22 +0000 (09:30 +0200)]
[SCSI] zfcp: correct indentation for nested if-else

correct indentation for nested if-else

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] kmalloc + memset conversion to kzalloc
Mariusz Kozlowski [Sat, 11 Aug 2007 08:13:24 +0000 (10:13 +0200)]
[SCSI] kmalloc + memset conversion to kzalloc

In NCR_D700, a4000t, aic7xxx_old, bvme6000, dpt_i2o, gdth, lpfc,
megaraid, mvme16x osst, pluto, qla2xxx, zorro7xx

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] mpt fusion: Change company name from LSI Logic to LSI
Prakash, Sathya [Tue, 14 Aug 2007 10:52:54 +0000 (16:22 +0530)]
[SCSI] mpt fusion: Change company name from LSI Logic to LSI

Recently LSI Logic Corp was renamed as LSI Corp, so whereever there is
a reference of LSI Logic, it is changed to LSI in mpt fusion driver
code.

signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Acked-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] mpt fusion: Link speed change display support
Prakash, Sathya [Tue, 14 Aug 2007 10:49:32 +0000 (16:19 +0530)]
[SCSI] mpt fusion: Link speed change display support

When there is state change in FC links, a message is displayed with
old and new link speed.

signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Acked-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] mpt fusion: Creation of mptsas.h header file
Prakash, Sathya [Tue, 14 Aug 2007 10:45:38 +0000 (16:15 +0530)]
[SCSI] mpt fusion: Creation of mptsas.h header file

The data structure definitions from mptsas.c are moved to a new header
file mptsas.h

signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Acked-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] mpt fusion: Change call back indices to u8 from int
Prakash, Sathya [Tue, 14 Aug 2007 10:42:53 +0000 (16:12 +0530)]
[SCSI] mpt fusion: Change call back indices to u8 from int

The call back index requires only u8 but in lot of places it is
referred as int, now everywhere the call back index variables are
declared as u8 with uniform name cb_idx

signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Acked-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] mpt fusion: Usage of high priority request FIFO to send task management commands
Prakash, Sathya [Tue, 14 Aug 2007 10:38:40 +0000 (16:08 +0530)]
[SCSI] mpt fusion: Usage of high priority request FIFO to send task management commands

Added support for sending the task management requests through High priority
request FIFO instead of Doorbell writes when firmware support High priority
FIFO.

signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Acked-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] mpt fusion: Add support for ATTO 4LD: Rebranded LSI 53C1030
Eric Moore [Tue, 14 Aug 2007 23:28:27 +0000 (17:28 -0600)]
[SCSI] mpt fusion: Add support for ATTO 4LD: Rebranded LSI 53C1030

Per request from Matthew Wilcox - using PCI_VENDOR_ATTO.

Add support for ATTO UL4D, they are rebranded 53C1030.
The changes are
1. Adding a new PCI vendor ID in pci table
2. The spi_port_page_2 is in different format than that of LSI generic
spi_port_page_2 and hence mapping code is added.

signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] Addition to pci_ids.h for ATTO Technology, Inc.
Eric Moore [Tue, 14 Aug 2007 22:18:02 +0000 (16:18 -0600)]
[SCSI] Addition to pci_ids.h for ATTO Technology, Inc.

A new PCI_VENDOR_ID for pci_ids.h.

signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] dtc: clean up indent damage and add printk levels
Alan Cox [Fri, 10 Aug 2007 21:50:41 +0000 (14:50 -0700)]
[SCSI] dtc: clean up indent damage and add printk levels

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] make scsi_decode_sense_buffer and scsi_decode_sense_extras static
Adrian Bunk [Fri, 10 Aug 2007 21:50:43 +0000 (14:50 -0700)]
[SCSI] make scsi_decode_sense_buffer and scsi_decode_sense_extras static

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] NCR5380: fix NCR53C400_PSEUDO_DMA is not defined
Gabriel C [Fri, 10 Aug 2007 21:50:39 +0000 (14:50 -0700)]
[SCSI] NCR5380: fix NCR53C400_PSEUDO_DMA is not defined

In file included from drivers/scsi/g_NCR5380_mmio.c:9:
drivers/scsi/g_NCR5380.c:559:5: warning: "NCR53C400_PSEUDO_DMA" is not defined

Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] scsi_error.c should #include "scsi_transport_api.h"
Adrian Bunk [Fri, 10 Aug 2007 21:50:42 +0000 (14:50 -0700)]
[SCSI] scsi_error.c should #include "scsi_transport_api.h"

Every file should #include the headers containing the prototypes for its
global functions (in this case for scsi_schedule_eh()).

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] ips: warning fix
Andrew Morton [Fri, 10 Aug 2007 21:50:52 +0000 (14:50 -0700)]
[SCSI] ips: warning fix

drivers/scsi/ips.c: In function 'ips_insert_device':
drivers/scsi/ips.c:6957: warning: 'index' may be used uninitialized in this function

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] NCR_D700, lpfc: Clean up duplicate includes
Jesper Juhl [Fri, 10 Aug 2007 21:50:38 +0000 (14:50 -0700)]
[SCSI] NCR_D700, lpfc: Clean up duplicate includes

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: James Smart <james.smart@emulex.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] aacraid: rename check_reset
Andrew Morton [Fri, 10 Aug 2007 21:50:30 +0000 (14:50 -0700)]
[SCSI] aacraid: rename check_reset

Too generic, clashes with ISDN.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] lpfc: fix potential overflow of hbqs array
Jesper Juhl [Thu, 9 Aug 2007 18:47:15 +0000 (20:47 +0200)]
[SCSI] lpfc: fix potential overflow of hbqs array

The Coverity checker noticed that we may overrun a statically allocated
array in drivers/scsi/lpfc/lpfc_sli.c::lpfc_sli_hbqbuf_find().

The case is this; In 'struct lpfc_hba' we have

#define LPFC_MAX_HBQS  4
...
struct lpfc_hba {
...
struct hbq_s hbqs[LPFC_MAX_HBQS];
...
};

But then in lpfc_sli_hbqbuf_find() we have this code

hbqno = tag >> 16;
if (hbqno > LPFC_MAX_HBQS)
return NULL;

if 'hbqno' ends up as exactely 4, then we won't return, and then this

list_for_each_entry(d_buf, &phba->hbqs[hbqno].hbq_buffer_list, list) {

will cause an overflow of the statically allocated array at index 4,
since the valid indices are only 0-3.

I propose this patch, that simply changes the 'hbqno > LPFC_MAX_HBQS'
into 'hbqno >= LPFC_MAX_HBQS' as a possible fix.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: James Smart <James.Smart@Emulex.Com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] fc4: convert to use the data buffer accessors
FUJITA Tomonori [Tue, 7 Aug 2007 08:38:20 +0000 (17:38 +0900)]
[SCSI] fc4: convert to use the data buffer accessors

- remove the unnecessary map_single path.

- convert to use the new accessors for the sg lists and the
parameters.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Move documentation to Documentation/scsi
Matthew Wilcox [Mon, 30 Jul 2007 14:41:03 +0000 (08:41 -0600)]
[SCSI] advansys: Move documentation to Documentation/scsi

The 700+-line comment at the top of the advansys driver fits more comfortably
in Documentation/scsi.

Delete the sections on:
 - kernels supported
 - other files modified (obsolete)
 - source comments (obsolete)
 - tests to run
 - release history (that's what a VCS is for)
 - contacting connectcom (the domain has expired and the phone number is
   now in use by another organisation)

Known problems/fix list is moved down to the section where jejb put his FIXME.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: use memcpy instead of open-coded loop
Matthew Wilcox [Thu, 26 Jul 2007 15:58:12 +0000 (11:58 -0400)]
[SCSI] advansys: use memcpy instead of open-coded loop

Use memcpy to initialise eep_config instead of a loop.  For
AdvInitFrom38C1600EEP where we need to modify the default EEPROM
configuration, do it after the loop, and do it using the structure
definition, not by finding the right byte.  I think it was wrong for
big-endian machines.

Also delete some non-useful comments and prototypes.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Remove pci_slot_info
Matthew Wilcox [Mon, 30 Jul 2007 14:10:23 +0000 (08:10 -0600)]
[SCSI] advansys: Remove pci_slot_info

The driver kept a copy of the PCI config address; refer to the pci_dev
associated with the card instead.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Remove library-style callback routines
Matthew Wilcox [Thu, 26 Jul 2007 15:57:06 +0000 (11:57 -0400)]
[SCSI] advansys: Remove library-style callback routines

Convert adv_isr_callback, adv_async_callback and asc_isr_callback into
direct calls.  Remove the unused asc_exe_callback.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Move struct device out of the cfg structures
Matthew Wilcox [Thu, 26 Jul 2007 15:56:40 +0000 (11:56 -0400)]
[SCSI] advansys: Move struct device out of the cfg structures

The cfg structures are supposed to be disposable after initialisation;
with the 'dev' used for DMA mapping in there, that's not possible.  Move
the dev to the board.

Also inline AscInitFromAscDvcVar into its only caller, remove some
unnecessary prototypes and sort out a few minor formatting issues.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Stop using n_io_port in Scsi_Host structure
Matthew Wilcox [Thu, 26 Jul 2007 15:55:34 +0000 (11:55 -0400)]
[SCSI] advansys: Stop using n_io_port in Scsi_Host structure

n_io_port isn't suitable for advansys because some of the boards have
more than 255 bytes of io port space.  There's already a driver-private
replacement, asc_n_io_port, but for some reason the driver was still
setting and occasionally reporting n_io_port.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: ioremap no longer needs page-aligned addresses
Matthew Wilcox [Thu, 26 Jul 2007 15:55:07 +0000 (11:55 -0400)]
[SCSI] advansys: ioremap no longer needs page-aligned addresses

At some point during Linux 2.1 development, ioremap() gained the ability
to handle addresses which weren't page-aligned.  Also expand the CONFIG_PCI
range to encompass that entire section of wide board initialisation, since
all wide boards are PCI.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: delete AscGetChipBusType
Matthew Wilcox [Thu, 26 Jul 2007 15:54:15 +0000 (11:54 -0400)]
[SCSI] advansys: delete AscGetChipBusType

By moving a test from AscGetChipBusType into its only caller, we can delete
the whole function

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: misc reformatting
Matthew Wilcox [Mon, 30 Jul 2007 14:08:22 +0000 (08:08 -0600)]
[SCSI] advansys: misc reformatting

Remove some useless forward declarations
Reformat some comments, debug messages, and the occasional piece of real code
Removal of unnecessary braces
Remove duplicate setting of shost->irq

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: remove INQUIRY sniffing
Matthew Wilcox [Thu, 26 Jul 2007 15:41:33 +0000 (11:41 -0400)]
[SCSI] advansys: remove INQUIRY sniffing

Use slave_configure() to do all the work that used to be done in
AscInquiryHandling and AdvInquiryHandling.  Split slave_configure into
two functions, one for wide and one for narrow controllers.

Remove some unused definitions, duplicate definitions, unnecessary
declarations, and scsireqq, cap_info and inquiry from struct asc_board.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] Add QUANTUM XP34301 to the blacklist
Matthew Wilcox [Thu, 26 Jul 2007 15:39:46 +0000 (11:39 -0400)]
[SCSI] Add QUANTUM XP34301 to the blacklist

According to the AdvanSys driver, this device has a problem with tagged
queueing.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: remove AscCompareString()
Matthew Wilcox [Thu, 26 Jul 2007 15:39:17 +0000 (11:39 -0400)]
[SCSI] advansys: remove AscCompareString()

AscCompareString() is just another name for strncmp

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: More PCI cleanups
Matthew Wilcox [Fri, 27 Jul 2007 03:51:47 +0000 (21:51 -0600)]
[SCSI] advansys: More PCI cleanups

 - Remove wrappers around the PCI configuration space accessors
 - Call pci_set_master() instead of poking at config space directly
 - Move the latency setting into one function called for both narrow and
   wide boards.
 - Tidy up AdvInitGetConfig() a little.
 - Delete a few unused prototypes and definitions.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Update resource management
Matthew Wilcox [Mon, 30 Jul 2007 14:04:53 +0000 (08:04 -0600)]
[SCSI] advansys: Update resource management

Make sure the resources are reserved and released by all the callers of
advansys_board_found().  This eliminates the check_region-style race.
It also allows us to use the pci_request_regions() API.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Convert to ISA driver model
Matthew Wilcox [Mon, 30 Jul 2007 15:18:45 +0000 (09:18 -0600)]
[SCSI] advansys: Convert to ISA driver model

Register two isa_drivers, one for ISA and one for VLB, in order to
preserve detection order.  When deleting advansys_detect, we lose the
last vestiges of the code that limited IO port scanning.  This code
has been effectively disabled for many years anyway; I'll restore it
in a module_param later.  We also lose the code that placed all ISA PnP
cards into WaitForKey state -- drivers shouldn't be doing this anyway.
The asc_host array goes away too.  Also remove some IOADR and other
definitions, such as ASC_NUM_BOARD_SUPPORTED.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Convert to EISA driver model
Matthew Wilcox [Mon, 30 Jul 2007 15:14:52 +0000 (09:14 -0600)]
[SCSI] advansys: Convert to EISA driver model

 - Switch EISA probing to the driver model
 - Remove some now-unused macros and functions
 - Update the FIXME now that we use the correct driver model probing API

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Convert to PCI driver model
Matthew Wilcox [Mon, 30 Jul 2007 03:46:15 +0000 (21:46 -0600)]
[SCSI] advansys: Convert to PCI driver model

 - Add a pci_driver interface for the PCI advansys devices (for
   ISA/EISA/VLB devices, we still call advansys_detect).
 - Many functions are converted from __init to __devinit to allow hotplug
   PCI to work.
 - Only keep devices found by advansys_detect in the asc_host list.
 - Rename asc_board_count to asc_legacy_count.  New asc_board_count is only
   used to generate a unique name for each device.
 - Remove some now-unused macros and struct definitions

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Move to scsi hotplug initialisation model
Matthew Wilcox [Mon, 30 Jul 2007 15:08:34 +0000 (09:08 -0600)]
[SCSI] advansys: Move to scsi hotplug initialisation model

 - Switch from scsi_register/scsi_unregister to scsi_host_alloc,
   scsi_add_host, scsi_scan_host and scsi_host_put.
 - Rename the scsi_host_template to advansys_template
 - Use module_init and module_exit instead of scsi_module.c
 - Remove protection against advansys_detect being called twice

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Make advansys_board_found a little more readable
Matthew Wilcox [Sun, 29 Jul 2007 23:30:28 +0000 (17:30 -0600)]
[SCSI] advansys: Make advansys_board_found a little more readable

 - Put all the error cleanup at the end of the function and goto the
   appropriate label
 - Split advansys_wide_init_chip out of advansys_board_found
 - Split advansys_wide_free_mem out of advansys_board_found.  Use it
   from advansys_release
 - Use GFP_KERNEL, not GFP_ATOMIC, when allocating memory during
   initialisation
 - Eliminate lots of PROC_FS ifdefs by removing the ifdefs around the prtbuf
   struct member

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Stop checking the scsi_cmnd belongs to our Scsi_Host
Matthew Wilcox [Sun, 29 Jul 2007 23:27:20 +0000 (17:27 -0600)]
[SCSI] advansys: Stop checking the scsi_cmnd belongs to our Scsi_Host

The interrupt routines used to walk the list of Scsi_Hosts belonging to
this driver to make sure that the scsi_cmnd belonged to one of them.
This is a waste of time and gets in the way of later cleanups, so
delete it.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Improve interrupt handler
Matthew Wilcox [Sun, 29 Jul 2007 05:11:05 +0000 (23:11 -0600)]
[SCSI] advansys: Improve interrupt handler

Pass the Scsi_Host to the interrupt handler, rather than polling all
hosts for each interrupt.
Return IRQ_NONE if we didn't handle this interrupt
Don't set the IRQF_DISABLED flag; this is not a fast-executing interrupt
handler.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Clean up proc_info implementation
Matthew Wilcox [Thu, 26 Jul 2007 15:00:51 +0000 (11:00 -0400)]
[SCSI] advansys: Clean up proc_info implementation

Just use the Scsi_Host passed in, rather than looking through the driver's
own array of boards for one that matches it.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: undate version, copyright, etc
Matthew Wilcox [Thu, 26 Jul 2007 15:03:19 +0000 (11:03 -0400)]
[SCSI] advansys: undate version, copyright, etc

Update the version to 3.4
Add my copyright
Add myself to MAINTAINERS
Exercise my right to change the license from dual BSD/GPL to GPL
Don't force the definition of CONFIG_ISA on x86
Always include pci.h
Stop including stat.h

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] sg: increase sglist_len of the sg_scatter_hold structure
FUJITA Tomonori [Sun, 5 Aug 2007 15:31:24 +0000 (00:31 +0900)]
[SCSI] sg: increase sglist_len of the sg_scatter_hold structure

unsigned short is too small for sizeof(struct scatterlist) *
min(q->max_hw_segments, q->max_phys_segments).

This fixes memory leak with 4096 segments since 16 (likely sg size
with x86) * 4096 sets sglist_len to zero.

This might not happen without sg chaining support.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] Fix async scanning double-add problems
Matthew Wilcox [Tue, 26 Jun 2007 21:18:51 +0000 (15:18 -0600)]
[SCSI] Fix async scanning double-add problems

Stress-testing and some thought has revealed some places where
asynchronous scanning needs some more attention to locking.

 - Since async_scan is a bit, we need to hold the host_lock while
   modifying it to prevent races against other CPUs modifying the word
   that bit is in.  This is probably a theoretical race for the moment,
   but other patches may change that.
 - The async_scan bit means not only that this host is being scanned
   asynchronously, but that all the devices attached to this host are not
   yet added to sysfs.  So we must ensure that this bit is always in sync.
   I've chosen to do this with the scan_mutex since it's already acquired
   in most of the right places.
 - If the host changes state to deleted while we're in the middle of
   a scan, we'll end up with some devices on the host's list which must
   be deleted.  Add a check to scsi_sysfs_add_devices() to ensure the
   host is still running.
 - To avoid the async_scan bit being protected by three locks, the
   async_scan_lock now only protects the scanning_list.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] microtek: use data accessors and !use_sg cleanup
Boaz Harrosh [Thu, 12 Jul 2007 13:11:24 +0000 (16:11 +0300)]
[SCSI] microtek: use data accessors and !use_sg cleanup

  - use scsi_cmnd data accessors
  - Clean the !use_sg code paths

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
[jejb: merge conflict fix]
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] fix write buffer length in scsi_req_map_sg()
Mike Christie [Tue, 13 Mar 2007 17:52:29 +0000 (12:52 -0500)]
[SCSI] fix write buffer length in scsi_req_map_sg()

sg's may have setup a the buffer with a different length than
the transfer length so we should be using the bufflen passed
in as the request's data len.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] ps3rom: convert to use the data buffer accessors
FUJITA Tomonori [Mon, 23 Jul 2007 00:42:32 +0000 (09:42 +0900)]
[SCSI] ps3rom: convert to use the data buffer accessors

This converts ps3rom driver to use the new accessors for the sg lists
and the parameters.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] scsi_transport_srp: remove tgt dependencies
FUJITA Tomonori [Wed, 1 Aug 2007 15:20:34 +0000 (00:20 +0900)]
[SCSI] scsi_transport_srp: remove tgt dependencies

it's better to remove tgt dependencies in srp transport class since
most people want only initiator support.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] tgt: convert ibmvstgt to use transport tsk_mgmt_response callback
FUJITA Tomonori [Wed, 11 Jul 2007 06:08:24 +0000 (15:08 +0900)]
[SCSI] tgt: convert ibmvstgt to use transport tsk_mgmt_response callback

This converts ibmvstgt to use transport tsk_mgmt_response callback.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] tgt: move tsk_mgmt_response callback to transport class
FUJITA Tomonori [Wed, 11 Jul 2007 06:08:22 +0000 (15:08 +0900)]
[SCSI] tgt: move tsk_mgmt_response callback to transport class

This moves tsk_mgmt_response callback in struct scsi_host_template to
struct scsi_transport_template since struct scsi_transport_template is
more suitable for the task management stuff.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] tgt: convert libsrp and ibmvstgt to use srp_transport
FUJITA Tomonori [Wed, 11 Jul 2007 06:08:21 +0000 (15:08 +0900)]
[SCSI] tgt: convert libsrp and ibmvstgt to use srp_transport

This converts libsrp and ibmvstgt to use srp transport.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] srp_transport: add target driver support
FUJITA Tomonori [Wed, 11 Jul 2007 06:08:19 +0000 (15:08 +0900)]
[SCSI] srp_transport: add target driver support

This adds minimum target driver support:

- srp_rport_{add,del} calls scsi_tgt_it_nexus_{create,destroy} for
target drivers.

- add a callback to notify target drivers of the nexus operation
results to srp_function_template.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] tgt: add I_T nexus support
FUJITA Tomonori [Wed, 11 Jul 2007 06:08:17 +0000 (15:08 +0900)]
[SCSI] tgt: add I_T nexus support

tgt uses scsi_host as I_T nexus. This works for ibmvstgt because it
creates one scsi_host for one initiator. However, other target drivers
don't work like that.

This adds I_T nexus support, which enable one scsi_host to handle
multiple initiators. New scsi_tgt_it_nexus_create/destroy functions
are expected be called transport classes. For example, ibmvstgt
creates an initiator remote port, then the srp transport calls
tgt_it_nexus_create. tgt doesn't manages I_T nexus, instead it tells
tgtd, user-space daemon, to create a new I_T nexus.

On the receiving the response from tgtd, tgt calls
shost->transportt->it_nexus_response. transports should notify a
lld. The srp transport uses it_nexus_response callback in
srp_function_template to do that.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] transport_srp: add rport roles attribute
FUJITA Tomonori [Wed, 11 Jul 2007 06:08:15 +0000 (15:08 +0900)]
[SCSI] transport_srp: add rport roles attribute

This adds a 'roles' attribute to rport like transport_fc. The role can
be initiator or target. That is, the initiator driver creates target
remote ports and the target driver creates initiator remote ports.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] ib_srp: convert to use the srp transport class
FUJITA Tomonori [Wed, 27 Jun 2007 07:33:12 +0000 (16:33 +0900)]
[SCSI] ib_srp: convert to use the srp transport class

This converts ib_srp to use the srp transport class.

I don't have ib hardware so I've not tested this patch.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Roland Dreier <rolandd@cisco.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] ibmvscsi: convert to use the srp transport class
FUJITA Tomonori [Wed, 27 Jun 2007 07:32:50 +0000 (16:32 +0900)]
[SCSI] ibmvscsi: convert to use the srp transport class

This converts ibmvscsi to use the srp transport class.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] add srp transport class
FUJITA Tomonori [Wed, 27 Jun 2007 07:32:39 +0000 (16:32 +0900)]
[SCSI] add srp transport class

This adds srp transport class that works with ib_srp and ibmvscsi.

It creates only /sys/class/{srp_host,srp_remote_ports} and
srp_remote_ports has only "port_id" attribute.

viola:/sys/class/srp_remote_ports/port-0:1# ls
device  port_id  subsystem  uevent
viola:/sys/class/srp_remote_ports/port-0:1# cat port_id
4c:49:4e:55:58:20:56:49:4f:00:00:00:00:00:00:00

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Update version number to 8.02.00-k3.
Andrew Vasquez [Mon, 13 Aug 2007 01:22:57 +0000 (18:22 -0700)]
[SCSI] qla2xxx: Update version number to 8.02.00-k3.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Correct mailbox register dump for FWI2 capable ISPs.
Andrew Vasquez [Mon, 13 Aug 2007 01:22:56 +0000 (18:22 -0700)]
[SCSI] qla2xxx: Correct mailbox register dump for FWI2 capable ISPs.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Correct 8GB iIDMA support.
Andrew Vasquez [Mon, 13 Aug 2007 17:13:18 +0000 (10:13 -0700)]
[SCSI] qla2xxx: Correct 8GB iIDMA support.

Original implementation manipulated the FC_GS values for
port-speed.  Transition the codes to use the driver's own
internal representations as this makes for a reduction in
duplicate 'conversion' codes throughout the driver.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Correct management-server login-state synchronization issue.
Andrew Vasquez [Mon, 13 Aug 2007 01:22:54 +0000 (18:22 -0700)]
[SCSI] qla2xxx: Correct management-server login-state synchronization issue.

Transitioning link-state via NOS/OLS requires a relogin to a
fabric's Management Server.  Request relogin when the firmware
issues a point-to-point asynchronous event (0x8030).

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Don't modify parity bits during ISP25XX restart.
Andrew Vasquez [Mon, 13 Aug 2007 01:22:53 +0000 (18:22 -0700)]
[SCSI] qla2xxx: Don't modify parity bits during ISP25XX restart.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Allocate enough space for the full PCI descriptor.
Andrew Vasquez [Mon, 13 Aug 2007 01:22:52 +0000 (18:22 -0700)]
[SCSI] qla2xxx: Allocate enough space for the full PCI descriptor.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] zfcp: fix the data buffer accessor patch
Heiko Carstens [Wed, 8 Aug 2007 08:47:26 +0000 (10:47 +0200)]
[SCSI] zfcp: fix the data buffer accessor patch

Fix the data buffer accessor patch.

For request without a data buffer nothing was written into
a SBALE.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] zfcp: allocate gid_pn_data objects from gid_pn_cache
Heiko Carstens [Wed, 8 Aug 2007 08:47:10 +0000 (10:47 +0200)]
[SCSI] zfcp: allocate gid_pn_data objects from gid_pn_cache

allocate gid_pn_data objects from gid_pn_cache.

Allocate gid_pn_data objects from the corresponding cache which ensures
proper alignment.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] zfcp: fix memory leak
Heiko Carstens [Wed, 8 Aug 2007 08:47:02 +0000 (10:47 +0200)]
[SCSI] zfcp: fix memory leak

fix memory leak.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes
Linus Torvalds [Tue, 14 Aug 2007 17:00:29 +0000 (10:00 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes:
  [GFS2] Revert remounting w/o acl option leaves acls enabled
  [GFS2] Fix setting of inherit jdata attr
  [GFS2] Fix incorrect error path in prepare_write()
  [GFS2] Fix incorrect return code in rgrp.c
  [GFS2] soft lockup in rgblk_search
  [GFS2] soft lockup detected in databuf_lo_before_commit
  [DLM] fix basts for granted PR waiting CW
  [DLM] More othercon fixes
  [DLM] Fix memory leak in dlm_add_member() when dlm_node_weight() returns less than zero
  [DLM] zero unused parts of sockaddr_storage
  [DLM] fix NULL ls usage
  [DLM] Clear othercon pointers when a connection is closed