* [PATCH 4/5] sis5513: backport short cables support from pata_sis.c
@ 2007-06-10 13:58 Bartlomiej Zolnierkiewicz
2007-06-26 18:50 ` Sergei Shtylyov
0 siblings, 1 reply; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-06-10 13:58 UTC (permalink / raw)
To: linux-ide; +Cc: linux-kernel
Backport short cables support from pata_sis.c.
This patch should allow UDMA > 2 modes on ASUS A6K.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/pci/sis5513.c | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
Index: b/drivers/ide/pci/sis5513.c
===================================================================
--- a/drivers/ide/pci/sis5513.c
+++ b/drivers/ide/pci/sis5513.c
@@ -1,5 +1,5 @@
/*
- * linux/drivers/ide/pci/sis5513.c Version 0.20 Mar 4, 2007
+ * linux/drivers/ide/pci/sis5513.c Version 0.25 Jun 10, 2007
*
* Copyright (C) 1999-2000 Andre Hedrick <andre@linux-ide.org>
* Copyright (C) 2002 Lionel Bouton <Lionel.Bouton@inet6.fr>, Maintainer
@@ -796,10 +796,33 @@ static unsigned int __devinit init_chips
return 0;
}
+struct sis_laptop {
+ u16 device;
+ u16 subvendor;
+ u16 subdevice;
+};
+
+static const struct sis_laptop sis_laptop[] = {
+ /* devid, subvendor, subdev */
+ { 0x5513, 0x1043, 0x1107 }, /* ASUS A6K */
+ /* end marker */
+ { 0, }
+};
+
static u8 __devinit ata66_sis5513(ide_hwif_t *hwif)
{
+ struct pci_dev *pdev = hwif->pci_dev;
+ const struct sis_laptop *lap = &sis_laptop[0];
u8 ata66 = 0;
+ while (lap->device) {
+ if (lap->device == pdev->device &&
+ lap->subvendor == pdev->subsystem_vendor &&
+ lap->subdevice == pdev->subsystem_device)
+ return ATA_CBL_PATA40_SHORT;
+ lap++;
+ }
+
if (chipset_family >= ATA_133) {
u16 regw = 0;
u16 reg_addr = hwif->channel ? 0x52: 0x50;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 4/5] sis5513: backport short cables support from pata_sis.c
2007-06-10 13:58 [PATCH 4/5] sis5513: backport short cables support from pata_sis.c Bartlomiej Zolnierkiewicz
@ 2007-06-26 18:50 ` Sergei Shtylyov
2007-06-27 19:15 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 3+ messages in thread
From: Sergei Shtylyov @ 2007-06-26 18:50 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, linux-kernel
Bartlomiej Zolnierkiewicz wrote:
> Backport short cables support from pata_sis.c.
> This patch should allow UDMA > 2 modes on ASUS A6K.
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> Index: b/drivers/ide/pci/sis5513.c
> ===================================================================
> --- a/drivers/ide/pci/sis5513.c
> +++ b/drivers/ide/pci/sis5513.c
[...]
> @@ -796,10 +796,33 @@ static unsigned int __devinit init_chips
> return 0;
> }
>
> +struct sis_laptop {
> + u16 device;
> + u16 subvendor;
> + u16 subdevice;
> +};
> +
> +static const struct sis_laptop sis_laptop[] = {
> + /* devid, subvendor, subdev */
> + { 0x5513, 0x1043, 0x1107 }, /* ASUS A6K */
> + /* end marker */
> + { 0, }
> +};
> +
> static u8 __devinit ata66_sis5513(ide_hwif_t *hwif)
> {
> + struct pci_dev *pdev = hwif->pci_dev;
> + const struct sis_laptop *lap = &sis_laptop[0];
> u8 ata66 = 0;
>
> + while (lap->device) {
> + if (lap->device == pdev->device &&
> + lap->subvendor == pdev->subsystem_vendor &&
> + lap->subdevice == pdev->subsystem_device)
> + return ATA_CBL_PATA40_SHORT;
> + lap++;
> + }
> +
The code even starts looking generic enough to be put into helper...
> if (chipset_family >= ATA_133) {
> u16 regw = 0;
> u16 reg_addr = hwif->channel ? 0x52: 0x50;
MBR, Sergei
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 4/5] sis5513: backport short cables support from pata_sis.c
2007-06-26 18:50 ` Sergei Shtylyov
@ 2007-06-27 19:15 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-06-27 19:15 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: linux-ide, linux-kernel
On Tuesday 26 June 2007, Sergei Shtylyov wrote:
> Bartlomiej Zolnierkiewicz wrote:
>
> > Backport short cables support from pata_sis.c.
>
> > This patch should allow UDMA > 2 modes on ASUS A6K.
>
> > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
>
> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>
> > Index: b/drivers/ide/pci/sis5513.c
> > ===================================================================
> > --- a/drivers/ide/pci/sis5513.c
> > +++ b/drivers/ide/pci/sis5513.c
> [...]
> > @@ -796,10 +796,33 @@ static unsigned int __devinit init_chips
> > return 0;
> > }
> >
> > +struct sis_laptop {
> > + u16 device;
> > + u16 subvendor;
> > + u16 subdevice;
> > +};
> > +
> > +static const struct sis_laptop sis_laptop[] = {
> > + /* devid, subvendor, subdev */
> > + { 0x5513, 0x1043, 0x1107 }, /* ASUS A6K */
> > + /* end marker */
> > + { 0, }
> > +};
> > +
> > static u8 __devinit ata66_sis5513(ide_hwif_t *hwif)
> > {
> > + struct pci_dev *pdev = hwif->pci_dev;
> > + const struct sis_laptop *lap = &sis_laptop[0];
> > u8 ata66 = 0;
> >
> > + while (lap->device) {
> > + if (lap->device == pdev->device &&
> > + lap->subvendor == pdev->subsystem_vendor &&
> > + lap->subdevice == pdev->subsystem_device)
> > + return ATA_CBL_PATA40_SHORT;
> > + lap++;
> > + }
> > +
>
> The code even starts looking generic enough to be put into helper...
Hmm, agreed, now if somebody could send me a patch...
Thanks,
Bart
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-06-27 19:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-10 13:58 [PATCH 4/5] sis5513: backport short cables support from pata_sis.c Bartlomiej Zolnierkiewicz
2007-06-26 18:50 ` Sergei Shtylyov
2007-06-27 19:15 ` Bartlomiej Zolnierkiewicz
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).