block-5.9-2020-09-22
-----BEGIN PGP SIGNATURE----- iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAl9qLq8QHGF4Ym9lQGtl cm5lbC5kawAKCRD301j7KXHgpqrCD/4hjvDuZIDMZILnOhHtZPB+q1bnf48dcB2v WQlDJAZVDKIdBy49gN2mraLwbeKvnzTv25kfZkXZPL4F32TuXK8E57tHPCYEq5li qb6y3o0Y1y0p78PtYittfWeUWaYkT2v91QQjLc6Vyh8swL15XDQ37lBw7qqtNUhw WMTS1Q2bw0wjltRAC5XSTD73PwcjFMYhE/1YBWE4vckaB1K+kLN6RRaVZ03unC/U zhSd2WqZyHwaEsl66Vtl7ty+SMoqahfXNvBcvvLVY6mD2U0hLWCBlnWY5SjYmzLZ 3lVqmiL+diaAoDRroQnpFkAJSRnnWv3g3gWbygbSKJScFGKh15k7Px4ztWr233Xb KZtoZN826PhSkujIB8wKaFrrx3Zz00a9flqvum2ejOQAP5FiS2QRLlaZuf2U2xqm 5AhZ7ul1qm9kik0ZULPBY1myK1Y8sSoKSnu3WAVUPo974fAPTvhWUpO+i6SssYWu oI2VUK9BvcgP1MjMms1EYEpY8rg8G+TGzN+P6jJcBirAAecdpXhLaLwOdEQC9De/ P/OfyHg6lIgs9PP0NOp8BeUDQe9bDW8gNxv57R57+N7ZIKP0443LwSaHpmFInBC+ lxAGcghsl++TZZ+sCDM8Lkw5IZWcc/czewHzVFVMjpnivt0kuQrndFyOxRdHjggy 4Vo1Sa1Ahg== =zT03 -----END PGP SIGNATURE----- Merge tag 'block-5.9-2020-09-22' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A few NVMe fixes, and a dasd write zero fix" * tag 'block-5.9-2020-09-22' of git://git.kernel.dk/linux-block: nvmet: get transport reference for passthru ctrl nvme-core: get/put ctrl and transport module in nvme_dev_open/release() nvme-tcp: fix kconfig dependency warning when !CRYPTO nvme-pci: disable the write zeros command for Intel 600P/P3100 s390/dasd: Fix zero write for FBA devices
This commit is contained in:
commit
c37b718922
@ -73,6 +73,7 @@ config NVME_TCP
|
||||
depends on INET
|
||||
depends on BLK_DEV_NVME
|
||||
select NVME_FABRICS
|
||||
select CRYPTO
|
||||
select CRYPTO_CRC32C
|
||||
help
|
||||
This provides support for the NVMe over Fabrics protocol using
|
||||
|
@ -3261,10 +3261,24 @@ static int nvme_dev_open(struct inode *inode, struct file *file)
|
||||
return -EWOULDBLOCK;
|
||||
}
|
||||
|
||||
nvme_get_ctrl(ctrl);
|
||||
if (!try_module_get(ctrl->ops->module))
|
||||
return -EINVAL;
|
||||
|
||||
file->private_data = ctrl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int nvme_dev_release(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct nvme_ctrl *ctrl =
|
||||
container_of(inode->i_cdev, struct nvme_ctrl, cdev);
|
||||
|
||||
module_put(ctrl->ops->module);
|
||||
nvme_put_ctrl(ctrl);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int nvme_dev_user_cmd(struct nvme_ctrl *ctrl, void __user *argp)
|
||||
{
|
||||
struct nvme_ns *ns;
|
||||
@ -3327,6 +3341,7 @@ static long nvme_dev_ioctl(struct file *file, unsigned int cmd,
|
||||
static const struct file_operations nvme_dev_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = nvme_dev_open,
|
||||
.release = nvme_dev_release,
|
||||
.unlocked_ioctl = nvme_dev_ioctl,
|
||||
.compat_ioctl = compat_ptr_ioctl,
|
||||
};
|
||||
|
@ -3153,7 +3153,8 @@ static const struct pci_device_id nvme_id_table[] = {
|
||||
{ PCI_VDEVICE(INTEL, 0xf1a5), /* Intel 600P/P3100 */
|
||||
.driver_data = NVME_QUIRK_NO_DEEPEST_PS |
|
||||
NVME_QUIRK_MEDIUM_PRIO_SQ |
|
||||
NVME_QUIRK_NO_TEMP_THRESH_CHANGE },
|
||||
NVME_QUIRK_NO_TEMP_THRESH_CHANGE |
|
||||
NVME_QUIRK_DISABLE_WRITE_ZEROES, },
|
||||
{ PCI_VDEVICE(INTEL, 0xf1a6), /* Intel 760p/Pro 7600p */
|
||||
.driver_data = NVME_QUIRK_IGNORE_DEV_SUBNQN, },
|
||||
{ PCI_VDEVICE(INTEL, 0x5845), /* Qemu emulated controller */
|
||||
|
@ -517,6 +517,7 @@ int nvmet_passthru_ctrl_enable(struct nvmet_subsys *subsys)
|
||||
subsys->ver = NVME_VS(1, 2, 1);
|
||||
}
|
||||
|
||||
__module_get(subsys->passthru_ctrl->ops->module);
|
||||
mutex_unlock(&subsys->lock);
|
||||
return 0;
|
||||
|
||||
@ -531,6 +532,7 @@ static void __nvmet_passthru_ctrl_disable(struct nvmet_subsys *subsys)
|
||||
{
|
||||
if (subsys->passthru_ctrl) {
|
||||
xa_erase(&passthru_subsystems, subsys->passthru_ctrl->cntlid);
|
||||
module_put(subsys->passthru_ctrl->ops->module);
|
||||
nvme_put_ctrl(subsys->passthru_ctrl);
|
||||
}
|
||||
subsys->passthru_ctrl = NULL;
|
||||
|
@ -40,6 +40,7 @@
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
static struct dasd_discipline dasd_fba_discipline;
|
||||
static void *dasd_fba_zero_page;
|
||||
|
||||
struct dasd_fba_private {
|
||||
struct dasd_fba_characteristics rdc_data;
|
||||
@ -270,7 +271,7 @@ static void ccw_write_zero(struct ccw1 *ccw, int count)
|
||||
ccw->cmd_code = DASD_FBA_CCW_WRITE;
|
||||
ccw->flags |= CCW_FLAG_SLI;
|
||||
ccw->count = count;
|
||||
ccw->cda = (__u32) (addr_t) page_to_phys(ZERO_PAGE(0));
|
||||
ccw->cda = (__u32) (addr_t) dasd_fba_zero_page;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -830,6 +831,11 @@ dasd_fba_init(void)
|
||||
int ret;
|
||||
|
||||
ASCEBC(dasd_fba_discipline.ebcname, 4);
|
||||
|
||||
dasd_fba_zero_page = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA);
|
||||
if (!dasd_fba_zero_page)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = ccw_driver_register(&dasd_fba_driver);
|
||||
if (!ret)
|
||||
wait_for_device_probe();
|
||||
@ -841,6 +847,7 @@ static void __exit
|
||||
dasd_fba_cleanup(void)
|
||||
{
|
||||
ccw_driver_unregister(&dasd_fba_driver);
|
||||
free_page((unsigned long)dasd_fba_zero_page);
|
||||
}
|
||||
|
||||
module_init(dasd_fba_init);
|
||||
|
Loading…
Reference in New Issue
Block a user