FreeBSD Bugzilla – Attachment 13891 Details for
Bug 26255
[patch] CS4281 driver, fixed power mode problem.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 979 bytes, created by
WATANABE Kiyoshi
on 2001-03-31 22:50:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
WATANABE Kiyoshi
Created:
2001-03-31 22:50:00 UTC
Size:
979 bytes
patch
obsolete
>--- cs4281.c-1.4 Sat Mar 24 23:10:27 2001 >+++ cs4281.c Sat Mar 31 19:37:16 2001 >@@ -767,8 +767,6 @@ > data |= (PCIM_CMD_PORTEN | PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); > pci_write_config(dev, PCIR_COMMAND, data, 2); > >- data = pci_read_config(dev, PCIR_COMMAND, 2); >- > #if __FreeBSD_version > 500000 > if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) { > /* Reset the power state. */ >@@ -776,6 +774,18 @@ > "-- setting to D0\n", pci_get_powerstate(dev)); > > pci_set_powerstate(dev, PCI_POWERSTATE_D0); >+ } >+#else >+ >+#define CS4281PCI_PMCS_OFFSET (CS4281PCI_PMCS - 0x300) >+ >+ data = pci_read_config(dev, CS4281PCI_PMCS_OFFSET, 4); >+ if (data & CS4281PCI_PMCS_PS_MASK) { >+ /* Reset the power state. */ >+ device_printf(dev, "chip is in D%d power mode " >+ "-- setting to D0\n", data & CS4281PCI_PMCS_PS_MASK); >+ pci_write_config(dev, CS4281PCI_PMCS_OFFSET, >+ data & ~CS4281PCI_PMCS_PS_MASK, 4); > } > #endif > sc->regid = PCIR_MAPS;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 26255
: 13891