Commit graph

2136 commits

Author SHA1 Message Date
James Smart ce8b3ce55b [SCSI] lpfc 8.1.7: Correct the wait in attachment that delays for topology discovery
Correct the wait in attachment that delays for topology discovery

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:48:11 -05:00
James Smart 5e0b433855 [SCSI] lpfc 8.1.7: Remove depricated sysfs attribute board_online
Remove depricated sysfs attribute board_online, as it's replaced by the new
issue_reset attribute

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:47:34 -05:00
James Smart 40496f073f [SCSI] lpfc 8.1.7: Adding new issue_reset sysfs attribute
Adding new issue_reset sysfs attribute

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:44:08 -05:00
James Smart 420b630d6e [SCSI] lpfc 8.1.7: Fix panic in lpfc_sli_validate_fcp_iocb
Fix panic in lpfc_sli_validate_fcp_iocb due to access of scsi_cmnd after
returning it to the midlayer

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:43:43 -05:00
James Smart bcf4dbfaf3 [SCSI] lpfc 8.1.7: Consolidate dma buf cleanup into a separate function
Consolidate dma buf cleanup into a separate function

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:25:27 -05:00
James Smart 9279565046 [SCSI] lpfc 8.1.7: Correct bogus nodev_tmo message on NPort that changes its NPort Id
Correct bogus nodev_tmo message on NPort that changes its NPort Id

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:23:29 -05:00
James Smart 688a88635f [SCSI] lpfc 8.1.7: Fix txcmplq related panics on heavy IO while downloading firmware
Fix txcmplq related panics on heavy IO while downloading firmware

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:21:28 -05:00
James Smart 4db621e0f3 [SCSI] lpfc 8.1.7: Issue DOWN_LINK prior to INIT_LINK to work around link failure issue
Issue DOWN_LINK prior to INIT_LINK to work around link failure issue

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:21:00 -05:00
James Smart d0e56dad5c [SCSI] lpfc 8.1.7: Fixed infinite retry of REG_LOGIN mailbox failed due to MBXERR_RPI_FULL
Fixed infinite retry of REG_LOGIN mailbox failed due to MBXERR_RPI_FULL

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:20:30 -05:00
James Smart 9f49d3b05f [SCSI] lpfc 8.1.7: Fix memory leak and cleanup code related to per ring lookup array
Fix memory leak and cleanup code related to per ring lookup array.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:19:55 -05:00
James Smart e17da18e2f [SCSI] lpfc 8.1.7: Standardize the driver on a single define for the maximum supported targets
Standardize the driver on a single define for the maximum supported targets.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:19:03 -05:00
James Smart 5a0e326dfa [SCSI] lpfc 8.1.7: Use mod_timer instead of add_timer in lpfc_els_timeout_handler
Use mod_timer instead of add_timer in lpfc_els_timeout_handler

This patch was formerly posted by Mark Haverkamp.
http://marc.theaimsgroup.com/?l=linux-scsi&m=114246089015681&w=2

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:18:28 -05:00
Douglas Gilbert a507c6a2d9 [SCSI] update additional sense codes and some opcode names
Following on from my post titled: "additional sense codes
need update" see the attachment against lk 2.6.17 .

ChangeLog:
  - update additional sense codes table to agree with
    SPC-4 revision 5a  (14 June 2006)
  - adjust some of the opcode names

Signed-off-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 09:10:06 -05:00
James Bottomley c9fefeb264 [SCSI] scsi_transport_sas: add unindexed ports
Some SAS HBAs don't want to go to the trouble of tracking port numbers,
so they'd simply like to say "add this port and give it a number".
This is especially beneficial from the hotplug point of view, since
tracking ports and the available number space can be a real pain.

