linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Shtylyov <s.shtylyov@omp.ru>
To: Ondrej Zary <linux@zary.sk>,
	Damien Le Moal <damien.lemoal@opensource.wdc.com>,
	Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
	Tim Waugh <tim@cyberelk.net>, <linux-block@vger.kernel.org>,
	<linux-parport@lists.infradead.org>, <linux-ide@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 11/32] parport_pc: add 16-bit and 8-bit fast EPP transfer flags
Date: Sat, 11 Mar 2023 23:31:47 +0300	[thread overview]
Message-ID: <6933a0fe-012d-d0e4-78e5-e651ab5f80a0@omp.ru> (raw)
In-Reply-To: <460ae7d7-a12d-cef3-4343-ac633e15016f@omp.ru>

On 3/11/23 11:09 PM, Sergey Shtylyov wrote:

>> PARPORT_EPP_FAST flag currently uses 32-bit I/O port access for data
>> read/write (insl/outsl).
>> Add PARPORT_EPP_FAST_16 and PARPORT_EPP_FAST_8 that use insw/outsw
>> and insb/outsb (and PARPORT_EPP_FAST_32 as alias for PARPORT_EPP_FAST).
>>
>> Signed-off-by: Ondrej Zary <linux@zary.sk>
>> ---
>>  drivers/parport/parport_pc.c | 20 ++++++++++++++++----
>>  include/uapi/linux/parport.h |  3 +++
>>  2 files changed, 19 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
>> index 5784dc20fb38..eda4e4e6d4e8 100644
>> --- a/drivers/parport/parport_pc.c
>> +++ b/drivers/parport/parport_pc.c
>> @@ -298,9 +298,15 @@ static size_t parport_pc_epp_read_data(struct parport *port, void *buf,
>>  		}
>>  		return got;
>>  	}
>> -	if ((flags & PARPORT_EPP_FAST) && (length > 1)) {
>> -		if (!(((long)buf | length) & 0x03))
>> +	if ((length > 1) && ((flags & PARPORT_EPP_FAST_32)
>> +			   || flags & PARPORT_EPP_FAST_16
>> +			   || flags & PARPORT_EPP_FAST_8)) {
> 
>    Why not:
> 
>> +		if ((flags & PARPORT_EPP_FAST_32)
>> +		    && !(((long)buf | length) & 0x03))
>>  			insl(EPPDATA(port), buf, (length >> 2));
>> +		else if ((flags & PARPORT_EPP_FAST_16)
>> +			 && !(((long)buf | length) & 0x01))
>> +			insw(EPPDATA(port), buf, length >> 1);
>>  		else
>>  			insb(EPPDATA(port), buf, length);
>

   Oopsie, s/th went wrong while editing... :-/

[...]

MBR, Sergey

  reply	other threads:[~2023-03-11 20:31 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07 22:45 [PATCH 00/32] pata_parport-bpck6: rework bpck6 protocol driver Ondrej Zary
2023-03-07 22:45 ` [PATCH 01/32] pata_parport-bpck6: remove useless defines Ondrej Zary
2023-03-08 10:28   ` Sergei Shtylyov
2023-03-07 22:45 ` [PATCH 02/32] pata_parport-bpck6: remove useless range check from read/write_regr Ondrej Zary
2023-03-08 18:03   ` Sergey Shtylyov
2023-03-07 22:45 ` [PATCH 03/32] pata_parport-bpck6: don't cast pi->pardev to struct pardevice * Ondrej Zary
2023-03-08 18:15   ` Sergey Shtylyov
2023-03-07 22:45 ` [PATCH 04/32] pata_parport-bpck6: pass around struct pi_adapter * Ondrej Zary
2023-03-08 20:33   ` Sergey Shtylyov
2023-03-09 20:58     ` Ondrej Zary
2023-03-10 10:19       ` Sergey Shtylyov
2023-03-08 20:34   ` Sergey Shtylyov
2023-03-07 22:46 ` [PATCH 05/32] pata_parport-bpck6: remove lpt_addr from struct ppc_storage Ondrej Zary
2023-03-11 15:43   ` Sergey Shtylyov
2023-03-07 22:46 ` [PATCH 06/32] pata_parport-bpck6: remove ppc_id " Ondrej Zary
2023-03-08 20:41   ` Sergey Shtylyov
2023-03-07 22:46 ` [PATCH 07/32] pata_parport-bpck6: remove org_* " Ondrej Zary
2023-03-08 20:43   ` Sergey Shtylyov
2023-03-07 22:46 ` [PATCH 08/32] pata_parport-bpck6: remove mode " Ondrej Zary
2023-03-11 17:07   ` Sergey Shtylyov
2023-03-07 22:46 ` [PATCH 09/32] pata_parport-bpck6: remove " Ondrej Zary
2023-03-11 19:30   ` Sergey Shtylyov
2023-03-07 22:46 ` [PATCH 10/32] pata_parport-bpck6: remove parallel port bit defines Ondrej Zary
2023-03-07 22:46 ` [PATCH 11/32] parport_pc: add 16-bit and 8-bit fast EPP transfer flags Ondrej Zary
2023-03-11 20:09   ` Sergey Shtylyov
2023-03-11 20:31     ` Sergey Shtylyov [this message]
2023-03-07 22:46 ` [PATCH 12/32] pata_parport-bpck6: use parport access functions instead of port I/O Ondrej Zary
2023-03-07 22:46 ` [PATCH 13/32] pata_parport-bpck6: use parport_frob_control and remove CUR_CTRL Ondrej Zary
2023-03-07 22:46 ` [PATCH 14/32] pata_parport-bpck6: remove PPC_FLAGS Ondrej Zary
2023-03-11 20:12   ` Sergey Shtylyov
2023-03-07 22:46 ` [PATCH 15/32] pata_parport-bpck6: remove ppc6_close Ondrej Zary
2023-03-07 22:46 ` [PATCH 16/32] pata_parport-bpck6: merge ppc6_rd_port into bpck6_read_regr Ondrej Zary
2023-03-07 22:46 ` [PATCH 17/32] pata_parport-bpck6: merge ppc6_wr_port into bpck6_write_regr Ondrej Zary
2023-03-07 22:46 ` [PATCH 18/32] pata_parport-bpck6: merge ppc6_rd_port16_blk into bpck6_read_block Ondrej Zary
2023-03-07 22:46 ` [PATCH 19/32] pata_parport-bpck6: merge ppc6_wr_port16_blk into bpck6_write_block Ondrej Zary
2023-03-07 22:46 ` [PATCH 20/32] pata_parport-bpck6: merge ppc6_rd_data_blk into bpck6_read_block Ondrej Zary
2023-03-07 22:46 ` [PATCH 21/32] pata_parport-bpck6: merge ppc6_wr_data_blk into bpck6_write_block Ondrej Zary
2023-03-07 22:46 ` [PATCH 22/32] pata_parport-bpck6: move ppc6_wait_for_fifo to bpck6.c and rename Ondrej Zary
2023-03-07 22:46 ` [PATCH 23/32] pata_parport-bpck6: move ppc6_wr_extout " Ondrej Zary
2023-03-07 22:46 ` [PATCH 24/32] pata_parport-bpck6: move ppc6_open " Ondrej Zary
2023-03-07 22:46 ` [PATCH 25/32] pata_parport-bpck6: merge ppc6_select into bpck6_open Ondrej Zary
2023-03-07 22:46 ` [PATCH 26/32] pata_parport-bpck6: move ppc6_deselect to bpck6.c and rename Ondrej Zary
2023-03-07 22:46 ` [PATCH 27/32] pata_parport-bpck6: move ppc6_send_cmd " Ondrej Zary
2023-03-07 22:46 ` [PATCH 28/32] pata_parport-bpck6: move ppc6_rd_data_byte " Ondrej Zary
2023-03-07 22:46 ` [PATCH 29/32] pata_parport-bpck6: move ppc6_wr_data_byte " Ondrej Zary
2023-03-07 22:46 ` [PATCH 30/32] pata_parport-bpck6: move defines and mode_map to bpck6.c Ondrej Zary
2023-03-07 22:46 ` [PATCH 31/32] pata_parport-bpck6: delete ppc6lnx.c Ondrej Zary
2023-03-11 20:15   ` Sergey Shtylyov
2023-03-07 22:46 ` [PATCH 32/32] pata_parport-bpck6: reduce indents in bpck6_open Ondrej Zary
2023-03-11 20:00 ` [PATCH 00/32] pata_parport-bpck6: rework bpck6 protocol driver Sergey Shtylyov
2023-03-18 18:55   ` Ondrej Zary
2023-03-19 20:02     ` Sergey Shtylyov
2023-03-22 12:10       ` Ondrej Zary
2023-03-22 22:34         ` Damien Le Moal
2023-03-26  9:08         ` Sudip Mukherjee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6933a0fe-012d-d0e4-78e5-e651ab5f80a0@omp.ru \
    --to=s.shtylyov@omp.ru \
    --cc=axboe@kernel.dk \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parport@lists.infradead.org \
    --cc=linux@zary.sk \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=tim@cyberelk.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).