24 Nov, 2014
2 commits
-
Drop the now unused reason argument from the ->change_queue_depth method.
Also add a return value to scsi_adjust_queue_depth, and rename it to
scsi_change_queue_depth now that it can be used as the default
->change_queue_depth implementation.Signed-off-by: Christoph Hellwig
Reviewed-by: Mike Christie
Reviewed-by: Hannes Reinecke -
All drivers use the implementation for ramping the queue up and down, so
instead of overloading the change_queue_depth method call the
implementation diretly if the driver opts into it by setting the
track_queue_depth flag in the host template.Note that a few drivers validated the new queue depth in their
change_queue_depth method, but as we never go over the queue depth
set during slave_configure or the sysfs file this isn't nessecary
and can safely be removed.Signed-off-by: Christoph Hellwig
Reviewed-by: Mike Christie
Reviewed-by: Hannes Reinecke
Reviewed-by: Venkatesh Srinivas
12 Nov, 2014
4 commits
-
Now that we also get proper values in cmd->request->tag for untagged
commands, there is no need to force tagged_supported to on in drivers
that need host-wide tags.Signed-off-by: Christoph Hellwig
Reviewed-by: Mike Christie
Reviewed-by: Hannes Reinecke -
Remove the tagged argument from scsi_adjust_queue_depth, and just let it
handle the queue depth. For most drivers those two are fairly separate,
given that most modern drivers don't care about the SCSI "tagged" status
of a command at all, and many old drivers allow queuing of multiple
untagged commands in the driver.Instead we start out with the ->simple_tags flag set before calling
->slave_configure, which is how all drivers actually looking at
->simple_tags except for one worke anyway. The one other case looks
broken, but I've kept the behavior as-is for now.Except for that we only change ->simple_tags from the ->change_queue_type,
and when rejecting a tag message in a single driver, so keeping this
churn out of scsi_adjust_queue_depth is a clear win.Now that the usage of scsi_adjust_queue_depth is more obvious we can
also remove all the trivial instances in ->slave_alloc or ->slave_configure
that just set it to the cmd_per_lun default.Signed-off-by: Christoph Hellwig
Reviewed-by: Mike Christie
Reviewed-by: Hannes Reinecke
Reviewed-by: Martin K. Petersen -
Allow a driver to ask for block layer tags by setting .use_blk_tags in the
host template, in which case it will always see a valid value in
request->tag, similar to the behavior when using blk-mq. This means even
SCSI "untagged" commands will now have a tag, which is especially useful
when using a host-wide tag map.Signed-off-by: Christoph Hellwig
Reviewed-by: Mike Christie
Reviewed-by: Martin K. Petersen
Reviewed-by: Hannes Reinecke -
Unless we want to build a SPI tag message we should just check SCMD_TAGGED
instead of reverse engineering a tag type through the use of
scsi_populate_tag_msg.Also rename the function to spi_populate_tag_msg, make it behave like the
other spi message helpers, and move it to the spi transport class.Signed-off-by: Christoph Hellwig
Reviewed-by: Mike Christie
Reviewed-by: Hannes Reinecke
01 Aug, 2014
1 commit
-
qla4xxx was not always returning -EXYZ error codes when
qla4xxx_get_host_stats failed.Signed-off-by: Mike Christie
Acked-by: Vikas Chaudhary
Reviewed-by: Hannes Reinecke
Signed-off-by: Christoph Hellwig
30 Jul, 2014
4 commits
-
the qla4xxx_alloc_fw_dump() calls dma_alloc_coherent() but does not
check its return value.Signed-off-by: Maurizio Lombardi
Acked-By: Nilesh Javali
Signed-off-by: Christoph Hellwig -
Replacing strncpy with strlcpy to avoid strings that lacks null terminate.
And in some cases modified to copy one character less than the overall
length, as the entire area is already zeroed.Signed-off-by: Rickard Strandqvist
Acked-By: Nilesh Javali
Signed-off-by: Christoph Hellwig -
Replacing strncpy with strlcpy to avoid strings that lacks null terminate.
Signed-off-by: Rickard Strandqvist
Acked-By: Nilesh Javali
Signed-off-by: Christoph Hellwig -
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() or pci_enable_msi_exact()
and pci_enable_msix_range() or pci_enable_msix_exact()
interfaces.Signed-off-by: Alexander Gordeev
Acked-By: Vikas Chaudhary
Signed-off-by: Christoph Hellwig
18 Jul, 2014
1 commit
-
The SCSI standard defines 64-bit values for LUNs, and large arrays
employing large or hierarchical LUN numbers become more and more
common.So update the linux SCSI stack to use 64-bit LUN numbers.
Signed-off-by: Hannes Reinecke
Reviewed-by: Christoph Hellwig
Reviewed-by: Ewan Milne
Signed-off-by: Christoph Hellwig
29 May, 2014
1 commit
-
This issue was reported by coccicheck using the semantic patch
at scripts/coccinelle/api/memdup.cocciSigned-off-by: Benoit Taine
Acked-by: Vikas Chaudhary
Signed-off-by: Christoph Hellwig
20 May, 2014
16 commits
-
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: Christoph Hellwig -
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: Christoph Hellwig -
Fix following smatch warning:-
drivers/scsi/qla4xxx/ql4_os.c:1752 qla4xxx_get_ep_param() warn: variable dereferenced before check 'qla_ep' (see line 1745)Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: Christoph Hellwig -
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: Christoph Hellwig -
Issue:
modprobe qla4xxx is killed by systemd due to timeout.Solution:
The exporting of sysfs DDBs from qla4xxx_probe_adapter added delay of
approximately 15s due to which system-udevd killed the modprobe of the
driver. Added fix to export the sysfs DDBs from the DPC handler.Signed-off-by: Nilesh Javali
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: Christoph Hellwig -
Signed-off-by: Tej Parkash
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: Christoph Hellwig -
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: Christoph Hellwig -
Use correct goto statement to free dma memory in case of
failure in function qla4_84xx_config_acb()Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: Christoph Hellwig -
Issue:
System crash while target discovery for ISP40XXRoot cause:
Function qla4xxx_init_rings() is not called for ISP40XXFix:
Call function qla4xxx_init_rings() for ISP40XX from
qla4xxx_start_firmware().Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: Christoph Hellwig -
Check for correct return status in function -
qla4_8xxx_minidump_pex_dma_readSigned-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: Christoph Hellwig -
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: Christoph Hellwig -
Signed-off-by: Tej Parkash
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: Christoph Hellwig -
Updated driver with new opcode (RDDFE, RDMDIO and POLLWR) which are
added with latest firmware minidump templateSigned-off-by: Tej Parkash
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: Christoph Hellwig -
Signed-off-by: Tej Parkash
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: Christoph Hellwig -
Signed-off-by: Tej Parkash
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: Christoph Hellwig -
Problem:
iSCSI stop_firmware mailbox command is not completing outstanding IO.Solution:
Do not wait for IO completion after issuing stop_firmware mailbox
commandSigned-off-by: Tej Parkash
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: Christoph Hellwig
16 Mar, 2014
11 commits
-
Replace the session lock with two locks, a forward lock and
a backwards lock named frwd_lock and back_lock respectively.The forward lock protects resources that change while sending a
request to the target, such as cmdsn, queued_cmdsn, and allocating
task from the commands' pool with kfifo_out.The backward lock protects resources that change while processing
a response or in error path, such as cmdsn_exp, cmdsn_max, and
returning tasks to the commands' pool with kfifo_in.Under a steady state fast-path situation, that is when one
or more processes/threads submit IO to an iscsi device and
a single kernel upcall (e.g softirq) is dealing with processing
of responses without errors, this patch eliminates the contention
between the queuecommand()/request response/scsi_done() flows
associated with iscsi sessions.Between the forward and the backward locks exists a strict locking
hierarchy. The mutual exclusion zone protected by the forward lock can
enclose the mutual exclusion zone protected by the backward lock but not
vice versa.For example, in iscsi_conn_teardown or in iscsi_xmit_data when there is
a failure and __iscsi_put_task is called, the backward lock is taken while
the forward lock is still taken. On the other hand, if in the RX path a nop
is to be sent, for example in iscsi_handle_reject or __iscsi_complete_pdu
than the forward lock is released and the backward lock is taken for the
duration of iscsi_send_nopout, later the backward lock is released and the
forward lock is retaken.libiscsi_tcp uses two kernel fifos the r2t pool and the r2t queue.
The insertion and deletion from these queues didn't corespond to the
assumption taken by the new forward/backwards session locking paradigm.That is, in iscsi_tcp_clenup_task which belongs to the RX (backwards)
path, r2t is taken out from r2t queue and inserted to the r2t pool.
In iscsi_tcp_get_curr_r2t which belong to the TX (forward) path, r2t
is also inserted to the r2t pool and another r2t is pulled from r2t
queue.Only in iscsi_tcp_r2t_rsp which is called in the RX path but can requeue
to the TX path, r2t is taken from the r2t pool and inserted to the r2t
queue.In order to cope with this situation, two spin locks were added,
pool2queue and queue2pool. The former protects extracting from the
r2t pool and inserting to the r2t queue, and the later protects the
extracing from the r2t queue and inserting to the r2t pool.Signed-off-by: Shlomo Pongratz
Signed-off-by: Or Gerlitz
[minor fix up to apply cleanly and compile fix]
Signed-off-by: Mike Christie
Signed-off-by: James Bottomley -
Signed-off-by: Vikas Chaudhary
Signed-off-by: James Bottomley -
Fix following sparse warnings:-
drivers/scsi/qla4xxx/ql4_os.c:2109:33: warning: cast truncates bits from constant value (ffff7fff becomes 7fff)
drivers/scsi/qla4xxx/ql4_os.c:2306:33: warning: cast truncates bits from constant value (ffff7fff becomes 7fff)Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley -
Signed-off-by: Nilesh Javali
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley -
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley -
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley -
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley -
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley -
Removing unused code as FW does not need any value in mbox-5.
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley -
Issue:
While unloading driver MBOX 0x31 fail as DDB logout (MBOX 0x56)
operation is not completed.Fix:
Wait for DDB Logout completion before MBOX 0x31Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley -
Issue:
Driver holds rom-lock for too long during reset recovery.During adapter reset testing, it was found that the driver
holds the rom-lock for too long, because of which other
drivers fail to acquire the rom-lock, leading to reset
failures.
The primary cause is, in the bootstrap code, while
holding the rom-lock, the driver checks if the peg is
halted, causing a 2 second contention.Fix:
When a reset recovery starts, the driver deduces the cause, and
sets appropriate flags in watchdog & recover_adapter routines.
This flag should be used to determine if bootstrap is invoked
from probe or reset context, reducing the rom-lock footprint of
the drivers.Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley