Skip to contentSkip to conversation

Apple Thunderbolt Ethernet device support

PATCH Superseded Greg KH 4 participants 13 messages Jul 12, 2012 – Jul 13, 2012 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

Greg KH

author
#0 lore raw

I have an Apple Thunderbolt Ethernet device here, and running 3.5-rc6 it isn't detected. It has PCI id 14e4:1682, which seems like it should be supported by the tg3 driver. Any hints?

I guess I could just go and add the device id to the driver and see what happens...

thanks,

greg k-h

author
#1 lore raw

PATCH 1/1 tg3: add device id of Apple Thunderbolt Ethernet device

Add a PCI device id for the Apple Thunderbolt Ethernet device

---

Note, I'm sure there's a better #define for this device, any way I can determine what it should really be?

drivers/net/ethernet/broadcom/tg3.c +1 -0
index e47ff8b..46576f9 100644
@@ -298,6 +298,7 @@ static DEFINE_PCI_DEVICE_TABLE(tg3_pci_tbl) = {
 	{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57795)},
 	{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5719)},
 	{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5720)},
+	{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_APPLE)},
 	{PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9DXX)},
 	{PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9MXX)},
 	{PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1000)},
drivers/net/ethernet/broadcom/tg3.h +1 -0
index 93865f8..0a2ddff 100644
@@ -63,6 +63,7 @@
 #define  TG3PCI_DEVICE_TIGON3_57766	 0x1686
 #define  TG3PCI_DEVICE_TIGON3_57786	 0x16b3
 #define  TG3PCI_DEVICE_TIGON3_57782	 0x16b7
+#define  TG3PCI_DEVICE_TIGON3_APPLE	 0x1682
 /* 0x04 --> 0x2c unused */
 #define TG3PCI_SUBVENDOR_ID_BROADCOM		PCI_VENDOR_ID_BROADCOM
 #define TG3PCI_SUBDEVICE_ID_BROADCOM_95700A6	0x1644
author
#10 lore raw
In reply to Greg KH
Quoted 6 lines · Greg KH

I have an Apple Thunderbolt Ethernet device here, and running 3.5-rc6 it isn't detected. It has PCI id 14e4:1682, which seems like it should be supported by the tg3 driver. Any hints?

I guess I could just go and add the device id to the driver and see what happens...

And that worked, patch sent.

But, as the patch shows, odds are it has a "real" device type in it, so the #define I used isn't as descriptive as it should be. Any hints on how I can figure out what to look at to make it more "correct"?

thanks,

greg k-h

author
#12 lore raw
In reply to a message not in the archive
Quoted 8 lines · Rick Jones
Quoted 7 lines · Greg KH
Quoted 6 lines · Greg KH

I have an Apple Thunderbolt Ethernet device here, and running 3.5-rc6 it isn't detected. It has PCI id 14e4:1682, which seems like it should be supported by the tg3 driver. Any hints?

I guess I could just go and add the device id to the driver and see what happens...

Quoted 7 lines
Quoted 5 lines

And that worked, patch sent.

But, as the patch shows, odds are it has a "real" device type in it, so the #define I used isn't as descriptive as it should be. Any hints on how I can figure out what to look at to make it more "correct"?

a long-shot, but maybe there is something in the pci.ids database?

Ah, nice, there is something there:
1682 NetXtreme BCM57762 Gigabit Ethernet PCIe

I'll redo the patch with that information, thanks.

greg k-h

author
#13 lore raw
Quoted 15 lines · Greg KH
Quoted 14 lines · Rick Jones
Quoted 12 lines · Greg KH
Quoted 6 lines · Greg KH

I have an Apple Thunderbolt Ethernet device here, and running 3.5-rc6 it isn't detected. It has PCI id 14e4:1682, which seems like it should be supported by the tg3 driver. Any hints?

I guess I could just go and add the device id to the driver and see what happens...

And that worked, patch sent.

But, as the patch shows, odds are it has a "real" device type in it, so the #define I used isn't as descriptive as it should be. Any hints on how I can figure out what to look at to make it more "correct"?

Quoted 6 lines
Quoted 1 line

a long-shot, but maybe there is something in the pci.ids database?

Ah, nice, there is something there:
1682 NetXtreme BCM57762 Gigabit Ethernet PCIe

I'll redo the patch with that information, thanks.

Wait, something's a bit "odd" here. We already have:

	#define  TG3PCI_DEVICE_TIGON3_57762 0x1682

in drivers/net/ethernet/broadcom/tg3.h

But it's only used in the function where we can't figure out what type of vpd we have in tg3_read_vpd(). One could ask how that codepath was ever tested, as that device id was not in the MODULE_DEVICE_TABLE();

I wonder if someone reused the device id?

Anyway, I'll respin the patch...

greg k-h

author
#2 lore raw

PATCH v2 1/1 tg3: add device id of Apple Thunderbolt Ethernet device

In reply to Greg KH

The Apple Thunderbolt ethernet device is already listed in the driver, but not hooked up in the MODULE_DEVICE_TABLE(). This fixes that and allows it to work properly.

drivers/net/ethernet/broadcom/tg3.c +1 -0
index e47ff8b..3721833 100644
@@ -298,6 +298,7 @@ static DEFINE_PCI_DEVICE_TABLE(tg3_pci_tbl) = {
 	{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57795)},
 	{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5719)},
 	{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5720)},
+	{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57762)},
 	{PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9DXX)},
 	{PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9MXX)},
 	{PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1000)},
maintainer
#3 lore raw

Re: [PATCH v2] tg3: add device id of Apple Thunderbolt Ethernet device

Please stop ignoring the MAINTAINERS entry for this driver and CC: the appropriate developers.

Thanks.

author
#4 lore raw

Re: [PATCH v2] tg3: add device id of Apple Thunderbolt Ethernet device

Quoted 3 lines · David Miller

Please stop ignoring the MAINTAINERS entry for this driver and CC: the appropriate developers.

Sorry about that, will resend.

greg k-h

author
#5 lore raw

PATCH v3 1/1 tg3: add device id of Apple Thunderbolt Ethernet device

In reply to Greg KH

The Apple Thunderbolt ethernet device is already listed in the driver, but not hooked up in the MODULE_DEVICE_TABLE(). This fixes that and allows it to work properly.

---
Resent to Cc: the proper developers this time.

drivers/net/ethernet/broadcom/tg3.c +1 -0
index e47ff8b..3721833 100644
@@ -298,6 +298,7 @@ static DEFINE_PCI_DEVICE_TABLE(tg3_pci_tbl) = {
 	{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57795)},
 	{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5719)},
 	{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5720)},
+	{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57762)},
 	{PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9DXX)},
 	{PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9MXX)},
 	{PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1000)},
#6 lore raw

Re: [PATCH v3] tg3: add device id of Apple Thunderbolt Ethernet device

Quoted 14 lines · Greg KH

The Apple Thunderbolt ethernet device is already listed in the driver, but not hooked up in the MODULE_DEVICE_TABLE(). This fixes that and allows it to work properly.

---
Resent to Cc: the proper developers this time.

drivers/net/ethernet/broadcom/tg3.c +0 -0
index e47ff8b..3721833 100644

drivers/net/ethernet/broadcom/tg3.c static DEFINE_PCI_DEVICE_TABLE(tg3_pci_tbl) = { · line 304

Quoted 7 lines
drivers/net/ethernet/broadcom/tg3.c +1 -0
@@ -298,6 +298,7 @@ static DEFINE_PCI_DEVICE_TABLE(tg3_pci_tbl) = {
        {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57795)},
        {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5719)},
        {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5720)},
+       {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57762)},
        {PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9DXX)},
        {PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9MXX)},
        {PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1000)},

I realize there's no way Greg can know the answer to this or test the corresponding change...

But for the Broadcom guys:
it looks like there simiarly is code in the driver for at least

TG3PCI_DEVICE_TIGON3_57766
TG3PCI_DEVICE_TIGON3_57782
TG3PCI_DEVICE_TIGON3_57786

without entries in the PCI device table. Should those similarly be added?

- R.

Acked-by on v3 1/1
#8 lore raw

Re: [PATCH v3] tg3: add device id of Apple Thunderbolt Ethernet device

In reply to Greg KH
Quoted 15 lines · Greg KH

The Apple Thunderbolt ethernet device is already listed in the driver, but not hooked up in the MODULE_DEVICE_TABLE(). This fixes that and allows it to work properly.

---
Resent to Cc: the proper developers this time.

drivers/net/ethernet/broadcom/tg3.c +0 -0
index e47ff8b..3721833 100644

drivers/net/ethernet/broadcom/tg3.c static DEFINE_PCI_DEVICE_TABLE(tg3_pci_tbl) = { · line 304

Quoted 7 lines
drivers/net/ethernet/broadcom/tg3.c +1 -0
@@ -298,6 +298,7 @@ static DEFINE_PCI_DEVICE_TABLE(tg3_pci_tbl) = {
 	{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57795)},
 	{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5719)},
 	{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5720)},
+	{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57762)},
 	{PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9DXX)},
 	{PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9MXX)},
 	{PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1000)},

ACK for net-next. I don't know why Matt added everything to support this chip except the entry in the PCI ID table.

#7 lore raw

Re: [PATCH v3] tg3: add device id of Apple Thunderbolt Ethernet device

In reply to Roland Dreier
Quoted 26 lines · Roland Dreier
Quoted 14 lines · Greg KH

The Apple Thunderbolt ethernet device is already listed in the driver, but not hooked up in the MODULE_DEVICE_TABLE(). This fixes that and allows it to work properly.

---
Resent to Cc: the proper developers this time.

drivers/net/ethernet/broadcom/tg3.c +0 -0
index e47ff8b..3721833 100644

drivers/net/ethernet/broadcom/tg3.c static DEFINE_PCI_DEVICE_TABLE(tg3_pci_tbl) = { · line 304

Quoted 7 lines
drivers/net/ethernet/broadcom/tg3.c +1 -0
@@ -298,6 +298,7 @@ static DEFINE_PCI_DEVICE_TABLE(tg3_pci_tbl) = {
        {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57795)},
        {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5719)},
        {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5720)},
+       {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57762)},
        {PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9DXX)},
        {PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9MXX)},
        {PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1000)},

I realize there's no way Greg can know the answer to this or test the corresponding change...

Quoted 9 lines

But for the Broadcom guys:
it looks like there simiarly is code in the driver for at least

TG3PCI_DEVICE_TIGON3_57766
TG3PCI_DEVICE_TIGON3_57782
TG3PCI_DEVICE_TIGON3_57786

without entries in the PCI device table. Should those similarly be added?

Yeah we need to add these as well, but there may be missing code to support these chips besides the PCI ID table entries. We will get these chips tested and send the complete patches to support these chips.

maintainer Applied
#9 lore raw

Re: [PATCH v3] tg3: add device id of Apple Thunderbolt Ethernet device

In reply to Michael Chan

From: "Michael Chan" <[email protected]>
Date: Fri, 13 Jul 2012 00:06:38 -0700

Quoted 27 lines · Greg KH
Quoted 15 lines

The Apple Thunderbolt ethernet device is already listed in the driver, but not hooked up in the MODULE_DEVICE_TABLE(). This fixes that and allows it to work properly.

---
Resent to Cc: the proper developers this time.

drivers/net/ethernet/broadcom/tg3.c +0 -0
index e47ff8b..3721833 100644

drivers/net/ethernet/broadcom/tg3.c static DEFINE_PCI_DEVICE_TABLE(tg3_pci_tbl) = { · line 304

Quoted 7 lines
drivers/net/ethernet/broadcom/tg3.c +1 -0
@@ -298,6 +298,7 @@ static DEFINE_PCI_DEVICE_TABLE(tg3_pci_tbl) = {
 	{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57795)},
 	{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5719)},
 	{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5720)},
+	{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57762)},
 	{PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9DXX)},
 	{PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9MXX)},
 	{PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1000)},

ACK for net-next. I don't know why Matt added everything to support this chip except the entry in the PCI ID table.

Quoted 1 line

Applied.