kernel/kernel-generic.git
15 years ago[SCSI] zfcp: register with SCSI layer on ccw registration
Swen Schillig [Fri, 19 Dec 2008 15:56:53 +0000 (16:56 +0100)]
[SCSI] zfcp: register with SCSI layer on ccw registration

Synchronize the registration and de-registration with the SCSI layer
at CCW registration, de-registration. Before we registered with the
SCSI layer on adapter activation. This way the reg and de-reg process
is in balance.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] zfcp: Fix message line break
Christof Schmitt [Fri, 19 Dec 2008 15:56:52 +0000 (16:56 +0100)]
[SCSI] zfcp: Fix message line break

Move the closing parenthesis before the line break.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Acked-by: Felix Beck <felix@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: changes in multiq code
Anirban Chakraborty [Thu, 18 Dec 2008 18:06:15 +0000 (10:06 -0800)]
[SCSI] qla2xxx: changes in multiq code

Following changes have been made:
 1. Scan outstanding commands only in the queue where it is submitted
 2. Update queue registers directly in the fast path
 3. Queue specific BAR is remapped only for multiq capable adapters

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] eata: fix the data buffer accessors conversion regression
FUJITA Tomonori [Mon, 22 Dec 2008 19:01:35 +0000 (04:01 +0900)]
[SCSI] eata: fix the data buffer accessors conversion regression

This fixes the regression introduced by the commit
58e2a02eb18393e76a469580fedf7caec190eb5e (eata: convert to use the
data buffer accessors), reported:

http://marc.info/?t=122987621300006&r=1&w=2

- fix DMA_NONE handling in map_dma()

- this driver can't use scsi_dma_map since host->shost_gendev.parent
is not set properly (it uses scsi_register).

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Reported-by: Arthur Marsh <arthur.marsh@internode.on.net>
Tested-by: Arthur Marsh <arthur.marsh@internode.on.net>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] ibmvfc: Improve async event handling
Brian King [Thu, 18 Dec 2008 15:26:51 +0000 (09:26 -0600)]
[SCSI] ibmvfc: Improve async event handling

While doing various error injection testing, such as cable
pulls and target moves, some issues were observed in handling
these events. This patch improves the way these events are handled
by increasing the delay waiting for the fabric to settle and also
changes the behavior of Link Up to break the CRQ to ensure everything
gets cleaned up properly on the VIOS.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] lpfc : correct printk types on PPC compiles
James Smart [Tue, 16 Dec 2008 15:34:09 +0000 (10:34 -0500)]
[SCSI] lpfc : correct printk types on PPC compiles

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] ipr: fix lockdep warning from ipr_ioa_reset_done
Mark Nelson [Wed, 10 Dec 2008 01:23:20 +0000 (12:23 +1100)]
[SCSI] ipr: fix lockdep warning from ipr_ioa_reset_done

To fix the following lockdep warning we turn the spin_unlock_irq() into
a spin_unlock() and similarly for the corresponding spin_lock_irq(). We
can do this because there is no need to enable interrupts in this path
(thanks to Bring King for the tip).

Badness at kernel/lockdep.c:2193
NIP: c0000000000855d0 LR: c0000000000855b4 CTR: c0000000000482d0
REGS: c00000000fffb8d0 TRAP: 0700   Not tainted  (2.6.28-rc5-autokern1)
MSR: 8000000000021032 <ME,IR,DR>  CR: 28000022  XER: 00000004
TASK = c00000000091fa80[0] 'swapper' THREAD: c000000000a3c000 CPU: 0
GPR00: 0000000000000000 c00000000fffbb50 c000000000a3c2e0 0000000000000001
GPR04: 000000000000a580 c0000000003870d4 0000000000000000 0000000000000001
GPR08: 0000000000000000 c00000000112fdf0 c0000000008ed918 c000000000abcfd0
GPR12: 0000000048000088 c000000000a7f300 0000000000000000 0000000002100000
GPR16: c000000000644bd0 c000000000643390 0000000000000000 00000000003d0c00
GPR20: 00000000028372d8 c0000000007372d8 0000000002837548 c000000000737548
GPR24: c000000000644660 00000000028372d8 000000000000001a c000000076760000
GPR28: 0000000000000004 c0000000004e8450 c0000000009aafb0 c00000000091fa80
NIP [c0000000000855d0] .trace_hardirqs_on_caller+0x10c/0x194
LR [c0000000000855b4] .trace_hardirqs_on_caller+0xf0/0x194
Call Trace:
[c00000000fffbb50] [c00000000fffbbe0] 0xc00000000fffbbe0 (unreliable)
[c00000000fffbbe0] [c0000000004e8450] ._spin_unlock_irq+0x38/0x5c
[c00000000fffbc70] [c0000000003870d4] .ipr_ioa_reset_done+0x204/0x284
[c00000000fffbd10] [c00000000037d234] .ipr_reset_ioa_job+0xc4/0xec
[c00000000fffbda0] [c000000000385ce0] .ipr_isr+0x208/0x484
[c00000000fffbe50] [c0000000000aaf3c] .handle_IRQ_event+0x58/0xd4
[c00000000fffbef0] [c0000000000ad978] .handle_fasteoi_irq+0x110/0x1ac
[c00000000fffbf90] [c000000000025214] .call_handle_irq+0x1c/0x2c
[c000000000a3f9a0] [c00000000000d168] .do_IRQ+0x120/0x210
[c000000000a3fa40] [c000000000004804] hardware_interrupt_entry+0x1c/0x98
--- Exception: 501 at .pseries_dedicated_idle_sleep+0xec/0x1cc
    LR = .pseries_dedicated_idle_sleep+0xdc/0x1cc
[c000000000a3fd30] [c000000000038208] .pseries_dedicated_idle_sleep+0x74/0x1cc (unreliable)
[c000000000a3fdd0] [c000000000012134] .cpu_idle+0x114/0x1dc
[c000000000a3fe60] [c0000000004ecb18] .rest_init+0x7c/0x94
[c000000000a3fee0] [c000000000700a40] .start_kernel+0x4b8/0x4e0
[c000000000a3ff90] [c000000000008368] .start_here_common+0x1c/0x34
Instruction dump:
e92d01b0 80090894 2f800000 41be002c 481ed1d1 60000000 2fa30000 419e0080
e93e8090 80090000 2f800000 409e0070 <0fe0000048000068 7fe3fb78 38800001

Signed-off-by: Mark Nelson <markn@au1.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] fc transport: pre-emptively terminate i/o upon dev_loss_tmo timeout
James Smart [Fri, 5 Dec 2008 22:29:59 +0000 (16:29 -0600)]
[SCSI] fc transport: pre-emptively terminate i/o upon dev_loss_tmo timeout