The current implementation uses an incrementing number per expander to
add the port on.  However, since there can never be more ports than
there are phys, a later implementation will try to be more intelligent
about this.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 09:06:24 -05:00
Adrian Bunk 24f6d2fd31 [SCSI] aic79xx: make ahd_done_with_status() static
This patch makes a needlessly global function static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 09:05:37 -05:00
root 9545b5781c [PATCH] ahci: Ensure that we don't grab both functions
When we force the chip into dual fn mode so we get PATA and AHCI we must
be sure we don't then do anything dumb like try and grab both with the AHCI
driver.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05 22:58:20 -04:00
Borislav Petkov 5afc81427f [PATCH] libata-core.c: restore configuration boot messages in ata_dev_configure(), v2
This one looks better, IMHO.

This restores the default libata configuration messages printed during booting.

Signed-off-by: <petkov@math.uni-muenster.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05 22:17:47 -04:00
Tejun Heo d2298dca9a [PATCH] sata_sil24: add suspend/sleep support
Add suspend/sleep support.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05 22:16:28 -04:00
Tejun Heo 2a41a6108d [PATCH] sata_sil24: separate out sil24_init_controller()
Separate out controller initialization from sil24_init_one() into
sil24_init_controller().  This will be used by resume.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05 22:16:28 -04:00
Tejun Heo afb5a7cb84 [PATCH] sata_sil: add suspend/sleep support
Add suspend/sleep support.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05 22:16:28 -04:00
Tejun Heo 3d8ec91352 [PATCH] sata_sil: separate out sil_init_controller()
Separate out controller initialization from sil_init_one() into
sil_init_controller().  This will be used by resume.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05 22:16:28 -04:00
Tejun Heo 500530f652 [PATCH] libata: reimplement controller-wide PM
Reimplement controller-wide PM.  ata_host_set_suspend/resume() are
defined to suspend and resume a host_set.  While suspended, EHs for
all ports in the host_set are pegged using ATA_FLAG_SUSPENDED and
frozen.

Because SCSI device hotplug is done asynchronously against the rest of
libata EH and the same mutex is used when adding new device, suspend
cannot wait for hotplug to complete.  So, if SCSI device hotplug is in
progress, suspend fails with -EBUSY.

In most cases, host_set resume is followed by device resume.  As each
resume operation requires a reset, a single host_set-wide resume
operation may result in multiple resets.  To avoid this, resume waits
upto 1 second giving PM to request resume for devices.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05 22:16:28 -04:00
Tejun Heo d6f26d1f1f [PATCH] libata: reimplement per-dev PM
Reimplement per-dev PM.  The original implementation directly put the
device into suspended mode and didn't synchronize w/ EH operations
including hotplug.  This patch reimplements ata_scsi_device_suspend()
and ata_scsi_device_resume() such that they request EH to perform the
respective operations.  Both functions synchronize with hotplug such
that it doesn't operate on detached devices.

Suspend waits for completion but resume just issues request and
returns.  This allows parallel wake up of devices and thus speeds up
system resume.

Due to sdev detach synchronization, it's not feasible to separate out
EH requesting from sdev handling; thus, ata_device_suspend/resume()
are removed and everything is implemented in the respective
libata-scsi functions.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05 22:16:28 -04:00
Tejun Heo 02670bf379 [PATCH] libata: implement PM EH actions
Implement two PM per-dev EH actions - ATA_EH_SUSPEND and
ATA_EH_RESUME.  Each action puts the target device into suspended mode
and resumes from it respectively.

Once a device is put to suspended mode, no EH operations other than
RESUME is allowed on the device.  The device will stay suspended till
it gets resumed and thus reset and revalidated.  To implement this, a
new device state helper - ata_dev_ready() - is implemented and used in
EH action implementations to make them operate only on attached &
running devices.

