aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/pccbb/pccbb.c
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2006-03-24 07:52:00 +0000
committerWarner Losh <imp@FreeBSD.org>2006-03-24 07:52:00 +0000
commit1ab7d4c93d3dea8f6fe748079ec9e12161cc427c (patch)
tree9c49ebab911350eb05d4a051213d965abef28b2b /sys/dev/pccbb/pccbb.c
parente40dc9a60df5e7c978afcd3c61345b0b85aca91e (diff)
downloadsrc-1ab7d4c93d3dea8f6fe748079ec9e12161cc427c.tar.gz
src-1ab7d4c93d3dea8f6fe748079ec9e12161cc427c.zip
For each of the voltages that a card might support, make sure that the
socket also supports the voltage. Some XV cards have appeared on the scene (or cards that report they support XV), and in older machines that have sockets that do not support XV, we were bogusly trying to power them at XV rather than at 3.3V. Now, power up the card at the lowest voltage supported by both the card and the socket. MFC After: 3 days
Notes
Notes: svn path=/head/; revision=157092
Diffstat (limited to 'sys/dev/pccbb/pccbb.c')
-rw-r--r--sys/dev/pccbb/pccbb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c
index 8f6d06ad5783..9d51a790d3ce 100644
--- a/sys/dev/pccbb/pccbb.c
+++ b/sys/dev/pccbb/pccbb.c
@@ -715,13 +715,13 @@ cbb_detect_voltage(device_t brdev)
psr = cbb_get(sc, CBB_SOCKET_STATE);
- if (psr & CBB_STATE_5VCARD)
+ if (psr & CBB_STATE_5VCARD && psr & CBB_STATE_5VSOCK)
vol |= CARD_5V_CARD;
- if (psr & CBB_STATE_3VCARD)
+ if (psr & CBB_STATE_3VCARD && psr & CBB_STATE_3VSOCK)
vol |= CARD_3V_CARD;
- if (psr & CBB_STATE_XVCARD)
+ if (psr & CBB_STATE_XVCARD && psr & CBB_STATE_XVSOCK)
vol |= CARD_XV_CARD;
- if (psr & CBB_STATE_YVCARD)
+ if (psr & CBB_STATE_YVCARD && psr & CBB_STATE_YVSOCK)
vol |= CARD_YV_CARD;
return (vol);