Pre-emptively terminate i/o on the rport if dev_loss_tmo has fired.
The desire is to terminate everything, so that the i/o is cleaned up
prior to the sdev's being unblocked, thus any outstanding timeouts/aborts
are avoided.

Also, we do this early enough such that the rport's port_id field is
still valid. FCOE libFC code needs this info to find the i/o's to
terminate.

Signed-off-by: James Smart <james.smart@emulex.com>
[michaelc@cs.wisc.edu: remove extra scsi_target_unblock call]
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: add support for multi-queue adapter
Anirban Chakraborty [Wed, 10 Dec 2008 00:45:39 +0000 (16:45 -0800)]
[SCSI] qla2xxx: add support for multi-queue adapter

Following changes have been made.
1. qla_hw_data structure holds an array for request queue pointers,
and an array for response queue pointers.
2. The base request and response queues are created by default.
3. Additional request and response queues are created at the time of vport
creation. If queue resources are exhausted during vport creation, newly
created vports use the default queue.
4. Requests are sent to the request queue that the vport was assigned
in the beginning.
5. Responses are completed on the response queue with which the request queue
is associated with.

[fixup memcpy argument reversal spotted by davej@redhat.com]
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] fcoe: Fibre Channel over Ethernet
Robert Love [Tue, 9 Dec 2008 23:10:24 +0000 (15:10 -0800)]
[SCSI] fcoe: Fibre Channel over Ethernet

Encapsulation protocol for running Fibre Channel over Ethernet interfaces.
Creates virtual Fibre Channel host adapters using libfc.

This layer is the LLD to the scsi-ml. It allocates the Scsi_Host, utilizes
libfc for Fibre Channel protocol processing and interacts with netdev to
send/receive Ethernet packets.

Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] libfc: A modular Fibre Channel library
Robert Love [Tue, 9 Dec 2008 23:10:17 +0000 (15:10 -0800)]
[SCSI] libfc: A modular Fibre Channel library

libFC is composed of 4 blocks supported by an exchange manager
and a framing library. The upper 4 layers are fc_lport, fc_disc,
fc_rport and fc_fcp. A LLD that uses libfc could choose to
either use libfc's block, or using the transport template
defined in libfc.h, override one or more blocks with its own
implementation.

The EM (Exchange Manager) manages exhcanges/sequences for all
commands- ELS, CT and FCP.

The framing library frames ELS and CT commands.

The fc_lport block manages the library's representation of the
host's FC enabled ports.

The fc_disc block manages discovery of targets as well as
handling changes that occur in the FC fabric (via. RSCN events).

The fc_rport block manages the library's representation of other
entities in the FC fabric. Currently the library uses this block
for targets, its peer when in point-to-point mode and the
directory server, but can be extended for other entities if
needed.

The fc_fcp block interacts with the scsi-ml and handles all
I/O.

Signed-off-by: Robert Love <robert.w.love@intel.com>
[jejb: added include of delay.h to fix ppc64 compile prob spotted by sfr]
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] FC protocol definition header files
Robert Love [Tue, 9 Dec 2008 23:10:11 +0000 (15:10 -0800)]
[SCSI] FC protocol definition header files

Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] ibmvscsi: Don't fail EH due to insufficient resources
Brian King [Mon, 8 Dec 2008 23:01:47 +0000 (17:01 -0600)]
[SCSI] ibmvscsi: Don't fail EH due to insufficient resources

The ibmvscsi driver currently has a bug in it which can result
in it using up all its event structs for commands. If something
results in all those commands timing out, we won't have any resources
left to send aborts or resets. This results in escalating to a host reset
in order to recover, which is a bit heavy handed. This fixes it
by reducing can_queue by two in order to have resources to do EH.
It also changes the max_requests module parameter so that it is not
writable at runtime, since the code really does not handle it changing
at runtime.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] scsi_transport_spi: fix the misuse of scsi_execute return value
FUJITA Tomonori [Fri, 5 Dec 2008 06:37:52 +0000 (15:37 +0900)]
[SCSI] scsi_transport_spi: fix the misuse of scsi_execute return value

[jejb: fix rejections]
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] st: convert st_int_ioctl to use st_scsi_kern_execute
FUJITA Tomonori [Fri, 5 Dec 2008 06:25:31 +0000 (15:25 +0900)]
[SCSI] st: convert st_int_ioctl to use st_scsi_kern_execute

This replaces st_do_scsi in st_int_ioctl with st_scsi_kern_execute.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Kai Makisara <Kai.Makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] st: convert get_location to use st_scsi_kern_execute
FUJITA Tomonori [Fri, 5 Dec 2008 06:25:30 +0000 (15:25 +0900)]
[SCSI] st: convert get_location to use st_scsi_kern_execute

This replaces st_do_scsi in get_location (READ_POSITION) with
st_scsi_kern_execute.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Kai Makisara <Kai.Makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] st: convert write_mode_page to use st_scsi_kern_execute
FUJITA Tomonori [Fri, 5 Dec 2008 06:25:29 +0000 (15:25 +0900)]
[SCSI] st: convert write_mode_page to use st_scsi_kern_execute

This replaces st_do_scsi in write_mode_page (MODE_SELECT) with
st_scsi_kern_execute.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Kai Makisara <Kai.Makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] st: convert read_mode_page to use st_scsi_kern_execute
FUJITA Tomonori [Fri, 5 Dec 2008 06:25:28 +0000 (15:25 +0900)]
[SCSI] st: convert read_mode_page to use st_scsi_kern_execute

This replaces st_do_scsi in read_mode_page (MODE_SENSE) with
st_scsi_kern_execute.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Kai Makisara <Kai.Makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] st: convert check_tape to use st_scsi_kern_execute
FUJITA Tomonori [Fri, 5 Dec 2008 06:25:27 +0000 (15:25 +0900)]
[SCSI] st: convert check_tape to use st_scsi_kern_execute

This replaces st_do_scsi in check_tape (READ_BLOCK_LIMITS and
MODE_SENSE) with st_scsi_kern_execute.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Kai Makisara <Kai.Makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] st: convert st_flush to use st_scsi_kern_execute
FUJITA Tomonori [Fri, 5 Dec 2008 06:25:26 +0000 (15:25 +0900)]
[SCSI] st: convert st_flush to use st_scsi_kern_execute

