Skip to content

Commit 6799d4f

Browse files
committed
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley: "Ten small fixes, all in drivers" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: target: qla2xxx: Wait for stop_phase1 at WWN removal scsi: hisi_sas: Drop free_irq() of devm_request_irq() allocated irq scsi: vmw_pvscsi: Set correct residual data length scsi: bnx2fc: Return failure if io_req is already in ABTS processing scsi: aic7xxx: Remove multiple definition of globals scsi: aic7xxx: Restore several defines for aic7xxx firmware build scsi: target: iblock: Fix smp_processor_id() BUG messages scsi: libsas: Use _safe() loop in sas_resume_port() scsi: target: tcmu: Fix xarray RCU warning scsi: target: core: Avoid smp_processor_id() in preemptible code
2 parents 0217a27 + 2ef7665 commit 6799d4f

File tree

11 files changed

+38
-17
lines changed

11 files changed

+38
-17
lines changed

drivers/scsi/aic7xxx/aicasm/aicasm_gram.y

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
#include "aicasm_symbol.h"
5959
#include "aicasm_insformat.h"
6060

61-
int yylineno;
6261
char *yyfilename;
6362
char stock_prefix[] = "aic_";
6463
char *prefix = stock_prefix;

drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ struct macro_arg {
108108
regex_t arg_regex;
109109
char *replacement_text;
110110
};
111-
STAILQ_HEAD(macro_arg_list, macro_arg) args;
111+
STAILQ_HEAD(macro_arg_list, macro_arg);
112112

113113
struct macro_info {
114114
struct macro_arg_list args;

drivers/scsi/aic7xxx/scsi_message.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
* $FreeBSD: src/sys/cam/scsi/scsi_message.h,v 1.2 2000/05/01 20:21:29 peter Exp $
44
*/
55

6+
/* Messages (1 byte) */ /* I/T (M)andatory or (O)ptional */
7+
#define MSG_SAVEDATAPOINTER 0x02 /* O/O */
8+
#define MSG_RESTOREPOINTERS 0x03 /* O/O */
9+
#define MSG_DISCONNECT 0x04 /* O/O */
10+
#define MSG_MESSAGE_REJECT 0x07 /* M/M */
11+
#define MSG_NOOP 0x08 /* M/M */
12+
13+
/* Messages (2 byte) */
14+
#define MSG_SIMPLE_Q_TAG 0x20 /* O/O */
15+
#define MSG_IGN_WIDE_RESIDUE 0x23 /* O/O */
16+
617
/* Identify message */ /* M/M */
718
#define MSG_IDENTIFYFLAG 0x80
819
#define MSG_IDENTIFY_DISCFLAG 0x40

drivers/scsi/bnx2fc/bnx2fc_io.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,6 +1220,7 @@ int bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd)
12201220
was a result from the ABTS request rather than the CLEANUP
12211221
request */
12221222
set_bit(BNX2FC_FLAG_IO_CLEANUP, &io_req->req_flags);
1223+
rc = FAILED;
12231224
goto done;
12241225
}
12251226

drivers/scsi/hisi_sas/hisi_sas_v3_hw.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4811,14 +4811,14 @@ hisi_sas_v3_destroy_irqs(struct pci_dev *pdev, struct hisi_hba *hisi_hba)
48114811
{
48124812
int i;
48134813

4814-
free_irq(pci_irq_vector(pdev, 1), hisi_hba);
4815-
free_irq(pci_irq_vector(pdev, 2), hisi_hba);
4816-
free_irq(pci_irq_vector(pdev, 11), hisi_hba);
4814+
devm_free_irq(&pdev->dev, pci_irq_vector(pdev, 1), hisi_hba);
4815+
devm_free_irq(&pdev->dev, pci_irq_vector(pdev, 2), hisi_hba);
4816+
devm_free_irq(&pdev->dev, pci_irq_vector(pdev, 11), hisi_hba);
48174817
for (i = 0; i < hisi_hba->cq_nvecs; i++) {
48184818
struct hisi_sas_cq *cq = &hisi_hba->cq[i];
48194819
int nr = hisi_sas_intr_conv ? 16 : 16 + i;
48204820

4821-
free_irq(pci_irq_vector(pdev, nr), cq);
4821+
devm_free_irq(&pdev->dev, pci_irq_vector(pdev, nr), cq);
48224822
}
48234823
pci_free_irq_vectors(pdev);
48244824
}

