From: Samba Siva Reddy A <sambasiva.a@siennaecad.com>
To: linux-mtd@lists.infradead.org
Subject: mtd_dataflash cause udev hang
Date: Tue, 25 Jun 2013 16:51:28 +0530 [thread overview]
Message-ID: <51C97D38.4000605@siennaecad.com> (raw)
Hi,
I am working on the at91sam9x5 boards. I added the DataFLash partitions
on board-sam9x5.c file.
It hangs while booting up the board after Starting udev message and
after that getting the following messages.
Starting udev
udevd (672): /proc/672/oom_adj is deprecated, please use
/proc/672/oom_score_adj
instead.
then these traces come out.
udevd[672]: worker [688] unexpectedly returned with status 0x0100
udevd[672]: worker [688] failed while handling
'/devices/virtual/block/loop0'
udevd[672]: worker [691] unexpectedly returned with status 0x0100
udevd[672]: worker [691] failed while handling
'/devices/virtual/block/loop1'
udevd[672]: worker [692] unexpectedly returned with status 0x0100
1. Enable and ported the DMA Engine code from 2.6.39 kernel to
3.2.6 kernel.
2. Added the below code snippet for avoiding the stack overflow
while writing data to the dataFlash. I attached the file for your
reference.
static void *adjust_buffer_location(struct device *dev, void *buf) {
if (likely(buf < high_memory)) {
return buf;
}
else
{
struct page *pg;
pg = vmalloc_to_page(buf);
if (pg == 0)
{
dev_err(dev, "failed to vmalloc_to_page\n");
return NULL;
}
return page_address(pg) + ((size_t)buf & ~PAGE_MASK);
}
}
static int
atmel_spi_dma_map_xfer(struct atmel_spi *as, struct spi_transfer *xfer) {
ptr = adjust_buffer_location(dev,(void *)xfer->tx_buf);
if(ptr)
xfer->tx_dma = dma_map_single(dev,
ptr, xfer->len,
DMA_TO_DEVICE);
if (dma_mapping_error(dev, xfer->tx_dma))
return -ENOMEM;
}
if (xfer->rx_buf) {
ptr=adjust_buffer_location(dev, xfer->rx_buf);
if(ptr)
xfer->rx_dma = dma_map_single(dev,
ptr, xfer->len,
DMA_FROM_DEVICE);
}
Could you please help any one on this issue.
Regards
Samba
reply other threads:[~2013-06-25 11:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51C97D38.4000605@siennaecad.com \
--to=sambasiva.a@siennaecad.com \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.