<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/scsi/3w-9xxx.c, branch v6.2-rc1</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v6.2-rc1</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v6.2-rc1'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2022-09-07T02:22:24+00:00</updated>
<entry>
<title>scsi: 3w-9xxx: Avoid disabling device if failing to enable it</title>
<updated>2022-09-07T02:22:24+00:00</updated>
<author>
<name>Letu Ren</name>
<email>fantasquex@gmail.com</email>
</author>
<published>2022-08-29T11:01:15+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=7eff437b5ee1309b34667844361c6bbb5c97df05'/>
<id>urn:sha1:7eff437b5ee1309b34667844361c6bbb5c97df05</id>
<content type='text'>
The original code will "goto out_disable_device" and call
pci_disable_device() if pci_enable_device() fails. The kernel will generate
a warning message like "3w-9xxx 0000:00:05.0: disabling already-disabled
device".

We shouldn't disable a device that failed to be enabled. A simple return is
fine.

Link: https://lore.kernel.org/r/20220829110115.38789-1-fantasquex@gmail.com
Reported-by: Zheyu Ma &lt;zheyuma97@gmail.com&gt;
Signed-off-by: Letu Ren &lt;fantasquex@gmail.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: 3w-9xxx: Switch to attribute groups</title>
<updated>2021-10-17T01:45:53+00:00</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2021-10-12T23:35:19+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=bd21c1e9891fa1acd8c1efbfbfdcd82a3fef0e4c'/>
<id>urn:sha1:bd21c1e9891fa1acd8c1efbfbfdcd82a3fef0e4c</id>
<content type='text'>
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.

Link: https://lore.kernel.org/r/20211012233558.4066756-8-bvanassche@acm.org
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: core: Remove the 'done' argument from SCSI queuecommand_lck functions</title>
<updated>2021-10-17T01:32:16+00:00</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2021-10-07T20:46:14+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=af049dfd0b105bab32170d1c68826a4cd8424efd'/>
<id>urn:sha1:af049dfd0b105bab32170d1c68826a4cd8424efd</id>
<content type='text'>
The DEF_SCSI_QCMD() macro passes the addresses of the SCSI host lock and
also that of the scsi_done function to the queuecommand_lck() function
implementations. Remove the 'scsi_done' argument since its address is
now a constant and instead call 'scsi_done' directly from inside the
queuecommand_lck() functions.

Link: https://lore.kernel.org/r/20211007204618.2196847-14-bvanassche@acm.org
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: 3w-9xxx: Call scsi_done() directly</title>
<updated>2021-10-17T01:28:44+00:00</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2021-10-07T20:28:03+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=3e6d3832dc1b4d6426733b357412a96f90b0e368'/>
<id>urn:sha1:3e6d3832dc1b4d6426733b357412a96f90b0e368</id>
<content type='text'>
Conditional statements are faster than indirect calls. Hence call
scsi_done() directly.

Link: https://lore.kernel.org/r/20211007202923.2174984-9-bvanassche@acm.org
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: core: Drop obsolete Linux-specific SCSI status codes</title>
<updated>2021-06-01T03:59:18+00:00</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2021-04-27T08:30:46+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=3d45cefc8edd7f560e6c97a8d9928ad571f76dec'/>
<id>urn:sha1:3d45cefc8edd7f560e6c97a8d9928ad571f76dec</id>
<content type='text'>
Originally the SCSI subsystem has been using 'special' SCSI status codes,
which were the SAM-specified ones but shifted by 1.  As most drivers have
now been modified to use the SAM-specified ones, having two nearly
identical sets of definitions only causes confusion.

The Linux-specifed SCSI status codes have been marked obsolete for several
years so drop them and use the SAM-specified status codes throughout.

Link: https://lore.kernel.org/r/20210427083046.31620-41-hare@suse.de
Reviewed-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Reviewed-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: 3w-9xxx: Fix endianness issues in command packets</title>
<updated>2021-05-15T22:01:34+00:00</updated>
<author>
<name>Samuel Holland</name>
<email>samuel@sholland.org</email>
</author>
<published>2021-04-27T23:59:15+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=05f7f1b9ee8273eab805da3d5e2d064872aa75b1'/>
<id>urn:sha1:05f7f1b9ee8273eab805da3d5e2d064872aa75b1</id>
<content type='text'>
The controller expects all data it sends/receives to be little-endian.
Therefore, the packet struct definitions should use the __le16/32/64
types. Once those are correct, sparse reports several issues with the
driver code, which are fixed here as well.

