• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ scsi_host_put函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中scsi_host_put函数的典型用法代码示例。如果您正苦于以下问题:C++ scsi_host_put函数的具体用法?C++ scsi_host_put怎么用?C++ scsi_host_put使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了scsi_host_put函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: mac_scsi_remove

static int __exit mac_scsi_remove(struct platform_device *pdev)
{
	struct Scsi_Host *instance = platform_get_drvdata(pdev);

	scsi_remove_host(instance);
	if (instance->irq != NO_IRQ)
		free_irq(instance->irq, instance);
	NCR5380_exit(instance);
	scsi_host_put(instance);
	return 0;
}
开发者ID:valexandersaulys,项目名称:linux,代码行数:11,代码来源:mac_scsi.c


示例2: oakscsi_remove

static void __devexit oakscsi_remove(struct expansion_card *ec)
{
	struct Scsi_Host *host = ecard_get_drvdata(ec);

	ecard_set_drvdata(ec, NULL);
	scsi_remove_host(host);

	NCR5380_exit(host);
	iounmap(priv(host)->base);
	scsi_host_put(host);
	ecard_release_resources(ec);
}
开发者ID:119-org,项目名称:hi3518-osdrv,代码行数:12,代码来源:oak.c


示例3: cumanascsi1_remove

static void __devexit cumanascsi1_remove(struct expansion_card *ec)
{
	struct Scsi_Host *host = ecard_get_drvdata(ec);

	ecard_set_drvdata(ec, NULL);

	scsi_remove_host(host);
	free_irq(host->irq, host);
	NCR5380_exit(host);
	release_region(host->io_port, host->n_io_port);
	scsi_host_put(host);
}
开发者ID:Antonio-Zhou,项目名称:Linux-2.6.11,代码行数:12,代码来源:cumana_1.c


示例4: tcm_loop_driver_remove

static int tcm_loop_driver_remove(struct device *dev)
{
    struct tcm_loop_hba *tl_hba;
    struct Scsi_Host *sh;

    tl_hba = to_tcm_loop_hba(dev);
    sh = tl_hba->sh;

    scsi_remove_host(sh);
    scsi_host_put(sh);
    return 0;
}
开发者ID:JackWangCUMT,项目名称:linux,代码行数:12,代码来源:tcm_loop.c


示例5: oakscsi_probe

static int __devinit
oakscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
{
	struct Scsi_Host *host;
	int ret = -ENOMEM;

	ret = ecard_request_resources(ec);
	if (ret)
		goto out;

	host = scsi_host_alloc(&oakscsi_template, sizeof(struct NCR5380_hostdata));
	if (!host) {
		ret = -ENOMEM;
		goto release;
	}

	priv(host)->base = ioremap(ecard_resource_start(ec, ECARD_RES_MEMC),
				   ecard_resource_len(ec, ECARD_RES_MEMC));
	if (!priv(host)->base) {
		ret = -ENOMEM;
		goto unreg;
	}

	host->irq = IRQ_NONE;
	host->n_io_port = 255;

	NCR5380_init(host, 0);

	printk("scsi%d: at port 0x%08lx irqs disabled",
		host->host_no, host->io_port);
	printk(" options CAN_QUEUE=%d  CMD_PER_LUN=%d release=%d",
		host->can_queue, host->cmd_per_lun, OAKSCSI_PUBLIC_RELEASE);
	printk("\nscsi%d:", host->host_no);
	NCR5380_print_options(host);
	printk("\n");

	ret = scsi_add_host(host, &ec->dev);
	if (ret)
		goto out_unmap;

	scsi_scan_host(host);
	goto out;

 out_unmap:
	iounmap(priv(host)->base);
 unreg:
	scsi_host_put(host);
 release:
	ecard_release_resources(ec);
 out:
	return ret;
}
开发者ID:119-org,项目名称:hi3518-osdrv,代码行数:52,代码来源:oak.c


示例6: snirm710_probe

static int __init snirm710_probe(struct platform_device *dev)
{
	unsigned long base;
	struct NCR_700_Host_Parameters *hostdata;
	struct Scsi_Host *host;
	struct  resource *res;

	res = platform_get_resource(dev, IORESOURCE_MEM, 0);
	if (!res)
		return -ENODEV;

	base = res->start;
	hostdata = kzalloc(sizeof(*hostdata), GFP_KERNEL);
	if (!hostdata) {
		printk(KERN_ERR "%s: Failed to allocate host data\n",
		       dev->dev.bus_id);
		return -ENOMEM;
	}

	hostdata->dev = &dev->dev;
	dma_set_mask(&dev->dev, DMA_32BIT_MASK);
	hostdata->base = ioremap_nocache(CPHYSADDR(base), 0x100);
	hostdata->differential = 0;

	hostdata->clock = SNIRM710_CLOCK;
	hostdata->force_le_on_be = 1;
	hostdata->chip710 = 1;
	hostdata->burst_length = 4;

	host = NCR_700_detect(&snirm710_template, hostdata, &dev->dev);
	if (!host)
		goto out_kfree;
	host->this_id = 7;
	host->base = base;
	host->irq = platform_get_irq(dev, 0);
	if(request_irq(host->irq, NCR_700_intr, SA_SHIRQ, "snirm710", host)) {
		printk(KERN_ERR "snirm710: request_irq failed!\n");
		goto out_put_host;
	}

	dev_set_drvdata(&dev->dev, host);
	scsi_scan_host(host);

	return 0;

 out_put_host:
	scsi_host_put(host);
 out_kfree:
	iounmap(hostdata->base);
	kfree(hostdata);
	return -ENODEV;
}
开发者ID:StephenMacras,项目名称:dsl-n55u-bender,代码行数:52,代码来源:sni_53c710.c


