aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi (follow)
AgeCommit message (Collapse)AuthorFilesLines
2008-01-25Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6Linus Torvalds155-8524/+9359
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (200 commits) [SCSI] usbstorage: use last_sector_bug flag universally [SCSI] libsas: abstract STP task status into a function [SCSI] ultrastor: clean up inline asm warnings [SCSI] aic7xxx: fix firmware build [SCSI] aacraid: fib context lock for management ioctls [SCSI] ch: remove forward declarations [SCSI] ch: fix device minor number management bug [SCSI] ch: handle class_device_create failure properly [SCSI] NCR5380: fix section mismatch [SCSI] sg: fix /proc/scsi/sg/devices when no SCSI devices [SCSI] IB/iSER: add logical unit reset support [SCSI] don't use __GFP_DMA for sense buffers if not required [SCSI] use dynamically allocated sense buffer [SCSI] scsi.h: add macro for enclosure bit of inquiry data [SCSI] sd: add fix for devices with last sector access problems [SCSI] fix pcmcia compile problem [SCSI] aacraid: add Voodoo Lite class of cards. [SCSI] aacraid: add new driver features flags [SCSI] qla2xxx: Update version number to 8.02.00-k7. [SCSI] qla2xxx: Issue correct MBC_INITIALIZE_FIRMWARE command. ...
2008-01-25Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-devLinus Torvalds2-12/+11
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: (67 commits) fix drivers/ata/sata_fsl.c double-decl [libata] Prefer SCSI_SENSE_BUFFERSIZE to sizeof() pata_legacy: Merge winbond support ata_generic: Cenatek support pata_winbond: error return pata_serverworks: Fix cable types and cosmetics pata_mpc52xx: remove un-needed assignment libata: fix off-by-one in error categorization ahci: factor out AHCI enabling and enable AHCI before reading CAP ata_piix: implement SIDPR SCR access ata_piix: convert to prepare - activate initialization libata: factor out ata_pci_activate_sff_host() from ata_pci_one() [libata] Prefer SCSI_SENSE_BUFFERSIZE to sizeof() pata_legacy: resychronize with upstream changes and resubmit [libata] pata_legacy: typo fix [libata] pata_winbond: update for new ->data_xfer hook pata_pcmcia: convert to new data_xfer prototype libata annotations and fixes libata: use dev_driver_string() instead of "libata" in libata-sff.c ata_piix: kill unused constants and flags ...
2008-01-25ide: add ide_pktcmd_tf_load() helperBartlomiej Zolnierkiewicz1-5/+1
Add ide_pktcmd_tf_load() helper and convert ATAPI device drivers to use it. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-25ide-{floppy,tape,scsi}: fix register loading order when issuing packet commandBartlomiej Zolnierkiewicz1-1/+1
Load IDE_BCOUNTL_REG before IDE_BCOUNTH_REG when issuing packet command. It shouldn't affect anything (just a usual paranoia to separate changes which change the way in which hardware is accessed from code cleanups). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-25ide: remove atapi_ireason_t (take 3)Bartlomiej Zolnierkiewicz1-9/+8
Remove atapi_ireason_t. While at it: * replace 'HWIF(drive)' by 'drive->hwif' (or just 'hwif' where possible) v2: * v1 had CD and IO bits reversed in many places. * Use CD and IO defines from <linux/hdreg.h>. v3: * Fix incorrect "(ireason & IO) == test_bit()". (Noticed by Sergei) Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-25ide: remove ata_nsector_t, ata_data_t and atapi_bcount_tBartlomiej Zolnierkiewicz1-17/+23
Remove ata_nsector_t, ata_data_t (unused) and atapi_bcount_t. While at it: * replace 'HWIF(drive)' by 'hwif' Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-25ide: remove atapi_feature_tBartlomiej Zolnierkiewicz1-7/+4
Remove atapi_feature_t. While at it: * replace 'HWIF(drive)' by 'hwif' Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-25ide: remove ata_status_t and atapi_status_tBartlomiej Zolnierkiewicz1-5/+4
Remove ata_status_t (unused) and atapi_status_t. While at it: * replace 'HWIF(drive)' by 'drive->hwif' (or just 'hwif' where possible) Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-25[SCSI] libsas: abstract STP task status into a functionJames Bottomley3-19/+40
Break out the frame processor for STP tasks from aic94xx so they can be shared by other SAS HBA's Original patch from Jeff Garzik <jeff@garzik.org> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-25[SCSI] ultrastor: clean up inline asm warningsFrederik Deweerdt1-3/+10
To: linux-kernel@vger.kernel.org Cc: bunk@kernel.org Subject: [trivial patch] scsi/ultrastor: clean up inline asm warnings Hi, Compiling latest mainline with gcc 4.2.1 spews the following warnings: drivers/scsi/ultrastor.c: In function 'find_and_clear_bit_16': drivers/scsi/ultrastor.c:303: warning: matching constraint does not allow a register drivers/scsi/ultrastor.c:302: warning: matching constraint does not allow a register drivers/scsi/ultrastor.c: At top level: drivers/scsi/ultrastor.c:1202: warning: matching constraint does not allow a register drivers/scsi/ultrastor.c:1202: warning: matching constraint does not allow a register drivers/scsi/ultrastor.c: In function 'ultrastor_queuecommand': drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a register drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a register drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a register drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a register drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a register drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a register drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a register drivers/scsi/ultrastor.c:302: warning: matching constraint does not allow a register drivers/scsi/ultrastor.c:302: warning: matching constraint does not allow a register The following patch fixes it by using the '+' operator on the (*field) operand, marking it as read-write to gcc. I diffed the two resulting .s, and gcc produced the same code. This was tested with gcc 4.2.1 and gcc 3.4.3 Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com> Cc: Adrian Bunk <trivial@kernel.org> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-25[SCSI] aic7xxx: fix firmware buildVegard Nossum1-27/+18
This patch adds the proper $(obj) and $(src) prefixes to dependency rules in aic7xxx makefile. Without this patch, there is a remote possibility that parallel make with a different output directory can fail. Also changed the deprecated EXTRA_CFLAGS construct to ccflags-y syntax. Fixed up patch to survive "make drivers/scsi/ -j" with BUILD_FIRMWARE enable. /Sam Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-25[SCSI] aacraid: fib context lock for management ioctlsSalyzyn, Mark1-12/+17
Alan noticed the lack of locking surrounding the driver's dealings with the fib context managed by the trio of ioctls that are used by the RAID management applications to retrieve Adapter Initiated FIBs. I merely expanded the fib lock to include the fib context. There have been no field reports of any issues generally because the applications are relatively static and do not come and go often enough to stress this area. I bloated this patch a little with some space junk. Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-25[SCSI] ch: remove forward declarationsFUJITA Tomonori1-66/+54
This moves ch_template and changer_fops structs to the end of file and removes forward declarations. This also removes some trailing whitespace. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-25[SCSI] ch: fix device minor number management bugFUJITA Tomonori1-31/+40
ch_probe uses the total number of ch devices as minor. ch_probe: ch->minor = ch_devcount; ... ch_devcount++; Then ch_remove decreases ch_devcount: ch_remove: ch_devcount--; If you have two ch devices, sch0 and sch1, and remove sch0, ch_devcount is 1. Then if you add another ch device, ch_probe tries to create sch1. So you get a warning and fail to create sch1: Jan 24 16:01:05 nice kernel: sysfs: duplicate filename 'sch1' can not be created Jan 24 16:01:05 nice kernel: WARNING: at fs/sysfs/dir.c:424 sysfs_add_one() Jan 24 16:01:05 nice kernel: Pid: 2571, comm: iscsid Not tainted 2.6.24-rc7-ga3d2c2e8-dirty #1 Jan 24 16:01:05 nice kernel: Jan 24 16:01:05 nice kernel: Call Trace: Jan 24 16:01:05 nice kernel: [<ffffffff802a22b8>] sysfs_add_one+0x54/0xbd Jan 24 16:01:05 nice kernel: [<ffffffff802a283c>] create_dir+0x4f/0x87 Jan 24 16:01:05 nice kernel: [<ffffffff802a28a9>] sysfs_create_dir+0x35/0x4a Jan 24 16:01:05 nice kernel: [<ffffffff803069a1>] kobject_get+0x12/0x17 Jan 24 16:01:05 nice kernel: [<ffffffff80306ece>] kobject_add+0xf3/0x1a6 Jan 24 16:01:05 nice kernel: [<ffffffff8034252b>] class_device_add+0xaa/0x39d Jan 24 16:01:05 nice kernel: [<ffffffff803428fb>] class_device_create+0xcb/0xfa Jan 24 16:01:05 nice kernel: [<ffffffff80229e09>] printk+0x4e/0x56 Jan 24 16:01:05 nice kernel: [<ffffffff802a2054>] sysfs_ilookup_test+0x0/0xf Jan 24 16:01:05 nice kernel: [<ffffffff88022580>] :ch:ch_probe+0xbe/0x61a (snip) This patch converts ch to use a standard minor number management way, idr like sg and bsg. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-24scsi: use class iteration apiDave Young1-11/+13
Convert to use the class iteration api. Signed-off-by: Dave Young <hidave.darkstar@gmail.com> Cc: James Bottomley <James.Bottomley@hansenpartnership.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24Driver core: change sysdev classes to use dynamic kobject namesKay Sievers1-1/+1
All kobjects require a dynamically allocated name now. We no longer need to keep track if the name is statically assigned, we can just unconditionally free() all kobject names on cleanup. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-23[SCSI] initio: fix module hangs on loadingStuart Swales1-2/+6
I've verified (on my Initio 9100 with a DAT drive) that the 2.6.24-rc8-git6 initio module still hangs on loading. These fixes (other than the printk) are needed to get the module to load ok (and work correctly) with my adapter & tape drive. a) printk cosmetic fix b) cblk->sglen needs setting for later DMA I/O routines to use c) host->bios_addr needs setting for debug output correctness d) semaph & semaph_lock initialisation had got lost since 2.6.22 e) since 2.6.22 the bios data address was truncated to 16 bits (needs 20 when shifted left) Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] ch: handle class_device_create failure properlyFUJITA Tomonori1-7/+15
When class_device_create fails, ch_probe needs to fail too. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] NCR5380: fix section mismatchRandy Dunlap1-1/+1
Many release() methods that are not __exit or __devexit call this __devexit function, so remove its "__devexit" attribute. scsi/g_NCR5380.c: WARNING: vmlinux.o(.text+0xadaf8c): Section mismatch: reference to .exit.text:NCR5380_exit (between 'generic_NCR5380_release_resources' and 'generic_NCR5380_biosparam') WARNING: vmlinux.o(.text+0xadd18c): Section mismatch: reference to .exit.text:NCR5380_exit (between 'generic_NCR5380_release_resources' and 'generic_NCR5380_biosparam') scsi/pas16.c, seagate.c: WARNING: vmlinux.o(.text+0xb29e91): Section mismatch: reference to .exit.text:NCR5380_exit (between 'pas16_release' and 'seagate_st0x_info') t128.c: WARNING: vmlinux.o(.text+0xb2a774): Section mismatch: reference to .exit.text:NCR5380_exit (between 't128_release' and 't128_biosparam') dtc.c, sym2/sym_fw.c: WARNING: vmlinux.o(.text+0xb2f215): Section mismatch: reference to .exit.text:NCR5380_exit (between 'dtc_release' and 'sym_fw1_patch') Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] sg: fix /proc/scsi/sg/devices when no SCSI devicesTony Battersby1-1/+1
The patch "[SCSI] sg: use idr to replace static arrays" in 2.6.24-rc1 causes a bogus line to appear in /proc/scsi/sg/devices containing "-1 -1 -1 -1 -1 -1 -1 -1 -1" when there are no SCSI devices in the system. In 2.6.23, /proc/scsi/sg/devices is empty when there are no SCSI devices in the system. A similar problem exists with /proc/scsi/sg/device_strs. The following patch restores the behavior of 2.6.23. Signed-off-by: Tony Battersby <tonyb@cybernetics.com> Acked-by: Douglas Gilbert <dougg@torque.net> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] don't use __GFP_DMA for sense buffers if not requiredJames Bottomley3-71/+51
Only hosts which actually have ISA DMA requirements need sense buffers coming out of ZONE_DMA, so only use the __GFP_DMA flag for that case to avoid allocating this scarce resource if it's not necessary. [tomo: fixed slab leak in failure case] Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] use dynamically allocated sense bufferFUJITA Tomonori3-3/+69
This removes static array sense_buffer in scsi_cmnd and uses dynamically allocated sense_buffer (with GFP_DMA). The reason for doing this is that some architectures need cacheline aligned buffer for DMA: http://lkml.org/lkml/2007/11/19/2 The problems are that scsi_eh_prep_cmnd puts scsi_cmnd::sense_buffer to sglist and some LLDs directly DMA to scsi_cmnd::sense_buffer. It's necessary to DMA to scsi_cmnd::sense_buffer safely. This patch solves these issues. __scsi_get_command allocates sense_buffer via kmem_cache_alloc and attaches it to a scsi_cmnd so everything just work as before. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] sd: add fix for devices with last sector access problemsHans de Goede1-0/+9
This patch adds a new scsi_device flag (last_sector_bug) for devices which contain a bug where the device crashes when the last sector is read in a larger then 1 sector read. This is for example the case with sdcards in the HP PSC1350 printer cardreader and in the HP PSC1610 printer cardreader. Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] fix pcmcia compile problemJames Bottomley1-1/+2
This patch commit 8ae732a91df051aba6820068a47b631a06599d84 Author: Tejun Heo <htejun@gmail.com> Date: Fri Dec 7 22:36:23 2007 +0900 [SCSI] make pcmcia directory use obj-y|m instead of subdir-y|m Moved the scsi Makefile into conformance, but also caused the pcmcia subdirectory to get built in for the first time, leading to duplicate symbols in an allyesconfig build. Since evidently no-one relies on these being built in, fix this by ensuring they can only be built as modules. Acked-by: Tejun Heo <htejun@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] aacraid: add Voodoo Lite class of cards.Salyzyn, Mark4-6/+44
The cards being added are supported in a limited sense already through family matching, but we needed to add some functionality to the driver to expose selectively the physical drives. These Physical drives are specifically marked to not be part of any array and thus are declared JBODs (Just a Bunch Of Drives) for generic SCSI access. We report that this is the second patch in a set of two, but merely depends on the stand-alone functionality of the first patch which adds in that case the ability to report a driver feature flag via sysfs. We leverage that functionality by reporting that this driver now supports this new JBOD feature for the controller so that the array management applications may react accordingly and guide the user as they manage the controller. Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] aacraid: add new driver features flagsSalyzyn, Mark1-0/+25
Feature enhancement, adding a 'flags' entry that will reside in the host controller's tree, with a newline separated list of arbitrary ascii named features that indicate whether the combination of driver and controller has support for said feature. Breaking from the one-line output typical of sysfs entries, newline was added to tailor for grep, or simple gets line by line string match within an application. I added one for a compiler time check for existence of debug print output, one for an optional manifest defined enhanced status reporting in the logs, and one for runtime reporting whether the controller and driver supports arrays larger than 2TB. Adaptec's storage management software uses the last flag to determine whether to make available the creation of arrays larger than 2TB, otherwise a warning is posted. Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] qla2xxx: Update version number to 8.02.00-k7.Andrew Vasquez1-1/+1
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] qla2xxx: Issue correct MBC_INITIALIZE_FIRMWARE command.Seokmann Ju2-2/+4
There is a case where 54xx HBA loads MID firmware as it use 24xx firmware. In this case, the driver should issue MBC_MID_INITIALIZE FIRMWARE even though the HBA doesn't support NPIV. This patch make changes in the driver so that could behave accordingly. Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] qla2xxx: Correct late-memset() of EFT buffer.Andrew Vasquez1-1/+1
Original code would clear the buffer after the firmware had already been initialized to use the buffer, thus potentially and inadvertantly clearing data previously DMA'd by the firmware. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] qla2xxx: Add Fibre Channel Event (FCE) tracing support.Andrew Vasquez10-14/+405
FCE support enables the firmware to record FC extended link services and basic link services frames which have been transmitted and received by the ISP. This allows for a limited view of the FC traffic through the ISP without using a FC analyzer. This can be useful in situations where a physical connection to the FC bus is not possible. The driver exports this information in two ways -- first, via a debugfs node exported for all supported ISPs under: <debugfs_mount_point>/qla2xxx/qla2xxx_<host_no>/fce where a read of the 'fce' file will provide a snapshot of the firmware's FCE buffer; and finally, the FCE buffer will be extracted during a firmware-dump scenario. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] qla2xxx: Trace-Control naming cleanups.Andrew Vasquez6-20/+50
In preparation for FCE (Fibre Channel Event) tracing support. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] qla2xxx: Code cleanups.Adrian Bunk7-238/+19
- make the following needlessly global code static: - qla_attr.c: qla24xx_vport_delete() - qla_attr.c: qla24xx_vport_disable() - qla_mid.c: qla24xx_allocate_vp_id() - qla_mid.c: qla24xx_find_vhost_by_name() - qla_mid.c: qla2x00_do_dpc_vp() - qla_os.c: struct qla2x00_driver_template - qla_os.c: qla2x00_stop_timer() - qla_os.c: qla2x00_mem_alloc() - qla_os.c: qla2x00_mem_free() - qla_sup.c: qla2x00_lock_nvram_access() - qla_sup.c: qla2x00_unlock_nvram_access() - qla_sup.c: qla2x00_get_nvram_word() - qla_sup.c: qla2x00_write_nvram_word() - #if 0 the following unused global functions: - qla_mbx.c: qla2x00_system_error() - qla_os.c: remove some unneeded function prototypes - removed unused functions: - qla_dbg.c: qla2x00_dump_pkt() - qla_mbx.c: qla2x00_get_serdes_params() - qla_mbx.c: qla2x00_get_idma_speed() - qla_mbx.c: qla24xx_get_vp_database() - qla_mbx.c: qla24xx_get_vp_entry() Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Small modifications and Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] qla2xxx: Add a filter to compare port_name against the physical on vport creation.Seokmann Ju1-0/+2
During vport creation, there was a possibility to get create a vport with same port_name as pport. A new filter has added to compare given port_name with the port_name of the pport. Signed-Off-by: Seokmann Ju <seokmann.ju@qlogic.com> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] qla2xxx: Use completion routines.Marcus Barrow6-69/+16
Instead of abusing the semaphore interfaces for mailbox command completions. Additional cleanups and Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] qla2xxx: Don't schedule the DPC routine to perform an issue-lip request.Andrew Vasquez3-3/+4
As the driver depends on the DPC routine to handle bottom-half loop resynchronization in order to recover from the issue-lip request. The issue_lip call is sleeping context capable, so just issue the reset function there. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] qla2xxx: Restrict MSI/MSI-X enablement on select ISP2432-type HBAs.Andrew Vasquez1-0/+12
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] qla2xxx: Wait for FLASH write-protection to complete after a write.Andrew Vasquez1-2/+8
Some flash parts have a slow enable write-protection (WP) operation whereby subsequent FLASH accesses would fail if the WP operation had not completed. Software now polls the SPI's status-register for WP completion. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] qla2xxx: Fix for 32-bit platforms with 64-bit resources.Andrew Vasquez2-17/+8
The driver stores the contents of PCI resources into unsigned long's before ioremapping. This breaks on 32-bit platforms which support 64-bit MMIO resources. Correct code by removing the temporary variables used during MMIO PIO mapping and using resource_size_t where applicable. Also correct a small typo in a printk() where the wrong region number was displayed. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] qla2xxx: Retrieve additional HBA port statistics from recent ISPs.Andrew Vasquez4-98/+74
HBAs supporting these additional counters include ISP24xx and ISP25xx type boards. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] qla2xxx: Consolidate duplicate sense-data handling codes.Andrew Vasquez1-54/+31
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] st: convert to unlocked_ioctlKai Makisara1-5/+4
Convert st to unlocked_ioctl. The necessary locking was already in place. Signed-off-by: Kai Makisara <kai.makisara@kolumbus.fi> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] aacraid: remove pigs in spaceSalyzyn, Mark5-464/+458
I was amazed at how much embedded space was present in the aacraid driver source files. Just selected five files from the set to clean up for now and the attached patch swelled to 73K in size! - Removed trailing space or tabs - Removed spaces embedded within tabs - Replaced leading 8 spaces with tabs - Removed spaces before ) - Removed ClusterCommand as it was unused (noticed it as one triggered by above) - Replaced scsi_status comparison with 0x02, to compare against SAM_STATUS_CHECK_CONDITION. - Replaced a long series of spaces with tabs - Replaced some simple if...defined() with ifdef/ifndef Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] sg: handle class_device_create failure properlyFUJITA Tomonori1-4/+7
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Douglas Gilbert <dougg@torque.net> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] sg: set class_data after successFUJITA Tomonori1-1/+2
If cdev_add fails in sg_add, sg_remove crashes since class_data is bogus. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Douglas Gilbert <dougg@torque.net> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] dpt_i2o: use constant instead of bare valueSalyzyn, Mark1-1/+1
0x02 becomes SAM_STAT_CHECK_CONDITION Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] ch: Convert to use unlocked_ioctlMathieu Segaud1-10/+8
As of now, compat_ioctl already runs without the BKL, whereas ioctl runs with the BKL. This patch first converts changer_fops to use a .unlocked_ioctl member. It applies the same locking rationale than ch_ioctl_compat() uses to ch_ioctl(). Signed-off-by: Mathieu Segaud <mathieu.segaud@regala.cx> Reviewed-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] sg: Only print SCSI data direction warning once for a commandAndi Kleen1-2/+6
When I use cdparanoia my logs get spammed a lot by printk: 464 messages suppressed. sg_write: data in/out 30576/30576 bytes for SCSI command 0xbe--guessing data in; program cdparanoia not setting count and/or reply_len properly printk: 1078 messages suppressed. and many more of those. With this patch the message is only printed once for a command in a row. v1->v2: Prevent rate limit messages too (pointed out by jejb) Signed-off-by: Andi Kleen <ak@suse.de> Acked-by: Douglas Gilbert <dougg@torque.net> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] aacraid: fix security weaknessAlan Cox1-0/+2
Actually there are several but one is trivially fixed 1. FSACTL_GET_NEXT_ADAPTER_FIB ioctl does not lock dev->fib_list but needs to 2. Ditto for FSACTL_CLOSE_GET_ADAPTER_FIB 3. It is possible to construct an attack via the SRB ioctls where the user obtains assorted elevated privileges. Various approaches are possible, the trivial ones being things like writing to the raw media via scsi commands and the swap image of other executing programs with higher privileges. So the ioctls should be CAP_SYS_RAWIO - at least all the FIB manipulating ones. This is a bandaid fix for #3 but probably the ioctls should grow their own capable checks. The other two bugs need someone competent in that driver to fix them. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] aacraid: replace '<?:' with min_t()Salyzyn, Mark1-24/+16
The promised min_t() cleanup. Purely cosmetic. Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-23[SCSI] replace sizeof sense_buffer with SCSI_SENSE_BUFFERSIZEFUJITA Tomonori26-95/+88
This replaces sizeof sense_buffer with SCSI_SENSE_BUFFERSIZE in several LLDs. It's a preparation for the future changes to remove sense_buffer array in scsi_cmnd structure. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>