dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

118 Commits

Author SHA1 Message Date
Jiri Slaby 191c5f1027 TTY: call tty_port_destroy in the rest of drivers
After commit "TTY: move tty buffers to tty_port", the tty buffers are
not freed in some drivers. This is because tty_port_destructor is not
called whenever a tty_port is freed. This was an assumption I counted
with but was unfortunately untrue. So fix the drivers to fulfil this
assumption.

To be sure, the TTY buffers (and later some stuff) are gone along with
the tty_port, we have to call tty_port_destroy at tear-down places.
This is mostly where the structure containing a tty_port is freed.
This patch does exactly that -- put tty_port_destroy at those places.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-15 17:20:58 -08:00
Jiri Slaby b19e2ca77e TTY: use tty_port_link_device
So now for those drivers that can use neither tty_port_install nor
tty_port_register_driver but still have tty_port available before
tty_register_driver we use newly added tty_port_link_device.

The rest of the drivers that still do not provide tty_struct <->
tty_port link will have to be converted to implement
tty->ops->install.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13 16:50:19 -07:00
Alan Cox adc8d746ca tty: move the termios object into the tty
This will let us sort out a whole pile of tty related races. The
alternative would be to keep points and refcount the termios objects.
However
1. They are tiny anyway
2. Many devices don't use the stored copies
3. We can remove a pty special case

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 13:00:41 -07:00
David Howells c140d87995 Disintegrate asm/system.h for IA64
Disintegrate asm/system.h for IA64.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Tony Luck <tony.luck@intel.com>
cc: linux-ia64@vger.kernel.org
2012-03-28 18:30:02 +01:00
Linus Torvalds 3b59bf0816 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking merge from David Miller:
 "1) Move ixgbe driver over to purely page based buffering on receive.
     From Alexander Duyck.

  2) Add receive packet steering support to e1000e, from Bruce Allan.

  3) Convert TCP MD5 support over to RCU, from Eric Dumazet.

  4) Reduce cpu usage in handling out-of-order TCP packets on modern
     systems, also from Eric Dumazet.

  5) Support the IP{,V6}_UNICAST_IF socket options, making the wine
     folks happy, from Erich Hoover.

  6) Support VLAN trunking from guests in hyperv driver, from Haiyang
     Zhang.

  7) Support byte-queue-limtis in r8169, from Igor Maravic.

  8) Outline code intended for IP_RECVTOS in IP_PKTOPTIONS existed but
     was never properly implemented, Jiri Benc fixed that.

  9) 64-bit statistics support in r8169 and 8139too, from Junchang Wang.

  10) Support kernel side dump filtering by ctmark in netfilter
      ctnetlink, from Pablo Neira Ayuso.

  11) Support byte-queue-limits in gianfar driver, from Paul Gortmaker.

  12) Add new peek socket options to assist with socket migration, from
      Pavel Emelyanov.

  13) Add sch_plug packet scheduler whose queue is controlled by
      userland daemons using explicit freeze and release commands.  From
      Shriram Rajagopalan.

  14) Fix FCOE checksum offload handling on transmit, from Yi Zou."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1846 commits)
  Fix pppol2tp getsockname()
  Remove printk from rds_sendmsg
  ipv6: fix incorrent ipv6 ipsec packet fragment
  cpsw: Hook up default ndo_change_mtu.
  net: qmi_wwan: fix build error due to cdc-wdm dependecy
  netdev: driver: ethernet: Add TI CPSW driver
  netdev: driver: ethernet: add cpsw address lookup engine support
  phy: add am79c874 PHY support
  mlx4_core: fix race on comm channel
  bonding: send igmp report for its master
  fs_enet: Add MPC5125 FEC support and PHY interface selection
  net: bpf_jit: fix BPF_S_LDX_B_MSH compilation
  net: update the usage of CHECKSUM_UNNECESSARY
  fcoe: use CHECKSUM_UNNECESSARY instead of CHECKSUM_PARTIAL on tx
  net: do not do gso for CHECKSUM_UNNECESSARY in netif_needs_gso
  ixgbe: Fix issues with SR-IOV loopback when flow control is disabled
  net/hyperv: Fix the code handling tx busy
  ixgbe: fix namespace issues when FCoE/DCB is not enabled
  rtlwifi: Remove unused ETH_ADDR_LEN defines
  igbvf: Use ETH_ALEN
  ...

Fix up fairly trivial conflicts in drivers/isdn/gigaset/interface.c and
drivers/net/usb/{Kconfig,qmi_wwan.c} as per David.
2012-03-20 21:04:47 -07:00
Jiri Slaby 6e9ebcfa20 TTY: simserial, final cleanup
* remove pointless checks (tty cannot be NULL at that points)
* fix some printks (use __func__, print text directly w/o using global
  strings)
