File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -1845,6 +1845,10 @@ void mpi3mr_bsg_init(struct mpi3mr_ioc *mrioc)
1845
1845
{
1846
1846
struct device * bsg_dev = & mrioc -> bsg_dev ;
1847
1847
struct device * parent = & mrioc -> shost -> shost_gendev ;
1848
+ struct queue_limits lim = {
1849
+ .max_hw_sectors = MPI3MR_MAX_APP_XFER_SECTORS ,
1850
+ .max_segments = MPI3MR_MAX_APP_XFER_SEGMENTS ,
1851
+ };
1848
1852
1849
1853
device_initialize (bsg_dev );
1850
1854
@@ -1860,20 +1864,14 @@ void mpi3mr_bsg_init(struct mpi3mr_ioc *mrioc)
1860
1864
return ;
1861
1865
}
1862
1866
1863
- mrioc -> bsg_queue = bsg_setup_queue (bsg_dev , dev_name (bsg_dev ), NULL ,
1867
+ mrioc -> bsg_queue = bsg_setup_queue (bsg_dev , dev_name (bsg_dev ), & lim ,
1864
1868
mpi3mr_bsg_request , NULL , 0 );
1865
1869
if (IS_ERR (mrioc -> bsg_queue )) {
1866
1870
ioc_err (mrioc , "%s: bsg registration failed\n" ,
1867
1871
dev_name (bsg_dev ));
1868
1872
device_del (bsg_dev );
1869
1873
put_device (bsg_dev );
1870
- return ;
1871
1874
}
1872
-
1873
- blk_queue_max_segments (mrioc -> bsg_queue , MPI3MR_MAX_APP_XFER_SEGMENTS );
1874
- blk_queue_max_hw_sectors (mrioc -> bsg_queue , MPI3MR_MAX_APP_XFER_SECTORS );
1875
-
1876
- return ;
1877
1875
}
1878
1876
1879
1877
/**
You can’t perform that action at this time.
0 commit comments