Lines Matching full:mesh

3  * SCSI low-level driver for the MESH (Macintosh Enhanced SCSI Hardware)
5 * We assume the MESH is connected to a DBDMA (descriptor-based DMA)
50 #include "mesh.h"
58 MODULE_DESCRIPTION("PowerMac MESH SCSI driver");
145 volatile struct mesh_regs __iomem *mesh; member
223 tlp->bs0 = ms->mesh->bus_status0; in dlog()
224 tlp->bs1 = ms->mesh->bus_status1; in dlog()
252 printk(KERN_DEBUG "mesh log %d: bs=%.2x%.2x ph=%.2x ", in dumplog()
277 printk(KERN_DEBUG "mesh log: bs=%.2x%.2x ph=%.2x t%d ", in dumpslog()
305 volatile struct mesh_regs __iomem *mr = ms->mesh; in mesh_dump_regs()
310 printk(KERN_DEBUG "mesh: state at %p, regs at %p, dma at %p\n", in mesh_dump_regs()
337 * Flush write buffers on the bus path to the mesh
351 volatile struct mesh_regs __iomem *mr = ms->mesh; in mesh_init()
370 printk(KERN_INFO "mesh: performing initial bus reset...\n"); in mesh_init()
398 volatile struct mesh_regs __iomem *mr = ms->mesh; in mesh_start_cmd()
417 panic("mesh: double DMA start !\n"); in mesh_start_cmd()
474 * Apparently the mesh has a bug where it will assert both its in mesh_start_cmd()
488 * is trying to reselect us, reset the mesh and then enable in mesh_start_cmd()
515 /* looks like a reselection - try resetting the mesh */ in mesh_start_cmd()
532 printk(KERN_ERR "mesh: controller not responding" in mesh_start_cmd()
536 * mesh isn't responding, the higher levels of in mesh_start_cmd()
546 * Start the next command for a MESH.
612 out_8(&ms->mesh->sequence, SEQ_ENBRESEL); in mesh_done()
613 mesh_flush_io(ms->mesh); in mesh_done()
635 volatile struct mesh_regs __iomem *mr = ms->mesh; in set_sdtr()
642 printk(KERN_INFO "mesh: target %d now asynchronous\n", in set_sdtr()
669 printk(KERN_INFO "mesh: target %d synchronous at %d.%d MB/s\n", in set_sdtr()
676 volatile struct mesh_regs __iomem *mr = ms->mesh; in start_phase()
703 printk(KERN_ERR "mesh: msg_out but n_msgout=%d\n", in start_phase()
710 printk(KERN_DEBUG "mesh: sending %d msg bytes:", in start_phase()
724 * issue a SEQ_MSGOUT to get the mesh to drop ACK. in start_phase()
753 printk(KERN_ERR "mesh bug: start_phase msgphase=%d\n", in start_phase()
811 printk(KERN_ERR "mesh: start_phase called with phase=%d\n", in start_phase()
820 volatile struct mesh_regs __iomem *mr = ms->mesh; in get_msgin()
852 volatile struct mesh_regs __iomem *mr = ms->mesh; in reselected()
878 printk(KERN_ERR "mesh: reselected in phase %d/%d tgt %d\n", in reselected()
885 printk(KERN_ERR "mesh: reselected with DMA started !\n"); in reselected()
922 printk(KERN_ERR "mesh: reselection but nothing in fifo?\n"); in reselected()
935 printk(KERN_ERR "mesh: bad reselection data %x\n", b); in reselected()
948 printk(KERN_DEBUG "mesh: reselected by target %d\n", t); in reselected()
949 printk(KERN_DEBUG "mesh: saved_ptr=%x goes_out=%d cmd=%p\n", in reselected()
954 printk(KERN_ERR "mesh: reselected by tgt %d but no cmd!\n", t); in reselected()
985 volatile struct mesh_regs __iomem *mr = ms->mesh; in handle_reset()
1028 volatile struct mesh_regs __iomem *mr = ms->mesh; in handle_error()
1037 printk(KERN_INFO "mesh: SCSI bus reset detected: " in handle_error()
1055 printk(KERN_WARNING "mesh: target %d aborted\n", in handle_error()
1067 printk(KERN_ERR "mesh: msg parity error, target %d\n", in handle_error()
1076 printk(KERN_ERR "mesh: parity error, target %d\n", in handle_error()
1104 printk(KERN_ERR "mesh: sequence error (err=%x exc=%x)\n", in handle_error()
1107 printk(KERN_ERR "mesh: unknown error %x (exc=%x)\n", err, exc); in handle_error()
1124 volatile struct mesh_regs __iomem *mr = ms->mesh; in handle_exception()
1133 printk(KERN_DEBUG "mesh: lost arbitration\n"); in handle_exception()
1145 printk(KERN_ERR "mesh: can't cope with exception %x\n", exc); in handle_exception()
1229 printk(KERN_WARNING "mesh: lun mismatch " in handle_msgin()
1241 printk(KERN_WARNING "mesh: rejecting message from target %d:", in handle_msgin()
1286 panic("mesh: scatterlist element >= 64k"); in set_dma_cmds()
1318 volatile struct mesh_regs __iomem *mr = ms->mesh; in halt_dma()
1342 printk(KERN_ERR "mesh: halt_dma: data_ptr=%d (nb=%d, ms=%p)\n", in halt_dma()
1351 printk(KERN_DEBUG "mesh: target %d overrun, " in halt_dma()
1363 volatile struct mesh_regs __iomem *mr = ms->mesh; in phase_mismatch()
1422 "mesh: no msg to repeat\n"); in phase_mismatch()
1431 printk(KERN_DEBUG "mesh: unknown scsi phase %x\n", phase); in phase_mismatch()
1442 volatile struct mesh_regs __iomem *mr = ms->mesh; in cmd_complete()
1481 * to get the MESH to drop ACK, wait until REQ gets in cmd_complete()
1503 printk(KERN_ERR "mesh: error %x in msg_out\n", in cmd_complete()
1509 printk(KERN_ERR "mesh: exc %x in msg_out\n", in cmd_complete()
1512 printk(KERN_DEBUG "mesh: bs0=%x in msg_out\n", in cmd_complete()
1539 printk(KERN_ERR "mesh: interrupt in idle phase?\n"); in cmd_complete()
1586 * occasionally the mesh actually executes the in cmd_complete()
1601 printk(KERN_DEBUG "mesh: status is %x\n", in cmd_complete()
1657 volatile struct mesh_regs __iomem *mr = ms->mesh; in DEF_SCSI_QCMD()
1705 volatile struct mesh_regs __iomem *mr = ms->mesh; in mesh_host_reset()
1819 printk(KERN_INFO "resetting MESH scsi bus(es)\n"); in mesh_shutdown()
1821 mr = ms->mesh; in mesh_shutdown()
1834 .proc_name = "mesh",
1835 .name = "MESH",
1849 struct device_node *mesh = macio_get_of_node(mdev); in mesh_probe() local
1869 printk(KERN_ERR "mesh: expected 2 addrs and 2 intrs" in mesh_probe()
1875 if (macio_request_resources(mdev, "mesh") != 0) { in mesh_probe()
1876 printk(KERN_ERR "mesh: unable to request memory resources"); in mesh_probe()
1881 printk(KERN_ERR "mesh: couldn't register host"); in mesh_probe()
1893 ms->mesh = ioremap(macio_resource_start(mdev, 0), 0x1000); in mesh_probe()
1894 if (ms->mesh == NULL) { in mesh_probe()
1895 printk(KERN_ERR "mesh: can't map registers\n"); in mesh_probe()
1900 printk(KERN_ERR "mesh: can't map registers\n"); in mesh_probe()
1901 iounmap(ms->mesh); in mesh_probe()
1920 printk(KERN_ERR "mesh: can't allocate DMA table\n"); in mesh_probe()
1935 if ((cfp = of_get_property(mesh, "clock-frequency", NULL))) in mesh_probe()
1938 printk(KERN_INFO "mesh: assuming 50MHz clock frequency\n"); in mesh_probe()
1956 if (request_irq(ms->meshintr, do_mesh_interrupt, 0, "MESH", ms)) { in mesh_probe()
1957 printk(KERN_ERR "MESH: can't get irq %d\n", ms->meshintr); in mesh_probe()
1980 iounmap(ms->mesh); in mesh_probe()
2005 iounmap(ms->mesh); in mesh_remove()
2024 .name = "mesh",
2037 .name = "mesh",
2058 printk(KERN_INFO "mesh: configured for synchronous %d MB/s\n", sync_rate); in init_mesh()
2062 printk(KERN_INFO "mesh: configured for asynchronous\n"); in init_mesh()