summaryrefslogtreecommitdiffstats
path: root/Documentation/io_ordering.txt
diff options
context:
space:
mode:
authorMike Dunn <mikedunn@newsguy.com>2012-03-03 13:13:06 -0800
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-03-27 00:44:29 +0100
commit994c8409c4591983898182bfb5a0368d3daf1fc1 (patch)
tree610844d80a3433b1dd6b2031cd838b1e7689ee9f /Documentation/io_ordering.txt
parent31716a5ad32771be8339832b62aa030c263c6dac (diff)
downloadblackbird-obmc-linux-994c8409c4591983898182bfb5a0368d3daf1fc1.tar.gz
blackbird-obmc-linux-994c8409c4591983898182bfb5a0368d3daf1fc1.zip
mtd: fix partition wrapper functions
This patch reverts a change that may have been mistakenly included with the set of patches that introduced the new mtd api entry functions. Or perhaps I am mistaken :) The problem is in the partition wrapper functions, where the calls to the driver methods were replaced with calls to the new mtd api functions. This causes the api function to be called a second time, further down the call stack. This is not only unnecessary and redundant - because the sanity checking code and (more restrictive) bounds checks for the partition were done in the first call - but is potentially problematic and confusing. For example, the call stack for a call to mtd_read() on a partitioned device currently looks like this: mtd_read() gets struct mtd_info for the partition | +-> part_read() via the pointer assigned when the partition was created | +->mtd_read() this time gets struct mtd_info for the master | +->xyz_driver_read() via the pointer asigned by the driver It seems that this can cause a variety of problems. For example, if you want to add code to the api function that tests a value in mtd_info that is relevant only to the partition. Or (in my case) you want the driver to return a value that may be different from that returned by the mtd api function. This patch eliminates the second call to the mtd api function. It was tested on the docg4 nand driver with a subset of the api functions, but I inspected the rest and don't see any problems. Signed-off-by: Mike Dunn <mikedunn@newsguy.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'Documentation/io_ordering.txt')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud