summaryrefslogtreecommitdiffstats
path: root/drivers/nvme
Commit message (Collapse)AuthorAgeFilesLines
* block: record block device typeAhmad Fatoum2024-03-051-0/+1
| | | | | | | | | | Software running under EFI can query the type of a block device. For barebox to be able to report this, start assigning types to all block devices it can create. No functional change yet. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240304190038.3486881-24-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* block: parse partition table on block device registrationAhmad Fatoum2023-06-121-5/+0
| | | | | | | | | | | | | | | Every instance of block device registration is followed by an attempt to parse the partition table. Thus move partition table parsing into blockdevice_register. We do away with the warning print as it's superfluous: parse_partition_table doesn't return an error if partition table is missing and all other errors already result in an error message. Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230607120714.3083182-13-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nvme: parse partition table when registering a block deviceDenis Orlov2023-02-101-0/+5
| | | | | | | | | Otherwise, we can not access file systems located on partitioned NVME drives. Signed-off-by: Denis Orlov <denorl2009@gmail.com> Link: https://lore.barebox.org/20230209143751.854897-1-denorl2009@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Rename struct device_d to deviceSascha Hauer2023-01-103-4/+4
| | | | | | | | | | | | | The '_d' suffix was originally introduced in case we want to import Linux struct device as a separate struct into barebox. Over time it became clear that this won't happen, instead barebox struct device_d is basically the same as Linux struct device. Rename the struct name accordingly to make porting Linux code easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: migrate "GPL-2.0" license identifiers to SPDX 2.0Roland Hieber2021-11-227-7/+7
| | | | | | | | | | "GPL-2.0-only" was introduced in SPDX 2.0, and the old identifier "GPL-2.0" is now considered deprecated; see <https://spdx.org/licenses>. Fixes: 28f4a6a4df76f0f1581d (2021-10-30, "drivers: add missing SPDX-License-Identifier") Signed-off-by: Roland Hieber <rhi@pengutronix.de> Link: https://lore.barebox.org/20211117113851.2022669-2-rhi@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: add missing SPDX-License-IdentifierAhmad Fatoum2021-11-016-9/+6
| | | | | | | | | | | | | | | | | | | | This adds the suitable SPDX-License-Identifier to all files in drivers/ that previously lacked one. To aid manual inspection, following heuristics can be used: * No changes outside of comments/whitespace: git show -U0 HEAD | rg -v '^(@@|diff|index)|[-+]([-+]|//|#|[\s/]\*)' * -or-later come in pairs: git show --inter-hunk-context=19 HEAD | \ perl -0777 -F'/^@/gm' -ne 'for (@F) { @m = /later/g; print if @m & 1 }' Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20211030175632.2276077-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* block: use 64-bit types for sector offset and count on all platformsAhmad Fatoum2021-02-181-6/+6
| | | | | | | | | | | barebox' use of int for the sector offset puts an upper bound of 1TB on the size of supported block devices, which is already exceeded by common place USB mass storage. Increasing the sizes involved to 64 bit like Linux does won't magically add missing driver support, but it gives us at least a fighting chance. Do so. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nvme: correct symbol export name for nvme_submit_sync_cmdLucas Stach2019-12-021-1/+1
| | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nvme: use 64 bit types for timeouts even on 32 bit systemsAhmad Fatoum2019-08-301-2/+2
| | | | | | | | | The SHUTDOWN_TIMEOUT value of 5e9 would already exceed the range of unsigned long on a 32-bit system. Fix this by using uint64_t for all time-holding variables. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: replace '---help---' with 'help' in Kconfig filesMasahiro Yamada2019-05-171-1/+1
| | | | | | | | | | | | | | | | In Linux, '---help---' was deprecated in favor of 'help', and this is checked by the recent checkpatch.pl See Linux commit 84af7a6194e493fae312a2b7fa5a3b51f76d9282 The number of '---help---' is gradually decreasing in Linux, but there are still lots. However, '---help---' will be completely killed when the time comes. Fortunately, there are only some in Barebox. Replacing them is not hard. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: Import a very basic NVME implementation from LinuxAndrey Smirnov2019-02-187-0/+1485
Import a very abridged NVME implementation from Linux kernel in order to be able to access NVME storage attached via PCIe. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>