History

Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev: Fix Maple PATA IRQ assignment. ahci: use 0x80 as wait stat value instead of 0xff sata_via: style clean up, no indirect method call in LLD ahci: fix endianness in spurious interrupt message libata-sff: Don't call bmdma_stop on non DMA capable controllers libata: implement ATA_FLAG_IGN_SIMPLEX and use it in sata_uli ahci: improve and limit spurious interrupt messages, take#3 sata_via: don't diddle with ATA_NIEN in ->freeze libata: set_mode, Fix the FIXME libata hpt3xn: Hopefully sort out the DPLL logic versus the vendor code libata cmd64x: whack into a shape that looks like the documentation

Linus Torvalds committed 19 years ago

Commit 08eacc32 parents 496a0fc 8cdf92a17 files · +137 −53Browse files

Unified · Split

17 files
  1. arch/powerpc/Kconfig +1 −0
  2. drivers/ata/Kconfig +4 −0
  3. drivers/ata/ahci.c +51 −9
  4. drivers/ata/ata_generic.c +4 −2
  5. drivers/ata/libata-core.c +2 −12
  6. drivers/ata/libata-sff.c +13 −8
  7. drivers/ata/pata_cmd64x.c +16 −7
  8. drivers/ata/pata_hpt3x2n.c +3 −3
  9. drivers/ata/pata_it821x.c +3 −1
  10. drivers/ata/pata_ixp4xx_cf.c +3 −2
  11. drivers/ata/pata_legacy.c +3 −1
  12. drivers/ata/pata_rz1000.c +4 −2
  13. drivers/ata/sata_uli.c +2 −1
  14. drivers/ata/sata_via.c +11 −1
  15. include/asm-generic/libata-portmap.h +2 −2
  16. include/asm-powerpc/libata-portmap.h +12 −0
  17. include/linux/libata.h +3 −2
