James Bottomley [Thu, 14 Jul 2005 16:54:17 +0000 (11:54 -0500)]
[SCSI] fix function prototype warning
int_to_scsilun() takes a pointer to a struct scsi_lun in it's
prototype, so add this structure to scsi_device.h to avoid declaration
inside function prototype warnings.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] Redundant this_count check in sd_init_command()
I was going over the scsi I/O submit path, when sd_init_command
construct the scsi command, this_count is already checked in the
previous else if clause. Why does it need to check it again in
the last else block?
Patch to delete the spurious check.
Signed-off-by: Ken Chen <kenneth.w.chen@intel.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
scsi_init_io calls scsi_alloc_sgtable and then calls blk_rq_map_sg
to initialize the scatterlist structure. blk_rq_map_sg() already
memset the structure for every new segment. That makes the memset
in scsi_alloc_sgtable unnecessary.
Patch to delete the extra memset in scsi_alloc_sgtable. Tested on
a x86_64 machine. Looks stable to me.
Signed-off-by: Ken Chen <kenneth.w.chen@intel.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
One of the issues we had was reverting the midlayers lun value
into the 8byte lun value that we wanted to send to the device.
Historically, there's been some combination of byte swapping,
setting high/low, etc. There's also been no common thread between
how our driver did it and others. I also got very confused as
to why byteswap routines were being used.
Anyway, this patch is a LLDD-callable function that reverts the
midlayer's lun value, stored in an int, to the 8-byte quantity
(note: this is not the real 8byte quantity, just the same amount
that scsilun_to_int() was able to convert and store originally).
This also solves the dilemma of the thread:
http://marc.theaimsgroup.com/?l=linux-kernel&m=112116767118981&w=2
A patch for the lpfc driver to use this function will be along
in a few days (batched with other patches).
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Andrew Vasquez [Sat, 9 Jul 2005 01:00:36 +0000 (18:00 -0700)]
[SCSI] qla2xxx: Cleanup FC remote port registration.
Cleanup FC remote port registration.
Due to the inherent behaviour (an immediate scan) of adding
a 'target'-role-capable rport via fc_remote_port_add(),
split the registration into two steps -- addition as
unknown-type role, then use fc_remote_port_rolchg() with
appropriate role (based on PLOGI/PRLI bits). This allows
for a more cleaner rport->dd_data management as can be seen
with the simplified qla2xxx_slave_alloc() function.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Consolidate near-duplicate RISC reset logic from
qla24xx_reset_chip() and qla24xx_chip_diag(). Also, after
initiating a soft-reset, insure the firmware has completed
all NVRAM accesses before continuing.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Andrew Vasquez [Wed, 6 Jul 2005 17:32:37 +0000 (10:32 -0700)]
[SCSI] qla2xxx: Correct maximum supported lun and target-id definitions.
Correct maximum supported lun and target-id definitions.
The driver uses command-IOCBs which support a maximum lun
value of 0xffff -- correct #define to reflect the change.
Also, remove superfluous MAX_TARGET definition.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Andrew Vasquez [Wed, 6 Jul 2005 17:31:27 +0000 (10:31 -0700)]
[SCSI] qla2xxx: Add ISP24xx ISR routines.
Add ISP24xx ISR routines.
Add appropriate glue-code for ISP24xx support -- this
included generalizing some of the core handling
routines (qla2x00_async_event() [pull-up retrieval of
mailbox values] and qla2x00_status_entry()]. Fixup
2100/2300 ISRs to handle the new conventions.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Add appropriate glue-code for ISP24xx support while
manipulting IOCB packets. Add an ISP24xx specific
'start_scsi' routine due to command-type-7 layout
changes.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Andrew Vasquez [Wed, 6 Jul 2005 17:30:26 +0000 (10:30 -0700)]
[SCSI] qla2xxx: Add ISP24xx definitions.
Add ISP24xx definitions.
Add requisite structure definitions and #define's for ISP24xx
support. Also drop volatile modifiers from device_reg_* register
layouts as the members are never really accessed, only their
offsets within the layout are used during reads and writes.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
James Bottomley [Sat, 2 Jul 2005 16:22:01 +0000 (12:22 -0400)]
[SCSI] SPI transport class, don't negotiate options not supported
At the moment, the transport class blindly tries to set things like
QAS and IU, even if the drive won't support them. It's best not to
annoy the devices like this and instead only set what the drive says
is actually supported.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
James Bottomley [Sat, 2 Jul 2005 19:46:14 +0000 (14:46 -0500)]
[SCSI] aic7xxx: fix boot hang with Fujitsu drives
Apparently these are the only drives that try to negotiate IU and QAS
at u160 speeds. The aic7xxx driver can't cope with this. The fix is
to eliminate the IU and QAS setting routines. I've #if 0'd them out,
just in case we ever get the sequencer documentation out of Adaptec,
since we'd then be able to fix the driver.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This code pokes deep into EH internals and duplicates scsi_error.c code
wrongly. It doesn't compile anymore in scsi-misc, so let's #if 0 out
the code - the driver hasn't worked for more than five years anyway.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Update copyright notice text and include year 2005.
Add Copyright notice for Christoph Hellwig to several files: lpfc.h
lpfc_attr.c lpfc_els.c lpfc_hbadisc.c lpfc_init.c lpfc_mbox.c
lpfc_mem.c lpfc_nportdisc.c lpfc_scsi.c lpfc_sli.c
Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] lpfc: Fix ADISC completion incorrectly putting initiators on mapped list
Symptom - An unmapped node (initiator) that goes away in a situation
such as cable pull, comes back as a mapped node. Fix - On ADISC
completion, put a list on the mapped list only if it is a FCP_TARGET.
Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] lpfc: Fix LS_RJT never sent by lpfc_els_unsol_event()
lpfc_els_unsol_event() checks rjt_err to determine is LS_RJT should be
sent. However, rjt_err was set to LSEXP_NOTHING_ELSE (which is 0) in
cases where an LS_RJT should be sent, so rjt_err was never true.
Change lpfc_els_unsol_event() to set rjt_err to 1 when LS_RJT should
be sent.
Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Fix driver not seeing LP6000. Fix: add PCI id to the pci_device_id
table and a short description for the HBA in get_hba_model_desc().
Also add a default clause to the switch statement that parses the
various PCI ID's.
Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Add max_sectors to the driver host template and initialize it with
0xFFFF since the driver has no limitations on the size a transfer
contained by a scsi command and that fits within the sg_tablesize
provisioned by the driver. This fixes a performance issue seen in
some configurations.
Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Timeout of READ_SPARM64 causes call to lpfc_mbox_timeout_handler which
reads psli->mbox_active to determine the timeout mbox. Timeout
handler then NULL's psli->mbox_active and calls
lpfc_mbx_cmpl_read_sparam(), which on timeout condition, calls
link_down(). link_down() now calls disc_done() which calls
mbox_timeout_hander() again since WORKER_MBOX_TMO is still set, which
goes back to read psli->mbox_active which is already NULL'ed.
Remove redundant if statement in lpfc_mbox_timeout_handler. pmbox is
assigned psli->mbox_active so there is no need to check if it actually
equals psli->mbox_active.
Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] Fix issue where all hosts log nodev message for other initiators
Fix issue where all hosts connected to SAN get spammed with nodev
message when other initiators go away. Display nodev message only
when FC targets go away. However this behavior will be overridden if
LOG_DISCOVERY is set.
Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
- rename PGP/HPH to lpfc_pgp/lpfc_hgp
- use __le32 types for the members to start fixing sparse -Wbitwise
issues
- remove lpfc_sli.MBhostaddr, we can always use the pointer from
SLI2_DESC directly
Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
We never look at it except for the old megaraid driver that abuses it
for sending internal commands. That usage can be fixed easily because
those internal commands are single-threaded by a mutex and we can easily
use a completion there.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
1. Establish a simple API for process freezing defined in linux/include/sched.h:
frozen(process) Check for frozen process
freezing(process) Check if a process is being frozen
freeze(process) Tell a process to freeze (go to refrigerator)
thaw_process(process) Restart process
frozen_process(process) Process is frozen now
2. Remove all references to PF_FREEZE and PF_FROZEN from all
kernel sources except sched.h
3. Fix numerous locations where try_to_freeze is manually done by a driver
4. Remove the argument that is no longer necessary from two function calls.
5. Some whitespace cleanup
6. Clear potential race in refrigerator (provides an open window of PF_FREEZE
cleared before setting PF_FROZEN, recalc_sigpending does not check
PF_FROZEN).
This patch does not address the problem of freeze_processes() violating the rule
that a task may only modify its own flags by setting PF_FREEZE. This is not clean
in an SMP environment. freeze(process) is therefore not SMP safe!
Signed-off-by: Christoph Lameter <christoph@lameter.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Domen Puncer [Sat, 25 Jun 2005 21:59:36 +0000 (14:59 -0700)]
[PATCH] list_for_each_entry: fs-dquot.c
Make code more readable with list_for_each_entry_safe.
Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: Maximilian Attems <janitor@sternwelten.at> Signed-off-by: Domen Puncer <domen@coderock.org> Acked-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] serial/68328serial: replace schedule_timeout() with msleep_interruptible()
Use msleep_interruptible() instead of schedule_timeout() in send_break() to
guarantee the task delays as expected. Change @duration's units to
milliseconds, and modify arguments in callers appropriately.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] serial/68360serial: replace schedule_timeout() with msleep_interruptible()
Use msleep_interruptible() instead of schedule_timeout() in send_break() to
guarantee the task delays as expected. Change @duration's units to
milliseconds, and modify arguments in callers appropriately.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Tobias Klauser [Sat, 25 Jun 2005 21:59:30 +0000 (14:59 -0700)]
[PATCH] Remove duplicate file in Documentation/networking
The files wanpipe.txt and wan-router.txt in Documentation/networking contain
the exact same information (diff between the two shows no document is "Linux
WAN Router Utilities Package" and therefor the name wan-router.txt is more
appropriate.
Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Tobias Klauser [Sat, 25 Jun 2005 21:59:29 +0000 (14:59 -0700)]
[PATCH] Remove duplicate file in Documentation/networking (00-INDEX)
wanpipe.txt and wan-router.txt in Documentation/networking contain the exact
same information (diff between the two shows no
Documentation/networking/00-INDEX as pointed out by Randy Dunlap.
Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Tobias Klauser [Sat, 25 Jun 2005 21:59:27 +0000 (14:59 -0700)]
[PATCH] sound/oss/cmpci: Use the DMA_32BIT_MASK constant
Use the DMA_32BIT_MASK constant from dma-mapping.h when calling
pci_set_dma_mask() or pci_set_consistent_dma_mask() See
http://marc.theaimsgroup.com/?t=108001993000001&r=1&w=2 for details
Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Tobias Klauser [Sat, 25 Jun 2005 21:59:27 +0000 (14:59 -0700)]
[PATCH] sound/oss/es1370: Use the DMA_32BIT_MASK constant
Use the DMA_32BIT_MASK constant from dma-mapping.h when calling
pci_set_dma_mask() or pci_set_consistent_dma_mask() See
http://marc.theaimsgroup.com/?t=108001993000001&r=1&w=2 for details
Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Tobias Klauser [Sat, 25 Jun 2005 21:59:26 +0000 (14:59 -0700)]
[PATCH] sound/oss/es1371: Use the DMA_32BIT_MASK constant
Use the DMA_32BIT_MASK constant from dma-mapping.h when calling
pci_set_dma_mask() or pci_set_consistent_dma_mask() See
http://marc.theaimsgroup.com/?t=108001993000001&r=1&w=2 for details
Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Tobias Klauser [Sat, 25 Jun 2005 21:59:25 +0000 (14:59 -0700)]
[PATCH] sound/oss/esssolo1: Use the DMA_32BIT_MASK constant
Use the DMA_32BIT_MASK constant from dma-mapping.h when calling
pci_set_dma_mask() or pci_set_consistent_dma_mask() See
http://marc.theaimsgroup.com/?t=108001993000001&r=1&w=2 for details
Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
J.A. Magallon [Sat, 25 Jun 2005 21:59:22 +0000 (14:59 -0700)]
[PATCH] Kill signed chars
scripts/ is full of mismatches between char* params an signed char* arguments,
and viceversa. gcc4 now complaints loud about this. Patch below deletes all
those 'signed'.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Sat, 25 Jun 2005 21:59:18 +0000 (14:59 -0700)]
[PATCH] drivers/isdn/hisax/: possible cleanups
This patch contains the following possible cleanups:
- make needlessly global code static
- remove the compiled but unused st5481_hdlc.{c,h}
- kill enternow.h
- enternow_pci.c: kill InByte/OutByte/BYTE
- isdnl2.c: kill FreeSkb
- remove or #if 0 the following unused functions:
- config.c: IsdnCardState
- ipacx.c: ipacx_new_ph
- ipacx.c: dch_bh
- ipacx.c: setup_ipacx
- isdnl2.c: IsRR
Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Kai Germaschewski <kai@germaschewski.name> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Sat, 25 Jun 2005 21:59:16 +0000 (14:59 -0700)]
[PATCH] drivers/char/ip2*: cleanups
This patch contains the following cleanups:
- i2cmd.c: #if 0 the unused function i2cmdUnixFlags
- i2cmd.c: make the needlessly global funciton i2cmdBaudDef static
- ip2main.c: remove dead code that wasn't reachable due to an #ifdef
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jesper Juhl [Sat, 25 Jun 2005 21:59:15 +0000 (14:59 -0700)]
[PATCH] kfree cleanups for drivers/firmware/
Here's a patch with kfree() cleanups for drivers/firmware/efivars.c Patch
removes redundant NULL checks before kfree and also makes a small
whitespace cleanup - moves two statements on same line to separate lines.
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Acked-by: Matt Domsch <Matt_Domsch@dell.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Sat, 25 Jun 2005 21:59:11 +0000 (14:59 -0700)]
[PATCH] change the SOUND_PRIME handling
SOUND_PRIME (for OSS) is a tristate.
This doesn't make much sense if most users are checking for
SOUND_PRIME!=0.
This patch changes the semantics of SOUND_PRIME to being a limit for all
OSS modules, IOW: SOUND_PRIME=m does now say that all OSS drivers can
only be modular.
As a side effect, since SOUND_PRIME already depends on SOUND, there's no
longer a reason for drivers depending on SOUND_PRIME to additionally
depend on SOUND.
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Sat, 25 Jun 2005 21:59:10 +0000 (14:59 -0700)]
[PATCH] drivers/block/ll_rw_blk.c: cleanups
This patch contains the following cleanups:
- make needlessly global code static
- remove the following unused global functions:
- blkdev_scsi_issue_flush_fn
- __blk_attempt_remerge
- remove the following unused EXPORT_SYMBOL's:
- blk_phys_contig_segment
- blk_hw_contig_segment
- blkdev_scsi_issue_flush_fn
- __blk_attempt_remerge
Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Sat, 25 Jun 2005 21:59:06 +0000 (14:59 -0700)]
[PATCH] fs/jffs/: cleanups
This patch contains the following cleanups:
- make needlessly global functions static
- provide some debugging helper functions only for appropriate
values of CONFIG_JFFS_FS_VERBOSE
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Sat, 25 Jun 2005 21:59:04 +0000 (14:59 -0700)]
[PATCH] drivers/char/nvram.c: possible cleanups
This patch contains the following possible cleanups:
- make the needlessly global function __nvram_set_checksum static
- #if 0 the unused global function nvram_set_checksum
- remove the EXPORT_SYMBOL's for both functions
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>