All pastes #289295 Raw Edit

Miscellany

public text v1 · immutable
#289295 ·published 2006-12-23 00:50 UTC
rendered paste body
/* snippets from sata_promise.c from 2.6.17-mm6*/

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;



sata_prose.c from 2.6.19 in the same spot seems to lack the code for the PATA channel detection

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


So if I add the code myself 

                /* 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;


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;


I'm assuming there was a change in the object used to define probe_ent form 2.6.17-mm6 to 2.6.19 but I've been unable to find it's definition in the source.

struct ata_probe_ent *probe_ent = NULL;