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 consists of the usual driver updates (ufs, qla2xxx, smartpqi,
  target, zfcp, fnic, mpt3sas, ibmvfc) plus a load of cleanups, a major
  power management rework and a load of assorted minor updates.

  There are a few core updates (formatting fixes being the big one) but
  nothing major this cycle"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (279 commits)
  scsi: mpt3sas: Update driver version to 36.100.00.00
  scsi: mpt3sas: Handle trigger page after firmware update
  scsi: mpt3sas: Add persistent MPI trigger page
  scsi: mpt3sas: Add persistent SCSI sense trigger page
  scsi: mpt3sas: Add persistent Event trigger page
  scsi: mpt3sas: Add persistent Master trigger page
  scsi: mpt3sas: Add persistent trigger pages support
  scsi: mpt3sas: Sync time periodically between driver and firmware
  scsi: qla2xxx: Update version to 10.02.00.104-k
  scsi: qla2xxx: Fix device loss on 4G and older HBAs
  scsi: qla2xxx: If fcport is undergoing deletion complete I/O with retry
  scsi: qla2xxx: Fix the call trace for flush workqueue
  scsi: qla2xxx: Fix flash update in 28XX adapters on big endian machines
  scsi: qla2xxx: Handle aborts correctly for port undergoing deletion
  scsi: qla2xxx: Fix N2N and NVMe connect retry failure
  scsi: qla2xxx: Fix FW initialization error on big endian machines
  scsi: qla2xxx: Fix crash during driver load on big endian machines
  scsi: qla2xxx: Fix compilation issue in PPC systems
  scsi: qla2xxx: Don't check for fw_started while posting NVMe command
  scsi: qla2xxx: Tear down session if FW say it is down
  ...
  • Loading branch information
torvalds committed Dec 16, 2020
2 parents 69f637c + be1b500 commit 60f7c50
Show file tree
Hide file tree
Showing 197 changed files with 11,890 additions and 8,122 deletions.
23 changes: 23 additions & 0 deletions Documentation/ABI/testing/sysfs-class-fc_host
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
What: /sys/class/fc_host/hostX/statistics/fpin_cn_yyy
Date: July 2020
Contact: Shyam Sundar <[email protected]>
Description:
These files contain the number of congestion notification
events recorded by the F_Port, reported using fabric
performance impact notification (FPIN) event.

What: /sys/class/fc_host/hostX/statistics/fpin_li_yyy
Date: July 2020
Contact: Shyam Sundar <[email protected]>
Description:
These files contain the number of link integrity error
events recorded by the F_Port/Nx_Port, reported using fabric
performance impact notification (FPIN) event.

What: /sys/class/fc_host/hostX/statistics/fpin_dn_yyy
Date: July 2020
Contact: Shyam Sundar <[email protected]>
Description:
These files contain the number of delivery related errors
recorded by the F_Port/Nx_Port, reported using fabric
performance impact notification (FPIN) event.
23 changes: 23 additions & 0 deletions Documentation/ABI/testing/sysfs-class-fc_remote_ports
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
What: /sys/class/fc_remote_ports/rport-X:Y-Z/statistics/fpin_cn_yyy
Date: July 2020
Contact: Shyam Sundar <[email protected]>
Description:
These files contain the number of congestion notification
events recorded by the F_Port/Nx_Port, reported using fabric
performance impact notification (FPIN) event.

What: /sys/class/fc_remote_ports/rport-X:Y-Z/statistics/fpin_li_yyy
Date: July 2020
Contact: Shyam Sundar <[email protected]>
Description:
These files contain the number of link integrity error
events recorded by the F_Port/Nx_Port, reported using fabric
performance impact notification (FPIN) event.

What: /sys/class/fc_remote_ports/rport-X:Y-Z/statistics/fpin_dn_yyy
Date: July 2020
Contact: Shyam Sundar <[email protected]>
Description:
These files contain the number of delivery related errors
recorded by the F_Port/Nx_Port, reported using fabric
performance impact notification (FPIN) event.
9 changes: 9 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -15780,6 +15780,15 @@ F: Documentation/scsi/st.rst
F: drivers/scsi/st.*
F: drivers/scsi/st_*.h

SCSI TARGET CORE USER DRIVER
M: Bodo Stroesser <[email protected]>
L: [email protected]
L: [email protected]
S: Supported
F: Documentation/target/tcmu-design.rst
F: drivers/target/target_core_user.c
F: include/uapi/linux/target_core_user.h

SCSI TARGET SUBSYSTEM
M: "Martin K. Petersen" <[email protected]>
L: [email protected]
Expand Down
2 changes: 1 addition & 1 deletion block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1404,7 +1404,7 @@ bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list,
break;
default:
errors++;
blk_mq_end_request(rq, BLK_STS_IOERR);
blk_mq_end_request(rq, ret);
}
} while (!list_empty(list));
out:
Expand Down
6 changes: 3 additions & 3 deletions drivers/infiniband/ulp/isert/ib_isert.c
Original file line number Diff line number Diff line change
Expand Up @@ -1528,12 +1528,12 @@ isert_check_pi_status(struct se_cmd *se_cmd, struct ib_mr *sig_mr)
}
sec_offset_err = mr_status.sig_err.sig_err_offset;
do_div(sec_offset_err, block_size);
se_cmd->bad_sector = sec_offset_err + se_cmd->t_task_lba;
se_cmd->sense_info = sec_offset_err + se_cmd->t_task_lba;

isert_err("PI error found type %d at sector 0x%llx "
"expected 0x%x vs actual 0x%x\n",
mr_status.sig_err.err_type,
(unsigned long long)se_cmd->bad_sector,
(unsigned long long)se_cmd->sense_info,
mr_status.sig_err.expected,
mr_status.sig_err.actual);
ret = 1;
Expand Down Expand Up @@ -2471,7 +2471,7 @@ isert_wait4cmds(struct iscsi_conn *conn)
isert_info("iscsi_conn %p\n", conn);

if (conn->sess) {
target_sess_cmd_list_set_waiting(conn->sess->se_sess);
target_stop_session(conn->sess->se_sess);
target_wait_for_sess_cmds(conn->sess->se_sess);
}
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/infiniband/ulp/srpt/ib_srpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2085,7 +2085,7 @@ static void srpt_release_channel_work(struct work_struct *w)
se_sess = ch->sess;
BUG_ON(!se_sess);

target_sess_cmd_list_set_waiting(se_sess);
target_stop_session(se_sess);
target_wait_for_sess_cmds(se_sess);

target_remove_session(se_sess);
Expand Down
15 changes: 2 additions & 13 deletions drivers/message/fusion/mptbase.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
#include <linux/kdev_t.h>
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <linux/interrupt.h> /* needed for in_interrupt() proto */
#include <linux/interrupt.h>
#include <linux/dma-mapping.h>
#include <linux/kthread.h>
#include <scsi/scsi_host.h>
Expand Down Expand Up @@ -473,7 +473,6 @@ mpt_turbo_reply(MPT_ADAPTER *ioc, u32 pa)
mpt_free_msg_frame(ioc, mf);
mb();
return;
break;
}
mr = (MPT_FRAME_HDR *) CAST_U32_TO_PTR(pa);
break;
Expand Down Expand Up @@ -6336,7 +6335,6 @@ SendEventAck(MPT_ADAPTER *ioc, EventNotificationReply_t *evnp)
* Page header is updated.
*
* Returns 0 for success
* -EPERM if not allowed due to ISR context
* -EAGAIN if no msg frames currently available
* -EFAULT for non-successful reply or no reply (timeout)
*/
Expand All @@ -6354,19 +6352,10 @@ mpt_config(MPT_ADAPTER *ioc, CONFIGPARMS *pCfg)
u8 page_type = 0, extend_page;
unsigned long timeleft;
unsigned long flags;
int in_isr;
u8 issue_hard_reset = 0;
u8 retry_count = 0;

