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] [day] [month] [year] [list]
Date:	Wed, 20 May 2009 18:55:43 +0800
From:	"Li, Jiebing" <jiebing.li@...el.com>
To:	Pierre Ossman <pierre@...man.eu>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	Matthew Garrett <mjg59@...f.ucam.org>,
	Arjan van de Ven <arjan@...radead.org>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 2/2] MMC: MMC/SD/CE-ATA/SDIO driver for Intel Moorestown
  platform

Hi all,

Thanks a lot for your comments and instructions! I will modify the code, prepare for the use cases and re-submit the patches in next days.


Rgds,
Jiebing 

-----Original Message-----
From: Pierre Ossman [mailto:pierre@...man.eu] 
Sent: Monday, May 11, 2009 2:42 AM
To: Li, Jiebing
Cc: linux-kernel@...r.kernel.org; Johnson, Charles F; Zhu, Daniel; Yuan, Hang; Pasrija, Geeta; Li, Jiebing
Subject: Re: [PATCH 2/2] MMC: MMC/SD/CE-ATA/SDIO driver for Intel Moorestown platform

On Thu, 30 Apr 2009 17:19:06 +0800
"Li, Jiebing" <jiebing.li@...el.com> wrote:

> 
> This patch enables support of SDIO bus driver suspend/resume operation and supply sysfs interface for user
> to call suspend/resume selectively.Remind that this function should work together with SDIO device driver's
> suspend/resume function.
> 

As Matthew asked, what's the use case?

> And Moorestown's specific code is added into this patch to enable the second SDIO slot of the host controller.
> 

Again, stop mixing unrelated things in the same patch.

> @@ -452,3 +828,84 @@ err:
>         return err;
>  }
> 
> +/*
> + * warn device driver and perform a SDIO device reset.
> + * Assume that device driver knows hot to handle resets.
> + */
> +int sdio_reset_device(struct mmc_card *card)
> +{

Use case?

> diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> index b4cf691..0c9d2eb 100644
> --- a/drivers/mmc/host/Kconfig
> +++ b/drivers/mmc/host/Kconfig
> @@ -44,6 +44,14 @@ config MMC_SDHCI_IO_ACCESSORS
>           This is silent Kconfig symbol that is selected by the drivers that
>           need to overwrite SDHCI IO memory accessors.
> 
> +config MMC_SDHCI_MRST_SDIO1
> +       bool
> +       depends on MMC_SDHCI
> +       help
> +         This enables Moorestown SD host controller's 2nd SDIO slot.
> +
> +         If unsure, say N.
> +

Detect this at runtime.

> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index a2804f1..4d4ad6d 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -914,6 +914,17 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
>         if (cmd->data)
>                 flags |= SDHCI_CMD_DATA;
> 
> +#ifdef CONFIG_MMC_SDHCI_MRST_SDIO1
> +       if (host->quirks & SDHCI_QUIRK_MRST_RESTRICTION) {
> +               u16 clk;
> +
> +               clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
> +
> +               clk |= SDHCI_CLOCK_CARD_EN;
> +               sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL);
> +       }
> +#endif
> +
>         sdhci_writew(host, SDHCI_MAKE_CMD(cmd->opcode, flags), SDHCI_COMMAND);
>  }
> 

Huh? Is this some kind of multiplexed nonsense?

> diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
> index fa87b8b..50be698 100644
> --- a/drivers/mmc/host/sdhci.h
> +++ b/drivers/mmc/host/sdhci.h
> @@ -227,6 +227,8 @@ struct sdhci_host {
>  #define SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET           (1<<19)
>  /* Controller has to be forced to use block size of 2048 bytes */
>  #define SDHCI_QUIRK_FORCE_BLK_SZ_2048                  (1<<20)
> +/* Controller of Moorestown specific restriction */
> +#define SDHCI_QUIRK_MRST_RESTRICTION                   (1<<21)
> 

No. Quirks should be defined in a way that allows reuse.

-- 
     -- Pierre Ossman

  WARNING: This correspondence is being monitored by the
  Swedish government. Make sure your server uses encryption
  for SMTP traffic and consider using PGP for end-to-end
  encryption.
--
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