summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* qla2xxx: Fix indentationBart Van Assche2015-06-135-15/+14Star
| | | | | | | | Detected by smatch. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Acked-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* qla2xxx: Comment out unreachable codeBart Van Assche2015-06-132-8/+15
| | | | | | | | | | Comment out the code that is never reached in qla83xx_idc_unlock() and also in qlt_set_data_offset() to avoid that static source code analysis tools report warnings for this code. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Acked-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* fusion: remove dead MTRR codeLuis R. Rodriguez2015-06-132-25/+0Star
| | | | | | | | | | | | | | | | | | | | | | | If and when this gets enabled the driver could should split up IO memory space properly and that is quite a bit of work. Just remove the uncommented dead MTRR code then. There are a few motivations for this: a) Take advantage of PAT when available b) Help bury MTRR code away, MTRR is architecture specific and on x86 its replaced by PAT c) Help with the goal of eventually using _PAGE_CACHE_UC over _PAGE_CACHE_UC_MINUS on x86 on ioremap_nocache() (see commit de33c442e titled "x86 PAT: fix performance drop for glx, use UC minus for ioremap(), ioremap_nocache() and pci_mmap_page_range()") Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com> Acked-by: Sreekanth Reddy <ureekanth.reddy@avagotech.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* advansys: fix compilation errors and warnings when CONFIG_PCI is not setJohannes Thumshirn2015-06-131-1/+4
| | | | | | | | | | Fix compilation errors on forgotten #include <linux/dmapool.h> and warnings when CONFIG_PCI is not set. Reported-by: Jim Davis <jim.epost@gmail.com> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* mptsas: fix depth param in scsi_track_queue_fullTomas Henzl2015-06-131-2/+2
| | | | | | | | | | | A user of scsi_track_queue_full should pass to the function a constant value untill the queue-depth changes, otherwise the internal logic in scsi_track_queue_full rejects the change. Other users of this function use a 'sdev->queue_depth - 1' as depth parameter, let's do the same. Signed-off-by: Tomas Henzl <thenzl@redhat.com> Acked-by: "Sreekanth Reddy" <Sreekanth.reddy@avagotech.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* megaraid: fix irq setup process regressionTomas Henzl2015-06-131-16/+14Star
| | | | | | | | | | | | | | | | This fixes a regression caused by commit d3557fc8be11d25f316884581f487684f8e7dad3 megaraid_sas : Add separate function for setting up IRQs This makes boot end with 'root does not exist' message on certain adapters. The bug is that the driver does not setup ints for cards without msi-x support. This patch fixes it, in addition to that it moves tasklet initialisation before enable_intr, otherwise a kernel panic may occur, when an interrupt arrives before the tasklet is ready. Signed-off-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: Update version to 10.7.0.0 for upstream patch set.James Smart2015-06-131-1/+1
| | | | | | | Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: Fix to drop PLOGIs from fabric node till LOGO processing completesJames Smart2015-06-134-15/+16
| | | | | | | | | | | | | | | The domain controller PLOGI's concurrent with prior LOGO's/unreg_rpi's completing created a race condition where driver rpi ref count can inadvertantly hit 0 and the rpi attempted to be freed. This error sometimes resulted in Warning messages indicating kref.h via lfpc_nlp_get+0x128. Correct by dropping any new PLOGI until the prior nport state has settled. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: Fix scsi task management error message.James Smart2015-06-131-8/+10
| | | | | | | | | | | | TMF's were getting error messages on FCP_RSP errors (underrun). Underruns aren't meaningful in the scenario. Change the error message to filter out these response check errors, and don't unconditionally mark the cmd as in error. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: Fix cq_id masking problem.James Smart2015-06-131-1/+1
| | | | | | | | | | | | The driver inadvertainly constrained the id space to 8 bits, when its a full 16 bits from hw. This resulted in bad id's being written to the hardware. Resulted in symptoms such as incomplete initialization, no detection of link events, etc. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: Fix scsi prep dma buf error.James Smart2015-06-131-1/+1
| | | | | | | | | | Didn't check for less-than-or-equal zero. Means we may later call scsi_dma_unmap() even though we don't have valid mappings. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: Add support for using block multi-queueJames Smart2015-06-134-52/+72
| | | | | | | | | | | | | | | With blk-mq support in the mid-layer, lpfc can do IO steering based on the information in the request tag. This patch allows lpfc to use blk-mq if enabled. If not enabled, we fall back into the emulex-internal affinity mappings. This feature can be turned on via CONFIG_SCSI_MQ_DEFAULT or passing scsi_mod.use_blk_mq=Y as a parameter to the kernel. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: Devices are not discovered during takeaway/giveback testingJames Smart2015-06-131-12/+10Star
| | | | | | | | | | | | | When a remote nport changes it's DID, a new ndlp is used. However, we left the old ndlp state unchanged and still in a discovery state. The may stall discovery resulting in some devices not being discovered. Correct by swapping the state of the 2 ndlp's when a DID swap is detected. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: Fix vport deletion failure.James Smart2015-06-131-0/+2
| | | | | | | | | | | If a vport was deleted while in the middle of discovery, we weren't clearing the nport discovery flag. Correct by clearing the flag and cancelling our discovery timeout timer. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: Check for active portpeerbeacon.James Smart2015-06-132-4/+21
| | | | | | | | | | | | | | LCB requests to set Beacon would fail if the beacon was already enabled internally as the mailbox command used to query the state failes with an already-set status. Correct by enhancing the check so we don't fail if if the already set status comes back. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: Update driver version for upstream patch set 10.6.0.1.James Smart2015-06-061-1/+1
| | | | | | | Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: Change buffer pool empty message to miscellaneous categoryJames Smart2015-06-061-1/+1
| | | | | | | Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: Fix incorrect log message reported for empty FCF record.James Smart2015-06-061-2/+4
| | | | | | | Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: Fix rport leak.James Smart2015-06-063-82/+79Star
| | | | | | | | Correct locking and refcounting in tracking our rports Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: Correct loss of RSCNs during array takeaway/giveback testing.James Smart2015-06-061-5/+7
| | | | | | | Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: Fix crash in vport_delete.James Smart2015-06-063-6/+19
| | | | | | | | | | We inadvertantly took the path to recreate the vport while in a driver teardown path Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: Fix to remove IRQF_SHARED flag for MSI/MSI-X vectors.James Smart2015-06-061-6/+6
| | | | | | | Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: Fix discovery issue when changing from Pt2Pt to Fabric.James Smart2015-06-061-1/+11
| | | | | | | Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: Correct reporting of vport state on fdisc command failure.James Smart2015-06-061-1/+2
| | | | | | | Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: Add support for RDP ELS command.James Smart2015-06-067-0/+955
| | | | | | | Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: Fix ABORTs WQ selection in terminate_rport_ioJames Smart2015-06-061-11/+21
| | | | | | | Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: Correct reference counting of rportJames Smart2015-06-061-1/+2
| | | | | | | Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: Add support for ELS LCB.James Smart2015-06-066-6/+306
| | | | | | | | | Also has a little whitespace fixing. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: Correct loss of target discovery after cable swap.James Smart2015-06-061-2/+2
| | | | | | | | | Fix incorrect reference counting Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* lpfc: The lpfc driver does not issue RFF_ID and RFT_ID in the correct sequenceJames Smart2015-06-061-1/+1
| | | | | | | | | | | | | | | | | | The order (it's a shall, but hard to dictate after the fact) is given in FC-SCM - kind of. SCM indicates what shall be implemented, lists it as (a), (b), (c), but actually doesn't say it has to be in that order. The only hard requirement, called out in FCP-4, is that you must register your FC-4 Type (via RFT_ID) before registering FC-4 Type Features (via RFF_ID), which makes sense. We obviously violated this and there were some switches (or newer fw in them) that enforced it. The other rule of thumbs are: register your data with the switch first, then register for SCRs, then do queries about the fabric, with the SCRs telling you of changes post the queries. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Sebastian Herbszt <herbszt@gmx.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* target: explicitly include scsi_proto.h in target_core_fabric_lib.cStephen Rothwell2015-06-041-0/+2
| | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Nicholas A. Bellinger <nab@linux-iscsi.org> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* iscsi: Fix iscsi endpoints leakSagi Grimberg2015-06-031-0/+2
| | | | | | | | | | | | | When creating a new endpoint, we look for a free id for the new endpoint. We baisically loop on possible ids and use the first id that class_find_device() returns NULL. However, we are missing a reference put when class_find_device() does find an existing device for a given id. Reported-by: Alex Lyakas <alex@zadarastorage.com> Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* ips: remove pointless #warningJames Bottomley2015-06-031-4/+5
| | | | | | | | | | non-x86 builds want the #warning in the IPS code about compiling on the wrong architecture removed because it keeps triggering on their platforms build farms. Transform from a compile time warning into a runtime one with taint to preserve the original intent of the authors. Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* bnx2i: Fix call trace while device resetNilesh Javali2015-06-031-0/+2
| | | | | | | | | | | | The driver waits for command completion event while cleanup of task within the frwd lock and back locks. The frwd lock was still held which caused the call trace while issuing a device reset. Release the frwd lock along with the back lock to avoid waiting in the lock context. Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* bnx2i: Fixed firmware assert, during target logout.Tej Parkash2015-06-031-1/+2
| | | | | | | | | | | Fix the firmware assert, during target logout in case driver received FIN from target before waiting for asyncronous response. Signed-off-by: Tej Parkash <tej.parkash@qlogic.com> Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* scsi: ufs-qcom: enable UFSHCD_QUIRK_BROKEN_UFS_HCI_VERSIONYaniv Gardi2015-06-021-0/+12
| | | | | | | | | | | | Newer revisions of QUALCOMM Technologies UFS host controller may not advertise the correct version information in UFS HCI VER register. To handle this, enable UFSHCD_QUIRK_BROKEN_UFS_HCI_VERSION to let UFS standard host controller driver call into vendor specific operation to get right UFS HCI VER register value. Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org> Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* scsi: ufs: add quirk to handle broken UFS HCI versionYaniv Gardi2015-06-023-2/+18
| | | | | | | | | | | Some host controller hardware controllers may not advertise correct version in UFS HCI VER register. To workaround this, add new quirk and call the host controller hardware vendor specific callback to get the correct UFS HCI version register value. Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org> Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* scsi: ufs-qcom: enable UFSHCD_QUIRK_DME_PEER_ACCESS_AUTO_MODE quirkYaniv Gardi2015-06-021-1/+3
| | | | | | | | | | Current version of host controller on QUALCOMM Technologies requires this quirk to be enabled, as DME commands to device must be sent only in AUTO mode (SLOW AUTO or FAST AUTO). Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org> Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* scsi: ufs: introduce UFSHCD_QUIRK_DME_PEER_ACCESS_AUTO_MODE quirkYaniv Gardi2015-06-022-0/+38
| | | | | | | | | | Some UFS host controllers may only allow accessing the peer DME attribute in AUTO mode (FAST AUTO or SLOW AUTO) hence we had added a quirk for switching to AUTO power mode before accessing the peer DME attribute. Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org> Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* scsi: ufs-qcom: enable quirk to fix gear change to HSYaniv Gardi2015-06-021-2/+4
| | | | | | | | | | | | With the G3 UFS devices, changing gear into HS is failing in UFS host controllers of version 0x2. The quirk solves the problem of changing gear into HS by enabling the attribute that specifies whether or not the inbound Link supports unterminated line in HS mode. Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org> Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* scsi: ufs: introduce a broken PA_RXHSUNTERMCAP quirkYaniv Gardi2015-06-022-0/+18
| | | | | | | | | | The attribute PA_RXHSUNTERMCAP specifies whether or not the inbound Link supports unterminated line in HS mode. enabling this attribute to 1 fixes moving to HS gear. Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org> Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* scsi: ufs-qcom: enable UFSHCD_QUIRK_BROKEN_LCCYaniv Gardi2015-06-021-0/+2
| | | | | | | | | | | | LCC (Line Control Command) are being used for communication between UFS host and UFS device. But UFS host controller on QUALCOMM Technologies have an issue with issuing the LCC commands to UFS device and hence this quirk is enabled in order to to disable LCC from the host side. Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org> Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* scsi: ufs: provide a quirk to disable the LCCYaniv Gardi2015-06-023-0/+53
| | | | | | | | | | | | LCC (Line Control Command) are being used for communication between UFS host and UFS device. New commercial UFS devices don't have the issues with LCC processing but UFS host controller might still have the issue with LCC processing, hence, added a routine to disable TX LCC on the device. Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org> Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* scsi: ufs-qcom: don't enable interrupt aggregationYaniv Gardi2015-06-021-1/+16
| | | | | | | | | | | | | Current versions of UFS host controllers on QUALCOMM Technologies have interrupt aggregation logic broken. Interrupt aggregation may not work if both threshold count and timeout is enabled. Hence disable interrupt aggregation by enabling UFSHCD_QUIRK_BROKEN_INTR_AGGR quirk until its fixed in the newer UFS host controller revisions. Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org> Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* scsi: ufs: introduce the capability and quirk for interrupt aggregationYaniv Gardi2015-06-022-4/+36
| | | | | | | | | | | | | | | UFS HCI (Host Controller Interface) allows the transfer requests interrupts to be aggregated to generate the single interrupt but this can impact the performance. Hence introduce the capability which gives choice to use the interrupt aggregation capability or not. By default interrupt aggregation capability is kept disabled. This change also introduces a quirk for broken interrupt aggregation feature, as in some UFS controllers, this feature may not work. Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org> Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* ipr: Increase default adapter init stage change timeoutBrian King2015-06-021-1/+1
| | | | | | | | | | | Increase the default init stage change timeout from 15 seconds to 30 seconds. This resolves issues we have seen with some adapters not transitioning to the first init stage within 15 seconds, which results in adapter initialization failures. Cc: <stable@vger.kernel.org> Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* st: implement tape statisticsSeymour, Shane M2015-06-024-1/+461
| | | | | | | | | | | | | | | | | | | | | | This patch implements tape statistics in the st module via sysfs. Current no statistics are available for tape I/O and there is no easy way to reuse the block layer statistics for tape as tape is a character device and does not have perform I/O in sector sized chunks (the size of the data written to tape can change). For tapes we also need extra stats related to things like tape movement (via other I/O). There have been multiple end users requesting statistics including AT&T (and some HP customers who have not given permission to be named). It is impossible for them to investigate any issues related to tape performance in a non-invasive way. [jejb: eliminate PRId64] Signed-off-by: Shane Seymour <shane.seymour@hp.com> Tested-by: Shane Seymour <shane.seymour@hp.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* target: Minimize SCSI header #include directivesBart Van Assche2015-06-0236-74/+32Star
| | | | | | | | | | | | | | | | | | | | | | Only include SCSI initiator header files in target code that needs these header files, namely the SCSI pass-through code and the tcm_loop driver. Change SCSI_SENSE_BUFFERSIZE into TRANSPORT_SENSE_BUFFER in target code because the former is intended for initiator code and the latter for target code. With this patch the only initiator include directives in target code that remain are as follows: $ git grep -nHE 'include .scsi/(scsi.h|scsi_host.h|scsi_device.h|scsi_cmnd.h)' drivers/target drivers/infiniband/ulp/{isert,srpt} drivers/usb/gadget/legacy/tcm_*.[ch] drivers/{vhost,xen} include/{target,trace/events/target.h} drivers/target/loopback/tcm_loop.c:29:#include <scsi/scsi.h> drivers/target/loopback/tcm_loop.c:31:#include <scsi/scsi_host.h> drivers/target/loopback/tcm_loop.c:32:#include <scsi/scsi_device.h> drivers/target/loopback/tcm_loop.c:33:#include <scsi/scsi_cmnd.h> drivers/target/target_core_pscsi.c:39:#include <scsi/scsi_device.h> drivers/target/target_core_pscsi.c:40:#include <scsi/scsi_host.h> drivers/xen/xen-scsiback.c:52:#include <scsi/scsi_host.h> /* SG_ALL */ Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* target: Correct a commentBart Van Assche2015-06-021-10/+2Star
| | | | | | | | | | | | | Correct the comment above the definition of TCM_MAX_COMMAND_SIZE. A quote from Christoph: There aren't any legacy issues, we just decided to handle > 16 byte CDBs in the slow path. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* Move code that is used both by initiator and target driversBart Van Assche2015-06-019-223/+244
| | | | | | | | | | | | Move the functions that are used by both the initiator and target subsystems into scsi_common.c/.h. This change will allow to remove the initiator SCSI header include directives from most SCSI target source files in a later patch. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>