mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
SCSI: support for allocating large scatterlists
This is what enables large commands. If we need to allocate an sgtable that doesn't fit in a single page, allocate several SCSI_MAX_SG_SEGMENTS sized tables and chain them together. SCSI defaults to large chained sg tables, if the arch supports it. Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
0cde8d9510
commit
a8474ce23a
3 changed files with 163 additions and 54 deletions
|
|
@ -10,13 +10,6 @@
|
|||
|
||||
#include <linux/types.h>
|
||||
|
||||
/*
|
||||
* The maximum sg list length SCSI can cope with
|
||||
* (currently must be a power of 2 between 32 and 256)
|
||||
*/
|
||||
#define SCSI_MAX_PHYS_SEGMENTS MAX_PHYS_SEGMENTS
|
||||
|
||||
|
||||
/*
|
||||
* SCSI command lengths
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ struct scsi_cmnd {
|
|||
/* These elements define the operation we ultimately want to perform */
|
||||
unsigned short use_sg; /* Number of pieces of scatter-gather */
|
||||
unsigned short sglist_len; /* size of malloc'd scatter-gather list */
|
||||
unsigned short __use_sg;
|
||||
|
||||
unsigned underflow; /* Return error if less than
|
||||
this amount is transferred */
|
||||
|
|
|
|||
Loading…
Reference in a new issue