This replaces st_do_scsi in st_flush (WRITE FILEMARKS) with
st_scsi_kern_execute.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Kai Makisara <Kai.Makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] st: convert cross_eof to use st_scsi_kern_execute
FUJITA Tomonori [Fri, 5 Dec 2008 06:25:25 +0000 (15:25 +0900)]
[SCSI] st: convert cross_eof to use st_scsi_kern_execute

This replaces st_do_scsi in cross_eof (SPACE) with
st_scsi_kern_execute.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Kai Makisara <Kai.Makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] st: convert do_load_unload to use st_scsi_kern_execute
FUJITA Tomonori [Fri, 5 Dec 2008 06:25:24 +0000 (15:25 +0900)]
[SCSI] st: convert do_load_unload to use st_scsi_kern_execute

This replaces st_do_scsi in do_load_unload (START STOP) with
st_scsi_kern_execute.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Kai Makisara <Kai.Makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] st: convert set_location to use st_scsi_kern_execute
FUJITA Tomonori [Fri, 5 Dec 2008 06:25:23 +0000 (15:25 +0900)]
[SCSI] st: convert set_location to use st_scsi_kern_execute

This replaces st_do_scsi in set_location (LOCATE 10) with
st_scsi_kern_execute.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Kai Makisara <Kai.Makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] st: convert test_ready to use st_scsi_kern_execute
FUJITA Tomonori [Fri, 5 Dec 2008 06:25:22 +0000 (15:25 +0900)]
[SCSI] st: convert test_ready to use st_scsi_kern_execute

This replaces st_do_scsi in test_ready (TEST_UNIT_READY) with
st_scsi_kern_execute.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Kai Makisara <Kai.Makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] st: add st_scsi_kern_execute helper function
FUJITA Tomonori [Fri, 5 Dec 2008 06:25:21 +0000 (15:25 +0900)]
[SCSI] st: add st_scsi_kern_execute helper function

st_scsi_kern_execute is a helper function to perform SCSI commands
synchronously. It supports data transfer with a liner in-kernel buffer
(not scatter gather). st_scsi_kern_execute internally uses
scsi_execute().

The majority of st_do_scsi can be replaced with
st_scsi_kern_execute. This is a preparation for rewriting st_do_scsi
to remove obsolete scsi_execute_async().

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] st: move st_request initialization to st_allocate_request form st_do_scsi
FUJITA Tomonori [Fri, 5 Dec 2008 06:25:20 +0000 (15:25 +0900)]
[SCSI] st: move st_request initialization to st_allocate_request form st_do_scsi

This moves st_request initialization code to st_allocate_request()
form st_do_scsi(). This is a preparation for making
st_allocate_request() usable for everyone, not only st_do_scsi().

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Kai Makisara <Kai.Makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] lpfc 8.3.0 : Update driver version to 8.3.0
James Smart [Fri, 5 Dec 2008 03:40:12 +0000 (22:40 -0500)]
[SCSI] lpfc 8.3.0 : Update driver version to 8.3.0

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] lpfc 8.3.0 : Hook lpfc's debugfs into Kconfig
James Smart [Fri, 5 Dec 2008 03:40:07 +0000 (22:40 -0500)]
[SCSI] lpfc 8.3.0 : Hook lpfc's debugfs into Kconfig

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] lpfc 8.3.0 : Add BlockGuard support (T10-DIF) code
James Smart [Fri, 5 Dec 2008 03:40:02 +0000 (22:40 -0500)]
[SCSI] lpfc 8.3.0 : Add BlockGuard support (T10-DIF) code

Add SCSI data path, error handling, and debugfs code to complete
BlockGuard support.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] lpfc 8.3.0 : Add BlockGuard support (T10-DIF) structs and defs
James Smart [Fri, 5 Dec 2008 03:39:46 +0000 (22:39 -0500)]
[SCSI] lpfc 8.3.0 : Add BlockGuard support (T10-DIF) structs and defs

Update struct definitions, #defines, sysfs entries, and initialization
to support BlockGuard.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] lpfc 8.3.0 : Fix some memory handling issues
James Smart [Fri, 5 Dec 2008 03:39:40 +0000 (22:39 -0500)]
[SCSI] lpfc 8.3.0 : Fix some memory handling issues

- Fix mailbox buffer leak on dump mailbox completion

- Fix mbuf leak in lpfc_pci_probe_one() SLI-2 mode error path

- Don't allocate HBQs in interrupt context

- Use correct size for FCP response buffer so that all available sense
  data is copied

- Fix jiffies calculation to prevent crash when collecting statistical
  data

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] lpfc 8.3.0 : Add active interrupt test for enabling MSI/MSI-X/INTx
James Smart [Fri, 5 Dec 2008 03:39:35 +0000 (22:39 -0500)]
[SCSI] lpfc 8.3.0 : Add active interrupt test for enabling MSI/MSI-X/INTx

Per the recent discussions at the Linux Plumbers Conference, when
enabling MSI or MSI-X, generate a test interrupt to verify the
interrupt routing is working properly.  If the test interrupt fails,
fall back to MSI first, and if that fails as well, to INTx.  If the
interrupt test fails with INTx, log an error and fail the PCI probe.

Also changed the use of spin_(lock|unlock) to the _irq(save|restore)
variants in the interrupt handlers because with multi-message MSI-X,
both interrupt handlers can now run in parallel.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] lpfc 8.3.0 : Fix several minor issues
James Smart [Fri, 5 Dec 2008 03:39:29 +0000 (22:39 -0500)]
[SCSI] lpfc 8.3.0 : Fix several minor issues

- Avoid polling HBA Error Attention when HBA's PCI channel is offline
  due to PCI EEH

- Fix handling of RSCN with non-zero event qualifiers

- Remove unnecessary sleeps during HBA initialization which slow down
  driver load

- Fix internal and external loopback on FCoE HBAs

- Fix incorrect decrement of cmd_pending count in lpfc_queuecomand
  error path

- Fix reporting of port busy events to management application

- Rename lpfc_adjust_queue_depth() to lpfc_rampdown_queue_depth() for
  consistency with its partner lpfc_rampup_queue_depth()

- Delete redundant lpfc_cmd->start_time = jiffies assignment in
  lpfc_queuecommand()

- Fix handling for ELS, mailbox and heartbeat time outs in the worker
  thread by removing unnecessary checking of the work_port_events
  flags.

- Fix NULL pointer dereference in lpfc_prep_els_iocb

- In lpfc_device_recov_npr_node(), move clearing of NLP_NPR_2B_DISC
  flag after call to lpfc_cancel_retry_delay_tmo() to keep
  targets-in-discovery count correct

