本文整理汇总了C++中scsi_remove_host函数的典型用法代码示例。如果您正苦于以下问题:C++ scsi_remove_host函数的具体用法?C++ scsi_remove_host怎么用?C++ scsi_remove_host使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了scsi_remove_host函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: quiesce_and_remove_host
/* First stage of disconnect processing: stop all commands and remove
* the host */
static void quiesce_and_remove_host(struct rtsx_dev *dev)
{
struct Scsi_Host *host = rtsx_to_host(dev);
struct rtsx_chip *chip = dev->chip;
/* Prevent new transfers, stop the current command, and
* interrupt a SCSI-scan or device-reset delay */
mutex_lock(&dev->dev_mutex);
scsi_lock(host);
rtsx_set_stat(chip, RTSX_STAT_DISCONNECT);
scsi_unlock(host);
mutex_unlock(&dev->dev_mutex);
wake_up(&dev->delay_wait);
wait_for_completion(&dev->scanning_done);
/* Wait some time to let other threads exist */
wait_timeout(100);
/* queuecommand won't accept any new commands and the control
* thread won't execute a previously-queued command. If there
* is such a command pending, complete it with an error. */
mutex_lock(&dev->dev_mutex);
if (chip->srb) {
chip->srb->result = DID_NO_CONNECT << 16;
scsi_lock(host);
chip->srb->scsi_done(dev->chip->srb);
chip->srb = NULL;
scsi_unlock(host);
}
mutex_unlock(&dev->dev_mutex);
/* Now we own no commands so it's safe to remove the SCSI host */
scsi_remove_host(host);
}
开发者ID:alisheikh,项目名称:ktsan,代码行数:36,代码来源:rtsx.c
示例2: quiesce_and_remove_host
static void quiesce_and_remove_host(struct us_data *us)
{
struct Scsi_Host *host = us_to_host(us);
//---------------------------
pr_info("17 quiesce and remove host\n");
/* If the device is really gone, cut short reset delays */
if (us->pusb_dev->state == USB_STATE_NOTATTACHED) {
set_bit(US_FLIDX_DISCONNECTING, &us->dflags);
wake_up(&us->delay_wait);
}
/* Prevent SCSI scanning (if it hasn't started yet)
* or wait for the SCSI-scanning routine to stop.
*/
cancel_delayed_work_sync(&us->scan_dwork);
/* Balance autopm calls if scanning was cancelled */
if (test_bit(US_FLIDX_SCAN_PENDING, &us->dflags))
usb_autopm_put_interface_no_suspend(us->pusb_intf);
/* Removing the host will perform an orderly shutdown: caches
* synchronized, disks spun down, etc.
*/
scsi_remove_host(host);
/* Prevent any new commands from being accepted and cut short
* reset delays.
*/
scsi_lock(host);
set_bit(US_FLIDX_DISCONNECTING, &us->dflags);
scsi_unlock(host);
wake_up(&us->delay_wait);
}
开发者ID:Andrealphus,项目名称:Drivers-for-USB-storage-Zhao,代码行数:33,代码来源:ourusb.c
示例3: NCR_D700_remove_one
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);
}
开发者ID:rrowicki,项目名称:Chrono_Kernel-1,代码行数:9,代码来源:NCR_D700.c
示例4: mvme147_exit
static void __exit mvme147_exit(void)
{
scsi_remove_host(mvme147_shost);
/* XXX Make sure DMA is stopped! */
free_irq(MVME147_IRQ_SCSI_PORT, mvme147_shost);
free_irq(MVME147_IRQ_SCSI_DMA, mvme147_shost);
scsi_host_put(mvme147_shost);
}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:10,代码来源:mvme147.c
示例5: 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);
release_region(host->io_port, host->n_io_port);
scsi_host_put(host);
}
开发者ID:iPodLinux,项目名称:linux-2.6.7-ipod,代码行数:10,代码来源:oak.c
示例6: fdomain_release
static void fdomain_release(struct pcmcia_device *link)
{
scsi_info_t *info = link->priv;
dev_dbg(&link->dev, "fdomain_release\n");
scsi_remove_host(info->host);
pcmcia_disable_device(link);
scsi_unregister(info->host);
}
开发者ID:CSCLOG,项目名称:beaglebone,代码行数:10,代码来源:fdomain_stub.c
示例7: 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:Announcement,项目名称:linux,代码行数:11,代码来源:mac_scsi.c
示例8: zalon_remove
static int __exit zalon_remove(struct parisc_device *dev)
{
struct Scsi_Host *host = dev_get_drvdata(&dev->dev);
int irq = host->irq;
scsi_remove_host(host);
ncr53c8xx_release(host);
free_irq(irq, host);
return 0;
}
开发者ID:BackupTheBerlios,项目名称:tuxap,代码行数:11,代码来源:zalon.c
示例9: a2091_remove
static void __devexit a2091_remove(struct zorro_dev *z)
{
struct Scsi_Host *instance = zorro_get_drvdata(z);
struct a2091_hostdata *hdata = shost_priv(instance);
hdata->regs->CNTR = 0;
scsi_remove_host(instance);
free_irq(IRQ_AMIGA_PORTS, instance);
scsi_host_put(instance);
release_mem_region(z->resource.start, 256);
}
开发者ID:DirtyDroidX,项目名称:android_kernel_htc_m8ul,代码行数:11,代码来源:a2091.c
示例10: 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
示例11: zorro7xx_remove_one
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);
}
开发者ID:cilynx,项目名称:dd-wrt,代码行数:12,代码来源:zorro7xx.c
示例12: 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
示例13: 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
示例14: 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
示例15: 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
示例16: 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
示例17: 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
示例18: snirm710_driver_remove
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;
}
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:14,代码来源:sni_53c710.c
示例19: a4000t_device_remove
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;
}
开发者ID:cilynx,项目名称:dd-wrt,代码行数:14,代码来源:a4000t.c
示例20: 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
注:本文中的scsi_remove_host函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论