lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 27 Jan 2022 16:01:52 +0000
From:   John Garry <john.garry@...wei.com>
To:     "chenxiang (M)" <chenxiang66@...ilicon.com>,
        "jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        "artur.paszkiewicz@...el.com" <artur.paszkiewicz@...el.com>,
        "jinpu.wang@...ud.ionos.com" <jinpu.wang@...ud.ionos.com>,
        "Ajish.Koshy@...rochip.com" <Ajish.Koshy@...rochip.com>
CC:     yanaijie <yanaijie@...wei.com>,
        "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        Linuxarm <linuxarm@...wei.com>,
        "liuqi (BA)" <liuqi115@...wei.com>,
        "Viswas.G@...rochip.com" <Viswas.G@...rochip.com>,
        "damien.lemoal@...nsource.wdc.com" <damien.lemoal@...nsource.wdc.com>
Subject: Re: [PATCH 06/16] scsi: libsas: Add sas_task.tmf

On 27/01/2022 12:55, chenxiang (M) wrote:
>> -	slot->tmf = tmf;
>> -	slot->is_internal = tmf;
> In kernel 5.17-rc1(with above two lines on), it seems there is a issue
> for ata disk reset command as tmf = null while it is internal command.

ok, thanks for the notice. Would this fix it:

diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c 
b/drivers/scsi/hisi_sas/hisi_sas_main.c
index a05ec7aece5a..0e12c9329ee5 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -427,8 +427,6 @@ void hisi_sas_task_deliver(struct hisi_hba *hisi_hba,
  	cmd_hdr_base = hisi_hba->cmd_hdr[dlvry_queue];
  	slot->cmd_hdr = &cmd_hdr_base[dlvry_queue_slot];

-	slot->tmf = tmf;
-	slot->is_internal = tmf;
  	task->lldd_task = slot;

  	memset(slot->cmd_hdr, 0, sizeof(struct hisi_sas_cmd_hdr));
@@ -1380,12 +1378,13 @@ static int hisi_sas_softreset_ata_disk(struct 
domain_device *device)
  	struct hisi_hba *hisi_hba = dev_to_hisi_hba(device);
  	struct device *dev = hisi_hba->dev;
  	int s = sizeof(struct host_to_dev_fis);
+	struct hisi_sas_tmf_task tmf = {};

  	ata_for_each_link(link, ap, EDGE) {
  		int pmp = sata_srst_pmp(link);

  		hisi_sas_fill_ata_reset_cmd(link->device, 1, pmp, fis);
-		rc = hisi_sas_exec_internal_tmf_task(device, fis, s, NULL);
+		rc = hisi_sas_exec_internal_tmf_task(device, fis, s, &tmf);
  		if (rc != TMF_RESP_FUNC_COMPLETE)
  			break;
  	}
@@ -1396,7 +1395,7 @@ static int hisi_sas_softreset_ata_disk(struct 
domain_device *device)

  			hisi_sas_fill_ata_reset_cmd(link->device, 0, pmp, fis);
  			rc = hisi_sas_exec_internal_tmf_task(device, fis,
-							     s, NULL);
+							     s, &tmf);
  			if (rc != TMF_RESP_FUNC_COMPLETE)
  				dev_err(dev, "ata disk %016llx de-reset failed\n",
  					SAS_ADDR(device->sas_addr));

> 
>>    	task->lldd_task = slot;
>>    



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