- Remove lpfc_probe_one()'s call to scsi_scan_host() which could cause
  concurrent SCSI scans to step on each other

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] lpfc 8.3.0 : Fix issue with assumed Interrupt Enable Block support
James Smart [Fri, 5 Dec 2008 03:39:23 +0000 (22:39 -0500)]
[SCSI] lpfc 8.3.0 : Fix issue with assumed Interrupt Enable Block support

The phba hbq_get address was setup before the HBA reported support for
Interrupt Enable Block (INB).  This caused loopback tests to fail
after all HBQs had been used once.  Moved setting of hba_get until
after config port mailbox command completes.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] lpfc 8.3.0 : Added 3 small features and improve PCI EEH support
James Smart [Fri, 5 Dec 2008 03:39:19 +0000 (22:39 -0500)]
[SCSI] lpfc 8.3.0 : Added 3 small features and improve PCI EEH support

- Added FC_REG_VPORTRSCN_EVENT to lpfc_nl.h

- Added code to provide option ROM version from HBA and via sysfs

- Added support for HPS bit in config port mailbox command to tell HBA
  that host group pointers are in host memory.

- Bugfix for Extended Error Handling (EEH) support on IBM PowerPC P6
  platform with MSI enabled

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] lpfc 8.3.0 : Fix multiple NPIV issues
James Smart [Fri, 5 Dec 2008 03:39:13 +0000 (22:39 -0500)]
[SCSI] lpfc 8.3.0 : Fix multiple NPIV issues

- Fix lock up on rmmod with vports defined by having
  lpfc_pci_remove_one() invoke fc_vport_terminate() to remove all the
  vports before invoking fc_remove_host() for the physical port

- Fix echotest failure when NPIV is enabled

- Add the vport_disable function to the physical port's transport
  template to make the vport disable attribute visible

- Set the vport state to DISABLE on create if the disable flag is
  true

- Call lpfc_alloc_sysfs_attr() for vports so that statistical data
  collection works on them

- Support setting a vport's symbolic name via sysfs by writing to
  /sys/class/fc_vport/vportX/symbolic_name

- Fix create vport fails when link is down or in loop mode.  Should be
  able to be create vports any time NPIV is enabled

- Fix slow vport deletes when deleting multiple vports at once

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] lpfc 8.3.0 : Fix system crash due to uninitialized node access
James Smart [Fri, 5 Dec 2008 03:39:08 +0000 (22:39 -0500)]
[SCSI] lpfc 8.3.0 : Fix system crash due to uninitialized node access

In the IOCB completion handler, always check if the node is valid
before accessing the node object.  Added lpfc_initialize_node() to
initialize nodes.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] lpfc 8.3.0 : Add kernel-doc headers to lpfc_scsi.c
James Smart [Fri, 5 Dec 2008 03:39:02 +0000 (22:39 -0500)]
[SCSI] lpfc 8.3.0 : Add kernel-doc headers to lpfc_scsi.c

Add kernel-doc function headers to lpfc_scsi.c

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] lpfc 8.3.0 : Add support for Power Management Suspend/Resume operations
James Smart [Fri, 5 Dec 2008 03:38:54 +0000 (22:38 -0500)]
[SCSI] lpfc 8.3.0 : Add support for Power Management Suspend/Resume operations

Implement lpfc_pci_suspend_one() and lpfc_pci_resume_one() and
register them in the pci_driver table.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] lpfc 8.3.0 : Rework RSCN netlink event to send entire RSCN payload
James Smart [Fri, 5 Dec 2008 03:38:46 +0000 (22:38 -0500)]
[SCSI] lpfc 8.3.0 : Rework RSCN netlink event to send entire RSCN payload

Rework RSCN netlink event to send entire RSCN payload

Also replaces (SCSI_NL_VID_TYPE_PCI | PCI_VENDOR_ID_EMULEX) with
LPFC_NL_VENDOR_ID

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] retry with missing data for INQUIRY
FUJITA Tomonori [Fri, 5 Dec 2008 02:21:46 +0000 (11:21 +0900)]
[SCSI] retry with missing data for INQUIRY

This patch changes scsi_probe_lun() to retry INQUIRY if the device has
not actually sent back any INQUIRY data,

This enables the Thecus N2050 storage device to work better. The
firmware on that device starts up strangely; it sends no data in
response to the initial INQUIRY, and it sends the INQUIRY information
in response to the followup REQUEST SENSE. But after that it works
better, so retrying the INQUIRY is enough to get it going.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] add residual argument to scsi_execute and scsi_execute_req
FUJITA Tomonori [Thu, 4 Dec 2008 05:24:39 +0000 (14:24 +0900)]
[SCSI] add residual argument to scsi_execute and scsi_execute_req

scsi_execute() and scsi_execute_req() discard the residual length
information. Some callers need it. This adds residual argument
(optional) to scsi_execute and scsi_execute_req.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] ibmvfc: Fix errors due to inconsistent command data
Brian King [Wed, 3 Dec 2008 17:02:56 +0000 (11:02 -0600)]
[SCSI] ibmvfc: Fix errors due to inconsistent command data

In order to ensure the VIOS sees a consistent command buffer, we
need to add a memory barrier after building the command buffer
but before sending the command.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] ibmvfc: Delay NPIV login retry and add retries
Brian King [Wed, 3 Dec 2008 17:02:54 +0000 (11:02 -0600)]
[SCSI] ibmvfc: Delay NPIV login retry and add retries

Adds a delay prior to retrying a failed NPIV login. This fixes
a scenario if the backing fibre channel adapter is getting reset
due to an EEH event, NPIV login will fail. Currently, ibmvfc
retries three times very quickly, resets the CRQ and tries one
more time. If the adapter is getting reset due to EEH, this isn't
enough time. This adds a delay prior to retrying a failed NPIV
login and also increments the number of retries.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] libiscsi_tcp: support padding offload
Mike Christie [Tue, 2 Dec 2008 06:32:16 +0000 (00:32 -0600)]
[SCSI] libiscsi_tcp: support padding offload

cxgb3i does not offload the processing of the header,
but it will always process the padding. This patch
adds a padding offload flag to detect when the LLD
supports this.

The patch also modifies the header processing so that
we do not try to read/bypass the header dugest in the
skb. cxgb3i will not include it with the header like
with other offload cards.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] libiscsi: handle init task failures.
Mike Christie [Tue, 2 Dec 2008 06:32:15 +0000 (00:32 -0600)]
[SCSI] libiscsi: handle init task failures.

