aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
AgeCommit message (Collapse)AuthorFilesLines
2006-01-17[PATCH] libata: Code for the IRQ mask flagAlan Cox1-4/+15
Signed-off-by: Alan Cox <alan@redhat.com> Somewhat cleaner in the resync as someone cleaned up the pio xfer users Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-17[PATCH] libata: Fix sector lock to apply to both drives not drive 0 twiceAlan Cox1-1/+1
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-17[PATCH] libata: Fix heuristic typos add LBA48PIO flag and support code, add ↵Alan Cox1-0/+4
IRQ flag for next diff Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-17[PATCH] Intel ICH8 SATA: add PCI device IDsJason Gaston1-0/+3
Signed-off-by:  Jason Gaston <Jason.d.gaston@intel.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-17[PATCH] libata: add a function to decide if we need iordyAlan Cox1-0/+34
This ought to be simple but for PIO2 we have to poke around the drive data to get it 100% correct. Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-17[PATCH] libata: Pre UDMA EIDE PIO mode selectionAlan Cox1-5/+9
I misread the spec when doing the original. I've tested the corrected version with pre UDMA drives and it now picks the right modes. This is a specific bug fix rather than an update or new feature item. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-17[libata] sata_promise: add pci idYusuf Iskenderoglu1-0/+16
2006-01-17[libata] sata_svw: add pci idOliver Weihe1-0/+1
2006-01-17[PATCH] ahci: AHCI mode SATA patch for Intel ICH8Jason Gaston1-0/+10
This patch adds the Intel ICH8 DID's to the ahci.c file for AHCI mode SATA support. Signed-off-by:  Jason Gaston <Jason.d.gaston@intel.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-15Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivialLinus Torvalds2-2/+2
2006-01-14[PATCH] Unlinline a bunch of other functionsArjan van de Ven6-19/+19
Remove the "inline" keyword from a bunch of big functions in the kernel with the goal of shrinking it by 30kb to 40kb Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Acked-by: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-15Fix "stuct", "strut", "struc" typosAlexey Dobriyan1-1/+1
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-01-15spelling: s/appropiate/appropriate/Adrian Bunk1-1/+1
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-01-14Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6Linus Torvalds65-2863/+3135
2006-01-14[SCSI] qla2xxx: Update version number to 8.01.04-k.andrew.vasquez@qlogic.com1-2/+2
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] qla2xxx: Disable port-type RSCN handling via driver state-machine.andrew.vasquez@qlogic.com4-2/+11
Given the semantic changes in both the device-model and fc-transport APIs, the driver's handling of port-type RSCNs via a series of ADISCs and PLOGIs can cause series of badness ranging from unexpectedly device loss to devices not being discovered. In the interim, disable (via a module-parameter) this feature and allow RSCN management to continue to occur within the driver's DPC thread. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] qla2xxx: Kconfig update: Add URL to download firmware images.andrew.vasquez@qlogic.com1-0/+4
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] qla2xxx: Correct setting of FDMI supported/current port speed.andrew.vasquez@qlogic.com1-5/+2
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] qla2xxx: Correct execution-throttle setting for ISP24xx.andrew.vasquez@qlogic.com1-0/+2
Similarly to other ISPs, set execution throttle to maximum allowed value since 'throttling' is done on a per-lun basis via queue-depth. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] qla2xxx: Collapse load RISC RAM implementations.andrew.vasquez@qlogic.com3-101/+15
Simplify essentially duplicate load RISC RAM implementation in qla2x00_load_ram_ext() and qla2x00_load_ram(). Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] qla2xxx: Correct swing/emphasis settings for ISP24XX.andrew.vasquez@qlogic.com1-3/+5
Swing/emphasis settings in NVRAM were not being honoured due to the driver not converting the serial-link options from LE to host-endian format. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] qla2xxx: Correct issue where portstate does not transition during ↵andrew.vasquez@qlogic.com1-0/+3
loop-resync. If the Get Port Database call fails during local-loop update, then schedule the DPC routine to perform a rescan as the firmware would have updated the Get ID List port-entries of their new state. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] qla2xxx: Update firmware-dump procedure for ISP24xx.andrew.vasquez@qlogic.com2-54/+55
Small changes to register retrieval and order as per latest firmware specification. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] qla2xxx: Re-enable flash-part write protection on ISP24xx boards.andrew.vasquez@qlogic.com1-0/+3
Driver would not correctly re-enable the write-protection bits of the flash part after updates. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] qla2xxx: Correct excessive delay during LOAD-RISC-RAM mailbox command.andrew.vasquez@qlogic.com1-1/+3
Problem report (against 2.4.x driver) from Jeff Layton <jlayton@redhat.com>: An OEM noticed that the U6 qla2200 driver would hang for around 2 minutes at boot time and then proceed normally. I found that the delay was occurring when loading the new firmware into the card, and was due to a schedule_timeout(10) added to the bottom of the polling loop. Some testing showed that the load ram operation on the card was very quick (on the order of a couple of jiffies), but the sleep in the polling loop was making each operation take around 25-30. The attached patch corrects this by making it skip sleeping during the load ram operation, since I believe we only do that when the module is plugged in. It also skips sleeping if the mbox_int flag got set during the current loop. This corrected the hang on my test setup, and OEM also confirmed that it corrected the problem for them. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] qla2xxx: Use msleep() as delay during ISP polling.andrew.vasquez@qlogic.com1-1/+1
Mailbox commands are polled for completion during ISP initialization. During potentially 'long' mailbox commands (i.e. fabric login), we really don't want a busy-wait delay to potentially trigger a (benign) soft-lockup BUG(). Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] qla2xxx: Drop noisy 'UNDERRUN' status message.andrew.vasquez@qlogic.com1-5/+6
There's no point in displaying the message during a valid underrun case. Limit the message to potentially problematic cases. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] qla2xxx: Correct FC4 feature assignment during RFF_ID.andrew.vasquez@qlogic.com1-0/+1
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] qla2xxx: Reference proper node/port names in fc_host class.andrew.vasquez@qlogic.com1-2/+2
The initial-control-block references are not always correct as the use-node-name qualifier during NVRAM configuration will cause the firmware to use the portname as a base for the nodename. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] iscsi: use pageslabMike Christie1-1/+1
From: FUJITA Tomonori <tomof@acm.org> and zhenyu.z.wang@intel.com: We cannot handle filesystems like XFS becuase of the pages they are sending us. We had thought page_count could be used to work around this, but the correct test is for PageSlab. The proper solution is to figure out what type of pages filesystems can use so we do not have to add tests like this or handle it in the block layer for all network block drivers but the issue still has not been resolved on fs-devel so we are sending this patch as a temporary fix. This is last patch just in case it is Nakd with the explanation that we need to push the correct fix through fs-devel, mm or the block layer. The rest of the patchset can live without the patch, but the driver will not work with filesystems like XFS. Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] iscsi: fix 4k stack iscsi setupsMike Christie2-14/+6
When we run the xmit code from queuecomand the stack trace gets too deep. The patch runs the xmit code from the scsi_host work queue. This fixes 4k stack and xfs support and should fix the st and sg stack usage bugs. Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] iscsi: seperate iscsi interface from setup functionsMike Christie2-453/+510
This is the second version of the patch to address Christoph's comments. Instead of doing the lib, I just kept everything in scsi_trnapsort_iscsi.c like the FC and SPI class. This was becuase the driver model and sysfs class is tied to the session and connection setup so separating did not buy very much at this time. The reason for this patch was becuase HW iscsi LLDs like qla4xxx cannot use the iscsi class becuase the scsi_host was tied to the interface and class code. This patch just seperates the session from scsi host so that LLDs that allocate the host per some resource like pci device can still use the class. This is also fixes a couple refcount bugs that can be triggered when users have a sysfs file open, close the session, then read or write to the file. Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] iscsi: add high mem supportMike Christie2-55/+31
From Mike Christie <michaelc@cs.wisc.edu> and FUJITA Tomonori <tomof@acm.org>: We cannot use page_address becuase some pages could be highmem. Instead, we can use sock_no_sendpage which does kmap for us. Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] iscsi: data digest page cache usage fixFUJITA Tomonori2-7/+11
Users can write to a page while we are sending it and making digest calculations. This ends up causing us to retry the command when a digest error is later reported. By using sock_no_sendpage when data digests are calculated we can avoid a lot of (not all but it helps) the retries becuase sock_no_sendpage is not zero copy. Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] iscsi: host locking fixzhenyu.z.wang@intel.com1-3/+4
We should be taking the host_lock instead of the conn lock when checking host_busy. Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] iscsi: data under/over flow fixzhenyu.z.wang@intel.com1-4/+2
We need to check the ISCSI_FLAG_DATA_* flags. Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] iscsi: whitespace cleanupFUJITA Tomonori1-11/+11
Remove extra whitespaces. Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] sem2mutex 3w-[x9]xxxJes Sorensen4-8/+10
Convert a the 3w-9xxx.c and 3w-xxxx.c drivers to use mutexes instead of semaphores. Untested, but compiles and looks obviously correct. Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] scsi_transport_sas: mapping the rphy channel equal to the port identifierMoore, Eric1-3/+3
We will be mapping the RAID volumes in mptsas to a reserved channel that is one larger than the anticapated number of ports on the direct attached host adapter. Signed-off-by: Eric Moore <Eric.Moore@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] remove target parent limitiationChristoph Hellwig6-48/+49
When James Smart fixed the issue of the userspace scan atributes crashing the system with the FC transport class he added a patch to let the transport class check if the parent is valid for a given transport class. When adding support for the integrated raid of fusion sas devices we ran into a problem with that, as it didn't allow adding virtual raid volumes without the transport class knowing about it. So this patch adds a user_scan attribute instead, that takes over from scsi_scan_host_selected if the transport class sets it and thus lets the transport class control the user-initiated scanning. As this plugs the hole about user-initiated scanning the target_parent hook goes away and we rely on callers of the scanning routines to do something sensible. For SAS this meant I had to switch from a spinlock to a mutex to synchronize the topology linked lists, in FC they were completely unsynchronized which seems wrong. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] sem2mutex: scsi_transport_spi.cJes Sorensen1-5/+5
Convert the SCSI transport class code to use a mutex rather than a semaphore. Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] I2O: move pci_request_regions() just behind pci_enable_device()Salyzyn, Mark1-4/+6
The problem in dpt_i2o could be the pci config space accesses it triggers as it loads, dangerous to do if there is any I/O activity going on in the other driver (probable if a boot driver I guess). I approve this patch to dpt_i2o.c, and am applying it to the Adaptec branch of the driver. Thanks for the investigation Ryoji. --- In linux 2.6.15, data transfer does hang when both dpt_i2o and i2o_block drivers are loaded. It seems that location of pci_request_regions() are wrong. I moved it just behind pci_enable_device() like other drivers, and it becomes fine. Signed-off-by: Ryoji Kamei <kamei@miraclelinux.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] ips: Mode Sense (Caching Page ) fixJack Hammer1-0/+3
To avoid the "sda: got wrong page" message, the ServeRAID driver should be setting flags indicating that the Mode Sense commands are not supported. Signed-off-by: Jack Hammer <jack_hammer@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] fc transport: add permanent_port_name fc_host attributeAndreas Herrmann1-0/+4
Add fc_host attribute permanent_port_name which is used to show the port name of the primary port - the port that initially logged into the fabric. For a virtual port (registered via the primary port with FDISC command) it is useful to know not only its (virtual) port name but also the permanent port name. Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] sr: split sr_audio_ioctl into specific helpersChristoph Hellwig1-91/+111
split each ioctl handled in sr_audio_ioctl into a function of it's own. This cleans the code up nicely, and allows various places in sr_ioctl to call these helpers directly instead of going through the multiplexer. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Jens Axboe <axboe@suse.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] always handle REQ_BLOCK_PC requests in common codeChristoph Hellwig4-91/+13
LLDDs should never see REQ_BLOCK_PC requests, we can handle them just fine in the core code. There is a small behaviour change in that some check in sr's rw_intr are bypassed, but I consider the old behaviour a bug. Mike found this cleanup opportunity and provdided early patches, so all the credit goes to him, even if I redid the patches from scratch beause that was easier than forward-porting the old patches. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-14[SCSI] sas: fix removal of devices behind expandersChristoph Hellwig1-1/+11
We need to iterate over all children when removing and expander, else stale objects will be around after host removal. This fixes the oops Eric Moore saw when removing and reloading mptsas. Also don't try the scsi_remove_target call unless operating on an end device. The current unconditional call is harmless but confusing. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-13[PATCH] Add Pseudo LLD bus_type probe and remove methodsRussell King1-2/+2
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-12[SCSI] Pass proper device from BusLogic to SCSI layerPetr Vandrovec1-1/+2
While trying to get SUSE's SLES9 working on system with more than 4GB we've noticed that SCSI layer happilly passes addresses over 4GB to the buslogic driver, which is quite a big problem as buslogic can generate only 32bit busmastering cycles. Fortunately in the current kernels this problem does not exist anymore as SCSI layer now assumes 4GB capable device by default, but it is still good idea to pass correct device structure to the SCSI layer. If nothing else, /sys/block/sda/device now points to /sys/devices/pci0000:00/0000:00:10.0/host0/... instead of /sys/devices/platform/host0/... like it did in the past. Change does nothing for ISA based BusLogic adapters, they'll still end under platform (and they are probably broken for long time as I do not see anything forcing ISA 16MB limit for them). Signed-off-by: Petr Vandrovec <petr@vmware.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12[SCSI] aic79xx: bump version to 3.0James Bottomley1-1/+1
This takes us past the old 1.x version of the SCSI driver and the 2.x version of the aic website version to reflect the full incorporation of both branches. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12[SCSI] aic79xx: Sequencer updateHannes Reinecke9-1538/+1911
Update sequencer code to Adaptec version 2.0.12-6.3.9. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12[SCSI] aic79xx: Sanitize inb/outb handlingHannes Reinecke1-59/+21
This patch coalesces inb/outb calls to the approriate word or long form. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12[SCSI] aic79xx: Use struct map_nodeHannes Reinecke3-33/+58
Use struct map_node instead of separate variables. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12[SCSI] aic7xxx/aic79xx: New device idsHannes Reinecke4-14/+40
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12[SCSI] Mask capabilities for SCSI-1 CD driveChuck Ebbert1-2/+3
SCSI-1 CD drives can't do MRW or be opened for writing, so mask off those capabilities. Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com> Acked-by: Jens Axboe <axboe@suse.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12[SCSI] aacraid: README updateMark Haverkamp1-74/+0
Received From Mark Salyzyn. Move the README from the driver directory to the Documentation directory. Updated the documentation, added descriptions for cards that were missing. Signed-off-by: Mark Haverkamp <markh@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12[SCSI] aacraid: 17 element sg performance updateMark Haverkamp2-4/+18
Received From Mark Salyzyn. The Jaguar and Corsair class of adapters (2410, 2810, 2610, 21610, CERC) perform better (about 10% better read performance, write performance neutral) with current Firmware if the OS limits the number of scatter gather elements to 17 per request. Signed-off-by: Mark Haverkamp <markh@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12[SCSI] aacraid: better sysfs adapter informationMark Haverkamp1-2/+18
Received from Mark Salyzyn. Provide more accurate adapter information. Allows the Adapter Firmware to override the Adapter product information. Signed-off-by: Mark Haverkamp <markh@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12[SCSI] aacraid: Fix default FIB sizeMark Haverkamp1-0/+4
Received from Mark Salyzyn. If the adapter has not instructed us otherwise that it can handle a 'large' FIB, then it can handle at most a 2KB FIB. Signed-off-by: Mark Haverkamp <markh@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12[SCSI] sas: clear parent->rphy in sas_rphy_deleteChristoph Hellwig1-0/+2
We need to clear the backpointer on rphy removal, else we'll run into problems with host removal after a device has been hot unplugged. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12[SCSI] turn most scsi semaphores into mutexesArjan van de Ven16-119/+129
the scsi layer is using semaphores in a mutex way, this patch converts these into using mutexes instead Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12[SCSI] aic7xxx: fix timer handling bugJames Bottomley3-41/+16
The driver is doing a rather stupid mod_timer allegedly to "give request sense more time to complete". This is illegal and pointless, so just eliminate it. Also eliminate all the other uses of struct timer_list in the driver, which are mostly bogus. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12[SCSI] qla2xxx: Kconfig: two fixesAndrew Vasquez3-10/+14
Original From: Adrian Bunk Here's a composite patch with Adrian's original additions and help-text with the new Kconfig variable SCSI_QLA_FC. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12[SCSI] lpfc_scsi.c: make lpfc_get_scsi_buf() staticAdrian Bunk1-1/+1
Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: James Smart <James.Smart@Emulex.Com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12[SCSI] scsi_transport_spi.c: make print_nego() staticAdrian Bunk1-1/+1
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12[SCSI] raid_class.c - adding RAID10 and RAID10 definesMoore, Eric1-0/+2
Adding defines for RAID10 and RAID50 levels, in preparation of adding RAID Transport support in the mpt fusion drivers. (BTW: IME is RAID10, and IM is RAID1). Signed-off-by: Eric Moore <Eric.Moore@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-12[PATCH] m68k: fix PIO case in espAl Viro1-2/+3
we always set ->SCp.ptr to physical address of buffer; for DMA that's just what we need, but we end up using it as virtual address in PIO case of esp_do_data(), with obvious breakage as soon as memory mapping becomes non-trivial. The fix is obvious. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-12[PATCH] m68k: NULL noise removalAl Viro1-2/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-12[PATCH] m68k: oktagon makefile fixAl Viro1-1/+2
oktagon_esp is described as modular. However, drivers/scsi/Makefile doesn't handle it right - it's multi-object module, with one of the parts being built from .S. Current makefile tries to declare each part a module of its own; that not only wouldn't work (oktagon_io.o doesn't have the right parts for that), it actually doesn't even build since kbuild doesn't believe in single-object modules built from .S. Turned into proper multi-object module... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-12[PATCH] m68k: namespace pollution fix (custom->amiga_custom)Al Viro6-11/+11
in amigahw.h custom renamed to amiga_custom, in drivers with few instances the same replacement, in the rest - #define custom amiga_custom in driver itself Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-10[PATCH] don't include ioctl32.h in driversChristoph Hellwig3-3/+0
These days ioctl32.h is only used for communication of fs/compat.c and fs/compat_ioctl.c and doesn't contain anything of interest to drivers. Remove inclusion in various drivers. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-09Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds6-6/+0
2006-01-09[PATCH] Fix sg_page_malloc() memsetHugh Dickins1-1/+1
sg_page_malloc should clear the data buffer, not that extent of mem_map. This fixes Jesper's sg_page_free "Bad page states" Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-09Merge Linus' tree.Russell King1-16/+5
2006-01-09Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-mergeLinus Torvalds2-9/+16
2006-01-09Merge branch 'upstream-linus' of ↵Linus Torvalds1-6/+24
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
2006-01-09[PATCH] sata_nv, spurious interrupts at system startup with MAXTOR 6H500F0 driveAndrew Chew1-6/+24
This patch works around a problem with spurious interrupts seen at boot time when a MAXTOR 6H500F0 drive is present. An ATA interrupt condition is mysteriously present at start of day. If we took too long in issuing the first command, the kernel would basically get tired of the spurious interrupts and turn the interrupt off. Issuing the first command essentially causes the interrupt condition to get acknowledged. I haven't seen this happen with any other drives. What I basically do is ack ATA status by reading it regardless of whether we're expecting to have to handle an interrupt. This clears the start-of-day anomalous interrupt condition, and keeps the kernel from disabling that interrupt due to too many spurious interrupts. Also, I fixed a bug where hotplug interrupts weren't getting acknowledged as handled in the ISR. This was not the cause of the spurious interrupts, but it's the right thing to do anyway. Signed-Off-By: Andrew Chew Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-01-09[SCSI] Kill the SCSI softirq handlingJens Axboe3-101/+45
This patch moves the SCSI softirq handling to the block layer version. There should be no functional changes. Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-09[ARM] Remove asm/irq.h includes from ARM driversRussell King6-6/+0
Many ARM drivers do not need to include asm/irq.h - remove this unnecessary include from some ARM drivers. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-08[PATCH] Add block_device_operations.getgeo block device methodChristoph Hellwig1-16/+5
HDIO_GETGEO is implemented in most block drivers, and all of them have to duplicate the code to copy the structure to userspace, as well as getting the start sector. This patch moves that to common code [1] and adds a ->getgeo method to fill out the raw kernel hd_geometry structure. For many drivers this means ->ioctl can go away now. [1] the s390 block drivers are odd in this respect. xpram sets ->start to 4 always which seems more than odd, and the dasd driver shifts the start offset around, probably because of it's non-standard sector size. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Jens Axboe <axboe@suse.de> Cc: <mike.miller@hp.com> Cc: Jeff Dike <jdike@addtoit.com> Cc: Paolo Giarrusso <blaisorblade@yahoo.it> Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> Cc: Neil Brown <neilb@cse.unsw.edu.au> Cc: Markus Lidel <Markus.Lidel@shadowconnect.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-09[PATCH] powerpc: Remove device_node addrs/n_addrBenjamin Herrenschmidt2-9/+16
The pre-parsed addrs/n_addrs fields in struct device_node are finally gone. Remove the dodgy heuristics that did that parsing at boot and remove the fields themselves since we now have a good replacement with the new OF parsing code. This patch also fixes a bunch of drivers to use the new code instead, so that at least pmac32, pseries, iseries and g5 defconfigs build. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-06Merge branch 'post-2.6.15' of git://brick.kernel.dk/data/git/linux-2.6-blockLinus Torvalds20-125/+103
Manual fixup for merge with Jens' "Suspend support for libata", commit ID 9b847548663ef1039dd49f0eb4463d001e596bc3. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06[PATCH] Suspend support for libataJens Axboe4-0/+165
This patch adds suspend patch to libata, and ata_piix in particular. For most low level drivers, they should just need to add the 4 hooks to work. As I can only test ata_piix, I didn't enable it for more though. Suspend support is the single most important feature on a notebook, and most new notebooks have sata drives. It's quite embarrassing that we _still_ do not support this. Right now, it's perfectly possible to suspend the drive in mid-transfer. Signed-off-by: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06[PATCH] parport: Kconfig dependency fixesMarko Kohtala1-4/+4
Make drivers that use directly PC parport HW depend on PARPORT_PC rather than HW independent PARPORT. Signed-off-by: Marko Kohtala <marko.kohtala@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06[PATCH] s390: cleanup KconfigMartin Schwidefsky1-1/+1
Sanitize some s390 Kconfig options. We have ARCH_S390, ARCH_S390X, ARCH_S390_31, 64BIT, S390_SUPPORT and COMPAT. Replace these 6 options by S390, 64BIT and COMPAT. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06[SCSI] scsi_end_async() needs to take an uptodate parameterJens Axboe1-1/+1
Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-06[BLOCK] add FUA support to libataTejun Heo3-13/+54
Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-06[BLOCK] update libata to use new blk_ordered for barriersTejun Heo13-13/+0
Reflect changes in SCSI midlayer and updated to use new ordered request implementation Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-06[BLOCK] scsi: add FUA support to sdTejun Heo1-3/+26
Add FUA support for barriers to SCSI disk. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-06[BLOCK] update SCSI to use new blk_ordered for barriersTejun Heo3-93/+20
All ordered request related stuff delegated to HLD. Midlayer now doens't deal with ordered setting or prepare_flush callback. sd.c updated to deal with blk_queue_ordered setting. Currently, ordered tag isn't used as SCSI midlayer cannot guarantee request ordering. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-06[BLOCK] add @uptodate to end_that_request_last() and @error to rq_end_io_fn()Tejun Heo3-4/+4
add @uptodate argument to end_that_request_last() and @error to rq_end_io_fn(). there's no generic way to pass error code to request completion function, making generic error handling of non-fs request difficult (rq->errors is driver-specific and each driver uses it differently). this patch adds @uptodate to end_that_request_last() and @error to rq_end_io_fn(). for fs requests, this doesn't really matter, so just using the same uptodate argument used in the last call to end_that_request_first() should suffice. imho, this can also help the generic command-carrying request jens is working on. Signed-off-by: tejun heo <htejun@gmail.com> Signed-Off-By: Jens Axboe <axboe@suse.de>
2006-01-06[PATCH] pcmcia: unify attach, EVENT_CARD_INSERTION handlers into one probe ↵Dominik Brodowski6-228/+51
callback Unify the EVENT_CARD_INSERTION and "attach" callbacks to one unified probe() callback. As all in-kernel drivers are changed to this new callback, there will be no temporary backwards-compatibility. Inside a probe() function, each driver _must_ set struct pcmcia_device *p_dev->instance and instance->handle correctly. With these patches, the basic driver interface for 16-bit PCMCIA drivers now has the classic four callbacks known also from other buses: int (*probe) (struct pcmcia_device *dev); void (*remove) (struct pcmcia_device *dev); int (*suspend) (struct pcmcia_device *dev); int (*resume) (struct pcmcia_device *dev); Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06[PATCH] pcmcia: remove dev_list from driversDominik Brodowski4-68/+11
The linked list of devices managed by each PCMCIA driver is, in very most cases, unused. Therefore, remove it from many drivers. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06[PATCH] pcmcia: unify detach, REMOVAL_EVENT handlers into one remove callbackDominik Brodowski6-65/+26
Unify the "detach" and REMOVAL_EVENT handlers to one "remove" function. Old functionality is preserved, for the moment. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-05[PATCH] pcmcia: new suspend coreDominik Brodowski5-134/+186
Move the suspend and resume methods out of the event handler, and into special functions. Also use these functions for pre- and post-reset, as almost all drivers already do, and the remaining ones can easily be converted. Bugfix to include/pcmcia/ds.c Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-04Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6Linus Torvalds1-1/+1
Trivial manual merge fixup for usb_find_interface clashes.
2006-01-04Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuildLinus Torvalds2-0/+9
2006-01-04Merge branch 'upstream' of ↵Linus Torvalds12-246/+367
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
2006-01-04Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6Linus Torvalds74-3879/+16728
2006-01-04[PATCH] driver core: replace "hotplug" by "uevent"Kay Sievers1-1/+1
Leave the overloaded "hotplug" word to susbsystems which are handling real devices. The driver core does not "plug" anything, it just exports the state to userspace and generates events. Signed-off-by: Kay Sievers <kay.sievers@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04[PATCH] merge kobject_uevent and kobject_hotplugKay Sievers1-1/+1
The distinction between hotplug and uevent does not make sense these days, netlink events are the default. udev depends entirely on netlink uevents. Only during early boot and in initramfs, /sbin/hotplug is needed. So merge the two functions and provide only one interface without all the options. The netlink layer got a nice generic interface with named slots recently, which is probably a better facility to plug events for subsystem specific events. Also the new poll() interface to /proc/mounts is a nicer way to notify about changes than sending events through the core. The uevents should only be used for driver core related requests to userspace now. Signed-off-by: Kay Sievers <kay.sievers@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-03Merge branch 'master'Jeff Garzik3-18/+95
2006-01-01gitignore: misc filesBrian Gerst2-0/+9
Ignore all files generated from *_shipped files, plus a few others. Signed-off-by: Brian Gerst <bgerst@didntduck.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-12-26[PATCH] Fix Fibre Channel boot oopsJames Bottomley1-1/+2
The oops is characteristic of the underlying device being removed from visibility before the class device, and sure enough we do device_del() before transport_unregister() in the scsi_target_reap() routines. I've no idea why this is suddenly showing up, since the code has been in there since that function was first invented. However, I've confirmed this fixes Andrew Vasquez's boot oops. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-24Merge branch 'upstream-fixes' of ↵Linus Torvalds1-4/+1
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
2005-12-24[PATCH] fix libata inquiry VPD for ATAPI devicesTony Battersby1-4/+1
The following patch prevents libata from incorrectly modifying inquiry VPD pages and command support data from ATAPI devices. I have tested the patch with a SATA ATAPI tape drive on an AHCI controller. Patch is against kernel 2.4.32 with 2.4.32-libata1.patch applied. Anthony J. Battersby Cybernetics Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-24Merge branch 'master'Jeff Garzik16-88/+86
2005-12-21Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6Linus Torvalds2-14/+93
2005-12-18[PATCH] dpt_i2o fix for deadlock conditionSalyzyn, Mark1-5/+20
Miquel van Smoorenburg <miquels@cistron.nl> forwarded me this fix to resolve a deadlock condition that occurs due to the API change in 2.6.13+ kernels dropping the host locking when entering the error handling. They all end up calling adpt_i2o_post_wait(), which if you call it unlocked, might return with host_lock locked anyway and that causes a deadlock. Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-17[SCSI] Missing const in sr_vendorMatthew Wilcox1-2/+2
Fix compile warnings with current scsi-misc git tree Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-17[SCSI] fix scsi_reap_target() device_del from atomic contextJames Bottomley1-10/+38
scsi_reap_target() was desgined to be called from any context. However it must do a device_del() of the target device, which may only be called from user context. Thus we have to reimplement scsi_reap_target() via a workqueue. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-16[SCSI] Merge sym53c8xx_comm.h and sym53c8xx_defs.h into ncr driverMatthew Wilcox4-2114/+1995
When the sym1 driver was in the tree, it used to share various parts of its infrastructure with the ncr driver. Now it's gone, these files are just an annoyance, so merge sym53c8xx_comm.h into ncr53c8xx.c and merge sym53c8xx_defs.h into ncr53c8xx.h. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-16[SCSI] Use spi_print_msg in ncr53c8xx driverMatthew Wilcox1-13/+2
The ncr53c8xx driver had its own loop to print scsi messages. Use the SPI one instead. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-16[SCSI] 53c700: update endian processing macrosJames Bottomley1-9/+13
This update now allows this driver to be used on big endian bus machines that aren't parisc. To do that, the driver must set a CONFIG_53C700_BE_BUS in Kconfig to compile the right macro versions. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15[SCSI] fix for fc transport recursion problem.James.Smart@Emulex.Com1-4/+55
In the scenario that a link was broken, the devloss timer for each rport was expire at roughly the same time, causing lots of "delete" workqueue items being queued. Depth is dependent upon the number of rports that were on the link. The rport target remove calls were calling flush_scheduled_work(), which would interrupt the stream, and start the next workqueue item, which did the same thing, and so on until recursion depth was large. This fix stops the recursion in the initial delete path, and pushes it off to a host-level work item that reaps the dead rports. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15[SCSI] Add PPR support to spi_print_msgMatthew Wilcox1-7/+29
Introduce a new helper, print_nego() to handle SDTR/WDTR/PPR. Split out the guts of show_spi_transport_period_helper() into period_to_str() and use it in print_nego to get the period factor conversion right. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15[SCSI] Use ARRAY_SIZE in spi_print_msgMatthew Wilcox1-6/+3
Replace the custom NO_*_MSGS definitions with uses of ARRAY_SIZE. This fixes a bug in the definition of NO_EXTENDED_MSGS. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15[SCSI] Fix printing of two-byte messagesMatthew Wilcox1-1/+1
A missing comma meant that "Ordered Queue Tag" and "Ignore Wide Residue" were being concatenated together. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15[SCSI] Rename scsi_print_msg to spi_print_msgMatthew Wilcox9-27/+33
Rename scsi_print_msg to spi_print_msg and move its prototype from scsi_dbg.h to scsi_transport_spi.h Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15[SCSI] Move scsi_print_msg to SPI classMatthew Wilcox4-108/+123
scsi_print_msg() is an SPI-specific concept. This patch moves it from constants.c to scsi_transport_spi.c and updates the Kconfig to link in the SPI class for the drivers which use scsi_print_msg(). Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15Fix up SCSI mismergeJames Bottomley4-15/+24
I forgot to do a git-update-cache on the merged files ...
2005-12-15Merge by hand (conflicts in scsi_lib.c)James Bottomley18-81/+60
This merge is pretty extensive. The conflict is over the new req->retries parameter, so I had to change the prototype to scsi_setup_blk_pc_cmnd() and the usage in sd, sr and st. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15[SCSI] Fix st oops with new scsi_execute infrastructureKai Makisara1-6/+9
Patch from Kai minus last sg_segs clearing which was merged already. > > Was there a oops or lockup or any debug output you can send me? I will try > > some more large request tests with scsi_debug. You also have to compile your > > kernel with SCSI_MAX_PHYS_SEGMENTS == 255 to get larger requests now. > It was an oops in sgl_unmap_user_pages(). The reason is this: /* XXX: just for debug. Remove when PageReserved is removed */ BUG_ON(PageReserved(page)); I was using /dev/zero as input and it triggers this. When I used a file as input, this did not trigger. Should this BUG_ON be removed? In the same log I noticed that there was another ->sg_segs inconsistency. Also, the field ->last_SRpnt was not reset when scsi_execute_async() failed. This caused the error message "Async command already active" later and prevented proper close. While doing the changes, I noticed that the current code (since 2.6.0-test4) does not set the pages dirty when reading with direct i/o. All of these st problems (including the one I sent earlier) are fixed in the patch at the end of this message. These fixes should probably be included already in 2.6.15. After these fixes, the tape seems to operate as expected. Without other changes, the largest block size with sym53c896 SCSI adapter is 384 kB. The maximum number of sg segments is set to 96 and clustering is disabled in the driver. 96 x 4 kB = 384 kB. OK. I enabled clustering and set max_sectors to 10000 in the SCSI HBA driver. Now the block size limit is 5000 kB as expected. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15[SCSI] seperate max_sectors from max_hw_sectorsMike Christie1-1/+1
- export __blk_put_request and blk_execute_rq_nowait needed for async REQ_BLOCK_PC requests - seperate max_hw_sectors and max_sectors for block/scsi_ioctl.c and SG_IO bio.c helpers per Jens's last comments. Since block/scsi_ioctl.c SG_IO was already testing against max_sectors and SCSI-ml was setting max_sectors and max_hw_sectors to the same value this does not change any scsi SG_IO behavior. It only prepares ll_rw_blk.c, scsi_ioctl.c and bio.c for when SCSI-ml begins to set a valid max_hw_sectors for all LLDs. Today if a LLD does not set it SCSI-ml sets it to a safe default and some LLDs set it to a artificial low value to overcome memory and feedback issues. Note: Since we now cap max_sectors to BLK_DEF_MAX_SECTORS, which is 1024, drivers that used to call blk_queue_max_sectors with a large value of max_sectors will now see the fs requests capped to BLK_DEF_MAX_SECTORS. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15[PATCH] iscsi gfp_t annotationsAl Viro2-2/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-14[SCSI] convert st to use scsi_execute_asyncMike Christie2-145/+123
convert st to always send scatterlists and kill scsi_request usage. This is the same as last time as it was posted, but with Kai's patches merged and we now pass the bytes value to scsi_execute_async. TODO: - move DIO code to common place or make block layers usable for ULDs. - move buffer allocation code to common place for all ULDs to use. And make buffer allocation code handle all queue limits so we can find out about problems before calling scsi_execute_async. - move indirect (copy_to/from_user) paths commone place or make block layers usable for ULDs. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-14[SCSI] convert sg to scsi_execute_asyncMike Christie1-427/+259
Convert sg to always send scatterlists, and kill scsi_request usage. TODO: - move DIO code to common place or make block layers usable for ULDs. - move buffer allocation code to common place for all ULDs to use. And make buffer allocation code obey all queue limits so we can find out about problems before calling scsi_execute_async. Currently, sg.c could allocate a buffer that is too large, and send the request to scsi_execute_async. scsi_execute_async will then check it against all the queue limits and return a failure in this case. It would nicer to know about the queue limit violation right away. - move indirect (copy_to/from_user) paths commone place or make block layers usable for ULDs. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-14[SCSI] add kmemcache for scsi_io_contextMike Christie1-2/+15
Add kmemcache of scsi io contexts. In the future when we finalize on where these functions will live we can add a mempool for it and do a bioset for out REQ_BLOCK_PC bios. This is needed becuase the dm-multipath handlers will want to use the scsi_exectute* functions for failover and we cannot have them and the bio device allocating from the same mempool. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-14[SCSI] complete the whole command when it is REQ_BLOCK_PCMike Christie2-2/+12
sd does not allow scsi_io_completion to retry commands for SG_IO requests, and it make sense that it should not happen for st SG_IO commands too. If for st we hit the bottom of scsi_io_completion we will probably screw things up pretty bad. This patch returns to the block layer that the whole command completed and relies on the caller to check the request errors field. For initialization commands like in sd, this adds the previous behavior where scsi_io_completion did not process the error. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-14[SCSI] add retries field to request for REQ_BLOCK_PC useMike Christie1-1/+3
For tape we need to control the retries. This patch adds a retries counter on the request for REQ_BLOCK_PC commands originating from scsi_execute* to use. REQ_BLOCK_PC commands comming from the block layer SG_IO path continue to use the retires set in the ULD init_command. (scsi_execute* does not set the gendisk so we do not execute the init_command in that path). Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-14[SCSI] Convert SCSI mid-layer to scsi_execute_asyncMike Christie3-73/+205
Add scsi helpers to create really-large-requests and convert scsi-ml to scsi_execute_async(). Per Jens's previous comments, I placed this function in scsi_lib.c. I made it follow all the queue's limits - I think I did at least :), so I removed the warning on the function header. I think the scsi_execute_* functions should eventually take a request_queue and be placed some place where the dm-multipath hw_handler can use them if that failover code is going to stay in the kernel. That conversion patch will be sent in another mail though. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-14[SCSI] handle scsi_add_host failure for aic7xxx and fix compiler warningJesper Juhl1-5/+13
Add scsi_add_host() failure handling for aic7xxx Also silence a compiler warning : drivers/scsi/aic7xxx/aic7xxx_osm.c: In function `ahc_linux_register_host': drivers/scsi/aic7xxx/aic7xxx_osm.c:1100: warning: ignoring return value of `scsi_add_host', declared with attribute warn_unused_result Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-14[SCSI] handle scsi_add_host failure for aic79xx and fix compiler warningJesper Juhl1-2/+9
Add scsi_add_host() failure handling for aic79xx Also silence a compiler warning : drivers/scsi/aic7xxx/aic79xx_osm.c: In function `ahd_linux_register_host': drivers/scsi/aic7xxx/aic79xx_osm.c:1099: warning: ignoring return value of `scsi_add_host', declared with attribute warn_unused_result Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-14Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6Linus Torvalds13-81/+64
2005-12-13[SCSI] Consolidate REQ_BLOCK_PC handling path (fix ipod panic)James Bottomley4-62/+26
This follows on from Jens' patch and consolidates all of the ULD separate handlers for REQ_BLOCK_PC into a single call which has his fix for our direction bug. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] sd: Always do write-protect checkAlan Stern1-3/+1
Since nobody has offered an explanation for why the sd driver makes a write-protect check only for devices with removable media, I'm submitting this patch to get rid of the removable-media test. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] lpfc 8.1.1 : Change version number to 8.1.1James.Smart@Emulex.Com1-1/+1
Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] lpfc 8.1.1 : kill use of pci_read_config_xxxJames.Smart@Emulex.Com1-7/+3
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] lpfc 8.1.1 : Added code to adjust lun queue depth to avoid target ↵James.Smart@Emulex.Com3-1/+62
overloading Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] lpfc 8.1.1 : Add polled-mode supportJames.Smart@Emulex.Com6-33/+377
- Add functionality to run in polled mode only. Includes run time attribute to enable mode. - Enable runtime writable hba settings for coallescing and delay parameters Customers have requested a mode in the driver to run strictly polled. This is generally to support an environment where the server is extremely loaded and is looking to reclaim some cpu cycles from adapter interrupt handling. This patch adds a new "poll" attribute, and the following behavior: if value is 0 (default): The driver uses the normal method for i/o completion. It uses the firmware feature of interrupt coalesing. The firmware allows a minimum number of i/o completions before an interrupt, or a maximum time delay between interrupts. By default, the driver sets these to no delay (disabled) or 1 i/o - meaning coalescing is disabled. Attributes were provided to change the coalescing values, but it was a module-load time only and global across all adapters. This patch allows them to be writable on a per-adapter basis. if value is 1 : Interrupts are left enabled, expecting that the user has tuned the interrupt coalescing values. When this setting is enabled, the driver will attempt to service completed i/o whenever new i/o is submitted to the adapter. If the coalescing values are large, and the i/o generation rate steady, an interrupt will be avoided by servicing completed i/o prior to the coalescing thresholds kicking in. However, if the i/o completion load is high enough or i/o generation slow, the coalescion values will ensure that completed i/o is serviced in a timely fashion. if value is 3 : Turns off FCP i/o interrupts altogether. The coalescing values now have no effect. A new attribute "poll_tmo" (default 10ms) exists to set the polling interval for i/o completion. When this setting is enabled, the driver will attempt to service completed i/o and restart the interval timer whenever new i/o is submitted. This behavior allows for servicing of completed i/o sooner than the interval timer, but ensures that if no i/o is being issued, then the interval timer will kick in to service the outstanding i/o. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] lpfc 8.1.1 : Bring model descriptions in sync with Emulex standard ↵James.Smart@Emulex.Com2-48/+65
generic names Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] lpfc 8.1.1 : Add support for more members of the Light Pulse 11xxx ↵James.Smart@Emulex.Com2-11/+74
(4Gb) family Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] lpfc 8.1.1 : Fixes to error handlersJames.Smart@Emulex.Com3-37/+70
- Release task management command before counting outstanding commands. TMF was being erroneously counted as an active outstanding command. - Serialize EH calls and block requests when EH function is running. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] lpfc 8.1.1 : Remove locking wrappers around error handlersJames.Smart@Emulex.Com1-38/+14
Remove locking wrappers around error handlers. Wrappers were added in early 2.6.13 api change Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] lpfc 8.1.1 : Adjust use of scsi_block_requests and interaction w/ FC ↵James.Smart@Emulex.Com1-8/+10
transport - Remove unnecessary scsi_block_requests calls on rport deletes. This was deadlocking the sdev removals as they wanted to flush commands. - No longer block requests when adding the remote port (to block discovery). Instead, register, then change port role. Maps to Qlogic behavior, and closer to the register-node-upon-first-ELS behavior. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] lpfc 8.1.1 : Fixes for short cable pullsJames.Smart@Emulex.Com2-0/+6
Cause: Link bounces were causing discovery ELS's to be killed. Driver was not properly flushing ELS commands upon the subsequent link bounces. Thus, processing of ELS post link bounce erroneously assumed discovery failure and device loss. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] lpfc 8.1.1 : Correct some 8bit to 16bit field conversions/comparisonsJames.Smart@Emulex.Com1-24/+45
Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] lpfc 8.1.1: Miscellaneous CleanupsJames.Smart@Emulex.Com3-28/+24
Miscellaneous Cleanups: - Remove ProgType READ_REV mailbox command value check in lpfc_config_port_prep. - Convert simple printk to an lpfc_printf_log in queuecommand. - Modify lpfc_abort_handler message 0749 to display more accurate text and data. - Minor style cleanup: fix 3 long lines in lpfc_hw.h Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] qla2xxx: fix compile error caused by pci_dev.owner moveJames Bottomley1-1/+3
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] correct some dropped const compiler warningsJames Bottomley2-3/+5
Make the vendor, model and rev fields in scsi_device pointers to const and update a few prototypes of functions using them. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] iscsi: check header digests for mgmt tasksMike Christie1-12/+12
From Wang Zhenyu: check header digest for cmd and mgmt tasks Signed-off-by: Wang Zhenyu <zhenyu.z.wang@intel.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] iscsi: update versionMike Christie1-1/+1
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] iscsi: lower queue depthMike Christie2-6/+17
From Wang Zhenyu: High queue depth was a problem for some targets so make queue_depth adjustable From Mike Christie Make default queue_depth a little lower Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] iscsi: data digest calculation fixMike Christie1-25/+40
From Wang Zhenyu: data digest fix (the bug caused data corruption w/Wasabi StorageBuilder target) Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] iscsi: iscsi response fixMike Christie1-5/+2
from Wang Zhenyu: Must check SCSI CMD and R2T response according to the spec Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] iscsi: redirect fixMike Christie1-2/+3
From tomof@acm.org: There is one more issue about Equallogic systems. They send re-direction info with FIN. I think that the kernel module needs to let iscsid to read data from the socket before killing it. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] iscsi: opcode check fixMike Christie1-1/+1
Must check only valid opcode bits. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] sym2: Version 2.2.2Matthew Wilcox1-1/+1
Update version number to 2.2.2 Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] sym2: Report disabled devices and LUNs more attractivelyMatthew Wilcox2-33/+11
Rather than print a list of targets at driver init time, print each disabled target as we attempt to scan it. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] sym2: Allow NVRAM settings to limit speed and widthMatthew Wilcox5-18/+26
The NVRAM for both Tekram and Symbios boards allows the user to set the speed and width for individual targets. I took that code out in March 2004 when we introduced Domain Validation, but it seems there's still a legitimate need for it in some configurations. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] sym2: Use scsi_print_msgMatthew Wilcox1-24/+5
sym_show_msg was almost a duplicate of scsi_print_msg, except not as featureful. So use the common code instead. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] sym2: Use DMA_40BIT_MASK constantMatthew Wilcox1-1/+1
Now that this constant has been added to dma-mapping.h, we don't need our own definition Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] sym2: Remove code to handle DMA_BIDIRECTION requestsMatthew Wilcox8-204/+40
The upper layer doesn't send these down since 2.4.x (or 2.6 in practice), so no need to handle it. Inline sym_setup_data_pointers into its only caller so we can fail gracefully in the case we'd get one neverless. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] sym2: Manage sym_lcb properlyMatthew Wilcox3-121/+38
Allocate the lcb in slave_alloc and free it in slave_destroy. This allows us to remove all the code that checks to see if it's already been allocated. From: Christoph Hellwig <hch@lst.de> Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] sym2: Remove last vestiges of sym_sniff_inquiryMatthew Wilcox2-10/+0
The SYM_OPT_SNIFF_INQUIRY define is never set any more, and the sym_sniff_inquiry() function doesn't exist From: Christoph Hellwig <hch@lst.de> Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] sym2: Remove FreeBSD ifdefsMatthew Wilcox2-16/+0
Remove FreeBSD ifdefs from sym2 driver Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] qla2xxx: Resync with latest released ISP24xx firmware -- 4.00.16.Andrew Vasquez1-0/+12376
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] qla2xxx: Add support for embedded ISP24xx firmware.Andrew Vasquez4-55/+202
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] qla2xxx: Add full firmware(-request) hotplug support for all ISPs.Andrew Vasquez7-98/+348
Transition driver to exclusively use the request_firmware() interfaces to retrieve firmware-blobs from user-space. This will be the default behaviour going forward until the embedded firmware-binary images are removed from the upstream kernel. Upon request, the driver caches the firmware image until the driver is unloaded. NOTE: The option is present to allow the user to continue to use the firmware-loader modules, but, should be considered deprecated. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Rejections fixed up and Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] scsi_lib: stricter checks for clearing use_10_for_rwJens Axboe1-1/+2
Check the asc and ascq for being "invalid command opcode" as well. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] Delete trailing full stopMatthew Wilcox1-1/+1
None of the other domain validation messages have a trailing full stop, so I don't see why this one should. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] Mark some core scsi data structures constArjan van de Ven8-21/+21
patch below marks a few scsi core datastructures as const, so that they end up in the .rodata section and don't cacheline share with things that get dirtied Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] ipr: Driver initialization fix for kexec/kdumpbrking@us.ibm.com2-3/+19
When kexec booting a kernel when the previous kernel did not call ipr's shutdown method, the ipr adapter does not get properly initialized, which can result in the ipr adapter completing commands issued by the previous kernel. Fix ipr to detect this scenario by reading the adapter's interrupt mask register and the microprocessor interrupt register. If the interrupt mask register indicates that interrupts are enabled or the reset alert bit is set when the card is probed, this means the card is in an unknown state and we hard reset the card. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] megaraid_{mbox,mm} : remove PCI Id overlaping between megaraid_legacy ↵Ju, Seokmann3-77/+11
and megaraid_{mbox,mm} Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] megaraid_legacy: removed PCI ID overlap from the driv erJu, Seokmann1-18/+9
This patch fixes - PCI ID overlap issue - node name changed to 'megaraid_legacy' I hope this patch addresses concerns brought by Daniel Drake. Signed-off by: Seokmann Ju <seokmann.ju@enginio.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] Negotiate correctly with async-only devicesMatthew Wilcox1-2/+2
When we got a device only capable of async, we would zero out goal->period which would cause us to try PPR negotiations. Leave goal->period alone, and check goal->offset before doing PPR. Kudos to Daniel Forsgren for figuring this out. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13Merge branch 'upstream-fixes'Jeff Garzik4-10/+15
2005-12-13[libata] mark certain hardware (or drivers) with a no-atapi flagJeff Garzik4-10/+15
Some hardware does not support the PACKET command at all. Other hardware supports ATAPI, but the driver does something nasty such as calling BUG() when an ATAPI command is issued. For these such cases, we mark them with a new flag, ATA_FLAG_NO_ATAPI. Initial version contributed by Ben Collins.
2005-12-13[PATCH] libata: remove unused qc->waitingTejun Heo1-12/+2
There is no user of qc->waiting left after ata_exec_internal() changes. Kill the field. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-13[PATCH] libata: remove unused functionsTejun Heo2-30/+0
There is no user of ata_qc_wait_err() and ata_qc_complete_noop() after ata_exec_internal() changes. Remove unused functions. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-13[PATCH] libata: use ata_exec_internal()Tejun Heo1-101/+44
This patch converts all users of libata internal commands to use ata_exec_internal(). Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-13[PATCH] libata: implement ata_exec_internal()Tejun Heo1-0/+99
This patch implements ata_exec_internal() function which performs libata internal command execution. Previously, this was done by each user by manually initializing a qc, issueing it, waiting for its completion and handling errors. In addition to obvious code factoring, using ata_exec_internal() fixes the following bugs. * qc not freed on issue failure * ap->qactive clearing could race with the next internal command * race between timeout handling and irq * ignoring error condition not represented in tf->status Also, qc & hardware are not accessed anymore once it's completed, making internal commands more conformant with general semantics. ata_exec_internal() also makes it easy to issue internal commands from multiple threads if that becomes necessary. This patch only implements ata_exec_internal(). A following patch will convert all users. Signed-off-by: Tejun Heo <htejun@gmail.com> -- Jeff, all patches have been regenerated against upstream branch as of today. (575ab52a218e4ff0667a6cbd972c3af443ee8713) Also, I took out a debug printk from ata_exec_internal (don't know how that one got left there). Other than that, all patches are identical to the previous posting. Thanks. :-) Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-12Merge branch 'upstream-fixes'Jeff Garzik1-2/+2
2005-12-12[PATCH] libata: ata_piix 450NX errataAlan Cox1-1/+43
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-12[PATCH] libata-core.c: fix parameter bug on kunmap_atomic() callsMark Lord1-2/+2
Fix incorrect pointer usage on two calls to kunmap_atomic(). This seems to happen a lot, because kunmap() wants the struct page *, whereas kunmap_atomic() instead wants the mapped virtual address. Signed-off-by: Mark Lord <liml@rtr.ca> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-12Merge branch 'master'Jeff Garzik2-4/+8
2005-12-12[PATCH] Fix SCSI scanning slab corruptionBrian King1-3/+0
There is a double free in the scsi scan code if a LLDD's slave_alloc() call fails. There is a direct call to scsi_free_queue and then the following put_device calls the release function, which also frees the queue. Remove the redundant scsi_free_queue. Signed-off-by: Brian King <brking@us.ibm.com> Tested-by: Nathan Lynch <ntl@pobox.com> [ Also removed some strange whitespace artifacts in that area ] Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-12[PATCH] libata: add ata_piix notesAlan Cox1-0/+43
Ok lets start with the 'easy' stuff. This includes my research and summary of chip errata into the new driver so that people can refer to it when updating ata_piix. No code changes Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-12[SCSI] fix double free of scsi request queueBrian King1-1/+0
Current scsi scanning code appears to have a use after free bug is a LLDD's slave_alloc fails. Remove the redundant scsi_free_queue. Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-12Revert revert of "[SCSI] fix usb storage oops"Linus Torvalds1-1/+8
This reverts commit 1b0997f561bf46689cc6e0903f342e9bf2506bf1, which in turn reverted 34ea80ec6a02ad02e6b9c75c478c18e5880d6713 (which is thus re-instated). Quoth James Bottomley: "All it's doing is deferring the device_put() from the scsi_put_command() to after the scsi_run_queue(), which doesn't fix the sleep while atomic problem of the device release method. In both cases we still get the semaphore in atomic context problem which is caused by scsi_reap_target() doing a device_del(), which I assumed (wrongly) was valid from atomic context." who also promised to fix scsi_reap_target(). Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-09[SCSI] fix panic when ejecting ieee1394 ipodJens Axboe1-4/+4
The scsi_library routines don't correctly set DMA_NONE when req->data_len is zero (instead they check the command type first, so if it's write, we end up with req->data_len == 0 and direction as DMA_TO_DEVICE which confuses some drivers) Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-08[SCSI] fix OOPS due to clearing eh_action prior to aborting eh commandMichael Reed1-1/+6
The eh_action semaphore in scsi_eh_send_command is cleared after a command timeout. The command is subsequently aborted and the abort will try to call scsi_done() on it. Unfortunately, the scsi_eh_done() routine unconditinally completes the semaphore (which is now null). Fix this race by makiong the scsi_eh_done() routine check that the semaphore is non null before completing it (mirroring the ordinary command done/timeout logic). Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-08[SCSI] Fix incorrect pointer in megaraid.c MODE_SENSE emulationMark Lord1-1/+1
The SCSI megaraid drive goes to great effort to kmap the scatterlist buffer (if used), but then uses the wrong pointer when copying to it afterward. Signed-off-by: Mark Lord <lkml@rtr.ca> Acked by: Ju, Seokmann <Seokmann.Ju@engenio.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-07[SCSI] qla2xxx: Correct short-WRITE status handling.Andrew Vasquez1-0/+15
Properly check FC_RESID for any non-transfered bytes regardless of firmware completion status. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-07[SCSI] qla2xxx: Correct mis-handling of AENs.Andrew Vasquez2-12/+4
A regression in a recent change 33135aa2a568ec1a30e734f18e5315e10516e4f3 caused the driver to mistakenly drop handling of AENs. Due to the incorrect handling, ports would not reappear after RSCNs and LIPs. Drops unused/incorrect compound #define from qla_def.h. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-07[SCSI] ibmvscsi kexec fixDave C Boutcher3-3/+10
This makes ibmvscsi work correctly with the recent set of kexec patches that went in. This is based on work by Michael Ellerman, who chased this initially. He validated that it works during kexec. Handle kexec correctly in ibmvscsi. During kexec the adapter will not get cleaned up correctly, so we may need to reset it to make it sane again. Signed-off-by: Dave Boutcher <sleddog@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-06[PATCH] libata: err_mask misc fixAlbert Lee1-5/+13
1. ata_pio_complete(): It seems unnecessary to wait for the clearing of the DRQ bit. (Waiting for BSY=0 should be enough. ata_ok() also checks the correctness of the status bits later.) 2. ata_pio_block(): - added error checking, before transfering data. - minor comments fix Signed-off-by: Albert Lee <albertcc@tw.ibm.com> ============ Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-06[PATCH] libata: determine the err_mask directly in atapi_packet_task()Albert Lee1-6/+7
- set qc->err_mask directly when we found the error - remove the code to determine err_mask from device status Signed-off-by: Albert Lee <albertcc@tw.ibm.com> ============ Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-06[PATCH] libata: determine the err_mask when the error is foundAlbert Lee1-1/+9
- move "qc->err_mask |= AC_ERR_ATA_BUS" to where the error is found - add "assert(qc->err_mask)" to ata_pio_error() to make sure qc->err_mask was available when we enter the error state Signed-off-by: Albert Lee <albertcc@tw.ibm.com> ============ Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-06[PATCH] libata: move err_mask to ata_queued_cmdAlbert Lee10-54/+81
- remove err_mask from the parameter list of the complete functions - move err_mask to ata_queued_cmd - initialize qc->err_mask when needed - for each function call to ata_qc_complete(), replace the err_mask parameter with qc->err_mask. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> =============== Signed-off-by: Jeff Garzik <jgarzik@pobox.com>