Commit Graph

2529 Commits (04d9768ff8847b0ae8c41ac3cfb3c5bb2e31699a)

Author SHA1 Message Date
Hannes Reinecke 5a09e39810 [SCSI] scsi_debug: support REPORT TARGET PORT GROUPS
This patch adds support for REPORT TARGET PORT GROUPS. This is used
eg for the multipathing priority callout to determine the path
priority.
With this patch multipath-tools can use the existing mpath_prio_alua
callout to exercise the path priority grouping.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:14:13 -07:00
Jes Sorensen cd00b7f5d8 [SCSI] qla1280 bus reset typo
Fix typo in check of return value of qla1280_bus_reset() which would
result in an adapter reset in addition to the bus reset.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:14:09 -07:00
Mike Christie b5072ea091 [SCSI] libiscsi: fix logout pdu processing
According to the iscsi RFC, we cannot send other requests if
we have sent a logout pdu. This patch enforces this requirement
by blocking the session and suspending the send thread. Userspace
decides if we restart the connection or if we just free everything.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:14:05 -07:00
Mike Christie 5831c737f7 [SCSI] libiscsi: fix aen support
We have been dropping the pdu. We should just send it to userspace
and let it handle it.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:14:01 -07:00
Mike Christie cd529a46e1 [SCSI] libiscsi: fix missed iscsi_task_put in xmit error path
from bhalevy@gmail.com:

It looks like change 652 to libiscsi.c added some dead code around line
670
                if (rc) {
                        spin_unlock_bh(&conn->session->lock);
                        goto again;
                }

since 5 lines above we goto again if (rc).

