forked from Minki/linux
NTB bug fixes to address a crash when unloading the ntb module, a DMA
engine unmap leak, allowing the proper queue choice, and clearing the SKX irq bit. -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJYpnm1AAoJEG5mS6x6i9Ij0tQP/0JKQr5pi7vUew9oq05mneTU rS8cqlOd0skVHwJgpmouLqxPMrjq0un1llldrBkG+HivSm7oHw2GAFETZ4lKg2g7 ljxvKz1t+UlKIQKQX/cJtLa8CaXSYMeB5ucrGW/1ECsP6T29RruSnZAQrHFFKK0A 7zvCFf3shiTJUvJ0LjOpSbaR555LdzkZt/eg1kjVxa/cFTW1863zJeNplgf3Bc8T jcvTu/VFOqki4ztZZ6dhFKO+gKX92vb85Zv7URwmYMmETn1RRNhMtv3x7hKstUaG etJfBwwEgWm7V78tQjAwSgj366Tg57TMjXx9bvNZrZloNDrd1K+WL0MQgjBKLV3J xaAO482XGoeGmnFDFqEp1A5zkAnU7b3ekE/Pfl5vlWzP9tvRZJhardYSLcst8gLs KwlezYl6PKgz5swjqmg/AyOjvDGKA4GsjnWJp/g+LYokJr67fP5vduAW2yB1W+0j HO8SBJtDtdrwJqLo90sfbmE/OPr9WQPG9kxm5wOK6GJOLzH5J+JghRvRVst/y3r1 flsIhrHjjMAoYESb+or2Tyy5nNugJTDyZLha4RfnOR3HPqnwLFMYpb9QxyTQNKZt 1PbUpFbfg9ZRxSCYhXOmRp0xw9MWfsHZHQ6Lh8dKFTClVFHnNTncGKingMUeZMGO lq+gRC19pSDR25VnKEpE =H1cE -----END PGP SIGNATURE----- Merge tag 'ntb-4.10-bugfixes' of git://github.com/jonmason/ntb Pull NTB bugfixes frfom Jon Mason: "NTB bug fixes to address a crash when unloading the ntb module, a DMA engine unmap leak, allowing the proper queue choice, and clearing the SKX irq bit" * tag 'ntb-4.10-bugfixes' of git://github.com/jonmason/ntb: ntb: ntb_hw_intel: link_poll isn't clearing the pending status properly ntb_transport: Pick an unused queue ntb: ntb_perf missing dmaengine_unmap_put NTB: ntb_transport: fix debugfs_remove_recursive
This commit is contained in:
commit
7ed1b12559
@ -1629,6 +1629,28 @@ static void atom_deinit_dev(struct intel_ntb_dev *ndev)
|
||||
|
||||
/* Skylake Xeon NTB */
|
||||
|
||||
static int skx_poll_link(struct intel_ntb_dev *ndev)
|
||||
{
|
||||
u16 reg_val;
|
||||
int rc;
|
||||
|
||||
ndev->reg->db_iowrite(ndev->db_link_mask,
|
||||
ndev->self_mmio +
|
||||
ndev->self_reg->db_clear);
|
||||
|
||||
rc = pci_read_config_word(ndev->ntb.pdev,
|
||||
SKX_LINK_STATUS_OFFSET, ®_val);
|
||||
if (rc)
|
||||
return 0;
|
||||
|
||||
if (reg_val == ndev->lnk_sta)
|
||||
return 0;
|
||||
|
||||
ndev->lnk_sta = reg_val;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static u64 skx_db_ioread(void __iomem *mmio)
|
||||
{
|
||||
return ioread64(mmio);
|
||||
@ -2852,7 +2874,7 @@ static struct intel_b2b_addr xeon_b2b_dsd_addr = {
|
||||
};
|
||||
|
||||
static const struct intel_ntb_reg skx_reg = {
|
||||
.poll_link = xeon_poll_link,
|
||||
.poll_link = skx_poll_link,
|
||||
.link_is_up = xeon_link_is_up,
|
||||
.db_ioread = skx_db_ioread,
|
||||
.db_iowrite = skx_db_iowrite,
|
||||
|
@ -1802,7 +1802,7 @@ ntb_transport_create_queue(void *data, struct device *client_dev,
|
||||
|
||||
node = dev_to_node(&ndev->dev);
|
||||
|
||||
free_queue = ffs(nt->qp_bitmap);
|
||||
free_queue = ffs(nt->qp_bitmap_free);
|
||||
if (!free_queue)
|
||||
goto err;
|
||||
|
||||
@ -2273,9 +2273,8 @@ module_init(ntb_transport_init);
|
||||
|
||||
static void __exit ntb_transport_exit(void)
|
||||
{
|
||||
debugfs_remove_recursive(nt_debugfs_dir);
|
||||
|
||||
ntb_unregister_client(&ntb_transport_client);
|
||||
bus_unregister(&ntb_transport_bus);
|
||||
debugfs_remove_recursive(nt_debugfs_dir);
|
||||
}
|
||||
module_exit(ntb_transport_exit);
|
||||
|
@ -265,6 +265,8 @@ static ssize_t perf_copy(struct pthr_ctx *pctx, char __iomem *dst,
|
||||
if (dma_submit_error(cookie))
|
||||
goto err_set_unmap;
|
||||
|
||||
dmaengine_unmap_put(unmap);
|
||||
|
||||
atomic_inc(&pctx->dma_sync);
|
||||
dma_async_issue_pending(chan);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user