Skip to contentSkip to conversation

Need testers with MESH SCSI

DISCUSSION Benjamin Herrenschmidt 4 participants 5 messages Dec 21, 2000

lore
Share & tools
lore
#0 lore raw

I need some feedback about the following change to the MESH driver. Does it fix previously non-working configurations ? Does it break currently working configurations ?

in drivers/scsi/mesh.c, replace the mesh_init function with:

static void mesh_init(struct mesh_state *ms)

{
    volatile struct mesh_regs *mr = ms->mesh;
    volatile struct dbdma_regs *md = ms->dma;

    udelay(100);

    /* Reset DBDMA & mask interrupts */
    out_le32(&md->control, (RUN|PAUSE|FLUSH|WAKE) << 16);
    out_8(&mr->intr_mask, 0);

    /* Pre-reset mesh to make sure it's in an approx. sane state */
    out_8(&mr->exception, 0xff);	/* clear all exception bits */
    out_8(&mr->error, 0xff);	/* clear all error bits */
    out_8(&mr->sequence, SEQ_RESETMESH);
    (void)in_8(&mr->sequence);
    udelay(10);

    /* Reset bus */
    out_8(&mr->bus_status1, BS1_RST);
    (void)in_8(&mr->bus_status1);
    udelay(30);
    out_8(&mr->bus_status1, 0);
    (void)in_8(&mr->bus_status1);

    /* Let bus and some devices settle down (Apple) */
    mdelay(250);

    /* Reset MESH again (for real), clear any error occured during
     * bus reset
     */
    out_8(&mr->exception, 0xff);	/* clear all exception bits */
    out_8(&mr->error, 0xff);	/* clear all error bits */
    out_8(&mr->sequence, SEQ_RESETMESH);
    (void)in_8(&mr->sequence);
    udelay(10);
    out_8(&mr->sequence, SEQ_FLUSHFIFO);
    (void)in_8(&mr->sequence);
    udelay(1);

    /* Initialize the chip */
    out_8(&mr->error, 0xff);	/* clear all error bits */
    out_8(&mr->interrupt, 0xff);	/* clear all interrupt bits */
    out_8(&mr->intr_mask, INT_ERROR | INT_EXCEPTION | INT_CMDDONE);
    out_8(&mr->source_id, ms->host->this_id);
    out_8(&mr->sel_timeout, 25);	/* 250ms */
    out_8(&mr->sync_params, ASYNC_PARAMS);	 /* asynchronous initially */
}

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 3 lines · Benjamin Herrenschmidt

I need some feedback about the following change to the MESH driver. Does it fix previously non-working configurations ? Does it break currently working configurations ?

Doesn't make a difference for me. This is on a CHRP LongTrail with Apple Hydra Mac I/O and one disk on the MESH chain:

Host: scsi1 Channel: 00 Id: 05 Lun: 00
Vendor: QUANTUM Model: FIREBALL_TM3200S Rev: 300X
Type: Direct-Access ANSI SCSI revision: 02

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#2 lore raw
Quoted 8 lines · Benjamin Herrenschmidt
Quoted 3 lines

I need some feedback about the following change to the MESH driver. Does it fix previously non-working configurations ? Does it break currently working configurations ?

Doesn't make a difference for me. This is on a CHRP LongTrail with Apple Hydra Mac I/O and one disk on the MESH chain:

Neither does it change anything for me (Lombard, SCSI Zip and Quantum VP32210). I've not tried to force any bus resets or something weird though.

Michael

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#3 lore raw
Quoted 4 lines

Neither does it change anything for me (Lombard, SCSI Zip and Quantum VP32210). I've not tried to force any bus resets or something weird though.

Well, I didn't change mesh_reset(), only mesh_init(). Since it seem that it doesn't break working configs but actually fix some non working ones, I'll push it one of these days.

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#4 lore raw
Quoted 6 lines
Quoted 4 lines

Neither does it change anything for me (Lombard, SCSI Zip and Quantum VP32210). I've not tried to force any bus resets or something weird though.

Well, I didn't change mesh_reset(), only mesh_init(). Since it seem that

I saw mesh_init called in more than one spot on a quick glance over the source and must have incorrectly assumed it's also used on bus or host reset.

Quoted 2 lines

it doesn't break working configs but actually fix some non working ones, I'll push it one of these days.

In case it wasn't obvious: my setup was working perfectly fine even before the patch :-)

Michael

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/