File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -711,12 +711,28 @@ static unsigned int exar_get_nr_ports(struct exar8250_board *board,
711
711
{
712
712
unsigned int nr_ports = 0 ;
713
713
714
- if (pcidev -> vendor == PCI_VENDOR_ID_ACCESSIO )
714
+ if (pcidev -> vendor == PCI_VENDOR_ID_ACCESSIO ) {
715
715
nr_ports = BIT (((pcidev -> device & 0x38 ) >> 3 ) - 1 );
716
- else if (board -> num_ports )
716
+ } else if (board -> num_ports > 0 ) {
717
+ // Check if board struct overrides number of ports
717
718
nr_ports = board -> num_ports ;
718
- else
719
+ } else if (pcidev -> vendor == PCI_VENDOR_ID_EXAR ) {
720
+ // Exar encodes # ports in last nibble of PCI Device ID ex. 0358
719
721
nr_ports = pcidev -> device & 0x0f ;
722
+ } else if (pcidev -> vendor == PCI_VENDOR_ID_CONNECT_TECH ) {
723
+ // Handle CTI FPGA cards
724
+ switch (pcidev -> device ) {
725
+ case PCI_DEVICE_ID_CONNECT_TECH_PCI_XR79X_12_XIG00X :
726
+ case PCI_DEVICE_ID_CONNECT_TECH_PCI_XR79X_12_XIG01X :
727
+ nr_ports = 12 ;
728
+ break ;
729
+ case PCI_DEVICE_ID_CONNECT_TECH_PCI_XR79X_16 :
730
+ nr_ports = 16 ;
731
+ break ;
732
+ default :
733
+ break ;
734
+ }
735
+ }
720
736
721
737
return nr_ports ;
722
738
}
You can’t perform that action at this time.
0 commit comments