Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758431AbXEXK1m (ORCPT ); Thu, 24 May 2007 06:27:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755542AbXEXK1e (ORCPT ); Thu, 24 May 2007 06:27:34 -0400 Received: from mailer.gwdg.de ([134.76.10.26]:54961 "EHLO mailer.gwdg.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754443AbXEXK1d (ORCPT ); Thu, 24 May 2007 06:27:33 -0400 Date: Thu, 24 May 2007 12:26:44 +0200 (MEST) From: Jan Engelhardt To: "Lars K.W. Gohlke" cc: Tilman Schmidt , linux-kernel@vger.kernel.org Subject: Re: How to access correctly serial port inside module? In-Reply-To: <4655676A.1000102@gmx.de> Message-ID: References: <46485D84.1010902@gmx.de> <46489EF1.2020509@gmx.de> <4648E9F7.5090908@imap.cc> <46536C0F.50101@imap.cc> <4655676A.1000102@gmx.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Report: Content analysis: 0.0 points, 6.0 required _SUMMARY_ Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1244 Lines: 38 On May 24 2007 12:22, Lars K.W. Gohlke wrote: > > ok, I have read everything and also have read the chapters about > tty_drivers. However I'm not really understand, how to ... . > > I will summarize the concrete scenario, which will lead to the > understanding and further solution of deadling with serial driver. > > [scenario] > > 1. in userspace I'm doing: > date > /dev/ttyS0 > 2. in kernelspace I want to print out this date. > > [/scenario] > > I'm really new to kernel coding, that's why I maybe understand some > functions not the proper way. > > I'm a bit confused. So am I. Usually, you connect two different machines with a serial cable. (Leaving out the special case of connecting ttyS0-ttyS1 on the same machine.) This poses the first question: whose kernelspace? the sender or the receiver side? And by "this date" do you perhaps mean "whatever was sent", or specifically a date? And print to _where_? Up to now, it looks like you want to do "cat