mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 13:14:07 +08:00
SCSI misc on 20191207
11 patches, all in drivers (no core changes) that are either minor cleanups or small fixes. They were late arriving, but still safe for -rc1. Signed-off-by: James E.J. Bottomley <jejb@linux.ibm.com> -----BEGIN PGP SIGNATURE----- iJwEABMIAEQWIQTnYEDbdso9F2cI+arnQslM7pishQUCXeyDEiYcamFtZXMuYm90 dG9tbGV5QGhhbnNlbnBhcnRuZXJzaGlwLmNvbQAKCRDnQslM7pishbijAQDIuM45 xeEXgWXF8c/tYuvildK1WjyVzwBO2k563lUmYQEA4rxSzkmhtcaMTDuk4hI4Y4TP p87U1bXNSJ7tCpFU15w= =W43H -----END PGP SIGNATURE----- Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull more SCSI updates from James Bottomley: "Eleven patches, all in drivers (no core changes) that are either minor cleanups or small fixes. They were late arriving, but still safe for -rc1" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: MAINTAINERS: Add the linux-scsi mailing list to the ISCSI entry scsi: megaraid_sas: Make poll_aen_lock static scsi: sd_zbc: Improve report zones error printout scsi: qla2xxx: Fix qla2x00_request_irqs() for MSI scsi: qla2xxx: unregister ports after GPN_FT failure scsi: qla2xxx: fix rports not being mark as lost in sync fabric scan scsi: pm80xx: Remove unused include of linux/version.h scsi: pm80xx: fix logic to break out of loop when register value is 2 or 3 scsi: scsi_transport_sas: Fix memory leak when removing devices scsi: lpfc: size cpu map by last cpu id set scsi: ibmvscsi_tgt: Remove unneeded variable rc
This commit is contained in:
commit
138f371ddf
@ -8764,6 +8764,7 @@ ISCSI
|
||||
M: Lee Duncan <lduncan@suse.com>
|
||||
M: Chris Leech <cleech@redhat.com>
|
||||
L: open-iscsi@googlegroups.com
|
||||
L: linux-scsi@vger.kernel.org
|
||||
W: www.open-iscsi.com
|
||||
S: Maintained
|
||||
F: drivers/scsi/*iscsi*
|
||||
|
@ -2354,7 +2354,6 @@ static long ibmvscsis_srp_i_logout(struct scsi_info *vscsi,
|
||||
{
|
||||
struct iu_entry *iue = cmd->iue;
|
||||
struct srp_i_logout *log_out = &vio_iu(iue)->srp.i_logout;
|
||||
long rc = ADAPT_SUCCESS;
|
||||
|
||||
if ((vscsi->debit > 0) || !list_empty(&vscsi->schedule_q) ||
|
||||
!list_empty(&vscsi->waiting_rsp)) {
|
||||
@ -2370,7 +2369,7 @@ static long ibmvscsis_srp_i_logout(struct scsi_info *vscsi,
|
||||
ibmvscsis_post_disconnect(vscsi, WAIT_IDLE, 0);
|
||||
}
|
||||
|
||||
return rc;
|
||||
return ADAPT_SUCCESS;
|
||||
}
|
||||
|
||||
/* Called with intr lock held */
|
||||
|
@ -6460,7 +6460,7 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba)
|
||||
u32 if_fam;
|
||||
|
||||
phba->sli4_hba.num_present_cpu = lpfc_present_cpu;
|
||||
phba->sli4_hba.num_possible_cpu = num_possible_cpus();
|
||||
phba->sli4_hba.num_possible_cpu = cpumask_last(cpu_possible_mask) + 1;
|
||||
phba->sli4_hba.curr_disp_cpu = 0;
|
||||
lpfc_cpumask_of_node_init(phba);
|
||||
|
||||
|
@ -199,7 +199,7 @@ static bool support_nvme_encapsulation;
|
||||
static bool support_pci_lane_margining;
|
||||
|
||||
/* define lock for aen poll */
|
||||
spinlock_t poll_aen_lock;
|
||||
static spinlock_t poll_aen_lock;
|
||||
|
||||
extern struct dentry *megasas_debugfs_root;
|
||||
extern void megasas_init_debugfs(void);
|
||||
|
@ -37,7 +37,6 @@
|
||||
* POSSIBILITY OF SUCH DAMAGES.
|
||||
*
|
||||
*/
|
||||
#include <linux/version.h>
|
||||
#include <linux/slab.h>
|
||||
#include "pm8001_sas.h"
|
||||
#include "pm80xx_hwi.h"
|
||||
@ -348,7 +347,7 @@ moreData:
|
||||
do {
|
||||
reg_val = pm8001_mr32(fatal_table_address,
|
||||
MPI_FATAL_EDUMP_TABLE_STATUS);
|
||||
} while (((reg_val != 2) || (reg_val != 3)) &&
|
||||
} while (((reg_val != 2) && (reg_val != 3)) &&
|
||||
time_before(jiffies, start));
|
||||
|
||||
if (reg_val < 2) {
|
||||
|
@ -3587,12 +3587,23 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, srb_t *sp)
|
||||
if (vha->scan.scan_retry < MAX_SCAN_RETRIES) {
|
||||
set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags);
|
||||
set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags);
|
||||
goto out;
|
||||
} else {
|
||||
ql_dbg(ql_dbg_disc + ql_dbg_verbose, vha, 0xffff,
|
||||
ql_dbg(ql_dbg_disc, vha, 0xffff,
|
||||
"%s: Fabric scan failed for %d retries.\n",
|
||||
__func__, vha->scan.scan_retry);
|
||||
/*
|
||||
* Unable to scan any rports. logout loop below
|
||||
* will unregister all sessions.
|
||||
*/
|
||||
list_for_each_entry(fcport, &vha->vp_fcports, list) {
|
||||
if ((fcport->flags & FCF_FABRIC_DEVICE) != 0) {
|
||||
fcport->scan_state = QLA_FCPORT_SCAN;
|
||||
fcport->logout_on_delete = 0;
|
||||
}
|
||||
}
|
||||
goto login_logout;
|
||||
}
|
||||
goto out;
|
||||
}
|
||||
vha->scan.scan_retry = 0;
|
||||
|
||||
@ -3670,6 +3681,7 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, srb_t *sp)
|
||||
dup_cnt);
|
||||
}
|
||||
|
||||
login_logout:
|
||||
/*
|
||||
* Logout all previous fabric dev marked lost, except FCP2 devices.
|
||||
*/
|
||||
|
@ -5898,8 +5898,7 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *vha)
|
||||
if (test_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags))
|
||||
break;
|
||||
|
||||
if ((fcport->flags & FCF_FABRIC_DEVICE) == 0 ||
|
||||
(fcport->flags & FCF_LOGIN_NEEDED) == 0)
|
||||
if ((fcport->flags & FCF_FABRIC_DEVICE) == 0)
|
||||
continue;
|
||||
|
||||
if (fcport->scan_state == QLA_FCPORT_SCAN) {
|
||||
@ -5922,7 +5921,8 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *vha)
|
||||
}
|
||||
}
|
||||
|
||||
if (fcport->scan_state == QLA_FCPORT_FOUND)
|
||||
if (fcport->scan_state == QLA_FCPORT_FOUND &&
|
||||
(fcport->flags & FCF_LOGIN_NEEDED) != 0)
|
||||
qla24xx_fcport_handle_login(vha, fcport);
|
||||
}
|
||||
return (rval);
|
||||
|
@ -3650,7 +3650,7 @@ qla2x00_request_irqs(struct qla_hw_data *ha, struct rsp_que *rsp)
|
||||
skip_msix:
|
||||
|
||||
ql_log(ql_log_info, vha, 0x0037,
|
||||
"Falling back-to MSI mode -%d.\n", ret);
|
||||
"Falling back-to MSI mode -- ret=%d.\n", ret);
|
||||
|
||||
if (!IS_QLA24XX(ha) && !IS_QLA2532(ha) && !IS_QLA8432(ha) &&
|
||||
!IS_QLA8001(ha) && !IS_P3P_TYPE(ha) && !IS_QLAFX00(ha) &&
|
||||
@ -3658,13 +3658,13 @@ skip_msix:
|
||||
goto skip_msi;
|
||||
|
||||
ret = pci_alloc_irq_vectors(ha->pdev, 1, 1, PCI_IRQ_MSI);
|
||||
if (!ret) {
|
||||
if (ret > 0) {
|
||||
ql_dbg(ql_dbg_init, vha, 0x0038,
|
||||
"MSI: Enabled.\n");
|
||||
ha->flags.msi_enabled = 1;
|
||||
} else
|
||||
ql_log(ql_log_warn, vha, 0x0039,
|
||||
"Falling back-to INTa mode -- %d.\n", ret);
|
||||
"Falling back-to INTa mode -- ret=%d.\n", ret);
|
||||
skip_msi:
|
||||
|
||||
/* Skip INTx on ISP82xx. */
|
||||
|
@ -1391,9 +1391,6 @@ static void sas_expander_release(struct device *dev)
|
||||
struct sas_rphy *rphy = dev_to_rphy(dev);
|
||||
struct sas_expander_device *edev = rphy_to_expander_device(rphy);
|
||||
|
||||
if (rphy->q)
|
||||
blk_cleanup_queue(rphy->q);
|
||||
|
||||
put_device(dev->parent);
|
||||
kfree(edev);
|
||||
}
|
||||
@ -1403,9 +1400,6 @@ static void sas_end_device_release(struct device *dev)
|
||||
struct sas_rphy *rphy = dev_to_rphy(dev);
|
||||
struct sas_end_device *edev = rphy_to_end_device(rphy);
|
||||
|
||||
if (rphy->q)
|
||||
blk_cleanup_queue(rphy->q);
|
||||
|
||||
put_device(dev->parent);
|
||||
kfree(edev);
|
||||
}
|
||||
@ -1634,8 +1628,7 @@ sas_rphy_remove(struct sas_rphy *rphy)
|
||||
}
|
||||
|
||||
sas_rphy_unlink(rphy);
|
||||
if (rphy->q)
|
||||
bsg_unregister_queue(rphy->q);
|
||||
bsg_remove_queue(rphy->q);
|
||||
transport_remove_device(dev);
|
||||
device_del(dev);
|
||||
}
|
||||
|
@ -122,8 +122,6 @@ static void sd_eh_reset(struct scsi_cmnd *);
|
||||
static int sd_eh_action(struct scsi_cmnd *, int);
|
||||
static void sd_read_capacity(struct scsi_disk *sdkp, unsigned char *buffer);
|
||||
static void scsi_disk_release(struct device *cdev);
|
||||
static void sd_print_sense_hdr(struct scsi_disk *, struct scsi_sense_hdr *);
|
||||
static void sd_print_result(const struct scsi_disk *, const char *, int);
|
||||
|
||||
static DEFINE_IDA(sd_index_ida);
|
||||
|
||||
@ -3726,15 +3724,13 @@ static void __exit exit_sd(void)
|
||||
module_init(init_sd);
|
||||
module_exit(exit_sd);
|
||||
|
||||
static void sd_print_sense_hdr(struct scsi_disk *sdkp,
|
||||
struct scsi_sense_hdr *sshdr)
|
||||
void sd_print_sense_hdr(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr)
|
||||
{
|
||||
scsi_print_sense_hdr(sdkp->device,
|
||||
sdkp->disk ? sdkp->disk->disk_name : NULL, sshdr);
|
||||
}
|
||||
|
||||
static void sd_print_result(const struct scsi_disk *sdkp, const char *msg,
|
||||
int result)
|
||||
void sd_print_result(const struct scsi_disk *sdkp, const char *msg, int result)
|
||||
{
|
||||
const char *hb_string = scsi_hostbyte_string(result);
|
||||
const char *db_string = scsi_driverbyte_string(result);
|
||||
@ -3749,4 +3745,3 @@ static void sd_print_result(const struct scsi_disk *sdkp, const char *msg,
|
||||
"%s: Result: hostbyte=0x%02x driverbyte=0x%02x\n",
|
||||
msg, host_byte(result), driver_byte(result));
|
||||
}
|
||||
|
||||
|
@ -241,4 +241,7 @@ static inline void sd_zbc_complete(struct scsi_cmnd *cmd,
|
||||
|
||||
#endif /* CONFIG_BLK_DEV_ZONED */
|
||||
|
||||
void sd_print_sense_hdr(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr);
|
||||
void sd_print_result(const struct scsi_disk *sdkp, const char *msg, int result);
|
||||
|
||||
#endif /* _SCSI_DISK_H */
|
||||
|
@ -80,9 +80,11 @@ static int sd_zbc_do_report_zones(struct scsi_disk *sdkp, unsigned char *buf,
|
||||
timeout, SD_MAX_RETRIES, NULL);
|
||||
if (result) {
|
||||
sd_printk(KERN_ERR, sdkp,
|
||||
"REPORT ZONES lba %llu failed with %d/%d\n",
|
||||
(unsigned long long)lba,
|
||||
host_byte(result), driver_byte(result));
|
||||
"REPORT ZONES start lba %llu failed\n", lba);
|
||||
sd_print_result(sdkp, "REPORT ZONES", result);
|
||||
if (driver_byte(result) == DRIVER_SENSE &&
|
||||
scsi_sense_valid(&sshdr))
|
||||
sd_print_sense_hdr(sdkp, &sshdr);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user