linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/5] sis5513: backport short cables support from pata_sis.c
Date: Tue, 26 Jun 2007 22:50:57 +0400	[thread overview]
Message-ID: <46816011.70000@ru.mvista.com> (raw)
In-Reply-To: <200706101558.33636.bzolnier@gmail.com>

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

  reply	other threads:[~2007-06-26 18:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2007-06-27 19:15   ` Bartlomiej Zolnierkiewicz

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=46816011.70000@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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).