01 Feb, 2017
1 commit
-
Instead of keeping two levels of indirection for requests types, fold it
all into the operations. The little caveat here is that previously
cmd_type only applied to struct request, while the request and bio op
fields were set to plain REQ_OP_READ/WRITE even for passthrough
operations.Instead this patch adds new REQ_OP_* for SCSI passthrough and driver
private requests, althought it has to add two for each so that we
can communicate the data in/out nature of the request.Signed-off-by: Christoph Hellwig
Signed-off-by: Jens Axboe
22 Aug, 2014
1 commit
-
There is no need to init .owner field.
Based on the patch from Peter Griffin
"mmc: remove .owner field for drivers using module_platform_driver"This patch removes the superflous .owner field for drivers which
use the module_platform_driver API, as this is overriden in
platform_driver_register anyway."Signed-off-by: Michal Simek
Signed-off-by: Jens Axboe
16 Apr, 2014
1 commit
-
This was used in the olden days, back when onions were proper
yellow. Basically it mapped to the current buffer to be
transferred. With highmem being added more than a decade ago,
most drivers map pages out of a bio, and rq->buffer isn't
pointing at anything valid.Convert old style drivers to just use bio_data().
For the discard payload use case, just reference the page
in the bio.Signed-off-by: Jens Axboe
10 Jul, 2013
1 commit
-
Fix sysace sparse warnings.
Signed-off-by: Michal Simek
25 May, 2013
1 commit
-
If the port number is missing from the device-tree the device gets named
xs` instead of xsa. This fixes the check for missing ids.Tested on ml507 board.
Signed-off-by: Gernot Vormayr
Cc: Greg Kroah-Hartman
Cc: Jens Axboe
Cc: Grant Likely
Cc: Rob Herring
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
07 May, 2013
1 commit
-
The value passed is 0 in all but "it can never happen" cases (and those
only in a couple of drivers) *and* it would've been lost on the way
out anyway, even if something tried to pass something meaningful.
Just don't bother.Signed-off-by: Al Viro
04 Jan, 2013
1 commit
-
CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
markings need to be removed.This change removes the use of __devinit, __devexit_p, __devinitdata,
__devinitconst, and __devexit from these drivers.Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.Cc: Bill Pemberton
Cc: Mike Miller
Cc: Chirag Kantharia
Cc: Geoff Levand
Cc: Jim Paris
Cc: Rusty Russell
Cc: "Michael S. Tsirkin"
Cc: Grant Likely
Cc: Matthew Wilcox
Cc: Keith Busch
Cc: "David S. Miller"
Cc: Benjamin Herrenschmidt
Cc: NeilBrown
Cc: Jens Axboe
Cc: Tao Guo
Signed-off-by: Greg Kroah-Hartman
05 Jan, 2012
1 commit
-
Drivers shouldn't use NO_IRQ. Microblaze and PPC
define NO_IRQ as 0 and this reference will be removed
in near future.Signed-off-by: Michal Simek
Reviewed-by: Ryan Mallon
Acked-by: Grant Likely
CC: Rob Herring
14 Jul, 2011
1 commit
-
After commit 1c48a5c93, "dt: Eliminate
of_platform_{,un}register_driver", the xsysace driver attempts to
register two platform_drivers with the same name, which a) doesn't
work, and b) isn't necessary. This patch merges the two
platform_drivers.Reported-by: Daniel Hellstrom
Signed-off-by: Grant Likely
22 Apr, 2011
1 commit
-
In-kernel disk event polling doesn't matter for legacy/fringe drivers
and may lead to infinite event loop if ->check_events() implementation
generates events on level condition instead of edge.Now that block layer supports suppressing exporting unlisted events,
simply leaving disk->events cleared allows these drivers to keep the
internal revalidation behavior intact while avoiding weird
interactions with userland event handler.Signed-off-by: Tejun Heo
Cc: Kay Sievers
Signed-off-by: Jens Axboe
31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi
25 Mar, 2011
1 commit
-
* 'for-2.6.39/core' of git://git.kernel.dk/linux-2.6-block: (65 commits)
Documentation/iostats.txt: bit-size reference etc.
cfq-iosched: removing unnecessary think time checking
cfq-iosched: Don't clear queue stats when preempt.
blk-throttle: Reset group slice when limits are changed
blk-cgroup: Only give unaccounted_time under debug
cfq-iosched: Don't set active queue in preempt
block: fix non-atomic access to genhd inflight structures
block: attempt to merge with existing requests on plug flush
block: NULL dereference on error path in __blkdev_get()
cfq-iosched: Don't update group weights when on service tree
fs: assign sb->s_bdi to default_backing_dev_info if the bdi is going away
block: Require subsystems to explicitly allocate bio_set integrity mempool
jbd2: finish conversion from WRITE_SYNC_PLUG to WRITE_SYNC and explicit plugging
jbd: finish conversion from WRITE_SYNC_PLUG to WRITE_SYNC and explicit plugging
fs: make fsync_buffers_list() plug
mm: make generic_writepages() use plugging
blk-cgroup: Add unaccounted time to timeslice_used.
block: fixup plugging stubs for !CONFIG_BLOCK
block: remove obsolete comments for blkdev_issue_zeroout.
blktrace: Use rq->cmd_flags directly in blk_add_trace_rq.
...Fix up conflicts in fs/{aio.c,super.c}
10 Mar, 2011
1 commit
-
Convert from ->media_changed() to ->check_events().
xsysace buffers media changed state and clears it on revalidation. It
will behave correctly with kernel event polling.Signed-off-by: Tejun Heo
Acked-by: Grant Likely
Cc: Jens Axboe
Cc: Kay Sievers
01 Mar, 2011
1 commit
-
Final step to eliminate of_platform_bus_type. They're all just
platform drivers now.v2: fix type in pasemi_nand.c (thanks to Stephen Rothwell)
Signed-off-by: Grant Likely
25 Oct, 2010
1 commit
-
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6:
mtd/m25p80: add support to parse the partitions by OF node
of/irq: of_irq.c needs to include linux/irq.h
of/mips: Cleanup some include directives/files.
of/mips: Add device tree support to MIPS
of/flattree: Eliminate need to provide early_init_dt_scan_chosen_arch
of/device: Rework to use common platform_device_alloc() for allocating devices
of/xsysace: Fix OF probing on little-endian systems
of: use __be32 types for big-endian device tree data
of/irq: remove references to NO_IRQ in drivers/of/platform.c
of/promtree: add package-to-path support to pdt
of/promtree: add of_pdt namespace to pdt code
of/promtree: no longer call prom_ functions directly; use an ops structure
of/promtree: make drivers/of/pdt.c no longer sparc-only
sparc: break out some PROM device-tree building code out into drivers/of
of/sparc: convert various prom_* functions to use phandle
sparc: stop exporting openprom.h header
powerpc, of_serial: Endianness issues setting up the serial ports
of: MTD: Fix OF probing on little-endian systems
of: GPIO: Fix OF probing on little-endian systems
18 Oct, 2010
1 commit
-
Convert big-endian DTB to little-endian if necessary.
Signed-off-by: Michal Simek
Signed-off-by: Grant Likely
05 Oct, 2010
1 commit
-
The block device drivers have all gained new lock_kernel
calls from a recent pushdown, and some of the drivers
were already using the BKL before.This turns the BKL into a set of per-driver mutexes.
Still need to check whether this is safe to do.file=$1
name=$2
if grep -q lock_kernel ${file} ; then
if grep -q 'include.*linux.mutex.h' ${file} ; then
sed -i '/include.*/d' ${file}
else
sed -i 's/include.*.*$/include /g' ${file}
fi
sed -i ${file} \
-e "/^#include.*linux.mutex.h/,$ {
1,/^\(static\|int\|long\)/ {
/^\(static\|int\|long\)/istatic DEFINE_MUTEX(${name}_mutex);} }" \
-e "s/\(un\)*lock_kernel\>[ ]*()/mutex_\1lock(\&${name}_mutex)/g" \
-e '/[ ]*cycle_kernel_lock();/d'
else
sed -i -e '/include.*\/d' ${file} \
-e '/cycle_kernel_lock()/d'
fiSigned-off-by: Arnd Bergmann
18 Aug, 2010
1 commit
-
The drivers for Xilinx' SystemACE and physically mapped MTDs were missing
prototypes for of_address_to_resource(). This patch adds the necessary
headers.Signed-off-by: Graeme Smecher
Signed-off-by: Grant Likely
13 Aug, 2010
1 commit
-
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6:
mmc_spi: Fix unterminated of_match_table
of/sparc: fix build regression from of_device changes
of/device: Replace struct of_device with struct platform_device
08 Aug, 2010
2 commits
-
The open and release block_device_operations are currently
called with the BKL held. In order to change that, we must
first make sure that all drivers that currently rely
on this have no regressions.This blindly pushes the BKL into all .open and .release
operations for all block drivers to prepare for the
next step. The drivers can subsequently replace the BKL
with their own locks or remove it completely when it can
be shown that it is not needed.The functions blkdev_get and blkdev_put are the only
remaining users of the big kernel lock in the block
layer, besides a few uses in the ioctl code, none
of which need to serialize with blkdev_{get,put}.Most of these two functions is also under the protection
of bdev->bd_mutex, including the actual calls to
->open and ->release, and the common code does not
access any global data structures that need the BKL.Signed-off-by: Arnd Bergmann
Acked-by: Christoph Hellwig
Signed-off-by: Jens Axboe -
Remove all the trivial wrappers for the cmd_type and cmd_flags fields in
struct requests. This allows much easier grepping for different request
types instead of unwinding through macros.Signed-off-by: Christoph Hellwig
Signed-off-by: Jens Axboe
06 Aug, 2010
1 commit
-
of_device is just an alias for platform_device, so remove it entirely. Also
replace to_of_device() with to_platform_device() and update comment blocks.This patch was initially generated from the following semantic patch, and then
edited by hand to pick up the bits that coccinelle didn't catch.@@
@@
-struct of_device
+struct platform_deviceSigned-off-by: Grant Likely
Reviewed-by: David S. Miller
22 May, 2010
1 commit
-
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver. This patch is a removes the extra copies from struct
of_platform_driver and converts all users to the device_driver members.This patch is a pretty mechanical change. The usage model doesn't change
and if any drivers have been missed, or if anything has been fixed up
incorrectly, then it will fail with a compile time error, and the fixup
will be trivial. This patch looks big and scary because it touches so
many files, but it should be pretty safe.Signed-off-by: Grant Likely
Acked-by: Sean MacLennan
19 May, 2010
1 commit
-
The following structure elements duplicate the information in
'struct device.of_node' and so are being eliminated. This patch
makes all readers of these elements use device.of_node instead.(struct of_device *)->node
(struct dev_archdata *)->prom_node (sparc)
(struct dev_archdata *)->of_node (powerpc & microblaze)Signed-off-by: Grant Likely
11 Jan, 2010
1 commit
-
The match_table field of the struct of_device_id is constant in
so it is worth to make ace_of_match also constant.The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)//
@r@
disable decl_init,const_decl_init;
identifier I1, I2, x;
@@
struct I1 {
...
const struct I2 *x;
...
};
@s@
identifier r.I1, y;
identifier r.x, E;
@@
struct I1 y = {
.x = E,
};
@c@
identifier r.I2;
identifier s.E;
@@
const struct I2 E[] = ... ;
@depends on !c@
identifier r.I2;
identifier s.E;
@@
+ const
struct I2 E[] = ...;
//Signed-off-by: Márton Németh
Cc: Julia Lawall
Cc: cocci@diku.dk
Signed-off-by: Jens Axboe
22 Sep, 2009
1 commit
-
Signed-off-by: Alexey Dobriyan
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
09 Jul, 2009
1 commit
-
Commit 5fd29d6ccbc98884569d6f3105aeca70858b3e0f ("printk: clean up
handling of log-levels and newlines") changed printk semantics. printk
lines with multiple KERN_ prefixes are no longer emitted as
before the patch.is now included in the output on each additional use.
Remove all uses of multiple KERN_s in formats.
Signed-off-by: Joe Perches
Signed-off-by: Linus Torvalds
23 May, 2009
1 commit
-
Until now we have had a 1:1 mapping between storage device physical
block size and the logical block sized used when addressing the device.
With SATA 4KB drives coming out that will no longer be the case. The
sector size will be 4KB but the logical block size will remain
512-bytes. Hence we need to distinguish between the physical block size
and the logical ditto.This patch renames hardsect_size to logical_block_size.
Signed-off-by: Martin K. Petersen
Signed-off-by: Jens Axboe
11 May, 2009
4 commits
-
Till now block layer allowed two separate modes of request execution.
A request is always acquired from the request queue via
elv_next_request(). After that, drivers are free to either dequeue it
or process it without dequeueing. Dequeue allows elv_next_request()
to return the next request so that multiple requests can be in flight.Executing requests without dequeueing has its merits mostly in
allowing drivers for simpler devices which can't do sg to deal with
segments only without considering request boundary. However, the
benefit this brings is dubious and declining while the cost of the API
ambiguity is increasing. Segment based drivers are usually for very
old or limited devices and as converting to dequeueing model isn't
difficult, it doesn't justify the API overhead it puts on block layer
and its more modern users.Previous patches converted all block low level drivers to dequeueing
model. This patch completes the API transition by...* renaming elv_next_request() to blk_peek_request()
* renaming blkdev_dequeue_request() to blk_start_request()
* adding blk_fetch_request() which is combination of peek and start
* disallowing completion of queued (not started) requests
* applying new API to all LLDs
Renamings are for consistency and to break out of tree code so that
it's apparent that out of tree drivers need updating.[ Impact: block request issue API cleanup, no functional change ]
Signed-off-by: Tejun Heo
Cc: Rusty Russell
Cc: James Bottomley
Cc: Mike Miller
Cc: unsik Kim
Cc: Paul Clements
Cc: Tim Waugh
Cc: Geert Uytterhoeven
Cc: David S. Miller
Cc: Laurent Vivier
Cc: Jeff Garzik
Cc: Jeremy Fitzhardinge
Cc: Grant Likely
Cc: Adrian McMenamin
Cc: Stephen Rothwell
Cc: Bartlomiej Zolnierkiewicz
Cc: Borislav Petkov
Cc: Sergei Shtylyov
Cc: Alex Dubov
Cc: Pierre Ossman
Cc: David Woodhouse
Cc: Markus Lidel
Cc: Stefan Weinhuber
Cc: Martin Schwidefsky
Cc: Pete Zaitcev
Cc: FUJITA Tomonori
Signed-off-by: Jens Axboe -
xsysace already tracks in-flight request using ace->req. Converting
to dequeueing model is mostly a matter of adding dequeueing call after
request fetching. The only tricky part is handling CF removal which
should complete both in flight and on queue requests. Convert to
dequeueing model.While at it, remove explicit blk_rq_cur_bytes() and use
__blk_end_request_cur() instead.[ Impact: dequeue in-flight request ]
Signed-off-by: Tejun Heo
Cc: Grant Likely
Signed-off-by: Jens Axboe -
With recent cleanups, there is no place where low level driver
directly manipulates request fields. This means that the 'hard'
request fields always equal the !hard fields. Convert all
rq->sectors, nr_sectors and current_nr_sectors references to
accessors.While at it, drop superflous blk_rq_pos() < 0 test in swim.c.
[ Impact: use pos and nr_sectors accessors ]
Signed-off-by: Tejun Heo
Acked-by: Geert Uytterhoeven
Tested-by: Grant Likely
Acked-by: Grant Likely
Tested-by: Adrian McMenamin
Acked-by: Adrian McMenamin
Acked-by: Mike Miller
Cc: James Bottomley
Cc: Bartlomiej Zolnierkiewicz
Cc: Borislav Petkov
Cc: Sergei Shtylyov
Cc: Eric Moore
Cc: Alan Stern
Cc: FUJITA Tomonori
Cc: Pete Zaitcev
Cc: Stephen Rothwell
Cc: Paul Clements
Cc: Tim Waugh
Cc: Jeff Garzik
Cc: Jeremy Fitzhardinge
Cc: Alex Dubov
Cc: David Woodhouse
Cc: Martin Schwidefsky
Cc: Dario Ballabio
Cc: David S. Miller
Cc: Rusty Russell
Cc: unsik Kim
Cc: Laurent Vivier
Signed-off-by: Jens Axboe -
Implement accessors - blk_rq_pos(), blk_rq_sectors() and
blk_rq_cur_sectors() which return rq->hard_sector, rq->hard_nr_sectors
and rq->hard_cur_sectors respectively and convert direct references of
the said fields to the accessors.This is in preparation of request data length handling cleanup.
Geert : suggested adding const to struct request * parameter to accessors
Sergei : spotted error in patch description[ Impact: cleanup ]
Signed-off-by: Tejun Heo
Acked-by: Geert Uytterhoeven
Acked-by: Stephen Rothwell
Tested-by: Grant Likely
Acked-by: Grant Likely
Ackec-by: Sergei Shtylyov
Cc: Bartlomiej Zolnierkiewicz
Cc: Borislav Petkov
Cc: James Bottomley
Signed-off-by: Jens Axboe
28 Apr, 2009
1 commit
-
end_request() has been kept around for backward compatibility;
however, it's about time for it to go away.* There aren't too many users left.
* Its use of @updtodate is pretty confusing.
* In some cases, newer code ends up using mixture of end_request() and
[__]blk_end_request[_all](), which is way too confusing.So, add [__]blk_end_request_cur() and replace end_request() with it.
Most conversions are straightforward. Noteworthy ones are...* paride/pcd: next_request() updated to take 0/-errno instead of 1/0.
* paride/pf: pf_end_request() and next_request() updated to take
0/-errno instead of 1/0.* xd: xd_readwrite() updated to return 0/-errno instead of 1/0.
* mtd/mtd_blkdevs: blktrans_discard_request() updated to return
0/-errno instead of 1/0. Unnecessary local variable res
initialization removed from mtd_blktrans_thread().[ Impact: cleanup ]
Signed-off-by: Tejun Heo
Acked-by: Joerg Dorchain
Acked-by: Geert Uytterhoeven
Acked-by: Grant Likely
Acked-by: Laurent Vivier
Cc: Tim Waugh
Cc: Stephen Rothwell
Cc: Paul Mackerras
Cc: Jeremy Fitzhardinge
Cc: Markus Lidel
Cc: David Woodhouse
Cc: Pete Zaitcev
Cc: unsik Kim
08 Apr, 2009
1 commit
-
Commit 4aaf2fec718f6fbf38668edf733a0ab09a49cab1 (xsysace: make it
'struct hd_driveid'-free) converted the cf_id member of 'struct
ace_device' from a 'struct hd_driveid' to a u16 array. However,
references to the base of the structure were still using the '&'
operator. When the address was used with the ata_id_u32() macro, the
compiler used the size of the entire array instead of sizeof(u16) to
calculate the offset from the base address.This patch removes the use of the '&' operator from all references of
cf_id to fix the bug and remove future confusion.Signed-off-by: Grant Likely
Signed-off-by: Bartlomiej Zolnierkiewicz
02 Apr, 2009
1 commit
-
* Change cf_id field in struct ace_device from 'struct hd_driveid *id'
to 'u16 *id' and update driver accordingly.* Include directly instead of through .
While at it:
* Use ata_id_u32() macro.
There should be no functional changes caused by this patch.
Cc: Grant Likely
Signed-off-by: Bartlomiej Zolnierkiewicz
15 Mar, 2009
1 commit
-
The SystemACE driver does not handle an empty CF slot gracefully. An
empty CF slot ends up hanging the system. This patch adds a check for
the CF state and stops trying to process requests if the slot is empty.Signed-off-by: Grant Likely
Signed-off-by: Jens Axboe
10 Jan, 2009
1 commit
-
Add "xlnx,sysace" compatible string to the of_platform binding
table. Platforms which have the SysACE chip on board (e.g.
Katmai) instead of via a Xilinx generated IP core will use
this value in their device tree.Signed-off-by: Yuri Tikhonov
Signed-off-by: Grant Likely
15 Nov, 2008
2 commits
-
This patch is a bug fix to the SystemACE driver to use resource_size_t
for physical address instead of unsigned long. This makes the driver
work correctly on 32 bit systems with 64-bit resources (e.g. PowerPC 440).Signed-off-by: Yuri Tikhonov
Signed-off-by: Ilya Yanok
Signed-off-by: Grant Likely -
Various printk format string in code used by the Xilinx Virtex platform
are not 32-bit/64-bit safe. Add correct casting to fix the bugs.Reported-by: Josh Boyer
Signed-off-by: Grant Likely
Acked-by: Josh Boyer
21 Oct, 2008
1 commit
-
Signed-off-by: Al Viro