tag | line | file | source code |
shp | 2611 | drivers/scsi/advansys.c | struct Scsi_Host *shp; |
shp | 2645 | drivers/scsi/advansys.c | shp = asc_host[i]; |
shp | 2656 | drivers/scsi/advansys.c | cp = (char *) advansys_info(shp); |
shp | 2675 | drivers/scsi/advansys.c | sprintf(cp, "\nDevices attached to SCSI Host %d:\n", shp->host_no); |
shp | 2689 | drivers/scsi/advansys.c | if (scd->host == shp) { |
shp | 2749 | drivers/scsi/advansys.c | struct Scsi_Host *shp; |
shp | 2917 | drivers/scsi/advansys.c | shp = scsi_register(tpnt, sizeof(struct asc_board)); |
shp | 2920 | drivers/scsi/advansys.c | asc_host[asc_board_count++] = shp; |
shp | 2923 | drivers/scsi/advansys.c | memset(ASC_BOARD(shp), 0, sizeof(struct asc_board)); |
shp | 2924 | drivers/scsi/advansys.c | boardp = &ASC_BOARD(shp)->board; |
shp | 2925 | drivers/scsi/advansys.c | boardp->cfg = &ASC_BOARD(shp)->cfg; |
shp | 2926 | drivers/scsi/advansys.c | boardp->cfg->overrun_buf = &ASC_BOARD(shp)->overrun_buf[0]; |
shp | 2935 | drivers/scsi/advansys.c | shp->unchecked_isa_dma = TRUE; |
shp | 2938 | drivers/scsi/advansys.c | shp->unchecked_isa_dma = FALSE; |
shp | 2941 | drivers/scsi/advansys.c | shp->unchecked_isa_dma = FALSE; |
shp | 2944 | drivers/scsi/advansys.c | shp->irq = boardp->irq_no = pciConfig.irqLine; |
shp | 2946 | drivers/scsi/advansys.c | shp->unchecked_isa_dma = FALSE; |
shp | 2950 | drivers/scsi/advansys.c | shp->unchecked_isa_dma = TRUE; |
shp | 2984 | drivers/scsi/advansys.c | scsi_unregister(shp); |
shp | 3019 | drivers/scsi/advansys.c | scsi_unregister(shp); |
shp | 3030 | drivers/scsi/advansys.c | shp->irq = boardp->irq_no; |
shp | 3033 | drivers/scsi/advansys.c | shp->io_port = boardp->iop_base; |
shp | 3034 | drivers/scsi/advansys.c | shp->n_io_port = ASC_IOADR_GAP; |
shp | 3035 | drivers/scsi/advansys.c | shp->this_id = boardp->cfg->chip_scsi_id; |
shp | 3038 | drivers/scsi/advansys.c | shp->can_queue = boardp->max_total_qng; |
shp | 3058 | drivers/scsi/advansys.c | shp->cmd_per_lun = 1; |
shp | 3060 | drivers/scsi/advansys.c | shp->cmd_per_lun = 4; |
shp | 3062 | drivers/scsi/advansys.c | ASC_DBG1(1, "advansys_detect: cmd_per_lun: %d\n", shp->cmd_per_lun); |
shp | 3071 | drivers/scsi/advansys.c | shp->sg_tablesize = 8; |
shp | 3073 | drivers/scsi/advansys.c | shp->sg_tablesize = ASC_MAX_SG_LIST; |
shp | 3076 | drivers/scsi/advansys.c | shp->sg_tablesize); |
shp | 3079 | drivers/scsi/advansys.c | shp->base = (char *) ((ulong) AscGetChipBiosAddress( |
shp | 3089 | drivers/scsi/advansys.c | request_region(shp->io_port, shp->n_io_port, "advansys"); |
shp | 3093 | drivers/scsi/advansys.c | shp->dma_channel = NO_ISA_DMA; |
shp | 3095 | drivers/scsi/advansys.c | shp->dma_channel = boardp->cfg->isa_dma_channel; |
shp | 3096 | drivers/scsi/advansys.c | if ((ret = request_dma(shp->dma_channel, "advansys")) != 0) { |
shp | 3098 | drivers/scsi/advansys.c | shp->dma_channel, ret); |
shp | 3099 | drivers/scsi/advansys.c | release_region(shp->io_port, shp->n_io_port); |
shp | 3100 | drivers/scsi/advansys.c | scsi_unregister(shp); |
shp | 3104 | drivers/scsi/advansys.c | AscEnableIsaDma(shp->dma_channel); |
shp | 3108 | drivers/scsi/advansys.c | ASC_DBG1(2, "advansys_detect: request_irq() %d\n", shp->irq); |
shp | 3109 | drivers/scsi/advansys.c | if ((ret = request_irq(shp->irq, advansys_interrupt, |
shp | 3112 | drivers/scsi/advansys.c | release_region(shp->io_port, shp->n_io_port); |
shp | 3113 | drivers/scsi/advansys.c | if (shp->dma_channel != NO_ISA_DMA) { |
shp | 3114 | drivers/scsi/advansys.c | free_dma(shp->dma_channel); |
shp | 3116 | drivers/scsi/advansys.c | scsi_unregister(shp); |
shp | 3129 | drivers/scsi/advansys.c | release_region(shp->io_port, shp->n_io_port); |
shp | 3130 | drivers/scsi/advansys.c | if (shp->dma_channel != NO_ISA_DMA) { |
shp | 3131 | drivers/scsi/advansys.c | free_dma(shp->dma_channel); |
shp | 3133 | drivers/scsi/advansys.c | free_irq(shp->irq, NULL); |
shp | 3134 | drivers/scsi/advansys.c | scsi_unregister(shp); |
shp | 3138 | drivers/scsi/advansys.c | ASC_DBG_PRT_SCSI_HOST(2, shp); |
shp | 3152 | drivers/scsi/advansys.c | advansys_release(struct Scsi_Host *shp) |
shp | 3155 | drivers/scsi/advansys.c | free_irq(shp->irq, NULL); |
shp | 3156 | drivers/scsi/advansys.c | if (shp->dma_channel != NO_ISA_DMA) { |
shp | 3158 | drivers/scsi/advansys.c | free_dma(shp->dma_channel); |
shp | 3160 | drivers/scsi/advansys.c | release_region(shp->io_port, shp->n_io_port); |
shp | 3161 | drivers/scsi/advansys.c | scsi_unregister(shp); |
shp | 3173 | drivers/scsi/advansys.c | advansys_info(struct Scsi_Host *shp) |
shp | 3179 | drivers/scsi/advansys.c | boardp = &ASC_BOARD(shp)->board; |
shp | 3184 | drivers/scsi/advansys.c | ASC_VERSION, ASC_BOARD(shp)->board.max_total_qng, |
shp | 3185 | drivers/scsi/advansys.c | (unsigned) shp->base, shp->io_port, |
shp | 3186 | drivers/scsi/advansys.c | shp->io_port + (shp->n_io_port - 1), shp->irq, shp->dma_channel); |
shp | 3207 | drivers/scsi/advansys.c | ASC_VERSION, busname, ASC_BOARD(shp)->board.max_total_qng, |
shp | 3208 | drivers/scsi/advansys.c | (unsigned) shp->base, shp->io_port, |
shp | 3209 | drivers/scsi/advansys.c | shp->io_port + (shp->n_io_port - 1), shp->irq); |
shp | 3246 | drivers/scsi/advansys.c | struct Scsi_Host *shp; |
shp | 3251 | drivers/scsi/advansys.c | shp = scp->host; |
shp | 3275 | drivers/scsi/advansys.c | if (ASC_BOARD(shp)->pending_tidmask == 0) { |
shp | 3284 | drivers/scsi/advansys.c | ASC_BOARD(shp)->pending_tidmask); |
shp | 3285 | drivers/scsi/advansys.c | asc_execute_pending(shp); |
shp | 3299 | drivers/scsi/advansys.c | asc_enqueue(shp, scp, scp->target, ASC_BACK); |
shp | 3809 | drivers/scsi/advansys.c | struct Scsi_Host *shp; |
shp | 3827 | drivers/scsi/advansys.c | shp = scp->host; |
shp | 3828 | drivers/scsi/advansys.c | ASC_ASSERT(shp); |
shp | 3829 | drivers/scsi/advansys.c | ASC_DBG1(1, "asc_isr_callback: shp %x\n", (unsigned) shp); |
shp | 3899 | drivers/scsi/advansys.c | if (ASC_BOARD(shp)->pending_tidmask != 0) { |
shp | 3908 | drivers/scsi/advansys.c | ASC_BOARD(shp)->pending_tidmask); |
shp | 3909 | drivers/scsi/advansys.c | asc_execute_pending(shp); |
shp | 3932 | drivers/scsi/advansys.c | asc_execute_pending(struct Scsi_Host *shp) |
shp | 3943 | drivers/scsi/advansys.c | scan_tidmask = ASC_BOARD(shp)->pending_tidmask; |
shp | 3947 | drivers/scsi/advansys.c | if ((scp = asc_dequeue(shp, i)) == NULL) { |
shp | 3952 | drivers/scsi/advansys.c | asc_enqueue(shp, scp, i, ASC_FRONT); |
shp | 4389 | drivers/scsi/advansys.c | asc_enqueue(struct Scsi_Host *shp, Scsi_Cmnd *scp, int tid, int flag) |
shp | 4397 | drivers/scsi/advansys.c | scp->host_scribble = (unsigned char *) ASC_BOARD(shp)->pending[tid]; |
shp | 4398 | drivers/scsi/advansys.c | ASC_BOARD(shp)->pending[tid] = (Scsi_Cmnd *) scp; |
shp | 4400 | drivers/scsi/advansys.c | for (scpp = &ASC_BOARD(shp)->pending[tid]; *scpp; |
shp | 4407 | drivers/scsi/advansys.c | ASC_BOARD(shp)->pending_tidmask |= ASC_TIX_TO_TARGET_ID(tid); |
shp | 4418 | drivers/scsi/advansys.c | asc_dequeue(struct Scsi_Host *shp, int tid) |
shp | 4424 | drivers/scsi/advansys.c | if ((scp = ASC_BOARD(shp)->pending[tid]) != NULL) { |
shp | 4425 | drivers/scsi/advansys.c | ASC_BOARD(shp)->pending[tid] = (Scsi_Cmnd *) scp->host_scribble; |
shp | 4427 | drivers/scsi/advansys.c | if (ASC_BOARD(shp)->pending[tid] == NULL) { |
shp | 4428 | drivers/scsi/advansys.c | ASC_BOARD(shp)->pending_tidmask &= ~ASC_TIX_TO_TARGET_ID(tid); |
shp | 4444 | drivers/scsi/advansys.c | asc_rmqueue(struct Scsi_Host *shp, Scsi_Cmnd *scp, int tid) |
shp | 4451 | drivers/scsi/advansys.c | for (scpp = &ASC_BOARD(shp)->pending[tid]; |
shp | 4460 | drivers/scsi/advansys.c | if (ASC_BOARD(shp)->pending[tid] == NULL) { |
shp | 4461 | drivers/scsi/advansys.c | ASC_BOARD(shp)->pending_tidmask &= ~ASC_TIX_TO_TARGET_ID(tid); |
shp | 58 | ipc/shm.c | struct shmid_ds *shp; |
shp | 61 | ipc/shm.c | while ((shp = shm_segs[id]) == IPC_NOID) |
shp | 63 | ipc/shm.c | if (shp == IPC_UNUSED) |
shp | 65 | ipc/shm.c | if (key == shp->shm_perm.key) |
shp | 76 | ipc/shm.c | struct shmid_ds *shp; |
shp | 92 | ipc/shm.c | shp = (struct shmid_ds *) kmalloc (sizeof (*shp), GFP_KERNEL); |
shp | 93 | ipc/shm.c | if (!shp) { |
shp | 100 | ipc/shm.c | shp->shm_pages = (ulong *) kmalloc (numpages*sizeof(ulong),GFP_KERNEL); |
shp | 101 | ipc/shm.c | if (!shp->shm_pages) { |
shp | 105 | ipc/shm.c | kfree(shp); |
shp | 109 | ipc/shm.c | for (i = 0; i < numpages; shp->shm_pages[i++] = 0); |
shp | 111 | ipc/shm.c | shp->shm_perm.key = key; |
shp | 112 | ipc/shm.c | shp->shm_perm.mode = (shmflg & S_IRWXUGO); |
shp | 113 | ipc/shm.c | shp->shm_perm.cuid = shp->shm_perm.uid = current->euid; |
shp | 114 | ipc/shm.c | shp->shm_perm.cgid = shp->shm_perm.gid = current->egid; |
shp | 115 | ipc/shm.c | shp->shm_perm.seq = shm_seq; |
shp | 116 | ipc/shm.c | shp->shm_segsz = size; |
shp | 117 | ipc/shm.c | shp->shm_cpid = current->pid; |
shp | 118 | ipc/shm.c | shp->attaches = NULL; |
shp | 119 | ipc/shm.c | shp->shm_lpid = shp->shm_nattch = 0; |
shp | 120 | ipc/shm.c | shp->shm_atime = shp->shm_dtime = 0; |
shp | 121 | ipc/shm.c | shp->shm_ctime = CURRENT_TIME; |
shp | 122 | ipc/shm.c | shp->shm_npages = numpages; |
shp | 126 | ipc/shm.c | shm_segs[id] = shp; |
shp | 130 | ipc/shm.c | return (unsigned int) shp->shm_perm.seq * SHMMNI + id; |
shp | 135 | ipc/shm.c | struct shmid_ds *shp; |
shp | 149 | ipc/shm.c | shp = shm_segs[id]; |
shp | 150 | ipc/shm.c | if (shp->shm_perm.mode & SHM_DEST) |
shp | 152 | ipc/shm.c | if (size > shp->shm_segsz) |
shp | 154 | ipc/shm.c | if (ipcperms (&shp->shm_perm, shmflg)) |
shp | 156 | ipc/shm.c | return (unsigned int) shp->shm_perm.seq * SHMMNI + id; |
shp | 165 | ipc/shm.c | struct shmid_ds *shp; |
shp | 168 | ipc/shm.c | shp = shm_segs[id]; |
shp | 169 | ipc/shm.c | if (shp == IPC_NOID || shp == IPC_UNUSED) { |
shp | 173 | ipc/shm.c | shp->shm_perm.seq++; /* for shmat */ |
shp | 179 | ipc/shm.c | if (!shp->shm_pages) { |
shp | 183 | ipc/shm.c | numpages = shp->shm_npages; |
shp | 186 | ipc/shm.c | pte_val(pte) = shp->shm_pages[i]; |
shp | 197 | ipc/shm.c | kfree(shp->shm_pages); |
shp | 199 | ipc/shm.c | kfree(shp); |
shp | 206 | ipc/shm.c | struct shmid_ds *shp; |
shp | 263 | ipc/shm.c | shp = shm_segs[shmid]; |
shp | 264 | ipc/shm.c | if (shp == IPC_UNUSED || shp == IPC_NOID) |
shp | 266 | ipc/shm.c | if (ipcperms (&shp->shm_perm, S_IRUGO)) |
shp | 268 | ipc/shm.c | id = (unsigned int) shp->shm_perm.seq * SHMMNI + shmid; |
shp | 269 | ipc/shm.c | tbuf.shm_perm = shp->shm_perm; |
shp | 270 | ipc/shm.c | tbuf.shm_segsz = shp->shm_segsz; |
shp | 271 | ipc/shm.c | tbuf.shm_atime = shp->shm_atime; |
shp | 272 | ipc/shm.c | tbuf.shm_dtime = shp->shm_dtime; |
shp | 273 | ipc/shm.c | tbuf.shm_ctime = shp->shm_ctime; |
shp | 274 | ipc/shm.c | tbuf.shm_cpid = shp->shm_cpid; |
shp | 275 | ipc/shm.c | tbuf.shm_lpid = shp->shm_lpid; |
shp | 276 | ipc/shm.c | tbuf.shm_nattch = shp->shm_nattch; |
shp | 281 | ipc/shm.c | shp = shm_segs[id = (unsigned int) shmid % SHMMNI]; |
shp | 282 | ipc/shm.c | if (shp == IPC_UNUSED || shp == IPC_NOID) |
shp | 284 | ipc/shm.c | if (shp->shm_perm.seq != (unsigned int) shmid / SHMMNI) |
shp | 286 | ipc/shm.c | ipcp = &shp->shm_perm; |
shp | 314 | ipc/shm.c | tbuf.shm_perm = shp->shm_perm; |
shp | 315 | ipc/shm.c | tbuf.shm_segsz = shp->shm_segsz; |
shp | 316 | ipc/shm.c | tbuf.shm_atime = shp->shm_atime; |
shp | 317 | ipc/shm.c | tbuf.shm_dtime = shp->shm_dtime; |
shp | 318 | ipc/shm.c | tbuf.shm_ctime = shp->shm_ctime; |
shp | 319 | ipc/shm.c | tbuf.shm_cpid = shp->shm_cpid; |
shp | 320 | ipc/shm.c | tbuf.shm_lpid = shp->shm_lpid; |
shp | 321 | ipc/shm.c | tbuf.shm_nattch = shp->shm_nattch; |
shp | 325 | ipc/shm.c | if (suser() || current->euid == shp->shm_perm.uid || |
shp | 326 | ipc/shm.c | current->euid == shp->shm_perm.cuid) { |
shp | 331 | ipc/shm.c | shp->shm_ctime = CURRENT_TIME; |
shp | 336 | ipc/shm.c | if (suser() || current->euid == shp->shm_perm.uid || |
shp | 337 | ipc/shm.c | current->euid == shp->shm_perm.cuid) { |
shp | 338 | ipc/shm.c | shp->shm_perm.mode |= SHM_DEST; |
shp | 339 | ipc/shm.c | if (shp->shm_nattch <= 0) |
shp | 377 | ipc/shm.c | static inline void insert_attach (struct shmid_ds * shp, struct vm_area_struct * shmd) |
shp | 381 | ipc/shm.c | if ((attaches = shp->attaches)) { |
shp | 387 | ipc/shm.c | shp->attaches = shmd->vm_next_share = shmd->vm_prev_share = shmd; |
shp | 391 | ipc/shm.c | static inline void remove_attach (struct shmid_ds * shp, struct vm_area_struct * shmd) |
shp | 394 | ipc/shm.c | if (shp->attaches != shmd) { |
shp | 405 | ipc/shm.c | shp->attaches = NULL; |
shp | 407 | ipc/shm.c | if (shp->attaches == shmd) |
shp | 408 | ipc/shm.c | shp->attaches = shmd->vm_next_share; |
shp | 458 | ipc/shm.c | struct shmid_ds *shp; |
shp | 469 | ipc/shm.c | shp = shm_segs[id = (unsigned int) shmid % SHMMNI]; |
shp | 470 | ipc/shm.c | if (shp == IPC_UNUSED || shp == IPC_NOID) { |
shp | 478 | ipc/shm.c | if (!(addr = get_unmapped_area(0, shp->shm_segsz))) |
shp | 491 | ipc/shm.c | addr > current->mm->start_stack - PAGE_SIZE*(shp->shm_npages + 4)) |
shp | 497 | ipc/shm.c | if ((shmd = find_vma_intersection(current, addr, addr + shp->shm_segsz))) { |
shp | 503 | ipc/shm.c | if (ipcperms(&shp->shm_perm, shmflg & SHM_RDONLY ? S_IRUGO : S_IRUGO|S_IWUGO)) |
shp | 505 | ipc/shm.c | if (shp->shm_perm.seq != (unsigned int) shmid / SHMMNI) |
shp | 511 | ipc/shm.c | if ((shp != shm_segs[id]) || (shp->shm_perm.seq != (unsigned int) shmid / SHMMNI)) { |
shp | 518 | ipc/shm.c | shmd->vm_end = addr + shp->shm_npages * PAGE_SIZE; |
shp | 529 | ipc/shm.c | shp->shm_nattch++; /* prevent destruction */ |
shp | 531 | ipc/shm.c | if (--shp->shm_nattch <= 0 && shp->shm_perm.mode & SHM_DEST) |
shp | 537 | ipc/shm.c | insert_attach(shp,shmd); /* insert shmd into shp->attaches */ |
shp | 539 | ipc/shm.c | shp->shm_lpid = current->pid; |
shp | 540 | ipc/shm.c | shp->shm_atime = CURRENT_TIME; |
shp | 550 | ipc/shm.c | struct shmid_ds *shp; |
shp | 553 | ipc/shm.c | shp = shm_segs[id]; |
shp | 554 | ipc/shm.c | if (shp == IPC_UNUSED) { |
shp | 558 | ipc/shm.c | insert_attach(shp,shmd); /* insert shmd into shp->attaches */ |
shp | 559 | ipc/shm.c | shp->shm_nattch++; |
shp | 560 | ipc/shm.c | shp->shm_atime = CURRENT_TIME; |
shp | 561 | ipc/shm.c | shp->shm_lpid = current->pid; |
shp | 572 | ipc/shm.c | struct shmid_ds *shp; |
shp | 577 | ipc/shm.c | shp = shm_segs[id]; |
shp | 578 | ipc/shm.c | remove_attach(shp,shmd); /* remove from shp->attaches */ |
shp | 579 | ipc/shm.c | shp->shm_lpid = current->pid; |
shp | 580 | ipc/shm.c | shp->shm_dtime = CURRENT_TIME; |
shp | 581 | ipc/shm.c | if (--shp->shm_nattch <= 0 && shp->shm_perm.mode & SHM_DEST) |
shp | 608 | ipc/shm.c | struct shmid_ds *shp; |
shp | 621 | ipc/shm.c | shp = shm_segs[id]; |
shp | 622 | ipc/shm.c | if (shp == IPC_UNUSED || shp == IPC_NOID) { |
shp | 632 | ipc/shm.c | if (idx >= shp->shm_npages) { |
shp | 637 | ipc/shm.c | pte_val(pte) = shp->shm_pages[idx]; |
shp | 644 | ipc/shm.c | pte_val(pte) = shp->shm_pages[idx]; |
shp | 651 | ipc/shm.c | pte_val(pte) = shp->shm_pages[idx]; |
shp | 661 | ipc/shm.c | shp->shm_pages[idx] = pte_val(pte); |
shp | 680 | ipc/shm.c | struct shmid_ds *shp; |
shp | 692 | ipc/shm.c | shp = shm_segs[swap_id]; |
shp | 693 | ipc/shm.c | if (shp == IPC_UNUSED || shp == IPC_NOID || shp->shm_perm.mode & SHM_LOCKED ) { |
shp | 708 | ipc/shm.c | if (idx >= shp->shm_npages) |
shp | 711 | ipc/shm.c | pte_val(page) = shp->shm_pages[idx]; |
shp | 723 | ipc/shm.c | if (shp->attaches) |
shp | 724 | ipc/shm.c | for (shmd = shp->attaches; ; ) { |
shp | 771 | ipc/shm.c | if ((shmd = shmd->vm_next_share) == shp->attaches) |
shp | 777 | ipc/shm.c | shp->shm_pages[idx] = swap_nr; |