Linux SCSI subsystem development
 help / color / mirror / Atom feed
* [PATCH] [0/21] Remove isa_unchecked_dma and some more GFP_DMAs in the mid layer v5
@ 2008-11-15 23:11 Andi Kleen
  2008-11-15 23:11 ` [PATCH] [1/21] Add the alloc/get_pages_mask calls Andi Kleen
                   ` (20 more replies)
  0 siblings, 21 replies; 42+ messages in thread
From: Andi Kleen @ 2008-11-15 23:11 UTC (permalink / raw)
  To: James.Bottomley, axboe, linux-scsi


[repost of the earlier patch kit, ported to 2.6.28rc4. Was acked
by axboe earlier]
[Can this be considered for .29 please? This is the older origial 
 patchkit which was relatively uncontroversal before the mid layer 
 sense buffer and with blk_*alloc* changes removed.]

v2: various cleanups, use dma_alloc_coherent instead of naked GFP_DMA
    add blk_* allocators to avoid bouncing in SCSI scan
v3: Remove cmnd/sense buffer bouncing in advansys. 
    Replace sense_buffer_mask with a single bit
v4: this is the original patchkit which was relatively uncontroversal
    without any sense buffer changes.
    Just forward ported to a 2.6.26-rc8 tree.
v5: Ported to 2.6.28rc4

Original description:

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. Or rather we ask the block layer
now to bounce.

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.28rc4

Also available as a git tree at

The following changes since commit 9bf1a2445f3c569098b8de7097ca324e65abecc2:
  Linus Torvalds (1):
        Linux 2.6.28-rc5

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-misc-2.6 scsi-dma

Andi Kleen (21):
      Add the alloc/get_pages_mask calls
      Add blk_q_mask
      Pass gfp to scsi_allocate_command
      Add sense_buffer_isa to host template
      Remove unchecked_isa in BusLogic
      Remove unchecked_isa_dma in advansys.c
      Remove unchecked_isa_dma in gdth
      Remove unchecked_isa_dma in eata.c
      Remove unchecked_isa_dma in aha1542
      Remove unchecked_isa_dma in aha152x/wd7000/sym53c416/u14-34f/NCR53c406a
      Remove GFP_DMA uses in st/osst
      Remove unchecked_isa_dma support for hostdata
      Use blk_q_mask/get_pages_mask in sg driver
      Rely on block layer bouncing for ISA DMA devices scanning
      Don't disable direct_io for unchecked_isa_dma in st.c
      Remove automatic block layer bouncing for unchecked_isa_dma
      Remove GFP_DMA use in sr.c
      Remove unchecked_isa_dma from sysfs
      Switch to a single SCSI command pool
      Finally kill unchecked_isa_dma
      Convert DMA buffers in ch.c to allocate via the block layer

 Documentation/scsi/scsi_mid_low_api.txt |    4 +-
 drivers/scsi/BusLogic.c                 |   77 +++++++++++----
 drivers/scsi/NCR53c406a.c               |    8 ++-
 drivers/scsi/advansys.c                 |  162 ++++++++++++++++++++-----------
 drivers/scsi/aha152x.c                  |   29 +++++-
 drivers/scsi/aha1542.c                  |   40 ++++++--
 drivers/scsi/ch.c                       |   16 ++-
 drivers/scsi/eata.c                     |   54 ++++++++---
 drivers/scsi/gdth.c                     |   81 ++++++++++++----
 drivers/scsi/hosts.c                    |    5 +-
 drivers/scsi/osst.c                     |   24 ++---
 drivers/scsi/osst.h                     |    2 -
 drivers/scsi/scsi.c                     |   93 +++++++++++-------
 drivers/scsi/scsi_lib.c                 |    2 -
 drivers/scsi/scsi_scan.c                |    6 +-
 drivers/scsi/scsi_sysfs.c               |    2 -
 drivers/scsi/sg.c                       |   36 ++------
 drivers/scsi/sr.c                       |    2 +-
 drivers/scsi/sr_ioctl.c                 |   13 +--
 drivers/scsi/sr_vendor.c                |    4 +-
 drivers/scsi/st.c                       |   37 +++----
 drivers/scsi/st.h                       |    2 -
 drivers/scsi/sym53c416.c                |    9 ++-
 drivers/scsi/u14-34f.c                  |   54 ++++++++---
 drivers/scsi/ultrastor.c                |   13 ++-
 drivers/scsi/wd7000.c                   |   48 ++++++---
 include/linux/blkdev.h                  |    5 +
 include/linux/gfp.h                     |   22 ++++-
 include/scsi/scsi_cmnd.h                |    5 +-
 include/scsi/scsi_host.h                |   14 ++-
 include/scsi/sg.h                       |    1 -
 31 files changed, 564 insertions(+), 306 deletions(-)

