Skip to content

Commit 54f98a8

Browse files
committed
Merge branch 'pci/switchtec'
- Add Gen4 automotive device IDs (Kelvin Cao) - Declare state_names[] as static so it's not allocated and initialized for every call (Kelvin Cao) * pci/switchtec: PCI/switchtec: Declare local state_names[] as static PCI/switchtec: Add Gen4 automotive device IDs
2 parents 05642e2 + b76521f commit 54f98a8

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

drivers/pci/quirks.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5683,6 +5683,15 @@ SWITCHTEC_QUIRK(0x4268); /* PAX 68XG4 */
56835683
SWITCHTEC_QUIRK(0x4252); /* PAX 52XG4 */
56845684
SWITCHTEC_QUIRK(0x4236); /* PAX 36XG4 */
56855685
SWITCHTEC_QUIRK(0x4228); /* PAX 28XG4 */
5686+
SWITCHTEC_QUIRK(0x4352); /* PFXA 52XG4 */
5687+
SWITCHTEC_QUIRK(0x4336); /* PFXA 36XG4 */
5688+
SWITCHTEC_QUIRK(0x4328); /* PFXA 28XG4 */
5689+
SWITCHTEC_QUIRK(0x4452); /* PSXA 52XG4 */
5690+
SWITCHTEC_QUIRK(0x4436); /* PSXA 36XG4 */
5691+
SWITCHTEC_QUIRK(0x4428); /* PSXA 28XG4 */
5692+
SWITCHTEC_QUIRK(0x4552); /* PAXA 52XG4 */
5693+
SWITCHTEC_QUIRK(0x4536); /* PAXA 36XG4 */
5694+
SWITCHTEC_QUIRK(0x4528); /* PAXA 28XG4 */
56865695

56875696
/*
56885697
* The PLX NTB uses devfn proxy IDs to move TLPs between NT endpoints.

drivers/pci/switch/switchtec.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ static void stuser_set_state(struct switchtec_user *stuser,
122122
{
123123
/* requires the mrpc_mutex to already be held when called */
124124

125-
const char * const state_names[] = {
125+
static const char * const state_names[] = {
126126
[MRPC_IDLE] = "IDLE",
127127
[MRPC_QUEUED] = "QUEUED",
128128
[MRPC_RUNNING] = "RUNNING",
@@ -1779,6 +1779,15 @@ static const struct pci_device_id switchtec_pci_tbl[] = {
17791779
SWITCHTEC_PCI_DEVICE(0x4252, SWITCHTEC_GEN4), //PAX 52XG4
17801780
SWITCHTEC_PCI_DEVICE(0x4236, SWITCHTEC_GEN4), //PAX 36XG4
17811781
SWITCHTEC_PCI_DEVICE(0x4228, SWITCHTEC_GEN4), //PAX 28XG4
1782+
SWITCHTEC_PCI_DEVICE(0x4352, SWITCHTEC_GEN4), //PFXA 52XG4
1783+
SWITCHTEC_PCI_DEVICE(0x4336, SWITCHTEC_GEN4), //PFXA 36XG4
1784+
SWITCHTEC_PCI_DEVICE(0x4328, SWITCHTEC_GEN4), //PFXA 28XG4
1785+
SWITCHTEC_PCI_DEVICE(0x4452, SWITCHTEC_GEN4), //PSXA 52XG4
1786+
SWITCHTEC_PCI_DEVICE(0x4436, SWITCHTEC_GEN4), //PSXA 36XG4
1787+
SWITCHTEC_PCI_DEVICE(0x4428, SWITCHTEC_GEN4), //PSXA 28XG4
1788+
SWITCHTEC_PCI_DEVICE(0x4552, SWITCHTEC_GEN4), //PAXA 52XG4
1789+
SWITCHTEC_PCI_DEVICE(0x4536, SWITCHTEC_GEN4), //PAXA 36XG4
1790+
SWITCHTEC_PCI_DEVICE(0x4528, SWITCHTEC_GEN4), //PAXA 28XG4
17821791
{0}
17831792
};
17841793
MODULE_DEVICE_TABLE(pci, switchtec_pci_tbl);

0 commit comments

Comments
 (0)