/* Prevent calling wait_event() (below), if caller happens
* to be in ISR context, because that is fatal!
*/
in_isr = in_interrupt();
if (in_isr) {
dcprintk(ioc, printk(MYIOC_s_WARN_FMT "Config request not allowed in ISR context!\n",
ioc->name));
return -EPERM;
}
might_sleep();

/* don't send a config page during diag reset */
spin_lock_irqsave(&ioc->taskmgmt_lock, flags);
Expand Down
2 changes: 1 addition & 1 deletion drivers/message/fusion/mptfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#include <linux/kdev_t.h>
#include <linux/blkdev.h>
#include <linux/delay.h> /* for mdelay */
#include <linux/interrupt.h> /* needed for in_interrupt() proto */
#include <linux/interrupt.h>
#include <linux/reboot.h> /* notifier code */
#include <linux/workqueue.h>
#include <linux/sort.h>
Expand Down
45 changes: 35 additions & 10 deletions drivers/message/fusion/mptsas.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ mptsas_add_fw_event(MPT_ADAPTER *ioc, struct fw_event_work *fw_event,

spin_lock_irqsave(&ioc->fw_event_lock, flags);
list_add_tail(&fw_event->list, &ioc->fw_event_list);
fw_event->users = 1;
INIT_DELAYED_WORK(&fw_event->work, mptsas_firmware_event_work);
devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: add (fw_event=0x%p)"
"on cpuid %d\n", ioc->name, __func__,
Expand All @@ -314,17 +315,25 @@ mptsas_requeue_fw_event(MPT_ADAPTER *ioc, struct fw_event_work *fw_event,
spin_unlock_irqrestore(&ioc->fw_event_lock, flags);
}

static void __mptsas_free_fw_event(MPT_ADAPTER *ioc,
struct fw_event_work *fw_event)
{
devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: kfree (fw_event=0x%p)\n",
ioc->name, __func__, fw_event));
list_del(&fw_event->list);
kfree(fw_event);
}

/* free memory associated to a sas firmware event */
static void
mptsas_free_fw_event(MPT_ADAPTER *ioc, struct fw_event_work *fw_event)
{
unsigned long flags;

spin_lock_irqsave(&ioc->fw_event_lock, flags);
devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: kfree (fw_event=0x%p)\n",
ioc->name, __func__, fw_event));
list_del(&fw_event->list);
kfree(fw_event);
fw_event->users--;
if (!fw_event->users)
__mptsas_free_fw_event(ioc, fw_event);
spin_unlock_irqrestore(&ioc->fw_event_lock, flags);
}

Expand All @@ -333,9 +342,10 @@ mptsas_free_fw_event(MPT_ADAPTER *ioc, struct fw_event_work *fw_event)
static void
mptsas_cleanup_fw_event_q(MPT_ADAPTER *ioc)
{
struct fw_event_work *fw_event, *next;
struct fw_event_work *fw_event;
struct mptsas_target_reset_event *target_reset_list, *n;
MPT_SCSI_HOST *hd = shost_priv(ioc->sh);
unsigned long flags;

/* flush the target_reset_list */
if (!list_empty(&hd->target_reset_list)) {
Expand All @@ -350,14 +360,29 @@ mptsas_cleanup_fw_event_q(MPT_ADAPTER *ioc)
}
}

if (list_empty(&ioc->fw_event_list) ||
!ioc->fw_event_q || in_interrupt())
if (list_empty(&ioc->fw_event_list) || !ioc->fw_event_q)
return;

list_for_each_entry_safe(fw_event, next, &ioc->fw_event_list, list) {
if (cancel_delayed_work(&fw_event->work))
mptsas_free_fw_event(ioc, fw_event);
spin_lock_irqsave(&ioc->fw_event_lock, flags);

while (!list_empty(&ioc->fw_event_list)) {
bool canceled = false;

fw_event = list_first_entry(&ioc->fw_event_list,
struct fw_event_work, list);
fw_event->users++;
spin_unlock_irqrestore(&ioc->fw_event_lock, flags);
if (cancel_delayed_work_sync(&fw_event->work))
canceled = true;

spin_lock_irqsave(&ioc->fw_event_lock, flags);
if (canceled)
fw_event->users--;
fw_event->users--;
WARN_ON_ONCE(fw_event->users);
__mptsas_free_fw_event(ioc, fw_event);
}
spin_unlock_irqrestore(&ioc->fw_event_lock, flags);
}


