nvme/identify: Correct the Arbitration Burst bits (0..2)

Change-Id: Ia9bcca01d7d2e2c0a7c97c0a7c7a49f5c3417a0b
Signed-off-by: GangCao <gang.cao@intel.com>
This commit is contained in:
GangCao 2016-05-15 19:08:30 -04:00 committed by Daniel Verkamp
parent 20f59ee12e
commit dd27218532

View File

@ -585,7 +585,7 @@ print_controller(struct spdk_nvme_ctrlr *ctrlr, struct spdk_pci_device *pci_dev)
uint32_t arb = features[SPDK_NVME_FEAT_ARBITRATION].result; uint32_t arb = features[SPDK_NVME_FEAT_ARBITRATION].result;
unsigned ab, lpw, mpw, hpw; unsigned ab, lpw, mpw, hpw;
ab = arb & 0x3; ab = arb & 0x7;
lpw = ((arb >> 8) & 0xFF) + 1; lpw = ((arb >> 8) & 0xFF) + 1;
mpw = ((arb >> 16) & 0xFF) + 1; mpw = ((arb >> 16) & 0xFF) + 1;
hpw = ((arb >> 24) & 0xFF) + 1; hpw = ((arb >> 24) & 0xFF) + 1;
@ -593,7 +593,7 @@ print_controller(struct spdk_nvme_ctrlr *ctrlr, struct spdk_pci_device *pci_dev)
printf("Arbitration\n"); printf("Arbitration\n");
printf("===========\n"); printf("===========\n");
printf("Arbitration Burst: "); printf("Arbitration Burst: ");
if (ab == 7) { if (ab == 0x7) {
printf("no limit\n"); printf("no limit\n");
} else { } else {
printf("%u\n", 1u << ab); printf("%u\n", 1u << ab);