* [PATCH] pata_scc: add proper cable detection method
@ 2011-10-11 18:07 Bartlomiej Zolnierkiewicz
2011-10-11 19:54 ` Alan Cox
0 siblings, 1 reply; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2011-10-11 18:07 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-ide, linux-kernel
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] pata_scc: add proper cable detection method
Use standard ata_cable_80wire() method for the cable detection,
as a bonus this allows us to use the default ->prereset method.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
earlier references:
https://lkml.org/lkml/2009/11/25/373
drivers/ata/pata_scc.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
Index: b/drivers/ata/pata_scc.c
===================================================================
--- a/drivers/ata/pata_scc.c
+++ b/drivers/ata/pata_scc.c
@@ -827,18 +827,6 @@ static unsigned int scc_data_xfer (struc
}
/**
- * scc_pata_prereset - prepare for reset
- * @ap: ATA port to be reset
- * @deadline: deadline jiffies for the operation
- */
-
-static int scc_pata_prereset(struct ata_link *link, unsigned long deadline)
-{
- link->ap->cbl = ATA_CBL_PATA80;
- return ata_sff_prereset(link, deadline);
-}
-
-/**
* scc_postreset - standard postreset callback
* @ap: the target ata_port
* @classes: classes of attached devices
@@ -947,7 +935,7 @@ static struct ata_port_operations scc_pa
.bmdma_status = scc_bmdma_status,
.sff_data_xfer = scc_data_xfer,
- .prereset = scc_pata_prereset,
+ .cable_detect = ata_cable_80wire,
.softreset = scc_softreset,
.postreset = scc_postreset,
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] pata_scc: add proper cable detection method
2011-10-11 18:07 [PATCH] pata_scc: add proper cable detection method Bartlomiej Zolnierkiewicz
@ 2011-10-11 19:54 ` Alan Cox
2011-10-12 15:16 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 4+ messages in thread
From: Alan Cox @ 2011-10-11 19:54 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: Jeff Garzik, linux-ide, linux-kernel
On Tue, 11 Oct 2011 20:07:24 +0200
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:
> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Subject: [PATCH] pata_scc: add proper cable detection method
>
> Use standard ata_cable_80wire() method for the cable detection,
> as a bonus this allows us to use the default ->prereset method.
What documentation have you got that confirms that the hardcoding is not
needed. It goes back to the original code and I see nothing saying that
the device has standard PC style cable detect.
You should also I think cc the Toshiba maintainers
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] pata_scc: add proper cable detection method
2011-10-11 19:54 ` Alan Cox
@ 2011-10-12 15:16 ` Bartlomiej Zolnierkiewicz
2011-10-13 7:23 ` akira2.iguchi
0 siblings, 1 reply; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2011-10-12 15:16 UTC (permalink / raw)
To: Alan Cox; +Cc: Jeff Garzik, linux-ide, linux-kernel, Kou Ishizaki, Akira Iguchi
Alan Cox wrote:
> On Tue, 11 Oct 2011 20:07:24 +0200
> Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:
>
> > From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> > Subject: [PATCH] pata_scc: add proper cable detection method
> >
> > Use standard ata_cable_80wire() method for the cable detection,
> > as a bonus this allows us to use the default ->prereset method.
>
> What documentation have you got that confirms that the hardcoding is not
> needed. It goes back to the original code and I see nothing saying that
> the device has standard PC style cable detect.
The driver predates standard cable detect routines and open-codes its
own one. There should be no functionality changes caused by this patch.
Commit a619f981b ("libata: PATA driver for Celleb") is from Jan 2007
while ata_cable_80wire() was added by commit be0d18d ("libata: cable
detection fixes") in Mar 2007.
> You should also I think cc the Toshiba maintainers
added to cc:.
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] pata_scc: add proper cable detection method
Use standard ata_cable_80wire() method for the cable detection,
as a bonus this allows us to use the default ->prereset method.
Cc: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Cc: Akira Iguchi <akira2.iguchi@toshiba.co.jp>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
earlier references:
https://lkml.org/lkml/2009/11/25/373
drivers/ata/pata_scc.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
Index: b/drivers/ata/pata_scc.c
===================================================================
--- a/drivers/ata/pata_scc.c
+++ b/drivers/ata/pata_scc.c
@@ -827,18 +827,6 @@ static unsigned int scc_data_xfer (struc
}
/**
- * scc_pata_prereset - prepare for reset
- * @ap: ATA port to be reset
- * @deadline: deadline jiffies for the operation
- */
-
-static int scc_pata_prereset(struct ata_link *link, unsigned long deadline)
-{
- link->ap->cbl = ATA_CBL_PATA80;
- return ata_sff_prereset(link, deadline);
-}
-
-/**
* scc_postreset - standard postreset callback
* @ap: the target ata_port
* @classes: classes of attached devices
@@ -947,7 +935,7 @@ static struct ata_port_operations scc_pa
.bmdma_status = scc_bmdma_status,
.sff_data_xfer = scc_data_xfer,
- .prereset = scc_pata_prereset,
+ .cable_detect = ata_cable_80wire,
.softreset = scc_softreset,
.postreset = scc_postreset,
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] pata_scc: add proper cable detection method
2011-10-12 15:16 ` Bartlomiej Zolnierkiewicz
@ 2011-10-13 7:23 ` akira2.iguchi
0 siblings, 0 replies; 4+ messages in thread
From: akira2.iguchi @ 2011-10-13 7:23 UTC (permalink / raw)
To: bzolnier, alan; +Cc: jgarzik, linux-ide, linux-kernel, kou.ishizaki
Thank you for maintaining our code.
This patch makes no difference in functionality.
Acked-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Akira Iguchi <akira2.iguchi@toshiba.co.jp>
> -----Original Message-----
> From: Bartlomiej Zolnierkiewicz [mailto:bzolnier@gmail.com]
> Sent: Thursday, October 13, 2011 12:17 AM
> To: Alan Cox
> Cc: Jeff Garzik; linux-ide@vger.kernel.org;
> linux-kernel@vger.kernel.org; ishizaki ko(石崎 浩 ○府□放Nブ○放送
> 機); iguchi akira(井口 晃 ○Lジ□LS開○LS二)
> Subject: Re: [PATCH] pata_scc: add proper cable detection method
>
> Alan Cox wrote:
>
> > On Tue, 11 Oct 2011 20:07:24 +0200
> > Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:
> >
> > > From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> > > Subject: [PATCH] pata_scc: add proper cable detection method
> > >
> > > Use standard ata_cable_80wire() method for the cable detection, as a
> > > bonus this allows us to use the default ->prereset method.
> >
> > What documentation have you got that confirms that the hardcoding is
> > not needed. It goes back to the original code and I see nothing saying
> > that the device has standard PC style cable detect.
>
> The driver predates standard cable detect routines and open-codes its own
> one. There should be no functionality changes caused by this patch.
>
> Commit a619f981b ("libata: PATA driver for Celleb") is from Jan 2007 while
> ata_cable_80wire() was added by commit be0d18d ("libata: cable detection
> fixes") in Mar 2007.
>
> > You should also I think cc the Toshiba maintainers
>
> added to cc:.
>
> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Subject: [PATCH] pata_scc: add proper cable detection method
>
> Use standard ata_cable_80wire() method for the cable detection, as a bonus
> this allows us to use the default ->prereset method.
>
> Cc: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
> Cc: Akira Iguchi <akira2.iguchi@toshiba.co.jp>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> ---
> earlier references:
> https://lkml.org/lkml/2009/11/25/373
>
> drivers/ata/pata_scc.c | 14 +-------------
> 1 file changed, 1 insertion(+), 13 deletions(-)
>
> Index: b/drivers/ata/pata_scc.c
> ===================================================================
> --- a/drivers/ata/pata_scc.c
> +++ b/drivers/ata/pata_scc.c
> @@ -827,18 +827,6 @@ static unsigned int scc_data_xfer (struc }
>
> /**
> - * scc_pata_prereset - prepare for reset
> - * @ap: ATA port to be reset
> - * @deadline: deadline jiffies for the operation
> - */
> -
> -static int scc_pata_prereset(struct ata_link *link, unsigned long
> deadline) -{
> - link->ap->cbl = ATA_CBL_PATA80;
> - return ata_sff_prereset(link, deadline);
> -}
> -
> -/**
> * scc_postreset - standard postreset callback
> * @ap: the target ata_port
> * @classes: classes of attached devices
> @@ -947,7 +935,7 @@ static struct ata_port_operations scc_pa
> .bmdma_status = scc_bmdma_status,
> .sff_data_xfer = scc_data_xfer,
>
> - .prereset = scc_pata_prereset,
> + .cable_detect = ata_cable_80wire,
> .softreset = scc_softreset,
> .postreset = scc_postreset,
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-10-13 7:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-11 18:07 [PATCH] pata_scc: add proper cable detection method Bartlomiej Zolnierkiewicz
2011-10-11 19:54 ` Alan Cox
2011-10-12 15:16 ` Bartlomiej Zolnierkiewicz
2011-10-13 7:23 ` akira2.iguchi
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).