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: <200906301839.13764.david-b@pacbell.net>
Date:	Tue, 30 Jun 2009 18:39:13 -0700
From:	David Brownell <david-b@...bell.net>
To:	Marek Szyprowski <m.szyprowski@...sung.com>
Cc:	"'LKML'" <linux-kernel@...r.kernel.org>,
	spi-devel-general@...ts.sourceforge.net, kyungmin.park@...sung.com
Subject: Re: [PATCH] [drivers] [SPI] SPI_GPIO: add support for controllers without MISO or MOSI pin

On Thursday 25 June 2009, Marek Szyprowski wrote:
> --- a/drivers/spi/spi_bitbang.c
> +++ b/drivers/spi/spi_bitbang.c
> @@ -392,6 +392,22 @@ int spi_bitbang_transfer(struct spi_device *spi, struct spi_message *m)
>         unsigned long           flags;
>         int                     status = 0;
>  
> +       if (spi->master->flags & SPI_MASTER_NO_RX) {
> +               struct spi_transfer *xfer;
> +               list_for_each_entry(xfer, &m->transfers, transfer_list) {
> +                       if (xfer->rx_buf)
> +                               return -EINVAL;
> +               }
> +       }

Actually these two loops should merge, and likely move with
spi_async() into the spi.c core code ... I'll split this
support into a separate patch.

> +
> +       if (spi->master->flags & SPI_MASTER_NO_TX) {
> +               struct spi_transfer *xfer;
> +               list_for_each_entry(xfer, &m->transfers, transfer_list) {
> +                       if (xfer->tx_buf)
> +                               return -EINVAL;
> +               }
> +       }
> +
>         m->actual_length = 0;
>         m->status = -EINPROGRESS;
>  


--
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