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

Commit c9059598 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-2.6.31' of git://git.kernel.dk/linux-2.6-block

* 'for-2.6.31' of git://git.kernel.dk/linux-2.6-block: (153 commits)
  block: add request clone interface (v2)
  floppy: fix hibernation
  ramdisk: remove long-deprecated "ramdisk=" boot-time parameter
  fs/bio.c: add missing __user annotation
  block: prevent possible io_context->refcount overflow
  Add serial number support for virtio_blk, V4a
  block: Add missing bounce_pfn stacking and fix comments
  Revert "block: Fix bounce limit setting in DM"
  cciss: decode unit attention in SCSI error handling code
  cciss: Remove no longer needed sendcmd reject processing code
  cciss: change SCSI error handling routines to work with interrupts enabled.
  cciss: separate error processing and command retrying code in sendcmd_withirq_core()
  cciss: factor out fix target status processing code from sendcmd functions
  cciss: simplify interface of sendcmd() and sendcmd_withirq()
  cciss: factor out core of sendcmd_withirq() for use by SCSI error handling code
  cciss: Use schedule_timeout_uninterruptible in SCSI error handling code
  block: needs to set the residual length of a bidi request
  Revert "block: implement blkdev_readpages"
  block: Fix bounce limit setting in DM
  Removed reference to non-existing file Documentation/PCI/PCI-DMA-mapping.txt
  ...

Manually fix conflicts with tracing updates in:
	block/blk-sysfs.c
	drivers/ide/ide-atapi.c
	drivers/ide/ide-cd.c
	drivers/ide/ide-floppy.c
	drivers/ide/ide-tape.c
	include/trace/events/block.h
	kernel/trace/blktrace.c
parents 0a33f80a b0fd271d
Loading
Loading
Loading
Loading
+59 −0
Original line number Original line Diff line number Diff line
@@ -60,3 +60,62 @@ Description:
		Indicates whether the block layer should automatically
		Indicates whether the block layer should automatically
		generate checksums for write requests bound for
		generate checksums for write requests bound for
		devices that support receiving integrity metadata.
		devices that support receiving integrity metadata.

What:		/sys/block/<disk>/alignment_offset
Date:		April 2009
Contact:	Martin K. Petersen <martin.petersen@oracle.com>
Description:
		Storage devices may report a physical block size that is
		bigger than the logical block size (for instance a drive
		with 4KB physical sectors exposing 512-byte logical
		blocks to the operating system).  This parameter
		indicates how many bytes the beginning of the device is
		offset from the disk's natural alignment.

What:		/sys/block/<disk>/<partition>/alignment_offset
Date:		April 2009
Contact:	Martin K. Petersen <martin.petersen@oracle.com>
Description:
		Storage devices may report a physical block size that is
		bigger than the logical block size (for instance a drive
		with 4KB physical sectors exposing 512-byte logical
		blocks to the operating system).  This parameter
		indicates how many bytes the beginning of the partition
		is offset from the disk's natural alignment.

What:		/sys/block/<disk>/queue/logical_block_size
Date:		May 2009
Contact:	Martin K. Petersen <martin.petersen@oracle.com>
Description:
		This is the smallest unit the storage device can
		address.  It is typically 512 bytes.

What:		/sys/block/<disk>/queue/physical_block_size
Date:		May 2009
Contact:	Martin K. Petersen <martin.petersen@oracle.com>
Description:
		This is the smallest unit the storage device can write
		without resorting to read-modify-write operation.  It is
		usually the same as the logical block size but may be
		bigger.  One example is SATA drives with 4KB sectors
		that expose a 512-byte logical block size to the
		operating system.

What:		/sys/block/<disk>/queue/minimum_io_size
Date:		April 2009
Contact:	Martin K. Petersen <martin.petersen@oracle.com>
Description:
		Storage devices may report a preferred minimum I/O size,
		which is the smallest request the device can perform
		without incurring a read-modify-write penalty.  For disk
		drives this is often the physical block size.  For RAID
		arrays it is often the stripe chunk size.

What:		/sys/block/<disk>/queue/optimal_io_size
Date:		April 2009
Contact:	Martin K. Petersen <martin.petersen@oracle.com>
Description:
		Storage devices may report an optimal I/O size, which is
		the device's preferred unit of receiving I/O.  This is
		rarely reported for disk drives.  For RAID devices it is
		usually the stripe width or the internal block size.
+33 −0
Original line number Original line Diff line number Diff line
Where:		/sys/bus/pci/devices/<dev>/ccissX/cXdY/model
Date:		March 2009
Kernel Version: 2.6.30
Contact:	iss_storagedev@hp.com
Description:	Displays the SCSI INQUIRY page 0 model for logical drive
		Y of controller X.

Where:		/sys/bus/pci/devices/<dev>/ccissX/cXdY/rev
Date:		March 2009
Kernel Version: 2.6.30
Contact:	iss_storagedev@hp.com
Description:	Displays the SCSI INQUIRY page 0 revision for logical
		drive Y of controller X.

Where:		/sys/bus/pci/devices/<dev>/ccissX/cXdY/unique_id
Date:		March 2009
Kernel Version: 2.6.30
Contact:	iss_storagedev@hp.com
Description:	Displays the SCSI INQUIRY page 83 serial number for logical
		drive Y of controller X.

Where:		/sys/bus/pci/devices/<dev>/ccissX/cXdY/vendor
Date:		March 2009
Kernel Version: 2.6.30
Contact:	iss_storagedev@hp.com
Description:	Displays the SCSI INQUIRY page 0 vendor for logical drive
		Y of controller X.

Where:		/sys/bus/pci/devices/<dev>/ccissX/cXdY/block:cciss!cXdY
Date:		March 2009
Kernel Version: 2.6.30
Contact:	iss_storagedev@hp.com
Description:	A symbolic link to /sys/block/cciss!cXdY
+1 −1
Original line number Original line Diff line number Diff line
@@ -186,7 +186,7 @@ a virtual address mapping (unlike the earlier scheme of virtual address
do not have a corresponding kernel virtual address space mapping) and
do not have a corresponding kernel virtual address space mapping) and
low-memory pages.
low-memory pages.


Note: Please refer to Documentation/PCI/PCI-DMA-mapping.txt for a discussion
Note: Please refer to Documentation/DMA-mapping.txt for a discussion
on PCI high mem DMA aspects and mapping of scatter gather lists, and support
on PCI high mem DMA aspects and mapping of scatter gather lists, and support
for 64 bit PCI.
for 64 bit PCI.


+40 −23
Original line number Original line Diff line number Diff line
@@ -147,24 +147,40 @@ static int __mbox_msg_send(struct omap_mbox *mbox, mbox_msg_t msg, void *arg)
	return ret;
	return ret;
}
}


struct omap_msg_tx_data {
	mbox_msg_t	msg;
	void		*arg;
};

static void omap_msg_tx_end_io(struct request *rq, int error)
{
	kfree(rq->special);
	__blk_put_request(rq->q, rq);
}

int omap_mbox_msg_send(struct omap_mbox *mbox, mbox_msg_t msg, void* arg)
int omap_mbox_msg_send(struct omap_mbox *mbox, mbox_msg_t msg, void* arg)
{
{
	struct omap_msg_tx_data *tx_data;
	struct request *rq;
	struct request *rq;
	struct request_queue *q = mbox->txq->queue;
	struct request_queue *q = mbox->txq->queue;
	int ret = 0;

	tx_data = kmalloc(sizeof(*tx_data), GFP_ATOMIC);
	if (unlikely(!tx_data))
		return -ENOMEM;


	rq = blk_get_request(q, WRITE, GFP_ATOMIC);
	rq = blk_get_request(q, WRITE, GFP_ATOMIC);
	if (unlikely(!rq)) {
	if (unlikely(!rq)) {
		ret = -ENOMEM;
		kfree(tx_data);
		goto fail;
		return -ENOMEM;
	}
	}


	rq->data = (void *)msg;
	tx_data->msg = msg;
	blk_insert_request(q, rq, 0, arg);
	tx_data->arg = arg;
	rq->end_io = omap_msg_tx_end_io;
	blk_insert_request(q, rq, 0, tx_data);


	schedule_work(&mbox->txq->work);
	schedule_work(&mbox->txq->work);
 fail:
	return 0;
	return ret;
}
}
EXPORT_SYMBOL(omap_mbox_msg_send);
EXPORT_SYMBOL(omap_mbox_msg_send);