It looks like the previous if (rc) should go away if we want to put the
ctask before
breaking out of the while loop with "goto again" (see following patch).

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:13:57 -07:00
Mike Christie 9864404791 [SCSI] libiscsi: fix oops in connection create failure path
If connection creation fails we end up calling list_del
on a invalid struct. This then causes an oops. We are not
acutally using the lists (old MCS code we thought might
be useful elsewhere) so this patch just removes that
code.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:13:53 -07:00
Mike Christie 43a145a344 [SCSI] iscsi class: fix slab corruption during restart
The transport class recv mempools are causing slab corruption.
We could hack around netlink's lack of mempool support like dm,
but it is just too ulgy (dm's hack is ugly enough :) when you need
to support broadcast.

This patch removes the recv pools. We have not used them even when
we were allocting 20 MB per session and the system only had 64 MBs.
And we have no pools on the send side and have been ok there. When
Peter's work gets merged we can use that since the network guys
are in favor of that approach and are not going to add mempools
everywhere.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:13:48 -07:00
Alan Cox 47bcd3546d [SCSI] Switch fdomain to the pci_get API
Doesn't make the hardware hot pluggable but does ensure the driver won't
crash when another device is hot-unplugged at the wrong moment. Soon I
propose to deprecate pci_find_device() and some of its friends.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:13:45 -07:00
James Bottomley ed632da84c [SCSI] add can_queue to host parameters
Debugging TCQ issues has shown me this is a very useful parameter to be
able to view.  Add it to he host class parameters.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:13:40 -07:00
Andrey Mirkin 031280f6e7 [SCSI] megaraid_{mm,mbox}: 64-bit DMA capability fix
It is known that 2 LSI Logic MegaRAID SATA RAID Controllers (150-4 and
150-6) don't support 64-bit DMA. Unfortunately currently this check is
wrong and driver sets 64-bit DMA mode for these devices.

Signed-off-by: Andrey Mirkin <amirkin@sw.ru>
Acked-by: "Ju, Seokmann" <Seokmann.Ju@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:13:31 -07:00
Sergey Kononenko 3fc2aef522 [SCSI] aic94xx: Supermicro motherboards support
Add PCI id. Plus correct for possibly missing resistor that can cause
FLASHEX to have the wrong value.

Signed-off-by: Sergey Kononenko <sergk@sergk.org.ua>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:13:27 -07:00
Santiago Leon 9c3121feef [SCSI] ibmvscsi: correctly reenable CRQ
The "ibmvscsi: treat busy and error conditions separately" patch
submitted by Dave Boutcher back in June incorrectly reenables the CRQ.
The broken logic causes the adapter to get disabled if the CRQ
connection happens to close temporarily.  This patch "fixes that
obviously wrong logic check" (Dave's words).

Signed-off-by: Santiago Leon <santil@us.ibm.com>
Signed-off-by: David Boutcher <sleddog@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:13:17 -07:00
Andrew Vasquez 7c83a3ceb6 [SCSI] qla2xxx: Update version number to 8.01.07-k3.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:13:12 -07:00
Andrew Vasquez df7baa506c [SCSI] qla2xxx: Correct QUEUE_FULL handling.
- Drop queue-depths across all luns for a given fcport
  during TASK_SET_FULL statuses.
- Ramp-up I/Os after throttling.
- Consolidate completion-status handling of CS_QUEUE_FULL with
  CS_COMPLETE as ISP24xx firmware no longer reports
  CS_QUEUE_FULL.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:13:08 -07:00
Andrew Vasquez 18c6c12759 [SCSI] qla2xxx: Workaround D3 power-management issues.
Early ISP2432 parts have a known hardware issue when coming
out of a D3 hot state.  This issue can result in a hung PCIe
link.  Recent firmwares contain a workaround whereby the
stop-firmware mailbox command prevents the ISP from entering
the D3 hot state.

In order to ensure that the workaround succeeded the driver
must verify that the stop-firmware mailbox command completes
successfully.  In the event of a failure, the driver
attempts a shutdown-retry after resetting the ISP and
re-executing firmware.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:13:04 -07:00
Andrew Vasquez f1663ad5db [SCSI] qla2xxx: Check return value of sysfs_create_bin_file() usage.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:12:54 -07:00
Henrik Kretzschmar 0fc82d5e84 [SCSI] convert ninja driver to struct scsi_cmnd
Changes the obsolete typedefd Scsi_Cmnd to struct scsi_cmnd in
the ninja scsi pcmcia driver.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:12:42 -07:00
Henrik Kretzschmar c543a3739c [SCSI] Scsi_Cmnd conversion in psi240i driver
Changes the obsolete Scsi_Cmnd to struct scsi_cmnd in psi240i-driver.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:12:38 -07:00
Eric Sesterhenn 0b3a82d391 [SCSI] lpfc: check before dereference in lpfc_ct.c
If we fail to allocate mp->virt during the first while loop iteration,
mlist is still uninitialized, therefore we should check if before
dereferencing.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: James Smart <James.Smart@Emulex.Com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:12:34 -07:00
Alexey Dobriyan 46c43db1ea [SCSI] scsi_lib.c: use BUILD_BUG_ON
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:12:29 -07:00
Henne 8e394aec14 [SCSI] fix typo in previous Scsi_Cmnd convertion in aic7xxx_old.c
Fixes a typo in the aic7xxx_old.c.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:12:25 -07:00
Andrew Vasquez 11010fecd2 [SCSI] Maintain module-parameter name consistency with qla2xxx/qla4xxx.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:12:17 -07:00
Hannes Reinecke 80f1443c66 [SCSI] aic7xxx: Adjust .max_sectors
According to the adaptec sources aic7xxx / aic79xx really can do
4MB transfers. So we should adjust .max_sectors.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:12:12 -07:00
Doug Maxey 5ae16db369 [SCSI] qla4xxx: fix double printk on load
There is a dup printk at the tail of qla4xxx_module_init().  Remove the
first instance as it's before the complete success of the function.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:12:07 -07:00
Guennadi Liakhovetski 75c28851c9 [SCSI] tmscsim: set max_sectors
AM53C974A's Start Transfer Counter register has 24 bits, thus
maximum transfer length is 16MiB. But the maximum I can test
is 8MiB, so use that until somebody tests 16MiB.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:12:03 -07:00
Kai Makisara 413f732720 [SCSI] st: Fixup -ENOMEDIUM
Based on the original patch from Hannes Reinecke <hare@suse.de>

Fix st_open() to return -ENOMEDIUM instead of -EIO if no medium is
found.

Signed-off-by: Kai Makisara <kai.makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:11:59 -07:00
Henne a24342b90c [SCSI] Scsi_Cmnd conversion in qlogicfas408 driver
Change obsolete Scsi_Cmnd to struct scsi_cmnd in the Qlocic FAS408 driver.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>

rejections fixed and
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:11:55 -07:00
Henne 811c93666c [SCSI] Scsi_Cmnd convertion in sun3-driver
Change the obsolete Scsi_Cmnd to struct scsi_cmnd in the sun3-driver.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-25 15:11:51 -07:00
Alan Cox a31baca58c [PATCH] irq updates: make eata_pio compile
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-20 10:26:38 -07:00
Linus Torvalds ce9e3d9953 Merge branch 'ubuntu-updates' of master.kernel.org:/pub/scm/linux/kernel/git/bcollins/ubuntu-2.6
* 'ubuntu-updates' of master.kernel.org:/pub/scm/linux/kernel/git/bcollins/ubuntu-2.6:
  [pci_ids] Add Quicknet XJ vendor/device ID's.
  [valkyriefb] Ifdef for when CONFIG_NVRAM isn't enabled.
  [platinumfb] Ifdef for when CONFIG_NVRAM isn't enabled.
  [igafb] Add pci dev table for module auto loading.
  [controlfb] Ifdef for when CONFIG_NVRAM isn't enabled.
  [hid-core] TurboX Keyboard needs NOGET quirk.
  [ixj] Add pci dev table for module auto loading.
  [initio] Add pci dev table for module auto loading.
  [fdomain] Add pci dev table for module auto loading.
  [BusLogic] Add pci dev table for auto module loading.
  [mv643xx] Add pci device table for auto module loading.
  [alim7101] Add pci dev table for auto module loading.
2006-10-18 18:30:00 -07:00
Ben Collins 0128873278 [initio] Add pci dev table for module auto loading.
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-10-18 08:40:57 -04:00
Ben Collins 3985b97744 [fdomain] Add pci dev table for module auto loading.
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-10-18 08:38:41 -04:00
Ben Collins 745b5715fa [BusLogic] Add pci dev table for auto module loading.
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-10-18 08:36:57 -04:00
Ben Collins b48194bf0d [SPARC]: Fix some section mismatch warnings in sparc drivers.
Signed-off-by: Ben Collins <ben.collins@ubuntu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-10-17 19:28:51 -07:00
Andrey Mirkin 8741ca71a3 [PATCH] scsi: megaraid_{mm,mbox}: 64-bit DMA capability fix
It is known that 2 LSI Logic MegaRAID SATA RAID Controllers (150-4 and
150-6) don't support 64-bit DMA.  Unfortunately currently this check is
wrong and driver sets 64-bit DMA mode for these devices.

Signed-off-by: Andrey Mirkin <amirkin@sw.ru>
Acked-by: Vasily Averin <vvs@sw.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-16 08:30:04 -07:00
Matthew Wilcox 3e082a910d [SCSI] Add ability to scan scsi busses asynchronously
Since it often takes around 20-30 seconds to scan a scsi bus, it's
highly advantageous to do this in parallel with other things.  The bulk
of this patch is ensuring that devices don't change numbering, and that
all devices are discovered prior to trying to start init.  For those
who build SCSI as modules, there's a new scsi_wait_scan module that will
ensure all bus scans are finished.

This patch only handles drivers which call scsi_scan_host.  Fibre Channel,
SAS, SATA, USB and Firewire all need additional work.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-11 13:44:25 -05:00
Matthew Wilcox 53d5ed627d [PATCH] Use linux/io.h instead of asm/io.h
In preparation for moving check_signature, change these users from asm/io.h
to linux/io.h

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-11 11:14:23 -07:00
Al Viro 3c5c6658d2 [PATCH] use %zu for size_t
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-10 15:37:24 -07:00
Al Viro fa1f5ea860 [PATCH] gfp annotations: scsi_error
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-10 15:37:23 -07:00
Al Viro aa7677d400 [PATCH] NULL noise removal: advansys
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-10 15:37:21 -07:00
Al Viro 1e0dbafd30 [PATCH] advansys __iomem annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-10 15:37:20 -07:00
Jeff Garzik 5d347c8aba Merge branch 'submit1' of viper:/spare/repo/irq-remove-2.6 into irqcleanups 2006-10-06 15:27:31 -04:00
Olaf Hering b7696ee3c0 [PATCH] fix mesh compile errors after irq changes
drivers/scsi/mesh.c:469: error: too many arguments to function 'mesh_interrupt'
drivers/scsi/mesh.c:507: error: too many arguments to function 'mesh_interrupt'

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-06 12:11:08 -07:00
Jeff Garzik c7bec5aba5 Various drivers' irq handlers: kill dead code, needless casts
- Eliminate casts to/from void*

- Eliminate checks for conditions that never occur.  These typically
  fall into two classes:

	1) Checking for 'dev_id == NULL', then it is never called with
	NULL as an argument.

	2) Checking for invalid irq number, when the only caller (the
	system) guarantees the irq handler is called with the proper
	'irq' number argument.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-06 15:00:58 -04:00