Mgmt setup used to not fail so we did not have to check
the return value. Now with cxgb3i it can so this has us
pass up a error.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] libiscsi: pass opcode into alloc_pdu callout
Mike Christie [Tue, 2 Dec 2008 06:32:14 +0000 (00:32 -0600)]
[SCSI] libiscsi: pass opcode into alloc_pdu callout

We do not need to allocate a itt for data_out, so this
passes the opcode to the alloc_pdu callout.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] libiscsi: allow drivers to modify the itt sent to the target
Mike Christie [Tue, 2 Dec 2008 06:32:13 +0000 (00:32 -0600)]
[SCSI] libiscsi: allow drivers to modify the itt sent to the target

bnx2i and cxgb3i need to encode LLD info in the itt so that
the firmware/hardware can process the pdu. This patch allows
the LLDs to encode info in the task->hdr->itt that they
setup in the alloc_pdu callout (any resources that are allocated
can be freed with the pdu in the cleanup_task callout). If
the LLD encodes info in the itt they should implement a
parse_pdu_itt callout. If parse_pdu_itt is not implemented
libiscsi will do the right thing for the LLD.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] iscsi_tcp: hook iscsi_tcp into new libiscsi_tcp module
Mike Christie [Tue, 2 Dec 2008 06:32:12 +0000 (00:32 -0600)]
[SCSI] iscsi_tcp: hook iscsi_tcp into new libiscsi_tcp module

This hooks iscsi_tcp into the libiscsi_tcp module and removes
code that is now in libiscsi_tcp.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] iscsi_tcp: split module into lib and lld
Mike Christie [Tue, 2 Dec 2008 06:32:11 +0000 (00:32 -0600)]
[SCSI] iscsi_tcp: split module into lib and lld

As explained in the previous mails, cxgb3i needs iscsi_tcp's
r2t/data_out and data_in procesing so this just moves functions
that both drivers want to use to a new module libiscsi_tcp. The
next patch will hook iscsi_tcp in.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] iscsi_tcp: add iscsi_tcp prefix to iscsi_tcp functions
Mike Christie [Tue, 2 Dec 2008 06:32:10 +0000 (00:32 -0600)]
[SCSI] iscsi_tcp: add iscsi_tcp prefix to iscsi_tcp functions

Add iscsi_tcp prefix to most functions. Some are not changed
becuase they are going to move in the next patch.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] libiscsi: change login data buffer allocation
Mike Christie [Tue, 2 Dec 2008 06:32:09 +0000 (00:32 -0600)]
[SCSI] libiscsi: change login data buffer allocation

This modifies the login buffer allocation to use __get_free_pages.
It will allow drivers that want to send this data with zero copy
operations to easily line things up on page boundaries.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] iscsi_tcp: remove unused r2t handling
Mike Christie [Tue, 2 Dec 2008 06:32:08 +0000 (00:32 -0600)]
[SCSI] iscsi_tcp: remove unused r2t handling

libiscsi's iscsi_prep_data_out_pdu now handles what
iscsi_tcp's helpers were so we can remove iscsi_tcp's helpers.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] iscsi_tcp: convert to new alloc_hdr api
Mike Christie [Tue, 2 Dec 2008 06:32:07 +0000 (00:32 -0600)]
[SCSI] iscsi_tcp: convert to new alloc_hdr api

This converts iscsi_tcp to the new api and modifies how
it handles r2ts.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] iser: convert iser to new alloc_pdu api
Mike Christie [Tue, 2 Dec 2008 06:32:06 +0000 (00:32 -0600)]
[SCSI] iser: convert iser to new alloc_pdu api

This just converts iser to new alloc_pdu api. It still
preallocates the pdu, so there is no difference.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] libiscsi: prepare libiscsi for new offload engines by modifying unsol data...
Mike Christie [Tue, 2 Dec 2008 06:32:05 +0000 (00:32 -0600)]
[SCSI] libiscsi: prepare libiscsi for new offload engines by modifying unsol data code

cxgb3i offloads data transfers. It does not offload the entire scsi/iscsi
procssing like qla4xxx and it does not offload the iscsi sequence
processing like how bnx2i does. cxgb3i relies on iscsi_tcp for the
seqeunce handling so this changes how we transfer unsolicitied data by
adding a common r2t struct and helpers.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] iscsi_tcp: prepare helpers for LLDs that can offload some operations
Mike Christie [Tue, 2 Dec 2008 06:32:04 +0000 (00:32 -0600)]
[SCSI] iscsi_tcp: prepare helpers for LLDs that can offload some operations

cxgb3i is unlike qla4xxx and bnx2i in that it does not offload entire
scsi commands or iscsi sequences. Instead it only offloads the transfer
of a ISCSI DATA_IN pdu's data, the digests and padding. This patch fixes up the
iscsi tcp recv path so that it exports its skb recv processing so
cxgb3i and other drivers can call them. All they have to do is pass
the function the skb with the hdr or data pdu header and this function
will do the rest.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] remove timeout from struct scsi_device
James Bottomley [Sun, 30 Nov 2008 16:39:01 +0000 (10:39 -0600)]
[SCSI] remove timeout from struct scsi_device

by removing the unused timeout parameter we ensure a compile failure if
anyone is accidentally still using it rather than the block timeout.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] st: update to use block timeout
James Bottomley [Sun, 30 Nov 2008 16:36:26 +0000 (10:36 -0600)]
[SCSI] st: update to use block timeout

Since we're trying to eliminate struct scsi_device timeout, the tape
driver has to be updated to use the block queue timeout instead.  The
tape use of scsi_device timeout looks to be self consistent, so I don't
think this necessarily fixes any bug, but it has to be done to allow me
to remove the timeout parameter from struct scsi_device.

Acked-by: Kai Makisara <Kai.Makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] mac_esp: fix for quadras with two esp chips
Finn Thain [Mon, 17 Nov 2008 20:37:45 +0000 (21:37 +0100)]
[SCSI] mac_esp: fix for quadras with two esp chips

On the Quadra 900 and 950 there are two ESP chips sharing one IRQ. Because
the shared IRQ is edge-triggered, we must make sure that an IRQ transition
from one chip doesn't go unnoticed when the shared IRQ is already active
due to the other. This patch prevents interrupts getting lost so that both
SCSI busses may be used simultaneously.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] m68k: mac_esp asm fix
Finn Thain [Mon, 17 Nov 2008 20:37:07 +0000 (21:37 +0100)]
[SCSI] m68k: mac_esp asm fix

Fix asm constraints and arguments so as not to transfer an odd byte when
there may be more words to transfer. The bug would probably also cause
exceptions sometimes by transferring one too many bytes.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Code changes for vport bus reset
Anirban Chakraborty [Fri, 14 Nov 2008 21:48:12 +0000 (13:48 -0800)]
[SCSI] qla2xxx: Code changes for vport bus reset

