aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi (follow)
AgeCommit message (Collapse)AuthorFilesLines
2005-06-17[SCSI] allow sleeping in ->eh_device_reset_handler()Jeff Garzik12-27/+83
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-17[SCSI] allow sleeping in ->eh_abort_handler()Jeff Garzik15-39/+109
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-17[SCSI] Remove no-op implementations of SCSI EH hooksJeff Garzik40-261/+0
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[SCSI] Remove unnecessary locking around completion function callsJeff Garzik1-2/+0
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-13[SCSI] aic7xxx: fix the BIOS limits setting routinesJames Bottomley1-10/+25
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-11[SCSI] aic7xxx: clean up eisa supportChristoph Hellwig3-131/+63
- 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[SCSI] aic7xxx: remove some dead woodChristoph Hellwig3-47/+3
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[SCSI] aic7xxx: remove ahc_find_softcChristoph Hellwig5-63/+16
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[SCSI] aic7xxx: do not check for duplicate pci idsChristoph Hellwig1-16/+0
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[SCSI] aic7xxx/aic79xx: remove useless byte order macro cruftChristoph Hellwig2-34/+0
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-03[SCSI] 2.6 aacraid: updated sysfs filesMark Haverkamp1-0/+129
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[SCSI] update spi transport class so that u320 Domain Validation worksJames Bottomley1-24/+53
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[SCSI] fix aic7xxx coupled parameter problemJames Bottomley1-13/+13
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[SCSI] sg: Command completion after remove oopsbrking@us.ibm.com1-0/+2
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-05-26[SCSI] aic7xxx: remove separate target and device allocationsJames Bottomley3-393/+218
Since the aic driver is now taught to speak in terms of the generic linux devices, we can now also dispense with the transport class get routines (since we update the parameters when the driver sees they change) and also plumb it into the spi transport transfer agreement reporting infrastructure. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-26Automatic merge of ../scsi-misc-2.6-old/James Bottomley55-15862/+8391
2005-05-26Merge of 'misc-fixes' branch fromLinus Torvalds1-6/+7
rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
2005-05-26[SCSI] Add target alloc/destroy callbacks to the host templateJames Bottomley1-3/+21
This gives the HBA driver notice when a target is created and destroyed to allow it to manage its own target based allocations accordingly. This is a much reduced verson of the original patch sent in by James.Smart@Emulex.com Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-26[SCSI] TYPE_RBC cache fixes (sbp2.c affected)Al Viro2-9/+28
a) TYPE_SDAD renamed to TYPE_RBC and taken to scsi.h b) in sbp2.c remapping of TYPE_RPB to TYPE_DISK turned off c) relevant places in midlayer and sd.c taught to accept TYPE_RBC d) sd.c::sd_read_cache_type() looks into page 6 when dealing with TYPE_RBC - these guys have writeback cache flag there and are not guaranteed to have page 8 at all. e) sd_read_cache_type() got an extra sanity check - it checks that it got the page it asked for before using its contents. And screams if mismatch had happened. Rationale: there are broken devices out there that are "helpful" enough to go for "I don't have a page you've asked for, here, have another one". For example, PL3507 had been caught doing just that... f) sbp2 sets sdev->use_10_for_rw and sdev->use_10_for_ms instead of bothering to remap READ6/WRITE6/MOD_SENSE, so most of the conversions in there are gone now. Incidentally, I wonder if USB storage devices that have no mode page 8 are simply RBC ones. I haven't touched that, but it might be interesting to check... Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-26[SCSI] sym2 version 2.2.1Matthew Wilcox6-137/+106
sym2 version 2.2.1: - Fix MMIO BAR detection (Thanks to Bob Picco) - Fix odd-sized transfers with a wide bus (Thanks to Larry Stephens) - Write posting fixes (Thanks to Thibaut Varene) - Change one of the GFP_KERNEL allocations back into a GFP_ATOMIC - Make CCB_BA() return a script-endian address - Move range checks and disabling of devices from the queuecommand path to slave_alloc() - Remove a warning in sym_setup_cdb() - Keep a pointer to the scsi_target instead of the scsi_dev in the tcb - Remove a check for the upper layers passing an oversized cmd - Replace CAM_REQ_ constants with the Linux DID_ constants - Replace CAM_DIR_ constants with the Linux DMA_ constants - Inline sym_read_parisc_pdc() on non-parisc systems Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-26[PATCH] ide-scsi: kmap scatter/gather before doing PIO Stuart Hayes1-4/+24
From: Stuart Hayes <Stuart_Hayes@dell.com> The system can panic with a null pointer dereference using ide-scsi if PIO is being done on scatter gather pages that are in high memory, because page_address() returns 0. We are actually seeing this using a tape drive. This patch will kmap_atomic() the pages before performing PIO. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>
2005-05-26[PATCH] convert IDE device drivers to driver-modelBartlomiej Zolnierkiewicz1-32/+26
* add ide_bus_match() and export ide_bus_type * split ide_remove_driver_from_hwgroup() out of ide_unregister() * move device cleanup from ide_unregister() to drive_release_dev() * convert ide_driver_t->name to driver->name * convert ide_driver_t->{attach,cleanup} to driver->{probe,remove} * remove ide_driver_t->busy as ide_bus_type->subsys.rwsem protects against concurrent ->{probe,remove} calls * make ide_{un}register_driver() void as it cannot fail now * use driver_{un}register() directly, remove ide_{un}register_driver() * use device_register() instead of ata_attach(), remove ata_attach() * add proc_print_driver() and ide_drivers_show(), remove ide_drivers_op * fix ide_replace_subdriver() and move it to ide-proc.c * remove ide_driver_t->drives, ide_drives and drives_lock * remove ide_driver_t->drivers, drivers and drivers_lock * remove ide_drive_t->driver and DRIVER() macro Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>
2005-05-26[PATCH] libata: Fix zero sg_dma_len() on 64-bit platformAlbert Lee1-6/+7
When testing ATAPI PIO data transfer on the ppc64 platform, __atapi_pio_bytes() got zero when sg_dma_len() is used. I checked the <asm-ppc64/scatterlish.h>, the struct scatterlist is defined as: struct scatterlist { struct page *page; unsigned int offset; unsigned int length; /* For TCE support */ u32 dma_address; u32 dma_length; }; #define sg_dma_address(sg) ((sg)->dma_address) #define sg_dma_len(sg) ((sg)->dma_length) So, if the scatterlist is not DMA mapped, sg_dma_len() will return zero on ppc64. The same problem should occur on the x86-64 platform. On the i386 platform, sg_dma_len() returns sg->length, that's why the problem does not occur on an i386. Changes: - Use sg->length if the scatterlist is not DMA mapped (yet). Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
2005-05-25[PATCH] sata_promise: add PCI ID for FastTrak TX2200 2-portsFrancisco Javier1-0/+2
2005-05-25[PATCH] sata_sil: new ID 1002:437A for ATI IXP400NAKAMURA Kenta1-0/+1
2005-05-24[PATCH] aic7xxx_osm build fixAndrew Morton1-2/+5
Fix a c99ism. Cc: James Bottomley <James.Bottomley@steeleye.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20Automatic merge of rsync://www.parisc-linux.org/~jejb/git/scsi-for-linus-2.6.gitLinus Torvalds7-1310/+524
2005-05-20[SCSI] aic7xxx: fix U160 modeJames Bottomley1-0/+11
The new period/dt setting routines don't get the coupling of these parameters correct. This means that Domain Validation never gets DT set, and thus the drive gets restricted to U80. Fix this by restoring the couplings in the set routines. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] aic7xxx: add back lockingJames Bottomley1-4/+11
Tampering with the settings has to be done under the host lock ... slave_alloc isn't called under any lock, so this has to be done explicitly. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] aic7xxx: make correct use of slave_alloc/destroy and remove the per device timerJames Bottomley2-112/+79
The allocation of all of our components should be done in slave alloc. Currently it's rather fancifully refcounted in the queuecommand callback. This patch moves allocation and destroy to their correct places in slave_alloc/slave_destory. Now we can guarantee that everywhere a device is requested, it's actually been allocated, so don't check for this anymore. Additionally, the per device busy timer was the only source of potential use after free. It's been deleted because Linux does the correct thing with busy returns, so there's no need to implement a separate timer in the driver. Finally, implement code that forces all the device parameters to zero (i.e. async and narrow) in the slave alloc, inform the spi class of the bios recorded maximums and wait until slave configure before trying anything more adventurous. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] aic7xxx: remove the completeqJames Bottomley2-133/+5
This should finish the spurious queue removal from aic7xxx (there are other queues that are probably unnecessary, but at least the major and obviously unnecessary ones are done with). Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] aic7xxx: remove the last vestiges of the runqJames Bottomley2-7/+0
This was rendered obsolete by the busyq removal; remove some of the last remnants of its presence. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] aic7xxx: remove usage of obsolete typedefsChristoph Hellwig3-51/+38
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] remove dma_mask hacksChristoph Hellwig3-46/+6
pci_alloc_consistent is under 4G by default. Also simplify the definition of bus_dmamap_t. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] aic7xxx: remove Linux 2.4 ifdefsChristoph Hellwig5-472/+5
There's not much sense in sharing code anymore now that aic7xxx uses various transport class facilities. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] aic7xxx: remove some DV leftoversChristoph Hellwig1-6/+0
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] remove aic7xxx busyqJames Bottomley2-438/+191
The aic7xxx driver has two spurious queues in it's linux glue code: the busyq which queues incoming commands to the driver and the completeq which queues finished commands before sending them back to the mid-layer This patch just removes the busyq and makes the aic finally return the correct status to get the mid-layer to manage its queueing, so a command is either committed to the sequencer or returned to the midlayer for requeue. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] correct aic7xxx period setting routinesJames Bottomley1-34/+37
This is similar to the previous sym2 problem. For Domain Validation to work we can't allow any period setting to turn wide on if it was previously off. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] implement parameter limits in the SPI transport classJames Bottomley1-27/+161
There's a basic need not to have parameters go under or over certain values when doing domain validation. The basic ones are max_offset, max_width and min_period This patch makes the transport class take and enforce these three limits. Currently they can be set by the user, although they could obviously be read from the HBA's on-board NVRAM area during slave_configure (if it has one). Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] 2.6 aacraid: Variable FIB size (updated patch)Mark Haverkamp9-195/+501
New code from the Adaptec driver. Performance enhancement for newer adapters. I hope that this isn't too big for a single patch. I believe that other than the few small cleanups mentioned, that the changes are all related. - Added Variable FIB size negotiation for new adapters. - Added support to maximize scatter gather tables and thus permit requests larger than 64KB/each. - Limit Scatter Gather to 34 elements for ROMB platforms. - aac_printf is only enabled with AAC_QUIRK_34SG - Large FIB ioctl support - some minor cleanup Passes sparse check. I have tested it on x86 and ppc64 machines. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] megaraid version 2.20.4.6Ju, Seokmann5-176/+27
Signed-off by: Seokmann Ju <sju@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] saved and restore result for timed out commandsPatrick Mansfield1-0/+11
Save and restore the scmd->result, so that timed out commands do not return the result of the TEST UNIT READY or the start/stop commands. Code is already in place to save and restore the result for the request sense case. The previous version of this patch erroneously removed the "if" check, instead add a comment as to why the "if" is needed. Signed-off-by: Patrick Mansfield <patmans@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20merge by hand - fix up rejections in Documentation/DocBook/MakefileJames Bottomley11-35/+63
2005-05-20[SCSI] remove a timer race in scsi_queue_insert()Tejun Heo2-11/+7
scsi_queue_insert() has four callers. Three callers call with timer disabled and one (the second invocation in scsi_dispatch_cmd()) calls with timer activated. scsi_queue_insert() used to always call scsi_delete_timer() and ignore the return value. This results in race with timer expiration. Remove scsi_delete_timer() call from scsi_queue_insert() and make the caller delete timer and check the return value. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] remove spurious if tests from scsi_eh_{times_out|done}Tejun Heo1-4/+2
'if' tests which check if eh_action isn't NULL in both functions are always true. Remove the redundant if's as it can give wrong impressions. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] remove unnecessary scsi_delete_timer() call in scsi_reset_provider()Tejun Heo1-1/+0
scsi_reset_provider() calls scsi_delete_timer() on exit which isn't necessary. Remove it. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] convert scsi changer driver from class simpleGerd Knorr1-8/+9
Here is a incremental patch which switches the driver over to the new non-simple functions. Compile-tested. Signed-off-by: Gerd Knorr <kraxel@bytesex.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] add scsi changer driverGerd Knorr3-0/+1044
This patch adds a device driver for scsi media changer devices. Signed-off-by: Gerd Knorr <kraxel@bytesex.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] ipr: Fix ipr PCI hotplug hang with CDROM attachbrking@us.ibm.com1-2/+1
Currently, during PCI hotplug remove, if the upper layer drivers of the attached devices send commands down as part of the remove action, like a CDROM, the hotplug action will hang forever due to the ipr driver returning SCSI_MLQUEUE_HOST_BUSY. Patch fixes this. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-20[SCSI] drivers/scsi/sym53c416.c: fix a wrong checkAdrian Bunk1-1/+1
The Coverity checker found that this for loop was wrong. This patch changes it to what seems to be intended. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>