All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ondrej Zary <linux@zary.sk>
To: Jens Axboe <axboe@kernel.dk>
Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com>,
	Christoph Hellwig <hch@lst.de>, 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] pata_parport: add driver (PARIDE replacement)
Date: Mon, 14 Mar 2022 21:25:40 +0100	[thread overview]
Message-ID: <202203142125.40532.linux@zary.sk> (raw)
In-Reply-To: <5161ed17-5f55-e851-c2e2-5340cc62fa3b@kernel.dk>

On Monday 14 March 2022 00:19:30 Jens Axboe wrote:
> On 3/13/22 1:15 PM, Ondrej Zary wrote:
> > On Saturday 12 March 2022 15:44:15 Ondrej Zary wrote:
> >> The pata_parport is a libata-based replacement of the old PARIDE
> >> subsystem - driver for parallel port IDE devices.
> >> It uses the original paride low-level protocol drivers but does not
> >> need the high-level drivers (pd, pcd, pf, pt, pg). The IDE devices
> >> behind parallel port adapters are handled by the ATA layer.
> >>
> >> This will allow paride and its high-level drivers to be removed.
> >>
> >> paride and pata_parport are mutually exclusive because the compiled
> >> protocol drivers are incompatible.
> >>
> >> Tested with Imation SuperDisk LS-120 and HP C4381A (both use EPAT
> >> chip).
> >>
> >> Note: EPP-32 mode is buggy in EPAT - and also in all other protocol
> >> drivers - they don't handle non-multiple-of-4 block transfers
> >> correctly. This causes problems with LS-120 drive.
> >> There is also another bug in EPAT: EPP modes don't work unless a 4-bit
> >> or 8-bit mode is used first (probably some initialization missing?).
> >> Once the device is initialized, EPP works until power cycle.
> >>
> >> So after device power on, you have to:
> >> echo "parport0 epat 0" >/sys/bus/pata_parport/new_device
> >> echo pata_parport.0 >/sys/bus/pata_parport/delete_device
> >> echo "parport0 epat 4" >/sys/bus/pata_parport/new_device
> >> (autoprobe will initialize correctly as it tries the slowest modes
> >> first but you'll get the broken EPP-32 mode)
> > 
> > Found a bug - the same device can be registered multiple times. Fix
> > will be in v2. But this revealed a bigger problem: pi_connect can
> > sleep (uses parport_claim_or_block) and libata does not like that. Any
> > ideas how to fix this?
> 
> I think you'd need two things here:
> 
> - The blk-mq queue should be registered with BLK_MQ_F_BLOCKING, which
>   will allow blocking off the queue_rq path.

My knowledge about blk-mq is exactly zero. After grepping the code, I guess that BLK_MQ_F_BLOCKING should be used by the block device drivers - sd and sr?
 
> - You need to look at making libata safe wrt calling ata_qc_issue()
>   outside the lock. Should probably be fine if you just gate that on
>   whether or not the queue was setup in blocking mode, as that doesn't
>   currently exist in libata.
> 


-- 
Ondrej Zary

  reply	other threads:[~2022-03-14 20:25 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-12 14:44 [PATCH] pata_parport: add driver (PARIDE replacement) Ondrej Zary
2022-03-13 19:15 ` Ondrej Zary
2022-03-13 23:19   ` Jens Axboe
2022-03-14 20:25     ` Ondrej Zary [this message]
2022-03-14 20:29       ` Jens Axboe
2022-03-15  4:22         ` Damien Le Moal
2022-03-15 18:44           ` Ondrej Zary
2022-03-15 18:47             ` Jens Axboe
2022-03-15 21:17               ` Ondrej Zary
2022-03-16  0:19                 ` Damien Le Moal
2022-03-15  8:24         ` Christoph Hellwig
2022-03-13 20:38 ` Sergey Shtylyov
2022-03-13 21:19   ` Ondrej Zary
2022-03-16  8:50     ` Sergey Shtylyov
2022-03-16 11:28       ` Ondrej Zary
2022-03-16 11:44         ` Damien Le Moal
2022-03-16 12:58           ` Ondrej Zary
2022-10-19  7:34             ` Christoph Hellwig
2022-10-19 18:58               ` Ondrej Zary
2022-11-12 11:17               ` Ondrej Zary
2022-11-13 23:23                 ` Damien Le Moal
2022-11-14  7:53                   ` Ondrej Zary
2022-11-14  8:03                     ` Damien Le Moal
2022-11-14 19:25                       ` Ondrej Zary
2022-11-15  3:06                         ` Damien Le Moal
2022-11-15  8:04                           ` Hannes Reinecke
2022-11-15 14:56                           ` Ondrej Zary
2022-11-16  1:30                             ` Damien Le Moal
2022-12-12 22:55                               ` Ondrej Zary
2022-12-12 23:07                                 ` Damien Le Moal
2022-12-13  6:22                                 ` Christoph Hellwig

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=202203142125.40532.linux@zary.sk \
    --to=linux@zary.sk \
    --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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.