linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Need testers with MESH SCSI
@ 2000-12-21  9:33 Benjamin Herrenschmidt
  2000-12-21 16:30 ` Geert Uytterhoeven
  0 siblings, 1 reply; 10+ messages in thread
From: Benjamin Herrenschmidt @ 2000-12-21  9:33 UTC (permalink / raw)
  To: linuxppc-dev


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/

^ permalink raw reply	[flat|nested] 10+ messages in thread
[parent not found: <200012220559.XAA11090@lists.linuxppc.org>]

end of thread, other threads:[~2000-12-27 18:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-21  9:33 Need testers with MESH SCSI Benjamin Herrenschmidt
2000-12-21 16:30 ` Geert Uytterhoeven
2000-12-21 22:28   ` Michael Schmitz
2000-12-21 23:06     ` Benjamin Herrenschmidt
2000-12-21 23:15       ` Michael Schmitz
     [not found] <200012220559.XAA11090@lists.linuxppc.org>
2000-12-22 22:00 ` Wolfgang Haeuptli
2000-12-22 17:18   ` Benjamin Herrenschmidt
2000-12-23 14:35     ` Geert Uytterhoeven
2000-12-26 18:26       ` Benjamin Herrenschmidt
2000-12-27 18:15         ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).