]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/scsi/pm8001/pm8001_sas.c
Merge git://github.com/herbertx/crypto
[karo-tx-linux.git] / drivers / scsi / pm8001 / pm8001_sas.c
index 9068f123eccff372f5a41ea3a0aed2f98d2942e9..fb3dc9978861284e575945331487122a56ddd6c3 100644 (file)
@@ -210,7 +210,7 @@ int pm8001_phy_control(struct asd_sas_phy *sas_phy, enum phy_func func,
                PM8001_CHIP_DISP->phy_stop_req(pm8001_ha, phy_id);
                break;
        default:
-               rc = -EOPNOTSUPP;
+               rc = -ENOSYS;
        }
        msleep(300);
        return rc;
@@ -356,21 +356,8 @@ static int pm8001_task_exec(struct sas_task *task, const int num,
        do {
                dev = t->dev;
                pm8001_dev = dev->lldd_dev;
-               if (DEV_IS_GONE(pm8001_dev)) {
-                       if (pm8001_dev) {
-                               PM8001_IO_DBG(pm8001_ha,
-                                       pm8001_printk("device %d not ready.\n",
-                                       pm8001_dev->device_id));
-                       } else {
-                               PM8001_IO_DBG(pm8001_ha,
-                                       pm8001_printk("device %016llx not "
-                                       "ready.\n", SAS_ADDR(dev->sas_addr)));
-                       }
-                       rc = SAS_PHY_DOWN;
-                       goto out_done;
-               }
                port = &pm8001_ha->port[sas_find_local_port_id(dev)];
-               if (!port->port_attached) {
+               if (DEV_IS_GONE(pm8001_dev) || !port->port_attached) {
                        if (sas_protocol_ata(t->task_proto)) {
                                struct task_status_struct *ts = &t->task_status;
                                ts->resp = SAS_TASK_UNDELIVERED;
@@ -622,7 +609,7 @@ static int pm8001_dev_found_notify(struct domain_device *dev)
                                flag = 1; /* directly sata*/
                }
        } /*register this device to HBA*/
-       PM8001_DISC_DBG(pm8001_ha, pm8001_printk("Found device \n"));
+       PM8001_DISC_DBG(pm8001_ha, pm8001_printk("Found device\n"));
        PM8001_CHIP_DISP->reg_dev_req(pm8001_ha, pm8001_device, flag);
        spin_unlock_irqrestore(&pm8001_ha->lock, flags);
        wait_for_completion(&completion);
@@ -971,13 +958,14 @@ int pm8001_query_task(struct sas_task *task)
                /* The task is still in Lun, release it then */
                case TMF_RESP_FUNC_SUCC:
                        PM8001_EH_DBG(pm8001_ha,
-                               pm8001_printk("The task is still in Lun \n"));
+                               pm8001_printk("The task is still in Lun\n"));
+                       break;
                /* The task is not in Lun or failed, reset the phy */
                case TMF_RESP_FUNC_FAILED:
                case TMF_RESP_FUNC_COMPLETE:
                        PM8001_EH_DBG(pm8001_ha,
                        pm8001_printk("The task is not in Lun or failed,"
-                       " reset the phy \n"));
+                       " reset the phy\n"));
                        break;
                }
        }