Merge refs/heads/upstream from master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev

+43 -7
+43 -7
drivers/scsi/sata_promise.c
··· 84 static void pdc_eng_timeout(struct ata_port *ap); 85 static int pdc_port_start(struct ata_port *ap); 86 static void pdc_port_stop(struct ata_port *ap); 87 - static void pdc_phy_reset(struct ata_port *ap); 88 static void pdc_qc_prep(struct ata_queued_cmd *qc); 89 static void pdc_tf_load_mmio(struct ata_port *ap, struct ata_taskfile *tf); 90 static void pdc_exec_command_mmio(struct ata_port *ap, struct ata_taskfile *tf); ··· 112 .ordered_flush = 1, 113 }; 114 115 - static struct ata_port_operations pdc_ata_ops = { 116 .port_disable = ata_port_disable, 117 .tf_load = pdc_tf_load_mmio, 118 .tf_read = ata_tf_read, 119 .check_status = ata_check_status, 120 .exec_command = pdc_exec_command_mmio, 121 .dev_select = ata_std_dev_select, 122 - .phy_reset = pdc_phy_reset, 123 .qc_prep = pdc_qc_prep, 124 .qc_issue = pdc_qc_issue_prot, 125 .eng_timeout = pdc_eng_timeout, 126 .irq_handler = pdc_interrupt, 127 .irq_clear = pdc_irq_clear, 128 .scr_read = pdc_sata_scr_read, 129 .scr_write = pdc_sata_scr_write, 130 .port_start = pdc_port_start, 131 .port_stop = pdc_port_stop, 132 .host_stop = ata_host_stop, ··· 165 .pio_mask = 0x1f, /* pio0-4 */ 166 .mwdma_mask = 0x07, /* mwdma0-2 */ 167 .udma_mask = 0x7f, /* udma0-6 ; FIXME */ 168 - .port_ops = &pdc_ata_ops, 169 }, 170 171 /* board_20319 */ ··· 176 .pio_mask = 0x1f, /* pio0-4 */ 177 .mwdma_mask = 0x07, /* mwdma0-2 */ 178 .udma_mask = 0x7f, /* udma0-6 ; FIXME */ 179 - .port_ops = &pdc_ata_ops, 180 }, 181 182 /* board_20619 */ ··· 187 .pio_mask = 0x1f, /* pio0-4 */ 188 .mwdma_mask = 0x07, /* mwdma0-2 */ 189 .udma_mask = 0x7f, /* udma0-6 ; FIXME */ 190 - .port_ops = &pdc_ata_ops, 191 }, 192 }; 193 ··· 302 readl(mmio); /* flush */ 303 } 304 305 - static void pdc_phy_reset(struct ata_port *ap) 306 { 307 pdc_reset_port(ap); 308 sata_phy_reset(ap); 309 } 310 311 static u32 pdc_sata_scr_read (struct ata_port *ap, unsigned int sc_reg)
··· 84 static void pdc_eng_timeout(struct ata_port *ap); 85 static int pdc_port_start(struct ata_port *ap); 86 static void pdc_port_stop(struct ata_port *ap); 87 + static void pdc_pata_phy_reset(struct ata_port *ap); 88 + static void pdc_sata_phy_reset(struct ata_port *ap); 89 static void pdc_qc_prep(struct ata_queued_cmd *qc); 90 static void pdc_tf_load_mmio(struct ata_port *ap, struct ata_taskfile *tf); 91 static void pdc_exec_command_mmio(struct ata_port *ap, struct ata_taskfile *tf); ··· 111 .ordered_flush = 1, 112 }; 113 114 + static struct ata_port_operations pdc_sata_ops = { 115 .port_disable = ata_port_disable, 116 .tf_load = pdc_tf_load_mmio, 117 .tf_read = ata_tf_read, 118 .check_status = ata_check_status, 119 .exec_command = pdc_exec_command_mmio, 120 .dev_select = ata_std_dev_select, 121 + 122 + .phy_reset = pdc_sata_phy_reset, 123 + 124 .qc_prep = pdc_qc_prep, 125 .qc_issue = pdc_qc_issue_prot, 126 .eng_timeout = pdc_eng_timeout, 127 .irq_handler = pdc_interrupt, 128 .irq_clear = pdc_irq_clear, 129 + 130 .scr_read = pdc_sata_scr_read, 131 .scr_write = pdc_sata_scr_write, 132 + .port_start = pdc_port_start, 133 + .port_stop = pdc_port_stop, 134 + .host_stop = ata_host_stop, 135 + }; 136 + 137 + static struct ata_port_operations pdc_pata_ops = { 138 + .port_disable = ata_port_disable, 139 + .tf_load = pdc_tf_load_mmio, 140 + .tf_read = ata_tf_read, 141 + .check_status = ata_check_status, 142 + .exec_command = pdc_exec_command_mmio, 143 + .dev_select = ata_std_dev_select, 144 + 145 + .phy_reset = pdc_pata_phy_reset, 146 + 147 + .qc_prep = pdc_qc_prep, 148 + .qc_issue = pdc_qc_issue_prot, 149 + .eng_timeout = pdc_eng_timeout, 150 + .irq_handler = pdc_interrupt, 151 + .irq_clear = pdc_irq_clear, 152 + 153 .port_start = pdc_port_start, 154 .port_stop = pdc_port_stop, 155 .host_stop = ata_host_stop, ··· 140 .pio_mask = 0x1f, /* pio0-4 */ 141 .mwdma_mask = 0x07, /* mwdma0-2 */ 142 .udma_mask = 0x7f, /* udma0-6 ; FIXME */ 143 + .port_ops = &pdc_sata_ops, 144 }, 145 146 /* board_20319 */ ··· 151 .pio_mask = 0x1f, /* pio0-4 */ 152 .mwdma_mask = 0x07, /* mwdma0-2 */ 153 .udma_mask = 0x7f, /* udma0-6 ; FIXME */ 154 + .port_ops = &pdc_sata_ops, 155 }, 156 157 /* board_20619 */ ··· 162 .pio_mask = 0x1f, /* pio0-4 */ 163 .mwdma_mask = 0x07, /* mwdma0-2 */ 164 .udma_mask = 0x7f, /* udma0-6 ; FIXME */ 165 + .port_ops = &pdc_pata_ops, 166 }, 167 }; 168 ··· 277 readl(mmio); /* flush */ 278 } 279 280 + static void pdc_sata_phy_reset(struct ata_port *ap) 281 { 282 pdc_reset_port(ap); 283 sata_phy_reset(ap); 284 + } 285 + 286 + static void pdc_pata_phy_reset(struct ata_port *ap) 287 + { 288 + /* FIXME: add cable detect. Don't assume 40-pin cable */ 289 + ap->cbl = ATA_CBL_PATA40; 290 + ap->udma_mask &= ATA_UDMA_MASK_40C; 291 + 292 + pdc_reset_port(ap); 293 + ata_port_probe(ap); 294 + ata_bus_reset(ap); 295 } 296 297 static u32 pdc_sata_scr_read (struct ata_port *ap, unsigned int sc_reg)