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: <51DC3078.5090602@monstr.eu>
Date:	Tue, 09 Jul 2013 17:47:04 +0200
From:	Michal Simek <monstr@...str.eu>
To:	Stephen Warren <swarren@...dotorg.org>
CC:	Mark Brown <broonie@...nel.org>,
	Grant Likely <grant.likely@...aro.org>,
	spi-devel-general@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org,
	device-drivers-devel@...ckfin.uclinux.org,
	Mike Frysinger <vapier@...too.org>
Subject: Re: [PATCH 2/2] spi: convert drivers to use bits_per_word_mask

> diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c
> index e1d7696..f321bf9 100644
> --- a/drivers/spi/spi-xilinx.c
> +++ b/drivers/spi/spi-xilinx.c
> @@ -232,21 +232,6 @@ static int xilinx_spi_setup_transfer(struct spi_device *spi,
>  	return 0;
>  }
>  
> -static int xilinx_spi_setup(struct spi_device *spi)
> -{
> -	/* always return 0, we can not check the number of bits.
> -	 * There are cases when SPI setup is called before any driver is
> -	 * there, in that case the SPI core defaults to 8 bits, which we
> -	 * do not support in some cases. But if we return an error, the
> -	 * SPI device would not be registered and no driver can get hold of it
> -	 * When the driver is there, it will call SPI setup again with the
> -	 * correct number of bits per transfer.
> -	 * If a driver setups with the wrong bit number, it will fail when
> -	 * it tries to do a transfer
> -	 */
> -	return 0;
> -}
> -
>  static void xilinx_spi_fill_tx_fifo(struct xilinx_spi *xspi)
>  {
>  	u8 sr;
> @@ -377,7 +362,6 @@ struct spi_master *xilinx_spi_init(struct device *dev, struct resource *mem,
>  	xspi->bitbang.chipselect = xilinx_spi_chipselect;
>  	xspi->bitbang.setup_transfer = xilinx_spi_setup_transfer;
>  	xspi->bitbang.txrx_bufs = xilinx_spi_txrx_bufs;
> -	xspi->bitbang.master->setup = xilinx_spi_setup;
>  	init_completion(&xspi->done);
>  
>  	if (!request_mem_region(mem->start, resource_size(mem),
> 

This part of this patch is breaking xilinx spi driver because when
spi_bitbang_start is called it goes through some if else...
and because bitbang->txrx_bufs is defined
it end up in this code
	} else if (!master->setup) {
		return -EINVAL;
	}

Probably the best solution is just revert this part of patch.
Mark: What do you think?

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform



Download attachment "signature.asc" of type "application/pgp-signature" (264 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