/* Called before unloading the module. Detach the host. We have to free resources and halt the NCR chip.  */
static int sym_detach(struct Scsi_Host *shost, struct pci_dev *pdev)
/* Called before unloading the module. Detach the host. We have to free resources and halt the NCR chip.  */
static int sym_detach(struct Scsi_Host *shost, struct pci_dev *pdev)
{
	struct sym_hcb *np = sym_get_hcb(shost);
	printk("%s: detaching ...\n", sym_name(np));
	del_timer_sync(&np->s.timer);
	printk("%s: resetting chip\n", sym_name(np));
	OUTB(np, nc_istat, SRST);
	INB(np, nc_mbox1);
	udelay(10);
	OUTB(np, nc_istat, 0);
	sym_free_resources(np, pdev, 1);
	scsi_host_put(shost);
	return 1;
}