Skip to content

Commit 3ed7df0

Browse files
committed
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull more SCSI updates from James Bottomley: "These are mostly minor updates. There are two drivers (lpfc and mpi3mr) which missed the initial pull and a core change to retry a start/stop unit which affect suspend/resume" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (32 commits) scsi: lpfc: Update lpfc version to 14.4.0.5 scsi: lpfc: Support loopback tests with VMID enabled scsi: lpfc: Revise TRACE_EVENT log flag severities from KERN_ERR to KERN_WARNING scsi: lpfc: Ensure DA_ID handling completion before deleting an NPIV instance scsi: lpfc: Fix kref imbalance on fabric ndlps from dev_loss_tmo handler scsi: lpfc: Restrict support for 32 byte CDBs to specific HBAs scsi: lpfc: Update phba link state conditional before sending CMF_SYNC_WQE scsi: lpfc: Add ELS_RSP cmd to the list of WQEs to flush in lpfc_els_flush_cmd() scsi: mpi3mr: Update driver version to 8.12.0.0.50 scsi: mpi3mr: Improve wait logic while controller transitions to READY state scsi: mpi3mr: Update MPI Headers to revision 34 scsi: mpi3mr: Use firmware-provided timestamp update interval scsi: mpi3mr: Enhance the Enable Controller retry logic scsi: sd: Fix off-by-one error in sd_read_block_characteristics() scsi: pm8001: Do not overwrite PCI queue mapping scsi: scsi_debug: Remove a useless memset() scsi: pmcraid: Convert comma to semicolon scsi: sd: Retry START STOP UNIT commands scsi: mpi3mr: A performance fix scsi: ufs: qcom: Update MODE_MAX cfg_bw value ...
2 parents 9f9a534 + 359aeb8 commit 3ed7df0

34 files changed

+415
-154
lines changed

drivers/message/fusion/mptctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1609,7 +1609,7 @@ mptctl_eventreport (MPT_ADAPTER *ioc, unsigned long arg)
16091609
maxEvents = numBytes/sizeof(MPT_IOCTL_EVENTS);
16101610

16111611

1612-
max = MPTCTL_EVENT_LOG_SIZE < maxEvents ? MPTCTL_EVENT_LOG_SIZE : maxEvents;
1612+
max = min(maxEvents, MPTCTL_EVENT_LOG_SIZE);
16131613

16141614
/* If fewer than 1 event is requested, there must have
16151615
* been some type of error.

drivers/scsi/cxgbi/libcxgbi.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,6 @@ struct cxgbi_device {
485485
unsigned char nmtus;
486486
unsigned char nports;
487487
struct pci_dev *pdev;
488-
struct dentry *debugfs_root;
489488
struct iscsi_transport *itp;
490489
struct module *owner;
491490

@@ -499,7 +498,6 @@ struct cxgbi_device {
499498
unsigned int rxq_idx_cntr;
500499
struct cxgbi_ports_map pmap;
501500

502-
void (*dev_ddp_cleanup)(struct cxgbi_device *);
503501
struct cxgbi_ppm* (*cdev2ppm)(struct cxgbi_device *);
504502
int (*csk_ddp_set_map)(struct cxgbi_ppm *, struct cxgbi_sock *,
505503
struct cxgbi_task_tag_info *);
@@ -512,7 +510,6 @@ struct cxgbi_device {
512510
unsigned int, int);
513511

514512
void (*csk_release_offload_resources)(struct cxgbi_sock *);
515-
int (*csk_rx_pdu_ready)(struct cxgbi_sock *, struct sk_buff *);
516513
u32 (*csk_send_rx_credits)(struct cxgbi_sock *, u32);
517514
int (*csk_push_tx_frames)(struct cxgbi_sock *, int);
518515
void (*csk_send_abort_req)(struct cxgbi_sock *);

drivers/scsi/hisi_sas/hisi_sas_v3_hw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2421,7 +2421,7 @@ static void slot_complete_v3_hw(struct hisi_hba *hisi_hba,
24212421
spin_lock_irqsave(&device->done_lock, flags);
24222422
if (test_bit(SAS_HA_FROZEN, &ha->state)) {
24232423
spin_unlock_irqrestore(&device->done_lock, flags);
2424-
dev_info(dev, "slot complete: task(%pK) ignored\n ",
2424+
dev_info(dev, "slot complete: task(%pK) ignored\n",
24252425
task);
24262426
return;
24272427
}

drivers/scsi/ibmvscsi/ibmvfc.c

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ static unsigned int default_timeout = IBMVFC_DEFAULT_TIMEOUT;
3737
static u64 max_lun = IBMVFC_MAX_LUN;
3838
static unsigned int max_targets = IBMVFC_MAX_TARGETS;
3939
static unsigned int max_requests = IBMVFC_MAX_REQUESTS_DEFAULT;
40+
static u16 max_sectors = IBMVFC_MAX_SECTORS;
4041
static u16 scsi_qdepth = IBMVFC_SCSI_QDEPTH;
4142
static unsigned int disc_threads = IBMVFC_MAX_DISC_THREADS;
4243
static unsigned int ibmvfc_debug = IBMVFC_DEBUG;
@@ -83,6 +84,9 @@ MODULE_PARM_DESC(default_timeout,
8384
module_param_named(max_requests, max_requests, uint, S_IRUGO);
8485
MODULE_PARM_DESC(max_requests, "Maximum requests for this adapter. "
8586
"[Default=" __stringify(IBMVFC_MAX_REQUESTS_DEFAULT) "]");
87+
module_param_named(max_sectors, max_sectors, ushort, S_IRUGO);
88+
MODULE_PARM_DESC(max_sectors, "Maximum sectors for this adapter. "
89+
"[Default=" __stringify(IBMVFC_MAX_SECTORS) "]");
8690
module_param_named(scsi_qdepth, scsi_qdepth, ushort, S_IRUGO);
8791
MODULE_PARM_DESC(scsi_qdepth, "Maximum scsi command depth per adapter queue. "
8892
"[Default=" __stringify(IBMVFC_SCSI_QDEPTH) "]");
@@ -1494,7 +1498,7 @@ static void ibmvfc_set_login_info(struct ibmvfc_host *vhost)
14941498
memset(login_info, 0, sizeof(*login_info));
14951499

14961500
login_info->ostype = cpu_to_be32(IBMVFC_OS_LINUX);
1497-
login_info->max_dma_len = cpu_to_be64(IBMVFC_MAX_SECTORS << 9);
1501+
login_info->max_dma_len = cpu_to_be64(max_sectors << 9);
14981502
login_info->max_payload = cpu_to_be32(sizeof(struct ibmvfc_fcp_cmd_iu));
14991503
login_info->max_response = cpu_to_be32(sizeof(struct ibmvfc_fcp_rsp));
15001504
login_info->partition_num = cpu_to_be32(vhost->partition_number);
@@ -5230,7 +5234,7 @@ static void ibmvfc_npiv_login_done(struct ibmvfc_event *evt)
52305234
}
52315235

52325236
vhost->logged_in = 1;
5233-
npiv_max_sectors = min((uint)(be64_to_cpu(rsp->max_dma_len) >> 9), IBMVFC_MAX_SECTORS);
5237+
npiv_max_sectors = min((uint)(be64_to_cpu(rsp->max_dma_len) >> 9), max_sectors);
52345238
dev_info(vhost->dev, "Host partition: %s, device: %s %s %s max sectors %u\n",
52355239
rsp->partition_name, rsp->device_name, rsp->port_loc_code,
52365240
rsp->drc_name, npiv_max_sectors);
@@ -6329,7 +6333,7 @@ static int ibmvfc_probe(struct vio_dev *vdev, const struct vio_device_id *id)
63296333
shost->can_queue = scsi_qdepth;
63306334
shost->max_lun = max_lun;
63316335
shost->max_id = max_targets;
6332-
shost->max_sectors = IBMVFC_MAX_SECTORS;
6336+
shost->max_sectors = max_sectors;
63336337
shost->max_cmd_len = IBMVFC_MAX_CDB_LEN;
63346338
shost->unique_id = shost->host_no;
63356339
shost->nr_hw_queues = mq_enabled ? min(max_scsi_queues, nr_scsi_hw_queues) : 1;
@@ -6556,6 +6560,7 @@ static struct fc_function_template ibmvfc_transport_functions = {
65566560
**/
65576561
static int __init ibmvfc_module_init(void)
65586562
{
6563+
int min_max_sectors = PAGE_SIZE >> 9;
65596564
int rc;
65606565

65616566
if (!firmware_has_feature(FW_FEATURE_VIO))
@@ -6564,6 +6569,16 @@ static int __init ibmvfc_module_init(void)
65646569
printk(KERN_INFO IBMVFC_NAME": IBM Virtual Fibre Channel Driver version: %s %s\n",
65656570
IBMVFC_DRIVER_VERSION, IBMVFC_DRIVER_DATE);
65666571

6572+
/*
6573+
* Range check the max_sectors module parameter. The upper bounds is
6574+
* implicity checked since the parameter is a ushort.
6575+
*/
6576+
if (max_sectors < min_max_sectors) {
6577+
printk(KERN_ERR IBMVFC_NAME ": max_sectors must be at least %d.\n",
6578+
min_max_sectors);
6579+
max_sectors = min_max_sectors;
6580+
}
6581+
65676582
ibmvfc_transport_template = fc_attach_transport(&ibmvfc_transport_functions);
65686583
if (!ibmvfc_transport_template)
65696584
return -ENOMEM;

drivers/scsi/ibmvscsi/ibmvfc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#define IBMVFC_DEBUG 0
3333
#define IBMVFC_MAX_TARGETS 1024
3434
#define IBMVFC_MAX_LUN 0xffffffff
35-
#define IBMVFC_MAX_SECTORS 0xffffu
35+
#define IBMVFC_MAX_SECTORS 2048
3636
#define IBMVFC_MAX_DISC_THREADS 4
3737
#define IBMVFC_TGT_MEMPOOL_SZ 64
3838
#define IBMVFC_MAX_CMDS_PER_LUN 64

drivers/scsi/lpfc/lpfc_bsg.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3208,6 +3208,9 @@ lpfc_bsg_diag_loopback_run(struct bsg_job *job)
32083208
cmdiocbq->num_bdes = num_bde;
32093209
cmdiocbq->cmd_flag |= LPFC_IO_LIBDFC;
32103210
cmdiocbq->cmd_flag |= LPFC_IO_LOOPBACK;
3211+
if (phba->cfg_vmid_app_header)
3212+
cmdiocbq->cmd_flag |= LPFC_IO_VMID;
3213+
32113214
cmdiocbq->vport = phba->pport;
32123215
cmdiocbq->cmd_cmpl = NULL;
32133216
cmdiocbq->bpl_dmabuf = txbmp;

drivers/scsi/lpfc/lpfc_ct.c

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1572,8 +1572,8 @@ lpfc_cmpl_ct_cmd_gft_id(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
15721572
}
15731573
}
15741574
} else
1575-
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
1576-
"3065 GFT_ID failed x%08x\n", ulp_status);
1575+
lpfc_vlog_msg(vport, KERN_WARNING, LOG_DISCOVERY,
1576+
"3065 GFT_ID status x%08x\n", ulp_status);
15771577