The following patch changes the handling of bus reset when issued from a
vport. In the bus reset code, an extra check is made to make sure that the lip
reset is not done before resetting the targets if the bus reset came from a
vport.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] simplify scsi_io_completion()
Alan Stern [Mon, 3 Nov 2008 20:56:47 +0000 (15:56 -0500)]
[SCSI] simplify scsi_io_completion()

This patch (as1142b) consolidates a lot of repetitious code in
scsi_io_completion().  It also fixes a few comments.  Most
importantly, however, it clearly distinguishes among the three sorts
of retries that can be done when a command fails to complete:

Unprepare the request and resubmit it, so that a new
command will be created for it.

Requeue the request directly so that it will be retried
immediately using the same command.

Requeue the request so that it will be retried following
a short delay.

Complete the remainder of the request with an I/O error.

[jejb: Updates
     1. For several error conditions, we would now print the sense twice
        in slightly different ways, so unify the location of sense
        printing.
     2. I added more descriptions to actual failure conditions for
        better debugging
     3. according to spec, ABORTED_COMMAND is supposed to be retried
        (except on DIF failure).  Our old behaviour of erroring it looks
        to be a bug.
     4. I'd prefer not to default initialise the action variable because
        that ensures that every leg of the error handler has an
        associated action and the compiler will warn if someone later
        accidentally misses one or removes one.
]
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] ibmvfc: Driver version 1.0.4
Brian King [Fri, 14 Nov 2008 19:33:54 +0000 (13:33 -0600)]
[SCSI] ibmvfc: Driver version 1.0.4

Bump driver version

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] ibmvfc: Handle port login required response
Brian King [Fri, 14 Nov 2008 19:33:53 +0000 (13:33 -0600)]
[SCSI] ibmvfc: Handle port login required response

The virtual fibre channel stack can return a failure response for a command
indicating the port login has been invalidated without sending the client
an async event. Add code to handle this response and initiate a PLOGI.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] ibmvfc: Fix command timeouts due to cached CRQ access
Brian King [Fri, 14 Nov 2008 19:33:52 +0000 (13:33 -0600)]
[SCSI] ibmvfc: Fix command timeouts due to cached CRQ access

The CRQs used by the ibmvfc driver are read and written by both
the client and the server. Therefore, we need to mark them volatile
so that we do not cache their contents when handling an interrupt.
This fixes a problem which can surface as occasional command timeouts.
No commands were actually timing out, but due to accessing cached data
for the CRQ in the interrupt handler, the interrupt was not processing
all command completions as it should.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] ibmvfc: Fix oops in interrupt handler
Brian King [Fri, 14 Nov 2008 19:33:50 +0000 (13:33 -0600)]
[SCSI] ibmvfc: Fix oops in interrupt handler

Fixes an oops that can occur in the interrupt handler
if we get a lot of async events.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] scsi_dh_rdac: Add LSI vendor and product ids in rdac device list
Babu Moger [Mon, 10 Nov 2008 23:17:48 +0000 (16:17 -0700)]
[SCSI] scsi_dh_rdac: Add LSI vendor and product ids in rdac device list

[jejb: fixed whitespace damage]
Signed-off-by: Babu Moger <Babu.Moger@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] fusion: use ARRAY_SIZE
Julia Lawall [Sun, 9 Nov 2008 16:55:27 +0000 (17:55 +0100)]
[SCSI] fusion: use ARRAY_SIZE

ARRAY_SIZE is more concise to use when the size of an array is divided by
the size of its type or the size of its first element.

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: "Prakash, Sathya" <Sathya.Prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] fusion: remove excess kernel-doc notation
Randy Dunlap [Thu, 30 Oct 2008 05:35:16 +0000 (22:35 -0700)]
[SCSI] fusion: remove excess kernel-doc notation

Remove excess kernel-doc function parameter notation:

Warning(drivers/message/fusion/mptbase.c:964): Excess function parameter or struct member 'handle' description in 'mpt_free_msg_frame'
Warning(drivers/message/fusion/mptbase.c:5434): Excess function parameter or struct member 'portnum' description in 'mpt_findImVolumes'
Warning(drivers/message/fusion/mptbase.c:6949): Excess function parameter or struct member 'mr' description in 'mpt_spi_log_info'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
cc: Eric.Moore@lsi.com
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Fix for build warning
Anirban Chakraborty [Mon, 10 Nov 2008 23:53:20 +0000 (15:53 -0800)]
[SCSI] qla2xxx: Fix for build warning

drivers/scsi/qla2xxx/qla_os.c: In function 'qla2x00_probe_one':
drivers/scsi/qla2xxx/qla_os.c:1582: warning: 'mem_only' is used uninitialized in this function

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Code changes for qla data structure refactoring
Anirban Chakraborty [Thu, 6 Nov 2008 18:40:51 +0000 (10:40 -0800)]
[SCSI] qla2xxx: Code changes for qla data structure refactoring

Following changes have been made:

1. Outstanding commands are based on a request queue, scsi_qla_host
   does not maintain it anymore.

2. start_scsi is accessed via isp_ops struct instead of direct
   invocation.

3. Interrupt registrations are done using response queue instead of
   device id.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Refactor qla data structures
Anirban Chakraborty [Thu, 6 Nov 2008 18:40:19 +0000 (10:40 -0800)]
[SCSI] qla2xxx: Refactor qla data structures

Following changes have been made to the qla2xxx FC driver in
preparation for the multi- queue and future SR IOV hardware.

1. scsi_qla_host structure has been changed to contain scsi host
   specific data only.

2. A new structure, qla_hw_data is created to contain HBA specific
   hardware data.

3. Request and response IO specific data strucures are created.

4. The global list of fcports for the hba is not maintained anymore,
   instead a fcport list is construted on per scsi_qla_host.

Signed-of-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] scsi_error: TASK ABORTED status handling improvement
Vladislav Bolkhovitin [Thu, 6 Nov 2008 10:57:52 +0000 (13:57 +0300)]
[SCSI] scsi_error: TASK ABORTED status handling improvement

This patch improves handling of TASK ABORTED status by Linux SCSI
mid-layer. Currently, command returned with this status considered
failed and returned to upper layers. It leads to additional error
recovery load on file systems and block layer, which sometimes can
cause undesired side effects, like I/O errors and file systems
corruptions. See http://lkml.org/lkml/2008/11/1/38, for instance.

