Index: linux-2.6.16.54-0.2.3/include/scsi/scsi_host.h =================================================================== --- linux-2.6.16.54-0.2.3.orig/include/scsi/scsi_host.h +++ linux-2.6.16.54-0.2.3/include/scsi/scsi_host.h @@ -28,7 +28,7 @@ struct scsi_transport_template; * used in one scatter-gather request. */ #define SG_NONE 0 -#define SG_ALL 0xff +#define SG_ALL 256 #define DISABLE_CLUSTERING 0 Index: linux-2.6.16.54-0.2.3/drivers/scsi/scsi_lib.c =================================================================== --- linux-2.6.16.54-0.2.3.orig/drivers/scsi/scsi_lib.c +++ linux-2.6.16.54-0.2.3/drivers/scsi/scsi_lib.c @@ -1573,6 +1573,7 @@ struct request_queue *scsi_alloc_queue(s blk_queue_prep_rq(q, scsi_prep_fn); + blk_queue_max_phys_segments(q, SCSI_MAX_PHYS_SEGMENTS); blk_queue_max_hw_segments(q, shost->sg_tablesize); blk_queue_max_sectors(q, shost->max_sectors); blk_queue_bounce_limit(q, scsi_calculate_bounce_limit(shost));