Example #1
0
static void __devexit
NCR_D700_remove_one(struct Scsi_Host *host)
{
	scsi_remove_host(host);
	NCR_700_release(host);
	kfree((struct NCR_700_Host_Parameters *)host->hostdata[0]);
	free_irq(host->irq, host);
	release_region(host->base, 64);
}
Example #2
0
static int __init
lasi700_driver_callback(struct parisc_device *dev)
{
	unsigned long base = dev->hpa + LASI_SCSI_CORE_OFFSET;
	int irq = busdevice_alloc_irq(dev);
	char *driver_name;
	struct Scsi_Host *host;
	struct NCR_700_Host_Parameters *hostdata =
		kmalloc(sizeof(struct NCR_700_Host_Parameters),
			GFP_KERNEL);
	if(dev->id.sversion == LASI_700_SVERSION) {
		driver_name = "lasi700";
	} else {
		driver_name = "lasi710";
	}
	if(hostdata == NULL) {
		printk(KERN_ERR "%s: Failed to allocate host data\n",
		       driver_name);
		return 1;
	}
	memset(hostdata, 0, sizeof(struct NCR_700_Host_Parameters));
	if(request_mem_region(base, 64, driver_name) == NULL) {
		printk(KERN_ERR "%s: Failed to claim memory region\n",
		       driver_name);
		kfree(hostdata);
		return 1;
	}
	hostdata->base = base;
	hostdata->differential = 0;
	if(dev->id.sversion == LASI_700_SVERSION) {
		hostdata->clock = LASI700_CLOCK;
		hostdata->force_le_on_be = 1;
	} else {
		hostdata->clock = LASI710_CLOCK;
		hostdata->force_le_on_be = 0;
		hostdata->chip710 = 1;
		hostdata->dmode_extra = DMODE_FC2;
	}
	if((host = NCR_700_detect(host_tpnt, hostdata)) == NULL) {
		kfree(hostdata);
		release_mem_region(host->base, 64);
		return 1;
	}
	host->irq = irq;
	if(request_irq(irq, NCR_700_intr, SA_SHIRQ, driver_name, host)) {
		printk(KERN_ERR "%s: irq problem, detatching\n",
		       driver_name);
		scsi_unregister(host);
		NCR_700_release(host);
		return 1;
	}
	host_count++;
	return 0;
}
Example #3
0
static __devexit void zorro7xx_remove_one(struct zorro_dev *z)
{
	struct Scsi_Host *host = zorro_get_drvdata(z);
	struct NCR_700_Host_Parameters *hostdata = shost_priv(host);

	scsi_remove_host(host);

	NCR_700_release(host);
	kfree(hostdata);
	free_irq(host->irq, host);
	zorro_release_device(z);
}
Example #4
0
static int
lasi700_release(struct Scsi_Host *host)
{
	struct D700_Host_Parameters *hostdata = 
		(struct D700_Host_Parameters *)host->hostdata[0];

	NCR_700_release(host);
	kfree(hostdata);
	free_irq(host->irq, host);
	release_mem_region(host->base, 64);
	return 1;
}
Example #5
0
static __devexit int
bvme6000_device_remove(struct platform_device *dev)
{
	struct Scsi_Host *host = platform_get_drvdata(dev);
	struct NCR_700_Host_Parameters *hostdata = shost_priv(host);

	scsi_remove_host(host);
	NCR_700_release(host);
	kfree(hostdata);
	free_irq(host->irq, host);

	return 0;
}
Example #6
0
static __devexit int a4000t_device_remove(struct device *dev)
{
	struct Scsi_Host *host = dev_get_drvdata(dev);
	struct NCR_700_Host_Parameters *hostdata = shost_priv(host);

	scsi_remove_host(host);

	NCR_700_release(host);
	kfree(hostdata);
	free_irq(host->irq, host);
	release_mem_region(A4000T_SCSI_ADDR, 0x1000);

	return 0;
}
Example #7
0
static int __exit
lasi700_driver_remove(struct parisc_device *dev)
{
	struct Scsi_Host *host = dev_get_drvdata(&dev->dev);
	struct NCR_700_Host_Parameters *hostdata = 
		(struct NCR_700_Host_Parameters *)host->hostdata[0];

	scsi_remove_host(host);
	NCR_700_release(host);
	free_irq(host->irq, host);
	kfree(hostdata);

	return 0;
}
static int __exit snirm710_driver_remove(struct platform_device *dev)
{
	struct Scsi_Host *host = dev_get_drvdata(&dev->dev);
	struct NCR_700_Host_Parameters *hostdata =
		(struct NCR_700_Host_Parameters *)host->hostdata[0];

	scsi_remove_host(host);
	NCR_700_release(host);
	free_irq(host->irq, host);
	iounmap(hostdata->base);
	kfree(hostdata);

	return 0;
}
Example #9
0
static __devexit int
sim710_device_remove(struct device *dev)
{
	struct Scsi_Host *host = dev_get_drvdata(dev);
	struct NCR_700_Host_Parameters *hostdata =
		(struct NCR_700_Host_Parameters *)host->hostdata[0];

	scsi_remove_host(host);
	NCR_700_release(host);
	kfree(hostdata);
	free_irq(host->irq, host);
	release_region(host->base, 64);
	return 0;
}
Example #10
0
static int mvme16x_device_remove(struct platform_device *dev)
{
	struct Scsi_Host *host = platform_get_drvdata(dev);
	struct NCR_700_Host_Parameters *hostdata = shost_priv(host);

	/* Disable scsi chip ints */
	{
		volatile unsigned long v;

		v = in_be32(0xfff4202c);
		v &= ~0x10;
		out_be32(0xfff4202c, v);
	}
	scsi_remove_host(host);
	NCR_700_release(host);
	kfree(hostdata);
	free_irq(host->irq, host);

	return 0;
}