Expand Down
1 change: 1 addition & 0 deletions drivers/message/fusion/mptsas.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ struct mptsas_hotplug_event {
struct fw_event_work {
struct list_head list;
struct delayed_work work;
int users;
MPT_ADAPTER *ioc;
u32 event;
u8 retries;
Expand Down
2 changes: 1 addition & 1 deletion drivers/message/fusion/mptscsih.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
#include <linux/kdev_t.h>
#include <linux/blkdev.h>
#include <linux/delay.h> /* for mdelay */
#include <linux/interrupt.h> /* needed for in_interrupt() proto */
#include <linux/interrupt.h>
#include <linux/reboot.h> /* notifier code */
#include <linux/workqueue.h>

Expand Down
2 changes: 1 addition & 1 deletion drivers/message/fusion/mptspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
#include <linux/kdev_t.h>
#include <linux/blkdev.h>
#include <linux/delay.h> /* for mdelay */
#include <linux/interrupt.h> /* needed for in_interrupt() proto */
#include <linux/interrupt.h>
#include <linux/reboot.h> /* notifier code */
#include <linux/workqueue.h>
#include <linux/raid_class.h>
Expand Down
11 changes: 11 additions & 0 deletions drivers/s390/scsi/zfcp_aux.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,14 @@ static void _zfcp_status_read_scheduler(struct work_struct *work)
stat_work));
}

static void zfcp_version_change_lost_work(struct work_struct *work)
{
struct zfcp_adapter *adapter = container_of(work, struct zfcp_adapter,
version_change_lost_work);

zfcp_fsf_exchange_config_data_sync(adapter->qdio, NULL);
}

static void zfcp_print_sl(struct seq_file *m, struct service_level *sl)
{
struct zfcp_adapter *adapter =
Expand Down Expand Up @@ -353,6 +361,8 @@ struct zfcp_adapter *zfcp_adapter_enqueue(struct ccw_device *ccw_device)
INIT_WORK(&adapter->stat_work, _zfcp_status_read_scheduler);
INIT_DELAYED_WORK(&adapter->scan_work, zfcp_fc_scan_ports);
INIT_WORK(&adapter->ns_up_work, zfcp_fc_sym_name_update);
INIT_WORK(&adapter->version_change_lost_work,
zfcp_version_change_lost_work);

adapter->next_port_scan = jiffies;

Expand Down Expand Up @@ -429,6 +439,7 @@ void zfcp_adapter_unregister(struct zfcp_adapter *adapter)
cancel_delayed_work_sync(&adapter->scan_work);
cancel_work_sync(&adapter->stat_work);
cancel_work_sync(&adapter->ns_up_work);
cancel_work_sync(&adapter->version_change_lost_work);
zfcp_destroy_adapter_work_queue(adapter);

zfcp_fc_wka_ports_force_offline(adapter->gs);
Expand Down
1 change: 1 addition & 0 deletions drivers/s390/scsi/zfcp_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ struct zfcp_adapter {
struct zfcp_fc_events events;
unsigned long next_port_scan;
struct zfcp_diag_adapter *diagnostics;
struct work_struct version_change_lost_work;
};

struct zfcp_port {
Expand Down
2 changes: 0 additions & 2 deletions drivers/s390/scsi/zfcp_ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ extern struct zfcp_port *zfcp_get_port_by_wwpn(struct zfcp_adapter *, u64);
extern struct zfcp_adapter *zfcp_adapter_enqueue(struct ccw_device *);
extern struct zfcp_port *zfcp_port_enqueue(struct zfcp_adapter *, u64, u32,
u32);
extern void zfcp_sg_free_table(struct scatterlist *, int);
extern int zfcp_sg_setup_table(struct scatterlist *, int);
extern void zfcp_adapter_release(struct kref *);
extern void zfcp_adapter_unregister(struct zfcp_adapter *);

Expand Down
19 changes: 19 additions & 0 deletions drivers/s390/scsi/zfcp_fsf.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,19 @@ static void zfcp_fsf_status_read_link_down(struct zfcp_fsf_req *req)
}
}

