firefly-linux-kernel-4.4.55.git
17 years ago[SCSI] gdth: kill gdth_{read,write}[bwl] wrappers
Jeff Garzik [Tue, 2 Oct 2007 20:55:53 +0000 (22:55 +0200)]
[SCSI] gdth: kill gdth_{read,write}[bwl] wrappers

They are direct equivalents to {read,write}[bwl].

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] gdth: Remove 2.4.x support, in-kernel changelog
Jeff Garzik [Tue, 2 Oct 2007 20:54:28 +0000 (22:54 +0200)]
[SCSI] gdth: Remove 2.4.x support, in-kernel changelog

  * Remove in-source changelog.  It's archived permanently in git and
    various kernel archives, and changelogs should exist purely in git.

  * Remove 2.4.x kernel support.  It is an active obstacle to
    modernizing this driver, at this point.  This includes killing
    gdth_kcompat.h which is 100% redundant in modern kernels.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] gdth: split out pci probing
Christoph Hellwig [Tue, 2 Oct 2007 20:51:06 +0000 (22:51 +0200)]
[SCSI] gdth: split out pci probing

Split out per-device pci probing and put it under proper CONFIG_PCI.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] gdth: split out eisa probing
Christoph Hellwig [Tue, 2 Oct 2007 20:49:35 +0000 (22:49 +0200)]
[SCSI] gdth: split out eisa probing

Split eisa probing into it's own helper, and do proper error unwinding.
Protect EISA probind by the proper CONFIG_EISA symbol.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] gdth: split out isa probing
Christoph Hellwig [Tue, 2 Oct 2007 20:48:16 +0000 (22:48 +0200)]
[SCSI] gdth: split out isa probing

(note: this is ontop of Jeff's pci cleanup patch)

Split out isa probing into a helper of it's own.  Error handling is
cleaned up, but errors are not propagated yet.  Also enclose the isa
probe under the proper CONFIG_ISA symbol instead of the !IA64 hack.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years agogdth: Make one abuse of scsi_cmnd less obvious
Matthew Wilcox [Tue, 2 Oct 2007 20:40:22 +0000 (22:40 +0200)]
gdth: Make one abuse of scsi_cmnd less obvious

  Rather than having internal commands abuse scsi_done to call
  gdth_scsi_done, have all the places that use to call scsi_done directly
  call gdth_scsi_done, which now checks whether the command was internal,
  and calls scsi_done if not.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] NCR5380: Use scsi_eh API for REQUEST_SENSE invocation
Boaz Harrosh [Mon, 10 Sep 2007 19:37:45 +0000 (22:37 +0300)]
[SCSI] NCR5380: Use scsi_eh API for REQUEST_SENSE invocation

  - Use new scsi_eh_prep/restor_cmnd() for synchronous
    REQUEST_SENSE invocation.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] usb storage: use scsi_eh API in REQUEST_SENSE execution
Boaz Harrosh [Mon, 10 Sep 2007 19:36:31 +0000 (22:36 +0300)]
[SCSI] usb storage: use scsi_eh API in REQUEST_SENSE execution

  - Use new scsi_eh_prep/restor_cmnd() for synchronous
    REQUEST_SENSE invocation.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] scsi_error: Refactoring scsi_error to facilitate in synchronous REQUEST_SENSE
Boaz Harrosh [Mon, 8 Oct 2007 14:36:45 +0000 (16:36 +0200)]
[SCSI] scsi_error: Refactoring scsi_error to facilitate in synchronous REQUEST_SENSE

 - Drivers/transports that want to send a synchronous REQUEST_SENSE command
   as part of their .queuecommand sequence, have 2 new API's that facilitate
   in doing so and abstract them from scsi-ml internals.

   void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd,
struct scsi_eh_save *sesci, unsigned char *cmnd,
int cmnd_size, int sense_bytes)

   Will hijack a command and prepare it for request sense if needed.
   And will save any later needed info into a scsi_eh_save structure.

   void scsi_eh_restore_cmnd(struct scsi_cmnd* scmd,
struct scsi_eh_save *sesci);

   Will undo any changes done to a command by above function. Making
   it ready for completion.

 - Re-factor scsi_send_eh_cmnd() to use above APIs

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] scsi_error: code cleanup before refactoring of scsi_send_eh_cmnd()
Boaz Harrosh [Mon, 8 Oct 2007 14:35:19 +0000 (16:35 +0200)]
[SCSI] scsi_error: code cleanup before refactoring of scsi_send_eh_cmnd()

  - regrouped variables for easier reviewing of next patch
  - Support of cmnd==NULL in call to scsi_send_eh_cmnd()
  - In the @sense_bytes case set transfer size to the minimum
    size of sense_buffer and passed @sense_bytes. cmnd[4] is
    set accordingly.
  - REQUEST_SENSE is set into cmnd[0] so if @sense_bytes is
    not Zero passed @cmnd should be NULL.
  - Also save/restore resid of failed command.
  - Adjust caller

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] fdomain: fix CONFIG_PCI=n warnings
Gabriel C [Tue, 2 Oct 2007 21:38:02 +0000 (14:38 -0700)]
[SCSI] fdomain: fix CONFIG_PCI=n warnings

