Lines Matching refs:sh

182 static int fdomain_select(struct Scsi_Host *sh, int target)  in fdomain_select()  argument
186 struct fdomain *fd = shost_priv(sh); in fdomain_select()
189 outb(BIT(sh->this_id) | BIT(target), fd->base + REG_SCSI_DATA_NOACK); in fdomain_select()
268 struct Scsi_Host *sh = container_of((void *)fd, struct Scsi_Host, in fdomain_work() local
276 spin_lock_irqsave(sh->host_lock, flags); in fdomain_work()
383 spin_unlock_irqrestore(sh->host_lock, flags); in fdomain_work()
405 static int fdomain_queue(struct Scsi_Host *sh, struct scsi_cmnd *cmd) in fdomain_queue() argument
418 spin_lock_irqsave(sh->host_lock, flags); in fdomain_queue()
433 spin_unlock_irqrestore(sh->host_lock, flags); in fdomain_queue()
440 struct Scsi_Host *sh = cmd->device->host; in fdomain_abort() local
441 struct fdomain *fd = shost_priv(sh); in fdomain_abort()
447 spin_lock_irqsave(sh->host_lock, flags); in fdomain_abort()
455 spin_unlock_irqrestore(sh->host_lock, flags); in fdomain_abort()
461 struct Scsi_Host *sh = cmd->device->host; in fdomain_host_reset() local
462 struct fdomain *fd = shost_priv(sh); in fdomain_host_reset()
465 spin_lock_irqsave(sh->host_lock, flags); in fdomain_host_reset()
467 spin_unlock_irqrestore(sh->host_lock, flags); in fdomain_host_reset()
517 struct Scsi_Host *sh; in fdomain_create() local
539 sh = scsi_host_alloc(&fdomain_template, sizeof(struct fdomain)); in fdomain_create()
540 if (!sh) in fdomain_create()
544 sh->this_id = this_id & 0x07; in fdomain_create()
546 sh->irq = irq; in fdomain_create()
547 sh->io_port = base; in fdomain_create()
548 sh->n_io_port = FDOMAIN_REGION_SIZE; in fdomain_create()
550 fd = shost_priv(sh); in fdomain_create()
561 shost_printk(KERN_INFO, sh, "%s chip at 0x%x irq %d SCSI ID %d\n", in fdomain_create()
563 base, irq, sh->this_id); in fdomain_create()
565 if (scsi_add_host(sh, dev)) in fdomain_create()
568 scsi_scan_host(sh); in fdomain_create()
570 return sh; in fdomain_create()
575 scsi_host_put(sh); in fdomain_create()
580 int fdomain_destroy(struct Scsi_Host *sh) in fdomain_destroy() argument
582 struct fdomain *fd = shost_priv(sh); in fdomain_destroy()
585 scsi_remove_host(sh); in fdomain_destroy()
586 if (sh->irq) in fdomain_destroy()
587 free_irq(sh->irq, fd); in fdomain_destroy()
588 scsi_host_put(sh); in fdomain_destroy()