mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
nvme: make partition type depend on saved command line
nvme for rockchip platform could be used as both of main disk or external storage. So it's not proper to fix the partition type by checking CONFIG_ARCH_ROCKCHIP. Otherwise, if the nvme is probed earily then the real main disk device, then the main disk could be failed to mount. Change-Id: If30940527e99d88d792fe3f19475fabf4b1a99d3 Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
This commit is contained in:
parent
29c4d612eb
commit
a3c93d1b46
|
|
@ -2299,11 +2299,12 @@ static void nvme_alloc_ns(struct nvme_dev *dev, unsigned nsid)
|
|||
disk->queue = ns->queue;
|
||||
disk->driverfs_dev = dev->device;
|
||||
disk->flags = GENHD_FL_EXT_DEVT;
|
||||
#ifdef CONFIG_ARCH_ROCKCHIP
|
||||
disk->is_rk_disk = true;
|
||||
#else
|
||||
disk->is_rk_disk = false;
|
||||
#endif
|
||||
|
||||
if (strstr(saved_command_line, "storagemedia=nvme"))
|
||||
disk->is_rk_disk = true;
|
||||
else
|
||||
disk->is_rk_disk = false;
|
||||
|
||||
sprintf(disk->disk_name, "nvme%dn%d", dev->instance, nsid);
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user