More fixes, cleanup and modernization for NCR5380 drivers
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest78 patches 15 repliesIn review
- v377 patches 78 repliesSuperseded
- v272 patches 2 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 71 patches | 110 replies | Superseded |
Changes in v4 from the cover letter
- Patch 67 removes another redundant comment.
- Patch 68 was split into two patches as requested.
- Latest Tested-By and Reviewed-By tags were added.
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/78 | atari_scsi: Fix SCSI host ID settingdrivers/ | +1 | 0 replies | |
| 2/78 | ncr5380: Remove redundant static variable initializersdrivers/ drivers/ drivers/ +3 more | +16 | 0 replies | |
| 3/78 | ncr5380: Eliminate PDEBUG*, TDEBUG* and DTCDEBUG* macrosdrivers/ drivers/ drivers/ +3 more | +19 | 0 replies | |
| 4/78 | ncr5380: Remove more pointless macrosdrivers/ drivers/ drivers/ +3 more | +14 | 0 replies | |
| 5/78 | ncr5380: Remove NCR5380_local_declare and NCR5380_setup macrosdrivers/ drivers/ drivers/ +10 more | +77 | 0 replies | |
| 6/78 | ncr5380: Remove NCR5380_instance_name macrodrivers/ drivers/ drivers/ | +5 | 0 replies | |
| 7/78 | ncr5380: Split NCR5380_init() into two functionsdrivers/ drivers/ drivers/ +6 more | +35 | 0 replies | |
| 8/78 | ncr5380: Move NCR53C400-specific codedrivers/ drivers/ drivers/ | +18 | 0 replies | |
| 9/78 | atari_NCR5380: Reset bus on driver initialization if requireddrivers/ drivers/ | +134 | 0 replies | |
| 10/78 | atari_NCR5380: Remove RESET_BOOT, CONFIG_ATARI_SCSI_TOSHIBA_DELAY and CONFIG_ATARI_SCSI_RESET_BOOTdrivers/ drivers/ drivers/ +4 more | +51 | 0 replies | |
| 11/78 | ncr5380: Simplify bus reset handlersdrivers/ drivers/ | +23 | 0 replies | |
| 12/78 | ncr5380: Remove unused hostdata->aborted flagdrivers/ drivers/ drivers/ | +0 | 0 replies | |
| 13/78 | ncr5380: Remove redundant register writesdrivers/ drivers/ | +0 | 0 replies | |
| 14/78 | ncr5380: Use return instead of goto in NCR5380_select()drivers/ drivers/ | +11 | 0 replies | |
| 15/78 | ncr5380: Always escalate bad target time-out in NCR5380_select()drivers/ drivers/ drivers/ | +0 | 0 replies | |
| 16/78 | ncr5380: Proceed with next command after NCR5380_select() calls scsi_donedrivers/ drivers/ | +10 | 0 replies | |
| 17/78 | ncr5380: Keep BSY asserted when entering SELECTION phasedrivers/ drivers/ | +11 | 0 replies | |
| 18/78 | ncr5380: Eliminate USLEEP_WAITLONG delaydrivers/ drivers/ | +5 | 0 replies | |
| 19/78 | ncr5380: Cleanup bogus {request,release}_region() callsdrivers/ drivers/ drivers/ +1 more | +0 | 0 replies | |
| 20/78 | ncr5380: Introduce unbound workqueuedrivers/ drivers/ drivers/ +10 more | +96 | 0 replies | |
| 21/78 | ncr5380: Sleep when polling, if possibledrivers/ drivers/ drivers/ | +94 | 0 replies | |
| 22/78 | ncr5380: Eliminate selecting statedrivers/ drivers/ drivers/ | +29 | 0 replies | |
| 23/78 | ncr5380: Always retry arbitration and selectiondrivers/ drivers/ | +2 | 0 replies | |
| 24/78 | ncr5380: Implement NCR5380_dma_xfer_len and remove LIMIT_TRANSFERSIZE macrodrivers/ drivers/ drivers/ +8 more | +55 | 0 replies | |
| 25/78 | ncr5380: Rework disconnect versus poll logicdrivers/ drivers/ drivers/ +1 more | +15 | 0 replies | |
| 26/78 | ncr5380: Fix NCR5380_transfer_pio() resultdrivers/ drivers/ | +15 | 0 replies | |
| 27/78 | ncr5380: Add missing lock in eh_abort_handlerdrivers/ | +8 | 0 replies | |
| 28/78 | ncr5380: Drop DEF_SCSI_QCMD macrodrivers/ drivers/ | +16 | 0 replies | |
| 29/78 | ncr5380: Remove references to linked commandsdrivers/ drivers/ | +0 | 0 replies | |
| 30/78 | ncr5380: Add missing break after case MESSAGE_REJECTdrivers/ | +1 | 0 replies | |
| 31/78 | ncr5380: Fix !REQ timeout in do_abort()drivers/ | +5 | 0 replies | |
| 32/78 | ncr5380: Fix bus phase in do_abort()drivers/ | +2 | 0 replies | |
| 33/78 | atari_NCR5380: Set do_abort() timeoutsdrivers/ drivers/ | +34 | 0 replies | |
| 34/78 | atari_NCR5380: Use arbitration timeoutdrivers/ drivers/ | +49 | 7 replies | |
| 35/78 | ncr5380: Dont wait for BUS FREE after disconnectdrivers/ drivers/ | +0 | 0 replies | |
| 36/78 | ncr5380: Use work_struct instead of delayed_workdrivers/ drivers/ | +5 | 0 replies | |
| 37/78 | ncr5380: Standardize work queueing algorithmdrivers/ drivers/ | +6 | 0 replies | |
| 38/78 | ncr5380: Remove UNSAFE macrodrivers/ drivers/ drivers/ | +0 | 0 replies | |
| 39/78 | ncr5380: Standardize interrupt handlingdrivers/ drivers/ drivers/ +1 more | +180 | 0 replies | |
| 40/78 | ncr5380: Introduce NCR5380_poll_politely2drivers/ drivers/ | +75 | 0 replies | |
| 41/78 | ncr5380: Replace redundant flags with FLAG_NO_DMA_FIXUPdrivers/ drivers/ drivers/ +1 more | +25 | 0 replies | |
| 42/78 | ncr5380: Replace READ_OVERRUNS macro with FLAG_NO_DMA_FIXUPSdrivers/ | +11 | 0 replies | |
| 43/78 | ncr5380: Standardize reselection handlingdrivers/ drivers/ | +93 | 0 replies | |
| 44/78 | ncr5380: Fix off-by-one bug in extended_msg[] bounds checkdrivers/ drivers/ | +4 | 0 replies | |
| 45/78 | ncr5380: Cleanup #include directivesdrivers/ drivers/ drivers/ +9 more | +7 | 0 replies | |
| 46/78 | ncr5380: Fix NDEBUG_NO_DATAOUT flagdrivers/ | +1 | 0 replies | |
| 47/78 | ncr5380: Fix and cleanup scsi_host_template initializersdrivers/ drivers/ drivers/ +9 more | +82 | 0 replies | |
| 48/78 | atari_NCR5380: Fix queue_size limitdrivers/ | +2 | 0 replies | |
| 49/78 | ncr5380: Remove redundant ICR_ARBITRATION_LOST test and eliminate FLAG_DTC3181Edrivers/ drivers/ drivers/ +2 more | +3 | 0 replies | |
| 50/78 | ncr5380: Change instance->host_lock to hostdata->lockdrivers/ drivers/ drivers/ | +109 | 0 replies | |
| 51/78 | ncr5380: Remove command list debug codedrivers/ drivers/ drivers/ +3 more | +9 | 0 replies | |
| 52/78 | ncr5380: Remove H_NO macro and introduce dsprintkdrivers/ drivers/ drivers/ | +38 | 0 replies | |
| 53/78 | ncr5380: Use shost_priv helperdrivers/ drivers/ | +17 | 0 replies | |
| 54/78 | ncr5380: Use dsprintk() for queue debuggingdrivers/ drivers/ | +47 | 0 replies | |
| 55/78 | ncr5380: Remove LIST and REMOVE macrosdrivers/ drivers/ | +0 | 0 replies | |
| 56/78 | ncr5380: Remove redundant volatile qualifiersdrivers/ drivers/ | +7 | 0 replies | |
| 57/78 | ncr5380: Use standard list data structuredrivers/ drivers/ drivers/ +10 more | +106 | 0 replies | |
| 58/78 | ncr5380: Refactor command completiondrivers/ drivers/ | +55 | 0 replies | |
| 59/78 | ncr5380: Fix autosense bugsdrivers/ drivers/ drivers/ | +249 | 0 replies | |
| 60/78 | ncr5380: Implement new eh_abort_handlerdrivers/ drivers/ | +282 | 0 replies | |
| 61/78 | ncr5380: Fix EH during arbitration and selectiondrivers/ drivers/ drivers/ | +119 | 0 replies | |
| 62/78 | ncr5380: Implement new eh_bus_reset_handlerdrivers/ drivers/ | +72 | 0 replies | |
| 63/78 | atari_NCR5380: Remove HOSTNO macro from printk() and seq_printf() callsdrivers/ drivers/ | +18 | 0 replies | |
| 64/78 | atari_NCR5380: Eliminate HOSTNO macrodrivers/ drivers/ | +84 | 0 replies | |
| 65/78 | atari_scsi, sun3_scsi: Remove global Scsi_Host pointerdrivers/ drivers/ drivers/ | +36 | 0 replies | |
| 66/78 | ncr5380: Fix soft lockupsdrivers/ drivers/ drivers/ +7 more | +16 | 0 replies | |
| 67/78 | ncr5380: Cleanup commentsdrivers/ drivers/ | +53 | 0 replies | |
| 68/78 | ncr5380: Fix trailing whitespace using regexpdrivers/ | +186 | 0 replies | |
| 69/78 | ncr5380: Fix whitespace in comments using regexpdrivers/ drivers/ | +157 | 7 replies | |
| 70/78 | ncr5380: Merge changes from atari_NCR5380.cdrivers/ | +87 | 0 replies | |
| 71/78 | atari_NCR5380: Merge changes from NCR5380.cdrivers/ | +52 | 0 replies | |
| 72/78 | ncr5380: Cleanup whitespace and parenthesesdrivers/ drivers/ | +32 | 0 replies | |
| 73/78 | ncr5380: Fix pseudo DMA transfers on 53C400drivers/ | +4 | 0 replies | |
| 74/78 | ncr5380: Use runtime register mappingdrivers/ drivers/ drivers/ | +49 | 0 replies | |
| 75/78 | ncr5380: Enable PDMA for NCR53C400Adrivers/ | +19 | 0 replies | |
| 76/78 | ncr5380: Enable PDMA for DTC chipsdrivers/ drivers/ | +33 | 0 replies | |
| 77/78 | ncr5380: Fix wait for 53C80 registers registers after PDMAdrivers/ | +6 | 0 replies | |
| 78/78 | ncr5380: Add support for HP C2502drivers/ drivers/ | +59 | 0 replies |
Reviews trailers per patch
All 78 patches have a Reviewed-by or Acked-by.
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v4 00/78] More fixes, cleanup and modernization for NCR5380 drivers
Like my previous work on the NCR5380 drivers, this patch series has bug fixes, code cleanup and modernization. These drivers suffer from mistakes, poor style and neglect and this long series addresses the worst of it, covering all ten wrapper drivers and both of the core driver forks. The combined size of the drivers is reduced by over 700 LoC.
This series continues to reduce divergence between the two core driver forks, often by copying a bug fix from one to the other. Most patches are larger for having to keep the two forks in sync. Making the same change to both is churn if one of them is to be removed but neither can be as yet. By the end of this series the diff between the two forks is minimal, so it becomes clear what caused the fork and what can be done about it.
This patch series did benefit from scripts/checkpatch.pl but not too much. Decades ago, these drivers started out with 4-space tabs and if the 80 column limit were to be strictly enforced now, it would require adding new functions and shortening identifiers. I would defer this sort of activity until after the fork has been resolved.
All patches to all NCR5380 drivers (x86, ARM, m68k) have been compile- tested. The mac_scsi, dmx3191d, g_NCR5380 and atari_scsi modules were regression tested on suitable hardware.
Changes since v1:
- Patch 8 omits a pointless assignment.
- Patch 10 gets a better error message.
- Patch 20 drops the WQ_CPU_INTENSIVE flag.
- Patch 21 adds timing calibration for the register polling loop.
- Patch 49 is replaced by a new one that removes FLAG_DTC3181E.
- Patch 72 by Ondrej Zary was added to fix pseudo DMA on 53C400.
Changes since v2:
- Patch 21 has better calibration with low HZ values.
- Patch 57 no longer attempts to dereference a NULL pointer on Atari.
- Patch 66 initializes max_sectors in the host templates.
- Patches 73 thru 77 by Ondrej Zary were added with additional fixes for 53C400-compatible cards.
Changes since v3:
- Patch 67 removes another redundant comment.
- Patch 68 was split into two patches as requested.
- Latest Tested-By and Reviewed-By tags were added.
--- drivers/scsi/Kconfig | 17 drivers/scsi/NCR5380.c | 2876 +++++++++++++++++++------------------------ drivers/scsi/NCR5380.h | 87 - drivers/scsi/arm/cumana_1.c | 31 drivers/scsi/arm/oak.c | 27 drivers/scsi/atari_NCR5380.c | 2280 +++++++++++++++------------------- drivers/scsi/atari_scsi.c | 102 - drivers/scsi/dmx3191d.c | 33 drivers/scsi/dtc.c | 115 - drivers/scsi/dtc.h | 45 drivers/scsi/g_NCR5380.c | 408 +++--- drivers/scsi/g_NCR5380.h | 66 drivers/scsi/mac_scsi.c | 117 - drivers/scsi/pas16.c | 116 - drivers/scsi/pas16.h | 40 drivers/scsi/sun3_scsi.c | 141 -- drivers/scsi/t128.c | 102 - drivers/scsi/t128.h | 39 18 files changed, 2947 insertions(+), 3695 deletions(-)