<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/scsi/pm8001, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/scsi/pm8001?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/scsi/pm8001?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-04-12T01:59:50Z</updated>
<entry>
<title>scsi: pm80xx: Enable upper inbound, outbound queues</title>
<updated>2022-04-12T01:59:50Z</updated>
<author>
<name>Ajish Koshy</name>
<email>Ajish.Koshy@microchip.com</email>
</author>
<published>2022-04-11T06:46:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=bcd8a45223470e00b5f254018174d64a75db4bbe'/>
<id>urn:sha1:bcd8a45223470e00b5f254018174d64a75db4bbe</id>
<content type='text'>
Executing driver on servers with more than 32 CPUs were faced with command
timeouts. This is because we were not geting completions for commands
submitted on IQ32 - IQ63.

Set E64Q bit to enable upper inbound and outbound queues 32 to 63 in the
MPI main configuration table.

Added 500ms delay after successful MPI initialization as mentioned in
controller datasheet.

Link: https://lore.kernel.org/r/20220411064603.668448-3-Ajish.Koshy@microchip.com
Fixes: 05c6c029a44d ("scsi: pm80xx: Increase number of supported queues")
Reviewed-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Acked-by: Jack Wang &lt;jinpu.wang@ionos.com&gt;
Signed-off-by: Ajish Koshy &lt;Ajish.Koshy@microchip.com&gt;
Signed-off-by: Viswas G &lt;Viswas.G@microchip.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: pm80xx: Mask and unmask upper interrupt vectors 32-63</title>
<updated>2022-04-12T01:59:49Z</updated>
<author>
<name>Ajish Koshy</name>
<email>Ajish.Koshy@microchip.com</email>
</author>
<published>2022-04-11T06:46:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=294080eacf92a0781e6d43663448a55001ec8c64'/>
<id>urn:sha1:294080eacf92a0781e6d43663448a55001ec8c64</id>
<content type='text'>
When upper inbound and outbound queues 32-63 are enabled, we see upper
vectors 32-63 in interrupt service routine. We need corresponding registers
to handle masking and unmasking of these upper interrupts.

To achieve this, we use registers MSGU_ODMR_U(0x34) to mask and
MSGU_ODMR_CLR_U(0x3C) to unmask the interrupts. In these registers bit 0-31
represents interrupt vectors 32-63.

Link: https://lore.kernel.org/r/20220411064603.668448-2-Ajish.Koshy@microchip.com
Fixes: 05c6c029a44d ("scsi: pm80xx: Increase number of supported queues")
Reviewed-by: John Garry &lt;john.garry@huawei.com&gt;
Acked-by: Jack Wang &lt;jinpu.wang@ionos.com&gt;
Signed-off-by: Ajish Koshy &lt;Ajish.Koshy@microchip.com&gt;
Signed-off-by: Viswas G &lt;Viswas.G@microchip.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: pm8001: Use libsas internal abort support</title>
<updated>2022-03-15T03:33:24Z</updated>
<author>
<name>John Garry</name>
<email>john.garry@huawei.com</email>
</author>
<published>2022-03-11T12:23:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=2cbbf489778eb9dde51392ec5f74ae2868e4b857'/>
<id>urn:sha1:2cbbf489778eb9dde51392ec5f74ae2868e4b857</id>
<content type='text'>
New special handling is added for SAS_PROTOCOL_INTERNAL_ABORT proto so that
we may use the common queue command API.

Link: https://lore.kernel.org/r/1647001432-239276-4-git-send-email-john.garry@huawei.com
Tested-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Acked-by: Jack Wang &lt;jinpu.wang@ionos.com&gt;
Signed-off-by: John Garry &lt;john.garry@huawei.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: pm80xx: Handle non-fatal errors</title>
<updated>2022-02-28T02:37:28Z</updated>
<author>
<name>Ajish Koshy</name>
<email>Ajish.Koshy@microchip.com</email>
</author>
<published>2022-02-22T09:26:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=80cac47b08958f98c3e376ca2e1011c9ab880561'/>
<id>urn:sha1:80cac47b08958f98c3e376ca2e1011c9ab880561</id>
<content type='text'>
Firmware expects host driver to clear scratchpad rsvd 0 register after
non-fatal error is found.

