mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI updates from James Bottomley: "Updates to the usual drivers (ufs, lpfc, fnic, qla2xx, mpi3mr). The major core change is the renaming of the slave_ methods plus a bit of constification. The rest are minor updates and fixes" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (103 commits) scsi: fnic: Propagate SCSI error code from fnic_scsi_drv_init() scsi: fnic: Test for memory allocation failure and return error code scsi: fnic: Return appropriate error code from failure of scsi drv init scsi: fnic: Return appropriate error code for mem alloc failure scsi: fnic: Remove always-true IS_FNIC_FCP_INITIATOR macro scsi: fnic: Fix use of uninitialized value in debug message scsi: fnic: Delete incorrect debugfs error handling scsi: fnic: Remove unnecessary else to fix warning in FDLS FIP scsi: fnic: Remove extern definition from .c files scsi: fnic: Remove unnecessary else and unnecessary break in FDLS scsi: mpi3mr: Fix possible crash when setting up bsg fails scsi: ufs: bsg: Set bsg_queue to NULL after removal scsi: ufs: bsg: Delete bsg_dev when setting up bsg fails scsi: st: Don't set pos_unknown just after device recognition scsi: aic7xxx: Fix build 'aicasm' warning scsi: Revert "scsi: ufs: core: Probe for EXT_IID support" scsi: storvsc: Ratelimit warning logs to prevent VM denial of service scsi: scsi_debug: Constify sdebug_driver_template scsi: documentation: Corrections for struct updates scsi: driver-api: documentation: Change what is added to docbook ...
This commit is contained in:
@@ -126,7 +126,7 @@ Manage scsi_dev_info_list, which tracks blacklisted and whitelisted
|
||||
devices.
|
||||
|
||||
.. kernel-doc:: drivers/scsi/scsi_devinfo.c
|
||||
:internal:
|
||||
:export:
|
||||
|
||||
drivers/scsi/scsi_ioctl.c
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -162,7 +162,6 @@ statistics and to pass information directly to the lowlevel driver. I.E.
|
||||
plumbing to manage /proc/scsi/\*
|
||||
|
||||
.. kernel-doc:: drivers/scsi/scsi_proc.c
|
||||
:internal:
|
||||
|
||||
drivers/scsi/scsi_netlink.c
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -193,7 +192,7 @@ else, sequentially scan LUNs up until some maximum is reached, or a LUN
|
||||
is seen that cannot have a device attached to it.
|
||||
|
||||
.. kernel-doc:: drivers/scsi/scsi_scan.c
|
||||
:internal:
|
||||
:export:
|
||||
|
||||
drivers/scsi/scsi_sysctl.c
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -54,13 +54,13 @@ invoking hostt->queuecommand() or the block layer will time it out.
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
For all non-EH commands, scsi_done() is the completion callback. It
|
||||
just calls blk_complete_request() to delete the block layer timer and
|
||||
raise SCSI_SOFTIRQ
|
||||
just calls blk_mq_complete_request() to delete the block layer timer and
|
||||
raise BLOCK_SOFTIRQ.
|
||||
|
||||
SCSI_SOFTIRQ handler scsi_softirq calls scsi_decide_disposition() to
|
||||
determine what to do with the command. scsi_decide_disposition()
|
||||
looks at the scmd->result value and sense data to determine what to do
|
||||
with the command.
|
||||
The BLOCK_SOFTIRQ indirectly calls scsi_complete(), which calls
|
||||
scsi_decide_disposition() to determine what to do with the command.
|
||||
scsi_decide_disposition() looks at the scmd->result value and sense
|
||||
data to determine what to do with the command.
|
||||
|
||||
- SUCCESS
|
||||
|
||||
@@ -110,7 +110,7 @@ The timeout handler is scsi_timeout(). When a timeout occurs, this function
|
||||
retry which failed), when retries are exceeded, or when the EH deadline is
|
||||
expired. In these cases Step #3 is taken.
|
||||
|
||||
3. scsi_eh_scmd_add(scmd, SCSI_EH_CANCEL_CMD) is invoked for the
|
||||
3. scsi_eh_scmd_add(scmd) is invoked for the
|
||||
command. See [1-4] for more information.
|
||||
|
||||
1.3 Asynchronous command aborts
|
||||
@@ -277,7 +277,6 @@ scmd->allowed.
|
||||
|
||||
:ACTION: scsi_eh_finish_cmd() is invoked to EH-finish scmd
|
||||
|
||||
- scsi_setup_cmd_retry()
|
||||
- move from local eh_work_q to local eh_done_q
|
||||
|
||||
:LOCKING: none
|
||||
@@ -317,7 +316,7 @@ scmd->allowed.
|
||||
``scsi_eh_get_sense``
|
||||
|
||||
This action is taken for each error-completed
|
||||
(!SCSI_EH_CANCEL_CMD) commands without valid sense data. Most
|
||||
command without valid sense data. Most
|
||||
SCSI transports/LLDDs automatically acquire sense data on
|
||||
command failures (autosense). Autosense is recommended for
|
||||
performance reasons and as sense information could get out of
|
||||
@@ -347,30 +346,6 @@ scmd->allowed.
|
||||
- otherwise
|
||||
No action.
|
||||
|
||||
3. If !list_empty(&eh_work_q), invoke scsi_eh_abort_cmds().
|
||||
|
||||
``scsi_eh_abort_cmds``
|
||||
|
||||
This action is taken for each timed out command when
|
||||
no_async_abort is enabled in the host template.
|
||||
hostt->eh_abort_handler() is invoked for each scmd. The
|
||||
handler returns SUCCESS if it has succeeded to make LLDD and
|
||||
all related hardware forget about the scmd.
|
||||
|
||||
If a timedout scmd is successfully aborted and the sdev is
|
||||
either offline or ready, scsi_eh_finish_cmd() is invoked for
|
||||
the scmd. Otherwise, the scmd is left in eh_work_q for
|
||||
higher-severity actions.
|
||||
|
||||
Note that both offline and ready status mean that the sdev is
|
||||
ready to process new scmds, where processing also implies
|
||||
immediate failing; thus, if a sdev is in one of the two
|
||||
states, no further recovery action is needed.
|
||||
|
||||
Device readiness is tested using scsi_eh_tur() which issues
|
||||
TEST_UNIT_READY command. Note that the scmd must have been
|
||||
aborted successfully before reusing it for TEST_UNIT_READY.
|
||||
|
||||
4. If !list_empty(&eh_work_q), invoke scsi_eh_ready_devs()
|
||||
|
||||
``scsi_eh_ready_devs``
|
||||
@@ -384,7 +359,7 @@ scmd->allowed.
|
||||
|
||||
For each sdev which has failed scmds with valid sense data
|
||||
of which scsi_check_sense()'s verdict is FAILED,
|
||||
START_STOP_UNIT command is issued w/ start=1. Note that
|
||||
START STOP UNIT command is issued w/ start=1. Note that
|
||||
as we explicitly choose error-completed scmds, it is known
|
||||
that lower layers have forgotten about the scmd and we can
|
||||
reuse it for STU.
|
||||
@@ -478,9 +453,6 @@ except for #1 must be implemented by eh_strategy_handler().
|
||||
|
||||
- shost->host_failed is zero.
|
||||
|
||||
- Each scmd is in such a state that scsi_setup_cmd_retry() on the
|
||||
scmd doesn't make any difference.
|
||||
|
||||
- shost->eh_cmd_q is cleared.
|
||||
|
||||
- Each scmd->eh_entry is cleared.
|
||||
|
||||
@@ -101,7 +101,7 @@ supplied functions" below.
|
||||
Those functions in group b) are listed in a section entitled "Interface
|
||||
functions" below. Their function pointers are placed in the members of
|
||||
"struct scsi_host_template", an instance of which is passed to
|
||||
scsi_host_alloc() [#]_. Those interface functions that the LLD does not
|
||||
scsi_host_alloc(). Those interface functions that the LLD does not
|
||||
wish to supply should have NULL placed in the corresponding member of
|
||||
struct scsi_host_template. Defining an instance of struct
|
||||
scsi_host_template at file scope will cause NULL to be placed in function
|
||||
@@ -112,12 +112,9 @@ Those usages in group c) should be handled with care, especially in a
|
||||
that are shared with the mid level and other layers.
|
||||
|
||||
All functions defined within an LLD and all data defined at file scope
|
||||
should be static. For example the slave_alloc() function in an LLD
|
||||
should be static. For example the sdev_init() function in an LLD
|
||||
called "xxx" could be defined as
|
||||
``static int xxx_slave_alloc(struct scsi_device * sdev) { /* code */ }``
|
||||
|
||||
.. [#] the scsi_host_alloc() function is a replacement for the rather vaguely
|
||||
named scsi_register() function in most situations.
|
||||
``static int xxx_sdev_init(struct scsi_device * sdev) { /* code */ }``
|
||||
|
||||
|
||||
Hotplug initialization model
|
||||
@@ -149,21 +146,21 @@ scsi devices of which only the first 2 respond::
|
||||
scsi_add_host() ---->
|
||||
scsi_scan_host() -------+
|
||||
|
|
||||
slave_alloc()
|
||||
slave_configure() --> scsi_change_queue_depth()
|
||||
sdev_init()
|
||||
sdev_configure() --> scsi_change_queue_depth()
|
||||
|
|
||||
slave_alloc()
|
||||
slave_configure()
|
||||
sdev_init()
|
||||
sdev_configure()
|
||||
|
|
||||
slave_alloc() ***
|
||||
slave_destroy() ***
|
||||
sdev_init() ***
|
||||
sdev_destroy() ***
|
||||
|
||||
|
||||
*** For scsi devices that the mid level tries to scan but do not
|
||||
respond, a slave_alloc(), slave_destroy() pair is called.
|
||||
respond, a sdev_init(), sdev_destroy() pair is called.
|
||||
|
||||
If the LLD wants to adjust the default queue settings, it can invoke
|
||||
scsi_change_queue_depth() in its slave_configure() routine.
|
||||
scsi_change_queue_depth() in its sdev_configure() routine.
|
||||
|
||||
When an HBA is being removed it could be as part of an orderly shutdown
|
||||
associated with the LLD module being unloaded (e.g. with the "rmmod"
|
||||
@@ -176,8 +173,8 @@ same::
|
||||
===----------------------=========-----------------===------
|
||||
scsi_remove_host() ---------+
|
||||
|
|
||||
slave_destroy()
|
||||
slave_destroy()
|
||||
sdev_destroy()
|
||||
sdev_destroy()
|
||||
scsi_host_put()
|
||||
|
||||
It may be useful for a LLD to keep track of struct Scsi_Host instances
|
||||
@@ -202,8 +199,8 @@ An LLD can use this sequence to make the mid level aware of a SCSI device::
|
||||
===-------------------=========--------------------===------
|
||||
scsi_add_device() ------+
|
||||
|
|
||||
slave_alloc()
|
||||
slave_configure() [--> scsi_change_queue_depth()]
|
||||
sdev_init()
|
||||
sdev_configure() [--> scsi_change_queue_depth()]
|
||||
|
||||
In a similar fashion, an LLD may become aware that a SCSI device has been
|
||||
removed (unplugged) or the connection to it has been interrupted. Some
|
||||
@@ -218,12 +215,12 @@ upper layers with this sequence::
|
||||
===----------------------=========-----------------===------
|
||||
scsi_remove_device() -------+
|
||||
|
|
||||
slave_destroy()
|
||||
sdev_destroy()
|
||||
|
||||
It may be useful for an LLD to keep track of struct scsi_device instances
|
||||
(a pointer is passed as the parameter to slave_alloc() and
|
||||
slave_configure() callbacks). Such instances are "owned" by the mid-level.
|
||||
struct scsi_device instances are freed after slave_destroy().
|
||||
(a pointer is passed as the parameter to sdev_init() and
|
||||
sdev_configure() callbacks). Such instances are "owned" by the mid-level.
|
||||
struct scsi_device instances are freed after sdev_destroy().
|
||||
|
||||
|
||||
Reference Counting
|
||||
@@ -302,14 +299,12 @@ Summary:
|
||||
- scsi_host_alloc - return a new scsi_host instance whose refcount==1
|
||||
- scsi_host_get - increments Scsi_Host instance's refcount
|
||||
- scsi_host_put - decrements Scsi_Host instance's refcount (free if 0)
|
||||
- scsi_register - create and register a scsi host adapter instance.
|
||||
- scsi_remove_device - detach and remove a SCSI device
|
||||
- scsi_remove_host - detach and remove all SCSI devices owned by host
|
||||
- scsi_report_bus_reset - report scsi _bus_ reset observed
|
||||
- scsi_scan_host - scan SCSI bus
|
||||
- scsi_track_queue_full - track successive QUEUE_FULL events
|
||||
- scsi_unblock_requests - allow further commands to be queued to given host
|
||||
- scsi_unregister - [calls scsi_host_put()]
|
||||
|
||||
|
||||
Details::
|
||||
@@ -331,7 +326,7 @@ Details::
|
||||
* bus scan when an HBA is added (i.e. scsi_scan_host()). So it
|
||||
* should only be called if the HBA becomes aware of a new scsi
|
||||
* device (lu) after scsi_scan_host() has completed. If successful
|
||||
* this call can lead to slave_alloc() and slave_configure() callbacks
|
||||
* this call can lead to sdev_init() and sdev_configure() callbacks
|
||||
* into the LLD.
|
||||
*
|
||||
* Defined in: drivers/scsi/scsi_scan.c
|
||||
@@ -374,8 +369,8 @@ Details::
|
||||
* Might block: no
|
||||
*
|
||||
* Notes: Can be invoked any time on a SCSI device controlled by this
|
||||
* LLD. [Specifically during and after slave_configure() and prior to
|
||||
* slave_destroy().] Can safely be invoked from interrupt code.
|
||||
* LLD. [Specifically during and after sdev_configure() and prior to
|
||||
* sdev_destroy().] Can safely be invoked from interrupt code.
|
||||
*
|
||||
* Defined in: drivers/scsi/scsi.c [see source code for more notes]
|
||||
*
|
||||
@@ -474,27 +469,6 @@ Details::
|
||||
void scsi_host_put(struct Scsi_Host *shost)
|
||||
|
||||
|
||||
/**
|
||||
* scsi_register - create and register a scsi host adapter instance.
|
||||
* @sht: pointer to scsi host template
|
||||
* @privsize: extra bytes to allocate in hostdata array (which is the
|
||||
* last member of the returned Scsi_Host instance)
|
||||
*
|
||||
* Returns pointer to new Scsi_Host instance or NULL on failure
|
||||
*
|
||||
* Might block: yes
|
||||
*
|
||||
* Notes: When this call returns to the LLD, the SCSI bus scan on
|
||||
* this host has _not_ yet been done.
|
||||
* The hostdata array (by default zero length) is a per host scratch
|
||||
* area for the LLD.
|
||||
*
|
||||
* Defined in: drivers/scsi/hosts.c .
|
||||
**/
|
||||
struct Scsi_Host * scsi_register(struct scsi_host_template * sht,
|
||||
int privsize)
|
||||
|
||||
|
||||
/**
|
||||
* scsi_remove_device - detach and remove a SCSI device
|
||||
* @sdev: a pointer to a scsi device instance
|
||||
@@ -506,7 +480,7 @@ Details::
|
||||
* Notes: If an LLD becomes aware that a scsi device (lu) has
|
||||
* been removed but its host is still present then it can request
|
||||
* the removal of that scsi device. If successful this call will
|
||||
* lead to the slave_destroy() callback being invoked. sdev is an
|
||||
* lead to the sdev_destroy() callback being invoked. sdev is an
|
||||
* invalid pointer after this call.
|
||||
*
|
||||
* Defined in: drivers/scsi/scsi_sysfs.c .
|
||||
@@ -524,7 +498,7 @@ Details::
|
||||
*
|
||||
* Notes: Should only be invoked if the "hotplug initialization
|
||||
* model" is being used. It should be called _prior_ to
|
||||
* scsi_unregister().
|
||||
* calling scsi_host_put().
|
||||
*
|
||||
* Defined in: drivers/scsi/hosts.c .
|
||||
**/
|
||||
@@ -601,43 +575,24 @@ Details::
|
||||
void scsi_unblock_requests(struct Scsi_Host * shost)
|
||||
|
||||
|
||||
/**
|
||||
* scsi_unregister - unregister and free memory used by host instance
|
||||
* @shp: pointer to scsi host instance to unregister.
|
||||
*
|
||||
* Returns nothing
|
||||
*
|
||||
* Might block: no
|
||||
*
|
||||
* Notes: Should not be invoked if the "hotplug initialization
|
||||
* model" is being used. Called internally by exit_this_scsi_driver()
|
||||
* in the "passive initialization model". Hence a LLD has no need to
|
||||
* call this function directly.
|
||||
*
|
||||
* Defined in: drivers/scsi/hosts.c .
|
||||
**/
|
||||
void scsi_unregister(struct Scsi_Host * shp)
|
||||
|
||||
|
||||
|
||||
|
||||
Interface Functions
|
||||
===================
|
||||
Interface functions are supplied (defined) by LLDs and their function
|
||||
pointers are placed in an instance of struct scsi_host_template which
|
||||
is passed to scsi_host_alloc() [or scsi_register() / init_this_scsi_driver()].
|
||||
is passed to scsi_host_alloc().
|
||||
Some are mandatory. Interface functions should be declared static. The
|
||||
accepted convention is that driver "xyz" will declare its slave_configure()
|
||||
accepted convention is that driver "xyz" will declare its sdev_configure()
|
||||
function as::
|
||||
|
||||
static int xyz_slave_configure(struct scsi_device * sdev);
|
||||
static int xyz_sdev_configure(struct scsi_device * sdev);
|
||||
|
||||
and so forth for all interface functions listed below.
|
||||
|
||||
A pointer to this function should be placed in the 'slave_configure' member
|
||||
A pointer to this function should be placed in the 'sdev_configure' member
|
||||
of a "struct scsi_host_template" instance. A pointer to such an instance
|
||||
should be passed to the mid level's scsi_host_alloc() [or scsi_register() /
|
||||
init_this_scsi_driver()].
|
||||
should be passed to the mid level's scsi_host_alloc().
|
||||
.
|
||||
|
||||
The interface functions are also described in the include/scsi/scsi_host.h
|
||||
file immediately above their definition point in "struct scsi_host_template".
|
||||
@@ -657,9 +612,9 @@ Summary:
|
||||
- ioctl - driver can respond to ioctls
|
||||
- proc_info - supports /proc/scsi/{driver_name}/{host_no}
|
||||
- queuecommand - queue scsi command, invoke 'done' on completion
|
||||
- slave_alloc - prior to any commands being sent to a new device
|
||||
- slave_configure - driver fine tuning for given device after attach
|
||||
- slave_destroy - given device is about to be shut down
|
||||
- sdev_init - prior to any commands being sent to a new device
|
||||
- sdev_configure - driver fine tuning for given device after attach
|
||||
- sdev_destroy - given device is about to be shut down
|
||||
|
||||
|
||||
Details::
|
||||
@@ -728,11 +683,7 @@ Details::
|
||||
*
|
||||
* Calling context: kernel thread
|
||||
*
|
||||
* Notes: If 'no_async_abort' is defined this callback
|
||||
* will be invoked from scsi_eh thread. No other commands
|
||||
* will then be queued on current host during eh.
|
||||
* Otherwise it will be called whenever scsi_timeout()
|
||||
* is called due to a command timeout.
|
||||
* Notes: This is called only for a command that has timed out.
|
||||
*
|
||||
* Optionally defined in: LLD
|
||||
**/
|
||||
@@ -817,10 +768,6 @@ Details::
|
||||
* The SCSI_IOCTL_PROBE_HOST ioctl yields the string returned by this
|
||||
* function (or struct Scsi_Host::name if this function is not
|
||||
* available).
|
||||
* In a similar manner, init_this_scsi_driver() outputs to the console
|
||||
* each host's "info" (or name) for the driver it is registering.
|
||||
* Also if proc_info() is not supplied, the output of this function
|
||||
* is used instead.
|
||||
*
|
||||
* Optionally defined in: LLD
|
||||
**/
|
||||
@@ -960,7 +907,7 @@ Details::
|
||||
|
||||
|
||||
/**
|
||||
* slave_alloc - prior to any commands being sent to a new device
|
||||
* sdev_init - prior to any commands being sent to a new device
|
||||
* (i.e. just prior to scan) this call is made
|
||||
* @sdp: pointer to new device (about to be scanned)
|
||||
*
|
||||
@@ -975,24 +922,24 @@ Details::
|
||||
* prior to its initial scan. The corresponding scsi device may not
|
||||
* exist but the mid level is just about to scan for it (i.e. send
|
||||
* and INQUIRY command plus ...). If a device is found then
|
||||
* slave_configure() will be called while if a device is not found
|
||||
* slave_destroy() is called.
|
||||
* sdev_configure() will be called while if a device is not found
|
||||
* sdev_destroy() is called.
|
||||
* For more details see the include/scsi/scsi_host.h file.
|
||||
*
|
||||
* Optionally defined in: LLD
|
||||
**/
|
||||
int slave_alloc(struct scsi_device *sdp)
|
||||
int sdev_init(struct scsi_device *sdp)
|
||||
|
||||
|
||||
/**
|
||||
* slave_configure - driver fine tuning for given device just after it
|
||||
* sdev_configure - driver fine tuning for given device just after it
|
||||
* has been first scanned (i.e. it responded to an
|
||||
* INQUIRY)
|
||||
* @sdp: device that has just been attached
|
||||
*
|
||||
* Returns 0 if ok. Any other return is assumed to be an error and
|
||||
* the device is taken offline. [offline devices will _not_ have
|
||||
* slave_destroy() called on them so clean up resources.]
|
||||
* sdev_destroy() called on them so clean up resources.]
|
||||
*
|
||||
* Locks: none
|
||||
*
|
||||
@@ -1004,11 +951,11 @@ Details::
|
||||
*
|
||||
* Optionally defined in: LLD
|
||||
**/
|
||||
int slave_configure(struct scsi_device *sdp)
|
||||
int sdev_configure(struct scsi_device *sdp)
|
||||
|
||||
|
||||
/**
|
||||
* slave_destroy - given device is about to be shut down. All
|
||||
* sdev_destroy - given device is about to be shut down. All
|
||||
* activity has ceased on this device.
|
||||
* @sdp: device that is about to be shut down
|
||||
*
|
||||
@@ -1023,12 +970,12 @@ Details::
|
||||
* by this driver for given device should be freed now. No further
|
||||
* commands will be sent for this sdp instance. [However the device
|
||||
* could be re-attached in the future in which case a new instance
|
||||
* of struct scsi_device would be supplied by future slave_alloc()
|
||||
* and slave_configure() calls.]
|
||||
* of struct scsi_device would be supplied by future sdev_init()
|
||||
* and sdev_configure() calls.]
|
||||
*
|
||||
* Optionally defined in: LLD
|
||||
**/
|
||||
void slave_destroy(struct scsi_device *sdp)
|
||||
void sdev_destroy(struct scsi_device *sdp)
|
||||
|
||||
|
||||
|
||||
@@ -1039,7 +986,7 @@ struct scsi_host_template
|
||||
There is one "struct scsi_host_template" instance per LLD [#]_. It is
|
||||
typically initialized as a file scope static in a driver's header file. That
|
||||
way members that are not explicitly initialized will be set to 0 or NULL.
|
||||
Member of interest:
|
||||
Members of interest:
|
||||
|
||||
name
|
||||
- name of driver (may contain spaces, please limit to
|
||||
@@ -1055,6 +1002,13 @@ Member of interest:
|
||||
- primary callback that the mid level uses to inject
|
||||
SCSI commands into an LLD.
|
||||
|
||||
vendor_id
|
||||
- a unique value that identifies the vendor supplying
|
||||
the LLD for the Scsi_Host. Used most often in validating
|
||||
vendor-specific message requests. Value consists of an
|
||||
identifier type and a vendor-specific value.
|
||||
See scsi_netlink.h for a description of valid formats.
|
||||
|
||||
The structure is defined and commented in include/scsi/scsi_host.h
|
||||
|
||||
.. [#] In extreme situations a single driver may have several instances
|
||||
@@ -1095,9 +1049,6 @@ of interest:
|
||||
- maximum number of commands that can be queued on devices
|
||||
controlled by the host. Overridden by LLD calls to
|
||||
scsi_change_queue_depth().
|
||||
no_async_abort
|
||||
- 1=>Asynchronous aborts are not supported
|
||||
- 0=>Timed-out commands will be aborted asynchronously
|
||||
hostt
|
||||
- pointer to driver's struct scsi_host_template from which
|
||||
this struct Scsi_Host instance was spawned
|
||||
@@ -1106,22 +1057,10 @@ of interest:
|
||||
transportt
|
||||
- pointer to driver's struct scsi_transport_template instance
|
||||
(if any). FC and SPI transports currently supported.
|
||||
sh_list
|
||||
- a double linked list of pointers to all struct Scsi_Host
|
||||
instances (currently ordered by ascending host_no)
|
||||
my_devices
|
||||
- a double linked list of pointers to struct scsi_device
|
||||
instances that belong to this host.
|
||||
hostdata[0]
|
||||
- area reserved for LLD at end of struct Scsi_Host. Size
|
||||
is set by the second argument (named 'xtr_bytes') to
|
||||
scsi_host_alloc() or scsi_register().
|
||||
vendor_id
|
||||
- a unique value that identifies the vendor supplying
|
||||
the LLD for the Scsi_Host. Used most often in validating
|
||||
vendor-specific message requests. Value consists of an
|
||||
identifier type and a vendor-specific value.
|
||||
See scsi_netlink.h for a description of valid formats.
|
||||
is set by the second argument (named 'privsize') to
|
||||
scsi_host_alloc().
|
||||
|
||||
The scsi_host structure is defined in include/scsi/scsi_host.h
|
||||
|
||||
@@ -1143,30 +1082,11 @@ Members of interest:
|
||||
|
||||
cmnd
|
||||
- array containing SCSI command
|
||||
cmnd_len
|
||||
cmd_len
|
||||
- length (in bytes) of SCSI command
|
||||
sc_data_direction
|
||||
- direction of data transfer in data phase. See
|
||||
"enum dma_data_direction" in include/linux/dma-mapping.h
|
||||
request_bufflen
|
||||
- number of data bytes to transfer (0 if no data phase)
|
||||
use_sg
|
||||
- ==0 -> no scatter gather list, hence transfer data
|
||||
to/from request_buffer
|
||||
- >0 -> scatter gather list (actually an array) in
|
||||
request_buffer with use_sg elements
|
||||
request_buffer
|
||||
- either contains data buffer or scatter gather list
|
||||
depending on the setting of use_sg. Scatter gather
|
||||
elements are defined by 'struct scatterlist' found
|
||||
in include/linux/scatterlist.h .
|
||||
done
|
||||
- function pointer that should be invoked by LLD when the
|
||||
SCSI command is completed (successfully or otherwise).
|
||||
Should only be called by an LLD if the LLD has accepted
|
||||
the command (i.e. queuecommand() returned or will return
|
||||
0). The LLD may invoke 'done' prior to queuecommand()
|
||||
finishing.
|
||||
result
|
||||
- should be set by LLD prior to calling 'done'. A value
|
||||
of 0 implies a successfully completed command (and all
|
||||
@@ -1189,13 +1109,13 @@ Members of interest:
|
||||
device
|
||||
- pointer to scsi_device object that this command is
|
||||
associated with.
|
||||
resid
|
||||
resid_len (access by calling scsi_set_resid() / scsi_get_resid())
|
||||
- an LLD should set this unsigned integer to the requested
|
||||
transfer length (i.e. 'request_bufflen') less the number
|
||||
of bytes that are actually transferred. 'resid' is
|
||||
of bytes that are actually transferred. 'resid_len' is
|
||||
preset to 0 so an LLD can ignore it if it cannot detect
|
||||
underruns (overruns should not be reported). An LLD
|
||||
should set 'resid' prior to invoking 'done'. The most
|
||||
should set 'resid_len' prior to invoking 'done'. The most
|
||||
interesting case is data transfers from a SCSI target
|
||||
device (e.g. READs) that underrun.
|
||||
underflow
|
||||
@@ -1204,10 +1124,10 @@ Members of interest:
|
||||
figure. Not many LLDs implement this check and some that
|
||||
do just output an error message to the log rather than
|
||||
report a DID_ERROR. Better for an LLD to implement
|
||||
'resid'.
|
||||
'resid_len'.
|
||||
|
||||
It is recommended that a LLD set 'resid' on data transfers from a SCSI
|
||||
target device (e.g. READs). It is especially important that 'resid' is set
|
||||
It is recommended that a LLD set 'resid_len' on data transfers from a SCSI
|
||||
target device (e.g. READs). It is especially important that 'resid_len' is set
|
||||
when such data transfers have sense keys of MEDIUM ERROR and HARDWARE ERROR
|
||||
(and possibly RECOVERED ERROR). In these cases if a LLD is in doubt how much
|
||||
data has been received then the safest approach is to indicate no bytes have
|
||||
@@ -1217,7 +1137,7 @@ a LLD might use these helpers::
|
||||
scsi_set_resid(SCpnt, scsi_bufflen(SCpnt));
|
||||
|
||||
where 'SCpnt' is a pointer to a scsi_cmnd object. To indicate only three 512
|
||||
bytes blocks has been received 'resid' could be set like this::
|
||||
bytes blocks have been received 'resid_len' could be set like this::
|
||||
|
||||
scsi_set_resid(SCpnt, scsi_bufflen(SCpnt) - (3 * 512));
|
||||
|
||||
|
||||
+2
-4
@@ -11511,9 +11511,8 @@ F: drivers/mfd/intel_pmc_bxt.c
|
||||
F: include/linux/mfd/intel_pmc_bxt.h
|
||||
|
||||
INTEL C600 SERIES SAS CONTROLLER DRIVER
|
||||
M: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
|
||||
L: linux-scsi@vger.kernel.org
|
||||
S: Supported
|
||||
S: Orphan
|
||||
T: git git://git.code.sf.net/p/intel-sas/isci
|
||||
F: drivers/scsi/isci/
|
||||
|
||||
@@ -20781,8 +20780,7 @@ F: arch/s390/include/uapi/asm/zcrypt.h
|
||||
F: drivers/s390/crypto/
|
||||
|
||||
S390 ZFCP DRIVER
|
||||
M: Steffen Maier <maier@linux.ibm.com>
|
||||
M: Benjamin Block <bblock@linux.ibm.com>
|
||||
M: Nihar Panda <niharp@linux.ibm.com>
|
||||
L: linux-s390@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/s390/scsi/zfcp_*
|
||||
|
||||
+1
-1
@@ -397,7 +397,7 @@ extern const struct attribute_group *ahci_sdev_groups[];
|
||||
.sdev_groups = ahci_sdev_groups, \
|
||||
.change_queue_depth = ata_scsi_change_queue_depth, \
|
||||
.tag_alloc_policy_rr = true, \
|
||||
.device_configure = ata_scsi_device_configure
|
||||
.sdev_configure = ata_scsi_sdev_configure
|
||||
|
||||
extern struct ata_port_operations ahci_ops;
|
||||
extern struct ata_port_operations ahci_platform_ops;
|
||||
|
||||
@@ -1313,7 +1313,7 @@ int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth)
|
||||
EXPORT_SYMBOL_GPL(ata_scsi_change_queue_depth);
|
||||
|
||||
/**
|
||||
* ata_sas_device_configure - Default device_configure routine for libata
|
||||
* ata_sas_sdev_configure - Default sdev_configure routine for libata
|
||||
* devices
|
||||
* @sdev: SCSI device to configure
|
||||
* @lim: queue limits
|
||||
@@ -1323,14 +1323,14 @@ EXPORT_SYMBOL_GPL(ata_scsi_change_queue_depth);
|
||||
* Zero.
|
||||
*/
|
||||
|
||||
int ata_sas_device_configure(struct scsi_device *sdev, struct queue_limits *lim,
|
||||
struct ata_port *ap)
|
||||
int ata_sas_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim,
|
||||
struct ata_port *ap)
|
||||
{
|
||||
ata_scsi_sdev_config(sdev);
|
||||
|
||||
return ata_scsi_dev_config(sdev, lim, ap->link.device);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ata_sas_device_configure);
|
||||
EXPORT_SYMBOL_GPL(ata_sas_sdev_configure);
|
||||
|
||||
/**
|
||||
* ata_sas_queuecmd - Issue SCSI cdb to libata-managed device
|
||||
|
||||
@@ -1133,7 +1133,7 @@ int ata_scsi_dev_config(struct scsi_device *sdev, struct queue_limits *lim,
|
||||
}
|
||||
|
||||
/**
|
||||
* ata_scsi_slave_alloc - Early setup of SCSI device
|
||||
* ata_scsi_sdev_init - Early setup of SCSI device
|
||||
* @sdev: SCSI device to examine
|
||||
*
|
||||
* This is called from scsi_alloc_sdev() when the scsi device
|
||||
@@ -1143,7 +1143,7 @@ int ata_scsi_dev_config(struct scsi_device *sdev, struct queue_limits *lim,
|
||||
* Defined by SCSI layer. We don't really care.
|
||||
*/
|
||||
|
||||
int ata_scsi_slave_alloc(struct scsi_device *sdev)
|
||||
int ata_scsi_sdev_init(struct scsi_device *sdev)
|
||||
{
|
||||
struct ata_port *ap = ata_shost_to_port(sdev->host);
|
||||
struct device_link *link;
|
||||
@@ -1166,10 +1166,10 @@ int ata_scsi_slave_alloc(struct scsi_device *sdev)
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ata_scsi_slave_alloc);
|
||||
EXPORT_SYMBOL_GPL(ata_scsi_sdev_init);
|
||||
|
||||
/**
|
||||
* ata_scsi_device_configure - Set SCSI device attributes
|
||||
* ata_scsi_sdev_configure - Set SCSI device attributes
|
||||
* @sdev: SCSI device to examine
|
||||
* @lim: queue limits
|
||||
*
|
||||
@@ -1181,8 +1181,7 @@ EXPORT_SYMBOL_GPL(ata_scsi_slave_alloc);
|
||||
* Defined by SCSI layer. We don't really care.
|
||||
*/
|
||||
|
||||
int ata_scsi_device_configure(struct scsi_device *sdev,
|
||||
struct queue_limits *lim)
|
||||
int ata_scsi_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim)
|
||||
{
|
||||
struct ata_port *ap = ata_shost_to_port(sdev->host);
|
||||
struct ata_device *dev = __ata_scsi_find_dev(ap, sdev);
|
||||
@@ -1192,10 +1191,10 @@ int ata_scsi_device_configure(struct scsi_device *sdev,
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ata_scsi_device_configure);
|
||||
EXPORT_SYMBOL_GPL(ata_scsi_sdev_configure);
|
||||
|
||||
/**
|
||||
* ata_scsi_slave_destroy - SCSI device is about to be destroyed
|
||||
* ata_scsi_sdev_destroy - SCSI device is about to be destroyed
|
||||
* @sdev: SCSI device to be destroyed
|
||||
*
|
||||
* @sdev is about to be destroyed for hot/warm unplugging. If
|
||||
@@ -1208,7 +1207,7 @@ EXPORT_SYMBOL_GPL(ata_scsi_device_configure);
|
||||
* LOCKING:
|
||||
* Defined by SCSI layer. We don't really care.
|
||||
*/
|
||||
void ata_scsi_slave_destroy(struct scsi_device *sdev)
|
||||
void ata_scsi_sdev_destroy(struct scsi_device *sdev)
|
||||
{
|
||||
struct ata_port *ap = ata_shost_to_port(sdev->host);
|
||||
unsigned long flags;
|
||||
@@ -1228,7 +1227,7 @@ void ata_scsi_slave_destroy(struct scsi_device *sdev)
|
||||
|
||||
kfree(sdev->dma_drain_buf);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ata_scsi_slave_destroy);
|
||||
EXPORT_SYMBOL_GPL(ata_scsi_sdev_destroy);
|
||||
|
||||
/**
|
||||
* ata_scsi_start_stop_xlat - Translate SCSI START STOP UNIT command
|
||||
|
||||
@@ -812,8 +812,8 @@ static void pata_macio_reset_hw(struct pata_macio_priv *priv, int resume)
|
||||
/* Hook the standard slave config to fixup some HW related alignment
|
||||
* restrictions
|
||||
*/
|
||||
static int pata_macio_device_configure(struct scsi_device *sdev,
|
||||
struct queue_limits *lim)
|
||||
static int pata_macio_sdev_configure(struct scsi_device *sdev,
|
||||
struct queue_limits *lim)
|
||||
{
|
||||
struct ata_port *ap = ata_shost_to_port(sdev->host);
|
||||
struct pata_macio_priv *priv = ap->private_data;
|
||||
@@ -822,7 +822,7 @@ static int pata_macio_device_configure(struct scsi_device *sdev,
|
||||
int rc;
|
||||
|
||||
/* First call original */
|
||||
rc = ata_scsi_device_configure(sdev, lim);
|
||||
rc = ata_scsi_sdev_configure(sdev, lim);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
@@ -932,7 +932,7 @@ static const struct scsi_host_template pata_macio_sht = {
|
||||
/* We may not need that strict one */
|
||||
.dma_boundary = ATA_DMA_BOUNDARY,
|
||||
.max_segment_size = PATA_MACIO_MAX_SEGMENT_SIZE,
|
||||
.device_configure = pata_macio_device_configure,
|
||||
.sdev_configure = pata_macio_sdev_configure,
|
||||
.sdev_groups = ata_common_sdev_groups,
|
||||
.can_queue = ATA_DEF_QUEUE,
|
||||
.tag_alloc_policy_rr = true,
|
||||
|
||||
@@ -673,7 +673,7 @@ static const struct scsi_host_template mv6_sht = {
|
||||
.sdev_groups = ata_ncq_sdev_groups,
|
||||
.change_queue_depth = ata_scsi_change_queue_depth,
|
||||
.tag_alloc_policy_rr = true,
|
||||
.device_configure = ata_scsi_device_configure
|
||||
.sdev_configure = ata_scsi_sdev_configure
|
||||
};
|
||||
|
||||
static struct ata_port_operations mv5_ops = {
|
||||
|
||||
+12
-12
@@ -296,8 +296,8 @@ static void nv_nf2_freeze(struct ata_port *ap);
|
||||
static void nv_nf2_thaw(struct ata_port *ap);
|
||||
static void nv_ck804_freeze(struct ata_port *ap);
|
||||
static void nv_ck804_thaw(struct ata_port *ap);
|
||||
static int nv_adma_device_configure(struct scsi_device *sdev,
|
||||
struct queue_limits *lim);
|
||||
static int nv_adma_sdev_configure(struct scsi_device *sdev,
|
||||
struct queue_limits *lim);
|
||||
static int nv_adma_check_atapi_dma(struct ata_queued_cmd *qc);
|
||||
static enum ata_completion_errors nv_adma_qc_prep(struct ata_queued_cmd *qc);
|
||||
static unsigned int nv_adma_qc_issue(struct ata_queued_cmd *qc);
|
||||
@@ -319,8 +319,8 @@ static void nv_adma_tf_read(struct ata_port *ap, struct ata_taskfile *tf);
|
||||
static void nv_mcp55_thaw(struct ata_port *ap);
|
||||
static void nv_mcp55_freeze(struct ata_port *ap);
|
||||
static void nv_swncq_error_handler(struct ata_port *ap);
|
||||
static int nv_swncq_device_configure(struct scsi_device *sdev,
|
||||
struct queue_limits *lim);
|
||||
static int nv_swncq_sdev_configure(struct scsi_device *sdev,
|
||||
struct queue_limits *lim);
|
||||
static int nv_swncq_port_start(struct ata_port *ap);
|
||||
static enum ata_completion_errors nv_swncq_qc_prep(struct ata_queued_cmd *qc);
|
||||
static void nv_swncq_fill_sg(struct ata_queued_cmd *qc);
|
||||
@@ -382,7 +382,7 @@ static const struct scsi_host_template nv_adma_sht = {
|
||||
.can_queue = NV_ADMA_MAX_CPBS,
|
||||
.sg_tablesize = NV_ADMA_SGTBL_TOTAL_LEN,
|
||||
.dma_boundary = NV_ADMA_DMA_BOUNDARY,
|
||||
.device_configure = nv_adma_device_configure,
|
||||
.sdev_configure = nv_adma_sdev_configure,
|
||||
.sdev_groups = ata_ncq_sdev_groups,
|
||||
.change_queue_depth = ata_scsi_change_queue_depth,
|
||||
.tag_alloc_policy_rr = true,
|
||||
@@ -393,7 +393,7 @@ static const struct scsi_host_template nv_swncq_sht = {
|
||||
.can_queue = ATA_MAX_QUEUE - 1,
|
||||
.sg_tablesize = LIBATA_MAX_PRD,
|
||||
.dma_boundary = ATA_DMA_BOUNDARY,
|
||||
.device_configure = nv_swncq_device_configure,
|
||||
.sdev_configure = nv_swncq_sdev_configure,
|
||||
.sdev_groups = ata_ncq_sdev_groups,
|
||||
.change_queue_depth = ata_scsi_change_queue_depth,
|
||||
.tag_alloc_policy_rr = true,
|
||||
@@ -663,8 +663,8 @@ static void nv_adma_mode(struct ata_port *ap)
|
||||
pp->flags &= ~NV_ADMA_PORT_REGISTER_MODE;
|
||||
}
|
||||
|
||||
static int nv_adma_device_configure(struct scsi_device *sdev,
|
||||
struct queue_limits *lim)
|
||||
static int nv_adma_sdev_configure(struct scsi_device *sdev,
|
||||
struct queue_limits *lim)
|
||||
{
|
||||
struct ata_port *ap = ata_shost_to_port(sdev->host);
|
||||
struct nv_adma_port_priv *pp = ap->private_data;
|
||||
@@ -676,7 +676,7 @@ static int nv_adma_device_configure(struct scsi_device *sdev,
|
||||
int adma_enable;
|
||||
u32 current_reg, new_reg, config_mask;
|
||||
|
||||
rc = ata_scsi_device_configure(sdev, lim);
|
||||
rc = ata_scsi_sdev_configure(sdev, lim);
|
||||
|
||||
if (sdev->id >= ATA_MAX_DEVICES || sdev->channel || sdev->lun)
|
||||
/* Not a proper libata device, ignore */
|
||||
@@ -1871,8 +1871,8 @@ static void nv_swncq_host_init(struct ata_host *host)
|
||||
writel(~0x0, mmio + NV_INT_STATUS_MCP55);
|
||||
}
|
||||
|
||||
static int nv_swncq_device_configure(struct scsi_device *sdev,
|
||||
struct queue_limits *lim)
|
||||
static int nv_swncq_sdev_configure(struct scsi_device *sdev,
|
||||
struct queue_limits *lim)
|
||||
{
|
||||
struct ata_port *ap = ata_shost_to_port(sdev->host);
|
||||
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
|
||||
@@ -1882,7 +1882,7 @@ static int nv_swncq_device_configure(struct scsi_device *sdev,
|
||||
u8 check_maxtor = 0;
|
||||
unsigned char model_num[ATA_ID_PROD_LEN + 1];
|
||||
|
||||
rc = ata_scsi_device_configure(sdev, lim);
|
||||
rc = ata_scsi_sdev_configure(sdev, lim);
|
||||
if (sdev->id >= ATA_MAX_DEVICES || sdev->channel || sdev->lun)
|
||||
/* Not a proper libata device, ignore */
|
||||
return rc;
|
||||
|
||||
@@ -380,7 +380,7 @@ static const struct scsi_host_template sil24_sht = {
|
||||
.dma_boundary = ATA_DMA_BOUNDARY,
|
||||
.sdev_groups = ata_ncq_sdev_groups,
|
||||
.change_queue_depth = ata_scsi_change_queue_depth,
|
||||
.device_configure = ata_scsi_device_configure
|
||||
.sdev_configure = ata_scsi_sdev_configure
|
||||
};
|
||||
|
||||
static struct ata_port_operations sil24_ops = {
|
||||
|
||||
@@ -1490,7 +1490,7 @@ static int sbp2_scsi_queuecommand(struct Scsi_Host *shost,
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int sbp2_scsi_slave_alloc(struct scsi_device *sdev)
|
||||
static int sbp2_scsi_sdev_init(struct scsi_device *sdev)
|
||||
{
|
||||
struct sbp2_logical_unit *lu = sdev->hostdata;
|
||||
|
||||
@@ -1506,8 +1506,8 @@ static int sbp2_scsi_slave_alloc(struct scsi_device *sdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sbp2_scsi_device_configure(struct scsi_device *sdev,
|
||||
struct queue_limits *lim)
|
||||
static int sbp2_scsi_sdev_configure(struct scsi_device *sdev,
|
||||
struct queue_limits *lim)
|
||||
{
|
||||
struct sbp2_logical_unit *lu = sdev->hostdata;
|
||||
|
||||
@@ -1590,8 +1590,8 @@ static const struct scsi_host_template scsi_driver_template = {
|
||||
.name = "SBP-2 IEEE-1394",
|
||||
.proc_name = "sbp2",
|
||||
.queuecommand = sbp2_scsi_queuecommand,
|
||||
.slave_alloc = sbp2_scsi_slave_alloc,
|
||||
.device_configure = sbp2_scsi_device_configure,
|
||||
.sdev_init = sbp2_scsi_sdev_init,
|
||||
.sdev_configure = sbp2_scsi_sdev_configure,
|
||||
.eh_abort_handler = sbp2_scsi_abort,
|
||||
.this_id = -1,
|
||||
.sg_tablesize = SG_ALL,
|
||||
|
||||
@@ -2844,7 +2844,8 @@ static int srp_target_alloc(struct scsi_target *starget)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int srp_slave_configure(struct scsi_device *sdev)
|
||||
static int srp_sdev_configure(struct scsi_device *sdev,
|
||||
struct queue_limits *lim)
|
||||
{
|
||||
struct Scsi_Host *shost = sdev->host;
|
||||
struct srp_target_port *target = host_to_target(shost);
|
||||
@@ -3067,7 +3068,7 @@ static const struct scsi_host_template srp_template = {
|
||||
.name = "InfiniBand SRP initiator",
|
||||
.proc_name = DRV_NAME,
|
||||
.target_alloc = srp_target_alloc,
|
||||
.slave_configure = srp_slave_configure,
|
||||
.sdev_configure = srp_sdev_configure,
|
||||
.info = srp_target_info,
|
||||
.init_cmd_priv = srp_init_cmd_priv,
|
||||
.exit_cmd_priv = srp_exit_cmd_priv,
|
||||
|
||||
@@ -96,7 +96,7 @@ static u8 mptfcTaskCtx = MPT_MAX_PROTOCOL_DRIVERS;
|
||||
static u8 mptfcInternalCtx = MPT_MAX_PROTOCOL_DRIVERS;
|
||||
|
||||
static int mptfc_target_alloc(struct scsi_target *starget);
|
||||
static int mptfc_slave_alloc(struct scsi_device *sdev);
|
||||
static int mptfc_sdev_init(struct scsi_device *sdev);
|
||||
static int mptfc_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt);
|
||||
static void mptfc_target_destroy(struct scsi_target *starget);
|
||||
static void mptfc_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout);
|
||||
@@ -113,10 +113,10 @@ static const struct scsi_host_template mptfc_driver_template = {
|
||||
.info = mptscsih_info,
|
||||
.queuecommand = mptfc_qcmd,
|
||||
.target_alloc = mptfc_target_alloc,
|
||||
.slave_alloc = mptfc_slave_alloc,
|
||||
.slave_configure = mptscsih_slave_configure,
|
||||
.sdev_init = mptfc_sdev_init,
|
||||
.sdev_configure = mptscsih_sdev_configure,
|
||||
.target_destroy = mptfc_target_destroy,
|
||||
.slave_destroy = mptscsih_slave_destroy,
|
||||
.sdev_destroy = mptscsih_sdev_destroy,
|
||||
.change_queue_depth = mptscsih_change_queue_depth,
|
||||
.eh_timed_out = fc_eh_timed_out,
|
||||
.eh_abort_handler = mptfc_abort,
|
||||
@@ -503,7 +503,7 @@ mptfc_register_dev(MPT_ADAPTER *ioc, int channel, FCDevicePage0_t *pg0)
|
||||
/*
|
||||
* if already mapped, remap here. If not mapped,
|
||||
* target_alloc will allocate vtarget and map,
|
||||
* slave_alloc will fill in vdevice from vtarget.
|
||||
* sdev_init will fill in vdevice from vtarget.
|
||||
*/
|
||||
if (ri->starget) {
|
||||
vtarget = ri->starget->hostdata;
|
||||
@@ -631,7 +631,7 @@ mptfc_dump_lun_info(MPT_ADAPTER *ioc, struct fc_rport *rport, struct scsi_device
|
||||
* Init memory once per LUN.
|
||||
*/
|
||||
static int
|
||||
mptfc_slave_alloc(struct scsi_device *sdev)
|
||||
mptfc_sdev_init(struct scsi_device *sdev)
|
||||
{
|
||||
MPT_SCSI_HOST *hd;
|
||||
VirtTarget *vtarget;
|
||||
@@ -651,7 +651,7 @@ mptfc_slave_alloc(struct scsi_device *sdev)
|
||||
|
||||
vdevice = kzalloc(sizeof(VirtDevice), GFP_KERNEL);
|
||||
if (!vdevice) {
|
||||
printk(MYIOC_s_ERR_FMT "slave_alloc kmalloc(%zd) FAILED!\n",
|
||||
printk(MYIOC_s_ERR_FMT "sdev_init kmalloc(%zd) FAILED!\n",
|
||||
ioc->name, sizeof(VirtDevice));
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -1710,7 +1710,7 @@ mptsas_firmware_event_work(struct work_struct *work)
|
||||
|
||||
|
||||
static int
|
||||
mptsas_slave_configure(struct scsi_device *sdev)
|
||||
mptsas_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim)
|
||||
{
|
||||
struct Scsi_Host *host = sdev->host;
|
||||
MPT_SCSI_HOST *hd = shost_priv(host);
|
||||
@@ -1736,7 +1736,7 @@ mptsas_slave_configure(struct scsi_device *sdev)
|
||||
mptsas_add_device_component_starget(ioc, scsi_target(sdev));
|
||||
|
||||
out:
|
||||
return mptscsih_slave_configure(sdev);
|
||||
return mptscsih_sdev_configure(sdev, lim);
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -1867,7 +1867,7 @@ mptsas_target_destroy(struct scsi_target *starget)
|
||||
|
||||
|
||||
static int
|
||||
mptsas_slave_alloc(struct scsi_device *sdev)
|
||||
mptsas_sdev_init(struct scsi_device *sdev)
|
||||
{
|
||||
struct Scsi_Host *host = sdev->host;
|
||||
MPT_SCSI_HOST *hd = shost_priv(host);
|
||||
@@ -1880,7 +1880,7 @@ mptsas_slave_alloc(struct scsi_device *sdev)
|
||||
|
||||
vdevice = kzalloc(sizeof(VirtDevice), GFP_KERNEL);
|
||||
if (!vdevice) {
|
||||
printk(MYIOC_s_ERR_FMT "slave_alloc kzalloc(%zd) FAILED!\n",
|
||||
printk(MYIOC_s_ERR_FMT "sdev_init kzalloc(%zd) FAILED!\n",
|
||||
ioc->name, sizeof(VirtDevice));
|
||||
return -ENOMEM;
|
||||
}
|
||||
@@ -2005,10 +2005,10 @@ static const struct scsi_host_template mptsas_driver_template = {
|
||||
.info = mptscsih_info,
|
||||
.queuecommand = mptsas_qcmd,
|
||||
.target_alloc = mptsas_target_alloc,
|
||||
.slave_alloc = mptsas_slave_alloc,
|
||||
.slave_configure = mptsas_slave_configure,
|
||||
.sdev_init = mptsas_sdev_init,
|
||||
.sdev_configure = mptsas_sdev_configure,
|
||||
.target_destroy = mptsas_target_destroy,
|
||||
.slave_destroy = mptscsih_slave_destroy,
|
||||
.sdev_destroy = mptscsih_sdev_destroy,
|
||||
.change_queue_depth = mptscsih_change_queue_depth,
|
||||
.eh_timed_out = mptsas_eh_timed_out,
|
||||
.eh_abort_handler = mptscsih_abort,
|
||||
|
||||
@@ -1071,7 +1071,7 @@ EXPORT_SYMBOL(mptscsih_flush_running_cmds);
|
||||
*
|
||||
* Returns: None.
|
||||
*
|
||||
* Called from slave_destroy.
|
||||
* Called from sdev_destroy.
|
||||
*/
|
||||
static void
|
||||
mptscsih_search_running_cmds(MPT_SCSI_HOST *hd, VirtDevice *vdevice)
|
||||
@@ -2331,7 +2331,7 @@ EXPORT_SYMBOL(mptscsih_raid_id_to_num);
|
||||
* Called if no device present or device being unloaded
|
||||
*/
|
||||
void
|
||||
mptscsih_slave_destroy(struct scsi_device *sdev)
|
||||
mptscsih_sdev_destroy(struct scsi_device *sdev)
|
||||
{
|
||||
struct Scsi_Host *host = sdev->host;
|
||||
MPT_SCSI_HOST *hd = shost_priv(host);
|
||||
@@ -2399,7 +2399,7 @@ mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth)
|
||||
* Return non-zero if fails.
|
||||
*/
|
||||
int
|
||||
mptscsih_slave_configure(struct scsi_device *sdev)
|
||||
mptscsih_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim)
|
||||
{
|
||||
struct Scsi_Host *sh = sdev->host;
|
||||
VirtTarget *vtarget;
|
||||
@@ -3302,8 +3302,8 @@ EXPORT_SYMBOL(mptscsih_resume);
|
||||
EXPORT_SYMBOL(mptscsih_show_info);
|
||||
EXPORT_SYMBOL(mptscsih_info);
|
||||
EXPORT_SYMBOL(mptscsih_qcmd);
|
||||
EXPORT_SYMBOL(mptscsih_slave_destroy);
|
||||
EXPORT_SYMBOL(mptscsih_slave_configure);
|
||||
EXPORT_SYMBOL(mptscsih_sdev_destroy);
|
||||
EXPORT_SYMBOL(mptscsih_sdev_configure);
|
||||
EXPORT_SYMBOL(mptscsih_abort);
|
||||
EXPORT_SYMBOL(mptscsih_dev_reset);
|
||||
EXPORT_SYMBOL(mptscsih_target_reset);
|
||||
|
||||
@@ -116,8 +116,9 @@ extern const char * mptscsih_info(struct Scsi_Host *SChost);
|
||||
extern int mptscsih_qcmd(struct scsi_cmnd *SCpnt);
|
||||
extern int mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel,
|
||||
u8 id, u64 lun, int ctx2abort, ulong timeout);
|
||||
extern void mptscsih_slave_destroy(struct scsi_device *device);
|
||||
extern int mptscsih_slave_configure(struct scsi_device *device);
|
||||
extern void mptscsih_sdev_destroy(struct scsi_device *device);
|
||||
extern int mptscsih_sdev_configure(struct scsi_device *device,
|
||||
struct queue_limits *lim);
|
||||
extern int mptscsih_abort(struct scsi_cmnd * SCpnt);
|
||||
extern int mptscsih_dev_reset(struct scsi_cmnd * SCpnt);
|
||||
extern int mptscsih_target_reset(struct scsi_cmnd * SCpnt);
|
||||
|
||||
@@ -713,7 +713,7 @@ static void mptspi_dv_device(struct _MPT_SCSI_HOST *hd,
|
||||
mptspi_read_parameters(sdev->sdev_target);
|
||||
}
|
||||
|
||||
static int mptspi_slave_alloc(struct scsi_device *sdev)
|
||||
static int mptspi_sdev_init(struct scsi_device *sdev)
|
||||
{
|
||||
MPT_SCSI_HOST *hd = shost_priv(sdev->host);
|
||||
VirtTarget *vtarget;
|
||||
@@ -727,7 +727,7 @@ static int mptspi_slave_alloc(struct scsi_device *sdev)
|
||||
|
||||
vdevice = kzalloc(sizeof(VirtDevice), GFP_KERNEL);
|
||||
if (!vdevice) {
|
||||
printk(MYIOC_s_ERR_FMT "slave_alloc kmalloc(%zd) FAILED!\n",
|
||||
printk(MYIOC_s_ERR_FMT "sdev_init kmalloc(%zd) FAILED!\n",
|
||||
ioc->name, sizeof(VirtDevice));
|
||||
return -ENOMEM;
|
||||
}
|
||||
@@ -746,7 +746,8 @@ static int mptspi_slave_alloc(struct scsi_device *sdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mptspi_slave_configure(struct scsi_device *sdev)
|
||||
static int mptspi_sdev_configure(struct scsi_device *sdev,
|
||||
struct queue_limits *lim)
|
||||
{
|
||||
struct _MPT_SCSI_HOST *hd = shost_priv(sdev->host);
|
||||
VirtTarget *vtarget = scsi_target(sdev)->hostdata;
|
||||
@@ -754,7 +755,7 @@ static int mptspi_slave_configure(struct scsi_device *sdev)
|
||||
|
||||
mptspi_initTarget(hd, vtarget, sdev);
|
||||
|
||||
ret = mptscsih_slave_configure(sdev);
|
||||
ret = mptscsih_sdev_configure(sdev, lim);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -799,7 +800,7 @@ mptspi_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt)
|
||||
return mptscsih_qcmd(SCpnt);
|
||||
}
|
||||
|
||||
static void mptspi_slave_destroy(struct scsi_device *sdev)
|
||||
static void mptspi_sdev_destroy(struct scsi_device *sdev)
|
||||
{
|
||||
struct scsi_target *starget = scsi_target(sdev);
|
||||
VirtTarget *vtarget = starget->hostdata;
|
||||
@@ -817,7 +818,7 @@ static void mptspi_slave_destroy(struct scsi_device *sdev)
|
||||
mptspi_write_spi_device_pg1(starget, &pg1);
|
||||
}
|
||||
|
||||
mptscsih_slave_destroy(sdev);
|
||||
mptscsih_sdev_destroy(sdev);
|
||||
}
|
||||
|
||||
static const struct scsi_host_template mptspi_driver_template = {
|
||||
@@ -828,10 +829,10 @@ static const struct scsi_host_template mptspi_driver_template = {
|
||||
.info = mptscsih_info,
|
||||
.queuecommand = mptspi_qcmd,
|
||||
.target_alloc = mptspi_target_alloc,
|
||||
.slave_alloc = mptspi_slave_alloc,
|
||||
.slave_configure = mptspi_slave_configure,
|
||||
.sdev_init = mptspi_sdev_init,
|
||||
.sdev_configure = mptspi_sdev_configure,
|
||||
.target_destroy = mptspi_target_destroy,
|
||||
.slave_destroy = mptspi_slave_destroy,
|
||||
.sdev_destroy = mptspi_sdev_destroy,
|
||||
.change_queue_depth = mptscsih_change_queue_depth,
|
||||
.eh_abort_handler = mptscsih_abort,
|
||||
.eh_device_reset_handler = mptscsih_dev_reset,
|
||||
|
||||
@@ -537,6 +537,11 @@ static void zfcp_fc_adisc_handler(void *data)
|
||||
/* port is still good, nothing to do */
|
||||
out:
|
||||
atomic_andnot(ZFCP_STATUS_PORT_LINK_TEST, &port->status);
|
||||
/*
|
||||
* port ref comes from get_device() in zfcp_fc_test_link() and
|
||||
* work item zfcp_fc_link_test_work() passes ref via
|
||||
* zfcp_fc_adisc() to here, if zfcp_fc_adisc() could send ADISC
|
||||
*/
|
||||
put_device(&port->dev);
|
||||
kmem_cache_free(zfcp_fc_req_cache, fc_req);
|
||||
}
|
||||
@@ -603,7 +608,7 @@ void zfcp_fc_link_test_work(struct work_struct *work)
|
||||
|
||||
retval = zfcp_fc_adisc(port);
|
||||
if (retval == 0)
|
||||
return;
|
||||
return; /* port ref passed to zfcp_fc_adisc(), no put here */
|
||||
|
||||
/* send of ADISC was not possible */
|
||||
atomic_andnot(ZFCP_STATUS_PORT_LINK_TEST, &port->status);
|
||||
|
||||
@@ -1218,7 +1218,7 @@ static int zfcp_fsf_setup_ct_els(struct zfcp_fsf_req *req,
|
||||
/**
|
||||
* zfcp_fsf_send_ct - initiate a Generic Service request (FC-GS)
|
||||
* @wka_port: pointer to zfcp WKA port to send CT/GS to
|
||||
* @ct: pointer to struct zfcp_send_ct with data for request
|
||||
* @ct: pointer to struct zfcp_fsf_ct_els with data for CT request
|
||||
* @pool: if non-null this mempool is used to allocate struct zfcp_fsf_req
|
||||
* @timeout: timeout that hardware should use, and a later software timeout
|
||||
*/
|
||||
@@ -1316,7 +1316,7 @@ skip_fsfstatus:
|
||||
* zfcp_fsf_send_els - initiate an ELS command (FC-FS)
|
||||
* @adapter: pointer to zfcp adapter
|
||||
* @d_id: N_Port_ID to send ELS to
|
||||
* @els: pointer to struct zfcp_send_els with data for the command
|
||||
* @els: pointer to struct zfcp_fsf_ct_els with data for the ELS command
|
||||
* @timeout: timeout that hardware should use, and a later software timeout
|
||||
*/
|
||||
int zfcp_fsf_send_els(struct zfcp_adapter *adapter, u32 d_id,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user