nvme/pcie: use 16 bits width access API for PCI_COMMAND register
PCI_COMMAND register with offset 0x4 is 16 bits width. Change-Id: I86483e58a3ac680efaae6ff7edaadde8efc289f6 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2589 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
d33466d0a9
commit
3b6622046e
@ -813,7 +813,7 @@ static struct spdk_nvme_ctrlr *nvme_pcie_ctrlr_construct(const struct spdk_nvme_
|
||||
struct nvme_pcie_ctrlr *pctrlr;
|
||||
union spdk_nvme_cap_register cap;
|
||||
union spdk_nvme_vs_register vs;
|
||||
uint32_t cmd_reg;
|
||||
uint16_t cmd_reg;
|
||||
int rc;
|
||||
struct spdk_pci_id pci_id;
|
||||
|
||||
@ -853,9 +853,9 @@ static struct spdk_nvme_ctrlr *nvme_pcie_ctrlr_construct(const struct spdk_nvme_
|
||||
}
|
||||
|
||||
/* Enable PCI busmaster and disable INTx */
|
||||
spdk_pci_device_cfg_read32(pci_dev, &cmd_reg, 4);
|
||||
spdk_pci_device_cfg_read16(pci_dev, &cmd_reg, 4);
|
||||
cmd_reg |= 0x404;
|
||||
spdk_pci_device_cfg_write32(pci_dev, cmd_reg, 4);
|
||||
spdk_pci_device_cfg_write16(pci_dev, cmd_reg, 4);
|
||||
|
||||
if (nvme_ctrlr_get_cap(&pctrlr->ctrlr, &cap)) {
|
||||
SPDK_ERRLOG("get_cap() failed\n");
|
||||
|
@ -66,9 +66,9 @@ DEFINE_STUB(spdk_pci_device_attach, int, (struct spdk_pci_driver *driver, spdk_p
|
||||
DEFINE_STUB(spdk_pci_device_claim, int, (struct spdk_pci_device *dev), 0);
|
||||
DEFINE_STUB_V(spdk_pci_device_unclaim, (struct spdk_pci_device *dev));
|
||||
DEFINE_STUB_V(spdk_pci_device_detach, (struct spdk_pci_device *device));
|
||||
DEFINE_STUB(spdk_pci_device_cfg_write32, int, (struct spdk_pci_device *dev, uint32_t value,
|
||||
DEFINE_STUB(spdk_pci_device_cfg_write16, int, (struct spdk_pci_device *dev, uint16_t value,
|
||||
uint32_t offset), 0);
|
||||
DEFINE_STUB(spdk_pci_device_cfg_read32, int, (struct spdk_pci_device *dev, uint32_t *value,
|
||||
DEFINE_STUB(spdk_pci_device_cfg_read16, int, (struct spdk_pci_device *dev, uint16_t *value,
|
||||
uint32_t offset), 0);
|
||||
DEFINE_STUB(spdk_pci_device_get_id, struct spdk_pci_id, (struct spdk_pci_device *dev), {0})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user