This is done when firmware raises fatal error interrupt and indicates
non-fatal error. At this point firmware updates scratchpad rsvd 0 register
with non-fatal error value. Here host has to clear the register after
reading it during non-fatal errors.

Rename:

 - MSGU_HOST_SCRATCH_PAD_6 to MSGU_SCRATCH_PAD_RSVD_0

 - MSGU_HOST_SCRATCH_PAD_7 to MSGU_SCRATCH_PAD_RSVD_1

Link: https://lore.kernel.org/r/20220222092618.108198-1-Ajish.Koshy@microchip.com
Reviewed-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Acked-by: Jack Wang &lt;jinpu.wang@ionos.com&gt;
Signed-off-by: Ajish Koshy &lt;Ajish.Koshy@microchip.com&gt;
Signed-off-by: Viswas G &lt;Viswas.G@microchip.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: pm8001: Fix pm8001_info() message format</title>
<updated>2022-02-23T02:31:21Z</updated>
<author>
<name>Damien Le Moal</name>
<email>damien.lemoal@opensource.wdc.com</email>
</author>
<published>2022-02-20T03:18:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b709a4caa9d01f89314a4e5aab2e722fc9a5989a'/>
<id>urn:sha1:b709a4caa9d01f89314a4e5aab2e722fc9a5989a</id>
<content type='text'>
Make the driver messages more readable by adding a space after the message
prefix ":" and removing the extra space between function name and line
number.

Link: https://lore.kernel.org/r/20220220031810.738362-32-damien.lemoal@opensource.wdc.com
Reviewed-by: Jack Wang &lt;jinpu.wang@ionos.com&gt;
Signed-off-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: pm8001: Improve pm80XX_send_abort_all()</title>
<updated>2022-02-23T02:31:21Z</updated>
<author>
<name>Damien Le Moal</name>
<email>damien.lemoal@opensource.wdc.com</email>
</author>
<published>2022-02-20T03:18:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ca44f98d619481094d38524077e9e638aafa2923'/>
<id>urn:sha1:ca44f98d619481094d38524077e9e638aafa2923</id>
<content type='text'>
Both pm8001_send_abort_all() and pm80xx_send_abort_all() are called only
for a non null device with the NCQ_READ_LOG_FLAG set, so remove the device
check on entry of these functions. Furthermore, setting the
NCQ_ABORT_ALL_FLAG device id flag and clearing the NCQ_READ_LOG_FLAG is
always done before calling these functions. Move these operations inside
the functions.

Link: https://lore.kernel.org/r/20220220031810.738362-31-damien.lemoal@opensource.wdc.com
Reviewed-by: Jack Wang &lt;jinpu.wang@ionos.com&gt;
Signed-off-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: pm8001: Simplify pm8001_ccb_task_free()</title>
<updated>2022-02-23T02:31:21Z</updated>
<author>
<name>Damien Le Moal</name>
<email>damien.lemoal@opensource.wdc.com</email>
</author>
<published>2022-02-20T03:18:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=304fe11bdc25b4c8a6c9551590d256f647158805'/>
<id>urn:sha1:304fe11bdc25b4c8a6c9551590d256f647158805</id>
<content type='text'>
The task argument of the pm8001_ccb_task_free() function can be inferred
from the ccb argument ccb_task field. So there is no need to have this
argument. Likewise, the ccb_index argument is always equal to the ccb tag
field and is not needed either. Remove both arguments and update all call
sites. The pm8001_ccb_task_free_done() helper is also modified to match
this change.

Link: https://lore.kernel.org/r/20220220031810.738362-30-damien.lemoal@opensource.wdc.com
Reviewed-by: Jack Wang &lt;jinpu.wang@ionos.com&gt;
Signed-off-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: pm8001: Simplify pm8001_task_exec()</title>
<updated>2022-02-23T02:31:21Z</updated>
<author>
<name>Damien Le Moal</name>
<email>damien.lemoal@opensource.wdc.com</email>
</author>
<published>2022-02-20T03:18:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e29c47fe8946cc732b0e0d393b65b13c84bb69d0'/>
<id>urn:sha1:e29c47fe8946cc732b0e0d393b65b13c84bb69d0</id>
<content type='text'>
The main part of the pm8001_task_exec() function uses a do {} while(0) loop
that is useless and only makes the code harder to read. Remove this
loop. The unnecessary local variable t is also removed.

