lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47AB1882.8060103@ru.mvista.com>
Date:	Thu, 07 Feb 2008 17:41:06 +0300
From:	Sergei Shtylyov <sshtylyov@...mvista.com>
To:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
Cc:	linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org,
	Anton Salnikov <asalnikov@...mvista.com>
Subject: Re: [PATCH 3/3] palm_bk3710: factor out cable detection

Bartlomiej Zolnierkiewicz wrote:

> Factor out cable detection to palm_bk3710_cable_detect().

> Cc: Anton Salnikov <asalnikov@...mvista.com>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>

> Index: b/drivers/ide/arm/palm_bk3710.c
> ===================================================================
> --- a/drivers/ide/arm/palm_bk3710.c
> +++ b/drivers/ide/arm/palm_bk3710.c
> @@ -311,6 +311,12 @@ static void __devinit palm_bk3710_chipin
>  	palm_bk3710_setpiomode(base, NULL, 0, 600, 0);
>  	palm_bk3710_setpiomode(base, NULL, 1, 600, 0);
>  }
> +
> +static u8 __devinit palm_bk3710_cable_detect(ide_hwif_t *hwif)
> +{
> +	return ATA_CBL_PATA80;
> +}
> +
>  static int __devinit palm_bk3710_probe(struct platform_device *pdev)
>  {
>  	struct clk *clkp;
> @@ -381,7 +387,7 @@ static int __devinit palm_bk3710_probe(s
>  	hwif->set_dma_mode = &palm_bk3710_set_dma_mode;
>  	hwif->mmio = 1;
>  	default_hwif_mmiops(hwif);
> -	hwif->cbl = ATA_CBL_PATA80;
> +	hwif->cbl = palm_bk3710_cable_detect(hwif);
>  	hwif->ultra_mask = 0x1f;	/* Ultra DMA Mode 4 Max
>  						(input clk 99MHz) */
>  	hwif->mwdma_mask = 0x7;

    Hm, how does it help if you don't make it into driver's method? :-O

MBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