示例7: qlogic_release

static void qlogic_release(struct pcmcia_device *link)
{
	scsi_info_t *info = link->priv;

	DEBUG(0, "qlogic_release(0x%p)\n", link);

	scsi_remove_host(info->host);

	free_irq(link->irq.AssignedIRQ, info->host);
	pcmcia_disable_device(link);

	scsi_host_put(info->host);
}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:13,代码来源:qlogic_stub.c


示例8: qlogic_release

static void qlogic_release(struct pcmcia_device *link)
{
	scsi_info_t *info = link->priv;

	dev_dbg(&link->dev, "qlogic_release\n");

	scsi_remove_host(info->host);

	free_irq(link->irq, info->host);
	pcmcia_disable_device(link);

	scsi_host_put(info->host);
}
开发者ID:austriancoder,项目名称:linux,代码行数:13,代码来源:qlogic_stub.c


示例9: dmx3191d_remove_one

static void dmx3191d_remove_one(struct pci_dev *pdev)
{
	struct Scsi_Host *shost = pci_get_drvdata(pdev);
	struct NCR5380_hostdata *hostdata = shost_priv(shost);
	unsigned long io = hostdata->base;

	scsi_remove_host(shost);

	NCR5380_exit(shost);
	scsi_host_put(shost);
	release_region(io, DMX3191D_REGION_LEN);
	pci_disable_device(pdev);
}
开发者ID:Announcement,项目名称:linux,代码行数:13,代码来源:dmx3191d.c


示例10: amiga_a3000_scsi_remove

static int __exit amiga_a3000_scsi_remove(struct platform_device *pdev)
{
	struct Scsi_Host *instance = platform_get_drvdata(pdev);
	struct a3000_hostdata *hdata = shost_priv(instance);
	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);

	hdata->regs->CNTR = 0;
	scsi_remove_host(instance);
	free_irq(IRQ_AMIGA_PORTS, instance);
	scsi_host_put(instance);
	release_mem_region(res->start, resource_size(res));
	return 0;
}
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:13,代码来源:a3000.c


示例11: pvscsi_remove

static void pvscsi_remove(struct pci_dev *pdev)
{
	struct Scsi_Host *host = pci_get_drvdata(pdev);
	struct pvscsi_adapter *adapter = shost_priv(host);

	scsi_remove_host(host);

	__pvscsi_shutdown(adapter);
	pvscsi_release_resources(adapter);

	scsi_host_put(host);

	pci_disable_device(pdev);
}
开发者ID:19Dan01,项目名称:linux,代码行数:14,代码来源:vmw_pvscsi.c


示例12: cumanascsi1_remove

static void cumanascsi1_remove(struct expansion_card *ec)
{
	struct Scsi_Host *host = ecard_get_drvdata(ec);

	ecard_set_drvdata(ec, NULL);

	scsi_remove_host(host);
	free_irq(host->irq, host);
	NCR5380_exit(host);
	iounmap(priv(host)->base);
	iounmap(priv(host)->dma);
	scsi_host_put(host);
	ecard_release_resources(ec);
}
开发者ID:AdrianHuang,项目名称:linux-3.8.13,代码行数:14,代码来源:cumana_1.c


示例13: mts_usb_disconnect

static void mts_usb_disconnect (struct usb_interface *intf)
{
	struct mts_desc *desc = usb_get_intfdata(intf);

	usb_set_intfdata(intf, NULL);

	usb_kill_urb(desc->urb);
	scsi_remove_host(desc->host);

	scsi_host_put(desc->host);
	usb_free_urb(desc->urb);
	kfree(desc->context.scsi_status);
	kfree(desc);
}
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:14,代码来源:microtek.c


示例14: isci_unregister

static void isci_unregister(struct isci_host *isci_host)
{
	struct Scsi_Host *shost;

	if (!isci_host)
		return;

	shost = to_shost(isci_host);
	scsi_remove_host(shost);
	sas_unregister_ha(&isci_host->sas_ha);

	sas_remove_host(shost);
	scsi_host_put(shost);
}
开发者ID:020gzh,项目名称:linux,代码行数:14,代码来源:init.c


