Re: [PATCH v3] xHCI: Correct the #define XHCI_LEGACY_DISABLE_SMI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06.04.2012 14:43, Sergei Shtylyov wrote:

Re-define XHCI_LEGACY_DISABLE_SMI and used it in right way. All SMI enable
bits will be cleared to zero and flag bits 29:31 are also cleared to zero.
Other bits should be presvered as Table 146.

Signed-off-by: Alex He<alex.he@xxxxxxx>
---
drivers/usb/host/pci-quirks.c | 10 +++++++---
drivers/usb/host/xhci-ext-caps.h | 5 +++--
2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index 7732d69..5da792c 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -825,9 +825,13 @@ static void __devinit quirk_usb_handoff_xhci(struct
pci_dev *pdev)
}
}

- /* Disable any BIOS SMIs */
- writel(XHCI_LEGACY_DISABLE_SMI,
- base + ext_cap_offset + XHCI_LEGACY_CONTROL_OFFSET);
+ val = readl(base + ext_cap_offset + XHCI_LEGACY_CONTROL_OFFSET);
+ /* Mask off (turn off) any enabled SMIs */
+ val&= XHCI_LEGACY_DISABLE_SMI,

You meant ';' here, not ','? The end result should be the same though...

Oh, yes. I am speechless for this mistake. I am so sorry and will resend it.

So you don't compile or test your bug fix patches before you send them?
That really lowers the amount of trust I have in your patches. Please
compile and test all patches in the future, even if they seem trivial.

Neither compilation nor test should have detected this mistake. As I said,
whether you're using ';' or ',' in C, the end result is the same.

When the statements they separate are mere assignmentts, I should have added (as was in this case).

Sarah

WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux