Commit Graph

3134 Commits (4e57c517b3cbaceb7438eeec879ca129fc17442c)

Author SHA1 Message Date
Salyzyn, Mark 94774a3a8e [SCSI] aacraid: fix shutdown handler to also disable interrupts.
Moves quiesce, thread and interrupt shutdown into aacraid drivers'
.shutdown handler. This fix to the aac_shutdown handler will remove the
superfluous reset of the adapter during a (clean) kexec.

This fix may mitigate the active investigation 'kexec and aacraid
broken' but it is unlikely to affect the root cause (issue likely
present in both kexec and kdump). This patch reduces the chance the
problem will occur with a kexec. The fix for root cause is currently
expected to be the minimum value check to the aacraid.startup_timeout
driver variable after an adapter reset within aacraid_commit_reset.patch
submitted on 05/22/2007 and awaiting testing by Yinghai to confirm.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-06-01 11:42:19 -04:00
Salyzyn, Mark 5c9cfeddbb [SCSI] aacraid: Changeable queue depth
Inspired by Brian King's patch to the ibmvscsi driver. Adds support for
a changeable queue depth to the aacraid driver.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-06-01 11:39:56 -04:00
Yoann Padioleau f834368564 parse errors in ifdefs
Fix various bits of obviously-busted code which we're not happening to
compile, due to ifdefs.

Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Jan Kara <jack@ucw.cz>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-01 08:18:28 -07:00
Yoann Padioleau 632155e659 potential parse error in ifdef
I have made a tool to parse the kernel that does not pre-process the
source.  That means that my parser tries to parse all the code, including
code in the #else branch or code that is not often compiled because the
driver is not very used (or not used at all).  So, my parser sometimes
reports parse error not originally detected by gcc.  Here is my (first)
patch.

[akpm@linux-foundation.org: fix amd8111e.c]
Signed-off-by: Yoann Padioleau <padator@wanadoo.fr>
Acked-by: Matthew Wilcox <matthew@wil.cx>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Acked-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Jeff Garzik <jeff@garzik.org>
Acked-by: James Bottomley <James.Bottomley@steeleye.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-01 08:18:27 -07:00
FUJITA Tomonori 32fbac2256 [SCSI] megaraid: 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>
Acked-by: Sumant Patro <sumant.patro@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-31 18:38:36 -04:00
FUJITA Tomonori 155d98f072 [SCSI] megaraid_sas: 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>
Acked-by: Sumant Patro <sumant.patro@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-31 18:11:55 -04:00
FUJITA Tomonori 3f6270ef76 [SCSI] megaraid_old: 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.

Jens Axboe <jens.axboe@oracle.com> did the for_each_sg cleanup.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Sumant Patro <sumant.patro@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-31 18:11:21 -04:00
Christoph Hellwig 2b14ec7878 [SCSI] esp: use shost_priv
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: David Miller <davem@davemloft.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-31 17:30:04 -04:00
FUJITA Tomonori 10803de4c1 [SCSI] dpt_i2o: 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.

Jens Axboe <jens.axboe@oracle.com> did the for_each_sg cleanup.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>

ACK. Code inspected. Driver changes NOT unit tested or compile tested.
Acked-by: "Salyzyn, Mark" <mark_salyzyn@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-31 12:25:27 -05:00
FUJITA Tomonori 385d70b4e2 [SCSI] qla2xxx: 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>
Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-31 12:23:49 -05:00
FUJITA Tomonori b1192d5eba [SCSI] 3w-9xxx: eliminate missed map_single path
This removes the remaining unnecessary map_single path

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-31 08:23:02 -05:00
James Bottomley 5bc65793cb [SCSI] Merge up to linux-2.6 head
Conflicts:

	drivers/scsi/jazz_esp.c

Same changes made by both SCSI and SPARC trees: problem with UTF-8
conversion in the copyright.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-30 23:57:05 -05:00
FUJITA Tomonori 6edae708bf [SCSI] 3w-xxxx: 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.

Jens Axboe <jens.axboe@oracle.com> did the for_each_sg cleanup.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Adam Radford <linuxraid@amcc.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-30 23:29:32 -05:00
FUJITA Tomonori 0debe01d3e [SCSI] 3w-9xxx: 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.

Jens Axboe <jens.axboe@oracle.com> did the for_each_sg cleanup.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Adam Radford <linuxraid@amcc.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-30 23:29:11 -05:00
Bill Nottingham 88f5774b07 [SCSI] qla2xxx: fix timeout in qla2x00_down_timeout
iterations is unsigned, so it is impossible to get out of the loop
and return -ETIMEDOUT.

Signed-off-by: Bill Nottingham <notting@redhat.com>
Acked-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-30 10:15:32 -05:00
Hugh Dickins f2f027c6e9 [SCSI] fix CONFIG_SCSI_WAIT_SCAN=m
CONFIG_MODULES=y
CONFIG_SCSI=y
CONFIG_SCSI_SCAN_ASYNC=y
CONFIG_SCSI_WAIT_SCAN=m

2.6.21-rc5-mm2 VFS panics unable to find my root on /dev/sda2, but boots
okay if I change drivers/scsi/Kconfig to "default y" instead of "default m"
for SCSI_WAIT_SCAN.

Make sure there's a late_initcall to scsi_complete_async_scans when it's
built in, so a monolithic SCSI_SCAN_ASYNC kernel can rely on the scans
being completed before trying to mount root, even if they're slow.

[akpm@linux-foundation.org: build fixes]
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-30 09:16:38 -05:00
Robert P. J. Day 7a960b76ed [SCSI] gdth: Fix obvious typo "spin_lock_irqrestore()"
Fix misspelled "spin_lock_irqrestore" to read "spin_unlock_irqrestore"
instead.

Presumably, GDTH_RTC doesn't get used a lot.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Acked-by: Achim Leubner <achim_leubner@adaptec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-30 08:39:52 -05:00
David Rientjes 6c4b7e4fdf [SCSI] gdth: fix ambiguous gdthtable definition
Labeling a variable as __attribute_used__ is ambiguous: it means
__attribute__((unused)) for gcc <3.4 and __attribute__((used)) for gcc >=3.4.
There is no such thing as labeling a variable as __attribute__((used)).  We
assume that we're simply suppressing a warning here if gdthtable[] is declared
but unreferenced.

Acked-by: Achim Leubner <achim_leubner@adaptec.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-30 08:39:16 -05:00
FUJITA Tomonori 2e91724658 [SCSI] nsp32: 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.

Jens Axboe <jens.axboe@oracle.com> did the for_each_sg cleanup.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: GOTO Masanori <gotom@sanori.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-30 08:38:50 -05:00
Brian King 742d25b819 [SCSI] ibmvscsi: Changeable queue depth
Adds support for a changeable queue depth to ibmvscsi.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-29 22:52:31 -05:00
FUJITA Tomonori d5587d5dcd [SCSI] stex: 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>
Acked-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-29 22:49:59 -05:00
FUJITA Tomonori 5f7186c841 [SCSI] qla4xxx: 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.