The main issue observed was at the call to scsi_set_resid(), where the
byteswapped parameter would eventually trigger the alignment check at
drivers/scsi/sd.c:2009. At that point, the kernel would continuously
complain about an "Unaligned partial completion", and no further I/O could
occur.

This gets the controller working on big endian powerpc64.

Link: https://lore.kernel.org/r/20210427235915.39211-4-samuel@sholland.org
Signed-off-by: Samuel Holland &lt;samuel@sholland.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: 3w-9xxx: Use flexible array members to avoid struct padding</title>
<updated>2021-05-15T22:01:33+00:00</updated>
<author>
<name>Samuel Holland</name>
<email>samuel@sholland.org</email>
</author>
<published>2021-04-27T23:59:13+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=44c5027bb5c8bbdc2aea2141dc32fe72c3f3988a'/>
<id>urn:sha1:44c5027bb5c8bbdc2aea2141dc32fe72c3f3988a</id>
<content type='text'>
In preparation for removing the "#pragma pack(1)" from the driver, fix all
instances where a trailing array member could be replaced by a flexible
array member. Since a flexible array member has zero size, it introduces no
padding, whether or not the struct is packed.

Link: https://lore.kernel.org/r/20210427235915.39211-2-samuel@sholland.org
Signed-off-by: Samuel Holland &lt;samuel@sholland.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: 3w-9xxx: Remove a few set but unused variables</title>
<updated>2021-03-16T02:29:00+00:00</updated>
<author>
<name>Lee Jones</name>
<email>lee.jones@linaro.org</email>
</author>
<published>2021-03-12T09:47:37+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=ea7fb5344ad00accb016cad11f88bfd0e8cbcca1'/>
<id>urn:sha1:ea7fb5344ad00accb016cad11f88bfd0e8cbcca1</id>
<content type='text'>
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/3w-9xxx.c: In function ‘twa_empty_response_queue’:
 drivers/scsi/3w-9xxx.c:942:24: warning: variable ‘response_que_value’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/3w-9xxx.c: In function ‘twa_scsi_biosparam’:
 drivers/scsi/3w-9xxx.c:1701:23: warning: variable ‘tw_dev’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/3w-9xxx.c: In function ‘twa_scsiop_execute_scsi’:
 drivers/scsi/3w-9xxx.c:1812:22: warning: variable ‘sglist’ set but not used [-Wunused-but-set-variable]

Link: https://lore.kernel.org/r/20210312094738.2207817-30-lee.jones@linaro.org
Cc: Adam Radford &lt;aradford@gmail.com&gt;
Cc: "James E.J. Bottomley" &lt;jejb@linux.ibm.com&gt;
Cc: "Martin K. Petersen" &lt;martin.petersen@oracle.com&gt;
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: 3w-9xxx: Whitespace cleanup</title>
<updated>2021-01-23T02:14:07+00:00</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2021-01-13T09:04:28+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=bf4eebbf53c918d364907ddaf1f47f7c340d9494'/>
<id>urn:sha1:bf4eebbf53c918d364907ddaf1f47f7c340d9494</id>
<content type='text'>
Link: https://lore.kernel.org/r/20210113090500.129644-4-hare@suse.de
Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: 3w-9xxx: Use generic power management</title>
<updated>2020-11-26T04:23:21+00:00</updated>
<author>
<name>Vaibhav Gupta</name>
<email>vaibhavgupta40@gmail.com</email>
</author>
<published>2020-11-02T16:47:23+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=d53ae6bbeb71e1d3c1b85e8befce6379642ed2d9'/>
<id>urn:sha1:d53ae6bbeb71e1d3c1b85e8befce6379642ed2d9</id>
<content type='text'>
Drivers should do only device-specific jobs. But in general, drivers using
legacy PCI PM framework for .suspend()/.resume() have to manage many PCI
PM-related tasks themselves which can be done by PCI Core itself. This
brings extra load on the driver and it directly calls PCI helper functions
to handle them.

Switch to the new generic framework by updating function signatures and
define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove
unnecessary calls to the PCI Helper functions along with the legacy
.suspend &amp; .resume bindings.

Link: https://lore.kernel.org/r/20201102164730.324035-23-vaibhavgupta40@gmail.com
Signed-off-by: Vaibhav Gupta &lt;vaibhavgupta40@gmail.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
</feed>