arch/powerpc/Kconfig+1−0
@@ -484,6 +484,7 @@ config PPC_MAPLE · 483 unmodified lines
484484 select PPC_970_NAP
485485 select PPC_NATIVE
486486 select PPC_RTAS
487+ select ATA_NONSTANDARD if ATA
487488 default n
488489 help
489490 This option enables support for the Maple 970FX Evaluation Board.
drivers/ata/Kconfig+4−0
@@ -19,6 +19,10 @@ config ATA · 18 unmodified lines
1919
2020 if ATA
2121
22+config ATA_NONSTANDARD
23+ bool
24+ default n
25+
2226 config SATA_AHCI
2327 tristate "AHCI SATA support"
2428 depends on PCI
drivers/ata/ahci.c+51−9
@@ -75,6 +75,7 @@ enum { · 74 unmodified lines
7575 AHCI_CMD_CLR_BUSY = (1 << 10),
7676
7777 RX_FIS_D2H_REG = 0x40, /* offset of D2H Register FIS data */
78+ RX_FIS_SDB = 0x58, /* offset of SDB FIS data */
7879 RX_FIS_UNK = 0x60, /* offset of Unknown FIS data */
7980
8081 board_ahci = 0,
@@ -202,6 +203,10 @@ struct ahci_port_priv { · 121 unmodified lines
202203 dma_addr_t cmd_tbl_dma;
203204 void *rx_fis;
204205 dma_addr_t rx_fis_dma;
206+ /* for NCQ spurious interrupt analysis */
207+ int ncq_saw_spurious_sdb_cnt;
208+ unsigned int ncq_saw_d2h:1;
209+ unsigned int ncq_saw_dmas:1;
205210 };
206211
207212 static u32 ahci_scr_read (struct ata_port *ap, unsigned int sc_reg);
@@ -898,7 +903,7 @@ static int ahci_hardreset(struct ata_port *ap, unsigned int *class) · 690 unmodified lines
898903
899904 /* clear D2H reception area to properly wait for D2H FIS */
900905 ata_tf_init(ap->device, &tf);
901− tf.command = 0xff;
906+ tf.command = 0x80;
902907 ata_tf_to_fis(&tf, d2h_fis, 0);
903908
904909 rc = sata_std_hardreset(ap, class);
@@ -1109,8 +1114,9 @@ static void ahci_host_intr(struct ata_port *ap) · 204 unmodified lines
11091114 void __iomem *mmio = ap->host->mmio_base;
11101115 void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no);
11111116 struct ata_eh_info *ehi = &ap->eh_info;
1117+ struct ahci_port_priv *pp = ap->private_data;
11121118 u32 status, qc_active;
1113− int rc;
1119+ int rc, known_irq = 0;
11141120
11151121 status = readl(port_mmio + PORT_IRQ_STAT);
11161122 writel(status, port_mmio + PORT_IRQ_STAT);
@@ -1137,17 +1143,53 @@ static void ahci_host_intr(struct ata_port *ap) · 20 unmodified lines
11371143
11381144 /* hmmm... a spurious interupt */
11391145
1140− /* some devices send D2H reg with I bit set during NCQ command phase */
1141− if (ap->sactive && (status & PORT_IRQ_D2H_REG_FIS))
1146+ /* if !NCQ, ignore. No modern ATA device has broken HSM
1147+ * implementation for non-NCQ commands.
1148+ */
1149+ if (!ap->sactive)
11421150 return;
11431151
1144− /* ignore interim PIO setup fis interrupts */
1145− if (ata_tag_valid(ap->active_tag) && (status & PORT_IRQ_PIOS_FIS))
1146− return;
1152+ if (status & PORT_IRQ_D2H_REG_FIS) {
1153+ if (!pp->ncq_saw_d2h)
1154+ ata_port_printk(ap, KERN_INFO,
1155+ "D2H reg with I during NCQ, "
1156+ "this message won't be printed again\n");
1157+ pp->ncq_saw_d2h = 1;
1158+ known_irq = 1;
1159+ }
1160+
1161+ if (status & PORT_IRQ_DMAS_FIS) {
1162+ if (!pp->ncq_saw_dmas)
1163+ ata_port_printk(ap, KERN_INFO,
1164+ "DMAS FIS during NCQ, "
1165+ "this message won't be printed again\n");
1166+ pp->ncq_saw_dmas = 1;
1167+ known_irq = 1;
1168+ }
1169+
1170+ if (status & PORT_IRQ_SDB_FIS &&
1171+ pp->ncq_saw_spurious_sdb_cnt < 10) {
1172+ /* SDB FIS containing spurious completions might be
1173+ * dangerous, we need to know more about them. Print
1174+ * more of it.
1175+ */
1176+ const u32 *f = pp->rx_fis + RX_FIS_SDB;
1177+
1178+ ata_port_printk(ap, KERN_INFO, "Spurious SDB FIS during NCQ "
1179+ "issue=0x%x SAct=0x%x FIS=%08x:%08x%s\n",
1180+ readl(port_mmio + PORT_CMD_ISSUE),
1181+ readl(port_mmio + PORT_SCR_ACT),
1182+ le32_to_cpu(f[0]), le32_to_cpu(f[1]),
1183+ pp->ncq_saw_spurious_sdb_cnt < 10 ?
1184+ "" : ", shutting up");
1185+
1186+ pp->ncq_saw_spurious_sdb_cnt++;
1187+ known_irq = 1;
1188+ }
11471189
1148− if (ata_ratelimit())
1190+ if (!known_irq)
11491191 ata_port_printk(ap, KERN_INFO, "spurious interrupt "
1150− "(irq_stat 0x%x active_tag %d sactive 0x%x)\n",
1192+ "(irq_stat 0x%x active_tag 0x%x sactive 0x%x)\n",
11511193 status, ap->active_tag, ap->sactive);
11521194 }
11531195
drivers/ata/ata_generic.c+4−2
@@ -64,6 +64,7 @@ static void generic_error_handler(struct ata_port *ap) · 63 unmodified lines
6464 /**
6565 * generic_set_mode - mode setting
6666 * @ap: interface to set up
67+ * @unused: returned device on error
6768 *
6869 * Use a non standard set_mode function. We don't want to be tuned.
6970 * The BIOS configured everything. Our job is not to fiddle. We
@@ -71,7 +72,7 @@ static void generic_error_handler(struct ata_port *ap) · 1 unmodified line
7172 * and respect them.
7273 */
7374
74−static void generic_set_mode(struct ata_port *ap)
75+static int generic_set_mode(struct ata_port *ap, struct ata_device **unused)
7576 {
7677 int dma_enabled = 0;
7778 int i;
@@ -82,7 +83,7 @@ static void generic_set_mode(struct ata_port *ap) · 4 unmodified lines
8283
8384 for (i = 0; i < ATA_MAX_DEVICES; i++) {
8485 struct ata_device *dev = &ap->device[i];
85− if (ata_dev_enabled(dev)) {
86+ if (ata_dev_ready(dev)) {
8687 /* We don't really care */
8788 dev->pio_mode = XFER_PIO_0;
8889 dev->dma_mode = XFER_MW_DMA_0;
@@ -99,6 +100,7 @@ static void generic_set_mode(struct ata_port *ap) · 10 unmodified lines
99100 }
100101 }
101102 }
103+ return 0;
102104 }
103105
104106 static struct scsi_host_template generic_sht = {
drivers/ata/libata-core.c+2−12
@@ -2431,18 +2431,8 @@ int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev) · 2430 unmodified lines
24312431 int i, rc = 0, used_dma = 0, found = 0;
24322432
24332433 /* has private set_mode? */
2434− if (ap->ops->set_mode) {
2435− /* FIXME: make ->set_mode handle no device case and
2436− * return error code and failing device on failure.
2437− */
2438− for (i = 0; i < ATA_MAX_DEVICES; i++) {
2439− if (ata_dev_ready(&ap->device[i])) {
2440− ap->ops->set_mode(ap);
2441− break;
2442− }
2443− }
2444− return 0;
2445− }
2434+ if (ap->ops->set_mode)
2435+ return ap->ops->set_mode(ap, r_failed_dev);
24462436
24472437 /* step 1: calculate xfer_mask */
24482438 for (i = 0; i < ATA_MAX_DEVICES; i++) {
drivers/ata/libata-sff.c+13−8
@@ -827,7 +827,8 @@ void ata_bmdma_error_handler(struct ata_port *ap) · 826 unmodified lines
827827 */
828828 void ata_bmdma_post_internal_cmd(struct ata_queued_cmd *qc)
829829 {
830− ata_bmdma_stop(qc);
830+ if (qc->ap->ioaddr.bmdma_addr)
831+ ata_bmdma_stop(qc);
831832 }
832833
833834 #ifdef CONFIG_PCI
@@ -870,7 +871,8 @@ ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int · 36 unmodified lines
870871 pci_resource_start(pdev, 1) | ATA_PCI_CTL_OFS;
871872 bmdma = pci_resource_start(pdev, 4);
872873 if (bmdma) {
873− if (inb(bmdma + 2) & 0x80)
874+ if ((!(port[p]->flags & ATA_FLAG_IGN_SIMPLEX)) &&
875+ (inb(bmdma + 2) & 0x80))
874876 probe_ent->_host_flags |= ATA_HOST_SIMPLEX;
875877 probe_ent->port[p].bmdma_addr = bmdma;
876878 }
@@ -886,7 +888,8 @@ ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int · 9 unmodified lines
886888 bmdma = pci_resource_start(pdev, 4);
887889 if (bmdma) {
888890 bmdma += 8;
889− if(inb(bmdma + 2) & 0x80)
891+ if ((!(port[p]->flags & ATA_FLAG_IGN_SIMPLEX)) &&
892+ (inb(bmdma + 2) & 0x80))
890893 probe_ent->_host_flags |= ATA_HOST_SIMPLEX;
891894 probe_ent->port[p].bmdma_addr = bmdma;
892895 }
@@ -914,13 +917,14 @@ static struct ata_probe_ent *ata_pci_init_legacy_port(struct pci_dev *pdev, · 21 unmodified lines
914917 probe_ent->irq_flags = IRQF_SHARED;
915918
916919 if (port_mask & ATA_PORT_PRIMARY) {
917− probe_ent->irq = ATA_PRIMARY_IRQ;
920+ probe_ent->irq = ATA_PRIMARY_IRQ(pdev);
918921 probe_ent->port[0].cmd_addr = ATA_PRIMARY_CMD;
919922 probe_ent->port[0].altstatus_addr =
920923 probe_ent->port[0].ctl_addr = ATA_PRIMARY_CTL;
921924 if (bmdma) {
922925 probe_ent->port[0].bmdma_addr = bmdma;
923− if (inb(bmdma + 2) & 0x80)
926+ if ((!(port[0]->flags & ATA_FLAG_IGN_SIMPLEX)) &&
927+ (inb(bmdma + 2) & 0x80))
924928 probe_ent->_host_flags |= ATA_HOST_SIMPLEX;
925929 }
926930 ata_std_ports(&probe_ent->port[0]);
@@ -929,15 +933,16 @@ static struct ata_probe_ent *ata_pci_init_legacy_port(struct pci_dev *pdev, · 2 unmodified lines
929933
930934 if (port_mask & ATA_PORT_SECONDARY) {
931935 if (probe_ent->irq)
932− probe_ent->irq2 = ATA_SECONDARY_IRQ;
936+ probe_ent->irq2 = ATA_SECONDARY_IRQ(pdev);
933937 else
934− probe_ent->irq = ATA_SECONDARY_IRQ;
938+ probe_ent->irq = ATA_SECONDARY_IRQ(pdev);
935939 probe_ent->port[1].cmd_addr = ATA_SECONDARY_CMD;
936940 probe_ent->port[1].altstatus_addr =
937941 probe_ent->port[1].ctl_addr = ATA_SECONDARY_CTL;
938942 if (bmdma) {
939943 probe_ent->port[1].bmdma_addr = bmdma + 8;
940− if (inb(bmdma + 10) & 0x80)
944+ if ((!(port[1]->flags & ATA_FLAG_IGN_SIMPLEX)) &&
945+ (inb(bmdma + 10) & 0x80))
941946 probe_ent->_host_flags |= ATA_HOST_SIMPLEX;
942947 }
943948 ata_std_ports(&probe_ent->port[1]);
drivers/ata/pata_cmd64x.c+16−7
@@ -197,7 +197,7 @@ static void cmd64x_set_piomode(struct ata_port *ap, struct ata_device *adev) · 196 unmodified lines
197197 static void cmd64x_set_dmamode(struct ata_port *ap, struct ata_device *adev)
198198 {
199199 static const u8 udma_data[] = {
200− 0x31, 0x21, 0x11, 0x25, 0x15, 0x05
200+ 0x30, 0x20, 0x10, 0x20, 0x10, 0x00
201201 };
202202 static const u8 mwdma_data[] = {
203203 0x30, 0x20, 0x10
@@ -213,12 +213,21 @@ static void cmd64x_set_dmamode(struct ata_port *ap, struct ata_device *adev) · 9 unmodified lines
213213 pci_read_config_byte(pdev, pciD, &regD);
214214 pci_read_config_byte(pdev, pciU, &regU);
215215
216− regD &= ~(0x20 << shift);
217− regU &= ~(0x35 << shift);
216+ /* DMA bits off */
217+ regD &= ~(0x20 << adev->devno);
218+ /* DMA control bits */
219+ regU &= ~(0x30 << shift);
220+ /* DMA timing bits */
221+ regU &= ~(0x05 << adev->devno);
218222
219− if (adev->dma_mode >= XFER_UDMA_0)
223+ if (adev->dma_mode >= XFER_UDMA_0) {
224+ /* Merge thge timing value */
220225 regU |= udma_data[adev->dma_mode - XFER_UDMA_0] << shift;
221− else
226+ /* Merge the control bits */
227+ regU |= 1 << adev->devno; /* UDMA on */
228+ if (adev->dma_mode > 2) /* 15nS timing */
229+ regU |= 4 << adev->devno;
230+ } else
222231 regD |= mwdma_data[adev->dma_mode - XFER_MW_DMA_0] << shift;
223232
224233 regD |= 0x20 << adev->devno;
@@ -239,8 +248,8 @@ static void cmd648_bmdma_stop(struct ata_queued_cmd *qc) · 14 unmodified lines
239248 struct ata_port *ap = qc->ap;
240249 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
241250 u8 dma_intr;
242− int dma_reg = ap->port_no ? ARTTIM23_INTR_CH1 : CFR_INTR_CH0;
243− int dma_mask = ap->port_no ? ARTTIM2 : CFR;
251+ int dma_mask = ap->port_no ? ARTTIM23_INTR_CH1 : CFR_INTR_CH0;
252+ int dma_reg = ap->port_no ? ARTTIM2 : CFR;
244253
245254 ata_bmdma_stop(qc);
246255
drivers/ata/pata_hpt3x2n.c+3−3
@@ -25,7 +25,7 @@ · 24 unmodified lines
2525 #include <linux/libata.h>
2626
2727 #define DRV_NAME "pata_hpt3x2n"
28−#define DRV_VERSION "0.3"
28+#define DRV_VERSION "0.3.2"
2929
3030 enum {
3131 HPT_PCI_FAST = (1 << 31),
@@ -297,11 +297,11 @@ static int hpt3x2n_pair_idle(struct ata_port *ap) · 265 unmodified lines
297297 return 0;
298298 }
299299
300−static int hpt3x2n_use_dpll(struct ata_port *ap, int reading)
300+static int hpt3x2n_use_dpll(struct ata_port *ap, int writing)
301301 {
302302 long flags = (long)ap->host->private_data;
303303 /* See if we should use the DPLL */
304− if (reading == 0)
304+ if (writing)
305305 return USE_DPLL; /* Needed for write */
306306 if (flags & PCI66)
307307 return USE_DPLL; /* Needed at 66Mhz */
drivers/ata/pata_it821x.c+3−1
@@ -476,6 +476,7 @@ static unsigned int it821x_passthru_qc_issue_prot(struct ata_queued_cmd *qc) · 475 unmodified lines
476476 /**
477477 * it821x_smart_set_mode - mode setting
478478 * @ap: interface to set up
479+ * @unused: device that failed (error only)
479480 *
480481 * Use a non standard set_mode function. We don't want to be tuned.
481482 * The BIOS configured everything. Our job is not to fiddle. We
@@ -483,7 +484,7 @@ static unsigned int it821x_passthru_qc_issue_prot(struct ata_queued_cmd *qc) · 1 unmodified line
483484 * and respect them.
484485 */
485486
486−static void it821x_smart_set_mode(struct ata_port *ap)
487+static int it821x_smart_set_mode(struct ata_port *ap, struct ata_device **unused)
487488 {
488489 int dma_enabled = 0;
489490 int i;
@@ -512,6 +513,7 @@ static void it821x_smart_set_mode(struct ata_port *ap) · 22 unmodified lines
512513 }
513514 }
514515 }
516+ return 0;
515517 }
516518
517519 /**
drivers/ata/pata_ixp4xx_cf.c+3−2
@@ -23,9 +23,9 @@ · 22 unmodified lines
2323 #include <scsi/scsi_host.h>
2424
2525 #define DRV_NAME "pata_ixp4xx_cf"
26−#define DRV_VERSION "0.1.1"
26+#define DRV_VERSION "0.1.1ac1"
2727
28−static void ixp4xx_set_mode(struct ata_port *ap)
28+static int ixp4xx_set_mode(struct ata_port *ap, struct ata_device *adev)
2929 {
3030 int i;
3131
@@ -38,6 +38,7 @@ static void ixp4xx_set_mode(struct ata_port *ap) · 6 unmodified lines
3838 dev->flags |= ATA_DFLAG_PIO;
3939 }
4040 }
41+ return 0;
4142 }
4243
4344 static void ixp4xx_phy_reset(struct ata_port *ap)
drivers/ata/pata_legacy.c+3−1
@@ -96,6 +96,7 @@ static int pio_mask = 0x1F; /* PIO range for autospeed devices */ · 95 unmodified lines
9696 /**
9797 * legacy_set_mode - mode setting
9898 * @ap: IDE interface
99+ * @unused: Device that failed when error is returned
99100 *
100101 * Use a non standard set_mode function. We don't want to be tuned.
101102 *
@@ -105,7 +106,7 @@ static int pio_mask = 0x1F; /* PIO range for autospeed devices */ · 3 unmodified lines
105106 * expand on this as per hdparm in the base kernel.
106107 */
107108
108−static void legacy_set_mode(struct ata_port *ap)
109+static int legacy_set_mode(struct ata_port *ap, struct ata_device **unused)
109110 {
110111 int i;
111112
@@ -118,6 +119,7 @@ static void legacy_set_mode(struct ata_port *ap) · 6 unmodified lines
118119 dev->flags |= ATA_DFLAG_PIO;
119120 }
120121 }
122+ return 0;
121123 }
122124
123125 static struct scsi_host_template legacy_sht = {
drivers/ata/pata_rz1000.c+4−2
@@ -52,19 +52,20 @@ static void rz1000_error_handler(struct ata_port *ap) · 51 unmodified lines
5252 /**
5353 * rz1000_set_mode - mode setting function
5454 * @ap: ATA interface
55+ * @unused: returned device on set_mode failure
5556 *
5657 * Use a non standard set_mode function. We don't want to be tuned. We
5758 * would prefer to be BIOS generic but for the fact our hardware is
5859 * whacked out.
5960 */
6061
61−static void rz1000_set_mode(struct ata_port *ap)
62+static int rz1000_set_mode(struct ata_port *ap, struct ata_device **unused)
6263 {
6364 int i;
6465
6566 for (i = 0; i < ATA_MAX_DEVICES; i++) {
6667 struct ata_device *dev = &ap->device[i];
67− if (ata_dev_enabled(dev)) {
68+ if (ata_dev_ready(dev)) {
6869 /* We don't really care */
6970 dev->pio_mode = XFER_PIO_0;
7071 dev->xfer_mode = XFER_PIO_0;
@@ -72,6 +73,7 @@ static void rz1000_set_mode(struct ata_port *ap) · 1 unmodified line
7273 dev->flags |= ATA_DFLAG_PIO;
7374 }
7475 }
76+ return 0;
7577 }
7678
7779
drivers/ata/sata_uli.c+2−1
@@ -128,7 +128,8 @@ static const struct ata_port_operations uli_ops = { · 127 unmodified lines
128128
129129 static struct ata_port_info uli_port_info = {
130130 .sht = &uli_sht,
131− .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY,
131+ .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
132+ ATA_FLAG_IGN_SIMPLEX,
132133 .pio_mask = 0x1f, /* pio0-4 */
133134 .udma_mask = 0x7f, /* udma0-6 */
134135 .port_ops = &uli_ops,
drivers/ata/sata_via.c+11−1
@@ -74,6 +74,7 @@ enum { · 73 unmodified lines
7474 static int svia_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
7575 static u32 svia_scr_read (struct ata_port *ap, unsigned int sc_reg);
7676 static void svia_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val);
77+static void svia_noop_freeze(struct ata_port *ap);
7778 static void vt6420_error_handler(struct ata_port *ap);
7879
7980 static const struct pci_device_id svia_pci_tbl[] = {
@@ -128,7 +129,7 @@ static const struct ata_port_operations vt6420_sata_ops = { · 48 unmodified lines
128129 .qc_issue = ata_qc_issue_prot,
129130 .data_xfer = ata_pio_data_xfer,
130131
131− .freeze = ata_bmdma_freeze,
132+ .freeze = svia_noop_freeze,
132133 .thaw = ata_bmdma_thaw,
133134 .error_handler = vt6420_error_handler,
134135 .post_internal_cmd = ata_bmdma_post_internal_cmd,
@@ -204,6 +205,15 @@ static void svia_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) · 69 unmodified lines
204205 outl(val, ap->ioaddr.scr_addr + (4 * sc_reg));
205206 }
206207
208+static void svia_noop_freeze(struct ata_port *ap)
209+{
210+ /* Some VIA controllers choke if ATA_NIEN is manipulated in
211+ * certain way. Leave it alone and just clear pending IRQ.
212+ */
213+ ata_chk_status(ap);
214+ ata_bmdma_irq_clear(ap);
215+}
216+
207217 /**
208218 * vt6420_prereset - prereset for vt6420
209219 * @ap: target ATA port
include/asm-generic/libata-portmap.h+2−2
@@ -3,10 +3,10 @@ · 2 unmodified lines
33
44 #define ATA_PRIMARY_CMD 0x1F0
55 #define ATA_PRIMARY_CTL 0x3F6
6−#define ATA_PRIMARY_IRQ 14
6+#define ATA_PRIMARY_IRQ(dev) 14
77
88 #define ATA_SECONDARY_CMD 0x170
99 #define ATA_SECONDARY_CTL 0x376
10−#define ATA_SECONDARY_IRQ 15
10+#define ATA_SECONDARY_IRQ(dev) 15
1111
1212 #endif
include/asm-powerpc/libata-portmap.h+12−0
@@ -0,0 +1,12 @@
1+#ifndef __ASM_POWERPC_LIBATA_PORTMAP_H
2+#define __ASM_POWERPC_LIBATA_PORTMAP_H
3+
4+#define ATA_PRIMARY_CMD 0x1F0
5+#define ATA_PRIMARY_CTL 0x3F6
6+#define ATA_PRIMARY_IRQ(dev) pci_get_legacy_ide_irq(dev, 0)
7+
8+#define ATA_SECONDARY_CMD 0x170
9+#define ATA_SECONDARY_CTL 0x376
10+#define ATA_SECONDARY_IRQ(dev) pci_get_legacy_ide_irq(dev, 1)
11+
12+#endif
include/linux/libata.h+3−2
@@ -177,6 +177,7 @@ enum { · 176 unmodified lines
177177 * Register FIS clearing BSY */
178178 ATA_FLAG_DEBUGMSG = (1 << 13),
179179 ATA_FLAG_SETXFER_POLLING= (1 << 14), /* use polling for SETXFER */
180+ ATA_FLAG_IGN_SIMPLEX = (1 << 15), /* ignore SIMPLEX */
180181
181182 /* The following flag belongs to ap->pflags but is kept in
182183 * ap->flags because it's referenced in many LLDs and will be
@@ -612,11 +613,11 @@ struct ata_port_operations { · 429 unmodified lines
612613 void (*dev_select)(struct ata_port *ap, unsigned int device);
613614
614615 void (*phy_reset) (struct ata_port *ap); /* obsolete */
615− void (*set_mode) (struct ata_port *ap);
616+ int (*set_mode) (struct ata_port *ap, struct ata_device **r_failed_dev);
616617
617618 void (*post_set_mode) (struct ata_port *ap);
618619
619− int (*check_atapi_dma) (struct ata_queued_cmd *qc);
620+ int (*check_atapi_dma) (struct ata_queued_cmd *qc);
620621
621622 void (*bmdma_setup) (struct ata_queued_cmd *qc);
622623 void (*bmdma_start) (struct ata_queued_cmd *qc);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t