From other side, TASK ABORTED status is returned by SCSI target if the
corresponding command was aborted by another initiator and the target
has TAS bit set in the control mode page. So, in the majority of cases
commands with TASK ABORTED status should be simply retried. In other
cases, maybe_retry path will not retry if no retries are allowed.

This patch implement suggestion by James Bottomley from
http://marc.info/?l=linux-scsi&m=121932916906009&w=2.

Signed-off-by: Vladislav Bolkhovitin <vst@vlnb.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] scsi_dh: Retry mode select in rdac device handler
Chandra Seetharaman [Thu, 6 Nov 2008 04:06:37 +0000 (20:06 -0800)]
[SCSI] scsi_dh: Retry mode select in rdac device handler

When the mode select sent to the controller fails with the retryable
error, it is better to retry the mode_select from the hardware handler
itself, instead of propagating the failure to dm-multipath.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] scsi_dh: Make sure the state of a path is set properly when controller is...
Chandra Seetharaman [Thu, 6 Nov 2008 04:05:21 +0000 (20:05 -0800)]
[SCSI] scsi_dh: Make sure the state of a path is set properly when controller is swapped from passive to active

When the controller ownership is changed (from passive to active),
check_ownership() doesn't set the state of the device to ACTIVE.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Reported-by: "Moger, Babu" <Babu.Moger@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] scsi_error: fix indentation and braces disagreement - add braces
Ilpo Järvinen [Thu, 30 Oct 2008 11:00:57 +0000 (13:00 +0200)]
[SCSI] scsi_error: fix indentation and braces disagreement - add braces

...and the list of recent breakage goes on and on, this time
it's 242f9dcb8ba6f (block: unify request timeout handling)
which broke it.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] tmscsim: fix indentation and braces disagreement - add braces
Ilpo Järvinen [Thu, 30 Oct 2008 10:58:38 +0000 (12:58 +0200)]
[SCSI] tmscsim: fix indentation and braces disagreement - add braces

Lucky winner is 557cc476c04 ([SCSI] tmscsim: Fixup
KERN_INFO in printk).

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] u14-34f: fix scsi_dma_map failure case
roel kluin [Wed, 29 Oct 2008 21:24:47 +0000 (14:24 -0700)]
[SCSI] u14-34f: fix scsi_dma_map failure case

When unsigned, scsi_dma_map may return -ENOMEM without triggering BUG_ON()

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] esp_scsi: Use DIV_ROUND_UP
Julia Lawall [Wed, 29 Oct 2008 21:24:40 +0000 (14:24 -0700)]
[SCSI] esp_scsi: Use DIV_ROUND_UP

Use the macro DIV_ROUND_UP and eliminate the variable rounded_up, as
suggested by Matthew Wilcox.

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: David Miller <davem@davemloft.net>
Reviewed-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] ibmvfc: Driver version 1.0.3
Brian King [Wed, 29 Oct 2008 13:46:49 +0000 (08:46 -0500)]
[SCSI] ibmvfc: Driver version 1.0.3

Bump driver version.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] ibmvfc: Quiet gcc warning in ibmvfc_reset_device
Brian King [Wed, 29 Oct 2008 13:46:47 +0000 (08:46 -0500)]
[SCSI] ibmvfc: Quiet gcc warning in ibmvfc_reset_device

Stops gcc from complaining about a possible uninitialized
variable being used in ibmvfc_reset_device.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] ibmvfc: Fix target initialization failure retry handling
Brian King [Wed, 29 Oct 2008 13:46:45 +0000 (08:46 -0500)]
[SCSI] ibmvfc: Fix target initialization failure retry handling

If the ibmvfc driver is in discovery attempting to log into a target
and it encounters an error, the command may get retried one or more
times, depending on the error received. If the retries are
unsuccessful such that the discovery thread gives up on discovery to
that target, the target ends up in a state where, if SCSI core had
previously known about the device, the host will get unblocked but the
host will not be logged into the target, causing any commands sent to
the target to fail. This patch fixes this so that if this occurs, the
target is deleted such that the normal dev_loss processing can occur
instead.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] ibmvfc: Error handling fixes
Brian King [Wed, 29 Oct 2008 13:46:41 +0000 (08:46 -0500)]
[SCSI] ibmvfc: Error handling fixes

Due to an ambiguity in the VIOS VFC interface specification,
abort/cancel handling is not done correctly and can result in double
completion of commands. In order to cancel all outstanding commands to
a device, a cancel must be sent, followed by an abort task set. After
the responses are received for these commands, there may still be
commands outstanding, in the process of getting flushed back, in which
case, we need to wait for them. This patch removes the assumption that
if the abort and the cancel both complete successfully that the device
queue has been flushed and waits for all the responses to come back.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] ibmvfc: Fix error reporting for some FC errors
Brian King [Wed, 29 Oct 2008 13:46:36 +0000 (08:46 -0500)]
[SCSI] ibmvfc: Fix error reporting for some FC errors

If either a "transport fault" or a "general transport" error is received
and no other error information is available, the command is improperly
returned as successful. Fix this to return DID_ERROR in this case.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] ibmvfc: Fix log level filtering
Brian King [Wed, 29 Oct 2008 13:46:33 +0000 (08:46 -0500)]
[SCSI] ibmvfc: Fix log level filtering

The ibmvfc log level filtering logic was reversed. The log_level scsi
host parameter should result in more verbose logs when log_level is
larger, not smaller.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] Clean up my email address and use a single standard address for everything
Alan Cox [Mon, 27 Oct 2008 15:16:36 +0000 (15:16 +0000)]
[SCSI] Clean up my email address and use a single standard address for everything

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] aacraid: check pci_alloc_consistent errors
FUJITA Tomonori [Thu, 23 Oct 2008 08:36:08 +0000 (17:36 +0900)]
[SCSI] aacraid: check pci_alloc_consistent errors

We need to check the address that pci_alloc_consistent() returns since
it might fail.

When pci_alloc_consistent() fails, some IOMMUs set the dma_handle
argument to zero. So we can't use fibptr->hw_fib_pa directly here.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Aacraid List <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] advansys, arcmsr, ipr, nsp32, qla1280, stex: use pci_ioremap_bar()
Arjan van de Ven [Sun, 28 Sep 2008 23:18:02 +0000 (16:18 -0700)]
[SCSI] advansys, arcmsr, ipr, nsp32, qla1280, stex: use pci_ioremap_bar()

