Skip to content

Commit

Permalink
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/jejb/scsi

Pull SCSI updates from James Bottomley:
 "This is the usual grab bag of driver updates (lpfc, hpsa,
  megaraid_sas, cxgbi, be2iscsi) plus an assortment of minor updates.

  There is also one new driver: the Cisco snic.  The advansys driver has
  been rewritten to get rid of the warning about converting it to the
  DMA API, the tape statistics patch got in and finally, there's a
  resuffle of SCSI header files to separate more cleanly initiator from
  target mode (and better share the common definitions)"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (156 commits)
  snic: driver for Cisco SCSI HBA
  qla2xxx: Fix indentation
  qla2xxx: Comment out unreachable code
  fusion: remove dead MTRR code
  advansys: fix compilation errors and warnings when CONFIG_PCI is not set
  mptsas: fix depth param in scsi_track_queue_full
  megaraid: fix irq setup process regression
  lpfc: Update version to 10.7.0.0 for upstream patch set.
  lpfc: Fix to drop PLOGIs from fabric node till LOGO processing completes
  lpfc: Fix scsi task management error message.
  lpfc: Fix cq_id masking problem.
  lpfc: Fix scsi prep dma buf error.
  lpfc: Add support for using block multi-queue
  lpfc: Devices are not discovered during takeaway/giveback testing
  lpfc: Fix vport deletion failure.
  lpfc: Check for active portpeerbeacon.
  lpfc: Update driver version for upstream patch set 10.6.0.1.
  lpfc: Change buffer pool empty message to miscellaneous category
  lpfc: Fix incorrect log message reported for empty FCF record.
  lpfc: Fix rport leak.
  ...
  • Loading branch information
torvalds committed Jun 23, 2015
2 parents f9d1b5a + c8806b6 commit acd5312
Show file tree
Hide file tree
Showing 187 changed files with 16,789 additions and 3,735 deletions.
109 changes: 109 additions & 0 deletions Documentation/ABI/testing/sysfs-class-scsi_tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
What: /sys/class/scsi_tape/*/stats/in_flight
Date: Apr 2015
KernelVersion: 4.2
Contact: Shane Seymour <[email protected]>
Description:
Show the number of I/Os currently in-flight between the st
module and the SCSI mid-layer.
Users:


What: /sys/class/scsi_tape/*/stats/io_ns
Date: Apr 2015
KernelVersion: 4.2
Contact: Shane Seymour <[email protected]>
Description:
Shows the total amount of time spent waiting for all I/O
to and from the tape drive to complete. This includes all
reads, writes, and other SCSI commands issued to the tape
drive. An example of other SCSI commands would be tape
movement such as a rewind when a rewind tape device is
closed. This item is measured in nanoseconds.

To determine the amount of time spent waiting for other I/O
to complete subtract read_ns and write_ns from this value.
Users:


What: /sys/class/scsi_tape/*/stats/other_cnt
Date: Apr 2015
KernelVersion: 4.2
Contact: Shane Seymour <[email protected]>
Description:
The number of I/O requests issued to the tape drive other
than SCSI read/write requests.
Users:


What: /sys/class/scsi_tape/*/stats/read_byte_cnt
Date: Apr 2015
KernelVersion: 4.2
Contact: Shane Seymour <[email protected]>
Description:
Shows the total number of bytes requested from the tape drive.
This value is presented in bytes because tape drives support
variable length block sizes.
Users:


What: /sys/class/scsi_tape/*/stats/read_cnt
Date: Apr 2015
KernelVersion: 4.2
Contact: Shane Seymour <[email protected]>
Description:
Shows the total number of read requests issued to the tape
drive.
Users:


What: /sys/class/scsi_tape/*/stats/read_ns
Date: Apr 2015
KernelVersion: 4.2
Contact: Shane Seymour <[email protected]>
Description:
Shows the total amount of time in nanoseconds waiting for
read I/O requests to complete.
Users:


What: /sys/class/scsi_tape/*/stats/write_byte_cnt
Date: Apr 2015
KernelVersion: 4.2
Contact: Shane Seymour <[email protected]>
Description:
Shows the total number of bytes written to the tape drive.
This value is presented in bytes because tape drives support
variable length block sizes.
Users:


What: /sys/class/scsi_tape/*/stats/write_cnt
Date: Apr 2015
KernelVersion: 4.2
Contact: Shane Seymour <[email protected]>
Description:
Shows the total number of write requests issued to the tape
drive.
Users:


