Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ntb/ntb_hw/ntb_hw.c
Show All 40 Lines | |||||
* Ivytown NTB BAR sizes are misreported by the hardware due to a | * Ivytown NTB BAR sizes are misreported by the hardware due to a | ||||
* hardware issue. To work around this, query the size it should be | * hardware issue. To work around this, query the size it should be | ||||
* configured to by the device and modify the resource to correspond to | * configured to by the device and modify the resource to correspond to | ||||
* this new size. The BIOS on systems with this problem is required to | * this new size. The BIOS on systems with this problem is required to | ||||
* provide enough address space to allow the driver to make this change | * provide enough address space to allow the driver to make this change | ||||
* safely. | * safely. | ||||
* | * | ||||
* Ideally I could have just specified the size when I allocated the | * Ideally I could have just specified the size when I allocated the | ||||
* resource like: | * resource like: | ||||
* bus_alloc_resource(ntb->device, | * bus_alloc_resource(ntb->device, | ||||
* SYS_RES_MEMORY, &bar->pci_resource_id, 0ul, ~0ul, | * SYS_RES_MEMORY, &bar->pci_resource_id, 0, ~0, | ||||
cem: This change seems gratuitous (and wrong).
Also, this diff doesn't appear to have any context? | |||||
Not Done Inline ActionsRegarding the diff: I'll remember to use 'diff -U99999' in the future. I created this diff on a machine in the cluster that doesn't have arc installed, and didn't regenerate it locally before posting. Regarding the change: It should be perfectly valid. It may be a little gratuitous, given that ntb is amd64 only (though, i386 should run on hardware with it), but it's consistent with all other changes. jhibbits: Regarding the diff: I'll remember to use 'diff -U99999' in the future. I created this diff on… | |||||
Not Done Inline ActionsIt's gratuitous because it's a comment :). cem: It's gratuitous because it's a comment :). | |||||
Not Done Inline ActionsD'oh, yes. I can remove it if you'd like. jhibbits: D'oh, yes. I can remove it if you'd like. | |||||
Not Done Inline ActionsOTOH, if "0, ~0" is now the "correct" way to call bus_alloc_resource(), I wouldn't want incorrect examples in comments to throw off future readers. jhb: OTOH, if "0, ~0" is now the "correct" way to call bus_alloc_resource(), I wouldn't want… | |||||
* 1ul << bar_size_bits, RF_ACTIVE); | * 1ul << bar_size_bits, RF_ACTIVE); | ||||
* but the PCI driver does not honor the size in this call, so we have | * but the PCI driver does not honor the size in this call, so we have | ||||
* to modify it after the fact. | * to modify it after the fact. | ||||
*/ | */ | ||||
if (HAS_FEATURE(NTB_BAR_SIZE_4K)) { | if (HAS_FEATURE(NTB_BAR_SIZE_4K)) { | ||||
if (bar->pci_resource_id == PCIR_BAR(2)) | if (bar->pci_resource_id == PCIR_BAR(2)) | ||||
bar_size_bits = pci_read_config(ntb->device, | bar_size_bits = pci_read_config(ntb->device, | ||||
XEON_PBAR23SZ_OFFSET, 1); | XEON_PBAR23SZ_OFFSET, 1); | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |
This change seems gratuitous (and wrong).
Also, this diff doesn't appear to have any context? Next time use 'arc diff' or 'diff -U99999' please.