15781578
out:
15791579
lpfc_ct_free_iocb(phba, cmdiocb);
@@ -1647,6 +1647,18 @@ lpfc_cmpl_ct(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
16471647
}
16481648

16491649
out:
1650+
/* If the caller wanted a synchronous DA_ID completion, signal the
1651+
* wait obj and clear flag to reset the vport.
1652+
*/
1653+
if (ndlp->save_flags & NLP_WAIT_FOR_DA_ID) {
1654+
if (ndlp->da_id_waitq)
1655+
wake_up(ndlp->da_id_waitq);
1656+
}
1657+
1658+
spin_lock_irq(&ndlp->lock);
1659+
ndlp->save_flags &= ~NLP_WAIT_FOR_DA_ID;
1660+
spin_unlock_irq(&ndlp->lock);
1661+
16501662
lpfc_ct_free_iocb(phba, cmdiocb);
16511663
lpfc_nlp_put(ndlp);
16521664
return;
@@ -2246,7 +2258,7 @@ lpfc_cmpl_ct_disc_fdmi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
22462258
}
22472259

22482260
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
2249-
"0229 FDMI cmd %04x failed, latt = %d "
2261+
"0229 FDMI cmd %04x latt = %d "
22502262
"ulp_status: x%x, rid x%x\n",
22512263
be16_to_cpu(fdmi_cmd), latt, ulp_status,
22522264
ulp_word4);
@@ -2263,9 +2275,9 @@ lpfc_cmpl_ct_disc_fdmi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
22632275
/* Check for a CT LS_RJT response */
22642276
cmd = be16_to_cpu(fdmi_cmd);
22652277
if (be16_to_cpu(fdmi_rsp) == SLI_CT_RESPONSE_FS_RJT) {
2266-
/* FDMI rsp failed */
2278+
/* Log FDMI reject */
22672279
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY | LOG_ELS,
2268-
"0220 FDMI cmd failed FS_RJT Data: x%x", cmd);
2280+
"0220 FDMI cmd FS_RJT Data: x%x", cmd);
22692281

22702282
/* Should we fallback to FDMI-2 / FDMI-1 ? */
22712283
switch (cmd) {

drivers/scsi/lpfc/lpfc_disc.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ enum lpfc_nlp_save_flags {
9090
NLP_IN_RECOV_POST_DEV_LOSS = 0x1,
9191
/* wait for outstanding LOGO to cmpl */
9292
NLP_WAIT_FOR_LOGO = 0x2,
93+
/* wait for outstanding DA_ID to finish */
94+
NLP_WAIT_FOR_DA_ID = 0x4
9395
};
9496

9597
struct lpfc_nodelist {
@@ -159,7 +161,12 @@ struct lpfc_nodelist {
159161
uint32_t nvme_fb_size; /* NVME target's supported byte cnt */
160162
#define NVME_FB_BIT_SHIFT 9 /* PRLI Rsp first burst in 512B units. */
161163
uint32_t nlp_defer_did;
164+
165+
/* These wait objects are NPIV specific. These IOs must complete
166+
* synchronously.
167+
*/
162168
wait_queue_head_t *logo_waitq;
169+
wait_queue_head_t *da_id_waitq;
163170
};
164171

165172
struct lpfc_node_rrq {

0 commit comments

Comments
 (0)