linux/include/rdma
Bart Van Assche 1e974c08c7 RDMA/core: Fix ib_dma_max_seg_size()
commit ecdfdfdbe4 upstream.

If dev->dma_device->params == NULL then the maximum DMA segment size is 64
KB. See also the dma_get_max_seg_size() implementation. This patch fixes
the following kernel warning:

  DMA-API: infiniband rxe0: mapping sg segment longer than device claims to support [len=126976] [max=65536]
  WARNING: CPU: 4 PID: 4848 at kernel/dma/debug.c:1220 debug_dma_map_sg+0x3d9/0x450
  RIP: 0010:debug_dma_map_sg+0x3d9/0x450
  Call Trace:
   srp_queuecommand+0x626/0x18d0 [ib_srp]
   scsi_queue_rq+0xd02/0x13e0 [scsi_mod]
   __blk_mq_try_issue_directly+0x2b3/0x3f0
   blk_mq_request_issue_directly+0xac/0xf0
   blk_insert_cloned_request+0xdf/0x170
   dm_mq_queue_rq+0x43d/0x830 [dm_mod]
   __blk_mq_try_issue_directly+0x2b3/0x3f0
   blk_mq_request_issue_directly+0xac/0xf0
   blk_mq_try_issue_list_directly+0xb8/0x170
   blk_mq_sched_insert_requests+0x23c/0x3b0
   blk_mq_flush_plug_list+0x529/0x730
   blk_flush_plug_list+0x21f/0x260
   blk_mq_make_request+0x56b/0xf20
   generic_make_request+0x196/0x660
   submit_bio+0xae/0x290
   blkdev_direct_IO+0x822/0x900
   generic_file_direct_write+0x110/0x200
   __generic_file_write_iter+0x124/0x2a0
   blkdev_write_iter+0x168/0x270
   aio_write+0x1c4/0x310
   io_submit_one+0x971/0x1390
   __x64_sys_io_submit+0x12a/0x390
   do_syscall_64+0x6f/0x2e0
   entry_SYSCALL_64_after_hwframe+0x49/0xbe

Link: https://lore.kernel.org/r/20191025225830.257535-2-bvanassche@acm.org
Cc: <stable@vger.kernel.org>
Fixes: 0b5cb3300a ("RDMA/srp: Increase max_segment_size")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-17 19:56:41 +01:00
..
ib.h RDMA: Make most headers compile stand alone 2019-07-25 13:58:47 -03:00
ib_addr.h
ib_cache.h
ib_cm.h
ib_fmr_pool.h
ib_hdrs.h
ib_mad.h
ib_marshall.h
ib_pack.h
ib_pma.h
ib_sa.h
ib_smi.h
ib_umem.h RDMA/odp: remove ib_ucontext from ib_umem 2019-08-21 20:58:19 -03:00
ib_umem_odp.h RDMA/odp: use mmu_notifier_get/put for 'struct ib_ucontext_per_mm' 2019-08-21 20:58:18 -03:00
ib_verbs.h RDMA/core: Fix ib_dma_max_seg_size() 2019-12-17 19:56:41 +01:00
iw_cm.h
iw_portmap.h RDMA: Make most headers compile stand alone 2019-07-25 13:58:47 -03:00
mr_pool.h
opa_addr.h
opa_port_info.h RDMA: Make most headers compile stand alone 2019-07-25 13:58:47 -03:00
opa_smi.h
opa_vnic.h
rdma_cm.h
rdma_cm_ib.h
rdma_counter.h RDMA/core: Make rdma_counter.h compile stand alone 2019-07-09 09:44:47 -03:00
rdma_netlink.h RDMA/core: Support netlink commands in non init_net net namespaces 2019-07-25 14:12:41 -03:00
rdma_vt.h IB/{rdmavt, hfi1, qib}: Add a counter for credit waits 2019-09-13 16:59:55 -03:00
rdmavt_cq.h RDMA: Make most headers compile stand alone 2019-07-25 13:58:47 -03:00
rdmavt_mr.h
rdmavt_qp.h IB/{rdmavt, hfi1, qib}: Add a counter for credit waits 2019-09-13 16:59:55 -03:00
restrack.h RDMA/restrack: Rewrite PID namespace check to be reliable 2019-08-20 13:44:44 -04:00
rw.h
signature.h RDMA: Make most headers compile stand alone 2019-07-25 13:58:47 -03:00
tid_rdma_defs.h
uverbs_ioctl.h
uverbs_named_ioctl.h
uverbs_std_types.h
uverbs_types.h