diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-21 11:51:42 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-21 11:51:42 -0800 |
commit | cdc194705d26fdd7fc5446b5d830f2bbe2b22c30 (patch) | |
tree | 91a643f38d490e092855792576a7e903a419cfe1 /drivers/scsi/cxlflash/lunmgt.c | |
parent | 772c8f6f3bbd3ceb94a89373473083e3e1113554 (diff) | |
parent | d1da522fb8a70b8c527d4ad15f9e62218cc00f2c (diff) |
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI updates from James Bottomley:
"This update includes the usual round of major driver updates (ncr5380,
ufs, lpfc, be2iscsi, hisi_sas, storvsc, cxlflash, aacraid,
megaraid_sas, ...).
There's also an assortment of minor fixes and the major update of
switching a bunch of drivers to pci_alloc_irq_vectors from Christoph"
* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (188 commits)
scsi: megaraid_sas: handle dma_addr_t right on 32-bit
scsi: megaraid_sas: array overflow in megasas_dump_frame()
scsi: snic: switch to pci_irq_alloc_vectors
scsi: megaraid_sas: driver version upgrade
scsi: megaraid_sas: Change RAID_1_10_RMW_CMDS to RAID_1_PEER_CMDS and set value to 2
scsi: megaraid_sas: Indentation and smatch warning fixes
scsi: megaraid_sas: Cleanup VD_EXT_DEBUG and SPAN_DEBUG related debug prints
scsi: megaraid_sas: Increase internal command pool
scsi: megaraid_sas: Use synchronize_irq to wait for IRQs to complete
scsi: megaraid_sas: Bail out the driver load if ld_list_query fails
scsi: megaraid_sas: Change build_mpt_mfi_pass_thru to return void
scsi: megaraid_sas: During OCR, if get_ctrl_info fails do not continue with OCR
scsi: megaraid_sas: Do not set fp_possible if TM capable for non-RW syspdIO, change fp_possible to bool
scsi: megaraid_sas: Remove unused pd_index from megasas_build_ld_nonrw_fusion
scsi: megaraid_sas: megasas_return_cmd does not memset IO frame to zero
scsi: megaraid_sas: max_fw_cmds are decremented twice, remove duplicate
scsi: megaraid_sas: update can_queue only if the new value is less
scsi: megaraid_sas: Change max_cmd from u32 to u16 in all functions
scsi: megaraid_sas: set pd_after_lb from MR_BuildRaidContext and initialize pDevHandle to MR_DEVHANDLE_INVALID
scsi: megaraid_sas: latest controller OCR capability from FW before sending shutdown DCMD
...
Diffstat (limited to 'drivers/scsi/cxlflash/lunmgt.c')
-rw-r--r-- | drivers/scsi/cxlflash/lunmgt.c | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/drivers/scsi/cxlflash/lunmgt.c b/drivers/scsi/cxlflash/lunmgt.c index 6c318db90c85..0efed177cc8b 100644 --- a/drivers/scsi/cxlflash/lunmgt.c +++ b/drivers/scsi/cxlflash/lunmgt.c @@ -32,11 +32,13 @@ */ static struct llun_info *create_local(struct scsi_device *sdev, u8 *wwid) { + struct cxlflash_cfg *cfg = shost_priv(sdev->host); + struct device *dev = &cfg->dev->dev; struct llun_info *lli = NULL; lli = kzalloc(sizeof(*lli), GFP_KERNEL); if (unlikely(!lli)) { - pr_err("%s: could not allocate lli\n", __func__); + dev_err(dev, "%s: could not allocate lli\n", __func__); goto out; } @@ -58,11 +60,13 @@ out: */ static struct glun_info *create_global(struct scsi_device *sdev, u8 *wwid) { + struct cxlflash_cfg *cfg = shost_priv(sdev->host); + struct device *dev = &cfg->dev->dev; struct glun_info *gli = NULL; gli = kzalloc(sizeof(*gli), GFP_KERNEL); if (unlikely(!gli)) { - pr_err("%s: could not allocate gli\n", __func__); + dev_err(dev, "%s: could not allocate gli\n", __func__); goto out; } @@ -129,10 +133,10 @@ static struct glun_info *lookup_global(u8 *wwid) */ static struct llun_info *find_and_create_lun(struct scsi_device *sdev, u8 *wwid) { + struct cxlflash_cfg *cfg = shost_priv(sdev->host); + struct device *dev = &cfg->dev->dev; struct llun_info *lli = NULL; struct glun_info *gli = NULL; - struct Scsi_Host *shost = sdev->host; - struct cxlflash_cfg *cfg = shost_priv(shost); if (unlikely(!wwid)) goto out; @@ -165,7 +169,7 @@ static struct llun_info *find_and_create_lun(struct scsi_device *sdev, u8 *wwid) list_add(&gli->list, &global.gluns); out: - pr_debug("%s: returning %p\n", __func__, lli); + dev_dbg(dev, "%s: returning lli=%p, gli=%p\n", __func__, lli, gli); return lli; } @@ -225,17 +229,18 @@ void cxlflash_term_global_luns(void) int cxlflash_manage_lun(struct scsi_device *sdev, struct dk_cxlflash_manage_lun *manage) { - int rc = 0; + struct cxlflash_cfg *cfg = shost_priv(sdev->host); + struct device *dev = &cfg->dev->dev; struct llun_info *lli = NULL; + int rc = 0; u64 flags = manage->hdr.flags; u32 chan = sdev->channel; mutex_lock(&global.mutex); lli = find_and_create_lun(sdev, manage->wwid); - pr_debug("%s: ENTER: WWID = %016llX%016llX, flags = %016llX li = %p\n", - __func__, get_unaligned_be64(&manage->wwid[0]), - get_unaligned_be64(&manage->wwid[8]), - manage->hdr.flags, lli); + dev_dbg(dev, "%s: WWID=%016llx%016llx, flags=%016llx lli=%p\n", + __func__, get_unaligned_be64(&manage->wwid[0]), + get_unaligned_be64(&manage->wwid[8]), manage->hdr.flags, lli); if (unlikely(!lli)) { rc = -ENOMEM; goto out; @@ -265,11 +270,11 @@ int cxlflash_manage_lun(struct scsi_device *sdev, } } - pr_debug("%s: port_sel = %08X chan = %u lun_id = %016llX\n", __func__, - lli->port_sel, chan, lli->lun_id[chan]); + dev_dbg(dev, "%s: port_sel=%08x chan=%u lun_id=%016llx\n", + __func__, lli->port_sel, chan, lli->lun_id[chan]); out: mutex_unlock(&global.mutex); - pr_debug("%s: returning rc=%d\n", __func__, rc); + dev_dbg(dev, "%s: returning rc=%d\n", __func__, rc); return rc; } |