summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-11-24esp_scsi: debug event and commandHannes Reinecke
Add new debug definitions for event and command logging. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-24esp_scsi: convert to dev_printkHannes Reinecke
Use dev_printk functions for correct device annotations. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-24esp_scsi: make number of tags configurableHannes Reinecke
Add a field 'num_tags' to the esp structure to allow drivers to overwrite the number of avialable tags if required. Default is ESP_DEFAULT_TAGS. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-24esp_scsi: spellcheck 'driver'Hannes Reinecke
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-24vmw_pscsi: simplify ->change_queue_depthChristoph Hellwig
Remove overly verbose debugging output that pokes into mid-layer internal structures that looks like copy & paste from the mpt2/3 drivers. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Hannes Reinecke <hare@suse.de>
2014-11-24mpt3sas: simplify ->change_queue_depthChristoph Hellwig
Merge two functions, and remove overly verbose debugging output that pokes into mid-layer internal structures. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Hannes Reinecke <hare@suse.de>
2014-11-24mpt2sas: simplify ->change_queue_depthChristoph Hellwig
Merge two functions, and remove overly verbose debugging output that pokes into mid-layer internal structures. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Hannes Reinecke <hare@suse.de>
2014-11-24scsi: drop reason argument from ->change_queue_depthChristoph Hellwig
Drop the now unused reason argument from the ->change_queue_depth method. Also add a return value to scsi_adjust_queue_depth, and rename it to scsi_change_queue_depth now that it can be used as the default ->change_queue_depth implementation. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Hannes Reinecke <hare@suse.de>
2014-11-24scsi: don't allow setting of queue_depth bigger than can_queueChristoph Hellwig
We won't ever queue more commands than the host allows. Instead of letting drivers either reject or ignore this case handle it in common code. Note that various driver use internal constant or variables that are assigned to both shost->can_queue and checked in ->change_queue_depth - I did remove those checks as well. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Hannes Reinecke <hare@suse.de>
2014-11-24scsi: avoid ->change_queue_depth indirection for queue full trackingChristoph Hellwig
All drivers use the implementation for ramping the queue up and down, so instead of overloading the change_queue_depth method call the implementation diretly if the driver opts into it by setting the track_queue_depth flag in the host template. Note that a few drivers validated the new queue depth in their change_queue_depth method, but as we never go over the queue depth set during slave_configure or the sysfs file this isn't nessecary and can safely be removed. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Venkatesh Srinivas <venkateshs@google.com>
2014-11-24lpfc: remove queue_depth eventsChristoph Hellwig
James Smart said the userspace to consume these events never emerged. Given that these get in the way of the following patches remove support for them. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Hannes Reinecke <hare@suse.de> Acked-by: James Smart <james.smart@emulex.com>
2014-11-24megaraid_sas: do not process IOCTLs and SCSI commands during driver removalSumit.Saxena@avagotech.com
Do not process any SCSI and IOCTL command further (return them with appropriate return values to callers), while driver removal is in progress or PCI shutdown is invoked. Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com> Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-24megaraid_sas: dndinaness related bug fixesSumit.Saxena@avagotech.com
This patch addresses few endianness related bug fixes. Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com> Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Cc: <stable@vger.kernel.org> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-24megaraid_sas: corrected return of wait_event from abort frame pathSumit.Saxena@avagotech.com
Corrected wait_event() call which was waiting for wrong completion status (0xFF). Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com> Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Cc: <stable@vger.kernel.org> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-24megaraid_sas: make HBA operational after LD_MAP_SYNC DCMD in OCR pathSumit.Saxena@avagotech.com
In OCR(Online Controller Reset) path, driver sets adapter state to MEGASAS_HBA_OPERATIONAL before getting new RAID map. There will be a small window where IO will come from OS with old RAID map. This patch will update adapter state to MEGASAS_HBA_OPERATIONAL, only after driver has new RAID map to avoid any IOs getting build using old RAID map. Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com> Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-24megaraid_sas: online Firmware upgrade support for Extended VD featureSumit.Saxena@avagotech.com
In OCR (Online Controller Reset) path, driver sets adapter state to MEGASAS_HBA_OPERATIONAL before getting new RAID map. There will be a small window where IO will come from OS with old RAID map. This patch will update adapter state to MEGASAS_HBA_OPERATIONAL, only after driver has new RAID map to avoid any IOs getting build using old RAID map. Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com> Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-24megaraid_sas: update MAINTAINERS and copyright information for megaraid driversSumit.Saxena@avagotech.com
Update MAINTAINERS list and copyright information for megaraid_sas driver. Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-24megaraid_sas: driver version upgrade and remove some meta data of driverSumit.Saxena@avagotech.com
Update driver version and remove some meta data (release date and extended version) about megaraid_sas driver. Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20zfcp: auto port scan resiliencyMartin Peschke
This patch improves the Fibre Channel port scan behaviour of the zfcp lldd. Without it the zfcp device driver may churn up the storage area network by excessive scanning and scan bursts, particularly in big virtual server environments, potentially resulting in interference of virtual servers and reduced availability of storage connectivity. The two main issues as to the zfcp device drivers automatic port scan in virtual server environments are frequency and simultaneity. On the one hand, there is no point in allowing lots of ports scans in a row. It makes sense, though, to make sure that a scan is conducted eventually if there has been any indication for potential SAN changes. On the other hand, lots of virtual servers receiving the same indication for a SAN change had better not attempt to conduct a scan instantly, that is, at the same time. Hence this patch has a two-fold approach for better port scanning: the introduction of a rate limit to amend frequency issues, and the introduction of a short random backoff to amend simultaneity issues. Both approaches boil down to deferred port scans, with delays comprising parts for both approaches. The new port scan behaviour is summarised best by: NEW: NEW: no_auto_port_rescan random rate flush backoff limit =wait adapter resume/thaw yes yes no yes* adapter online (user) no yes no yes* port rescan (user) no no no yes adapter recovery (user) yes yes yes no adapter recovery (other) yes yes yes no incoming ELS yes yes yes no incoming ELS lost yes yes yes no Implementation is straight-forward by converting an existing worker to a delayed worker. But care is needed whenever that worker is going to be flushed (in order to make sure work has been completed), since a flush operation cancels the timer set up for deferred execution (see * above). There is a small race window whenever a port scan work starts running up to the point in time of storing the time stamp for that port scan. The impact is negligible. Closing that gap isn't trivial, though, and would the destroy the beauty of a simple work-to-delayed-work conversion. Signed-off-by: Martin Peschke <mpeschke@linux.vnet.ibm.com> Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20zfcp: bring back unit sysfs attributes for automatic LUN scanSteffen Maier
Through sysfs attributes, zfcp unit objects provide a trigger for manual LUN recovery and export information for problem determination. With commit f8210e34887e1feb977a9b6b8caa086855af40c9 "[SCSI] zfcp: Allow midlayer to scan for LUNs when running in NPIV mode" and when attaching SCSI devices through this new optional method, no more zfcp unit objects are allocated for such SCSI devices. Hence, the above-mentioned trigger and information were missing. The information and context is located in SCSI transport device data since b62a8d9b45b971a67a0f8413338c230e3117dff5 "[SCSI] zfcp: Use SCSI device data zfcp_scsi_dev instead of zfcp_unit" 57c237731b92fadc7d44824276313ec330b1989b "[SCSI] zfcp: Add zfcp private struct as SCSI device driver data" Hence, introduce the trigger and the information unconditionally for all SCSI devices attached through zfcp. We prefix the attribute names with 'zfcp_' to prevent collisions and to avoid mix-ups such as with the common 'state' attribute. Since some of the new attribute views do not need zfcp_port in the ZFCP_DEFINE_SCSI_ATTR helper macro, remove zfcp_port to avoid compiler warnings on unused variable. It's easy to open code the conversion from zfcp_scsi_dev to zfcp_port for the two already existing attributes hba_id and wwpn. Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com> Reviewed-by: Martin Peschke <mpeschke@linux.vnet.ibm.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20bfa: replace 2 kzalloc/copy_from_user by memdup_userFabian Frederick
This patch also removes unnecessary printk(KERN_INFO Signed-off-by: Fabian Frederick <fabf@skynet.be> Acked-by: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20zfcp: remove access control tables interface (port leftovers)Martin Peschke
This patch removes some leftovers for commit 663e0890e31cb85f0cca5ac1faaee0d2d52880b5 "[SCSI] zfcp: remove access control tables interface". The "access denied" case for ports is gone, as well. The corresponding flag was cleared, but never set. So clean it up. Sysfs flag is kept, though, for backward-compatibility. Now it returns always 0. Signed-off-by: Martin Peschke <mpeschke@linux.vnet.ibm.com> Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20virtio_scsi: support multi hw queue of blk-mqMing Lei
Since virtio_scsi has supported multi virtqueue already, it is natural to map the virtque to hw-queue of blk-mq. Signed-off-by: Ming Lei <ming.lei@canonical.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20hpsa: remove spin lock around command allocationStephen M. Cameron
It is already using atomic test_and_set_bit to do the allocation. There is some microscopic chance of starvation, but it is so microscopic that it should never happen in reality. Signed-off-by: Don Brace <don.brace@pmcs.com> Reviewed-by: Webb Scales <webbnh@hp.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20hpsa: always call pci_set_master after pci_enable_deviceRobert Elliott
If the kernel is booted with the reset_device parameter, which is done for kdump, then the driver needs to call pci_set_master after pci_enable_device to reenable bus mastering (since the preceding pci_disable_device call disables bus mastering). Also, place that after pci_request_regions both in the kdump code and the normal pci_init code. Remove the comment summarizing what pci_set_master does, with the incomplete commentary on the impact of pci_disable_device. Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Reviewed-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20hpsa: Convert SCSI LLD ->queuecommand() for host_lock less operationNicholas Bellinger
There isn't anything in hpsa that requires the host lock to be held during queuecommand. Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> Reviewed-by: Stephen M. Cameron <stephenmcameron@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20hpsa: do not be so noisy about check conditionsStephen M. Cameron
We were printing a lot of useless information before ultimately just passing things up to the SCSI mid layer. Just let the midlayer handle it without LLD chatter. Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com> Reviewed-by: Joe Handzik <joseph.t.handzik@hp.com> Reviewed-by: Scott Teel <scott.teel@hp.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20hpsa: use atomics for commands_outstandingStephen M. Cameron
Use atomics for commands_outstanding instead of protecting with spin locks. Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com> Reviewed-by: Joe Handzik <joseph.t.handzik@hp.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20hpsa: get rid of type/attribute/direction bit field where possibleStephen M. Cameron
Using bit fields for hardware command fields isn't portable and relies on assumptions about how the compiler lays out the bits. We can fix this in the driver's internal command structure, but the ioctl interface we can't change because it is part of the userland ABI. Signed-off-by: Don Brace <don.brace@pmcs.com> Reviewed-by: Webb Scales <webb.scales@hp.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20hpsa: fix endianness issue with scatter gather elementsStephen M. Cameron
The hardware needs little endian scatter gather addresses and lengths but we were not bothering to convert from cpu byte order as we should have been. On Intel, this is all just a bunch of no-ops macros, but it makes the code endian-clean(er). Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Reviewed-by: Webb Scales <webbnh@hp.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20hpsa: fix allocation sizes for CISS_REPORT_LUNs commandsStephen M. Cameron
We were allocating roughly double the amount of memory we should be due to ReportLUNdata and ExtendedReportLUNdata containing a non-zero sized array but adding extra memory to allocate as if the array were zero sized. Track the logical and physical sizes separately. Allocate the memory based on the specific data structure sizes. Signed-off-by: Don Brace <don.brace@pmcs.com> Reviewed-by: Webb Scales <webb.scales@hp.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20hpsa: remove 'action required' phrasingStephen M. Cameron
In the case of LUN data changing, the driver will auto rescan and so it's not even true that "action" is "required". Remove "action required" phrases from warning messages and replace with description phrases. Signed-off-by: Don Brace <don.brace@pmcs.com> Reviewed-by: Stephen M. Cameron <stephenmcameron@gmail.com> Reviewed-by: Joe Handzik <joseph.t.handzik@hp.com> Reviewed-by: Webb Scales <webb.scales@hp.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20hpsa: correct off-by-one sizing of chained SG blockWebb Scales
Correct the size calculation of the chained SG block Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Webb Scales <webbnh@hp.com> Reviewed-by: Stephen M. Cameron <stephenmcameron@gmail.com> Reviewed-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20hpsa: fix a couple pci id table mistakesStephen M. Cameron
Fix a couple of pci id table mistakes: Subdevice ID 0x3323 missing from product[] table (another name for HP Smart Storage 1210m) Bogus 0x1925 subdevice id removed from hpsa_pci_device_id[] (no such thing.) Signed-off-by: Don Brace <don.brace@pmcs.com> Reviewed-by: Webb Scales <webbnh@hp.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20hpsa: remove dev_warn prints from RAID-1ADMRobert Elliott
RAID-1ADM is unusable with dev_warn called on every command. Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Reviewed-by: Stephen M. Cameron <stephenmcameron@gmail.com> Reviewed-by: Webb Scales <webbnh@hp.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20hpsa: Clean up warnings from sparse.Don Brace
Clean up issues reported when running sparse. Signed-off-by: Don Brace <don.brace@pmcs.com> Reviewed-by: Webb Scales <webb.scales@hp.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20atari_NCR5380: Fix "transfered" typoFinn Thain
Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20atari_NCR5380: Remove RESET_RUN_DONE macroFinn Thain
There's no need to run the cmd->done callback for aborted commands. Remove the old EH code and the RESET_RUN_DONE macro. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Hannes Reinecke <hare@suse.de> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20atari_NCR5380: Move static co-routine variables to host dataFinn Thain
Unlike NCR5380.c, the atari_NCR5380.c core driver is limited to a single instance because co-routine state is stored globally. Fix this by removing the static scsi host pointer. For the co-routine, obtain this pointer from the work_struct pointer instead. For the interrupt handler, obtain it from the dev_id argument. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Hannes Reinecke <hare@suse.de> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20atari_NCR5380: Move static TagAlloc array to host dataFinn Thain
The atari_NCR5380.c core driver keeps some per-host data in a static variable which limits the driver to a single instance. Fix this by moving TagAlloc to the hostdata struct. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Hannes Reinecke <hare@suse.de> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20atari_NCR5380: Introduce FLAG_TAGGED_QUEUINGFinn Thain
The static variable setup_use_tagged_queuing is declared in mac_scsi.c, sun3_scsi.c and atari_scsi.c and doesn't belong in the core driver. None of the other NCR5380 drivers suffer from this layering issue which makes merging the core drivers more difficult and will likely hinder plans for future use of platform data to configure the driver. Replace the static variable with a host flag. This way it can be reported along with the other flags. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Hannes Reinecke <hare@suse.de> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20atari_NCR5380: Merge from NCR5380.cFinn Thain
The NCR5380.c core driver has moved on since the atari_NCR5380.c fork. Some of those changes are also relevant to atari_NCR5380.c so apply them there as well. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Hannes Reinecke <hare@suse.de> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20sun3_scsi: Adopt atari_NCR5380 core driver and remove sun3_NCR5380.cFinn Thain
Given the preceding changes to atari_NCR5380.c, this patch should not change behaviour of the sun3_scsi and sun3_scsi_vme modules. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20atari_NCR5380: Merge from sun3_NCR5380.cFinn Thain
There is very little difference between the sun3_NCR5380.c core driver and atari_NCR5380.c. The former is a fork of the latter. Merge the sun3_NCR5380.c core driver into atari_NCR5380.c so that sun3_scsi.c can adopt the latter and the former can be deleted. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Hannes Reinecke <hare@suse.de> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20atari_NCR5380: Refactor Falcon lockingFinn Thain
Simplify falcon_release_lock_if_possible() by making callers responsible for disabling local IRQ's, which they must do anyway to correctly synchronize the ST DMA "lock" with core driver data structures. Move this synchronization logic to the core driver with which it is tightly coupled. Other LLD's like sun3_scsi and mac_scsi that can make use of this core driver can just stub out the NCR5380_acquire_dma_irq() and NCR5380_release_dma_irq() calls so the compiler will eliminate the ST DMA code. Remove a redundant local_irq_save/restore pair (irq's are disabled for interrupt handlers these days). Revise the locking for atari_scsi_bus_reset(): use local_irq_save/restore() instead of atari_turnoff/turnon_irq(). There is no guarantee that atari_scsi still holds the ST DMA lock during EH, so atari_turnoff/turnon_irq() could end up dropping an IDE or floppy interrupt. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20atari_NCR5380: Refactor Falcon special casesFinn Thain
Make the atari_NCR5380.c core driver usable by sun3_scsi, mac_scsi and others by moving some of the Falcon-specific code out of the core driver: !IS_A_TT, atari_read_overruns and falcon_dont_release. Replace these with hostdata variables and flags. FLAG_CHECK_LAST_BYTE_SENT is unused in atari_NCR5380.c so don't set it. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Hannes Reinecke <hare@suse.de> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20ncr5380: Remove ENABLE_IRQ/DISABLE_IRQ macrosFinn Thain
atari_NCR5380.c enables its IRQ when it is already enabled. Sun3 doesn't use the ENABLE_IRQ/DISABLE_IRQ cruft. Remove it. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Hannes Reinecke <hare@suse.de> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20sun3_scsi: Move macro definitionsFinn Thain
The #defines in sun3_scsi.h are intended to influence subsequent #includes in sun3_scsi.c. IMHO, that's too convoluted. Move sun3_scsi.h macro definitions to sun3_scsi.c, consistent with other NCR5380 drivers. Omit the unused NCR5380_local_declare() and NCR5380_setup() macros. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20sun3_scsi: Convert to platform deviceFinn Thain
Convert sun3_scsi to platform device and eliminate scsi_register(). Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Hannes Reinecke <hare@suse.de> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20atari_scsi: Remove headerFinn Thain
The #defines in atari_scsi.h are intended to influence subsequent #includes in atari_scsi.c. IMHO, that's too convoluted. Remove atari_scsi.h by moving those macro definitions to atari_scsi.c, consistent with other NCR5380 drivers. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Hannes Reinecke <hare@suse.de> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>