mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-23 03:06:48 +00:00
nvme: Use the NVMEM macro instead of expanded versions
A few of these omitted a shift of 0, but this is more consistent. Reviewed by: chuck Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D43602
This commit is contained in:
parent
1dade1f255
commit
8488fc417f
|
@ -295,7 +295,7 @@ nvme_ctrlr_disable(struct nvme_controller *ctrlr)
|
|||
return (err);
|
||||
}
|
||||
|
||||
cc &= ~NVME_CC_REG_EN_MASK;
|
||||
cc &= ~NVMEM(NVME_CC_REG_EN);
|
||||
nvme_mmio_write_4(ctrlr, cc, cc);
|
||||
|
||||
/*
|
||||
|
@ -1215,7 +1215,7 @@ nvme_pt_done(void *arg, const struct nvme_completion *cpl)
|
|||
pt->cpl.cdw0 = cpl->cdw0;
|
||||
|
||||
status = cpl->status;
|
||||
status &= ~NVME_STATUS_P_MASK;
|
||||
status &= ~NVMEM(NVME_STATUS_P);
|
||||
pt->cpl.status = status;
|
||||
|
||||
mtx_lock(mtx);
|
||||
|
@ -1556,7 +1556,7 @@ nvme_ctrlr_shutdown(struct nvme_controller *ctrlr)
|
|||
int timeout;
|
||||
|
||||
cc = nvme_mmio_read_4(ctrlr, cc);
|
||||
cc &= ~(NVME_CC_REG_SHN_MASK << NVME_CC_REG_SHN_SHIFT);
|
||||
cc &= ~NVMEM(NVME_CC_REG_SHN);
|
||||
cc |= NVME_SHN_NORMAL << NVME_CC_REG_SHN_SHIFT;
|
||||
nvme_mmio_write_4(ctrlr, cc, cc);
|
||||
|
||||
|
|
|
@ -285,7 +285,7 @@ nvme_bio_child_inbed(struct bio *parent, int bio_error)
|
|||
if (inbed == children) {
|
||||
bzero(&parent_cpl, sizeof(parent_cpl));
|
||||
if (parent->bio_flags & BIO_ERROR) {
|
||||
parent_cpl.status &= ~(NVME_STATUS_SC_MASK << NVME_STATUS_SC_SHIFT);
|
||||
parent_cpl.status &= ~NVMEM(NVME_STATUS_SC);
|
||||
parent_cpl.status |= (NVME_SC_DATA_TRANSFER_ERROR) << NVME_STATUS_SC_SHIFT;
|
||||
}
|
||||
nvme_ns_bio_done(parent, &parent_cpl);
|
||||
|
|
Loading…
Reference in a new issue