summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* tty_port: Add a port level carrier detect operationAlan Cox2009-01-0217-238/+418
| | | | | | | | This is the first step to generalising the various pieces of waiting logic duplicated in all sorts of serial drivers. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* tty: Fix PPP hang under loadAlan Cox2009-01-021-9/+21
| | | | | Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Add device function for USB serial consoleKevin Hao2009-01-021-0/+13
| | | | | | | | | | | Add device funtion for usb serial console, so we can open /dev/console when we use a usb serial device as console. (Typecast removed as noted by Sergei Shtylyov) Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* And here's a patch (to be applied on top of the last) which preventsRussell King2009-01-021-16/+21
| | | | | | | | this happening again by making use of 'const'. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Convert the oxsemi tornado special cases to use the quirk interface and notRussell King2009-01-021-40/+51
| | | | | | | | scribble on its own reference structures. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* tty: Fix close races in USB serialAlan Cox2009-01-021-5/+10
| | | | | | | | | | | USB serial has always had races where the tty port usage count can hit zero during a receive event. The internal locking is a mutex so we can't use that in the IRQ handlers. With krefs we can tackle this differently but we still need to be careful. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* n_tty: Output bells immediately on a full bufferJoe Peterson2009-01-021-17/+9Star
| | | | | | | | | | | | | | This patch causes "bell" (^G) characters (invoked when the input buffer is full) to be immediately output rather than filling the echo buffer. This is especially a problem when the tty is stopped and buffers fill, since the bells do not serve their purpose of immediate notification that the buffer cannot take further input, and they will flush all at once when the tty is restarted. Signed-off-by: Joe Peterson <joe@skyrush.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* n_tty: Fix hanfling of buffer full corner casesJoe Peterson2009-01-021-17/+38
| | | | | | | | | | | | | | | | | | | | Fix the handling of input characters when the tty buffer is full or nearly full. This includes tests that are done in n_tty_receive_char() and handling of PARMRK. Problems with the buffer-full tests done in receive_char() caused characters to be lost at times when the buffer(s) filled. Also, these full conditions would often only be detected with echo on, and PARMRK was not accounted for properly in all cases. One symptom of these problems, in addition to lost characters, was early termination from unix commands like tr and cat when ^Q was used to break from a stopped tty with full buffers (note that breaking out was often previously not possible, due to the pty getting in "gridlock", which will be addressed in another patch). Note space is always reserved at the end of the buffer for a newline (or EOF/EOL) in canonical mode. Signed-off-by: Joe Peterson <joe@skyrush.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* n_tty: Fix handling of control characters and continuationsJoe Peterson2009-01-021-9/+15
| | | | | | | | | | Fix process_output_block to detect continuation characters correctly and to handle control characters even when O_OLCUC is enabled. Make similar change to do_output_char(). Signed-off-by: Joe Peterson <joe@skyrush.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* pty: simplify resizeAlan Cox2009-01-024-30/+71
| | | | | | | | We have special case logic for resizing pty/tty pairs. We also have a per driver resize method so for the pty case we should use it. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* tty: Fix sparse static warning for tty_driver_lookup_ttyJason Wessel2009-01-021-1/+1
| | | | | | | | | Fixed sparse warning: drivers/char/tty_io.c:1216:19: warning: symbol 'tty_driver_lookup_tty' was not declared. Should it be static? Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sierra: Fix formattingAlan Cox2009-01-021-1/+1
| | | | | | | | | | | | | | | | Andrew Morton wrote: in drivers/usb/serial/sierra.c: } else { if (urb->actual_length) { + tty = tty_port_tty_get(&port->port); tty_buffer_request_room(tty, urb->actual_length); it's missing a tab. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Add DEVPTS_MULTIPLE_INSTANCES config tokenSukadev Bhattiprolu2009-01-021-0/+11
| | | | | | Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* n_tty: clean up coding styleAlan Cox2009-01-021-16/+13Star
| | | | | | | Now the main work is done its polishing time Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* n_tty: Fix loss of echoed characters and remove bkl from n_ttyJoe Peterson2009-01-023-156/+588
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the loss of echoed (and other ldisc-generated characters) when the tty is stopped or when the driver output buffer is full (happens frequently for input during continuous program output, such as ^C) and removes the Big Kernel Lock from the N_TTY line discipline. Adds an "echo buffer" to the N_TTY line discipline that handles all ldisc-generated output (including echoed characters). Along with the loss of characters, this also fixes the associated loss of sync between tty output and the ldisc state when characters cannot be immediately written to the tty driver. The echo buffer stores (in addition to characters) state operations that need to be done at the time of character output (like management of the column position). This allows echo to cooperate correctly with program output, since the ldisc state remains consistent with actual characters written. Since the echo buffer code now isolates the tty column state code to the process_out* and process_echoes functions, we can remove the Big Kernel Lock (BKL) and replace it with mutex locks. Highlights are: * Handles echo (and other ldisc output) when tty driver buffer is full - continuous program output can block echo * Saves echo when tty is in stopped state (e.g. ^S) - (e.g.: ^Q will correctly cause held characters to be released for output) * Control character pairs (e.g. "^C") are treated atomically and not split up by interleaved program output * Line discipline state is kept consistent with characters sent to the tty driver * Remove the big kernel lock (BKL) from N_TTY line discipline Signed-off-by: Joe Peterson <joe@skyrush.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Blackfin Serial Driver: Remove BI status for known_good_charSonic Zhang2009-01-021-0/+1
| | | | | | | Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Blackfin Serial Driver: Fix bug - BF527-EZKIT unable to receive large files ↵Sonic Zhang2009-01-021-3/+8
| | | | | | | | | | | over UART in DMA mode Add spin_lock_irqsave() when receive and transfer data. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Blackfin Serial Driver: Clean serial console and early prink code.Sonic Zhang2009-01-021-12/+4Star
| | | | | | | Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Blackfin Serial Driver: fix bug - SIR driver stop receiving randomlyGraf Yang2009-01-021-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | Bug description: The IRDA receiver may can't receiving any more after processed some signals. To duplicate this issue is put three IRDA devices together, one blackfin, two none blackfin, they will detect each other. Let one none blackfin devices irdaping the blackfin devices, when it stopped print out ping information, it is the time that blackfin stoped receiving, the time is random. The related register bit is OK, the other devices is sending data continuously. But no interrupt come. Fixing: I tried Michael's suggestion that request the UARTx error interrupt, and reset the IRDA when found FE error. This method helps much, but it can't completely avoid stop. Reset the IRDA before every time sending the data is more safe. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Blackfin Serial Driver: updates kgdb over Blackfin serial driver with kgdb ↵Sonic Zhang2009-01-021-98/+89Star
| | | | | | | | | framework Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'for-linus' of ↵Linus Torvalds2009-01-011-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (34 commits) nfsd race fixes: jfs nfsd race fixes: reiserfs nfsd race fixes: ext4 nfsd race fixes: ext3 nfsd race fixes: ext2 nfsd/create race fixes, infrastructure filesystem notification: create fs/notify to contain all fs notification fs/block_dev.c: __read_mostly improvement and sb_is_blkdev_sb utilization kill ->dir_notify() filp_cachep can be static in fs/file_table.c fix f_count description in Documentation/filesystems/files.txt make INIT_FS use the __RW_LOCK_UNLOCKED initialization take init_fs to saner place kill vfs_permission pass a struct path * to may_open kill walk_init_root remove incorrect comment in inode_permission expand some comments (d_path / seq_path) correct wrong function name of d_put in kernel document and source comment fix switch_names() breakage in short-to-short case ...
| * shrink struct dentryNick Piggin2009-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct dentry is one of the most critical structures in the kernel. So it's sad to see it going neglected. With CONFIG_PROFILING turned on (which is probably the common case at least for distros and kernel developers), sizeof(struct dcache) == 208 here (64-bit). This gives 19 objects per slab. I packed d_mounted into a hole, and took another 4 bytes off the inline name length to take the padding out from the end of the structure. This shinks it to 200 bytes. I could have gone the other way and increased the length to 40, but I'm aiming for a magic number, read on... I then got rid of the d_cookie pointer. This shrinks it to 192 bytes. Rant: why was this ever a good idea? The cookie system should increase its hash size or use a tree or something if lookups are a problem. Also the "fast dcookie lookups" in oprofile should be moved into the dcookie code -- how can oprofile possibly care about the dcookie_mutex? It gets dropped after get_dcookie() returns so it can't be providing any sort of protection. At 192 bytes, 21 objects fit into a 4K page, saving about 3MB on my system with ~140 000 entries allocated. 192 is also a multiple of 64, so we get nice cacheline alignment on 64 and 32 byte line systems -- any given dentry will now require 3 cachelines to touch all fields wheras previously it would require 4. I know the inline name size was chosen quite carefully, however with the reduction in cacheline footprint, it should actually be just about as fast to do a name lookup for a 36 character name as it was before the patch (and faster for other sizes). The memory footprint savings for names which are <= 32 or > 36 bytes long should more than make up for the memory cost for 33-36 byte names. Performance is a feature... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | Merge branch 'irq-fixes-for-linus-4' of ↵Linus Torvalds2008-12-311-3/+0Star
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'irq-fixes-for-linus-4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sparseirq: move __weak symbols into separate compilation unit sparseirq: work around __weak alias bug sparseirq: fix hang with !SPARSE_IRQ sparseirq: set lock_class for legacy irq when sparse_irq is selected sparseirq: work around compiler optimizing away __weak functions sparseirq: fix desc->lock init sparseirq: do not printk when migrating IRQ descriptors sparseirq: remove duplicated arch_early_irq_init() irq: simplify for_each_irq_desc() usage proc: remove ifdef CONFIG_SPARSE_IRQ from stat.c irq: for_each_irq_desc() move to irqnr.h hrtimer: remove #include <linux/irq.h>
| * irq: simplify for_each_irq_desc() usageKOSAKI Motohiro2008-12-261-3/+0Star
| | | | | | | | | | | | | | | | | | | | | | Impact: cleanup all for_each_irq_desc() usage point have !desc check. then its check can move into for_each_irq_desc() macro. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Acked-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | Merge branch 'for-linus' of ↵Linus Torvalds2008-12-313-8/+42
|\ \ | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: IB/mlx4: Fix reading SL field out of cqe->sl_vid RDMA/addr: Fix build breakage when IPv6 is disabled
| * \ Merge branches 'cma' and 'mlx4' into for-linusRoland Dreier2008-12-311-1/+1
| |\ \
| | * | IB/mlx4: Fix reading SL field out of cqe->sl_vidRoland Dreier2008-12-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit f780a9f1 ("mlx4_core: Add ethernet fields to CQE struct") introduced a bug in how wc->sl is set in mlx4_ib_poll_one() -- since cqe->sl_vid is a big-endian value, the shift must be done after converting to host endianness. This bug was found using sparse endianness checking. Signed-off-by: Roland Dreier <rolandd@cisco.com>
| * | | RDMA/addr: Fix build breakage when IPv6 is disabledRoland Dreier2008-12-302-7/+41
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 38617c64 ("RDMA/addr: Add support for translating IPv6 addresses") broke the build when CONFIG_IPV6=n, because the ib_addr module unconditionally attempted to call ipv6_chk_addr() and other IPv6 functions that are not defined when IPv6 is disabled. Fix this by only building IPv6 support if CONFIG_IPV6 is turned on, and add a Kconfig dependency to prevent the ib_addr code from being built in when IPv6 is built modular. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | | Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6Linus Torvalds2008-12-31131-5646/+24802
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (104 commits) [SCSI] fcoe: fix configuration problems [SCSI] cxgb3i: fix select/depend problem [SCSI] fcoe: fix incorrect use of struct module [SCSI] cxgb3i: remove use of skb->sp [SCSI] cxgb3i: Add cxgb3i iSCSI driver. [SCSI] zfcp: Remove unnecessary warning message [SCSI] zfcp: Add support for unchained FSF requests [SCSI] zfcp: Remove busid macro [SCSI] zfcp: remove DID_DID flag [SCSI] zfcp: Simplify mask lookups for incoming RSCNs [SCSI] zfcp: Remove initial device data from zfcp_data [SCSI] zfcp: fix compile warning [SCSI] zfcp: Remove adapter list [SCSI] zfcp: Simplify SBAL allocation to fix sparse warnings [SCSI] zfcp: register with SCSI layer on ccw registration [SCSI] zfcp: Fix message line break [SCSI] qla2xxx: changes in multiq code [SCSI] eata: fix the data buffer accessors conversion regression [SCSI] ibmvfc: Improve async event handling [SCSI] lpfc : correct printk types on PPC compiles ...
| * | | [SCSI] fcoe: fix configuration problemsJames Bottomley2008-12-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fcoe selects libfc and requires SCSI and PCI (the SCSI requirement is implicitly covered by an enclosing if). Fix them both up so they cannot be configured in an invalid state: make LIBFC select SCSI_FC_ATTRS and make FCOE depend on PCI and select LIBFC. Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
| * | | [SCSI] cxgb3i: fix select/depend problemJames Bottomley2008-12-302-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cxgb3i requires the cxgb3 net driver, so it selects it. However, cxgb3 has dependencies which the select cannot see. Fix this by separating out the cxgb3 dependencies into a separate hidden config option (CONFIG_CHELSIO_T3_DEPENDS) and make both cxgb3 and cxgb3i depend on it. Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Karen Xie <kxie@chelsio.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
| * | | [SCSI] fcoe: fix incorrect use of struct moduleJames Bottomley2008-12-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This structure may not be defined if CONFIG_MODULE=n, so never deref it. Change uses of module->name to module_name(module) and corrects some dyslexic printks and docbook comments. Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
| * | | [SCSI] cxgb3i: remove use of skb->spKaren Xie2008-12-302-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cxgb3i was using skb->sp pointer for some internal book-keeping which is not related to the secure path. Changed it to use skb->cb[] instead. Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Karen Xie <kxie@chelsio.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
| * | | [SCSI] cxgb3i: Add cxgb3i iSCSI driver.Karen Xie2008-12-3013-0/+4788
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements the cxgb3i iscsi connection acceleration for the open-iscsi initiator. The cxgb3i driver offers the iscsi PDU based offload: - digest insertion and verification - payload direct-placement into host memory buffer. Signed-off-by: Karen Xie <kxie@chelsio.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
| * | | [SCSI] zfcp: Remove unnecessary warning messageChristof Schmitt2008-12-292-7/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove a message that was emitted for a port that could not initially be opened. This is a rare case when the port discovery hits an initiator port and only confuses the user with an initator port logged in the message. Remove the whole special case: The failed "open port" request triggers required follow-up actions anyway. Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Acked-by: Felix Beck <felix@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
| * | | [SCSI] zfcp: Add support for unchained FSF requestsChristof Schmitt2008-12-296-40/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the support to send CT and ELS requests as unchained FSF requests. This is required for older hardware and was somehow omitted during the cleanup of the FSF layer. The req_count and resp_count attributes are unused, so remove them instead of adding a special case for setting them. Also add debug data and a warning, when the ct request hits a limit. Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Acked-by: Martin Petermann <martin@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
| * | | [SCSI] zfcp: Remove busid macroChristof Schmitt2008-12-293-8/+6Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the change to the dev_ message macros, the macro to get the busid is only used in a few places. Remove it and directly get the dev_name from the device. Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
| * | | [SCSI] zfcp: remove DID_DID flagChristof Schmitt2008-12-294-9/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The port flag DID_DID indicates whether we know the current id of the port. This is always set in parallel. Since the id 0 is invalid (because the port id 0 is invalid) we can remove the DID_DID flag: d_id of 0 indicates an invalid d_id != 0 is a valid one. Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Acked-by: Felix Beck <felix@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
| * | | [SCSI] zfcp: Simplify mask lookups for incoming RSCNsChristof Schmitt2008-12-292-30/+15Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use an array for looking up the mask corresponding to the 2-bit information instead of the switch/case. Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Acked-by: Felix Beck <felix@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
| * | | [SCSI] zfcp: Remove initial device data from zfcp_dataChristof Schmitt2008-12-292-54/+45Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The information from the kernel parameter is only needed during init. Keep the three pieces (busid, wwpn and lun) local to simplify the global zfcp_data structures. While at it, also remove the unused loglevel variable and give the module parameter variable a better name. Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Acked-by: Felix Beck <felix@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
| * | | [SCSI] zfcp: fix compile warningHeiko Carstens2008-12-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Get rid of this one: drivers/s390/scsi/zfcp_erp.c: In function 'zfcp_erp_thread': drivers/s390/scsi/zfcp_erp.c:1400: warning: ignoring return value of 'down_interruptible', declared with attribute warn_unused_result zfcp_erp_thread is a kernel thread which can't receive any signals. So introduce a dummy variable and get rid of the warning. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
| * | | [SCSI] zfcp: Remove adapter listChristof Schmitt2008-12-293-28/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the latest changes, the list of FCP devices is only used to lookup the adapter for requests from the actcli tool. Change this to use the lookup function in the cio layer. Now we can remove the adapter list and have one place less to use the global config_lock. Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Acked-by: Felix Beck <felix@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
| * | | [SCSI] zfcp: Simplify SBAL allocation to fix sparse warningsChristof Schmitt2008-12-291-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When waiting for a request claim the SBAL before waiting. This way, locking before each check of the free counter is not required and sparse does not emit warnings for the complicated locking scheme. Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Acked-by: Felix Beck <felix@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
| * | | [SCSI] zfcp: register with SCSI layer on ccw registrationSwen Schillig2008-12-292-7/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Synchronize the registration and de-registration with the SCSI layer at CCW registration, de-registration. Before we registered with the SCSI layer on adapter activation. This way the reg and de-reg process is in balance. Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
| * | | [SCSI] zfcp: Fix message line breakChristof Schmitt2008-12-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the closing parenthesis before the line break. Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Acked-by: Felix Beck <felix@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
| * | | [SCSI] qla2xxx: changes in multiq codeAnirban Chakraborty2008-12-298-115/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following changes have been made: 1. Scan outstanding commands only in the queue where it is submitted 2. Update queue registers directly in the fast path 3. Queue specific BAR is remapped only for multiq capable adapters Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
| * | | [SCSI] eata: fix the data buffer accessors conversion regressionFUJITA Tomonori2008-12-291-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the regression introduced by the commit 58e2a02eb18393e76a469580fedf7caec190eb5e (eata: convert to use the data buffer accessors), reported: http://marc.info/?t=122987621300006&r=1&w=2 - fix DMA_NONE handling in map_dma() - this driver can't use scsi_dma_map since host->shost_gendev.parent is not set properly (it uses scsi_register). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Reported-by: Arthur Marsh <arthur.marsh@internode.on.net> Tested-by: Arthur Marsh <arthur.marsh@internode.on.net> Cc: stable@kernel.org Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
| * | | [SCSI] ibmvfc: Improve async event handlingBrian King2008-12-292-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While doing various error injection testing, such as cable pulls and target moves, some issues were observed in handling these events. This patch improves the way these events are handled by increasing the delay waiting for the fabric to settle and also changes the behavior of Link Up to break the CRQ to ensure everything gets cleaned up properly on the VIOS. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
| * | | [SCSI] lpfc : correct printk types on PPC compilesJames Smart2008-12-292-8/+12
| | | | | | | | | | | | | | | | | | | | Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
| * | | [SCSI] ipr: fix lockdep warning from ipr_ioa_reset_doneMark Nelson2008-12-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To fix the following lockdep warning we turn the spin_unlock_irq() into a spin_unlock() and similarly for the corresponding spin_lock_irq(). We can do this because there is no need to enable interrupts in this path (thanks to Bring King for the tip). Badness at kernel/lockdep.c:2193 NIP: c0000000000855d0 LR: c0000000000855b4 CTR: c0000000000482d0 REGS: c00000000fffb8d0 TRAP: 0700 Not tainted (2.6.28-rc5-autokern1) MSR: 8000000000021032 <ME,IR,DR> CR: 28000022 XER: 00000004 TASK = c00000000091fa80[0] 'swapper' THREAD: c000000000a3c000 CPU: 0 GPR00: 0000000000000000 c00000000fffbb50 c000000000a3c2e0 0000000000000001 GPR04: 000000000000a580 c0000000003870d4 0000000000000000 0000000000000001 GPR08: 0000000000000000 c00000000112fdf0 c0000000008ed918 c000000000abcfd0 GPR12: 0000000048000088 c000000000a7f300 0000000000000000 0000000002100000 GPR16: c000000000644bd0 c000000000643390 0000000000000000 00000000003d0c00 GPR20: 00000000028372d8 c0000000007372d8 0000000002837548 c000000000737548 GPR24: c000000000644660 00000000028372d8 000000000000001a c000000076760000 GPR28: 0000000000000004 c0000000004e8450 c0000000009aafb0 c00000000091fa80 NIP [c0000000000855d0] .trace_hardirqs_on_caller+0x10c/0x194 LR [c0000000000855b4] .trace_hardirqs_on_caller+0xf0/0x194 Call Trace: [c00000000fffbb50] [c00000000fffbbe0] 0xc00000000fffbbe0 (unreliable) [c00000000fffbbe0] [c0000000004e8450] ._spin_unlock_irq+0x38/0x5c [c00000000fffbc70] [c0000000003870d4] .ipr_ioa_reset_done+0x204/0x284 [c00000000fffbd10] [c00000000037d234] .ipr_reset_ioa_job+0xc4/0xec [c00000000fffbda0] [c000000000385ce0] .ipr_isr+0x208/0x484 [c00000000fffbe50] [c0000000000aaf3c] .handle_IRQ_event+0x58/0xd4 [c00000000fffbef0] [c0000000000ad978] .handle_fasteoi_irq+0x110/0x1ac [c00000000fffbf90] [c000000000025214] .call_handle_irq+0x1c/0x2c [c000000000a3f9a0] [c00000000000d168] .do_IRQ+0x120/0x210 [c000000000a3fa40] [c000000000004804] hardware_interrupt_entry+0x1c/0x98 --- Exception: 501 at .pseries_dedicated_idle_sleep+0xec/0x1cc LR = .pseries_dedicated_idle_sleep+0xdc/0x1cc [c000000000a3fd30] [c000000000038208] .pseries_dedicated_idle_sleep+0x74/0x1cc (unreliable) [c000000000a3fdd0] [c000000000012134] .cpu_idle+0x114/0x1dc [c000000000a3fe60] [c0000000004ecb18] .rest_init+0x7c/0x94 [c000000000a3fee0] [c000000000700a40] .start_kernel+0x4b8/0x4e0 [c000000000a3ff90] [c000000000008368] .start_here_common+0x1c/0x34 Instruction dump: e92d01b0 80090894 2f800000 41be002c 481ed1d1 60000000 2fa30000 419e0080 e93e8090 80090000 2f800000 409e0070 <0fe00000> 48000068 7fe3fb78 38800001 Signed-off-by: Mark Nelson <markn@au1.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>