Lines Matching refs:host

114 	spin_lock_irqsave(tw_dev->host->host_lock, flags);  in twl_sysfs_aen_read()
116 spin_unlock_irqrestore(tw_dev->host->host_lock, flags); in twl_sysfs_aen_read()
145 spin_lock_irqsave(tw_dev->host->host_lock, flags); in twl_sysfs_compat_info()
147 spin_unlock_irqrestore(tw_dev->host->host_lock, flags); in twl_sysfs_compat_info()
166 struct Scsi_Host *host = class_to_shost(dev); in twl_show_stats() local
167 TW_Device_Extension *tw_dev = (TW_Device_Extension *)host->hostdata; in twl_show_stats()
171 spin_lock_irqsave(tw_dev->host->host_lock, flags); in twl_show_stats()
190 spin_unlock_irqrestore(tw_dev->host->host_lock, flags); in twl_show_stats()
230 char host[16]; in twl_aen_queue_event() local
238 host[0] = '\0'; in twl_aen_queue_event()
239 if (tw_dev->host) in twl_aen_queue_event()
240 sprintf(host, " scsi%d:", tw_dev->host->host_no); in twl_aen_queue_event()
262 host, in twl_aen_queue_event()
402 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x2, "Post failed while reading AEN queue"); in twl_aen_read_queue()
595 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x3, "Error posting request sense"); in twl_aen_drain_queue()
601 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x4, "No valid response while draining AEN queue"); in twl_aen_drain_queue()
656 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x5, "Memory allocation failed"); in twl_allocate_memory()
770 spin_lock_irqsave(tw_dev->host->host_lock, flags); in twl_chrdev_ioctl()
788 spin_unlock_irqrestore(tw_dev->host->host_lock, flags); in twl_chrdev_ioctl()
799 tw_dev->host->host_no, TW_DRIVER, 0x6, in twl_chrdev_ioctl()
810 spin_lock_irqsave(tw_dev->host->host_lock, flags); in twl_chrdev_ioctl()
814 spin_unlock_irqrestore(tw_dev->host->host_lock, flags); in twl_chrdev_ioctl()
882 tw_dev->host->host_no, in twl_fill_sense()
962 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x7, "No valid response during get param") in twl_get_param()
1018 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x8, "No valid response during init connection"); in twl_initconnection()
1043 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x9, "Command packet memory allocation failed"); in twl_initialize_device_extension()
1049 TW_PRINTK(tw_dev->host, TW_DRIVER, 0xa, "Generic memory allocation failed"); in twl_initialize_device_extension()
1055 TW_PRINTK(tw_dev->host, TW_DRIVER, 0xb, "Sense buffer allocation failed"); in twl_initialize_device_extension()
1062 TW_PRINTK(tw_dev->host, TW_DRIVER, 0xc, "Event info memory allocation failed"); in twl_initialize_device_extension()
1096 TW_PRINTK(tw_dev->host, TW_DRIVER, 0xd, "Microcontroller Error: clearing"); in twl_handle_attention_interrupt()
1133 spin_lock(tw_dev->host->host_lock); in twl_interrupt()
1197 TW_PRINTK(tw_dev->host, TW_DRIVER, 0xe, "Received a request id that wasn't posted"); in twl_interrupt()
1207 TW_PRINTK(tw_dev->host, TW_DRIVER, 0xf, "Error completing AEN during attention interrupt"); in twl_interrupt()
1237 spin_unlock(tw_dev->host->host_lock); in twl_interrupt()
1281 … TW_PRINTK(tw_dev->host, TW_DRIVER, 0x10, "Controller never went non-ready during reset sequence"); in twl_reset_sequence()
1286 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x11, "Controller not ready during reset sequence"); in twl_reset_sequence()
1299 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x12, "Initconnection failed while checking SRL"); in twl_reset_sequence()
1319 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x13, "Bad controller status after loading sense buffers"); in twl_reset_sequence()
1327 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x14, "AEN drain failed during reset sequence"); in twl_reset_sequence()
1361 scsi_block_requests(tw_dev->host); in twl_reset_device_extension()
1367 spin_lock_irqsave(tw_dev->host->host_lock, flags); in twl_reset_device_extension()
1393 spin_unlock_irqrestore(tw_dev->host->host_lock, flags); in twl_reset_device_extension()
1406 scsi_unblock_requests(tw_dev->host); in twl_reset_device_extension()
1416 tw_dev = (TW_Device_Extension *)sdev->host->hostdata; in twl_scsi_biosparam()
1439 tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata; in twl_scsi_eh_reset()
1452 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x15, "Controller reset failed during scsi host reset"); in twl_scsi_eh_reset()
1466 TW_Device_Extension *tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata; in twl_scsi_queue_lck()
1506 printk(KERN_WARNING "3w-sas: Shutting down host %d.\n", tw_dev->host->host_no); in DEF_SCSI_QCMD()
1510 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x16, "Connection shutdown failed"); in DEF_SCSI_QCMD()
1522 struct Scsi_Host *host = pci_get_drvdata(pdev); in twl_shutdown() local
1525 if (!host) in twl_shutdown()
1528 tw_dev = (TW_Device_Extension *)host->hostdata; in twl_shutdown()
1566 struct Scsi_Host *host = NULL; in twl_probe() local
1573 TW_PRINTK(host, TW_DRIVER, 0x17, "Failed to enable pci device"); in twl_probe()
1584 TW_PRINTK(host, TW_DRIVER, 0x18, "Failed to set dma mask"); in twl_probe()
1589 host = scsi_host_alloc(&driver_template, sizeof(TW_Device_Extension)); in twl_probe()
1590 if (!host) { in twl_probe()
1591 TW_PRINTK(host, TW_DRIVER, 0x19, "Failed to allocate memory for device extension"); in twl_probe()
1595 tw_dev = shost_priv(host); in twl_probe()
1598 tw_dev->host = host; in twl_probe()
1602 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1a, "Failed to initialize device extension"); in twl_probe()
1609 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1b, "Failed to get mem region"); in twl_probe()
1616 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1c, "Failed to ioremap"); in twl_probe()
1625 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1d, "Controller reset failed during probe"); in twl_probe()
1630 host->max_id = TW_MAX_UNITS; in twl_probe()
1631 host->max_cmd_len = TW_MAX_CDB_LEN; in twl_probe()
1632 host->max_lun = TW_MAX_LUNS; in twl_probe()
1633 host->max_channel = 0; in twl_probe()
1636 retval = scsi_add_host(host, &pdev->dev); in twl_probe()
1638 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1e, "scsi add host failed"); in twl_probe()
1642 pci_set_drvdata(pdev, host); in twl_probe()
1645 host->host_no, in twl_probe()
1656 host->host_no, in twl_probe()
1670 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1f, "Error requesting IRQ"); in twl_probe()
1681 scsi_scan_host(host); in twl_probe()
1684 if (sysfs_create_bin_file(&host->shost_dev.kobj, &twl_sysfs_aen_read_attr)) in twl_probe()
1685 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x20, "Failed to create sysfs binary file: 3ware_aen_read"); in twl_probe()
1686 if (sysfs_create_bin_file(&host->shost_dev.kobj, &twl_sysfs_compat_info_attr)) in twl_probe()
1687 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x21, "Failed to create sysfs binary file: 3ware_compat_info"); in twl_probe()
1691 TW_PRINTK(host, TW_DRIVER, 0x22, "Failed to register character device"); in twl_probe()
1699 scsi_remove_host(host); in twl_probe()
1706 scsi_host_put(host); in twl_probe()
1716 struct Scsi_Host *host = pci_get_drvdata(pdev); in twl_remove() local
1719 if (!host) in twl_remove()
1722 tw_dev = (TW_Device_Extension *)host->hostdata; in twl_remove()
1728 sysfs_remove_bin_file(&host->shost_dev.kobj, &twl_sysfs_aen_read_attr); in twl_remove()
1729 sysfs_remove_bin_file(&host->shost_dev.kobj, &twl_sysfs_compat_info_attr); in twl_remove()
1731 scsi_remove_host(tw_dev->host); in twl_remove()
1755 scsi_host_put(tw_dev->host); in twl_remove()
1764 struct Scsi_Host *host = pci_get_drvdata(pdev); in twl_suspend() local
1765 TW_Device_Extension *tw_dev = (TW_Device_Extension *)host->hostdata; in twl_suspend()
1767 printk(KERN_WARNING "3w-sas: Suspending host %d.\n", tw_dev->host->host_no); in twl_suspend()
1775 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x23, "Connection shutdown failed during suspend"); in twl_suspend()
1794 struct Scsi_Host *host = pci_get_drvdata(pdev); in twl_resume() local
1795 TW_Device_Extension *tw_dev = (TW_Device_Extension *)host->hostdata; in twl_resume()
1797 printk(KERN_WARNING "3w-sas: Resuming host %d.\n", tw_dev->host->host_no); in twl_resume()
1804 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x24, "Enable device failed during resume"); in twl_resume()
1815 TW_PRINTK(host, TW_DRIVER, 0x25, "Failed to set dma mask during resume"); in twl_resume()
1829 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x26, "Error requesting IRQ during resume"); in twl_resume()
1845 scsi_remove_host(host); in twl_resume()