* remove some empty lines

This is the last patch for simserial. Overall, the driver is 400 lines
shorter. Being now at 560 lines.

It was tested using ski with a busybox userspace.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:28 -08:00
Jiri Slaby f66279cd7d TTY: simserial, reindent some code
Make the code to conform to the standard. Also make it readable.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:28 -08:00
Jiri Slaby 8b91633056 TTY: simserial, fix includes
Use headers from linux/* instead of asm/. Remove declaration of
console_drivers, it's in linux/console.h already.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:28 -08:00
Jiri Slaby adb636fe08 TTY: simserial, remove useless comments
Or the obsolete ones like:
   "Let's have a little bit of fun"
I have never had fun with software. For fun, one needs hard-ware.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:28 -08:00
Jiri Slaby 458cd31a4c TTY: simserial, use tty_port_hangup
Convert shutdown to be tty_port_operations->shutdown. Then we can use
tty_port_hangup. (And we have to use tty_port_close.)

This means we no longer touch ASYNC_INITIALIZED, TTY_IO_ERROR. Also we
do not need to do any peculiar TTY logic in the file now.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:28 -08:00
Jiri Slaby 9aead90a7f TTY: simserial, use tty_port_open
So now we convert startup to be ->activate of tty_port. This means we
no longer care about INITIALIZED and TTY_IO_ERROR flags.

After we have ->activate much of the code may go as it duplicates what
tty_port_open does. In this case tty_port_open adds block_til_ready to
the path. But we do not define carrier hooks, so it is a noop.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:27 -08:00
Jiri Slaby 3a5c242324 TTY: simserial, properly refcount tty_port->tty
So that we will not be surprised in the ISR anymore.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:27 -08:00
Jiri Slaby 78e74d778a TTY: simserial, use tty_port_close_start
I.e. remove more copied bloat.

The only change is that we wait_until_sent now. Which is what we
really should do.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:27 -08:00
Jiri Slaby 3734303045 TTY: simserial, use tty_port_close_end
The code is identical except locking. But added locks to protect
counts do not hurt here. Rather the contrary.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:27 -08:00
Jiri Slaby 2fcd5caf6d TTY: simserial, remove some tty ops
All ->start, ->stop and ->wait_until_sent are empty and need not be
defined. The time to remove them is now.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:27 -08:00
Jiri Slaby 7f32f8dd34 TTY: simserial, define local tty_port pointer
And use it to make the code more readable.

Since tport doesn't conflict with port anymore and there are not many
tport accessors left, do also s/\<tport\>/port/g.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:27 -08:00
Jiri Slaby 3c4782dcd9 TTY: simserial no longer needs serialP
Let's do a spin-off of serial_state structure with only needed
elements.

And remove serialP crap from includes.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:27 -08:00
Jiri Slaby 98e3a9e6dd TTY: simserial, stop using serial_state->{line,icount}
* instead of line, use tty->index or an iterator
* icount is not made public, only the tx path increments it

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:26 -08:00
Jiri Slaby d88405d44f TTY: simserial, remove tmp_buf
It is totally unused.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:26 -08:00
Jiri Slaby fd2d7a6e60 TTY: simserial, remove static initialization
We do not use any of the preinitialized rs_state members for something
real. So there is no need to initialize them. At the places we used
them for printing, just print the values.

And since only one port is supported, get rid of the loop. This
simplifies simrs_init a heap. Thus we can handle fail paths in a
standard way without panicing.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:48:26 -08:00
Jiri Slaby 01bd730d92 TTY: amiserial/simserial, use flags from tty_port
This changes flags' type to ulong which is appropriate for all the
set/clear_bits performed in the drivers..

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:30:51 -08:00
Jiri Slaby 12c8035435 TTY: amiserial/simserial, use count from tty_port
Nothing special. Just remove count from serial_state and change all
users to use tty_port.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:30:51 -08:00
Jiri Slaby 799be6ff2f TTY: amiserial/simserial, use close delays from tty_port
Note that previously simserial set the delay to 0. So we preserve
that. BUT, is it correct?

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:30:50 -08:00
Jiri Slaby 87758791c9 TTY: amiserial/simserial, use tty_port
Add tty_port to serial_state and start using common tty port members
from tty_port in amiserial and simserial. The rest will follow one by
one.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:30:50 -08:00
Jiri Slaby 5e99d54587 TTY: simserial, pass tty down to functions
This avoids pain with tty refcounting and touching tty_port in the
future. It allows us to remove some state->tty tests because the tty
passed down to them can never be NULL.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:30:50 -08:00
Jiri Slaby 916b765675 TTY: serialP, merge serial_state and async_struct
This is the final step to get rid of the one of the structures.  A
further cleanup will follow. And I struct serial_state deserves cease
to exist after a switch to tty_port too.

While changing the lines, it removes also pointless tty->driver_data
casts.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:28:48 -08:00
Jiri Slaby 2f8c521a1d TTY: simserial, remove IRQ_T
We do not set ASYNC_SHARE_IRQ anywhere. And since IRQF_DISABLED is a
noop, pass zero to request_irq directly instead of this ugly macro.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:27:57 -08:00
Jiri Slaby 964105b501 TTY: simserial, remove support of shared interrupts
It never worked there. The ISR was never written for that kind of
stuff. So remove all that crap with a hash of linked lists and pass
the pointer directly to the ISR.

BTW this answers the question there:
  * I don't know exactly why they don't use the dev_id opaque data
  * pointer instead of this extra lookup table

-> Because they thought they will support more devices bound to a
single interrupt w/o IRQF_SHARED. They would need exactly the hash
there.

What I don't understand is rebinding of the interrupt in the shutdown
path. They perhaps meant to do just synchronize_irq? In any case, this
is all gone and free_irq there properly.

By removing the hash we save some bits (exactly NR_IRQS * 8 bytes of
.bss and over a kilo of .text):
before:
   text    data     bss     dec     hex filename
  19600     320    8227   28147    6df3 ../a/ia64/arch/ia64/hp/sim/simserial.o
after:
   text    data     bss     dec     hex filename
  18568     320      28   18916    49e4 ../a/ia64/arch/ia64/hp/sim/simserial.o

Note that a shared interrupt could not work too. request_irq requires
data parameter to be non-NULL. So the whole IRQ_T exercise was
pointless.

Finally, this helps us remove another two members of async_struct :).

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:27:57 -08:00
Jiri Slaby d852256389 TTY: simserial/amiserial, use one instance of other members
This means:
* close_delay
* closing_wait
* line
* port
* xmit_fifo_size

This actually fixes a bug in amiserial. It initializes one and uses
the other of the close delays. Yes, duplicating structure members is
evil.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:27:17 -08:00
Jiri Slaby 979b6d8976 TTY: simserial, use only one copy of async flags
The same as for amiserial. Use only one instance of the flags.

Also remove them from async_struct now. Nobody else uses them.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:27:17 -08:00
Jiri Slaby 9e12dd5fce simserial, bail out when request_irq fails
Without this, the code succeeds when the port is opened by root and we
get unwanted interrupts storm on the first key stroke.

Instead of that, tell the user we failed and that we won't continue. I
suppose, the code was copied from the serial layer where we may want
to change the irq number, so we must allow open even of the failing
port. This is not the case for this driver at all.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:26:31 -08:00
Jiri Slaby 6efb6b77ff hpsim, initialize chip for assigned irqs
Currently, when assign_irq_vector is called and the irq connected in
the simulator, the irq is not ready. request_irq will return ENOSYS
immediately. It is because the irq chip is unset.

Hence set the chip properly to irq_type_hp_sim. And make sure this is
done from both users of simulated interrupts.

Also we have to set handler here, otherwise we end up in
handle_bad_int resulting in spam in logs and no irqs handled. We use
handle_simple_irq as these are SW interrupts that need no ACK or
anything.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:26:30 -08:00
Jiri Slaby 035cfe5ac5 simserial, include some headers
And remove declarations which are already in the headers.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:26:30 -08:00
Jiri Slaby 0745d19abc hpsim, fix SAL handling in fw-emu
The switch-cases of SAL_FREQ_BASE generate non-relocatable code. The
same as for the ifs one level upper. This causes oopses early in boot
because the kernel jumps to the hell instead of the offset in sal
callback.

So use ifs here for SAL_FREQ_BASE decision too.

Isn't there any compiler directive or settings to solve that cleanly?

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 12:26:30 -08:00
Jiri Slaby c5f0508b99 TTY: amiserial, remove tasklet for tty_wakeup
tty_wakeup is safe to be called from all contexts. No need to schedule
a tasklet for that. Let's call it directly like in other drivers.

This allows us to kill another member of async_struct structure. (If
we remove the dummy uses in simserial.)

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 11:48:42 -08:00
Jiri Slaby 9c8efecc91 TTY: serialP, remove unused material
First, remove unused macro and rs_multiport_struct structure. Nobody
uses them at all.

Further, the 2 drivers (they are below) which use the rest of
structures from serialP.h (async_struct and serial_state) do not use
all the members. Remove the members:
* which are unused or
* which are only initialized and never used for something real.

Everybody should avoid the structures with a looong distance.

Finally, remove the ALPHA kludge MCR quirks. They are 1:1 copy from
8250.h. No need to redefine them here.

The 2 promised users of the structures:
arch/ia64/hp/sim/simserial.c
drivers/tty/amiserial.c

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 11:48:42 -08:00
Jiri Slaby 410235fd4d TTY: remove unneeded tty->index checks
Checking if tty->index is in bounds is not needed. The tty has the
index set in the initial open. This is done in get_tty_driver. And it
can be only in interval <0,driver->num).

So remove the tests which check exactly this interval. Some are
left untouched as they check against the current backing device count.
(Leaving apart that the check is racy in most of the cases.)

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 11:42:21 -08:00
Jiri Slaby 2f16669d32 TTY: remove re-assignments to tty_driver members
All num, magic and owner are set by alloc_tty_driver. No need to
re-set them on each allocation site.

pti driver sets something different to what it passes to
alloc_tty_driver. It is not a bug, since we don't use the lines
parameter in any way. Anyway this is fixed, and now we do the right
thing.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 11:37:58 -08:00
Danny Kukawka ff40a675bb arch/ia64/hp/sim/simeth.c: print MAC via printk format specifier
Print MAC/dev_addr via printk extended format specifier %pm
instead of custom code.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
2012-02-24 15:41:15 -05:00
Jiri Pirko afc4b13df1 net: remove use of ndo_set_multicast_list in drivers
replace it by ndo_set_rx_mode

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-17 20:22:03 -07:00
Thomas Gleixner 53c909c96a ia64: Convert to the new irq_* function names
Scripted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:48:05 +02:00
Thomas Gleixner 4a983ed44f ia64: hp-sim: Cleanup direct access to irq_desc
Use accessor functions instead of open coded access.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:48:00 +02:00
Thomas Gleixner 35d75b0e03 ia64: Convert hp-sim to new irq_chip functions
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:48:00 +02:00
Thomas Gleixner 3d373ce82a ia64: Remove stale irq_chip.end
irq_chip.end got obsolete with the removal of __do_IRQ().

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Tony Luck <tony.luck@intel.com>
LKML-Reference: <20110203004210.143127544@linutronix.de>
2011-03-29 14:48:00 +02:00
Luck, Tony 10e82f6ce7 tty: simserial: now phase out the ioctl file pointer for good
Alan missed the ia64 simulator serial driver (because it was hidden
in arch/... rather than located under drivers/... where one might
expect to find a driver).  Drop the "file *" argument from rs_ioctl()
in arch/ia64/hp/sim/simserial.c

Signed-off-by: Tony Luck <tony.luck@intel.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-22 15:48:18 -08:00
Jeff Garzik f281233d3e SCSI host lock push-down
Move the mid-layer's ->queuecommand() invocation from being locked
with the host lock to being unlocked to facilitate speeding up the
critical path for drivers who don't need this lock taken anyway.

The patch below presents a simple SCSI host lock push-down as an
equivalent transformation.  No locking or other behavior should change
with this patch.  All existing bugs and locking orders are preserved.

Additionally, add one parameter to queuecommand,
	struct Scsi_Host *
and remove one parameter from queuecommand,
	void (*done)(struct scsi_cmnd *)

Scsi_Host* is a convenient pointer that most host drivers need anyway,
and 'done' is redundant to struct scsi_cmnd->scsi_done.

Minimal code disturbance was attempted with this change.  Most drivers
needed only two one-line modifications for their host lock push-down.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Acked-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-16 13:33:23 -08:00
Alan Cox 0587102cf9 tty: icount changeover for other main devices
Again basically cut and paste

Convert the main driver set to use the hooks for GICOUNT

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-22 10:20:05 -07:00
Dmitry Torokhov f335397d17 Input: sysrq - drop tty argument form handle_sysrq()
Sysrq operations do not accept tty argument anymore so no need to pass
it to us.

[Stephen Rothwell <sfr@canb.auug.org.au>: fix build breakage in drm code
 caused by sysrq using bool but not including linux/types.h]

[Sachin Sant <sachinp@in.ibm.com>: fix build breakage in s390 keyboadr
 driver]

Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Acked-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-08-21 00:34:45 -07:00
Patrick McHardy 6ed106549d net: use NETDEV_TX_OK instead of 0 in ndo_start_xmit() functions
This patch is the result of an automatic spatch transformation to convert
all ndo_start_xmit() return values of 0 to NETDEV_TX_OK.

Some occurences are missed by the automatic conversion, those will be
handled in a seperate patch.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-05 19:16:04 -07:00
Thomas Gleixner fb824f4838 [IA64] remove obsolete hw_interrupt_type
The defines and typedefs (hw_interrupt_type, no_irq_type, irq_desc_t) have
been kept around for migration reasons.  After more than two years it's
time to remove them finally.

This patch cleans up one of the remaining users.  When all such patches
hit mainline we can remove the defines and typedefs finally.

Impact: cleanup

Convert the last remaining users to struct irq_chip and remove the
define.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2009-06-15 14:35:10 -07:00