Jens Axboe <jens.axboe@oracle.com> did the for_each_sg cleanup.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: David C Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-29 18:32:12 -05:00
FUJITA Tomonori 63015bc933 [SCSI] ipr: 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>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-29 16:54:22 -05:00
Linus Torvalds 6e98ee75c3 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Fill holes in hypervisor APIs and fix KTSB registry.
  [SPARC64]: Fix two bugs wrt. kernel 4MB TSB.
  [SPARC]: Mark as emulating cmpxchg, add appropriate depends for DRM.
  [SPARC]: Emulate cmpxchg like parisc
  [SPARC64]: Fix _PAGE_EXEC_4U check in sun4u I-TLB miss handler.
  [SPARC]: Linux always started with 9600 8N1
  [SPARC64]: arch/sparc64/time.c doesn't compile on Ultra 1 (no PCI)
  [SPARC64]: Eliminate NR_CPUS limitations.
  [SPARC64]: Use machine description and OBP properly for cpu probing.
  [SPARC64]: Negotiate hypervisor API for PCI services.
  [SPARC64]: Report proper system soft state to the hypervisor.
  [SPARC64]: Fix typo in sun4v_hvapi_register error handling.
  [SCSI] ESP: Kill SCSI_ESP_CORE and link directly just like jazz_esp
  [SCSI] jazz_esp: Converted to use esp_core.
  [SPARC64]: PCI device scan is way too verbose by default.
  [SERIAL] sunzilog: section mismatch fix
  [SPARC32]: Removes mismatch section warnigs in sparc time.c file
  [SPARC64]: Don't be picky about virtual-dma values on sun4v.
  [SPARC64]: Kill unused DIE_PAGE_FAULT enum value.
  [SCSI] pluto: Use wait_for_completion_timeout.
2007-05-29 14:03:42 -07:00
Linus Torvalds a43266355b Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] megaraid_sas: intercept cmd timeout and throttle io
  [SCSI] fusion: Fix |/|| confusion
  [SCSI] aic94xx: asd_clear_nexus should fail if the cleared task does not complete
  [SCSI] aic7xxx: fix aicasm build failure with gcc-3.4.6
  [SCSI] aacraid: apply commit config for reset_devices flag
  [SCSI] sd: fix refcounting regression in suspend/resume routines
  [SCSI] aacraid: fix panic on short Inquiry
  [SCSI] aacraid: Correct sa platform support. (Was: [Bug 8469] Bad EIP value on pentium3 SMP kernel-2.6.21.1)
  [SCSI] NCR53C9x: correct spelling mistake in deprecation notice
  [SCSI] tgt: fix a rdma indirect transfer error bug
  [SCSI] MegaRAID: Update MAINTAINERS email-id
  [SCSI] stex: minor cleanup and version update
  [SCSI] stex: fix reset recovery for console device
  [SCSI] stex: extend hard reset wait time
  [SCSI] stex: fix id mapping issue
  [SCSI] ipr: Proper return codes for eh_dev_reset for SATA devices
  [SCSI] zfcp: IO stall after deleting and path checker changes after reenabling zfcp devices
  [SCSI] zfcp: avoid clutter in erp_dbf