If all possible devices on a port are suspended, reset is skipped too.
This prevents spurious events including hotplug events from disrupting
suspended devices.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05 22:16:28 -04:00
Tejun Heo 1cdaf534f8 [PATCH] libata: implement ATA_EHI_NO_AUTOPSY and QUIET
Implement ATA_EHI_NO_AUTOPSY and QUIET.  These used to be implied by
ATA_PFLAG_LOADING, but new power management and PMP support need to
use these separately.  e.g. Suspend/resume operations shouldn't print
full EH messages and resume shouldn't be recorded as an error.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05 22:16:27 -04:00
Tejun Heo e9c839142d [PATCH] libata: clean up debounce parameters and improve parameter selection
The names of predefined debounce timing parameters didn't exactly
match their usages.  Rename to more generic names and implement param
selection helper sata_ehc_deb_timing() which uses EHI_HOTPLUGGED to
select params.

Combined with the previous EHI_RESUME_LINK differentiation, this makes
parameter selection accurate.  e.g. user scan resumes link but normal
deb param is used instead of hotplug param.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05 22:16:27 -04:00
Tejun Heo 2832430435 [PATCH] libata: implement ATA_EHI_RESUME_LINK
Implement ATA_EHI_RESUME_LINK, which indicates that the link needs to
be resumed.  This used to be implied by ATA_EHI_HOTPLUGGED.  However,
hotplug isn't the only event which requires link resume and separating
this out allows other places to request link resume.  This
differentiation also allows better debounce timing selection.

This patch converts user scan to use ATA_EHI_RESUME_LINK.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05 22:16:27 -04:00
Tejun Heo e30349d27e [PATCH] libata: replace ap_lock w/ ap->lock in ata_scsi_error()
ap_lock was used because &ap->host_set->lock was too long and used a
lot.  Now that &ap->host_set->lock is replaced with ap->lock, there's
no reason to keep ap_lock.

[ed. note: that's not entirely true.  ap_lock is a local variable,
caching the results of a de-ref.  In theory, if the compiler is smart
enough, this patch is cosmetic.  However, since this is not a fast
path (it is the error path), this patch is nonetheless acceptable,
even though it _may_ introduce a performance regression.]

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05 22:05:34 -04:00
Tejun Heo 0662c58b32 [PATCH] libata: fix ehc->i.action setting in ata_eh_autopsy()
ata_eh_autopsy() used to directly assign determined action mask to
ehc->i.action thus overriding actions set by some of nested analyze
functions.  This patch makes ata_eh_autopsy() add action masks just as
it's done in other places.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05 21:51:42 -04:00
Tejun Heo b51e9e5db0 [PATCH] libata: add ap->pflags and move core dynamic flags to it
ap->flags is way too clamped.  Separate out core dynamic flags to
ap->pflags.  ATA_FLAG_DISABLED is a dynamic flag but left alone as
it's referenced by a lot of LLDs and it's gonna be removed once all
LLDs are converted to new EH.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05 21:51:42 -04:00
Brian King e6d902a3bf [PATCH] libata: Conditionally set host->max_cmd_len
In preparation for SAS attached SATA devices, which will
not have a libata scsi_host, only setup host->max_cmd_len
if ap->host exists.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05 21:47:47 -04:00
Martin Hicks a93620b860 [PATCH] sata_vsc: data_xfer should use mmio
Hi,

sata_vsc is an MMIO device, and should use the correct data_xfer
function.  This problem was introduced by:

   commit a6b2c5d475
   Author: Alan Cox <alan@lxorguk.ukuu.org.uk>
   Date:   Mon May 22 16:59:59 2006 +0100

        [PATCH] PATCH: libata. Add ->data_xfer method

