<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/scsi/arm, branch v4.10</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>scsi: ncr5380: Use correct types for DMA routines</title>
<updated>2016-11-08T22:29:48+00:00</updated>
<author>
<name>Finn Thain</name>
<email>fthain@telegraphics.com.au</email>
</author>
<published>2016-10-10T04:46:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4a98f896bf2c66a69517fc5e10dc67288cb8da93'/>
<id>4a98f896bf2c66a69517fc5e10dc67288cb8da93</id>
<content type='text'>
Apply prototypes to get consistent function signatures for the DMA
functions implemented in the board-specific drivers. To avoid using
macros to alter actual parameters, some of those functions are reworked
slightly.

This is a step toward the goal of passing the board-specific routines
to the core driver using an ops struct (as in a platform driver or
library module).

This also helps fix some inconsistent types: where the core driver uses
ints (cmd-&gt;SCp.this_residual and hostdata-&gt;dma_len) for keeping track of
transfers, certain board-specific routines used unsigned long.

While we are fixing these function signatures, pass the hostdata pointer
to DMA routines instead of a Scsi_Host pointer, for shorter and faster
code.

Signed-off-by: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.com&gt;
Tested-by: Ondrej Zary &lt;linux@rainbow-software.org&gt;
Tested-by: Michael Schmitz &lt;schmitzmic@gmail.com&gt;
Acked-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Apply prototypes to get consistent function signatures for the DMA
functions implemented in the board-specific drivers. To avoid using
macros to alter actual parameters, some of those functions are reworked
slightly.

This is a step toward the goal of passing the board-specific routines
to the core driver using an ops struct (as in a platform driver or
library module).

This also helps fix some inconsistent types: where the core driver uses
ints (cmd-&gt;SCp.this_residual and hostdata-&gt;dma_len) for keeping track of
transfers, certain board-specific routines used unsigned long.

While we are fixing these function signatures, pass the hostdata pointer
to DMA routines instead of a Scsi_Host pointer, for shorter and faster
code.

Signed-off-by: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.com&gt;
Tested-by: Ondrej Zary &lt;linux@rainbow-software.org&gt;
Tested-by: Michael Schmitz &lt;schmitzmic@gmail.com&gt;
Acked-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: ncr5380: Expedite register polling</title>
<updated>2016-11-08T22:29:48+00:00</updated>
<author>
<name>Finn Thain</name>
<email>fthain@telegraphics.com.au</email>
</author>
<published>2016-10-10T04:46:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7c60663143c29ea64f51e692f950f8619e0e4c77'/>
<id>7c60663143c29ea64f51e692f950f8619e0e4c77</id>
<content type='text'>
Avoid the call to NCR5380_poll_politely2() when possible. The call is
easily short-circuited on the PIO fast path, using the inline wrapper.
This requires that the NCR5380_read macro be made available before
any #include "NCR5380.h" so a few declarations have to be moved too.

Signed-off-by: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.com&gt;
Tested-by: Ondrej Zary &lt;linux@rainbow-software.org&gt;
Tested-by: Michael Schmitz &lt;schmitzmic@gmail.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Avoid the call to NCR5380_poll_politely2() when possible. The call is
easily short-circuited on the PIO fast path, using the inline wrapper.
This requires that the NCR5380_read macro be made available before
any #include "NCR5380.h" so a few declarations have to be moved too.

Signed-off-by: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.com&gt;
Tested-by: Ondrej Zary &lt;linux@rainbow-software.org&gt;
Tested-by: Michael Schmitz &lt;schmitzmic@gmail.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: ncr5380: Use correct types for device register accessors</title>
<updated>2016-11-08T22:29:48+00:00</updated>
<author>
<name>Finn Thain</name>
<email>fthain@telegraphics.com.au</email>
</author>
<published>2016-10-10T04:46:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=61e1ce588b101f13a4c6f713b95d65551c8572e3'/>
<id>61e1ce588b101f13a4c6f713b95d65551c8572e3</id>
<content type='text'>
For timeout values adopt unsigned long, which is the type of jiffies etc.

For chip register values and bit masks pass u8, which is the return type
of readb, inb etc.

For device register offsets adopt unsigned int, as it is suitable for
adding to base addresses.

Pass the NCR5380_hostdata pointer to the board-specific routines instead
of the Scsi_Host pointer. The board-specific code is concerned with
hardware and not with SCSI protocol or the mid-layer.

Signed-off-by: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.com&gt;
Tested-by: Ondrej Zary &lt;linux@rainbow-software.org&gt;
Tested-by: Michael Schmitz &lt;schmitzmic@gmail.com&gt;
Acked-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For timeout values adopt unsigned long, which is the type of jiffies etc.

For chip register values and bit masks pass u8, which is the return type
of readb, inb etc.