static void
zfcp_fsf_status_read_version_change(struct zfcp_adapter *adapter,
struct fsf_status_read_buffer *sr_buf)
{
if (sr_buf->status_subtype == FSF_STATUS_READ_SUB_LIC_CHANGE) {
u32 version = sr_buf->payload.version_change.current_version;

WRITE_ONCE(adapter->fsf_lic_version, version);
snprintf(fc_host_firmware_version(adapter->scsi_host),
FC_VERSION_STRING_SIZE, "%#08x", version);
}
}

static void zfcp_fsf_status_read_handler(struct zfcp_fsf_req *req)
{
struct zfcp_adapter *adapter = req->adapter;
Expand Down Expand Up @@ -296,10 +309,16 @@ static void zfcp_fsf_status_read_handler(struct zfcp_fsf_req *req)
case FSF_STATUS_READ_NOTIFICATION_LOST:
if (sr_buf->status_subtype & FSF_STATUS_READ_SUB_INCOMING_ELS)
zfcp_fc_conditional_port_scan(adapter);
if (sr_buf->status_subtype & FSF_STATUS_READ_SUB_VERSION_CHANGE)
queue_work(adapter->work_queue,
&adapter->version_change_lost_work);
break;
case FSF_STATUS_READ_FEATURE_UPDATE_ALERT:
adapter->adapter_features = sr_buf->payload.word[0];
break;
case FSF_STATUS_READ_VERSION_CHANGE:
zfcp_fsf_status_read_version_change(adapter, sr_buf);
break;
}

mempool_free(virt_to_page(sr_buf), adapter->pool.sr_data);
Expand Down
11 changes: 11 additions & 0 deletions drivers/s390/scsi/zfcp_fsf.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
#define FSF_STATUS_READ_LINK_UP 0x00000006
#define FSF_STATUS_READ_NOTIFICATION_LOST 0x00000009
#define FSF_STATUS_READ_FEATURE_UPDATE_ALERT 0x0000000C
#define FSF_STATUS_READ_VERSION_CHANGE 0x0000000D

/* status subtypes for link down */
#define FSF_STATUS_READ_SUB_NO_PHYSICAL_LINK 0x00000000
Expand All @@ -142,6 +143,10 @@

/* status subtypes for unsolicited status notification lost */
#define FSF_STATUS_READ_SUB_INCOMING_ELS 0x00000001
#define FSF_STATUS_READ_SUB_VERSION_CHANGE 0x00000100

/* status subtypes for version change */
#define FSF_STATUS_READ_SUB_LIC_CHANGE 0x00000001

/* topologie that is detected by the adapter */
#define FSF_TOPO_P2P 0x00000001
Expand Down Expand Up @@ -226,6 +231,11 @@ struct fsf_link_down_info {
u8 vendor_specific_code;
} __attribute__ ((packed));

struct fsf_version_change {
u32 current_version;
u32 previous_version;
} __packed;

struct fsf_status_read_buffer {
u32 status_type;
u32 status_subtype;
Expand All @@ -242,6 +252,7 @@ struct fsf_status_read_buffer {
u32 word[FSF_STATUS_READ_PAYLOAD_SIZE/sizeof(u32)];
struct fsf_link_down_info link_down_info;
struct fsf_bit_error_payload bit_error;
struct fsf_version_change version_change;
} payload;
} __attribute__ ((packed));

Expand Down
Loading

0 comments on commit 60f7c50

Please sign in to comment.