Signed-off-by: Martin Hicks <mort@bork.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05 21:44:45 -04:00
Linus Torvalds f7d57e42e7 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: (57 commits)
  [SCSI] fix error handling in scsi_io_completion
  [SCSI] qla1280: fix section mismatch warnings
  [SCSI] mptsas: eliminate ghost devices
  [SCSI] qla2xxx: make some more functions static
  [SCSI] small whitespace cleanup for qlogic driver
  [SCSI] mptbase: mpt_interrupt should return IRQ_NONE
  [SCSI] mptsas: make two functions static
  [SCSI] sg.c: Fix bad error handling in
  [SCSI] 53c700: fix breakage caused by the autosense update
  [SCSI] iscsi: add async notification of session events
  [SCSI] iscsi: pass target nr to session creation
  [SCSI] iscsi: break up session creation into two stages
  [SCSI] iscsi: rm channel usage from iscsi
  [SCSI] iscsi: fix session refcouting
  [SCSI] iscsi: convert iscsi_tcp to new set/get param fns
  [SCSI] iscsi: convert iser to new set/get param fns
  [SCSI] iscsi: fixup set/get param functions
  [SCSI] iscsi: add target discvery event to transport class
  [SCSI] st: remove unused st_buffer.in_use
  [SCSI] atp870u: reduce huge stack usage
  ...
2006-07-03 21:27:18 -07:00
Ingo Molnar 60be6b9a41 [PATCH] lockdep: annotate on-stack completions
lockdep needs to have the waitqueue lock initialized for on-stack waitqueues
implicitly initialized by DECLARE_COMPLETION().  Annotate on-stack completions
accordingly.

Has no effect on non-lockdep kernels.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-03 15:27:09 -07:00
James Bottomley c4e00fac42 Merge ../scsi-misc-2.6
Conflicts:

	drivers/scsi/nsp32.c
	drivers/scsi/pcmcia/nsp_cs.c

Removal of randomness flag conflicts with SA_ -> IRQF_ global
replacement.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-03 09:41:12 -05:00
Thomas Gleixner 1d6f359a2e [PATCH] irq-flags: scsi: Use the new IRQF_ constants
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-02 13:58:53 -07:00
James Bottomley d6b0c53723 [SCSI] fix error handling in scsi_io_completion
There was a logic fault in scsi_io_completion() where zero transfer
commands that complete successfully were sent to the block layer as
not up to date.  This patch removes the if (good_bytes > 0) gate
around the successful completion, since zero transfer commands do have
good_bytes == 0.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-02 11:17:19 -05:00
Randy Dunlap f58f8313a6 [SCSI] qla1280: fix section mismatch warnings
Fix section mismatch warnings:
WARNING: drivers/scsi/qla1280.o - Section mismatch: reference to
.init.data: from .text between 'qla1280_get_token' (at offset 0x2a16)
and 'qla1280_probe_one'
WARNING: drivers/scsi/qla1280.o - Section mismatch: reference to
.init.data: from .text between 'qla1280_get_token' (at offset 0x2a3c)
and 'qla1280_probe_one'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-30 21:56:22 -05:00
Adrian Bunk 413975a0f1 [SCSI] qla2xxx: make some more functions static
Make some needlessly global functions static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-30 21:34:18 -05:00
Jesper Juhl 900d9f9873 [SCSI] small whitespace cleanup for qlogic driver
Add a few spaces to MODULE_PARM_DESC() text for qla2xxx. Without these
spaces text runs together when modinfo prints the text.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-30 21:30:01 -05:00
Ishai Rabinovitz 454e8957eb [SCSI] sg.c: Fix bad error handling in
I got a NULL derefrence in cdev_del+1 when called from sg_remove. By looking at
the code of sg_add, sg_alloc and sg_remove (all in drivers/scsi/sg.c) I found
out that sg_add is calling sg_alloc but if it fails afterwards it does not
deallocate the space that was allocated in sg_alloc and the redundant entry has
NULL in cdev. When sg_remove is being called, it tries to perform cdev_del to
this NULL cdev and fails.

Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-30 21:28:35 -05:00
Jörn Engel 6ab3d5624e Remove obsolete #include <linux/config.h>
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-30 19:25:36 +02:00
Adrian Bunk 47bdd718c6 typo fixes: infomation -> information
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-30 18:25:18 +02:00
Adrian Bunk 0418726bb5 typo fixes: aquire -> acquire
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-30 18:23:04 +02:00
Linus Torvalds 1903ac54f8 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6:
  [PATCH] i386: export memory more than 4G through /proc/iomem
  [PATCH] 64bit Resource: finally enable 64bit resource sizes
  [PATCH] 64bit Resource: convert a few remaining drivers to use resource_size_t where needed
  [PATCH] 64bit resource: change pnp core to use resource_size_t
  [PATCH] 64bit resource: change pci core and arch code to use resource_size_t
  [PATCH] 64bit resource: change resource core to use resource_size_t
  [PATCH] 64bit resource: introduce resource_size_t for the start and end of struct resource
  [PATCH] 64bit resource: fix up printks for resources in misc drivers
  [PATCH] 64bit resource: fix up printks for resources in arch and core code
  [PATCH] 64bit resource: fix up printks for resources in pcmcia drivers
  [PATCH] 64bit resource: fix up printks for resources in video drivers
  [PATCH] 64bit resource: fix up printks for resources in ide drivers
  [PATCH] 64bit resource: fix up printks for resources in mtd drivers
  [PATCH] 64bit resource: fix up printks for resources in pci core and hotplug drivers
  [PATCH] 64bit resource: fix up printks for resources in networks drivers
  [PATCH] 64bit resource: fix up printks for resources in sound drivers
  [PATCH] 64bit resource: C99 changes for struct resource declarations