For device register offsets adopt unsigned int, as it is suitable for
adding to base addresses.

Pass the NCR5380_hostdata pointer to the board-specific routines instead
of the Scsi_Host pointer. The board-specific code is concerned with
hardware and not with SCSI protocol or the mid-layer.

Signed-off-by: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.com&gt;
Tested-by: Ondrej Zary &lt;linux@rainbow-software.org&gt;
Tested-by: Michael Schmitz &lt;schmitzmic@gmail.com&gt;
Acked-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: ncr5380: Store IO ports and addresses in host private data</title>
<updated>2016-11-08T22:29:48+00:00</updated>
<author>
<name>Finn Thain</name>
<email>fthain@telegraphics.com.au</email>
</author>
<published>2016-10-10T04:46:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=820682b1b34ebb97434c4abc00c744870364e2be'/>
<id>820682b1b34ebb97434c4abc00c744870364e2be</id>
<content type='text'>
The various 5380 drivers inconsistently store register pointers
either in the Scsi_Host struct "legacy crap" area or in special,
board-specific members of the NCR5380_hostdata struct. Uniform
use of the latter struct makes for simpler and faster code (see
the following patches) and helps to reduce use of the
NCR5380_implementation_fields macro.

Signed-off-by: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.com&gt;
Tested-by: Ondrej Zary &lt;linux@rainbow-software.org&gt;
Tested-by: Michael Schmitz &lt;schmitzmic@gmail.com&gt;
Acked-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The various 5380 drivers inconsistently store register pointers
either in the Scsi_Host struct "legacy crap" area or in special,
board-specific members of the NCR5380_hostdata struct. Uniform
use of the latter struct makes for simpler and faster code (see
the following patches) and helps to reduce use of the
NCR5380_implementation_fields macro.

Signed-off-by: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.com&gt;
Tested-by: Ondrej Zary &lt;linux@rainbow-software.org&gt;
Tested-by: Michael Schmitz &lt;schmitzmic@gmail.com&gt;
Acked-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: cumana_1: Remove unused cumanascsi_setup() function</title>
<updated>2016-11-08T22:29:47+00:00</updated>
<author>
<name>Finn Thain</name>
<email>fthain@telegraphics.com.au</email>
</author>
<published>2016-10-10T04:46:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b223680da0627eccf38ba28453746ac7bee06342'/>
<id>b223680da0627eccf38ba28453746ac7bee06342</id>
<content type='text'>
Signed-off-by: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.com&gt;
Acked-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.com&gt;
Acked-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: rename SCSI_MAX_{SG, SG_CHAIN}_SEGMENTS</title>
<updated>2016-04-15T20:53:14+00:00</updated>
<author>
<name>Ming Lin</name>
<email>ming.l@ssi.samsung.com</email>
</author>
<published>2016-04-04T21:48:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=65e8617fba17732b4c68d3369a621725838b6f28'/>
<id>65e8617fba17732b4c68d3369a621725838b6f28</id>
<content type='text'>
Rename SCSI_MAX_SG_SEGMENTS to SG_CHUNK_SIZE, which means the amount
we fit into a single scatterlist chunk.

Rename SCSI_MAX_SG_CHAIN_SEGMENTS to SG_MAX_SEGMENTS.

Will move these 2 generic definitions to scatterlist.h later.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt; (for ib_srp changes)
Signed-off-by: Ming Lin &lt;ming.l@ssi.samsung.com&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename SCSI_MAX_SG_SEGMENTS to SG_CHUNK_SIZE, which means the amount
we fit into a single scatterlist chunk.

Rename SCSI_MAX_SG_CHAIN_SEGMENTS to SG_MAX_SEGMENTS.

Will move these 2 generic definitions to scatterlist.h later.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt; (for ib_srp changes)
Signed-off-by: Ming Lin &lt;ming.l@ssi.samsung.com&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ncr5380: Remove DONT_USE_INTR and AUTOPROBE_IRQ macros</title>
<updated>2016-04-11T20:57:09+00:00</updated>
<author>
<name>Finn Thain</name>
<email>fthain@telegraphics.com.au</email>
</author>
<published>2016-03-23T10:10:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a46865dcf1f7166808664ab096678f81d4fbb853'/>
<id>a46865dcf1f7166808664ab096678f81d4fbb853</id>
<content type='text'>
Signed-off-by: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.com&gt;
Tested-by: Michael Schmitz &lt;schmitzmic@gmail.com&gt;
Tested-by: Ondrej Zary &lt;linux@rainbow-software.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.com&gt;
Tested-by: Michael Schmitz &lt;schmitzmic@gmail.com&gt;
Tested-by: Ondrej Zary &lt;linux@rainbow-software.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ncr5380: Merge DMA implementation from atari_NCR5380 core driver</title>
<updated>2016-04-11T20:57:09+00:00</updated>
<author>
<name>Finn Thain</name>
<email>fthain@telegraphics.com.au</email>
</author>
<published>2016-03-23T10:10:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8053b0ee79c0129e827ce8f222398ff4b332dfd7'/>
<id>8053b0ee79c0129e827ce8f222398ff4b332dfd7</id>
<content type='text'>
Adopt the DMA implementation from atari_NCR5380.c. This means that
atari_scsi and sun3_scsi can make use of the NCR5380.c core driver
and the atari_NCR5380.c driver fork can be made redundant.

