Beispiel #1
0
static void __devexit fcpcipnp_remove(struct pci_dev *pdev)
{
	struct fritz_adapter *adapter = pci_get_drvdata(pdev);

	fcpcipnp_release(adapter);
	delete_adapter(adapter);
}
Beispiel #2
0
static int __devinit fcpci_probe(struct pci_dev *pdev,
				 const struct pci_device_id *ent)
{
	struct fritz_adapter *adapter;
	int retval;

	printk(KERN_INFO "hisax_fcpcipnp: found adapter %s at %s\n",
	       (char *) ent->driver_data, pdev->slot_name);

	retval = -ENOMEM;
	adapter = new_adapter(pdev);
	if (!adapter)
		goto err;

	if (pdev->device == 0x0e00) 
		adapter->type = AVM_FRITZ_PCIV2;
	else
		adapter->type = AVM_FRITZ_PCI;

	retval = pci_enable_device(pdev);
	if (retval)
		goto err_free;
	adapter->io = pci_resource_start(pdev, 1);

	retval = fcpcipnp_setup(adapter);
	if (retval)
		goto err_free;

	return 0;
	
 err_free:
	delete_adapter(adapter);
 err:
	return retval;
}
Beispiel #3
0
static int __devinit fcpnp_probe(struct pci_dev *pdev,
				 const struct isapnp_device_id *ent)
{
	struct fritz_adapter *adapter;
	int retval;

	printk(KERN_INFO "hisax_fcpcipnp: found adapter %s\n",
	       (char *) ent->driver_data);

	retval = -ENOMEM;
	adapter = new_adapter(pdev);
	if (!adapter)
		goto err;

	adapter->type = AVM_FRITZ_PNP;

	pdev->prepare(pdev);
	pdev->deactivate(pdev); // why?
	pdev->activate(pdev);
	adapter->io = pdev->resource[0].start;
	pdev->irq = pdev->irq_resource[0].start;
	
	retval = fcpcipnp_setup(adapter);
	if (retval)
		goto err_free;

	return 0;
	
 err_free:
	delete_adapter(adapter);
 err:
	return retval;
}
Beispiel #4
0
static void fcpci_remove(struct pci_dev *pdev)
{
	struct fritz_adapter *adapter = pci_get_drvdata(pdev);

	fcpcipnp_release(adapter);
	pci_disable_device(pdev);
	delete_adapter(adapter);
}
static void __devexit fcpnp_remove(struct pnp_dev *pdev)
{
	struct fritz_adapter *adapter = pnp_get_drvdata(pdev);

	if (adapter) {
		fcpcipnp_release(adapter);
		delete_adapter(adapter);
	}
	pnp_disable_dev(pdev);
}
Beispiel #6
0
KPROXY_API void kproxy_uninit()
{
	uninit_blklib();
	uninit_network();
	
	if(proxy_adapter){
		on_offline(0, 0);
		delete_adapter(proxy_adapter);
		proxy_adapter = 0;
	}
	if(x_buffer){
		__free__(x_buffer);
		x_buffer = 0;
	}
	
	ex_uninit();
}
static int __devinit fcpnp_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id)
{
	struct fritz_adapter *adapter;
	int retval;

	if (!pdev)
		return(-ENODEV);

	retval = -ENOMEM;
	adapter = new_adapter();
	if (!adapter)
		goto err;

	pnp_set_drvdata(pdev, adapter);

	adapter->type = AVM_FRITZ_PNP;

	pnp_disable_dev(pdev);
	retval = pnp_activate_dev(pdev);
	if (retval < 0) {
		printk(KERN_WARNING "%s: pnp_activate_dev(%s) ret(%d)\n", __func__,
			(char *)dev_id->driver_data, retval);
		goto err_free;
	}
	adapter->io = pnp_port_start(pdev, 0);
	adapter->irq = pnp_irq(pdev, 0);

	printk(KERN_INFO "hisax_fcpcipnp: found adapter %s at IO %#x irq %d\n",
	       (char *) dev_id->driver_data, adapter->io, adapter->irq);

	retval = fcpcipnp_setup(adapter);
	if (retval)
		goto err_free;

	return 0;
	
 err_free:
	delete_adapter(adapter);
 err:
	return retval;
}
Beispiel #8
0
static int fcpci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
	struct fritz_adapter *adapter;
	int retval;

	retval = -ENOMEM;
	adapter = new_adapter();
	if (!adapter)
		goto err;

	pci_set_drvdata(pdev, adapter);

	if (pdev->device == PCI_DEVICE_ID_AVM_A1_V2)
		adapter->type = AVM_FRITZ_PCIV2;
	else
		adapter->type = AVM_FRITZ_PCI;

	retval = pci_enable_device(pdev);
	if (retval)
		goto err_free;

	adapter->io = pci_resource_start(pdev, 1);
	adapter->irq = pdev->irq;

	printk(KERN_INFO "hisax_fcpcipnp: found adapter %s at %s\n",
	       (char *) ent->driver_data, pci_name(pdev));

	retval = fcpcipnp_setup(adapter);
	if (retval)
		goto err_free;

	return 0;

err_free:
	delete_adapter(adapter);
err:
	return retval;
}