Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be9e2f77 authored by James Bottomley's avatar James Bottomley
Browse files

Merge branch 'mkp-fixes' into fixes

parents e619e6cb 3ddda3e4
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -9411,8 +9411,10 @@ F: include/scsi/sg.h

SCSI SUBSYSTEM
M:	"James E.J. Bottomley" <JBottomley@odin.com>
L:	linux-scsi@vger.kernel.org
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
M:	"Martin K. Petersen" <martin.petersen@oracle.com>
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
L:	linux-scsi@vger.kernel.org
S:	Maintained
F:	drivers/scsi/
F:	include/scsi/
+16 −20
Original line number Diff line number Diff line
@@ -91,7 +91,8 @@ void blk_set_default_limits(struct queue_limits *lim)
	lim->seg_boundary_mask = BLK_SEG_BOUNDARY_MASK;
	lim->virt_boundary_mask = 0;
	lim->max_segment_size = BLK_MAX_SEGMENT_SIZE;
	lim->max_sectors = lim->max_hw_sectors = BLK_SAFE_MAX_SECTORS;
	lim->max_sectors = lim->max_dev_sectors = lim->max_hw_sectors =
		BLK_SAFE_MAX_SECTORS;
	lim->chunk_sectors = 0;
	lim->max_write_same_sectors = 0;
	lim->max_discard_sectors = 0;
@@ -127,6 +128,7 @@ void blk_set_stacking_limits(struct queue_limits *lim)
	lim->max_hw_sectors = UINT_MAX;
	lim->max_segment_size = UINT_MAX;
	lim->max_sectors = UINT_MAX;
	lim->max_dev_sectors = UINT_MAX;
	lim->max_write_same_sectors = UINT_MAX;
}
EXPORT_SYMBOL(blk_set_stacking_limits);
@@ -214,8 +216,8 @@ void blk_queue_bounce_limit(struct request_queue *q, u64 max_addr)
EXPORT_SYMBOL(blk_queue_bounce_limit);

/**
 * blk_limits_max_hw_sectors - set hard and soft limit of max sectors for request
 * @limits: the queue limits
 * blk_queue_max_hw_sectors - set max sectors for a request for this queue
 * @q:  the request queue for the device
 * @max_hw_sectors:  max hardware sectors in the usual 512b unit
 *
 * Description:
@@ -224,13 +226,19 @@ EXPORT_SYMBOL(blk_queue_bounce_limit);
 *    the device driver based upon the capabilities of the I/O
 *    controller.
 *
 *    max_dev_sectors is a hard limit imposed by the storage device for
 *    READ/WRITE requests. It is set by the disk driver.
 *
 *    max_sectors is a soft limit imposed by the block layer for
 *    filesystem type requests.  This value can be overridden on a
 *    per-device basis in /sys/block/<device>/queue/max_sectors_kb.
 *    The soft limit can not exceed max_hw_sectors.
 **/
void blk_limits_max_hw_sectors(struct queue_limits *limits, unsigned int max_hw_sectors)
void blk_queue_max_hw_sectors(struct request_queue *q, unsigned int max_hw_sectors)
{
	struct queue_limits *limits = &q->limits;
	unsigned int max_sectors;

	if ((max_hw_sectors << 9) < PAGE_CACHE_SIZE) {
		max_hw_sectors = 1 << (PAGE_CACHE_SHIFT - 9);
		printk(KERN_INFO "%s: set to minimum %d\n",
@@ -238,22 +246,9 @@ void blk_limits_max_hw_sectors(struct queue_limits *limits, unsigned int max_hw_
	}

	limits->max_hw_sectors = max_hw_sectors;
	limits->max_sectors = min_t(unsigned int, max_hw_sectors,
				    BLK_DEF_MAX_SECTORS);
}
EXPORT_SYMBOL(blk_limits_max_hw_sectors);

/**
 * blk_queue_max_hw_sectors - set max sectors for a request for this queue
 * @q:  the request queue for the device
 * @max_hw_sectors:  max hardware sectors in the usual 512b unit
 *
 * Description:
 *    See description for blk_limits_max_hw_sectors().
 **/
void blk_queue_max_hw_sectors(struct request_queue *q, unsigned int max_hw_sectors)
{
	blk_limits_max_hw_sectors(&q->limits, max_hw_sectors);
	max_sectors = min_not_zero(max_hw_sectors, limits->max_dev_sectors);
	max_sectors = min_t(unsigned int, max_sectors, BLK_DEF_MAX_SECTORS);
	limits->max_sectors = max_sectors;
}
EXPORT_SYMBOL(blk_queue_max_hw_sectors);

@@ -527,6 +522,7 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,

	t->max_sectors = min_not_zero(t->max_sectors, b->max_sectors);
	t->max_hw_sectors = min_not_zero(t->max_hw_sectors, b->max_hw_sectors);
	t->max_dev_sectors = min_not_zero(t->max_dev_sectors, b->max_dev_sectors);
	t->max_write_same_sectors = min(t->max_write_same_sectors,
					b->max_write_same_sectors);
	t->bounce_pfn = min_not_zero(t->bounce_pfn, b->bounce_pfn);
+3 −0
Original line number Diff line number Diff line
@@ -205,6 +205,9 @@ queue_max_sectors_store(struct request_queue *q, const char *page, size_t count)
	if (ret < 0)
		return ret;

	max_hw_sectors_kb = min_not_zero(max_hw_sectors_kb, (unsigned long)
					 q->limits.max_dev_sectors >> 1);

	if (max_sectors_kb > max_hw_sectors_kb || max_sectors_kb < page_kb)
		return -EINVAL;

+2 −0
Original line number Diff line number Diff line
@@ -364,6 +364,7 @@ config SCSI_HPSA
	tristate "HP Smart Array SCSI driver"
	depends on PCI && SCSI
	select CHECK_SIGNATURE
	select SCSI_SAS_ATTRS
	help
	  This driver supports HP Smart Array Controllers (circa 2009).
	  It is a SCSI alternative to the cciss driver, which is a block
@@ -499,6 +500,7 @@ config SCSI_ADVANSYS
	tristate "AdvanSys SCSI support"
	depends on SCSI
	depends on ISA || EISA || PCI
	depends on ISA_DMA_API || !ISA
	help
	  This is a driver for all SCSI host adapters manufactured by
	  AdvanSys. It is documented in the kernel source in
+1 −1
Original line number Diff line number Diff line
@@ -7803,7 +7803,7 @@ adv_build_req(struct asc_board *boardp, struct scsi_cmnd *scp,
		return ASC_BUSY;
	}
	scsiqp->sense_addr = cpu_to_le32(sense_addr);
	scsiqp->sense_len = cpu_to_le32(SCSI_SENSE_BUFFERSIZE);
	scsiqp->sense_len = SCSI_SENSE_BUFFERSIZE;

	/* Build ADV_SCSI_REQ_Q */

Loading