Lines Matching refs:sdev

817 	struct scsi_device *sdev;  in myrs_log_event()  local
851 sdev = scsi_device_lookup(shost, ev->channel, in myrs_log_event()
853 sdev_printk(KERN_INFO, sdev, "event %d: Physical Device %s\n", in myrs_log_event()
855 if (sdev && sdev->hostdata && in myrs_log_event()
856 sdev->channel < cs->ctlr_info->physchan_present) { in myrs_log_event()
857 struct myrs_pdev_info *pdev_info = sdev->hostdata; in myrs_log_event()
937 struct scsi_device *sdev = to_scsi_device(dev); in raid_state_show() local
938 struct myrs_hba *cs = shost_priv(sdev->host); in raid_state_show()
941 if (!sdev->hostdata) in raid_state_show()
944 if (sdev->channel >= cs->ctlr_info->physchan_present) { in raid_state_show()
945 struct myrs_ldev_info *ldev_info = sdev->hostdata; in raid_state_show()
958 pdev_info = sdev->hostdata; in raid_state_show()
972 struct scsi_device *sdev = to_scsi_device(dev); in raid_state_store() local
973 struct myrs_hba *cs = shost_priv(sdev->host); in raid_state_store()
990 if (sdev->channel < cs->ctlr_info->physchan_present) { in raid_state_store()
991 struct myrs_pdev_info *pdev_info = sdev->hostdata; in raid_state_store()
996 sdev_printk(KERN_INFO, sdev, in raid_state_store()
1001 status = myrs_translate_pdev(cs, sdev->channel, sdev->id, in raid_state_store()
1002 sdev->lun, pdev_devmap); in raid_state_store()
1007 struct myrs_ldev_info *ldev_info = sdev->hostdata; in raid_state_store()
1010 sdev_printk(KERN_INFO, sdev, in raid_state_store()
1032 if (sdev->channel < cs->ctlr_info->physchan_present) { in raid_state_store()
1033 struct myrs_pdev_info *pdev_info = sdev->hostdata; in raid_state_store()
1037 struct myrs_ldev_info *ldev_info = sdev->hostdata; in raid_state_store()
1041 sdev_printk(KERN_INFO, sdev, in raid_state_store()
1046 sdev_printk(KERN_INFO, sdev, in raid_state_store()
1056 struct scsi_device *sdev = to_scsi_device(dev); in raid_level_show() local
1057 struct myrs_hba *cs = shost_priv(sdev->host); in raid_level_show()
1060 if (!sdev->hostdata) in raid_level_show()
1063 if (sdev->channel >= cs->ctlr_info->physchan_present) { in raid_level_show()
1066 ldev_info = sdev->hostdata; in raid_level_show()
1082 struct scsi_device *sdev = to_scsi_device(dev); in rebuild_show() local
1083 struct myrs_hba *cs = shost_priv(sdev->host); in rebuild_show()
1088 if (sdev->channel < cs->ctlr_info->physchan_present) in rebuild_show()
1091 ldev_info = sdev->hostdata; in rebuild_show()
1095 sdev_printk(KERN_INFO, sdev, in rebuild_show()
1111 struct scsi_device *sdev = to_scsi_device(dev); in rebuild_store() local
1112 struct myrs_hba *cs = shost_priv(sdev->host); in rebuild_store()
1120 if (sdev->channel < cs->ctlr_info->physchan_present) in rebuild_store()
1123 ldev_info = sdev->hostdata; in rebuild_store()
1134 sdev_printk(KERN_INFO, sdev, in rebuild_store()
1141 sdev_printk(KERN_INFO, sdev, in rebuild_store()
1146 sdev_printk(KERN_INFO, sdev, in rebuild_store()
1170 sdev_printk(KERN_INFO, sdev, in rebuild_store()
1175 sdev_printk(KERN_INFO, sdev, "Rebuild %s\n", in rebuild_store()
1187 struct scsi_device *sdev = to_scsi_device(dev); in consistency_check_show() local
1188 struct myrs_hba *cs = shost_priv(sdev->host); in consistency_check_show()
1192 if (sdev->channel < cs->ctlr_info->physchan_present) in consistency_check_show()
1195 ldev_info = sdev->hostdata; in consistency_check_show()
1211 struct scsi_device *sdev = to_scsi_device(dev); in consistency_check_store() local
1212 struct myrs_hba *cs = shost_priv(sdev->host); in consistency_check_store()
1220 if (sdev->channel < cs->ctlr_info->physchan_present) in consistency_check_store()
1223 ldev_info = sdev->hostdata; in consistency_check_store()
1234 sdev_printk(KERN_INFO, sdev, in consistency_check_store()
1240 sdev_printk(KERN_INFO, sdev, in consistency_check_store()
1246 sdev_printk(KERN_INFO, sdev, in consistency_check_store()
1273 sdev_printk(KERN_INFO, sdev, in consistency_check_store()
1278 sdev_printk(KERN_INFO, sdev, "Consistency Check %s\n", in consistency_check_store()
1497 struct scsi_device *sdev = to_scsi_device(dev); in disable_enclosure_messages_store() local
1498 struct myrs_hba *cs = shost_priv(sdev->host); in disable_enclosure_messages_store()
1591 struct scsi_device *sdev = scmd->device; in myrs_queuecommand() local
1611 struct myrs_ldev_info *ldev_info = sdev->hostdata; in myrs_queuecommand()
1637 struct myrs_ldev_info *ldev_info = sdev->hostdata; in myrs_queuecommand()
1646 mbox->SCSI_10.pdev.lun = sdev->lun; in myrs_queuecommand()
1647 mbox->SCSI_10.pdev.target = sdev->id; in myrs_queuecommand()
1648 mbox->SCSI_10.pdev.channel = sdev->channel; in myrs_queuecommand()
1683 struct myrs_ldev_info *ldev_info = sdev->hostdata; in myrs_queuecommand()
1692 mbox->SCSI_255.pdev.lun = sdev->lun; in myrs_queuecommand()
1693 mbox->SCSI_255.pdev.target = sdev->id; in myrs_queuecommand()
1694 mbox->SCSI_255.pdev.channel = sdev->channel; in myrs_queuecommand()
1778 struct scsi_device *sdev) in myrs_translate_ldev() argument
1782 sdev->channel - cs->ctlr_info->physchan_present; in myrs_translate_ldev()
1784 ldev_num = sdev->id + chan_offset * sdev->host->max_id; in myrs_translate_ldev()
1789 static int myrs_slave_alloc(struct scsi_device *sdev) in myrs_slave_alloc() argument
1791 struct myrs_hba *cs = shost_priv(sdev->host); in myrs_slave_alloc()
1794 if (sdev->channel > sdev->host->max_channel) in myrs_slave_alloc()
1797 if (sdev->channel >= cs->ctlr_info->physchan_present) { in myrs_slave_alloc()
1801 if (sdev->lun > 0) in myrs_slave_alloc()
1804 ldev_num = myrs_translate_ldev(cs, sdev); in myrs_slave_alloc()
1812 sdev->hostdata = NULL; in myrs_slave_alloc()
1817 dev_dbg(&sdev->sdev_gendev, in myrs_slave_alloc()
1822 sdev->hostdata = ldev_info; in myrs_slave_alloc()
1855 &sdev->sdev_gendev, level); in myrs_slave_alloc()
1860 sdev_printk(KERN_DEBUG, sdev, in myrs_slave_alloc()
1872 status = myrs_get_pdev_info(cs, sdev->channel, in myrs_slave_alloc()
1873 sdev->id, sdev->lun, in myrs_slave_alloc()
1876 sdev->hostdata = NULL; in myrs_slave_alloc()
1880 sdev->hostdata = pdev_info; in myrs_slave_alloc()
1885 static int myrs_slave_configure(struct scsi_device *sdev) in myrs_slave_configure() argument
1887 struct myrs_hba *cs = shost_priv(sdev->host); in myrs_slave_configure()
1890 if (sdev->channel > sdev->host->max_channel) in myrs_slave_configure()
1893 if (sdev->channel < cs->ctlr_info->physchan_present) { in myrs_slave_configure()
1895 if (sdev->type == TYPE_RAID) in myrs_slave_configure()
1897 sdev->no_uld_attach = 1; in myrs_slave_configure()
1900 if (sdev->lun != 0) in myrs_slave_configure()
1903 ldev_info = sdev->hostdata; in myrs_slave_configure()
1908 sdev->wce_default_on = 1; in myrs_slave_configure()
1909 sdev->tagged_supported = 1; in myrs_slave_configure()
1913 static void myrs_slave_destroy(struct scsi_device *sdev) in myrs_slave_destroy() argument
1915 kfree(sdev->hostdata); in myrs_slave_destroy()
1964 struct scsi_device *sdev = to_scsi_device(dev); in myrs_is_raid() local
1965 struct myrs_hba *cs = shost_priv(sdev->host); in myrs_is_raid()
1967 return (sdev->channel >= cs->ctlr_info->physchan_present) ? 1 : 0; in myrs_is_raid()
1977 struct scsi_device *sdev = to_scsi_device(dev); in myrs_get_resync() local
1978 struct myrs_hba *cs = shost_priv(sdev->host); in myrs_get_resync()
1979 struct myrs_ldev_info *ldev_info = sdev->hostdata; in myrs_get_resync()
1982 if (sdev->channel < cs->ctlr_info->physchan_present || !ldev_info) in myrs_get_resync()
2001 struct scsi_device *sdev = to_scsi_device(dev); in myrs_get_state() local
2002 struct myrs_hba *cs = shost_priv(sdev->host); in myrs_get_state()
2003 struct myrs_ldev_info *ldev_info = sdev->hostdata; in myrs_get_state()
2006 if (sdev->channel < cs->ctlr_info->physchan_present || !ldev_info) in myrs_get_state()
2142 struct scsi_device *sdev; in myrs_monitor() local
2144 shost_for_each_device(sdev, shost) { in myrs_monitor()
2148 if (sdev->channel < info->physchan_present) in myrs_monitor()
2150 ldev_info = sdev->hostdata; in myrs_monitor()