summaryrefslogtreecommitdiffstats
path: root/drivers/block/rsxx/rsxx_priv.h
diff options
context:
space:
mode:
authorPhilip J Kelleher <pjk1939@linux.vnet.ibm.com>2013-09-04 13:59:02 -0500
committerJens Axboe <axboe@kernel.dk>2013-11-08 09:10:28 -0700
commite5feab229f199dadee91073fbef5b507046086fd (patch)
treea5a5f75cd2ad53ecda8a9e2b3e95046e119be148 /drivers/block/rsxx/rsxx_priv.h
parentef7e7c82e02b602f29c2b87f42dcd6143a6777da (diff)
downloadlinux-e5feab229f199dadee91073fbef5b507046086fd.tar.gz
linux-e5feab229f199dadee91073fbef5b507046086fd.tar.bz2
linux-e5feab229f199dadee91073fbef5b507046086fd.zip
rsxx: Handling failed pci_map_page on PowerPC and double free.
The rsxx driver was not checking the correct value during a pci_map_page failure. Fixing this also uncovered a double free if the bio was returned before it was broken up into indiviadual 4k dmas, that is also fixed here. Signed-off-by: Philip J Kelleher <pjk1939@linux.vnet.ibm.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/rsxx/rsxx_priv.h')
-rw-r--r--drivers/block/rsxx/rsxx_priv.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/block/rsxx/rsxx_priv.h b/drivers/block/rsxx/rsxx_priv.h
index 5ad5055a4104..82779058e8ec 100644
--- a/drivers/block/rsxx/rsxx_priv.h
+++ b/drivers/block/rsxx/rsxx_priv.h
@@ -345,6 +345,11 @@ enum rsxx_creg_stat {
CREG_STAT_TAG_MASK = 0x0000ff00,
};
+enum rsxx_dma_finish {
+ FREE_DMA = 0x0,
+ COMPLETE_DMA = 0x1,
+};
+
static inline unsigned int CREG_DATA(int N)
{
return CREG_DATA0 + (N << 2);
@@ -379,7 +384,9 @@ typedef void (*rsxx_dma_cb)(struct rsxx_cardinfo *card,
int rsxx_dma_setup(struct rsxx_cardinfo *card);
void rsxx_dma_destroy(struct rsxx_cardinfo *card);
int rsxx_dma_init(void);
-int rsxx_cleanup_dma_queue(struct rsxx_dma_ctrl *ctrl, struct list_head *q);
+int rsxx_cleanup_dma_queue(struct rsxx_dma_ctrl *ctrl,
+ struct list_head *q,
+ unsigned int done);
int rsxx_dma_cancel(struct rsxx_dma_ctrl *ctrl);
void rsxx_dma_cleanup(void);
void rsxx_dma_queue_reset(struct rsxx_cardinfo *card);