#
9f633ecd |
| 15-Feb-2024 |
Christoph Hellwig <hch@lst.de> |
mspro_block: pass queue_limits to blk_mq_alloc_disk
Pass the few limits mspro_block imposes directly to blk_mq_alloc_disk instead of setting them one at a time.
Signed-off-by: Christoph Hellwig <hc
mspro_block: pass queue_limits to blk_mq_alloc_disk
Pass the few limits mspro_block imposes directly to blk_mq_alloc_disk instead of setting them one at a time.
Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20240215070300.2200308-13-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
27e32cd2 |
| 13-Feb-2024 |
Christoph Hellwig <hch@lst.de> |
block: pass a queue_limits argument to blk_mq_alloc_disk
Pass a queue_limits to blk_mq_alloc_disk and apply it if non-NULL. This will allow allocating queues with valid queue limits instead of sett
block: pass a queue_limits argument to blk_mq_alloc_disk
Pass a queue_limits to blk_mq_alloc_disk and apply it if non-NULL. This will allow allocating queues with valid queue limits instead of setting the values one at a time later.
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Keith Busch <kbusch@kernel.org> Reviewed-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Link: https://lore.kernel.org/r/20240213073425.1621680-11-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
0c359970 |
| 08-Dec-2022 |
ye xingchen <ye.xingchen@zte.com.cn> |
memstick/mspro_block: Convert to use sysfs_emit()/sysfs_emit_at() APIs
Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when fo
memstick/mspro_block: Convert to use sysfs_emit()/sysfs_emit_at() APIs
Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space.
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/202212081138191215291@zte.com.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
show more ...
|
#
8b9ab626 |
| 19-Jun-2022 |
Christoph Hellwig <hch@lst.de> |
block: remove blk_cleanup_disk
blk_cleanup_disk is nothing but a trivial wrapper for put_disk now, so remove it.
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@sus
block: remove blk_cleanup_disk
blk_cleanup_disk is nothing but a trivial wrapper for put_disk now, so remove it.
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Link: https://lore.kernel.org/r/20220619060552.1850436-7-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
6f8191fd |
| 19-Jun-2022 |
Christoph Hellwig <hch@lst.de> |
block: simplify disk shutdown
Set the queue dying flag and call blk_mq_exit_queue from del_gendisk for all disks that do not have separately allocated queues, and thus remove the need to call blk_cl
block: simplify disk shutdown
Set the queue dying flag and call blk_mq_exit_queue from del_gendisk for all disks that do not have separately allocated queues, and thus remove the need to call blk_cleanup_queue for them.
Rename blk_cleanup_disk to blk_mq_destroy_queue to make it clear that this function is intended only for separately allocated blk-mq queues.
This saves an extra queue freeze for devices without a separately allocated queue.
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Link: https://lore.kernel.org/r/20220619060552.1850436-6-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
185ed423 |
| 15-Feb-2022 |
Christoph Hellwig <hch@lst.de> |
memstick/mspro_block: simplify refcounting
Implement the ->free_disk method to free the msb_data structure only once the last gendisk reference goes away instead of keeping a local refcount.
Signed
memstick/mspro_block: simplify refcounting
Implement the ->free_disk method to free the msb_data structure only once the last gendisk reference goes away instead of keeping a local refcount.
Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20220215094514.3828912-5-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
6dab421b |
| 15-Feb-2022 |
Christoph Hellwig <hch@lst.de> |
memstick/mspro_block: fix handling of read-only devices
Use set_disk_ro to propagate the read-only state to the block layer instead of checking for it in ->open and leaking a reference in case of a
memstick/mspro_block: fix handling of read-only devices
Use set_disk_ro to propagate the read-only state to the block layer instead of checking for it in ->open and leaking a reference in case of a read-only device.
Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20220215094514.3828912-4-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
b3f8eb6e |
| 02-Sep-2021 |
Luis Chamberlain <mcgrof@kernel.org> |
memstick: mspro_block: Add error handling support for add_disk()
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling.
memstick: mspro_block: Add error handling support for add_disk()
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling.
Contrary to the typical removal which delays the put_disk() until later, since we are failing on a probe we immediately put the disk on failure from add_disk by using blk_cleanup_disk().
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> Link: https://lore.kernel.org/r/20210902174105.2418771-4-mcgrof@kernel.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
show more ...
|
#
51ed5bd5 |
| 02-Jun-2021 |
Christoph Hellwig <hch@lst.de> |
mspro: use blk_mq_alloc_disk
Use the blk_mq_alloc_disk API to simplify the gendisk and request_queue allocation.
Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Ulf Hansson <ulf.hansson@lin
mspro: use blk_mq_alloc_disk
Use the blk_mq_alloc_disk API to simplify the gendisk and request_queue allocation.
Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Link: https://lore.kernel.org/r/20210602065345.355274-9-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
8c87dab9 |
| 05-Mar-2021 |
Jia-Ju Bai <baijiaju1990@gmail.com> |
memstick: core: Assign error code of mspro_block_resume()
When mspro_block_init_card() fails, no error return code of mspro_block_resume() is assigned/propagated. Let's fix this.
Reported-by: TOTE
memstick: core: Assign error code of mspro_block_resume()
When mspro_block_init_card() fails, no error return code of mspro_block_resume() is assigned/propagated. Let's fix this.
Reported-by: TOTE Robot <oslab@tsinghua.edu.cn> Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Link: https://lore.kernel.org/r/20210305021445.3435-1-baijiaju1990@gmail.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
show more ...
|
#
8c3c0aca |
| 31-Oct-2020 |
Tom Rix <trix@redhat.com> |
memstick: mspro_block: remove unneeded semicolon
A semicolon is not needed after a switch statement.
Signed-off-by: Tom Rix <trix@redhat.com> Link: https://lore.kernel.org/r/20201031134818.2135446-
memstick: mspro_block: remove unneeded semicolon
A semicolon is not needed after a switch statement.
Signed-off-by: Tom Rix <trix@redhat.com> Link: https://lore.kernel.org/r/20201031134818.2135446-1-trix@redhat.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
show more ...
|
#
d2912cb1 |
| 04-Jun-2019 |
Thomas Gleixner <tglx@linutronix.de> |
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
Based on 2 normalized pattern(s):
this program is free software you can redistribute it and or modify it under the terms of th
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
Based on 2 normalized pattern(s):
this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation
this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation #
extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-only
has been chosen to replace the boilerplate/reference in 4122 file(s).
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
61009f82 |
| 10-May-2019 |
Dan Carpenter <dan.carpenter@oracle.com> |
memstick: mspro_block: Fix an error code in mspro_block_issue_req()
We accidentally changed the error code from -EAGAIN to 1 when we did the blk-mq conversion.
Maybe a contributing factor to this m
memstick: mspro_block: Fix an error code in mspro_block_issue_req()
We accidentally changed the error code from -EAGAIN to 1 when we did the blk-mq conversion.
Maybe a contributing factor to this mistake is that it wasn't obvious that the "while (chunk) {" condition is always true. I have cleaned that up as well.
Fixes: d0be12274dad ("mspro_block: convert to blk-mq") Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
show more ...
|
#
d0be1227 |
| 15-Oct-2018 |
Jens Axboe <axboe@kernel.dk> |
mspro_block: convert to blk-mq
Straight forward conversion, there's room for improvement.
Reviewed-by: Hannes Reinecke <hare@suse.com> Tested-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Omar Sa
mspro_block: convert to blk-mq
Straight forward conversion, there's room for improvement.
Reviewed-by: Hannes Reinecke <hare@suse.com> Tested-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
fef912bf |
| 28-Sep-2018 |
Hannes Reinecke <hare@suse.de> |
block: genhd: add 'groups' argument to device_add_disk
Update device_add_disk() to take an 'groups' argument so that individual drivers can register a device with additional sysfs attributes. This a
block: genhd: add 'groups' argument to device_add_disk
Update device_add_disk() to take an 'groups' argument so that individual drivers can register a device with additional sysfs attributes. This avoids race condition the driver would otherwise have if these groups were to be created with sysfs_add_groups().
Signed-off-by: Martin Wilck <martin.wilck@suse.com> Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
058147bc |
| 14-May-2018 |
Christoph Hellwig <hch@lst.de> |
memstick: remove unused variables
Fixes: 7c2d748e8476 ("memstick: don't call blk_queue_bounce_limit") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Christoph Hellwig <hch@lst.d
memstick: remove unused variables
Fixes: 7c2d748e8476 ("memstick: don't call blk_queue_bounce_limit") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
7c2d748e |
| 09-May-2018 |
Christoph Hellwig <hch@lst.de> |
memstick: don't call blk_queue_bounce_limit
All in-tree host drivers set up a proper dma mask and use the dma-mapping helpers. This means they will be able to deal with any address that we are thro
memstick: don't call blk_queue_bounce_limit
All in-tree host drivers set up a proper dma mask and use the dma-mapping helpers. This means they will be able to deal with any address that we are throwing at them.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
2a842aca |
| 03-Jun-2017 |
Christoph Hellwig <hch@lst.de> |
block: introduce new block status code type
Currently we use nornal Linux errno values in the block layer, and while we accept any error a few have overloaded magic meanings. This patch instead int
block: introduce new block status code type
Currently we use nornal Linux errno values in the block layer, and while we accept any error a few have overloaded magic meanings. This patch instead introduces a new blk_status_t value that holds block layer specific status codes and explicitly explains their meaning. Helpers to convert from and to the previous special meanings are provided for now, but I suspect we want to get rid of them in the long run - those drivers that have a errno input (e.g. networking) usually get errnos that don't know about the special block layer overloads, and similarly returning them to userspace will usually return somethings that strictly speaking isn't correct for file system operations, but that's left as an exercise for later.
For now the set of errors is a very limited set that closely corresponds to the previous overloaded errno values, but there is some low hanging fruite to improve it.
blk_status_t (ab)uses the sparse __bitwise annotations to allow for sparse typechecking, so that we can easily catch places passing the wrong values.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
show more ...
|
#
55460a8a |
| 31-Jan-2017 |
Christoph Hellwig <hch@lst.de> |
mspro_block: remove pointless prep_fn
This driver will never see non-fs requests, and doesn't do anything else in the prep_fn.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axbo
mspro_block: remove pointless prep_fn
This driver will never see non-fs requests, and doesn't do anything else in the prep_fn.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
show more ...
|
#
e8064021 |
| 20-Oct-2016 |
Christoph Hellwig <hch@lst.de> |
block: split out request-only flags into a new namespace
A lot of the REQ_* flags are only used on struct requests, and only of use to the block layer and a few drivers that dig into struct request
block: split out request-only flags into a new namespace
A lot of the REQ_* flags are only used on struct requests, and only of use to the block layer and a few drivers that dig into struct request internals.
This patch adds a new req_flags_t rq_flags field to struct request for them, and thus dramatically shrinks the number of common requests. It also removes the unfortunate situation where we have to fit the fields from the same enum into 32 bits for struct bio and 64 bits for struct request.
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Shaun Tancheff <shaun.tancheff@seagate.com> Signed-off-by: Jens Axboe <axboe@fb.com>
show more ...
|
#
4eef39c9 |
| 19-Jul-2016 |
Christoph Hellwig <hch@lst.de> |
memstick: don't allow REQ_TYPE_BLOCK_PC requests
There is no code to issue or handle REQ_TYPE_BLOCK_PC request in the memstick drivers, so remove the bogus conditional.
Signed-off-by: Christoph Hel
memstick: don't allow REQ_TYPE_BLOCK_PC requests
There is no code to issue or handle REQ_TYPE_BLOCK_PC request in the memstick drivers, so remove the bogus conditional.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
show more ...
|
#
0d52c756 |
| 16-Jun-2016 |
Dan Williams <dan.j.williams@intel.com> |
block: convert to device_add_disk()
For block drivers that specify a parent device, convert them to use device_add_disk().
This conversion was done with the following semantic patch:
@@ st
block: convert to device_add_disk()
For block drivers that specify a parent device, convert them to use device_add_disk().
This conversion was done with the following semantic patch:
@@ struct gendisk *disk; expression E; @@
- disk->driverfs_dev = E; ... - add_disk(disk); + device_add_disk(E, disk);
@@ struct gendisk *disk; expression E1, E2; @@
- disk->driverfs_dev = E1; ... E2 = disk; ... - add_disk(E2); + device_add_disk(E1, E2);
...plus some manual fixups for a few missed conversions.
Cc: Jens Axboe <axboe@fb.com> Cc: Keith Busch <keith.busch@intel.com> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: David S. Miller <davem@davemloft.net> Cc: James Bottomley <James.Bottomley@hansenpartnership.com> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
show more ...
|
#
de6cdcb5 |
| 23-May-2016 |
Muhammad Falak R Wani <falakreyaz@gmail.com> |
drivers/memstick/core/mspro_block: use kmemdup
Use kmemdup when some other buffer is immediately copied into allocated region. It replaces call to allocation followed by memcpy, by a single call to
drivers/memstick/core/mspro_block: use kmemdup
Use kmemdup when some other buffer is immediately copied into allocated region. It replaces call to allocation followed by memcpy, by a single call to kmemdup.
[akpm@linux-foundation.org: remove unneeded cast to void*] Link: http://lkml.kernel.org/r/1463665743-16269-1-git-send-email-falakreyaz@gmail.com Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|
#
13f6b191 |
| 16-Apr-2015 |
Dan Carpenter <dan.carpenter@oracle.com> |
memstick: mspro_block: add missing curly braces
Using the indenting we can see the curly braces were obviously intended. This is a static checker fix, but my guess is that we don't read enough bytes
memstick: mspro_block: add missing curly braces
Using the indenting we can see the curly braces were obviously intended. This is a static checker fix, but my guess is that we don't read enough bytes, because we don't calculate "t_len" correctly.
Fixes: f1d82698029b ('memstick: use fully asynchronous request processing') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Alex Dubov <oakad@yahoo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|
#
be2d3f97 |
| 12-Nov-2013 |
Michal Nazarewicz <mina86@mina86.com> |
drivers/memstick/core/mspro_block.c: fix attributes array allocation
attrs field of attribute_group structure is a pointer to a pointer (as in an array of pointers) rather than pointer to attribute
drivers/memstick/core/mspro_block.c: fix attributes array allocation
attrs field of attribute_group structure is a pointer to a pointer (as in an array of pointers) rather than pointer to attribute struct (as in an array of structures), so when allocating size of the pointer sholud be used instead of the structure it is pointing to.
While at it, also change the call to use kcalloc rather than kzalloc.
Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Cc: Tejun Heo <tj@kernel.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Alex Dubov <oakad@yahoo.com> Cc: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|