-Andi

^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2008-11-17 11:48 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-15 23:11 [PATCH] [0/21] Remove isa_unchecked_dma and some more GFP_DMAs in the mid layer v5 Andi Kleen
2008-11-15 23:11 ` [PATCH] [1/21] Add the alloc/get_pages_mask calls Andi Kleen
2008-11-15 23:11 ` [PATCH] [2/21] Add blk_q_mask Andi Kleen
2008-11-16 14:21   ` James Bottomley
2008-11-16 17:40     ` Theodore Tso
2008-11-16 22:19     ` Andi Kleen
2008-11-15 23:11 ` [PATCH] [3/21] Pass gfp to scsi_allocate_command Andi Kleen
2008-11-16 15:29   ` James Bottomley
2008-11-16 22:21     ` Andi Kleen
2008-11-15 23:11 ` [PATCH] [4/21] Add sense_buffer_isa to host template Andi Kleen
2008-11-15 23:11 ` [PATCH] [5/21] Remove unchecked_isa in BusLogic Andi Kleen
2008-11-16 15:46   ` James Bottomley
2008-11-16 22:31     ` Andi Kleen
2008-11-17 11:03       ` James Bottomley
2008-11-15 23:11 ` [PATCH] [6/21] Remove unchecked_isa_dma in advansys.c Andi Kleen
2008-11-16 16:56   ` James Bottomley
2008-11-16 22:33     ` Andi Kleen
2008-11-17 11:32       ` James Bottomley
2008-11-15 23:11 ` [PATCH] [7/21] Remove unchecked_isa_dma in gdth Andi Kleen
2008-11-15 23:11 ` [PATCH] [8/21] Remove unchecked_isa_dma in eata.c Andi Kleen
2008-11-15 23:11 ` [PATCH] [9/21] Remove unchecked_isa_dma in aha1542 Andi Kleen
2008-11-15 23:11 ` [PATCH] [10/21] Remove unchecked_isa_dma in aha152x/wd7000/sym53c416/u14-34f/NCR53c406a Andi Kleen
2008-11-15 23:11 ` [PATCH] [11/21] Remove GFP_DMA uses in st/osst Andi Kleen
2008-11-15 23:11 ` [PATCH] [12/21] Remove unchecked_isa_dma support for hostdata Andi Kleen
2008-11-15 23:11 ` [PATCH] [13/21] Use blk_q_mask/get_pages_mask in sg driver Andi Kleen
2008-11-16  2:11   ` Douglas Gilbert
2008-11-16 22:17     ` Andi Kleen
2008-11-17  5:11       ` FUJITA Tomonori
2008-11-17 10:22         ` Andi Kleen
2008-11-17 11:07           ` FUJITA Tomonori
2008-11-17 11:23             ` Andi Kleen
2008-11-17 11:22               ` FUJITA Tomonori
2008-11-17 11:43                 ` Andi Kleen
2008-11-17 11:47                   ` FUJITA Tomonori
2008-11-15 23:11 ` [PATCH] [14/21] Rely on block layer bouncing for ISA DMA devices scanning Andi Kleen
2008-11-15 23:11 ` [PATCH] [15/21] Don't disable direct_io for unchecked_isa_dma in st.c Andi Kleen
2008-11-15 23:11 ` [PATCH] [16/21] Remove automatic block layer bouncing for unchecked_isa_dma Andi Kleen
2008-11-15 23:11 ` [PATCH] [17/21] Remove GFP_DMA use in sr.c Andi Kleen
2008-11-15 23:11 ` [PATCH] [18/21] Remove unchecked_isa_dma from sysfs Andi Kleen
2008-11-15 23:11 ` [PATCH] [19/21] Switch to a single SCSI command pool Andi Kleen
2008-11-15 23:11 ` [PATCH] [20/21] Finally kill unchecked_isa_dma Andi Kleen
2008-11-15 23:11 ` [PATCH] [21/21] Convert DMA buffers in ch.c to allocate via the block layer Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox