From owner-freebsd-mips@freebsd.org Mon Apr 29 17:34:38 2019 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F126B15974F0 for ; Mon, 29 Apr 2019 17:34:37 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43C9C8DAB5 for ; Mon, 29 Apr 2019 17:34:37 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1556559276; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=f37C0CT8LoMF2r8uVXbTf1DB11lQj/xUlWniGzeinQi0BnCOufA2R1RdTivlFtoc/ErQKAek53GcJ YZ1LtQR5uE7hfZx7nYu5TtlPiK4sbbh3yWLWrJEllqt43czUpD2W7YZqEddcdsm63FfS+05u0qIqnT Rf+8OX1/fd+XuvCsxoq/BmCaJZFC41bdXyx5e7rBfJgvT1JsdLmasENxjrJRYUZuAIqvbHZp+slbhL y5FliKdHjVQoIBF6rBwzu0+5La9FMZixgomZyFd4UPOa5z/W1RNjXmwPM5pth99M/JHsLdPg7Wf5Iw Qp7+hJPfoogkyWLQqqrSCu1mPPakWBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=AZsiI8NL2UKA7mzUTUbfgJ3WpMcfQUDuPJ+FE1fAtNc=; b=Iun2iz2CMFZeAJ53InGXstrRV32D3SMMdjlikiIbEw0eXZDXeBeUatNhZzYuHNI756TkQMBHpEbm+ MOibWtNMZtPS5QXaiCFOhqxNpYH/mO40E9MdclFIYaXmdJyZQochESH2ZijlKJQv/YgTkRxFEdzQxg fXc0O1TRwtsCK2ldvtx8mdAC6timliUUEV9iG+n0FbWsZR/pYPTjAmij6aCPfsJxyNSTDfq0VBKShQ FolPw5kVmAg/Pe+JhggcnPWdzI//iFTGo2btAMX1IiqSW+seeIVixumpxKzbj6ItRktyv/axaZnj2l wxZvf1eYImwsxBWv3tASIZ3meM1Na1Q== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=AZsiI8NL2UKA7mzUTUbfgJ3WpMcfQUDuPJ+FE1fAtNc=; b=EG7tSSdMn3tbs4gzxx+iZA5D0f4AJpsrzlyHS+drLzbs0F7xDGGN9esB/ofeWrnvuxBxbOFQhuJh8 kuFE4VWlb3aF0JGpxn3O9lNr6eI9Gdk4JexA1oROnV5vWtWLpd0lCtZit979IDbdYobLBqSQVcorX3 oYZ0td6qx+Hd2kgoL4ClRk8rXLDZbR59hlAB2Oo7s4Jwy7qZo6XmyQsxAd70ZvmDLKqnvaSlVup7Oj OG8PA6SDM/XaH0cxWMkE0g23FvV22TMcJTwZrC30xADkBrZuVocs0xRwfDiyF/VAPIIgmGMEbgGzrU rVYd50nx1DXKCzSCVfL7KObfRDTphUg== X-MHO-RoutePath: aGlwcGll X-MHO-User: 0dbd0491-6aa5-11e9-990e-673a89bc4518 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 0dbd0491-6aa5-11e9-990e-673a89bc4518; Mon, 29 Apr 2019 17:34:35 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x3THYYMF003717; Mon, 29 Apr 2019 11:34:34 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <22b68b094cbe7ab1b07673e43f6473906bd2d648.camel@freebsd.org> Subject: Re: spigen problem From: Ian Lepore To: Mori Hiroki , "freebsd-mips@freebsd.org" Date: Mon, 29 Apr 2019 11:34:34 -0600 In-Reply-To: <1991993923.530828.1556558314174.JavaMail.yahoo@jws704008.mail.kks.yahoo.co.jp> References: <1991993923.530828.1556558314174.JavaMail.yahoo.ref@jws704008.mail.kks.yahoo.co.jp> <1991993923.530828.1556558314174.JavaMail.yahoo@jws704008.mail.kks.yahoo.co.jp> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 43C9C8DAB5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.988,0]; ASN(0.00)[asn:16509, ipnet:54.186.0.0/15, country:US] X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Apr 2019 17:34:38 -0000 On Tue, 2019-04-30 at 02:18 +0900, Mori Hiroki wrote: > Hi > > I add small spi lcd on RT3050. This lcd controller is S6D0151. > > S6D0151 transfer is tree byte command then tree byte data. > > I use spigen mruby rapper. This rapper use SPIGENIOC_TRANSFER. > > I try to send tree byte command. But spi transfer is six byte. > > This is reason. > > sys/dev/spibus/spigen.c > > error = copyin(st->st_command.iov_base, transfer.tx_cmd, > transfer.tx_cmd_sz = transfer.rx_cmd_sz = st- > >st_command.iov_len); > > > This lcd not work six byte transfer. > > How do I fix this ? > > Regards > > Hiroki Mori > I'm not sure what you mean by "This is the reason", that code sets up the transfer for exactly as many bytes as you requested in st_command.iov_len. If you set that to three bytes, only three bytes will be transfered. -- Ian