Age | Commit message (Collapse) | Author | Files | Lines |
|
Get page count using compatible match to support the series of chipsets
which differs in number of regualator/page.
Signed-off-by: Saravanan Sekar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
|
|
These modify the corresponding bits in the configuration register.
adi,comp-int is a hardware property, because it affects the behavior
of the interrupt signal and whatever it is connected to.
adi,timeout-enable is a hardware property, because it affects i2c
bus operation.
Signed-off-by: Daniel Matyas <[email protected]>
Reviewed-by: Conor Dooley <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
|
|
There is nothing in the datasheet indicating that the 1ms error is
needed and I didn't encounter any error during testing with 140ms wait
time.
Signed-off-by: Daniel Matyas <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Used enums and while loops to replace switch for selecting and getting
update interval from conversion rate bits.
Divided the write_alarm_val function into 2 functions. The new function
is more generic: it can be used not only for alarm writes, but for any
kind of writes which require the device to be in shutdown mode.
Signed-off-by: Daniel Matyas <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[groeck: Reverted error return value change (EOPNOTSUPP -> EINVAL)]
Signed-off-by: Guenter Roeck <[email protected]>
|
|
As he is the submitter of this driver, add his mail so he can
maintain the driver and easily reply in the mailing list.
Acked-by: Emil Renner Berthing <[email protected]>
Signed-off-by: Hal Feng <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
|
|
This value was found on an ASRock X670E Taichi with an
NCT6686D chip.
Signed-off-by: Alexander Koskovich <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Do not allow setting shunt resistor to 0. This results in a division by
zero when performing current value computations based on input voltages
and connected resistor values.
Signed-off-by: Antoniu Miclaus <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
|
|
npcm7xx_pwm_config_set() can return '-ENODEV' for failed. So check
the value of 'ret' after calling npcm7xx_pwm_config_set().
Signed-off-by: Su Hui <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Currently the local variable hum is being divided by a constant and
the results is being re-assigned back to hum before the value is being
returned to the caller. The assignment to hum is redundant and can
be removed.
Cleans up clang scan build warning:
drivers/hwmon/hs3001.c:65:9: warning: Although the value stored to 'hum'
is used in the enclosing expression, the value is never actually read
from 'hum' [deadcode.DeadStores]
Signed-off-by: Colin Ian King <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Convert manual _UID references to use the standard ACPI helper.
Signed-off-by: Raag Jadav <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Now that s_umount is never taken under open_mutex update the
documentation to say so.
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
With recent block level changes we should never be in a situation where
we hold disk->open_mutex when calling into these helpers. So assert that
in the code.
Signed-off-by: Christoph Hellwig <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Ming Lei <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Reviewed-by: Jens Axboe <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
|
|
blk_report_disk_dead() has the following major callers:
(1) del_gendisk()
(2) blk_mark_disk_dead()
Since del_gendisk() acquires disk->open_mutex it's clear that all
callers are assumed to be called without disk->open_mutex held.
In turn, blk_report_disk_dead() is called without disk->open_mutex held
in del_gendisk().
All callers of blk_mark_disk_dead() call it without disk->open_mutex as
well.
Ensure that it is clear that blk_report_disk_dead() is called without
disk->open_mutex on purpose by asserting it and a comment in the code.
Signed-off-by: Christoph Hellwig <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Ming Lei <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Reviewed-by: Jens Axboe <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
|
|
disk_check_media_change is mostly called from ->open where it makes
little sense to mark the file system on the device as dead, as we
are just opening it. So instead of calling bdev_mark_dead from
disk_check_media_change move it into the few callers that are not
in an open instance. This avoid calling into bdev_mark_dead and
thus taking s_umount with open_mutex held.
Signed-off-by: Christoph Hellwig <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Ming Lei <[email protected]>
Reviewed-by: Christian Brauner <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Reviewed-by: Jens Axboe <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
|
|
The logic for disk->open_partitions is:
blkdev_get_by_*()
-> bdev_is_partition()
-> blkdev_get_part()
-> blkdev_get_whole() // bdev_whole->bd_openers++
-> if (part->bd_openers == 0)
disk->open_partitions++
part->bd_openers
In other words, when we first claim/open a partition we increment
disk->open_partitions and only when all part->bd_openers are closed will
disk->open_partitions be zero. That should mean that
disk->open_partitions is always > 0 as long as there's anyone that
has an open partition.
So the check for disk->open_partitions should mean that we can never
remove an active partition that has a holder and holder ops set. Assert
that in the code. The main disk isn't removed so that check doesn't work
for disk->part0 which is what we want. After all we only care about
partition not about the main disk.
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Ming Lei <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Reviewed-by: Jens Axboe <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
|
|
BLKPG_DEL_PARTITION refuses to delete partitions that still have
openers, i.e., that has an elevated @bdev->bd_openers count. If a device
is claimed by setting @bdev->bd_holder and @bdev->bd_holder_ops
@bdev->bd_openers and @bdev->bd_holders are incremented.
@bdev->bd_openers is effectively guaranteed to be >= @bdev->bd_holders.
So as long as @bdev->bd_openers isn't zero we know that this partition
is still in active use and that there might still be @bdev->bd_holder
and @bdev->bd_holder_ops set.
The only current example is @fs_holder_ops for filesystems. But that
means bdev_mark_dead() which calls into
bdev->bd_holder_ops->mark_dead::fs_bdev_mark_dead() is a nop. As long as
there's an elevated @bdev->bd_openers count we can't delete the
partition and if there isn't an elevated @bdev->bd_openers count then
there's no @bdev->bd_holder or @bdev->bd_holder_ops.
So simply open-code what we need to do. This gets rid of one more
instance where we acquire s_umount under @disk->open_mutex.
Link: https://lore.kernel.org/r/20231016-fototermin-umriss-59f1ea6c1fe6@brauner
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Reviewed-by: Jens Axboe <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Ming Lei <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
|
|
The implementation of bdev holder operations such as fs_bdev_mark_dead()
and fs_bdev_sync() grab sb->s_umount semaphore under
bdev->bd_holder_lock. This is problematic because it leads to
disk->open_mutex -> sb->s_umount lock ordering which is counterintuitive
(usually we grab higher level (e.g. filesystem) locks first and lower
level (e.g. block layer) locks later) and indeed makes lockdep complain
about possible locking cycles whenever we open a block device while
holding sb->s_umount semaphore. Implement a function
bdev_super_lock_shared() which safely transitions from holding
bdev->bd_holder_lock to holding sb->s_umount on alive superblock without
introducing the problematic lock dependency. We use this function
fs_bdev_sync() and fs_bdev_mark_dead().
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
|
|
When sbi->flag is JFS_NOINTEGRITY in lmLogOpen(), log->bdev_handle can't
be inited, so it value will be NULL.
Therefore, add the "log ->no_integrity=1" judgment in lbmStartIO() to avoid such
problems.
Reported-and-tested-by: [email protected]
Signed-off-by: Lizhi Xu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Jan Kara <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
|
|
Coverity has noticed that the printing of error message in
register_cache() uses already freed bdev_handle to get to bdev. In fact
the problem has been there even before commit "bcache: Convert to
bdev_open_by_path()" just a bit more subtle one - cache object itself
could have been freed by the time we looked at ca->bdev and we don't
hold any reference to bdev either so even that could in principle go
away (due to device unplug or similar). Fix all these problems by
printing the error message before closing the bdev.
Fixes: dc893f51d24a ("bcache: Convert to bdev_open_by_path()")
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Asked-by: Coly Li <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert xfs to use bdev_open_by_path() and pass the handle around.
CC: "Darrick J. Wong" <[email protected]>
CC: [email protected]
Acked-by: Christoph Hellwig <[email protected]>
Reviewed-by: Dave Chinner <[email protected]>
Reviewed-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Acked-by: "Darrick J. Wong" <[email protected]>
Reviewed-by: "Darrick J. Wong" <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert reiserfs to use bdev_open_by_dev/path() and pass the handle
around.
CC: [email protected]
Acked-by: Christoph Hellwig <[email protected]>
Reviewed-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert ocfs2 heartbeat code to use bdev_open_by_dev() and pass the
handle around.
CC: Joseph Qi <[email protected]>
CC: [email protected]
Acked-by: Christoph Hellwig <[email protected]>
Reviewed-by: Joseph Qi <[email protected]>
Reviewed-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert block device handling to use bdev_open_by_dev/path() and pass
the handle around.
CC: [email protected]
CC: Trond Myklebust <[email protected]>
CC: Anna Schumaker <[email protected]>
Acked-by: Christoph Hellwig <[email protected]>
Reviewed-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert jfs to use bdev_open_by_dev() and pass the handle around.
CC: Dave Kleikamp <[email protected]>
CC: [email protected]
Acked-by: Christoph Hellwig <[email protected]>
Acked-by: Dave Kleikamp <[email protected]>
Reviewed-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert f2fs to use bdev_open_by_dev/path() and pass the handle around.
CC: Jaegeuk Kim <[email protected]>
CC: Chao Yu <[email protected]>
CC: [email protected]
Acked-by: Christoph Hellwig <[email protected]>
Reviewed-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert ext4 to use bdev_open_by_dev() and pass the handle around.
CC: [email protected]
CC: Ted Tso <[email protected]>
Acked-by: Christoph Hellwig <[email protected]>
Reviewed-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert erofs to use bdev_open_by_path() and pass the handle around.
CC: Gao Xiang <[email protected]>
CC: Chao Yu <[email protected]>
CC: [email protected]
Acked-by: Christoph Hellwig <[email protected]>
Acked-by: Gao Xiang <[email protected]>
Reviewed-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert btrfs to use bdev_open_by_path() and pass the handle around. We
also drop the holder from struct btrfs_device as it is now not needed
anymore.
CC: David Sterba <[email protected]>
CC: [email protected]
Acked-by: Christoph Hellwig <[email protected]>
Reviewed-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert mount code to use bdev_open_by_dev() and propagate the handle
around to bdev_release().
Acked-by: Christoph Hellwig <[email protected]>
Reviewed-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert swapping code to use bdev_open_by_dev() and pass the handle
around.
CC: [email protected]
CC: Andrew Morton <[email protected]>
Acked-by: Christoph Hellwig <[email protected]>
Acked-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
snapshot_test argument is now unused in swsusp_close() and
load_image_and_restore(). Drop it
CC: [email protected]
Acked-by: Christoph Hellwig <[email protected]>
Acked-by: "Rafael J. Wysocki" <[email protected]>
Acked-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert hibernation code to use bdev_open_by_dev().
CC: [email protected]
Acked-by: Christoph Hellwig <[email protected]>
Acked-by: "Rafael J. Wysocki" <[email protected]>
Acked-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert iblock and pscsi drivers to use bdev_open_by_path() and pass the
handle around.
CC: [email protected]
CC: [email protected]
Acked-by: Christoph Hellwig <[email protected]>
Acked-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: "Martin K. Petersen" <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert dasd to use bdev_open_by_path() and pass the handle around.
CC: [email protected]
CC: Christian Borntraeger <[email protected]>
CC: Sven Schnelle <[email protected]>
Acked-by: Christoph Hellwig <[email protected]>
Acked-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert nvmet to use bdev_open_by_path() and pass the handle around.
CC: [email protected]
Acked-by: Christoph Hellwig <[email protected]>
Acked-by: Christian Brauner <[email protected]>
Reviewed-by: Chaitanya Kulkarni <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert block2mtd to use bdev_open_by_dev() and bdev_open_by_path() and
pass the handle around.
CC: Joern Engel <[email protected]>
CC: [email protected]
Acked-by: Christoph Hellwig <[email protected]>
Acked-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert md to use bdev_open_by_dev() and pass the handle around. We also
don't need the 'Holder' flag anymore so remove it.
CC: [email protected]
CC: Song Liu <[email protected]>
Acked-by: Song Liu <[email protected]>
Acked-by: Christoph Hellwig <[email protected]>
Acked-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert device mapper to use bdev_open_by_dev() and pass the handle
around.
CC: Alasdair Kergon <[email protected]>
CC: Mike Snitzer <[email protected]>
CC: [email protected]
Acked-by: Christoph Hellwig <[email protected]>
Acked-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert bcache to use bdev_open_by_path() and pass the handle around.
CC: [email protected]
CC: Coly Li <[email protected]>
CC: Kent Overstreet <[email protected]>
Acked-by: Christoph Hellwig <[email protected]>
Acked-by: Christian Brauner <[email protected]>
Acked-by: Coly Li <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert zram to use bdev_open_by_dev() and pass the handle around.
CC: Minchan Kim <[email protected]>
CC: Sergey Senozhatsky <[email protected]>
Acked-by: Christoph Hellwig <[email protected]>
Acked-by: Christian Brauner <[email protected]>
Reviewed-by: Sergey Senozhatsky <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert xen/blkback to use bdev_open_by_dev() and pass the
handle around.
CC: [email protected]
Acked-by: Christoph Hellwig <[email protected]>
Acked-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert rnbd-srv to use bdev_open_by_path() and pass the handle
around.
CC: Jack Wang <[email protected]>
CC: "Md. Haris Iqbal" <[email protected]>
Acked-by: "Md. Haris Iqbal" <[email protected]>
Acked-by: Christoph Hellwig <[email protected]>
Acked-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert pktcdvd to use bdev_open_by_dev().
Acked-by: Christoph Hellwig <[email protected]>
Acked-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert drdb to use bdev_open_by_path().
CC: [email protected]
Acked-by: Christoph Hellwig <[email protected]>
Acked-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert disk_scan_partitions() and blkdev_bszset() to use
bdev_open_by_dev().
Acked-by: Christoph Hellwig <[email protected]>
Reviewed-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
Convert blkdev_open() to use bdev_open_by_dev(). To be able to propagate
handle from blkdev_open() to blkdev_release() we need to stop using
existence of file->private_data to determine exclusive block device
opens. Use bdev_handle->mode for this purpose since file->f_flags
isn't usable for this (O_EXCL is cleared from the flags during open).
Acked-by: Christoph Hellwig <[email protected]>
Reviewed-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
Create struct bdev_handle that contains all parameters that need to be
passed to blkdev_put() and provide bdev_open_* functions that return
this structure instead of plain bdev pointer. This will eventually allow
us to pass one more argument to blkdev_put() (renamed to bdev_release())
without too much hassle.
Acked-by: Christoph Hellwig <[email protected]>
Reviewed-by: Christian Brauner <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
|
|
W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
Acked-by: Willem de Bruijn <[email protected]>
Acked-by: Jamal Hadi Salim <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Acked-by: Jason Wang <[email protected]>
Acked-by: Taehee Yoo <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
Reviewed-by: Oleksij Rempel <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|