2007-05-29 13:39:52 -07:00
FUJITA Tomonori c13e556647 [SCSI] libsas: convert to use the data buffer accessors
- convert 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: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-29 12:50:54 -05:00
David S. Miller 89a4063e95 [SCSI] ESP: Kill SCSI_ESP_CORE and link directly just like jazz_esp
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-29 02:49:20 -07:00
Thomas Bogendoerfer 5ff2636677 [SCSI] jazz_esp: Converted to use esp_core.
Use new esp_scsi for JAZZ SCSI host adapter driver

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-29 02:49:19 -07:00
Christoph Hellwig b68a890fa3 [SCSI] pluto: Use wait_for_completion_timeout.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-29 02:49:05 -07:00
Eric Sesterhenn fb119935e1 [SCSI] sg: remove unnecessary check
coverity spotted this (cid #758).  All callers dereference sfp, so we dont
need this check.  In addition to this, we dereference it earlier in the
function.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-28 09:08:32 -05:00
FUJITA Tomonori deff2627cd [SCSI] arcmsr: 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.

Jens Axboe <jens.axboe@oracle.com> did the for_each_sg cleanup.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Nick Cheng <nick.cheng@areca.com.tw>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-27 22:28:21 -05:00
FUJITA Tomonori 22c1a6600a [SCSI] aic7xxx_old: 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>
Acked-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-27 21:42:56 -05:00
FUJITA Tomonori 85289f2efa [SCSI] tmscsim: 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: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-27 16:11:01 -05:00
Adrian Bunk 70c8d89776 [SCSI] advansys: cleanups
- remove the unneeded advansys.h
- remove the unused advansys_setup()
- make needlessly global functions static

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-27 15:05:10 -05:00
Jeff Garzik 6cad75a61d [SCSI] fdomain: fix PCMCIA-related warnings
fdomain is one of those drivers that is compiled twice, once for PCMCIA
and once for non-PCMCIA.  The resultant two-driver setup leaves a bit of
dead code and data in the non-PCMCIA case, which gcc complains about.

Shuffle ifdefs a bit to eliminate the conditionally-dead code, and
the compiler warnings.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-27 12:59:28 -05:00
Christoph Hellwig 565bae6a4a [SCSI] 53c7xx: kill driver
It's been more than enough time now to try to get the new m68k drivers
into the tree.  Let's remove the old ones and we can remerge the new
glue once it's ready.  Given that there are patches to rename two out
of the three drivers in m68k CVS and all of them need a lot of
codingstyle love anyway that's probably the better strategy to begin
with.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Kars de Jong <jongk@linux-m68k.org>
Cc: linux-m68k@vger.kernel.org
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-27 12:52:29 -05:00
FUJITA Tomonori ddc914c741 [SCSI] BusLogic: 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>
2007-05-26 19:21:37 -05:00
FUJITA Tomonori bc1ebfba1a [SCSI] qlogicfas408: 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.

Jens Axboe <jens.axboe@oracle.com> did the for_each_sg cleanup.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 19:21:09 -05:00
FUJITA Tomonori fea97f9ab2 [SCSI] u14-34f: 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.

Jens Axboe <jens.axboe@oracle.com> did the for_each_sg cleanup.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 19:19:04 -05:00
FUJITA Tomonori d178671356 [SCSI] ultrastor: 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.

Jens Axboe <jens.axboe@oracle.com> did the for_each_sg cleanup.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 19:18:38 -05:00
FUJITA Tomonori e7d6cf55ea [SCSI] wd7000: 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.

Jens Axboe <jens.axboe@oracle.com> did the for_each_sg cleanup.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 19:18:10 -05:00
FUJITA Tomonori 58e2a02eb1 [SCSI] eata: 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.

Jens Axboe <jens.axboe@oracle.com> did the for_each_sg cleanup.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 19:13:55 -05:00
FUJITA Tomonori a258c85d08 [SCSI] initio: 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.

Jens Axboe <jens.axboe@oracle.com> did the for_each_sg cleanup.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 19:13:27 -05:00
FUJITA Tomonori c66cc13c16 [SCSI] aha1740: 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.

Jens Axboe <jens.axboe@oracle.com> did the for_each_sg cleanup.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 19:12:56 -05:00
FUJITA Tomonori 985c0a7277 [SCSI] a100u2w: 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.

Jens Axboe <jens.axboe@oracle.com> did the for_each_sg cleanup.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 19:12:34 -05:00
FUJITA Tomonori e1eaf46009 [SCSI] fdomain: 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>
2007-05-26 19:11:52 -05:00
FUJITA Tomonori 9482ef855e [SCSI] sym53c500_cs: 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.

Jens Axboe <jens.axboe@oracle.com> did the for_each_sg cleanup.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 19:09:22 -05:00
FUJITA Tomonori 772a5c3f3b [SCSI] sym53c416: 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.

Jens Axboe <jens.axboe@oracle.com> did the for_each_sg cleanup.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 19:08:50 -05:00
FUJITA Tomonori 03cde46b6b [SCSI] NCR53c406a: 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.

Jens Axboe <jens.axboe@oracle.com> did the for_each_sg cleanup.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 19:08:20 -05:00
FUJITA Tomonori 646158c203 [SCSI] mac53c94: 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.

Jens Axboe <jens.axboe@oracle.com> did the for_each_sg cleanup.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 19:07:50 -05:00
FUJITA Tomonori 5f60ef6ac7 [SCSI] ibmmca: 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.

Jens Axboe <jens.axboe@oracle.com> did the for_each_sg cleanup.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 16:30:17 -05:00
FUJITA Tomonori 4c688fc7df [SCSI] aic79xx: 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>
2007-05-26 16:30:12 -05:00
FUJITA Tomonori 3a57c4a5aa [SCSI] aic7xxx: 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>
2007-05-26 16:30:08 -05:00
FUJITA Tomonori 3258a4d569 [SCSI] 53c700: 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.

Jens Axboe <jens.axboe@oracle.com> did the for_each_sg cleanup.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 16:30:04 -05:00
FUJITA Tomonori 824d7b570b [SCSI] scsi_lib: add scatter/gather data buffer accessors
This adds a set of accessors for the scsi data buffer. This is in
preparation for chaining sg lists and bidirectional requests (and
possibly, the mid-layer dma mapping).

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 16:29:59 -05:00
James Smart 9ef3e4a452 [SCSI] fc_transport: fix sysfs deadlock on vport delete
When the vport attribute "delete" is used to delete the vport, sysfs
deadlocks waiting for the write to complete, which is waiting for the
sysfs teardown to complete. Moved this effort to a work_q element.

Took the opportunity to make some other cosmetic changes:
 - removed tabs in Doc file - replaced with expanded spaces
 - minor copyright text and author text updates
 - removed a bunch of trailing whitespace

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 11:47:58 -05:00
David C Somayajulu bee4fe8e63 [SCSI] qla4xxx: ql4_os.c bugfixes
Free memory resources after invoking free_irq() in
qla4xxx_free_adapter(). QLA4xxx has two pci functions per port
(Ethernet and iSCSI). When one of these PCI functions issues a HBA
reset, all other functions are notified and need to acknowledge and
re-initialize. During module qla4xxx_remove_adapter() gets
invoked. This function needs to wait if it is currently responding to
a reset from another function.

Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 11:47:53 -05:00
David C Somayajulu c0e344c9b7 [SCSI] qla4xxx: ql4_mbx.c remove dead code bugfixes
All all inbound mbx registers for all mbx commands. Remove dead code.

Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 11:47:49 -05:00
David C Somayajulu 401425b1ea [SCSI] qla4xxx: ql4_isr.c support for new mbx cmds
Add support to log all AENs and service mbx cmd completions for QLA4032

Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 11:47:44 -05:00
David C Somayajulu e08c182cba [SCSI] qla4xxx: update rev num and misc cleanup
Clean up and update version number

Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 11:47:40 -05:00
David C Somayajulu 92b7273608 [SCSI] qla4xxx: ql4_init.c bugfixes
In qla4xxx_get_ddb_entry() and qla4xxx_add_device_dynamically()
differentiate between a target which has been newly added vs a target
which went offline temporarily and is online again.  In
qla4xxx_build_ddb_list() firmware ddb state needs to be updated by
calling qla4xxx_get_ddb_entry(). Fix qla4x00_pci_config() and clean up
code.

Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 11:47:35 -05:00
David C Somayajulu b285431657 [SCSI] qla4xxx: ql4_fw.h add support for qla4032
Add support for QLA4032 which supports IPv6

Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 11:47:31 -05:00
David C Somayajulu 5c8bfc9449 [SCSI] qla4xxx: ql4_def.h log all AENs and cleanup
Add support for logging all AENs and clean up

Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 11:47:27 -05:00
David C Somayajulu 0187106664 [SCSI] qla4xxx: ql4_dbg.c remove dead code
Remove dead code

Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 11:47:22 -05:00
Martin Bligh de5952e91c [SCSI] megaraid: fix compiler warnings
The user ioctl mailbox can only support a 32 bit address for the
commands structure.  This is fine, since the area it's pointing to is
allocated with pci_alloc_consistent(), so it should be physically <
4GB.  Thus kill the ptr to u32 conversion warnings on 64 bit.

Signed-off-by: Martin J. Bligh <mbligh@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: "Patro, Sumant" <Sumant.Patro@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-26 11:46:38 -05:00
Adrian Bunk c6a6c81cfd [SCSI] ips: remove kernel 2.4 code
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: "Salyzyn, Mark" <mark_salyzyn@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-24 09:14:41 -05:00
Adrian Bunk 6a31a8a651 [SCSI] nsp32: remove kernel 2.4 code
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: GOTO Masanori <gotom@sanori.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-24 09:13:51 -05:00
Andrew Morton 702809ce9b [SCSI] ncr5380 warning fixes
squish these:

drivers/scsi/NCR5380.c:360: warning: 'phases' defined but not used
drivers/scsi/NCR5380.c:360: warning: 'phases' defined but not used
drivers/scsi/NCR5380.c:633: warning: 'NCR5380_print_options' defined but not used
drivers/scsi/NCR5380.c:708: warning: 'NCR5380_proc_info' defined but not used
drivers/scsi/NCR5380.c:360: warning: 'phases' defined but not used
drivers/scsi/NCR5380.c:579: warning: 'NCR5380_probe_irq' defined but not used
drivers/scsi/NCR5380.c:360: warning: 'phases' defined but not used
drivers/scsi/NCR5380.c:708: warning: 'notyet_generic_proc_info' defined but not used
drivers/scsi/NCR5380.c:708: warning: 'notyet_generic_proc_info' defined but not used

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-24 09:13:25 -05:00
Jeff Garzik 476834c25a [SCSI] aacraid,qla2xxx: use irq_handler_t where appropriate
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: "Salyzyn, Mark" <mark_salyzyn@adaptec.com>
Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-24 09:12:47 -05:00
Amol Lad 730a646ddf [SCSI] NCR5380: Replace yield() with a better alternative
Replaced yield() with cond_resched()

Signed-off-by: Amol Lad <amol@verismonetworks.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-24 09:11:00 -05:00
James Bottomley 355dfa1bc8 [SCSI] scsi_error: send the sense buffer down without copying
Now that the block submission path correctly bounces, we can simply
use the command sense_buffer to send to retrieve sense information and
junk the unnecessary page allocation.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-24 09:10:02 -05:00
Bernhard Walle a6123f1429 [SCSI] sd: remove __GFP_DMA
After 821de3a27b, it's not necessary to
alloate a DMA buffer any more in sd.c.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-24 09:09:09 -05:00
Sumant Patro 05e9ebbefb [SCSI] megaraid_sas: intercept cmd timeout and throttle io
eh_timed_out call back (megasas_reset_timer) is used to throttle io
to the adapter when it is called the first time for a scmd.
The MEGASAS_FW_BUSY flag is set and can_queue reduced to 16.
The can_queue is restored from completion routine in following
two conditions : 5 seconds has elapsed and
the # of outstanding cmds in FW is < 17.

Signed-off-by: Sumant Patro <sumant.patro@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-24 09:08:27 -05:00
Darrick J. Wong 8fdcf86af6 [SCSI] aic94xx: asd_clear_nexus should fail if the cleared task does not complete
Every so often, the driver will call asd_clear_nexus to clean out a task.
It is supposed to be the case that the CLEAR NEXUS does not go on the done
list until after the task itself has been put on the done list, but for
some reason this doesn't always happen.  Thus, the
wait_for_completion_timeout call times out, and we return success.  This
makes libsas free the task even though the task hasn't completed, leading
to a BUG_ON message from aic94xx_hwi.c around line 341.  We should return
failure from asd_clear_nexus so that libsas tries again; at a bare minimum
it shouldn't be freeing active tasks.  I _think_ this will fix one of
the SCB timeout crash problems (though I've not been able to reproduce
it lately...)

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-22 14:12:45 -05:00
James Bottomley f45ffaec2e [SCSI] aic7xxx: fix aicasm build failure with gcc-3.4.6
On Tue, 2007-05-22 at 06:51 -0500, Bob Tracy wrote:
> Second try: originally reported this back on April 17th.  2.6.X
> kernel builds started failing after I upgraded my compiler from
> gcc-3.3.X to gcc-3.4.6:
>
> make -C drivers/scsi/aic7xxx/aicasm
> (...)
> gcc -I/usr/include -I. aicasm.c aicasm_symbol.c aicasm_gram.c aicasm_macro_gram.c aicasm_scan.c aicasm_macro_scan.c -o aicasm -ldb
> aicasm_gram.y:1948: error: conflicting types for 'yyerror'
> aicasm_gram.tab.c:3004: error: previous implicit declaration of 'yyerror' was here
> aicasm_macro_gram.y:162: error: conflicting types for 'mmerror'
> aicasm_macro_gram.tab.c:1196: error: previous implicit declaration of 'mmerror' was here

Fix is to add a prototype for yyerror and mmerror to the relevant files.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-22 14:08:59 -05:00
Salyzyn, Mark 1208bab5d0 [SCSI] aacraid: apply commit config for reset_devices flag
Under some conditions associated with the unclean transition to kdump,
the aacraid adapters will view the array as foreign and not export it to
prevent access and data manipulation. The solution is to submit a commit
configuration to export the devices since this is a expected behavior
when transitioning to a kdump kernel.

This patch adds the aacraid.reset_devices flag and when either this or
the global reset_devices flag is set, ensures that a commit config is
issued and extends the startup_timeout if it is set less than 5 minutes.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-22 14:08:41 -05:00
Alan Stern 09ff92fea2 [SCSI] sd: fix refcounting regression in suspend/resume routines
This patch (as909) fixes a couple of refcounting errors in the sd
driver's suspend and resume methods.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-22 14:08:24 -05:00
Thomas Bogendoerfer 352e921f0d [SCSI] jazz_esp: converted to use esp_core
Use new esp_scsi for JAZZ SCSI host adapter driver

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-22 11:12:22 -05:00
Alan Cox 72d39fea90 [SCSI] initio: Convert into a real Linux driver and update to modern style
This is a mix of a grand clean up I did and a reworking of the hotplug
support by Christoph. In testing it works as well as the previous code
did (that is -quite badly-) but we can now read it and as it settles in
actually debug the long standing problems it shares with the old driver.

Signed-off-by: Alan Cox <alan@redhat.com>

From Christoph:

removal of the BSD license is also fine with me, but should really
get a mention in the changelog aswell.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-22 11:08:56 -05:00
Salyzyn, Mark 9d399cc7fe [SCSI] aacraid: add support for FUA
Back in the beginning of last year we disabled mode page 8 and mode page
3f requests through device quirk bits instead of enhancing the driver to
respond to these mode pages because there was no apparent added value.

The Firmware that supports the new communication commands supports the
ability to force a write around of the adapter cache on a command by
command basis. In the attached patch we enable mode page 8 and 3f and
spoof the results as needed in order to *convince* the layers above to
submit writes with the FUA (Force Unit Attention) bit set if the file
system or application requires it, if the Firmware supports the write
through, or instead to submit a SYNCHRONIZE_CACHE if the Firmware does
not. The added value here is for file systems that benefit from this
functionality and for clustering or redundancy scenarios.

Caveats: By convince, we are responding with a minimal short 3 byte
content mode page 8, with only the data the SCSI layer needs and that we
can fill confidently. Applications that require the customarily larger
mode page 8 results may be confused by this(?). The FUA, or the
SYNCHRONIZE_CACHE only affect the cache on the controller. Our firmware
by default ensure that the underlying physical drives of the array have
their cache turned off so normally this is not a problem.

This attached patch is against current scsi-misc-2.6 and was unit tested
on RHEL5. Since this is a feature enhancement, it should not be
considered for any current stabilization efforts.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-22 10:52:21 -05:00
Christoph Hellwig 0f06bb34f2 [SCSI] aha152x: use wait_for_completion_timeout
Use wait_for_completion_timeout instead a semaphore + timer.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-22 10:50:19 -05:00
Tejun Heo 1dfcda06a6 [SCSI] kill scsi host template suspend/resume
With libata converted to use sdev->manage_start_stop for suspend and
resume, sht->suspend/resume() has no user left and low level
suspend/ressume should be taken care of by low level driver's
suspend/resume callbacks (e.g. PCI or PCMCIA driver callbacks).  This
patch removes sht->suspend/resume() callbacks.

This change is suggested by Christoph Hellwig.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-22 10:41:12 -05:00
James Bottomley 67b2009ae2 [SCSI] ibmmca: convert to new probing API and fix oopses
This is basically a straight conversion.  I have one of these things, so
I know it works ... my problem is that it has a wierd SCA like
connector, so I can't connect anything to it (no cables).

However, previously it panic'd in the interrupt, now it completes a bus
scan.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-22 10:39:08 -05:00
Alexey Dobriyan e8edc6e03a Detach sched.h from mm.h
First thing mm.h does is including sched.h solely for can_do_mlock() inline
function which has "current" dereference inside. By dealing with can_do_mlock()
mm.h can be detached from sched.h which is good. See below, why.

This patch
a) removes unconditional inclusion of sched.h from mm.h
b) makes can_do_mlock() normal function in mm/mlock.c
c) exports can_do_mlock() to not break compilation
d) adds sched.h inclusions back to files that were getting it indirectly.
e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
   getting them indirectly

Net result is:
a) mm.h users would get less code to open, read, preprocess, parse, ... if
   they don't need sched.h
b) sched.h stops being dependency for significant number of files:
   on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
   after patch it's only 3744 (-8.3%).

Cross-compile tested on

	all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
	alpha alpha-up
	arm
	i386 i386-up i386-defconfig i386-allnoconfig
	ia64 ia64-up
	m68k
	mips
	parisc parisc-up
	powerpc powerpc-up
	s390 s390-up
	sparc sparc-up
	sparc64 sparc64-up
	um-x86_64
	x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig

as well as my two usual configs.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-21 09:18:19 -07:00
James Bottomley cab537d609 [SCSI] aacraid: fix panic on short Inquiry
Unable to handle kernel paging request at ffff8101c0000000 RIP:
 [<ffffffff880b22a1>] :aacraid:aac_internal_transfer+0xd6/0xe3
PGD 8063 PUD 0
Oops: 0000 [1] SMP
last sysfs file: /block/sdb/removable
CPU 2
Modules linked in: autofs4(U) hidp(U) nfs(U) lockd(U)
fscache(U) nfs_acl(U) rfcomm(U) l2cap(U) bluetooth(U)
sunrpc(U) ipv6(U) cpufreq_ondemand(U) dm_mirror(U) dm_mod(U)
video(U) sbs(U) i2c_ec(U) button(U) battery(U) asus_acpi(U)
acpi_memhotplug(U) ac(U) parport_pc(U) lp(U) parport(U)
joydev(U) ide_cd(U) i2c_i801(U) i2c_core(U) shpchp(U)
cdrom(U) bnx2(U) sg(U) pcspkr(U) ata_piix(U) libata(U)
aacraid(U) sd_mod(U) scsi_mod(U) ext3(U) jbd(U) ehci_hcd(U)
ohci_hcd(U) uhci_hcd(U)
Pid: 2352, comm: syslogd Not tainted 2.6.18-prep #1
RIP: 0010:[<ffffffff880b22a1>]  [<ffffffff880b22a1>] :aacraid:aac_internal_transfer+0xd6/0xe3
RSP: 0000:ffff8101bfd1fe68  EFLAGS: 00010083
RAX: 0000000000000063 RBX: 0000000000000008 RCX: 00000000ffd1fea0
RDX: ffffffff802da628 RSI: ffff8101c0000000 RDI: ffff8101b2a08168
RBP: ffff8101b2728010 R08: ffffffff802da628 R09: 0000000000000046
R10: 0000000000000000 R11: 0000000000000080 R12: 0000000000000010
R13: ffff8101bfd1fea8 R14: ffff8101bc74df58 R15: ffff8101bc74df58
FS:  00002aaaab0146f0(0000) GS:ffff8101bfcd2e40(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: ffff8101c0000000 CR3: 00000001bdecd000 CR4: 00000000000006e0
Process syslogd (pid: 2352, threadinfo ffff8101bc74c000, task ffff8101bd979040)
Stack:  0000000000000012 0000000000000036 0000000000000000 ffff8101bee9a800
 ffff8101be9d3a00 ffff8101be9d3a00 ffff8101be8014f8 ffffffff880b26cc
 40212227607e3141 2029282a26252423 0000000000000003 ffff810037e3a000
Call Trace:
 <IRQ [<ffffffff880b26cc>] :aacraid:get_container_name_callback+0x8b/0xb5
 [<ffffffff880b6f67>] :aacraid:aac_intr_normal+0x1b3/0x1f9
 [<ffffffff880b8007>] :aacraid:aac_rkt_intr+0x37/0x115
 [<ffffffff80099749>] __rcu_process_callbacks+0xf8/0x1a8
 [<ffffffff80010705>] handle_IRQ_event+0x29/0x58
 [<ffffffff800b2fe0>] __do_IRQ+0xa4/0x105
 [<ffffffff80011c19>] __do_softirq+0x5e/0xd5
 [<ffffffff8006a193>] do_IRQ+0xe7/0xf5
 [<ffffffff8005b649>] ret_from_intr+0x0/0xa

On digging into it, it turned out that the customer was probing an
aacraid device with an INQUIRY of 8 bytes.  The way aacraid works, it
was blindly trying to use aac_internal_transfer to copy the container
name to byte 16 of the inquiry data, resulting in a negative transfer
length.  It then copies over the whole of kernel memory before
dropping off the end.

Fix updated and corrected by Mark Salyzyn

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-16 18:16:13 -04:00
Salyzyn, Mark 2ab01efd1d [SCSI] aacraid: Correct sa platform support. (Was: [Bug 8469] Bad EIP value on pentium3 SMP kernel-2.6.21.1)
http://bugzilla.kernel.org/show_bug.cgi?id=8469

As discussed in the bugzilla outlined below, we have an sa based
(Mustang) RAID adapter on the system, a Dell PERC2/QC. Affected
controllers are HP NetRAID, Adaptec AAC-364, Dell PERC2/QC or Adaptec
5400S. This problem  coincides with the introduction of the adapter_comm
and adapter_deliver platform functions (Message [PATCH 1/4] aacraid:
rework communication support code, January 23 2007, which initially
migrated to 2.6.21)

The panic occurs with an uninitialized adapter_deliver platform function
pointer. The enclosed patch, unmodified as tested by Rainer, solves the
problem.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-16 13:06:26 -04:00
FUJITA Tomonori bcd4e22540 [SCSI] tgt: fix a rdma indirect transfer error bug
This sets sg_dma_len to a proper value.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-16 12:45:17 -04:00
Ed Lin c25da0afa7 [SCSI] stex: minor cleanup and version update
Add debug information into abort and host_reset routine.
Change ioremap to ioremap_nocache.
Version updated to 3.6.0000.1.

Signed-off-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-16 12:41:39 -04:00
Ed Lin d116a7bc6a [SCSI] stex: fix reset recovery for console device
After reset completed, the scsi error handler sends out TEST_UNIT_READY
to the device. For 'normal' devices the command will be handled by firmware.
However, because the RAID console only interfaces to scsi mid layer, the
firmware will not process the command for it. This will make the console to
be offlined right after reset. Add the handling in driver to fix this problem.

Signed-off-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-16 12:41:23 -04:00
Ed Lin 69f4a51391 [SCSI] stex: extend hard reset wait time
During hard bus reset of st_shasta controllers, 1 ms is not enough for
16-port controllers, although it's good for 8-port controllers.  Extend the
wait time to 100  ms to allow bus resets finish successfully.

Signed-off-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-16 12:40:51 -04:00
Ed Lin e0b2e597d5 [SCSI] stex: fix id mapping issue
The correct internal mapping of stex controllers should be:
id:0~15, lun:0~7 (st_shasta)
id:0, lun:0~127 (st_yosemite)
id:0~127, lun:0 (st_vsc and st_vsc1)

This patch reports the internal mapping to scsi mid layer,  eliminating
the translation between scsi mid layer and firmware. To achieve this
goal, we also need to:
-- fail the REPORT_LUNS command for st_shasta because the
   firmware is known to not report all actual luns
-- add an entry in scsi_devindo.c to force sequential lun scan
   (for st_shasta controllers)
-- fail the REPORT_LUNS command for console device
-- remove special handling of REPORT_LUNS command for
   st_yosemite, as there is no translation mapping now

Signed-off-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-16 12:40:21 -04:00
Brian King 5af23d263c [SCSI] ipr: Proper return codes for eh_dev_reset for SATA devices
Currently ipr always returns success from eh_dev_reset when
called for a SATA device. If ata_do_eh is unable to recover
for some reason, this can result in commands that are still
outstanding when ata_do_eh returns. Change ipr to verify no
commands are outstanding before returning success.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-16 12:39:33 -04:00
James Smart a53eb5e060 [SCSI] FC Transport support for vports based on NPIV
This patch provides support for FC virtual ports based on NPIV.
For information on the interfaces and design, please read the
Documentation/scsi/scsi_fc_transport.txt file enclosed within
the patch.

The RFC was originally posted here:
http://marc.info/?l=linux-scsi&m=117226959918393&w=2

Changes from the initial RFC:
- Bug fix: needed a transport_class_unregister() for the vport class
- Create a symlink to the vport in the shost device if it is not the
    parent of the vport.
- Made symbolic name writable so it can be set after creation
- Made the temporary fc_vport_identifiers struct private to the
transport.
- Deleted the vport_id field from the vport. I couldn't find any good
  use for it (and symname is a good replacement).
- Made the vport_state and vport_last_state "private" attributes.
  Added the fc_vport_set_state() helper function to manage state
  transitions
- Updated vport_create() to allow a vport to be created in a disabled
  state.
- Added INITIALIZING and FAILED vport states
- Added VPCERR_xxx defines for errors to be returned from vport_create()
- Created a Documentation/scsi/scsi_fc_transport.txt file that describes
  the interfaces and expected LLDD behaviors.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-16 09:36:15 -04:00
David S. Miller ec6fb1ad84 [SCSI]: Add help text for SCSI_ESP_CORE.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-13 23:52:14 -07:00
Linus Torvalds f7d02ae76e Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (30 commits)
  [ARM] Use new get_irqnr_preamble
  [ARM] Ensure machine class menu is sorted alphabetically
  [ARM] 4333/2: KS8695: Micrel Development board
  [ARM] 4332/2: KS8695: Serial driver
  [ARM] 4331/3: Support for Micrel/Kendin KS8695 processor
  [ARM] 4371/1: AT91: Support for Atmel AT91SAM9RL-EK development board
  [ARM] 4372/1: Define byte sizes in asm-arm/sizes.h
  [ARM] 4370/3: AT91: Support for Atmel AT91SAM9RL processors.
  [ARM] Update mach-types
  [ARM] export symbol csum_partial_copy_from_user
  [ARM] iop13xx: msi support
  [ARM] stacktrace fix
  [ARM] Spinlock initializer cleanup
  [ARM] remove useless config option GENERIC_BUST_SPINLOCK
  [ARM] 4303/3: base kernel support for TI DaVinci
  [ARM] 4369/1: AT91: Fix circular dependency in header files
  [ARM] 4368/1: S3C24xx: build fix
  [ARM] 4364/1: AT91: LEDS on AT91SAM9261-EK
  [ARM] Fix iop32x/iop33x build
  [ARM] EBSA110: fix build errors caused by missing "const"
  ...
2007-05-12 18:11:33 -07:00
Russell King 10bdaaa0fa [ARM] ecard: add ecardm_iomap() / ecardm_iounmap()
Add devres ecardm_iomap() and ecardm_iounmap() for Acorn expansion
cards.  Convert all expansion card drivers to use them.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-05-11 17:19:02 +01:00
Russell King c7b87f3d50 [ARM] ecard: add helper function for setting ecard irq ops
Rather than having every driver fiddle about setting its private
IRQ operations and data, provide a helper function to contain
this functionality in one place.

Arrange to remove the driver-private IRQ operations and data when
the device is removed from the driver, and remove the driver
private code to do this.

This fixes potential problems caused by drivers forgetting to
remove these hooks.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-05-11 17:18:55 +01:00
Ralf Baechle df9f54084f Convert SGI IP22 and specific drivers to platform_device.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-05-11 17:00:29 +01:00
Linus Torvalds 3cb7396b7b Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide: fix PIO setup on resume for ATAPI devices
  ide: legacy PCI bus order probing fixes
  ide: add ide_proc_register_port()
  ide: add "initializing" argument to ide_register_hw()
  ide: cable detection fixes (take 2)
  ide: move IDE settings handling to ide-proc.c
  ide: split off ioctl handling from IDE settings (v2)
  ide: make /proc/ide/ optional
  ide: add ide_tune_dma() helper
  ide: rework the code for selecting the best DMA transfer mode (v3)
  ide: fix UDMA/MWDMA/SWDMA masks (v3)
2007-05-09 15:41:31 -07:00
Bartlomiej Zolnierkiewicz 7662d046df ide: move IDE settings handling to ide-proc.c
* move
	__ide_add_setting()
	ide_add_setting()
	__ide_remove_setting()
	auto_remove_settings()
	ide_find_setting_by_name()
	ide_read_setting()
	ide_write_setting()
	set_xfer_rate()
	ide_add_generic_settings()
	ide_register_subdriver()
	ide_unregister_subdriver()

  from ide.c to ide-proc.c

* set_{io_32bit,pio_mode,using_dma}() cannot be marked static now, fix it

* rename ide_[un]register_subdriver() to ide_proc_[un]register_driver(),
  update device drivers to use new names

* add CONFIG_IDE_PROC_FS=n versions of ide_proc_[un]register_driver()
  and ide_add_generic_settings()

* make ide_find_setting_by_name(), ide_{read,write}_setting()
  and ide_{add,remove}_proc_entries() static

* cover IDE settings code in device drivers with CONFIG_IDE_PROC_FS #ifdef,
  also while at it cover with CONFIG_IDE_PROC_FS #ifdef ide_driver_t.proc

* remove bogus comment from ide.h

* cover with CONFIG_IDE_PROC_FS #ifdef .proc and .settings in ide_drive_t

Besides saner code this patch results in the IDE core smaller by ~2 kB
(on x86-32) and IDE disk driver by ~1 kB (ditto) when CONFIG_IDE_PROC_FS=n.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-05-10 00:01:10 +02:00
Bartlomiej Zolnierkiewicz 1497943ee6 ide: split off ioctl handling from IDE settings (v2)
* do write permission and min/max checks in ide_procset_t functions

* ide-disk.c: drive->id is always available so cleanup "multcount" setting
  accordingly

* ide-disk.c: "address" setting was incorrectly defined as type TYPE_INTA,
  fix it by using type TYPE_BYTE and updating ide_drive_t->adressing field,
  the bug didn't trigger because this IDE setting uses custom ->set function

* ide.c: add set_ksettings() for handling HDIO_SET_KEEPSETTINGS ioctl

* ide.c: add set_unmaskirq() for handling HDIO_SET_UNMASKINTR ioctl

* handle ioctls directly in generic_ide_ioclt() and idedisk_ioctl()
  instead of using IDE settings to deal with them

* remove no longer needed ide_find_setting_by_ioctl() and {read,write}_ioctl
  fields from ide_settings_t, also remove now unused TYPE_INTA handling

v2:
* add missing EXPORT_SYMBOL_GPL(ide_setting_sem) needed now for ide-disk

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-05-10 00:01:10 +02:00
Bartlomiej Zolnierkiewicz ecfd80e4a5 ide: make /proc/ide/ optional
All important information/features should be already available through
sysfs and ioctl interfaces.

Add CONFIG_IDE_PROC_FS (CONFIG_SCSI_PROC_FS rip-off) config option,
disabling it makes IDE driver ~5 kB smaller (on x86-32).

While at it add CONFIG_PROC_FS=n versions of proc_ide_{create,destroy}()
and remove no longer needed #ifdefs.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-05-10 00:01:09 +02:00
Michael Opdenacker 59c51591a0 Fix occurrences of "the the "
Signed-off-by: Michael Opdenacker <michael@free-electrons.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-05-09 08:57:56 +02:00
Linus Torvalds 0c23664ee8 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Optimize fault kprobe handling just like powerpc.
  [SPARC]: Wire up utimensat syscall.
  [SPARC64]: Fix request_irq() ignored result warnings in PCI controller code.
  [SPARC64]: Kill asm-sparc64/pbm.h
  [ATYFB]: Fix sparc includes.
  [QLA2XXX]: Fix build on sparc.
  [SPARC64]: Removal of trivial pci_controller_info uses.
  [SPARC64]: Move index info pci_pbm_info.
  [SPARC64]: Move {setup,teardown}_msi_irq into pci_pbm_info.
  [SPARC64]: Move pci_ops into pci_pbm_info.
  [SPARC64] SBUS: Error interrupt registry cleanups.
  [SPARC64] PCI: Use root list of pbm's instead of pci_controller_info's
  [SPARC64] PCI: Kill PROM_PCIRNG_MAX and PROM_PCIIMAP_MAX.
  [SPARC64] PCI: Use common routine to fetch PBM properties.
2007-05-08 20:32:43 -07:00
Linus Torvalds 6ec129c3a2 Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (58 commits)
  [SCSI] zfcp: clear boxed flag on unit reopen.
  [SCSI] zfcp: clear adapter failed flag if an fsf request times out.
  [SCSI] zfcp: rework request ID management.
  [SCSI] zfcp: Fix deadlock between zfcp ERP and SCSI
  [SCSI] zfcp: Locking for req_no and req_seq_no
  [SCSI] zfcp: print S_ID and D_ID with 3 bytes
  [SCSI] ipr: Use PCI-E reset API for new ipr adapter
  [SCSI] qla2xxx: Update version number to 8.01.07-k7.
  [SCSI] qla2xxx: Add MSI support.
  [SCSI] qla2xxx: Correct pci_set_msi() usage semantics.
  [SCSI] qla2xxx: Attempt to stop firmware only if it had been previously executed.
  [SCSI] qla2xxx: Honor NVRAM port-down-retry-count settings.
  [SCSI] qla2xxx: Error-out during probe() if we're unable to complete HBA initialization.
  [SCSI] zfcp: Stop system after memory corruption
  [SCSI] mesh: cleanup variable usage in interrupt handler
  [SCSI] megaraid: replace yield() with cond_resched()
  [SCSI] megaraid: fix warnings when CONFIG_PROC_FS=n
  [SCSI] aacraid: correct SUN products to README
  [SCSI] aacraid: superfluous adapter reset for IBM 8 series ServeRAID controllers
  [SCSI] aacraid: kexec fix (reset interrupt handler)
  ...
2007-05-08 20:32:16 -07:00
David S. Miller 15576bc8ad [QLA2XXX]: Fix build on sparc.
We now use pci_device_to_OF_node() to get properties
and of_get_property() returns const pointers.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-08 16:41:49 -07:00
Linus Torvalds df6d3916f3 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (77 commits)
  [POWERPC] Abolish powerpc_flash_init()
  [POWERPC] Early serial debug support for PPC44x
  [POWERPC] Support for the Ebony 440GP reference board in arch/powerpc
  [POWERPC] Add device tree for Ebony
  [POWERPC] Add powerpc/platforms/44x, disable platforms/4xx for now
  [POWERPC] MPIC U3/U4 MSI backend
  [POWERPC] MPIC MSI allocator
  [POWERPC] Enable MSI mappings for MPIC
  [POWERPC] Tell Phyp we support MSI
  [POWERPC] RTAS MSI implementation
  [POWERPC] PowerPC MSI infrastructure
  [POWERPC] Rip out the existing powerpc msi stubs
  [POWERPC] Remove use of 4level-fixup.h for ppc32
  [POWERPC] Add powerpc PCI-E reset API implementation
  [POWERPC] Holly bootwrapper
  [POWERPC] Holly DTS
  [POWERPC] Holly defconfig
  [POWERPC] Add support for 750CL Holly board
  [POWERPC] Generalize tsi108 PCI setup
  [POWERPC] Generalize tsi108 PHY types
  ...

Fixed conflict in include/asm-powerpc/kdebug.h manually

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:50:19 -07:00
Thomas Gleixner 2833bf68b9 Replace deprecated SA_xxx interrupt flags
Fix the last users of the deprecated SA_xxx interrupt flags.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:15:08 -07:00
Randy Dunlap e63340ae6b header cleaning: don't include smp_lock.h when not used
Remove includes of <linux/smp_lock.h> where it is not used/needed.
Suggested by Al Viro.

Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
sparc64, and arm (all 59 defconfigs).

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:15:07 -07:00
Brian King 463fc696ed [SCSI] ipr: Use PCI-E reset API for new ipr adapter
Use a newly added PCI API to issue a PCI Fundamental reset
(warm reset) to a new ipr PCI-E adapter. Typically, the
ipr adapter uses the start BIST bit in config space to reset
an adapter. Issuing start BIST on this particular adapter
results in the PCI-E logic on the card losing sync, which
causes PCI-E errors, making the card unusable. The only reset
mechanism that exists on this hardware that does not have this
problem is PCI Fundamental reset (warm reset).

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-08 11:54:40 -05:00
Andrew Vasquez d24f8e8fef [SCSI] qla2xxx: Update version number to 8.01.07-k7.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-08 11:21:59 -05:00
Andrew Vasquez cbedb60186 [SCSI] qla2xxx: Add MSI support.
Supported ISP types include ISP2422 and revision-2 type
ISP2432 chips.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-08 11:21:45 -05:00
Andrew Vasquez a157b1014f [SCSI] qla2xxx: Correct pci_set_msi() usage semantics.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-08 11:21:29 -05:00
Andrew Vasquez 75edf81d33 [SCSI] qla2xxx: Attempt to stop firmware only if it had been previously executed.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-08 11:21:07 -05:00
Andrew Vasquez a7b6184225 [SCSI] qla2xxx: Honor NVRAM port-down-retry-count settings.
Hardcoding the qlport_down_retry module-parameter
effectively disallowed any user-defined NVRAM setting to go
into effect.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-08 11:20:52 -05:00
Andrew Vasquez 765140bf22 [SCSI] qla2xxx: Error-out during probe() if we're unable to complete HBA initialization.
Remove a stale check against ha->device_flags
(DFLG_NO_CABLE) as topology scanning is performed within the
DPC-thread context.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-08 11:20:39 -05:00
Olaf Hering 2135be5f24 [SCSI] mesh: cleanup variable usage in interrupt handler
_ convert void* to struct mesh_state*

- remove unused irq argument from mesh_interrupt()

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-08 11:17:21 -05:00
Amol Lad e1fa0ceaf3 [SCSI] megaraid: replace yield() with cond_resched()
For this driver cond_resched() seems to be a better alternative

Signed-off-by: Amol Lad <amol@verismonetworks.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-08 11:16:44 -05:00
walter harms 84a3c97b93 [SCSI] megaraid: fix warnings when CONFIG_PROC_FS=n
drivers/scsi/megaraid.c: In function 'megaraid_probe_one':
drivers/scsi/megaraid.c:4893: warning: implicit declaration of function 'mega_create_proc_entry'
drivers/scsi/megaraid.c: In function 'megaraid_remove_one':
drivers/scsi/megaraid.c:4968: warning: unused variable 'buf'

Fix by adding #defines

Signed-off-by: walter harms <wharms@bfs.de>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-08 11:15:08 -05:00
Paul Mackerras 02bbc0f09c Merge branch 'linux-2.6' 2007-05-08 13:37:51 +10:00
Martin Habets d679f805e7 [SCSI] esp_scsi: Fix section mismatch warnings.
Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-07 14:05:03 -07:00
David S. Miller 6025dfe5b2 [SCSI] SUNESP: sun_esp.c needs linux/delay.h
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-06 22:43:41 -07:00
Linus Torvalds 15700770ef Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (38 commits)
  kconfig: fix mconf segmentation fault
  kbuild: enable use of code from a different dir
  kconfig: error out if recursive dependencies are found
  kbuild: scripts/basic/fixdep segfault on pathological string-o-death
  kconfig: correct minor typo in Kconfig warning message.
  kconfig: fix path to modules.txt in Kconfig help
  usr/Kconfig: fix typo
  kernel-doc: alphabetically-sorted entries in index.html of 'htmldocs'
  kbuild: be more explicit on missing .config file
  kbuild: clarify the creation of the LOCALVERSION_AUTO string.
  kbuild: propagate errors from find in scripts/gen_initramfs_list.sh
  kconfig: refer to qt3 if we cannot find qt libraries
  kbuild: handle compressed cpio initramfs-es
  kbuild: ignore section mismatch warning for references from .paravirtprobe to .init.text
  kbuild: remove stale comment in modpost.c
  kbuild/mkuboot.sh: allow spaces in CROSS_COMPILE
  kbuild: fix make mrproper for Documentation/DocBook/man
  kbuild: remove kconfig binaries during make mrproper
  kconfig/menuconfig: do not hardcode '.config'
  kbuild: override build timestamp & version
  ...
2007-05-06 13:21:57 -07:00
Salyzyn, Mark 9e4d4a5d71 [SCSI] aacraid: superfluous adapter reset for IBM 8 series ServeRAID controllers
The kexec patch introduced a superfluous (and otherwise inert) reset of
some adapters. The register can have a hardware default value that has
zeros for the undefined interrupts. This patch refines the test of the
interrupt enable register to focus on only the interrupts that affect
the driver in order to detect if an incomplete shutdown of the Adapter
had occurred (kdump).

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:48:21 -05:00
Salyzyn, Mark a5694ec545 [SCSI] aacraid: kexec fix (reset interrupt handler)
Another layer on this onion also discovered by Duane, the
interrupt enable handler also needed to be set ... The interrupt enable
was called from within the synchronous command handler.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:47:03 -05:00
Guennadi Liakhovetski 859232113c [SCSI] tmscsim: Remove the last bus_to_virt()
Dynamically map the buffer for PIO for the residue byte.

Signed-off-by: G. Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:21 -05:00
Guennadi Liakhovetski 46e5ba2b64 [SCSI] tmscsim: remove bogus endianness conversions
cpu_to_le32 endianness conversions in tmscsim.c, followed by
arithmetic operations don't look correct. Besides, {in,out}[wl]
already perform the necessary conversions. Further, bus addresses
of request buffers are guaranteed to be (mapped) under 4G by
current scsi- and block-layer defaults. This could be explicitly
enforced by using blk_queue_bounce_limit(), which, however,
doesn't seem to be the common practice among SCSI drivers.

Signed-off-by: G. Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:21 -05:00
Guennadi Liakhovetski 860bfecf71 [SCSI] tmscsim: remove long dead DMA_INT
DMA_INT code is disabled since 1998, remove it to prepare
for further cleanup.

Signed-off-by: G. Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:21 -05:00
Brian King 473b1e8ed2 [SCSI] ipr: Better handle adapter boot time errors
If an ipr adapter encounters an adapter error requiring an
adapter reset to recover from prior to driver load time, the
error will be ignored and recovery will not happen until the
initial timeout occurs waiting for the firmware to come ready,
which means a five minute timeout. Fix is to read the interrupt
register before clearing any of the interrupts at probe time.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:20 -05:00
James Smart 92740b24ce [SCSI] fc_transport: make all rports wait dev_loss_tmo before removing them
Per the comment in the change - it's not always prudent to immediately
remove the rport upon first notice of a disconnect. Make all rports
wait dev_loss_tmo before being deleted (and each could have a separate
dev_loss_tmo value).

The original post was:
http://marc.info/?l=linux-scsi&m=117392196006703&w=2

The repost contains the following changes:
 - Bug fix in fc_starget_delete(). Dev_loss_tmo_callbk() was called prior to
   tearing down the target. The callback is to be the last thing called, as
   it tells the LLDD that the rport is completely finished and can be torn
   down.  Rework so that terminate_rport_io() is called to terminate the
   outstanding io. Isolated work so it's is simply "starget" work.
 - Fix holes in original patch. There were code paths that did not expect
   the dev_loss_tmo timer to be running for the non-fcp rports.
 - Bug Fix: the transport wasn't protecting against a LLDD calling
   fc_remote_port_delete() back-to-back. Thus, the dev_loss_tmo timer
   could be restarted such that it fires after the rport had been deleted.
   Validate rport state before starting the timer.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:20 -05:00
Brian King ac09c34908 [SCSI] ipr: Enable multi-initator RAID support
Enables multi-initiator support on ipr RAID adapters that support it.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:20 -05:00
Brian King 8cf093e275 [SCSI] ipr: Improved dual adapter errors
Formats ipr dual adapter errors so that they are more compact.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:19 -05:00
Brian King 22d2e402d1 [SCSI] ipr: Increase adapter operational timeout
Increases the adapter operational timeout for some adapters that support
dual controller configurations, since they may take longer to come ready.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:19 -05:00
Brian King 65f5647544 [SCSI] ipr: Handle IOA reset request
In ipr dual adapter configurations, the ipr adapter firmware
may require an adapter reset for various reasons. The reset
is requested by the adapter firmware logging an error with
an IOASC of 0x02048000. Add support to log this error, and
reset the adapter.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:19 -05:00
Brian King 8a048994f4 [SCSI] ipr: Handle check condition status from disk array device
On newer levels of microcode for ipr RAID adapters supporting
multi-initiator configurations, the disk array, or VSET, resources
are capable of generating a check condition. This patch prevents
ipr from generating sense data in this scenario and retrieving it
from the logical device instead.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:19 -05:00
Brian King 6bb0417074 [SCSI] ipr: Handle UA on disk array following an adapter reset
On certain ipr RAID adapters, which are capable of multi-initiator
configurations, the disk array, or VSET, resources will be in a POR
Unit Attention state following an adapter reset. In order for the
midlayer to handle the UA, I must report a bus reset to the logical
disk array bus at the end of an adapter reset.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:19 -05:00
Brian King 68c96e5960 [SCSI] ipr: Allow driver_data to be passed for dynamic ids
Since driver_data for pci ids in the ipr driver is now
just flags, we can allow these to be passed in from userspace
for dynamic ids.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:18 -05:00
Brian King 970ea29411 [SCSI] ipr: Prevent overlapped adapter resets
This patch fixes some scenarios where an ipr adapter
could get reset overlapped, which could cause very
long timeouts to occur, or PCI bus errors.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:17 -05:00
Christoph Hellwig d7a54e30d3 [SCSI] sas_scsi_host: Convert to use the kthread API
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:17 -05:00
Adrian Bunk 4797547778 [SCSI] qla4xxx: possible cleanups
- make needlessly global code static
- #if 0 unused functions

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:16 -05:00
James Smart 15061f23a1 [SCSI] lpfc 8.1.12 : Change version number to 8.1.12
Change version number to 8.1.12

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:16 -05:00
James Smart 9413afff8f [SCSI] lpfc 8.1.12 : Update copyright year to 2007
Update copyright year to 2007

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:16 -05:00
James Smart b87eab38be [SCSI] lpfc 8.1.12 : Added support for 8G speed and new HBAs
Added support for 8G speed and new HBAs.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:16 -05:00
James Smart 47a8617c7d [SCSI] lpfc 8.1.12 : Add support for async scanning
Add support for async scanning

Notes: This is the async scan patch to our driver from Matthew Wilcox.
  The async scan logic is still subject to errors in insmod/rmmod, as
  the async scan threads don't get shutdown when the module unloads
  underneath them. See http://marc.info/?l=linux-scsi&m=117551999925582&w=2

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:16 -05:00
James Smart ebdbe65f07 [SCSI] lpfc 8.1.12 : Don't process ERATT interrupts when issuing KILL_BOARD mbx command
Don't process ERATT interrupts when issuing KILL_BOARD mbx command

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:15 -05:00
James Smart 685f0bf7af [SCSI] lpfc 8.1.12 : Collapse discovery lists to a single node list
Collapse discovery lists to a single node list.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:15 -05:00
James Smart 329f9bc735 [SCSI] lpfc 8.1.12 : Reference count node structures for node lifetime management
Reference count node structures for node lifetime management.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:15 -05:00
James Smart 2680eeaaa0 [SCSI] lpfc 8.1.12 : Improve handling of failed ELS aborts
Improve handling of failed ELS aborts.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:15 -05:00
James Smart 5b8bd0c9be [SCSI] lpfc 8.1.12 : Improve diagnostic messages and change local loopback message to KERN_INFO
Improve diagnostic messages and change local loopback message to KERN_INFO

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:14 -05:00
James Smart 82085718fa [SCSI] lpfc 8.1.12 : Fixed recovery of rport after race with dev_loss_tmo
Fixed recovery of rport after race with dev_loss_tmo

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-06 09:33:14 -05:00