Linus Torvalds 44aefd2706 Merge git://git.infradead.org/~dhowells/irq-2.6
* git://git.infradead.org/~dhowells/irq-2.6:
  IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
  IRQ: Typedef the IRQ handler function type
  IRQ: Typedef the IRQ flow handler function type
2006-10-05 16:32:01 -07:00
Frederik Deweerdt d7a297baa6 [PATCH] fix qla{2,4} build error
commit 0181944fe6 adds a
'extended_error_logging' global variable to qla2xxx which is defined by
qla4xxx too.

Trying to build both drivers results in the following error:

  LD      drivers/scsi/built-in.o
  drivers/scsi/qla4xxx/built-in.o: In function `qla4xxx_slave_configure':
  drivers/scsi/qla4xxx/ql4_os.c:1433: multiple definition of `extended_error_logging'
  drivers/scsi/qla2xxx/built-in.o:drivers/scsi/qla2xxx/qla_os.c:2166:
  first defined here
  make[2]: *** [drivers/scsi/built-in.o] Error 1
  make[1]: *** [drivers/scsi] Error 2
  make: *** [drivers] Error 2

The following patch simply adds a qla2_ (qla4_ respectively) prefix to
the variable name.

Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-05 15:49:02 -07:00
David Howells 7d12e780e0 IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.

