Commit Graph

174 Commits

Author SHA1 Message Date
Adrian Bunk
a4cd16e2e8 [PATCH] drivers/scsi/dpt*: remove version.h dependencies
This patch removes version.h dependencies.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-25 16:25:03 -07:00
Adrian Bunk
a2ba192c96 [PATCH] drivers/scsi/initio.c: cleanups
This patch contains the following cleanups:
- make needlessly global code static
- remove or #if 0 the following unused functions:
  - tul_pop_pend_scb
  - tul_device_reset
  - tul_reset_scsi_bus

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-25 16:25:00 -07:00
Adrian Bunk
52c1da3953 [PATCH] make various thing static
Another rollup of patches which give various symbols static scope

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-24 00:06:43 -07:00
Andrew Morton
4452ea509e [PATCH] dpt_i2o: fix waitqueue abuse
The driver plays with waitqueue internals and fails to compile after Ben's
"aio: make wait_queue ->task ->private" patch.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-23 09:45:34 -07:00
bobl
7f20b6a479 [PATCH] megaraid build fix
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21 18:46:11 -07:00
Linus Torvalds
1d345dac1f Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6 2005-06-20 16:00:33 -07:00
Yani Ioannou
10523b3b82 [PATCH] Driver Core: drivers/s390/net/qeth_sys.c - drivers/usb/gadget/pxa2xx_udc.c: update device attribute callbacks
Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20 15:15:35 -07:00
gregkh@suse.de
9a881f166f [PATCH] use device_for_each_child() to properly access child devices.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20 15:15:22 -07:00
mochel@digitalimplant.org
20b1e67423 [PATCH] Use device_for_each_child() to unregister devices in scsi_remove_target().
Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Index: gregkh-2.6/drivers/scsi/scsi_sysfs.c
===================================================================
2005-06-20 15:15:19 -07:00
gregkh@suse.de
d253878b3d [PATCH] class: convert drivers/scsi/* to use the new class api instead of class_simple
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20 15:15:08 -07:00
Jeff Garzik
e632ba11b8 aic7xxx/aic79xx_osm: revert completely bogus ahd_linux_queue() patch 2005-06-19 21:50:12 -04:00
Linus Torvalds
43fde784a6 Merge 'upstream-2.6.13' branch of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev 2005-06-18 13:08:39 -07:00
Jeff Garzik
f9d1fe9630 Merge /spare/repo/linux-2.6/ 2005-06-18 13:21:24 -04:00
Mark Haverkamp
5d497cecde [SCSI] aacraid: regression fix
The fixes for sparse warnings mixed in with the fixups for
the raw_srb handler resulted in a bug that showed up in the 32 bit
environments when trying to issue calls directly to the physical devices
that are part of the arrays (ioctl scsi passthrough).

Received from Mark Salyzyn at adaptec.
Applied comment from Christoph to remove cpu_to_le32(0)
Applied Mark S fix of missing memcpy.
It applies to the scsi-misc-2.6 git tree.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-17 20:36:28 -05:00
James Bottomley
3afa294c40 merge by hand (qla_os.c mismerge) 2005-06-17 19:04:18 -05:00
James Bottomley
3237ee78fc merge by hand (fix up qla_os.c merge error) 2005-06-17 18:42:23 -05:00
Jeff Garzik
df0ae2497d [SCSI] allow sleeping in ->eh_host_reset_handler()
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-17 12:05:18 -05:00
Jeff Garzik
68b3aa7c98 [SCSI] allow sleeping in ->eh_bus_reset_handler()
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-17 12:05:10 -05:00
Jeff Garzik
94d0e7b805 [SCSI] allow sleeping in ->eh_device_reset_handler()
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-17 12:05:03 -05:00
Jeff Garzik
8fa728a268 [SCSI] allow sleeping in ->eh_abort_handler()
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-17 12:04:55 -05:00
Jeff Garzik
3471c28803 [SCSI] Remove no-op implementations of SCSI EH hooks
Drivers need not implement a hook that returns FAILED, and does nothing
else, since the SCSI midlayer code will do that for us.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-17 12:04:45 -05:00
Jeff Garzik
e3df715501 [SCSI] Remove unnecessary locking around completion function calls
The SCSI ->done() hook should not be called from inside a spinlock.

Drivers that do this are mostly cut-n-paste from 2.2.x-era.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-17 12:04:37 -05:00
James Bottomley
12021fff2b [SCSI] aic7xxx: fix the BIOS limits setting routines
Following the go around over the SONY DVD that needs artificial limits,
this should be the correct code for all cases (minus the debugging
prints).

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-13 21:37:27 -05:00
Geert Uytterhoeven
c3315ede1b [PATCH] M68k: Mark Sun-3 NCR5380 SCSI broken
M68k: Mark Sun-3 NCR5380 SCSI broken until NCR5380_abort() and
NCR5380_bus_reset() are replaced with real new-style EH routines (the old EH
SCSI constants were removed in 2.6.12-rc3).

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-12 20:43:22 -07:00
Christoph Hellwig
d6cbbad729 [SCSI] aic7xxx: clean up eisa support
- the eisa layer only probes when it's actually safe, no need for
   a driver option
 - store the id table directly in linux format instead of convering
   at runtime

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-11 18:45:06 -05:00
Christoph Hellwig
8eb3794257 [SCSI] aic7xxx: remove some dead wood
especially the now dead scsi_cmnd overlay

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-11 18:44:12 -05:00
Christoph Hellwig
3d65692aed [SCSI] aic7xxx: remove ahc_find_softc
there's absolutely no reason not to trust the driver private data

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-11 18:43:48 -05:00
Christoph Hellwig
e431223eca [SCSI] aic7xxx: do not check for duplicate pci ids
pci layer handles this just fine for us

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-11 18:38:41 -05:00
Christoph Hellwig
765c4d45b8 [SCSI] aic7xxx/aic79xx: remove useless byte order macro cruft
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-11 18:38:21 -05:00
Andrew Vasquez
a1541d5af6 [SCSI] qla2xxx: Pull-down scsi-host-addition to follow board initialization.
Return to previous held-logic of calling scsi_add_host() only
after the board has been completely initialized.  Also return
pci_*() error-codes during probe failure paths.

This also corrects an issue where only lun 0 is being scanned for
a given port.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-11 13:06:22 -05:00
Albert Lee
6952df0355 [PATCH] sg traverse fix for __atapi_pio_bytes()
Problem:
Incorrect md5sum when using ATAPI PIO mode to verify a distro CD.

Root cause:  sg traverse problem.
In __atapi_pio_bytes(), if qc->cursg++ is increased and "goto
next_page" is executed, then sg is not updated to the new qc->cursg
and the old sg is overwritten with the new data.

Changes:
- Replace "goto next_page" with "goto next_sg" to make sg updated.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
2005-06-09 03:14:59 -04:00
Narendra Sankar
54258a8a2e [PATCH] sata_svw: bump version number
Bump sata_svw.c version number to indicate support for BCM5785(HT1000)
Southbridge SATA controller.

Signed-off-by: Narendra Sankar <nsankar@broadcom.com>

diff -uNr linux-2.6.12-rc5/drivers/scsi/sata_svw.c linux-2.6.12-rc5.brcm/drivers/scsi/sata_svw.c
2005-06-09 03:10:56 -04:00
Jens Axboe
e1dd23a001 [PATCH] sata_sil: Fix FIFO PCI Bus Arbitration kernel oops
Correct this.

diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c
2005-06-09 03:06:22 -04:00
Jeff Garzik
a0ea7328e3 [libata] ahci: finish ATAPI support (hopefully) 2005-06-04 01:13:15 -04:00
70c8523381 Merge of /spare/repo/libata-dev branch bridge-detect 2005-06-04 01:02:00 -04:00
31c94a6e98 Automatic merge of /spare/repo/libata-dev branch svw 2005-06-04 00:59:09 -04:00
1700c80d87 Merge of /spare/repo/libata-dev branch pdc20619 2005-06-04 00:58:52 -04:00
d3c39d14d1 Automatic merge of /spare/repo/libata-dev branch ahci-msi 2005-06-04 00:52:59 -04:00
Jeff Garzik
4b0060f4bd [libata] ahci: minor PCI MSI cleanup
Replace 'have_msi' variable with a bit in the existing 'flags' variable,.
AHCI_FLAG_MSI.
2005-06-04 00:50:22 -04:00
ae20ea8525 Automatic merge of /spare/repo/linux-2.6/.git branch HEAD 2005-06-04 00:40:40 -04:00
73561695b2 Automatic merge of /spare/repo/linux-2.6/.git branch HEAD 2005-06-03 23:54:56 -04:00
Mark Haverkamp
0bb14afe10 [SCSI] 2.6 aacraid: updated sysfs files
This patch adds some files into the /sys/class/scsi_host/hostN
directories for aacraid adapters:

model
vendor
hba_kernel_version
hba_monitor_version
hba_bios_version
serial_number

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-03 12:44:12 -05:00
James Bottomley
9a8bc9b84b [SCSI] update spi transport class so that u320 Domain Validation works
There are several extra things that have to be considered when running
Domain Validation on a u320 target (notably how you fall back).

Hopefully this should help us when someone adds this transport class to
aic79xx.

I've tested this on the lsi1030, so I know it works correctly up to
u320.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-03 12:39:53 -05:00
James Bottomley
597487b9ba [SCSI] fix aic7xxx coupled parameter problem
For setting coupled parameters, we need to be comparing against the goal
settings, not the current ones.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-03 12:38:39 -05:00
brking@us.ibm.com
521314c122 [SCSI] sg: Command completion after remove oops
A problem exists todayin the sg driver that if an SG_IO request is
outstanding to a device when it is removed from the system. The
system may oops if that command completes later in time.

1. sg_remove gets called
2. sg_remove calls sg_finish_req_req on all pending requests
   This removes the Sg_request's from the headrp list in the Sg_fd
3. The sleeping SG_IO ioctl is woken. It does nothing and returns.
4. The caller closes the fd, which invokes sg_release
5. sg_release calls sg_remove_sfp. It finds no outstanding commands
   since the headrp list is empty, so it calls __sg_remove_sfp,
   which frees the sfp.
6. Now when sg_cmd_done gets called, sg uses upper_private_data in
   the Scsi_Request, which should point to the srp, which has been
   freed, so it points to freed memory.
7. sg then dereferences the srp pointer to get the sfp, and we oops.

The fix is to NULL out the upper_private_data field in this path,
which sg_cmd_done already checks for, which will prevent the oops
from occurring.

cpu 0x1: Vector: 300 (Data Access) at [c00000000fff7aa0]
    pc: d0000000002bbea8: .sg_cmd_done+0x70/0x394 [sg]
    lr: d000000000073304: .scsi_finish_command+0x10c/0x130 [scsi_mod]
    sp: c00000000fff7d20
   msr: 8000000000009032
   dar: 2f70726f63202f78
 dsisr: 40000000
  current = 0xc0000000024589b0
  paca    = 0xc0000000003da800
    pid   = 7, comm = events/1
[c00000000fff7dc0] d000000000073304 .scsi_finish_command+0x10c/0x130 [scsi_mod]
[c00000000fff7e50] d00000000007317c .scsi_softirq+0x140/0x168 [scsi_mod]
[c00000000fff7ef0] c0000000000634dc .__do_softirq+0xa0/0x17c
[c00000000fff7f90] c000000000018430 .call_do_softirq+0x14/0x24
[c00000000ed472e0] c0000000000142e0 .do_softirq+0x74/0x9c
[c00000000ed47370] c000000000013c9c .do_IRQ+0xe8/0x100
[c00000000ed473f0] c00000000000ae34 HardwareInterrupt_entry+0x8/0x54

c00000000003df28 .smp_call_function+0
x100/0x1d0
[c00000000ed47780] c0000000000ba99c .invalidate_bh_lrus+0x30/0x70
[c00000000ed47810] c0000000000b91a0 .invalidate_bdev+0x18/0x3c
[c00000000ed478a0] c0000000000da7b8 .__invalidate_device+0x70/0x94
[c00000000ed47930] c0000000001d40bc .invalidate_partition+0x4c/0x7c
[c00000000ed479c0] c00000000010a944 .del_gendisk+0x48/0x15c
[c00000000ed47a50] d00000000003d55c .sd_remove+0x34/0xe4 [sd_mod]
[c00000000ed47ae0] c0000000001c5d30 .device_release_driver+0x90/0xb4
[c00000000ed47b70] c0000000001c6130 .bus_remove_device+0xb0/0x12c
[c00000000ed47c00] c0000000001c4378 .device_del+0x120/0x198
[c00000000ed47ca0] d00000000007dcdc .scsi_remove_device+0xb4/0x194 [scsi_mod]
[c00000000ed47d30] d0000000000a5864 .ipr_worker_thread+0x1d4/0x27c [ipr]
[c00000000ed47dd0] c0000000000734c4 .worker_thread+0x238/0x2f4
[c00000000ed47ee0] c0000000000796c0 .kthread+0xcc/0x11c
[c00000000ed47f90] c000000000018ad0 .kernel_thread+0x4c/0x6c

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-03 12:25:35 -05:00
Linus Torvalds
d8d088d258 Automatic merge of rsync://www.parisc-linux.org/~jejb/git/scsi-for-linus-2.6 2005-06-03 08:54:02 -07:00
Nathan Lynch
c92715b3c2 [SCSI] fix slab corruption during ipr probe
With CONFIG_DEBUG_SLAB=y I see slab corruption messages during boot on
pSeries machines with IPR adapters with any 2.6.12-rc kernel.

The change which seems to have introduced the problem is "SCSI: revamp
target scanning routines" and may be found at:
http://marc.theaimsgroup.com/?l=bk-commits-head&m=111093946426333&w=2

In order to revert that in a 2.6.12-rc1 tree, I had to revert "target
code updates to support scanned targets" first:
http://marc.theaimsgroup.com/?l=bk-commits-head&m=111094132524649&w=2

With both patches reverted, the corruption messages go away.

ipr: IBM Power RAID SCSI Device Driver version: 2.0.13 (February 21,
2005)
ipr 0001:d0:01.0: Found IOA with IRQ: 167
ipr 0001:d0:01.0: Starting IOA initialization sequence.
ipr 0001:d0:01.0: Adapter firmware version: 020A005C
ipr 0001:d0:01.0: IOA initialized.
scsi0 : IBM 570B Storage Adapter
  Vendor: IBM       Model: VSBPD4E1  U4SCSI  Rev: 4770
  Type:   Enclosure                          ANSI SCSI revision: 02
  Vendor: IBM   H0  Model: HUS103036FL3800   Rev: RPQF
  Type:   Direct-Access                      ANSI SCSI revision: 04
  Vendor: IBM   H0  Model: HUS103036FL3800   Rev: RPQF
  Type:   Direct-Access                      ANSI SCSI revision: 04
  Vendor: IBM   H0  Model: HUS103036FL3800   Rev: RPQF
  Type:   Direct-Access                      ANSI SCSI revision: 04
  Vendor: IBM   H0  Model: HUS103036FL3800   Rev: RPQF
  Type:   Direct-Access                      ANSI SCSI revision: 04
  Vendor: IBM       Model: VSBPD4E1  U4SCSI  Rev: 4770
  Type:   Enclosure                          ANSI SCSI revision: 02
Slab corruption: start=c0000001e8de5268, len=512
Redzone: 0x5a2cf071/0x5a2cf071.
Last user: [<c00000000029c3a0>](.scsi_target_dev_release+0x28/0x50)
080: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6a
Prev obj: start=c0000001e8de5050, len=512
Redzone: 0x5a2cf071/0x5a2cf071.
Last user: [<0000000000000000>](0x0)
000: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b
010: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b
Next obj: start=c0000001e8de5480, len=512
Redzone: 0x170fc2a5/0x170fc2a5.
Last user: [<c000000000228d7c>](.as_init_queue+0x5c/0x228)
000: c0 00 00 01 e8 83 26 08 00 00 00 00 00 00 00 00
010: 00 00 00 00 00 00 00 00 c0 00 00 01 e8 de 54 98
Slab corruption: start=c0000001e8de5268, len=512
Redzone: 0x5a2cf071/0x5a2cf071.
Last user: [<c00000000029c3a0>](.scsi_target_dev_release+0x28/0x50)
080: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6a
Prev obj: start=c0000001e8de5050, len=512
Redzone: 0x5a2cf071/0x5a2cf071.
Last user: [<0000000000000000>](0x0)
000: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b
010: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b
Next obj: start=c0000001e8de5480, len=512
Redzone: 0x170fc2a5/0x170fc2a5.
Last user: [<c000000000228d7c>](.as_init_queue+0x5c/0x228)
000: c0 00 00 01 e8 83 26 08 00 00 00 00 00 00 00 00
010: 00 00 00 00 00 00 00 00 c0 00 00 01 e8 de 54 98
...

I did some digging and the problem seems to be a refcounting issue in
__scsi_add_device.  The target gets freed in scsi_target_reap, and
then __scsi_add_device tries to do another device_put on it.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-03 09:38:55 -05:00
Andrew Vasquez
18e144d32c [SCSI] qla2xxx: fix bad locking during eh_abort
Correct incorrect locking order in qla2xxx_eh_abort() handler which
would case a hang during certain code-paths.

With extra pieces to fix the irq state in the locks.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-03 09:37:53 -05:00
d7aaf48128 Automatic merge of /spare/repo/linux-2.6/.git branch HEAD 2005-06-02 18:43:09 -04:00
Jeff Garzik
decc6d0b68 libata: kernel-doc warning fixes 2005-06-02 18:42:33 -04:00