Lines Matching full:sh
177 static int fdomain_select(struct Scsi_Host *sh, int target) in fdomain_select() argument
181 struct fdomain *fd = shost_priv(sh); in fdomain_select()
184 outb(BIT(sh->this_id) | BIT(target), fd->base + REG_SCSI_DATA_NOACK); in fdomain_select()
263 struct Scsi_Host *sh = container_of((void *)fd, struct Scsi_Host, in fdomain_work() local
270 spin_lock_irqsave(sh->host_lock, flags); in fdomain_work()
377 spin_unlock_irqrestore(sh->host_lock, flags); in fdomain_work()
399 static int fdomain_queue(struct Scsi_Host *sh, struct scsi_cmnd *cmd) in fdomain_queue() argument
411 spin_lock_irqsave(sh->host_lock, flags); in fdomain_queue()
426 spin_unlock_irqrestore(sh->host_lock, flags); in fdomain_queue()
433 struct Scsi_Host *sh = cmd->device->host; in fdomain_abort() local
434 struct fdomain *fd = shost_priv(sh); in fdomain_abort()
440 spin_lock_irqsave(sh->host_lock, flags); in fdomain_abort()
448 spin_unlock_irqrestore(sh->host_lock, flags); in fdomain_abort()
454 struct Scsi_Host *sh = cmd->device->host; in fdomain_host_reset() local
455 struct fdomain *fd = shost_priv(sh); in fdomain_host_reset()
458 spin_lock_irqsave(sh->host_lock, flags); in fdomain_host_reset()
460 spin_unlock_irqrestore(sh->host_lock, flags); in fdomain_host_reset()
509 struct Scsi_Host *sh; in fdomain_create() local
531 sh = scsi_host_alloc(&fdomain_template, sizeof(struct fdomain)); in fdomain_create()
532 if (!sh) in fdomain_create()
536 sh->this_id = this_id & 0x07; in fdomain_create()
538 sh->irq = irq; in fdomain_create()
539 sh->io_port = base; in fdomain_create()
540 sh->n_io_port = FDOMAIN_REGION_SIZE; in fdomain_create()
542 fd = shost_priv(sh); in fdomain_create()
553 shost_printk(KERN_INFO, sh, "%s chip at 0x%x irq %d SCSI ID %d\n", in fdomain_create()
555 base, irq, sh->this_id); in fdomain_create()
557 if (scsi_add_host(sh, dev)) in fdomain_create()
560 scsi_scan_host(sh); in fdomain_create()
562 return sh; in fdomain_create()
567 scsi_host_put(sh); in fdomain_create()
572 int fdomain_destroy(struct Scsi_Host *sh) in fdomain_destroy() argument
574 struct fdomain *fd = shost_priv(sh); in fdomain_destroy()
577 scsi_remove_host(sh); in fdomain_destroy()
578 if (sh->irq) in fdomain_destroy()
579 free_irq(sh->irq, fd); in fdomain_destroy()
580 scsi_host_put(sh); in fdomain_destroy()