Fixed up trivial conflict in drivers/ide/pci/cmd64x.c (the printk that
was changed by the 64-bit resources had been deleted in the meantime ;)
2006-06-29 10:49:17 -07:00
James Bottomley 0f13fc09db [SCSI] 53c700: fix breakage caused by the autosense update
A bit of a brown paper bag issue.  The previous patch to remove the soon
to be ripped out fields that were used in autosense actually broke the
driver.  This patch fixes it and has been tested (honestly).

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-29 13:15:15 -04:00
Mike Christie 53cb8a1f45 [SCSI] iscsi: add async notification of session events
This patch adds or modifies the transport class functions
used to notify userspace of session state events.

We modify the session addition up event and add a destruction event
to notify userspace of session creation, relogin and destruction.

And we modify the conn error event to be sent by broadcast
since multiple listeners may want to listen for it.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-29 11:14:42 -04:00
Mike Christie 6a8a0d3621 [SCSI] iscsi: pass target nr to session creation
So the drivers do not use the channel numbers, but some do
use the target numbers. We were just adding some goofy
variable that just increases for the target nr. This is useless
for software iscsi because it is always zero. And for qla4xxx
the target nr is actually the index of the target/session
in its FW or FLASH tables. We needed to expose this to userspace
so apps could access those numbers so this patch just adds the
target nr to the iscsi session creation functions. This way
when qla4xxx's Hw thinks a session is at target nr 4
in its hw, it is exposed as that number in sysfs.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-29 11:09:06 -04:00
Mike Christie 8434aa8b6f [SCSI] iscsi: break up session creation into two stages
qla4xxx is initialized in two steps like other HW drivers.
It allocates the host, sets up the HW, then adds the host.
For iscsi part of HW setup is setting up persistent iscsi
sessions. At that time, the interupts are off and the driver
is not completely set up so we just want to allocate them.
We do not want to add them to sysfs and expose them to userspace
because userspace could try to do lots of fun things with them
like scanning and at that time the driver is not ready.

So this patch breakes up the session creation like other
functions that use the driver model in two the alloc
and add parts. When the driver is ready, it can then add
the sessions and userspace can begin using them.

This also fixes a bug in the addition error patch where
we forgot to do a get on the session.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-29 11:08:46 -04:00
Mike Christie e6f3b63f50 [SCSI] iscsi: rm channel usage from iscsi
I do not remember what I was thinking when we added the channel
as a argument to the session create function. It was probably
due to too much cut and paste work from the FC transport class.

The channel is meaningless for iscsi drivers so this patch drops
its usage everywhere in the iscsi related code.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-29 11:08:31 -04:00