Signed-off-by: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.com&gt;
Tested-by: Michael Schmitz &lt;schmitzmic@gmail.com&gt;
Tested-by: Ondrej Zary &lt;linux@rainbow-software.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adopt the DMA implementation from atari_NCR5380.c. This means that
atari_scsi and sun3_scsi can make use of the NCR5380.c core driver
and the atari_NCR5380.c driver fork can be made redundant.

Signed-off-by: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.com&gt;
Tested-by: Michael Schmitz &lt;schmitzmic@gmail.com&gt;
Tested-by: Ondrej Zary &lt;linux@rainbow-software.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ncr5380: Adopt uniform DMA setup convention</title>
<updated>2016-04-11T20:57:09+00:00</updated>
<author>
<name>Finn Thain</name>
<email>fthain@telegraphics.com.au</email>
</author>
<published>2016-03-23T10:10:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=438af51c642926f1c1844846bee1c3fb568dcd64'/>
<id>438af51c642926f1c1844846bee1c3fb568dcd64</id>
<content type='text'>
Standardize the DMA setup hooks so that the DMA implementation in
atari_NCR5380.c can be reconciled with pseudo DMA implementation in
NCR5380.c.

Calls to NCR5380_dma_recv_setup() and NCR5380_dma_send_setup() return
a negative value on failure, zero on PDMA transfer success and a positive
byte count for DMA setup success.

This convention is not entirely new, but is now applied consistently.

Also remove a pointless Status Register access: the *phase assignment is
redundant because after NCR5380_transfer_dma() returns control to
NCR5380_information_transfer(), that routine then returns control
to NCR5380_main(), which means *phase is dead.

Signed-off-by: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.com&gt;
Tested-by: Michael Schmitz &lt;schmitzmic@gmail.com&gt;
Tested-by: Ondrej Zary &lt;linux@rainbow-software.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Standardize the DMA setup hooks so that the DMA implementation in
atari_NCR5380.c can be reconciled with pseudo DMA implementation in
NCR5380.c.

Calls to NCR5380_dma_recv_setup() and NCR5380_dma_send_setup() return
a negative value on failure, zero on PDMA transfer success and a positive
byte count for DMA setup success.

This convention is not entirely new, but is now applied consistently.

Also remove a pointless Status Register access: the *phase assignment is
redundant because after NCR5380_transfer_dma() returns control to
NCR5380_information_transfer(), that routine then returns control
to NCR5380_main(), which means *phase is dead.

Signed-off-by: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.com&gt;
Tested-by: Michael Schmitz &lt;schmitzmic@gmail.com&gt;
Tested-by: Ondrej Zary &lt;linux@rainbow-software.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ncr5380: Use DMA hooks for PDMA</title>
<updated>2016-04-11T20:57:09+00:00</updated>
<author>
<name>Finn Thain</name>
<email>fthain@telegraphics.com.au</email>
</author>
<published>2016-03-23T10:10:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6c4b88ca59ba1a68f707f19dba1744ed19e89fce'/>
<id>6c4b88ca59ba1a68f707f19dba1744ed19e89fce</id>
<content type='text'>
Those wrapper drivers which use DMA define the REAL_DMA macro and
those which use pseudo DMA define PSEUDO_DMA. These macros need to be
removed for a number of reasons, not least of which is to have drivers
share more code.

Redefine the PDMA send and receive hooks as DMA setup hooks, so that the
DMA code can be shared by all 5380 wrapper drivers. This will help to
reunify the forked core driver.

Signed-off-by: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.com&gt;
Tested-by: Michael Schmitz &lt;schmitzmic@gmail.com&gt;
Tested-by: Ondrej Zary &lt;linux@rainbow-software.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Those wrapper drivers which use DMA define the REAL_DMA macro and
those which use pseudo DMA define PSEUDO_DMA. These macros need to be
removed for a number of reasons, not least of which is to have drivers
share more code.

Redefine the PDMA send and receive hooks as DMA setup hooks, so that the
DMA code can be shared by all 5380 wrapper drivers. This will help to
reunify the forked core driver.

Signed-off-by: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.com&gt;
Tested-by: Michael Schmitz &lt;schmitzmic@gmail.com&gt;
Tested-by: Ondrej Zary &lt;linux@rainbow-software.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