What: /sys/class/scsi_tape/*/stats/write_ms
Date: Apr 2015
KernelVersion: 4.2
Contact: Shane Seymour <[email protected]>
Description:
Shows the total amount of time in nanoseconds waiting for
write I/O requests to complete.
Users:


What: /sys/class/scsi_tape/*/stats/resid_cnt
Date: Apr 2015
KernelVersion: 4.2
Contact: Shane Seymour <[email protected]>
Description:
Shows the number of times we found that a residual >0
was found when the SCSI midlayer indicated that there was
an error. For reads this may be a case of someone issuing
reads greater than the block size.
Users:
59 changes: 59 additions & 0 deletions Documentation/scsi/st.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,65 @@ A link named 'tape' is made from the SCSI device directory to the class
directory corresponding to the mode 0 auto-rewind device (e.g., st0).


SYSFS AND STATISTICS FOR TAPE DEVICES

The st driver maintains statistics for tape drives inside the sysfs filesystem.
The following method can be used to locate the statistics that are
available (assuming that sysfs is mounted at /sys):

1. Use opendir(3) on the directory /sys/class/scsi_tape
2. Use readdir(3) to read the directory contents
3. Use regcomp(3)/regexec(3) to match directory entries to the extended
regular expression "^st[0-9]+$"
4. Access the statistics from the /sys/class/scsi_tape/<match>/stats
directory (where <match> is a directory entry from /sys/class/scsi_tape
that matched the extended regular expression)

The reason for using this approach is that all the character devices
pointing to the same tape drive use the same statistics. That means
that st0 would have the same statistics as nst0.

The directory contains the following statistics files:

1. in_flight - The number of I/Os currently outstanding to this device.
2. io_ns - The amount of time spent waiting (in nanoseconds) for all I/O
to complete (including read and write). This includes tape movement
commands such as seeking between file or set marks and implicit tape
movement such as when rewind on close tape devices are used.
3. other_cnt - The number of I/Os issued to the tape drive other than read or
write commands. The time taken to complete these commands uses the
following calculation io_ms-read_ms-write_ms.
4. read_byte_cnt - The number of bytes read from the tape drive.
5. read_cnt - The number of read requests issued to the tape drive.
6. read_ns - The amount of time (in nanoseconds) spent waiting for read
requests to complete.
7. write_byte_cnt - The number of bytes written to the tape drive.
8. write_cnt - The number of write requests issued to the tape drive.
9. write_ns - The amount of time (in nanoseconds) spent waiting for write
requests to complete.
10. resid_cnt - The number of times during a read or write we found
the residual amount to be non-zero. This should mean that a program
is issuing a read larger thean the block size on tape. For write
not all data made it to tape.

Note: The in_flight value is incremented when an I/O starts the I/O
itself is not added to the statistics until it completes.

The total of read_cnt, write_cnt, and other_cnt may not total to the same
value as iodone_cnt at the device level. The tape statistics only count
I/O issued via the st module.

When read the statistics may not be temporally consistent while I/O is in
progress. The individual values are read and written to atomically however
when reading them back via sysfs they may be in the process of being
updated when starting an I/O or when it is completed.

The value shown in in_flight is incremented before any statstics are
updated and decremented when an I/O completes after updating statistics.
The value of in_flight is 0 when there are no I/Os outstanding that are
issued by the st driver. Tape statistics do not take into account any
I/O performed via the sg device.

BSD AND SYS V SEMANTICS

The user can choose between these two behaviours of the tape driver by
Expand Down
7 changes: 2 additions & 5 deletions Documentation/target/tcm_mod_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,11 +503,8 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
buf += "#include <linux/string.h>\n"
buf += "#include <linux/ctype.h>\n"
buf += "#include <asm/unaligned.h>\n"
buf += "#include <scsi/scsi.h>\n"
buf += "#include <scsi/scsi_host.h>\n"
buf += "#include <scsi/scsi_device.h>\n"
buf += "#include <scsi/scsi_cmnd.h>\n"
buf += "#include <scsi/libfc.h>\n\n"
buf += "#include <scsi/scsi_common.h>\n"
buf += "#include <scsi/scsi_proto.h>\n"
buf += "#include <target/target_core_base.h>\n"
buf += "#include <target/target_core_fabric.h>\n"
buf += "#include <target/target_core_configfs.h>\n\n"
Expand Down
8 changes: 8 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ F: drivers/input/misc/adxl34x.c

