Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174434950
D60203.id188345.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D60203.id188345.diff
View Options
diff --git a/sys/dev/cxgbe/t4_vf.c b/sys/dev/cxgbe/t4_vf.c
--- a/sys/dev/cxgbe/t4_vf.c
+++ b/sys/dev/cxgbe/t4_vf.c
@@ -160,9 +160,13 @@
static int
t4vf_probe(device_t dev)
{
- uint16_t d;
+ uint16_t d, v;
size_t i;
+ v = pci_get_vendor(dev);
+ if (v != PCI_VENDOR_ID_CHELSIO)
+ return (ENXIO);
+
d = pci_get_device(dev);
for (i = 0; i < nitems(t4vf_pciids); i++) {
if (d == t4vf_pciids[i].device) {
@@ -176,9 +180,13 @@
static int
t5vf_probe(device_t dev)
{
- uint16_t d;
+ uint16_t d, v;
size_t i;
+ v = pci_get_vendor(dev);
+ if (v != PCI_VENDOR_ID_CHELSIO)
+ return (ENXIO);
+
d = pci_get_device(dev);
for (i = 0; i < nitems(t5vf_pciids); i++) {
if (d == t5vf_pciids[i].device) {
@@ -192,9 +200,13 @@
static int
t6vf_probe(device_t dev)
{
- uint16_t d;
+ uint16_t d, v;
size_t i;
+ v = pci_get_vendor(dev);
+ if (v != PCI_VENDOR_ID_CHELSIO)
+ return (ENXIO);
+
d = pci_get_device(dev);
for (i = 0; i < nitems(t6vf_pciids); i++) {
if (d == t6vf_pciids[i].device) {
@@ -208,9 +220,13 @@
static int
chvf_probe(device_t dev)
{
- uint16_t d;
+ uint16_t d, v;
size_t i;
+ v = pci_get_vendor(dev);
+ if (v != PCI_VENDOR_ID_CHELSIO)
+ return (ENXIO);
+
d = pci_get_device(dev);
for (i = 0; i < nitems(t7vf_pciids); i++) {
if (d == t7vf_pciids[i].device) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 4, 4:54 AM (17 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40089961
Default Alt Text
D60203.id188345.diff (1 KB)
Attached To
Mode
D60203: cxgbev(4): verify the vendor id before claiming a device
Attached
Detach File
Event Timeline
Log In to Comment