Commit a1af6f1a authored by Martin K. Petersen's avatar Martin K. Petersen
Browse files

Merge branch '6.15/scsi-queue' into 6.15/scsi-fixes



Pull in remaining fixes from 6.15/scsi-queue.

Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parents 0af2f6be 1b4902f0
Loading
Loading
Loading
Loading
+32 −0
Original line number Diff line number Diff line
@@ -1604,3 +1604,35 @@ Description:
		prevent the UFS from frequently performing clock gating/ungating.

		The attribute is read/write.

What:		/sys/bus/platform/drivers/ufshcd/*/device_lvl_exception_count
What:		/sys/bus/platform/devices/*.ufs/device_lvl_exception_count
Date:		March 2025
Contact:	Bao D. Nguyen <quic_nguyenb@quicinc.com>
Description:
		This attribute is applicable to ufs devices compliant to the
		JEDEC specifications version 4.1 or later. The
		device_lvl_exception_count is a counter indicating the number of
		times the device level exceptions have occurred since the last
		time this variable is reset.  Writing a 0 value to this
		attribute will reset the device_lvl_exception_count.  If the
		device_lvl_exception_count reads a positive value, the user
		application should read the device_lvl_exception_id attribute to
		know more information about the exception.

		The attribute is read/write.

What:		/sys/bus/platform/drivers/ufshcd/*/device_lvl_exception_id
What:		/sys/bus/platform/devices/*.ufs/device_lvl_exception_id
Date:		March 2025
Contact:	Bao D. Nguyen <quic_nguyenb@quicinc.com>
Description:
		Reading the device_lvl_exception_id returns the
		qDeviceLevelExceptionID attribute of the ufs device JEDEC
		specification version 4.1. The definition of the
		qDeviceLevelExceptionID is the ufs device vendor specific
		implementation.  Refer to the device manufacturer datasheet for
		more information on the meaning of the qDeviceLevelExceptionID
		attribute value.

		The attribute is read only.
+20 −0
Original line number Diff line number Diff line
@@ -935,8 +935,28 @@ static void hisi_sas_phyup_work_common(struct work_struct *work,
		container_of(work, typeof(*phy), works[event]);
	struct hisi_hba *hisi_hba = phy->hisi_hba;
	struct asd_sas_phy *sas_phy = &phy->sas_phy;
	struct asd_sas_port *sas_port = sas_phy->port;
	struct hisi_sas_port *port = phy->port;
	struct device *dev = hisi_hba->dev;
	struct domain_device *port_dev;
	int phy_no = sas_phy->id;

	if (!test_bit(HISI_SAS_RESETTING_BIT, &hisi_hba->flags) &&
	    sas_port && port && (port->id != phy->port_id)) {
		dev_info(dev, "phy%d's hw port id changed from %d to %llu\n",
				phy_no, port->id, phy->port_id);
		port_dev = sas_port->port_dev;
		if (port_dev && !dev_is_expander(port_dev->dev_type)) {
			/*
			 * Set the device state to gone to block
			 * sending IO to the device.
			 */
			set_bit(SAS_DEV_GONE, &port_dev->state);
			hisi_sas_notify_phy_event(phy, HISI_PHYE_LINK_RESET);
			return;
		}
	}

	phy->wait_phyup_cnt = 0;
	if (phy->identify.target_port_protocols == SAS_PROTOCOL_SSP)
		hisi_hba->hw->sl_notify_ssp(hisi_hba, phy_no);
+7 −2
Original line number Diff line number Diff line
@@ -2501,6 +2501,7 @@ static void prep_ata_v2_hw(struct hisi_hba *hisi_hba,
	struct hisi_sas_port *port = to_hisi_sas_port(sas_port);
	struct sas_ata_task *ata_task = &task->ata_task;
	struct sas_tmf_task *tmf = slot->tmf;
	int phy_id;
	u8 *buf_cmd;
	int has_data = 0, hdr_tag = 0;
	u32 dw0, dw1 = 0, dw2 = 0;
@@ -2508,10 +2509,14 @@ static void prep_ata_v2_hw(struct hisi_hba *hisi_hba,
	/* create header */
	/* dw0 */
	dw0 = port->id << CMD_HDR_PORT_OFF;
	if (parent_dev && dev_is_expander(parent_dev->dev_type))
	if (parent_dev && dev_is_expander(parent_dev->dev_type)) {
		dw0 |= 3 << CMD_HDR_CMD_OFF;
	else
	} else {
		phy_id = device->phy->identify.phy_identifier;
		dw0 |= (1U << phy_id) << CMD_HDR_PHY_ID_OFF;
		dw0 |= CMD_HDR_FORCE_PHY_MSK;
		dw0 |= 4 << CMD_HDR_CMD_OFF;
	}

	if (tmf && ata_task->force_phy) {
		dw0 |= CMD_HDR_FORCE_PHY_MSK;
+12 −2
Original line number Diff line number Diff line
@@ -359,6 +359,10 @@
#define CMD_HDR_RESP_REPORT_MSK		(0x1 << CMD_HDR_RESP_REPORT_OFF)
#define CMD_HDR_TLR_CTRL_OFF		6
#define CMD_HDR_TLR_CTRL_MSK		(0x3 << CMD_HDR_TLR_CTRL_OFF)
#define CMD_HDR_PHY_ID_OFF		8
#define CMD_HDR_PHY_ID_MSK		(0x1ff << CMD_HDR_PHY_ID_OFF)
#define CMD_HDR_FORCE_PHY_OFF		17
#define CMD_HDR_FORCE_PHY_MSK		(0x1U << CMD_HDR_FORCE_PHY_OFF)
#define CMD_HDR_PORT_OFF		18
#define CMD_HDR_PORT_MSK		(0xf << CMD_HDR_PORT_OFF)
#define CMD_HDR_PRIORITY_OFF		27
@@ -1429,15 +1433,21 @@ static void prep_ata_v3_hw(struct hisi_hba *hisi_hba,
	struct hisi_sas_cmd_hdr *hdr = slot->cmd_hdr;
	struct asd_sas_port *sas_port = device->port;
	struct hisi_sas_port *port = to_hisi_sas_port(sas_port);
	int phy_id;
	u8 *buf_cmd;
	int has_data = 0, hdr_tag = 0;
	u32 dw1 = 0, dw2 = 0;

	hdr->dw0 = cpu_to_le32(port->id << CMD_HDR_PORT_OFF);
	if (parent_dev && dev_is_expander(parent_dev->dev_type))
	if (parent_dev && dev_is_expander(parent_dev->dev_type)) {
		hdr->dw0 |= cpu_to_le32(3 << CMD_HDR_CMD_OFF);
	else
	} else {
		phy_id = device->phy->identify.phy_identifier;
		hdr->dw0 |= cpu_to_le32((1U << phy_id)
				<< CMD_HDR_PHY_ID_OFF);
		hdr->dw0 |= CMD_HDR_FORCE_PHY_MSK;
		hdr->dw0 |= cpu_to_le32(4U << CMD_HDR_CMD_OFF);
	}

	switch (task->data_dir) {
	case DMA_TO_DEVICE:
+2 −2
Original line number Diff line number Diff line
@@ -23,8 +23,8 @@
/*
 * MegaRAID SAS Driver meta data
 */
#define MEGASAS_VERSION				"07.727.03.00-rc1"
#define MEGASAS_RELDATE				"Oct 03, 2023"
#define MEGASAS_VERSION				"07.734.00.00-rc1"
#define MEGASAS_RELDATE				"Apr 03, 2025"

#define MEGASAS_MSIX_NAME_LEN			32

Loading