Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Remove unused functions pci_disable_retry() and card...
details: https://anonhg.NetBSD.org/src/rev/fef206aa3564
branches: trunk
changeset: 752331:fef206aa3564
user: dyoung <dyoung%NetBSD.org@localhost>
date: Tue Feb 23 19:28:00 2010 +0000
description:
Remove unused functions pci_disable_retry() and cardbus_disable_retry().
diffstat:
sys/dev/cardbus/cardbus.c | 20 +---------------
sys/dev/cardbus/cardbusvar.h | 5 +---
sys/dev/pci/pci.c | 52 +------------------------------------------
sys/dev/pci/pcireg.h | 8 +-----
sys/dev/pci/pcivar.h | 3 +-
5 files changed, 7 insertions(+), 81 deletions(-)
diffs (172 lines):
diff -r af9696d2c307 -r fef206aa3564 sys/dev/cardbus/cardbus.c
--- a/sys/dev/cardbus/cardbus.c Tue Feb 23 16:41:01 2010 +0000
+++ b/sys/dev/cardbus/cardbus.c Tue Feb 23 19:28:00 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cardbus.c,v 1.99 2010/01/08 19:47:42 dyoung Exp $ */
+/* $NetBSD: cardbus.c,v 1.100 2010/02/23 19:28:00 dyoung Exp $ */
/*
* Copyright (c) 1997, 1998, 1999 and 2000
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cardbus.c,v 1.99 2010/01/08 19:47:42 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cardbus.c,v 1.100 2010/02/23 19:28:00 dyoung Exp $");
#include "opt_cardbus.h"
@@ -1138,22 +1138,6 @@
}
}
-void
-cardbus_disable_retry(cardbus_chipset_tag_t cc, cardbus_function_tag_t cf,
- cardbustag_t tag)
-{
- /* See comment on sys/dev/pci/pci.c:pci_disable_retry() for
- * the reason I comment-out this code.
- */
-#if 0
- cardbusreg_t retry;
-
- retry = cardbus_conf_read(cc, cf, tag, PCI_RETRY_TIMEOUT_REG);
- retry &= ~PCI_RETRY_TIMEOUT_REG_MASK;
- cardbus_conf_write(cc, cf, tag, PCI_RETRY_TIMEOUT_REG, retry);
-#endif
-}
-
struct cardbus_child_power {
struct cardbus_conf_state p_cardbusconf;
cardbus_devfunc_t p_ct;
diff -r af9696d2c307 -r fef206aa3564 sys/dev/cardbus/cardbusvar.h
--- a/sys/dev/cardbus/cardbusvar.h Tue Feb 23 16:41:01 2010 +0000
+++ b/sys/dev/cardbus/cardbusvar.h Tue Feb 23 19:28:00 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cardbusvar.h,v 1.44 2009/12/15 22:17:12 snj Exp $ */
+/* $NetBSD: cardbusvar.h,v 1.45 2010/02/23 19:28:00 dyoung Exp $ */
/*
* Copyright (c) 1998, 1999 and 2000
@@ -322,9 +322,6 @@
int cardbus_function_enable(struct cardbus_softc *, int);
int cardbus_function_disable(struct cardbus_softc *, int);
-void cardbus_disable_retry(cardbus_chipset_tag_t, cardbus_function_tag_t,
- cardbustag_t);
-
int cardbus_get_capability(cardbus_chipset_tag_t, cardbus_function_tag_t,
cardbustag_t, int, int *, cardbusreg_t *);
int cardbus_get_powerstate(cardbus_devfunc_t, cardbustag_t, cardbusreg_t *);
diff -r af9696d2c307 -r fef206aa3564 sys/dev/pci/pci.c
--- a/sys/dev/pci/pci.c Tue Feb 23 16:41:01 2010 +0000
+++ b/sys/dev/pci/pci.c Tue Feb 23 19:28:00 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci.c,v 1.125 2010/01/08 19:56:52 dyoung Exp $ */
+/* $NetBSD: pci.c,v 1.126 2010/02/23 19:28:00 dyoung Exp $ */
/*
* Copyright (c) 1995, 1996, 1997, 1998
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.125 2010/01/08 19:56:52 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.126 2010/02/23 19:28:00 dyoung Exp $");
#include "opt_pci.h"
@@ -812,54 +812,6 @@
return 0;
}
-/* I have disabled this code for now. --dyoung
- *
- * Insofar as I understand what the PCI retry timeout is [1],
- * I see no justification for any driver to disable when it
- * attaches/resumes a device.
- *
- * A PCI bus bridge may tell a bus master to retry its transaction
- * at a later time if the resources to complete the transaction
- * are not immediately available. Taking a guess, PCI bus masters
- * that implement a PCI retry timeout register count down from the
- * retry timeout to 0 while it retries a delayed PCI transaction.
- * When it reaches 0, it stops retrying. A PCI master is *never*
- * supposed to stop retrying a delayed transaction, though.
- *
- * Incidentally, I initially suspected that writing 0 to the register
- * would not disable *retries*, but would disable the timeout.
- * That is, any device whose retry timeout was set to 0 would
- * *never* timeout. However, I found out, by using PCI debug
- * facilities on the AMD Elan SC520, that if I write 0 to the retry
- * timeout register on an ath(4) MiniPCI card, the card really does
- * not retry transactions.
- *
- * Some uses of this register have mentioned "interference" with
- * a CPU's "C3 sleep state." It seems to me that if a bus master
- * is properly put to sleep, it will neither initiate new transactions,
- * nor retry delayed transactions, so disabling retries should not
- * be necessary.
- *
- * [1] The timeout does not appear to be documented in any PCI
- * standard, and we have no documentation of it for the devices by
- * Atheros, and others, that supposedly implement it.
- */
-void
-pci_disable_retry(pci_chipset_tag_t pc, pcitag_t tag)
-{
-#if 0
- pcireg_t retry;
-
- /*
- * Disable retry timeout to keep PCI Tx retries from
- * interfering with ACPI C3 CPU state.
- */
- retry = pci_conf_read(pc, tag, PCI_RETRY_TIMEOUT_REG);
- retry &= ~PCI_RETRY_TIMEOUT_REG_MASK;
- pci_conf_write(pc, tag, PCI_RETRY_TIMEOUT_REG, retry);
-#endif
-}
-
struct pci_child_power {
struct pci_conf_state p_pciconf;
pci_chipset_tag_t p_pc;
diff -r af9696d2c307 -r fef206aa3564 sys/dev/pci/pcireg.h
--- a/sys/dev/pci/pcireg.h Tue Feb 23 16:41:01 2010 +0000
+++ b/sys/dev/pci/pcireg.h Tue Feb 23 19:28:00 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcireg.h,v 1.64 2010/02/12 04:01:07 msaitoh Exp $ */
+/* $NetBSD: pcireg.h,v 1.65 2010/02/23 19:28:00 dyoung Exp $ */
/*
* Copyright (c) 1995, 1996, 1999, 2000
@@ -807,12 +807,6 @@
#define PCI32_DMA_BOUNCE_THRESHOLD 0x100000000ULL
/*
- * Common PCI register for PCI transmit handling.
- */
-#define PCI_RETRY_TIMEOUT_REG 0x40
-#define PCI_RETRY_TIMEOUT_REG_MASK 0x0000ff00
-
-/*
* PCI-X 2.0 Extended Capability List
*/
diff -r af9696d2c307 -r fef206aa3564 sys/dev/pci/pcivar.h
--- a/sys/dev/pci/pcivar.h Tue Feb 23 16:41:01 2010 +0000
+++ b/sys/dev/pci/pcivar.h Tue Feb 23 19:28:00 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcivar.h,v 1.83 2008/07/22 04:52:19 bjs Exp $ */
+/* $NetBSD: pcivar.h,v 1.84 2010/02/23 19:28:00 dyoung Exp $ */
/*
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
@@ -256,7 +256,6 @@
int pci_activate(pci_chipset_tag_t, pcitag_t, device_t,
int (*)(pci_chipset_tag_t, pcitag_t, device_t, pcireg_t));
int pci_activate_null(pci_chipset_tag_t, pcitag_t, device_t, pcireg_t);
-void pci_disable_retry(pci_chipset_tag_t, pcitag_t);
/*
* Device abstraction for inheritance by elanpci(4), for example.
Home |
Main Index |
Thread Index |
Old Index