ADVANSYS SCSI DRIVER
M: Matthew Wilcox <[email protected]>
M: Hannes Reinecke <[email protected]>
L: [email protected]
S: Maintained
F: Documentation/scsi/advansys.txt
Expand Down Expand Up @@ -2610,6 +2611,13 @@ L: [email protected]
S: Supported
F: drivers/scsi/fnic/

CISCO SCSI HBA DRIVER
M: Narsimhulu Musini <[email protected]>
M: Sesidhar Baddela <[email protected]>
L: [email protected]
S: Supported
F: drivers/scsi/snic/

CMPC ACPI DRIVER
M: Thadeu Lima de Souza Cascardo <[email protected]>
M: Daniel Oliveira Nascimento <[email protected]>
Expand Down
27 changes: 21 additions & 6 deletions drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ static struct board_type products[] = {
{0x3214103C, "Smart Array E200i", &SA5_access},
{0x3215103C, "Smart Array E200i", &SA5_access},
{0x3237103C, "Smart Array E500", &SA5_access},
{0x3223103C, "Smart Array P800", &SA5_access},
{0x3234103C, "Smart Array P400", &SA5_access},
{0x323D103C, "Smart Array P700m", &SA5_access},
};

Expand Down Expand Up @@ -574,8 +572,6 @@ static void cciss_procinit(ctlr_info_t *h)

/* List of controllers which cannot be hard reset on kexec with reset_devices */
static u32 unresettable_controller[] = {
0x324a103C, /* Smart Array P712m */
0x324b103C, /* SmartArray P711m */
0x3223103C, /* Smart Array P800 */
0x3234103C, /* Smart Array P400 */
0x3235103C, /* Smart Array P400i */
Expand All @@ -586,12 +582,32 @@ static u32 unresettable_controller[] = {
0x3215103C, /* Smart Array E200i */
0x3237103C, /* Smart Array E500 */
0x323D103C, /* Smart Array P700m */
0x40800E11, /* Smart Array 5i */
0x409C0E11, /* Smart Array 6400 */
0x409D0E11, /* Smart Array 6400 EM */
0x40700E11, /* Smart Array 5300 */
0x40820E11, /* Smart Array 532 */
0x40830E11, /* Smart Array 5312 */
0x409A0E11, /* Smart Array 641 */
0x409B0E11, /* Smart Array 642 */
0x40910E11, /* Smart Array 6i */
};

/* List of controllers which cannot even be soft reset */
static u32 soft_unresettable_controller[] = {
0x40800E11, /* Smart Array 5i */
0x40700E11, /* Smart Array 5300 */
0x40820E11, /* Smart Array 532 */
0x40830E11, /* Smart Array 5312 */
0x409A0E11, /* Smart Array 641 */
0x409B0E11, /* Smart Array 642 */
0x40910E11, /* Smart Array 6i */
/* Exclude 640x boards. These are two pci devices in one slot
* which share a battery backed cache module. One controls the
* cache, the other accesses the cache through the one that controls
* it. If we reset the one controlling the cache, the other will
* likely not be happy. Just forbid resetting this conjoined mess.
*/
0x409C0E11, /* Smart Array 6400 */
0x409D0E11, /* Smart Array 6400 EM */
};
Expand Down Expand Up @@ -4667,8 +4683,7 @@ static int cciss_kdump_hard_reset_controller(struct pci_dev *pdev)
*/
cciss_lookup_board_id(pdev, &board_id);
if (!ctlr_is_resettable(board_id)) {
dev_warn(&pdev->dev, "Cannot reset Smart Array 640x "
"due to shared cache module.");
dev_warn(&pdev->dev, "Controller not resettable\n");
return -ENODEV;
}

Expand Down
1 change: 0 additions & 1 deletion drivers/block/cciss_scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ static struct scsi_host_template cciss_driver_template = {
.show_info = cciss_scsi_show_info,
.queuecommand = cciss_scsi_queue_command,
.this_id = 7,
.cmd_per_lun = 1,
.use_clustering = DISABLE_CLUSTERING,
/* Can't have eh_bus_reset_handler or eh_host_reset_handler for cciss */
.eh_device_reset_handler= cciss_eh_device_reset_handler,
Expand Down
1 change: 0 additions & 1 deletion drivers/firewire/sbp2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1611,7 +1611,6 @@ static struct scsi_host_template scsi_driver_template = {
.this_id = -1,
.sg_tablesize = SG_ALL,
.use_clustering = ENABLE_CLUSTERING,
.cmd_per_lun = 1,
.can_queue = 1,
.sdev_attrs = sbp2_scsi_sysfs_attrs,
};
Expand Down
1 change: 1 addition & 0 deletions drivers/infiniband/ulp/srpt/ib_srpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include <linux/string.h>
#include <linux/delay.h>
#include <linux/atomic.h>
#include <scsi/scsi_proto.h>
#include <scsi/scsi_tcq.h>
#include <target/configfs_macros.h>
#include <target/target_core_base.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/infiniband/ulp/srpt/ib_srpt.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ struct srpt_send_ioctx {
u8 n_rdma;
u8 n_rbuf;
bool queue_status_only;
u8 sense_data[SCSI_SENSE_BUFFERSIZE];
u8 sense_data[TRANSPORT_SENSE_BUFFER];
};

/**
Expand Down
24 changes: 0 additions & 24 deletions drivers/message/fusion/mptbase.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@
#include <linux/delay.h>
#include <linux/interrupt.h> /* needed for in_interrupt() proto */
#include <linux/dma-mapping.h>
#include <asm/io.h>
#ifdef CONFIG_MTRR
#include <asm/mtrr.h>
#endif
#include <linux/kthread.h>
#include <scsi/scsi_host.h>

Expand Down Expand Up @@ -2820,13 +2816,6 @@ mpt_adapter_dispose(MPT_ADAPTER *ioc)
pci_disable_device(ioc->pcidev);
pci_release_selected_regions(ioc->pcidev, ioc->bars);

#if defined(CONFIG_MTRR) && 0
if (ioc->mtrr_reg > 0) {
mtrr_del(ioc->mtrr_reg, 0, 0);
dprintk(ioc, printk(MYIOC_s_INFO_FMT "MTRR region de-registered\n", ioc->name));
}
#endif

/* Zap the adapter lookup ptr! */
list_del(&ioc->list);

Expand Down Expand Up @@ -4512,19 +4501,6 @@ PrimeIocFifos(MPT_ADAPTER *ioc)

ioc->req_frames_low_dma = (u32) (alloc_dma & 0xFFFFFFFF);

#if defined(CONFIG_MTRR) && 0
/*
* Enable Write Combining MTRR for IOC's memory region.
* (at least as much as we can; "size and base must be
* multiples of 4 kiB"
*/
ioc->mtrr_reg = mtrr_add(ioc->req_frames_dma,
sz,
MTRR_TYPE_WRCOMB, 1);
dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "MTRR region registered (base:size=%08x:%x)\n",
ioc->name, ioc->req_frames_dma, sz));
#endif

for (i = 0; i < ioc->req_depth; i++) {
alloc_dma += ioc->req_sz;
mem += ioc->req_sz;
Expand Down
1 change: 0 additions & 1 deletion drivers/message/fusion/mptbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,6 @@ typedef struct _MPT_ADAPTER
u8 *HostPageBuffer; /* SAS - host page buffer support */
u32 HostPageBuffer_sz;
dma_addr_t HostPageBuffer_dma;
int mtrr_reg;
struct pci_dev *pcidev; /* struct pci_dev pointer */
int bars; /* bitmask of BAR's that must be configured */
int msi_enable;
Expand Down
4 changes: 2 additions & 2 deletions drivers/message/fusion/mptsas.c
Original file line number Diff line number Diff line change
Expand Up @@ -4090,7 +4090,7 @@ mptsas_handle_queue_full_event(struct fw_event_work *fw_event)
continue;
}
depth = scsi_track_queue_full(sdev,
current_depth - 1);
sdev->queue_depth - 1);
if (depth > 0)
sdev_printk(KERN_INFO, sdev,
"Queue depth reduced to (%d)\n",
Expand All @@ -4100,7 +4100,7 @@ mptsas_handle_queue_full_event(struct fw_event_work *fw_event)
"Tagged Command Queueing is being "
"disabled\n");
else if (depth == 0)
sdev_printk(KERN_INFO, sdev,
sdev_printk(KERN_DEBUG, sdev,
"Queue depth not changed yet\n");
}
}
Expand Down
1 change: 0 additions & 1 deletion drivers/s390/scsi/zfcp_scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ static struct scsi_host_template zfcp_scsi_host_template = {
* ZFCP_QDIO_MAX_SBALS_PER_REQ) - 2) * 8,
/* GCD, adjusted later */
.dma_boundary = ZFCP_QDIO_SBALE_LEN - 1,
.cmd_per_lun = 1,
.use_clustering = 1,
.shost_attrs = zfcp_sysfs_shost_attrs,
.sdev_attrs = zfcp_sysfs_sdev_attrs,
Expand Down
Loading

0 comments on commit acd5312

Please sign in to comment.