summaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorPhilip J Kelleher <pjk1939@linux.vnet.ibm.com>2013-06-18 14:39:44 -0500
committerJens Axboe <axboe@kernel.dk>2013-06-19 13:52:09 +0200
commit7b379cc3785bfa827249a265548a055e934eaaea (patch)
treecb70405d971241d9cc7706325df41c85c2e003b2 /drivers/block
parent31a70bb4440c963e69ce210389d8119c70b5c39d (diff)
downloadop-kernel-dev-7b379cc3785bfa827249a265548a055e934eaaea.zip
op-kernel-dev-7b379cc3785bfa827249a265548a055e934eaaea.tar.gz
rsxx: Allow block size to be determined by configuration.
Previously, the block size was determined by whether or not our Hardware could handle 512 byte accesses. Now, all of our Hardware can handle 512 and 4096 block sizes. This fix allows it to be user configurable. Signed-off-by: Philip J Kelleher <pjk1939@linux.vnet.ibm.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/rsxx/dev.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/block/rsxx/dev.c b/drivers/block/rsxx/dev.c
index 604ad2d..1fa7ccc 100644
--- a/drivers/block/rsxx/dev.c
+++ b/drivers/block/rsxx/dev.c
@@ -227,24 +227,6 @@ static bool rsxx_discard_supported(struct rsxx_cardinfo *card)
return (pci_rev >= RSXX_DISCARD_SUPPORT);
}
-static unsigned short rsxx_get_logical_block_size(
- struct rsxx_cardinfo *card)
-{
- u32 capabilities = 0;
- int st;
-
- st = rsxx_get_card_capabilities(card, &capabilities);
- if (st)
- dev_warn(CARD_TO_DEV(card),
- "Failed reading card capabilities register\n");
-
- /* Earlier firmware did not have support for 512 byte accesses */
- if (capabilities & CARD_CAP_SUBPAGE_WRITES)
- return 512;
- else
- return RSXX_HW_BLK_SIZE;
-}
-
int rsxx_attach_dev(struct rsxx_cardinfo *card)
{
mutex_lock(&card->dev_lock);
@@ -307,7 +289,7 @@ int rsxx_setup_dev(struct rsxx_cardinfo *card)
return -ENOMEM;
}
- blk_size = rsxx_get_logical_block_size(card);
+ blk_size = card->config.data.block_size;
blk_queue_make_request(card->queue, rsxx_make_request);
blk_queue_bounce_limit(card->queue, BLK_BOUNCE_ANY);
OpenPOWER on IntegriCloud