lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <d398787dd39150bb411ac0944a5492827249d0b3.1473847321.git.jthumshirn@suse.de>
Date:   Wed, 14 Sep 2016 12:05:24 +0200
From:   Johannes Thumshirn <jthumshirn@...e.de>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     Linux Kernel Mailinglist <linux-kernel@...r.kernel.org>,
        Michael Moese <michael.moese@....de>,
        Johannes Thumshirn <jthumshirn@...e.de>
Subject: [PATCH 2/2] Add a dma_device to mcb_device

From: Michael Moese <michael.moese@....de>

When performing DMA operations on a MCB device, the device needed
for using the DMA API is "mcb_device->bus_carrier".
This is rather lengthy, so a shortcut is introduced to struct mcb_device
in order to ensure the MCB device driver uses the correct device for DMA
operations.

Signed-off-by: Michael Moese <michael.moese@....de>
Signed-off-by: Johannes Thumshirn <jthumshirn@...e.de>
---
 drivers/mcb/mcb-core.c | 1 +
 include/linux/mcb.h    | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/mcb/mcb-core.c b/drivers/mcb/mcb-core.c
index 5306966..921a5d2 100644
--- a/drivers/mcb/mcb-core.c
+++ b/drivers/mcb/mcb-core.c
@@ -233,6 +233,7 @@ int mcb_device_register(struct mcb_bus *bus, struct mcb_device *dev)
 	dev->dev.bus = &mcb_bus_type;
 	dev->dev.parent = bus->dev.parent;
 	dev->dev.release = mcb_release_dev;
+	dev->dma_dev = bus->carrier;
 
 	device_id = dev->id;
 	dev_set_name(&dev->dev, "mcb%d-16z%03d-%d:%d:%d",
diff --git a/include/linux/mcb.h b/include/linux/mcb.h
index ee5200d..4097ac9 100644
--- a/include/linux/mcb.h
+++ b/include/linux/mcb.h
@@ -76,6 +76,7 @@ struct mcb_device {
 	int rev;
 	struct resource irq;
 	struct resource mem;
+	struct device *dma_dev;
 };
 
 static inline struct mcb_device *to_mcb_device(struct device *dev)
-- 
1.8.5.6

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