I get this warnings on current git when CONFIG_PCI is not set :

drivers/scsi/fdomain.c:390: warning: 'PCI_dev' defined but not used
drivers/scsi/fdomain.c:1768: warning: 'fdomain_pci_tbl' defined but not used

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] dpt_i2o: Fix section mismatch
Joe Korty [Tue, 2 Oct 2007 21:38:08 +0000 (14:38 -0700)]
[SCSI] dpt_i2o: Fix section mismatch

Fix section mismatch in the Adaptec DPT SCSI Raid driver.

WARNING: vmlinux.o(.init.text+0x1fcd2): Section mismatch:
reference to .exit.text:adpt_exit (between 'adpt_init' and 'ahc_linux_init')

This warning is due to adaptec device detection calling the exit routine on
failure to properly register the adaptec device.

The exit routine + call was added on July 30 by

Commit: 55d9fcf57ba5ec427544fca7abc335cf3da78160
Author: Matthew Wilcox
Subject: [SCSI] dpt_i2o: convert to SCSI hotplug model.

Mathew: isn't a module exit routine a little too strong to be calling on the
failure of a single device?  Module exit implies that other, non-failing
adaptec raid devices will also get shut down.

Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] scsi_transport_iscsi: add list, mutex includes
Michael S. Tsirkin [Tue, 2 Oct 2007 21:38:05 +0000 (14:38 -0700)]
[SCSI] scsi_transport_iscsi: add list, mutex includes

scsi/scsi_transport_iscsi.h uses struct mutex and struct list_head,
so while linux/mutex.h and linux/list.h seem to be pulled in indirectly
by one of the headers it includes, the right thing
is to include linux/mutex.h and linus/list.h directly.

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Acked-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] imm: fix check-after-use
Adrian Bunk [Tue, 2 Oct 2007 21:38:09 +0000 (14:38 -0700)]
[SCSI] imm: fix check-after-use

The Coverity checker spotted that we have already oops'ed if "cmd"
was NULL.

Since "cmd" being NULL doesn't seem to be possible at this point this
patch removes the NULL check.

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] arcmsr: build fix
Andrew Morton [Tue, 2 Oct 2007 21:37:59 +0000 (14:37 -0700)]
[SCSI] arcmsr: build fix

drivers/scsi/arcmsr/arcmsr_hba.c:129: error: 'arcmsr_pci_error_detected' undeclared here (not in a function)
drivers/scsi/arcmsr/arcmsr_hba.c:130: error: 'arcmsr_pci_slot_reset' undeclared here (not in a function)

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] nsp_cs: remove kernel 2.4 code
Adrian Bunk [Tue, 2 Oct 2007 21:38:01 +0000 (14:38 -0700)]
[SCSI] nsp_cs: remove kernel 2.4 code

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] ibmmca: Remove dead references to MODULE_PARM macro
Robert P. J. Day [Tue, 2 Oct 2007 21:38:02 +0000 (14:38 -0700)]
[SCSI] ibmmca: Remove dead references to MODULE_PARM macro

Remove the useless references to the obsolete MODULE_PARM macro.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Changes to work on parisc
Matthew Wilcox [Wed, 3 Oct 2007 01:55:42 +0000 (21:55 -0400)]
[SCSI] advansys: Changes to work on parisc

Change PortAddr to be an unsigned int instead of an unsigned short (IO
Port address are 24 bit on parisc).  Fix a couple of printk argument
warnings.  Remove the Kconfig marking as 'BROKEN'.

I haven't removed the #warning yet because virt_to_bus/bus_to_virt are
only eliminated for narrow boards.  Wide boards need more work.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Use dma mapping for overrun buffer
Matthew Wilcox [Wed, 3 Oct 2007 01:55:41 +0000 (21:55 -0400)]
[SCSI] advansys: Use dma mapping for overrun buffer

Convert the call to virt_to_bus() into a call to dma_map_single().  Some
architectures may require different DMA addresses for different devices,
so allocate one overrun buffer per host rather than one for all cards.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Remove a couple of uses of bus_to_virt
Matthew Wilcox [Wed, 3 Oct 2007 01:55:40 +0000 (21:55 -0400)]
[SCSI] advansys: Remove a couple of uses of bus_to_virt

Replace ASC_VADDR_TO_U32 and ASC_U32_TO_VADDR with an auto-expanding
array that maps pointers to 32-bit IDs and back.  One of the uses of
ASC_VADDR_TO_U32 was in error; it should have been using ADV_VADDR_TO_U32.

Also replace the use of virt_to_bus when setting the sense_address with
a call to dma_map_single() followed by dma_cache_sync.  This part cribbed
from the 53c700 driver.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: convert to use the data buffer accessors
Matthew Wilcox [Wed, 3 Oct 2007 01:55:39 +0000 (21:55 -0400)]
[SCSI] advansys: 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>
- convert the statistics to not distinguish between single and sg xfers
- replace ASC_CEILING with DIV_ROUND_UP
- remove an obsolete comment

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Remove DvcGetPhyAddr
Matthew Wilcox [Wed, 3 Oct 2007 01:55:38 +0000 (21:55 -0400)]
[SCSI] advansys: Remove DvcGetPhyAddr

