From: Paul Fulghum Date: Sun, 25 Jun 2006 12:49:22 +0000 (-0700) Subject: [PATCH] synclink_gt: add GT2 adapter support X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6f84be84b4cde72fa2a2f0d10ac284a31e923200;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] synclink_gt: add GT2 adapter support Add support for SyncLink GT2 adapter to driver. Signed-off-by: Paul Fulghum Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c index 41eab9831ad5..4e35d4181224 100644 --- a/drivers/char/synclink_gt.c +++ b/drivers/char/synclink_gt.c @@ -101,6 +101,7 @@ MODULE_LICENSE("GPL"); static struct pci_device_id pci_table[] = { {PCI_VENDOR_ID_MICROGATE, SYNCLINK_GT_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,}, + {PCI_VENDOR_ID_MICROGATE, SYNCLINK_GT2_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,}, {PCI_VENDOR_ID_MICROGATE, SYNCLINK_GT4_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,}, {PCI_VENDOR_ID_MICROGATE, SYNCLINK_AC_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,}, {0,}, /* terminate list */ @@ -3277,6 +3278,9 @@ static void add_device(struct slgt_info *info) case SYNCLINK_GT_DEVICE_ID: devstr = "GT"; break; + case SYNCLINK_GT2_DEVICE_ID: + devstr = "GT2"; + break; case SYNCLINK_GT4_DEVICE_ID: devstr = "GT4"; break; @@ -3354,7 +3358,9 @@ static void device_init(int adapter_num, struct pci_dev *pdev) int i; int port_count = 1; - if (pdev->device == SYNCLINK_GT4_DEVICE_ID) + if (pdev->device == SYNCLINK_GT2_DEVICE_ID) + port_count = 2; + else if (pdev->device == SYNCLINK_GT4_DEVICE_ID) port_count = 4; /* allocate device instances for all ports */ diff --git a/include/linux/synclink.h b/include/linux/synclink.h index b0e3535c38bf..0577f5284cbc 100644 --- a/include/linux/synclink.h +++ b/include/linux/synclink.h @@ -172,6 +172,7 @@ typedef struct _MGSL_PARAMS #define SYNCLINK_GT_DEVICE_ID 0x0070 #define SYNCLINK_GT4_DEVICE_ID 0x0080 #define SYNCLINK_AC_DEVICE_ID 0x0090 +#define SYNCLINK_GT2_DEVICE_ID 0x00A0 #define MGSL_MAX_SERIAL_NUMBER 30 /*