sfrench/cifs-2.6.git
16 years ago[SCSI] ide-scsi.: convert to data accessors and !use_sg cleanup
Boaz Harrosh [Tue, 18 Sep 2007 10:27:43 +0000 (12:27 +0200)]
[SCSI] ide-scsi.: convert to data accessors and !use_sg cleanup

 - Convert ide-scsi to the new data accessors and cleanup
   the !use_sg code paths.

  In old code the driver was trying to translate narrow commands,
  if received, to wide commands. This code  path still assumed
  scsi_cmnd->request_buffer is a linear char pointer.
  This means that this driver was broken since 2.6.17.

  As suggested by Christoph Hellwig I set
  use_10_for_rw = 1; and use_10_for_ms = 1;
  for this device and completely killed the translation.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] stale residual returned on write following BUSY retry
Michael Reed [Mon, 17 Sep 2007 22:11:39 +0000 (15:11 -0700)]
[SCSI] stale residual returned on write following BUSY retry

A BUSY status returned on a write request results in a stale residual
being returned when the write ultimately successfully completes.

This can be reproduced as follows:

1) issue immediate mode rewind to scsi tape drive
2) issue write request

The tape drive returns busy.  The low level driver detects underrun and
sets the residual into the scsi command.  The low level driver responds
with (DID_OK << 16) | scsi_status.  scsi_status is 8, hence
status_byte(result) == 4, i.e., BUSY.

scsi_softirq_done() calls scsi_decide_disposition() which returns
ADD_TO_MLQUEUE.  scsi_softirq_done() then calls scsi_queue_insert()
which, on the way to resubmitting the request to the driver, calls
scsi_init_cmd_errh().

The attached patch modifies scsi_init_cmd_errh() to clear the resid
field.  This prevents a "stale" residual from being returned when the
scsi command finally completes without a BUSY status.

Signed-off-by: Michael Reed <mdr@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] MAINTAINERS : mpt fusion mailing list change
Eric Moore [Sat, 15 Sep 2007 01:08:08 +0000 (19:08 -0600)]
[SCSI] MAINTAINERS : mpt fusion mailing list change

Mailing list changed. The former list at mpt_linux_developer@lsi.com is no
longer in service. Please use the new email provided listed in this patch.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] mpt fusion: bump version to 3.04.06
Eric Moore [Sat, 15 Sep 2007 00:52:28 +0000 (18:52 -0600)]
[SCSI] mpt fusion: bump version to 3.04.06

bump version

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] mpt fusion: Kconfig cleanup
Eric Moore [Sat, 15 Sep 2007 00:50:49 +0000 (18:50 -0600)]
[SCSI] mpt fusion: Kconfig cleanup

Adding 949X, 949E, and 1078 to Kconfig.  Adding "depends on FUSION"
required in the FUSION_LOGGING section, and fixing a spelling error.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] mpt fusion: removing Dell copyright
Eric Moore [Sat, 15 Sep 2007 00:49:53 +0000 (18:49 -0600)]
[SCSI] mpt fusion: removing Dell copyright

Some other vender has concerns over this copyright, and Dell has
approved removing it.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] mpt fusion: removing references to hd->ioc
Eric Moore [Sat, 15 Sep 2007 00:49:03 +0000 (18:49 -0600)]
[SCSI] mpt fusion: removing references to hd->ioc

Cleaning up code by accesing the ioc pointer directly instead of via hd->ioc.  In the future, most data members of struct MPT_SCSI_HOST will be either deleted or moved to struct MPT_ADAPTER.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] mpt fusion: rename vdev to vdevice
Eric Moore [Sat, 15 Sep 2007 00:48:19 +0000 (18:48 -0600)]
[SCSI] mpt fusion: rename vdev to vdevice

common naming of vdevice through out driver

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] mpt fusion: adding/removing white space
Eric Moore [Sat, 15 Sep 2007 00:47:40 +0000 (18:47 -0600)]
[SCSI] mpt fusion: adding/removing white space

cleaning up some white space that was introduce in a recent "cb_idx int to u8" patch.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] mpt fusion: standardize printks and debug info
Eric Moore [Sat, 15 Sep 2007 00:46:51 +0000 (18:46 -0600)]
[SCSI] mpt fusion: standardize printks and debug info

Standardize all prints using common MYIOC_s_XXX_FMT macro defined in mptbase.h. Currently the driver uses several different methods to display info, where in some cases the "controller name" generating the printk is not provided.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] arcmsr: fix compile problems
James Bottomley [Sat, 15 Sep 2007 16:41:53 +0000 (11:41 -0500)]
[SCSI] arcmsr: fix compile problems

  CC [M]  drivers/scsi/arcmsr/arcmsr_hba.o
drivers/scsi/arcmsr/arcmsr_attr.c:186: warning: initialization from
incompatible pointer type
drivers/scsi/arcmsr/arcmsr_attr.c:196: warning: initialization from
incompatible pointer type
drivers/scsi/arcmsr/arcmsr_attr.c:206: warning: initialization from
incompatible pointer type
drivers/scsi/arcmsr/arcmsr_hba.c: In function 'arcmsr_alloc_ccb_pool':
drivers/scsi/arcmsr/arcmsr_hba.c:329: warning: assignment from
incompatible pointer type
drivers/scsi/arcmsr/arcmsr_hba.c: At top level:
drivers/scsi/arcmsr/arcmsr_hba.c:101: warning:
'arcmsr_pci_error_detected' declared 'static' but never defined
drivers/scsi/arcmsr/arcmsr_hba.c:102: warning: 'arcmsr_pci_slot_reset'
declared 'static' but never defined

The majority being incorrect casting or the fact that binary attributes
now take an additional argument.

Cc: Nick Cheng <nick.cheng@areca.com.tw>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] arcmsr: 1.20.00.15: add SATA RAID plus other fixes
Nick Cheng [Thu, 13 Sep 2007 09:26:40 +0000 (17:26 +0800)]
[SCSI] arcmsr: 1.20.00.15: add SATA RAID plus other fixes

Description:
** support ARC1200/1201/1202 SATA RAID adapter, which is named
ACB_ADAPTER_TYPE_B
** modify the arcmsr_pci_slot_reset function
** modify the arcmsr_pci_ers_disconnect_forepart function
** modify the arcmsr_pci_ers_need_reset_forepart function 

Signed-off-by: Nick Cheng <nick.cheng@areca.com.tw>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>