/[linux-patches]/genpatches-2.6/trunk/2.6.17-pre/4110_promise-pdc2037x.patch
Gentoo

Diff of /genpatches-2.6/trunk/2.6.17-pre/4110_promise-pdc2037x.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 360 Revision 361
1Index: linux-git/drivers/scsi/libata-core.c 1Index: linux-git/drivers/scsi/libata-core.c
2=================================================================== 2===================================================================
3--- linux-git.orig/drivers/scsi/libata-core.c 3--- linux-git.orig/drivers/scsi/libata-core.c
4+++ linux-git/drivers/scsi/libata-core.c 4+++ linux-git/drivers/scsi/libata-core.c
5@@ -4431,6 +4431,7 @@ static void ata_host_init(struct ata_por 5@@ -4441,6 +4441,7 @@ static void ata_host_init(struct ata_por
6 ap->mwdma_mask = ent->mwdma_mask; 6 ap->mwdma_mask = ent->mwdma_mask;
7 ap->udma_mask = ent->udma_mask; 7 ap->udma_mask = ent->udma_mask;
8 ap->flags |= ent->host_flags; 8 ap->flags |= ent->host_flags;
9+ ap->flags |= ent->port_flags[port_no]; 9+ ap->flags |= ent->port_flags[port_no];
10 ap->ops = ent->port_ops; 10 ap->ops = ent->port_ops;
12 ap->active_tag = ATA_TAG_POISON; 12 ap->active_tag = ATA_TAG_POISON;
13Index: linux-git/drivers/scsi/sata_promise.c 13Index: linux-git/drivers/scsi/sata_promise.c
14=================================================================== 14===================================================================
15--- linux-git.orig/drivers/scsi/sata_promise.c 15--- linux-git.orig/drivers/scsi/sata_promise.c
16+++ linux-git/drivers/scsi/sata_promise.c 16+++ linux-git/drivers/scsi/sata_promise.c
17@@ -89,6 +89,7 @@ static irqreturn_t pdc_interrupt (int ir 17@@ -96,6 +96,7 @@ static irqreturn_t pdc_interrupt (int ir
18 static void pdc_eng_timeout(struct ata_port *ap); 18 static void pdc_eng_timeout(struct ata_port *ap);
19 static int pdc_port_start(struct ata_port *ap); 19 static int pdc_port_start(struct ata_port *ap);
20 static void pdc_port_stop(struct ata_port *ap); 20 static void pdc_port_stop(struct ata_port *ap);
21+static void pdc_pata_cbl_detect(struct ata_port *ap); 21+static void pdc_pata_cbl_detect(struct ata_port *ap);
22 static void pdc_pata_phy_reset(struct ata_port *ap); 22 static void pdc_pata_phy_reset(struct ata_port *ap);
23 static void pdc_sata_phy_reset(struct ata_port *ap); 23 static void pdc_sata_phy_reset(struct ata_port *ap);
24 static void pdc_qc_prep(struct ata_queued_cmd *qc); 24 static void pdc_qc_prep(struct ata_queued_cmd *qc);
25@@ -165,7 +166,7 @@ static const struct ata_port_info pdc_po 25@@ -172,7 +173,7 @@ static const struct ata_port_info pdc_po
26 /* board_2037x */ 26 /* board_2037x */
27 { 27 {
28 .sht = &pdc_ata_sht, 28 .sht = &pdc_ata_sht,
29- .host_flags = PDC_COMMON_FLAGS | ATA_FLAG_SATA, 29- .host_flags = PDC_COMMON_FLAGS | ATA_FLAG_SATA,
30+ .host_flags = PDC_COMMON_FLAGS /* | ATA_FLAG_SATA */, 30+ .host_flags = PDC_COMMON_FLAGS /* | ATA_FLAG_SATA */,
31 .pio_mask = 0x1f, /* pio0-4 */ 31 .pio_mask = 0x1f, /* pio0-4 */
32 .mwdma_mask = 0x07, /* mwdma0-2 */ 32 .mwdma_mask = 0x07, /* mwdma0-2 */
33 .udma_mask = 0x7f, /* udma0-6 ; FIXME */ 33 .udma_mask = 0x7f, /* udma0-6 ; FIXME */
34@@ -323,17 +324,34 @@ static void pdc_reset_port(struct ata_po 34@@ -361,17 +362,34 @@ static void pdc_reset_port(struct ata_po
35 static void pdc_sata_phy_reset(struct ata_port *ap) 35 static void pdc_sata_phy_reset(struct ata_port *ap)
36 { 36 {
37 pdc_reset_port(ap); 37 pdc_reset_port(ap);
38- sata_phy_reset(ap); 38- sata_phy_reset(ap);
39+ if (ap->flags & ATA_FLAG_SATA) 39+ if (ap->flags & ATA_FLAG_SATA)
69 ata_port_probe(ap); 69 ata_port_probe(ap);
70+ 70+
71 ata_bus_reset(ap); 71 ata_bus_reset(ap);
72 } 72 }
73 73
74@@ -646,6 +664,7 @@ static int pdc_ata_init_one (struct pci_ 74@@ -673,6 +691,7 @@ static int pdc_ata_init_one (struct pci_
75 unsigned int board_idx = (unsigned int) ent->driver_data; 75 unsigned int board_idx = (unsigned int) ent->driver_data;
76 int pci_dev_busy = 0; 76 int pci_dev_busy = 0;
77 int rc; 77 int rc;
78+ u8 tmp; 78+ u8 tmp;
79 79
80 if (!printed_version++) 80 if (!printed_version++)
81 dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); 81 dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n");
82@@ -705,6 +724,9 @@ static int pdc_ata_init_one (struct pci_ 82@@ -741,6 +760,9 @@ static int pdc_ata_init_one (struct pci_
83 probe_ent->port[0].scr_addr = base + 0x400; 83 probe_ent->port[0].scr_addr = base + 0x400;
84 probe_ent->port[1].scr_addr = base + 0x500; 84 probe_ent->port[1].scr_addr = base + 0x500;
85 85
86+ probe_ent->port_flags[0] = ATA_FLAG_SATA; 86+ probe_ent->port_flags[0] = ATA_FLAG_SATA;
87+ probe_ent->port_flags[1] = ATA_FLAG_SATA; 87+ probe_ent->port_flags[1] = ATA_FLAG_SATA;
88+ 88+
89 /* notice 4-port boards */ 89 /* notice 4-port boards */
90 switch (board_idx) { 90 switch (board_idx) {
91 case board_20319: 91 case board_40518:
92@@ -715,9 +737,25 @@ static int pdc_ata_init_one (struct pci_ 92@@ -755,13 +777,29 @@ static int pdc_ata_init_one (struct pci_
93 93
94 probe_ent->port[2].scr_addr = base + 0x600; 94 probe_ent->port[2].scr_addr = base + 0x600;
95 probe_ent->port[3].scr_addr = base + 0x700; 95 probe_ent->port[3].scr_addr = base + 0x700;
96+ 96+
97+ probe_ent->port_flags[2] = ATA_FLAG_SATA; 97+ probe_ent->port_flags[2] = ATA_FLAG_SATA;
98+ probe_ent->port_flags[3] = ATA_FLAG_SATA; 98+ probe_ent->port_flags[3] = ATA_FLAG_SATA;
99 break; 99 break;
100 case board_2057x:
101 /* Override hotplug offset for SATAII150 */
102 hp->hotplug_offset = PDC2_SATA_PLUG_CSR;
103 /* Fall through */
100 case board_2037x: 104 case board_2037x:
101- probe_ent->n_ports = 2; 105- probe_ent->n_ports = 2;
102+ /* Some boards also have a PATA port */ 106+ /* Some boards also have a PATA port */
103+ tmp = readb(mmio_base + PDC_FLASH_CTL+1); 107+ tmp = readb(mmio_base + PDC_FLASH_CTL+1);
104+ if (!(tmp & 0x80)) 108+ if (!(tmp & 0x80))
118 probe_ent->n_ports = 2; 122 probe_ent->n_ports = 2;
119Index: linux-git/include/linux/libata.h 123Index: linux-git/include/linux/libata.h
120=================================================================== 124===================================================================
121--- linux-git.orig/include/linux/libata.h 125--- linux-git.orig/include/linux/libata.h
122+++ linux-git/include/linux/libata.h 126+++ linux-git/include/linux/libata.h
123@@ -237,6 +237,7 @@ struct ata_probe_ent { 127@@ -282,6 +282,7 @@ struct ata_probe_ent {
124 unsigned long irq;
125 unsigned int irq_flags; 128 unsigned int irq_flags;
126 unsigned long host_flags; 129 unsigned long host_flags;
130 unsigned long host_set_flags;
127+ unsigned long port_flags[ATA_MAX_PORTS]; 131+ unsigned long port_flags[ATA_MAX_PORTS];
128 void __iomem *mmio_base; 132 void __iomem *mmio_base;
129 void *private_data; 133 void *private_data;
130 }; 134 };

Legend:
Removed from v.360  
changed lines
  Added in v.361

  ViewVC Help
Powered by ViewVC 1.1.13