@@ -178,22 +194,28 @@ static void mbox_tx_work(struct work_struct *work)
	struct request_queue *q = mbox->txq->queue;
	struct request_queue *q = mbox->txq->queue;


	while (1) {
	while (1) {
		struct omap_msg_tx_data *tx_data;

		spin_lock(q->queue_lock);
		spin_lock(q->queue_lock);
		rq = elv_next_request(q);
		rq = blk_fetch_request(q);
		spin_unlock(q->queue_lock);
		spin_unlock(q->queue_lock);


		if (!rq)
		if (!rq)
			break;
			break;


		ret = __mbox_msg_send(mbox, (mbox_msg_t) rq->data, rq->special);
		tx_data = rq->special;

		ret = __mbox_msg_send(mbox, tx_data->msg, tx_data->arg);
		if (ret) {
		if (ret) {
			enable_mbox_irq(mbox, IRQ_TX);
			enable_mbox_irq(mbox, IRQ_TX);
			spin_lock(q->queue_lock);
			blk_requeue_request(q, rq);
			spin_unlock(q->queue_lock);
			return;
			return;
		}
		}


		spin_lock(q->queue_lock);
		spin_lock(q->queue_lock);
		if (__blk_end_request(rq, 0, 0))
		__blk_end_request_all(rq, 0);
			BUG();
		spin_unlock(q->queue_lock);
		spin_unlock(q->queue_lock);
	}
	}
}
}
@@ -218,16 +240,13 @@ static void mbox_rx_work(struct work_struct *work)


	while (1) {
	while (1) {
		spin_lock_irqsave(q->queue_lock, flags);
		spin_lock_irqsave(q->queue_lock, flags);
		rq = elv_next_request(q);
		rq = blk_fetch_request(q);
		spin_unlock_irqrestore(q->queue_lock, flags);
		spin_unlock_irqrestore(q->queue_lock, flags);
		if (!rq)
		if (!rq)
			break;
			break;


		msg = (mbox_msg_t) rq->data;
		msg = (mbox_msg_t)rq->special;

		blk_end_request_all(rq, 0);
		if (blk_end_request(rq, 0, 0))
			BUG();

		mbox->rxq->callback((void *)msg);
		mbox->rxq->callback((void *)msg);
	}
	}
}
}
@@ -264,7 +283,6 @@ static void __mbox_rx_interrupt(struct omap_mbox *mbox)
			goto nomem;
			goto nomem;


		msg = mbox_fifo_read(mbox);
		msg = mbox_fifo_read(mbox);
		rq->data = (void *)msg;


		if (unlikely(mbox_seq_test(mbox, msg))) {
		if (unlikely(mbox_seq_test(mbox, msg))) {
			pr_info("mbox: Illegal seq bit!(%08x)\n", msg);
			pr_info("mbox: Illegal seq bit!(%08x)\n", msg);
@@ -272,7 +290,7 @@ static void __mbox_rx_interrupt(struct omap_mbox *mbox)
				mbox->err_notify();
				mbox->err_notify();
		}
		}


		blk_insert_request(q, rq, 0, NULL);
		blk_insert_request(q, rq, 0, (void *)msg);
		if (mbox->ops->type == OMAP_MBOX_TYPE1)
		if (mbox->ops->type == OMAP_MBOX_TYPE1)
			break;
			break;
	}
	}
@@ -329,16 +347,15 @@ omap_mbox_read(struct device *dev, struct device_attribute *attr, char *buf)


	while (1) {
	while (1) {
		spin_lock_irqsave(q->queue_lock, flags);
		spin_lock_irqsave(q->queue_lock, flags);
		rq = elv_next_request(q);
		rq = blk_fetch_request(q);
		spin_unlock_irqrestore(q->queue_lock, flags);
		spin_unlock_irqrestore(q->queue_lock, flags);


		if (!rq)
		if (!rq)
			break;
			break;


		*p = (mbox_msg_t) rq->data;
		*p = (mbox_msg_t)rq->special;


		if (blk_end_request(rq, 0, 0))
		blk_end_request_all(rq, 0);
			BUG();


		if (unlikely(mbox_seq_test(mbox, *p))) {
		if (unlikely(mbox_seq_test(mbox, *p))) {
			pr_info("mbox: Illegal seq bit!(%08x) ignored\n", *p);
			pr_info("mbox: Illegal seq bit!(%08x) ignored\n", *p);
+1 −1
Original line number Original line Diff line number Diff line
@@ -250,7 +250,7 @@ axon_ram_probe(struct of_device *device, const struct of_device_id *device_id)


	set_capacity(bank->disk, bank->size >> AXON_RAM_SECTOR_SHIFT);
	set_capacity(bank->disk, bank->size >> AXON_RAM_SECTOR_SHIFT);
	blk_queue_make_request(bank->disk->queue, axon_ram_make_request);
	blk_queue_make_request(bank->disk->queue, axon_ram_make_request);
	blk_queue_hardsect_size(bank->disk->queue, AXON_RAM_SECTOR_SIZE);
	blk_queue_logical_block_size(bank->disk->queue, AXON_RAM_SECTOR_SIZE);
	add_disk(bank->disk);
	add_disk(bank->disk);


	bank->irq_id = irq_of_parse_and_map(device->node, 0);
	bank->irq_id = irq_of_parse_and_map(device->node, 0);
Loading