aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/qdio_main.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-10-07s390/qdio: fix WARN_ON_ONCE conditionEugene Crosser1-2/+2
If HiperSockets Completion Queueing is enabled, qdio always issues a warning, since the condition is always met. This patch fixes the condition in WARN_ON_ONCE that was always true. Signed-off-by: Eugene Crosser <Eugene.Crosser@ru.ibm.com> Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-16qdio: Keep device-specific dbf entriesStefan Raspl1-5/+4
Keep the per-device dbf entries until module is removed, with proper error checking for debug feature setup. Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com> Reviewed-by: Steffen Maier <maier@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2014-06-10s390/qdio: replace shift loop by ilog2Fabian Frederick1-4/+3
account_sbals is called by get_inbound_buffer_frontier and get_outbound_buffer_frontier with 'count' value > 0 so we can safely convert shift loop to ilog2. Cc: Joe Perches <joe@perches.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2014-01-29s390/qdio: correct program-controlled interruption checkingUrsula Braun1-1/+1
Get rid of compile warning in qdio_int_handler_pci() when checking for program-controlled interruption on outbound queues. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2014-01-14s390/qdio: bridgeport support - CHSC partEugene Crosser1-0/+91
Introduce function for the "Perform network-subchannel operation" CHSC command with operation code "bridgeport information", and bit definitions for "characteristics" pertaning to this command. Signed-off-by: Eugene Crosser <eugene.crosser@ru.ibm.com> Reviewed-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-10-24s390/qdio: fix atomic_sub() misusageHeiko Carstens1-1/+1
get_inbound_buffer_frontier() makes use of the return value of atomic_sub() which shouldn't work, since atomic_sub() is supposed to return void. This only works on s390 because atomic_sub() gets mapped to atomic_sub_return() with a define without changing it's return value to void. So use atomic_sub_return() instead of atomic_sub() in qeth code before fixing atomic ops. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-10-22s390/time: correct use of store clock fastMartin Schwidefsky1-5/+5
The result of the store-clock-fast (STCKF) instruction is a bit fuzzy. It can happen that the value stored on one CPU is smaller than the value stored on another CPU, although the order of the stores is the other way around. This can cause deltas of get_tod_clock() values to become negative when they should not be. We need to be more careful with store-clock-fast, this patch partially reverts git commit e4b7b4238e666682555461fa52eecd74652f36bb "time: always use stckf instead of stck if available". The get_tod_clock() function now uses the store-clock-extended (STCKE) instruction. get_tod_clock_fast() can be used if the fuzziness of store-clock-fast is acceptable e.g. for wait loops local to a CPU. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-07-16s390/qdio: remove unused variableSebastian Ott1-2/+2
Fix a "set but not used" warning found via make W=1. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-06-26s390/qdio: remove unused functionSebastian Ott1-44/+0
Remove the unused function qdio_trace_aob. Acked-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-02-28qdio: remove unused parametersStefan Raspl1-1/+1
Remove unused function parameters. Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-02-14s390/time: rename tod clock access functionsHeiko Carstens1-6/+6
Fix name clash with some common code device drivers and add "tod" to all tod clock access function names. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-11-23s390/qdio: rework BUG's and WARN_ON'sJan Glauber1-41/+11
Remove or replace BUG/BUG_ON where possible and convert WARN_ON to WARN_ON_ONCE if they can occur freqeuently as pointed out by: https://lkml.org/lkml/2012/9/27/461 Checks have been removed if: - the error condition leads to a hardware error which gets logged and in most cases stops the device - the error condition is a null pointer access - the error condition is just pointless or already handled at another location Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-07-20s390/comments: unify copyright messages and remove file namesHeiko Carstens1-3/+1
Remove the file name from the comment at top of many files. In most cases the file name was wrong anyway, so it's rather pointless. Also unify the IBM copyright statement. We did have a lot of sightly different statements and wanted to change them one after another whenever a file gets touched. However that never happened. Instead people start to take the old/"wrong" statements to use as a template for new files. So unify all of them in one go. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2012-05-16s390/time: always use stckf instead of stck if availableHeiko Carstens1-2/+2
The store clock fast instruction saves a couple of instructions compared to the store clock instruction. Always use stckf instead of stck if it is available. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Reviewed-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-05-16s390/qdio: Cleanup error handling to driversJan Glauber1-21/+22
Various improvements of qdio error reporting to the upper-layer drivers (qeth, zfcp): - Split QDIO_ERROR_ACTIVATE_CHECK_CONDITION into: QDIO_ERROR_ACTIVATE: qdio termination interrupt QDIO_ERROR_GET_BUF_STATE: QIOASSIST eqbs error QDIO_ERROR_SET_BUF_STATE: QIOASSIST sqbs error Add QDIO_ERROR_FATAL / QDIO_ERROR_TEMPORARY masks to ease recovery decision in upper-layer drivers. - Don't (ab-)use qdio handler errors as return codes for do_QDIO but use standard error codes: -ENOBUFS: temporary target CC=2 condition -EBUSY: unresolved SIGA-W CC=2 busy condition -EIO: I/O error (CC=1, CC=3) - Remove unneeded memory clobber from SIGA-R - Remove EX_TABLE entry on SIGA-W, we want to see these errors Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-03-23[S390] qdio: log all adapter characteristicsJan Glauber1-1/+0
Log all adapter characteristics in the s390dbf to ease debugging of new features. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Reported-by: Raymond Higgs <rayhiggs@us.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-03-11[S390] kernel: Add z/VM LGR detectionMichael Holzheu1-0/+6
Currently the following mechanisms are available to move active Linux on System z instances between machines: * z/VM 6.2 SSI (Single System Image) * Suspend/resume For moving Linux instances in this patch the term LGR (Linux Guest Relocation) is used. Because such an operation is critical, it should be detectable from Linux. With this patch for both, a live system and a kernel dump, the information about LGRs is accessible. To identify a guest, stsi and stfle data is used. A new function lgr_info_log() compares the current data (lgr_info_cur) with the last recorded one (lgr_info_last). In case the two data sets differ, lgr_info_cur is logged to the "lgr" s390dbf. The following trigger points call lgr_info_log(): * panic * die * kdump * LGR timer * PSW restart * QDIO recovery * resume This patch also changes the s390dbf hex_ascii view. Now only printable ASCII characters are shown. Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-03-02[S390] qdio: fix handler function arguments for zfcp data routerSteffen Maier1-2/+2
Git commit 25f269f17316549e "[S390] qdio: EQBS retry after CCQ 96" introduced a regression in regard to the zfcp data router. Revoke the incorrect simplification of the function call arguments for the qdio handler to make the zfcp hardware data router working again. This is applicable to 3.2+ kernels. Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com> Reviewed-by: Jan Glauber <jang@linux.vnet.ibm.com> Cc: <stable@vger.kernel.org> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-10-30[S390] qdio: prevent dsci access without adapter interruptsJan Glauber1-4/+2
A kernel panic may occur during sending or receiving network packets on a machine without adapter interrupts since commit d36deae. The bug is triggered by writing to the shared indicator address which is set to 0 if the machine doesn't have adapter interrupts. Make the reading and setting of the shared indicator dependent on the adapter interrupt feature and while at it move the code to the file containing the adapter interrupt related code. Thanks to Jan Jaeger for tracking this down. Reported-by: Jan Jaeger <jan.jaeger@westnet.com.au> Tested-by: Jan Jaeger <jan.jaeger@westnet.com.au> Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-10-30[S390] sparse: fix sparse static warningsMartin Schwidefsky1-1/+1
Make functions and data static to avoid sparse warnings. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-10-30[S390] qdio: remove multicast pollingJan Glauber1-4/+0
The multicast poll check for the outbound queue is redundant since 3d6c76f "[S390] qdio: outbound tasklet scan threshold". Remove the check. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-10-30[S390] qdio: reset outbound SBAL error statesJan Glauber1-1/+2
Don't leave outbound SBALs in error state after a target full condition. Reset the state to not initialized to make the error handling consistent across all types of errors. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-10-30[S390] qdio: EQBS retry after CCQ 96Jan Glauber1-40/+41
Running under z/VM with QIOASSIST enabled, qdio queues could stall if EQBS did not extract all SBAL states. Add an instant retry for EQBS and, if the retry fails, set up a timer to ensure outstanding SBALs are processed later. While at it, optimize qdio_do_eqbs and qdio_do_sqbs to eliminate 3 jumps on the hot path. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-10-30[S390] qdio: add timestamp for last queue scan timeJan Glauber1-0/+4
Add a timestamp per queue and update the timestamp when the queue is scanned. Add the queue timestamps and the timestamp of the last adapter interrupt to the debugfs output. The timestamps are useful for debugging stall conditions. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-10-30[S390] fix mismatch in summation of I/O IRQ statisticsPeter Oberparleiter1-2/+0
Current IRQ statistics support does not show detail counts for I/O interrupts which are processed internally only. The result is a summation count which is way off such as this one: CPU0 CPU1 CPU2 I/O: 1331 710 442 [...] QAI: 15 16 16 [I/O] QDIO Adapter Interrupt QDI: 1 0 0 [I/O] QDIO Interrupt DAS: 706 645 381 [I/O] DASD C15: 26 10 0 [I/O] 3215 C70: 0 0 0 [I/O] 3270 TAP: 0 0 0 [I/O] Tape VMR: 0 0 0 [I/O] Unit Record Devices LCS: 0 0 0 [I/O] LCS CLW: 0 0 0 [I/O] CLAW CTC: 0 0 0 [I/O] CTC APB: 0 0 0 [I/O] AP Bus Fix this by moving I/O interrupt accounting into the common I/O layer. Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-10-28Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6Linus Torvalds1-3/+8
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (204 commits) [SCSI] qla4xxx: export address/port of connection (fix udev disk names) [SCSI] ipr: Fix BUG on adapter dump timeout [SCSI] megaraid_sas: Fix instance access in megasas_reset_timer [SCSI] hpsa: change confusing message to be more clear [SCSI] iscsi class: fix vlan configuration [SCSI] qla4xxx: fix data alignment and use nl helpers [SCSI] iscsi class: fix link local mispelling [SCSI] iscsi class: Replace iscsi_get_next_target_id with IDA [SCSI] aacraid: use lower snprintf() limit [SCSI] lpfc 8.3.27: Change driver version to 8.3.27 [SCSI] lpfc 8.3.27: T10 additions for SLI4 [SCSI] lpfc 8.3.27: Fix queue allocation failure recovery [SCSI] lpfc 8.3.27: Change algorithm for getting physical port name [SCSI] lpfc 8.3.27: Changed worst case mailbox timeout [SCSI] lpfc 8.3.27: Miscellanous logic and interface fixes [SCSI] megaraid_sas: Changelog and version update [SCSI] megaraid_sas: Add driver workaround for PERC5/1068 kdump kernel panic [SCSI] megaraid_sas: Add multiple MSI-X vector/multiple reply queue support [SCSI] megaraid_sas: Add support for MegaRAID 9360/9380 12GB/s controllers [SCSI] megaraid_sas: Clear FUSION_IN_RESET before enabling interrupts ...
2011-08-27[SCSI] qdio: base support for hardware data router with zfcpSwen Schillig1-3/+8
FICON Express8S supports hardware data router, which requires an adapted qdio request format. This part 1/2 provides the qdio base required for exploitation in zfcp. Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-08-13qdio: support forced signal adapter indicationsfrank.blaschka@de.ibm.com1-4/+1
This patch ensures that signal adapter commands are issued if they are indicated to be required. Signed-off-by: Einar Lueck <elelueck@de.ibm.com> Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-13qdio: support asynchronous delivery of storage blocksfrank.blaschka@de.ibm.com1-24/+179
This patch introduces support for asynchronous delivery of storage blocks for Hipersockets. Upper layers may exploit this functionality to reuse SBALs for which the delivery status is still pending. Signed-off-by: Einar Lueck <elelueck@de.ibm.com> Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-03[S390] qdio: 2nd stage retry on SIGA-W busy conditionsJan Glauber1-3/+18
The SIGA-W may return with the busy bit set which means the device was blocked. The busy loop which retries the SIGA-W for 100us may not be long enough when running under a heavily loaded hypervisor. Extend the retry mechanism by adding a longer second stage which retries the SIGA-W for up to 10s. In difference to the first retry loop the second stage is using mdelay to stop the cpu between the retries and thereby avoid additional preassure in on the hypervisor. If the second stage retry is successfull a device reset is avoided. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2011-07-26atomic: use <linux/atomic.h>Arun Sharma1-1/+1
This allows us to move duplicated code in <asm/atomic.h> (atomic_inc_not_zero() for now) to <linux/atomic.h> Signed-off-by: Arun Sharma <asharma@fb.com> Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: David Miller <davem@davemloft.net> Cc: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-06-06[S390] qdio: Split SBAL entry flagsJan Glauber1-3/+3
The qdio SBAL entry flag is made-up of four different values that are independent of one another. Some of the bits are reserved by the hardware and should not be changed by qdio. Currently all four values are overwritten since the SBAL entry flag is defined as an u32. Split the SBAL entry flag into four u8's as defined by the hardware and don't touch the reserved bits. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-05-23[S390] qdio: prevent compile warningJan Glauber1-1/+1
Prevent the following compile warning for !CONFIG_64BIT: CC drivers/s390/cio/qdio_main.o drivers/s390/cio/qdio_main.c: In function ‘handle_outbound’: drivers/s390/cio/qdio_main.c:1449: warning: ‘state’ may be used uninitialized in this function Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-04-20[S390] qdio: reset error states immediatelyJan Glauber1-5/+12
The qdio hardware may surpress further interrupts as long as a SBAL is in the error state. That can lead to unnotified data in the SBALs following the error state. To prevent this behaviour change the SBAL[s] in error state immediately to another program owned state so interrupts are again received for further traffic on the device. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-04-04[S390] qdio: fix init sequenceSebastian Ott1-8/+8
Reorder the initialization sequence of the qdio module to avoid writing to an uninitialized debug feature entry. Also reorder the exit function to restore a consistent cleanup path. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-03-23[S390] qdio: prevent handling of buffers if count is zeroJan Glauber1-1/+2
Exit do_QDIO early if the buffer count is zero to prevent side effects in the following functions. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-01-31[S390] qdio: prevent compile warning under CONFIG_32BITJan Glauber1-2/+2
Prevent the following compiler warning if compiling a 31 bit kernel: drivers/s390/cio/qdio_main.c: In function ‘get_outbound_buffer_frontier’: drivers/s390/cio/qdio_main.c:646:16: warning: ‘state’ may be used uninitialized in this function CC lib/radix-tree.o CC drivers/s390/scsi/zfcp_cfdc.o drivers/s390/cio/qdio_main.c: In function ‘qdio_inbound_q_moved’: drivers/s390/cio/qdio_main.c:479:16: warning: ‘state’ may be used uninitialized in this function drivers/s390/cio/qdio_main.c:479:16: note: ‘state’ was declared here Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-01-05[S390] qdio: cleanup SIGA syncJan Glauber1-35/+29
Simplify the SIGA sync code and add unlikely annotations. In polling mode SBALs may be accessed without interrupt, so call SIGA sync before every scan. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-01-05[S390] qdio: remove enhanced SIGAJan Glauber1-42/+15
HiperSocket devices only use one SBAL per qdio call without the enhanced SIGA feature. Since that feature is currently not used remove it from the qdio code so the compiler can generate better code for the HiperSocket outbound path. While at it mark the SIGA error conditions as unlikely. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-01-05[S390] qdio: use proper QEBSM operand for SIGA-R and SIGA-SJan Glauber1-15/+28
If QIOASSIST is enabled for a qdio device the SIGA instruction requires a modified function code. This function code modifier was missing for SIGA-R and SIGA-S which can lead to a kernel panic caused by an operand exception. Cc: stable@kernel.org Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-01-05[S390] qdio: outbound queue full counterJan Glauber1-0/+3
Add a counter for outbound queue full events to the qdio statistics. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-01-05[S390] qdio: outbound tasklet scan thresholdJan Glauber1-1/+7
Introduce a scan treshold for the qdio outbound queues. By setting the threshold the driver can tell qdio after how much used SBALs qdio should schedule the outbound tasklet that scans the queue for finished SBALs. The threshold is specific by the drivers because a Hipersockets device is much faster in utilizing outbound buffers than a ZFCP or OSA device. The default values after how many used SBALs the tasklet should run are: OSA: > 31 SBALs Hipersockets: > 7 SBALs zfcp: > 55 SBALs Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-01-05[S390] qdio: prevent race for shared indicatorsJan Glauber1-2/+2
If the shared indicator is used the following race leads to an inbound stall: Device CPU0 CPU1 ======================================================== non-shared DSCI =>1 ALSI => 1 Thin INT ALSI => 0 non-shared DSCI tasklets scheduled shared DSCI => 1 ALSI => 1 shared DSCI => 0 ALSI ? -> set Thin INT ALSI => 0 ALSI was set, shared DSCI => 1 After that no more interrupts occur because the DSCI is still set. Fix that race by only resetting the shared DSCI if it was actually set so the tasklets for all shared devices are scheduled and will run after the interrupt. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-01-05[S390] qdio: add qdio interrupts to interrupt statisticsJan Glauber1-0/+2
Count traditional qdio interrupts and adapter interrupts for qdio in the interrupt statistics. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-09-08qdio: extend API to allow pollingJan Glauber1-2/+136
Extend the qdio API to allow polling in the upper-layer driver. This is needed by qeth to use NAPI. To use the new interface the upper-layer driver must specify the queue_start_poll(). This callback is used to signal the upper-layer driver that is has initiative and must process the inbound queue by calling qdio_get_next_buffers(). If the upper-layer driver wants to stop polling it calls qdio_start_irq(). Since adapter interrupts are not completely stoppable qdio implements a software bit QDIO_QUEUE_IRQS_DISABLED to safely disable interrupts for an input queue. The old interface is preserved and will be used as is by zfcp. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-17[S390] qdio: remove API wrappersJan Glauber1-46/+0
Remove qdio API wrappers used by qeth and replace them by calling the appropriate functions directly. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-05-17[S390] qdio: dont convert timestamps to microsecondsJan Glauber1-4/+4
Don't convert timestamps to microseconds, use timestamps returned by get_clock() directly. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-05-17[S390] qdio: prevent starvation on PCI devicesJan Glauber1-3/+7
If adapter interrupts are not available and traditional IO interrupts are used for qdio the inbound tasklet continued to run if new data arrived. That could possibly block other tasklets scheduled on the same CPU. If new data arrives schedule the tasklet again instead of directly processing the new data. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-05-17[S390] qdio: count number of qdio interruptsJan Glauber1-0/+3
Add missing increment for the qdio interrupt counter. Signed-off-by: Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.hTejun Heo1-0/+1
percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>