drivers/scsi/libsas/sas_port.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static bool phy_is_wideport_member(struct asd_sas_port *port, struct asd_sas_phy
2525

2626
static void sas_resume_port(struct asd_sas_phy *phy)
2727
{
28-
struct domain_device *dev;
28+
struct domain_device *dev, *n;
2929
struct asd_sas_port *port = phy->port;
3030
struct sas_ha_struct *sas_ha = phy->ha;
3131
struct sas_internal *si = to_sas_internal(sas_ha->core.shost->transportt);
@@ -44,7 +44,7 @@ static void sas_resume_port(struct asd_sas_phy *phy)
4444
* 1/ presume every device came back
4545
* 2/ force the next revalidation to check all expander phys
4646
*/
47-
list_for_each_entry(dev, &port->dev_list, dev_list_node) {
47+
list_for_each_entry_safe(dev, n, &port->dev_list, dev_list_node) {
4848
int i, rc;
4949

5050
rc = sas_notify_lldd_dev_found(dev);

drivers/scsi/qla2xxx/qla_target.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,10 +1563,12 @@ void qlt_stop_phase2(struct qla_tgt *tgt)
15631563
return;
15641564
}
15651565

1566+
mutex_lock(&tgt->ha->optrom_mutex);
15661567
mutex_lock(&vha->vha_tgt.tgt_mutex);
15671568
tgt->tgt_stop = 0;
15681569
tgt->tgt_stopped = 1;
15691570
mutex_unlock(&vha->vha_tgt.tgt_mutex);
1571+
mutex_unlock(&tgt->ha->optrom_mutex);
15701572

15711573
ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00c, "Stop of tgt %p finished\n",
15721574
tgt);

drivers/scsi/vmw_pvscsi.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,13 @@ static void pvscsi_complete_request(struct pvscsi_adapter *adapter,
585585
case BTSTAT_SUCCESS:
586586
case BTSTAT_LINKED_COMMAND_COMPLETED:
587587
case BTSTAT_LINKED_COMMAND_COMPLETED_WITH_FLAG:
588-
/* If everything went fine, let's move on.. */
588+
/*
589+
* Commands like INQUIRY may transfer less data than
590+
* requested by the initiator via bufflen. Set residual
591+
* count to make upper layer aware of the actual amount
592+
* of data returned.
593+
*/
594+
scsi_set_resid(cmd, scsi_bufflen(cmd) - e->dataLen);
589595
cmd->result = (DID_OK << 16);
590596
break;
591597

drivers/target/target_core_iblock.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,11 @@ static struct se_dev_plug *iblock_plug_device(struct se_device *se_dev)
204204
struct iblock_dev_plug *ib_dev_plug;
205205

206206
/*
207-
* Each se_device has a per cpu work this can be run from. Wwe
207+
* Each se_device has a per cpu work this can be run from. We
208208
* shouldn't have multiple threads on the same cpu calling this
209209
* at the same time.
210210
*/
211-
ib_dev_plug = &ib_dev->ibd_plug[smp_processor_id()];
211+
ib_dev_plug = &ib_dev->ibd_plug[raw_smp_processor_id()];
212212
if (test_and_set_bit(IBD_PLUGF_PLUGGED, &ib_dev_plug->flags))
213213
return NULL;
214214

drivers/target/target_core_transport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1416,7 +1416,7 @@ void __target_init_cmd(
14161416
cmd->orig_fe_lun = unpacked_lun;
14171417

14181418
if (!(cmd->se_cmd_flags & SCF_USE_CPUID))
1419-
cmd->cpuid = smp_processor_id();
1419+
cmd->cpuid = raw_smp_processor_id();
14201420

14211421
cmd->state_active = false;
14221422
}

0 commit comments

Comments
 (0)