The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around.  On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).

Where appropriate, an arch may override the generic storage facility and do
something different with the variable.  On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.

Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions.  Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller.  A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.

I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.

This will affect all archs.  Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

	struct pt_regs *old_regs = set_irq_regs(regs);

And put the old one back at the end:

	set_irq_regs(old_regs);

Don't pass regs through to generic_handle_irq() or __do_IRQ().

In timer_interrupt(), this sort of change will be necessary:

	-	update_process_times(user_mode(regs));
	-	profile_tick(CPU_PROFILING, regs);
	+	update_process_times(user_mode(get_irq_regs()));
	+	profile_tick(CPU_PROFILING);

I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().

Some notes on the interrupt handling in the drivers:

 (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
     the input_dev struct.

 (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
     something different depending on whether it's been supplied with a regs
     pointer or not.

 (*) Various IRQ handler function pointers have been moved to type
     irq_handler_t.

Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-05 15:10:12 +01:00
Linus Torvalds 97d41e90fe Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (54 commits)
  [SCSI] Initial Commit of qla4xxx
  [SCSI] raid class: handle component-add errors
  [SCSI] SCSI megaraid_sas: handle thrown errors
  [SCSI] SCSI aic94xx: handle sysfs errors
  [SCSI] SCSI st: fix error handling in module init, sysfs
  [SCSI] SCSI sd: fix module init/exit error handling
  [SCSI] SCSI osst: add error handling to module init, sysfs
  [SCSI] scsi: remove hosts.h
  [SCSI] scsi: Scsi_Cmnd convertion in aic7xxx_old.c
  [SCSI] megaraid_sas: sets ioctl timeout and updates version,changelog
  [SCSI] megaraid_sas: adds tasklet for cmd completion
  [SCSI] megaraid_sas: prints pending cmds before setting hw_crit_error
  [SCSI] megaraid_sas: function pointer for disable interrupt
  [SCSI] megaraid_sas: frame count optimization
  [SCSI] megaraid_sas: FW transition and q size changes
  [SCSI] qla2xxx: Update version number to 8.01.07-k2.
  [SCSI] qla2xxx: Stall mid-layer error handlers while rport is blocked.
  [SCSI] qla2xxx: Add MODULE_FIRMWARE tags.
  [SCSI] qla2xxx: Add support for host port state FC transport attribute.
  [SCSI] qla2xxx: Add support for fabric name FC transport attribute.
  ...
2006-10-04 18:57:35 -07:00
David Somayajulu afaf5a2d34 [SCSI] Initial Commit of qla4xxx
open-iSCSI driver for Qlogic Corporation's iSCSI HBAs

Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: Doug Maxey <dwm@bubba.enoyolf.org>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 13:34:04 -05:00
Jeff Garzik ed542bed12 [SCSI] raid class: handle component-add errors
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 13:27:26 -05:00
Jeff Garzik 83aabc1be5 [SCSI] SCSI megaraid_sas: handle thrown errors
- handle clear_user() error

- handle and properly unwind from sysfs errors thrown during mod init

- adjust order of calls in megasas_exit() to precisely match
  registration order in megasas_init()

Signed-off-by: Jeff Garzik <jeff@garzik.org>

Updated for extra attribute and
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 13:26:25 -05:00
Jeff Garzik bb0766204c [SCSI] SCSI aic94xx: handle sysfs errors
Handle and unwind from errors returned by driver model functions.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 13:17:47 -05:00
Jeff Garzik 13026a6b98 [SCSI] SCSI st: fix error handling in module init, sysfs
- Notice and handle sysfs errors in module init, tape init

- Properly unwind errors in module init

- Remove bogus st_sysfs_class==NULL test, it is guaranteed !NULL at that point

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 13:16:29 -05:00
Jeff Garzik 5e4009ba3d [SCSI] SCSI sd: fix module init/exit error handling
- Properly handle and unwind errors in init_sd().  Fixes leaks on error,
  if class_register() or scsi_register_driver() failed.

- Ensure that exit_sd() execution order is the perfect inverse of
  initialization order.

FIXME:  If some-but-not-all register_blkdev() calls fail, we wind up
calling unregister_blkdev() for block devices we did not register.
This was a pre-existing bug.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 13:14:16 -05:00
Jeff Garzik 37e0333c68 [SCSI] SCSI osst: add error handling to module init, sysfs
- check all sysfs-related return codes, and propagate them back to callers

- properly unwind errors in osst_probe(), init_osst().  This fixes a
  leak that occured if scsi driver registration failed, and fixes an
  oops if sysfs creation returned an error.

(unrelated)
- kzalloc() cleanup in new_tape_buf()

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 13:12:44 -05:00
Henne de77aaff5f [SCSI] scsi: remove hosts.h
Remove the obsolete hosts.h file under drivers/scsi.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 13:10:52 -05:00
Henne c127828936 [SCSI] scsi: Scsi_Cmnd convertion in aic7xxx_old.c
Changes the obsolete Scsi_Cmnd to struct scsi_cmnd in aic7xxx_old.c.
Also replacing lots of whitespaces with tabs in structures and functions
which have been changed.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 13:10:01 -05:00
Sumant Patro 2a3681e56e [SCSI] megaraid_sas: sets ioctl timeout and updates version,changelog
This patch sets timeout of max 180 seconds for ioctl completion.
It also updates the Changelog and hikes the version to 3.05.

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 12:55:29 -05:00
Sumant Patro 5d018ad057 [SCSI] megaraid_sas: adds tasklet for cmd completion
This patch adds a tasklet for command completion.

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 12:53:42 -05:00
Sumant Patro 658dcedb4e [SCSI] megaraid_sas: prints pending cmds before setting hw_crit_error
This patch adds function to print the pending frame details before returning
failure from the reset routine. It also exposes a new variable megasas_dbg_lvl
that allows the user to set the debug level for logging.

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 12:52:15 -05:00
Sumant Patro b274cab779 [SCSI] megaraid_sas: function pointer for disable interrupt
This patch adds function pointer to invoke disable interrupt for
xscale and ppc IOP based controllers. Removes old implementation that checks
for controller type in megasas_disable_intr.

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 12:49:27 -05:00
Sumant Patro b1df99d943 [SCSI] megaraid_sas: frame count optimization
This patch removes duplicated code in frame calculation &  adds
megasas_get_frame_count() that also takes into account the number of frames
that can be contained in the Main frame.
FW uses the frame count to pull sufficient number of frames from host memory.

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 12:48:17 -05:00
Sumant Patro e3bbff9f3c [SCSI] megaraid_sas: FW transition and q size changes
This patch has the following enhancements :
        a. handles new transition states of FW to support controller hotplug.
        b. It reduces by 1 the maximum cmds that the driver may send to FW.
        c. Sends "Stop Processing" cmd to FW before returning failure from reset routine
        d. Adds print in megasas_transition routine
        e. Sends "RESET" flag to FW to do a soft reset of controller
to move from Operational to Ready state.
	f. Sending correct pointer (cmd->sense) to pci_pool_free

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 12:45:19 -05:00
Dave Jones 038b0a6d8d Remove all inclusions of <linux/config.h>
kbuild explicitly includes this at build time.

Signed-off-by: Dave Jones <davej@redhat.com>
2006-10-04 03:38:54 -04:00
Andrew Vasquez 65935ff95c [SCSI] qla2xxx: Update version number to 8.01.07-k2.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 17:29:10 -05:00
Andrew Vasquez 07db518313 [SCSI] qla2xxx: Stall mid-layer error handlers while rport is blocked.
Stall error handler if attempting recovery while an rport is
blocked.  This avoids device offline scenarios due to errors in
the error handler.

Reference implementation from lpfc/mptfc.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 17:29:06 -05:00
Andrew Vasquez bb8ee49984 [SCSI] qla2xxx: Add MODULE_FIRMWARE tags.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 17:29:02 -05:00
Andrew Vasquez 7047fcddb1 [SCSI] qla2xxx: Add support for host port state FC transport attribute.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 17:28:58 -05:00
Andrew Vasquez 90991c85d3 [SCSI] qla2xxx: Add support for fabric name FC transport attribute.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 17:28:50 -05:00
Andrew Vasquez a740a3f040 [SCSI] qla2xxx: Add support for system hostname FC transport attribute.
The system hostname will be used during a subsequent FDMI registration
with the fabric.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 17:28:46 -05:00
Andrew Vasquez 1620f7c2d8 [SCSI] qla2xxx: Add support for symbolic nodename FC transport attribute.
Refactored original code from qla_gs.c:qla2x00_rsnn_nn().

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 17:28:42 -05:00
Andrew Vasquez d8b4521349 [SCSI] qla2xxx: Add iIDMA support.
iIDMA (Intelligent Interleaved Direct Memory Access) allows for
the HBA hardware to send FC frames at the rate at which they can
be received by a target device.  By taking advantage of the
higher link rate, the HBA can maximize bandwidth utilization in a
heterogeneous multi-speed SAN.

Within a fabric topology, port speed detection is done via a Name
Server command (GFPN_ID) followed by a Fabric Management command
(GPSC).  In an FCAL/N2N topology, port speed is based on the HBA
link-rate.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 17:28:38 -05:00
Henne ee0ca6bab3 [SCSI] scsi: Scsi_Cmnd convertion in arm subtree
Changes the obsolete Scsi_Cmnd to struct scsi_cmnd in the arm subdir
of the scsi-subsys.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Acked-by: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 17:28:33 -05:00
Henne 1516b55d90 [SCSI] scsi: Convertion to struct scsi_cmnd in ips-driver
Converts the obsolete Scsi_Cmnd to struct scsi_cmnd in the ips-driver.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 17:28:29 -05:00
Uwe Zeisberger f30c226954 fix file specification in comments
Many files include the filename at the beginning, serveral used a wrong one.

Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-03 23:01:26 +02:00
Matt LaPlante 84eb8d0608 Fix "can not" in Documentation and Kconfig
Randy brought it to my attention that in proper english "can not" should always
be written "cannot". I donot see any reason to argue, even if I mightnot
understand why this rule exists.  This patch fixes "can not" in several
Documentation files as well as three Kconfigs.

Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-03 22:53:09 +02:00
Matt LaPlante 095096038d Fix several typos in drivers/
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-03 22:31:37 +02:00
Guennadi Liakhovetski 8f6fd19f1f [SCSI] enable clustering for tmscsim
following an email from John Adams <johna@onevista.com> to me with a patch
to enable tmscsim to use blocks up to 1MB and a discussion on linux-scsi,
below is a patch to enable clustering for tmscsim. I made it switchable
with a module parameter, with default "enable" - in case somebody gets
problems with it. Unfortunately, I was not able to check if this alone
lets you use any bigger blocks with a tape, as my tape seems to only
support 1 block size - only "mt setblk 1" is successful, any other value
fails. OTOH, testing on a P-133 showed that enabling clustering alone
improves throughput by 10% and reduces CPU load by another 10%, so, seems
a worthy thing to do. As for setting max_sectors, that might become a
separate patch...

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 09:16:48 -05:00
Serge E. Hallyn 96b644bdec [PATCH] namespaces: utsname: use init_utsname when appropriate
In some places, particularly drivers and __init code, the init utsns is the
appropriate one to use.  This patch replaces those with a the init_utsname
helper.

Changes: Removed several uses of init_utsname().  Hope I picked all the
	right ones in net/ipv4/ipconfig.c.  These are now changed to
	utsname() (the per-process namespace utsname) in the previous
	patch (2/7)

[akpm@osdl.org: CIFS fix]
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Cc: Kirill Korotaev <dev@openvz.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Andrey Savochkin <saw@sw.ru>
Cc: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-02 07:57:21 -07:00
Mike Christie f70cfa9bef [SCSI] scsi_devinfo: scsi2 HP and Hitachi entries
When SCSI-2 they can support luns past 7 and sparse luns.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-01 15:09:19 -05:00
Mike Christie 12427d9948 [SCSI] scsi_devinfo: add nec iStorage
support the report luns opcode
.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-01 15:08:41 -05:00
Mike Christie 5f619c5ba5 [SCSI] scsi_devinfo: add Tornado
This is from RHEL4. I do not have any info from our bugzilla. All
I could find was something like this thread
http://lkml.org/lkml/2005/1/7/346

Report lun for linux does not work. It may be our lun format code or
it may be the device. It is probably not worth it to add anything
special for this device, so the patch just adds BLIST_NOREPORTLUN.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-01 15:07:57 -05:00
Mike Christie 3441afc672 [SCSI] scsi_devinfo: add EMC Invista
This is from RHEL4. This box can support
scsi2 and can also support BLIST_SPARSELUN | BLIST_LARGELUN.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-01 15:07:11 -05:00
Arne Redlich 6470f2ba64 [SCSI] trivial scsi_execute_async fix
In scsi_execute_async()'s error path, a struct scsi_io_context
allocated with kmem_cache_alloc() is kfree()'d. Obviously
kmem_cache_free() should be used instead.

Signed-off-by: Arne Redlich <arne.redlich@xiranet.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-01 15:06:54 -05:00
Ed Lin fb4f66be59 [SCSI] stex: add new device (id 0x8650) support
A new device (id 0x8650, nickname 'yosemite') support is added.
It's basically the same, except for following items:
- mapping of id and lun by firmware
- special handling for some commands in interrupt routine
- change of internal copy function for these special commands
- different reset handling code
- different shutdown notification command

Signed-off-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-01 15:05:52 -05:00
Ed Lin f903d7b7a8 [SCSI] stex: cancel unused field in struct req_msg
The payload_sz field in struct req_msg is not big enough to indicate
the size of req_msg, as its type is u8.
It is confirmed that this field is not used by firmware, so cancel
it here.

Signed-off-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-01 15:05:38 -05:00
Eric Sesterhenn 80c6e3c0b5 [SCSI] fix scsi_device_types overrun in scsi.c
this overrun was spotted by coverity (cid #1403).

If type == ARRAY_SIZE(scsi_device_types), we are off by one.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-01 15:04:48 -05:00
Denis Vlasenko 7b75b990e3 [SCSI] aic7xxx: fix byte I/O order in ahd_inw
Comment says "Read high byte first as some registers increment..."
but code doesn't guarantee that, I think:
	return ((ahd_inb(ahd, port+1) << 8) | ahd_inb(ahd, port));
Compiler can reorder it.

Make the order explicit.

Signed-off-by: Denis Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>

Fixed rejections and added aic7xxx code
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-01 15:03:38 -05:00
Alan Cox 02a0fa676c [SCSI] Switch ips to pci_register from pci_module
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-01 10:39:44 -05:00
Peter Zijlstra 6e9a4738c9 [PATCH] completions: lockdep annotate on stack completions
All on stack DECLARE_COMPLETIONs should be replaced by:
DECLARE_COMPLETION_ONSTACK

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:24 -07:00
Richard Knutsson 6e21828743 [PATCH] Generic boolean
This patch defines:
* a generic boolean-type, named 'bool'
* aliases to 0 and 1, named 'false' and 'true'

Removing colliding definitions of 'bool', 'false' and 'true'.

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:18 -07:00
Jeff Garzik 1bdfd554be [PATCH] SCSI: fix request flag-related build breakage
The ->flags in struct request was split into two variables, in a recent
changeset.  The merge of this change forgot to update SCSI's libsas,
probably because libsas was a very recent merge.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-30 19:33:43 -07:00
David Howells 9361401eb7 [PATCH] BLOCK: Make it possible to disable the block layer [try #6]
Make it possible to disable the block layer.  Not all embedded devices require
it, some can make do with just JFFS2, NFS, ramfs, etc - none of which require
the block layer to be present.

This patch does the following:

 (*) Introduces CONFIG_BLOCK to disable the block layer, buffering and blockdev
     support.

 (*) Adds dependencies on CONFIG_BLOCK to any configuration item that controls
     an item that uses the block layer.  This includes:

     (*) Block I/O tracing.

     (*) Disk partition code.

     (*) All filesystems that are block based, eg: Ext3, ReiserFS, ISOFS.

     (*) The SCSI layer.  As far as I can tell, even SCSI chardevs use the
     	 block layer to do scheduling.  Some drivers that use SCSI facilities -
     	 such as USB storage - end up disabled indirectly from this.

     (*) Various block-based device drivers, such as IDE and the old CDROM
     	 drivers.

     (*) MTD blockdev handling and FTL.

     (*) JFFS - which uses set_bdev_super(), something it could avoid doing by
     	 taking a leaf out of JFFS2's book.

 (*) Makes most of the contents of linux/blkdev.h, linux/buffer_head.h and
     linux/elevator.h contingent on CONFIG_BLOCK being set.  sector_div() is,
     however, still used in places, and so is still available.

 (*) Also made contingent are the contents of linux/mpage.h, linux/genhd.h and
     parts of linux/fs.h.

 (*) Makes a number of files in fs/ contingent on CONFIG_BLOCK.

 (*) Makes mm/bounce.c (bounce buffering) contingent on CONFIG_BLOCK.

 (*) set_page_dirty() doesn't call __set_page_dirty_buffers() if CONFIG_BLOCK
     is not enabled.

 (*) fs/no-block.c is created to hold out-of-line stubs and things that are
     required when CONFIG_BLOCK is not set:

     (*) Default blockdev file operations (to give error ENODEV on opening).

 (*) Makes some /proc changes:

     (*) /proc/devices does not list any blockdevs.

     (*) /proc/diskstats and /proc/partitions are contingent on CONFIG_BLOCK.

 (*) Makes some compat ioctl handling contingent on CONFIG_BLOCK.

 (*) If CONFIG_BLOCK is not defined, makes sys_quotactl() return -ENODEV if
     given command other than Q_SYNC or if a special device is specified.

 (*) In init/do_mounts.c, no reference is made to the blockdev routines if
     CONFIG_BLOCK is not defined.  This does not prohibit NFS roots or JFFS2.

 (*) The bdflush, ioprio_set and ioprio_get syscalls can now be absent (return
     error ENOSYS by way of cond_syscall if so).

 (*) The seclvl_bd_claim() and seclvl_bd_release() security calls do nothing if
     CONFIG_BLOCK is not set, since they can't then happen.

Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2006-09-30 20:52:31 +02:00
Jens Axboe 9bf09c2385 [PATCH] SCSI: scsi_done_q is unused
It is a leftover from before the softirq completion was migrated
to the block layer.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2006-09-30 20:31:11 +02:00
Jens Axboe cdd6026217 [PATCH] Remove ->rq_status from struct request
After Christophs SCSI change, the only usage left is RQ_ACTIVE
and RQ_INACTIVE. The block layer sets RQ_INACTIVE right before freeing
the request, so any check for RQ_INACTIVE in a driver is a bug and
indicates use-after-free.

So kill/clean the remaining users, straight forward.

Signed-off-by: Jens Axboe <axboe@suse.de>
2006-09-30 20:29:23 +02:00
Jens Axboe 4aff5e2333 [PATCH] Split struct request ->flags into two parts
Right now ->flags is a bit of a mess: some are request types, and
others are just modifiers. Clean this up by splitting it into
->cmd_type and ->cmd_flags. This allows introduction of generic
Linux block message types, useful for sending generic Linux commands
to block devices.

Signed-off-by: Jens Axboe <axboe@suse.de>
2006-09-30 20:23:37 +02:00
Michael Tokarev 07563c711f [PATCH] EISA bus MODALIAS attributes support
Add modalias attribute support for the almost forgotten now EISA bus and
(at least some) EISA-aware modules.

The modalias entry looks like (for an 3c509 NIC):

 eisa:sTCM5093

and the in-module alias like:

 eisa:sTCM5093*

The patch moves struct eisa_device_id declaration from include/linux/eisa.h
to include/linux/mod_devicetable.h (so that the former now #includes the
latter), adds proper MODULE_DEVICE_TABLE(eisa, ...) statements for all
drivers with EISA IDs I found (some drivers already have that DEVICE_TABLE
declared), and adds recognision of __mod_eisa_device_table to
scripts/mod/file2alias.c so that proper modules.alias will be generated.

There's no support for /lib/modules/$kver/modules.eisamap, as it's not used
by any existing tools, and because with in-kernel modalias mechanism those
maps are obsolete anyway.

The rationale for this patch is:

 a) to make EISA bus to act as other busses with modalias
    support, to unify driver loading

 b) to foget about EISA finally - with this patch, kernel
    (who still supports EISA) will be the only one who knows
    how to choose the necessary drivers for this bus ;)

[akpm@osdl.org: fix the kbuild bit]
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Acked-the-net-bits-by: Jeff Garzik <jeff@garzik.org>
Acked-the-tulip-bit-by: Valerie Henson <val_henson@linux.intel.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-27 08:26:19 -07:00
Eric Sesterhenn a2a65a3ecb [SCSI] Signedness issue in drivers/scsi/ipr.c
gcc 4.1 with some extra warnings show the following:

drivers/scsi/ipr.c:6361: warning: comparison of unsigned expression < 0 is always false
drivers/scsi/ipr.c:6385: warning: comparison of unsigned expression < 0 is always false
drivers/scsi/ipr.c:6415: warning: comparison of unsigned expression < 0 is always false

The problem is that rc is of the type u32, which can never be smaller than
zero, therefore all three error handling checks get useless.  This patch
changes it to a normal int, because all usages / all functions it get used
with expect an int.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: Brian King <brking@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-26 11:35:36 -07:00
Henrik Kretzschmar dcbccbde00 [SCSI] pci_module_init conversion in scsi subsystem
Converts pci_module_init() to pci_register_driver() in the scsi subsys on
23 drivers which only return the value of pci_module_init().

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-26 11:35:32 -07:00
Eric Sesterhenn 45223fd77c [SCSI] Signdness issue in drivers/scsi/osst.c
another signdness warning from gcc 4.1

drivers/scsi/osst.c:5154: warning: comparison of unsigned expression < 0 is always false

The problem is that blk is defined as unsigned, but all usages of it are
normal int cases.  osst_get_frame_position() and osst_get_sector() return ints
and can return negative values.  If blk stays an unsigned int, the error check
is useless.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-26 11:35:28 -07:00