Skip to content

Commit 93f3321

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: "This is a batch of changes that didn't make it in the initial pull request because the lpfc series had to be rebased to redo an incorrect split. It's basically driver updates to lpfc, target, bnx2fc and ufs with the rest being minor updates except the sr_block_release one which fixes a use after free introduced by the removal of the global mutex in the first patch set" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (35 commits) scsi: core: Add DID_ALLOC_FAILURE and DID_MEDIUM_ERROR to hostbyte_table scsi: ufs: Use ufshcd_config_pwr_mode() when scaling gear scsi: bnx2fc: fix boolreturn.cocci warnings scsi: zfcp: use fallthrough; scsi: aacraid: do not overwrite retval in aac_reset_adapter() scsi: sr: Fix sr_block_release() scsi: aic7xxx: Remove more FreeBSD-specific code scsi: mpt3sas: Fix kernel panic observed on soft HBA unplug scsi: ufs: set device as active power mode after resetting device scsi: iscsi: Report unbind session event when the target has been removed scsi: lpfc: Change default SCSI LUN QD to 64 scsi: libfc: rport state move to PLOGI if all PRLI retry exhausted scsi: libfc: If PRLI rejected, move rport to PLOGI state scsi: bnx2fc: Update the driver version to 2.12.13 scsi: bnx2fc: Fix SCSI command completion after cleanup is posted scsi: bnx2fc: Process the RQE with CQE in interrupt context scsi: target: use the stack for XCOPY passthrough cmds scsi: target: increase XCOPY I/O size scsi: target: avoid per-loop XCOPY buffer allocations scsi: target: drop xcopy DISK BLOCK LENGTH debug ...
2 parents f8693b3 + 1b55940 commit 93f3321

33 files changed

+723
-771
lines changed

drivers/s390/scsi/zfcp_erp.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,12 @@ static enum zfcp_erp_act_type zfcp_erp_required_act(enum zfcp_erp_act_type want,
178178
return 0;
179179
if (!(p_status & ZFCP_STATUS_COMMON_UNBLOCKED))
180180
need = ZFCP_ERP_ACTION_REOPEN_PORT;
181-
/* fall through */
181+
fallthrough;
182182
case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED:
183183
p_status = atomic_read(&port->status);
184184
if (!(p_status & ZFCP_STATUS_COMMON_OPEN))
185185
need = ZFCP_ERP_ACTION_REOPEN_PORT;
186-
/* fall through */
186+
fallthrough;
187187
case ZFCP_ERP_ACTION_REOPEN_PORT:
188188
p_status = atomic_read(&port->status);
189189
if (p_status & ZFCP_STATUS_COMMON_ERP_INUSE)
@@ -196,7 +196,7 @@ static enum zfcp_erp_act_type zfcp_erp_required_act(enum zfcp_erp_act_type want,
196196
return need;
197197
if (!(a_status & ZFCP_STATUS_COMMON_UNBLOCKED))
198198
need = ZFCP_ERP_ACTION_REOPEN_ADAPTER;
199-
/* fall through */
199+
fallthrough;
200200
case ZFCP_ERP_ACTION_REOPEN_ADAPTER:
201201
a_status = atomic_read(&adapter->status);
202202
if (a_status & ZFCP_STATUS_COMMON_ERP_INUSE)
@@ -1086,7 +1086,7 @@ static enum zfcp_erp_act_result zfcp_erp_lun_strategy(
10861086
if (atomic_read(&zfcp_sdev->status) & ZFCP_STATUS_COMMON_OPEN)
10871087
return zfcp_erp_lun_strategy_close(erp_action);
10881088
/* already closed */
1089-
/* fall through */
1089+
fallthrough;
10901090
case ZFCP_ERP_STEP_LUN_CLOSING:
10911091
if (atomic_read(&zfcp_sdev->status) & ZFCP_STATUS_COMMON_OPEN)
10921092
return ZFCP_ERP_FAILED;
@@ -1415,7 +1415,7 @@ static void zfcp_erp_action_cleanup(struct zfcp_erp_action *act,
14151415
if (act->step != ZFCP_ERP_STEP_UNINITIALIZED)
14161416
if (result == ZFCP_ERP_SUCCEEDED)
14171417
zfcp_erp_try_rport_unblock(port);
1418-
/* fall through */
1418+
fallthrough;
14191419
case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED:
14201420
put_device(&port->dev);
14211421
break;

drivers/s390/scsi/zfcp_fsf.c

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ static int zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *req)
564564
case FSF_TOPO_AL:
565565
fc_host_port_type(shost) = FC_PORTTYPE_NLPORT;
566566
fc_host_fabric_name(shost) = 0;
567-
/* fall through */
567+
fallthrough;
568568
default:
569569
fc_host_fabric_name(shost) = 0;
570570
dev_err(&adapter->ccw_device->dev,
@@ -1032,7 +1032,7 @@ static void zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *req)
10321032
switch (fsq->word[0]) {
10331033
case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
10341034
zfcp_fc_test_link(zfcp_sdev->port);
1035-
/* fall through */
1035+
fallthrough;
10361036
case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:
10371037
req->status |= ZFCP_STATUS_FSFREQ_ERROR;
10381038
break;
@@ -1127,7 +1127,7 @@ static void zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *req)
11271127
break;
11281128
case FSF_PORT_HANDLE_NOT_VALID:
11291129
zfcp_erp_adapter_reopen(adapter, 0, "fsscth1");
1130-
/* fall through */
1130+
fallthrough;
11311131
case FSF_GENERIC_COMMAND_REJECTED:
11321132
case FSF_PAYLOAD_SIZE_MISMATCH:
11331133
case FSF_REQUEST_SIZE_TOO_LARGE:
@@ -1313,7 +1313,7 @@ static void zfcp_fsf_send_els_handler(struct zfcp_fsf_req *req)
13131313
break;
13141314
case FSF_SBAL_MISMATCH:
13151315
/* should never occur, avoided in zfcp_fsf_send_els */
1316-
/* fall through */
1316+
fallthrough;
13171317
default:
13181318
req->status |= ZFCP_STATUS_FSFREQ_ERROR;
13191319
break;
@@ -1736,7 +1736,7 @@ static void zfcp_fsf_open_port_handler(struct zfcp_fsf_req *req)
17361736
switch (header->fsf_status_qual.word[0]) {
17371737
case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
17381738
/* no zfcp_fc_test_link() with failed open port */
1739-
/* fall through */
1739+
fallthrough;
17401740
case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:
17411741
case FSF_SQ_NO_RETRY_POSSIBLE:
17421742
req->status |= ZFCP_STATUS_FSFREQ_ERROR;
@@ -1909,14 +1909,14 @@ static void zfcp_fsf_open_wka_port_handler(struct zfcp_fsf_req *req)
19091909
case FSF_MAXIMUM_NUMBER_OF_PORTS_EXCEEDED:
19101910
dev_warn(&req->adapter->ccw_device->dev,
19111911
"Opening WKA port 0x%x failed\n", wka_port->d_id);
1912-
/* fall through */
1912+
fallthrough;
19131913
case FSF_ADAPTER_STATUS_AVAILABLE:
19141914
req->status |= ZFCP_STATUS_FSFREQ_ERROR;
19151915
wka_port->status = ZFCP_FC_WKA_PORT_OFFLINE;
19161916
break;
19171917
case FSF_GOOD:
19181918
wka_port->handle = header->port_handle;
1919-
/* fall through */
1919+
fallthrough;
19201920
case FSF_PORT_ALREADY_OPEN:
19211921
wka_port->status = ZFCP_FC_WKA_PORT_ONLINE;
19221922
}
@@ -2059,7 +2059,6 @@ static void zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *req)
20592059
case FSF_ADAPTER_STATUS_AVAILABLE:
20602060
switch (header->fsf_status_qual.word[0]) {
20612061
case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
2062-
/* fall through */
20632062
case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:
20642063
req->status |= ZFCP_STATUS_FSFREQ_ERROR;
20652064
break;
@@ -2144,7 +2143,7 @@ static void zfcp_fsf_open_lun_handler(struct zfcp_fsf_req *req)
21442143

21452144
case FSF_PORT_HANDLE_NOT_VALID:
21462145
zfcp_erp_adapter_reopen(adapter, 0, "fsouh_1");
2147-
/* fall through */
2146+
fallthrough;
21482147
case FSF_LUN_ALREADY_OPEN:
21492148
break;
21502149
case FSF_PORT_BOXED:
@@ -2175,15 +2174,15 @@ static void zfcp_fsf_open_lun_handler(struct zfcp_fsf_req *req)
21752174
(unsigned long long)zfcp_scsi_dev_lun(sdev),
21762175
(unsigned long long)zfcp_sdev->port->wwpn);
21772176
zfcp_erp_set_lun_status(sdev, ZFCP_STATUS_COMMON_ERP_FAILED);
2178-
/* fall through */
2177+
fallthrough;
21792178
case FSF_INVALID_COMMAND_OPTION:
21802179
req->status |= ZFCP_STATUS_FSFREQ_ERROR;
21812180
break;
21822181
case FSF_ADAPTER_STATUS_AVAILABLE:
21832182
switch (header->fsf_status_qual.word[0]) {
21842183
case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
21852184
zfcp_fc_test_link(zfcp_sdev->port);
2186-
/* fall through */
2185+
fallthrough;
21872186
case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:
21882187
req->status |= ZFCP_STATUS_FSFREQ_ERROR;
21892188
break;
@@ -2277,7 +2276,7 @@ static void zfcp_fsf_close_lun_handler(struct zfcp_fsf_req *req)
22772276
switch (req->qtcb->header.fsf_status_qual.word[0]) {
22782277
case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:
22792278
zfcp_fc_test_link(zfcp_sdev->port);
2280-
/* fall through */
2279+
fallthrough;
22812280
case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:
22822281
req->status |= ZFCP_STATUS_FSFREQ_ERROR;
22832282
break;

drivers/scsi/aacraid/commsup.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1626,7 +1626,7 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type)
16261626
int aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type)
16271627
{
16281628
unsigned long flagv = 0;
1629-
int retval;
1629+
int retval, unblock_retval;
16301630
struct Scsi_Host *host = aac->scsi_host_ptr;
16311631
int bled;
16321632

@@ -1656,8 +1656,9 @@ int aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type)
16561656
retval = _aac_reset_adapter(aac, bled, reset_type);
16571657
spin_unlock_irqrestore(host->host_lock, flagv);
16581658

1659-
retval = scsi_host_unblock(host, SDEV_RUNNING);
1660-
1659+
unblock_retval = scsi_host_unblock(host, SDEV_RUNNING);
1660+
if (!retval)
1661+
retval = unblock_retval;
16611662
if ((forced < 2) && (retval == -ENODEV)) {
16621663
/* Unwind aac_send_shutdown() IOP_RESET unsupported/disabled */
16631664
struct fib * fibctx = aac_fib_alloc(aac);

drivers/scsi/aic7xxx/aic7xxx_core.c

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1834,21 +1834,6 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat)
18341834
printerror = 0;
18351835
} else if (ahc_sent_msg(ahc, AHCMSG_1B,
18361836
MSG_BUS_DEV_RESET, TRUE)) {
1837-
#ifdef __FreeBSD__
1838-
/*
1839-
* Don't mark the user's request for this BDR
1840-
* as completing with CAM_BDR_SENT. CAM3
1841-
* specifies CAM_REQ_CMP.
1842-
*/
1843-
if (scb != NULL
1844-
&& scb->io_ctx->ccb_h.func_code== XPT_RESET_DEV
1845-
&& ahc_match_scb(ahc, scb, target, channel,
1846-
CAM_LUN_WILDCARD,
1847-
SCB_LIST_NULL,
1848-
ROLE_INITIATOR)) {
1849-
ahc_set_transaction_status(scb, CAM_REQ_CMP);
1850-
}
1851-
#endif
18521837
ahc_compile_devinfo(&devinfo,
18531838
initiator_role_id,
18541839
target,
@@ -4399,22 +4384,16 @@ ahc_alloc(void *platform_arg, char *name)
43994384
struct ahc_softc *ahc;
44004385
int i;
44014386

4402-
#ifndef __FreeBSD__
44034387
ahc = kmalloc(sizeof(*ahc), GFP_ATOMIC);
44044388
if (!ahc) {
44054389
printk("aic7xxx: cannot malloc softc!\n");
44064390
kfree(name);
44074391
return NULL;
44084392
}
4409-
#else
4410-
ahc = device_get_softc((device_t)platform_arg);
4411-
#endif
44124393
memset(ahc, 0, sizeof(*ahc));
44134394
ahc->seep_config = kmalloc(sizeof(*ahc->seep_config), GFP_ATOMIC);
44144395
if (ahc->seep_config == NULL) {
4415-
#ifndef __FreeBSD__
44164396
kfree(ahc);
4417-
#endif
44184397
kfree(name);
44194398
return (NULL);
44204399
}
@@ -4540,9 +4519,7 @@ ahc_free(struct ahc_softc *ahc)
45404519
kfree(ahc->name);
45414520
if (ahc->seep_config != NULL)
45424521
kfree(ahc->seep_config);
4543-
#ifndef __FreeBSD__
45444522
kfree(ahc);
4545-
#endif
45464523
return;
45474524
}
45484525

drivers/scsi/bnx2fc/bnx2fc.h

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
#include "bnx2fc_constants.h"
6767

6868
#define BNX2FC_NAME "bnx2fc"
69-
#define BNX2FC_VERSION "2.12.10"
69+
#define BNX2FC_VERSION "2.12.13"
7070

7171
#define PFX "bnx2fc: "
7272

@@ -482,7 +482,10 @@ struct io_bdt {
482482
struct bnx2fc_work {
483483
struct list_head list;
484484
struct bnx2fc_rport *tgt;
485+
struct fcoe_task_ctx_entry *task;
486+
unsigned char rq_data[BNX2FC_RQ_BUF_SZ];
485487
u16 wqe;
488+
u8 num_rq;
486489
};
487490
struct bnx2fc_unsol_els {
488491
struct fc_lport *lport;
@@ -550,7 +553,7 @@ void bnx2fc_rport_event_handler(struct fc_lport *lport,
550553
enum fc_rport_event event);
551554
void bnx2fc_process_scsi_cmd_compl(struct bnx2fc_cmd *io_req,
552555
struct fcoe_task_ctx_entry *task,
553-
u8 num_rq);
556+
u8 num_rq, unsigned char *rq_data);
554557
void bnx2fc_process_cleanup_compl(struct bnx2fc_cmd *io_req,
555558
struct fcoe_task_ctx_entry *task,
556559
u8 num_rq);
@@ -559,7 +562,7 @@ void bnx2fc_process_abts_compl(struct bnx2fc_cmd *io_req,
559562
u8 num_rq);
560563
void bnx2fc_process_tm_compl(struct bnx2fc_cmd *io_req,
561564
struct fcoe_task_ctx_entry *task,
562-
u8 num_rq);
565+
u8 num_rq, unsigned char *rq_data);
563566
void bnx2fc_process_els_compl(struct bnx2fc_cmd *els_req,
564567
struct fcoe_task_ctx_entry *task,
565568
u8 num_rq);
@@ -577,7 +580,9 @@ struct fc_seq *bnx2fc_elsct_send(struct fc_lport *lport, u32 did,
577580
void *arg, u32 timeout);
578581
void bnx2fc_arm_cq(struct bnx2fc_rport *tgt);
579582
int bnx2fc_process_new_cqes(struct bnx2fc_rport *tgt);
580-
void bnx2fc_process_cq_compl(struct bnx2fc_rport *tgt, u16 wqe);
583+
void bnx2fc_process_cq_compl(struct bnx2fc_rport *tgt, u16 wqe,
584+
unsigned char *rq_data, u8 num_rq,
585+
struct fcoe_task_ctx_entry *task);
581586
struct bnx2fc_rport *bnx2fc_tgt_lookup(struct fcoe_port *port,
582587
u32 port_id);
583588
void bnx2fc_process_l2_frame_compl(struct bnx2fc_rport *tgt,

drivers/scsi/bnx2fc/bnx2fc_fcoe.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,10 @@ static int bnx2fc_percpu_io_thread(void *arg)
660660

661661
list_for_each_entry_safe(work, tmp, &work_list, list) {
662662
list_del_init(&work->list);
663-
bnx2fc_process_cq_compl(work->tgt, work->wqe);
663+
bnx2fc_process_cq_compl(work->tgt, work->wqe,
664+
work->rq_data,
665+
work->num_rq,
666+
work->task);
664667
kfree(work);
665668
}
666669

@@ -2655,7 +2658,8 @@ static int bnx2fc_cpu_offline(unsigned int cpu)
26552658
/* Free all work in the list */
26562659
list_for_each_entry_safe(work, tmp, &p->work_list, list) {
26572660
list_del_init(&work->list);
2658-
bnx2fc_process_cq_compl(work->tgt, work->wqe);
2661+
bnx2fc_process_cq_compl(work->tgt, work->wqe, work->rq_data,
2662+
work->num_rq, work->task);
26592663
kfree(work);
26602664
}
26612665

0 commit comments

Comments
 (0)