Actions
Feature #389
closedprogrammers can restore pci value in shutdown function
Start date:
07/15/2022
Due date:
% Done:
0%
Estimated time:
Affected versions:
Needs backport to:
Affected hardware:
Affected OS:
Description
Resetting the bit to zero can be done in *_shutdown
by reading the register, set it (for example, reg &= ~(1 << 24)
) and write it back with pci_write_long(dev, SOME_SPECIAL_REG, reg)
.
It's related to next programmers:
- atahpt.c
- drkaiser.c
- gfxnvidia.c
- it8212.c
See the comment thread in the linked patch for more details.
Updated by Felix Singer over 2 years ago
Shouldn't this go to the cleanup tracker?
Updated by Anastasia Klimchuk over 2 years ago
- Assignee changed from Anastasia Klimchuk to Alexander Goncharov
Updated by Alexander Goncharov over 2 years ago
- Subject changed from atahpt can reset REG_FLASH_ACCESS in shutdown function to programmers can restore pci value in shutdown function
- Description updated (diff)
Updated by Alexander Goncharov over 2 years ago
- Description updated (diff)
Reversible writes were introduced in commit 2bee8cf898007687c58ddb29eb119b461704f18a . Before this commit, the programmers were restoring a PCI value themselves, e.g:
atahpt :
uint32_t reg32;
/* Disable flash access again. */
reg32 = pci_read_long(pcidev_dev, REG_FLASH_ACCESS);
reg32 &= ~(1 << 24);
pci_write_long(pcidev_dev, REG_FLASH_ACCESS, reg32);
drkaiser :
/* Write protect the flash again. */
pci_write_word(pcidev_dev, PCI_MAGIC_DRKAISER_ADDR, 0);
gfxnvidia :
uint32_t reg32;
/* Disallow access to flash interface (and re-enable screen). */
reg32 = pci_read_long(pcidev_dev, 0x50);
reg32 |= (1 << 0);
pci_write_long(pcidev_dev, 0x50, reg32);
Updated by Alexander Goncharov about 2 years ago
Done!
Updated by Alexander Goncharov about 2 years ago
- Status changed from New to Resolved
Actions