All pastes #289263 Raw Edit

Untitled

public text v1 · immutable
#289263 ·published 2006-12-23 00:19 UTC
rendered paste body
/* exerpts from sata_promise.c */

board_2057x             = 4,    /* SATAII150 Tx2plus */


        case board_2057x:  // My Board.. I dunno what this hotplug_offset is but where the PATA is actually detected is below in the case board_2037x 
                /* Override hotplug offset for SATAII150 */
                hp->hotplug_offset = PDC2_SATA_PLUG_CSR;
                /* Fall through */
        case board_2037x:  
                /* Some boards have also PATA port */
                tmp = readb(mmio_base + PDC_FLASH_CTL+1);
                if (!(tmp & 0x80))
                {
                        probe_ent->n_ports = 3; 

                        pdc_ata_setup_port(&probe_ent->port[2], base + 0x300);

                        probe_ent->port_flags[2] = ATA_FLAG_SLAVE_POSS;

                        printk(KERN_INFO DRV_NAME " PATA port found\n");
                }
                else
                        probe_ent->n_ports = 2;
                break;


Now if I add the 
                /* Some boards have also PATA port */
                tmp = readb(mmio_base + PDC_FLASH_CTL+1);
                if (!(tmp & 0x80))
                {
                        probe_ent->n_ports = 3;
                        pdc_ata_setup_port(&probe_ent->port[2], base + 0x300);
                        probe_ent->port_flags[2] = ATA_FLAG_SLAVE_POSS;
                        printk(KERN_INFO DRV_NAME " PATA port found\n");
                }
                else


section to my 2.6.19 sata_proise.c in the same spot (which currently only contains)

        case board_2057x:
                /* Override hotplug offset for SATAII150 */
                hp->hotplug_offset = PDC2_SATA_PLUG_CSR;
                /* Fall through */
        case board_2037x: 
/* Add Snipet here */
                probe_ent->n_ports = 2;
                break;

Notice the complete lack of checking for PATA port and adding in 2.6.19

The errors produced are as follows

drivers/ata/sata_promise.c: In function `pdc_ata_init_one':
drivers/ata/sata_promise.c:778: error: subscripted value is neither array nor pointer

line 778 is probe_ent->port_flags[2] = ATA_FLAG_SLAVE_POSS;