Additionally, avoid repeatedly declaring "struct task_status_struct *ts" to
handle error cases by declaring this variable for the entire function
scope. This allows simplifying the error cases, and together with the
addition of blank lines make the code more readable.

Finally, handling of the running_req counter is fixed to avoid decrementing
it without a corresponding incrementation in the case of an invalid task
protocol.

Link: https://lore.kernel.org/r/20220220031810.738362-29-damien.lemoal@opensource.wdc.com
Reviewed-by: John Garry &lt;john.garry@huawei.com&gt;
Reviewed-by: Jack Wang &lt;jinpu.wang@ionos.com&gt;
Signed-off-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: pm8001: Simplify pm8001_mpi_build_cmd() interface</title>
<updated>2022-02-23T02:31:21Z</updated>
<author>
<name>Damien Le Moal</name>
<email>damien.lemoal@opensource.wdc.com</email>
</author>
<published>2022-02-20T03:18:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f91767a35f0951ac30a6607497b3b9aa2b79d74e'/>
<id>urn:sha1:f91767a35f0951ac30a6607497b3b9aa2b79d74e</id>
<content type='text'>
There is no need to pass a pointer to a struct inbound_queue_table to
pm8001_mpi_build_cmd(). Passing the start index in the inbound queue table
of the adapter is enough. This change allows avoiding the declaration of a
struct inbound_queue_table pointer (circularQ variables) in many functions,
simplifying the code.

While at it, blank lines are added i(e.g. after local variable
declarations) to make the code more readable.

Link: https://lore.kernel.org/r/20220220031810.738362-28-damien.lemoal@opensource.wdc.com
Reviewed-by: Jack Wang &lt;jinpu.wang@ionos.com&gt;
Signed-off-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: pm8001: Introduce ccb alloc/free helpers</title>
<updated>2022-02-23T02:31:21Z</updated>
<author>
<name>Damien Le Moal</name>
<email>damien.lemoal@opensource.wdc.com</email>
</author>
<published>2022-02-20T03:18:05Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=99df0edb5a9849ef8d63b972e3ccba463b0053de'/>
<id>urn:sha1:99df0edb5a9849ef8d63b972e3ccba463b0053de</id>
<content type='text'>
Introduce the pm8001_ccb_alloc() and pm8001_ccb_free() helpers to replace
the typical code patterns:

	res = pm8001_tag_alloc(pm8001_ha, &amp;ccb_tag);
	if (res)
		...
	ccb = &amp;pm8001_ha-&gt;ccb_info[ccb_tag];
	ccb-&gt;device = pm8001_ha_dev;
	ccb-&gt;ccb_tag = ccb_tag;
	ccb-&gt;task = task;
	ccb-&gt;n_elem = 0;

and

	ccb-&gt;task = NULL;
	ccb-&gt;ccb_tag = PM8001_INVALID_TAG;
	pm8001_tag_free(pm8001_ha, tag);

With the simpler function calls:

	ccb = pm8001_ccb_alloc(pm8001_ha, pm8001_ha_dev, task);
	if (!ccb)
		...

and

	pm8001_ccb_free(pm8001_ha, ccb);

The pm8001_ccb_alloc() helper ensures that all fields of the ccb info
structure for the newly allocated tag are all initialized, except the
buf_prd field. The pm8001_ccb_free() helper clears the initialized fields
and the ccb tag to ensure that iteration over the adapter ccb_info array
detects ccbs that are in use.

All call site of the pm8001_tag_alloc() function that use a ccb info
associated with an allocated tag are converted to use the new helpers.

Link: https://lore.kernel.org/r/20220220031810.738362-27-damien.lemoal@opensource.wdc.com
Reviewed-by: John Garry &lt;john.garry@huawei.com&gt;
Reviewed-by: Jack Wang &lt;jinpu.wang@ionos.com&gt;
Signed-off-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
</feed>
