mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-18 04:54:52 +00:00
block: allow queue dma_alignment of zero
Let queue_dma_alignment return 0 if it was specifically set to 0. This permits devices with no particular alignment restrictions to use arbitrary user space buffers without copying. Signed-off-by: Pete Wyckoff <pw@osc.edu> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
parent
6da127ad09
commit
482eb68916
1 changed files with 1 additions and 6 deletions
|
@ -836,12 +836,7 @@ static inline int bdev_hardsect_size(struct block_device *bdev)
|
|||
|
||||
static inline int queue_dma_alignment(struct request_queue *q)
|
||||
{
|
||||
int retval = 511;
|
||||
|
||||
if (q && q->dma_alignment)
|
||||
retval = q->dma_alignment;
|
||||
|
||||
return retval;
|
||||
return q ? q->dma_alignment : 511;
|
||||
}
|
||||
|
||||
/* assumes size > 256 */
|
||||
|
|
Loading…
Add table
Reference in a new issue