Re: [ patch 4/7] drivers/serial/jsm: new serial device driver

2005-03-09 Thread Greg KH
On Wed, Mar 09, 2005 at 12:18:21PM -0500, Wen Xiong wrote: > Greg KH wrote: > > >On Wed, Mar 09, 2005 at 10:47:22AM -0500, Wen Xiong wrote: > > > > > >>+static ssize_t jsm_driver_debug_show(struct device_driver *ddp, char > >>*buf) > >>+{ > >>+ return snprintf(buf, PAGE_SIZE, "0x%x\n", jsm_deb

Re: [ patch 4/7] drivers/serial/jsm: new serial device driver

2005-03-09 Thread Wen Xiong
Greg KH wrote: On Wed, Mar 09, 2005 at 10:47:22AM -0500, Wen Xiong wrote: +static ssize_t jsm_driver_debug_show(struct device_driver *ddp, char *buf) +{ + return snprintf(buf, PAGE_SIZE, "0x%x\n", jsm_debug); +} +static DRIVER_ATTR(debug, S_IRUSR, jsm_driver_debug_show, NULL); Should just b

Re: [ patch 4/7] drivers/serial/jsm: new serial device driver

2005-03-09 Thread Greg KH
On Wed, Mar 09, 2005 at 10:47:22AM -0500, Wen Xiong wrote: > +static ssize_t jsm_driver_debug_show(struct device_driver *ddp, char *buf) > +{ > + return snprintf(buf, PAGE_SIZE, "0x%x\n", jsm_debug); > +} > +static DRIVER_ATTR(debug, S_IRUSR, jsm_driver_debug_show, NULL); Should just be a modu

Re: [ patch 4/7] drivers/serial/jsm: new serial device driver

2005-03-09 Thread Russell King
On Mon, Mar 07, 2005 at 10:44:25PM -0800, Greg KH wrote: > On Mon, Mar 07, 2005 at 05:46:51PM -0500, Wen Xiong wrote: > > +static ssize_t jsm_tty_baud_show(struct class_device *class_dev, char *buf) > > +{ > > + struct jsm_channel *ch; > > + > > + if (class_dev) { > > + ch = class_get

Re: [ patch 4/7] drivers/serial/jsm: new serial device driver

2005-03-09 Thread Russell King
On Tue, Mar 08, 2005 at 03:47:45PM -0600, Kilau, Scott wrote: > For example, lets say a customer has a modem connected to a serial port. > > If you were to open up the port with an "stty -a" to get the current > settings and signals, you would unintentionally raise RTS and DTR. That isn't specia

Re: [ patch 4/7] drivers/serial/jsm: new serial device driver

2005-03-09 Thread Wen Xiong
Greg KH wrote: On Tue, Mar 08, 2005 at 01:55:33PM -0500, Wen Xiong wrote: +static ssize_t jsm_driver_boards_show(struct device_driver *ddp, char *buf) +{ + int adapter_count = 0; + adapter_count = jsm_total_boardnum(); + return snprintf(buf, PAGE_SIZE, "%d\n", adapter_count); +} +static DRIVER_A

Re: [ patch 4/7] drivers/serial/jsm: new serial device driver

2005-03-08 Thread Greg KH
On Tue, Mar 08, 2005 at 08:36:57PM -0600, Kilau, Scott wrote: > > > > > > If you were to open up the port with an "stty -a" to get the current > > > > settings and signals, you would unintentionally raise RTS and DTR. > > > > Why not fix the driver to not change the current line settings if it >

RE: [ patch 4/7] drivers/serial/jsm: new serial device driver

2005-03-08 Thread Kilau, Scott
> > > > If you were to open up the port with an "stty -a" to get the current > > settings and signals, you would unintentionally raise RTS and DTR. > > Why not fix the driver to not change the current line settings if it is > not being opened for the first time? That seems like a much simpler wa

Re: [ patch 4/7] drivers/serial/jsm: new serial device driver

2005-03-08 Thread Greg KH
On Tue, Mar 08, 2005 at 03:47:45PM -0600, Kilau, Scott wrote: > > Who needs to know if a port is open or not? > > > > > > > +static ssize_t jsm_tty_baud_show(struct class_device *class_dev, char *buf) > > > No, please delete these, and the other sysfs files that duplicate the > > same info that

Re: [ patch 4/7] drivers/serial/jsm: new serial device driver

2005-03-08 Thread Greg KH
On Tue, Mar 08, 2005 at 01:55:33PM -0500, Wen Xiong wrote: > +static ssize_t jsm_driver_boards_show(struct device_driver *ddp, char *buf) > +{ > + int adapter_count = 0; > + adapter_count = jsm_total_boardnum(); > + return snprintf(buf, PAGE_SIZE, "%d\n", adapter_count); > +} > +static

Re: [ patch 4/7] drivers/serial/jsm: new serial device driver

2005-03-08 Thread Kilau, Scott
> Who needs to know if a port is open or not? > > > +static ssize_t jsm_tty_baud_show(struct class_device *class_dev, char *buf) > No, please delete these, and the other sysfs files that duplicate the > same info that you can get by using the standard Linux termios calls. > There is no need for

Re: [ patch 4/7] drivers/serial/jsm: new serial device driver

2005-03-08 Thread Wen Xiong
Greg KH wrote: On Mon, Mar 07, 2005 at 05:46:51PM -0500, Wen Xiong wrote: +static ssize_t jsm_driver_version_show(struct device_driver *ddp, char *buf) +{ + return snprintf(buf, PAGE_SIZE, "jsm_version: %s\n", JSM_VERSION); Again, drop the "prefix:" from every sysfs file, it should not be t

Re: [ patch 4/7] drivers/serial/jsm: new serial device driver

2005-03-07 Thread Greg KH
On Mon, Mar 07, 2005 at 05:46:51PM -0500, Wen Xiong wrote: > +static ssize_t jsm_driver_version_show(struct device_driver *ddp, char *buf) > +{ > + return snprintf(buf, PAGE_SIZE, "jsm_version: %s\n", JSM_VERSION); Again, drop the "prefix:" from every sysfs file, it should not be there (the da

Re: [ patch 4/7] drivers/serial/jsm: new serial device driver

2005-03-07 Thread Wen Xiong
Greg KH wrote: On Fri, Mar 04, 2005 at 04:08:17PM -0500, Wen Xiong wrote: +int get_jsm_board_number(void) +{ +struct list_head *tmp; +struct jsm_board *cur_board_entry; +int adapter_count = 0; +u64 lock_flags; + +spin_lock_irqsave(&jsm_board_head_lock, loc

Re: [ patch 4/7] drivers/serial/jsm: new serial device driver

2005-03-04 Thread Greg KH
On Fri, Mar 04, 2005 at 04:08:17PM -0500, Wen Xiong wrote: > +int get_jsm_board_number(void) > +{ > +struct list_head *tmp; > +struct jsm_board *cur_board_entry; > +int adapter_count = 0; > +u64 lock_flags; > + > +spin_lock_irqsave(&jsm_board_head_lock, lock_

Re: [ patch 4/7] drivers/serial/jsm: new serial device driver

2005-03-04 Thread Wen Xiong
Greg KH wrote: On Sun, Feb 27, 2005 at 06:39:51PM -0500, Wen Xiong wrote: This patch is for jsm_proc.c and includes the functions relating to /proc/jsm entry. No, don't add new /proc stuff. Use sysfs, and if you want to spit out more data, use debugfs. What is the need for these files? th

Re: [ patch 4/7] drivers/serial/jsm: new serial device driver

2005-02-27 Thread Greg KH
On Sun, Feb 27, 2005 at 06:39:51PM -0500, Wen Xiong wrote: > This patch is for jsm_proc.c and includes the functions relating to > /proc/jsm entry. No, don't add new /proc stuff. Use sysfs, and if you want to spit out more data, use debugfs. What is the need for these files? thanks, greg k-h

Re: [ patch 4/7] drivers/serial/jsm: new serial device driver

2005-02-27 Thread Christoph Hellwig
On Sun, Feb 27, 2005 at 06:39:51PM -0500, Wen Xiong wrote: > This patch is for jsm_proc.c and includes the functions relating to > /proc/jsm entry. please don't put in more procfs driver interfaces. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message

[ patch 4/7] drivers/serial/jsm: new serial device driver

2005-02-27 Thread Wen Xiong
This patch is for jsm_proc.c and includes the functions relating to /proc/jsm entry. Signed-off-by: Wen Xiong <[EMAIL PROTECTED]> diff -Nuar linux-2.6.9.orig/drivers/serial/jsm/jsm_proc.c linux-2.6.9.new/drivers/serial/jsm/jsm_proc.c --- linux-2.6.9.orig/drivers/serial/jsm/jsm_proc.c 1969-1