mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
SCSI fixes on 20210528
10 small fixes, all in drivers. Signed-off-by: James E.J. Bottomley <jejb@linux.ibm.com> -----BEGIN PGP SIGNATURE----- iJwEABMIAEQWIQTnYEDbdso9F2cI+arnQslM7pishQUCYLF1vSYcamFtZXMuYm90 dG9tbGV5QGhhbnNlbnBhcnRuZXJzaGlwLmNvbQAKCRDnQslM7pishSaWAP94iRVJ DUTEuUl8RCvwyBqW/K0wF2AfE96z5arYYYNfjwD/Y3Zcf5iGyVTmGXH9SgM0jQTs qXFcjrsqhZLzA6R50QU= =UNqY -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
6799d4f2da
@ -58,7 +58,6 @@
|
||||
#include "aicasm_symbol.h"
|
||||
#include "aicasm_insformat.h"
|
||||
|
||||
int yylineno;
|
||||
char *yyfilename;
|
||||
char stock_prefix[] = "aic_";
|
||||
char *prefix = stock_prefix;
|
||||
|
@ -108,7 +108,7 @@ struct macro_arg {
|
||||
regex_t arg_regex;
|
||||
char *replacement_text;
|
||||
};
|
||||
STAILQ_HEAD(macro_arg_list, macro_arg) args;
|
||||
STAILQ_HEAD(macro_arg_list, macro_arg);
|
||||
|
||||
struct macro_info {
|
||||
struct macro_arg_list args;
|
||||
|
@ -3,6 +3,17 @@
|
||||
* $FreeBSD: src/sys/cam/scsi/scsi_message.h,v 1.2 2000/05/01 20:21:29 peter Exp $
|
||||
*/
|
||||
|
||||
/* Messages (1 byte) */ /* I/T (M)andatory or (O)ptional */
|
||||
#define MSG_SAVEDATAPOINTER 0x02 /* O/O */
|
||||
#define MSG_RESTOREPOINTERS 0x03 /* O/O */
|
||||
#define MSG_DISCONNECT 0x04 /* O/O */
|
||||
#define MSG_MESSAGE_REJECT 0x07 /* M/M */
|
||||
#define MSG_NOOP 0x08 /* M/M */
|
||||
|
||||
/* Messages (2 byte) */
|
||||
#define MSG_SIMPLE_Q_TAG 0x20 /* O/O */
|
||||
#define MSG_IGN_WIDE_RESIDUE 0x23 /* O/O */
|
||||
|
||||
/* Identify message */ /* M/M */
|
||||
#define MSG_IDENTIFYFLAG 0x80
|
||||
#define MSG_IDENTIFY_DISCFLAG 0x40
|
||||
|
@ -1220,6 +1220,7 @@ int bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd)
|
||||
was a result from the ABTS request rather than the CLEANUP
|
||||
request */
|
||||
set_bit(BNX2FC_FLAG_IO_CLEANUP, &io_req->req_flags);
|
||||
rc = FAILED;
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -4811,14 +4811,14 @@ hisi_sas_v3_destroy_irqs(struct pci_dev *pdev, struct hisi_hba *hisi_hba)
|
||||
{
|
||||
int i;
|
||||
|
||||
free_irq(pci_irq_vector(pdev, 1), hisi_hba);
|
||||
free_irq(pci_irq_vector(pdev, 2), hisi_hba);
|
||||
free_irq(pci_irq_vector(pdev, 11), hisi_hba);
|
||||
devm_free_irq(&pdev->dev, pci_irq_vector(pdev, 1), hisi_hba);
|
||||
devm_free_irq(&pdev->dev, pci_irq_vector(pdev, 2), hisi_hba);
|
||||
devm_free_irq(&pdev->dev, pci_irq_vector(pdev, 11), hisi_hba);
|
||||
for (i = 0; i < hisi_hba->cq_nvecs; i++) {
|
||||
struct hisi_sas_cq *cq = &hisi_hba->cq[i];
|
||||
int nr = hisi_sas_intr_conv ? 16 : 16 + i;
|
||||
|
||||
free_irq(pci_irq_vector(pdev, nr), cq);
|
||||
devm_free_irq(&pdev->dev, pci_irq_vector(pdev, nr), cq);
|
||||
}
|
||||
pci_free_irq_vectors(pdev);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ static bool phy_is_wideport_member(struct asd_sas_port *port, struct asd_sas_phy
|
||||
|
||||
static void sas_resume_port(struct asd_sas_phy *phy)
|
||||
{
|
||||
struct domain_device *dev;
|
||||
struct domain_device *dev, *n;
|
||||
struct asd_sas_port *port = phy->port;
|
||||
struct sas_ha_struct *sas_ha = phy->ha;
|
||||
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)
|
||||
* 1/ presume every device came back
|
||||
* 2/ force the next revalidation to check all expander phys
|
||||
*/
|
||||
list_for_each_entry(dev, &port->dev_list, dev_list_node) {
|
||||
list_for_each_entry_safe(dev, n, &port->dev_list, dev_list_node) {
|
||||
int i, rc;
|
||||
|
||||
rc = sas_notify_lldd_dev_found(dev);
|
||||
|
@ -1563,10 +1563,12 @@ void qlt_stop_phase2(struct qla_tgt *tgt)
|
||||
return;
|
||||
}
|
||||
|
||||
mutex_lock(&tgt->ha->optrom_mutex);
|
||||
mutex_lock(&vha->vha_tgt.tgt_mutex);
|
||||
tgt->tgt_stop = 0;
|
||||
tgt->tgt_stopped = 1;
|
||||
mutex_unlock(&vha->vha_tgt.tgt_mutex);
|
||||
mutex_unlock(&tgt->ha->optrom_mutex);
|
||||
|
||||
ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00c, "Stop of tgt %p finished\n",
|
||||
tgt);
|
||||
|
@ -585,7 +585,13 @@ static void pvscsi_complete_request(struct pvscsi_adapter *adapter,
|
||||
case BTSTAT_SUCCESS:
|
||||
case BTSTAT_LINKED_COMMAND_COMPLETED:
|
||||
case BTSTAT_LINKED_COMMAND_COMPLETED_WITH_FLAG:
|
||||
/* If everything went fine, let's move on.. */
|
||||
/*
|
||||
* Commands like INQUIRY may transfer less data than
|
||||
* requested by the initiator via bufflen. Set residual
|
||||
* count to make upper layer aware of the actual amount
|
||||
* of data returned.
|
||||
*/
|
||||
scsi_set_resid(cmd, scsi_bufflen(cmd) - e->dataLen);
|
||||
cmd->result = (DID_OK << 16);
|
||||
break;
|
||||
|
||||
|
@ -204,11 +204,11 @@ static struct se_dev_plug *iblock_plug_device(struct se_device *se_dev)
|
||||
struct iblock_dev_plug *ib_dev_plug;
|
||||
|
||||
/*
|
||||
* Each se_device has a per cpu work this can be run from. Wwe
|
||||
* Each se_device has a per cpu work this can be run from. We
|
||||
* shouldn't have multiple threads on the same cpu calling this
|
||||
* at the same time.
|
||||
*/
|
||||
ib_dev_plug = &ib_dev->ibd_plug[smp_processor_id()];
|
||||
ib_dev_plug = &ib_dev->ibd_plug[raw_smp_processor_id()];
|
||||
if (test_and_set_bit(IBD_PLUGF_PLUGGED, &ib_dev_plug->flags))
|
||||
return NULL;
|
||||
|
||||
|
@ -1416,7 +1416,7 @@ void __target_init_cmd(
|
||||
cmd->orig_fe_lun = unpacked_lun;
|
||||
|
||||
if (!(cmd->se_cmd_flags & SCF_USE_CPUID))
|
||||
cmd->cpuid = smp_processor_id();
|
||||
cmd->cpuid = raw_smp_processor_id();
|
||||
|
||||
cmd->state_active = false;
|
||||
}
|
||||
|
@ -516,8 +516,10 @@ static inline int tcmu_get_empty_block(struct tcmu_dev *udev,
|
||||
dpi = dbi * udev->data_pages_per_blk;
|
||||
/* Count the number of already allocated pages */
|
||||
xas_set(&xas, dpi);
|
||||
rcu_read_lock();
|
||||
for (cnt = 0; xas_next(&xas) && cnt < page_cnt;)
|
||||
cnt++;
|
||||
rcu_read_unlock();
|
||||
|
||||
for (i = cnt; i < page_cnt; i++) {
|
||||
/* try to get new page from the mm */
|
||||
@ -699,11 +701,10 @@ static inline void tcmu_copy_data(struct tcmu_dev *udev,
|
||||
struct scatterlist *sg, unsigned int sg_nents,
|
||||
struct iovec **iov, size_t data_len)
|
||||
{
|
||||
XA_STATE(xas, &udev->data_pages, 0);
|
||||
/* start value of dbi + 1 must not be a valid dbi */
|
||||
int dbi = -2;
|
||||
size_t page_remaining, cp_len;
|
||||
int page_cnt, page_inx;
|
||||
int page_cnt, page_inx, dpi;
|
||||
struct sg_mapping_iter sg_iter;
|
||||
unsigned int sg_flags;
|
||||
struct page *page;
|
||||
@ -726,9 +727,10 @@ static inline void tcmu_copy_data(struct tcmu_dev *udev,
|
||||
if (page_cnt > udev->data_pages_per_blk)
|
||||
page_cnt = udev->data_pages_per_blk;
|
||||
|
||||
xas_set(&xas, dbi * udev->data_pages_per_blk);
|
||||
for (page_inx = 0; page_inx < page_cnt && data_len; page_inx++) {
|
||||
page = xas_next(&xas);
|
||||
dpi = dbi * udev->data_pages_per_blk;
|
||||
for (page_inx = 0; page_inx < page_cnt && data_len;
|
||||
page_inx++, dpi++) {
|
||||
page = xa_load(&udev->data_pages, dpi);
|
||||
|
||||
if (direction == TCMU_DATA_AREA_TO_SG)
|
||||
flush_dcache_page(page);
|
||||
|
Loading…
Reference in New Issue
Block a user