summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorjmg <jmg@FreeBSD.org>2006-11-09 21:05:32 +0000
committerjmg <jmg@FreeBSD.org>2006-11-09 21:05:32 +0000
commit1a66ce5fa5b182346f2d65a791047524fd16bc42 (patch)
tree7ad48295550a0131b7a1b543fa905f9d145bc9b1 /sys/dev/pci
parent877f5726faf34aebaa270edd88c29882b0a0d104 (diff)
downloadFreeBSD-src-1a66ce5fa5b182346f2d65a791047524fd16bc42.zip
FreeBSD-src-1a66ce5fa5b182346f2d65a791047524fd16bc42.tar.gz
fix hanging on invalid data... (This doesn't fix hanging due to broken
hardware)... Tested by: Ian Dowse, Adam K Kirchhoff and Vladimir Kushnir
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/pci.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 31db466..9e3cf15 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -629,9 +629,10 @@ pci_read_vpd(device_t pcib, pcicfgregs *cfg)
M_WAITOK);
state = 5;
break;
- default: /* XXX - unimplemented */
- state = 4;
- break;
+ default: /* Invalid data, abort */
+ end = 1;
+ cksumvalid = 0;
+ continue;
}
break;
OpenPOWER on IntegriCloud