aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_os.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index ec7ebb6037e6..65cbe2f5eea2 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -744,7 +744,6 @@ qla2xxx_eh_device_reset(struct scsi_cmnd *cmd)
744{ 744{
745 scsi_qla_host_t *ha = to_qla_host(cmd->device->host); 745 scsi_qla_host_t *ha = to_qla_host(cmd->device->host);
746 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; 746 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata;
747 srb_t *sp;
748 int ret; 747 int ret;
749 unsigned int id, lun; 748 unsigned int id, lun;
750 unsigned long serial; 749 unsigned long serial;
@@ -755,8 +754,7 @@ qla2xxx_eh_device_reset(struct scsi_cmnd *cmd)
755 lun = cmd->device->lun; 754 lun = cmd->device->lun;
756 serial = cmd->serial_number; 755 serial = cmd->serial_number;
757 756
758 sp = (srb_t *) CMD_SP(cmd); 757 if (!fcport)
759 if (!sp || !fcport)
760 return ret; 758 return ret;
761 759
762 qla_printk(KERN_INFO, ha, 760 qla_printk(KERN_INFO, ha,
@@ -875,7 +873,6 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd)
875{ 873{
876 scsi_qla_host_t *ha = to_qla_host(cmd->device->host); 874 scsi_qla_host_t *ha = to_qla_host(cmd->device->host);
877 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; 875 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata;
878 srb_t *sp;
879 int ret; 876 int ret;
880 unsigned int id, lun; 877 unsigned int id, lun;
881 unsigned long serial; 878 unsigned long serial;
@@ -886,8 +883,7 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd)
886 lun = cmd->device->lun; 883 lun = cmd->device->lun;
887 serial = cmd->serial_number; 884 serial = cmd->serial_number;
888 885
889 sp = (srb_t *) CMD_SP(cmd); 886 if (!fcport)
890 if (!sp || !fcport)
891 return ret; 887 return ret;
892 888
893 qla_printk(KERN_INFO, ha, 889 qla_printk(KERN_INFO, ha,
@@ -936,7 +932,6 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *cmd)
936{ 932{
937 scsi_qla_host_t *ha = to_qla_host(cmd->device->host); 933 scsi_qla_host_t *ha = to_qla_host(cmd->device->host);
938 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; 934 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata;
939 srb_t *sp;
940 int ret; 935 int ret;
941 unsigned int id, lun; 936 unsigned int id, lun;
942 unsigned long serial; 937 unsigned long serial;
@@ -947,8 +942,7 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *cmd)
947 lun = cmd->device->lun; 942 lun = cmd->device->lun;
948 serial = cmd->serial_number; 943 serial = cmd->serial_number;
949 944
950 sp = (srb_t *) CMD_SP(cmd); 945 if (!fcport)
951 if (!sp || !fcport)
952 return ret; 946 return ret;
953 947
954 qla_printk(KERN_INFO, ha, 948 qla_printk(KERN_INFO, ha,
@@ -2244,9 +2238,6 @@ qla2x00_do_dpc(void *data)
2244 2238
2245 next_loopid = 0; 2239 next_loopid = 0;
2246 list_for_each_entry(fcport, &ha->fcports, list) { 2240 list_for_each_entry(fcport, &ha->fcports, list) {
2247 if (fcport->port_type != FCT_TARGET)
2248 continue;
2249
2250 /* 2241 /*
2251 * If the port is not ONLINE then try to login 2242 * If the port is not ONLINE then try to login
2252 * to it if we haven't run out of retries. 2243 * to it if we haven't run out of retries.