@@ -63,6 +63,7 @@ enum board_ids {
6363 board_ahci_pcs_quirk_no_devslp ,
6464 board_ahci_pcs_quirk_no_sntf ,
6565 board_ahci_yes_fbs ,
66+ board_ahci_yes_fbs_atapi_dma ,
6667
6768 /* board IDs for specific chipsets in alphabetical order */
6869 board_ahci_al ,
@@ -188,6 +189,14 @@ static const struct ata_port_info ahci_port_info[] = {
188189 .udma_mask = ATA_UDMA6 ,
189190 .port_ops = & ahci_ops ,
190191 },
192+ [board_ahci_yes_fbs_atapi_dma ] = {
193+ AHCI_HFLAGS (AHCI_HFLAG_YES_FBS |
194+ AHCI_HFLAG_ATAPI_DMA_QUIRK ),
195+ .flags = AHCI_FLAG_COMMON ,
196+ .pio_mask = ATA_PIO4 ,
197+ .udma_mask = ATA_UDMA6 ,
198+ .port_ops = & ahci_ops ,
199+ },
191200 /* by chipsets */
192201 [board_ahci_al ] = {
193202 AHCI_HFLAGS (AHCI_HFLAG_NO_PMP | AHCI_HFLAG_NO_MSI ),
@@ -589,6 +598,8 @@ static const struct pci_device_id ahci_pci_tbl[] = {
589598 .driver_data = board_ahci_yes_fbs },
590599 { PCI_DEVICE (PCI_VENDOR_ID_MARVELL_EXT , 0x91a3 ),
591600 .driver_data = board_ahci_yes_fbs },
601+ { PCI_DEVICE (PCI_VENDOR_ID_MARVELL_EXT , 0x9215 ),
602+ .driver_data = board_ahci_yes_fbs_atapi_dma },
592603 { PCI_DEVICE (PCI_VENDOR_ID_MARVELL_EXT , 0x9230 ),
593604 .driver_data = board_ahci_yes_fbs },
594605 { PCI_DEVICE (PCI_VENDOR_ID_MARVELL_EXT , 0x9235 ),
@@ -1665,18 +1676,20 @@ static int ahci_get_irq_vector(struct ata_host *host, int port)
16651676 return pci_irq_vector (to_pci_dev (host -> dev ), port );
16661677}
16671678
1668- static int ahci_init_msi (struct pci_dev * pdev , unsigned int n_ports ,
1679+ static void ahci_init_irq (struct pci_dev * pdev , unsigned int n_ports ,
16691680 struct ahci_host_priv * hpriv )
16701681{
16711682 int nvec ;
16721683
1673- if (hpriv -> flags & AHCI_HFLAG_NO_MSI )
1674- return - ENODEV ;
1684+ if (hpriv -> flags & AHCI_HFLAG_NO_MSI ) {
1685+ pci_alloc_irq_vectors (pdev , 1 , 1 , PCI_IRQ_INTX );
1686+ return ;
1687+ }
16751688
16761689 /*
16771690 * If number of MSIs is less than number of ports then Sharing Last
16781691 * Message mode could be enforced. In this case assume that advantage
1679- * of multipe MSIs is negated and use single MSI mode instead.
1692+ * of multiple MSIs is negated and use single MSI mode instead.
16801693 */
16811694 if (n_ports > 1 ) {
16821695 nvec = pci_alloc_irq_vectors (pdev , n_ports , INT_MAX ,
@@ -1685,7 +1698,7 @@ static int ahci_init_msi(struct pci_dev *pdev, unsigned int n_ports,
16851698 if (!(readl (hpriv -> mmio + HOST_CTL ) & HOST_MRSM )) {
16861699 hpriv -> get_irq_vector = ahci_get_irq_vector ;
16871700 hpriv -> flags |= AHCI_HFLAG_MULTI_MSI ;
1688- return nvec ;
1701+ return ;
16891702 }
16901703
16911704 /*
@@ -1700,12 +1713,13 @@ static int ahci_init_msi(struct pci_dev *pdev, unsigned int n_ports,
17001713
17011714 /*
17021715 * If the host is not capable of supporting per-port vectors, fall
1703- * back to single MSI before finally attempting single MSI-X.
1716+ * back to single MSI before finally attempting single MSI-X or
1717+ * a legacy INTx.
17041718 */
17051719 nvec = pci_alloc_irq_vectors (pdev , 1 , 1 , PCI_IRQ_MSI );
17061720 if (nvec == 1 )
1707- return nvec ;
1708- return pci_alloc_irq_vectors (pdev , 1 , 1 , PCI_IRQ_MSIX );
1721+ return ;
1722+ pci_alloc_irq_vectors (pdev , 1 , 1 , PCI_IRQ_MSIX | PCI_IRQ_INTX );
17091723}
17101724
17111725static void ahci_mark_external_port (struct ata_port * ap )
@@ -1985,10 +1999,8 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
19851999 }
19862000 host -> private_data = hpriv ;
19872001
1988- if (ahci_init_msi (pdev , n_ports , hpriv ) < 0 ) {
1989- /* legacy intx interrupts */
1990- pcim_intx (pdev , 1 );
1991- }
2002+ ahci_init_irq (pdev , n_ports , hpriv );
2003+
19922004 hpriv -> irq = pci_irq_vector (pdev , 0 );
19932005
19942006 if (!(hpriv -> cap & HOST_CAP_SSS ) || ahci_ignore_sss )
0 commit comments