This rather complex function boiled down to calling virt_to_bus().
Also get rid of some obsolete defines and variables that could never vary.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Move a couple of fields from struct board to struct adv_dvc
Matthew Wilcox [Wed, 3 Oct 2007 01:55:37 +0000 (21:55 -0400)]
[SCSI] advansys: Move a couple of fields from struct board to struct adv_dvc

board->carrp is a duplicate of asc_dvc->carrier_buf, so cut out the
middle-man and assign directly to carrier_buf.  Move orig_reqp to adv_dvc
too, since it's wide-board specific.  Also eliminate an unnecessary BUG_ON
(we'll never get there with a NULL carrier_buf, and will crash if we do).
The bulk of this patch is rearranging structures so everything's declared
in the right order.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Make sdtr_period_tbl a pointer
Matthew Wilcox [Wed, 3 Oct 2007 01:55:36 +0000 (21:55 -0400)]
[SCSI] advansys: Make sdtr_period_tbl a pointer

It's somewhat neater to make this a pointer to one of two tables
than initialising an array in the driver.  Also delete the unused
AscSynIndexToPeriod and rename host_init_sdtr_index to min_sdtr_index

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Get rid of board index number
Matthew Wilcox [Wed, 3 Oct 2007 01:55:35 +0000 (21:55 -0400)]
[SCSI] advansys: Get rid of board index number

It's always a mistake to have your own index of boards; just use the
scsi host number.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Remove private lock
Matthew Wilcox [Wed, 3 Oct 2007 01:55:34 +0000 (21:55 -0400)]
[SCSI] advansys: Remove private lock

The board lock was essentially identical with the host lock.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Sort out debug macros
Matthew Wilcox [Wed, 3 Oct 2007 01:55:33 +0000 (21:55 -0400)]
[SCSI] advansys: Sort out debug macros

Replace ASC_DBG{,1,2,3,4,5} with a single variadic macro ASC_DBG.  As
suggested by Jeff Garzik, include DRV_NAME and __FUNCTION__ in the output.
Change all callers to no longer include the function name in the string.

Enabling ADVANSYS_DEBUG to test this feature shows a lot of other problems
that need to be fixed:
 - Reorder asc_prt_* functions now that their prototypes have been removed.
 - There is no longer a struct device in ASC_DVC_CFG/ADV_DVC_CFG, and it
   wasn't necessarily a PCI device to begin with.  Print the bus_id from
   asc_board->dev instead.
 - isr_callback no longer exists.
 - ASC_DBG_PRT_SCSI_CMND isn't being used, so delete asc_prt_scsi_cmnd
   too.
 - A missing semicolon

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Remove library version & serial numbers
Matthew Wilcox [Wed, 3 Oct 2007 01:55:32 +0000 (21:55 -0400)]
[SCSI] advansys: Remove library version & serial numbers

With the ASC and ADV libraries merged into the driver, there really is
no point in reporting their version numbers, or even trying to maintain
them.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Remove asc_board_t typedef and ASC_BOARDP macro
Matthew Wilcox [Wed, 3 Oct 2007 01:55:31 +0000 (21:55 -0400)]
[SCSI] advansys: Remove asc_board_t typedef and ASC_BOARDP macro

asc_board_t was simply a typedef for struct asc_board.  ASC_BOARDP()
can be replaced by shost_priv() except in the ASC_STATS* macros which
rely on the cast; add an explicit cast there.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Merge ASC_IERR definitions
Matthew Wilcox [Wed, 3 Oct 2007 01:55:30 +0000 (21:55 -0400)]
[SCSI] advansys: Merge ASC_IERR definitions

There were two blocks of ASC_IERR definitions; one for narrow and one for
wide boards.  Some of the same names were used (with the same values),
and some of the same values were used with different names.  This could
only lead to confusion, so I unified them in one block of definitions
with no overlapping values.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Sort out irq number mess
Matthew Wilcox [Wed, 3 Oct 2007 01:55:29 +0000 (21:55 -0400)]
[SCSI] advansys: Sort out irq number mess

The interrupt number was being stored in 4-5 different places, each with
its own type, rules and usage.  Fix this by keeping an unsigned int in
the struct asc_board, and filling it in from the bus probe functions
(since it's different for each of the four bus types).  In order to do
this, we have to allocate the Scsi_Host in the bus probe functions too.
Then we can return an error from advansys_board_found, which requires
a little rearranging of code (and removing of the err_code variable).
Move the Wide Board flag setting into the PCI bus probe function.

Split the AscGetChipIRQ function into three functions (one for each bus
type that needs it) and add some commentary to explain what's going on.
Also get rid of the AscSetChipIRQ function as we only ever set the
interrupt number to the same value it already had.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Remove ASC_WIDE_BOARD predicate
Matthew Wilcox [Wed, 3 Oct 2007 01:55:28 +0000 (21:55 -0400)]
[SCSI] advansys: Remove ASC_WIDE_BOARD predicate

Replace it with !ASC_NARROW_BOARD

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Remove ASC_SELECT_QUEUE_DEPTHS
Matthew Wilcox [Wed, 3 Oct 2007 01:55:27 +0000 (21:55 -0400)]
[SCSI] advansys: Remove ASC_SELECT_QUEUE_DEPTHS

It was only ever set; never tested, nor cleared.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Improve reset handler
Matthew Wilcox [Wed, 3 Oct 2007 01:55:26 +0000 (21:55 -0400)]
[SCSI] advansys: Improve reset handler

 - Don't need to set ASC_HOST_IN_RESET any more
 - Don't need to test scp->device->host for NULL -- if it's NULL, we
   couldn't've been called.
 - Use scmd_printk instead of ASC_PRINT

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Fix simultaneous calls to ->queuecommand
Matthew Wilcox [Wed, 3 Oct 2007 01:55:25 +0000 (21:55 -0400)]
[SCSI] advansys: Fix simultaneous calls to ->queuecommand

The narrow board used two global structures to set up a command;
unfortunately they weren't locked, so with two boards in the machine,
one call to queuecommand could corrupt the data being used by the other
call to queuecommand.

Fix this by allocating asc_scsi_q on the stack (64 bytes) and using kmalloc
for the asc_sg_head (2k)

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Restructure asc_execute_scsi_cmnd()
Matthew Wilcox [Wed, 3 Oct 2007 01:55:24 +0000 (21:55 -0400)]
[SCSI] advansys: Restructure asc_execute_scsi_cmnd()

The wide and narrow boards share identical handling of the return value,
except for some trivial error messages.  Move the handling to the common
end of the function.  Also move variable declarations to the arms of
the `if' that they're used in and delete some pointless comments.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Remove array of scsi targets
Matthew Wilcox [Wed, 3 Oct 2007 01:55:23 +0000 (21:55 -0400)]
[SCSI] advansys: Remove array of scsi targets

The driver was saving a scsi_device for each target, but wasn't doing
anything useful with them.  Just delete the array.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] advansys: Eliminate prototypes
Matthew Wilcox [Wed, 3 Oct 2007 01:55:22 +0000 (21:55 -0400)]
[SCSI] advansys: Eliminate prototypes

Rearrange a lot of the functions in the file to get rid of all the forward
declarations.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] Get rid of scsi_cmnd->done
Matthew Wilcox [Tue, 25 Sep 2007 16:42:04 +0000 (12:42 -0400)]
[SCSI] Get rid of scsi_cmnd->done

The ULD ->done callback moves into the scsi_driver.  By moving the call
to scsi_io_completion() from scsi_blk_pc_done() to scsi_finish_command(),
we can eliminate the latter entirely.  By returning 'good_bytes' from
the ->done callback (rather than invoking scsi_io_completion()), we can
stop exporting scsi_io_completion().

Also move the prototypes from sd.h to sd.c as they're all internal anyway.
Rename sd_rw_intr to sd_done and rw_intr to sr_done.

Inspired-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] gdth: Stop abusing ->done for internal commands
Matthew Wilcox [Tue, 25 Sep 2007 16:42:03 +0000 (12:42 -0400)]
[SCSI] gdth: Stop abusing ->done for internal commands

The ->done member was being used to mark commands as being internal.
I decided to put a magic number in ->underflow instead.  I believe this
to be safe as no current user of ->underflow has any of the bottom 9
bits set.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qlogicpti: Add a slave_configure method
Matthew Wilcox [Mon, 1 Oct 2007 14:07:52 +0000 (08:07 -0600)]
[SCSI] qlogicpti: Add a slave_configure method

By configuring targets in slave_configure, we can eliminate a shadow
queuecommand, a shadow scsi_done, a write to the host template, abuse of
SCp->Message and SCp->Status, a use of kmap_atomic() and sniffing the
results of INQUIRY.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] Update Documentation/scsi/00-INDEX
Rob Landley [Mon, 1 Oct 2007 04:23:39 +0000 (23:23 -0500)]
[SCSI] Update Documentation/scsi/00-INDEX

Update Documentation/scsi/00-INDEX to match current files.

Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] aic94xx: fix SSP IU status print-out
Jeff Garzik [Sun, 30 Sep 2007 14:03:17 +0000 (10:03 -0400)]
[SCSI] aic94xx: fix SSP IU status print-out

The SSP response DPRINTK in asd_get_response_tasklet() was printing
a hardcoded status result, rather than the status from the SSP
response IU.

Arguably, this should not be a DPRINTK either, since the admin might
want to know about this.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] mptctl : shutup uninitialized variable warnings
Eric Moore [Sat, 29 Sep 2007 16:22:54 +0000 (10:22 -0600)]
[SCSI] mptctl : shutup uninitialized variable warnings

drivers/message/fusion/mptctl.c: In function â€˜mptctl_mpt_command’:
drivers/message/fusion/mptctl.c:1764: warning: â€˜bufIn.len’ may be used uninitialized in this function
drivers/message/fusion/mptctl.c:1765: warning: â€˜bufOut.len’ may be used uninitialized in this function

come because gcc gets confused by some "goto" statements in above
function.  The warnings have been verified to be bogus, however, the
function does initialize these later (after the offending goto's) in
the function anyway.  So let's move those initializations to top of
function, thereby also shutting up these warnings.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: Satyam Sharma <satyam@infradead.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] mptlan: bug fix, only half the message frame is dma'd resulting in corruption
Eric Moore [Sat, 29 Sep 2007 16:17:49 +0000 (10:17 -0600)]
[SCSI] mptlan: bug fix, only half the message frame is dma'd resulting in corruption

NB = number of blocks.  This represents the number of blocks to
transfer.  The block size is based on the message frame size provided
in the ioc_facts. A value of zero indicates the entire message frame
should be copied. This is two bit value.  So by setting this to
non-zero vaule, you increase performance by reducing amount of data
needing to be dma'd.  The value that is stored in ioc->ReqeustNB is
sometimes a non-zero vaule, which creates a bug in mptlan, where not
the entire message frame is getting transfer to firware, resulting in
corruption.  This fix sets the default to zero, thus entire message
frame is copied.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] mpt fusion: fix up fusion prints using the sdev_printk, dev_printk, and shost_...
Eric Moore [Sat, 29 Sep 2007 16:17:21 +0000 (10:17 -0600)]
[SCSI] mpt fusion: fix up fusion prints using the sdev_printk, dev_printk, and shost_printk API

Cleaning up prints that use the xxx_printk API, in that the fusion
preamble "mptbase: iocX" follows the info provided by the print API.
The way its currently coded, the [H:C:T] print in sdev_printk will be
inbetween "mptbase" and "iocX", instead of before.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] mpt fusion: lock down ScsiLookup
Eric Moore [Sat, 29 Sep 2007 16:16:53 +0000 (10:16 -0600)]
[SCSI] mpt fusion: lock down ScsiLookup

ScsiLookup is an array of pending scmd pointers that the scsi lld
maintains. This array is touched from queuecommand, eh threads, and
interrupt context. This array should put under locks, hence this patch
to synchronize its access.  I've added some nice little function
wrappers for this, and moved the ScsiLookup array over to MPT_ADAPTER
struct.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] mpt fusion: Fix sparse warnings
Eric Moore [Sat, 29 Sep 2007 16:16:28 +0000 (10:16 -0600)]
[SCSI] mpt fusion: Fix sparse warnings

List below is output from C=2 sparse compilation, which are fixed with
this patch.

1) mptspi: pg0 is defined in x86 version of include/asm/pgtable.h

2) mptsas: context imbalance in 'mptsas_probe' different lock contexts
   for basic block

3) mptbase: from mpt_attach - cast adds address space to expression

4) mptbase: from mpt_do_upload - request[] is bad constant expression

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] mpt fusion: add use of shost_priv and remove all the typecasting
Eric Moore [Sat, 29 Sep 2007 16:15:59 +0000 (10:15 -0600)]
[SCSI] mpt fusion: add use of shost_priv and remove all the typecasting

The driver is currently typecasting to obtain the shost hostdata. The
driver is updated to use the shost_priv macro.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] Fix mistaken uses of ->done
Matthew Wilcox [Tue, 25 Sep 2007 16:42:01 +0000 (12:42 -0400)]
[SCSI] Fix mistaken uses of ->done

All these drivers meant to call ->scsi_done() but got confused.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] pluto: Don't abuse ->done for internal commands
Matthew Wilcox [Tue, 25 Sep 2007 16:42:02 +0000 (12:42 -0400)]
[SCSI] pluto: Don't abuse ->done for internal commands

We can simply call the internal done function directly

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] Fix device not ready printk
James Bottomley [Sun, 23 Sep 2007 14:08:46 +0000 (09:08 -0500)]
[SCSI] Fix device not ready printk

Because scsi_print_sense_hdr prefixes with KERN_INFO, the output from
scsi_io_completion looks like:

sd 0:0:0:0: [sdb] Device not ready: <6>: Sense Key : 0x2 [current]
: ASC=0x4 ASCQ=0x3

By using scsi_show_sense_hdr, we can get the much more appealing output:

sd 0:0:0:0: [sdb] Device not ready: Sense Key : 0x2 [current]
sd 0:0:0:0: [sdb] Device not ready: ASC=0x4 ASCQ=0x3

Acked-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] Remove ->pid field from scsi_cmnd
Matthew Wilcox [Wed, 19 Sep 2007 01:54:43 +0000 (19:54 -0600)]
[SCSI] Remove ->pid field from scsi_cmnd

The pid field is a duplicate of the serial_number field and has been
scheduled for removal for a long time.  A few drivers were still using
it, so just change them to use serial_number instead.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] fix scsi_is_sdev_device() after switch to default sdev attributes
Kay Sievers [Wed, 26 Sep 2007 17:54:49 +0000 (19:54 +0200)]
[SCSI] fix scsi_is_sdev_device() after switch to default sdev attributes

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] ips: Update version information
Bernhard Walle [Sat, 22 Sep 2007 19:55:19 +0000 (21:55 +0200)]
[SCSI] ips: Update version information

This patch just makes the version number in ips.c and ips.h consistent. It
seems that this has been forgotten in a60768e2d43eb30a1adb8a119aeac35dc0d03ef6.

It also removes code duplication, each number is now only once in the code to
avoid similar errors in the future.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Acked-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] ips: Close narrow race in release
Matthew Wilcox [Wed, 15 Aug 2007 18:57:00 +0000 (12:57 -0600)]
[SCSI] ips: Close narrow race in release

We were releasing the IRQ before removing the host, so commands could
still be coming in which would never be seen by the interrupt handler.
Just remove the host before releasing the IRQ to close this race.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] aic94xx: Free scsi host on error
Matthew Wilcox [Wed, 15 Aug 2007 18:56:55 +0000 (12:56 -0600)]
[SCSI] aic94xx: Free scsi host on error

If an error occurred during initialisation, we would sometimes fail to
call scsi_host_put() and thus end up with a leaked scsi_host.  It was
also possible to miss calling scsi_remove_host().

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] simscsi: Free scsi host on error
Matthew Wilcox [Wed, 15 Aug 2007 18:56:54 +0000 (12:56 -0600)]
[SCSI] simscsi: Free scsi host on error

If scsi_add_host returned an error, the host would never be freed.
We need to call scsi_host_put() if an error happens.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qlogicfas: Close narrow race in release
Matthew Wilcox [Wed, 15 Aug 2007 18:56:59 +0000 (12:56 -0600)]
[SCSI] qlogicfas: Close narrow race in release

We were releasing the IRQ before removing the host, so commands could
still be coming in which would never be seen by the interrupt handler.
Just remove the host before releasing the IRQ to close this race.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] aha152x: Close narrow race in release
Matthew Wilcox [Wed, 15 Aug 2007 18:56:57 +0000 (12:56 -0600)]
[SCSI] aha152x: Close narrow race in release

We were releasing the IRQ before removing the host, so commands could
still be coming in which would never be seen by the interrupt handler.
Just remove the host before releasing the IRQ to close this race.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] ncr53c8xx: Call scsi_host_put in release
Matthew Wilcox [Wed, 15 Aug 2007 18:56:56 +0000 (12:56 -0600)]
[SCSI] ncr53c8xx: Call scsi_host_put in release

Since ncr53c8xx_attach() calls scsi_host_put(), make ncr53c8xx_release()
call scsi_host_put() too, for symmetry.  Both callers already expect
it to put the host for them, so that works out nicely.  While the zalon
driver does 'use' the host pointer afterwards, it only compares it for
equality and doesn't dereference it, so that's safe.

While I'm at it, get rid of pointless checks for NULL, use shost_priv()
and change ncr53c8xx_release to return void.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] ide-scsi: Close narrow race in release
Matthew Wilcox [Wed, 15 Aug 2007 18:57:01 +0000 (12:57 -0600)]
[SCSI] ide-scsi: Close narrow race in release

We were releasing the block devices before removing the host, so commands
could still be coming in which would cause a panic.  Just remove the
host before releasing the block devices to close this race.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] ibmmca: Stop leaking scsi_hosts on exit
Matthew Wilcox [Wed, 15 Aug 2007 18:56:58 +0000 (12:56 -0600)]
[SCSI] ibmmca: Stop leaking scsi_hosts on exit

There was a missing call to scsi_host_put() causing us to leak a scsi
host every time this module was unloaded.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] scsi_scan: Cope with kthread_run failing
Matthew Wilcox [Mon, 20 Aug 2007 15:18:48 +0000 (09:18 -0600)]
[SCSI] scsi_scan: Cope with kthread_run failing

If kthread_run failed, we would fail to scan the host, and leak the
allocated async_scan_data.  Since using a separate thread is just an
optimisation, do the scan synchronously if we fail to spawn a thread.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] Improve error message when offlining a device
Matthew Wilcox [Fri, 17 Aug 2007 17:02:10 +0000 (11:02 -0600)]
[SCSI] Improve error message when offlining a device

The current code prints:

scsi 13:0:4:0: scsi: Device offlined - not ready after error recovery

which is repetitively redundant.  This patch changes that message to:

scsi 6:0:6:0: Device offlined - not ready after error recovery

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] sg: use idr to replace static arrays
James Bottomley [Sun, 5 Aug 2007 18:36:11 +0000 (13:36 -0500)]
[SCSI] sg: use idr to replace static arrays

sg uses a scheme to reallocate a single contiguous array of all its
pointers for lookup and management.  This didn't matter too much when sg
could only attach 256 nodes, but now the maximum has been bumped up to
32k we're starting to push the limits of the maximum allocatable
contiguous memory.  The solution to this is to eliminate the static
array and do everything via idr, which this patch does.

Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] osst: Use mutex instead of semaphore
Matthias Kaehlcke [Fri, 10 Aug 2007 21:50:44 +0000 (14:50 -0700)]
[SCSI] osst: Use mutex instead of semaphore

The OnStream SCSI Tape driver uses a semaphore as mutex.  Use the mutex API
instead of the (binary) semaphore.

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Reviewed-by: Satyam Sharma <satyam@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Willem Riede <wrlk@riede.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] arcmsr: irq handler fixes, cleanups, micro-opts
Jeff Garzik [Fri, 27 Jul 2007 17:01:15 +0000 (13:01 -0400)]
[SCSI] arcmsr: irq handler fixes, cleanups, micro-opts

* Remove IRQF_DISABLED, it is clearly wrong for this driver.

* Remove wasteful spin_lock_irqsave() in interrupt handler.
  The lighter-weight spin_lock() is all that's needed.

* Annotate with FIXME where arcmsr_interrupt() is called
  without any spinlock being acquired.

* Eliminate pointless cast from void pointer in arcmsr_do_interrupt()

[jejb: conflict resolution]

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Acked-by: Nick Cheng <nick.cheng@areca.com.tw>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] arcmsr: Fix hardware wait loops
Jeff Garzik [Fri, 27 Jul 2007 17:00:48 +0000 (13:00 -0400)]
[SCSI] arcmsr: Fix hardware wait loops

Remove _interruptible, since receiving a signal while waiting on a
hardware condition will simply cause the driver to busy-wait.

Using msleep_interruptible() is rarely the right thing to do, when
waiting on a hardware condition to change.

Also, replace msleep with ssleep while doing this, where appropriate.

[jejb: fix up merge conflict]

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Acked-by: Nick Cheng <nick.cheng@areca.com.tw>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Update version number to 8.02.00-k4.
Andrew Vasquez [Thu, 20 Sep 2007 21:07:50 +0000 (14:07 -0700)]
[SCSI] qla2xxx: Update version number to 8.02.00-k4.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Limit iIDMA speed adjustments.
Andrew Vasquez [Thu, 20 Sep 2007 21:07:34 +0000 (14:07 -0700)]
[SCSI] qla2xxx: Limit iIDMA speed adjustments.

Do not adjust the iIDMA speed on ports which have a faster
link-speed than the HBA itself.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Rework MSI-X handlers.
Andrew Vasquez [Thu, 20 Sep 2007 21:07:49 +0000 (14:07 -0700)]
[SCSI] qla2xxx: Rework MSI-X handlers.

Since MSI-X vectors do not require a clearing "handshake" from
the system perspective, and the registered handler will not be
called more than once for one occurrence of receipt of a vector,
there is no requirement to flush the risc register write clearing
the interrupt condition in the risc. Also, since the msi-x
registered handlers are optimised for a particular vector, it is
preferable to handle the one vector received per invocation of
the handler.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Clear options-flags while staging firmware-execution.
Andrew Vasquez [Thu, 20 Sep 2007 21:07:48 +0000 (14:07 -0700)]
[SCSI] qla2xxx: Clear options-flags while staging firmware-execution.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Sparse cleanups in qla_mid.c
Andrew Vasquez [Thu, 20 Sep 2007 21:07:47 +0000 (14:07 -0700)]
[SCSI] qla2xxx: Sparse cleanups in qla_mid.c

Make several needlessly global functions static:
- qla2x00_mark_vp_devices_dead()
- qla24xx_configure_vp()

Remove unused function qla24xx_modify_vport().

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Cleanup several 'sparse' warnings.
Andrew Vasquez [Thu, 20 Sep 2007 21:07:46 +0000 (14:07 -0700)]
[SCSI] qla2xxx: Cleanup several 'sparse' warnings.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Use shost_priv().
Andrew Vasquez [Thu, 20 Sep 2007 21:07:45 +0000 (14:07 -0700)]
[SCSI] qla2xxx: Use shost_priv().

Drop usage of legacy to_qla_host() macro.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Remove unused member (list) from srb_t structure.
Andrew Vasquez [Thu, 20 Sep 2007 21:07:44 +0000 (14:07 -0700)]
[SCSI] qla2xxx: Remove unused member (list) from srb_t structure.

This change reduces by as much as 16% the memory footprint for
each allocated sbr_t structure requested from the mempool.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Retrieve max-NPIV support capabilities from FW.
Seokmann Ju [Thu, 20 Sep 2007 21:07:43 +0000 (14:07 -0700)]
[SCSI] qla2xxx: Retrieve max-NPIV support capabilities from FW.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Use the correct pointer-address during NVRAM writes.
Andrew Vasquez [Thu, 20 Sep 2007 21:07:42 +0000 (14:07 -0700)]
[SCSI] qla2xxx: Use the correct pointer-address during NVRAM writes.

Original code, incorrectly passed the address-of a pointer rather
than the pointer value itself.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Set correct attribute count during FDMI RPA.
Andrew Vasquez [Thu, 20 Sep 2007 21:07:41 +0000 (14:07 -0700)]
[SCSI] qla2xxx: Set correct attribute count during FDMI RPA.

Also remove legacy '/proc' name during OS_DEVICE_NAME
registration.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Correct infinite-login-retry issue.
Ravi Anand [Thu, 20 Sep 2007 21:07:40 +0000 (14:07 -0700)]
[SCSI] qla2xxx: Correct infinite-login-retry issue.

Where the DPC logic would get jammed into continuously
reloging-into a port.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Query additional RISC registers during ISP25XX firmware dump.
Andrew Vasquez [Thu, 20 Sep 2007 21:07:39 +0000 (14:07 -0700)]
[SCSI] qla2xxx: Query additional RISC registers during ISP25XX firmware dump.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Correct staging of RISC while attempting to pause.
Andrew Vasquez [Thu, 20 Sep 2007 21:07:38 +0000 (14:07 -0700)]
[SCSI] qla2xxx: Correct staging of RISC while attempting to pause.

There's no need to reset the RISC prior to pausing.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Query additional RISC information during a pause.
Andrew Vasquez [Thu, 20 Sep 2007 21:07:37 +0000 (14:07 -0700)]
[SCSI] qla2xxx: Query additional RISC information during a pause.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Add PCI error recovery support.
Seokmann Ju [Thu, 20 Sep 2007 21:07:36 +0000 (14:07 -0700)]
[SCSI] qla2xxx: Add PCI error recovery support.

Additional cleanups and
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Allow region-based flash-part accesses.
Joe Carnuccio [Thu, 20 Sep 2007 21:07:35 +0000 (14:07 -0700)]
[SCSI] qla2xxx: Allow region-based flash-part accesses.

Additional cleanups and
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Add flash burst-read/write support.
Andrew Vasquez [Thu, 20 Sep 2007 21:07:33 +0000 (14:07 -0700)]
[SCSI] qla2xxx: Add flash burst-read/write support.

Newer ISPs support a mechanism to read and write flash-memory via
the firmware LOAD/DUMP memory mailbox command routines.  When
supported, utilizing these mechanisms significantly reduces
overall access times.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] qla2xxx: Collapse and simplify ISP2XXX firmware dump routines.
Andrew Vasquez [Thu, 26 Jul 2007 18:41:13 +0000 (11:41 -0700)]
[SCSI] qla2xxx: Collapse and simplify ISP2XXX firmware dump routines.

Add IO-base-window accessor functions.  Merge duplicate
RISC-pause and soft-reset code segments.  Drop 'eye-watering'
__iomem casting.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] move ULD attachment into the prep function
James Bottomley [Sat, 4 Aug 2007 15:06:25 +0000 (10:06 -0500)]
[SCSI] move ULD attachment into the prep function

One of the intents of the block prep function was to allow ULDs to use
it for preprocessing.  The original SCSI model was to have a single prep
function and add a pointer indirect filter to build the necessary
commands.  This patch reverses that, does away with the init_command
field of the scsi_driver structure and makes ULDs attach directly to the
prep function instead.  The value is really that it allows us to begin
to separate the ULDs from the SCSI mid layer (as long as they don't use
any core functions---which is hard at the moment---a ULD doesn't even
need SCSI to bind).

Acked-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] Fix ibmvscsi client for multiplatform iSeries+pSeries kernel
David Woodhouse [Fri, 21 Sep 2007 22:29:36 +0000 (08:29 +1000)]
[SCSI] Fix ibmvscsi client for multiplatform iSeries+pSeries kernel

If you build a multiplatform kernel for iSeries and pSeries, with
ibmvscsic support, the resulting client doesn't work on iSeries.

This fixes that, using the appropriate low-level operations
for the machine detected at runtime.

[jejb: fixed up rejections around the srp transport patch]

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] dtc: Fix typo
Alan Cox [Thu, 20 Sep 2007 14:12:11 +0000 (15:12 +0100)]
[SCSI] dtc: Fix typo

(and pointed out by several people)

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] eata_pio: Clean up proc handling, bracketing and use cpu_relax()
Alan Cox [Thu, 20 Sep 2007 14:15:27 +0000 (15:15 +0100)]
[SCSI] eata_pio: Clean up proc handling, bracketing and use cpu_relax()

So its ancient, its crap, but it kept showing up in my scans for stuff
that wanted fixing...

- Redo the proc code to be far cleaner
- Clean various return (0) type constructs
- Use cpu_relax()

The various waits ought to time out but thats another issue and probably
not worth solving.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] MAINTAINERS: mark ide-scsi as Orphan
Bartlomiej Zolnierkiewicz [Wed, 19 Sep 2007 20:08:56 +0000 (22:08 +0200)]
[SCSI] MAINTAINERS: mark ide-scsi as Orphan

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 years ago[SCSI] Fix signness of parameters in scsi module
Masatake YAMATO [Wed, 19 Sep 2007 13:59:16 +0000 (22:59 +0900)]
[SCSI] Fix signness of parameters in scsi module

In scsi module I've found some inconsistency between variable type
used in module_param_named and type passed to module_param_named as an
argument. Especially the inconsistency of `max_scsi_luns' parameter is
a bit serious because the description text says "last scsi LUN (should
be between 1 and 2^32-1)".

Signed-off-by: Masatake YAMATO <jet@gyve.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>