Skip to contentSkip to conversation

block: IBM RamSan 70/80 device driver.

PATCH In review Philip J. Kelleher 2 participants 2 messages Jan 25, 2013 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: IBM RamSan 70/80 device driver.

From: Joshua H Morris <[email protected]>
Philip J Kelleher <[email protected]>

This patch includes the device driver for the IBM RamSan family of PCI SSD flash storage cards. This driver will inlcude support for the RamSan 70 and 80. The driver presents a block device for device I/O.

-------------------------------------------------------------------------------

drivers/block/Kconfig +11 -0
diff -uprN -X linux-3.7.3-vanilla/Documentation/dontdiff linux-3.7.3-vanilla/drivers/block/Kconfig linux-3.7.3/drivers/block/Kconfig
@@ -544,4 +544,15 @@ config BLK_DEV_RBD
 
 	  If unsure, say N.
 
+config BLK_DEV_RSXX
+	tristate "RamSam PCIe Flash SSD Device Driver"
+	depends on PCI
+	help
+	  Device driver for Texas Memory Systems, an IBM company's high
+	  speed PCIe SSD storage devices: RamSan-70(Sugarland) and
+	  RamSan-80(Katy).
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called rsxx.
+
 endif # BLK_DEV
drivers/block/Makefile +2 -0
diff -uprN -X linux-3.7.3-vanilla/Documentation/dontdiff linux-3.7.3-vanilla/drivers/block/Makefile linux-3.7.3/drivers/block/Makefile
@@ -41,4 +41,6 @@ obj-$(CONFIG_BLK_DEV_DRBD)     += drbd/
 obj-$(CONFIG_BLK_DEV_RBD)     += rbd.o
 obj-$(CONFIG_BLK_DEV_PCIESSD_MTIP32XX)	+= mtip32xx/
 
+obj-$(CONFIG_BLK_DEV_RSXX) += rsxx/
+
 swim_mod-y	:= swim.o swim_asm.o
drivers/block/rsxx/config.c +213 -0

213 lines not on this page · raw message

drivers/block/rsxx/core.c +651 -0

651 lines not on this page · raw message

drivers/block/rsxx/cregs.c +743 -0

743 lines not on this page · raw message

drivers/block/rsxx/dev.c +366 -0

366 lines not on this page · raw message

drivers/block/rsxx/dma.c +997 -0

997 lines not on this page · raw message

drivers/block/rsxx/Makefile +2 -0
diff -uprN -X linux-3.7.3-vanilla/Documentation/dontdiff linux-3.7.3-vanilla/drivers/block/rsxx/Makefile linux-3.7.3/drivers/block/rsxx/Makefile
@@ -0,0 +1,2 @@
+obj-$(CONFIG_BLK_DEV_RSXX) += rsxx.o
+rsxx-y := config.o core.o cregs.o dev.o dma.o
drivers/block/rsxx/rsxx_cfg.h +72 -0

7 lines not on this page · raw message

drivers/block/rsxx/rsxx.h +43 -0

43 lines not on this page · raw message

drivers/block/rsxx/rsxx_priv.h +408 -0

408 lines not on this page · raw message

MAINTAINERS +6 -0
diff -uprN -X linux-3.7.3-vanilla/Documentation/dontdiff linux-3.7.3-vanilla/MAINTAINERS linux-3.7.3/MAINTAINERS

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

#1 lore raw
Quoted 6 lines · Philip J. Kelleher

From: Joshua H Morris <[email protected]>
Philip J Kelleher <[email protected]>

This patch includes the device driver for the IBM RamSan family of PCI SSD flash storage cards. This driver will inlcude support for the RamSan 70 and 80. The driver presents a block device for device I/O.

Hi,

Your driver does not handle REQ_FLUSH. Does that mean that the supported cards do not have a volatile write-back cache?

drivers/block/rsxx/dev.c line 316

Quoted 9 lines
drivers/block/rsxx/dev.c +9 -0
+	blk_size = rsxx_get_logical_block_size(card);
+
+	blk_queue_make_request(card->queue, rsxx_make_request);
+	blk_queue_bounce_limit(card->queue, BLK_BOUNCE_ANY);
+	blk_queue_dma_alignment(card->queue, blk_size - 1);
+	blk_queue_max_hw_sectors(card->queue, blkdev_max_hw_sectors);
+	blk_queue_logical_block_size(card->queue, blk_size);
+	blk_queue_physical_block_size(card->queue, RSXX_HW_BLK_SIZE);
+	blk_queue_max_discard_sectors(card->queue, RSXX_HW_BLK_SIZE >> 9);

Did you mean to set max_discard_sectors inside the below for loop? Either way, do you really only support a single hardware sector discard?

drivers/block/rsxx/dev.c line 324

Quoted 7 lines
drivers/block/rsxx/dev.c +7 -0
+	queue_flag_set_unlocked(QUEUE_FLAG_NONROT, card->queue);
+	if (rsxx_discard_supported(card)) {
+		queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, card->queue);
+		card->queue->limits.discard_granularity = RSXX_HW_BLK_SIZE;
+		card->queue->limits.discard_alignment   = RSXX_HW_BLK_SIZE;
+		card->queue->limits.discard_zeroes_data = 1;
+	}

Cheers,
Jeff