Use the newly introduced pci_ioremap_bar() function in drivers/scsi.
pci_ioremap_bar() just takes a pci device and a bar number, with the goal
of making it really hard to get wrong, while also having a central place
to stick sanity checks.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Matthew Wilcox <willy@linux.intel.com>
Cc: Brian King <brking@us.ibm.com>
Cc: Ed Lin <ed.lin@promise.com>
Cc: Nick Cheng <nick.cheng@areca.com.tw>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] scsi ioctl: fix kernel-doc warning
Randy Dunlap [Wed, 22 Oct 2008 23:37:13 +0000 (16:37 -0700)]
[SCSI] scsi ioctl: fix kernel-doc warning

Fix kernel-doc parameter warning and correct the function name:

Warning(linux-next-20081022//drivers/scsi/scsi_ioctl.c:281): No description found for parameter 'ndelay'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Mon, 29 Dec 2008 00:54:33 +0000 (16:54 -0800)]
Merge branch 'next' of git://git./linux/kernel/git/paulus/powerpc

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (144 commits)
  powerpc/44x: Support 16K/64K base page sizes on 44x
  powerpc: Force memory size to be a multiple of PAGE_SIZE
  powerpc/32: Wire up the trampoline code for kdump
  powerpc/32: Add the ability for a classic ppc kernel to be loaded at 32M
  powerpc/32: Allow __ioremap on RAM addresses for kdump kernel
  powerpc/32: Setup OF properties for kdump
  powerpc/32/kdump: Implement crash_setup_regs() using ppc_save_regs()
  powerpc: Prepare xmon_save_regs for use with kdump
  powerpc: Remove default kexec/crash_kernel ops assignments
  powerpc: Make default kexec/crash_kernel ops implicit
  powerpc: Setup OF properties for ppc32 kexec
  powerpc/pseries: Fix cpu hotplug
  powerpc: Fix KVM build on ppc440
  powerpc/cell: add QPACE as a separate Cell platform
  powerpc/cell: fix build breakage with CONFIG_SPUFS disabled
  powerpc/mpc5200: fix error paths in PSC UART probe function
  powerpc/mpc5200: add rts/cts handling in PSC UART driver
  powerpc/mpc5200: Make PSC UART driver update serial errors counters
  powerpc/mpc5200: Remove obsolete code from mpc5200 MDIO driver
  powerpc/mpc5200: Add MDMA/UDMA support to MPC5200 ATA driver
  ...

Fix trivial conflict in drivers/char/Makefile as per Paul's directions

15 years agonet: ehea NAPI interface cleanup fix
Stephen Rothwell [Sun, 28 Dec 2008 23:46:13 +0000 (10:46 +1100)]
net: ehea NAPI interface cleanup fix

Commit 908a7a16b852ffd618a9127be8d62432182d81b4 ("net: Remove unused
netdev arg from some NAPI interfaces") missed two spots.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocifs: update for new IP4/6 address printing
Stephen Rothwell [Wed, 3 Dec 2008 02:49:23 +0000 (13:49 +1100)]
cifs: update for new IP4/6 address printing

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Sun, 28 Dec 2008 23:15:08 +0000 (15:15 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  smackfs: check for allocation failures in smk_set_access()

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next
Linus Torvalds [Sun, 28 Dec 2008 23:13:48 +0000 (15:13 -0800)]
Merge git://git./linux/kernel/git/sam/kbuild-next

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: (25 commits)
  allow stripping of generated symbols under CONFIG_KALLSYMS_ALL
  kbuild: strip generated symbols from *.ko
  kbuild: simplify use of genksyms
  kernel-doc: check for extra kernel-doc notations
  kbuild: add headerdep used to detect inclusion cycles in header files
  kbuild: fix string equality testing in tags.sh
  kbuild: fix make tags/cscope
  kbuild: fix make incompatibility
  kbuild: remove TAR_IGNORE
  setlocalversion: add git-svn support
  setlocalversion: print correct subversion revision
  scripts: improve the decodecode script
  scripts/package: allow custom options to rpm
  genksyms: allow to ignore symbol checksum changes
  genksyms: track symbol checksum changes
  tags and cscope support really belongs in a shell script
  kconfig: fix options to check-lxdialog.sh
  kbuild: gen_init_cpio expands shell variables in file names
  remove bashisms from scripts/extract-ikconfig
  kbuild: teach mkmakfile to be silent
  ...

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-nvram
Linus Torvalds [Sun, 28 Dec 2008 23:12:35 +0000 (15:12 -0800)]
Merge git://git./linux/kernel/git/wim/linux-2.6-nvram

* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-nvram:
  [PATCH] nvram - convert PRINT_PROC to seq_file
  [PATCH] nvram - CodingStyle

15 years agoMerge branch 'next' into for-linus
James Morris [Sun, 28 Dec 2008 22:57:38 +0000 (09:57 +1100)]
Merge branch 'next' into for-linus

15 years agopowerpc/44x: Support 16K/64K base page sizes on 44x
Ilya Yanok [Thu, 11 Dec 2008 01:55:41 +0000 (04:55 +0300)]
powerpc/44x: Support 16K/64K base page sizes on 44x

This adds support for 16k and 64k page sizes on PowerPC 44x processors.

The PGDIR table is much smaller than a page when using 16k or 64k
pages (512 and 32 bytes respectively) so we allocate the PGDIR with
kzalloc() instead of __get_free_pages().

One PTE table covers rather a large memory area when using 16k or 64k
pages (32MB or 512MB respectively), so we can easily put FIXMAP and
PKMAP in the area covered by one PTE table.

Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
Signed-off-by: Vladimir Panfilov <pvr@emcraft.com>
Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Acked-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc: Force memory size to be a multiple of PAGE_SIZE
Hollis Blanchard [Wed, 26 Nov 2008 16:19:26 +0000 (10:19 -0600)]
powerpc: Force memory size to be a multiple of PAGE_SIZE

Ensure that total memory size is page-aligned, because otherwise
mark_bootmem() gets upset.

This error case was triggered by using 64 KiB pages in the kernel
while arch/powerpc/boot/4xx.c arbitrarily reduced the amount of memory
by 4096 (to work around a chip bug that affects the last 256 bytes of
physical memory).

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux...
Linus Torvalds [Sun, 28 Dec 2008 20:54:07 +0000 (12:54 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/geert/linux-m68k

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  m68k: use the new byteorder headers
  fbcon: Protect free_irq() by MACH_IS_ATARI check
  fbcon: remove broken mac vbl handler
  m68k: fix trigraph ignored warning in setox.S
  macfb annotations and compiler warning fix
  m68k: mac baboon interrupt enable/disable
  m68k: machw.h cleanup
  m68k: Mac via cleanup and commentry
  m68k: Reinstate mac rtc