FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 02-11-2009, 01:37 PM
Andy Whitcroft
 
Default UBUNTU: SAUCE: fix MSS MMC driver to match the sg list changes

In commit 18dabf473e15850c0dbc8ff13ac1e2806d542c15 the scatter gather
lists were modified to overload the ->page entry of the sg_list structure.
This breaks the MMS MMC driver as used in MID. Fix up direct references
to the sg_list structure to use the appropriate accessors.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
drivers/mmc/mss/mmc_protocol.c | 6 ++----
drivers/mmc/mss/mss_sdhci.c | 2 +-
drivers/mmc/mss/sd_protocol.c | 11 ++++-------
3 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/drivers/mmc/mss/mmc_protocol.c b/drivers/mmc/mss/mmc_protocol.c
index 278c49c..7fa9313 100644
--- a/drivers/mmc/mss/mmc_protocol.c
+++ b/drivers/mmc/mss/mmc_protocol.c
@@ -33,7 +33,7 @@
#include <linux/list.h>
#include <linux/sysctl.h>
#include <linux/mm.h>
-#include <asm/scatterlist.h>
+#include <linux/scatterlist.h>

#include <linux/mmc/mss_core.h>
#include <linux/mmc/mmc_protocol.h>
@@ -616,9 +616,7 @@ static int mmc_card_init(struct mss_card *card)
card->bus_width = MSS_BUSWIDTH_1BIT;
mss_set_buswidth(host, MSS_BUSWIDTH_1BIT);

- sg.page = virt_to_page(g_buffer);
- sg.offset = offset_in_page(g_buffer);
- sg.length = 512;
+ sg_set_page(&sg, virt_to_page(g_buffer), 512, offset_in_page(g_buffer));

memset(llreq, 0x0, sizeof(struct mss_ll_request));
memset(cmd, 0x0, sizeof(struct mss_cmd));
diff --git a/drivers/mmc/mss/mss_sdhci.c b/drivers/mmc/mss/mss_sdhci.c
index e97e7e1..c73f42a 100644
--- a/drivers/mmc/mss/mss_sdhci.c
+++ b/drivers/mmc/mss/mss_sdhci.c
@@ -279,7 +279,7 @@ static void sdhci_deactivate_led(struct sdhci_host *host)

static inline char* sdhci_sg_to_buffer(struct sdhci_host* host)
{
- return page_address(host->cur_sg->page) + host->cur_sg->offset;
+ return sg_virt(host->cur_sg);
}

static inline int sdhci_next_sg(struct sdhci_host* host)
diff --git a/drivers/mmc/mss/sd_protocol.c b/drivers/mmc/mss/sd_protocol.c
index 5eccc85..6c4ba74 100644
--- a/drivers/mmc/mss/sd_protocol.c
+++ b/drivers/mmc/mss/sd_protocol.c
@@ -34,7 +34,7 @@
#include <linux/list.h>
#include <linux/sysctl.h>
#include <linux/mm.h>
-#include <asm/scatterlist.h>
+#include <linux/scatterlist.h>

#include <linux/mmc/mss_core.h>
#include <linux/mmc/sd_protocol.h>
@@ -432,9 +432,7 @@ static int sd_send_cmd6(struct mss_card *card, struct sw_func_status *status, in
* [7:4]: group 2
* [3:0]: group 1
*/
- sg.page = virt_to_page(g_buffer);
- sg.offset = offset_in_page(g_buffer);
- sg.length = 8;
+ sg_set_page(&sg, virt_to_page(g_buffer), 8, offset_in_page(g_buffer));

memset(llreq, 0x0, sizeof(struct mss_ll_request));
memset(cmd, 0x0, sizeof(struct mss_cmd));
@@ -719,9 +717,8 @@ static int sd_read_write_entry(struct mss_card *card, int action, struct mss_rw_
if (ret)
return ret;

- sg.page = virt_to_page(g_buffer);
- sg.offset = offset_in_page(g_buffer);
- sg.length = 8;
+ sg_set_page(&sg, virt_to_page(g_buffer), 8,
+ offset_in_page(g_buffer));

memset(llreq, 0x0, sizeof(struct mss_ll_request));
memset(cmd, 0x0, sizeof(struct mss_cmd));
--
1.6.1.2.419.g0d87e


--WIyZ46R2i8wDzkSu
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team

--WIyZ46R2i8wDzkSu--
 

Thread Tools




All times are GMT. The time now is 12:26 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org