Skip to content

Remove isa_unchecked_dma and some more GFP_DMAs in the mid layer

Andi Kleen linux-scsi 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest20 of 22 patches 18 repliesIn review

20 of 22 patches are in this archive. The cover letter announces 22.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/22Add new sense_buffer_mask host template fieldDocumentation/scsi/scsi_mid_low_api.txt drivers/scsi/hosts.c drivers/scsi/scsi.c +1 more+25 -22 replies
2/22Remove unchecked_isa in BusLogicdrivers/scsi/BusLogic.c+56 -180 replies
3/22Remove unchecked_isa_dma in advansys.cdrivers/scsi/advansys.c+159 -659 replies
4/22Remove unchecked_isa_dma in gdthdrivers/scsi/gdth.c+60 -190 replies
6/22Remove unchecked_isa_dma in aha1542drivers/scsi/aha1542.c+28 -100 replies
7/22Remove unchecked_isa_dma in aha152x/wd7000/sym53c416/u14-34f/NCR53c406adrivers/scsi/NCR53c406a.c drivers/scsi/aha152x.c drivers/scsi/sym53c416.c +3 more+113 -360 replies
8/22Remove random noop unchecked_isa_dma usersdrivers/scsi/arm/acornscsi.c drivers/scsi/arm/cumana_1.c drivers/scsi/dc395x.c +5 more+0 -91 reply
10/22Remove unchecked_isa_dma support for hostdatadrivers/scsi/hosts.c+0 -30 replies
11/22Remove unchecked_isa_dma checks in sg.cdrivers/scsi/sg.c+9 -270 replies
12/22Remove GFP_DMAs/unchecked_isa_dma checks in scsi_scan.cdrivers/scsi/scsi_scan.c+2 -46 replies
13/22Don't disable direct_io for unchecked_isa_dma in st.cdrivers/scsi/st.c+1 -10 replies
14/22Remove automatic block layer bouncing for unchecked_isa_dmadrivers/scsi/scsi_lib.c+0 -20 replies
15/22Remove GFP_DMA use in sr_ioctldrivers/scsi/sr_ioctl.c+4 -90 replies
16/22Remove unchecked_isa_dma from sysfsdrivers/scsi/scsi_sysfs.c+0 -20 replies
17/22Switch to a single SCSI command pooldrivers/scsi/scsi.c+24 -230 replies
18/22Finally remove unchecked_isa_dma support for Cmndsdrivers/scsi/scsi.c+1 -20 replies
19/22Finally kill unchecked_isa_dmaDocumentation/scsi/scsi_mid_low_api.txt drivers/scsi/hosts.c include/scsi/scsi_host.h+0 -100 replies
20/22Remove GFP_DMA in sr.cdrivers/scsi/sr.c+2 -20 replies
21/22Remove GFP_DMA in ch.cdrivers/scsi/ch.c+3 -30 replies
22/22Remove GFP_DMA in sr_vendor.cdrivers/scsi/sr_vendor.c+2 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH] [0/22] Remove isa_unchecked_dma and some more GFP_DMAs in the mid layer

This patchkit fixes all existing drivers that used isa_unchecked_dma to not need that anymore. I have some upcoming infrastructure changes for DMA memory management and isa_unchecked_dma was in the way.

Enabling isa_unchecked_dma had several effects:
- All incoming scsi_cmnds were in GFP_DMA memory.
Only one driver relied on that actually (advansys), the others all accessed the scsi_cmnds only with the CPU.
- scsi hostdata is allocated with GFP_DMA
A lot of drivers relied on that. I converted them all to allocate hostdata in a separate buffer linked to rom the scsi host structure.
- Enabling block layer bouncing for all data. That's the most important one. I changed all drivers to do that directly instead of relying on the mid layer for it.
- sense_buffer is allocated with GFP_DMA. That was also commonly required and not easy to fix so I created a separate host template field that enables sense_buffer bouncing.

Also while I was it I removed also a lot of GFP_DMAs in the frontend drivers which are not needed anymore because the block layer does the bouncing for all data anyways.

The main problem of the patchkit is that is that I wasn't able to test the drivers because I don't have any of the hardware. All changes (except perhaps advansys) were relatively simple and straight forward so I don't expect many problems though.

If anybody has any of these ISA SCSI adapters and would be willing to test them with these patches that would be appreciated.
I suspect actually that some of the ISA drivers are actually already bitrotted independently of these changes. Hopefully they won't make anything worse though.

Patches against 2.6.25rc2

These are a lot of patches. I can set up a git tree if that makes merging easier. Please let me now if I should do that.

-Andi