示例15: oakscsi_probe

static int oakscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
{
	struct Scsi_Host *host;
	int ret = -ENOMEM;

	ret = ecard_request_resources(ec);
	if (ret)
		goto out;

	host = scsi_host_alloc(&oakscsi_template, sizeof(struct NCR5380_hostdata));
	if (!host) {
		ret = -ENOMEM;
		goto release;
	}

	priv(host)->base = ioremap(ecard_resource_start(ec, ECARD_RES_MEMC),
				   ecard_resource_len(ec, ECARD_RES_MEMC));
	if (!priv(host)->base) {
		ret = -ENOMEM;
		goto unreg;
	}

	host->irq = NO_IRQ;
	host->n_io_port = 255;

	ret = NCR5380_init(host, 0);
	if (ret)
		goto out_unmap;

	NCR5380_maybe_reset_bus(host);

	ret = scsi_add_host(host, &ec->dev);
	if (ret)
		goto out_exit;

	scsi_scan_host(host);
	goto out;

 out_exit:
	NCR5380_exit(host);
 out_unmap:
	iounmap(priv(host)->base);
 unreg:
	scsi_host_put(host);
 release:
	ecard_release_resources(ec);
 out:
	return ret;
}
开发者ID:020gzh,项目名称:linux,代码行数:49,代码来源:oak.c


示例16: dmx3191d_remove_one

static void __devexit dmx3191d_remove_one(struct pci_dev *pdev)
{
    struct Scsi_Host *shost = pci_get_drvdata(pdev);

    scsi_remove_host(shost);

    NCR5380_exit(shost);

    if (shost->irq != SCSI_IRQ_NONE)
        free_irq(shost->irq, shost);
    release_region(shost->io_port, DMX3191D_REGION_LEN);
    pci_disable_device(pdev);

    scsi_host_put(shost);
}
开发者ID:274914765,项目名称:C,代码行数:15,代码来源:dmx3191d.c


示例17: qlogicfas_release

static int qlogicfas_release(struct Scsi_Host *shost)
{
	struct qlogicfas408_priv *priv = get_priv_by_host(shost);

	scsi_remove_host(shost);
	if (shost->irq) {
		qlogicfas408_disable_ints(priv);	
		free_irq(shost->irq, shost);
	}
	if (shost->io_port && shost->n_io_port)
		release_region(shost->io_port, shost->n_io_port);
	scsi_host_put(shost);

	return 0;
}
开发者ID:Lyude,项目名称:linux,代码行数:15,代码来源:qlogicfas.c


示例18: scsi_add_single_device

static int scsi_add_single_device(uint host, uint channel, uint id, uint lun)
{
    struct Scsi_Host *shost;
    int error = -ENXIO;

    shost = scsi_host_lookup(host);
    if (IS_ERR(shost))
        return PTR_ERR(shost);

    if (shost->transportt->user_scan)
        error = shost->transportt->user_scan(shost, channel, id, lun);
    else
        error = scsi_scan_host_selected(shost, channel, id, lun, 1);
    scsi_host_put(shost);
    return error;
}
开发者ID:sserg31,项目名称:sca3_main,代码行数:16,代码来源:scsi_proc.c


示例19: esp_jazz_remove

static int __devexit esp_jazz_remove(struct platform_device *dev)
{
	struct esp *esp = dev_get_drvdata(&dev->dev);
	unsigned int irq = esp->host->irq;

	scsi_esp_unregister(esp);

	free_irq(irq, esp);
	dma_free_coherent(esp->dev, 16,
			  esp->command_block,
			  esp->command_block_dma);

	scsi_host_put(esp->host);

	return 0;
}
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:16,代码来源:jazz_esp.c


示例20: inia100_remove_one

static void __devexit inia100_remove_one(struct pci_dev *pdev)
{
    struct Scsi_Host *shost = pci_get_drvdata(pdev);
    ORC_HCS *pHCB = (ORC_HCS *)shost->hostdata;

    scsi_remove_host(shost);

    free_irq(shost->irq, shost);
    pci_free_consistent(pdev, ORC_MAXQUEUE * sizeof(ESCB),
                        pHCB->HCS_virEscbArray, pHCB->HCS_physEscbArray);
    pci_free_consistent(pdev, ORC_MAXQUEUE * sizeof(ORC_SCB),
                        pHCB->HCS_virScbArray, pHCB->HCS_physScbArray);
    release_region(shost->io_port, 256);

    scsi_host_put(shost);
}
开发者ID:iPodLinux,项目名称:linux-2.6.7-ipod,代码行数:16,代码来源:inia100.c



注:本文中的scsi_host_put函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ scsi_remove_host函数代码示例发布时间:2022-05-30
下一篇:
C++ scsi_host_alloc函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap